summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/harness/test
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/harness/test
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/harness/test')
-rw-r--r--testing/web-platform/harness/test/metadata/reftest/reftest_and_fail.html.ini3
-rw-r--r--testing/web-platform/harness/test/metadata/reftest/reftest_cycle_fail.html.ini3
-rw-r--r--testing/web-platform/harness/test/metadata/reftest/reftest_match_fail.html.ini3
-rw-r--r--testing/web-platform/harness/test/metadata/reftest/reftest_mismatch_fail.html.ini3
-rw-r--r--testing/web-platform/harness/test/metadata/reftest/reftest_ref_timeout.html.ini3
-rw-r--r--testing/web-platform/harness/test/metadata/reftest/reftest_timeout.html.ini3
-rw-r--r--testing/web-platform/harness/test/metadata/testharness/firefox/__dir__.ini2
-rw-r--r--testing/web-platform/harness/test/metadata/testharness/firefox/subdir/test_pref_reset.html.ini2
-rw-r--r--testing/web-platform/harness/test/metadata/testharness/firefox/test_pref_set.html.ini3
-rw-r--r--testing/web-platform/harness/test/metadata/testharness/subdir/__dir__.ini1
-rw-r--r--testing/web-platform/harness/test/metadata/testharness/subdir/testharness_1.html.ini2
-rw-r--r--testing/web-platform/harness/test/metadata/testharness/testharness_0.html.ini4
-rw-r--r--testing/web-platform/harness/test/metadata/testharness/testharness_error.html.ini3
-rw-r--r--testing/web-platform/harness/test/metadata/testharness/testharness_timeout.html.ini3
-rw-r--r--testing/web-platform/harness/test/test.cfg.example20
-rw-r--r--testing/web-platform/harness/test/test.py166
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/green-ref.html4
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/green.html3
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/red.html3
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest.https.html9
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_and_fail.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_and_fail_0-ref.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_cycle.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_cycle_0-ref.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_cycle_1-ref.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_cycle_fail.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_cycle_fail_0-ref.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_match.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_match_fail.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_mismatch.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_mismatch_fail.html5
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_or_0.html6
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_ref_timeout-ref.html6
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_ref_timeout.html6
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_timeout.html6
-rw-r--r--testing/web-platform/harness/test/testdata/reftest/reftest_wait_0.html11
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/firefox/subdir/test_pref_inherit.html10
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/firefox/subdir/test_pref_reset.html10
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/firefox/test_pref_dir.html10
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/firefox/test_pref_set.html10
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/subdir/testharness_1.html9
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/testharness.https.html10
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/testharness_0.html9
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/testharness_error.html7
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/testharness_long_timeout.html9
-rw-r--r--testing/web-platform/harness/test/testdata/testharness/testharness_timeout.html6
46 files changed, 423 insertions, 0 deletions
diff --git a/testing/web-platform/harness/test/metadata/reftest/reftest_and_fail.html.ini b/testing/web-platform/harness/test/metadata/reftest/reftest_and_fail.html.ini
new file mode 100644
index 000000000..81aef049c
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/reftest/reftest_and_fail.html.ini
@@ -0,0 +1,3 @@
+[reftest_and_fail.html]
+ type: reftest
+ expected: FAIL
diff --git a/testing/web-platform/harness/test/metadata/reftest/reftest_cycle_fail.html.ini b/testing/web-platform/harness/test/metadata/reftest/reftest_cycle_fail.html.ini
new file mode 100644
index 000000000..472b33f77
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/reftest/reftest_cycle_fail.html.ini
@@ -0,0 +1,3 @@
+[reftest_cycle_fail.html]
+ type: reftest
+ expected: FAIL
diff --git a/testing/web-platform/harness/test/metadata/reftest/reftest_match_fail.html.ini b/testing/web-platform/harness/test/metadata/reftest/reftest_match_fail.html.ini
new file mode 100644
index 000000000..f3dc3362f
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/reftest/reftest_match_fail.html.ini
@@ -0,0 +1,3 @@
+[reftest_match_fail.html]
+ type: reftest
+ expected: FAIL
diff --git a/testing/web-platform/harness/test/metadata/reftest/reftest_mismatch_fail.html.ini b/testing/web-platform/harness/test/metadata/reftest/reftest_mismatch_fail.html.ini
new file mode 100644
index 000000000..1055337e2
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/reftest/reftest_mismatch_fail.html.ini
@@ -0,0 +1,3 @@
+[reftest_mismatch_fail.html]
+ type: reftest
+ expected: FAIL
diff --git a/testing/web-platform/harness/test/metadata/reftest/reftest_ref_timeout.html.ini b/testing/web-platform/harness/test/metadata/reftest/reftest_ref_timeout.html.ini
new file mode 100644
index 000000000..8936241ad
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/reftest/reftest_ref_timeout.html.ini
@@ -0,0 +1,3 @@
+[reftest_ref_timeout.html]
+ type: reftest
+ expected: TIMEOUT
diff --git a/testing/web-platform/harness/test/metadata/reftest/reftest_timeout.html.ini b/testing/web-platform/harness/test/metadata/reftest/reftest_timeout.html.ini
new file mode 100644
index 000000000..0d1b9bade
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/reftest/reftest_timeout.html.ini
@@ -0,0 +1,3 @@
+[reftest_timeout.html]
+ type: reftest
+ expected: TIMEOUT
diff --git a/testing/web-platform/harness/test/metadata/testharness/firefox/__dir__.ini b/testing/web-platform/harness/test/metadata/testharness/firefox/__dir__.ini
new file mode 100644
index 000000000..c9d164cd4
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/testharness/firefox/__dir__.ini
@@ -0,0 +1,2 @@
+prefs: ["browser.display.foreground_color:#FF0000",
+ "browser.display.background_color:#000000"] \ No newline at end of file
diff --git a/testing/web-platform/harness/test/metadata/testharness/firefox/subdir/test_pref_reset.html.ini b/testing/web-platform/harness/test/metadata/testharness/firefox/subdir/test_pref_reset.html.ini
new file mode 100644
index 000000000..6c9198d9b
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/testharness/firefox/subdir/test_pref_reset.html.ini
@@ -0,0 +1,2 @@
+[test_pref_reset.html]
+ prefs: [@Reset]
diff --git a/testing/web-platform/harness/test/metadata/testharness/firefox/test_pref_set.html.ini b/testing/web-platform/harness/test/metadata/testharness/firefox/test_pref_set.html.ini
new file mode 100644
index 000000000..bc9bfb9c4
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/testharness/firefox/test_pref_set.html.ini
@@ -0,0 +1,3 @@
+[test_pref_set.html]
+ prefs: ["browser.display.foreground_color:#00FF00",
+ "browser.display.background_color:#000000"]
diff --git a/testing/web-platform/harness/test/metadata/testharness/subdir/__dir__.ini b/testing/web-platform/harness/test/metadata/testharness/subdir/__dir__.ini
new file mode 100644
index 000000000..a9157fbc6
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/testharness/subdir/__dir__.ini
@@ -0,0 +1 @@
+disabled: true \ No newline at end of file
diff --git a/testing/web-platform/harness/test/metadata/testharness/subdir/testharness_1.html.ini b/testing/web-platform/harness/test/metadata/testharness/subdir/testharness_1.html.ini
new file mode 100644
index 000000000..db9393987
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/testharness/subdir/testharness_1.html.ini
@@ -0,0 +1,2 @@
+[testharness_1.html]
+ disabled: @False \ No newline at end of file
diff --git a/testing/web-platform/harness/test/metadata/testharness/testharness_0.html.ini b/testing/web-platform/harness/test/metadata/testharness/testharness_0.html.ini
new file mode 100644
index 000000000..90b9a6e9f
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/testharness/testharness_0.html.ini
@@ -0,0 +1,4 @@
+[testharness_0.html]
+ type: testharness
+ [Test that should fail]
+ expected: FAIL
diff --git a/testing/web-platform/harness/test/metadata/testharness/testharness_error.html.ini b/testing/web-platform/harness/test/metadata/testharness/testharness_error.html.ini
new file mode 100644
index 000000000..fa53e0733
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/testharness/testharness_error.html.ini
@@ -0,0 +1,3 @@
+[testharness_error.html]
+ type: testharness
+ expected: ERROR
diff --git a/testing/web-platform/harness/test/metadata/testharness/testharness_timeout.html.ini b/testing/web-platform/harness/test/metadata/testharness/testharness_timeout.html.ini
new file mode 100644
index 000000000..55eca5191
--- /dev/null
+++ b/testing/web-platform/harness/test/metadata/testharness/testharness_timeout.html.ini
@@ -0,0 +1,3 @@
+[testharness_timeout.html]
+ type: testharness
+ expected: TIMEOUT
diff --git a/testing/web-platform/harness/test/test.cfg.example b/testing/web-platform/harness/test/test.cfg.example
new file mode 100644
index 000000000..db4822621
--- /dev/null
+++ b/testing/web-platform/harness/test/test.cfg.example
@@ -0,0 +1,20 @@
+[general]
+tests=/path/to/web-platform-tests/
+metadata=/path/to/web-platform-tests/
+ssl-type=none
+
+# [firefox]
+# binary=/path/to/firefox
+# prefs-root=/path/to/gecko-src/testing/profiles/
+
+# [servo]
+# binary=/path/to/servo-src/target/release/servo
+# exclude=testharness # Because it needs a special testharness.js
+
+# [servodriver]
+# binary=/path/to/servo-src/target/release/servo
+# exclude=testharness # Because it needs a special testharness.js
+
+# [chrome]
+# binary=/path/to/chrome
+# webdriver-binary=/path/to/chromedriver
diff --git a/testing/web-platform/harness/test/test.py b/testing/web-platform/harness/test/test.py
new file mode 100644
index 000000000..034e317bd
--- /dev/null
+++ b/testing/web-platform/harness/test/test.py
@@ -0,0 +1,166 @@
+import ConfigParser
+import argparse
+import json
+import os
+import sys
+import tempfile
+import threading
+import time
+from StringIO import StringIO
+
+from mozlog import structuredlog, reader
+from mozlog.handlers import BaseHandler, StreamHandler, StatusHandler
+from mozlog.formatters import MachFormatter
+from wptrunner import wptcommandline, wptrunner
+
+here = os.path.abspath(os.path.dirname(__file__))
+
+def setup_wptrunner_logging(logger):
+ structuredlog.set_default_logger(logger)
+ wptrunner.logger = logger
+ wptrunner.wptlogging.setup_stdlib_logger()
+
+class ResultHandler(BaseHandler):
+ def __init__(self, verbose=False, logger=None):
+ self.inner = StreamHandler(sys.stdout, MachFormatter())
+ BaseHandler.__init__(self, self.inner)
+ self.product = None
+ self.verbose = verbose
+ self.logger = logger
+
+ self.register_message_handlers("wptrunner-test", {"set-product": self.set_product})
+
+ def set_product(self, product):
+ self.product = product
+
+ def __call__(self, data):
+ if self.product is not None and data["action"] in ["suite_start", "suite_end"]:
+ # Hack: mozlog sets some internal state to prevent multiple suite_start or
+ # suite_end messages. We actually want that here (one from the metaharness
+ # and one from the individual test type harness), so override that internal
+ # state (a better solution might be to not share loggers, but this works well
+ # enough)
+ self.logger._state.suite_started = True
+ return
+
+ if (not self.verbose and
+ (data["action"] == "process_output" or
+ data["action"] == "log" and data["level"] not in ["error", "critical"])):
+ return
+
+ if "test" in data:
+ data = data.copy()
+ data["test"] = "%s: %s" % (self.product, data["test"])
+
+ return self.inner(data)
+
+def test_settings():
+ return {
+ "include": "_test",
+ "manifest-update": "",
+ "no-capture-stdio": ""
+ }
+
+def read_config():
+ parser = ConfigParser.ConfigParser()
+ parser.read("test.cfg")
+
+ rv = {"general":{},
+ "products":{}}
+
+ rv["general"].update(dict(parser.items("general")))
+
+ # This only allows one product per whatever for now
+ for product in parser.sections():
+ if product != "general":
+ dest = rv["products"][product] = {}
+ for key, value in parser.items(product):
+ rv["products"][product][key] = value
+
+ return rv
+
+def run_tests(product, kwargs):
+ kwargs["test_paths"]["/_test/"] = {"tests_path": os.path.join(here, "testdata"),
+ "metadata_path": os.path.join(here, "metadata")}
+
+ wptrunner.run_tests(**kwargs)
+
+def settings_to_argv(settings):
+ rv = []
+ for name, value in settings.iteritems():
+ key = "--%s" % name
+ if not value:
+ rv.append(key)
+ elif isinstance(value, list):
+ for item in value:
+ rv.extend([key, item])
+ else:
+ rv.extend([key, value])
+ return rv
+
+def set_from_args(settings, args):
+ if args.test:
+ settings["include"] = args.test
+ if args.tags:
+ settings["tags"] = args.tags
+
+def run(config, args):
+ logger = structuredlog.StructuredLogger("web-platform-tests")
+ logger.add_handler(ResultHandler(logger=logger, verbose=args.verbose))
+ setup_wptrunner_logging(logger)
+
+ parser = wptcommandline.create_parser()
+
+ logger.suite_start(tests=[])
+
+ for product, product_settings in config["products"].iteritems():
+ if args.product and product not in args.product:
+ continue
+
+ settings = test_settings()
+ settings.update(config["general"])
+ settings.update(product_settings)
+ settings["product"] = product
+ set_from_args(settings, args)
+
+ kwargs = vars(parser.parse_args(settings_to_argv(settings)))
+ wptcommandline.check_args(kwargs)
+
+ logger.send_message("wptrunner-test", "set-product", product)
+
+ run_tests(product, kwargs)
+
+ logger.send_message("wptrunner-test", "set-product", None)
+ logger.suite_end()
+
+def get_parser():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("-v", "--verbose", action="store_true", default=False,
+ help="verbose log output")
+ parser.add_argument("--product", action="append",
+ help="Specific product to include in test run")
+ parser.add_argument("--pdb", action="store_true",
+ help="Invoke pdb on uncaught exception")
+ parser.add_argument("--tag", action="append", dest="tags",
+ help="tags to select tests")
+ parser.add_argument("test", nargs="*",
+ help="Specific tests to include in test run")
+ return parser
+
+def main():
+ config = read_config()
+
+ args = get_parser().parse_args()
+
+ try:
+ run(config, args)
+ except Exception:
+ if args.pdb:
+ import pdb, traceback
+ print traceback.format_exc()
+ pdb.post_mortem()
+ else:
+ raise
+
+if __name__ == "__main__":
+ main()
diff --git a/testing/web-platform/harness/test/testdata/reftest/green-ref.html b/testing/web-platform/harness/test/testdata/reftest/green-ref.html
new file mode 100644
index 000000000..0e145d60b
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/green-ref.html
@@ -0,0 +1,4 @@
+<link rel=match href=green.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/green.html b/testing/web-platform/harness/test/testdata/reftest/green.html
new file mode 100644
index 000000000..38167bb58
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/green.html
@@ -0,0 +1,3 @@
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/red.html b/testing/web-platform/harness/test/testdata/reftest/red.html
new file mode 100644
index 000000000..2b677e006
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/red.html
@@ -0,0 +1,3 @@
+<style>
+:root {background-color:red}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest.https.html b/testing/web-platform/harness/test/testdata/reftest/reftest.https.html
new file mode 100644
index 000000000..5a45f10f3
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest.https.html
@@ -0,0 +1,9 @@
+<link rel=match href=green.html>
+<style>
+:root {background-color:red}
+</style>
+<script>
+if (window.location.protocol === "https:") {
+ document.documentElement.style.backgroundColor = "green";
+}
+</script> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_and_fail.html b/testing/web-platform/harness/test/testdata/reftest/reftest_and_fail.html
new file mode 100644
index 000000000..296019535
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_and_fail.html
@@ -0,0 +1,5 @@
+<title>Reftest chain that should fail</title>
+<link rel=match href=reftest_and_fail_0-ref.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_and_fail_0-ref.html b/testing/web-platform/harness/test/testdata/reftest/reftest_and_fail_0-ref.html
new file mode 100644
index 000000000..04fb9aa15
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_and_fail_0-ref.html
@@ -0,0 +1,5 @@
+<title>Reftest chain that should fail</title>
+<link rel=match href=red.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_cycle.html b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle.html
new file mode 100644
index 000000000..4a84a3b67
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle.html
@@ -0,0 +1,5 @@
+<title>Reftest with cycle, all match</title>
+<link rel=match href=reftest_cycle_0-ref.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_0-ref.html b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_0-ref.html
new file mode 100644
index 000000000..118bfd884
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_0-ref.html
@@ -0,0 +1,5 @@
+<title>OR match that should pass</title>
+<link rel=match href=reftest_cycle_1-ref.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_1-ref.html b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_1-ref.html
new file mode 100644
index 000000000..59be0b641
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_1-ref.html
@@ -0,0 +1,5 @@
+<title>Reftest with cycle, all match</title>
+<link rel=match href=reftest_cycle.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_fail.html b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_fail.html
new file mode 100644
index 000000000..175e76c4c
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_fail.html
@@ -0,0 +1,5 @@
+<title>Reftest with cycle, fails</title>
+<link rel=match href=reftest_cycle_fail_0-ref.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_fail_0-ref.html b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_fail_0-ref.html
new file mode 100644
index 000000000..c8e548c46
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_cycle_fail_0-ref.html
@@ -0,0 +1,5 @@
+<title>Reftest with cycle, fails</title>
+<link rel=mismatch href=reftest_cycle_fail.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_match.html b/testing/web-platform/harness/test/testdata/reftest/reftest_match.html
new file mode 100644
index 000000000..333cc6c1e
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_match.html
@@ -0,0 +1,5 @@
+<title>rel=match that should pass</title>
+<link rel=match href=green.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_match_fail.html b/testing/web-platform/harness/test/testdata/reftest/reftest_match_fail.html
new file mode 100644
index 000000000..a9272ef74
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_match_fail.html
@@ -0,0 +1,5 @@
+<title>rel=match that should fail</title>
+<link rel=match href=red.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_mismatch.html b/testing/web-platform/harness/test/testdata/reftest/reftest_mismatch.html
new file mode 100644
index 000000000..af5fa0750
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_mismatch.html
@@ -0,0 +1,5 @@
+<title>rel=mismatch that should pass</title>
+<link rel=mismatch href=red.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_mismatch_fail.html b/testing/web-platform/harness/test/testdata/reftest/reftest_mismatch_fail.html
new file mode 100644
index 000000000..8d160c4fc
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_mismatch_fail.html
@@ -0,0 +1,5 @@
+<title>rel=mismatch that should fail</title>
+<link rel=mismatch href=green.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_or_0.html b/testing/web-platform/harness/test/testdata/reftest/reftest_or_0.html
new file mode 100644
index 000000000..3a51de216
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_or_0.html
@@ -0,0 +1,6 @@
+<title>OR match that should pass</title>
+<link rel=match href=red.html>
+<link rel=match href=green.html>
+<style>
+:root {background-color:green}
+</style> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_ref_timeout-ref.html b/testing/web-platform/harness/test/testdata/reftest/reftest_ref_timeout-ref.html
new file mode 100644
index 000000000..04cbb71e0
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_ref_timeout-ref.html
@@ -0,0 +1,6 @@
+<html class="reftest-wait">
+<title>rel=match that should time out in the ref</title>
+<link rel=match href=reftest_ref_timeout-ref.html>
+<style>
+:root {background-color:green}
+</style>
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_ref_timeout.html b/testing/web-platform/harness/test/testdata/reftest/reftest_ref_timeout.html
new file mode 100644
index 000000000..aaf68f5cb
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_ref_timeout.html
@@ -0,0 +1,6 @@
+<html>
+<title>rel=match that should time out in the ref</title>
+<link rel=match href=reftest_ref_timeout-ref.html>
+<style>
+:root {background-color:green}
+</style>
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_timeout.html b/testing/web-platform/harness/test/testdata/reftest/reftest_timeout.html
new file mode 100644
index 000000000..b10e676bf
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_timeout.html
@@ -0,0 +1,6 @@
+<html class="reftest-wait">
+<title>rel=match that should timeout</title>
+<link rel=match href=green.html>
+<style>
+:root {background-color:green}
+</style>
diff --git a/testing/web-platform/harness/test/testdata/reftest/reftest_wait_0.html b/testing/web-platform/harness/test/testdata/reftest/reftest_wait_0.html
new file mode 100644
index 000000000..0088c0cab
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/reftest/reftest_wait_0.html
@@ -0,0 +1,11 @@
+<title>rel=match that should fail</title>
+<link rel=match href=red.html>
+<style>
+:root {background-color:red}
+</style>
+<body class="reftest-wait">
+<script>
+setTimeout(function() {
+ document.documentElement.style.backgroundColor = "green";
+ body.className = "";
+}, 2000); \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/testharness/firefox/subdir/test_pref_inherit.html b/testing/web-platform/harness/test/testdata/testharness/firefox/subdir/test_pref_inherit.html
new file mode 100644
index 000000000..10b285194
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/firefox/subdir/test_pref_inherit.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>Example pref test</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<p>Test requires the pref browser.display.foreground_color to be set to #00FF00</p>
+<script>
+test(function() {
+ assert_equals(getComputedStyle(document.body).color, "rgb(255, 0, 0)");
+}, "Test that pref was set");
+</script>
diff --git a/testing/web-platform/harness/test/testdata/testharness/firefox/subdir/test_pref_reset.html b/testing/web-platform/harness/test/testdata/testharness/firefox/subdir/test_pref_reset.html
new file mode 100644
index 000000000..5c75c1160
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/firefox/subdir/test_pref_reset.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>Example pref test</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<p>Test requires the pref browser.display.foreground_color to be set to #00FF00</p>
+<script>
+test(function() {
+ assert_equals(getComputedStyle(document.body).color, "rgb(0, 0, 0)");
+}, "Test that pref was reset");
+</script>
diff --git a/testing/web-platform/harness/test/testdata/testharness/firefox/test_pref_dir.html b/testing/web-platform/harness/test/testdata/testharness/firefox/test_pref_dir.html
new file mode 100644
index 000000000..105d9070c
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/firefox/test_pref_dir.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>Example pref test</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<p>Test requires the pref browser.display.foreground_color to be set to #FF0000</p>
+<script>
+test(function() {
+ assert_equals(getComputedStyle(document.body).color, "rgb(255, 0, 0)");
+}, "Test that pref was set");
+</script>
diff --git a/testing/web-platform/harness/test/testdata/testharness/firefox/test_pref_set.html b/testing/web-platform/harness/test/testdata/testharness/firefox/test_pref_set.html
new file mode 100644
index 000000000..8e5e2989b
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/firefox/test_pref_set.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>Example pref test</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<p>Test requires the pref browser.display.foreground_color to be set to #00FF00</p>
+<script>
+test(function() {
+ assert_equals(getComputedStyle(document.body).color, "rgb(0, 255, 0)");
+}, "Test that pref was set");
+</script>
diff --git a/testing/web-platform/harness/test/testdata/testharness/subdir/testharness_1.html b/testing/web-platform/harness/test/testdata/testharness/subdir/testharness_1.html
new file mode 100644
index 000000000..fd2fc431d
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/subdir/testharness_1.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<title>Test should be enabled</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ assert_true(true);
+}, "Test that should pass");
+</script>
diff --git a/testing/web-platform/harness/test/testdata/testharness/testharness.https.html b/testing/web-platform/harness/test/testdata/testharness/testharness.https.html
new file mode 100644
index 000000000..5871eac00
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/testharness.https.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<title>Example https test</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ assert_equals(window.location.protocol, "https:");
+}, "Test that file was loaded with the correct protocol");
+
+</script> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/testharness/testharness_0.html b/testing/web-platform/harness/test/testdata/testharness/testharness_0.html
new file mode 100644
index 000000000..ff0654cb9
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/testharness_0.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<title>Test should be disabled</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ assert_true(false);
+}, "Test that should fail");
+</script>
diff --git a/testing/web-platform/harness/test/testdata/testharness/testharness_error.html b/testing/web-platform/harness/test/testdata/testharness/testharness_error.html
new file mode 100644
index 000000000..0ac5ba46a
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/testharness_error.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<title>testharness.js test that should error</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+undefined_function()
+</script>
diff --git a/testing/web-platform/harness/test/testdata/testharness/testharness_long_timeout.html b/testing/web-platform/harness/test/testdata/testharness/testharness_long_timeout.html
new file mode 100644
index 000000000..fc94e055b
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/testharness_long_timeout.html
@@ -0,0 +1,9 @@
+<!doctype html>
+<title>testharness.js test with long timeout</title>
+<meta name=timeout content=long>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+var t = async_test("Long timeout test");
+setTimeout(t.step_func_done(function() {assert_true(true)}), 15*1000);
+</script> \ No newline at end of file
diff --git a/testing/web-platform/harness/test/testdata/testharness/testharness_timeout.html b/testing/web-platform/harness/test/testdata/testharness/testharness_timeout.html
new file mode 100644
index 000000000..b99915ac7
--- /dev/null
+++ b/testing/web-platform/harness/test/testdata/testharness/testharness_timeout.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<title>Simple testharness.js usage</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+// This file should time out, obviously \ No newline at end of file