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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "chrome/test/base/testing_profile.h" | 50 #include "chrome/test/base/testing_profile.h" |
51 #include "components/infobars/core/infobar_delegate.h" | 51 #include "components/infobars/core/infobar_delegate.h" |
52 #include "components/infobars/core/simple_alert_infobar_delegate.h" | 52 #include "components/infobars/core/simple_alert_infobar_delegate.h" |
53 #include "content/public/browser/web_contents.h" | 53 #include "content/public/browser/web_contents.h" |
54 #include "content/public/test/browser_test_utils.h" | 54 #include "content/public/test/browser_test_utils.h" |
55 #include "content/public/test/test_utils.h" | 55 #include "content/public/test/test_utils.h" |
56 #import "testing/gtest_mac.h" | 56 #import "testing/gtest_mac.h" |
57 #import "third_party/ocmock/OCMock/OCMock.h" | 57 #import "third_party/ocmock/OCMock/OCMock.h" |
58 #import "ui/base/cocoa/nsview_additions.h" | 58 #import "ui/base/cocoa/nsview_additions.h" |
59 #include "ui/gfx/animation/slide_animation.h" | 59 #include "ui/gfx/animation/slide_animation.h" |
60 #include "ui/gfx/vector_icons_public.h" | |
61 | 60 |
62 namespace { | 61 namespace { |
63 | 62 |
64 // Creates a mock of an NSWindow that has the given |frame|. | 63 // Creates a mock of an NSWindow that has the given |frame|. |
65 id MockWindowWithFrame(NSRect frame) { | 64 id MockWindowWithFrame(NSRect frame) { |
66 id window = [OCMockObject mockForClass:[NSWindow class]]; | 65 id window = [OCMockObject mockForClass:[NSWindow class]]; |
67 NSValue* window_frame = | 66 NSValue* window_frame = |
68 [NSValue valueWithBytes:&frame objCType:@encode(NSRect)]; | 67 [NSValue valueWithBytes:&frame objCType:@encode(NSRect)]; |
69 [[[window stub] andReturnValue:window_frame] frame]; | 68 [[[window stub] andReturnValue:window_frame] frame]; |
70 return window; | 69 return window; |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 EXPECT_FALSE([fullscreenToolbarController isRevealingToolbarForTabstrip]); | 788 EXPECT_FALSE([fullscreenToolbarController isRevealingToolbarForTabstrip]); |
790 [fullscreenToolbarController resetToolbarFlag]; | 789 [fullscreenToolbarController resetToolbarFlag]; |
791 | 790 |
792 // Switch to a non-NTP tab. | 791 // Switch to a non-NTP tab. |
793 TabStripModel* model = browser()->tab_strip_model(); | 792 TabStripModel* model = browser()->tab_strip_model(); |
794 model->ActivateTabAt(1, true); | 793 model->ActivateTabAt(1, true); |
795 ASSERT_FALSE([[controller() toolbarController] isLocationBarFocused]); | 794 ASSERT_FALSE([[controller() toolbarController] isLocationBarFocused]); |
796 EXPECT_TRUE([fullscreenToolbarController isRevealingToolbarForTabstrip]); | 795 EXPECT_TRUE([fullscreenToolbarController isRevealingToolbarForTabstrip]); |
797 [fullscreenToolbarController resetToolbarFlag]; | 796 [fullscreenToolbarController resetToolbarFlag]; |
798 } | 797 } |
OLD | NEW |