[common][canvas-html5]fix CH240619-00377 font shape has been changed, update 1 tc 74/313174/1
authorchen <chen89.chen@samsung.com>
Thu, 20 Jun 2024 16:45:24 +0000 (00:45 +0800)
committerchen <chen89.chen@samsung.com>
Thu, 20 Jun 2024 16:45:29 +0000 (00:45 +0800)
Change-Id: Ia720d803b7faee0499b02979949087e457033bae
Signed-off-by: chen <chen89.chen@samsung.com>
common/tct-canvas-html5-tests/canvas/canvas2d_measureText_basic.html

index 2fd598972c51a691a4cefd6a1d478433beaeb38f..21a0f058bee3b096b9eba4028e6cfe904d3955f9 100755 (executable)
@@ -41,7 +41,8 @@ Authors:
         ctx = canvas.getContext("2d");
         tm1 = ctx.measureText("f");
         tm = ctx.measureText("fff")
-        assert_equals(tm.width, tm1.width * 3, "the length of measureText is not equal to 16");
+        // font shape has been changed, UX changed font file on some TV branch
+        assert_equals(parseFloat(tm.width.toFixed(4)), parseFloat((tm1.width * 3).toFixed(4)), "the fixed 4 float is not equal");
       });
     </script>
   </body>