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

Side by Side Diff: content/browser/renderer_host/resource_queue_unittest.cc

Issue 7624031: Treat files downloaded from the address bar as "always safe" (including extensions per discussion... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "content/browser/browser_thread.h" 7 #include "content/browser/browser_thread.h"
8 #include "content/browser/mock_resource_context.h" 8 #include "content/browser/mock_resource_context.h"
9 #include "content/browser/renderer_host/global_request_id.h" 9 #include "content/browser/renderer_host/global_request_id.h"
10 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" 10 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual void OnRequestClosed() { 69 virtual void OnRequestClosed() {
70 } 70 }
71 71
72 private: 72 private:
73 DISALLOW_COPY_AND_ASSIGN(DummyResourceHandler); 73 DISALLOW_COPY_AND_ASSIGN(DummyResourceHandler);
74 }; 74 };
75 75
76 ResourceDispatcherHostRequestInfo* GetRequestInfo(int request_id) { 76 ResourceDispatcherHostRequestInfo* GetRequestInfo(int request_id) {
77 return new ResourceDispatcherHostRequestInfo( 77 return new ResourceDispatcherHostRequestInfo(
78 new DummyResourceHandler(), ChildProcessInfo::RENDER_PROCESS, 0, 0, 0, 78 new DummyResourceHandler(), ChildProcessInfo::RENDER_PROCESS, 0, 0, 0,
79 request_id, false, -1, ResourceType::MAIN_FRAME, 0, false, false, false, 79 request_id, false, -1, ResourceType::MAIN_FRAME, PageTransition::LINK, 0,
80 content::MockResourceContext::GetInstance()); 80 false, false, false, content::MockResourceContext::GetInstance());
81 } 81 }
82 82
83 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) { 83 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) {
84 ResourceQueue::DelegateSet delegate_set; 84 ResourceQueue::DelegateSet delegate_set;
85 delegate_set.insert(delegate); 85 delegate_set.insert(delegate);
86 queue->Initialize(delegate_set); 86 queue->Initialize(delegate_set);
87 } 87 }
88 88
89 void InitializeQueue(ResourceQueue* queue, 89 void InitializeQueue(ResourceQueue* queue,
90 ResourceQueueDelegate* delegate1, 90 ResourceQueueDelegate* delegate1,
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 MessageLoop::current()->RunAllPending(); 288 MessageLoop::current()->RunAllPending();
289 EXPECT_EQ(0, response_started_count_); 289 EXPECT_EQ(0, response_started_count_);
290 290
291 queue.Shutdown(); 291 queue.Shutdown();
292 292
293 MessageLoop::current()->RunAllPending(); 293 MessageLoop::current()->RunAllPending();
294 EXPECT_EQ(0, response_started_count_); 294 EXPECT_EQ(0, response_started_count_);
295 } 295 }
296 296
297 } // namespace 297 } // namespace
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host_unittest.cc ('k') | content/common/page_transition_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698