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/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #import "base/mac/mac_util.h" | 8 #import "base/mac/mac_util.h" |
9 | 9 |
10 #include "base/mac/sdk_forward_declarations.h" | 10 #include "base/mac/sdk_forward_declarations.h" |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 for (size_t i = 0; i < visible_views.size() - 1; ++i) { | 306 for (size_t i = 0; i < visible_views.size() - 1; ++i) { |
307 NSView* bottom_view = visible_views[i]; | 307 NSView* bottom_view = visible_views[i]; |
308 NSView* top_view = visible_views[i + 1]; | 308 NSView* top_view = visible_views[i + 1]; |
309 | 309 |
310 EXPECT_NSEQ([bottom_view superview], [top_view superview]); | 310 EXPECT_NSEQ([bottom_view superview], [top_view superview]); |
311 EXPECT_TRUE([bottom_view cr_isBelowView:top_view]); | 311 EXPECT_TRUE([bottom_view cr_isBelowView:top_view]); |
312 } | 312 } |
313 | 313 |
314 // Views not in |view_list| must either be nil or not parented. | 314 // Views not in |view_list| must either be nil or not parented. |
315 for (size_t i = 0; i < VIEW_ID_COUNT; ++i) { | 315 for (size_t i = 0; i < VIEW_ID_COUNT; ++i) { |
316 if (!ContainsValue(view_list, i)) { | 316 if (!base::ContainsValue(view_list, i)) { |
317 NSView* view = GetViewWithID(static_cast<ViewID>(i)); | 317 NSView* view = GetViewWithID(static_cast<ViewID>(i)); |
318 EXPECT_TRUE(!view || ![view superview]); | 318 EXPECT_TRUE(!view || ![view superview]); |
319 } | 319 } |
320 } | 320 } |
321 } | 321 } |
322 | 322 |
323 CGFloat GetViewHeight(ViewID viewID) const { | 323 CGFloat GetViewHeight(ViewID viewID) const { |
324 CGFloat height = NSHeight([GetViewWithID(viewID) frame]); | 324 CGFloat height = NSHeight([GetViewWithID(viewID) frame]); |
325 if (viewID == VIEW_ID_INFO_BAR) { | 325 if (viewID == VIEW_ID_INFO_BAR) { |
326 height -= [[controller() infoBarContainerController] | 326 height -= [[controller() infoBarContainerController] |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 EXPECT_FALSE([fullscreenToolbarController isRevealingToolbarForTabstrip]); | 815 EXPECT_FALSE([fullscreenToolbarController isRevealingToolbarForTabstrip]); |
816 [fullscreenToolbarController resetToolbarFlag]; | 816 [fullscreenToolbarController resetToolbarFlag]; |
817 | 817 |
818 // Switch to a non-NTP tab. | 818 // Switch to a non-NTP tab. |
819 TabStripModel* model = browser()->tab_strip_model(); | 819 TabStripModel* model = browser()->tab_strip_model(); |
820 model->ActivateTabAt(1, true); | 820 model->ActivateTabAt(1, true); |
821 ASSERT_FALSE([[controller() toolbarController] isLocationBarFocused]); | 821 ASSERT_FALSE([[controller() toolbarController] isLocationBarFocused]); |
822 EXPECT_TRUE([fullscreenToolbarController isRevealingToolbarForTabstrip]); | 822 EXPECT_TRUE([fullscreenToolbarController isRevealingToolbarForTabstrip]); |
823 [fullscreenToolbarController resetToolbarFlag]; | 823 [fullscreenToolbarController resetToolbarFlag]; |
824 } | 824 } |
OLD | NEW |