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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 /** @override */ | 123 /** @override */ |
124 typedefCppFixture: 'ExtensionSettingsUIBrowserTest', | 124 typedefCppFixture: 'ExtensionSettingsUIBrowserTest', |
125 | 125 |
126 /** @override */ | 126 /** @override */ |
127 testGenPreamble: function() { | 127 testGenPreamble: function() { |
128 GEN(' InstallGoodExtension();'); | 128 GEN(' InstallGoodExtension();'); |
129 } | 129 } |
130 }; | 130 }; |
131 | 131 |
132 TEST_F('ExtensionSettingsWebUITestWithExtensionInstalled', | 132 /** @this {ExtensionSettingsWebUITestWithExtensionInstalled} */ |
133 'baseAccessibilityIsOk', function() { | 133 function runAudit() { |
134 assertEquals(this.browsePreload, document.location.href); | 134 assertEquals(this.browsePreload, document.location.href); |
135 this.runAccessibilityAudit(); | 135 this.runAccessibilityAudit(); |
136 }); | 136 } |
| 137 |
| 138 TEST_F('ExtensionSettingsWebUITestWithExtensionInstalled', |
| 139 'baseAccessibilityIsOk', runAudit); |
137 | 140 |
138 /** | 141 /** |
139 * @constructor | 142 * @constructor |
140 * @extends {ExtensionSettingsWebUITestWithExtensionInstalled} | 143 * @extends {ExtensionSettingsWebUITestWithExtensionInstalled} |
141 */ | 144 */ |
142 function ManagedExtensionSettingsWebUITest() {} | 145 function ManagedExtensionSettingsWebUITest() {} |
143 | 146 |
144 ManagedExtensionSettingsWebUITest.prototype = { | 147 ManagedExtensionSettingsWebUITest.prototype = { |
145 __proto__: ExtensionSettingsWebUITestWithExtensionInstalled.prototype, | 148 __proto__: ExtensionSettingsWebUITestWithExtensionInstalled.prototype, |
146 | 149 |
147 /** @override */ | 150 /** @override */ |
148 testGenPreamble: function() { | 151 testGenPreamble: function() { |
149 GEN(' AddManagedPolicyProvider();'); | 152 GEN(' AddManagedPolicyProvider();'); |
150 ExtensionSettingsWebUITestWithExtensionInstalled.prototype.testGenPreamble. | 153 ExtensionSettingsWebUITestWithExtensionInstalled.prototype.testGenPreamble. |
151 call(this); | 154 call(this); |
152 }, | 155 }, |
153 }; | 156 }; |
154 | 157 |
155 TEST_F('ManagedExtensionSettingsWebUITest', 'testAccessibility', function() { | 158 TEST_F('ManagedExtensionSettingsWebUITest', 'testAccessibility', runAudit); |
156 assertEquals(this.browsePreload, document.location.href); | 159 |
157 this.runAccessibilityAudit(); | 160 /** |
158 }); | 161 * @constructor |
| 162 * @extends {ExtensionSettingsWebUITestWithExtensionInstalled} |
| 163 */ |
| 164 function ExtensionOptionsDialogsWebUITest() {} |
| 165 |
| 166 ExtensionOptionsDialogsWebUITest.prototype = { |
| 167 __proto__: ExtensionSettingsWebUITestWithExtensionInstalled.prototype, |
| 168 |
| 169 /** @override */ |
| 170 browsePreload: ExtensionSettingsWebUITest.prototype.browsePreload + |
| 171 '?options=ldnnhddmnhbkjipkidpdiheffobcpfmf', |
| 172 }; |
| 173 |
| 174 TEST_F('ExtensionOptionsDialogsWebUITest', 'testAccessibility', runAudit); |
OLD | NEW |