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

Side by Side Diff: chrome/browser/ui/views/ash/launcher/launcher_favicon_loader_browsertest.cc

Issue 10692195: Consolidate Browser Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 10 #include "chrome/browser/ui/browser_tabstrip.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } // namespace 71 } // namespace
72 72
73 class LauncherFaviconLoaderBrowsertest : public InProcessBrowserTest { 73 class LauncherFaviconLoaderBrowsertest : public InProcessBrowserTest {
74 protected: 74 protected:
75 void NavigateTo(Browser* browser, const char* url) { 75 void NavigateTo(Browser* browser, const char* url) {
76 std::string url_path = base::StringPrintf("files/ash/launcher/%s", url); 76 std::string url_path = base::StringPrintf("files/ash/launcher/%s", url);
77 ui_test_utils::NavigateToURL(browser, test_server()->GetURL(url_path)); 77 ui_test_utils::NavigateToURL(browser, test_server()->GetURL(url_path));
78 } 78 }
79 79
80 void CreatePanelBrowser(const char* url, Browser** result) { 80 void CreatePanelBrowser(const char* url, Browser** result) {
81 Browser* panel_browser = Browser::CreateWithParams( 81 Browser* panel_browser = new Browser(
82 Browser::CreateParams::CreateForApp( 82 Browser::CreateParams::CreateForApp(
83 Browser::TYPE_PANEL, "Test Panel", gfx::Rect(), 83 Browser::TYPE_PANEL, "Test Panel", gfx::Rect(),
84 browser()->profile())); 84 browser()->profile()));
85 EXPECT_TRUE(panel_browser->is_type_panel()); 85 EXPECT_TRUE(panel_browser->is_type_panel());
86 ASSERT_EQ(static_cast<void*>(NULL), contents_observer_.get()); 86 ASSERT_EQ(static_cast<void*>(NULL), contents_observer_.get());
87 // Load initial tab contents before setting the observer. 87 // Load initial tab contents before setting the observer.
88 ui_test_utils::NavigateToURL(panel_browser, GURL()); 88 ui_test_utils::NavigateToURL(panel_browser, GURL());
89 contents_observer_.reset( 89 contents_observer_.reset(
90 new ContentsObserver(chrome::GetWebContentsAt(panel_browser, 0))); 90 new ContentsObserver(chrome::GetWebContentsAt(panel_browser, 0)));
91 NavigateTo(panel_browser, url); 91 NavigateTo(panel_browser, url);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 NavigateTo(panel_browser, "launcher-smallfavicon.html"); 188 NavigateTo(panel_browser, "launcher-smallfavicon.html");
189 EXPECT_TRUE(WaitForFaviconDownlads(1)); 189 EXPECT_TRUE(WaitForFaviconDownlads(1));
190 EXPECT_TRUE(favicon_loader->GetFavicon().empty()); 190 EXPECT_TRUE(favicon_loader->GetFavicon().empty());
191 ASSERT_NO_FATAL_FAILURE(ResetDownloads()); 191 ASSERT_NO_FATAL_FAILURE(ResetDownloads());
192 192
193 NavigateTo(panel_browser, "launcher-largefavicon.html"); 193 NavigateTo(panel_browser, "launcher-largefavicon.html");
194 EXPECT_TRUE(WaitForFaviconDownlads(1)); 194 EXPECT_TRUE(WaitForFaviconDownlads(1));
195 EXPECT_FALSE(favicon_loader->GetFavicon().empty()); 195 EXPECT_FALSE(favicon_loader->GetFavicon().empty());
196 EXPECT_EQ(128, favicon_loader->GetFavicon().height()); 196 EXPECT_EQ(128, favicon_loader->GetFavicon().height());
197 } 197 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/app_list/extension_app_item.cc ('k') | chrome/browser/ui/views/ash/window_positioner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698