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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-iframe.html

Issue 2858933003: Upstream service worker `fetch` test to WPT (Closed)
Patch Set: Resolve conflict in `enable-blink-features=LayoutNG` Created 3 years, 7 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 <script>
2 function xhr(url) {
3 return new Promise(function(resolve, reject) {
4 var request = new XMLHttpRequest();
5 request.addEventListener(
6 'error',
7 function(event) { reject(event); });
8 request.addEventListener(
9 'load',
10 function(event) { resolve(request.response); });
11 request.open('GET', url);
12 request.send();
13 });
14 }
15
16 function load_image(url, cross_origin) {
17 return new Promise(function(resolve, reject) {
18 var img = document.createElement('img');
19 document.body.appendChild(img);
20 img.onload = function() {
21 resolve();
22 };
23 img.onerror = function() {
24 reject();
25 };
26 if (cross_origin != '') {
27 img.crossOrigin = cross_origin;
28 }
29 img.src = url;
30 });
31 }
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698