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 // TODO(dbeam): test for loading upacked extensions? | 5 // TODO(dbeam): test for loading upacked extensions? |
6 | 6 |
7 GEN('#include "chrome/browser/ui/webui/extensions/' + | 7 GEN('#include "chrome/browser/ui/webui/extensions/' + |
8 'extension_settings_browsertest.h"'); | 8 'extension_settings_browsertest.h"'); |
9 | 9 |
10 /** | 10 /** |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 function AsyncExtensionSettingsWebUITest() {} | 67 function AsyncExtensionSettingsWebUITest() {} |
68 | 68 |
69 AsyncExtensionSettingsWebUITest.prototype = { | 69 AsyncExtensionSettingsWebUITest.prototype = { |
70 __proto__: ExtensionSettingsWebUITest.prototype, | 70 __proto__: ExtensionSettingsWebUITest.prototype, |
71 | 71 |
72 /** @override */ | 72 /** @override */ |
73 isAsync: true, | 73 isAsync: true, |
74 }; | 74 }; |
75 | 75 |
76 TEST_F('AsyncExtensionSettingsWebUITest', 'testDeveloperModeA11y', function() { | 76 TEST_F('AsyncExtensionSettingsWebUITest', 'testDeveloperModeA11y', function() { |
77 var devControl = $('dev-controls'); | 77 var devControls = $('dev-controls'); |
78 | 78 |
79 // Make sure developer controls are hidden before checkbox is clicked. | 79 // Make sure developer controls are hidden before checkbox is clicked. |
80 assertTrue(devControl.hidden); | 80 assertEquals(0, devControls.offsetHeight); |
81 $('toggle-dev-on').click(); | 81 $('toggle-dev-on').click(); |
82 | 82 |
83 document.addEventListener('webkitTransitionEnd', function f(e) { | 83 document.addEventListener('webkitTransitionEnd', function f(e) { |
84 if (e.target == devControl) { | 84 if (e.target == devControls) { |
85 // Make sure developer controls are not hidden after checkbox is clicked. | 85 // Make sure developer controls are not hidden after checkbox is clicked. |
86 assertFalse(devControl.hidden); | 86 assertGT(devControls.offsetHeight, 0); |
87 | 87 |
88 document.removeEventListener(f, 'webkitTransitionEnd'); | 88 document.removeEventListener(f, 'webkitTransitionEnd'); |
89 testDone(); | 89 testDone(); |
90 } | 90 } |
91 }); | 91 }); |
92 ensureTransitionEndEvent(devControl, 4000); | 92 ensureTransitionEndEvent(devControls, 4000); |
93 }); | 93 }); |
94 | 94 |
95 /** | 95 /** |
96 * TestFixture for extension settings WebUI testing (commands config edition). | 96 * TestFixture for extension settings WebUI testing (commands config edition). |
97 * @extends {testing.Test} | 97 * @extends {testing.Test} |
98 * @constructor | 98 * @constructor |
99 */ | 99 */ |
100 function ExtensionSettingsCommandsConfigWebUITest() {} | 100 function ExtensionSettingsCommandsConfigWebUITest() {} |
101 | 101 |
102 ExtensionSettingsCommandsConfigWebUITest.prototype = { | 102 ExtensionSettingsCommandsConfigWebUITest.prototype = { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 testGenPreamble: function() { | 135 testGenPreamble: function() { |
136 GEN(' InstallGoodExtension();'); | 136 GEN(' InstallGoodExtension();'); |
137 } | 137 } |
138 }; | 138 }; |
139 | 139 |
140 TEST_F('ExtensionSettingsWebUITestWithExtensionInstalled', | 140 TEST_F('ExtensionSettingsWebUITestWithExtensionInstalled', |
141 'baseAccessibilityIsOk', function() { | 141 'baseAccessibilityIsOk', function() { |
142 assertEquals(this.browsePreload, document.location.href); | 142 assertEquals(this.browsePreload, document.location.href); |
143 this.runAccessibilityAudit(); | 143 this.runAccessibilityAudit(); |
144 }); | 144 }); |
OLD | NEW |