OLD | NEW |
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" |
11 #include "base/process_util.h" | |
12 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
13 #include "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
14 #include "chrome/browser/net/url_request_mock_util.h" | 13 #include "chrome/browser/net/url_request_mock_util.h" |
15 #include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h" | 14 #include "chrome/browser/ui/app_modal_dialogs/javascript_app_modal_dialog.h" |
16 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" | 15 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" |
17 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
18 #include "chrome/browser/ui/browser_commands.h" | 17 #include "chrome/browser/ui/browser_commands.h" |
19 #include "chrome/browser/ui/browser_list.h" | 18 #include "chrome/browser/ui/browser_list.h" |
20 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
21 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 content::WindowedNotificationObserver window_observer( | 614 content::WindowedNotificationObserver window_observer( |
616 chrome::NOTIFICATION_BROWSER_CLOSED, | 615 chrome::NOTIFICATION_BROWSER_CLOSED, |
617 content::NotificationService::AllSources()); | 616 content::NotificationService::AllSources()); |
618 chrome::CloseWindow(browser()); | 617 chrome::CloseWindow(browser()); |
619 CrashTab(beforeunload_contents); | 618 CrashTab(beforeunload_contents); |
620 window_observer.Wait(); | 619 window_observer.Wait(); |
621 } | 620 } |
622 | 621 |
623 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs | 622 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs |
624 // and multiple windows. | 623 // and multiple windows. |
OLD | NEW |