| 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 "content/renderer/fetchers/resource_fetcher.h" | 5 #include "content/renderer/fetchers/resource_fetcher.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
| 12 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
| 13 #include "content/public/common/url_constants.h" | 13 #include "content/public/common/url_constants.h" |
| 14 #include "content/public/renderer/render_view.h" | 14 #include "content/public/renderer/render_view.h" |
| 15 #include "content/public/test/test_utils.h" | 15 #include "content/public/test/test_utils.h" |
| 16 #include "content/shell/browser/shell.h" | 16 #include "content/shell/browser/shell.h" |
| 17 #include "content/test/content_browser_test.h" | 17 #include "content/test/content_browser_test.h" |
| 18 #include "content/test/content_browser_test_utils.h" | 18 #include "content/test/content_browser_test_utils.h" |
| 19 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 19 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 20 #include "third_party/WebKit/public/web/WebFrame.h" | 20 #include "third_party/WebKit/public/web/WebFrame.h" |
| 21 #include "third_party/WebKit/public/web/WebView.h" | 21 #include "third_party/WebKit/public/web/WebView.h" |
| 22 | 22 |
| 23 using WebKit::WebFrame; | 23 using blink::WebFrame; |
| 24 using WebKit::WebURLRequest; | 24 using blink::WebURLRequest; |
| 25 using WebKit::WebURLResponse; | 25 using blink::WebURLResponse; |
| 26 | 26 |
| 27 namespace content { | 27 namespace content { |
| 28 | 28 |
| 29 static const int kMaxWaitTimeMs = 5000; | 29 static const int kMaxWaitTimeMs = 5000; |
| 30 | 30 |
| 31 class FetcherDelegate { | 31 class FetcherDelegate { |
| 32 public: | 32 public: |
| 33 FetcherDelegate() | 33 FetcherDelegate() |
| 34 : completed_(false), | 34 : completed_(false), |
| 35 timed_out_(false) { | 35 timed_out_(false) { |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 ASSERT_TRUE(test_server()->Start()); | 274 ASSERT_TRUE(test_server()->Start()); |
| 275 GURL url(test_server()->GetURL("slow?1")); | 275 GURL url(test_server()->GetURL("slow?1")); |
| 276 | 276 |
| 277 PostTaskToInProcessRendererAndWait( | 277 PostTaskToInProcessRendererAndWait( |
| 278 base::Bind( | 278 base::Bind( |
| 279 &ResourceFetcherTests::ResourceFetcherDeletedInCallbackOnRenderer, | 279 &ResourceFetcherTests::ResourceFetcherDeletedInCallbackOnRenderer, |
| 280 base::Unretained(this), url)); | 280 base::Unretained(this), url)); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace content | 283 } // namespace content |
| OLD | NEW |