| OLD | NEW |
| 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(['options_browsertest_base.js']); | 5 GEN_INCLUDE(['options_browsertest_base.js']); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * TestFixture for cookies view WebUI testing. | 8 * TestFixture for cookies view WebUI testing. |
| 9 * @extends {testing.Test} | 9 * @extends {testing.Test} |
| 10 * @constructor | 10 * @constructor |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 /** @override */ | 22 /** @override */ |
| 23 setUp: function() { | 23 setUp: function() { |
| 24 OptionsBrowsertestBase.prototype.setUp.call(this); | 24 OptionsBrowsertestBase.prototype.setUp.call(this); |
| 25 | 25 |
| 26 // Enable when failure is resolved. | 26 // Enable when failure is resolved. |
| 27 // AX_TEXT_01: http://crbug.com/570560 | 27 // AX_TEXT_01: http://crbug.com/570560 |
| 28 this.accessibilityAuditConfig.ignoreSelectors( | 28 this.accessibilityAuditConfig.ignoreSelectors( |
| 29 'controlsWithoutLabel', | 29 'controlsWithoutLabel', |
| 30 '#cookies-view-page > .content-area.cookies-list-content-area > *'); | 30 '#cookies-view-page > .content-area.cookies-list-content-area > *'); |
| 31 |
| 32 var requiredOwnedAriaRoleMissingSelectors = [ |
| 33 '#default-search-engine-list', |
| 34 '#other-search-engine-list', |
| 35 ]; |
| 36 |
| 37 // Enable when failure is resolved. |
| 38 // AX_ARIA_08: http://crbug.com/605689 |
| 39 this.accessibilityAuditConfig.ignoreSelectors( |
| 40 'requiredOwnedAriaRoleMissing', |
| 41 requiredOwnedAriaRoleMissingSelectors); |
| 31 }, | 42 }, |
| 32 }; | 43 }; |
| 33 | 44 |
| 34 // Test opening the cookies view has correct location. | 45 // Test opening the cookies view has correct location. |
| 35 TEST_F('CookiesViewWebUITest', 'testOpenCookiesView', function() { | 46 TEST_F('CookiesViewWebUITest', 'testOpenCookiesView', function() { |
| 36 assertEquals(this.browsePreload, document.location.href); | 47 assertEquals(this.browsePreload, document.location.href); |
| 37 }); | 48 }); |
| 38 | 49 |
| 39 TEST_F('CookiesViewWebUITest', 'testNoCloseOnSearchEnter', function() { | 50 TEST_F('CookiesViewWebUITest', 'testNoCloseOnSearchEnter', function() { |
| 40 var cookiesView = CookiesView.getInstance(); | 51 var cookiesView = CookiesView.getInstance(); |
| 41 assertTrue(cookiesView.visible); | 52 assertTrue(cookiesView.visible); |
| 42 var searchBox = cookiesView.pageDiv.querySelector('.cookies-search-box'); | 53 var searchBox = cookiesView.pageDiv.querySelector('.cookies-search-box'); |
| 43 searchBox.dispatchEvent(new KeyboardEvent('keydown', { | 54 searchBox.dispatchEvent(new KeyboardEvent('keydown', { |
| 44 'bubbles': true, | 55 'bubbles': true, |
| 45 'cancelable': true, | 56 'cancelable': true, |
| 46 'keyIdentifier': 'Enter' | 57 'keyIdentifier': 'Enter' |
| 47 })); | 58 })); |
| 48 assertTrue(cookiesView.visible); | 59 assertTrue(cookiesView.visible); |
| 49 }); | 60 }); |
| OLD | NEW |