summaryrefslogtreecommitdiffstats
path: root/remoting/remoting_webapp_files.gypi
diff options
context:
space:
mode:
authorkelvinp@chromium.org <kelvinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 06:58:23 +0000
committerkelvinp@chromium.org <kelvinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-09 06:58:23 +0000
commit4eacd67739cffc1a14c5579fb4cc1e5012331899 (patch)
tree657efe3c35fe5cf225ca6c3d3f1e813c1abc83d6 /remoting/remoting_webapp_files.gypi
parentb36e4d153683dd39cac46db05642974bd262b127 (diff)
downloadchromium_src-4eacd67739cffc1a14c5579fb4cc1e5012331899.zip
chromium_src-4eacd67739cffc1a14c5579fb4cc1e5012331899.tar.gz
chromium_src-4eacd67739cffc1a14c5579fb4cc1e5012331899.tar.bz2
This change provides a basic infrastructure for writing browser test in JavaScript, which has several advantages.
1. The JavaScript lives in a separate file instead of inline strings in the C++, which is much more readable. Since it is not part of the browserTest executable, you can modify it on the fly without re-linking (which takes 70s on a Engineering desktop), that makes development faster. 2. Instead of using sleeps to determine whether an action has happened, we can hook specific events in JavaScript. This allow more reliable tests that run in a more timely manner. Overview: - The infrastructure lives in two file: browserTest.js provides basically functionality for reporting results back to the C++ layer remote_desktop_browserTest provides basic functionality for loading/injecting JavaScript and executing the tests. - To define a browserTest, create a class under the browserTest namespace with a run method. browserTest.Foo_Test = function () {} browserTest.Foo_Test.prototype.run = function () { ... } - You can then call the following from C++ RunJavaScriptTest(web_content, "Foo_Test", "{ field1: 'data'}" Review URL: https://codereview.chromium.org/268813006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/remoting_webapp_files.gypi')
-rw-r--r--remoting/remoting_webapp_files.gypi7
1 files changed, 7 insertions, 0 deletions
diff --git a/remoting/remoting_webapp_files.gypi b/remoting/remoting_webapp_files.gypi
index 2bb8437..c862a13 100644
--- a/remoting/remoting_webapp_files.gypi
+++ b/remoting/remoting_webapp_files.gypi
@@ -120,6 +120,10 @@
'remoting_webapp_js_gnubby_auth_files': [
'webapp/gnubby_auth_handler.js',
],
+ # browser test JavaScript files.
+ 'remoting_webapp_js_browser_test_files': [
+ 'webapp/browser_test/browser_test.js',
+ ],
# The JavaScript files required by main.html.
'remoting_webapp_main_html_js_files': [
# Include the core files first as it is required by the other files.
@@ -135,6 +139,9 @@
'<@(remoting_webapp_js_ui_host_control_files)',
'<@(remoting_webapp_js_ui_host_display_files)',
'<@(remoting_webapp_js_wcs_container_files)',
+ # Uncomment this line to include browser test files in the web app
+ # to expedite debugging or local development.
+ # '<@(remoting_webapp_js_browser_test_files)'
],
# The JavaScript files required by wcs_sandbox.html.