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

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

Issue 2440973003: Revert of Disable many tests with flaky accessibility audits. (Closed)
Patch Set: Created 4 years, 2 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(['options_browsertest_base.js']); 5 GEN_INCLUDE(['options_browsertest_base.js']);
6 6
7 /** 7 /**
8 * TestFixture for font settings WebUI testing. 8 * TestFixture for font settings WebUI testing.
9 * @extends {testing.Test} 9 * @extends {testing.Test}
10 * @constructor 10 * @constructor
(...skipping 23 matching lines...) Expand all
34 ]; 34 ];
35 35
36 // Enable when failure is resolved. 36 // Enable when failure is resolved.
37 // AX_TEXT_01: http://crbug.com/570555 37 // AX_TEXT_01: http://crbug.com/570555
38 this.accessibilityAuditConfig.ignoreSelectors( 38 this.accessibilityAuditConfig.ignoreSelectors(
39 'controlsWithoutLabel', 39 'controlsWithoutLabel',
40 controlsWithoutLabelSelectors); 40 controlsWithoutLabelSelectors);
41 }, 41 },
42 }; 42 };
43 43
44 // TODO(crbug.com/657514) Flakes on linux and chromeos.
45 GEN('#if defined(OS_LINUX) || defined(OS_CHROMEOS)');
46 GEN('#define MAYBE_testOpenFontSettings DISABLED_testOpenFontSettings');
47 GEN('#else');
48 GEN('#define MAYBE_testOpenFontSettings testOpenFontSettings');
49 GEN('#endif // defined(OS_WIN)');
50 // Test opening font settings has correct location. 44 // Test opening font settings has correct location.
51 TEST_F('FontSettingsWebUITest', 'MAYBE_testOpenFontSettings', function() { 45 TEST_F('FontSettingsWebUITest', 'testOpenFontSettings', function() {
52 assertEquals(this.browsePreload, document.location.href); 46 assertEquals(this.browsePreload, document.location.href);
53 }); 47 });
54 48
55 // Test setup of the Advanced Font Settings links. 49 // Test setup of the Advanced Font Settings links.
56 TEST_F('FontSettingsWebUITest', 'testAdvancedFontSettingsLink', function() { 50 TEST_F('FontSettingsWebUITest', 'testAdvancedFontSettingsLink', function() {
57 var installElement = $('advanced-font-settings-install'); 51 var installElement = $('advanced-font-settings-install');
58 var optionsElement = $('advanced-font-settings-options'); 52 var optionsElement = $('advanced-font-settings-options');
59 var expectedUrl = 'https://chrome.google.com/webstore/detail/' + 53 var expectedUrl = 'https://chrome.google.com/webstore/detail/' +
60 'caclkomlalccbpcdllchkeecicepbmbm'; 54 'caclkomlalccbpcdllchkeecicepbmbm';
61 55
62 FontSettings.notifyAdvancedFontSettingsAvailability(false); 56 FontSettings.notifyAdvancedFontSettingsAvailability(false);
63 assertFalse(installElement.hidden); 57 assertFalse(installElement.hidden);
64 assertEquals(expectedUrl, installElement.querySelector('a').href); 58 assertEquals(expectedUrl, installElement.querySelector('a').href);
65 assertTrue(optionsElement.hidden); 59 assertTrue(optionsElement.hidden);
66 60
67 FontSettings.notifyAdvancedFontSettingsAvailability(true); 61 FontSettings.notifyAdvancedFontSettingsAvailability(true);
68 assertTrue(installElement.hidden); 62 assertTrue(installElement.hidden);
69 assertFalse(optionsElement.hidden); 63 assertFalse(optionsElement.hidden);
70 this.mockHandler.expects(once()).openAdvancedFontSettingsOptions(); 64 this.mockHandler.expects(once()).openAdvancedFontSettingsOptions();
71 optionsElement.click(); 65 optionsElement.click();
72 }); 66 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698