OLD | NEW |
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 "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
8 #include "chrome/browser/ui/browser_commands.h" | 8 #include "chrome/browser/ui/browser_commands.h" |
9 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" | 9 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
10 #include "chrome/browser/ui/views/frame/browser_view_layout.h" | 10 #include "chrome/browser/ui/views/frame/browser_view_layout.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 BookmarkBarView::DisableAnimationsForTesting(false); | 161 BookmarkBarView::DisableAnimationsForTesting(false); |
162 } | 162 } |
163 | 163 |
164 class BrowserViewHostedAppTest : public TestWithBrowserView { | 164 class BrowserViewHostedAppTest : public TestWithBrowserView { |
165 public: | 165 public: |
166 BrowserViewHostedAppTest() | 166 BrowserViewHostedAppTest() |
167 : TestWithBrowserView(Browser::TYPE_POPUP, | 167 : TestWithBrowserView(Browser::TYPE_POPUP, |
168 chrome::HOST_DESKTOP_TYPE_NATIVE, | 168 chrome::HOST_DESKTOP_TYPE_NATIVE, |
169 true) { | 169 true) { |
170 } | 170 } |
171 virtual ~BrowserViewHostedAppTest() { | 171 ~BrowserViewHostedAppTest() override {} |
172 } | |
173 | 172 |
174 private: | 173 private: |
175 DISALLOW_COPY_AND_ASSIGN(BrowserViewHostedAppTest); | 174 DISALLOW_COPY_AND_ASSIGN(BrowserViewHostedAppTest); |
176 }; | 175 }; |
177 | 176 |
178 // Test basic layout for hosted apps. | 177 // Test basic layout for hosted apps. |
179 TEST_F(BrowserViewHostedAppTest, Layout) { | 178 TEST_F(BrowserViewHostedAppTest, Layout) { |
180 // Add a tab because the browser starts out without any tabs at all. | 179 // Add a tab because the browser starts out without any tabs at all. |
181 AddTab(browser(), GURL("about:blank")); | 180 AddTab(browser(), GURL("about:blank")); |
182 | 181 |
(...skipping 18 matching lines...) Expand all Loading... |
201 header_offset.y(); | 200 header_offset.y(); |
202 | 201 |
203 // The web contents should be flush with the bottom of the header. | 202 // The web contents should be flush with the bottom of the header. |
204 EXPECT_EQ(bottom_of_header, contents_container->y()); | 203 EXPECT_EQ(bottom_of_header, contents_container->y()); |
205 | 204 |
206 // The find bar should overlap the 1px header/web-contents separator at the | 205 // The find bar should overlap the 1px header/web-contents separator at the |
207 // bottom of the header. | 206 // bottom of the header. |
208 EXPECT_EQ(browser_view()->frame()->GetTopInset() - 1, | 207 EXPECT_EQ(browser_view()->frame()->GetTopInset() - 1, |
209 browser_view()->GetFindBarBoundingBox().y()); | 208 browser_view()->GetFindBarBoundingBox().y()); |
210 } | 209 } |
OLD | NEW |