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 "chrome/test/data/webui/ntp4_browsertest.h"'); | 5 GEN('#include "chrome/test/data/webui/ntp4_browsertest.h"'); |
6 | 6 |
7 /** | 7 /** |
8 * TestFixture for NTP4 WebUI testing. | 8 * TestFixture for NTP4 WebUI testing. |
9 * @extends {testing.Test} | 9 * @extends {testing.Test} |
10 * @constructor | 10 * @constructor |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 TEST_F('NTP4WebUITest', 'NTPHasNavDots', function() { | 45 TEST_F('NTP4WebUITest', 'NTPHasNavDots', function() { |
46 var navDots = document.querySelectorAll('.dot'); | 46 var navDots = document.querySelectorAll('.dot'); |
47 if (loadTimeData.getBoolean('showApps')) | 47 if (loadTimeData.getBoolean('showApps')) |
48 assertGE(navDots.length, 2, 'There should be at least two navdots.'); | 48 assertGE(navDots.length, 2, 'There should be at least two navdots.'); |
49 else | 49 else |
50 assertEquals(1, navDots.length, 'There should be exactly one navdot.'); | 50 assertEquals(1, navDots.length, 'There should be exactly one navdot.'); |
51 }); | 51 }); |
52 | 52 |
53 // http://crbug.com/118514 | 53 // http://crbug.com/118514 |
54 TEST_F('NTP4WebUITest', 'FLAKY_NTPHasSelectedPageAndDot', function() { | 54 TEST_F('NTP4WebUITest', 'DISABLED_NTPHasSelectedPageAndDot', function() { |
55 var selectedDot = document.querySelectorAll('.dot.selected'); | 55 var selectedDot = document.querySelectorAll('.dot.selected'); |
56 assertEquals(1, selectedDot.length, | 56 assertEquals(1, selectedDot.length, |
57 'There should be exactly one selected dot.'); | 57 'There should be exactly one selected dot.'); |
58 | 58 |
59 var selectedTilePage = document.querySelectorAll('.tile-page.selected-card'); | 59 var selectedTilePage = document.querySelectorAll('.tile-page.selected-card'); |
60 assertEquals(1, selectedTilePage.length, | 60 assertEquals(1, selectedTilePage.length, |
61 'There should be exactly one selected tile page.'); | 61 'There should be exactly one selected tile page.'); |
62 }); | 62 }); |
63 | 63 |
64 TEST_F('NTP4WebUITest', 'NTPHasNoLoginNameWhenSignedOut', function() { | 64 TEST_F('NTP4WebUITest', 'NTPHasNoLoginNameWhenSignedOut', function() { |
(...skipping 24 matching lines...) Expand all Loading... |
89 GEN('#if !defined(OS_CHROMEOS)'); | 89 GEN('#if !defined(OS_CHROMEOS)'); |
90 | 90 |
91 TEST_F('NTP4LoggedInWebUITest', 'NTPHasLoginNameWhenSignedIn', function() { | 91 TEST_F('NTP4LoggedInWebUITest', 'NTPHasLoginNameWhenSignedIn', function() { |
92 var userName = document.querySelector('#login-status-header .profile-name'); | 92 var userName = document.querySelector('#login-status-header .profile-name'); |
93 assertNotEquals(userName, null, 'The logged-in user name can\'t be found.'); | 93 assertNotEquals(userName, null, 'The logged-in user name can\'t be found.'); |
94 assertEquals('user@gmail.com', userName.textContent, | 94 assertEquals('user@gmail.com', userName.textContent, |
95 'The user name should be present on the new tab.'); | 95 'The user name should be present on the new tab.'); |
96 }); | 96 }); |
97 | 97 |
98 GEN('#endif'); | 98 GEN('#endif'); |
OLD | NEW |