forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wpt][fullscreen] Upstream {ref,crash}tests that use testdriver
As of web-platform-tests#48486, the WebDriver-based testdriver infrastructure now supports {ref,crash}tests. Revert most of https://crrev.com/c/5972758 to move the tests back. In Chromium CQ, moving the tests out of `wpt_internal/` also has the effect of running the tests with `headless_shell` + `chromedriver`, which passes these tests. Bug: None Change-Id: I396053ab5a7ab2a27558fa1de71af614107a8f02 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088404 Reviewed-by: Mike Wasserman <[email protected]> Commit-Queue: Mike Wasserman <[email protected]> Auto-Submit: Jonathan Lee <[email protected]> Cr-Commit-Position: refs/heads/main@{#1396271}
- Loading branch information
1 parent
61ca832
commit 70e5fd9
Showing
9 changed files
with
205 additions
and
0 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,21 @@ | ||
<!doctype html> | ||
<html class="reftest-wait"> | ||
<link rel="help" href="https://crbug.com/1312699"> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<video></video> | ||
<script> | ||
async function crash() { | ||
let video = document.querySelector("video"); | ||
await video.requestFullscreen(); | ||
video.width = null; | ||
document.documentElement.classList.remove("reftest-wait"); | ||
} | ||
document.addEventListener("click", () => crash(), false); | ||
|
||
requestAnimationFrame(() => requestAnimationFrame(() => { | ||
test_driver.click(document.body); | ||
})); | ||
</script> | ||
</body> | ||
</html> |
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,31 @@ | ||
<!DOCTYPE html> | ||
<html class=test-wait> | ||
<link rel=author href="mailto:[email protected]"> | ||
<link rel=author href="mailto:[email protected]"> | ||
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=1338135"> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<body> | ||
<script> | ||
async function crash() { | ||
const col = document.createElement("col"); | ||
document.body.appendChild(col); | ||
|
||
let fullscreenPromise = null; | ||
await test_driver.bless('open fullscreen', () => { | ||
fullscreenPromise = col.requestFullscreen({navigationUI: 'hide'}); | ||
}); | ||
await fullscreenPromise; | ||
|
||
const a = document.createElement("a"); | ||
document.body.appendChild(a); | ||
|
||
document.body.style.all = 'unset'; | ||
document.body.style.contentVisibility = 'hidden'; | ||
|
||
a.offsetParent; | ||
|
||
document.documentElement.classList.remove('test-wait'); | ||
} | ||
crash(); | ||
</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,2 @@ | ||
<!DOCTYPE html> | ||
<body style="background: green"></body> |
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,22 @@ | ||
<!DOCTYPE html> | ||
<html class=reftest-wait> | ||
<title>::backdrop for a fullscreen iframe element</title> | ||
<link rel=match href="backdrop-green-ref.html"> | ||
<link rel=help href="https://github.com/w3c/csswg-drafts/issues/6939"> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
|
||
<style> | ||
iframe::backdrop { | ||
background: green; | ||
} | ||
</style> | ||
<iframe></iframe> | ||
<script> | ||
document.addEventListener('fullscreenchange', () => { | ||
document.documentElement.classList.remove('reftest-wait'); | ||
}); | ||
test_driver.bless('fullscreen', () => { | ||
document.querySelector('iframe').requestFullscreen(); | ||
}); | ||
</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,27 @@ | ||
<!DOCTYPE html> | ||
<html class=reftest-wait> | ||
<title>::backdrop inherits style from the fullscreen element</title> | ||
<link rel=match href="backdrop-green-ref.html"> | ||
<link rel=help href="https://github.com/whatwg/fullscreen/issues/124"> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<style> | ||
body { | ||
--bg: red; | ||
} | ||
div { | ||
--bg: green; | ||
} | ||
div::backdrop { | ||
background: var(--bg); | ||
} | ||
</style> | ||
<div></div> | ||
<script> | ||
document.addEventListener('fullscreenchange', () => { | ||
document.documentElement.classList.remove('reftest-wait'); | ||
}); | ||
test_driver.bless('fullscreen', () => { | ||
document.querySelector('div').requestFullscreen(); | ||
}); | ||
</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,14 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
body { | ||
background: blue; | ||
margin: 0; | ||
} | ||
div { | ||
position: fixed; | ||
width: 100px; | ||
height: 100px; | ||
background: green; | ||
} | ||
</style> | ||
<div></div> |
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>::backdrop for a fullscreen object element</title> | ||
<link rel=match href="backdrop-object-ref.html"> | ||
<link rel=help href="https://github.com/w3c/csswg-drafts/issues/6939"> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
|
||
<style> | ||
object::backdrop { | ||
background: blue; | ||
} | ||
</style> | ||
<object width="200" type="image/svg+xml" data="/images/100px-green-rect.svg"></object> | ||
<script> | ||
const object = document.querySelector("object"); | ||
Promise.all([ | ||
new Promise((resolve, reject) => document.addEventListener("fullscreenchange", resolve)), | ||
new Promise((resolve, reject) => object.addEventListener("load", resolve)) | ||
]).then(() => document.documentElement.classList.remove('reftest-wait')); | ||
|
||
test_driver.bless('fullscreen', () => object.requestFullscreen()); | ||
</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,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
html, body { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
body { | ||
background-color: green; | ||
} | ||
</style> | ||
</head> | ||
<body></body> | ||
</html> |
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,47 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<head> | ||
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m"> | ||
<link rel="match" href="fullscreen-root-fills-page-ref.html"> | ||
<style> | ||
html { | ||
background-color: red; | ||
height: 100%; | ||
overflow: hidden; | ||
|
||
/* These should be no-op */ | ||
top: 200px; | ||
left: 200px; | ||
right: 200px; | ||
bottom: 200px; | ||
} | ||
|
||
html, body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
body, #cover { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
#cover { | ||
background-color: green; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="cover"></div> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script> | ||
document.addEventListener("fullscreenchange", () => { | ||
document.documentElement.classList.remove("reftest-wait"); | ||
}); | ||
test_driver.bless("fullscreen") | ||
.then(() => document.documentElement.requestFullscreen()) | ||
</script> | ||
</body> | ||
</html> |