| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/testing/weburl_loader_mock.h" | 5 #include "platform/testing/weburl_loader_mock.h" |
| 6 | 6 |
| 7 #include "platform/testing/weburl_loader_mock_factory_impl.h" | 7 #include "platform/testing/weburl_loader_mock_factory_impl.h" |
| 8 #include "public/platform/URLConversion.h" | 8 #include "public/platform/URLConversion.h" |
| 9 #include "public/platform/WebData.h" | 9 #include "public/platform/WebData.h" |
| 10 #include "public/platform/WebURLError.h" | 10 #include "public/platform/WebURLError.h" |
| 11 #include "public/platform/WebURLLoaderClient.h" | 11 #include "public/platform/WebURLLoaderClient.h" |
| 12 #include "public/platform/WebUnitTestSupport.h" | |
| 13 #include "wtf/PassOwnPtr.h" | 12 #include "wtf/PassOwnPtr.h" |
| 14 | 13 |
| 15 namespace blink { | 14 namespace blink { |
| 16 | 15 |
| 17 WebURLLoaderMock::WebURLLoaderMock(WebURLLoaderMockFactoryImpl* factory, | 16 WebURLLoaderMock::WebURLLoaderMock(WebURLLoaderMockFactoryImpl* factory, |
| 18 WebURLLoader* default_loader) | 17 WebURLLoader* default_loader) |
| 19 : factory_(factory), | 18 : factory_(factory), |
| 20 default_loader_(adoptPtr(default_loader)), | 19 default_loader_(adoptPtr(default_loader)), |
| 21 weak_factory_(this) { | 20 weak_factory_(this) { |
| 22 } | 21 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 void WebURLLoaderMock::setLoadingTaskRunner(WebTaskRunner*) { | 157 void WebURLLoaderMock::setLoadingTaskRunner(WebTaskRunner*) { |
| 159 // In principle this is NOTIMPLEMENTED(), but if we put that here it floods | 158 // In principle this is NOTIMPLEMENTED(), but if we put that here it floods |
| 160 // the console during webkit unit tests, so we leave the function empty. | 159 // the console during webkit unit tests, so we leave the function empty. |
| 161 } | 160 } |
| 162 | 161 |
| 163 WeakPtr<WebURLLoaderMock> WebURLLoaderMock::GetWeakPtr() { | 162 WeakPtr<WebURLLoaderMock> WebURLLoaderMock::GetWeakPtr() { |
| 164 return weak_factory_.createWeakPtr(); | 163 return weak_factory_.createWeakPtr(); |
| 165 } | 164 } |
| 166 | 165 |
| 167 } // namespace blink | 166 } // namespace blink |
| OLD | NEW |