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

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

Issue 9359022: Aura: Support hovering restore & close buttons for full screen apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_test Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/base/in_process_browser_test.h ('k') | ui/resources/ui_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 AddBlankTabAndShow(incognito); 236 AddBlankTabAndShow(incognito);
237 return incognito; 237 return incognito;
238 } 238 }
239 239
240 Browser* InProcessBrowserTest::CreateBrowserForPopup(Profile* profile) { 240 Browser* InProcessBrowserTest::CreateBrowserForPopup(Profile* profile) {
241 Browser* browser = Browser::CreateForType(Browser::TYPE_POPUP, profile); 241 Browser* browser = Browser::CreateForType(Browser::TYPE_POPUP, profile);
242 AddBlankTabAndShow(browser); 242 AddBlankTabAndShow(browser);
243 return browser; 243 return browser;
244 } 244 }
245 245
246 Browser* InProcessBrowserTest::CreateBrowserForApp(
247 const std::string& app_name,
248 Profile* profile) {
249 Browser* browser = Browser::CreateForApp(
250 Browser::TYPE_POPUP,
251 app_name,
252 gfx::Rect(),
253 profile);
254 AddBlankTabAndShow(browser);
255 return browser;
256 }
257
246 void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) { 258 void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) {
247 ui_test_utils::WindowedNotificationObserver observer( 259 ui_test_utils::WindowedNotificationObserver observer(
248 content::NOTIFICATION_LOAD_STOP, 260 content::NOTIFICATION_LOAD_STOP,
249 content::NotificationService::AllSources()); 261 content::NotificationService::AllSources());
250 browser->AddSelectedTabWithURL( 262 browser->AddSelectedTabWithURL(
251 GURL(chrome::kAboutBlankURL), content::PAGE_TRANSITION_START_PAGE); 263 GURL(chrome::kAboutBlankURL), content::PAGE_TRANSITION_START_PAGE);
252 observer.Wait(); 264 observer.Wait();
253 265
254 browser->window()->Show(); 266 browser->window()->Show();
255 } 267 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 if (BrowserList::size() == 0) 338 if (BrowserList::size() == 0)
327 return; 339 return;
328 340
329 // Invoke CloseAllBrowsersAndMayExit on a running message loop. 341 // Invoke CloseAllBrowsersAndMayExit on a running message loop.
330 // CloseAllBrowsersAndMayExit exits the message loop after everything has been 342 // CloseAllBrowsersAndMayExit exits the message loop after everything has been
331 // shut down properly. 343 // shut down properly.
332 MessageLoopForUI::current()->PostTask(FROM_HERE, 344 MessageLoopForUI::current()->PostTask(FROM_HERE,
333 base::Bind(&BrowserList::AttemptExit)); 345 base::Bind(&BrowserList::AttemptExit));
334 ui_test_utils::RunMessageLoop(); 346 ui_test_utils::RunMessageLoop();
335 } 347 }
OLDNEW
« no previous file with comments | « chrome/test/base/in_process_browser_test.h ('k') | ui/resources/ui_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698