| 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 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3184 webViewHelper.webView()->resize(WebSize(640, 480)); | 3184 webViewHelper.webView()->resize(WebSize(640, 480)); |
| 3185 webViewHelper.webView()->layout(); | 3185 webViewHelper.webView()->layout(); |
| 3186 runPendingTasks(); | 3186 runPendingTasks(); |
| 3187 | 3187 |
| 3188 static const char* kFindString = "result"; | 3188 static const char* kFindString = "result"; |
| 3189 static const int kFindIdentifier = 12345; | 3189 static const int kFindIdentifier = 12345; |
| 3190 | 3190 |
| 3191 WebFindOptions options; | 3191 WebFindOptions options; |
| 3192 WebString searchText = WebString::fromUTF8(kFindString); | 3192 WebString searchText = WebString::fromUTF8(kFindString); |
| 3193 WebFrameImpl* mainFrame = toWebFrameImpl(webViewHelper.webView()->mainFrame(
)); | 3193 WebFrameImpl* mainFrame = toWebFrameImpl(webViewHelper.webView()->mainFrame(
)); |
| 3194 WebFrameImpl* secondFrame = toWebFrameImpl(mainFrame->traverseNext(false)); | 3194 RefPtr<WebFrameImpl> secondFrame = toWebFrameImpl(mainFrame->traverseNext(fa
lse)); |
| 3195 RefPtr<WebCore::Frame> holdSecondFrame = secondFrame->frame(); | 3195 RefPtr<WebCore::Frame> holdSecondFrame = secondFrame->frame(); |
| 3196 | 3196 |
| 3197 // Detach the frame before finding. | 3197 // Detach the frame before finding. |
| 3198 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); | 3198 EXPECT_TRUE(mainFrame->document().getElementById("frame").remove()); |
| 3199 | 3199 |
| 3200 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0))
; | 3200 EXPECT_TRUE(mainFrame->find(kFindIdentifier, searchText, options, false, 0))
; |
| 3201 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false,
0)); | 3201 EXPECT_FALSE(secondFrame->find(kFindIdentifier, searchText, options, false,
0)); |
| 3202 | 3202 |
| 3203 runPendingTasks(); | 3203 runPendingTasks(); |
| 3204 EXPECT_FALSE(client.findResultsAreReady()); | 3204 EXPECT_FALSE(client.findResultsAreReady()); |
| (...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4883 | 4883 |
| 4884 // Call javascript to make the layer scrollable, and verify it. | 4884 // Call javascript to make the layer scrollable, and verify it. |
| 4885 WebFrameImpl* frame = (WebFrameImpl*)webViewHelper.webView()->mainFrame(); | 4885 WebFrameImpl* frame = (WebFrameImpl*)webViewHelper.webView()->mainFrame(); |
| 4886 frame->executeScript(WebScriptSource("allowScroll();")); | 4886 frame->executeScript(WebScriptSource("allowScroll();")); |
| 4887 webViewHelper.webView()->layout(); | 4887 webViewHelper.webView()->layout(); |
| 4888 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); | 4888 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); |
| 4889 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); | 4889 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); |
| 4890 } | 4890 } |
| 4891 | 4891 |
| 4892 } // namespace | 4892 } // namespace |
| OLD | NEW |