Changeset 208816 in webkit
- Timestamp:
- Nov 16, 2016 3:05:00 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
- 2 copied
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208815 r208816 1 2016-11-16 Simon Fraser <simon.fraser@apple.com> 2 3 UIScriptController: script with no async tasks fails if an earlier script registered a callback 4 https://bugs.webkit.org/show_bug.cgi?id=164762 5 6 Reviewed by Wenson Hsieh. 7 8 Move the tests that use runUIScript into their own directory for easier TestExpectations management, 9 and fix TestExpectations to match. 10 11 * TestExpectations: 12 * fast/harness/uiscriptcontroller/concurrent-ui-side-scripts-expected.txt: Renamed from LayoutTests/fast/harness/concurrent-ui-side-scripts-expected.txt. 13 * fast/harness/uiscriptcontroller/concurrent-ui-side-scripts.html: Renamed from LayoutTests/fast/harness/concurrent-ui-side-scripts.html. 14 * fast/harness/uiscriptcontroller/ui-side-script-unregister-callback-expected.txt: Copied from LayoutTests/fast/harness/ui-side-script-unregister-callback-expected.txt. 15 * fast/harness/uiscriptcontroller/ui-side-script-unregister-callback.html: Copied from LayoutTests/fast/harness/ui-side-script-unregister-callback.html. 16 * fast/harness/uiscriptcontroller/ui-side-script-with-callback-expected.txt: Renamed from LayoutTests/fast/harness/ui-side-script-unregister-callback-expected.txt. 17 * fast/harness/uiscriptcontroller/ui-side-script-with-callback.html: Renamed from LayoutTests/fast/harness/ui-side-script-unregister-callback.html. 18 * fast/harness/uiscriptcontroller/ui-side-scripts-expected.txt: Renamed from LayoutTests/fast/harness/ui-side-scripts-expected.txt. 19 * fast/harness/uiscriptcontroller/ui-side-scripts.html: Renamed from LayoutTests/fast/harness/ui-side-scripts.html. 20 * platform/mac/TestExpectations: 21 1 22 2016-11-16 Alex Christensen <achristensen@webkit.org> 2 23 -
trunk/LayoutTests/TestExpectations
r208807 r208816 57 57 58 58 # Only Mac and iOS have an implementation of UIScriptController::doAsyncTask(). 59 fast/harness/ui-side-scripts.html [ Skip ] 60 fast/harness/concurrent-ui-side-scripts.html [ Skip ] 59 fast/harness/uiscriptcontroller [ Skip ] 61 60 62 61 # This test only makes sense on Mac -
trunk/LayoutTests/fast/harness/uiscriptcontroller/ui-side-script-unregister-callback.html
r208815 r208816 3 3 <html> 4 4 <head> 5 <script src="../../ resources/js-test-pre.js"></script>5 <script src="../../../resources/js-test-pre.js"></script> 6 6 <script> 7 7 … … 59 59 60 60 <pre id="results"></pre> 61 <script src="../../ resources/js-test-post.js"></script>61 <script src="../../../resources/js-test-post.js"></script> 62 62 </body> 63 63 </html> -
trunk/LayoutTests/fast/harness/uiscriptcontroller/ui-side-script-with-callback-expected.txt
r208815 r208816 1 Test that a second immediate UI script returns if an earlier script registered then unregistereda callback1 Test that a second immediate UI script returns if an earlier script registered a callback 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". -
trunk/LayoutTests/fast/harness/uiscriptcontroller/ui-side-script-with-callback.html
r208815 r208816 3 3 <html> 4 4 <head> 5 <script src="../../ resources/js-test-pre.js"></script>5 <script src="../../../resources/js-test-pre.js"></script> 6 6 <script> 7 7 … … 11 11 { 12 12 return `(function() { 13 uiController.didEndScrollingCallback = function() { }; 14 uiController.didEndScrollingCallback = undefined; 13 uiController.willBeginZoomingCallback = function() {}; 15 14 16 15 uiController.doAsyncTask(function() { … … 30 29 function runTest() 31 30 { 32 description('Test that a second immediate UI script returns if an earlier script registered then unregistereda callback');31 description('Test that a second immediate UI script returns if an earlier script registered a callback'); 33 32 34 33 if (!window.testRunner) { … … 59 58 60 59 <pre id="results"></pre> 61 <script src="../../ resources/js-test-post.js"></script>60 <script src="../../../resources/js-test-post.js"></script> 62 61 </body> 63 62 </html> -
trunk/LayoutTests/platform/mac/TestExpectations
r208815 r208816 26 26 fast/attachment/attachment-subtitle-resize.html [ Pass ] 27 27 28 fast/harness/ui-side-scripts.html [ Pass ] 29 fast/harness/concurrent-ui-side-scripts.html [ Pass ] 28 fast/harness/uiscriptcontroller [ Pass ] 30 29 31 30 #////////////////////////////////////////////////////////////////////////////////////////// -
trunk/Tools/ChangeLog
r208795 r208816 1 2016-11-16 Simon Fraser <simon.fraser@apple.com> 2 3 UIScriptController: script with no async tasks fails if an earlier script registered a callback 4 https://bugs.webkit.org/show_bug.cgi?id=164762 5 6 Reviewed by Wenson Hsieh. 7 8 Make TestRunner::callUIScriptCallback() async in DumpRenderTree to match WebKitTestRunner behavior. 9 This fixes ui-side-script-with-callback.html in WK1, which failed because the second runUIScript() 10 would occur inside the completion callback from the first. This no longer happens. 11 12 * DumpRenderTree/TestRunner.cpp: 13 (TestRunner::callUIScriptCallback): 14 * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: 15 (UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback): 16 1 17 2016-11-16 Ryan Haddad <ryanhaddad@apple.com> 2 18 -
trunk/Tools/DumpRenderTree/TestRunner.cpp
r208509 r208816 52 52 #include <wtf/MathExtras.h> 53 53 #include <wtf/RefPtr.h> 54 #include <wtf/RunLoop.h> 54 55 #include <wtf/StdLibExtras.h> 55 56 #include <wtf/text/WTFString.h> … … 2393 2394 void TestRunner::callUIScriptCallback(unsigned callbackID, JSStringRef result) 2394 2395 { 2395 JSContextRef context = mainFrameJSContext(); 2396 JSValueRef resultValue = JSValueMakeString(context, result); 2397 callTestRunnerCallback(callbackID, 1, &resultValue); 2396 JSRetainPtr<JSStringRef> protectedResult(result); 2397 2398 RunLoop::main().dispatch([protectedThis = makeRef(*this), callbackID, protectedResult]() mutable { 2399 JSContextRef context = protectedThis->mainFrameJSContext(); 2400 JSValueRef resultValue = JSValueMakeString(context, protectedResult.get()); 2401 protectedThis->callTestRunnerCallback(callbackID, 1, &resultValue); 2402 }); 2398 2403 } 2399 2404 -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp
r208795 r208816 173 173 174 174 m_delegate.uiScriptDidComplete(scriptResult, m_currentScriptCallbackID); 175 176 // Unregister tasks associated with this callback 177 m_callbacks.removeIf([&](auto& keyAndValue) { 178 return keyAndValue.value.parentScriptCallbackID == m_currentScriptCallbackID; 179 }); 180 175 181 m_currentScriptCallbackID = 0; 176 182 if (result)
Note: See TracChangeset
for help on using the changeset viewer.