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

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

Issue 536703002: Get rid of some <label for> misuse in browser_options.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 6 years, 3 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
OLDNEW
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('#include "chrome/browser/ui/webui/options/options_browsertest.h"'); 5 GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"');
6 6
7 /** @const */ var SUPERVISED_USERS_PREF = 'profile.managed_users'; 7 /** @const */ var SUPERVISED_USERS_PREF = 'profile.managed_users';
8 8
9 /** 9 /**
10 * Wait for the method specified by |methodName|, on the |object| object, to be 10 * Wait for the method specified by |methodName|, on the |object| object, to be
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // Crashes on Mac only. See http://crbug.com/79181 92 // Crashes on Mac only. See http://crbug.com/79181
93 GEN('#if defined(OS_MACOSX)'); 93 GEN('#if defined(OS_MACOSX)');
94 GEN('#define MAYBE_testSetBooleanPrefTriggers ' + 94 GEN('#define MAYBE_testSetBooleanPrefTriggers ' +
95 'DISABLED_testSetBooleanPrefTriggers'); 95 'DISABLED_testSetBooleanPrefTriggers');
96 GEN('#else'); 96 GEN('#else');
97 GEN('#define MAYBE_testSetBooleanPrefTriggers testSetBooleanPrefTriggers'); 97 GEN('#define MAYBE_testSetBooleanPrefTriggers testSetBooleanPrefTriggers');
98 GEN('#endif // defined(OS_MACOSX)'); 98 GEN('#endif // defined(OS_MACOSX)');
99 99
100 TEST_F('OptionsWebUITest', 'MAYBE_testSetBooleanPrefTriggers', function() { 100 TEST_F('OptionsWebUITest', 'MAYBE_testSetBooleanPrefTriggers', function() {
101 // TODO(dtseng): make generic to click all buttons. 101 // TODO(dtseng): make generic to click all buttons.
102 var showHomeButton = $('show-home-button'); 102 var showHomeButton =
103 document.querySelector('input[pref="browser.show_home_button"]');
103 var trueListValue = [ 104 var trueListValue = [
104 'browser.show_home_button', 105 'browser.show_home_button',
105 true, 106 true,
106 'Options_Homepage_HomeButton', 107 'Options_Homepage_HomeButton',
107 ]; 108 ];
108 // Note: this expectation is checked in testing::Test::tearDown. 109 // Note: this expectation is checked in testing::Test::tearDown.
109 this.mockHandler.expects(once()).setBooleanPref(trueListValue); 110 this.mockHandler.expects(once()).setBooleanPref(trueListValue);
110 111
111 // Cause the handler to be called. 112 // Cause the handler to be called.
112 showHomeButton.click(); 113 showHomeButton.click();
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 __proto__: OptionsWebUIExtendedTest.prototype, 834 __proto__: OptionsWebUIExtendedTest.prototype,
834 835
835 /** @override */ 836 /** @override */
836 browsePreload: 'chrome://settings-frame/nonexistantPage', 837 browsePreload: 'chrome://settings-frame/nonexistantPage',
837 }; 838 };
838 839
839 TEST_F('OptionsWebUIRedirectTest', 'TestURL', function() { 840 TEST_F('OptionsWebUIRedirectTest', 'TestURL', function() {
840 assertEquals('chrome://settings-frame/', document.location.href); 841 assertEquals('chrome://settings-frame/', document.location.href);
841 this.verifyHistory_([''], testDone); 842 this.verifyHistory_([''], testDone);
842 }); 843 });
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc ('k') | ui/webui/resources/css/widgets.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698