| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 EXPECT_EQ(browser_view()->child_count() - 2, | 158 EXPECT_EQ(browser_view()->child_count() - 2, |
| 159 browser_view()->GetIndexOf(top_container)); | 159 browser_view()->GetIndexOf(top_container)); |
| 160 | 160 |
| 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 ui::HOST_DESKTOP_TYPE_NATIVE, |
| 169 true) { | 169 true) {} |
| 170 } | |
| 171 ~BrowserViewHostedAppTest() override {} | 170 ~BrowserViewHostedAppTest() override {} |
| 172 | 171 |
| 173 private: | 172 private: |
| 174 DISALLOW_COPY_AND_ASSIGN(BrowserViewHostedAppTest); | 173 DISALLOW_COPY_AND_ASSIGN(BrowserViewHostedAppTest); |
| 175 }; | 174 }; |
| 176 | 175 |
| 177 // Test basic layout for hosted apps. | 176 // Test basic layout for hosted apps. |
| 178 TEST_F(BrowserViewHostedAppTest, Layout) { | 177 TEST_F(BrowserViewHostedAppTest, Layout) { |
| 179 // Add a tab because the browser starts out without any tabs at all. | 178 // Add a tab because the browser starts out without any tabs at all. |
| 180 AddTab(browser(), GURL("about:blank")); | 179 AddTab(browser(), GURL("about:blank")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 200 header_offset.y(); | 199 header_offset.y(); |
| 201 | 200 |
| 202 // The web contents should be flush with the bottom of the header. | 201 // The web contents should be flush with the bottom of the header. |
| 203 EXPECT_EQ(bottom_of_header, contents_container->y()); | 202 EXPECT_EQ(bottom_of_header, contents_container->y()); |
| 204 | 203 |
| 205 // The find bar should overlap the 1px header/web-contents separator at the | 204 // The find bar should overlap the 1px header/web-contents separator at the |
| 206 // bottom of the header. | 205 // bottom of the header. |
| 207 EXPECT_EQ(browser_view()->frame()->GetTopInset() - 1, | 206 EXPECT_EQ(browser_view()->frame()->GetTopInset() - 1, |
| 208 browser_view()->GetFindBarBoundingBox().y()); | 207 browser_view()->GetFindBarBoundingBox().y()); |
| 209 } | 208 } |
| OLD | NEW |