| 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 <set> | 5 #include <set> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "content/public/test/test_browser_thread.h" | 21 #include "content/public/test/test_browser_thread.h" |
| 22 #include "ipc/ipc_message.h" | 22 #include "ipc/ipc_message.h" |
| 23 #include "net/base/request_priority.h" | 23 #include "net/base/request_priority.h" |
| 24 #include "net/test/url_request/url_request_mock_http_job.h" | 24 #include "net/test/url_request/url_request_mock_http_job.h" |
| 25 #include "net/url_request/redirect_info.h" | 25 #include "net/url_request/redirect_info.h" |
| 26 #include "net/url_request/url_request.h" | 26 #include "net/url_request/url_request.h" |
| 27 #include "net/url_request/url_request_test_util.h" | 27 #include "net/url_request/url_request_test_util.h" |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
| 29 | 29 |
| 30 using content::BrowserThread; | 30 using content::BrowserThread; |
| 31 using content::ResourceType; | |
| 32 | 31 |
| 33 namespace prerender { | 32 namespace prerender { |
| 34 | 33 |
| 35 namespace { | 34 namespace { |
| 36 | 35 |
| 37 class TestPrerenderContents : public PrerenderContents { | 36 class TestPrerenderContents : public PrerenderContents { |
| 38 public: | 37 public: |
| 39 TestPrerenderContents(PrerenderManager* prerender_manager, | 38 TestPrerenderContents(PrerenderManager* prerender_manager, |
| 40 int child_id, int route_id) | 39 int child_id, int route_id) |
| 41 : PrerenderContents(prerender_manager, static_cast<Profile*>(NULL), | 40 : PrerenderContents(prerender_manager, static_cast<Profile*>(NULL), |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 // We should have cancelled the prerender. | 321 // We should have cancelled the prerender. |
| 323 EXPECT_EQ(FINAL_STATUS_BAD_DEFERRED_REDIRECT, | 322 EXPECT_EQ(FINAL_STATUS_BAD_DEFERRED_REDIRECT, |
| 324 test_contents()->final_status()); | 323 test_contents()->final_status()); |
| 325 | 324 |
| 326 // Cleanup work so the prerender is gone. | 325 // Cleanup work so the prerender is gone. |
| 327 test_contents()->Cancel(); | 326 test_contents()->Cancel(); |
| 328 RunEvents(); | 327 RunEvents(); |
| 329 } | 328 } |
| 330 | 329 |
| 331 } // namespace prerender | 330 } // namespace prerender |
| OLD | NEW |