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/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "build/build_config.h" |
12 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
13 #include "chrome/browser/net/url_request_mock_util.h" | 14 #include "chrome/browser/net/url_request_mock_util.h" |
14 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_commands.h" | 16 #include "chrome/browser/ui/browser_commands.h" |
16 #include "chrome/browser/ui/browser_list.h" | 17 #include "chrome/browser/ui/browser_list.h" |
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 18 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
18 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/test/base/in_process_browser_test.h" | 20 #include "chrome/test/base/in_process_browser_test.h" |
20 #include "chrome/test/base/ui_test_utils.h" | 21 #include "chrome/test/base/ui_test_utils.h" |
21 #include "components/app_modal/javascript_app_modal_dialog.h" | 22 #include "components/app_modal/javascript_app_modal_dialog.h" |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 content::WindowedNotificationObserver window_observer( | 638 content::WindowedNotificationObserver window_observer( |
638 chrome::NOTIFICATION_BROWSER_CLOSED, | 639 chrome::NOTIFICATION_BROWSER_CLOSED, |
639 content::NotificationService::AllSources()); | 640 content::NotificationService::AllSources()); |
640 chrome::CloseWindow(browser()); | 641 chrome::CloseWindow(browser()); |
641 CrashTab(beforeunload_contents); | 642 CrashTab(beforeunload_contents); |
642 window_observer.Wait(); | 643 window_observer.Wait(); |
643 } | 644 } |
644 | 645 |
645 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs | 646 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs |
646 // and multiple windows. | 647 // and multiple windows. |
OLD | NEW |