OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/tabs/tab_strip_model.h" | 5 #include "chrome/browser/tabs/tab_strip_model.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 DISALLOW_COPY_AND_ASSIGN(TabStripDummyDelegate); | 149 DISALLOW_COPY_AND_ASSIGN(TabStripDummyDelegate); |
150 }; | 150 }; |
151 | 151 |
152 class TabStripModelTest : public ChromeRenderViewHostTestHarness { | 152 class TabStripModelTest : public ChromeRenderViewHostTestHarness { |
153 public: | 153 public: |
154 TabStripModelTest() : browser_thread_(BrowserThread::UI, &message_loop_) { | 154 TabStripModelTest() : browser_thread_(BrowserThread::UI, &message_loop_) { |
155 } | 155 } |
156 | 156 |
157 TabContentsWrapper* CreateTabContents() { | 157 TabContentsWrapper* CreateTabContents() { |
158 return Browser::TabContentsFactory(profile(), NULL, 0, NULL, NULL); | 158 return Browser::TabContentsFactory( |
| 159 profile(), NULL, MSG_ROUTING_NONE, NULL, NULL); |
159 } | 160 } |
160 | 161 |
161 TabContentsWrapper* CreateTabContentsWithSharedRPH( | 162 TabContentsWrapper* CreateTabContentsWithSharedRPH( |
162 WebContents* web_contents) { | 163 WebContents* web_contents) { |
163 TabContentsWrapper* retval = Browser::TabContentsFactory(profile(), | 164 TabContentsWrapper* retval = Browser::TabContentsFactory(profile(), |
164 web_contents->GetRenderViewHost()->site_instance(), MSG_ROUTING_NONE, | 165 web_contents->GetRenderViewHost()->site_instance(), MSG_ROUTING_NONE, |
165 NULL, NULL); | 166 NULL, NULL); |
166 EXPECT_EQ(retval->web_contents()->GetRenderProcessHost(), | 167 EXPECT_EQ(retval->web_contents()->GetRenderProcessHost(), |
167 web_contents->GetRenderProcessHost()); | 168 web_contents->GetRenderProcessHost()); |
168 return retval; | 169 return retval; |
(...skipping 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2380 ASSERT_EQ(1, observer.GetStateCount()); | 2381 ASSERT_EQ(1, observer.GetStateCount()); |
2381 MockTabStripModelObserver::State s( | 2382 MockTabStripModelObserver::State s( |
2382 contents2, 1, MockTabStripModelObserver::SELECT); | 2383 contents2, 1, MockTabStripModelObserver::SELECT); |
2383 s.src_contents = contents2; | 2384 s.src_contents = contents2; |
2384 s.src_index = 1; | 2385 s.src_index = 1; |
2385 s.user_gesture = false; | 2386 s.user_gesture = false; |
2386 EXPECT_TRUE(observer.StateEquals(0, s)); | 2387 EXPECT_TRUE(observer.StateEquals(0, s)); |
2387 strip.RemoveObserver(&observer); | 2388 strip.RemoveObserver(&observer); |
2388 strip.CloseAllTabs(); | 2389 strip.CloseAllTabs(); |
2389 } | 2390 } |
OLD | NEW |