[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

oliver at apple.com oliver at apple.com
Thu Oct 29 20:40:52 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 66c7ffe53b85818bdfc8d0ba44485c15600dcaac
Author: oliver at apple.com <oliver at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 7 07:17:47 2009 +0000

    Tidy up postMessage testcase
    
    Reviewed by Gavin Barraclough.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49229 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1a36c7a..29da50c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2009-10-07  Oliver Hunt  <oliver at apple.com>
+
+        Reviewed by Gavin Barraclough.
+
+        Tidy up postMessage testcase
+
+        * fast/dom/Window/window-postmessage-clone-expected.txt:
+        * fast/dom/Window/window-postmessage-clone.html:
+
 2009-10-07  Shinichiro Hamaji  <hamaji at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt b/LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt
index eded697..495ea7c 100644
--- a/LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt
@@ -1,6 +1,4 @@
-CONSOLE MESSAGE: line 54: RangeError: Maximum call stack size exceeded.
 Tests that we clone object hierarchies
-PASS: 'postMessage(cyclicObject)' threw ReferenceError: Can't find variable: cyclicObject
 PASS: 'postMessage(cyclicObject)' threw TypeError: Cannot post cyclic structures.
 PASS: 'postMessage(cyclicArray)' threw TypeError: Cannot post cyclic structures.
 PASS: 'postMessage(reallyDeepArray)' threw RangeError: Maximum call stack size exceeded.
@@ -16,7 +14,7 @@ PASS: eventData is of type object
 PASS: eventData is 1,2,3 of type object
 PASS: eventData is ,,1 of type object
 PASS: eventData is null of type object
-PASS: eventData is Wed Dec 31 1969 16:00:00 GMT-0800 (PST) of type object
-PASS: eventData is of type object
+PASS: eventData is 2009-02-13T23:31:30.000Z of type object
+PASS: eventData is [object Array](default toString threw RangeError: Maximum call stack size exceeded.) of type object
 PASS: eventData is done of type string
 
diff --git a/LayoutTests/fast/dom/Window/window-postmessage-clone.html b/LayoutTests/fast/dom/Window/window-postmessage-clone.html
index e9ab1e5..68e66c6 100644
--- a/LayoutTests/fast/dom/Window/window-postmessage-clone.html
+++ b/LayoutTests/fast/dom/Window/window-postmessage-clone.html
@@ -46,12 +46,24 @@ function equal(actual, expected)
     return true;
 }
 
+function safeToString(o) {
+    if (o instanceof Date)
+        return o.toISOString();
+    if (typeof o !== "object" || !o)
+        return o;
+    try {
+        return o.toString();
+    } catch (e) {
+        return Object.prototype.toString.call(o) + "(default toString threw "+e+")";
+    }
+}
+
 function shouldBe(actual, expected)
 {
     var actualValue = eval(actual);
     var expectedValue = eval(expected);
     if (equal(actualValue, expectedValue))
-        console.innerHTML += "PASS: " + actual + " is " + expectedValue + " of type " + typeof actualValue + "<br>";
+        console.innerHTML += "PASS: " + actual + " is " + safeToString(expectedValue) + " of type " + typeof actualValue + "<br>";
     else
         console.innerHTML += "FAIL: " + actual + " is " + actualValue + " should be " + expectedValue + " of type " + typeof expectedValue + "<br>";
 }
@@ -60,7 +72,7 @@ function onmessage(evt) {
     eventData = evt.data
     shouldBe("eventData", messages.shift());
 
-    if (evt.data == 'done' && window.layoutTestController)
+    if (safeToString(evt.data) == 'done' && window.layoutTestController)
         layoutTestController.notifyDone();
 }
 
@@ -94,8 +106,7 @@ tryPostMessage('[]');
 tryPostMessage('[1,2,3]');
 tryPostMessage('[,,1]');
 tryPostMessage('(function(){})', false, 'null');
-tryPostMessage('new Date(0)');
-tryPostMessage('cyclicObject', true);
+tryPostMessage('new Date(1234567890000)');
 cyclicObject={};
 cyclicObject.self = cyclicObject;
 tryPostMessage('cyclicObject', true);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list