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

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

Issue 618253002: Revert of Streamline frame detach (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/RemoteFrameClientImpl.cpp ('k') | no next file » | 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 3726 matching lines...) Expand 10 before | Expand all | Expand 10 after
3737 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false)); 3737 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false));
3738 RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame()); 3738 RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame());
3739 3739
3740 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) 3740 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false))
3741 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ; 3741 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ;
3742 3742
3743 runPendingTasks(); 3743 runPendingTasks();
3744 EXPECT_FALSE(client.findResultsAreReady()); 3744 EXPECT_FALSE(client.findResultsAreReady());
3745 3745
3746 mainFrame->resetMatchCount(); 3746 mainFrame->resetMatchCount();
3747 mainFrame->scopeStringMatches(kFindIdentifier, searchText, options, true); 3747
3748 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false))
3749 frame->scopeStringMatches(kFindIdentifier, searchText, options, true);
3748 3750
3749 // The first scopeStringMatches will have reset the state. Detach before it actually scopes. 3751 // The first scopeStringMatches will have reset the state. Detach before it actually scopes.
3750 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); 3752 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove());
3751 3753
3752 runPendingTasks(); 3754 runPendingTasks();
3753 EXPECT_TRUE(client.findResultsAreReady()); 3755 EXPECT_TRUE(client.findResultsAreReady());
3754 } 3756 }
3755 3757
3756 TEST_F(WebFrameTest, ResetMatchCount) 3758 TEST_F(WebFrameTest, ResetMatchCount)
3757 { 3759 {
(...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after
6627 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6629 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6628 6630
6629 // Neither should a page reload. 6631 // Neither should a page reload.
6630 localFrame->reload(); 6632 localFrame->reload();
6631 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); 6633 EXPECT_EQ(4u, frameClient.provisionalLoadCount());
6632 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); 6634 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition());
6633 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); 6635 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount());
6634 } 6636 }
6635 6637
6636 } // namespace 6638 } // namespace
OLDNEW
« no previous file with comments | « Source/web/RemoteFrameClientImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698