Skip to content

Commit

Permalink
Test that historical HTMLElement features are not supported (#4331)
Browse files Browse the repository at this point in the history
Also a few related things added to dom/historical.html.
  • Loading branch information
zcorpan authored and Ms2ger committed Jan 2, 2017
1 parent a95d02d commit f729d72
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dom/historical.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,21 @@
"renameNode",
"defaultCharset",
"height",
"width"
"width",
// https://github.com/whatwg/html/commit/a64aea7fdb221bba027d95dc3cabda09e0b3e5dc
"commands",
// https://github.com/whatwg/html/commit/797b4d273955a0fe3cc2e2d0ca5d578f37c0f126
"cssElementMap",
// https://github.com/whatwg/html/commit/e236f46820b93d6fe2e2caae0363331075c6c4fb
"async",
]
documentNuked.forEach(isNukedFromDocument)

test(function() {
// https://github.com/whatwg/html/commit/e236f46820b93d6fe2e2caae0363331075c6c4fb
assert_false("load" in document);
}, "document.load");

test(function() {
assert_equals(document.implementation["getFeature"], undefined)
}, "DOMImplementation.getFeature() must be nuked.")
Expand Down
24 changes: 24 additions & 0 deletions html/dom/elements/elements-in-the-dom/historical.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<title>Historical HTMLElement features</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<body>
<script>
[
// https://github.com/whatwg/html/commit/389ec2620d89e9480ef8847bf016abdfa92427bc
"commandType",
"commandLabel",
"commandIcon",
"commandHidden",
"commandDisabled",
"commandChecked",
"commandTriggers",
// https://github.com/whatwg/html/commit/5ddfc78b1f82e86cc202d72ccc752a0e15f1e4ad
"inert",
].forEach(function(member) {
test(function() {
assert_false(member in document.body);
assert_false(member in document.createElement('div'));
}, 'HTMLElement member must be nuked: ' + member);
});
</script>

0 comments on commit f729d72

Please sign in to comment.