blob: 4fd3cae8c61fcdfb14ac5bf4e88be81318b8191d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* TestFixture for NTP4 WebUI testing.
* @extends {testing.Test}
* @constructor
*/
function NTP4WebUITest() {}
NTP4WebUITest.prototype = {
__proto__: testing.Test.prototype,
/**
* Browse to the newtab page & call preLoad().
*/
browsePreload: 'chrome://newtab',
};
// Test loading new tab page and selecting each card doesn't have console
// errors.
TEST_F('NTP4WebUITest', 'TestBrowsePages', function() {
// This tests the ntp4 new tab page which is not used on touch builds.
var cardSlider = ntp4.getCardSlider();
assertNotEquals(null, cardSlider);
for (var i = 0; i < cardSlider.cardCount; ++i) {
cardSlider.selectCard(i);
expectEquals(i, cardSlider.currentCard);
}
});
|