diff --git a/mozilla/parser/htmlparser/tests/mochitest/Makefile.in b/mozilla/parser/htmlparser/tests/mochitest/Makefile.in
index 60c80714f73..bc6a5108204 100644
--- a/mozilla/parser/htmlparser/tests/mochitest/Makefile.in
+++ b/mozilla/parser/htmlparser/tests/mochitest/Makefile.in
@@ -44,7 +44,14 @@ relativesrcdir = parser/htmlparser/tests/mochitest
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
-_TEST_FILES = test_bug339350.xhtml \
+_TEST_FILES = parser_datreader.js \
+ parser_web_testrunner.js \
+ html5lib_tree_dat1.txt \
+ html5lib_tree_dat2.txt \
+ html5lib_tree_dat3.txt \
+ html5_tree_construction_exceptions.js \
+ test_html5_tree_construction.html \
+ test_bug339350.xhtml \
test_bug358797.html \
$(NULL)
diff --git a/mozilla/parser/htmlparser/tests/mochitest/html5_tree_construction_exceptions.js b/mozilla/parser/htmlparser/tests/mochitest/html5_tree_construction_exceptions.js
new file mode 100644
index 00000000000..14cbdeb5735
--- /dev/null
+++ b/mozilla/parser/htmlparser/tests/mochitest/html5_tree_construction_exceptions.js
@@ -0,0 +1,70 @@
+/* these are the tests we don't pass */
+var html5Exceptions = {
+"": true,
+ "X": true,
+ "
X": true,
+ "