| 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 #import "chrome/browser/ui/cocoa/dev_tools_controller.h" | 5 #import "chrome/browser/ui/cocoa/dev_tools_controller.h" |
| 6 | 6 |
| 7 #include "chrome/browser/devtools/devtools_window.h" | 7 #include "chrome/browser/devtools/devtools_window.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_list.h" | 9 #include "chrome/browser/ui/browser_list.h" |
| 10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 DISALLOW_COPY_AND_ASSIGN(DevToolsControllerTest); | 28 DISALLOW_COPY_AND_ASSIGN(DevToolsControllerTest); |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 // Verify that AllowOverlappingViews is set while the find bar is visible. | 31 // Verify that AllowOverlappingViews is set while the find bar is visible. |
| 32 IN_PROC_BROWSER_TEST_F(DevToolsControllerTest, AllowOverlappingViews) { | 32 IN_PROC_BROWSER_TEST_F(DevToolsControllerTest, AllowOverlappingViews) { |
| 33 content::WebContents* web_contents = | 33 content::WebContents* web_contents = |
| 34 browser()->tab_strip_model()->GetActiveWebContents(); | 34 browser()->tab_strip_model()->GetActiveWebContents(); |
| 35 DevToolsWindow* dev_tools = | 35 content::WebContents* dev_tools = |
| 36 DevToolsWindow::GetDockedInstanceForInspectedTab(web_contents); | 36 DevToolsWindow::GetInTabWebContents(web_contents, NULL); |
| 37 | 37 |
| 38 // Without the find bar. | 38 // Without the find bar. |
| 39 EXPECT_TRUE(dev_tools->web_contents()->GetAllowOverlappingViews()); | 39 EXPECT_TRUE(dev_tools->GetAllowOverlappingViews()); |
| 40 | 40 |
| 41 // With the find bar. | 41 // With the find bar. |
| 42 browser()->GetFindBarController()->find_bar()->Show(false); | 42 browser()->GetFindBarController()->find_bar()->Show(false); |
| 43 EXPECT_TRUE(dev_tools->web_contents()->GetAllowOverlappingViews()); | 43 EXPECT_TRUE(dev_tools->GetAllowOverlappingViews()); |
| 44 | 44 |
| 45 // Without the find bar. | 45 // Without the find bar. |
| 46 browser()->GetFindBarController()->find_bar()->Hide(false); | 46 browser()->GetFindBarController()->find_bar()->Hide(false); |
| 47 EXPECT_TRUE(dev_tools->web_contents()->GetAllowOverlappingViews()); | 47 EXPECT_TRUE(dev_tools->GetAllowOverlappingViews()); |
| 48 } | 48 } |
| OLD | NEW |