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

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

Issue 279004: Made sync code build and pass unit tests on OS X. (Closed)
Patch Set: Fixed uninitialized var error. Created 11 years, 2 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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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 #ifndef CHROME_TEST_TEST_BROWSER_WINDOW_H_ 5 #ifndef CHROME_TEST_TEST_BROWSER_WINDOW_H_
6 #define CHROME_TEST_TEST_BROWSER_WINDOW_H_ 6 #define CHROME_TEST_TEST_BROWSER_WINDOW_H_
7 7
8 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
9 #include "chrome/browser/browser_window.h" 9 #include "chrome/browser/browser_window.h"
10 #include "chrome/browser/views/tabs/tab_strip.h"
11 #include "chrome/test/test_location_bar.h" 10 #include "chrome/test/test_location_bar.h"
12 11
13 // An implementation of BrowserWindow used for testing. TestBrowserWindow only 12 // An implementation of BrowserWindow used for testing. TestBrowserWindow only
14 // contains a valid TabStrip, all other getters return NULL. 13 // contains a valid LocationBar, all other getters return NULL.
15 // See BrowserWithTestWindowTest for an example of using this class. 14 // See BrowserWithTestWindowTest for an example of using this class.
16 class TestBrowserWindow : public BrowserWindow { 15 class TestBrowserWindow : public BrowserWindow {
17 public: 16 public:
18 explicit TestBrowserWindow(Browser* browser) 17 explicit TestBrowserWindow(Browser* browser) {}
19 : tab_strip_(browser->tabstrip_model()) {
20 tab_strip_.InitTabStripButtons();
21 }
22 virtual ~TestBrowserWindow() {} 18 virtual ~TestBrowserWindow() {}
23 19
24 virtual void Init() {} 20 virtual void Init() {}
25 virtual void Show() {} 21 virtual void Show() {}
26 virtual void SetBounds(const gfx::Rect& bounds) {} 22 virtual void SetBounds(const gfx::Rect& bounds) {}
27 virtual void Close() {} 23 virtual void Close() {}
28 virtual void Activate() {} 24 virtual void Activate() {}
29 virtual bool IsActive() const { return false; } 25 virtual bool IsActive() const { return false; }
30 virtual void FlashFrame() {} 26 virtual void FlashFrame() {}
31 virtual gfx::NativeWindow GetNativeHandle() { return NULL; } 27 virtual gfx::NativeWindow GetNativeHandle() { return NULL; }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 virtual void TabContentsFocused(TabContents* tab_contents) { } 80 virtual void TabContentsFocused(TabContents* tab_contents) { }
85 virtual void ShowPageInfo(Profile* profile, 81 virtual void ShowPageInfo(Profile* profile,
86 const GURL& url, 82 const GURL& url,
87 const NavigationEntry::SSLStatus& ssl, 83 const NavigationEntry::SSLStatus& ssl,
88 bool show_history) { } 84 bool show_history) { }
89 85
90 protected: 86 protected:
91 virtual void DestroyBrowser() {} 87 virtual void DestroyBrowser() {}
92 88
93 private: 89 private:
94 TabStrip tab_strip_;
95
96 TestLocationBar location_bar_; 90 TestLocationBar location_bar_;
97 91
98 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindow); 92 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindow);
99 }; 93 };
100 94
101 #endif // CHROME_TEST_TEST_BROWSER_WINDOW_H_ 95 #endif // CHROME_TEST_TEST_BROWSER_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698