From 97f602ef8adee4546e585d1eda1158605746f259 Mon Sep 17 00:00:00 2001 From: "Hallvord Reiar M. Steen" Date: Fri, 24 May 2013 10:38:50 +0200 Subject: [PATCH] more links and xpaths --- XMLHttpRequest/{support => resources}/form.php | 0 XMLHttpRequest/send-data-arraybuffer.htm | 4 +++- XMLHttpRequest/send-data-blob.htm | 11 +++++++---- XMLHttpRequest/send-data-formdata.htm | 8 +++++--- XMLHttpRequest/send-network-error-async-events.htm | 13 +++++++++---- XMLHttpRequest/send-network-error-sync-events.htm | 9 ++++++--- 6 files changed, 30 insertions(+), 15 deletions(-) rename XMLHttpRequest/{support => resources}/form.php (100%) diff --git a/XMLHttpRequest/support/form.php b/XMLHttpRequest/resources/form.php similarity index 100% rename from XMLHttpRequest/support/form.php rename to XMLHttpRequest/resources/form.php diff --git a/XMLHttpRequest/send-data-arraybuffer.htm b/XMLHttpRequest/send-data-arraybuffer.htm index baa0e445b9be4e..965f63db6b6658 100644 --- a/XMLHttpRequest/send-data-arraybuffer.htm +++ b/XMLHttpRequest/send-data-arraybuffer.htm @@ -1,7 +1,9 @@  - + + + XMLHttpRequest: The send() method: ArrayBuffer data diff --git a/XMLHttpRequest/send-data-blob.htm b/XMLHttpRequest/send-data-blob.htm index 58cad70113477f..edefae1a92bbc5 100644 --- a/XMLHttpRequest/send-data-blob.htm +++ b/XMLHttpRequest/send-data-blob.htm @@ -1,10 +1,13 @@  - - + + + + + - XMLHttpRequest L2: The send() method: Blob data + XMLHttpRequest: The send() method: Blob data @@ -38,7 +41,7 @@ xhr2.onreadystatechange = function() { - if (xhr2.readyState == 4) + if (xhr2.readyState == 4) { test.step(function() { diff --git a/XMLHttpRequest/send-data-formdata.htm b/XMLHttpRequest/send-data-formdata.htm index b033bec5dc9dd6..d5f01ad70b0167 100644 --- a/XMLHttpRequest/send-data-formdata.htm +++ b/XMLHttpRequest/send-data-formdata.htm @@ -1,9 +1,11 @@  - + + + - XmlHttpRequest L2: The send() method: FormData data + XmlHttpRequest: The send() method: FormData data @@ -32,7 +34,7 @@ }); }; - xhr.open("POST", "./support/form.php", true); + xhr.open("POST", "./resources/form.php", true); xhr.send(form); }); diff --git a/XMLHttpRequest/send-network-error-async-events.htm b/XMLHttpRequest/send-network-error-async-events.htm index 9f3e4f594222a1..b55f8212ae233e 100644 --- a/XMLHttpRequest/send-network-error-async-events.htm +++ b/XMLHttpRequest/send-network-error-async-events.htm @@ -1,9 +1,12 @@  - + + + + - XmlHttpRequest L2: The send() method: Fire a progress event named error when Network error happens (synchronous flag is unset) + XmlHttpRequest: The send() method: Fire a progress event named error when Network error happens (synchronous flag is unset) @@ -14,23 +17,25 @@ test.step(function(){ var xhr = new XMLHttpRequest(); - var expect = [4, "upload.error", "upload.loadend", "error", "loadend"]; + var expect = ["loadstart", "upload.loadstart", 4, "upload.error", "upload.loadend", "error", "loadend"]; var actual = []; xhr.onreadystatechange = function() { test.step(function() { - if (xhr.readyState == 4) + if (xhr.readyState == 4) { actual.push(xhr.readyState); } }); }; + xhr.onloadstart = function(e){ actual.push(e.type); }; xhr.onloadend = function(e){ actual.push(e.type); VerifyResult()}; xhr.onerror = function(e){ actual.push(e.type); }; + xhr.upload.onloadstart = function(e){ actual.push("upload." + e.type);}; xhr.upload.onloadend = function(e){ actual.push("upload." + e.type);}; xhr.upload.onerror = function(e){ actual.push("upload." + e.type); }; diff --git a/XMLHttpRequest/send-network-error-sync-events.htm b/XMLHttpRequest/send-network-error-sync-events.htm index 96d42a6dfb39ce..e77532429125c9 100644 --- a/XMLHttpRequest/send-network-error-sync-events.htm +++ b/XMLHttpRequest/send-network-error-sync-events.htm @@ -1,9 +1,11 @@  - + + + - XmlHttpRequest L2: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set) + XmlHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set) @@ -14,12 +16,13 @@ { var xhr = new XMLHttpRequest(); - xhr.open("POST", "http://nonexistent-origin.w3c-test.org", false); + xhr.open("POST", "http://nonexistent-origin.w3c-test.org", false); assert_throws("NETWORK_ERR", function() { xhr.send("Test Message"); }); + assert_equals(xhr.readyState, 4) });