Chromium Code Reviews| 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 3172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3183 webViewHelper.webView()->resize(WebSize(640, 480)); | 3183 webViewHelper.webView()->resize(WebSize(640, 480)); |
| 3184 webViewHelper.webView()->layout(); | 3184 webViewHelper.webView()->layout(); |
| 3185 runPendingTasks(); | 3185 runPendingTasks(); |
| 3186 | 3186 |
| 3187 static const char* kFindString = "result"; | 3187 static const char* kFindString = "result"; |
| 3188 static const int kFindIdentifier = 12345; | 3188 static const int kFindIdentifier = 12345; |
| 3189 | 3189 |
| 3190 WebFindOptions options; | 3190 WebFindOptions options; |
| 3191 WebString searchText = WebString::fromUTF8(kFindString); | 3191 WebString searchText = WebString::fromUTF8(kFindString); |
| 3192 WebFrameImpl* mainFrame = toWebFrameImpl(webViewHelper.webView()->mainFrame( )); | 3192 WebFrameImpl* mainFrame = toWebFrameImpl(webViewHelper.webView()->mainFrame( )); |
| 3193 WebFrameImpl* secondFrame = toWebFrameImpl(mainFrame->traverseNext(false)); | 3193 RefPtr<WebFrameImpl> secondFrame = toWebFrameImpl(mainFrame->traverseNext(fa lse)); |
| 3194 RefPtr<WebCore::Frame> holdSecondFrame = secondFrame->frame(); | 3194 RefPtr<WebCore::Frame> holdSecondFrame = secondFrame->frame(); |
|
eseidel
2013/12/28 01:18:40
Doesn't secondFrame above hold this reference?
dcheng
2013/12/28 01:51:05
Logically, the embedder holds a reference to it, b
| |
| 3195 | 3195 |
| 3196 // Detach the frame before finding. | 3196 // Detach the frame before finding. |
| 3197 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); | 3197 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); |
| 3198 | 3198 |
| 3199 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0)) ; | 3199 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0)) ; |
| 3200 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false, 0)); | 3200 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false, 0)); |
| 3201 | 3201 |
| 3202 runPendingTasks(); | 3202 runPendingTasks(); |
| 3203 EXPECT_FALSE(client.findResultsAreReady()); | 3203 EXPECT_FALSE(client.findResultsAreReady()); |
| 3204 | 3204 |
| (...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4904 | 4904 |
| 4905 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(); | 4905 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(); |
| 4906 | 4906 |
| 4907 // After commit, there is. | 4907 // After commit, there is. |
| 4908 WebHistoryItem item = frame->currentHistoryItem(); | 4908 WebHistoryItem item = frame->currentHistoryItem(); |
| 4909 ASSERT_FALSE(item.isNull()); | 4909 ASSERT_FALSE(item.isNull()); |
| 4910 EXPECT_EQ(url, item.urlString().utf8()); | 4910 EXPECT_EQ(url, item.urlString().utf8()); |
| 4911 } | 4911 } |
| 4912 | 4912 |
| 4913 } // namespace | 4913 } // namespace |
| OLD | NEW |