Commit c00a2129 authored by Anastasiia Nikolaienko's avatar Anastasiia Nikolaienko Committed by Commit Bot

Move gaia_auth_host:browser_tests to include_js_tests

Include gaia_auth_host:browser_tests only if include_js_tests flag is
true.

Bug: 1061915
Change-Id: I25afe8abd9a94142658d91d916b678663f6a42f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2106175Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Anastasiia Nikolaienko <anastasiian@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750957}
parent fe0d4f2d
...@@ -3,28 +3,34 @@ ...@@ -3,28 +3,34 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//chrome/test/base/js2gtest.gni") import("//chrome/test/base/js2gtest.gni")
import("//chrome/test/include_js_tests.gni")
import("//third_party/closure_compiler/compile_js.gni") import("//third_party/closure_compiler/compile_js.gni")
import("//ui/webui/resources/tools/js_modulizer.gni") import("//ui/webui/resources/tools/js_modulizer.gni")
js2gtest("login_unitjs_tests") { # Since js2gtest()s don't compile in some scenarios when include_js_tests is
# These could be unit tests, except they need a browser context in order # false, and since this file may be loaded even when it's false, we need to make
# to construct a DOMParser object - so they are webui tests. # sure the js2gtest() target only exists in this file when it works.
test_type = "webui" if (is_chromeos && include_js_tests) {
sources = [ js2gtest("login_unitjs_tests") {
"saml_password_attributes_test.unitjs", # These could be unit tests, except they need a browser context in order
"saml_timestamps_test.unitjs", # to construct a DOMParser object - so they are webui tests.
] test_type = "webui"
gen_include_files = [ sources = [
"saml_password_attributes.js", "saml_password_attributes_test.unitjs",
"saml_timestamps.js", "saml_timestamps_test.unitjs",
"//ui/webui/resources/js/cr.js", ]
] gen_include_files = [
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] "saml_password_attributes.js",
} "saml_timestamps.js",
"//ui/webui/resources/js/cr.js",
]
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
}
source_set("browser_tests") { source_set("browser_tests") {
testonly = true testonly = true
deps = [ ":login_unitjs_tests" ] deps = [ ":login_unitjs_tests" ]
}
} }
js_type_check("closure_compile") { js_type_check("closure_compile") {
......
...@@ -1465,7 +1465,6 @@ if (!is_android) { ...@@ -1465,7 +1465,6 @@ if (!is_android) {
"//chrome/browser/chromeos:test_support", "//chrome/browser/chromeos:test_support",
"//chrome/browser/media/router:test_support", "//chrome/browser/media/router:test_support",
"//chrome/browser/resources/chromeos/accessibility:browser_tests", "//chrome/browser/resources/chromeos/accessibility:browser_tests",
"//chrome/browser/resources/gaia_auth_host:browser_tests",
"//chrome/services/file_util/public/cpp:browser_tests", "//chrome/services/file_util/public/cpp:browser_tests",
"//chromeos:test_support", "//chromeos:test_support",
"//chromeos/components/drivefs:test_support", "//chromeos/components/drivefs:test_support",
...@@ -1505,6 +1504,7 @@ if (!is_android) { ...@@ -1505,6 +1504,7 @@ if (!is_android) {
] ]
if (is_chromeos) { if (is_chromeos) {
deps += [ deps += [
"//chrome/browser/resources/gaia_auth_host:browser_tests",
"//chromeos/components/help_app_ui:browser_tests_js", "//chromeos/components/help_app_ui:browser_tests_js",
"//chromeos/components/media_app_ui:browser_tests_js", "//chromeos/components/media_app_ui:browser_tests_js",
] ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment