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 "chrome/browser/chrome_notification_types.h" | 12 #include "chrome/browser/chrome_notification_types.h" |
13 #include "chrome/browser/net/url_request_mock_util.h" | 13 #include "chrome/browser/net/url_request_mock_util.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/browser_commands.h" | 15 #include "chrome/browser/ui/browser_commands.h" |
16 #include "chrome/browser/ui/browser_list.h" | 16 #include "chrome/browser/ui/browser_list.h" |
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/test/base/in_process_browser_test.h" | 19 #include "chrome/test/base/in_process_browser_test.h" |
20 #include "chrome/test/base/ui_test_utils.h" | 20 #include "chrome/test/base/ui_test_utils.h" |
21 #include "components/app_modal_dialogs/javascript_app_modal_dialog.h" | 21 #include "components/app_modal/javascript_app_modal_dialog.h" |
22 #include "components/app_modal_dialogs/native_app_modal_dialog.h" | 22 #include "components/app_modal/native_app_modal_dialog.h" |
23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
24 #include "content/public/browser/notification_service.h" | 24 #include "content/public/browser/notification_service.h" |
25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
26 #include "content/public/test/browser_test_utils.h" | 26 #include "content/public/test/browser_test_utils.h" |
27 #include "net/test/url_request/url_request_mock_http_job.h" | 27 #include "net/test/url_request/url_request_mock_http_job.h" |
28 #include "net/url_request/url_request_test_util.h" | 28 #include "net/url_request/url_request_test_util.h" |
29 | 29 |
30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
31 // For version specific disabled tests below (http://crbug.com/267597). | 31 // For version specific disabled tests below (http://crbug.com/267597). |
32 #include "base/win/windows_version.h" | 32 #include "base/win/windows_version.h" |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 content::WindowedNotificationObserver window_observer( | 630 content::WindowedNotificationObserver window_observer( |
631 chrome::NOTIFICATION_BROWSER_CLOSED, | 631 chrome::NOTIFICATION_BROWSER_CLOSED, |
632 content::NotificationService::AllSources()); | 632 content::NotificationService::AllSources()); |
633 chrome::CloseWindow(browser()); | 633 chrome::CloseWindow(browser()); |
634 CrashTab(beforeunload_contents); | 634 CrashTab(beforeunload_contents); |
635 window_observer.Wait(); | 635 window_observer.Wait(); |
636 } | 636 } |
637 | 637 |
638 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs | 638 // TODO(ojan): Add tests for unload/beforeunload that have multiple tabs |
639 // and multiple windows. | 639 // and multiple windows. |
OLD | NEW |