blob: 723187da8f9fdfe2919b9d5b67074b4f4ed6d020 [file] [log] [blame]
commit-queue@webkit.orgcdf8eea82013-08-25 21:43:39 +00001<html>
2<head>
3<script>
4 window.targetScaleFactor = 1;
5</script>
ap@apple.combf5b7762015-01-20 18:26:00 +00006<script src="../../resources/srcset-helper.js"></script>
mark.lam@apple.com0f8554a2013-09-07 23:56:14 +00007<script src="../../resources/js-test-pre.js"></script>
commit-queue@webkit.orgcdf8eea82013-08-25 21:43:39 +00008<script>
ap@apple.combf5b7762015-01-20 18:26:00 +00009 if (window.testRunner)
commit-queue@webkit.orgcdf8eea82013-08-25 21:43:39 +000010 testRunner.dumpAsText();
commit-queue@webkit.orgcdf8eea82013-08-25 21:43:39 +000011
ap@apple.combf5b7762015-01-20 18:26:00 +000012 function runTest()
13 {
commit-queue@webkit.orgcdf8eea82013-08-25 21:43:39 +000014 shouldBeTrue('document.getElementById("foo").clientWidth==400');
ap@apple.combf5b7762015-01-20 18:26:00 +000015 }
commit-queue@webkit.orgcdf8eea82013-08-25 21:43:39 +000016</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>