summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-all.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-all.html')
-rw-r--r--testing/web-platform/tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-all.html52
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-all.html b/testing/web-platform/tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-all.html
new file mode 100644
index 0000000000..37a92bb09f
--- /dev/null
+++ b/testing/web-platform/tests/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/document-all.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<title>document.all</title>
+<link rel="author" title="Corey Farwell" href="mailto:coreyf@rwell.org">
+<link rel="help" href="https://html.spec.whatwg.org/multipage/obsolete.html#dom-document-all">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+test(function () {
+ assert_false(Boolean(document.all));
+
+ assert_true(document.all == undefined);
+ assert_true(document.all == null);
+ assert_false(document.all != undefined);
+ assert_false(document.all != null);
+
+ assert_true(document.all !== undefined);
+ assert_true(document.all !== null);
+ assert_false(document.all === undefined);
+ assert_false(document.all === null);
+
+ assert_equals(typeof document.all, "undefined");
+
+ if (document.all) { assert_true(false); }
+
+ if (!document.all) {}
+ else { assert_true(false); }
+}, "'unusual behaviors' of document.all")
+
+test(function() {
+ var all = document.all;
+
+ assert_false(Boolean(all));
+
+ assert_true(all == undefined);
+ assert_true(all == null);
+ assert_false(all != undefined);
+ assert_false(all != null);
+
+ assert_true(all !== undefined);
+ assert_true(all !== null);
+ assert_false(all === undefined);
+ assert_false(all === null);
+
+ assert_equals(typeof all, "undefined");
+
+ if (all) { assert_true(false); }
+
+ if (!all) {}
+ else { assert_true(false); }
+}, "'unusual behaviors' of document.all with assignment")
+</script>