Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / images / image-with-dpr-natural-dimensions.html
blob2cd3e08f452160a7a13c7574095ecae8fa20a7f6
1 <!DOCTYPE html>
2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <!-- DPR in header -->
5 <img id=simple src="http://127.0.0.1:8000/resources/dpr.php?name=square100.png&mimeType=image/png&dpr=4.0">
6 <!-- fractional DPR -->
7 <img id=fractional src="http://127.0.0.1:8000/resources/dpr.php?name=square100.png&mimeType=image/png&dpr=2.5">
8 <!-- DPR smaller than 1 -->
9 <img id=smaller src="http://127.0.0.1:8000/resources/dpr.php?name=square100.png&mimeType=image/png&dpr=0.5">
10 <!-- DPR in srcset -->
11 <img id=srcset srcset="http://127.0.0.1:8000/resources/square100.png 4x">
12 <!-- invalid DPR in header -->
13 <img id=invalid src="http://127.0.0.1:8000/resources/dpr.php?name=square100.png&mimeType=image/png&dpr=xx">
14 <!-- combine header with srcset -->
15 <img id="srcset_dpr_invalid" srcset="http://127.0.0.1:8000/resources/dpr.php?name=square100.png&mimeType=image/png&dpr=xx 4x">
16 <img id="srcset_dpr" srcset="http://127.0.0.1:8000/resources/dpr.php?name=square100.png&mimeType=image/png&dpr=4.0 2x">
17 <!-- explicit width also given -->
18 <img id=width src="http://127.0.0.1:8000/resources/dpr.php?name=square100.png&mimeType=image/png&dpr=4.0"
19 width="100" height="100">
20 <!-- explicit width also given -->
21 <img id=zero src="http://127.0.0.1:8000/resources/dpr.php?name=square100.png&mimeType=image/png&dpr=0">
22 <script>
23 var verify = function(id, size) {
24 assert_equals(document.getElementById(id).naturalWidth, size);
25 assert_equals(document.getElementById(id).naturalHeight, size);
28 addEventListener("load", function() {
29 test(function() {
30 verify("simple", 25);
31 verify("fractional", 40);
32 verify("smaller", 200);
33 verify("srcset", 25);
34 verify("invalid", 100);
35 verify("srcset_dpr_invalid", 25);
36 verify("srcset_dpr", 25);
37 verify("width", 25);
38 verify("zero", 100);
39 }, "Test srcset and sizes with a meta viewport");
40 }, false);
41 </script>