mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: do not use quirks mode for test files (#11930)
This commit is contained in:
parent
eea588419d
commit
aef584c815
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<button id="abort"></button>
|
||||
|
||||
<script>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<div>beforeunload demo.</div>
|
||||
<script>
|
||||
window.addEventListener('beforeunload', event => {
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<body>BFCached<a href="target.html">next</a></body>
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
const worker = new Worker('worker.mjs', {type: 'module'})
|
||||
</script>
|
||||
|
@ -1,2 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel='stylesheet' href='./one-style-font.css'>
|
||||
<div>hello, world!</div>
|
||||
|
@ -1,2 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel='stylesheet' href='./one-style.css'>
|
||||
<div>hello, world!</div>
|
||||
|
@ -1 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style></style>
|
||||
<div>empty style tag</div>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
@charset "utf-8";
|
||||
@namespace svg url(http://www.w3.org/2000/svg);
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
@media screen { div { color: green; } } </style>
|
||||
<div>hello, world</div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="stylesheet1.css">
|
||||
<link rel="stylesheet" href="stylesheet2.css">
|
||||
<script>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
div { color: green; }
|
||||
a { color: blue; }
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
body {
|
||||
padding: 10px;
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
@media screen {
|
||||
a { color: green; }
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const iframe = document.createElement('iframe');
|
||||
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html>
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
a();
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel='stylesheet' href='./style.css'>
|
||||
<script src='./script.js' type='text/javascript'></script>
|
||||
<style>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<frameset>
|
||||
<frameset>
|
||||
<frame src='./frame.html'></frame>
|
||||
|
@ -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>
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
:root {
|
||||
scrollbar-width: none;
|
||||
|
@ -1 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<iframe src='./frame.html?param=value#fragment'></iframe>
|
||||
|
@ -1 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<iframe src='./frame.html'></iframe>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
body {
|
||||
display: flex;
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
var globalVar = 123;
|
||||
</script>
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
function generatePalette(amount) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
history.pushState({}, '', '#1');
|
||||
|
@ -1,2 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
<iframe src="./frames/frame.html"></iframe>
|
||||
<script src="./initiator.js"></script>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const iframe = document.createElement('iframe');
|
||||
|
@ -1 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<button>click</button>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Touch test</title>
|
||||
|
@ -1 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<script>eval('console.log("foo")')</script>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
function foo() {
|
||||
if (1 > 2)
|
||||
|
@ -1,2 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
<script src='script1.js'></script>
|
||||
<script src='script2.js'></script>
|
||||
|
@ -1,2 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
function unused(){}console.log('used!');if(true===false)console.log('unused!');</script>
|
||||
|
@ -1,2 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
function foo() {function bar() { } console.log(1); } foo(); </script>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
console.log(1);
|
||||
//# sourceURL=nicename.js
|
||||
|
@ -1 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<script>function foo() { }</script>
|
||||
|
@ -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>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const iframe = document.createElement('iframe');
|
||||
|
@ -1 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<meta name = "viewport" content = "initial-scale = 1, user-scalable = no">
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
async function sleep(delay) {
|
||||
return new Promise(resolve => setTimeout(resolve, delay));
|
||||
|
@ -1,2 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel='stylesheet' href='./one-style.css'>
|
||||
<div>hello, world!</div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<a id="navigate-within-document" href="#nav">Navigate within document</a>
|
||||
<a name="nav"></a>
|
||||
<script>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<div id="a">hello <button id="b">world</button>
|
||||
<span id="f"></span>
|
||||
<div id="c"></div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
/* http://meyerweb.com/eric/tools/css/reset/
|
||||
v2.0 | 20110126
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
var req = new XMLHttpRequest();
|
||||
req.open('GET', '/self-request.html');
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
window.registrationPromise = navigator.serviceWorker.register('sw.js');
|
||||
</script>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="./style.css">
|
||||
<script>
|
||||
window.registrationPromise = navigator.serviceWorker.register('sw.js');
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
|
||||
let h1 = null;
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<script>
|
||||
window.result = window.injected;
|
||||
</script>
|
@ -1 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Woof-Woof</title>
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
:root {
|
||||
font-family: monospace;
|
||||
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user