| 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/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 FrameHostMsg_DidCommitProvisionalLoad::Read(frame_navigate_msg, | 658 FrameHostMsg_DidCommitProvisionalLoad::Read(frame_navigate_msg, |
| 659 &commit_params); | 659 &commit_params); |
| 660 EXPECT_NE(GURL("swappedout://"), get<0>(commit_params).url); | 660 EXPECT_NE(GURL("swappedout://"), get<0>(commit_params).url); |
| 661 } | 661 } |
| 662 | 662 |
| 663 // Verify that security origins are replicated properly to RenderFrameProxies | 663 // Verify that security origins are replicated properly to RenderFrameProxies |
| 664 // when swapping out. | 664 // when swapping out. |
| 665 TEST_F(RenderViewImplTest, OriginReplicationForSwapOut) { | 665 TEST_F(RenderViewImplTest, OriginReplicationForSwapOut) { |
| 666 // This test should only run with --site-per-process, since origin | 666 // This test should only run with --site-per-process, since origin |
| 667 // replication only happens in that mode. | 667 // replication only happens in that mode. |
| 668 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) | 668 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 669 switches::kSitePerProcess)) |
| 669 return; | 670 return; |
| 670 | 671 |
| 671 LoadHTML( | 672 LoadHTML( |
| 672 "Hello <iframe src='data:text/html,frame 1'></iframe>" | 673 "Hello <iframe src='data:text/html,frame 1'></iframe>" |
| 673 "<iframe src='data:text/html,frame 2'></iframe>"); | 674 "<iframe src='data:text/html,frame 2'></iframe>"); |
| 674 WebFrame* web_frame = frame()->GetWebFrame(); | 675 WebFrame* web_frame = frame()->GetWebFrame(); |
| 675 RenderFrameImpl* child_frame = static_cast<RenderFrameImpl*>( | 676 RenderFrameImpl* child_frame = static_cast<RenderFrameImpl*>( |
| 676 RenderFrame::FromWebFrame(web_frame->firstChild())); | 677 RenderFrame::FromWebFrame(web_frame->firstChild())); |
| 677 | 678 |
| 678 // Swap the child frame out and pass a serialized origin to be set for | 679 // Swap the child frame out and pass a serialized origin to be set for |
| (...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2311 | 2312 |
| 2312 gfx::Size size = GetPreferredSize(); | 2313 gfx::Size size = GetPreferredSize(); |
| 2313 EXPECT_EQ(gfx::Size(400, 400), size); | 2314 EXPECT_EQ(gfx::Size(400, 400), size); |
| 2314 | 2315 |
| 2315 SetZoomLevel(ZoomFactorToZoomLevel(2.0)); | 2316 SetZoomLevel(ZoomFactorToZoomLevel(2.0)); |
| 2316 size = GetPreferredSize(); | 2317 size = GetPreferredSize(); |
| 2317 EXPECT_EQ(gfx::Size(800, 800), size); | 2318 EXPECT_EQ(gfx::Size(800, 800), size); |
| 2318 } | 2319 } |
| 2319 | 2320 |
| 2320 } // namespace content | 2321 } // namespace content |
| OLD | NEW |