diff --git a/XMLHttpRequest/MANIFEST b/XMLHttpRequest/MANIFEST
index 975f3f544c3171..9d02d98a11a2a5 100644
--- a/XMLHttpRequest/MANIFEST
+++ b/XMLHttpRequest/MANIFEST
@@ -133,3 +133,6 @@ xmlhttprequest-timeout-worker-simple.html
xmlhttprequest-timeout-worker-synconworker.html
xmlhttprequest-timeout-worker-twice.html
xmlhttprequest-unsent.htm
+manual send-authentication-existing-session-interactive.htm
+manual send-authentication-prompt-interactive.htm
+manual send-authentication-prompt-interactive-2.htm
diff --git a/XMLHttpRequest/abort-after-send.htm b/XMLHttpRequest/abort-after-send.htm
index a1de1096011a15..10062a4a9c16e6 100644
--- a/XMLHttpRequest/abort-after-send.htm
+++ b/XMLHttpRequest/abort-after-send.htm
@@ -4,7 +4,14 @@
XMLHttpRequest: abort() after send()
-
+
+
+
+
+
+
+
+
@@ -14,7 +21,7 @@
var client = new XMLHttpRequest(),
control_flag = false,
result = [],
- expected = [1, 4] // open() -> 1, abort() -> 4
+ expected = [1, 4, 'progress', 'abort', 'loadend'] // open() -> 1, abort() -> 4
client.onreadystatechange = function() {
test.step(function() {
result.push(client.readyState)
@@ -25,16 +32,23 @@
assert_equals(client.status, 0)
assert_equals(client.statusText, "")
assert_equals(client.getAllResponseHeaders(), "")
+ assert_equals(client.getResponseHeader('Content-Type'), null)
}
})
}
client.open("GET", "resources/well-formed.xml", true)
client.send(null)
+ client.addEventListener('progress', logEvt)
+ client.addEventListener('abort', logEvt)
+ client.addEventListener('loadend', logEvt)
client.abort()
assert_true(control_flag)
assert_equals(client.readyState, 0)
assert_array_equals(result, expected)
test.done()
+ function logEvt (e) {
+ result.push(e.type)
+ }
})
diff --git a/XMLHttpRequest/abort-during-done.htm b/XMLHttpRequest/abort-during-done.htm
index ab25980f15cca7..eb5557104c94de 100644
--- a/XMLHttpRequest/abort-during-done.htm
+++ b/XMLHttpRequest/abort-during-done.htm
@@ -4,7 +4,7 @@
XMLHttpRequest: abort() during DONE
-
+
diff --git a/XMLHttpRequest/abort-during-open.htm b/XMLHttpRequest/abort-during-open.htm
index f0e096bc5d6080..0080badaafe083 100644
--- a/XMLHttpRequest/abort-during-open.htm
+++ b/XMLHttpRequest/abort-during-open.htm
@@ -4,7 +4,8 @@
XMLHttpRequest: abort() during OPEN
-
+
+
@@ -18,8 +19,9 @@
assert_unreached()
})
}
- client.abort();
+ client.abort()
assert_equals(client.readyState, 0)
+ assert_throws("InvalidStateError", function() { client.send("test") }, "calling send() after abort()")
})
test.done()
diff --git a/XMLHttpRequest/abort-during-unsent.htm b/XMLHttpRequest/abort-during-unsent.htm
index c98f2f78c94eff..a0d83126422ffa 100644
--- a/XMLHttpRequest/abort-during-unsent.htm
+++ b/XMLHttpRequest/abort-during-unsent.htm
@@ -4,7 +4,7 @@
XMLHttpRequest: abort() during UNSENT
-
+
diff --git a/XMLHttpRequest/abort-during-upload.htm b/XMLHttpRequest/abort-during-upload.htm
new file mode 100644
index 00000000000000..ba296448897a83
--- /dev/null
+++ b/XMLHttpRequest/abort-during-upload.htm
@@ -0,0 +1,42 @@
+
+
+
+ XMLHttpRequest: abort() while sending data
+
+
+
+
+
+
+
+
+
+
diff --git a/XMLHttpRequest/abort-event-abort.htm b/XMLHttpRequest/abort-event-abort.htm
index ac23ebd45573e2..e840ecb512b596 100644
--- a/XMLHttpRequest/abort-event-abort.htm
+++ b/XMLHttpRequest/abort-event-abort.htm
@@ -3,18 +3,18 @@
- XMLHttpRequest: The abort() method: Fire a progress event named abort
+ XMLHttpRequest: The abort() method: do not fire abort event in OPENED state when send() flag is unset. send() throws after abort().
diff --git a/XMLHttpRequest/abort-event-listeners.htm b/XMLHttpRequest/abort-event-listeners.htm
index 248124ddec48a7..885834f583fddb 100644
--- a/XMLHttpRequest/abort-event-listeners.htm
+++ b/XMLHttpRequest/abort-event-listeners.htm
@@ -4,7 +4,7 @@
XMLHttpRequest: abort() should not reset event listeners
-
+
diff --git a/XMLHttpRequest/data-uri-basic.htm b/XMLHttpRequest/data-uri-basic.htm
index d457cb47e5c60b..037fb9f3e106d9 100644
--- a/XMLHttpRequest/data-uri-basic.htm
+++ b/XMLHttpRequest/data-uri-basic.htm
@@ -3,7 +3,8 @@
XMLHttpRequest: basic data uri
-
+
+
@@ -24,12 +25,24 @@
do_test("GET responseText", 'GET', "data:text/plain,Hello, World!", function (client) {
assert_equals(client.responseText, "Hello, World!")
});
+ do_test("GET responseText base64", 'GET', "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D", function (client) {
+ assert_equals(client.responseText, "Hello, World!")
+ });
do_test("GET status", 'GET', "data:text/plain,Hello, World!", function (client) {
assert_equals(client.status, 200);
});
+ do_test("GET statusText", 'GET', "data:text/plain,Hello, World!", function (client) {
+ assert_equals(client.statusText, "OK");
+ });
do_test("GET Content-Type", 'GET', "data:text/plain,Hello, World!", function (client) {
assert_equals(client.getResponseHeader('Content-Type'), 'text/plain');
});
+ do_test("GET Content-Type with param", 'GET', "data:text/html;charset=utf-8,Hello, World!", function (client) {
+ assert_equals(client.getResponseHeader('Content-Type'), 'text/html;charset=utf-8');
+ });
+ do_test("GET getAllResponseHeaders", 'GET', "data:text/plain,Hello, World!", function (client) {
+ assert_equals(client.getAllResponseHeaders(), 'content-type: text/plain');
+ });
do_test("POST responseText", 'POST', "data:text/plain,Hello, World!", function (client) {
assert_equals(client.responseText, null);
});
diff --git a/XMLHttpRequest/data-uri.htm b/XMLHttpRequest/data-uri.htm
index 6dc1f95bf1ac09..db4cbe8aa12d73 100644
--- a/XMLHttpRequest/data-uri.htm
+++ b/XMLHttpRequest/data-uri.htm
@@ -3,14 +3,14 @@
XMLHttpRequest: data uri
-
-
+
+
-
-
-
+
+
+
diff --git a/XMLHttpRequest/event-load.htm b/XMLHttpRequest/event-load.htm
index 9cce60efd1beff..ab8952b29d6f0b 100644
--- a/XMLHttpRequest/event-load.htm
+++ b/XMLHttpRequest/event-load.htm
@@ -1,18 +1,21 @@
-XMLHttpRequest: load event
+XMLHttpRequest: The send() method: Fire an event named load (synchronous flag is unset)
-
-
-
+
+
+
+
-
-
-
+
+
+
@@ -14,15 +14,17 @@
var test = async_test();
test.step(function() {
var client = new XMLHttpRequest();
- client.onloadstart = test.step_func(function() {
+ client.onloadstart = test.step_func(function(e) {
+ assert_true(e instanceof ProgressEvent);
+ assert_equals(e.type, "loadstart");
assert_equals(client.readyState, 1);
test.done();
});
- client.open("GET", "resources/well-formed.xml");
- client.send(null);
setTimeout(test.step_func(function () {
assert_unreached("onloadstart not called after 500 ms");
}), 500);
+ client.open("GET", "resources/well-formed.xml");
+ client.send(null);
});
diff --git a/XMLHttpRequest/event-progress.htm b/XMLHttpRequest/event-progress.htm
index 9938423ea1c6ce..0c254f9d9a9603 100644
--- a/XMLHttpRequest/event-progress.htm
+++ b/XMLHttpRequest/event-progress.htm
@@ -1,22 +1,22 @@
-XMLHttpRequest: progress event
+XMLHttpRequest: The send() method: Fire a progress event named progress (synchronous flag is unset)
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
diff --git a/XMLHttpRequest/event-upload-progress.htm b/XMLHttpRequest/event-upload-progress.htm
index 25468d170dbe2f..175dc7f46c3cec 100644
--- a/XMLHttpRequest/event-upload-progress.htm
+++ b/XMLHttpRequest/event-upload-progress.htm
@@ -4,9 +4,10 @@
XMLHttpRequest: upload progress event
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+