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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 1208143002: Move existing kSitePerProcess checks to a policy-oracle object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@swapped_out_cmdline_checks
Patch Set: Attempt to fix compile. Created 5 years, 4 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/renderer/render_frame_proxy.cc ('k') | extensions/renderer/dispatcher.cc » ('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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 FrameHostMsg_DidCommitProvisionalLoad::Read(frame_navigate_msg, 758 FrameHostMsg_DidCommitProvisionalLoad::Read(frame_navigate_msg,
759 &commit_load_params); 759 &commit_load_params);
760 EXPECT_NE(GURL("swappedout://"), base::get<0>(commit_load_params).url); 760 EXPECT_NE(GURL("swappedout://"), base::get<0>(commit_load_params).url);
761 } 761 }
762 762
763 // Verify that security origins are replicated properly to RenderFrameProxies 763 // Verify that security origins are replicated properly to RenderFrameProxies
764 // when swapping out. 764 // when swapping out.
765 TEST_F(RenderViewImplTest, OriginReplicationForSwapOut) { 765 TEST_F(RenderViewImplTest, OriginReplicationForSwapOut) {
766 // This test should only run with --site-per-process, since origin 766 // This test should only run with --site-per-process, since origin
767 // replication only happens in that mode. 767 // replication only happens in that mode.
768 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 768 if (!AreAllSitesIsolatedForTesting())
769 switches::kSitePerProcess))
770 return; 769 return;
771 770
772 LoadHTML( 771 LoadHTML(
773 "Hello <iframe src='data:text/html,frame 1'></iframe>" 772 "Hello <iframe src='data:text/html,frame 1'></iframe>"
774 "<iframe src='data:text/html,frame 2'></iframe>"); 773 "<iframe src='data:text/html,frame 2'></iframe>");
775 WebFrame* web_frame = frame()->GetWebFrame(); 774 WebFrame* web_frame = frame()->GetWebFrame();
776 TestRenderFrame* child_frame = static_cast<TestRenderFrame*>( 775 TestRenderFrame* child_frame = static_cast<TestRenderFrame*>(
777 RenderFrame::FromWebFrame(web_frame->firstChild())); 776 RenderFrame::FromWebFrame(web_frame->firstChild()));
778 777
779 // Swap the child frame out and pass a replicated origin to be set for 778 // Swap the child frame out and pass a replicated origin to be set for
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 FROM_HERE, 2358 FROM_HERE,
2360 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); 2359 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this)));
2361 ExecuteJavaScriptForTests("debugger;"); 2360 ExecuteJavaScriptForTests("debugger;");
2362 2361
2363 // CloseWhilePaused should resume execution and continue here. 2362 // CloseWhilePaused should resume execution and continue here.
2364 EXPECT_FALSE(IsPaused()); 2363 EXPECT_FALSE(IsPaused());
2365 Detach(); 2364 Detach();
2366 } 2365 }
2367 2366
2368 } // namespace content 2367 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_proxy.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698