| OLD | NEW |
| 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('#if defined(OS_CHROMEOS)'); | 5 GEN('#if defined(OS_CHROMEOS)'); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * DateTimeOptionsWebUITest tests the date and time section of the options page. | 8 * DateTimeOptionsWebUITest tests the date and time section of the options page. |
| 9 * @constructor | 9 * @constructor |
| 10 * @extends {testing.Test} | 10 * @extends {testing.Test} |
| 11 */ | 11 */ |
| 12 function DateTimeOptionsWebUITest() {} | 12 function DateTimeOptionsWebUITest() {} |
| 13 | 13 |
| 14 DateTimeOptionsWebUITest.prototype = { | 14 DateTimeOptionsWebUITest.prototype = { |
| 15 __proto__: testing.Test.prototype, | 15 __proto__: testing.Test.prototype, |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Browse to date/time options. | 18 * Browse to date/time options. |
| 19 * @override | 19 * @override |
| 20 */ | 20 */ |
| 21 browsePreload: 'chrome://settings-frame/search#date', | 21 browsePreload: 'chrome://settings-frame/search#date', |
| 22 |
| 23 /** @override */ |
| 24 runAccessibilityChecks: true, |
| 25 |
| 26 /** @override */ |
| 27 accessibilityIssuesAreErrors: true, |
| 28 |
| 29 /** override */ |
| 30 setUp: function() { |
| 31 // user-image-stream is a streaming video element used for capturing a |
| 32 // user image. |
| 33 this.accessibilityAuditConfig.ignoreSelectors('videoWithoutCaptions', |
| 34 '.user-image-stream'); |
| 35 }, |
| 22 }; | 36 }; |
| 23 | 37 |
| 24 TEST_F('DateTimeOptionsWebUITest', 'testShowSetTimeButton', function() { | 38 TEST_F('DateTimeOptionsWebUITest', 'testShowSetTimeButton', function() { |
| 25 assertEquals(this.browsePreload, document.location.href); | 39 assertEquals(this.browsePreload, document.location.href); |
| 26 | 40 |
| 27 // Hide label and show button. | 41 // Hide label and show button. |
| 28 BrowserOptions.setCanSetTime(true); | 42 BrowserOptions.setCanSetTime(true); |
| 29 expectTrue($('time-synced-explanation').hidden); | 43 expectTrue($('time-synced-explanation').hidden); |
| 30 expectFalse($('set-time').hidden); | 44 expectFalse($('set-time').hidden); |
| 31 | 45 |
| 32 // Show label and hide button. | 46 // Show label and hide button. |
| 33 BrowserOptions.setCanSetTime(false); | 47 BrowserOptions.setCanSetTime(false); |
| 34 expectFalse($('time-synced-explanation').hidden); | 48 expectFalse($('time-synced-explanation').hidden); |
| 35 expectTrue($('set-time').hidden); | 49 expectTrue($('set-time').hidden); |
| 36 }); | 50 }); |
| 37 | 51 |
| 38 GEN('#endif'); | 52 GEN('#endif'); |
| OLD | NEW |