[Webkit-unassigned] [Bug 44642] New: js-test-post.js is not robust for asynchronous tests
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 25 15:44:08 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=44642
Summary: js-test-post.js is not robust for asynchronous tests
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: steveblock at google.com
CC: benm at google.com
LayoutTests that use the script-tests pattern use a standard HTML template. This includes fast/js/resources/js-test-pre.js, followed by the script for the test itself, followed by fast/js/resources/js-test-post.js.
If window.jsTestIsAsync has been set by the test, js-test-post.js calls layoutTestController.waitUntilDone(). The test should then call finishJSTest() when it completes. finishJSTest() is defined in js-test-post.js and calls layoutTestController.notifyDone().
However, it's possible for an asynchronous test to complete before js-test-post.js has been parsed. This can occur when the loading of this script is slow, causing WebCore to yield during loading and process asynchronous callbacks from the test. In this case, finishJSTest() is not yet defined, causing the test to fail.
One solution would be to update all such asynchronous tests to delay any testing until onload has fired. A less intrusive alternative is to move finishJSTest() to js-test-pre.js and add logic to js-test-post.js to handle the case of finishJSTest() having already been called.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list