| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 /** | 121 /** |
| 122 * Wait for all targets to be hidden. | 122 * Wait for all targets to be hidden. |
| 123 * @param {Array<Element>} targets | 123 * @param {Array<Element>} targets |
| 124 */ | 124 */ |
| 125 function waitUntilHidden(targets) { | 125 function waitUntilHidden(targets) { |
| 126 function isHidden(el) { return el.hidden; } | 126 function isHidden(el) { return el.hidden; } |
| 127 function ensureTransition(el) { ensureTransitionEndEvent(el, 500); } | 127 function ensureTransition(el) { ensureTransitionEndEvent(el, 500); } |
| 128 | 128 |
| 129 document.addEventListener('webkitTransitionEnd', function f(e) { | 129 document.addEventListener('webkitTransitionEnd', function f(e) { |
| 130 if (targets.indexOf(e.target) >= 0 && targets.every(isHidden)) { | 130 if (targets.indexOf(e.target) >= 0 && targets.every(isHidden)) { |
| 131 document.removeEventListener(f, 'webkitTransitionEnd'); | 131 document.removeEventListener('webkitTransitionEnd', f); |
| 132 testDone(); | 132 testDone(); |
| 133 } | 133 } |
| 134 }); | 134 }); |
| 135 | 135 |
| 136 targets.forEach(ensureTransition); | 136 targets.forEach(ensureTransition); |
| 137 } | 137 } |
| 138 | 138 |
| 139 // Crashes on Mac only. See http://crbug.com/79181 | 139 // Crashes on Mac only. See http://crbug.com/79181 |
| 140 GEN('#if defined(OS_MACOSX)'); | 140 GEN('#if defined(OS_MACOSX)'); |
| 141 GEN('#define MAYBE_testSetBooleanPrefTriggers ' + | 141 GEN('#define MAYBE_testSetBooleanPrefTriggers ' + |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 __proto__: OptionsWebUIExtendedTest.prototype, | 959 __proto__: OptionsWebUIExtendedTest.prototype, |
| 960 | 960 |
| 961 /** @override */ | 961 /** @override */ |
| 962 browsePreload: 'chrome://settings-frame/nonexistantPage', | 962 browsePreload: 'chrome://settings-frame/nonexistantPage', |
| 963 }; | 963 }; |
| 964 | 964 |
| 965 TEST_F('OptionsWebUIRedirectTest', 'TestURL', function() { | 965 TEST_F('OptionsWebUIRedirectTest', 'TestURL', function() { |
| 966 assertEquals('chrome://settings-frame/', document.location.href); | 966 assertEquals('chrome://settings-frame/', document.location.href); |
| 967 this.verifyHistory_([''], testDone); | 967 this.verifyHistory_([''], testDone); |
| 968 }); | 968 }); |
| OLD | NEW |