3 <title> Test case for bug
18655 </title>
6 <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>
7 <p> This test verify that we implement both interfaces and that they match.
</p>
8 <p> You should see PASSED twice.
</p>
10 <script type=
"text/javascript">
15 document
.body
.appendChild(document
.createTextNode(msg
));
16 document
.body
.appendChild(document
.createElement("br"));
19 function onProgress(e
) {
20 // Check if both interface match and they are not both null
21 // so that if it is not implemented it does not match.
22 if (e
.position
== e
.loaded
&& e
.loaded
)
25 log("FAILED position and loaded do not match (or both are null)");
27 if (e
.totalSize
== e
.total
&& e
.total
)
30 log("FAILED totalSize and total do not match (or both are null)");
32 if (++count
== 1 && window
.testRunner
)
33 testRunner
.notifyDone();
36 if (window
.testRunner
) {
37 testRunner
.dumpAsText();
38 testRunner
.waitUntilDone();
41 var req
= new XMLHttpRequest();
42 req
.onprogress
= onProgress
;
43 req
.open("GET", "resources/1251.html", true);