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

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

Issue 694773003: Allow URL requests for object/embed tags to be intercepted as streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-guest-view-container-3
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 ResourceType resource_type) { 129 ResourceType resource_type) {
130 content::ResourceRequestInfo::AllocateForTesting( 130 content::ResourceRequestInfo::AllocateForTesting(
131 request, 131 request,
132 resource_type, 132 resource_type,
133 &resource_context_, 133 &resource_context_,
134 -1, // render_process_id 134 -1, // render_process_id
135 -1, // render_view_id 135 -1, // render_view_id
136 -1, // render_frame_id 136 -1, // render_frame_id
137 resource_type == content::RESOURCE_TYPE_MAIN_FRAME, // is_main_frame 137 resource_type == content::RESOURCE_TYPE_MAIN_FRAME, // is_main_frame
138 false, // parent_is_main_frame 138 false, // parent_is_main_frame
139 true, // allow_download
139 false); // is_async 140 false); // is_async
140 request->Start(); 141 request->Start();
141 base::MessageLoop::current()->Run(); 142 base::MessageLoop::current()->Run();
142 } 143 }
143 144
144 protected: 145 protected:
145 content::TestBrowserThreadBundle thread_bundle_; 146 content::TestBrowserThreadBundle thread_bundle_;
146 scoped_refptr<InfoMap> extension_info_map_; 147 scoped_refptr<InfoMap> extension_info_map_;
147 net::URLRequestJobFactoryImpl job_factory_; 148 net::URLRequestJobFactoryImpl job_factory_;
148 const net::URLRequestJobFactory* old_factory_; 149 const net::URLRequestJobFactory* old_factory_;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 extension->GetResourceURL("test.dat"), 359 extension->GetResourceURL("test.dat"),
359 net::DEFAULT_PRIORITY, 360 net::DEFAULT_PRIORITY,
360 &test_delegate_, 361 &test_delegate_,
361 NULL)); 362 NULL));
362 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA); 363 StartRequest(request.get(), content::RESOURCE_TYPE_MEDIA);
363 EXPECT_EQ(net::URLRequestStatus::FAILED, request->status().status()); 364 EXPECT_EQ(net::URLRequestStatus::FAILED, request->status().status());
364 } 365 }
365 } 366 }
366 367
367 } // namespace extensions 368 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698