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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_url_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #include "chrome/app/chrome_dll_resource.h" 7 #include "chrome/app/chrome_dll_resource.h"
8 #include "chrome/test/automation/browser_proxy.h" 8 #include "chrome/test/automation/browser_proxy.h"
9 #include "chrome/test/automation/tab_proxy.h" 9 #include "chrome/test/automation/tab_proxy.h"
10 #include "chrome/test/automation/window_proxy.h" 10 #include "chrome/test/automation/window_proxy.h"
(...skipping 28 matching lines...) Expand all
39 // Blank thumbnails on the NTP have the class 'filler' applied to the div. 39 // Blank thumbnails on the NTP have the class 'filler' applied to the div.
40 // If all the thumbnails load, there should be no div's with 'filler'. 40 // If all the thumbnails load, there should be no div's with 'filler'.
41 scoped_refptr<TabProxy> tab = window->GetActiveTab(); 41 scoped_refptr<TabProxy> tab = window->GetActiveTab();
42 int filler_thumbnails_count = -1; 42 int filler_thumbnails_count = -1;
43 ASSERT_TRUE(tab->ExecuteAndExtractInt(L"", 43 ASSERT_TRUE(tab->ExecuteAndExtractInt(L"",
44 L"window.domAutomationController.send(" 44 L"window.domAutomationController.send("
45 L"document.getElementsByClassName('filler').length)", 45 L"document.getElementsByClassName('filler').length)",
46 &filler_thumbnails_count)); 46 &filler_thumbnails_count));
47 EXPECT_EQ(0, filler_thumbnails_count); 47 EXPECT_EQ(0, filler_thumbnails_count);
48 } 48 }
49
50 TEST_F(NewTabUITest, ChromeInternalLoadsNTP) {
51 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0));
52 ASSERT_TRUE(window.get());
53
54 int tab_count = -1;
55 ASSERT_TRUE(window->GetTabCount(&tab_count));
56 ASSERT_EQ(1, tab_count);
57
58 // Go to the "new tab page" using its old url, rather than chrome://newtab.
59 scoped_refptr<TabProxy> tab = window->GetTab(0);
60 tab->NavigateToURLAsync(GURL("chrome-internal:"));
61 int load_time;
62 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time));
63
64 // Ensure there are some thumbnails loaded in the page.
65 int thumbnails_count = -1;
66 ASSERT_TRUE(tab->ExecuteAndExtractInt(L"",
67 L"window.domAutomationController.send("
68 L"document.getElementsByClassName('thumbnail-container').length)",
69 &thumbnails_count));
70 EXPECT_GT(thumbnails_count, 0);
71 }
72
OLDNEW
« 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