Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: chrome/browser/ui/webui/options/options_browsertest.js

Issue 7501004: Add test to each OptionsPage to open that page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made test fixture names better/agree with the filenames. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 item.onclick(); 97 item.onclick();
98 window.location.reload(); 98 window.location.reload();
99 var pageInstance = AdvancedOptions.getInstance(); 99 var pageInstance = AdvancedOptions.getInstance();
100 var topPage = OptionsPage.getTopmostVisiblePage(); 100 var topPage = OptionsPage.getTopmostVisiblePage();
101 var expectedTitle = pageInstance.title; 101 var expectedTitle = pageInstance.title;
102 var actualTitle = document.title; 102 var actualTitle = document.title;
103 assertEquals("chrome://settings/advanced", document.location.href); 103 assertEquals("chrome://settings/advanced", document.location.href);
104 assertEquals(expectedTitle, actualTitle); 104 assertEquals(expectedTitle, actualTitle);
105 assertEquals(pageInstance, topPage); 105 assertEquals(pageInstance, topPage);
106 }); 106 });
107
108 // Test that there are no console errors after opening all registered pages.
109 // Crashes on chromium os, flaky on other platforms. See crbug.com/90420.
110 // Disabling on Mac OS X since the failure rate is now >50%.
111 GEN('#if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX)');
112 GEN('#define MAYBE_testOpenAllOptionsPages DISABLED_testOpenAllOptionsPages');
113 GEN('#else');
114 GEN('#define MAYBE_testOpenAllOptionsPages FLAKY_testOpenAllOptionsPages');
115 GEN('#endif // defined(TOOLKIT_VIEWS)');
116 TEST_F('OptionsWebUITest', 'MAYBE_testOpenAllOptionsPages', function() {
117 expectTrue(!!OptionsPage.registeredPages);
118 for (var name in OptionsPage.registeredPages) {
119 OptionsPage.showPageByName(name, false);
120 }
121 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698