Commit e7f0902b authored by mrobinson@webkit.org's avatar mrobinson@webkit.org

2011-01-07 Martin Robinson <mrobinson@igalia.com>

        Reviewed by Mihai Parparita.

        fast/dom/Window/window-postmessage-clone-frames.html has some timing issues
        https://bugs.webkit.org/show_bug.cgi?id=52032

        Fix the timing issue in fast/dom/Window/window-postmessage-clone-frames.html
        and move the output console div beyond the file input control, so that output
        text does not push it outside the viewport.

        * fast/dom/Window/window-postmessage-clone-frames-expected.txt: Updated results
        to reflect div movement.
        * fast/dom/Window/window-postmessage-clone-frames.html: Fix the timing and
        layout issues with this test.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d274dbab
2011-01-07 Martin Robinson <mrobinson@igalia.com>
Reviewed by Mihai Parparita.
fast/dom/Window/window-postmessage-clone-frames.html has some timing issues
https://bugs.webkit.org/show_bug.cgi?id=52032
Fix the timing issue in fast/dom/Window/window-postmessage-clone-frames.html
and move the output console div beyond the file input control, so that output
text does not push it outside the viewport.
* fast/dom/Window/window-postmessage-clone-frames-expected.txt: Updated results
to reflect div movement.
* fast/dom/Window/window-postmessage-clone-frames.html: Fix the timing and
layout issues with this test.
2011-01-07 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Ojan Vafai.
......
Tests that we clone object hierarchies
PASS: (frames[0].tests[0]).eventData instanceof (frames[0]).Object is true of type boolean
PASS: (frames[0].tests[0]).event.data instanceof (frames[0]).Object is true of type boolean
PASS: (frames[0].tests[1]).eventData instanceof (frames[0]).Array is true of type boolean
......@@ -9,4 +10,4 @@ PASS: (frames[0].tests[3]).eventData instanceof (frames[0]).File is true of type
PASS: (frames[0].tests[3]).event.data instanceof (frames[0]).File is true of type boolean
PASS: (frames[0].tests[4]).eventData instanceof (frames[0]).FileList is true of type boolean
PASS: (frames[0].tests[4]).event.data instanceof (frames[0]).FileList is true of type boolean
......@@ -2,8 +2,8 @@
<head></head>
<body>
<div id="description"></div>
<div id="console"></div>
<input type="file" id="fileInput">
<div id="console"></div>
<iframe src="resources/window-postmessage-clone-frames-frame.html" onload="startTest()"></iframe>
<script>
if (window.layoutTestController) {
......@@ -76,11 +76,15 @@ function shouldBe(actual, expected)
}
var i = 0;
window.onmessage = function(evt) {
if (safeToString(frames[0].tests[i].eventData) == 'done') {
if (window.layoutTestController)
layoutTestController.notifyDone();
return;
}
shouldBe("(frames[0].tests["+i+"]).eventData instanceof (frames[0])."+tests[i].constructor, "true");
shouldBe("(frames[0].tests["+i+"]).event.data instanceof (frames[0])."+tests[i].constructor, "true");
i++;
if (tests.length === i && window.layoutTestController)
layoutTestController.notifyDone();
}
function tryPostMessage(message, constructor) {
......@@ -110,6 +114,7 @@ function startTest() {
tryPostMessage('fileInput.files[0]', "File");
tryPostMessage('fileInput.files', "FileList");
}
tryPostMessage('"done"');
}
</script>
</body>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment