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

Side by Side Diff: chrome/test/data/webui/options.js

Issue 7501004: Add test to each OptionsPage to open that page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added separate file for each option test. Created 9 years, 5 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 item.onclick(); 95 item.onclick();
96 window.location.reload(); 96 window.location.reload();
97 var pageInstance = AdvancedOptions.getInstance(); 97 var pageInstance = AdvancedOptions.getInstance();
98 var topPage = OptionsPage.getTopmostVisiblePage(); 98 var topPage = OptionsPage.getTopmostVisiblePage();
99 var expectedTitle = pageInstance.title; 99 var expectedTitle = pageInstance.title;
100 var actualTitle = document.title; 100 var actualTitle = document.title;
101 assertEquals("chrome://settings/advanced", document.location.href); 101 assertEquals("chrome://settings/advanced", document.location.href);
102 assertEquals(expectedTitle, actualTitle); 102 assertEquals(expectedTitle, actualTitle);
103 assertEquals(pageInstance, topPage); 103 assertEquals(pageInstance, topPage);
104 }); 104 });
105
106 // Test that there are no console errors after opening all registered pages.
107 // crbug.com/90420
108 TEST_F('OptionsWebUITest', 'FLAKY_testOpenAllOptionsPages', function() {
109 expectTrue(!!OptionsPage.registeredPages);
110 for (var name in OptionsPage.registeredPages) {
111 OptionsPage.showPageByName(name, false);
112 }
113 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698