summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/harness/test/testdata/testharness
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/harness/test/testdata/testharness')
-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
10 files changed, 90 insertions, 0 deletions
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