Pass | Image width and height attributes are used to infer aspect-ratio | Asserts runNo asserts ran |
Pass | Create, append and test immediately: <img> with attributes width=250, height=100 | Asserts runPass | assert_approx_equals(2.5, 2.5, 0.001, undefined)
at assert_ratio ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3) |
|
Pass | Create, append and test immediately: <img> with attributes width=0.8, height=0.2 | Asserts runPass | assert_approx_equals(4, 4, 0.001, undefined)
at assert_ratio ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3) |
|
Pass | Create, append and test immediately: <img> with attributes width=50% height=25% | Asserts runPass | assert_equals("0px", "0px")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:66:3) |
|
Pass | Create, append and test immediately: <img> with invalid trailing attributes width=50pp height=25xx | Asserts runPass | assert_approx_equals(2, 2, 0.001, undefined)
at assert_ratio ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3) |
|
Pass | Computed style test: img with {"width":"10","height":"20"} | Asserts runPass | assert_equals("auto 10 / 20", "auto 10 / 20")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":"10","height":"20"} | Asserts runPass | assert_equals("auto 10 / 20", "auto 10 / 20")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":"10","height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: img with {"width":"0","height":"1"} | Asserts runPass | assert_equals("auto 0 / 1", "auto 0 / 1")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":"0","height":"1"} | Asserts runPass | assert_equals("auto 0 / 1", "auto 0 / 1")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":"0","height":"1"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: img with {"width":"1","height":"0"} | Asserts runPass | assert_equals("auto 1 / 0", "auto 1 / 0")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":"1","height":"0"} | Asserts runPass | assert_equals("auto 1 / 0", "auto 1 / 0")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":"1","height":"0"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: img with {"width":"0","height":"0"} | Asserts runPass | assert_equals("auto 0 / 0", "auto 0 / 0")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":"0","height":"0"} | Asserts runPass | assert_equals("auto 0 / 0", "auto 0 / 0")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":"0","height":"0"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: img with {"width":"0.5","height":"1.5"} | Asserts runPass | assert_equals("auto 0.5 / 1.5", "auto 0.5 / 1.5")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":"0.5","height":"1.5"} | Asserts runPass | assert_equals("auto 0.5 / 1.5", "auto 0.5 / 1.5")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":"0.5","height":"1.5"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: img with {"width":null,"height":null} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":null,"height":null} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":null,"height":null} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: img with {"width":"10","height":null} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":"10","height":null} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":"10","height":null} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: img with {"width":null,"height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":null,"height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":null,"height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: img with {"width":"xx","height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":"xx","height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":"xx","height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: img with {"width":"10%","height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"image","width":"10%","height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Pass | Computed style test: input with {"type":"submit","width":"10%","height":"20"} | Asserts runPass | assert_equals("auto", "auto")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/resources/aspect-ratio.js:11:5) |
|
Fail | Loaded images test: <img> without width height attributes | assert_approx_equals: 2.0 is the original aspect ratio of green.png expected 2 +/- 0.001 but got 1 at assert_ratio (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3)
at Test.<anonymous> (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:93:5)
at Test.step (https://www1.wpt.live/resources/testharness.js:2638:25)
at test (https://www1.wpt.live/resources/testharness.js:633:30)
at onload (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:92:3) Asserts runFail | assert_approx_equals(1, 2, 0.001, "2.0 is the original aspect ratio of green.png")
at assert_ratio ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3) |
|
Fail | Loaded images test: <img> with width and height attributes, but conflicting to the original aspect ratio | assert_approx_equals: Loaded image's aspect ratio, at least by default, overrides width / height ratio. expected 2 +/- 0.001 but got 0.8 at assert_ratio (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3)
at Test.<anonymous> (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:97:5)
at Test.step (https://www1.wpt.live/resources/testharness.js:2638:25)
at test (https://www1.wpt.live/resources/testharness.js:633:30)
at onload (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:96:3) Asserts runFail | assert_approx_equals(0.8, 2, 0.001, "Loaded image's aspect ratio, at least by default, overrides width / height ratio.")
at assert_ratio ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3) |
|
Pass | Loaded images test: <img> with width, height and empty src attributes | Asserts runPass | assert_approx_equals(0.8, 0.8, 0.001, "aspect-ratio should override intrinsic size of images that don't have any src.")
at assert_ratio ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3) |
|
Pass | Loaded images test: Error image with width and height attributes | Asserts runPass | assert_approx_equals(0.8, 0.8, 0.001, "aspect-ratio should affect the size of error images.")
at assert_ratio ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3) |
|
Fail | Loaded images test: Error image with width, height and alt attributes | assert_equals: expected "auto 100 / 500" but got "auto" at Test.<anonymous> (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:111:5)
at Test.step (https://www1.wpt.live/resources/testharness.js:2638:25)
at test (https://www1.wpt.live/resources/testharness.js:633:30)
at onload (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:108:3) Asserts runPass | assert_not_equals(19, 500, "Images with alt text should be inline and ignore the aspect ratio")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:109:5) | Fail | assert_equals("auto", "auto 100 / 500")
at Test.<anonymous> ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:111:5) |
|
Fail | Loaded images test: <img> with width and height attributes, but not equal to the original aspect ratio | assert_approx_equals: The original aspect ratio of blue.png expected 1.2547169811320755 +/- 0.001 but got 2.5 at assert_ratio (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3)
at Test.<anonymous> (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:115:5)
at Test.step (https://www1.wpt.live/resources/testharness.js:2638:25)
at test (https://www1.wpt.live/resources/testharness.js:633:30)
at onload (https://www1.wpt.live/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:114:3) Asserts runFail | assert_approx_equals(2.5, 1.2547169811320755, 0.001, "The original aspect ratio of blue.png")
at assert_ratio ( /html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio.html:24:3) |
|