WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
Test case
gradient-inside-image-set-expected.html (text/html), 1.38 KB, created by
Noam Rosenthal
on 2020-01-13 00:52:14 PST
(
hide
)
Description:
Test case
Filename:
MIME Type:
Creator:
Noam Rosenthal
Created:
2020-01-13 00:52:14 PST
Size:
1.38 KB
patch
obsolete
><html> ><head> ><script> > function runTest() { > if (!window.testRunner || !window.sessionStorage) > return; > > if (!sessionStorage.scaleFactorIsSet) { > testRunner.waitUntilDone(); > testRunner.setBackingScaleFactor(2, scaleFactorIsSet); > } > > if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) { > delete sessionStorage.pageReloaded; > delete sessionStorage.scaleFactorIsSet; > testRunner.notifyDone(); > } else { > // Right now there is a bug that image-set does not properly deal with dynamic changes to the scale factor, > // so to work around that, we must reload the page to get the 2x image. > // https://bugs.webkit.org/show_bug.cgi?id=119764 > sessionStorage.pageReloaded = true; > document.location.reload(true); > } > } > > function scaleFactorIsSet() { > sessionStorage.scaleFactorIsSet = true; > } > > window.onload = runTest; ></script> > ><style> > #foo { > width:100px; > height:100px; > background-image: linear-gradient(white, green);; > } ></style> ></head> > ><body id="body"> > <div>This test passes if the div below is a blue 100px square when the deviceScaleFactor is 1, and if it is a 100px green square when the deviceScaleFactor is 2.</div> > <div id=foo></div> ></body> ></html>
<html> <head> <script> function runTest() { if (!window.testRunner || !window.sessionStorage) return; if (!sessionStorage.scaleFactorIsSet) { testRunner.waitUntilDone(); testRunner.setBackingScaleFactor(2, scaleFactorIsSet); } if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) { delete sessionStorage.pageReloaded; delete sessionStorage.scaleFactorIsSet; testRunner.notifyDone(); } else { // Right now there is a bug that image-set does not properly deal with dynamic changes to the scale factor, // so to work around that, we must reload the page to get the 2x image. // https://bugs.webkit.org/show_bug.cgi?id=119764 sessionStorage.pageReloaded = true; document.location.reload(true); } } function scaleFactorIsSet() { sessionStorage.scaleFactorIsSet = true; } window.onload = runTest; </script> <style> #foo { width:100px; height:100px; background-image: linear-gradient(white, green);; } </style> </head> <body id="body"> <div>This test passes if the div below is a blue 100px square when the deviceScaleFactor is 1, and if it is a 100px green square when the deviceScaleFactor is 2.</div> <div id=foo></div> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 81941
: 387505 |
388193
|
388194
|
388196
|
388263
|
388264
|
388265
|
388266
|
388267
|
388283
|
388291