1 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 { 6 'variables': { 7 'chromium_code': 1, 8 }, 9 'targets': [ 10 { 11 'target_name': 'gfx_unittests', 12 'type': '<(gtest_target_type)', 13 # iOS uses a small subset of ui. common_sources are the only files that 14 # are built on iOS. 15 'common_sources' : [ 16 'font_unittest.cc', 17 'image/image_family_unittest.cc', 18 'image/image_ios_unittest.mm', 19 'image/image_skia_unittest.cc', 20 'image/image_unittest.cc', 21 'screen_unittest.cc', 22 'test/run_all_unittests.cc', 23 'text_elider_unittest.cc', 24 'text_utils_unittest.cc', 25 ], 26 'all_sources': [ 27 '<@(_common_sources)', 28 'animation/animation_container_unittest.cc', 29 'animation/animation_unittest.cc', 30 'animation/multi_animation_unittest.cc', 31 'animation/slide_animation_unittest.cc', 32 'animation/tween_unittest.cc', 33 'blit_unittest.cc', 34 'break_list_unittest.cc', 35 'canvas_unittest.cc', 36 'canvas_unittest_mac.mm', 37 'codec/jpeg_codec_unittest.cc', 38 'codec/png_codec_unittest.cc', 39 'color_analysis_unittest.cc', 40 'color_utils_unittest.cc', 41 'display_change_notifier_unittest.cc', 42 'display_unittest.cc', 43 'font_list_unittest.cc', 44 'geometry/box_unittest.cc', 45 'geometry/cubic_bezier_unittest.cc', 46 'geometry/insets_unittest.cc', 47 'geometry/matrix3_unittest.cc', 48 'geometry/point_unittest.cc', 49 'geometry/point3_unittest.cc', 50 'geometry/quad_unittest.cc', 51 'geometry/r_tree_unittest.cc', 52 'geometry/rect_unittest.cc', 53 'geometry/safe_integer_conversions_unittest.cc', 54 'geometry/size_unittest.cc', 55 'geometry/vector2d_unittest.cc', 56 'geometry/vector3d_unittest.cc', 57 'image/image_mac_unittest.mm', 58 'image/image_util_unittest.cc', 59 'mac/coordinate_conversion_unittest.mm', 60 'platform_font_mac_unittest.mm', 61 'range/range_mac_unittest.mm', 62 'range/range_unittest.cc', 63 'range/range_win_unittest.cc', 64 'render_text_unittest.cc', 65 'sequential_id_generator_unittest.cc', 66 'shadow_value_unittest.cc', 67 'skbitmap_operations_unittest.cc', 68 'skrect_conversion_unittest.cc', 69 'transform_util_unittest.cc', 70 'utf16_indexing_unittest.cc', 71 ], 72 'dependencies': [ 73 '../../base/base.gyp:base', 74 '../../base/base.gyp:test_support_base', 75 '../../skia/skia.gyp:skia', 76 '../../testing/gtest.gyp:gtest', 77 '../../third_party/libpng/libpng.gyp:libpng', 78 '../base/ui_base.gyp:ui_base', 79 '../resources/ui_resources.gyp:ui_test_pak', 80 'gfx.gyp:gfx', 81 'gfx.gyp:gfx_geometry', 82 'gfx.gyp:gfx_test_support', 83 ], 84 'conditions': [ 85 ['OS == "ios"', { 86 'sources': ['<@(_common_sources)'], 87 }, { # OS != "ios" 88 'sources': ['<@(_all_sources)'], 89 }], 90 ['OS != "mac" and OS != "ios"', { 91 'sources': [ 92 'transform_unittest.cc', 93 'interpolated_transform_unittest.cc', 94 ], 95 }], 96 ['use_pango == 1', { 97 'dependencies': [ 98 '../../build/linux/system.gyp:fontconfig', 99 '../../build/linux/system.gyp:pangocairo', 100 ], 101 'sources': [ 102 'font_render_params_linux_unittest.cc', 103 'platform_font_pango_unittest.cc', 104 ], 105 'conditions': [ 106 ['use_allocator!="none"', { 107 'dependencies': [ 108 '../../base/allocator/allocator.gyp:allocator', 109 ], 110 }], 111 ], 112 }], 113 ['use_ozone==1 and use_pango==0', { 114 'sources!': [ 115 'canvas_unittest.cc', 116 'font_list_unittest.cc', 117 'font_unittest.cc', 118 'render_text_unittest.cc', 119 'text_elider_unittest.cc', 120 ], 121 }], 122 ['OS == "android"', { 123 'dependencies': [ 124 '../../testing/android/native_test.gyp:native_test_native_code', 125 ], 126 # Do not run display_change_notifier_unittest.cc on Android because it 127 # does not compile display_observer.cc 128 'sources!': [ 129 'display_change_notifier_unittest.cc', 130 ], 131 }], 132 ['OS=="android" or OS=="ios"', { 133 'sources!': [ 134 'render_text_unittest.cc', 135 ], 136 }], 137 ['use_aura==1', { 138 'sources!': [ 139 'screen_unittest.cc', 140 ], 141 }], 142 ['OS == "win"', { 143 'sources': [ 144 'color_profile_win_unittest.cc', 145 'font_fallback_win_unittest.cc', 146 'icon_util_unittest.cc', 147 'icon_util_unittests.rc', 148 'platform_font_win_unittest.cc', 149 ], 150 'msvs_settings': { 151 'VCLinkerTool': { 152 'DelayLoadDLLs': [ 153 'd2d1.dll', 154 'd3d10_1.dll', 155 ], 156 'AdditionalDependencies': [ 157 'd2d1.lib', 158 'd3d10_1.lib', 159 ], 160 }, 161 }, 162 'link_settings': { 163 'libraries': [ 164 '-limm32.lib', 165 '-loleacc.lib', 166 ], 167 }, 168 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 169 'msvs_disabled_warnings': [ 4267, ], 170 }], 171 ], 172 } 173 ], 174 'conditions': [ 175 ['OS == "android"', { 176 'targets': [ 177 { 178 'target_name': 'gfx_unittests_apk', 179 'type': 'none', 180 'dependencies': [ 181 '../android/ui_android.gyp:ui_java', 182 'gfx_unittests', 183 ], 184 'variables': { 185 'test_suite_name': 'gfx_unittests', 186 }, 187 'includes': [ '../../build/apk_test.gypi' ], 188 }, 189 ], 190 }], 191 ], 192 } 193