blob: f3abdb072ca3fc5a66656c5fe57ab219b00c3ff1 [file] [log] [blame]
<html>
<head>
<title> Test case for bug 18655 </title>
</head>
<body>
<p> Test case for Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=18655">18655</a>: [XHR] OnProgress needs more test case </p>
<p> This test verify that we implement both interfaces and that they match. </p>
<p> You should see PASSED twice. </p>
<script type="text/javascript">
var count = 0;
function log (msg)
{
document.body.appendChild(document.createTextNode(msg));
document.body.appendChild(document.createElement("br"));
}
function onProgress(e) {
// Check if both interface match and they are not both null
// so that if it is not implemented it does not match.
if (e.position == e.loaded && e.loaded)
log("PASSED");
else
log("FAILED position and loaded do not match (or both are null)");
if (e.totalSize == e.total && e.total)
log("PASSED");
else
log("FAILED totalSize and total do not match (or both are null)");
if (window.testRunner)
testRunner.notifyDone();
}
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var req = new XMLHttpRequest();
req.onprogress = onProgress;
req.open("GET", "resources/1251.html", true);
req.send(null);
</script>
</body>
</html>