diff options
Diffstat (limited to 'testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests')
41 files changed, 164 insertions, 0 deletions
diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.html new file mode 100644 index 0000000000..b80a99a784 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.html @@ -0,0 +1 @@ +<math></math>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.svg new file mode 100644 index 0000000000..b80a99a784 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.svg @@ -0,0 +1 @@ +<math></math>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xhtml new file mode 100644 index 0000000000..b80a99a784 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xhtml @@ -0,0 +1 @@ +<math></math>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xml new file mode 100644 index 0000000000..b80a99a784 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xml @@ -0,0 +1 @@ +<math></math>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.html new file mode 100644 index 0000000000..dc1ced5b6b --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.html @@ -0,0 +1 @@ +<svg></svg>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.svg new file mode 100644 index 0000000000..dc1ced5b6b --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.svg @@ -0,0 +1 @@ +<svg></svg>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xhtml new file mode 100644 index 0000000000..dc1ced5b6b --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xhtml @@ -0,0 +1 @@ +<svg></svg>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xml new file mode 100644 index 0000000000..dc1ced5b6b --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xml @@ -0,0 +1 @@ +<svg></svg>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.html new file mode 100644 index 0000000000..6c70bcfe4d --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.html @@ -0,0 +1 @@ +<html></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.svg new file mode 100644 index 0000000000..6c70bcfe4d --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.svg @@ -0,0 +1 @@ +<html></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xhtml new file mode 100644 index 0000000000..6c70bcfe4d --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xhtml @@ -0,0 +1 @@ +<html></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xml new file mode 100644 index 0000000000..6c70bcfe4d --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xml @@ -0,0 +1 @@ +<html></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.html new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.html diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.svg new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.svg diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.xml new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.xml diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/generate.py b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/generate.py new file mode 100755 index 0000000000..a0bca546c7 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/generate.py @@ -0,0 +1,80 @@ +#!/usr/bin/python + +from __future__ import print_function + +import os +import sys + +THIS_NAME = u"generate.py" + +# Note: these lists must be kept in sync with the lists in +# Document-createElement-namespace.html, and this script must be run whenever +# the lists are updated. (We could keep the lists in a shared JSON file, but +# seems like too much effort.) +FILES = ( + (u"empty", u""), + (u"minimal_html", u"<!doctype html><title></title>"), + + (u"xhtml", u'<html xmlns="http://www.w3.org/1999/xhtml"></html>'), + (u"svg", u'<svg xmlns="http://www.w3.org/2000/svg"></svg>'), + (u"mathml", u'<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>'), + + (u"bare_xhtml", u"<html></html>"), + (u"bare_svg", u"<svg></svg>"), + (u"bare_mathml", u"<math></math>"), + + (u"xhtml_ns_removed", u"""\ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS(null, "html"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> +"""), + (u"xhtml_ns_changed", u"""\ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> +"""), +) + +EXTENSIONS = ( + u"html", + u"xhtml", + u"xml", + u"svg", + # Was not able to get server MIME type working properly :( + #"mml", +) + +def __main__(): + if len(sys.argv) > 1: + print(u"No arguments expected, aborting") + return + + if not os.access(THIS_NAME, os.F_OK): + print(u"Must be run from the directory of " + THIS_NAME + u", aborting") + return + + for name in os.listdir(u"."): + if name == THIS_NAME: + continue + os.remove(name) + + manifest = open(u"MANIFEST", u"w") + + for name, contents in FILES: + for extension in EXTENSIONS: + f = open(name + u"." + extension, u"w") + f.write(contents) + f.close() + manifest.write(u"support " + name + u"." + extension + u"\n") + + manifest.close() + +__main__() diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.html new file mode 100644 index 0000000000..0bec8e99e4 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.html @@ -0,0 +1 @@ +<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.svg new file mode 100644 index 0000000000..0bec8e99e4 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.svg @@ -0,0 +1 @@ +<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.xhtml new file mode 100644 index 0000000000..0bec8e99e4 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.xhtml @@ -0,0 +1 @@ +<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.xml new file mode 100644 index 0000000000..0bec8e99e4 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.xml @@ -0,0 +1 @@ +<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.html new file mode 100644 index 0000000000..a33d9859af --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.html @@ -0,0 +1 @@ +<!doctype html><title></title>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.svg new file mode 100644 index 0000000000..a33d9859af --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.svg @@ -0,0 +1 @@ +<!doctype html><title></title>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xhtml new file mode 100644 index 0000000000..a33d9859af --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xhtml @@ -0,0 +1 @@ +<!doctype html><title></title>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xml new file mode 100644 index 0000000000..a33d9859af --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xml @@ -0,0 +1 @@ +<!doctype html><title></title>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.html new file mode 100644 index 0000000000..64def4af7f --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.html @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg"></svg>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.svg new file mode 100644 index 0000000000..64def4af7f --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg"></svg>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.xhtml new file mode 100644 index 0000000000..64def4af7f --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.xhtml @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg"></svg>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.xml new file mode 100644 index 0000000000..64def4af7f --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.xml @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg"></svg>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.html new file mode 100644 index 0000000000..1cba998241 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.html @@ -0,0 +1 @@ +<html xmlns="http://www.w3.org/1999/xhtml"></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.svg new file mode 100644 index 0000000000..1cba998241 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.svg @@ -0,0 +1 @@ +<html xmlns="http://www.w3.org/1999/xhtml"></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xhtml new file mode 100644 index 0000000000..1cba998241 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xhtml @@ -0,0 +1 @@ +<html xmlns="http://www.w3.org/1999/xhtml"></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xml new file mode 100644 index 0000000000..1cba998241 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xml @@ -0,0 +1 @@ +<html xmlns="http://www.w3.org/1999/xhtml"></html>
\ No newline at end of file diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.html new file mode 100644 index 0000000000..b228c7f740 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.html @@ -0,0 +1,7 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.svg new file mode 100644 index 0000000000..b228c7f740 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.svg @@ -0,0 +1,7 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xhtml new file mode 100644 index 0000000000..b228c7f740 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xhtml @@ -0,0 +1,7 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xml new file mode 100644 index 0000000000..b228c7f740 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xml @@ -0,0 +1,7 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS("http://www.w3.org/2000/svg", "abc"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.html b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.html new file mode 100644 index 0000000000..dba395fed0 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.html @@ -0,0 +1,7 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS(null, "html"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.svg b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.svg new file mode 100644 index 0000000000..dba395fed0 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.svg @@ -0,0 +1,7 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS(null, "html"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xhtml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xhtml new file mode 100644 index 0000000000..dba395fed0 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xhtml @@ -0,0 +1,7 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS(null, "html"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> diff --git a/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xml b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xml new file mode 100644 index 0000000000..dba395fed0 --- /dev/null +++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xml @@ -0,0 +1,7 @@ +<html xmlns="http://www.w3.org/1999/xhtml"> + <head><script> + var newRoot = document.createElementNS(null, "html"); + document.removeChild(document.documentElement); + document.appendChild(newRoot); + </script></head> +</html> |