summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorgarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 23:31:08 +0000
committergarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 23:31:08 +0000
commit7f62ed59e8f5ac52973d6f4844c8fe1cdfb3b8f0 (patch)
tree220b169fdbdd269fae13180d8f0f61b89f2f6e14 /remoting
parent881de5e56b7123fba063e526117cce5fb9da8762 (diff)
downloadchromium_src-7f62ed59e8f5ac52973d6f4844c8fe1cdfb3b8f0.zip
chromium_src-7f62ed59e8f5ac52973d6f4844c8fe1cdfb3b8f0.tar.gz
chromium_src-7f62ed59e8f5ac52973d6f4844c8fe1cdfb3b8f0.tar.bz2
[Chromoting] Re-enable js unittests.
This is a revised version of crrev.com/11109017 which caused issues on the CrOS bots. Review URL: https://chromiumcodereview.appspot.com/11668011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/remoting.gyp34
-rw-r--r--remoting/webapp/all_js_load.gtestjs67
2 files changed, 89 insertions, 12 deletions
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index f8df09e..2f7a7f0 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -142,14 +142,24 @@
'resources/infographic_my_computers.png',
'resources/infographic_remote_assistance.png',
'resources/tick.png',
+ 'webapp/connection_history.css',
+ 'webapp/connection_stats.css',
+ 'webapp/main.css',
+ 'webapp/main.html',
+ 'webapp/manifest.json',
+ 'webapp/menu_button.css',
+ 'webapp/oauth2_callback.html',
+ 'webapp/scale-to-fit.png',
+ 'webapp/spinner.gif',
+ 'webapp/toolbar.css',
+ ],
+ 'remoting_webapp_js_files': [
'webapp/client_plugin.js',
'webapp/client_plugin_async.js',
'webapp/client_screen.js',
'webapp/client_session.js',
'webapp/clipboard.js',
- 'webapp/connection_history.css',
'webapp/connection_history.js',
- 'webapp/connection_stats.css',
'webapp/connection_stats.js',
'webapp/cs_oauth2_trampoline.js',
'webapp/event_handlers.js',
@@ -162,23 +172,15 @@
'webapp/host_table_entry.js',
'webapp/l10n.js',
'webapp/log_to_server.js',
- 'webapp/main.css',
- 'webapp/main.html',
- 'webapp/manifest.json',
- 'webapp/menu_button.css',
'webapp/menu_button.js',
'webapp/oauth2.js',
- 'webapp/oauth2_callback.html',
'webapp/oauth2_callback.js',
'webapp/plugin_settings.js',
'webapp/remoting.js',
- 'webapp/scale-to-fit.png',
'webapp/server_log_entry.js',
- 'webapp/spinner.gif',
'webapp/stats_accumulator.js',
'webapp/storage.js',
'webapp/suspend_monitor.js',
- 'webapp/toolbar.css',
'webapp/toolbar.js',
'webapp/ui_mode.js',
'webapp/wcs.js',
@@ -1693,6 +1695,7 @@
'<(remoting_version_path)',
'<(chrome_version_path)',
'<@(remoting_webapp_files)',
+ '<@(remoting_webapp_js_files)',
'<@(remoting_webapp_locale_files)',
],
@@ -1727,6 +1730,7 @@
'<(remoting_version_path)',
'<(chrome_version_path)',
'<@(remoting_webapp_files)',
+ '<@(remoting_webapp_js_files)',
'<@(remoting_webapp_locale_files)',
],
'conditions': [
@@ -1749,6 +1753,7 @@
'<(_zip_path)',
'<(plugin_path)',
'<@(remoting_webapp_files)',
+ '<@(remoting_webapp_js_files)',
'--locales',
'<@(remoting_webapp_locale_files)',
],
@@ -2308,7 +2313,11 @@
'-lrpcrt4.lib',
],
},
- }, { # else OS != "win"
+ }],
+ ['OS=="mac" or (OS=="linux" and chromeos==0)', {
+ # Javascript unittests are disabled on CrOS because they cause
+ # valgrind and test errors.
+ #
# Javascript unittests are disabled on Windows because they add a
# dependency on 'common_constants' which (only on Windows) requires
# additional dependencies:
@@ -2333,8 +2342,9 @@
'sources': [
'../chrome/test/base/v8_unit_test.cc',
'../chrome/test/base/v8_unit_test.h',
+ 'webapp/all_js_load.gtestjs',
'webapp/format_iq.gtestjs',
- 'webapp/format_iq.js',
+ '<@(remoting_webapp_js_files)',
],
}],
['enable_remoting_host == 0', {
diff --git a/remoting/webapp/all_js_load.gtestjs b/remoting/webapp/all_js_load.gtestjs
new file mode 100644
index 0000000..c752d5d
--- /dev/null
+++ b/remoting/webapp/all_js_load.gtestjs
@@ -0,0 +1,67 @@
+// Copyright (c) 2012 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.
+
+/**
+ * Test fixture for loading all our JS files.
+ * @constructor
+ * @extends {testing.Test}
+ */
+function AllJsLoadTest () {
+}
+
+AllJsLoadTest.prototype = {
+ __proto__: testing.Test.prototype,
+
+ /** @inheritDoc */
+ extraLibraries: [
+ // All of our Javascript files should be listed here unless they:
+ // (1) have their own .gtestjs file, or
+ // (2) are only used for testing.
+ 'client_plugin_async.js',
+ 'client_plugin.js',
+ 'client_screen.js',
+ 'client_session.js',
+ //'clipboard_event_proto.js', // Only used by jscompiler.
+ 'clipboard.js',
+ 'connection_history.js',
+ 'connection_stats.js',
+ //'cs_oauth2_trampoline.js', // Disabled because it calls
+ // |chrome.i18n.getMessage| when loaded.
+ //'event_handlers.js', // Disabled because it calls
+ // |window.addEventListener| when loaded.
+ //'format_iq.js', // Already covered by format_iq.gtestjs
+ 'host_controller.js',
+ 'host_list.js',
+ //'host_plugin_proto.js', // Only used by jscompiler
+ 'host_screen.js',
+ 'host_session.js',
+ 'host_setup_dialog.js',
+ 'host_table_entry.js',
+ //'jscompiler_hacks.js', // Only used by jscompiler.
+ 'l10n.js',
+ 'log_to_server.js',
+ 'menu_button.js',
+ //'oauth2_callback.js', // Disabled because it calls
+ // |window.addEventListener| when loaded.
+ 'oauth2.js',
+ 'plugin_settings.js',
+ 'remoting.js',
+ 'server_log_entry.js',
+ 'stats_accumulator.js',
+ 'storage.js',
+ 'suspend_monitor.js',
+ 'toolbar.js',
+ 'ui_mode.js',
+ //'viewer_plugin_proto.js', // Only used by jscompiler.
+ //'wcs_iq_client_proto.js', // Only used by jscompiler.
+ 'wcs.js',
+ 'wcs_loader.js',
+ 'xhr.js',
+ ],
+};
+
+// Basic test to verify that all the JS files load without console errors.
+TEST_F('AllJsLoadTest', 'TestNoConsoleErrors', function() {
+ assertTrue(true);
+});