Changeset 192039 in webkit
- Timestamp:
- Nov 4, 2015 3:34:47 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r192036 r192039 1 2015-11-04 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Fix crashing and flaky UIScriptController-based tests in fast/events/ios 4 https://bugs.webkit.org/show_bug.cgi?id=150901 5 <rdar://problem/23261499> 6 7 Reviewed by Simon Fraser. 8 9 Several changes to tests in fast/events/ios that address flaky behavior when running these tests. 10 Removes an unnecessary (and flaky) check for the initial innerHeight in 11 keyboard-should-not-trigger-resize.html, refactors unscalable-viewport-clicks-on-doubletap.html to 12 send successive taps like the other fast-clicking tests, and adjusts input-value-after-oninput.html 13 to no longer break if typing in an input autocapitalizes the first letter. 14 15 * fast/events/ios/input-value-after-oninput.html: 16 * fast/events/ios/keyboard-should-not-trigger-resize-expected.txt: 17 * fast/events/ios/keyboard-should-not-trigger-resize.html: 18 * fast/events/ios/unscalable-viewport-clicks-on-doubletap-expected.txt: 19 * fast/events/ios/unscalable-viewport-clicks-on-doubletap.html: 20 1 21 2015-11-04 Wenson Hsieh <wenson_hsieh@apple.com> 2 22 -
trunk/LayoutTests/fast/events/ios/input-value-after-oninput.html
r190407 r192039 25 25 26 26 function handleValueChanged(value) { 27 document.getElementById("console").textContent = "Successfully handled oninput, value is now \"" + value + "\"";27 document.getElementById("console").textContent = "Successfully handled oninput, value is now \"" + value.toLowerCase() + "\""; 28 28 testRunner.notifyDone(); 29 29 } -
trunk/LayoutTests/fast/events/ios/keyboard-should-not-trigger-resize-expected.txt
r191834 r192039 3 3 4 4 TEST COMPLETE 5 Before showing the keyboard, window.innerHeight = 4806 5 After showing the keyboard, window.innerHeight = 480 7 6 After hiding the keyboard, window.innerHeight = 480 -
trunk/LayoutTests/fast/events/ios/keyboard-should-not-trigger-resize.html
r191834 r192039 9 9 (function() { 10 10 uiController.didShowKeyboardCallback = function() { 11 uiController.didHideKeyboardCallback = function() { 12 uiController.uiScriptComplete(); 13 } 11 14 uiController.typeCharacterUsingHardwareKeyboard("a", function() { }); 12 }13 uiController.didHideKeyboardCallback = function() {14 uiController.uiScriptComplete();15 15 } 16 16 uiController.singleTapAtPoint(50, 25, function() {}); … … 31 31 function runTest() 32 32 { 33 debug("Before showing the keyboard, window.innerHeight = " + window.innerHeight);34 33 if (!window.testRunner || !testRunner.runUIScript) 35 34 return; -
trunk/LayoutTests/fast/events/ios/unscalable-viewport-clicks-on-doubletap-expected.txt
r191072 r192039 1 1 2 Double tapping on the button should fire 2 click events. 2 Repeatedly tapping on the button should fire click events. 3 4 This test is best run in WebKitTestRunner. If you are running this test manually, verify that tapping the button causes a "Click!" message to appear below, and that click occurred without the regular 350ms delay for double tapping. 5 6 Click! 3 7 Click! 4 8 Click! -
trunk/LayoutTests/fast/events/ios/unscalable-viewport-clicks-on-doubletap.html
r191072 r192039 7 7 <script id="ui-script" type="text/plain"> 8 8 (function() { 9 uiController.doubleTapAtPoint(50, 50, function() {}); 9 var count = 0; 10 function fireSuccessiveTaps() { 11 if (count < 3) 12 uiController.singleTapAtPoint(50, 50, fireSuccessiveTaps); 13 else 14 uiController.uiScriptComplete(""); 15 16 count++; 17 } 18 fireSuccessiveTaps(); 10 19 })(); 11 20 </script> 12 21 13 22 <script> 23 var scriptCompleted = false; 14 24 var clickCount = 0; 15 25 if (window.testRunner) { … … 24 34 function runTest() { 25 35 if (testRunner.runUIScript) { 26 testRunner.runUIScript(getUIScript(), function(result) {}); 36 testRunner.runUIScript(getUIScript(), function(result) { 37 scriptCompleted = true; 38 if (clickCount == 3) 39 testRunner.notifyDone(); 40 }); 27 41 } 28 42 } 43 29 44 function handleClicked() { 30 45 clickCount++; 31 46 document.body.appendChild(document.createTextNode("Click!")); 32 47 document.body.appendChild(document.createElement("br")); 33 if (clickCount == 2)48 if (clickCount == 3 && scriptCompleted) 34 49 testRunner.notifyDone(); 35 50 } … … 50 65 <body onload="runTest()"> 51 66 <button id="target" onclick="handleClicked()"></button> 52 <div>Double tapping on the button should fire 2 click events.</div> 67 <p>Repeatedly tapping on the button should fire click events.</p> 68 <p>This test is best run in WebKitTestRunner. If you are running this test manually, verify that tapping the button causes a "Click!" message to appear below, and that click occurred without the regular 350ms delay for double tapping.</p> 53 69 </body> 54 70 -
trunk/Tools/ChangeLog
r192027 r192039 1 2015-11-04 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Fix crashing and flaky UIScriptController-based tests in fast/events/ios 4 https://bugs.webkit.org/show_bug.cgi?id=150901 5 <rdar://problem/23261499> 6 7 Reviewed by Simon Fraser. 8 9 Clear out zooming and keyboard-related callbacks after uiScriptComplete has been invoked. This prevents 10 later tests from calling into code which previous tests attached to these callbacks and causing 11 WebKitTestRunner to crash due to accessing a deallocated UIScriptController. 12 13 * WebKitTestRunner/UIScriptContext/UIScriptController.cpp: 14 (WTR::UIScriptController::platformClearAllCallbacks): 15 (WTR::UIScriptController::uiScriptComplete): 16 * WebKitTestRunner/UIScriptContext/UIScriptController.h: 17 * WebKitTestRunner/ios/UIScriptControllerIOS.mm: 18 (WTR::UIScriptController::platformClearAllCallbacks): 19 1 20 2015-11-04 Jer Noble <jer.noble@apple.com> 2 21 -
trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.cpp
r190407 r192039 150 150 { 151 151 } 152 153 void UIScriptController::platformClearAllCallbacks() 154 { 155 } 152 156 #endif 153 157 … … 155 159 { 156 160 m_context.uiScriptComplete(result); 161 platformClearAllCallbacks(); 157 162 } 158 163 -
trunk/Tools/WebKitTestRunner/UIScriptContext/UIScriptController.h
r190407 r192039 78 78 void platformSetDidShowKeyboardCallback(); 79 79 void platformSetDidHideKeyboardCallback(); 80 void platformClearAllCallbacks(); 80 81 81 82 virtual JSClassRef wrapperClass() override; -
trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm
r190407 r192039 158 158 } 159 159 160 void UIScriptController::platformClearAllCallbacks() 161 { 162 TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView(); 163 m_didEndZoomingCallback = 0; 164 m_willBeginZoomingCallback = 0; 165 m_didHideKeyboardCallback = 0; 166 m_didShowKeyboardCallback = 0; 167 webView.didEndZoomingCallback = nil; 168 webView.willBeginZoomingCallback = nil; 169 webView.didHideKeyboardCallback = nil; 170 webView.didShowKeyboardCallback = nil; 171 } 172 160 173 } 161 174
Note: See TracChangeset
for help on using the changeset viewer.