OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/android/rules.gni") | 5 import("//build/config/android/rules.gni") |
| 6 import("//testing/test.gni") |
6 | 7 |
7 # GYP: components.gyp:web_restrictions_java | 8 if (is_android) { |
8 android_library("web_restrictions_java") { | 9 # GYP: components.gyp:web_restrictions_java |
9 java_files = [ "java/src/org/chromium/components/webrestrictions/WebRestrictio
nsContentProvider.java" ] | 10 android_library("web_restrictions_java") { |
| 11 java_files = [ |
| 12 "browser/java/src/org/chromium/components/webrestrictions/WebRestrictionsC
ontentProvider.java", |
| 13 "browser/java/src/org/chromium/components/webrestrictions/WebRestrictionsC
lient.java", |
| 14 ] |
| 15 deps = [ |
| 16 "//base:base_java", |
| 17 ] |
| 18 } |
| 19 |
| 20 # GYP: //components/components_test.gyp:components_junit_tests |
| 21 junit_binary("components_web_restrictions_junit_tests") { |
| 22 java_files = [ |
| 23 "browser/junit/src/org/chromium/components/webrestrictions/WebRestrictions
ContentProviderTest.java", |
| 24 "browser/junit/src/org/chromium/components/webrestrictions/WebRestrictions
ClientTest.java", |
| 25 ] |
| 26 deps = [ |
| 27 ":web_restrictions_java", |
| 28 "//base:base_java", |
| 29 "//third_party/junit:hamcrest", |
| 30 ] |
| 31 } |
| 32 |
| 33 generate_jni("web_restrictions_jni_headers") { |
| 34 sources = [ |
| 35 "browser/java/src/org/chromium/components/webrestrictions/WebRestrictionsC
lient.java", |
| 36 ] |
| 37 jni_package = "web_restrictions" |
| 38 } |
| 39 |
| 40 # GYP: components.gyp:web_restrictions_browser |
| 41 static_library("browser") { |
| 42 sources = [ |
| 43 "browser/web_restrictions_client.cc", |
| 44 "browser/web_restrictions_client.h", |
| 45 "browser/web_restrictions_resource_throttle.cc", |
| 46 "browser/web_restrictions_resource_throttle.h", |
| 47 ] |
| 48 deps = [ |
| 49 ":web_restrictions_jni_headers", |
| 50 "//base", |
| 51 "//content/public/browser", |
| 52 "//net", |
| 53 ] |
| 54 } |
| 55 |
| 56 # GYP: components.gyp:web_restrictions_renderer |
| 57 static_library("renderer") { |
| 58 sources = [ |
| 59 "renderer/web_restrictions_gin_wrapper.cc", |
| 60 "renderer/web_restrictions_gin_wrapper.h", |
| 61 ] |
| 62 deps = [ |
| 63 "//base", |
| 64 "//content/public/renderer", |
| 65 "//gin", |
| 66 "//third_party/WebKit/public:blink_headers", |
| 67 ] |
| 68 } |
| 69 |
| 70 generate_jni("test_support_jni_headers") { |
| 71 sources = [ |
| 72 "browser/javatest/src/org/chromium/components/webrestrictions/MockWebRestr
ictionsClient.java", |
| 73 ] |
| 74 jni_package = "web_restrictions" |
| 75 deps = [ |
| 76 ":web_restrictions_java", |
| 77 ] |
| 78 } |
| 79 |
| 80 android_library("test_support_java") { |
| 81 java_files = [ "browser/javatest/src/org/chromium/components/webrestrictions
/MockWebRestrictionsClient.java" ] |
| 82 deps = [ |
| 83 ":web_restrictions_java", |
| 84 "//base:base_java", |
| 85 ] |
| 86 } |
| 87 |
| 88 source_set("test_support") { |
| 89 sources = [ |
| 90 "browser/mock_web_restrictions_client.cc", |
| 91 "browser/mock_web_restrictions_client.h", |
| 92 ] |
| 93 deps = [ |
| 94 ":test_support_jni_headers", |
| 95 "//base", |
| 96 ] |
| 97 } |
| 98 |
| 99 source_set("unit_tests") { |
| 100 testonly = true |
| 101 sources = [ |
| 102 "browser/web_restrictions_client_unittest.cc", |
| 103 "browser/web_restrictions_resource_throttle_unittest.cc", |
| 104 ] |
| 105 deps = [ |
| 106 ":browser", |
| 107 ":test_support", |
| 108 "//base", |
| 109 "//base/test:test_support", |
| 110 "//content/test:test_support", |
| 111 "//net", |
| 112 "//testing/gtest", |
| 113 "//url", |
| 114 ] |
| 115 } |
10 } | 116 } |
11 | |
12 # GYP: //components/components_test.gyp:components_junit_tests | |
13 junit_binary("components_web_restrictions_junit_tests") { | |
14 java_files = [ "junit/src/org/chromium/components/webrestrictions/WebRestricti
onsContentProviderTest.java" ] | |
15 deps = [ | |
16 ":web_restrictions_java", | |
17 "//base:base_java", | |
18 "//third_party/junit:hamcrest", | |
19 ] | |
20 } | |
OLD | NEW |