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

Side by Side Diff: chrome/browser/tabs/tab_strip_model_unittest.cc

Issue 431008: Make SystemMonitor not a Singleton and move it out of base (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: fix ChromeFrame build Created 11 years 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) 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 #include "app/system_monitor.h"
5 #include "base/file_util.h" 6 #include "base/file_util.h"
6 #include "base/path_service.h" 7 #include "base/path_service.h"
7 #include "base/string_util.h" 8 #include "base/string_util.h"
8 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
9 #include "chrome/browser/dom_ui/new_tab_ui.h" 10 #include "chrome/browser/dom_ui/new_tab_ui.h"
10 #include "chrome/browser/profile.h" 11 #include "chrome/browser/profile.h"
11 #include "chrome/browser/profile_manager.h" 12 #include "chrome/browser/profile_manager.h"
12 #include "chrome/browser/renderer_host/test/test_render_view_host.h" 13 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
13 #include "chrome/browser/tab_contents/navigation_controller.h" 14 #include "chrome/browser/tab_contents/navigation_controller.h"
14 #include "chrome/browser/tab_contents/navigation_entry.h" 15 #include "chrome/browser/tab_contents/navigation_entry.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 private: 146 private:
146 PropertyAccessor<int>* GetIDAccessor() { 147 PropertyAccessor<int>* GetIDAccessor() {
147 static PropertyAccessor<int> accessor; 148 static PropertyAccessor<int> accessor;
148 return &accessor; 149 return &accessor;
149 } 150 }
150 151
151 std::wstring test_dir_; 152 std::wstring test_dir_;
152 std::wstring profile_path_; 153 std::wstring profile_path_;
153 std::map<TabContents*, int> foo_; 154 std::map<TabContents*, int> foo_;
155
156 // ProfileManager requires a SystemMonitor.
157 SystemMonitor system_monitor;
158
154 ProfileManager pm_; 159 ProfileManager pm_;
155 }; 160 };
156 161
157 class MockTabStripModelObserver : public TabStripModelObserver { 162 class MockTabStripModelObserver : public TabStripModelObserver {
158 public: 163 public:
159 MockTabStripModelObserver() : empty_(true) {} 164 MockTabStripModelObserver() : empty_(true) {}
160 ~MockTabStripModelObserver() { 165 ~MockTabStripModelObserver() {
161 STLDeleteContainerPointers(states_.begin(), states_.end()); 166 STLDeleteContainerPointers(states_.begin(), states_.end());
162 } 167 }
163 168
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 tabstrip.AppendTabContents(contents2, true); 1533 tabstrip.AppendTabContents(contents2, true);
1529 1534
1530 tabstrip.CloseTabContentsAt(1); 1535 tabstrip.CloseTabContentsAt(1);
1531 EXPECT_FALSE(contents1->process()->fast_shutdown_started()); 1536 EXPECT_FALSE(contents1->process()->fast_shutdown_started());
1532 EXPECT_EQ(1, tabstrip.count()); 1537 EXPECT_EQ(1, tabstrip.count());
1533 1538
1534 tabstrip.CloseAllTabs(); 1539 tabstrip.CloseAllTabs();
1535 EXPECT_TRUE(tabstrip.empty()); 1540 EXPECT_TRUE(tabstrip.empty());
1536 } 1541 }
1537 } 1542 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698