| 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 3201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3212 webViewHelper.webView()->resize(WebSize(640, 480)); | 3212 webViewHelper.webView()->resize(WebSize(640, 480)); |
| 3213 webViewHelper.webView()->layout(); | 3213 webViewHelper.webView()->layout(); |
| 3214 runPendingTasks(); | 3214 runPendingTasks(); |
| 3215 | 3215 |
| 3216 static const char* kFindString = "result"; | 3216 static const char* kFindString = "result"; |
| 3217 static const int kFindIdentifier = 12345; | 3217 static const int kFindIdentifier = 12345; |
| 3218 | 3218 |
| 3219 WebFindOptions options; | 3219 WebFindOptions options; |
| 3220 WebString searchText = WebString::fromUTF8(kFindString); | 3220 WebString searchText = WebString::fromUTF8(kFindString); |
| 3221 WebFrameImpl* mainFrame = toWebFrameImpl(webViewHelper.webView()->mainFrame(
)); | 3221 WebFrameImpl* mainFrame = toWebFrameImpl(webViewHelper.webView()->mainFrame(
)); |
| 3222 WebFrameImpl* secondFrame = toWebFrameImpl(mainFrame->traverseNext(false)); | 3222 RefPtr<WebFrameImpl> secondFrame = toWebFrameImpl(mainFrame->traverseNext(fa
lse)); |
| 3223 RefPtr<WebCore::Frame> holdSecondFrame = secondFrame->frame(); | 3223 RefPtr<WebCore::Frame> holdSecondFrame = secondFrame->frame(); |
| 3224 | 3224 |
| 3225 // Detach the frame before finding. | 3225 // Detach the frame before finding. |
| 3226 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); | 3226 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); |
| 3227 | 3227 |
| 3228 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0))
; | 3228 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0))
; |
| 3229 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false,
0)); | 3229 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false,
0)); |
| 3230 | 3230 |
| 3231 runPendingTasks(); | 3231 runPendingTasks(); |
| 3232 EXPECT_FALSE(client.findResultsAreReady()); | 3232 EXPECT_FALSE(client.findResultsAreReady()); |
| (...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4933 | 4933 |
| 4934 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(); | 4934 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(); |
| 4935 | 4935 |
| 4936 // After commit, there is. | 4936 // After commit, there is. |
| 4937 WebHistoryItem item = frame->currentHistoryItem(); | 4937 WebHistoryItem item = frame->currentHistoryItem(); |
| 4938 ASSERT_FALSE(item.isNull()); | 4938 ASSERT_FALSE(item.isNull()); |
| 4939 EXPECT_EQ(url, item.urlString().utf8()); | 4939 EXPECT_EQ(url, item.urlString().utf8()); |
| 4940 } | 4940 } |
| 4941 | 4941 |
| 4942 } // namespace | 4942 } // namespace |
| OLD | NEW |