OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // None of these tests is relevant for Chrome OS. | 5 // None of these tests is relevant for Chrome OS. |
6 GEN('#if !defined(OS_CHROMEOS)'); | 6 GEN('#if !defined(OS_CHROMEOS)'); |
7 | 7 |
8 /** | 8 /** |
9 * TestFixture for ManageProfileOverlay and CreateProfileOverlay WebUI testing. | 9 * TestFixture for ManageProfileOverlay and CreateProfileOverlay WebUI testing. |
10 * @extends {testing.Test} | 10 * @extends {testing.Test} |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 return options.SupervisedUserListData.getInstance().promise_; | 245 return options.SupervisedUserListData.getInstance().promise_; |
246 }).then(function() { | 246 }).then(function() { |
247 assertTrue($('create-profile-ok').disabled); | 247 assertTrue($('create-profile-ok').disabled); |
248 assertFalse($('supervised-user-import-existing') == null); | 248 assertFalse($('supervised-user-import-existing') == null); |
249 | 249 |
250 // A profile which already exists on the device. | 250 // A profile which already exists on the device. |
251 nameField.value = 'Test'; | 251 nameField.value = 'Test'; |
252 ManageProfileOverlay.getInstance().onNameChanged_('create'); | 252 ManageProfileOverlay.getInstance().onNameChanged_('create'); |
253 return options.SupervisedUserListData.getInstance().promise_; | 253 return options.SupervisedUserListData.getInstance().promise_; |
254 }).then(function() { | 254 }).then(function() { |
255 assertTrue($('create-profile-ok').disabled); | 255 assertFalse($('create-profile-ok').disabled); |
256 assertTrue($('supervised-user-import-existing') == null); | 256 assertTrue($('supervised-user-import-existing') == null); |
257 | 257 |
258 // A profile which does not exist on the device, but there is a profile with | 258 // A profile which does not exist on the device, but there is a profile with |
259 // the same name already on the device. | 259 // the same name already on the device. |
260 nameField.value = 'SameName'; | 260 nameField.value = 'SameName'; |
261 ManageProfileOverlay.getInstance().onNameChanged_('create'); | 261 ManageProfileOverlay.getInstance().onNameChanged_('create'); |
262 return options.SupervisedUserListData.getInstance().promise_; | 262 return options.SupervisedUserListData.getInstance().promise_; |
263 }).then(function() { | 263 }).then(function() { |
264 assertTrue($('create-profile-ok').disabled); | 264 assertTrue($('create-profile-ok').disabled); |
265 assertFalse($('supervised-user-import-existing') == null); | 265 assertFalse($('supervised-user-import-existing') == null); |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 | 646 |
647 // Select another icon and check if the profile name was updated. | 647 // Select another icon and check if the profile name was updated. |
648 var oldName = nameEl.value; | 648 var oldName = nameEl.value; |
649 gridEl.selectedItem = iconURLs[1]; | 649 gridEl.selectedItem = iconURLs[1]; |
650 expectEquals(oldName, nameEl.value); | 650 expectEquals(oldName, nameEl.value); |
651 | 651 |
652 PageManager.closeOverlay(); | 652 PageManager.closeOverlay(); |
653 }); | 653 }); |
654 | 654 |
655 GEN('#endif // OS_CHROMEOS'); | 655 GEN('#endif // OS_CHROMEOS'); |
OLD | NEW |