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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 FrameHostMsg_DidCommitProvisionalLoad::Read(frame_navigate_msg, | 757 FrameHostMsg_DidCommitProvisionalLoad::Read(frame_navigate_msg, |
758 &commit_load_params); | 758 &commit_load_params); |
759 EXPECT_NE(GURL("swappedout://"), base::get<0>(commit_load_params).url); | 759 EXPECT_NE(GURL("swappedout://"), base::get<0>(commit_load_params).url); |
760 } | 760 } |
761 | 761 |
762 // Verify that security origins are replicated properly to RenderFrameProxies | 762 // Verify that security origins are replicated properly to RenderFrameProxies |
763 // when swapping out. | 763 // when swapping out. |
764 TEST_F(RenderViewImplTest, OriginReplicationForSwapOut) { | 764 TEST_F(RenderViewImplTest, OriginReplicationForSwapOut) { |
765 // This test should only run with --site-per-process, since origin | 765 // This test should only run with --site-per-process, since origin |
766 // replication only happens in that mode. | 766 // replication only happens in that mode. |
767 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 767 if (!AreAllSitesIsolatedForTesting()) |
768 switches::kSitePerProcess)) | |
769 return; | 768 return; |
770 | 769 |
771 LoadHTML( | 770 LoadHTML( |
772 "Hello <iframe src='data:text/html,frame 1'></iframe>" | 771 "Hello <iframe src='data:text/html,frame 1'></iframe>" |
773 "<iframe src='data:text/html,frame 2'></iframe>"); | 772 "<iframe src='data:text/html,frame 2'></iframe>"); |
774 WebFrame* web_frame = frame()->GetWebFrame(); | 773 WebFrame* web_frame = frame()->GetWebFrame(); |
775 TestRenderFrame* child_frame = static_cast<TestRenderFrame*>( | 774 TestRenderFrame* child_frame = static_cast<TestRenderFrame*>( |
776 RenderFrame::FromWebFrame(web_frame->firstChild())); | 775 RenderFrame::FromWebFrame(web_frame->firstChild())); |
777 | 776 |
778 // Swap the child frame out and pass a serialized origin to be set for | 777 // Swap the child frame out and pass a serialized origin to be set for |
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2352 FROM_HERE, | 2351 FROM_HERE, |
2353 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); | 2352 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); |
2354 ExecuteJavaScript("debugger;"); | 2353 ExecuteJavaScript("debugger;"); |
2355 | 2354 |
2356 // CloseWhilePaused should resume execution and continue here. | 2355 // CloseWhilePaused should resume execution and continue here. |
2357 EXPECT_FALSE(IsPaused()); | 2356 EXPECT_FALSE(IsPaused()); |
2358 Detach(); | 2357 Detach(); |
2359 } | 2358 } |
2360 | 2359 |
2361 } // namespace content | 2360 } // namespace content |
OLD | NEW |