| 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/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
| 7 #include "chrome/browser/download/download_prefs.h" | 7 #include "chrome/browser/download/download_prefs.h" |
| 8 #include "chrome/browser/extensions/event_router.h" | 8 #include "chrome/browser/extensions/event_router.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/extensions/extension_info_map.h" | 10 #include "chrome/browser/extensions/extension_info_map.h" |
| 11 #include "chrome/browser/extensions/extension_system.h" | 11 #include "chrome/browser/extensions/extension_system.h" |
| 12 #include "chrome/browser/google_apis/test_server/http_request.h" | |
| 13 #include "chrome/browser/google_apis/test_server/http_response.h" | |
| 14 #include "chrome/browser/google_apis/test_server/http_server.h" | |
| 15 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
| 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 18 #include "chrome/common/extensions/mime_types_handler.h" | 15 #include "chrome/common/extensions/mime_types_handler.h" |
| 19 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
| 20 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 21 #include "content/public/browser/download_item.h" | 18 #include "content/public/browser/download_item.h" |
| 22 #include "content/public/browser/download_manager.h" | 19 #include "content/public/browser/download_manager.h" |
| 23 #include "content/public/browser/render_process_host.h" | 20 #include "content/public/browser/render_process_host.h" |
| 24 #include "content/public/browser/resource_controller.h" | 21 #include "content/public/browser/resource_controller.h" |
| 25 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 26 #include "content/public/test/download_test_observer.h" | 23 #include "content/public/test/download_test_observer.h" |
| 24 #include "net/test/embedded_test_server/http_request.h" |
| 25 #include "net/test/embedded_test_server/http_response.h" |
| 26 #include "net/test/embedded_test_server/http_server.h" |
| 27 #include "testing/gmock/include/gmock/gmock.h" | 27 #include "testing/gmock/include/gmock/gmock.h" |
| 28 | 28 |
| 29 using content::BrowserContext; | 29 using content::BrowserContext; |
| 30 using content::BrowserThread; | 30 using content::BrowserThread; |
| 31 using content::DownloadItem; | 31 using content::DownloadItem; |
| 32 using content::DownloadManager; | 32 using content::DownloadManager; |
| 33 using content::DownloadUrlParameters; | 33 using content::DownloadUrlParameters; |
| 34 using content::ResourceController; | 34 using content::ResourceController; |
| 35 using content::WebContents; | 35 using content::WebContents; |
| 36 using extensions::Event; | 36 using extensions::Event; |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // The test extension should not receive any events by now. Send it an event | 305 // The test extension should not receive any events by now. Send it an event |
| 306 // with MIME type "test/done", so it stops waiting for the events. (If there | 306 // with MIME type "test/done", so it stops waiting for the events. (If there |
| 307 // was an event with MIME type 'plain/text', |catcher.GetNextResult()| will | 307 // was an event with MIME type 'plain/text', |catcher.GetNextResult()| will |
| 308 // fail regardless of the sent event; chrome.test.notifySuccess will not be | 308 // fail regardless of the sent event; chrome.test.notifySuccess will not be |
| 309 // called by the extension). | 309 // called by the extension). |
| 310 SendDoneEvent(); | 310 SendDoneEvent(); |
| 311 EXPECT_TRUE(catcher.GetNextResult()); | 311 EXPECT_TRUE(catcher.GetNextResult()); |
| 312 } | 312 } |
| 313 | 313 |
| 314 } // namespace | 314 } // namespace |
| OLD | NEW |