diff options
Diffstat (limited to 'testing/web-platform/harness/test/testdata')
30 files changed, 199 insertions, 0 deletions
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 |