| 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" |
| 11 #include "chrome/browser/ui/views/frame/test_with_browser_view.h" | 11 #include "chrome/browser/ui/views/frame/test_with_browser_view.h" |
| 12 #include "chrome/browser/ui/views/frame/top_container_view.h" | 12 #include "chrome/browser/ui/views/frame/top_container_view.h" |
| 13 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" | 13 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" |
| 14 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 14 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 15 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" | 15 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
| 16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 17 #include "grit/generated_resources.h" | |
| 18 #include "grit/theme_resources.h" | |
| 19 #include "ui/base/resource/resource_bundle.h" | |
| 20 #include "ui/views/controls/single_split_view.h" | 17 #include "ui/views/controls/single_split_view.h" |
| 21 #include "ui/views/controls/webview/webview.h" | 18 #include "ui/views/controls/webview/webview.h" |
| 22 | 19 |
| 23 namespace { | 20 namespace { |
| 24 | 21 |
| 25 // Tab strip bounds depend on the window frame sizes. | 22 // Tab strip bounds depend on the window frame sizes. |
| 26 gfx::Point ExpectedTabStripOrigin(BrowserView* browser_view) { | 23 gfx::Point ExpectedTabStripOrigin(BrowserView* browser_view) { |
| 27 gfx::Rect tabstrip_bounds( | 24 gfx::Rect tabstrip_bounds( |
| 28 browser_view->frame()->GetBoundsForTabStrip(browser_view->tabstrip())); | 25 browser_view->frame()->GetBoundsForTabStrip(browser_view->tabstrip())); |
| 29 gfx::Point tabstrip_origin(tabstrip_bounds.origin()); | 26 gfx::Point tabstrip_origin(tabstrip_bounds.origin()); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 header_offset.y(); | 201 header_offset.y(); |
| 205 | 202 |
| 206 // The web contents should be flush with the bottom of the header. | 203 // The web contents should be flush with the bottom of the header. |
| 207 EXPECT_EQ(bottom_of_header, contents_container->y()); | 204 EXPECT_EQ(bottom_of_header, contents_container->y()); |
| 208 | 205 |
| 209 // The find bar should overlap the 1px header/web-contents separator at the | 206 // The find bar should overlap the 1px header/web-contents separator at the |
| 210 // bottom of the header. | 207 // bottom of the header. |
| 211 EXPECT_EQ(browser_view()->frame()->GetTopInset() - 1, | 208 EXPECT_EQ(browser_view()->frame()->GetTopInset() - 1, |
| 212 browser_view()->GetFindBarBoundingBox().y()); | 209 browser_view()->GetFindBarBoundingBox().y()); |
| 213 } | 210 } |
| OLD | NEW |