Commit 14c59714 authored by kelvinp's avatar kelvinp Committed by Commit bot

[Chromoting] Build webapp package with browser test JavaScript files loaded.

This CL creates a new target webapp with browser test JavaScript files loaded.
This will enable us to run a JavaScript browser test using a regular chrome
binary to speed up development and debugging.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#327438}
parent 8ea365b4
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
['disable_nacl==0 and disable_nacl_untrusted==0', { ['disable_nacl==0 and disable_nacl_untrusted==0', {
'dependencies': [ 'dependencies': [
'../remoting/remoting.gyp:remoting_key_tester', '../remoting/remoting.gyp:remoting_key_tester',
'../remoting/remoting.gyp:remoting_webapp_browser_test',
], ],
}], }],
], ],
......
...@@ -62,11 +62,11 @@ ...@@ -62,11 +62,11 @@
'<@(remoting_webapp_template_files)', '<@(remoting_webapp_template_files)',
], ],
'outputs': [ 'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/main.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/main.html',
], ],
'action': [ 'action': [
'python', 'webapp/build-html.py', 'python', 'webapp/build-html.py',
'<(SHARED_INTERMEDIATE_DIR)/main.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/main.html',
'<(remoting_webapp_template_main)', '<(remoting_webapp_template_main)',
'--template-dir', '<(DEPTH)/remoting', '--template-dir', '<(DEPTH)/remoting',
'--templates', '<@(remoting_webapp_template_files)', '--templates', '<@(remoting_webapp_template_files)',
...@@ -82,11 +82,11 @@ ...@@ -82,11 +82,11 @@
'<(remoting_webapp_template_wcs_sandbox)', '<(remoting_webapp_template_wcs_sandbox)',
], ],
'outputs': [ 'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/wcs_sandbox.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/wcs_sandbox.html',
], ],
'action': [ 'action': [
'python', 'webapp/build-html.py', 'python', 'webapp/build-html.py',
'<(SHARED_INTERMEDIATE_DIR)/wcs_sandbox.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/wcs_sandbox.html',
'<(remoting_webapp_template_wcs_sandbox)', '<(remoting_webapp_template_wcs_sandbox)',
'--js', '<@(remoting_webapp_wcs_sandbox_html_all_js_files)', '--js', '<@(remoting_webapp_wcs_sandbox_html_all_js_files)',
], ],
...@@ -99,11 +99,11 @@ ...@@ -99,11 +99,11 @@
'<(remoting_webapp_template_background)', '<(remoting_webapp_template_background)',
], ],
'outputs': [ 'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/background.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/background.html',
], ],
'action': [ 'action': [
'python', 'webapp/build-html.py', 'python', 'webapp/build-html.py',
'<(SHARED_INTERMEDIATE_DIR)/background.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/background.html',
'<(remoting_webapp_template_background)', '<(remoting_webapp_template_background)',
'--js', '<@(remoting_webapp_background_html_all_js_files)', '--js', '<@(remoting_webapp_background_html_all_js_files)',
], ],
...@@ -115,11 +115,11 @@ ...@@ -115,11 +115,11 @@
'<(remoting_webapp_template_message_window)', '<(remoting_webapp_template_message_window)',
], ],
'outputs': [ 'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/message_window.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/message_window.html',
], ],
'action': [ 'action': [
'python', 'webapp/build-html.py', 'python', 'webapp/build-html.py',
'<(SHARED_INTERMEDIATE_DIR)/message_window.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/message_window.html',
'<(remoting_webapp_template_message_window)', '<(remoting_webapp_template_message_window)',
'--js', '<@(remoting_webapp_message_window_html_all_js_files)', '--js', '<@(remoting_webapp_message_window_html_all_js_files)',
], ],
......
...@@ -335,12 +335,40 @@ ...@@ -335,12 +335,40 @@
{ {
'destination': '<(PRODUCT_DIR)/remoting/browser_test_resources', 'destination': '<(PRODUCT_DIR)/remoting/browser_test_resources',
'files': [ 'files': [
'<@(remoting_webapp_browsertest_all_js_files)', '<@(remoting_webapp_browsertest_main_html_extra_files)',
'../third_party/sinonjs/src/sinon.js',
], ],
}, },
], # end of copies ], # end of copies
}, # end of target 'remoting_browser_test_resources' }, # end of target 'remoting_browser_test_resources'
{
'target_name': 'remoting_webapp_browser_test_main_html',
'type': 'none',
'actions': [
{
'action_name': 'Build Remoting Webapp Browser test main.html',
'inputs': [
'webapp/build-html.py',
'<(remoting_webapp_template_main)',
'<@(remoting_webapp_template_files)',
'<@(remoting_webapp_crd_main_html_all_js_files)',
'<@(remoting_webapp_browsertest_main_html_extra_files)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
],
'action': [
'python', 'webapp/build-html.py',
'<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
'<(remoting_webapp_template_main)',
'--template-dir', '<(DEPTH)/remoting',
'--templates', '<@(remoting_webapp_template_files)',
'--js',
'<@(remoting_webapp_crd_main_html_all_js_files)',
'<@(remoting_webapp_browsertest_main_html_extra_files)',
],
},
], # end of actions
}, # end of target 'remoting_webapp_browser_test_html'
{ {
'target_name': 'remoting_webapp_unittests', 'target_name': 'remoting_webapp_unittests',
'type': 'none', 'type': 'none',
...@@ -462,6 +490,30 @@ ...@@ -462,6 +490,30 @@
], # end of 'conditions' ], # end of 'conditions'
}, # end of target 'remoting_perftests' }, # end of target 'remoting_perftests'
] ]
}], # end of 'enable_remoting_host'
['disable_nacl==0 and disable_nacl_untrusted==0', {
'targets': [
{
'target_name': 'remoting_webapp_browser_test',
'type': 'none',
'variables': {
'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.browsertest.v2',
'zip_path': '<(PRODUCT_DIR)/remoting-webapp.browsertest.v2.zip',
'webapp_type': 'v2_pnacl',
'main_html_file': '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
'extra_files': [
'webapp/crd/remoting_client_pnacl.nmf.jinja2',
'<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe',
'<@(remoting_webapp_browsertest_main_html_extra_files)',
],
},
'dependencies': [
'remoting_nacl.gyp:remoting_client_plugin_nacl',
'remoting_webapp_browser_test_main_html',
],
'includes': [ 'remoting_webapp.gypi', ],
}, # end of target 'remoting_webapp_browser_test'
]
}] }]
] ] # end of 'conditions'
} }
...@@ -8,11 +8,11 @@ ...@@ -8,11 +8,11 @@
'type': 'none', 'type': 'none',
'variables': { 'variables': {
'extra_files%': [], 'extra_files%': [],
'main_html_file%': '<(SHARED_INTERMEDIATE_DIR)/remoting/main.html',
'generated_html_files': [ 'generated_html_files': [
'<(SHARED_INTERMEDIATE_DIR)/background.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/background.html',
'<(SHARED_INTERMEDIATE_DIR)/main.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/message_window.html',
'<(SHARED_INTERMEDIATE_DIR)/message_window.html', '<(SHARED_INTERMEDIATE_DIR)/remoting/wcs_sandbox.html',
'<(SHARED_INTERMEDIATE_DIR)/wcs_sandbox.html',
], ],
'dr_webapp_locales_listfile': '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)_locales.txt', 'dr_webapp_locales_listfile': '<(SHARED_INTERMEDIATE_DIR)/>(_target_name)_locales.txt',
}, },
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
'<(remoting_version_path)', '<(remoting_version_path)',
'<(dr_webapp_locales_listfile)', '<(dr_webapp_locales_listfile)',
'<@(generated_html_files)', '<@(generated_html_files)',
'<(main_html_file)',
'<@(remoting_webapp_crd_files)', '<@(remoting_webapp_crd_files)',
'<@(remoting_webapp_locale_files)', '<@(remoting_webapp_locale_files)',
'<@(extra_files)', '<@(extra_files)',
...@@ -69,6 +70,7 @@ ...@@ -69,6 +70,7 @@
'webapp/crd/manifest.json.jinja2', 'webapp/crd/manifest.json.jinja2',
'<(webapp_type)', '<(webapp_type)',
'<@(generated_html_files)', '<@(generated_html_files)',
'<(main_html_file)',
'<@(remoting_webapp_crd_files)', '<@(remoting_webapp_crd_files)',
'<@(extra_files)', '<@(extra_files)',
'--locales_listfile', '--locales_listfile',
......
...@@ -58,6 +58,10 @@ ...@@ -58,6 +58,10 @@
'<@(remoting_webapp_browsertest_js_files)', '<@(remoting_webapp_browsertest_js_files)',
'<@(remoting_webapp_browsertest_js_mock_files)', '<@(remoting_webapp_browsertest_js_mock_files)',
], ],
'remoting_webapp_browsertest_main_html_extra_files': [
'<@(remoting_webapp_browsertest_all_js_files)',
'../third_party/sinonjs/src/sinon.js',
],
# #
# Webapp unittest JavaScript files. # Webapp unittest JavaScript files.
...@@ -306,9 +310,6 @@ ...@@ -306,9 +310,6 @@
'<@(remoting_webapp_js_logging_files)', '<@(remoting_webapp_js_logging_files)',
'<@(remoting_webapp_js_ui_files)', '<@(remoting_webapp_js_ui_files)',
'<@(remoting_webapp_js_signaling_files)', '<@(remoting_webapp_js_signaling_files)',
# Uncomment this line to include browser test files in the web app
# to expedite debugging or local development.
#'<@(remoting_webapp_browsertest_all_js_files)',
], ],
# The JS files required by unittest.html. # The JS files required by unittest.html.
......
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