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 <windows.h> | 5 #include <windows.h> |
6 #include <wininet.h> | 6 #include <wininet.h> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_handle_win.h" | 10 #include "base/scoped_handle_win.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // In-memory cookie store. | 83 // In-memory cookie store. |
84 cookie_store_ = new net::CookieMonster(NULL, NULL); | 84 cookie_store_ = new net::CookieMonster(NULL, NULL); |
85 } | 85 } |
86 | 86 |
87 virtual ~URLRequestTestContext() { | 87 virtual ~URLRequestTestContext() { |
88 delete http_transaction_factory_; | 88 delete http_transaction_factory_; |
89 delete http_auth_handler_factory_; | 89 delete http_auth_handler_factory_; |
90 } | 90 } |
91 }; | 91 }; |
92 | 92 |
93 class TestURLRequest : public URLRequest { | 93 class TestURLRequest : public net::URLRequest { |
94 public: | 94 public: |
95 TestURLRequest(const GURL& url, Delegate* delegate) | 95 TestURLRequest(const GURL& url, Delegate* delegate) |
96 : URLRequest(url, delegate) { | 96 : net::URLRequest(url, delegate) { |
97 set_context(new URLRequestTestContext()); | 97 set_context(new URLRequestTestContext()); |
98 } | 98 } |
99 }; | 99 }; |
100 | 100 |
101 class UrlTaskChain { | 101 class UrlTaskChain { |
102 public: | 102 public: |
103 UrlTaskChain(const char* url, UrlTaskChain* next) | 103 UrlTaskChain(const char* url, UrlTaskChain* next) |
104 : url_(url), next_(next) { | 104 : url_(url), next_(next) { |
105 } | 105 } |
106 | 106 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 EXPECT_EQ(file.accessed(), 1); | 198 EXPECT_EQ(file.accessed(), 1); |
199 EXPECT_EQ(redir.accessed(), 1); | 199 EXPECT_EQ(redir.accessed(), 1); |
200 | 200 |
201 EXPECT_TRUE(person_task.response().find("Guthrie") != std::string::npos); | 201 EXPECT_TRUE(person_task.response().find("Guthrie") != std::string::npos); |
202 EXPECT_TRUE(file_task.response().find("function") != std::string::npos); | 202 EXPECT_TRUE(file_task.response().find("function") != std::string::npos); |
203 EXPECT_TRUE(goog_task.response().find("<title>") != std::string::npos); | 203 EXPECT_TRUE(goog_task.response().find("<title>") != std::string::npos); |
204 } else { | 204 } else { |
205 ::TerminateThread(worker, ~0); | 205 ::TerminateThread(worker, ~0); |
206 } | 206 } |
207 } | 207 } |
OLD | NEW |