Skip to content

Commit

Permalink
more links and xpaths
Browse files Browse the repository at this point in the history
  • Loading branch information
Hallvord Reiar M. Steen committed May 24, 2013
1 parent 563ff3b commit 97f602e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 15 deletions.
File renamed without changes.
4 changes: 3 additions & 1 deletion XMLHttpRequest/send-data-arraybuffer.htm
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following::ol[1]/li[4]"/>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[4]/dl[1]/dd[1]"/>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-status-attribute" data-tested-assertations="following::ol[1]/li[3]"/>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-response-attribute" data-tested-assertations="following::ol[1]/li[3]"/>
<script src="/resources/testharness.js"></script>
<title>XMLHttpRequest: The send() method: ArrayBuffer data</title>
</head>
Expand Down
11 changes: 7 additions & 4 deletions XMLHttpRequest/send-data-blob.htm
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-response-attribute" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[4]/dl[1]/dd[2]"/>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-status-attribute" data-tested-assertations="following::ol[1]/li[3]"/>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-responsetype-attribute" data-tested-assertations="following::ol[1]/li[4]"/>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-response-attribute" data-tested-assertations="following::a[contains(@href,'#blob-response-entity-body')]/.."/>

<script src="/resources/testharness.js"></script>
<title>XMLHttpRequest L2: The send() method: Blob data</title>
<title>XMLHttpRequest: The send() method: Blob data</title>
</head>

<body>
Expand Down Expand Up @@ -38,7 +41,7 @@

xhr2.onreadystatechange = function()
{
if (xhr2.readyState == 4)
if (xhr2.readyState == 4)
{
test.step(function()
{
Expand Down
8 changes: 5 additions & 3 deletions XMLHttpRequest/send-data-formdata.htm
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[4]/dl[1]/dd[5]" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#interface-formdata" data-tested-assertations="following::id('dom-formdata')/following::ol[1]/li[1] following::id('dom-formdata')/following::ol[1]/li[3] following::id('dom-formdata-append')/following::ul[1]/li[1] following::id('dom-formdata-append')/following::ul[1]/li[2]" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-response-attribute" data-tested-assertations="following::ol[1]/li[3]"/>
<script src="/resources/testharness.js"></script>
<title>XmlHttpRequest L2: The send() method: FormData data</title>
<title>XmlHttpRequest: The send() method: FormData data</title>
</head>

<body>
Expand Down Expand Up @@ -32,7 +34,7 @@
});
};

xhr.open("POST", "./support/form.php", true);
xhr.open("POST", "./resources/form.php", true);
xhr.send(form);
});
</script>
Expand Down
13 changes: 9 additions & 4 deletions XMLHttpRequest/send-network-error-async-events.htm
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following::ol[1]/li[9]/ol/li[2] following::ol[1]/li[9]/ol/li[3] " />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#infrastructure-for-the-send()-method" data-tested-assertations="following::dd[4]/p" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#network-error" data-tested-assertations=".." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#request-error" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[6] following::ol[1]/li[7] following::ol[1]/li[7]/ol/li[3] following::ol[1]/li[7]/ol/li[4] following::ol[1]/li[9] following::ol[1]/li[10]" />
<script src="/resources/testharness.js"></script>
<title>XmlHttpRequest L2: The send() method: Fire a progress event named error when Network error happens (synchronous flag is unset)</title>
<title>XmlHttpRequest: The send() method: Fire a progress event named error when Network error happens (synchronous flag is unset)</title>
</head>

<body>
Expand All @@ -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); };

Expand Down
9 changes: 6 additions & 3 deletions XMLHttpRequest/send-network-error-sync-events.htm
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#infrastructure-for-the-send()-method" data-tested-assertations="following::dd[4]/p" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#network-error" data-tested-assertations=".." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#request-error" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[5]" />
<script src="/resources/testharness.js"></script>
<title>XmlHttpRequest L2: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set)</title>
<title>XmlHttpRequest: The send() method: Throw a "throw an "NetworkError" exception when Network error happens (synchronous flag is set)</title>
</head>

<body>
Expand All @@ -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)
});
</script>
</body>
Expand Down

0 comments on commit 97f602e

Please sign in to comment.