| OLD | NEW |
| 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 #import "chrome/browser/ui/browser_window.h" | 9 #import "chrome/browser/ui/browser_window.h" |
| 10 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 10 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 namespace { | 57 namespace { |
| 58 | 58 |
| 59 class TabStripControllerTest : public CocoaProfileTest { | 59 class TabStripControllerTest : public CocoaProfileTest { |
| 60 public: | 60 public: |
| 61 virtual void SetUp() { | 61 virtual void SetUp() { |
| 62 CocoaProfileTest::SetUp(); | 62 CocoaProfileTest::SetUp(); |
| 63 ASSERT_TRUE(browser()); | 63 ASSERT_TRUE(browser()); |
| 64 | 64 |
| 65 BrowserWindow* browser_window = CreateBrowserWindow(); | 65 BrowserWindow* browser_window = CreateBrowserWindow(); |
| 66 NSWindow* window = browser_window->GetNativeHandle(); | 66 NSWindow* window = browser_window->GetNativeWindow(); |
| 67 NSView* parent = [window contentView]; | 67 NSView* parent = [window contentView]; |
| 68 NSRect content_frame = [parent frame]; | 68 NSRect content_frame = [parent frame]; |
| 69 | 69 |
| 70 // Create the "switch view" (view that gets changed out when a tab | 70 // Create the "switch view" (view that gets changed out when a tab |
| 71 // switches). | 71 // switches). |
| 72 NSRect switch_frame = NSMakeRect(0, 0, content_frame.size.width, 500); | 72 NSRect switch_frame = NSMakeRect(0, 0, content_frame.size.width, 500); |
| 73 scoped_nsobject<NSView> switch_view( | 73 scoped_nsobject<NSView> switch_view( |
| 74 [[NSView alloc] initWithFrame:switch_frame]); | 74 [[NSView alloc] initWithFrame:switch_frame]); |
| 75 [parent addSubview:switch_view.get()]; | 75 [parent addSubview:switch_view.get()]; |
| 76 | 76 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 [controller_.get() mouseMoved:event]; | 224 [controller_.get() mouseMoved:event]; |
| 225 EXPECT_STREQ("Tab2", | 225 EXPECT_STREQ("Tab2", |
| 226 [[controller_ view:nil | 226 [[controller_ view:nil |
| 227 stringForToolTip:nil | 227 stringForToolTip:nil |
| 228 point:NSMakePoint(0,0) | 228 point:NSMakePoint(0,0) |
| 229 userData:nil] cStringUsingEncoding:NSASCIIStringEncoding]); | 229 userData:nil] cStringUsingEncoding:NSASCIIStringEncoding]); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace | 232 } // namespace |
| OLD | NEW |