1a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
2a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
3a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// found in the LICENSE file.
4a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
5a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)this.onfetch = function(event) {
6116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch    var headers = new Headers;
7cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)    headers.set('Content-Language', 'fi');
8cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)    headers.set('Content-Type', 'text/html; charset=UTF-8');
946d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)    var blob = new Blob(["This resource is gone. Gone, gone, gone."]);
1046d4c2bc3267f3f028f39e7e311b0f89aba2e4fdTorne (Richard Coles)    var response = new Response(blob, {
11cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)        status: 301,
12cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)        statusText: 'Moved Permanently',
13cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)        headers: headers
14a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    });
15a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
16a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    event.respondWith(new Promise(function(r) {
17a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)        setTimeout(function() { r(response); }, 5);
18a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    }));
19a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)};
20