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 #undef LOG | 5 #undef LOG |
6 | 6 |
7 #include "webkit/tools/test_shell/test_shell.h" | 7 #include "webkit/tools/test_shell/test_shell.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/debug/debug_on_start_win.h" | 11 #include "base/debug/debug_on_start_win.h" |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/md5.h" | 14 #include "base/md5.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/metrics/stats_table.h" | 16 #include "base/metrics/stats_table.h" |
17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
19 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
21 #include "googleurl/src/url_util.h" | 21 #include "googleurl/src/url_util.h" |
22 #include "grit/webkit_strings.h" | 22 #include "grit/webkit_strings.h" |
23 #include "net/base/mime_util.h" | 23 #include "net/base/mime_util.h" |
24 #include "net/base/net_util.h" | 24 #include "net/base/net_util.h" |
| 25 #include "net/url_request/url_request.h" |
| 26 #include "net/url_request/url_request_context.h" |
25 #include "net/url_request/url_request_file_job.h" | 27 #include "net/url_request/url_request_file_job.h" |
26 #include "net/url_request/url_request_filter.h" | 28 #include "net/url_request/url_request_filter.h" |
27 #include "skia/ext/bitmap_platform_device.h" | 29 #include "skia/ext/bitmap_platform_device.h" |
28 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
29 #include "third_party/skia/include/core/SkBitmap.h" | 31 #include "third_party/skia/include/core/SkBitmap.h" |
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" | 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" |
31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientationC
lientMock.h" | 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDeviceOrientationC
lientMock.h" |
32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClientM
ock.h" | 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGeolocationClientM
ock.h" |
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 FilePath path; | 89 FilePath path; |
88 PathService::Get(base::DIR_EXE, &path); | 90 PathService::Get(base::DIR_EXE, &path); |
89 path = path.AppendASCII("resources"); | 91 path = path.AppendASCII("resources"); |
90 path = path.AppendASCII("inspector"); | 92 path = path.AppendASCII("inspector"); |
91 path = path.AppendASCII(request->url().path().substr(1)); | 93 path = path.AppendASCII(request->url().path().substr(1)); |
92 return new URLRequestTestShellFileJob(request, path); | 94 return new URLRequestTestShellFileJob(request, path); |
93 } | 95 } |
94 | 96 |
95 private: | 97 private: |
96 URLRequestTestShellFileJob(net::URLRequest* request, const FilePath& path) | 98 URLRequestTestShellFileJob(net::URLRequest* request, const FilePath& path) |
97 : net::URLRequestFileJob(request, path) { | 99 : net::URLRequestFileJob( |
| 100 request, request->context()->network_delegate(), path) { |
98 } | 101 } |
99 virtual ~URLRequestTestShellFileJob() { } | 102 virtual ~URLRequestTestShellFileJob() { } |
100 | 103 |
101 DISALLOW_COPY_AND_ASSIGN(URLRequestTestShellFileJob); | 104 DISALLOW_COPY_AND_ASSIGN(URLRequestTestShellFileJob); |
102 }; | 105 }; |
103 | 106 |
104 | 107 |
105 } // namespace | 108 } // namespace |
106 | 109 |
107 // Initialize static member variable | 110 // Initialize static member variable |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 return device_orientation_client_mock_.get(); | 614 return device_orientation_client_mock_.get(); |
612 } | 615 } |
613 | 616 |
614 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { | 617 WebKit::WebGeolocationClientMock* TestShell::geolocation_client_mock() { |
615 if (!geolocation_client_mock_.get()) { | 618 if (!geolocation_client_mock_.get()) { |
616 geolocation_client_mock_.reset( | 619 geolocation_client_mock_.reset( |
617 WebKit::WebGeolocationClientMock::create()); | 620 WebKit::WebGeolocationClientMock::create()); |
618 } | 621 } |
619 return geolocation_client_mock_.get(); | 622 return geolocation_client_mock_.get(); |
620 } | 623 } |
OLD | NEW |