commit-queue@webkit.org | cdf8eea8 | 2013-08-25 21:43:39 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <script> |
| 4 | window.targetScaleFactor = 1; |
| 5 | </script> |
ap@apple.com | bf5b776 | 2015-01-20 18:26:00 +0000 | [diff] [blame] | 6 | <script src="../../resources/srcset-helper.js"></script> |
mark.lam@apple.com | 0f8554a | 2013-09-07 23:56:14 +0000 | [diff] [blame] | 7 | <script src="../../resources/js-test-pre.js"></script> |
commit-queue@webkit.org | cdf8eea8 | 2013-08-25 21:43:39 +0000 | [diff] [blame] | 8 | <script> |
ap@apple.com | bf5b776 | 2015-01-20 18:26:00 +0000 | [diff] [blame] | 9 | if (window.testRunner) |
commit-queue@webkit.org | cdf8eea8 | 2013-08-25 21:43:39 +0000 | [diff] [blame] | 10 | testRunner.dumpAsText(); |
commit-queue@webkit.org | cdf8eea8 | 2013-08-25 21:43:39 +0000 | [diff] [blame] | 11 | |
ap@apple.com | bf5b776 | 2015-01-20 18:26:00 +0000 | [diff] [blame] | 12 | function runTest() |
| 13 | { |
commit-queue@webkit.org | cdf8eea8 | 2013-08-25 21:43:39 +0000 | [diff] [blame] | 14 | shouldBeTrue('document.getElementById("foo").clientWidth==400'); |
ap@apple.com | bf5b776 | 2015-01-20 18:26:00 +0000 | [diff] [blame] | 15 | } |
commit-queue@webkit.org | cdf8eea8 | 2013-08-25 21:43:39 +0000 | [diff] [blame] | 16 | </script> |
| 17 | </head> |
| 18 | |
| 19 | <body id="body"> |
| 20 | <div>This test passes if the image below says 1x with a reddish background when the deviceScaleFactor is 1, and if says 2x with a greenish background when the deviceScaleFactor is 2.</div> |
| 21 | <img id="foo" src="" srcset="resources/image-set-1x.png 1x, resources/deleteButton.png 3x, resources/image-set-2x.png 2x"> |
| 22 | </body> |
| 23 | </html> |