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

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

Issue 7988001: 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
251 ui_test_utils::WindowedNotificationObserver observer( 249 ui_test_utils::WindowedNotificationObserver observer(
252 content::NOTIFICATION_LOAD_STOP, 250 content::NOTIFICATION_LOAD_STOP,
253 NotificationService::AllSources()); 251 NotificationService::AllSources());
254 browser->AddSelectedTabWithURL( 252 browser->AddSelectedTabWithURL(
255 GURL(chrome::kAboutBlankURL), PageTransition::START_PAGE); 253 GURL(chrome::kAboutBlankURL), PageTransition::START_PAGE);
256 observer.Wait(); 254 observer.Wait();
257 255
258 browser->window()->Activate(); 256 browser->window()->Show();
259 } 257 }
260 258
261 #if defined(OS_POSIX) 259 #if defined(OS_POSIX)
262 // On SIGTERM (sent by the runner on timeouts), dump a stack trace (to make 260 // On SIGTERM (sent by the runner on timeouts), dump a stack trace (to make
263 // debugging easier) and also exit with a known error code (so that the test 261 // debugging easier) and also exit with a known error code (so that the test
264 // framework considers this a failure -- http://crbug.com/57578). 262 // framework considers this a failure -- http://crbug.com/57578).
265 static void DumpStackTraceSignalHandler(int signal) { 263 static void DumpStackTraceSignalHandler(int signal) {
266 base::debug::StackTrace().PrintBacktrace(); 264 base::debug::StackTrace().PrintBacktrace();
267 _exit(128 + signal); 265 _exit(128 + signal);
268 } 266 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 return; 309 return;
312 310
313 // Invoke CloseAllBrowsersAndMayExit on a running message loop. 311 // Invoke CloseAllBrowsersAndMayExit on a running message loop.
314 // CloseAllBrowsersAndMayExit exits the message loop after everything has been 312 // CloseAllBrowsersAndMayExit exits the message loop after everything has been
315 // shut down properly. 313 // shut down properly.
316 MessageLoopForUI::current()->PostTask( 314 MessageLoopForUI::current()->PostTask(
317 FROM_HERE, 315 FROM_HERE,
318 NewRunnableFunction(&BrowserList::AttemptExit)); 316 NewRunnableFunction(&BrowserList::AttemptExit));
319 ui_test_utils::RunMessageLoop(); 317 ui_test_utils::RunMessageLoop();
320 } 318 }
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