| 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 GEN('#if !defined(OS_CHROMEOS)'); | 5 GEN('#if !defined(OS_CHROMEOS)'); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Test fixture for sync setup WebUI testing. | 8 * Test fixture for sync setup WebUI testing. |
| 9 * @constructor | 9 * @constructor |
| 10 * @extends {testing.Test} | 10 * @extends {testing.Test} |
| 11 */ | 11 */ |
| 12 function SyncSetupWebUITest() {} | 12 function SyncSetupWebUITest() {} |
| 13 | 13 |
| 14 SyncSetupWebUITest.prototype = { | 14 SyncSetupWebUITest.prototype = { |
| 15 __proto__: testing.Test.prototype, | 15 __proto__: testing.Test.prototype, |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Browse to the settings sub-frame. | 18 * Browse to the settings sub-frame. |
| 19 */ | 19 */ |
| 20 browsePreload: 'chrome://settings-frame', | 20 browsePreload: 'chrome://settings-frame', |
| 21 | 21 |
| 22 /** @inheritDoc */ | 22 /** @override */ |
| 23 preLoad: function() { | 23 preLoad: function() { |
| 24 this.makeAndRegisterMockHandler(['SyncSetupConfigure', | 24 this.makeAndRegisterMockHandler(['SyncSetupConfigure', |
| 25 'SyncSetupShowSetupUI', | 25 'SyncSetupShowSetupUI', |
| 26 'SyncSetupStartSignIn', | 26 'SyncSetupStartSignIn', |
| 27 ]); | 27 ]); |
| 28 }, | 28 }, |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Verifies starting point is not synced. | 31 * Verifies starting point is not synced. |
| 32 */ | 32 */ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 47 /** | 47 /** |
| 48 * Async version of SyncSetupWebUITest. | 48 * Async version of SyncSetupWebUITest. |
| 49 * @extends {SyncSetupWebUITest} | 49 * @extends {SyncSetupWebUITest} |
| 50 * @constructor | 50 * @constructor |
| 51 */ | 51 */ |
| 52 function SyncSetupWebUITestAsync() {} | 52 function SyncSetupWebUITestAsync() {} |
| 53 | 53 |
| 54 SyncSetupWebUITestAsync.prototype = { | 54 SyncSetupWebUITestAsync.prototype = { |
| 55 __proto__: SyncSetupWebUITest.prototype, | 55 __proto__: SyncSetupWebUITest.prototype, |
| 56 | 56 |
| 57 /** @inheritDoc */ | 57 /** @override */ |
| 58 isAsync: true, | 58 isAsync: true, |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 // Verify that initial state is unsynced, click the sign in button, verify | 61 // Verify that initial state is unsynced, click the sign in button, verify |
| 62 // that the sync setup dialog appears, and dismiss it. | 62 // that the sync setup dialog appears, and dismiss it. |
| 63 TEST_F('SyncSetupWebUITestAsync', 'VerifySignIn', function() { | 63 TEST_F('SyncSetupWebUITestAsync', 'VerifySignIn', function() { |
| 64 // Make sure the user is not starting off in the signed in or syncing state. | 64 // Make sure the user is not starting off in the signed in or syncing state. |
| 65 this.verifyUnsynced(); | 65 this.verifyUnsynced(); |
| 66 | 66 |
| 67 // Handle SyncSetupShowSetupUI by navigating to chrome://settings/syncSetup. | 67 // Handle SyncSetupShowSetupUI by navigating to chrome://settings/syncSetup. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 89 var oldSetTimeout = setTimeout; | 89 var oldSetTimeout = setTimeout; |
| 90 setTimeout = function(fn, timeout) { | 90 setTimeout = function(fn, timeout) { |
| 91 oldSetTimeout(fn, 0); | 91 oldSetTimeout(fn, 0); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 // Kick off the test by clicking the "Sign in to Chrome..." button. | 94 // Kick off the test by clicking the "Sign in to Chrome..." button. |
| 95 this.startSyncing(); | 95 this.startSyncing(); |
| 96 }); | 96 }); |
| 97 | 97 |
| 98 GEN('#endif // OS_CHROMEOS'); | 98 GEN('#endif // OS_CHROMEOS'); |
| OLD | NEW |