feat(chromium): add emulated media type

This commit is contained in:
Julien Neuhart
2021-11-22 16:55:24 +01:00
parent ed47493459
commit dd1e11f102
5 changed files with 106 additions and 0 deletions

View File

@@ -264,6 +264,25 @@ func TestChromium_PDF(t *testing.T) {
},
},
},
{
URL: "file:///tests/test/testdata/chromium/html/sample8/index.html",
options: Options{
EmulatedMediaType: "foo",
},
expectErr: true,
},
{
URL: "file:///tests/test/testdata/chromium/html/sample8/index.html",
options: Options{
EmulatedMediaType: "screen",
},
},
{
URL: "file:///tests/test/testdata/chromium/html/sample8/index.html",
options: Options{
EmulatedMediaType: "print",
},
},
{
URL: "file:///tests/test/testdata/chromium/html/sample4/index.html",
options: Options{
@@ -300,6 +319,13 @@ func TestChromium_PDF(t *testing.T) {
WaitForExpression: "window.status === 'ready'",
},
},
{
URL: "file:///tests/test/testdata/chromium/html/sample4/index.html",
options: Options{
WaitForExpression: "return undefined",
},
expectErr: true,
},
{
URL: "file:///tests/test/testdata/chromium/html/sample4/index.html",
options: Options{