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

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

Issue 2819070: Mac: Add tabpose window (Closed)
Patch Set: mac compile?! Created 10 years, 4 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
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "chrome/browser/cocoa/tabpose_window.h"
6
7 #include "base/scoped_nsobject.h"
8 #import "chrome/browser/cocoa/browser_test_helper.h"
9 #import "chrome/browser/cocoa/cocoa_test_helper.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 class TabposeWindowTest : public CocoaTest {
13 public:
14 BrowserTestHelper browser_helper_;
15 };
16
17 // Check that this doesn't leak.
18 TEST_F(TabposeWindowTest, TestShow) {
19 scoped_nsobject<NSWindow> parent([[NSWindow alloc]
20 initWithContentRect:NSMakeRect(100, 200, 300, 200)
21 styleMask:NSTitledWindowMask
22 backing:NSBackingStoreBuffered
23 defer:NO]);
24 [parent orderFront:nil];
25 EXPECT_TRUE([parent isVisible]);
26
27 base::ScopedNSAutoreleasePool pool;
28 TabposeWindow* window =
29 [TabposeWindow openTabposeFor:parent.get()
30 rect:NSMakeRect(10, 20, 50, 60)
31 slomo:NO];
32
33 // Should release the window.
34 [window mouseDown:nil];
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698