-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wptrunner] Support testdriver.js in {ref,print-ref,crash}tests
Non-testharness executors that don't support testdriver simply skip those tests.
- Loading branch information
1 parent
e049d6d
commit c4a6d69
Showing
12 changed files
with
168 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html class="test-wait"> | ||
<title>crashtests support testdriver.js</title> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<button>Complete the test</button> | ||
<script> | ||
const button = document.querySelector("button"); | ||
button.addEventListener("click", () => { | ||
document.documentElement.classList.remove("reftest-wait"); | ||
}); | ||
test_driver.click(button); | ||
</script> |
4 changes: 4 additions & 0 deletions
4
infrastructure/metadata/infrastructure/reftest/testdriver-in-ref.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[testdriver-in-ref.html] | ||
disabled: | ||
# https://github.com/web-platform-tests/wpt/issues/13183 | ||
if product == "firefox": "marionette executor doesn't implement testdriver for reftests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!DOCTYPE html> | ||
<title>references support testdriver.js</title> | ||
<link rel="match" href="testdriver.html"> | ||
<style> | ||
:root {background-color:green} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<title>print-reftests support testdriver.js</title> | ||
<link rel="match" href="reftest_match-print-ref.html"> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<style> | ||
* { margin: 0; padding: 0; } | ||
div { page-break-after: always; } | ||
</style> | ||
<button>Add a page</button> | ||
<div>page 1</div> | ||
<script> | ||
const button = document.querySelector("button"); | ||
button.addEventListener("click", () => { | ||
button.remove(); | ||
const page2 = document.createElement("div"); | ||
page2.innerText = "page 2"; | ||
document.body.appendChild(page2); | ||
document.documentElement.classList.remove("reftest-wait"); | ||
}); | ||
test_driver.click(button); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<title>reftests support testdriver.js</title> | ||
<link rel="match" href="green.html"> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<style> | ||
:root { | ||
background-color: red; | ||
} | ||
</style> | ||
<button>Turn green</button> | ||
<script> | ||
const button = document.querySelector("button"); | ||
button.addEventListener("click", () => { | ||
button.remove(); | ||
document.documentElement.style.backgroundColor = "green"; | ||
document.documentElement.classList.remove("reftest-wait"); | ||
}); | ||
test_driver.click(button); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters