Skip to content

Commit

Permalink
Tests/LibWeb: Move assets used by multiple test types into Assets/
Browse files Browse the repository at this point in the history
Having to go through multiple levels of .. is not ideal, but less odd
than reaching into another test type's data files.
  • Loading branch information
AtkinsSJ committed Nov 5, 2024
1 parent ceedfb3 commit 65e83fc
Show file tree
Hide file tree
Showing 25 changed files with 27 additions and 27 deletions.
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion Tests/LibWeb/Layout/input/aspect-ratio-auto-and-ratio.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
aspect-ratio: auto 2/1;
border: 1px solid black;
}
</style><div></div><img src="120.png"/>
</style><div></div><img src="../../Assets/120.png"/>
2 changes: 1 addition & 1 deletion Tests/LibWeb/Layout/input/aspect-ratio-auto.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
aspect-ratio: auto;
border: 1px solid black;
}
</style><div></div><img src="120.png"/>
</style><div></div><img src="../../Assets/120.png"/>
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
width: 200px;
aspect-ratio: 0/1;
}
</style><img src="120.png"/>
</style><img src="../../Assets/120.png"/>
2 changes: 1 addition & 1 deletion Tests/LibWeb/Layout/input/aspect-ratio-ratio.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
aspect-ratio: 2/1;
border: 1px solid black;
}
</style><div></div><img src="120.png"/>
</style><div></div><img src="../../Assets/120.png"/>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
width: 100%;
}
</style>
<body><img src="../120.png">
<body><img src="../../../Assets/120.png">
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
left: 0px;
}
img { max-width: 50px; }
</style><body><img src="../120.png">
</style><body><img src="../../../Assets/120.png">
6 changes: 3 additions & 3 deletions Tests/LibWeb/Layout/input/height-min-max-fit-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
.max { height: max-content; }
.fit { height: fit-content; }
</style>
<img class="min" src="120.png" width="120" height="60" />
<img class="max" src="120.png" width="120" height="60" />
<img class="fit" src="120.png" width="120" height="60" />
<img class="min" src="../../Assets/120.png" width="120" height="60" />
<img class="max" src="../../Assets/120.png" width="120" height="60" />
<img class="fit" src="../../Assets/120.png" width="120" height="60" />
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
.with-width {
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">
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><style>
body { width: max-content; }
img { max-width: 100%; }
</style><body><div><img src="120.png">
</style><body><div><img src="../../Assets/120.png">
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><style>
body { width: min-content; }
img { max-width: 100%; }
</style><body><img src="120.png">
</style><body><img src="../../Assets/120.png">
2 changes: 1 addition & 1 deletion Tests/LibWeb/Layout/input/input-image-to-text.html
Original file line number Diff line number Diff line change
@@ -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">
document.addEventListener("DOMContentLoaded", () => {
let input = document.querySelector("input");
Expand Down
6 changes: 3 additions & 3 deletions Tests/LibWeb/Layout/input/input-image.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form>
<input type="image" src="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="120.png" alt="Image not found" width="128" height="256">
<input type="image" src="../../Assets/120.png" alt="Image not found" width="48" height="48">
<input type="image" src="../../Assets/120.png" alt="Image not found" width="64" height="64">
<input type="image" src="../../Assets/120.png" alt="Image not found" width="128" height="256">
</form>
2 changes: 1 addition & 1 deletion Tests/LibWeb/Layout/input/picture-source-media-query.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<body>
<picture>
<source media="(max-width: 600px)" srcset="120.png">
<source media="(max-width: 600px)" srcset="../../Assets/120.png">
<img src="400.png">
</picture>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
@font-face {
font-family: 'HashFont';
src: url('assets/HashSans.woff');
src: url('../Assets/HashSans.woff');
unicode-range: U+0;
}
</style><div class="test">hello friends
2 changes: 1 addition & 1 deletion Tests/LibWeb/Ref/reference/unicode-range-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<style>
@font-face {
font-family: 'HashFont';
src: url('../assets/HashSans.woff');
src: url('../../Assets/HashSans.woff');
}

.hash-font {
Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Ref/space-glyph-width.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style>
@font-face {
font-family: 'HashFont';
src: url('assets/HashSans.woff');
src: url('../Assets/HashSans.woff');
unicode-range: U+0;
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Ref/unicode-range.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<style>
@font-face {
font-family: 'HashFont';
src: url('assets/HashSans.woff');
src: url('../Assets/HashSans.woff');
unicode-range: U+0041; /* Only letter 'A' */
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Text/input/HTML/form-image-submission.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dialog id="dialog" open>
<form id="form" method="dialog">
<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>
</dialog>
<script src="../include.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Text/input/css/FontFace-binary-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
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(),
(reason) => {
println(`FAILED to fetch font from local file ${reason}`);
Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Text/input/css/FontFace-load-urls.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// FIXME: Surely there's a better way to get this font URL
let fontUrl = new URL(location.href);
fontUrl.search = "";
fontUrl += "/../../../../Ref/assets/HashSans.woff";
fontUrl += "/../../../../Assets/HashSans.woff";

const hashSans = new FontFace("Hash Sans", `url(${fontUrl})`);
println(`hashSans.family: ${hashSans.family}`);
Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Text/input/css/FontFaceSet-load.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
asyncTest(async done => {
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);

try {
Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Text/input/css/FontFaceSet-setlike.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<script>
test(() => {
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(`fontFaceSet.size: ${fontFaceSet.size}`);
Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Text/input/input-image.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script src="./include.js"></script>
<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 => {
let input = document.createElement("input");
Expand Down

0 comments on commit 65e83fc

Please sign in to comment.