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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller_browsertest.mm

Issue 12224052: Alternate NTP: Fix bug where shadow is not removed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/tab_contents/previewable_contents_controller.h" 5 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h"
6 6
7 #include "chrome/browser/instant/instant_model.h" 7 #include "chrome/browser/instant/instant_model.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 EXPECT_TRUE([controller_ dropShadowView]); 122 EXPECT_TRUE([controller_ dropShadowView]);
123 EXPECT_TRUE([controller_ drawDropShadow]); 123 EXPECT_TRUE([controller_ drawDropShadow]);
124 EXPECT_NSEQ([controller_ view], [[controller_ dropShadowView] superview]); 124 EXPECT_NSEQ([controller_ view], [[controller_ dropShadowView] superview]);
125 125
126 NSRect dropShadowFrame = [[controller_ dropShadowView] frame]; 126 NSRect dropShadowFrame = [[controller_ dropShadowView] frame];
127 NSRect controllerBounds = [[controller_ view] bounds]; 127 NSRect controllerBounds = [[controller_ view] bounds];
128 EXPECT_EQ(NSWidth(controllerBounds), NSWidth(dropShadowFrame)); 128 EXPECT_EQ(NSWidth(controllerBounds), NSWidth(dropShadowFrame));
129 EXPECT_EQ([PreviewDropShadowView preferredHeight], 129 EXPECT_EQ([PreviewDropShadowView preferredHeight],
130 NSHeight(dropShadowFrame)); 130 NSHeight(dropShadowFrame));
131 } 131 }
132
133 // Verify that the shadow is hidden when hiding the preview.
134 IN_PROC_BROWSER_TEST_F(PreviewableContentsControllerTest, HideShadow) {
135 chrome::search::Mode mode;
136 mode.mode = chrome::search::Mode::MODE_SEARCH_SUGGESTIONS;
137 instant_model_.SetPreviewState(mode, 10, INSTANT_SIZE_PERCENT);
138 EXPECT_TRUE([controller_ dropShadowView]);
139
140 [controller_ onActivateTabWithContents:web_contents_.get()];
141 EXPECT_FALSE([controller_ dropShadowView]);
142 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698