Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1028)

Unified Diff: chrome/test/data/webui/ntp4.js

Issue 7741010: Added minimal ntp4 WebUI test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/ntp4.js
diff --git a/chrome/test/data/webui/ntp4.js b/chrome/test/data/webui/ntp4.js
new file mode 100644
index 0000000000000000000000000000000000000000..2486dcad610b07db41cc2182e33d2d0e86dc8aa2
--- /dev/null
+++ b/chrome/test/data/webui/ntp4.js
@@ -0,0 +1,30 @@
+// 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() {
+ var cardSlider = ntp4.getCardSlider();
+ assertNotEquals(null, cardSlider);
+ for (var i = 0; i < cardSlider.cardCount; ++i) {
+ cardSlider.selectCard(i);
+ expectEquals(i, cardSlider.currentCard);
+ }
+});
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698