migrate to jest (#721)
* migrate rrweb-snapshot tests to jest * migrate rrweb tests to jest
This commit is contained in:
@@ -1,344 +1,6 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`[html file]: about-mozilla.html 1`] = `
|
||||
"<!DOCTYPE html><html><head>
|
||||
<title>The Book of Mozilla, 11:9</title>
|
||||
<style type=\\"text/css\\">
|
||||
html {
|
||||
background: maroon;
|
||||
color: white;
|
||||
font-style: italic;
|
||||
} #moztext {
|
||||
margin-top: 15%;
|
||||
font-size: 1.1em;
|
||||
font-family: serif;
|
||||
text-align: center;
|
||||
line-height: 1.5;
|
||||
} #from {
|
||||
font-size: 1.95em;
|
||||
font-family: serif;
|
||||
text-align: right;
|
||||
} em {
|
||||
font-size: 1.3em;
|
||||
line-height: 0;
|
||||
} a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head><body> <p id=\\"moztext\\">
|
||||
Mammon slept. And the <em>beast reborn</em> spread over the earth and its numbers
|
||||
grew legion. And they proclaimed the times and <em>sacrificed</em> crops unto the
|
||||
fire, with the <em>cunning of foxes</em>. And they built a new world in their own
|
||||
image as promised by the <em><a href=\\"http://www.mozilla.org/about/mozilla-manifesto.html\\">
|
||||
sacred words</a></em>, and <em><a href=\\"http://wiki.mozilla.org/About:mozilla\\">spoke
|
||||
</a></em> of the beast with their children. Mammon awoke, and lo! it was
|
||||
<em>naught</em> but a follower.
|
||||
</p> <p id=\\"from\\">
|
||||
from <strong>The Book of Mozilla,</strong> 11:9<br /><small>(10th Edition)</small>
|
||||
</p></body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: basic.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
</head><body>
|
||||
<h1>Title</h1></body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: block-element.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
<style>
|
||||
.big {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.small {
|
||||
width: 50px;
|
||||
height: 100px;
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
</head> <body>
|
||||
<div class=\\"rr-block big\\" style=\\"width: 50px; height: 50px;\\"></div>
|
||||
<div>record 2</div>
|
||||
<div class=\\"rr-block small\\" style=\\"width: 50px; height: 100px;\\"></div>
|
||||
<div class=\\"rr-block\\" style=\\"width: 100px; height: 200px;\\"></div>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: compat-mode.html 1`] = `
|
||||
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD HTML 4.0 Transitional//EN\\"><!-- no doctype! --><html><head>
|
||||
<title>Compat Mode; image resizing</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<a href=\\"http://localhost:3030/html#\\" class=\\"should-be-square-shaped\\">
|
||||
<img width=\\"40%\\" height=\\"35%\\" src=\\"http://localhost:3030/images/compat-top-left.png\\" />
|
||||
<img width=\\"40%\\" height=\\"35%\\" src=\\"http://localhost:3030/images/compat-top-right.png\\" />
|
||||
<br /><img width=\\"80%\\" height=\\"20%\\" src=\\"http://localhost:3030/images/compat-bottom.png\\" /></a>
|
||||
</center>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: cors-style-sheet.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>with style sheet</title>
|
||||
<link rel=\\"stylesheet\\" href=\\"https://cdn.jsdelivr.net/npm/pure@2.85.0/index.css\\" />
|
||||
<link rel=\\"stylesheet\\" href=\\"\\" />
|
||||
</head>
|
||||
<body></body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: dynamic-stylesheet.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>dynamic stylesheet</title>
|
||||
<style>body { margin: 0px; }p { background: lightpink; }</style>
|
||||
<noscript>SCRIPT_PLACEHOLDER</noscript>
|
||||
</head>
|
||||
<body>
|
||||
<p>p tag</p>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: form-fields.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>form fields</title>
|
||||
</head> <body>
|
||||
<form>
|
||||
<label for=\\"text\\">
|
||||
<input type=\\"text\\" value=\\"1\\" />
|
||||
</label>
|
||||
<label for=\\"radio\\">
|
||||
<input type=\\"radio\\" checked=\\"\\" />
|
||||
</label>
|
||||
<label for=\\"checkbox\\">
|
||||
<input type=\\"checkbox\\" checked=\\"\\" />
|
||||
</label>
|
||||
<label for=\\"textarea\\">
|
||||
<textarea name=\\"\\" id=\\"\\" cols=\\"30\\" rows=\\"10\\">1234</textarea>
|
||||
</label>
|
||||
<label for=\\"select\\">
|
||||
<select name=\\"\\" id=\\"\\" value=\\"2\\">
|
||||
<option value=\\"1\\">1</option>
|
||||
<option value=\\"2\\" selected=\\"\\">2</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
<input name=\\"tagName\\" />
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<noscript>SCRIPT_PLACEHOLDER</noscript></body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: hover.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>hover selector</title>
|
||||
<style> div:hover, div.\\\\:hover {
|
||||
background: orange;
|
||||
} div:hover::after, div.\\\\:hover::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 100%;
|
||||
content: 'dropdown';
|
||||
width: 100px;
|
||||
height: 200px;
|
||||
background: lightblue;
|
||||
}
|
||||
</style>
|
||||
</head><body>
|
||||
<div>hover me</div>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: iframe.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>iframe</title>
|
||||
</head>
|
||||
<body>
|
||||
<iframe width=\\"100\\" height=\\"50\\"></iframe>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: iframe-inner.html 1`] = `
|
||||
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD HTML 4.0 Transitional//EN\\"><html><head></head><body><button>inner iframe button</button>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: invalid-attribute.html 1`] = `
|
||||
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD HTML 4.0 Transitional//EN\\"><html foo=\\"bar\\"><head></head><body>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: invalid-doctype.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<title>Invalid Doctype</title>
|
||||
</head>
|
||||
<body></body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: invalid-tagname.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>Hello</div>
|
||||
<div>Hello</div>
|
||||
<div></div>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: mask-text.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
</head> <body>
|
||||
<p class=\\"rr-mask\\">**** *</p>
|
||||
<div class=\\"rr-mask\\">
|
||||
<span>**** *</span>
|
||||
</div>
|
||||
<div class=\\"rr-mask\\">**** *</div>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: picture.html 1`] = `
|
||||
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\"><html xmlns=\\"http://www.w3.org/1999/xhtml\\"><head></head><body>
|
||||
<picture>
|
||||
<source type=\\"image/webp\\" srcset=\\"http://localhost:3030/assets/img/characters/robot.webp\\" />
|
||||
<img src=\\"http://localhost:3030/assets/img/characters/robot.png\\" />
|
||||
</picture>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: preload.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<title>Document</title>
|
||||
<link />
|
||||
<link />
|
||||
</head>
|
||||
<body></body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: shadow-dom.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<title>shadow DOM</title>
|
||||
</head>
|
||||
<body>
|
||||
<fancy-tabs background=\\"\\" role=\\"tablist\\" selected=\\"1\\">
|
||||
<button slot=\\"title\\" role=\\"tab\\" tabindex=\\"-1\\" aria-selected=\\"false\\">Tab 1</button>
|
||||
<button slot=\\"title\\" selected=\\"\\" role=\\"tab\\" tabindex=\\"0\\" aria-selected=\\"true\\">Tab 2</button>
|
||||
<button slot=\\"title\\" role=\\"tab\\" tabindex=\\"-1\\" aria-selected=\\"false\\">Tab 3</button>
|
||||
<section role=\\"tabpanel\\" tabindex=\\"0\\" aria-hidden=\\"true\\">content panel 1</section>
|
||||
<section role=\\"tabpanel\\" tabindex=\\"0\\" aria-hidden=\\"false\\">content panel 2</section>
|
||||
<section role=\\"tabpanel\\" tabindex=\\"0\\" aria-hidden=\\"true\\">content panel 3</section>
|
||||
</fancy-tabs>
|
||||
<noscript>SCRIPT_PLACEHOLDER</noscript>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: video.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>video</title>
|
||||
</head>
|
||||
<body>
|
||||
<video controls=\\"\\">
|
||||
<source src=\\"http://techslides.com/demos/sample-videos/small.webm\\" type=\\"video/webm\\" /> <source src=\\"http://techslides.com/demos/sample-videos/small.ogv\\" type=\\"video/ogg\\" />
|
||||
<source src=\\"http://techslides.com/demos/sample-videos/small.mp4\\" type=\\"video/mp4\\" /> <source src=\\"http://techslides.com/demos/sample-videos/small.3gp\\" type=\\"video/3gp\\" />
|
||||
</video>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: with-relative-res.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href=\\"http://localhost:3030/basic.html\\"></a>
|
||||
<div>Hello</div>
|
||||
<alt34>Hello</alt34>
|
||||
<div>Hello</div>
|
||||
<div></div>
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"\\" />
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/a.jpg\\" />
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://exmple.com/a.jpg\\" />
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/a.jpg 3x, http://localhost:3030/a.jpg 45x, http://localhost:3030/b.png\\" />
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/300,400/a.jpg 300w, http://localhost:3030/b.png\\" /></body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: with-script.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>with script</title>
|
||||
</head><body>
|
||||
<noscript src=\\"http://localhost:3030/js/a.js\\"></noscript>
|
||||
<noscript>SCRIPT_PLACEHOLDER</noscript></body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: with-style-sheet.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>with style sheet</title>
|
||||
<style>body { margin: 0px; background: url(\\"http://localhost:3030/a.jpg\\"); border-image: url(\\"data:image/svg+xml;utf8,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\" x=\\\\\\"0px\\\\\\" y=\\\\\\"0px\\\\\\" viewBox=\\\\\\"0 0 256 256\\\\\\"><g><g><polygon points=\\\\\\"79.093,0 48.907,30.187 146.72,128 48.907,225.813 79.093,256 207.093,128\\\\\\"/></g></g></svg>\\") 100% / 1 / 0 stretch; }p { color: red; background: url(\\"http://localhost:3030/css/b.jpg\\"); }body > p { color: yellow; }</style>
|
||||
</head><body>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`[html file]: with-style-sheet-with-import.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>with style sheet with import</title>
|
||||
<style>body { margin: 0px; background: url(\\"http://localhost:3030/a.jpg\\"); border-image: url(\\"data:image/svg+xml;utf8,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\" x=\\\\\\"0px\\\\\\" y=\\\\\\"0px\\\\\\" viewBox=\\\\\\"0 0 256 256\\\\\\"><g><g><polygon points=\\\\\\"79.093,0 48.907,30.187 146.72,128 48.907,225.813 79.093,256 207.093,128\\\\\\"/></g></g></svg>\\") 100% / 1 / 0 stretch; }p { color: red; background: url(\\"http://localhost:3030/css/b.jpg\\"); }body > p { color: yellow; }</style>
|
||||
</head><body>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`iframe integration tests 1`] = `
|
||||
exports[`iframe integration tests snapshot async iframes 1`] = `
|
||||
"{
|
||||
\\"type\\": 0,
|
||||
\\"childNodes\\": [
|
||||
@@ -470,7 +132,345 @@ exports[`iframe integration tests 1`] = `
|
||||
}"
|
||||
`;
|
||||
|
||||
exports[`shadow DOM integration tests 1`] = `
|
||||
exports[`integration tests [html file]: about-mozilla.html 1`] = `
|
||||
"<!DOCTYPE html><html><head>
|
||||
<title>The Book of Mozilla, 11:9</title>
|
||||
<style type=\\"text/css\\">
|
||||
html {
|
||||
background: maroon;
|
||||
color: white;
|
||||
font-style: italic;
|
||||
} #moztext {
|
||||
margin-top: 15%;
|
||||
font-size: 1.1em;
|
||||
font-family: serif;
|
||||
text-align: center;
|
||||
line-height: 1.5;
|
||||
} #from {
|
||||
font-size: 1.95em;
|
||||
font-family: serif;
|
||||
text-align: right;
|
||||
} em {
|
||||
font-size: 1.3em;
|
||||
line-height: 0;
|
||||
} a {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head><body> <p id=\\"moztext\\">
|
||||
Mammon slept. And the <em>beast reborn</em> spread over the earth and its numbers
|
||||
grew legion. And they proclaimed the times and <em>sacrificed</em> crops unto the
|
||||
fire, with the <em>cunning of foxes</em>. And they built a new world in their own
|
||||
image as promised by the <em><a href=\\"http://www.mozilla.org/about/mozilla-manifesto.html\\">
|
||||
sacred words</a></em>, and <em><a href=\\"http://wiki.mozilla.org/About:mozilla\\">spoke
|
||||
</a></em> of the beast with their children. Mammon awoke, and lo! it was
|
||||
<em>naught</em> but a follower.
|
||||
</p> <p id=\\"from\\">
|
||||
from <strong>The Book of Mozilla,</strong> 11:9<br /><small>(10th Edition)</small>
|
||||
</p></body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: basic.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
</head><body>
|
||||
<h1>Title</h1></body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: block-element.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
<style>
|
||||
.big {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.small {
|
||||
width: 50px;
|
||||
height: 100px;
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
</head> <body>
|
||||
<div class=\\"rr-block big\\" style=\\"width: 50px; height: 50px;\\"></div>
|
||||
<div>record 2</div>
|
||||
<div class=\\"rr-block small\\" style=\\"width: 50px; height: 100px;\\"></div>
|
||||
<div class=\\"rr-block\\" style=\\"width: 100px; height: 200px;\\"></div>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: compat-mode.html 1`] = `
|
||||
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD HTML 4.0 Transitional//EN\\"><!-- no doctype! --><html><head>
|
||||
<title>Compat Mode; image resizing</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<a href=\\"http://localhost:3030/html#\\" class=\\"should-be-square-shaped\\">
|
||||
<img width=\\"40%\\" height=\\"35%\\" src=\\"http://localhost:3030/images/compat-top-left.png\\" />
|
||||
<img width=\\"40%\\" height=\\"35%\\" src=\\"http://localhost:3030/images/compat-top-right.png\\" />
|
||||
<br /><img width=\\"80%\\" height=\\"20%\\" src=\\"http://localhost:3030/images/compat-bottom.png\\" /></a>
|
||||
</center>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: cors-style-sheet.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>with style sheet</title>
|
||||
<link rel=\\"stylesheet\\" href=\\"https://cdn.jsdelivr.net/npm/pure@2.85.0/index.css\\" />
|
||||
<link rel=\\"stylesheet\\" href=\\"\\" />
|
||||
</head>
|
||||
<body></body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: dynamic-stylesheet.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>dynamic stylesheet</title>
|
||||
<style>body { margin: 0px; }p { background: lightpink; }</style>
|
||||
<noscript>SCRIPT_PLACEHOLDER</noscript>
|
||||
</head>
|
||||
<body>
|
||||
<p>p tag</p>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: form-fields.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>form fields</title>
|
||||
</head> <body>
|
||||
<form>
|
||||
<label for=\\"text\\">
|
||||
<input type=\\"text\\" value=\\"1\\" />
|
||||
</label>
|
||||
<label for=\\"radio\\">
|
||||
<input type=\\"radio\\" checked=\\"\\" />
|
||||
</label>
|
||||
<label for=\\"checkbox\\">
|
||||
<input type=\\"checkbox\\" checked=\\"\\" />
|
||||
</label>
|
||||
<label for=\\"textarea\\">
|
||||
<textarea name=\\"\\" id=\\"\\" cols=\\"30\\" rows=\\"10\\">1234</textarea>
|
||||
</label>
|
||||
<label for=\\"select\\">
|
||||
<select name=\\"\\" id=\\"\\" value=\\"2\\">
|
||||
<option value=\\"1\\">1</option>
|
||||
<option value=\\"2\\" selected=\\"\\">2</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
<input name=\\"tagName\\" />
|
||||
</label>
|
||||
</form>
|
||||
|
||||
<noscript>SCRIPT_PLACEHOLDER</noscript></body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: hover.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>hover selector</title>
|
||||
<style> div:hover, div.\\\\:hover {
|
||||
background: orange;
|
||||
} div:hover::after, div.\\\\:hover::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 100%;
|
||||
content: 'dropdown';
|
||||
width: 100px;
|
||||
height: 200px;
|
||||
background: lightblue;
|
||||
}
|
||||
</style>
|
||||
</head><body>
|
||||
<div>hover me</div>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: iframe.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>iframe</title>
|
||||
</head>
|
||||
<body>
|
||||
<iframe width=\\"100\\" height=\\"50\\"></iframe>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: iframe-inner.html 1`] = `
|
||||
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD HTML 4.0 Transitional//EN\\"><html><head></head><body><button>inner iframe button</button>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: invalid-attribute.html 1`] = `
|
||||
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD HTML 4.0 Transitional//EN\\"><html foo=\\"bar\\"><head></head><body>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: invalid-doctype.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<title>Invalid Doctype</title>
|
||||
</head>
|
||||
<body></body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: invalid-tagname.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>Hello</div>
|
||||
<div>Hello</div>
|
||||
<div></div>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: mask-text.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
</head> <body>
|
||||
<p class=\\"rr-mask\\">**** *</p>
|
||||
<div class=\\"rr-mask\\">
|
||||
<span>**** *</span>
|
||||
</div>
|
||||
<div class=\\"rr-mask\\">**** *</div>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: picture.html 1`] = `
|
||||
"<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\"><html xmlns=\\"http://www.w3.org/1999/xhtml\\"><head></head><body>
|
||||
<picture>
|
||||
<source type=\\"image/webp\\" srcset=\\"http://localhost:3030/assets/img/characters/robot.webp\\" />
|
||||
<img src=\\"http://localhost:3030/assets/img/characters/robot.png\\" />
|
||||
</picture>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: preload.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<title>Document</title>
|
||||
<link />
|
||||
<link />
|
||||
</head>
|
||||
<body></body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: shadow-dom.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<title>shadow DOM</title>
|
||||
</head>
|
||||
<body>
|
||||
<fancy-tabs background=\\"\\" role=\\"tablist\\" selected=\\"1\\">
|
||||
<button slot=\\"title\\" role=\\"tab\\" tabindex=\\"-1\\" aria-selected=\\"false\\">Tab 1</button>
|
||||
<button slot=\\"title\\" selected=\\"\\" role=\\"tab\\" tabindex=\\"0\\" aria-selected=\\"true\\">Tab 2</button>
|
||||
<button slot=\\"title\\" role=\\"tab\\" tabindex=\\"-1\\" aria-selected=\\"false\\">Tab 3</button>
|
||||
<section role=\\"tabpanel\\" tabindex=\\"0\\" aria-hidden=\\"true\\">content panel 1</section>
|
||||
<section role=\\"tabpanel\\" tabindex=\\"0\\" aria-hidden=\\"false\\">content panel 2</section>
|
||||
<section role=\\"tabpanel\\" tabindex=\\"0\\" aria-hidden=\\"true\\">content panel 3</section>
|
||||
</fancy-tabs>
|
||||
<noscript>SCRIPT_PLACEHOLDER</noscript>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: video.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>video</title>
|
||||
</head>
|
||||
<body>
|
||||
<video controls=\\"\\">
|
||||
<source src=\\"http://techslides.com/demos/sample-videos/small.webm\\" type=\\"video/webm\\" /> <source src=\\"http://techslides.com/demos/sample-videos/small.ogv\\" type=\\"video/ogg\\" />
|
||||
<source src=\\"http://techslides.com/demos/sample-videos/small.mp4\\" type=\\"video/mp4\\" /> <source src=\\"http://techslides.com/demos/sample-videos/small.3gp\\" type=\\"video/3gp\\" />
|
||||
</video>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: with-relative-res.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href=\\"http://localhost:3030/basic.html\\"></a>
|
||||
<div>Hello</div>
|
||||
<alt34>Hello</alt34>
|
||||
<div>Hello</div>
|
||||
<div></div>
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"\\" />
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/a.jpg\\" />
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://exmple.com/a.jpg\\" />
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/a.jpg 3x, http://localhost:3030/a.jpg 45x, http://localhost:3030/b.png\\" />
|
||||
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"http://localhost:3030/300,400/a.jpg 300w, http://localhost:3030/b.png\\" /></body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: with-script.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>with script</title>
|
||||
</head><body>
|
||||
<noscript src=\\"http://localhost:3030/js/a.js\\"></noscript>
|
||||
<noscript>SCRIPT_PLACEHOLDER</noscript></body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: with-style-sheet.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>with style sheet</title>
|
||||
<style>body { margin: 0px; background: url(\\"http://localhost:3030/a.jpg\\"); border-image: url(\\"data:image/svg+xml;utf8,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\" x=\\\\\\"0px\\\\\\" y=\\\\\\"0px\\\\\\" viewBox=\\\\\\"0 0 256 256\\\\\\"><g><g><polygon points=\\\\\\"79.093,0 48.907,30.187 146.72,128 48.907,225.813 79.093,256 207.093,128\\\\\\"/></g></g></svg>\\") 100% / 1 / 0 stretch; }p { color: red; background: url(\\"http://localhost:3030/css/b.jpg\\"); }body > p { color: yellow; }</style>
|
||||
</head><body>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`integration tests [html file]: with-style-sheet-with-import.html 1`] = `
|
||||
"<!DOCTYPE html><html lang=\\"en\\"><head>
|
||||
<meta charset=\\"UTF-8\\" />
|
||||
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
|
||||
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
|
||||
<title>with style sheet with import</title>
|
||||
<style>body { margin: 0px; background: url(\\"http://localhost:3030/a.jpg\\"); border-image: url(\\"data:image/svg+xml;utf8,<svg xmlns=\\\\\\"http://www.w3.org/2000/svg\\\\\\" x=\\\\\\"0px\\\\\\" y=\\\\\\"0px\\\\\\" viewBox=\\\\\\"0 0 256 256\\\\\\"><g><g><polygon points=\\\\\\"79.093,0 48.907,30.187 146.72,128 48.907,225.813 79.093,256 207.093,128\\\\\\"/></g></g></svg>\\") 100% / 1 / 0 stretch; }p { color: red; background: url(\\"http://localhost:3030/css/b.jpg\\"); }body > p { color: yellow; }</style>
|
||||
</head><body>
|
||||
</body></html>"
|
||||
`;
|
||||
|
||||
exports[`shadow DOM integration tests snapshot shadow DOM 1`] = `
|
||||
"{
|
||||
\\"type\\": 0,
|
||||
\\"childNodes\\": [
|
||||
Reference in New Issue
Block a user