| 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() {}, |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 // Create the actual mock and register stubs for methods expected to be | 47 // Create the actual mock and register stubs for methods expected to be |
| 46 // called before our tests run. Specific expectations can be made in the | 48 // called before our tests run. Specific expectations can be made in the |
| 47 // tests themselves. | 49 // tests themselves. |
| 48 var mockHandler = this.mockHandler = mock(MockOptionsHandler); | 50 var mockHandler = this.mockHandler = mock(MockOptionsHandler); |
| 49 mockHandler.stubs().fetchPrefs(ANYTHING); | 51 mockHandler.stubs().fetchPrefs(ANYTHING); |
| 50 mockHandler.stubs().observePrefs(ANYTHING); | 52 mockHandler.stubs().observePrefs(ANYTHING); |
| 51 mockHandler.stubs().coreOptionsInitialize(); | 53 mockHandler.stubs().coreOptionsInitialize(); |
| 52 | 54 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 }); | 106 }); |
| 105 | 107 |
| 106 // Test that there are no console errors after opening all registered pages. | 108 // Test that there are no console errors after opening all registered pages. |
| 107 // crbug.com/90420 | 109 // crbug.com/90420 |
| 108 TEST_F('OptionsWebUITest', 'FLAKY_testOpenAllOptionsPages', function() { | 110 TEST_F('OptionsWebUITest', 'FLAKY_testOpenAllOptionsPages', function() { |
| 109 expectTrue(!!OptionsPage.registeredPages); | 111 expectTrue(!!OptionsPage.registeredPages); |
| 110 for (var name in OptionsPage.registeredPages) { | 112 for (var name in OptionsPage.registeredPages) { |
| 111 OptionsPage.showPageByName(name, false); | 113 OptionsPage.showPageByName(name, false); |
| 112 } | 114 } |
| 113 }); | 115 }); |
| OLD | NEW |