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

Side by Side Diff: chrome/browser/search/iframe_source_unittest.cc

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/search/iframe_source.h" 5 #include "chrome/browser/search/iframe_source.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 scoped_ptr<net::URLRequest> MockRequest( 92 scoped_ptr<net::URLRequest> MockRequest(
93 const std::string& url, 93 const std::string& url,
94 bool allocate_info, 94 bool allocate_info,
95 int render_process_id, 95 int render_process_id,
96 int render_frame_id) { 96 int render_frame_id) {
97 scoped_ptr<net::URLRequest> request( 97 scoped_ptr<net::URLRequest> request(
98 resource_context_.GetRequestContext()->CreateRequest( 98 resource_context_.GetRequestContext()->CreateRequest(
99 GURL(url), 99 GURL(url),
100 net::DEFAULT_PRIORITY, 100 net::DEFAULT_PRIORITY,
101 NULL,
102 NULL)); 101 NULL));
103 if (allocate_info) { 102 if (allocate_info) {
104 content::ResourceRequestInfo::AllocateForTesting( 103 content::ResourceRequestInfo::AllocateForTesting(
105 request.get(), 104 request.get(),
106 content::RESOURCE_TYPE_SUB_FRAME, 105 content::RESOURCE_TYPE_SUB_FRAME,
107 &resource_context_, 106 &resource_context_,
108 render_process_id, 107 render_process_id,
109 render_frame_id, 108 render_frame_id,
110 MSG_ROUTING_NONE, 109 MSG_ROUTING_NONE,
111 false, // is_main_frame 110 false, // is_main_frame
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 192 }
194 193
195 TEST_F(IframeSourceTest, SendJSWithOrigin) { 194 TEST_F(IframeSourceTest, SendJSWithOrigin) {
196 SendJSWithOrigin(IDR_MOST_VISITED_TITLE_JS, kInstantRendererPID, 0); 195 SendJSWithOrigin(IDR_MOST_VISITED_TITLE_JS, kInstantRendererPID, 0);
197 EXPECT_FALSE(response_string().empty()); 196 EXPECT_FALSE(response_string().empty());
198 SendJSWithOrigin(IDR_MOST_VISITED_TITLE_JS, kNonInstantRendererPID, 0); 197 SendJSWithOrigin(IDR_MOST_VISITED_TITLE_JS, kNonInstantRendererPID, 0);
199 EXPECT_FALSE(response_string().empty()); 198 EXPECT_FALSE(response_string().empty());
200 SendJSWithOrigin(IDR_MOST_VISITED_TITLE_JS, kInvalidRendererPID, 0); 199 SendJSWithOrigin(IDR_MOST_VISITED_TITLE_JS, kInvalidRendererPID, 0);
201 EXPECT_TRUE(response_string().empty()); 200 EXPECT_TRUE(response_string().empty());
202 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698