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