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

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

Issue 7991001: Revert 102263 - Revert 102216 - Fix activation problem when showing bubble view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return incognito; 239 return incognito;
240 } 240 }
241 241
242 Browser* InProcessBrowserTest::CreateBrowserForPopup(Profile* profile) { 242 Browser* InProcessBrowserTest::CreateBrowserForPopup(Profile* profile) {
243 Browser* browser = Browser::CreateForType(Browser::TYPE_POPUP, profile); 243 Browser* browser = Browser::CreateForType(Browser::TYPE_POPUP, profile);
244 AddBlankTabAndShow(browser); 244 AddBlankTabAndShow(browser);
245 return browser; 245 return browser;
246 } 246 }
247 247
248 void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) { 248 void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) {
249 browser->window()->Show();
250
249 ui_test_utils::WindowedNotificationObserver observer( 251 ui_test_utils::WindowedNotificationObserver observer(
250 content::NOTIFICATION_LOAD_STOP, 252 content::NOTIFICATION_LOAD_STOP,
251 NotificationService::AllSources()); 253 NotificationService::AllSources());
252 browser->AddSelectedTabWithURL( 254 browser->AddSelectedTabWithURL(
253 GURL(chrome::kAboutBlankURL), PageTransition::START_PAGE); 255 GURL(chrome::kAboutBlankURL), PageTransition::START_PAGE);
254 observer.Wait(); 256 observer.Wait();
255 257
256 browser->window()->Show(); 258 browser->window()->Activate();
257 } 259 }
258 260
259 #if defined(OS_POSIX) 261 #if defined(OS_POSIX)
260 // On SIGTERM (sent by the runner on timeouts), dump a stack trace (to make 262 // On SIGTERM (sent by the runner on timeouts), dump a stack trace (to make
261 // debugging easier) and also exit with a known error code (so that the test 263 // debugging easier) and also exit with a known error code (so that the test
262 // framework considers this a failure -- http://crbug.com/57578). 264 // framework considers this a failure -- http://crbug.com/57578).
263 static void DumpStackTraceSignalHandler(int signal) { 265 static void DumpStackTraceSignalHandler(int signal) {
264 base::debug::StackTrace().PrintBacktrace(); 266 base::debug::StackTrace().PrintBacktrace();
265 _exit(128 + signal); 267 _exit(128 + signal);
266 } 268 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return; 311 return;
310 312
311 // Invoke CloseAllBrowsersAndMayExit on a running message loop. 313 // Invoke CloseAllBrowsersAndMayExit on a running message loop.
312 // CloseAllBrowsersAndMayExit exits the message loop after everything has been 314 // CloseAllBrowsersAndMayExit exits the message loop after everything has been
313 // shut down properly. 315 // shut down properly.
314 MessageLoopForUI::current()->PostTask( 316 MessageLoopForUI::current()->PostTask(
315 FROM_HERE, 317 FROM_HERE,
316 NewRunnableFunction(&BrowserList::AttemptExit)); 318 NewRunnableFunction(&BrowserList::AttemptExit));
317 ui_test_utils::RunMessageLoop(); 319 ui_test_utils::RunMessageLoop();
318 } 320 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698