Tests/LibWeb: Move assets used by multiple test types into Assets/

Having to go through multiple levels of .. is not ideal, but less odd
than reaching into another test type's data files.
This commit is contained in:
Sam Atkins 2024-11-05 12:53:30 +00:00 committed by Sam Atkins
parent 57ba720fb1
commit 08253d6aee
Notes: github-actions[bot] 2024-11-05 16:45:25 +00:00
25 changed files with 27 additions and 27 deletions

View file

Before

Width:  |  Height:  |  Size: 572 B

After

Width:  |  Height:  |  Size: 572 B

View file

@ -4,4 +4,4 @@
aspect-ratio: auto 2/1; aspect-ratio: auto 2/1;
border: 1px solid black; border: 1px solid black;
} }
</style><div></div><img src="120.png"/> </style><div></div><img src="../../Assets/120.png"/>

View file

@ -4,4 +4,4 @@
aspect-ratio: auto; aspect-ratio: auto;
border: 1px solid black; border: 1px solid black;
} }
</style><div></div><img src="120.png"/> </style><div></div><img src="../../Assets/120.png"/>

View file

@ -3,4 +3,4 @@
width: 200px; width: 200px;
aspect-ratio: 0/1; aspect-ratio: 0/1;
} }
</style><img src="120.png"/> </style><img src="../../Assets/120.png"/>

View file

@ -4,4 +4,4 @@
aspect-ratio: 2/1; aspect-ratio: 2/1;
border: 1px solid black; border: 1px solid black;
} }
</style><div></div><img src="120.png"/> </style><div></div><img src="../../Assets/120.png"/>

View file

@ -16,4 +16,4 @@
width: 100%; width: 100%;
} }
</style> </style>
<body><img src="../120.png"> <body><img src="../../../Assets/120.png">

View file

@ -6,4 +6,4 @@
left: 0px; left: 0px;
} }
img { max-width: 50px; } img { max-width: 50px; }
</style><body><img src="../120.png"> </style><body><img src="../../../Assets/120.png">

View file

@ -3,6 +3,6 @@
.max { height: max-content; } .max { height: max-content; }
.fit { height: fit-content; } .fit { height: fit-content; }
</style> </style>
<img class="min" src="120.png" width="120" height="60" /> <img class="min" src="../../Assets/120.png" width="120" height="60" />
<img class="max" src="120.png" width="120" height="60" /> <img class="max" src="../../Assets/120.png" width="120" height="60" />
<img class="fit" src="120.png" width="120" height="60" /> <img class="fit" src="../../Assets/120.png" width="120" height="60" />

View file

@ -10,4 +10,4 @@ img {
.with-width { .with-width {
width: 100px; width: 100px;
} }
</style><img class="with-height" src="120.png"><img class="with-width" src="120.png"> </style><img class="with-height" src="../../Assets/120.png"><img class="with-width" src="../../Assets/120.png">

View file

@ -1,4 +1,4 @@
<!DOCTYPE html><style> <!DOCTYPE html><style>
body { width: max-content; } body { width: max-content; }
img { max-width: 100%; } img { max-width: 100%; }
</style><body><div><img src="120.png"> </style><body><div><img src="../../Assets/120.png">

View file

@ -1,4 +1,4 @@
<!DOCTYPE html><style> <!DOCTYPE html><style>
body { width: min-content; } body { width: min-content; }
img { max-width: 100%; } img { max-width: 100%; }
</style><body><img src="120.png"> </style><body><img src="../../Assets/120.png">

View file

@ -1,4 +1,4 @@
<input type="image" src="120.png" value="120.png" width="120" height="120" /> <input type="image" src="../../Assets/120.png" value="120.png" width="120" height="120" />
<script type="text/javascript"> <script type="text/javascript">
document.addEventListener("DOMContentLoaded", () => { document.addEventListener("DOMContentLoaded", () => {
let input = document.querySelector("input"); let input = document.querySelector("input");

View file

@ -1,5 +1,5 @@
<form> <form>
<input type="image" src="120.png" alt="Image not found" width="48" height="48"> <input type="image" src="../../Assets/120.png" alt="Image not found" width="48" height="48">
<input type="image" src="120.png" alt="Image not found" width="64" height="64"> <input type="image" src="../../Assets/120.png" alt="Image not found" width="64" height="64">
<input type="image" src="120.png" alt="Image not found" width="128" height="256"> <input type="image" src="../../Assets/120.png" alt="Image not found" width="128" height="256">
</form> </form>

View file

@ -3,7 +3,7 @@
<body> <body>
<picture> <picture>
<source media="(max-width: 600px)" srcset="120.png"> <source media="(max-width: 600px)" srcset="../../Assets/120.png">
<img src="400.png"> <img src="400.png">
</picture> </picture>
</body> </body>

View file

@ -8,7 +8,7 @@
} }
@font-face { @font-face {
font-family: 'HashFont'; font-family: 'HashFont';
src: url('assets/HashSans.woff'); src: url('../Assets/HashSans.woff');
unicode-range: U+0; unicode-range: U+0;
} }
</style><div class="test">hello friends </style><div class="test">hello friends

View file

@ -4,7 +4,7 @@
<style> <style>
@font-face { @font-face {
font-family: 'HashFont'; font-family: 'HashFont';
src: url('../assets/HashSans.woff'); src: url('../../Assets/HashSans.woff');
} }
.hash-font { .hash-font {

View file

@ -5,7 +5,7 @@
<style> <style>
@font-face { @font-face {
font-family: 'HashFont'; font-family: 'HashFont';
src: url('assets/HashSans.woff'); src: url('../Assets/HashSans.woff');
unicode-range: U+0; unicode-range: U+0;
} }

View file

@ -5,7 +5,7 @@
<style> <style>
@font-face { @font-face {
font-family: 'HashFont'; font-family: 'HashFont';
src: url('assets/HashSans.woff'); src: url('../Assets/HashSans.woff');
unicode-range: U+0041; /* Only letter 'A' */ unicode-range: U+0041; /* Only letter 'A' */
} }

View file

@ -14,7 +14,7 @@
<dialog id="dialog" open> <dialog id="dialog" open>
<form id="form" method="dialog"> <form id="form" method="dialog">
<input value="well hello friends!" /> <input value="well hello friends!" />
<input id="image" type="image" src="../../../Layout/input/120.png" /> <input id="image" type="image" src="../../../Assets/120.png" />
</form> </form>
</dialog> </dialog>
<script src="../include.js"></script> <script src="../include.js"></script>

View file

@ -21,7 +21,7 @@
println(`zeroBytesFace.family: ${zeroBytesFace.family}`); // "Empty Font" println(`zeroBytesFace.family: ${zeroBytesFace.family}`); // "Empty Font"
}); });
const fontData = await fetch("../../../Ref/assets/HashSans.woff").then( const fontData = await fetch("../../../Assets/HashSans.woff").then(
response => response.arrayBuffer(), response => response.arrayBuffer(),
(reason) => { (reason) => {
println(`FAILED to fetch font from local file ${reason}`); println(`FAILED to fetch font from local file ${reason}`);

View file

@ -5,7 +5,7 @@
// FIXME: Surely there's a better way to get this font URL // FIXME: Surely there's a better way to get this font URL
let fontUrl = new URL(location.href); let fontUrl = new URL(location.href);
fontUrl.search = ""; fontUrl.search = "";
fontUrl += "/../../../../Ref/assets/HashSans.woff"; fontUrl += "/../../../../Assets/HashSans.woff";
const hashSans = new FontFace("Hash Sans", `url(${fontUrl})`); const hashSans = new FontFace("Hash Sans", `url(${fontUrl})`);
println(`hashSans.family: ${hashSans.family}`); println(`hashSans.family: ${hashSans.family}`);

View file

@ -3,7 +3,7 @@
asyncTest(async done => { asyncTest(async done => {
const fontFaceSet = document.fonts; const fontFaceSet = document.fonts;
const fontFace = new FontFace("Hash Sans", "url(../../../../Ref/assets/HashSans.woff)"); const fontFace = new FontFace("Hash Sans", "url(../../../../Assets/HashSans.woff)");
fontFaceSet.add(fontFace); fontFaceSet.add(fontFace);
try { try {

View file

@ -3,7 +3,7 @@
<script> <script>
test(() => { test(() => {
const fontFaceSet = document.fonts; const fontFaceSet = document.fonts;
const fontFace = new FontFace("Hash Sans", 'url(../../../../Ref/assets/HashSans.woff)'); const fontFace = new FontFace("Hash Sans", 'url(../../../../Assets/HashSans.woff)');
println("-- Empty FontFaceSet --"); println("-- Empty FontFaceSet --");
println(`fontFaceSet.size: ${fontFaceSet.size}`); println(`fontFaceSet.size: ${fontFaceSet.size}`);

View file

@ -1,6 +1,6 @@
<script src="./include.js"></script> <script src="./include.js"></script>
<script type="text/javascript"> <script type="text/javascript">
const SOURCES = ["../../Layout/input/120.png", "file:///i-do-no-exist-i-swear.png"]; const SOURCES = ["../../Assets/120.png", "file:///i-do-no-exist-i-swear.png"];
const runTest = source => { const runTest = source => {
let input = document.createElement("input"); let input = document.createElement("input");