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

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

Issue 944593002: ChromeOS: Update browser option UI for automatic timezone detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed SharedOptionsTest. Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_base.js']); 5 GEN_INCLUDE(['chrome/browser/ui/webui/options/options_browsertest_base.js']);
6 6
7 GEN('#if defined(OS_CHROMEOS)'); 7 GEN('#if defined(OS_CHROMEOS)');
8 8
9 /** 9 /**
10 * DateTimeOptionsWebUITest tests the date and time section of the options page. 10 * DateTimeOptionsWebUITest tests the date and time section of the options page.
11 * @constructor 11 * @constructor
12 * @extends {testing.Test} 12 * @extends {testing.Test}
13 */ 13 */
14 function DateTimeOptionsWebUITest() {} 14 function DateTimeOptionsWebUITest() {}
15 15
16 DateTimeOptionsWebUITest.prototype = { 16 DateTimeOptionsWebUITest.prototype = {
17 __proto__: OptionsBrowsertestBase.prototype, 17 __proto__: OptionsBrowsertestBase.prototype,
18 18
19 /** 19 /**
20 * Browse to date/time options. 20 * Browse to date/time options.
21 * @override 21 * @override
22 */ 22 */
23 browsePreload: 'chrome://settings-frame/search#date', 23 browsePreload: 'chrome://settings-frame/search#date',
24 }; 24 };
25 25
26 TEST_F('DateTimeOptionsWebUITest', 'testShowSetTimeButton', function() { 26 TEST_F('DateTimeOptionsWebUITest', 'testShowSetTimeButton', function() {
27 assertEquals(this.browsePreload, document.location.href); 27 assertEquals(this.browsePreload, document.location.href);
28 28
29 // Hide label and show button. 29 // Show button.
30 BrowserOptions.setCanSetTime(true); 30 BrowserOptions.setCanSetTime(true);
31 expectTrue($('time-synced-explanation').hidden);
32 expectFalse($('set-time').hidden); 31 expectFalse($('set-time').hidden);
33 32
34 // Show label and hide button. 33 // Hide button.
35 BrowserOptions.setCanSetTime(false); 34 BrowserOptions.setCanSetTime(false);
36 expectFalse($('time-synced-explanation').hidden);
37 expectTrue($('set-time').hidden); 35 expectTrue($('set-time').hidden);
38 }); 36 });
39 37
40 GEN('#endif'); 38 GEN('#endif');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698