Fix crash when id attribute is set via SetAttributeNode

This commit is contained in:
Connor Brewster 2017-06-20 10:34:33 -06:00
parent 154186f420
commit 2ccf729aa3
3 changed files with 30 additions and 0 deletions

View file

@ -13024,6 +13024,12 @@
{}
]
],
"mozilla/element_setAttributeNode.html": [
[
"/_mozilla/mozilla/element_setAttributeNode.html",
{}
]
],
"mozilla/empty_clientrect.html": [
[
"/_mozilla/mozilla/empty_clientrect.html",
@ -25731,6 +25737,10 @@
"9ddf84332ca6efa6390315f20d59be2964a69dc7",
"testharness"
],
"mozilla/element_setAttributeNode.html": [
"4159931c8fc73a2305fa3d3bfe988132f38b4975",
"testharness"
],
"mozilla/empty_clientrect.html": [
"0860a059be4885f2b48de1aa7d87b8d0a7058195",
"testharness"

View file

@ -0,0 +1,16 @@
<!doctype html>
<meta charset="utf-8">
<title>Element setAttributeNode</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="test"></div>
<script>
test(function() {
var element = document.getElementById("test");
var attr = document.createAttribute("id");
attr.value = "foo";
element.setAttributeNode(attr);
var id = element.getAttribute("id");
assert_equals(id, "foo", "getAttribute should have value 'foo'");
});
</script>