

do_browser_test node.1 -javascript {
  return Node.ELEMENT_NODE
}

do_browser_test node.2 -javascript {
  Node.prop = "hello"
  return Node.prop
}

# This test does not work. Firefox allows the Node.ELEMENT_NODE
# constant to be overwritten, whereas Hv3 throws an exception.
#
# ::browsertest::do_test node.3 -timeout 10000000 -javascript {
#   Node.ELEMENT_NODE = "hello"
#   return Node.ELEMENT_NODE
# } -expected hello

do_browser_test node.3 -javascript {
  try {
    document.body.nodeType = 10
  } catch (e) {
    return e
  }
  return ""
}

do_browser_test node.4 -html {<body>} -javascript {
  return "" + document.body.ELEMENT_NODE
}

