Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: Source/web/tests/WebFrameTest.cpp

Issue 543913002: Hook up postMessages to WebRemoteFrameClient (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix webkit_unit_tests compile Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/tests/FrameTestHelpers.h ('k') | public/web/WebRemoteFrame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/web/tests/FrameTestHelpers.h ('k') | public/web/WebRemoteFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698