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

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

Issue 551973005: Streamline frame detach (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
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 3558 matching lines...) Expand 10 before | Expand all | Expand 10 after
3569 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false)); 3569 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false));
3570 RefPtr<LocalFrame> holdSecondFrame = secondFrame->frame(); 3570 RefPtr<LocalFrame> holdSecondFrame = secondFrame->frame();
3571 3571
3572 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) 3572 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false))
3573 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ; 3573 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ;
3574 3574
3575 runPendingTasks(); 3575 runPendingTasks();
3576 EXPECT_FALSE(client.findResultsAreReady()); 3576 EXPECT_FALSE(client.findResultsAreReady());
3577 3577
3578 mainFrame->resetMatchCount(); 3578 mainFrame->resetMatchCount();
3579 3579 mainFrame->scopeStringMatches(kFindIdentifier, searchText, options, true);
3580 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false))
3581 frame->scopeStringMatches(kFindIdentifier, searchText, options, true);
3582 3580
3583 // The first scopeStringMatches will have reset the state. Detach before it actually scopes. 3581 // The first scopeStringMatches will have reset the state. Detach before it actually scopes.
3584 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); 3582 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove());
3585 3583
3586 runPendingTasks(); 3584 runPendingTasks();
3587 EXPECT_TRUE(client.findResultsAreReady()); 3585 EXPECT_TRUE(client.findResultsAreReady());
3588 3586
3589 holdSecondFrame.release(); 3587 holdSecondFrame.release();
3590 } 3588 }
3591 3589
(...skipping 2680 matching lines...) Expand 10 before | Expand all | Expand 10 after
6272 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6270 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6273 6271
6274 // Neither should a page reload. 6272 // Neither should a page reload.
6275 localFrame->reload(); 6273 localFrame->reload();
6276 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6274 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6277 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6275 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6278 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6276 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6279 } 6277 }
6280 6278
6281 } // namespace 6279 } // namespace
OLDNEW
« Source/core/frame/Frame.cpp ('K') | « Source/web/RemoteFrameClient.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698