[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
steveblock at google.com
steveblock at google.com
Wed Dec 22 12:41:52 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 636f40fbef230c2393f27e95d8a3aa8e81d6225a
Author: steveblock at google.com <steveblock at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 27 11:15:02 2010 +0000
2010-08-27 Steve Block <steveblock at google.com>
Reviewed by Darin Adler.
js-test-post.js is not robust for asynchronous tests
https://bugs.webkit.org/show_bug.cgi?id=44642
This patch moves finishJSTest() to js-test-pre.js to make it available for when an
asynchronous test completes before js-test-post.js has been parsed, and updates
js-test-post.js to handle this case.
* fast/dom/Window/window-property-descriptors-expected.txt:
* fast/js/resources/js-test-post.js:
* fast/js/resources/js-test-pre.js:
(finishJSTest):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e3af648..551f49c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-27 Steve Block <steveblock at google.com>
+
+ Reviewed by Darin Adler.
+
+ js-test-post.js is not robust for asynchronous tests
+ https://bugs.webkit.org/show_bug.cgi?id=44642
+
+ This patch moves finishJSTest() to js-test-pre.js to make it available for when an
+ asynchronous test completes before js-test-post.js has been parsed, and updates
+ js-test-post.js to handle this case.
+
+ * fast/dom/Window/window-property-descriptors-expected.txt:
+ * fast/js/resources/js-test-post.js:
+ * fast/js/resources/js-test-pre.js:
+ (finishJSTest):
+
2010-08-27 Nikolas Zimmermann <nzimmermann at rim.com>
Not reviewed. Remove trailing whitespace after test name, no need to duplicate the same test in mac/Skipped and mac-leopard/Skipped, oops.
diff --git a/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt b/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
index 63d269e..a76bf73 100644
--- a/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
@@ -347,6 +347,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'escapeHTML') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'eval') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'evalAndLog') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'event') is 'object'
+PASS typeof Object.getOwnPropertyDescriptor(window, 'finishJSTest') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'frameElement') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'frames') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'gc') is 'object'
diff --git a/LayoutTests/fast/js/resources/js-test-post.js b/LayoutTests/fast/js/resources/js-test-post.js
index 88882c5..11a9e5f 100644
--- a/LayoutTests/fast/js/resources/js-test-post.js
+++ b/LayoutTests/fast/js/resources/js-test-post.js
@@ -1,13 +1,9 @@
-function finishJSTest()
-{
- shouldBeTrue("successfullyParsed");
- debug('<br /><span class="pass">TEST COMPLETE</span>');
- if (window.jsTestIsAsync && window.layoutTestController)
- layoutTestController.notifyDone();
-}
+wasPostTestScriptParsed = true;
if (window.jsTestIsAsync) {
if (window.layoutTestController)
layoutTestController.waitUntilDone();
+ if (window.wasFinishJSTestCalled)
+ finishJSTest();
} else
finishJSTest();
diff --git a/LayoutTests/fast/js/resources/js-test-pre.js b/LayoutTests/fast/js/resources/js-test-pre.js
index aaab749..87db5d4 100644
--- a/LayoutTests/fast/js/resources/js-test-pre.js
+++ b/LayoutTests/fast/js/resources/js-test-pre.js
@@ -280,3 +280,16 @@ function gc() {
gcRec(10)
}
}
+
+// It's possible for an async test to call finishJSTest() before js-test-post.js
+// has been parsed.
+function finishJSTest()
+{
+ wasFinishJSTestCalled = true;
+ if (!window.wasPostTestScriptParsed)
+ return;
+ shouldBeTrue("successfullyParsed");
+ debug('<br /><span class="pass">TEST COMPLETE</span>');
+ if (window.jsTestIsAsync && window.layoutTestController)
+ layoutTestController.notifyDone();
+}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list