Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(738)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-LSProgressEvent-ProgressEvent-should-match.html

Issue 1681923002: Remove XMLHttpRequestProgressEvent (position and totalSize) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update tests Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <title> Test case for bug 18655 </title>
4 </head>
5 <body>
6 <p> Test case for Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=18655">18 655</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>
9
10 <script type="text/javascript">
11 var count = 0;
12
13 function log (msg)
14 {
15 document.body.appendChild(document.createTextNode(msg));
16 document.body.appendChild(document.createElement("br"));
17 }
18
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)
23 log("PASSED");
24 else
25 log("FAILED position and loaded do not match (or both are null)");
26
27 if (e.totalSize == e.total && e.total)
28 log("PASSED");
29 else
30 log("FAILED totalSize and total do not match (or both are null)");
31
32 if (++count == 1 && window.testRunner)
33 testRunner.notifyDone();
34 }
35
36 if (window.testRunner) {
37 testRunner.dumpAsText();
38 testRunner.waitUntilDone();
39 }
40
41 var req = new XMLHttpRequest();
42 req.onprogress = onProgress;
43 req.open("GET", "resources/1251.html", true);
44 req.send(null);
45 </script>
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698