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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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 "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/extension_info_map.h" 10 #include "chrome/browser/extensions/extension_info_map.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 void StartRequest(net::URLRequest* request, 102 void StartRequest(net::URLRequest* request,
103 ResourceType::Type resource_type) { 103 ResourceType::Type resource_type) {
104 content::ResourceRequestInfo::AllocateForTesting(request, 104 content::ResourceRequestInfo::AllocateForTesting(request,
105 resource_type, 105 resource_type,
106 &resource_context_, 106 &resource_context_,
107 -1, 107 -1,
108 -1); 108 -1);
109 request->Start(); 109 request->Start();
110 MessageLoop::current()->Run(); 110 base::MessageLoop::current()->Run();
111 } 111 }
112 112
113 protected: 113 protected:
114 MessageLoopForIO message_loop_; 114 base::MessageLoopForIO message_loop_;
115 content::TestBrowserThread ui_thread_; 115 content::TestBrowserThread ui_thread_;
116 content::TestBrowserThread file_thread_; 116 content::TestBrowserThread file_thread_;
117 content::TestBrowserThread io_thread_; 117 content::TestBrowserThread io_thread_;
118 scoped_refptr<ExtensionInfoMap> extension_info_map_; 118 scoped_refptr<ExtensionInfoMap> extension_info_map_;
119 net::URLRequestJobFactoryImpl job_factory_; 119 net::URLRequestJobFactoryImpl job_factory_;
120 const net::URLRequestJobFactory* old_factory_; 120 const net::URLRequestJobFactory* old_factory_;
121 net::TestDelegate test_delegate_; 121 net::TestDelegate test_delegate_;
122 content::MockResourceContext resource_context_; 122 content::MockResourceContext resource_context_;
123 }; 123 };
124 124
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 { 216 {
217 net::URLRequest request(extension->GetResourceURL("webstore_icon_16.png"), 217 net::URLRequest request(extension->GetResourceURL("webstore_icon_16.png"),
218 &test_delegate_, 218 &test_delegate_,
219 resource_context_.GetRequestContext()); 219 resource_context_.GetRequestContext());
220 StartRequest(&request, ResourceType::MEDIA); 220 StartRequest(&request, ResourceType::MEDIA);
221 EXPECT_EQ(net::URLRequestStatus::SUCCESS, request.status().status()); 221 EXPECT_EQ(net::URLRequestStatus::SUCCESS, request.status().status());
222 } 222 }
223 } 223 }
224 224
225 } // namespace extensions 225 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698