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 "chrome/browser/ui/cocoa/tabpose_window.h" | 5 #import "chrome/browser/ui/cocoa/tabpose_window.h" |
6 | 6 |
7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
8 #include "chrome/browser/ui/browser_tabstrip.h" | 8 #include "chrome/browser/ui/browser_tabstrip.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "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 [TabposeWindow openTabposeFor:parent | 56 [TabposeWindow openTabposeFor:parent |
57 rect:NSMakeRect(10, 20, 250, 160) | 57 rect:NSMakeRect(10, 20, 250, 160) |
58 slomo:NO | 58 slomo:NO |
59 tabStripModel:browser()->tab_strip_model()]; | 59 tabStripModel:browser()->tab_strip_model()]; |
60 | 60 |
61 // Should release the window. | 61 // Should release the window. |
62 [window mouseDown:nil]; | 62 [window mouseDown:nil]; |
63 } | 63 } |
64 | 64 |
65 TEST_F(TabposeWindowTest, TestModelObserver) { | 65 TEST_F(TabposeWindowTest, TestModelObserver) { |
| 66 // Skip this test on 10.7 |
| 67 // http://code.google.com/p/chromium/issues/detail?id=127845 |
| 68 if (base::mac::IsOSLionOrLater()) { |
| 69 return; |
| 70 } |
| 71 |
66 NSWindow* parent = browser()->window()->GetNativeWindow(); | 72 NSWindow* parent = browser()->window()->GetNativeWindow(); |
67 [parent orderFront:nil]; | 73 [parent orderFront:nil]; |
68 | 74 |
69 // Add a few tabs to the tab strip model. | 75 // Add a few tabs to the tab strip model. |
70 for (int i = 0; i < 3; ++i) | 76 for (int i = 0; i < 3; ++i) |
71 AppendTabToStrip(); | 77 AppendTabToStrip(); |
72 | 78 |
73 base::mac::ScopedNSAutoreleasePool pool; | 79 base::mac::ScopedNSAutoreleasePool pool; |
74 TabposeWindow* window = | 80 TabposeWindow* window = |
75 [TabposeWindow openTabposeFor:parent | 81 [TabposeWindow openTabposeFor:parent |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 DCHECK_EQ([window selectedIndex], 0); | 118 DCHECK_EQ([window selectedIndex], 0); |
113 | 119 |
114 [window selectTileAtIndexWithoutAnimation:1]; | 120 [window selectTileAtIndexWithoutAnimation:1]; |
115 model->CloseTabContentsAt(0, TabStripModel::CLOSE_NONE); | 121 model->CloseTabContentsAt(0, TabStripModel::CLOSE_NONE); |
116 DCHECK_EQ([window thumbnailLayerCount], 1u); | 122 DCHECK_EQ([window thumbnailLayerCount], 1u); |
117 DCHECK_EQ([window selectedIndex], 0); | 123 DCHECK_EQ([window selectedIndex], 0); |
118 | 124 |
119 // Should release the window. | 125 // Should release the window. |
120 [window mouseDown:nil]; | 126 [window mouseDown:nil]; |
121 } | 127 } |
OLD | NEW |