OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 #include "chrome/browser/child_process_security_policy.h" | 10 #include "chrome/browser/child_process_security_policy.h" |
11 #include "chrome/browser/chrome_thread.h" | 11 #include "chrome/browser/chrome_thread.h" |
12 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 12 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
13 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" | 13 #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" |
14 #include "chrome/browser/renderer_host/resource_handler.h" | 14 #include "chrome/browser/renderer_host/resource_handler.h" |
15 #include "chrome/common/chrome_plugin_lib.h" | 15 #include "chrome/common/chrome_plugin_lib.h" |
16 #include "chrome/common/render_messages.h" | 16 #include "chrome/common/render_messages.h" |
| 17 #include "chrome/common/render_messages_params.h" |
17 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
| 19 #include "net/base/upload_data.h" |
18 #include "net/http/http_util.h" | 20 #include "net/http/http_util.h" |
19 #include "net/url_request/url_request.h" | 21 #include "net/url_request/url_request.h" |
20 #include "net/url_request/url_request_job.h" | 22 #include "net/url_request/url_request_job.h" |
21 #include "net/url_request/url_request_test_job.h" | 23 #include "net/url_request/url_request_test_job.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "webkit/appcache/appcache_interfaces.h" | 25 #include "webkit/appcache/appcache_interfaces.h" |
24 | 26 |
25 // TODO(eroman): Write unit tests for SafeBrowsing that exercise | 27 // TODO(eroman): Write unit tests for SafeBrowsing that exercise |
26 // SafeBrowsingResourceHandler. | 28 // SafeBrowsingResourceHandler. |
27 | 29 |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1023 EXPECT_TRUE(request_info_->replace_extension_localization_templates()); | 1025 EXPECT_TRUE(request_info_->replace_extension_localization_templates()); |
1024 } | 1026 } |
1025 | 1027 |
1026 TEST_F(ApplyExtensionLocalizationFilterTest, GoodSchemeWrongResourceType) { | 1028 TEST_F(ApplyExtensionLocalizationFilterTest, GoodSchemeWrongResourceType) { |
1027 resource_type_ = ResourceType::MAIN_FRAME; | 1029 resource_type_ = ResourceType::MAIN_FRAME; |
1028 ResourceDispatcherHost::ApplyExtensionLocalizationFilter(*url_, | 1030 ResourceDispatcherHost::ApplyExtensionLocalizationFilter(*url_, |
1029 resource_type_, request_info_.get()); | 1031 resource_type_, request_info_.get()); |
1030 | 1032 |
1031 EXPECT_FALSE(request_info_->replace_extension_localization_templates()); | 1033 EXPECT_FALSE(request_info_->replace_extension_localization_templates()); |
1032 } | 1034 } |
OLD | NEW |