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 "webkit/support/weburl_loader_mock_factory.h" | 5 #include "content/test/weburl_loader_mock_factory.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "content/test/webkit_support.h" |
| 11 #include "content/test/weburl_loader_mock.h" |
10 #include "third_party/WebKit/public/platform/WebString.h" | 12 #include "third_party/WebKit/public/platform/WebString.h" |
11 #include "third_party/WebKit/public/platform/WebURLError.h" | 13 #include "third_party/WebKit/public/platform/WebURLError.h" |
12 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 14 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
13 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 15 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
14 #include "third_party/WebKit/public/web/WebCache.h" | 16 #include "third_party/WebKit/public/web/WebCache.h" |
15 #include "webkit/support/webkit_support.h" | |
16 #include "webkit/support/weburl_loader_mock.h" | |
17 | 17 |
18 using WebKit::WebCache; | 18 using WebKit::WebCache; |
19 using WebKit::WebData; | 19 using WebKit::WebData; |
20 using WebKit::WebString; | 20 using WebKit::WebString; |
21 using WebKit::WebURL; | 21 using WebKit::WebURL; |
22 using WebKit::WebURLError; | 22 using WebKit::WebURLError; |
23 using WebKit::WebURLLoader; | 23 using WebKit::WebURLLoader; |
24 using WebKit::WebURLRequest; | 24 using WebKit::WebURLRequest; |
25 using WebKit::WebURLResponse; | 25 using WebKit::WebURLResponse; |
26 | 26 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 scoped_ptr<char[]> buffer(new char[size]); | 183 scoped_ptr<char[]> buffer(new char[size]); |
184 data->reset(); | 184 data->reset(); |
185 int read_count = file_util::ReadFile(file_path, buffer.get(), size); | 185 int read_count = file_util::ReadFile(file_path, buffer.get(), size); |
186 if (read_count == -1) | 186 if (read_count == -1) |
187 return false; | 187 return false; |
188 DCHECK(read_count == size); | 188 DCHECK(read_count == size); |
189 data->assign(buffer.get(), size); | 189 data->assign(buffer.get(), size); |
190 | 190 |
191 return true; | 191 return true; |
192 } | 192 } |
OLD | NEW |