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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/process/process.h" | 12 #include "base/process/process.h" |
13 #include "base/process/process_handle.h" | 13 #include "base/process/process_handle.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "content/child/request_extra_data.h" | 16 #include "content/child/request_extra_data.h" |
17 #include "content/child/request_info.h" | 17 #include "content/child/request_info.h" |
18 #include "content/child/resource_dispatcher.h" | 18 #include "content/child/resource_dispatcher.h" |
| 19 #include "content/child/resource_loader_bridge.h" |
19 #include "content/common/appcache_interfaces.h" | 20 #include "content/common/appcache_interfaces.h" |
20 #include "content/common/resource_messages.h" | 21 #include "content/common/resource_messages.h" |
21 #include "content/common/service_worker/service_worker_types.h" | 22 #include "content/common/service_worker/service_worker_types.h" |
22 #include "content/public/child/request_peer.h" | 23 #include "content/public/child/request_peer.h" |
23 #include "content/public/common/resource_response.h" | 24 #include "content/public/common/resource_response.h" |
24 #include "net/base/net_errors.h" | 25 #include "net/base/net_errors.h" |
25 #include "net/http/http_response_headers.h" | 26 #include "net/http/http_response_headers.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
27 #include "webkit/child/resource_loader_bridge.h" | |
28 | |
29 using webkit_glue::ResourceLoaderBridge; | |
30 | 28 |
31 namespace content { | 29 namespace content { |
32 | 30 |
33 static const char kTestPageUrl[] = "http://www.google.com/"; | 31 static const char kTestPageUrl[] = "http://www.google.com/"; |
34 static const char kTestPageHeaders[] = | 32 static const char kTestPageHeaders[] = |
35 "HTTP/1.1 200 OK\nContent-Type:text/html\n\n"; | 33 "HTTP/1.1 200 OK\nContent-Type:text/html\n\n"; |
36 static const char kTestPageMimeType[] = "text/html"; | 34 static const char kTestPageMimeType[] = "text/html"; |
37 static const char kTestPageCharset[] = ""; | 35 static const char kTestPageCharset[] = ""; |
38 static const char kTestPageContents[] = | 36 static const char kTestPageContents[] = |
39 "<html><head><title>Google</title></head><body><h1>Google</h1></body></html>"; | 37 "<html><head><title>Google</title></head><body><h1>Google</h1></body></html>"; |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 ResourceResponseHead response_head; | 789 ResourceResponseHead response_head; |
792 | 790 |
793 PerformTest(response_head); | 791 PerformTest(response_head); |
794 | 792 |
795 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); | 793 EXPECT_EQ(base::TimeTicks(), response_info().load_timing.request_start); |
796 EXPECT_EQ(base::TimeTicks(), | 794 EXPECT_EQ(base::TimeTicks(), |
797 response_info().load_timing.connect_timing.dns_start); | 795 response_info().load_timing.connect_timing.dns_start); |
798 } | 796 } |
799 | 797 |
800 } // namespace content | 798 } // namespace content |
OLD | NEW |