Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: chrome_frame/test/test_server_test.cc

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated unittests Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <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/bind.h" 9 #include "base/bind.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return h_; 56 return h_;
57 } 57 }
58 58
59 protected: 59 protected:
60 HINTERNET h_; 60 HINTERNET h_;
61 }; 61 };
62 62
63 class TestURLRequest : public net::URLRequest { 63 class TestURLRequest : public net::URLRequest {
64 public: 64 public:
65 TestURLRequest(const GURL& url, Delegate* delegate) 65 TestURLRequest(const GURL& url, Delegate* delegate)
66 : net::URLRequest(url, delegate) { 66 : net::URLRequest(url, delegate, new TestURLRequestContext()) {
erikwright (departed) 2012/06/19 21:06:22 Looks like this previously leaked. Let's fix it to
shalev 2012/06/20 20:13:12 Done.
67 set_context(new TestURLRequestContext());
68 } 67 }
69 }; 68 };
70 69
71 class UrlTaskChain { 70 class UrlTaskChain {
72 public: 71 public:
73 UrlTaskChain(const char* url, UrlTaskChain* next) 72 UrlTaskChain(const char* url, UrlTaskChain* next)
74 : url_(url), next_(next) { 73 : url_(url), next_(next) {
75 } 74 }
76 75
77 void Run() { 76 void Run() {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 EXPECT_EQ(file.accessed(), 1); 171 EXPECT_EQ(file.accessed(), 1);
173 EXPECT_EQ(redir.accessed(), 1); 172 EXPECT_EQ(redir.accessed(), 1);
174 173
175 EXPECT_TRUE(person_task.response().find("Guthrie") != std::string::npos); 174 EXPECT_TRUE(person_task.response().find("Guthrie") != std::string::npos);
176 EXPECT_TRUE(file_task.response().find("function") != std::string::npos); 175 EXPECT_TRUE(file_task.response().find("function") != std::string::npos);
177 EXPECT_TRUE(redir_task.response().find("Destination") != std::string::npos); 176 EXPECT_TRUE(redir_task.response().find("Destination") != std::string::npos);
178 } else { 177 } else {
179 ::TerminateThread(worker, ~0); 178 ::TerminateThread(worker, ~0);
180 } 179 }
181 } 180 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698