OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test/base/in_process_browser_test.h" | 5 #include "chrome/test/base/in_process_browser_test.h" |
6 | 6 |
7 #include "base/mac/scoped_nsautorelease_pool.h" | 7 #include "base/mac/scoped_nsautorelease_pool.h" |
8 #include "chrome/browser/devtools/devtools_window.h" | 8 #include "chrome/browser/devtools/devtools_window.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
11 #include "chrome/browser/ui/browser_commands.h" | 11 #include "chrome/browser/ui/browser_commands.h" |
12 #include "chrome/browser/ui/browser_finder.h" | 12 #include "chrome/browser/ui/browser_finder.h" |
| 13 #include "chrome/browser/ui/host_desktop.h" |
13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
14 #include "content/public/test/test_navigation_observer.h" | 15 #include "content/public/test/test_navigation_observer.h" |
15 | 16 |
16 void InProcessBrowserTest::OpenDevToolsWindow( | 17 void InProcessBrowserTest::OpenDevToolsWindow( |
17 content::WebContents* web_contents) { | 18 content::WebContents* web_contents) { |
18 // Opening a Devtools Window can cause AppKit to throw objects into the | 19 // Opening a Devtools Window can cause AppKit to throw objects into the |
19 // autorelease pool. Flush the pool when this function returns. | 20 // autorelease pool. Flush the pool when this function returns. |
20 base::mac::ScopedNSAutoreleasePool pool; | 21 base::mac::ScopedNSAutoreleasePool pool; |
21 | 22 |
22 ASSERT_FALSE(content::DevToolsAgentHost::HasFor(web_contents)); | 23 ASSERT_FALSE(content::DevToolsAgentHost::HasFor(web_contents)); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // autorelease pool. Flush the pool when this function returns. | 86 // autorelease pool. Flush the pool when this function returns. |
86 base::mac::ScopedNSAutoreleasePool pool; | 87 base::mac::ScopedNSAutoreleasePool pool; |
87 | 88 |
88 Browser* browser = new Browser( | 89 Browser* browser = new Browser( |
89 Browser::CreateParams::CreateForApp( | 90 Browser::CreateParams::CreateForApp( |
90 app_name, false /* trusted_source */, gfx::Rect(), profile, | 91 app_name, false /* trusted_source */, gfx::Rect(), profile, |
91 chrome::GetActiveDesktop())); | 92 chrome::GetActiveDesktop())); |
92 AddBlankTabAndShow(browser); | 93 AddBlankTabAndShow(browser); |
93 return browser; | 94 return browser; |
94 } | 95 } |
OLD | NEW |