Commit c6a42394 authored by jam's avatar jam Committed by Commit bot

Fix QUnitBrowserTestRunner.Remoting_Webapp_Js_Unittest for GN browser tests.

BUG=463180

Review URL: https://codereview.chromium.org/1281953002

Cr-Commit-Position: refs/heads/master@{#342398}
parent c88daa5c
......@@ -73,6 +73,7 @@ remoting_unit_test_out_dir = "$root_out_dir/remoting/unittests"
group("unit_tests") {
data_deps = [
":blanketjs",
":build_unittest",
":js_files",
":qunit",
":sinonjs",
......@@ -82,10 +83,7 @@ group("unit_tests") {
copy("js_files") {
# This list corresponds to webapp_js_files in remoting_webapp_unittests
# target in GYP.
sources = remoting_webapp_unittest_html_all_js_files +
remoting_webapp_wcs_sandbox_html_js_files +
remoting_webapp_background_html_js_files +
remoting_webapp_unittests_all_files
sources = webapp_js_files + remoting_webapp_unittests_all_files
outputs = [
"$remoting_unit_test_out_dir/{{source_file_part}}",
]
......@@ -121,3 +119,17 @@ copy("qunit") {
"$remoting_unit_test_out_dir/qunit/{{source_file_part}}",
]
}
action("build_unittest") {
script = "build-html.py"
outputs = [
"$remoting_unit_test_out_dir/unittests.html",
]
args = rebase_path(outputs, root_build_dir) + [
rebase_path(remoting_webapp_unittests_template_main, root_build_dir),
"--exclude-js",
] + rebase_path(remoting_webapp_unittests_exclude_js_files,
root_build_dir) + [ "--js" ] +
rebase_path(remoting_webapp_unittests_all_js_files, root_build_dir) +
[ "--instrument-js" ] + rebase_path(webapp_js_files, root_build_dir)
}
......@@ -143,6 +143,7 @@ def main():
out_file = args.output_file
js_files = set(args.js) - set(args.exclude_js)
instrumented_js_files = set(args.instrument_js) - set(args.exclude_js)
# Create the output directory if it does not exist.
out_directory = os.path.dirname(out_file)
......@@ -151,7 +152,7 @@ def main():
# Generate the main HTML file from the templates.
with open(out_file, 'w') as output:
gen = GenerateWebappHtml(args.templates, js_files, args.instrument_js,
gen = GenerateWebappHtml(args.templates, js_files, instrumented_js_files,
args.template_dir)
gen.processTemplate(output, args.input_template, 0)
......
......@@ -107,16 +107,21 @@ remoting_webapp_unittests_js_files = [
"base/js/xmpp_login_handler_unittest.js",
"base/js/xmpp_stream_parser_unittest.js",
"crd/js/apps_v2_migration_unittest.js",
"crd/js/combined_host_list_api_unittest.js",
"crd/js/gcd_client_unittest.js",
"crd/js/gcd_client_with_mock_xhr_unittest.js",
"crd/js/host_controller_unittest.js",
"crd/js/host_daemon_facade_unittest.js",
"crd/js/host_table_entry_unittest.js",
"crd/js/legacy_host_list_api_unittest.js",
"crd/js/menu_button_unittest.js",
"crd/js/mock_xhr_unittest.js",
]
remoting_webapp_unittests_js_mock_files = [
"crd/js/mock_client_plugin.js",
"crd/js/mock_host_daemon_facade.js",
"crd/js/mock_host_list_api.js",
"crd/js/mock_identity.js",
"crd/js/mock_signal_strategy.js",
"js_proto/chrome_mocks.js",
"unittests/sinon_helpers.js",
......@@ -188,6 +193,7 @@ remoting_webapp_shared_js_core_files = [
"base/js/typecheck.js",
"base/js/window_message_dispatcher.js",
"base/js/xhr.js",
"base/js/xhr_event_writer.js",
]
# Host JavaScript files.
......@@ -288,6 +294,7 @@ remoting_webapp_js_host_display_files = [
# JSCompiler. If an implementation of an interface occurs in a
# file processed before the interface itself, the @override tag
# doesn't always work correctly.
"crd/js/combined_host_list_api.js",
"crd/js/gcd_host_list_api.js",
"crd/js/legacy_host_list_api.js",
]
......@@ -663,3 +670,7 @@ app_remoting_webapp_localizable_files =
remoting_webapp_template_message_window,
remoting_webapp_template_wcs_sandbox,
] + ar_main_template_files + ar_all_js_files
webapp_js_files = remoting_webapp_unittest_html_all_js_files +
remoting_webapp_wcs_sandbox_html_js_files +
remoting_webapp_background_html_js_files
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