| 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 6878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6889 WebRemoteFrame* remoteFrame = WebRemoteFrame::create(0); | 6889 WebRemoteFrame* remoteFrame = WebRemoteFrame::create(0); |
| 6890 WebFrame* targetFrame = mainFrame()->firstChild()->nextSibling(); | 6890 WebFrame* targetFrame = mainFrame()->firstChild()->nextSibling(); |
| 6891 EXPECT_TRUE(targetFrame); | 6891 EXPECT_TRUE(targetFrame); |
| 6892 swapAndVerifySubframeConsistency("local->remote", targetFrame, remoteFrame); | 6892 swapAndVerifySubframeConsistency("local->remote", targetFrame, remoteFrame); |
| 6893 | 6893 |
| 6894 targetFrame = mainFrame()->firstChild()->nextSibling(); | 6894 targetFrame = mainFrame()->firstChild()->nextSibling(); |
| 6895 EXPECT_TRUE(targetFrame); | 6895 EXPECT_TRUE(targetFrame); |
| 6896 | 6896 |
| 6897 // Create child frames in the target frame before testing the swap. | 6897 // Create child frames in the target frame before testing the swap. |
| 6898 FrameTestHelpers::TestWebRemoteFrameClient remoteFrameClient; | 6898 FrameTestHelpers::TestWebRemoteFrameClient remoteFrameClient; |
| 6899 remoteFrame->createRemoteChild("", &remoteFrameClient); | 6899 remoteFrame->createRemoteChild("", WebSandboxFlags::None, &remoteFrameClient
); |
| 6900 | 6900 |
| 6901 FrameTestHelpers::TestWebFrameClient client; | 6901 FrameTestHelpers::TestWebFrameClient client; |
| 6902 WebFrame* localFrame = WebLocalFrame::create(&client); | 6902 WebFrame* localFrame = WebLocalFrame::create(&client); |
| 6903 swapAndVerifySubframeConsistency("remote->local", targetFrame, localFrame); | 6903 swapAndVerifySubframeConsistency("remote->local", targetFrame, localFrame); |
| 6904 | 6904 |
| 6905 // FIXME: This almost certainly fires more load events on the iframe element | 6905 // FIXME: This almost certainly fires more load events on the iframe element |
| 6906 // than it should. | 6906 // than it should. |
| 6907 // Finally, make sure an embedder triggered load in the local frame swapped | 6907 // Finally, make sure an embedder triggered load in the local frame swapped |
| 6908 // back in works. | 6908 // back in works. |
| 6909 FrameTestHelpers::loadFrame(localFrame, m_baseURL + "subframe-hello.html"); | 6909 FrameTestHelpers::loadFrame(localFrame, m_baseURL + "subframe-hello.html"); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7061 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7061 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 7062 | 7062 |
| 7063 // Neither should a page reload. | 7063 // Neither should a page reload. |
| 7064 localFrame->reload(); | 7064 localFrame->reload(); |
| 7065 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 7065 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
| 7066 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 7066 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
| 7067 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7067 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 7068 } | 7068 } |
| 7069 | 7069 |
| 7070 } // namespace | 7070 } // namespace |
| OLD | NEW |