UIScriptController: script with no async tasks fails if an earlier script registered...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Nov 2016 23:05:00 +0000 (23:05 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Nov 2016 23:05:00 +0000 (23:05 +0000)
commit8d2d97ba35016e84505eaa2007688f288d61b37a
treecfe3a6fb0bdaa2b94d14bd14241e2c633b606a37
parentd6421f0ea94cd4ba3e6ca7856a2330ef03a3733f
UIScriptController: script with no async tasks fails if an earlier script registered a callback
https://bugs.webkit.org/show_bug.cgi?id=164762

Reviewed by Wenson Hsieh.

Tools:

Make TestRunner::callUIScriptCallback() async in DumpRenderTree to match WebKitTestRunner behavior.
This fixes ui-side-script-with-callback.html in WK1, which failed because the second runUIScript()
would occur inside the completion callback from the first. This no longer happens.

* DumpRenderTree/TestRunner.cpp:
(TestRunner::callUIScriptCallback):
* TestRunnerShared/UIScriptContext/UIScriptContext.cpp:
(UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback):

LayoutTests:

Move the tests that use runUIScript into their own directory for easier TestExpectations management,
and fix TestExpectations to match.

* TestExpectations:
* fast/harness/uiscriptcontroller/concurrent-ui-side-scripts-expected.txt: Renamed from LayoutTests/fast/harness/concurrent-ui-side-scripts-expected.txt.
* fast/harness/uiscriptcontroller/concurrent-ui-side-scripts.html: Renamed from LayoutTests/fast/harness/concurrent-ui-side-scripts.html.
* fast/harness/uiscriptcontroller/ui-side-script-unregister-callback-expected.txt: Copied from LayoutTests/fast/harness/ui-side-script-unregister-callback-expected.txt.
* fast/harness/uiscriptcontroller/ui-side-script-unregister-callback.html: Copied from LayoutTests/fast/harness/ui-side-script-unregister-callback.html.
* fast/harness/uiscriptcontroller/ui-side-script-with-callback-expected.txt: Renamed from LayoutTests/fast/harness/ui-side-script-unregister-callback-expected.txt.
* fast/harness/uiscriptcontroller/ui-side-script-with-callback.html: Renamed from LayoutTests/fast/harness/ui-side-script-unregister-callback.html.
* fast/harness/uiscriptcontroller/ui-side-scripts-expected.txt: Renamed from LayoutTests/fast/harness/ui-side-scripts-expected.txt.
* fast/harness/uiscriptcontroller/ui-side-scripts.html: Renamed from LayoutTests/fast/harness/ui-side-scripts.html.
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/harness/uiscriptcontroller/concurrent-ui-side-scripts-expected.txt [moved from LayoutTests/fast/harness/concurrent-ui-side-scripts-expected.txt with 100% similarity]
LayoutTests/fast/harness/uiscriptcontroller/concurrent-ui-side-scripts.html [moved from LayoutTests/fast/harness/concurrent-ui-side-scripts.html with 100% similarity]
LayoutTests/fast/harness/uiscriptcontroller/ui-side-script-unregister-callback-expected.txt [moved from LayoutTests/fast/harness/ui-side-script-unregister-callback-expected.txt with 100% similarity]
LayoutTests/fast/harness/uiscriptcontroller/ui-side-script-unregister-callback.html [moved from LayoutTests/fast/harness/ui-side-script-unregister-callback.html with 93% similarity]
LayoutTests/fast/harness/uiscriptcontroller/ui-side-script-with-callback-expected.txt [new file with mode: 0644]
LayoutTests/fast/harness/uiscriptcontroller/ui-side-script-with-callback.html [new file with mode: 0644]
LayoutTests/fast/harness/uiscriptcontroller/ui-side-scripts-expected.txt [moved from LayoutTests/fast/harness/ui-side-scripts-expected.txt with 100% similarity]
LayoutTests/fast/harness/uiscriptcontroller/ui-side-scripts.html [moved from LayoutTests/fast/harness/ui-side-scripts.html with 100% similarity]
LayoutTests/platform/mac/TestExpectations
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp
Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp