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 3726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |