summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--third_party/WebKit/LayoutTests/ChangeLog11
-rw-r--r--third_party/WebKit/LayoutTests/fast/xmlhttprequest/resources/xmlhttprequest-default-attributes.js20
-rw-r--r--third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes-expected.txt21
-rw-r--r--third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes.html12
-rw-r--r--third_party/WebKit/WebCore/ChangeLog20
-rw-r--r--third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp12
-rw-r--r--third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp10
7 files changed, 95 insertions, 11 deletions
diff --git a/third_party/WebKit/LayoutTests/ChangeLog b/third_party/WebKit/LayoutTests/ChangeLog
index eca00d1..8514c88 100644
--- a/third_party/WebKit/LayoutTests/ChangeLog
+++ b/third_party/WebKit/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2009-04-24 Fumitoshi Ukai <ukai@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25257
+ Verify XMLHttpRequest has correct attribute value by default.
+
+ * fast/xmlhttprequest/resources/xmlhttprequest-default-attributes.js: Added.
+ * fast/xmlhttprequest/xmlhttprequest-default-attributes-expected.txt: Added.
+ * fast/xmlhttprequest/xmlhttprequest-default-attributes.html: Added.
+
2009-04-24 Kevin McCullough <kmccullough@apple.com>
Speculative fix for leopard build-bot until I have a fix on leopard.
diff --git a/third_party/WebKit/LayoutTests/fast/xmlhttprequest/resources/xmlhttprequest-default-attributes.js b/third_party/WebKit/LayoutTests/fast/xmlhttprequest/resources/xmlhttprequest-default-attributes.js
new file mode 100644
index 0000000..aa3531e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/xmlhttprequest/resources/xmlhttprequest-default-attributes.js
@@ -0,0 +1,20 @@
+description("This test verifies that XMLHttpRequest objects has correct default value for its attributes.");
+
+var xhr = new XMLHttpRequest();
+
+shouldBeNull("xhr.onabort");
+shouldBeNull("xhr.onerror");
+shouldBeNull("xhr.onload");
+shouldBeNull("xhr.onloadstart");
+shouldBeNull("xhr.onprogress");
+shouldBeNull("xhr.onreadystatechange");
+shouldBe("xhr.readyState", "0");
+
+shouldBeNull("xhr.upload.onabort");
+shouldBeNull("xhr.upload.onerror");
+shouldBeNull("xhr.upload.onload");
+shouldBeNull("xhr.upload.onloadstart");
+shouldBeNull("xhr.upload.onprogress");
+
+var successfullyParsed = true;
+
diff --git a/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes-expected.txt b/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes-expected.txt
new file mode 100644
index 0000000..b46b9b7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes-expected.txt
@@ -0,0 +1,21 @@
+This test verifies that XMLHttpRequest objects has correct default value for its attributes.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS xhr.onabort is null
+PASS xhr.onerror is null
+PASS xhr.onload is null
+PASS xhr.onloadstart is null
+PASS xhr.onprogress is null
+PASS xhr.onreadystatechange is null
+PASS xhr.readyState is 0
+PASS xhr.upload.onabort is null
+PASS xhr.upload.onerror is null
+PASS xhr.upload.onload is null
+PASS xhr.upload.onloadstart is null
+PASS xhr.upload.onprogress is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes.html b/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes.html
new file mode 100644
index 0000000..26d5dd5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-default-attributes.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/xmlhttprequest-default-attributes.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/third_party/WebKit/WebCore/ChangeLog b/third_party/WebKit/WebCore/ChangeLog
index e807e3d..ac3b215 100644
--- a/third_party/WebKit/WebCore/ChangeLog
+++ b/third_party/WebKit/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2009-04-24 Fumitoshi Ukai <ukai@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25257
+ Use null for unspecified event listener attributes of XMLHttpRequest
+ and XMLHttpRequestUpload in v8 binding.
+
+ cf. http://www.whatwg.org/specs/web-apps/current-work/#event-handler-attributes
+ An event handler attribute, unless otherwise specified, can either
+ have the value null or be set to a Function object.
+ Initially, an event handler attribute must be set to null.
+
+ Test: fast/xmlhttprequest/xmlhttprequest-default-attributes.html
+
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::ACCESSOR_GETTER): Changed to use v8::Null().
+ * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
+ (WebCore::ACCESSOR_GETTER): Ditto.
+
2009-04-24 Darin Adler <darin@apple.com>
Reviewed by Adam Roben.
diff --git a/third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index 376aa9f..878d5d3 100644
--- a/third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -68,7 +68,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnabort)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestOnabort)
@@ -102,7 +102,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnerror)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestOnerror)
@@ -136,7 +136,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnload)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestOnload)
@@ -170,7 +170,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnloadstart)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestOnloadstart)
@@ -204,7 +204,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnprogress)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestOnprogress)
@@ -238,7 +238,7 @@ ACCESSOR_GETTER(XMLHttpRequestOnreadystatechange)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestOnreadystatechange)
diff --git a/third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp b/third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
index f325ec6..7afa82c 100644
--- a/third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
+++ b/third_party/WebKit/WebCore/bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp
@@ -52,7 +52,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnabort)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnabort)
@@ -91,7 +91,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnerror)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnerror)
@@ -130,7 +130,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnload)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnload)
@@ -169,7 +169,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnloadstart)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnloadstart)
@@ -208,7 +208,7 @@ ACCESSOR_GETTER(XMLHttpRequestUploadOnprogress)
v8::Local<v8::Object> v8Listener = listener->getListenerObject();
return v8Listener;
}
- return v8::Undefined();
+ return v8::Null();
}
ACCESSOR_SETTER(XMLHttpRequestUploadOnprogress)