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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 assertEquals('createProfile', PageManager.getTopmostVisiblePage().name); | 334 assertEquals('createProfile', PageManager.getTopmostVisiblePage().name); |
335 var errorBubble = $('create-profile-error-bubble'); | 335 var errorBubble = $('create-profile-error-bubble'); |
336 assertTrue(errorBubble.hidden); | 336 assertTrue(errorBubble.hidden); |
337 | 337 |
338 CreateProfileOverlay.onError('An Error Message!'); | 338 CreateProfileOverlay.onError('An Error Message!'); |
339 assertEquals('createProfile', PageManager.getTopmostVisiblePage().name); | 339 assertEquals('createProfile', PageManager.getTopmostVisiblePage().name); |
340 assertFalse(errorBubble.hidden); | 340 assertFalse(errorBubble.hidden); |
341 }); | 341 }); |
342 | 342 |
343 // The name and email should be inserted into the confirmation dialog. | 343 // The name and email should be inserted into the confirmation dialog. |
344 // Disbaled because of flakiness on Mac: crbug.com/405709 | 344 TEST_F('ManageProfileUITest', 'CreateConfirmationText', function() { |
345 GEN('#if defined(OS_MACOSX)'); | |
346 GEN('#define MAYBE_CreateConfirmationText \\'); | |
347 GEN(' DISABLED_CreateConfirmationText'); | |
348 GEN('#else'); | |
349 GEN('#define MAYBE_CreateConfirmationText CreateConfirmationText'); | |
350 GEN('#endif'); | |
351 TEST_F('ManageProfileUITest', 'MAYBE_CreateConfirmationText', function() { | |
352 var self = this; | 345 var self = this; |
353 var custodianEmail = 'foo@example.com'; | 346 var custodianEmail = 'foo@example.com'; |
354 | 347 |
355 // Checks the strings in the confirmation dialog. If |expectedNameText| is | 348 // Checks the strings in the confirmation dialog. If |expectedNameText| is |
356 // given, it should be present in the dialog's textContent; otherwise the name | 349 // given, it should be present in the dialog's textContent; otherwise the name |
357 // is expected. If |expectedNameHtml| is given, it should be present in the | 350 // is expected. If |expectedNameHtml| is given, it should be present in the |
358 // dialog's innerHTML; otherwise the expected text is expected in the HTML | 351 // dialog's innerHTML; otherwise the expected text is expected in the HTML |
359 // too. | 352 // too. |
360 function checkDialog(name, expectedNameText, expectedNameHtml) { | 353 function checkDialog(name, expectedNameText, expectedNameHtml) { |
361 var expectedText = expectedNameText || name; | 354 var expectedText = expectedNameText || name; |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 | 646 |
654 // Select another icon and check if the profile name was updated. | 647 // Select another icon and check if the profile name was updated. |
655 var oldName = nameEl.value; | 648 var oldName = nameEl.value; |
656 gridEl.selectedItem = iconURLs[1]; | 649 gridEl.selectedItem = iconURLs[1]; |
657 expectEquals(oldName, nameEl.value); | 650 expectEquals(oldName, nameEl.value); |
658 | 651 |
659 PageManager.closeOverlay(); | 652 PageManager.closeOverlay(); |
660 }); | 653 }); |
661 | 654 |
662 GEN('#endif // OS_CHROMEOS'); | 655 GEN('#endif // OS_CHROMEOS'); |
OLD | NEW |