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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_unittest.cc

Issue 1972033002: Simplify some old avatar menu button code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reinstate ash browser test fix Created 4 years, 7 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/layout_constants.h" 10 #include "chrome/browser/ui/layout_constants.h"
(...skipping 29 matching lines...) Expand all
40 TEST_F(BrowserViewTest, BrowserView) { 40 TEST_F(BrowserViewTest, BrowserView) {
41 // The window is owned by the native widget, not the test class. 41 // The window is owned by the native widget, not the test class.
42 EXPECT_FALSE(window()); 42 EXPECT_FALSE(window());
43 43
44 EXPECT_TRUE(browser_view()->browser()); 44 EXPECT_TRUE(browser_view()->browser());
45 45
46 // Test initial state. 46 // Test initial state.
47 EXPECT_TRUE(browser_view()->IsTabStripVisible()); 47 EXPECT_TRUE(browser_view()->IsTabStripVisible());
48 EXPECT_FALSE(browser_view()->IsOffTheRecord()); 48 EXPECT_FALSE(browser_view()->IsOffTheRecord());
49 EXPECT_FALSE(browser_view()->IsGuestSession()); 49 EXPECT_FALSE(browser_view()->IsGuestSession());
50 EXPECT_FALSE(browser_view()->ShouldShowAvatar());
51 EXPECT_TRUE(browser_view()->IsBrowserTypeNormal()); 50 EXPECT_TRUE(browser_view()->IsBrowserTypeNormal());
52 EXPECT_FALSE(browser_view()->IsFullscreen()); 51 EXPECT_FALSE(browser_view()->IsFullscreen());
53 EXPECT_FALSE(browser_view()->IsBookmarkBarVisible()); 52 EXPECT_FALSE(browser_view()->IsBookmarkBarVisible());
54 EXPECT_FALSE(browser_view()->IsBookmarkBarAnimating()); 53 EXPECT_FALSE(browser_view()->IsBookmarkBarAnimating());
55 } 54 }
56 55
57 // Test layout of the top-of-window UI. 56 // Test layout of the top-of-window UI.
58 TEST_F(BrowserViewTest, BrowserViewLayout) { 57 TEST_F(BrowserViewTest, BrowserViewLayout) {
59 BookmarkBarView::DisableAnimationsForTesting(true); 58 BookmarkBarView::DisableAnimationsForTesting(true);
60 59
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 header_offset.y(); 198 header_offset.y();
200 199
201 // The web contents should be flush with the bottom of the header. 200 // The web contents should be flush with the bottom of the header.
202 EXPECT_EQ(bottom_of_header, contents_container->y()); 201 EXPECT_EQ(bottom_of_header, contents_container->y());
203 202
204 // The find bar should overlap the 1px header/web-contents separator at the 203 // The find bar should overlap the 1px header/web-contents separator at the
205 // bottom of the header. 204 // bottom of the header.
206 EXPECT_LT(browser_view()->GetFindBarBoundingBox().y(), 205 EXPECT_LT(browser_view()->GetFindBarBoundingBox().y(),
207 browser_view()->frame()->GetTopInset(false)); 206 browser_view()->frame()->GetTopInset(false));
208 } 207 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/glass_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698