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 13 matching lines...) Expand all Loading... |
24 // This tests the ntp4 new tab page which is not used on touch builds. | 24 // This tests the ntp4 new tab page which is not used on touch builds. |
25 var cardSlider = ntp.getCardSlider(); | 25 var cardSlider = ntp.getCardSlider(); |
26 assertNotEquals(null, cardSlider); | 26 assertNotEquals(null, cardSlider); |
27 for (var i = 0; i < cardSlider.cardCount; i++) { | 27 for (var i = 0; i < cardSlider.cardCount; i++) { |
28 cardSlider.selectCard(i); | 28 cardSlider.selectCard(i); |
29 expectEquals(i, cardSlider.currentCard); | 29 expectEquals(i, cardSlider.currentCard); |
30 } | 30 } |
31 }); | 31 }); |
32 | 32 |
33 // http://crbug.com/118944 | 33 // http://crbug.com/118944 |
34 TEST_F('NTP4WebUITest', 'FLAKY_NTPHasThumbnails', function() { | 34 TEST_F('NTP4WebUITest', 'DISABLED_NTPHasThumbnails', function() { |
35 var mostVisited = document.querySelectorAll('.most-visited'); | 35 var mostVisited = document.querySelectorAll('.most-visited'); |
36 assertEquals(8, mostVisited.length, 'There should be 8 most visited tiles.'); | 36 assertEquals(8, mostVisited.length, 'There should be 8 most visited tiles.'); |
37 | 37 |
38 var apps = document.querySelectorAll('.app'); | 38 var apps = document.querySelectorAll('.app'); |
39 if (loadTimeData.getBoolean('showApps')) | 39 if (loadTimeData.getBoolean('showApps')) |
40 assertGE(apps.length, 1, 'There should be at least one app.'); | 40 assertGE(apps.length, 1, 'There should be at least one app.'); |
41 else | 41 else |
42 assertEquals(0, apps.length, 'There should be no apps.'); | 42 assertEquals(0, apps.length, 'There should be no apps.'); |
43 }); | 43 }); |
44 | 44 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |