| 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 #include "base/strings/stringprintf.h" | 5 #include "base/strings/stringprintf.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "chrome/browser/background/background_contents_service.h" | 7 #include "chrome/browser/background/background_contents_service.h" |
| 8 #include "chrome/browser/background/background_contents_service_factory.h" | 8 #include "chrome/browser/background/background_contents_service_factory.h" |
| 9 #include "chrome/browser/background/background_mode_manager.h" | 9 #include "chrome/browser/background/background_mode_manager.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
| 12 #include "chrome/browser/extensions/extension_apitest.h" | 12 #include "chrome/browser/extensions/extension_apitest.h" |
| 13 #include "chrome/browser/extensions/extension_service.h" | 13 #include "chrome/browser/extensions/extension_service.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_dialogs.h" | 16 #include "chrome/browser/ui/browser_dialogs.h" |
| 17 #include "chrome/browser/ui/browser_window.h" | 17 #include "chrome/browser/ui/browser_window.h" |
| 18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
| 19 #include "chrome/common/extensions/extension.h" | |
| 20 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
| 21 #include "content/public/test/test_notification_tracker.h" | 20 #include "content/public/test/test_notification_tracker.h" |
| 22 #include "content/public/test/test_utils.h" | 21 #include "content/public/test/test_utils.h" |
| 22 #include "extensions/common/extension.h" |
| 23 #include "extensions/common/switches.h" | 23 #include "extensions/common/switches.h" |
| 24 #include "net/dns/mock_host_resolver.h" | 24 #include "net/dns/mock_host_resolver.h" |
| 25 #include "net/test/embedded_test_server/embedded_test_server.h" | 25 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 26 | 26 |
| 27 #if defined(OS_MACOSX) | 27 #if defined(OS_MACOSX) |
| 28 #include "base/mac/scoped_nsautorelease_pool.h" | 28 #include "base/mac/scoped_nsautorelease_pool.h" |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 using extensions::Extension; | 31 using extensions::Extension; |
| 32 | 32 |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 // Close all browsers - app should continue running. | 495 // Close all browsers - app should continue running. |
| 496 set_exit_when_last_browser_closes(false); | 496 set_exit_when_last_browser_closes(false); |
| 497 CloseBrowser(browser()); | 497 CloseBrowser(browser()); |
| 498 | 498 |
| 499 // Post a task to unload the extension - this should cause Chrome to exit | 499 // Post a task to unload the extension - this should cause Chrome to exit |
| 500 // cleanly (not crash). | 500 // cleanly (not crash). |
| 501 UnloadExtensionViaTask(extension->id()); | 501 UnloadExtensionViaTask(extension->id()); |
| 502 content::RunAllPendingInMessageLoop(); | 502 content::RunAllPendingInMessageLoop(); |
| 503 ASSERT_TRUE(WaitForBackgroundMode(false)); | 503 ASSERT_TRUE(WaitForBackgroundMode(false)); |
| 504 } | 504 } |
| OLD | NEW |