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