File: node.bt

package info (click to toggle)
tk-html3 3.0~fossil20110109-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,644 kB
  • ctags: 5,882
  • sloc: ansic: 48,994; tcl: 26,030; sh: 1,190; yacc: 161; makefile: 24
file content (32 lines) | stat: -rw-r--r-- 646 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32


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
}