| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 6129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6140 { | 6140 { |
| 6141 WebRemoteFrame* remoteFrame = WebRemoteFrame::create(0); | 6141 WebRemoteFrame* remoteFrame = WebRemoteFrame::create(0); |
| 6142 WebFrame* targetFrame = mainFrame()->firstChild()->nextSibling(); | 6142 WebFrame* targetFrame = mainFrame()->firstChild()->nextSibling(); |
| 6143 EXPECT_TRUE(targetFrame); | 6143 EXPECT_TRUE(targetFrame); |
| 6144 swapAndVerifySubframeConsistency("local->remote", targetFrame, remoteFrame); | 6144 swapAndVerifySubframeConsistency("local->remote", targetFrame, remoteFrame); |
| 6145 | 6145 |
| 6146 targetFrame = mainFrame()->firstChild()->nextSibling(); | 6146 targetFrame = mainFrame()->firstChild()->nextSibling(); |
| 6147 EXPECT_TRUE(targetFrame); | 6147 EXPECT_TRUE(targetFrame); |
| 6148 | 6148 |
| 6149 // Create child frames in the target frame before testing the swap. | 6149 // Create child frames in the target frame before testing the swap. |
| 6150 FrameTestHelpers::TestWebFrameClient remoteFrameClient; | 6150 FrameTestHelpers::TestWebRemoteFrameClient remoteFrameClient; |
| 6151 remoteFrame->createRemoteChild("", &remoteFrameClient); | 6151 remoteFrame->createRemoteChild("", &remoteFrameClient); |
| 6152 | 6152 |
| 6153 FrameTestHelpers::TestWebFrameClient client; | 6153 FrameTestHelpers::TestWebFrameClient client; |
| 6154 WebFrame* localFrame = WebLocalFrame::create(&client); | 6154 WebFrame* localFrame = WebLocalFrame::create(&client); |
| 6155 swapAndVerifySubframeConsistency("remote->local", targetFrame, localFrame); | 6155 swapAndVerifySubframeConsistency("remote->local", targetFrame, localFrame); |
| 6156 | 6156 |
| 6157 // FIXME: This almost certainly fires more load events on the iframe element | 6157 // FIXME: This almost certainly fires more load events on the iframe element |
| 6158 // than it should. | 6158 // than it should. |
| 6159 // Finally, make sure an embedder triggered load in the local frame swapped | 6159 // Finally, make sure an embedder triggered load in the local frame swapped |
| 6160 // back in works. | 6160 // back in works. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6272 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6272 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 6273 | 6273 |
| 6274 // Neither should a page reload. | 6274 // Neither should a page reload. |
| 6275 localFrame->reload(); | 6275 localFrame->reload(); |
| 6276 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 6276 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
| 6277 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 6277 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
| 6278 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6278 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 6279 } | 6279 } |
| 6280 | 6280 |
| 6281 } // namespace | 6281 } // namespace |
| OLD | NEW |