OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/net/prerender_interceptor.h" | 5 #include "chrome/browser/net/prerender_interceptor.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class PrerenderInterceptorTest : public testing::Test { | 23 class PrerenderInterceptorTest : public testing::Test { |
24 protected: | 24 protected: |
25 PrerenderInterceptorTest(); | 25 PrerenderInterceptorTest(); |
26 | 26 |
27 void MakeTestUrl(const std::string& base); | 27 void MakeTestUrl(const std::string& base); |
28 virtual void SetUp(); | 28 virtual void SetUp(); |
29 | 29 |
30 net::TestServer test_server_; | 30 net::TestServer test_server_; |
31 GURL gurl_; | 31 GURL gurl_; |
32 GURL last_intercepted_gurl_; | 32 GURL last_intercepted_gurl_; |
33 scoped_ptr<URLRequest> req_; | 33 scoped_ptr<net::URLRequest> req_; |
34 | 34 |
35 private: | 35 private: |
36 void SetLastInterceptedGurl(const GURL& url); | 36 void SetLastInterceptedGurl(const GURL& url); |
37 | 37 |
38 PrerenderInterceptor prerender_interceptor_; | 38 PrerenderInterceptor prerender_interceptor_; |
39 MessageLoopForIO io_loop_; | 39 MessageLoopForIO io_loop_; |
40 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 40 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
41 BrowserThread ui_thread_; | 41 BrowserThread ui_thread_; |
42 TestDelegate delegate_; | 42 TestDelegate delegate_; |
43 }; | 43 }; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 req_->Start(); | 98 req_->Start(); |
99 | 99 |
100 MessageLoop::current()->Run(); | 100 MessageLoop::current()->Run(); |
101 EXPECT_EQ(URLRequestStatus::SUCCESS, req_->status().status()); | 101 EXPECT_EQ(URLRequestStatus::SUCCESS, req_->status().status()); |
102 EXPECT_NE(gurl_, last_intercepted_gurl_); | 102 EXPECT_NE(gurl_, last_intercepted_gurl_); |
103 } | 103 } |
104 | 104 |
105 } // namespace | 105 } // namespace |
106 | 106 |
107 } // namespace chrome_browser_net | 107 } // namespace chrome_browser_net |
OLD | NEW |