Avoid testharness.js errors for assert_throws.

This commit is contained in:
Josh Matthews 2017-06-21 15:47:10 -04:00 committed by Ms2ger
parent 933b42ef46
commit 2fb74cb9e9
4 changed files with 8 additions and 8 deletions

View file

@ -27308,7 +27308,7 @@
"testharness"
],
"mozilla/activation.html": [
"b4ebf61aea2934347bf2355375f6e2c53ef212bb",
"4e0514aa4dd8a59d35037c6966bb938ad5f49b6a",
"testharness"
],
"mozilla/adopt-panic.css": [
@ -27872,7 +27872,7 @@
"testharness"
],
"mozilla/element_attribute.html": [
"9524405acb2345751b6dc1b160108ff665701d81",
"35625bedf3b323f8538174058c755cbccd25157c",
"testharness"
],
"mozilla/element_attributes.html": [
@ -33916,7 +33916,7 @@
"testharness"
],
"mozilla/union.html": [
"47ee847e660eb907a7bd916cf37cf3ceba68ea7d",
"7a4ca34dd10a10ec6e013ac86038a070addf2889",
"testharness"
],
"mozilla/unitless-length.html": [

View file

@ -42,7 +42,7 @@
"Activate input");
test(function () {
assert_throws(null, function () {
assert_throws("NotSupportedError", function () {
var foo = document.getElementById("foo");
foo.enterFormalActivationState();
});

View file

@ -52,13 +52,13 @@
});
test(function() {
assert_throws(null, function () {
assert_throws("NamespaceError", function () {
element.setAttributeNS("http://example.com", "xmlns", "foo");
});
assert_throws(null, function () {
assert_throws("NamespaceError", function () {
element.setAttributeNS("http://www.w3.org/2000/xmlns/", "attr", "value");
});
assert_throws(null, function () {
assert_throws("NamespaceError", function () {
element.setAttributeNS("http://www.w3.org/2000/xmlns/", "prefix:attr", "value");
});
});

View file

@ -16,7 +16,7 @@ test(function() {
sel.add(optgroup, div);
sel.add(opt, 5);
sel.add(optgroup, 5);
assert_throws(null, function() { sel.add(div) });
assert_throws(new TypeError(), function() { sel.add(div) });
sel.add(optgroup, function() {})
});
</script>