| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL.c_str()), WebString::fromUTF8(fileName.c_str())); | 237 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseU
RL.c_str()), WebString::fromUTF8(fileName.c_str())); |
| 238 } | 238 } |
| 239 | 239 |
| 240 void testAutoResize(const WebSize& minAutoResize, const WebSize& maxAutoResi
ze, | 240 void testAutoResize(const WebSize& minAutoResize, const WebSize& maxAutoResi
ze, |
| 241 const std::string& pageWidth, const std::string& pageHei
ght, | 241 const std::string& pageWidth, const std::string& pageHei
ght, |
| 242 int expectedWidth, int expectedHeight, | 242 int expectedWidth, int expectedHeight, |
| 243 HorizontalScrollbarState expectedHorizontalState, Vertic
alScrollbarState expectedVerticalState); | 243 HorizontalScrollbarState expectedHorizontalState, Vertic
alScrollbarState expectedVerticalState); |
| 244 | 244 |
| 245 void testTextInputType(WebTextInputType expectedType, const std::string& htm
lFile); | 245 void testTextInputType(WebTextInputType expectedType, const std::string& htm
lFile); |
| 246 void testInputMode(const WebString& expectedInputMode, const std::string& ht
mlFile); | 246 void testInputMode(const WebString& expectedInputMode, const std::string& ht
mlFile); |
| 247 bool tapElement(WebInputEvent::Type, const PassRefPtrWillBeRawPtr<Element>&)
; | 247 bool tapElement(WebInputEvent::Type, const RawPtr<Element>&); |
| 248 bool tapElementById(WebInputEvent::Type, const WebString& id); | 248 bool tapElementById(WebInputEvent::Type, const WebString& id); |
| 249 | 249 |
| 250 std::string m_baseURL; | 250 std::string m_baseURL; |
| 251 FrameTestHelpers::WebViewHelper m_webViewHelper; | 251 FrameTestHelpers::WebViewHelper m_webViewHelper; |
| 252 }; | 252 }; |
| 253 | 253 |
| 254 TEST_F(WebViewTest, SaveImageAt) | 254 TEST_F(WebViewTest, SaveImageAt) |
| 255 { | 255 { |
| 256 SaveImageFromDataURLWebViewClient client; | 256 SaveImageFromDataURLWebViewClient client; |
| 257 | 257 |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 TEST_F(WebViewTest, BackForwardRestoreScroll) | 1229 TEST_F(WebViewTest, BackForwardRestoreScroll) |
| 1230 { | 1230 { |
| 1231 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("back_forward_restore_scroll.html")); | 1231 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("back_forward_restore_scroll.html")); |
| 1232 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(m_baseURL + "ba
ck_forward_restore_scroll.html"); | 1232 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(m_baseURL + "ba
ck_forward_restore_scroll.html"); |
| 1233 webViewImpl->resize(WebSize(640, 480)); | 1233 webViewImpl->resize(WebSize(640, 480)); |
| 1234 webViewImpl->updateAllLifecyclePhases(); | 1234 webViewImpl->updateAllLifecyclePhases(); |
| 1235 | 1235 |
| 1236 // Emulate a user scroll | 1236 // Emulate a user scroll |
| 1237 webViewImpl->mainFrame()->setScrollOffset(WebSize(0, 900)); | 1237 webViewImpl->mainFrame()->setScrollOffset(WebSize(0, 900)); |
| 1238 LocalFrame* mainFrameLocal = toLocalFrame(webViewImpl->page()->mainFrame()); | 1238 LocalFrame* mainFrameLocal = toLocalFrame(webViewImpl->page()->mainFrame()); |
| 1239 RefPtrWillBePersistent<HistoryItem> item1 = mainFrameLocal->loader().current
Item(); | 1239 Persistent<HistoryItem> item1 = mainFrameLocal->loader().currentItem(); |
| 1240 | 1240 |
| 1241 // Click an anchor | 1241 // Click an anchor |
| 1242 mainFrameLocal->loader().load(FrameLoadRequest(mainFrameLocal->document(), R
esourceRequest(mainFrameLocal->document()->completeURL("#a")))); | 1242 mainFrameLocal->loader().load(FrameLoadRequest(mainFrameLocal->document(), R
esourceRequest(mainFrameLocal->document()->completeURL("#a")))); |
| 1243 RefPtrWillBePersistent<HistoryItem> item2 = mainFrameLocal->loader().current
Item(); | 1243 Persistent<HistoryItem> item2 = mainFrameLocal->loader().currentItem(); |
| 1244 | 1244 |
| 1245 // Go back, then forward, then back again. | 1245 // Go back, then forward, then back again. |
| 1246 mainFrameLocal->loader().load( | 1246 mainFrameLocal->loader().load( |
| 1247 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( | 1247 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( |
| 1248 item1.get(), UseProtocolCachePolicy)), | 1248 item1.get(), UseProtocolCachePolicy)), |
| 1249 FrameLoadTypeBackForward, item1.get(), HistorySameDocumentLoad); | 1249 FrameLoadTypeBackForward, item1.get(), HistorySameDocumentLoad); |
| 1250 mainFrameLocal->loader().load( | 1250 mainFrameLocal->loader().load( |
| 1251 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( | 1251 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( |
| 1252 item2.get(), UseProtocolCachePolicy)), | 1252 item2.get(), UseProtocolCachePolicy)), |
| 1253 FrameLoadTypeBackForward, item2.get(), HistorySameDocumentLoad); | 1253 FrameLoadTypeBackForward, item2.get(), HistorySameDocumentLoad); |
| 1254 mainFrameLocal->loader().load( | 1254 mainFrameLocal->loader().load( |
| 1255 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( | 1255 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( |
| 1256 item1.get(), UseProtocolCachePolicy)), | 1256 item1.get(), UseProtocolCachePolicy)), |
| 1257 FrameLoadTypeBackForward, item1.get(), HistorySameDocumentLoad); | 1257 FrameLoadTypeBackForward, item1.get(), HistorySameDocumentLoad); |
| 1258 | 1258 |
| 1259 // Click a different anchor | 1259 // Click a different anchor |
| 1260 mainFrameLocal->loader().load(FrameLoadRequest(mainFrameLocal->document(), R
esourceRequest(mainFrameLocal->document()->completeURL("#b")))); | 1260 mainFrameLocal->loader().load(FrameLoadRequest(mainFrameLocal->document(), R
esourceRequest(mainFrameLocal->document()->completeURL("#b")))); |
| 1261 RefPtrWillBePersistent<HistoryItem> item3 = mainFrameLocal->loader().current
Item(); | 1261 Persistent<HistoryItem> item3 = mainFrameLocal->loader().currentItem(); |
| 1262 | 1262 |
| 1263 // Go back, then forward. The scroll position should be properly set on the
forward navigation. | 1263 // Go back, then forward. The scroll position should be properly set on the
forward navigation. |
| 1264 mainFrameLocal->loader().load( | 1264 mainFrameLocal->loader().load( |
| 1265 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( | 1265 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( |
| 1266 item1.get(), UseProtocolCachePolicy)), | 1266 item1.get(), UseProtocolCachePolicy)), |
| 1267 FrameLoadTypeBackForward, item1.get(), HistorySameDocumentLoad); | 1267 FrameLoadTypeBackForward, item1.get(), HistorySameDocumentLoad); |
| 1268 mainFrameLocal->loader().load( | 1268 mainFrameLocal->loader().load( |
| 1269 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( | 1269 FrameLoadRequest(nullptr, FrameLoader::resourceRequestFromHistoryItem( |
| 1270 item3.get(), UseProtocolCachePolicy)), | 1270 item3.get(), UseProtocolCachePolicy)), |
| 1271 FrameLoadTypeBackForward, item3.get(), HistorySameDocumentLoad); | 1271 FrameLoadTypeBackForward, item3.get(), HistorySameDocumentLoad); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1286 // Make the page scale and scroll with the given paremeters. | 1286 // Make the page scale and scroll with the given paremeters. |
| 1287 webViewImpl->setPageScaleFactor(2.0f); | 1287 webViewImpl->setPageScaleFactor(2.0f); |
| 1288 webViewImpl->mainFrame()->setScrollOffset(WebSize(94, 111)); | 1288 webViewImpl->mainFrame()->setScrollOffset(WebSize(94, 111)); |
| 1289 webViewImpl->setVisualViewportOffset(WebFloatPoint(12, 20)); | 1289 webViewImpl->setVisualViewportOffset(WebFloatPoint(12, 20)); |
| 1290 EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor()); | 1290 EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor()); |
| 1291 EXPECT_EQ(94, webViewImpl->mainFrame()->scrollOffset().width); | 1291 EXPECT_EQ(94, webViewImpl->mainFrame()->scrollOffset().width); |
| 1292 EXPECT_EQ(111, webViewImpl->mainFrame()->scrollOffset().height); | 1292 EXPECT_EQ(111, webViewImpl->mainFrame()->scrollOffset().height); |
| 1293 EXPECT_EQ(12, webViewImpl->visualViewportOffset().x); | 1293 EXPECT_EQ(12, webViewImpl->visualViewportOffset().x); |
| 1294 EXPECT_EQ(20, webViewImpl->visualViewportOffset().y); | 1294 EXPECT_EQ(20, webViewImpl->visualViewportOffset().y); |
| 1295 | 1295 |
| 1296 RefPtrWillBeRawPtr<Element> element = static_cast<PassRefPtrWillBeRawPtr<Ele
ment>>(webViewImpl->mainFrame()->document().body()); | 1296 RawPtr<Element> element = static_cast<RawPtr<Element>>(webViewImpl->mainFram
e()->document().body()); |
| 1297 webViewImpl->enterFullScreenForElement(element.get()); | 1297 webViewImpl->enterFullScreenForElement(element.get()); |
| 1298 webViewImpl->didEnterFullScreen(); | 1298 webViewImpl->didEnterFullScreen(); |
| 1299 | 1299 |
| 1300 // Page scale factor must be 1.0 during fullscreen for elements to be sized | 1300 // Page scale factor must be 1.0 during fullscreen for elements to be sized |
| 1301 // properly. | 1301 // properly. |
| 1302 EXPECT_EQ(1.0f, webViewImpl->pageScaleFactor()); | 1302 EXPECT_EQ(1.0f, webViewImpl->pageScaleFactor()); |
| 1303 | 1303 |
| 1304 // Make sure fullscreen nesting doesn't disrupt scroll/scale saving. | 1304 // Make sure fullscreen nesting doesn't disrupt scroll/scale saving. |
| 1305 RefPtrWillBeRawPtr<Element> otherElement = static_cast<PassRefPtrWillBeRawPt
r<Element>>(webViewImpl->mainFrame()->document().head()); | 1305 RawPtr<Element> otherElement = static_cast<RawPtr<Element>>(webViewImpl->mai
nFrame()->document().head()); |
| 1306 webViewImpl->enterFullScreenForElement(otherElement.get()); | 1306 webViewImpl->enterFullScreenForElement(otherElement.get()); |
| 1307 | 1307 |
| 1308 // Confirm that exiting fullscreen restores the parameters. | 1308 // Confirm that exiting fullscreen restores the parameters. |
| 1309 webViewImpl->didExitFullScreen(); | 1309 webViewImpl->didExitFullScreen(); |
| 1310 EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor()); | 1310 EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor()); |
| 1311 EXPECT_EQ(94, webViewImpl->mainFrame()->scrollOffset().width); | 1311 EXPECT_EQ(94, webViewImpl->mainFrame()->scrollOffset().width); |
| 1312 EXPECT_EQ(111, webViewImpl->mainFrame()->scrollOffset().height); | 1312 EXPECT_EQ(111, webViewImpl->mainFrame()->scrollOffset().height); |
| 1313 EXPECT_EQ(12, webViewImpl->visualViewportOffset().x); | 1313 EXPECT_EQ(12, webViewImpl->visualViewportOffset().x); |
| 1314 EXPECT_EQ(20, webViewImpl->visualViewportOffset().y); | 1314 EXPECT_EQ(20, webViewImpl->visualViewportOffset().y); |
| 1315 | 1315 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 void setContentDetectionResult(const WebContentDetectionResult& result) { m_
contentDetectionResult = result; } | 1430 void setContentDetectionResult(const WebContentDetectionResult& result) { m_
contentDetectionResult = result; } |
| 1431 | 1431 |
| 1432 private: | 1432 private: |
| 1433 bool m_contentDetectionRequested; | 1433 bool m_contentDetectionRequested; |
| 1434 bool m_pendingIntentsCancelled; | 1434 bool m_pendingIntentsCancelled; |
| 1435 WebURL m_scheduledIntentURL; | 1435 WebURL m_scheduledIntentURL; |
| 1436 bool m_wasInMainFrame; | 1436 bool m_wasInMainFrame; |
| 1437 WebContentDetectionResult m_contentDetectionResult; | 1437 WebContentDetectionResult m_contentDetectionResult; |
| 1438 }; | 1438 }; |
| 1439 | 1439 |
| 1440 bool WebViewTest::tapElement(WebInputEvent::Type type, const PassRefPtrWillBeRaw
Ptr<Element>& element) | 1440 bool WebViewTest::tapElement(WebInputEvent::Type type, const RawPtr<Element>& el
ement) |
| 1441 { | 1441 { |
| 1442 if (!element || !element->layoutObject()) | 1442 if (!element || !element->layoutObject()) |
| 1443 return false; | 1443 return false; |
| 1444 | 1444 |
| 1445 ASSERT(m_webViewHelper.webView()); | 1445 ASSERT(m_webViewHelper.webView()); |
| 1446 element->scrollIntoViewIfNeeded(); | 1446 element->scrollIntoViewIfNeeded(); |
| 1447 | 1447 |
| 1448 // TODO(bokan): Technically incorrect, event positions should be in viewport
space. crbug.com/371902. | 1448 // TODO(bokan): Technically incorrect, event positions should be in viewport
space. crbug.com/371902. |
| 1449 IntPoint center = m_webViewHelper.webViewImpl()->mainFrameImpl()->frameView(
)->contentsToScreen( | 1449 IntPoint center = m_webViewHelper.webViewImpl()->mainFrameImpl()->frameView(
)->contentsToScreen( |
| 1450 element->layoutObject()->absoluteBoundingBoxRect()).center(); | 1450 element->layoutObject()->absoluteBoundingBoxRect()).center(); |
| 1451 | 1451 |
| 1452 WebGestureEvent event; | 1452 WebGestureEvent event; |
| 1453 event.type = type; | 1453 event.type = type; |
| 1454 event.sourceDevice = WebGestureDeviceTouchscreen; | 1454 event.sourceDevice = WebGestureDeviceTouchscreen; |
| 1455 event.x = center.x(); | 1455 event.x = center.x(); |
| 1456 event.y = center.y(); | 1456 event.y = center.y(); |
| 1457 | 1457 |
| 1458 m_webViewHelper.webView()->handleInputEvent(event); | 1458 m_webViewHelper.webView()->handleInputEvent(event); |
| 1459 runPendingTasks(); | 1459 runPendingTasks(); |
| 1460 return true; | 1460 return true; |
| 1461 } | 1461 } |
| 1462 | 1462 |
| 1463 bool WebViewTest::tapElementById(WebInputEvent::Type type, const WebString& id) | 1463 bool WebViewTest::tapElementById(WebInputEvent::Type type, const WebString& id) |
| 1464 { | 1464 { |
| 1465 ASSERT(m_webViewHelper.webView()); | 1465 ASSERT(m_webViewHelper.webView()); |
| 1466 RefPtrWillBeRawPtr<Element> element = static_cast<PassRefPtrWillBeRawPtr<Ele
ment>>(m_webViewHelper.webView()->mainFrame()->document().getElementById(id)); | 1466 RawPtr<Element> element = static_cast<RawPtr<Element>>(m_webViewHelper.webVi
ew()->mainFrame()->document().getElementById(id)); |
| 1467 return tapElement(type, element); | 1467 return tapElement(type, element); |
| 1468 } | 1468 } |
| 1469 | 1469 |
| 1470 TEST_F(WebViewTest, DetectContentAroundPosition) | 1470 TEST_F(WebViewTest, DetectContentAroundPosition) |
| 1471 { | 1471 { |
| 1472 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("content_listeners.html")); | 1472 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), WebString::fromUTF8("content_listeners.html")); |
| 1473 | 1473 |
| 1474 ContentDetectorClient client; | 1474 ContentDetectorClient client; |
| 1475 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "content_li
steners.html", true, 0, &client); | 1475 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "content_li
steners.html", true, 0, &client); |
| 1476 webView->resize(WebSize(500, 300)); | 1476 webView->resize(WebSize(500, 300)); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "content_li
steners_iframe.html", true, 0, &client); | 1528 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "content_li
steners_iframe.html", true, 0, &client); |
| 1529 webView->resize(WebSize(500, 300)); | 1529 webView->resize(WebSize(500, 300)); |
| 1530 webView->updateAllLifecyclePhases(); | 1530 webView->updateAllLifecyclePhases(); |
| 1531 runPendingTasks(); | 1531 runPendingTasks(); |
| 1532 | 1532 |
| 1533 WebString noListener = WebString::fromUTF8("noListener"); | 1533 WebString noListener = WebString::fromUTF8("noListener"); |
| 1534 WebString frameName = WebString::fromUTF8("innerFrame"); | 1534 WebString frameName = WebString::fromUTF8("innerFrame"); |
| 1535 | 1535 |
| 1536 WebURL intentURL = toKURL(m_baseURL); | 1536 WebURL intentURL = toKURL(m_baseURL); |
| 1537 client.setContentDetectionResult(WebContentDetectionResult(WebRange(), WebSt
ring(), intentURL)); | 1537 client.setContentDetectionResult(WebContentDetectionResult(WebRange(), WebSt
ring(), intentURL)); |
| 1538 RefPtrWillBeRawPtr<Element> element = static_cast<PassRefPtrWillBeRawPtr<Ele
ment>>(webView->findFrameByName(frameName)->document().getElementById(noListener
)); | 1538 RawPtr<Element> element = static_cast<RawPtr<Element>>(webView->findFrameByN
ame(frameName)->document().getElementById(noListener)); |
| 1539 EXPECT_TRUE(tapElement(WebInputEvent::GestureTap, element)); | 1539 EXPECT_TRUE(tapElement(WebInputEvent::GestureTap, element)); |
| 1540 EXPECT_TRUE(client.scheduledIntentURL() == intentURL); | 1540 EXPECT_TRUE(client.scheduledIntentURL() == intentURL); |
| 1541 EXPECT_FALSE(client.wasInMainFrame()); | 1541 EXPECT_FALSE(client.wasInMainFrame()); |
| 1542 | 1542 |
| 1543 m_webViewHelper.reset(); // Explicitly reset to break dependency on locally
scoped client. | 1543 m_webViewHelper.reset(); // Explicitly reset to break dependency on locally
scoped client. |
| 1544 } | 1544 } |
| 1545 | 1545 |
| 1546 TEST_F(WebViewTest, ClientTapHandling) | 1546 TEST_F(WebViewTest, ClientTapHandling) |
| 1547 { | 1547 { |
| 1548 TapHandlingWebViewClient client; | 1548 TapHandlingWebViewClient client; |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2428 // This test checks that deleting nodes which have only non-JS-registered touch | 2428 // This test checks that deleting nodes which have only non-JS-registered touch |
| 2429 // handlers also removes them from the event handler registry. Note that this | 2429 // handlers also removes them from the event handler registry. Note that this |
| 2430 // is different from detaching and re-attaching the same node, which is covered | 2430 // is different from detaching and re-attaching the same node, which is covered |
| 2431 // by layout tests under fast/events/. | 2431 // by layout tests under fast/events/. |
| 2432 TEST_F(WebViewTest, DeleteElementWithRegisteredHandler) | 2432 TEST_F(WebViewTest, DeleteElementWithRegisteredHandler) |
| 2433 { | 2433 { |
| 2434 std::string url = m_baseURL + "simple_div.html"; | 2434 std::string url = m_baseURL + "simple_div.html"; |
| 2435 URLTestHelpers::registerMockedURLLoad(toKURL(url), "simple_div.html"); | 2435 URLTestHelpers::registerMockedURLLoad(toKURL(url), "simple_div.html"); |
| 2436 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true); | 2436 WebViewImpl* webViewImpl = m_webViewHelper.initializeAndLoad(url, true); |
| 2437 | 2437 |
| 2438 RefPtrWillBePersistent<Document> document = webViewImpl->mainFrameImpl()->fr
ame()->document(); | 2438 Persistent<Document> document = webViewImpl->mainFrameImpl()->frame()->docum
ent(); |
| 2439 Element* div = document->getElementById("div"); | 2439 Element* div = document->getElementById("div"); |
| 2440 EventHandlerRegistry& registry = document->frameHost()->eventHandlerRegistry
(); | 2440 EventHandlerRegistry& registry = document->frameHost()->eventHandlerRegistry
(); |
| 2441 | 2441 |
| 2442 registry.didAddEventHandler(*div, EventHandlerRegistry::ScrollEvent); | 2442 registry.didAddEventHandler(*div, EventHandlerRegistry::ScrollEvent); |
| 2443 EXPECT_TRUE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent)); | 2443 EXPECT_TRUE(registry.hasEventHandlers(EventHandlerRegistry::ScrollEvent)); |
| 2444 | 2444 |
| 2445 TrackExceptionState exceptionState; | 2445 TrackExceptionState exceptionState; |
| 2446 div->remove(exceptionState); | 2446 div->remove(exceptionState); |
| 2447 #if ENABLE(OILPAN) | 2447 #if ENABLE(OILPAN) |
| 2448 // For oilpan we have to force a GC to ensure the event handlers have been r
emoved when | 2448 // For oilpan we have to force a GC to ensure the event handlers have been r
emoved when |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3245 frame->setAutofillClient(&client); | 3245 frame->setAutofillClient(&client); |
| 3246 webView->setInitialFocus(false); | 3246 webView->setInitialFocus(false); |
| 3247 | 3247 |
| 3248 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel
lo").c_str()))); | 3248 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel
lo").c_str()))); |
| 3249 EXPECT_EQ(1, client.textChangesFromUserGesture()); | 3249 EXPECT_EQ(1, client.textChangesFromUserGesture()); |
| 3250 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); | 3250 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); |
| 3251 frame->setAutofillClient(0); | 3251 frame->setAutofillClient(0); |
| 3252 } | 3252 } |
| 3253 | 3253 |
| 3254 } // namespace blink | 3254 } // namespace blink |
| OLD | NEW |