iv.removeAttribute("data-foo");
  assert_false("foo" in div.dataset);
  assert_equals(div.dataset.foo, undefined);
}, "Should return 'undefined' after removing an attribute")
test(function() {
  assert_equals(document.createElementNS("test", "test").dataset, undefined);
}, "Should not have a .dataset on random elements");
test(function() {
  var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg")
  assert_true(svg.dataset instanceof DOMStringMap);
}, "SVG elements should have a .dataset");
<