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

Side by Side Diff: chrome/browser/ui/cocoa/dev_tools_controller_browsertest.mm

Issue 468193005: Remove SetAllowOverlappingView from RWHVMac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_ca_flag
Patch Set: Created 6 years, 4 months 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 unified diff | Download patch
OLDNEW
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/devtools/devtools_window_testing.h" 8 #include "chrome/browser/devtools/devtools_window_testing.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 28 matching lines...) Expand all
39 content::WebContents* devtools_web_contents() { 39 content::WebContents* devtools_web_contents() {
40 return DevToolsWindow::GetInTabWebContents(web_contents(), NULL); 40 return DevToolsWindow::GetInTabWebContents(web_contents(), NULL);
41 } 41 }
42 42
43 DevToolsWindow* devtools_window_; 43 DevToolsWindow* devtools_window_;
44 44
45 private: 45 private:
46 DISALLOW_COPY_AND_ASSIGN(DevToolsControllerTest); 46 DISALLOW_COPY_AND_ASSIGN(DevToolsControllerTest);
47 }; 47 };
48 48
49 // Verify that AllowOverlappingViews is set while the find bar is visible.
50 IN_PROC_BROWSER_TEST_F(DevToolsControllerTest, AllowOverlappingViews) {
51 OpenDevToolsWindow();
52
53 // Without the find bar.
54 EXPECT_TRUE(devtools_web_contents()->GetAllowOverlappingViews());
55
56 // With the find bar.
57 browser()->GetFindBarController()->find_bar()->Show(false);
58 EXPECT_TRUE(devtools_web_contents()->GetAllowOverlappingViews());
59
60 // Without the find bar.
61 browser()->GetFindBarController()->find_bar()->Hide(false);
62 EXPECT_TRUE(devtools_web_contents()->GetAllowOverlappingViews());
63
64 CloseDevToolsWindow();
65 }
66
67 // Verify that AllowOtherViews is set when and only when DevTools is visible. 49 // Verify that AllowOtherViews is set when and only when DevTools is visible.
68 IN_PROC_BROWSER_TEST_F(DevToolsControllerTest, AllowOtherViews) { 50 IN_PROC_BROWSER_TEST_F(DevToolsControllerTest, AllowOtherViews) {
69 EXPECT_FALSE(web_contents()->GetAllowOtherViews()); 51 EXPECT_FALSE(web_contents()->GetAllowOtherViews());
70 52
71 OpenDevToolsWindow(); 53 OpenDevToolsWindow();
72 EXPECT_TRUE(devtools_web_contents()->GetAllowOtherViews()); 54 EXPECT_TRUE(devtools_web_contents()->GetAllowOtherViews());
73 EXPECT_TRUE(web_contents()->GetAllowOtherViews()); 55 EXPECT_TRUE(web_contents()->GetAllowOtherViews());
74 56
75 CloseDevToolsWindow(); 57 CloseDevToolsWindow();
76 EXPECT_FALSE(web_contents()->GetAllowOtherViews()); 58 EXPECT_FALSE(web_contents()->GetAllowOtherViews());
77 } 59 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/confirm_bubble_controller.mm ('k') | chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698