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 3557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3568 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext
(false)); | 3568 WebLocalFrameImpl* secondFrame = toWebLocalFrameImpl(mainFrame->traverseNext
(false)); |
3569 RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame()); | 3569 RefPtrWillBeRawPtr<LocalFrame> holdSecondFrame(secondFrame->frame()); |
3570 | 3570 |
3571 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) | 3571 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) |
3572 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0))
; | 3572 EXPECT_TRUE(frame->find(kFindIdentifier, searchText, options, false, 0))
; |
3573 | 3573 |
3574 runPendingTasks(); | 3574 runPendingTasks(); |
3575 EXPECT_FALSE(client.findResultsAreReady()); | 3575 EXPECT_FALSE(client.findResultsAreReady()); |
3576 | 3576 |
3577 mainFrame->resetMatchCount(); | 3577 mainFrame->resetMatchCount(); |
3578 | 3578 mainFrame->scopeStringMatches(kFindIdentifier, searchText, options, true); |
3579 for (WebFrame* frame = mainFrame; frame; frame = frame->traverseNext(false)) | |
3580 frame->scopeStringMatches(kFindIdentifier, searchText, options, true); | |
3581 | 3579 |
3582 // The first scopeStringMatches will have reset the state. Detach before it
actually scopes. | 3580 // The first scopeStringMatches will have reset the state. Detach before it
actually scopes. |
3583 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); | 3581 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); |
3584 | 3582 |
3585 runPendingTasks(); | 3583 runPendingTasks(); |
3586 EXPECT_TRUE(client.findResultsAreReady()); | 3584 EXPECT_TRUE(client.findResultsAreReady()); |
3587 } | 3585 } |
3588 | 3586 |
3589 TEST_F(WebFrameTest, ResetMatchCount) | 3587 TEST_F(WebFrameTest, ResetMatchCount) |
3590 { | 3588 { |
(...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6346 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6344 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6347 | 6345 |
6348 // Neither should a page reload. | 6346 // Neither should a page reload. |
6349 localFrame->reload(); | 6347 localFrame->reload(); |
6350 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 6348 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
6351 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 6349 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
6352 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 6350 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
6353 } | 6351 } |
6354 | 6352 |
6355 } // namespace | 6353 } // namespace |
OLD | NEW |