1e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch// Copyright 2014 The Chromium Authors. All rights reserved. 2e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch// Use of this source code is governed by a BSD-style license that can be 3e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch// found in the LICENSE file. 4e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch 5e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdochvar code = 404; 6e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch 7e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdochthis.onfetch = function(event) { 846d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles) response = new Response(new Blob(), { 9cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) status: code, 10cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) statusText: 'OK' 11e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch }); 12e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch 13e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch event.respondWith(new Promise(function(r) { 14e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch setTimeout(function() { r(response); }, 5); 15e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch })); 16e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch}; 17e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch 18e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdochthis.onsync = function(event) { 19e5d81f57cb97b3b6b7fccc9c5610d21eb81db09dBen Murdoch code = 200; 20cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)}; 21