test: do not use quirks mode for test files (#11930)

This commit is contained in:
Alex Rudenko 2024-02-16 09:14:17 +01:00 committed by GitHub
parent eea588419d
commit aef584c815
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
54 changed files with 54 additions and 2 deletions

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<button id="abort"></button>
<script>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<div>beforeunload demo.</div>
<script>
window.addEventListener('beforeunload', event => {

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<body>BFCached<a href="target.html">next</a></body>
<script>
window.addEventListener('DOMContentLoaded', () => {

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
const worker = new Worker('worker.mjs', {type: 'module'})
</script>

View File

@ -1,2 +1,3 @@
<!DOCTYPE html>
<link rel='stylesheet' href='./one-style-font.css'>
<div>hello, world!</div>

View File

@ -1,2 +1,3 @@
<!DOCTYPE html>
<link rel='stylesheet' href='./one-style.css'>
<div>hello, world!</div>

View File

@ -1 +1,2 @@
<!DOCTYPE html>
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style></style>
<div>empty style tag</div>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
@charset "utf-8";
@namespace svg url(http://www.w3.org/2000/svg);

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
@media screen { div { color: green; } } </style>
<div>hello, world</div>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<link rel="stylesheet" href="stylesheet1.css">
<link rel="stylesheet" href="stylesheet2.css">
<script>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
div { color: green; }
a { color: blue; }

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
body {
padding: 10px;

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
@media screen {
a { color: green; }

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
window.addEventListener('DOMContentLoaded', () => {
const iframe = document.createElement('iframe');

View File

@ -0,0 +1 @@
<!DOCTYPE html>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
a();

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<link rel='stylesheet' href='./style.css'>
<script src='./script.js' type='text/javascript'></script>
<style>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<frameset>
<frameset>
<frame src='./frame.html'></frame>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<iframe width="100%" height="300" src="about:blank"></iframe>
<div style="height: 800vh"></div>
<iframe width="100%" height="300" src='./frame.html' loading="lazy"></iframe>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
:root {
scrollbar-width: none;

View File

@ -1 +1,2 @@
<!DOCTYPE html>
<iframe src='./frame.html?param=value#fragment'></iframe>

View File

@ -1 +1,2 @@
<!DOCTYPE html>
<iframe src='./frame.html'></iframe>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
body {
display: flex;

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
var globalVar = 123;
</script>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
document.addEventListener('DOMContentLoaded', function() {
function generatePalette(amount) {

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
window.addEventListener('DOMContentLoaded', () => {
history.pushState({}, '', '#1');

View File

@ -1,2 +1,3 @@
<!DOCTYPE html>
<iframe src="./frames/frame.html"></iframe>
<script src="./initiator.js"></script>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
window.addEventListener('DOMContentLoaded', () => {
const iframe = document.createElement('iframe');

View File

@ -1 +1,2 @@
<!DOCTYPE html>
<button>click</button>

View File

@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<title>Touch test</title>

View File

@ -1 +1,2 @@
<!DOCTYPE html>
<script>eval('console.log("foo")')</script>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
function foo() {
if (1 > 2)

View File

@ -1,2 +1,3 @@
<!DOCTYPE html>
<script src='script1.js'></script>
<script src='script2.js'></script>

View File

@ -1,2 +1,3 @@
<!DOCTYPE html>
<script>
function unused(){}console.log('used!');if(true===false)console.log('unused!');</script>

View File

@ -1,2 +1,3 @@
<!DOCTYPE html>
<script>
function foo() {function bar() { } console.log(1); } foo(); </script>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
console.log(1);
//# sourceURL=nicename.js

View File

@ -1 +1,2 @@
<!DOCTYPE html>
<script>function foo() { }</script>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<iframe width="100%" height="300" src="about:blank"></iframe>
<div style="height: 800vh"></div>
<iframe width="100%" height="300" src="https://www.example.com" loading="lazy"></iframe>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
window.addEventListener('DOMContentLoaded', () => {
const iframe = document.createElement('iframe');

View File

@ -1 +1,2 @@
<!DOCTYPE html>
<meta name = "viewport" content = "initial-scale = 1, user-scalable = no">

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
async function sleep(delay) {
return new Promise(resolve => setTimeout(resolve, delay));

View File

@ -1,2 +1,3 @@
<!DOCTYPE html>
<link rel='stylesheet' href='./one-style.css'>
<div>hello, world!</div>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<a id="navigate-within-document" href="#nav">Navigate within document</a>
<a name="nav"></a>
<script>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<div id="a">hello <button id="b">world</button>
<span id="f"></span>
<div id="c"></div>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
var req = new XMLHttpRequest();
req.open('GET', '/self-request.html');

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
window.registrationPromise = navigator.serviceWorker.register('sw.js');
</script>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<link rel="stylesheet" href="./style.css">
<script>
window.registrationPromise = navigator.serviceWorker.register('sw.js');

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
let h1 = null;

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<script>
window.result = window.injected;
</script>

View File

@ -1 +1,2 @@
<!DOCTYPE html>
<title>Woof-Woof</title>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<style>
:root {
font-family: monospace;

View File

@ -1232,7 +1232,7 @@ describe('Page', function () {
page.goto(server.PREFIX + '/error.html'),
]);
expect(error.message).toContain('Fancy');
expect(error.stack?.split('\n')[1]).toContain('error.html:13');
expect(error.stack?.split('\n').at(-1)).toContain('error.html:3:1');
});
});