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

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

Issue 1699973002: Remove HostDesktopType from BrowserWithTestWindowTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-22
Patch Set: cros Created 4 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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 EXPECT_EQ(top_container, bookmark_bar->parent()); 154 EXPECT_EQ(top_container, bookmark_bar->parent());
155 // Top container is still second from front. 155 // Top container is still second from front.
156 EXPECT_EQ(browser_view()->child_count() - 2, 156 EXPECT_EQ(browser_view()->child_count() - 2,
157 browser_view()->GetIndexOf(top_container)); 157 browser_view()->GetIndexOf(top_container));
158 158
159 BookmarkBarView::DisableAnimationsForTesting(false); 159 BookmarkBarView::DisableAnimationsForTesting(false);
160 } 160 }
161 161
162 class BrowserViewHostedAppTest : public TestWithBrowserView { 162 class BrowserViewHostedAppTest : public TestWithBrowserView {
163 public: 163 public:
164 BrowserViewHostedAppTest() 164 BrowserViewHostedAppTest() : TestWithBrowserView(Browser::TYPE_POPUP, true) {}
165 : TestWithBrowserView(Browser::TYPE_POPUP,
166 chrome::HOST_DESKTOP_TYPE_NATIVE,
167 true) {
168 }
169 ~BrowserViewHostedAppTest() override {} 165 ~BrowserViewHostedAppTest() override {}
170 166
171 private: 167 private:
172 DISALLOW_COPY_AND_ASSIGN(BrowserViewHostedAppTest); 168 DISALLOW_COPY_AND_ASSIGN(BrowserViewHostedAppTest);
173 }; 169 };
174 170
175 // Test basic layout for hosted apps. 171 // Test basic layout for hosted apps.
176 TEST_F(BrowserViewHostedAppTest, Layout) { 172 TEST_F(BrowserViewHostedAppTest, Layout) {
177 // Add a tab because the browser starts out without any tabs at all. 173 // Add a tab because the browser starts out without any tabs at all.
178 AddTab(browser(), GURL("about:blank")); 174 AddTab(browser(), GURL("about:blank"));
(...skipping 19 matching lines...) Expand all
198 header_offset.y(); 194 header_offset.y();
199 195
200 // The web contents should be flush with the bottom of the header. 196 // The web contents should be flush with the bottom of the header.
201 EXPECT_EQ(bottom_of_header, contents_container->y()); 197 EXPECT_EQ(bottom_of_header, contents_container->y());
202 198
203 // The find bar should overlap the 1px header/web-contents separator at the 199 // The find bar should overlap the 1px header/web-contents separator at the
204 // bottom of the header. 200 // bottom of the header.
205 EXPECT_LT(browser_view()->GetFindBarBoundingBox().y(), 201 EXPECT_LT(browser_view()->GetFindBarBoundingBox().y(),
206 browser_view()->frame()->GetTopInset(false)); 202 browser_view()->frame()->GetTopInset(false));
207 } 203 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698