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

Unified Diff: chrome/browser/dom_ui/new_tab_ui_uitest.cc

Issue 363019: Fixes navigations chrome-internal: to actually show the NTP.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/browser/browser_url_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui_uitest.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_ui_uitest.cc (revision 30048)
+++ chrome/browser/dom_ui/new_tab_ui_uitest.cc (working copy)
@@ -46,3 +46,27 @@
&filler_thumbnails_count));
EXPECT_EQ(0, filler_thumbnails_count);
}
+
+TEST_F(NewTabUITest, ChromeInternalLoadsNTP) {
+ scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(window.get());
+
+ int tab_count = -1;
+ ASSERT_TRUE(window->GetTabCount(&tab_count));
+ ASSERT_EQ(1, tab_count);
+
+ // Go to the "new tab page" using its old url, rather than chrome://newtab.
+ scoped_refptr<TabProxy> tab = window->GetTab(0);
+ tab->NavigateToURLAsync(GURL("chrome-internal:"));
+ int load_time;
+ ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time));
+
+ // Ensure there are some thumbnails loaded in the page.
+ int thumbnails_count = -1;
+ ASSERT_TRUE(tab->ExecuteAndExtractInt(L"",
+ L"window.domAutomationController.send("
+ L"document.getElementsByClassName('thumbnail-container').length)",
+ &thumbnails_count));
+ EXPECT_GT(thumbnails_count, 0);
+}
+
Property changes on: chrome\browser\dom_ui\new_tab_ui_uitest.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/browser_url_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698