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

Side by Side Diff: chrome/test/browser_with_test_window_test.h

Issue 2822010: Fixes bug in bookmark bar view if profile changed. If the profile (Closed)
Patch Set: Created 10 years, 6 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
« no previous file with comments | « chrome/chrome_tests.gypi ('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')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_ 5 #ifndef CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_
6 #define CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_ 6 #define CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 BrowserWithTestWindowTest(); 44 BrowserWithTestWindowTest();
45 virtual ~BrowserWithTestWindowTest(); 45 virtual ~BrowserWithTestWindowTest();
46 46
47 virtual void SetUp(); 47 virtual void SetUp();
48 48
49 // Returns the current RenderViewHost for the current tab as a 49 // Returns the current RenderViewHost for the current tab as a
50 // TestRenderViewHost. 50 // TestRenderViewHost.
51 TestRenderViewHost* TestRenderViewHostForTab(TabContents* tab_contents); 51 TestRenderViewHost* TestRenderViewHostForTab(TabContents* tab_contents);
52 52
53 protected: 53 protected:
54
55 TestBrowserWindow* window() const { return window_.get(); } 54 TestBrowserWindow* window() const { return window_.get(); }
56 void set_window(TestBrowserWindow* window) { 55 void set_window(TestBrowserWindow* window) {
57 window_.reset(window); 56 window_.reset(window);
58 } 57 }
59 58
60 Browser* browser() const { return browser_.get(); } 59 Browser* browser() const { return browser_.get(); }
61 void set_browser(Browser* browser) { 60 void set_browser(Browser* browser) {
62 browser_.reset(browser); 61 browser_.reset(browser);
63 } 62 }
64 63
65 TestingProfile* profile() const { return profile_.get(); } 64 TestingProfile* profile() const { return profile_.get(); }
66 void set_profile(TestingProfile* profile) { 65 void set_profile(TestingProfile* profile) {
67 profile_.reset(profile); 66 profile_.reset(profile);
68 } 67 }
69 68
69 MessageLoop* message_loop() { return &ui_loop_; }
70
70 // Adds a tab to |browser| with the given URL and commits the load. 71 // Adds a tab to |browser| with the given URL and commits the load.
71 // This is a convenience function. The new tab will be added at index 0. 72 // This is a convenience function. The new tab will be added at index 0.
72 void AddTab(Browser* browser, const GURL& url); 73 void AddTab(Browser* browser, const GURL& url);
73 74
74 // Commits the pending load on the given controller. It will keep the 75 // Commits the pending load on the given controller. It will keep the
75 // URL of the pending load. If there is no pending load, this does nothing. 76 // URL of the pending load. If there is no pending load, this does nothing.
76 void CommitPendingLoad(NavigationController* controller); 77 void CommitPendingLoad(NavigationController* controller);
77 78
78 // Creates a pending navigation on the given navigation controller to the 79 // Creates a pending navigation on the given navigation controller to the
79 // given URL with the default parameters and the commits the load with a page 80 // given URL with the default parameters and the commits the load with a page
(...skipping 13 matching lines...) Expand all
93 scoped_ptr<TestBrowserWindow> window_; 94 scoped_ptr<TestBrowserWindow> window_;
94 scoped_ptr<Browser> browser_; 95 scoped_ptr<Browser> browser_;
95 96
96 MockRenderProcessHostFactory rph_factory_; 97 MockRenderProcessHostFactory rph_factory_;
97 TestRenderViewHostFactory rvh_factory_; 98 TestRenderViewHostFactory rvh_factory_;
98 99
99 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest); 100 DISALLOW_COPY_AND_ASSIGN(BrowserWithTestWindowTest);
100 }; 101 };
101 102
102 #endif // CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_ 103 #endif // CHROME_TEST_BROWSER_WITH_TEST_WINDOW_TEST_H_
OLDNEW
« 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