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

Side by Side Diff: content/browser/web_contents/test_web_contents.cc

Issue 10450002: Transfer user agent override info between browser and renderer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Diff shows what we do downstream Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/web_contents/test_web_contents.h" 5 #include "content/browser/web_contents/test_web_contents.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/browser_url_handler_impl.h" 9 #include "content/browser/browser_url_handler_impl.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 webkit_glue::WebPreferences TestWebContents::TestGetWebkitPrefs() { 85 webkit_glue::WebPreferences TestWebContents::TestGetWebkitPrefs() {
86 return GetWebkitPrefs(); 86 return GetWebkitPrefs();
87 } 87 }
88 88
89 bool TestWebContents::CreateRenderViewForRenderManager( 89 bool TestWebContents::CreateRenderViewForRenderManager(
90 RenderViewHost* render_view_host, int opener_route_id) { 90 RenderViewHost* render_view_host, int opener_route_id) {
91 // This will go to a TestRenderViewHost. 91 // This will go to a TestRenderViewHost.
92 static_cast<RenderViewHostImpl*>( 92 static_cast<RenderViewHostImpl*>(
93 render_view_host)->CreateRenderView(string16(), opener_route_id, -1, -1); 93 render_view_host)->CreateRenderView(string16(), opener_route_id, -1, -1,
94 std::string());
94 return true; 95 return true;
95 } 96 }
96 97
97 WebContents* TestWebContents::Clone() { 98 WebContents* TestWebContents::Clone() {
98 WebContentsImpl* contents = new TestWebContents( 99 WebContentsImpl* contents = new TestWebContents(
99 GetBrowserContext(), 100 GetBrowserContext(),
100 SiteInstance::Create(GetBrowserContext())); 101 SiteInstance::Create(GetBrowserContext()));
101 contents->GetControllerImpl().CopyStateFrom(controller_); 102 contents->GetControllerImpl().CopyStateFrom(controller_);
102 return contents; 103 return contents;
103 } 104 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 int32 min_page_id) { 189 int32 min_page_id) {
189 EXPECT_TRUE(expect_set_history_length_and_prune_); 190 EXPECT_TRUE(expect_set_history_length_and_prune_);
190 expect_set_history_length_and_prune_ = false; 191 expect_set_history_length_and_prune_ = false;
191 EXPECT_EQ(expect_set_history_length_and_prune_site_instance_, site_instance); 192 EXPECT_EQ(expect_set_history_length_and_prune_site_instance_, site_instance);
192 EXPECT_EQ(expect_set_history_length_and_prune_history_length_, 193 EXPECT_EQ(expect_set_history_length_and_prune_history_length_,
193 history_length); 194 history_length);
194 EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id); 195 EXPECT_EQ(expect_set_history_length_and_prune_min_page_id_, min_page_id);
195 } 196 }
196 197
197 } // namespace content 198 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698