Changeset 278299 in webkit
- Timestamp:
- Jun 1, 2021, 1:42:48 AM (5 years ago)
- Location:
- trunk/LayoutTests/imported/w3c
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio-expected.txt (modified) (1 diff)
-
web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio.html (modified) (1 diff)
-
web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-expected.txt (modified) (1 diff)
-
web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html (modified) (2 diffs)
-
web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js (modified) (1 diff)
-
web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r278293 r278299 1 2021-06-01 Cathie Chen <cathiechen@igalia.com> 2 3 Update tests of mapping width and height attributes to aspect-ratio from WPT 4 https://bugs.webkit.org/show_bug.cgi?id=226472 5 6 Reviewed by Rob Buis. 7 8 Base commit: https://github.com/web-platform-tests/wpt/commit/da6406b38dae07a8a69c384b72ddd89b48d5194a 9 10 * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio-expected.txt: 11 * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio.html: 12 * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-expected.txt: 13 * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html: 14 * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js: 15 (test_computed_style_aspect_ratio): 16 * web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html: 17 1 18 2021-05-31 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio-expected.txt
r277321 r278299 4 4 PASS Canvas width and height attributes are used as the surface size 5 5 FAIL Computed style test: canvas with {"width":"10","height":"20"} assert_equals: expected "auto 10 / 20" but got "auto" 6 PASS Computed style test: canvas with {"width":"0","height":"1"} 7 PASS Computed style test: canvas with {"width":"1","height":"0"} 8 PASS Computed style test: canvas with {"width":"0","height":"0"} 9 FAIL Computed style test: canvas with {"width":"0.5","height":"1.5"} assert_ in_array: value "auto" not in array ["auto 0 / 1", "auto 0.5 / 1.5"]10 PASS Computed style test: canvas with {"width":"10%","height":"20"} 6 FAIL Computed style test: canvas with {"width":"0","height":"1"} assert_equals: expected "auto 0 / 1" but got "auto" 7 FAIL Computed style test: canvas with {"width":"1","height":"0"} assert_equals: expected "auto 1 / 0" but got "auto" 8 FAIL Computed style test: canvas with {"width":"0","height":"0"} assert_equals: expected "auto 0 / 0" but got "auto" 9 FAIL Computed style test: canvas with {"width":"0.5","height":"1.5"} assert_equals: expected "auto 0 / 1" but got "auto" 10 FAIL Computed style test: canvas with {"width":"10%","height":"20"} assert_equals: expected "auto 10 / 20" but got "auto" 11 11 PASS Computed style test: canvas with {"width":null,"height":null} 12 12 PASS Computed style test: canvas with {"width":"10","height":null} -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/canvas-aspect-ratio.html
r276296 r278299 39 39 40 40 test_computed_style("10", "20", "auto 10 / 20"); 41 // These are invalid per spec, but see 42 // https://github.com/whatwg/html/issues/4961 43 test_computed_style("0", "1", ["auto", "auto 0 / 1"]); 44 test_computed_style("1", "0", ["auto", "auto 1 / 0"]); 45 test_computed_style("0", "0", ["auto", "auto 0 / 0"]); 46 47 // See https://github.com/whatwg/html/issues/4961: 48 // https://html.spec.whatwg.org/#attr-canvas-width 49 // https://html.spec.whatwg.org/#rules-for-parsing-non-negative-integers 50 test_computed_style("0.5", "1.5", ["auto 0 / 1", "auto 0.5 / 1.5"]); 51 test_computed_style("10%", "20", ["auto", "auto 10 / 20"]); 52 41 test_computed_style("0", "1", "auto 0 / 1"); 42 test_computed_style("1", "0", "auto 1 / 0"); 43 test_computed_style("0", "0", "auto 0 / 0"); 44 test_computed_style("0.5", "1.5", "auto 0 / 1"); 45 test_computed_style("10%", "20", "auto 10 / 20"); 53 46 test_computed_style(null, null, "auto"); 54 47 test_computed_style("10", null, "auto"); -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-expected.txt
r277997 r278299 5 5 PASS Create, append and test immediately: <img> with attributes width=0.8, height=0.2 6 6 PASS Create, append and test immediately: <img> with attributes width=50% height=25% 7 FAIL Create, append and test immediately: <img> with invalid trailing attributes width=50pp height=25xx assert_approx_equals: expected 2 +/- 0.001 but got Infinity 7 8 PASS Computed style test: img with {"width":"10","height":"20"} 8 9 PASS Computed style test: input with {"type":"image","width":"10","height":"20"} -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html
r276498 r278299 64 64 }, "Create, append and test immediately: <img> with attributes width=50% height=25%"); 65 65 66 test(function () { 67 img = new Image(); 68 img.setAttribute("width", "50pp"); 69 img.setAttribute("height", "25xx"); 70 img.src = "/images/blue.png"; 71 document.body.appendChild(img); 72 assert_ratio(img, 2); 73 }, "Create, append and test immediately: <img> with invalid trailing attributes width=50pp height=25xx"); 74 66 75 test_computed_style("10", "20", "auto 10 / 20"); 67 // These are invalid per spec, but see68 // https://github.com/whatwg/html/issues/496169 76 test_computed_style("0", "1", "auto 0 / 1"); 70 77 test_computed_style("1", "0", "auto 1 / 0"); 71 78 test_computed_style("0", "0", "auto 0 / 0"); 72 // https://html.spec.whatwg.org/#map-to-the-aspect-ratio-property73 // https://html.spec.whatwg.org/#rules-for-parsing-non-zero-dimension-values74 79 test_computed_style("0.5", "1.5", "auto 0.5 / 1.5"); 75 76 80 test_computed_style(null, null, "auto"); 77 81 test_computed_style("10", null, "auto"); … … 101 105 test(function () { 102 106 assert_not_equals(images[5].offsetHeight, 500, "Images with alt text should be inline and ignore the aspect ratio"); 107 // Though aspect-ratio is ignored, its value does not change. 108 assert_equals(getComputedStyle(images[5]).aspectRatio, "auto 100 / 500"); 103 109 }, "Loaded images test: Error image with width, height and alt attributes"); 104 110 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js
r276498 r278299 9 9 document.body.appendChild(elem); 10 10 let aspectRatio = getComputedStyle(elem).aspectRatio; 11 if (Array.isArray(expected)) { 12 assert_in_array(aspectRatio, expected); 13 } else { 14 assert_equals(aspectRatio, expected); 15 } 11 assert_equals(aspectRatio, expected); 16 12 elem.remove(); 17 13 }, `Computed style test: ${tag} with ${JSON.stringify(attributes)}`); -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html
r276296 r278299 53 53 test_computed_style("10", "20", "auto 10 / 20"); 54 54 test_computed_style("0.5", "1.5", "auto 0.5 / 1.5"); 55 56 // These are invalid per spec, but see 57 // https://github.com/whatwg/html/issues/4961 58 test_computed_style("0", "1", ["auto", "auto 0 / 1"]); 59 test_computed_style("1", "0", ["auto", "auto 1 / 0"]); 60 test_computed_style("0", "0", ["auto", "auto 0 / 0"]); 61 55 test_computed_style("0", "1", "auto 0 / 1"); 56 test_computed_style("1", "0", "auto 1 / 0"); 57 test_computed_style("0", "0", "auto 0 / 0"); 62 58 test_computed_style(null, null, "auto"); 63 59 test_computed_style("10", null, "auto");
Note:
See TracChangeset
for help on using the changeset viewer.