summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests')
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.html1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.svg1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xhtml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_mathml.xml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.html1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.svg1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xhtml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_svg.xml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.html1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.svg1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xhtml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/bare_xhtml.xml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.html0
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.svg0
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml0
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/empty.xml0
-rwxr-xr-xtesting/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/generate.py77
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.html1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.svg1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.xhtml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/mathml.xml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.html1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.svg1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xhtml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/minimal_html.xml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.html1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.svg1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.xhtml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/svg.xml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.html1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.svg1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xhtml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml.xml1
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.html7
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.svg7
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xhtml7
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_changed.xml7
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.html7
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.svg7
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xhtml7
-rw-r--r--testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/xhtml_ns_removed.xml7
41 files changed, 161 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 000000000..b80a99a78
--- /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 000000000..b80a99a78
--- /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 000000000..b80a99a78
--- /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 000000000..b80a99a78
--- /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 000000000..dc1ced5b6
--- /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 000000000..dc1ced5b6
--- /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 000000000..dc1ced5b6
--- /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 000000000..dc1ced5b6
--- /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 000000000..6c70bcfe4
--- /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 000000000..6c70bcfe4
--- /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 000000000..6c70bcfe4
--- /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 000000000..6c70bcfe4
--- /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 000000000..e69de29bb
--- /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 000000000..e69de29bb
--- /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 000000000..e69de29bb
--- /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 000000000..e69de29bb
--- /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 000000000..88c4da198
--- /dev/null
+++ b/testing/web-platform/tests/dom/nodes/Document-createElement-namespace-tests/generate.py
@@ -0,0 +1,77 @@
+#!/usr/bin/python
+import os
+import sys
+
+THIS_NAME = "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 = (
+ ("empty", ""),
+ ("minimal_html", "<!doctype html><title></title>"),
+
+ ("xhtml", '<html xmlns="http://www.w3.org/1999/xhtml"></html>'),
+ ("svg", '<svg xmlns="http://www.w3.org/2000/svg"></svg>'),
+ ("mathml", '<mathml xmlns="http://www.w3.org/1998/Math/MathML"></mathml>'),
+
+ ("bare_xhtml", "<html></html>"),
+ ("bare_svg", "<svg></svg>"),
+ ("bare_mathml", "<math></math>"),
+
+ ("xhtml_ns_removed", """\
+<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>
+"""),
+ ("xhtml_ns_changed", """\
+<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 = (
+ "html",
+ "xhtml",
+ "xml",
+ "svg",
+ # Was not able to get server MIME type working properly :(
+ #"mml",
+)
+
+def __main__():
+ if len(sys.argv) > 1:
+ print "No arguments expected, aborting"
+ return
+
+ if not os.access(THIS_NAME, os.F_OK):
+ print "Must be run from the directory of " + THIS_NAME + ", aborting"
+ return
+
+ for name in os.listdir("."):
+ if name == THIS_NAME:
+ continue
+ os.remove(name)
+
+ manifest = open("MANIFEST", "w")
+
+ for name, contents in FILES:
+ for extension in EXTENSIONS:
+ f = open(name + "." + extension, "w")
+ f.write(contents)
+ f.close()
+ manifest.write("support " + name + "." + extension + "\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 000000000..0bec8e99e
--- /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 000000000..0bec8e99e
--- /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 000000000..0bec8e99e
--- /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 000000000..0bec8e99e
--- /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 000000000..a33d9859a
--- /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 000000000..a33d9859a
--- /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 000000000..a33d9859a
--- /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 000000000..a33d9859a
--- /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 000000000..64def4af7
--- /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 000000000..64def4af7
--- /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 000000000..64def4af7
--- /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 000000000..64def4af7
--- /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 000000000..1cba99824
--- /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 000000000..1cba99824
--- /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 000000000..1cba99824
--- /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 000000000..1cba99824
--- /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 000000000..b228c7f74
--- /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 000000000..b228c7f74
--- /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 000000000..b228c7f74
--- /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 000000000..b228c7f74
--- /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 000000000..dba395fed
--- /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 000000000..dba395fed
--- /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 000000000..dba395fed
--- /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 000000000..dba395fed
--- /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>