Skip to content

Commit

Permalink
link, xpath updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Hallvord Reiar M. Steen committed May 24, 2013
1 parent 34a5d03 commit d728ca6
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 24 deletions.
2 changes: 1 addition & 1 deletion XMLHttpRequest/resources/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
echo file_get_contents("php://input");
}
exit;
?>
?>
16 changes: 9 additions & 7 deletions XMLHttpRequest/send-no-response-event-loadend.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" />
<script src="/resources/testharness.js"></script>
<title>XMLHttpRequest: The send() method: Fire a progress event named loadend (no response entity body)</title>
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#handler-xhr-onloadend" data-tested-assertations="/../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-xhr-loadend" data-tested-assertations="/../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#infrastructure-for-the-send()-method" data-tested-assertations="/following-sibling::ol/li[10]" />
</head>

<body>
Expand All @@ -12,24 +14,24 @@
<script type="text/javascript">
var test = async_test();

test.step(function ()
test.step(function ()
{
var xhr = new XMLHttpRequest();

xhr.onreadystatechange = function()
xhr.onreadystatechange = function()
{
test.step(function()
test.step(function()
{
if (xhr.readyState == 4)
if (xhr.readyState == 4)
{
assert_equals(xhr.response, "");
}
});
};

xhr.onloadend = function(e)
xhr.onloadend = function(e)
{
test.step(function()
test.step(function()
{
assert_true(e instanceof ProgressEvent);
assert_equals(e.type, "loadend");
Expand Down
15 changes: 9 additions & 6 deletions XMLHttpRequest/send-no-response-event-loadstart.htm
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<!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#handler-xhr-onloadstart" data-tested-assertations="/../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-xhr-loadstart" data-tested-assertations="/../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="/following-sibling::ol/li[9]/ol/li[2]" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-response-attribute" data-tested-assertations="/following-sibling::ol/li[1]" />
<script src="/resources/testharness.js"></script>
<title>XMLHttpRequest: The send() method: Fire a progress event named loadstart (no response entity body and the state is LOADING)</title>
</head>
Expand All @@ -16,22 +19,22 @@
{
var xhr = new XMLHttpRequest();

xhr.onreadystatechange = function()
xhr.onreadystatechange = function()
{
test.step(function()
test.step(function()
{
if (xhr.readyState == 3)
if (xhr.readyState == 3)
{
assert_equals(xhr.response, "");
}
else if (xhr.readyState == 4)
else if (xhr.readyState == 4)
{
assert_unreached("loadstart event did not fire in LOADING state!");
}
});
};

xhr.onloadstart = function()
xhr.onloadstart = function()
{
test.step(function() { test.done("Test done!"); });
};
Expand Down
15 changes: 11 additions & 4 deletions XMLHttpRequest/send-no-response-event-order.htm
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<!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#handler-xhr-onloadstart" data-tested-assertations="../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#handler-xhr-onloadend" data-tested-assertations="../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-xhr-loadstart" data-tested-assertations="../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-xhr-loadend" data-tested-assertations="../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following-sibling::ol/li[9]/ol/li[2]" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#infrastructure-for-the-send()-method" data-tested-assertations="following::a[contains(@href, '#switch-done')]/.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#switch-done" data-tested-assertations="following::ol[1]/li[3] following::ol[1]/li[4] following::ol[1]/li[6] following::ol[1]/li[7]" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-response-attribute" data-tested-assertations="following-sibling::ol/li[1]" />
<script src="/resources/testharness.js"></script>
<title>XMLHttpRequest: The send() method: event order when there is no response entity body</title>
</head>
Expand Down Expand Up @@ -37,9 +44,9 @@
xhr.onload = function(e){ actual.push(e.type); };
xhr.onloadend = function(e){ actual.push(e.type); VerifyResult()};

xhr.upload.onloadstart = function(e){ actual.push(e.type); };
xhr.upload.onload = function(e){ actual.push(e.type); };
xhr.upload.onloadend = function(e){ actual.push(e.type); };
xhr.upload.onloadstart = function(e){ assert_unreached('upload.'+e.type); };
xhr.upload.onload = function(e){ assert_unreached('upload.'+e.type); };
xhr.upload.onloadend = function(e){ assert_unreached('upload.'+e.type); };

function VerifyResult()
{
Expand Down
21 changes: 15 additions & 6 deletions XMLHttpRequest/send-response-event-order.htm
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
<!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#handler-xhr-onloadstart" data-tested-assertations="../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#handler-xhr-onloadend" data-tested-assertations="../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-xhr-loadstart" data-tested-assertations="../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-xhr-loadend" data-tested-assertations="../.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method" data-tested-assertations="following-sibling::ol/li[9]/ol/li[2] following-sibling::ol/li[9]/ol/li[3] following::a[contains(@href, '#make-upload-progress-notifications')]/.. following::a[contains(@href, '#make-progress-notifications')]/.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#make-upload-progress-notifications" data-tested-assertations="following::ul[1]/li[1] following::ul[1]/li[2]/ol[1]/li[2] following::ul[1]/li[2]/ol[1]/li[3] following::ul[1]/li[2]/ol[1]/li[4]" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#make-progress-notifications" data-tested-assertations=".." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#infrastructure-for-the-send()-method" data-tested-assertations="following::a[contains(@href, '#switch-done')]/.." />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#switch-done" data-tested-assertations="following::ol[1]/li[3] following::ol[1]/li[4] following::ol[1]/li[5] following::ol[1]/li[6] following::ol[1]/li[7]" />
<link rel="help" href="http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-response-attribute" data-tested-assertations="/following-sibling::ol/li[1]" />
<script src="/resources/testharness.js"></script>
<title>XMLHttpRequest: The send() method: event order when synchronous flag is unset</title>
</head>
Expand All @@ -12,17 +21,17 @@
<script type="text/javascript">
var test = async_test();

test.step(function()
test.step(function()
{
var xhr = new XMLHttpRequest();
var expect = ["loadstart", "upload.loadstart", "upload.progress", "upload.load", "upload.loadend", "progress", 4, "load", "loadend"];
var expect = ["loadstart", "upload.loadstart", "upload.progress", "upload.load", "upload.loadend", 4, "progress","load", "loadend"];
var actual = [];

xhr.onreadystatechange = function()
xhr.onreadystatechange = function()
{
test.step(function()
test.step(function()
{
if (xhr.readyState == 4)
if (xhr.readyState == 4)
{
actual.push(xhr.readyState);
}
Expand Down

0 comments on commit d728ca6

Please sign in to comment.