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

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

Issue 6995013: More progress towards removing content settings code from the content layer. We can't use Cookie... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments and sync Created 9 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) 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/renderer_host/global_request_id.h" 9 #include "content/browser/renderer_host/global_request_id.h"
9 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" 10 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
10 #include "content/browser/renderer_host/resource_handler.h" 11 #include "content/browser/renderer_host/resource_handler.h"
11 #include "content/browser/renderer_host/resource_queue.h" 12 #include "content/browser/renderer_host/resource_queue.h"
12 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
13 #include "net/url_request/url_request.h" 14 #include "net/url_request/url_request.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 16
16 namespace { 17 namespace {
17 18
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 virtual void OnRequestClosed() { 69 virtual void OnRequestClosed() {
69 } 70 }
70 71
71 private: 72 private:
72 DISALLOW_COPY_AND_ASSIGN(DummyResourceHandler); 73 DISALLOW_COPY_AND_ASSIGN(DummyResourceHandler);
73 }; 74 };
74 75
75 ResourceDispatcherHostRequestInfo* GetRequestInfo(int request_id) { 76 ResourceDispatcherHostRequestInfo* GetRequestInfo(int request_id) {
76 return new ResourceDispatcherHostRequestInfo( 77 return new ResourceDispatcherHostRequestInfo(
77 new DummyResourceHandler(), ChildProcessInfo::RENDER_PROCESS, 0, 0, 78 new DummyResourceHandler(), ChildProcessInfo::RENDER_PROCESS, 0, 0,
78 request_id, ResourceType::MAIN_FRAME, 0, false, false, false); 79 request_id, ResourceType::MAIN_FRAME, 0, false, false, false,
80 &content::MockResourceContext::GetInstance());
79 } 81 }
80 82
81 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) { 83 void InitializeQueue(ResourceQueue* queue, ResourceQueueDelegate* delegate) {
82 ResourceQueue::DelegateSet delegate_set; 84 ResourceQueue::DelegateSet delegate_set;
83 delegate_set.insert(delegate); 85 delegate_set.insert(delegate);
84 queue->Initialize(delegate_set); 86 queue->Initialize(delegate_set);
85 } 87 }
86 88
87 void InitializeQueue(ResourceQueue* queue, 89 void InitializeQueue(ResourceQueue* queue,
88 ResourceQueueDelegate* delegate1, 90 ResourceQueueDelegate* delegate1,
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 MessageLoop::current()->RunAllPending(); 288 MessageLoop::current()->RunAllPending();
287 EXPECT_EQ(0, response_started_count_); 289 EXPECT_EQ(0, response_started_count_);
288 290
289 queue.Shutdown(); 291 queue.Shutdown();
290 292
291 MessageLoop::current()->RunAllPending(); 293 MessageLoop::current()->RunAllPending();
292 EXPECT_EQ(0, response_started_count_); 294 EXPECT_EQ(0, response_started_count_);
293 } 295 }
294 296
295 } // namespace 297 } // namespace
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host_request_info.cc ('k') | net/base/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698