blob: cc31c3535bf5fdcf3162901eb2cefa9dbf50b2cd [file] [log] [blame]
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/test/base/js2gtest.gni")
import("//chromeos/components/web_applications/system_apps.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//ui/webui/resources/tools/js_modulizer.gni")
js_library("message_pipe") {
}
js_library("sandboxed_load_time_data") {
}
js_library("message_pipe.m") {
sources = [
"$root_gen_dir/chromeos/components/system_apps/public/js/message_pipe.m.js",
]
extra_deps = [ ":modulize" ]
}
js2gtest("browser_tests_js") {
test_type = "mojo_lite_webui"
sources = [ "message_pipe_browsertest.js" ]
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
deps = [ "//chromeos/components/web_applications/test:test_support" ]
data = [
"message_pipe.js",
"test_data/message_pipe_browsertest_trusted.html",
"test_data/message_pipe_browsertest_trusted.js",
"test_data/message_pipe_browsertest_untrusted.html",
"test_data/message_pipe_browsertest_untrusted.js",
]
}
group("closure_compile") {
testonly = true
deps = [
":closure_compile_message_pipe",
":closure_compile_message_pipe_browsertest_js",
]
}
js_type_check("closure_compile_message_pipe") {
closure_flags = system_app_closure_flags_strict
deps = [ ":message_pipe" ]
}
js_type_check("closure_compile_message_pipe_browsertest_js") {
testonly = true
closure_flags = system_app_closure_flags
deps = [ ":message_pipe_browsertest_js" ]
}
js_library("message_pipe_browsertest_js") {
testonly = true
sources = [
"message_pipe_browsertest.js",
"test_data/message_pipe_browsertest_trusted.js",
"test_data/message_pipe_browsertest_untrusted.js",
]
externs_list = [
"//chromeos/components/web_applications/js2gtest_support.externs.js",
"//third_party/chaijs/externs/chai-3.5.js",
]
deps = [ ":message_pipe" ]
}
js_modulizer("modulize") {
input_files = [ "message_pipe.js" ]
}