| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * TestFixture for OptionsPage WebUI testing. | 6 * TestFixture for OptionsPage WebUI testing. |
| 7 * @extends {testing.Test} | 7 * @extends {testing.Test} |
| 8 * @constructor | 8 * @constructor |
| 9 **/ | 9 **/ |
| 10 function OptionsWebUITest() {} | 10 function OptionsWebUITest() {} |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 coreOptionsInitialize: function() {}, | 33 coreOptionsInitialize: function() {}, |
| 34 fetchPrefs: function() {}, | 34 fetchPrefs: function() {}, |
| 35 observePrefs: function() {}, | 35 observePrefs: function() {}, |
| 36 setBooleanPref: function() {}, | 36 setBooleanPref: function() {}, |
| 37 setIntegerPref: function() {}, | 37 setIntegerPref: function() {}, |
| 38 setDoublePref: function() {}, | 38 setDoublePref: function() {}, |
| 39 setStringPref: function() {}, | 39 setStringPref: function() {}, |
| 40 setObjectPref: function() {}, | 40 setObjectPref: function() {}, |
| 41 clearPref: function() {}, | 41 clearPref: function() {}, |
| 42 coreOptionsUserMetricsAction: function() {}, | 42 coreOptionsUserMetricsAction: function() {}, |
| 43 // TODO(scr): Handle this new message: | |
| 44 // getInstantFieldTrialStatus: function() {}, | |
| 45 }; | 43 }; |
| 46 | 44 |
| 47 // Create the actual mock and register stubs for methods expected to be | 45 // Create the actual mock and register stubs for methods expected to be |
| 48 // called before our tests run. Specific expectations can be made in the | 46 // called before our tests run. Specific expectations can be made in the |
| 49 // tests themselves. | 47 // tests themselves. |
| 50 var mockHandler = this.mockHandler = mock(MockOptionsHandler); | 48 var mockHandler = this.mockHandler = mock(MockOptionsHandler); |
| 51 mockHandler.stubs().fetchPrefs(ANYTHING); | 49 mockHandler.stubs().fetchPrefs(ANYTHING); |
| 52 mockHandler.stubs().observePrefs(ANYTHING); | 50 mockHandler.stubs().observePrefs(ANYTHING); |
| 53 mockHandler.stubs().coreOptionsInitialize(); | 51 mockHandler.stubs().coreOptionsInitialize(); |
| 54 | 52 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 }); | 104 }); |
| 107 | 105 |
| 108 // Test that there are no console errors after opening all registered pages. | 106 // Test that there are no console errors after opening all registered pages. |
| 109 // crbug.com/90420 | 107 // crbug.com/90420 |
| 110 TEST_F('OptionsWebUITest', 'FLAKY_testOpenAllOptionsPages', function() { | 108 TEST_F('OptionsWebUITest', 'FLAKY_testOpenAllOptionsPages', function() { |
| 111 expectTrue(!!OptionsPage.registeredPages); | 109 expectTrue(!!OptionsPage.registeredPages); |
| 112 for (var name in OptionsPage.registeredPages) { | 110 for (var name in OptionsPage.registeredPages) { |
| 113 OptionsPage.showPageByName(name, false); | 111 OptionsPage.showPageByName(name, false); |
| 114 } | 112 } |
| 115 }); | 113 }); |
| OLD | NEW |