Bug 1459867 [wpt PR 10887] - Verify sync XHR does not fire progress event, a=testonly
authorAdam Rice <ricea@chromium.org>
Tue, 15 May 2018 13:31:30 +0000
changeset 418486 816d4ef0a3dea89726812659ab06b401a4d7f94e
parent 418485 7142ea1ef1d646980cc33a2960ebcb0fa94a54f8
child 418487 394a5ad2313c16a204d117b61ba89be32db06f2d
push id103318
push userwptsync@mozilla.com
push dateWed, 16 May 2018 15:06:09 +0000
treeherdermozilla-inbound@51f1ecd79ebe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1459867, 10887
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1459867 [wpt PR 10887] - Verify sync XHR does not fire progress event, a=testonly Automatic update from web-platform-testsXHR: sync XMLHttpRequest does not fire an event named progress For https://github.com/whatwg/xhr/pull/208. -- wpt-commits: 10f586a6d2f606b86310ba05da18ed13a78c67f4 wpt-pr: 10887
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/xhr/sync-no-progress.any.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -378708,16 +378708,26 @@
     ]
    ],
    "xhr/status-error.htm": [
     [
      "/xhr/status-error.htm",
      {}
     ]
    ],
+   "xhr/sync-no-progress.any.js": [
+    [
+     "/xhr/sync-no-progress.any.html",
+     {}
+    ],
+    [
+     "/xhr/sync-no-progress.any.worker.html",
+     {}
+    ]
+   ],
    "xhr/template-element.html": [
     [
      "/xhr/template-element.html",
      {}
     ]
    ],
    "xhr/timeout-cors-async.htm": [
     [
@@ -621065,16 +621075,20 @@
   "xhr/status-basic.htm": [
    "f8cfccecc4df3b25091dc74639d9615101307daf",
    "testharness"
   ],
   "xhr/status-error.htm": [
    "42182437d8c1015339825c035127877f4970decb",
    "testharness"
   ],
+  "xhr/sync-no-progress.any.js": [
+   "db6171c61a37cd98ea5b9c1549432f1e2b53e7eb",
+   "testharness"
+  ],
   "xhr/template-element.html": [
    "748f12beaa646e244f8312afd545f56075cac727",
    "testharness"
   ],
   "xhr/timeout-cors-async.htm": [
    "d5b0fa4ab0907d58f7cf5796c2bb740e5f91a82f",
    "testharness"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/xhr/sync-no-progress.any.js
@@ -0,0 +1,12 @@
+test(t => {
+  let xhr = new XMLHttpRequest();
+  let loadEventFired = false;
+  xhr.onprogress = t.unreached_func('progress event should not be fired');
+  xhr.onload = () => {
+    loadEventFired = true;
+  };
+  xhr.open('GET', 'resources/trickle.py?count=4&delay=150', false);
+  xhr.send();
+  // Check the load event as a sanity check that the test is working.
+  assert_true(loadEventFired, 'load event should have fired');
+}, 'progress event should not be fired by sync XHR');