Skip to content

Commit

Permalink
Tests: Use .invalid TLD for invalid requests
Browse files Browse the repository at this point in the history
RFC2606 and RFC6761 define .invalid as a guaranteed-invalid TLD, so
let's use it. Theoretically this should make the request fail much
faster.

(cherry picked from commit ea95e325390cefd4e1289e8c3de6b56d2c34473f)
  • Loading branch information
AtkinsSJ authored and nico committed Nov 11, 2024
1 parent a37e409 commit 2f8ace5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Tests/LibWeb/Text/expected/video-failed-load.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
failed to load: "data:"
failed to load: "file:///i-do-no-exist-i-swear"
failed to load: "https://i-do-no-exist-i-swear.net.uk/"
failed to load: "https://something.invalid/"
4 changes: 2 additions & 2 deletions Tests/LibWeb/Text/input/DOM/Document-named-properties.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<form name="bob">
<button type="submit" id="fred" name="george" value="submit">Submit</button>
</form>
<img name="foo" id="bar" src="http://www.example.com" alt="Example" />
<img id="baz" src="http://www.example.com" alt="Example" />
<img name="foo" id="bar" src="http://something.invalid" alt="Example" />
<img id="baz" src="http://something.invalid" alt="Example" />
<form name="foo">
</form>
<meta name="kangaroo" />
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 @@ -17,7 +17,7 @@
println("FAILED");
});

let notExistFont = new FontFace("NotExist", "url(https://example.com/not-exist.woff)");
let notExistFont = new FontFace("NotExist", "url(https://something.invalid/not-exist.woff)");
await notExistFont.load().then(() => {
println("FAILED");
}, (reason) => {
Expand Down
2 changes: 1 addition & 1 deletion Tests/LibWeb/Text/input/video-failed-load.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const SOURCES = [
"data:",
"file:///i-do-no-exist-i-swear",
"https://i-do-no-exist-i-swear.net.uk",
"https://something.invalid",
];

const runTest = source => {
Expand Down

0 comments on commit 2f8ace5

Please sign in to comment.