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

Side by Side Diff: chrome/test/base/in_process_browser_test_mac.cc

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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 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"
(...skipping 12 matching lines...) Expand all
23 DevToolsWindow::OpenDevToolsWindow(web_contents); 23 DevToolsWindow::OpenDevToolsWindow(web_contents);
24 ASSERT_TRUE(content::DevToolsAgentHost::HasFor(web_contents)); 24 ASSERT_TRUE(content::DevToolsAgentHost::HasFor(web_contents));
25 } 25 }
26 26
27 Browser* InProcessBrowserTest::OpenURLOffTheRecord(Profile* profile, 27 Browser* InProcessBrowserTest::OpenURLOffTheRecord(Profile* profile,
28 const GURL& url) { 28 const GURL& url) {
29 // Opening an incognito window can cause AppKit to throw objects into the 29 // Opening an incognito window can cause AppKit to throw objects into the
30 // autorelease pool. Flush the pool when this function returns. 30 // autorelease pool. Flush the pool when this function returns.
31 base::mac::ScopedNSAutoreleasePool pool; 31 base::mac::ScopedNSAutoreleasePool pool;
32 32
33 chrome::HostDesktopType active_desktop = chrome::GetActiveDesktop(); 33 ui::HostDesktopType active_desktop = chrome::GetActiveDesktop();
34 chrome::OpenURLOffTheRecord(profile, url, active_desktop); 34 chrome::OpenURLOffTheRecord(profile, url, active_desktop);
35 Browser* browser = chrome::FindTabbedBrowser( 35 Browser* browser = chrome::FindTabbedBrowser(
36 profile->GetOffTheRecordProfile(), false, active_desktop); 36 profile->GetOffTheRecordProfile(), false, active_desktop);
37 content::TestNavigationObserver observer( 37 content::TestNavigationObserver observer(
38 browser->tab_strip_model()->GetActiveWebContents()); 38 browser->tab_strip_model()->GetActiveWebContents());
39 observer.Wait(); 39 observer.Wait();
40 return browser; 40 return browser;
41 } 41 }
42 42
43 // Creates a browser with a single tab (about:blank), waits for the tab to 43 // Creates a browser with a single tab (about:blank), waits for the tab to
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // autorelease pool. Flush the pool when this function returns. 85 // autorelease pool. Flush the pool when this function returns.
86 base::mac::ScopedNSAutoreleasePool pool; 86 base::mac::ScopedNSAutoreleasePool pool;
87 87
88 Browser* browser = new Browser( 88 Browser* browser = new Browser(
89 Browser::CreateParams::CreateForApp( 89 Browser::CreateParams::CreateForApp(
90 app_name, false /* trusted_source */, gfx::Rect(), profile, 90 app_name, false /* trusted_source */, gfx::Rect(), profile,
91 chrome::GetActiveDesktop())); 91 chrome::GetActiveDesktop()));
92 AddBlankTabAndShow(browser); 92 AddBlankTabAndShow(browser);
93 return browser; 93 return browser;
94 } 94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698