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 GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"'); | 6 GEN('#include "chrome/browser/ui/webui/options/options_browsertest.h"'); |
7 | 7 |
8 /** @const */ var SUPERVISED_USERS_PREF = 'profile.managed_users'; | 8 /** @const */ var SUPERVISED_USERS_PREF = 'profile.managed_users'; |
9 | 9 |
10 /** | 10 /** |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 case 1: | 187 case 1: |
188 window.setTimeout(function() { | 188 window.setTimeout(function() { |
189 assertTrue(dntOverlay.visible); | 189 assertTrue(dntOverlay.visible); |
190 buttonToClick.click(); | 190 buttonToClick.click(); |
191 }, 0); | 191 }, 0); |
192 break; | 192 break; |
193 case 2: | 193 case 2: |
194 window.setTimeout(function() { | 194 window.setTimeout(function() { |
195 assertFalse(dntOverlay.visible); | 195 assertFalse(dntOverlay.visible); |
196 assertEquals(confirmInterstitial, dntCheckbox.checked); | 196 assertEquals(confirmInterstitial, dntCheckbox.checked); |
197 dntOverlay.removeEventListener(visibleChangeHandler); | 197 dntOverlay.removeEventListener('visibleChange', visibleChangeHandler); |
198 testDone(); | 198 testDone(); |
199 }, 0); | 199 }, 0); |
200 break; | 200 break; |
201 default: | 201 default: |
202 assertTrue(false); | 202 assertTrue(false); |
203 } | 203 } |
204 }; | 204 }; |
205 dntOverlay.addEventListener('visibleChange', visibleChangeHandler); | 205 dntOverlay.addEventListener('visibleChange', visibleChangeHandler); |
206 | 206 |
207 if (confirmInterstitial) { | 207 if (confirmInterstitial) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 case 1: | 240 case 1: |
241 window.setTimeout(function() { | 241 window.setTimeout(function() { |
242 assertTrue(dntOverlay.visible); | 242 assertTrue(dntOverlay.visible); |
243 $('do-not-track-confirm-ok').click(); | 243 $('do-not-track-confirm-ok').click(); |
244 }, 0); | 244 }, 0); |
245 break; | 245 break; |
246 case 2: | 246 case 2: |
247 window.setTimeout(function() { | 247 window.setTimeout(function() { |
248 assertFalse(dntOverlay.visible); | 248 assertFalse(dntOverlay.visible); |
249 assertTrue(dntCheckbox.checked); | 249 assertTrue(dntCheckbox.checked); |
250 dntOverlay.removeEventListener(visibleChangeHandler); | 250 dntOverlay.removeEventListener('visibleChange', visibleChangeHandler); |
251 dntCheckbox.click(); | 251 dntCheckbox.click(); |
252 }, 0); | 252 }, 0); |
253 break; | 253 break; |
254 default: | 254 default: |
255 assertNotReached(); | 255 assertNotReached(); |
256 } | 256 } |
257 }; | 257 }; |
258 dntOverlay.addEventListener('visibleChange', visibleChangeHandler); | 258 dntOverlay.addEventListener('visibleChange', visibleChangeHandler); |
259 | 259 |
260 this.mockHandler.expects(once()).setBooleanPref( | 260 this.mockHandler.expects(once()).setBooleanPref( |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 __proto__: OptionsWebUIExtendedTest.prototype, | 872 __proto__: OptionsWebUIExtendedTest.prototype, |
873 | 873 |
874 /** @override */ | 874 /** @override */ |
875 browsePreload: 'chrome://settings-frame/nonexistantPage', | 875 browsePreload: 'chrome://settings-frame/nonexistantPage', |
876 }; | 876 }; |
877 | 877 |
878 TEST_F('OptionsWebUIRedirectTest', 'TestURL', function() { | 878 TEST_F('OptionsWebUIRedirectTest', 'TestURL', function() { |
879 assertEquals('chrome://settings-frame/', document.location.href); | 879 assertEquals('chrome://settings-frame/', document.location.href); |
880 this.verifyHistory_([''], testDone); | 880 this.verifyHistory_([''], testDone); |
881 }); | 881 }); |
OLD | NEW |