summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/FileAPI/historical.https.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/FileAPI/historical.https.html
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/FileAPI/historical.https.html')
-rw-r--r--testing/web-platform/tests/FileAPI/historical.https.html65
1 files changed, 65 insertions, 0 deletions
diff --git a/testing/web-platform/tests/FileAPI/historical.https.html b/testing/web-platform/tests/FileAPI/historical.https.html
new file mode 100644
index 0000000000..4f841f1763
--- /dev/null
+++ b/testing/web-platform/tests/FileAPI/historical.https.html
@@ -0,0 +1,65 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Historical features</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
+ </head>
+ <body>
+ <div id="log"></div>
+ <script>
+ var removedFromWindow = [
+ 'toNativeLineEndings',
+ 'FileError',
+ 'FileException',
+ 'FileHandle',
+ 'FileRequest',
+ 'MutableFile',
+ ];
+
+ removedFromWindow.forEach(function(name) {
+ test(function() {
+ assert_false(name in window);
+ }, '"' + name + '" should not be supported');
+ });
+
+ test(function() {
+ var b = new Blob();
+ var prefixes = ['op', 'moz', 'webkit', 'ms'];
+ for (var i = 0; i < prefixes.length; ++i) {
+ assert_false(prefixes[i]+'Slice' in b, "'"+prefixes[i]+"Slice' in b");
+ assert_false(prefixes[i]+'Slice' in Blob.prototype, "'"+prefixes[i]+"Slice in Blob.prototype");
+ }
+ }, 'Blob should not support slice prefixed');
+
+ test(function() {
+ var prefixes = ['', 'O', 'Moz', 'WebKit', 'MS'];
+ for (var i = 0; i < prefixes.length; ++i) {
+ assert_false(prefixes[i]+'BlobBuilder' in window, prefixes[i]+'BlobBuilder');
+ }
+ }, 'BlobBuilder should not be supported.');
+
+ test(function() {
+ assert_false('createFor' in URL);
+ }, 'createFor method should not be supported');
+
+ test(function() {
+ var b = new Blob();
+ assert_false('close' in b, 'close in b');
+ assert_false('close' in Blob.prototype, 'close in Blob.prototype');
+ assert_false('isClosed' in b, 'isClosed in b');
+ assert_false('isClosed' in Blob.prototype, 'isClosed in Blob.prototype');
+ }, 'Blob.close() should not be supported');
+
+ test(() => {
+ const f = new File([], "");
+ assert_false("lastModifiedDate" in f);
+ assert_false("lastModifiedDate" in File.prototype);
+ }, "File's lastModifiedDate should not be supported");
+
+ service_worker_test('support/historical-serviceworker.js', 'Service worker test setup');
+ </script>
+ </body>
+</html>