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

Side by Side Diff: chrome/browser/ui/search/instant_search_prerenderer_unittest.cc

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mem leak Created 6 years 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/ui/search/instant_search_prerenderer.h" 5 #include "chrome/browser/ui/search/instant_search_prerenderer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 void DummyPrerenderContents::StartPrerendering( 118 void DummyPrerenderContents::StartPrerendering(
119 int creator_child_id, 119 int creator_child_id,
120 const gfx::Size& size, 120 const gfx::Size& size,
121 content::SessionStorageNamespace* session_storage_namespace, 121 content::SessionStorageNamespace* session_storage_namespace,
122 net::URLRequestContextGetter* request_context) { 122 net::URLRequestContextGetter* request_context) {
123 prerender_contents_.reset(content::WebContents::CreateWithSessionStorage( 123 prerender_contents_.reset(content::WebContents::CreateWithSessionStorage(
124 content::WebContents::CreateParams(profile_), 124 content::WebContents::CreateParams(profile_),
125 session_storage_namespace_map_)); 125 session_storage_namespace_map_));
126 PrerenderTabHelper::CreateForWebContentsWithPasswordManager( 126 PrerenderTabHelper::CreateForWebContents(prerender_contents_.get());
127 prerender_contents_.get(), NULL);
128 content::NavigationController::LoadURLParams params(url_); 127 content::NavigationController::LoadURLParams params(url_);
129 prerender_contents_->GetController().LoadURLWithParams(params); 128 prerender_contents_->GetController().LoadURLWithParams(params);
130 SearchTabHelper::CreateForWebContents(prerender_contents_.get()); 129 SearchTabHelper::CreateForWebContents(prerender_contents_.get());
131 130
132 prerendering_has_started_ = true; 131 prerendering_has_started_ = true;
133 DCHECK(session_storage_namespace); 132 DCHECK(session_storage_namespace);
134 session_storage_namespace_id_ = session_storage_namespace->id(); 133 session_storage_namespace_id_ = session_storage_namespace->id();
135 NotifyPrerenderStart(); 134 NotifyPrerenderStart();
136 135
137 if (call_did_finish_load_) 136 if (call_did_finish_load_)
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 // Verify the IPC message params. 514 // Verify the IPC message params.
516 Tuple2<base::string16, EmbeddedSearchRequestParams> params; 515 Tuple2<base::string16, EmbeddedSearchRequestParams> params;
517 ChromeViewMsg_SearchBoxSubmit::Read(message, &params); 516 ChromeViewMsg_SearchBoxSubmit::Read(message, &params);
518 EXPECT_EQ("foo", base::UTF16ToASCII(params.a)); 517 EXPECT_EQ("foo", base::UTF16ToASCII(params.a));
519 EXPECT_EQ("f", base::UTF16ToASCII(params.b.original_query)); 518 EXPECT_EQ("f", base::UTF16ToASCII(params.b.original_query));
520 EXPECT_EQ("utf-8", base::UTF16ToASCII(params.b.input_encoding)); 519 EXPECT_EQ("utf-8", base::UTF16ToASCII(params.b.input_encoding));
521 EXPECT_EQ("", base::UTF16ToASCII(params.b.rlz_parameter_value)); 520 EXPECT_EQ("", base::UTF16ToASCII(params.b.rlz_parameter_value));
522 EXPECT_EQ("chrome...0", base::UTF16ToASCII(params.b.assisted_query_stats)); 521 EXPECT_EQ("chrome...0", base::UTF16ToASCII(params.b.assisted_query_stats));
523 } 522 }
524 #endif 523 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/login/login_prompt.cc ('k') | chrome/browser/ui/sync/one_click_signin_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698