| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Test fixture for loading all our JS files. | 6 * Test fixture for loading all our JS files. |
| 7 * @constructor | 7 * @constructor |
| 8 * @extends {testing.Test} | 8 * @extends {testing.Test} |
| 9 */ | 9 */ |
| 10 function AllJsLoadTest () { | 10 function AllJsLoadTest () { |
| 11 } | 11 } |
| 12 | 12 |
| 13 AllJsLoadTest.prototype = { | 13 AllJsLoadTest.prototype = { |
| 14 __proto__: testing.Test.prototype, | 14 __proto__: testing.Test.prototype, |
| 15 | 15 |
| 16 /** @inheritDoc */ | 16 /** @inheritDoc */ |
| 17 extraLibraries: [ | 17 extraLibraries: [ |
| 18 // All of our Javascript files should be listed here unless they: | 18 'browser_globals.gtestjs', |
| 19 // (1) have their own .gtestjs file, or | 19 // All of our Javascript files should be listed here unless they are |
| 20 // (2) are only used for testing. | 20 // only used by JSCompiler |
| 21 'client_plugin_async.js', | 21 'client_plugin_async.js', |
| 22 'client_plugin.js', | 22 'client_plugin.js', |
| 23 'client_screen.js', | 23 'client_screen.js', |
| 24 'client_session.js', | 24 'client_session.js', |
| 25 //'clipboard_event_proto.js', // Only used by jscompiler. | 25 //'clipboard_event_proto.js', // Only used by jscompiler. |
| 26 'clipboard.js', | 26 'clipboard.js', |
| 27 'connection_history.js', | 27 'connection_history.js', |
| 28 'connection_stats.js', | 28 'connection_stats.js', |
| 29 //'cs_oauth2_trampoline.js', // Disabled because it calls | 29 //'cs_oauth2_trampoline.js', // Uses globals in the chrome namespace, which |
| 30 // |chrome.i18n.getMessage| when loaded. | 30 // give a compilation error when declared in |
| 31 //'event_handlers.js', // Disabled because it calls | 31 // browser_globals for some reason. Since this |
| 32 // |window.addEventListener| when loaded. | 32 // file's days are numbered, skip it for now. |
| 33 'event_handlers.js', |
| 33 //'format_iq.js', // Already covered by format_iq.gtestjs | 34 //'format_iq.js', // Already covered by format_iq.gtestjs |
| 34 'host_controller.js', | 35 'host_controller.js', |
| 35 'host_list.js', | 36 'host_list.js', |
| 36 //'host_plugin_proto.js', // Only used by jscompiler | 37 //'host_plugin_proto.js', // Only used by jscompiler |
| 37 'host_screen.js', | 38 'host_screen.js', |
| 38 'host_session.js', | 39 'host_session.js', |
| 39 'host_setup_dialog.js', | 40 'host_setup_dialog.js', |
| 40 'host_table_entry.js', | 41 'host_table_entry.js', |
| 41 //'jscompiler_hacks.js', // Only used by jscompiler. | 42 //'jscompiler_hacks.js', // Only used by jscompiler. |
| 42 'l10n.js', | 43 'l10n.js', |
| 43 'log_to_server.js', | 44 'log_to_server.js', |
| 44 'menu_button.js', | 45 'menu_button.js', |
| 45 //'oauth2_callback.js', // Disabled because it calls | 46 'oauth2_callback.js', |
| 46 // |window.addEventListener| when loaded. | |
| 47 'oauth2.js', | 47 'oauth2.js', |
| 48 'plugin_settings.js', | 48 'plugin_settings.js', |
| 49 //'xhr_proxy.js', // Disabled because it accesses |XMLHttpRequest| | 49 'xhr_proxy.js', |
| 50 // when loaded, which is not available to tests. | |
| 51 'remoting.js', | 50 'remoting.js', |
| 52 'server_log_entry.js', | 51 'server_log_entry.js', |
| 53 'stats_accumulator.js', | 52 'stats_accumulator.js', |
| 54 'storage.js', | 53 'storage.js', |
| 55 'suspend_monitor.js', | 54 'suspend_monitor.js', |
| 56 'toolbar.js', | 55 'toolbar.js', |
| 57 'ui_mode.js', | 56 'ui_mode.js', |
| 58 //'viewer_plugin_proto.js', // Only used by jscompiler. | 57 //'viewer_plugin_proto.js', // Only used by jscompiler. |
| 59 //'wcs_iq_client_proto.js', // Only used by jscompiler. | 58 //'wcs_iq_client_proto.js', // Only used by jscompiler. |
| 60 'wcs.js', | 59 'wcs.js', |
| 61 'wcs_loader.js', | 60 'wcs_loader.js', |
| 62 //'wcs_sandbox_content.js', // Disabled because it calls | 61 'wcs_sandbox_content.js', |
| 63 // |window.addEventListener| when loaded. | |
| 64 'wcs_sandbox_container.js', | 62 'wcs_sandbox_container.js', |
| 65 'xhr.js', | 63 'xhr.js', |
| 66 ], | 64 ], |
| 67 }; | 65 }; |
| 68 | 66 |
| 69 // Basic test to verify that all the JS files load without console errors. | 67 // Basic test to verify that all the JS files load without console errors. |
| 70 TEST_F('AllJsLoadTest', 'TestNoConsoleErrors', function() { | 68 TEST_F('AllJsLoadTest', 'TestNoConsoleErrors', function() { |
| 71 assertTrue(true); | 69 assertTrue(true); |
| 72 }); | 70 }); |
| OLD | NEW |