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

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

Issue 1415603018: OOPIF: Support session restore by combining/splitting frame states. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up and fix bugs Created 5 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/public/platform/WebHTTPBody.h » ('j') | 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 "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 9 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
10 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 10 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 const DropData& drop_data) { 288 const DropData& drop_data) {
289 blink::WebDragOperationsMask drag_operation = blink::WebDragOperationEvery; 289 blink::WebDragOperationsMask drag_operation = blink::WebDragOperationEvery;
290 DragEventSourceInfo event_info; 290 DragEventSourceInfo event_info;
291 OnStartDragging(drop_data, drag_operation, SkBitmap(), gfx::Vector2d(), 291 OnStartDragging(drop_data, drag_operation, SkBitmap(), gfx::Vector2d(),
292 event_info); 292 event_info);
293 } 293 }
294 294
295 void TestRenderViewHost::TestOnUpdateStateWithFile( 295 void TestRenderViewHost::TestOnUpdateStateWithFile(
296 int page_id, 296 int page_id,
297 const base::FilePath& file_path) { 297 const base::FilePath& file_path) {
298 PageState state = PageState::CreateForTesting(GURL("http://www.google.com"),
299 false, "data", &file_path);
300 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { 298 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) {
299 ExplodedFrameState state;
300 // TODO(creis): Add a CreateForTesting for ExplodedFrameState and fill in
301 // the other parameters.
301 static_cast<RenderFrameHostImpl*>(GetMainFrame())->OnUpdateState(state); 302 static_cast<RenderFrameHostImpl*>(GetMainFrame())->OnUpdateState(state);
302 } else { 303 } else {
304 PageState state = PageState::CreateForTesting(GURL("http://www.google.com"),
305 false, "data", &file_path);
303 OnUpdateState(page_id, state); 306 OnUpdateState(page_id, state);
304 } 307 }
305 } 308 }
306 309
307 RenderViewHostImplTestHarness::RenderViewHostImplTestHarness() { 310 RenderViewHostImplTestHarness::RenderViewHostImplTestHarness() {
308 std::vector<ui::ScaleFactor> scale_factors; 311 std::vector<ui::ScaleFactor> scale_factors;
309 scale_factors.push_back(ui::SCALE_FACTOR_100P); 312 scale_factors.push_back(ui::SCALE_FACTOR_100P);
310 scoped_set_supported_scale_factors_.reset( 313 scoped_set_supported_scale_factors_.reset(
311 new ui::test::ScopedSetSupportedScaleFactors(scale_factors)); 314 new ui::test::ScopedSetSupportedScaleFactors(scale_factors));
312 } 315 }
(...skipping 17 matching lines...) Expand all
330 333
331 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { 334 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() {
332 return contents()->GetMainFrame(); 335 return contents()->GetMainFrame();
333 } 336 }
334 337
335 TestWebContents* RenderViewHostImplTestHarness::contents() { 338 TestWebContents* RenderViewHostImplTestHarness::contents() {
336 return static_cast<TestWebContents*>(web_contents()); 339 return static_cast<TestWebContents*>(web_contents());
337 } 340 }
338 341
339 } // namespace content 342 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/public/platform/WebHTTPBody.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698