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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller_unittest.mm

Issue 10692195: Consolidate Browser Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chrome/browser/ui/browser_tabstrip.h" 9 #include "chrome/browser/ui/browser_tabstrip.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 @end 57 @end
58 58
59 namespace { 59 namespace {
60 60
61 class TabStripControllerTest : public CocoaProfileTest { 61 class TabStripControllerTest : public CocoaProfileTest {
62 public: 62 public:
63 virtual void SetUp() { 63 virtual void SetUp() {
64 CocoaProfileTest::SetUp(); 64 CocoaProfileTest::SetUp();
65 ASSERT_TRUE(browser()); 65 ASSERT_TRUE(browser());
66 66
67 BrowserWindow* browser_window = CreateBrowserWindow(); 67 NSWindow* window = browser()->window()->GetNativeWindow();
68 NSWindow* window = browser_window->GetNativeWindow();
69 NSView* parent = [window contentView]; 68 NSView* parent = [window contentView];
70 NSRect content_frame = [parent frame]; 69 NSRect content_frame = [parent frame];
71 70
72 // Create the "switch view" (view that gets changed out when a tab 71 // Create the "switch view" (view that gets changed out when a tab
73 // switches). 72 // switches).
74 NSRect switch_frame = NSMakeRect(0, 0, content_frame.size.width, 500); 73 NSRect switch_frame = NSMakeRect(0, 0, content_frame.size.width, 500);
75 scoped_nsobject<NSView> switch_view( 74 scoped_nsobject<NSView> switch_view(
76 [[NSView alloc] initWithFrame:switch_frame]); 75 [[NSView alloc] initWithFrame:switch_frame]);
77 [parent addSubview:switch_view.get()]; 76 [parent addSubview:switch_view.get()];
78 77
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 221
223 [controller_.get() mouseMoved:event]; 222 [controller_.get() mouseMoved:event];
224 EXPECT_STREQ("Tab2", 223 EXPECT_STREQ("Tab2",
225 [[controller_ view:nil 224 [[controller_ view:nil
226 stringForToolTip:nil 225 stringForToolTip:nil
227 point:NSMakePoint(0,0) 226 point:NSMakePoint(0,0)
228 userData:nil] cStringUsingEncoding:NSASCIIStringEncoding]); 227 userData:nil] cStringUsingEncoding:NSASCIIStringEncoding]);
229 } 228 }
230 229
231 } // namespace 230 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabpose_window_unittest.mm ('k') | chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698