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

Side by Side Diff: chrome/browser/ui/cocoa/tabpose_window_unittest.mm

Issue 10534093: TabContentsWrapper -> TabContents, part 37. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | 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 #import "chrome/browser/ui/cocoa/tabpose_window.h" 5 #import "chrome/browser/ui/cocoa/tabpose_window.h"
6 6
7 #import "chrome/browser/ui/browser_window.h" 7 #import "chrome/browser/ui/browser_window.h"
8 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 8 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "content/public/browser/site_instance.h" 11 #include "content/public/browser/site_instance.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using content::SiteInstance; 14 using content::SiteInstance;
15 15
16 class TabposeWindowTest : public CocoaProfileTest { 16 class TabposeWindowTest : public CocoaProfileTest {
17 public: 17 public:
18 virtual void SetUp() { 18 virtual void SetUp() {
19 CocoaProfileTest::SetUp(); 19 CocoaProfileTest::SetUp();
20 ASSERT_TRUE(profile()); 20 ASSERT_TRUE(profile());
21 21
22 site_instance_ = SiteInstance::Create(profile()); 22 site_instance_ = SiteInstance::Create(profile());
23 } 23 }
24 24
25 void AppendTabToStrip() { 25 void AppendTabToStrip() {
26 TabContentsWrapper* tab_contents = Browser::TabContentsFactory( 26 TabContents* tab_contents = Browser::TabContentsFactory(
27 profile(), site_instance_, MSG_ROUTING_NONE, 27 profile(), site_instance_, MSG_ROUTING_NONE,
28 NULL, NULL); 28 NULL, NULL);
29 browser()->tab_strip_model()->AppendTabContents( 29 browser()->tab_strip_model()->AppendTabContents(
30 tab_contents, /*foreground=*/true); 30 tab_contents, /*foreground=*/true);
31 } 31 }
32 32
33 scoped_refptr<SiteInstance> site_instance_; 33 scoped_refptr<SiteInstance> site_instance_;
34 }; 34 };
35 35
36 // Check that this doesn't leak. 36 // Check that this doesn't leak.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 DCHECK_EQ([window selectedIndex], 0); 107 DCHECK_EQ([window selectedIndex], 0);
108 108
109 [window selectTileAtIndexWithoutAnimation:1]; 109 [window selectTileAtIndexWithoutAnimation:1];
110 model->CloseTabContentsAt(0, TabStripModel::CLOSE_NONE); 110 model->CloseTabContentsAt(0, TabStripModel::CLOSE_NONE);
111 DCHECK_EQ([window thumbnailLayerCount], 1u); 111 DCHECK_EQ([window thumbnailLayerCount], 1u);
112 DCHECK_EQ([window selectedIndex], 0); 112 DCHECK_EQ([window selectedIndex], 0);
113 113
114 // Should release the window. 114 // Should release the window.
115 [window mouseDown:nil]; 115 [window mouseDown:nil];
116 } 116 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabpose_window.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698