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

Unified Diff: chrome/browser/ui/views/frame/browser_view_unittest.cc

Issue 63173016: DevTools: place DevTools WebContents underneath inspected WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view_unittest.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_unittest.cc b/chrome/browser/ui/views/frame/browser_view_unittest.cc
index fb3bc913907d9fbb2bc6b1c6615c1b3ecc3c7972..8be9c9fe441148aa5e8794bd97547ebc03b2f909 100644
--- a/chrome/browser/ui/views/frame/browser_view_unittest.cc
+++ b/chrome/browser/ui/views/frame/browser_view_unittest.cc
@@ -8,6 +8,8 @@
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
#include "chrome/browser/ui/views/frame/browser_view_layout.h"
+#include "chrome/browser/ui/views/frame/contents_container.h"
+#include "chrome/browser/ui/views/frame/devtools_container.h"
#include "chrome/browser/ui/views/frame/test_with_browser_view.h"
#include "chrome/browser/ui/views/frame/top_container_view.h"
#include "chrome/browser/ui/views/infobars/infobar_container_view.h"
@@ -67,8 +69,10 @@ TEST_F(BrowserViewTest, BrowserViewLayout) {
TopContainerView* top_container = browser_view()->top_container();
TabStrip* tabstrip = browser_view()->tabstrip();
ToolbarView* toolbar = browser_view()->toolbar();
- views::SingleSplitView* contents_split =
- browser_view()->GetContentsSplitForTest();
+ ContentsContainer* contents_container =
+ browser_view()->GetContentsContainerForTest();
+ DevToolsContainer* devtools_container =
+ browser_view()->GetDevToolsContainerForTest();
views::WebView* contents_web_view =
browser_view()->GetContentsWebViewForTest();
@@ -101,8 +105,10 @@ TEST_F(BrowserViewTest, BrowserViewLayout) {
tabstrip->bounds().bottom() -
BrowserViewLayout::kToolbarTabStripVerticalOverlap,
toolbar->y());
- EXPECT_EQ(0, contents_split->x());
- EXPECT_EQ(toolbar->bounds().bottom(), contents_split->y());
+ EXPECT_EQ(0, contents_container->x());
+ EXPECT_EQ(toolbar->bounds().bottom(), contents_container->y());
+ EXPECT_EQ(0, devtools_container->x());
+ EXPECT_EQ(0, devtools_container->y());
EXPECT_EQ(0, contents_web_view->x());
EXPECT_EQ(0, contents_web_view->y());
@@ -139,11 +145,12 @@ TEST_F(BrowserViewTest, BrowserViewLayout) {
BrowserViewLayout::kToolbarTabStripVerticalOverlap -
views::NonClientFrameView::kClientEdgeThickness,
bookmark_bar->y());
- EXPECT_EQ(toolbar->bounds().bottom(), contents_split->y());
+ EXPECT_EQ(toolbar->bounds().bottom(), contents_container->y());
// Contents view has a "top margin" pushing it below the bookmark bar.
EXPECT_EQ(bookmark_bar->height() -
views::NonClientFrameView::kClientEdgeThickness,
- contents_web_view->y());
+ devtools_container->y());
+ EXPECT_EQ(0, contents_web_view->y());
// Bookmark bar is parented back to top container on normal page.
NavigateAndCommitActiveTabWithTitle(browser,

Powered by Google App Engine
This is Rietveld 408576698