Commit 61ccc4b3 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2010-03-04 John Abd-El-Malek <jam@chromium.org>

        Reviewed by Adam Barth.

        Fix incorrect setup of DateExtension.
        https://bugs.webkit.org/show_bug.cgi?id=35710

        * fast/dom/Window/resources/slow_unload_handler1.html:
2010-03-04  John Abd-El-Malek  <jam@chromium.org>

        Reviewed by Adam Barth.

        Fix incorrect setup of DateExtension.
        https://bugs.webkit.org/show_bug.cgi?id=35710

        * bindings/v8/DateExtension.cpp:
        (WebCore::DateExtension::setAllowSleep):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 61c1222e
2010-03-04 John Abd-El-Malek <jam@chromium.org>
Reviewed by Adam Barth.
Fix incorrect setup of DateExtension.
https://bugs.webkit.org/show_bug.cgi?id=35710
* fast/dom/Window/resources/slow_unload_handler1.html:
2010-03-04 Oliver Hunt <oliver@apple.com> 2010-03-04 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak. Reviewed by Maciej Stachowiak.
......
<html> <html>
<head>
<script> <script>
function pause(milliseconds) { window.addEventListener('unload', nopause1, false);
window.addEventListener('unload', nopause2, false);
window.addEventListener('unload', pause, false);
function pause() {
var now = new Date(); var now = new Date();
var exitTime = now.getTime() + milliseconds; var exitTime = now.getTime() + 10000;
while (true) { while (true) {
now = new Date(); now = new Date();
if (now.getTime() > exitTime) if (now.getTime() > exitTime)
...@@ -12,7 +17,24 @@ function pause(milliseconds) { ...@@ -12,7 +17,24 @@ function pause(milliseconds) {
if (layoutTestController) if (layoutTestController)
layoutTestController.notifyDone(); layoutTestController.notifyDone();
} }
function nopause() {
try {
var time1 = (new Date()).getTime();
} catch(e) {
parent.document.getElementById("results").appendChild(document.createTextNode("FAIL"));
if (layoutTestController)
layoutTestController.notifyDone();
}
}
function nopause1() {
nopause();
}
function nopause2() {
nopause();
}
</script> </script>
<body onunload="pause(10000);"> </head>
</body> <body></body>
</html> </html>
\ No newline at end of file
2010-03-04 John Abd-El-Malek <jam@chromium.org>
Reviewed by Adam Barth.
Fix incorrect setup of DateExtension.
https://bugs.webkit.org/show_bug.cgi?id=35710
* bindings/v8/DateExtension.cpp:
(WebCore::DateExtension::setAllowSleep):
2010-03-04 Oliver Hunt <oliver@apple.com> 2010-03-04 Oliver Hunt <oliver@apple.com>
   
Reviewed by Maciej Stachowiak. Reviewed by Maciej Stachowiak.
......
...@@ -88,7 +88,7 @@ void DateExtension::setAllowSleep(bool allow) ...@@ -88,7 +88,7 @@ void DateExtension::setAllowSleep(bool allow)
return; return;
v8::Handle<v8::Value> argv[1]; v8::Handle<v8::Value> argv[1];
argv[0] = v8::String::New(allow ? "false" : "true"); argv[0] = v8::Boolean::New(!allow);
v8::Handle<v8::Function>::Cast(sleepFunctionHandle)->Call(v8::Object::New(), 1, argv); v8::Handle<v8::Function>::Cast(sleepFunctionHandle)->Call(v8::Object::New(), 1, argv);
} }
......
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