OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |