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 import("../../../mojo_application.gni") 6 7 source_set("tests") { 8 testonly = true 9 10 sources = [ 11 "array_common_test.h", 12 "array_unittest.cc", 13 "associated_interface_unittest.cc", 14 "bind_task_runner_unittest.cc", 15 "binding_callback_unittest.cc", 16 "binding_unittest.cc", 17 "buffer_unittest.cc", 18 "connector_unittest.cc", 19 "constant_unittest.cc", 20 "container_test_util.cc", 21 "container_test_util.h", 22 "equals_unittest.cc", 23 "handle_passing_unittest.cc", 24 "interface_ptr_unittest.cc", 25 "map_common_test.h", 26 "map_unittest.cc", 27 "message_queue.cc", 28 "message_queue.h", 29 "multiplex_router_unittest.cc", 30 "request_response_unittest.cc", 31 "router_test_util.cc", 32 "router_test_util.h", 33 "router_unittest.cc", 34 "sample_service_unittest.cc", 35 "serialization_warning_unittest.cc", 36 "stl_converters_unittest.cc", 37 "string_unittest.cc", 38 "struct_unittest.cc", 39 "sync_method_unittest.cc", 40 "type_conversion_unittest.cc", 41 "union_unittest.cc", 42 "validation_context_unittest.cc", 43 "validation_unittest.cc", 44 "variant_test_util.h", 45 ] 46 47 deps = [ 48 ":mojo_public_bindings_test_utils", 49 "//mojo/public/cpp/bindings", 50 "//mojo/public/cpp/system", 51 "//mojo/public/cpp/test_support:test_utils", 52 "//mojo/public/interfaces/bindings/tests:test_associated_interfaces", 53 "//mojo/public/interfaces/bindings/tests:test_interfaces", 54 "//mojo/public/interfaces/bindings/tests:test_interfaces_experimental", 55 "//mojo/public/interfaces/bindings/tests:test_struct_traits_interfaces", 56 "//testing/gtest", 57 ] 58 59 data = [ 60 "//mojo/public/interfaces/bindings/tests/data/validation/", 61 ] 62 63 if (is_ios) { 64 assert_no_deps = [ "//third_party/WebKit/*" ] 65 } else { 66 sources += [ 67 "pickle_unittest.cc", 68 "struct_traits_unittest.cc", 69 ] 70 71 deps += [ "//mojo/public/interfaces/bindings/tests:test_interfaces_blink" ] 72 } 73 } 74 75 if (!is_ios) { 76 source_set("for_blink_tests") { 77 testonly = true 78 79 sources = [ 80 "array_common_test.h", 81 "container_test_util.cc", 82 "container_test_util.h", 83 "map_common_test.h", 84 "variant_test_util.h", 85 "wtf_array_unittest.cc", 86 "wtf_map_unittest.cc", 87 "wtf_types_unittest.cc", 88 ] 89 90 deps = [ 91 "//mojo/public/cpp/bindings", 92 "//mojo/public/cpp/system", 93 "//mojo/public/interfaces/bindings/tests:test_interfaces", 94 "//mojo/public/interfaces/bindings/tests:test_wtf_types", 95 "//mojo/public/interfaces/bindings/tests:test_wtf_types_blink", 96 "//testing/gtest", 97 ] 98 } 99 } 100 101 source_set("struct_with_traits_impl") { 102 sources = [ 103 "struct_with_traits_impl.cc", 104 "struct_with_traits_impl.h", 105 ] 106 107 deps = [ 108 "//base", 109 "//mojo/public/cpp/system:system", 110 ] 111 } 112 113 source_set("perftests") { 114 testonly = true 115 116 sources = [ 117 "bindings_perftest.cc", 118 ] 119 120 if (!is_ios) { 121 sources += [ "e2e_perftest.cc" ] 122 } 123 124 deps = [ 125 "//base/test:test_support", 126 "//mojo/edk/test:test_support", 127 "//mojo/public/cpp/bindings", 128 "//mojo/public/cpp/system", 129 "//mojo/public/cpp/test_support:test_utils", 130 "//mojo/public/interfaces/bindings/tests:test_interfaces", 131 "//testing/gtest", 132 ] 133 } 134 135 source_set("mojo_public_bindings_test_utils") { 136 sources = [ 137 "validation_test_input_parser.cc", 138 "validation_test_input_parser.h", 139 ] 140 141 deps = [ 142 "//mojo/public/c/system", 143 ] 144 } 145