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