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

Side by Side Diff: chrome/browser/extensions/extension_protocols_unittest.cc

Issue 10310124: Implement a ResourceThrottle for URL overriding in Chrome on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix build (Referrer is a struct, not a class) 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 <string> 5 #include <string>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/extensions/extension_info_map.h" 9 #include "chrome/browser/extensions/extension_info_map.h"
10 #include "chrome/browser/extensions/extension_protocols.h" 10 #include "chrome/browser/extensions/extension_protocols.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 virtual void TearDown() { 62 virtual void TearDown() {
63 net::URLRequestContext* request_context = 63 net::URLRequestContext* request_context =
64 resource_context_.GetRequestContext(); 64 resource_context_.GetRequestContext();
65 request_context->set_job_factory(old_factory_); 65 request_context->set_job_factory(old_factory_);
66 } 66 }
67 67
68 void StartRequest(net::URLRequest* request, 68 void StartRequest(net::URLRequest* request,
69 ResourceType::Type resource_type) { 69 ResourceType::Type resource_type) {
70 content::ResourceRequestInfo::AllocateForTesting(request, 70 content::ResourceRequestInfo::AllocateForTesting(request,
71 resource_type, 71 resource_type,
72 &resource_context_); 72 &resource_context_,
73 -1,
74 -1);
73 request->set_context(resource_context_.GetRequestContext()); 75 request->set_context(resource_context_.GetRequestContext());
74 request->Start(); 76 request->Start();
75 MessageLoop::current()->Run(); 77 MessageLoop::current()->Run();
76 } 78 }
77 79
78 protected: 80 protected:
79 MessageLoopForIO message_loop_; 81 MessageLoopForIO message_loop_;
80 content::TestBrowserThread ui_thread_; 82 content::TestBrowserThread ui_thread_;
81 content::TestBrowserThread file_thread_; 83 content::TestBrowserThread file_thread_;
82 content::TestBrowserThread io_thread_; 84 content::TestBrowserThread io_thread_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 cases[i].name; 147 cases[i].name;
146 } else { 148 } else {
147 EXPECT_EQ(net::ERR_ADDRESS_UNREACHABLE, request.status().error()) << 149 EXPECT_EQ(net::ERR_ADDRESS_UNREACHABLE, request.status().error()) <<
148 cases[i].name; 150 cases[i].name;
149 } 151 }
150 } 152 }
151 } 153 }
152 } 154 }
153 155
154 } // namespace 156 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698