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

Side by Side Diff: content/test/test_render_view_host.cc

Issue 1258273006: Remove page id from title and state updating. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch
Patch Set: comment nit Created 4 years, 2 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
« no previous file with comments | « content/test/test_render_view_host.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test/test_render_view_host.h" 5 #include "content/test/test_render_view_host.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 void TestRenderViewHost::TestOnStartDragging( 301 void TestRenderViewHost::TestOnStartDragging(
302 const DropData& drop_data) { 302 const DropData& drop_data) {
303 blink::WebDragOperationsMask drag_operation = blink::WebDragOperationEvery; 303 blink::WebDragOperationsMask drag_operation = blink::WebDragOperationEvery;
304 DragEventSourceInfo event_info; 304 DragEventSourceInfo event_info;
305 OnStartDragging(drop_data, drag_operation, SkBitmap(), gfx::Vector2d(), 305 OnStartDragging(drop_data, drag_operation, SkBitmap(), gfx::Vector2d(),
306 event_info); 306 event_info);
307 } 307 }
308 308
309 void TestRenderViewHost::TestOnUpdateStateWithFile( 309 void TestRenderViewHost::TestOnUpdateStateWithFile(
310 int page_id,
311 const base::FilePath& file_path) { 310 const base::FilePath& file_path) {
312 PageState state = PageState::CreateForTesting(GURL("http://www.google.com"), 311 PageState state = PageState::CreateForTesting(GURL("http://www.google.com"),
313 false, "data", &file_path); 312 false, "data", &file_path);
314 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { 313 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) {
315 static_cast<RenderFrameHostImpl*>(GetMainFrame())->OnUpdateState(state); 314 static_cast<RenderFrameHostImpl*>(GetMainFrame())->OnUpdateState(state);
316 } else { 315 } else {
317 OnUpdateState(page_id, state); 316 OnUpdateState(state);
318 } 317 }
319 } 318 }
320 319
321 RenderViewHostImplTestHarness::RenderViewHostImplTestHarness() { 320 RenderViewHostImplTestHarness::RenderViewHostImplTestHarness() {
322 std::vector<ui::ScaleFactor> scale_factors; 321 std::vector<ui::ScaleFactor> scale_factors;
323 scale_factors.push_back(ui::SCALE_FACTOR_100P); 322 scale_factors.push_back(ui::SCALE_FACTOR_100P);
324 scoped_set_supported_scale_factors_.reset( 323 scoped_set_supported_scale_factors_.reset(
325 new ui::test::ScopedSetSupportedScaleFactors(scale_factors)); 324 new ui::test::ScopedSetSupportedScaleFactors(scale_factors));
326 } 325 }
327 326
(...skipping 16 matching lines...) Expand all
344 343
345 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { 344 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() {
346 return contents()->GetMainFrame(); 345 return contents()->GetMainFrame();
347 } 346 }
348 347
349 TestWebContents* RenderViewHostImplTestHarness::contents() { 348 TestWebContents* RenderViewHostImplTestHarness::contents() {
350 return static_cast<TestWebContents*>(web_contents()); 349 return static_cast<TestWebContents*>(web_contents());
351 } 350 }
352 351
353 } // namespace content 352 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_render_view_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698