1<!doctype html> 2<html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Historical features</title> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script> 9 </head> 10 <body> 11 <div id="log"></div> 12 <script> 13 var removedFromWindow = [ 14 'toNativeLineEndings', 15 'FileError', 16 'FileException', 17 'FileHandle', 18 'FileRequest', 19 'MutableFile', 20 ]; 21 22 removedFromWindow.forEach(function(name) { 23 test(function() { 24 assert_false(name in window); 25 }, '"' + name + '" should not be supported'); 26 }); 27 28 test(function() { 29 var b = new Blob(); 30 var prefixes = ['op', 'moz', 'webkit', 'ms']; 31 for (var i = 0; i < prefixes.length; ++i) { 32 assert_false(prefixes[i]+'Slice' in b, "'"+prefixes[i]+"Slice' in b"); 33 assert_false(prefixes[i]+'Slice' in Blob.prototype, "'"+prefixes[i]+"Slice in Blob.prototype"); 34 } 35 }, 'Blob should not support slice prefixed'); 36 37 test(function() { 38 var prefixes = ['', 'O', 'Moz', 'WebKit', 'MS']; 39 for (var i = 0; i < prefixes.length; ++i) { 40 assert_false(prefixes[i]+'BlobBuilder' in window, prefixes[i]+'BlobBuilder'); 41 } 42 }, 'BlobBuilder should not be supported.'); 43 44 test(function() { 45 assert_false('createFor' in URL); 46 }, 'createFor method should not be supported'); 47 48 test(function() { 49 var b = new Blob(); 50 assert_false('close' in b, 'close in b'); 51 assert_false('close' in Blob.prototype, 'close in Blob.prototype'); 52 assert_false('isClosed' in b, 'isClosed in b'); 53 assert_false('isClosed' in Blob.prototype, 'isClosed in Blob.prototype'); 54 }, 'Blob.close() should not be supported'); 55 56 test(() => { 57 const f = new File([], ""); 58 assert_false("lastModifiedDate" in f); 59 assert_false("lastModifiedDate" in File.prototype); 60 }, "File's lastModifiedDate should not be supported"); 61 62 service_worker_test('support/historical-serviceworker.js', 'Service worker test setup'); 63 </script> 64 </body> 65</html> 66