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 3761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3772 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false)); | 3772 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext (false)); |
3773 RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame()); | 3773 RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame()); |
3774 | 3774 |
3775 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) | 3775 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) |
3776 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ; | 3776 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0)) ; |
3777 | 3777 |
3778 runPendingTasks(); | 3778 runPendingTasks(); |
3779 EXPECT_FALSE(client.findResultsAreReady()); | 3779 EXPECT_FALSE(client.findResultsAreReady()); |
3780 | 3780 |
3781 mainFrame->resetMatchCount(); | 3781 mainFrame->resetMatchCount(); |
3782 | 3782 mainFrame->scopeStringMatches(kFindIdentifier, searchText, options, true); |
dcheng
2014/10/14 21:43:37
Hmm. Is this change needed to fix a test? Or just
Nate Chapin
2014/10/14 21:45:07
That was a long time ago, and I don't remember. :)
| |
3783 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) | |
3784 frame->scopeStringMatches(kFindIdentifier, searchText, options, true); | |
3785 | 3783 |
3786 // The first scopeStringMatches will have reset the state. Detach before it actually scopes. | 3784 // The first scopeStringMatches will have reset the state. Detach before it actually scopes. |
3787 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); | 3785 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); |
3788 | 3786 |
3789 runPendingTasks(); | 3787 runPendingTasks(); |
3790 EXPECT_TRUE(client.findResultsAreReady()); | 3788 EXPECT_TRUE(client.findResultsAreReady()); |
3791 } | 3789 } |
3792 | 3790 |
3793 TEST_F(WebFrameTest, ResetMatchCount) | 3791 TEST_F(WebFrameTest, ResetMatchCount) |
3794 { | 3792 { |
(...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6722 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6720 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6723 | 6721 |
6724 // Neither should a page reload. | 6722 // Neither should a page reload. |
6725 localFrame->reload(); | 6723 localFrame->reload(); |
6726 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 6724 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
6727 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 6725 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
6728 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6726 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6729 } | 6727 } |
6730 | 6728 |
6731 } // namespace | 6729 } // namespace |
OLD | NEW |