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

Side by Side Diff: chrome/browser/unload_browsertest.cc

Issue 11235048: Test suite that monitors the disposition of JS-created windows based on what (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix style nits Created 8 years, 2 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
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 #if defined(OS_POSIX) 5 #if defined(OS_POSIX)
6 #include <signal.h> 6 #include <signal.h>
7 #endif 7 #endif
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 // Simulate a click to force user_gesture to true; if we don't, the resulting 389 // Simulate a click to force user_gesture to true; if we don't, the resulting
390 // popup will be constrained, which isn't what we want to test. 390 // popup will be constrained, which isn't what we want to test.
391 391
392 content::WindowedNotificationObserver observer( 392 content::WindowedNotificationObserver observer(
393 chrome::NOTIFICATION_TAB_ADDED, 393 chrome::NOTIFICATION_TAB_ADDED,
394 content::NotificationService::AllSources()); 394 content::NotificationService::AllSources());
395 content::WindowedNotificationObserver load_stop_observer( 395 content::WindowedNotificationObserver load_stop_observer(
396 content::NOTIFICATION_LOAD_STOP, 396 content::NOTIFICATION_LOAD_STOP,
397 content::NotificationService::AllSources()); 397 content::NotificationService::AllSources());
398 content::SimulateMouseClick(chrome::GetActiveWebContents(browser())); 398 content::SimulateMouseClick(chrome::GetActiveWebContents(browser()), 0,
399 WebKit::WebMouseEvent::ButtonLeft);
399 observer.Wait(); 400 observer.Wait();
400 load_stop_observer.Wait(); 401 load_stop_observer.Wait();
401 CheckTitle("popup"); 402 CheckTitle("popup");
402 403
403 content::WindowedNotificationObserver tab_close_observer( 404 content::WindowedNotificationObserver tab_close_observer(
404 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 405 content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
405 content::NotificationService::AllSources()); 406 content::NotificationService::AllSources());
406 chrome::CloseTab(browser()); 407 chrome::CloseTab(browser());
407 tab_close_observer.Wait(); 408 tab_close_observer.Wait();
408 409
409 CheckTitle("only_one_unload"); 410 CheckTitle("only_one_unload");
410 } 411 }
411 412
412 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs 413 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs
413 // and multiple windows. 414 // and multiple windows.
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/test/data/click_modifier/window_open.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698