[common][canvas-html5]fix DF240530-00977 font shape has been changed, update 1 tc 76/312176/2
authorchen <chen89.chen@samsung.com>
Wed, 5 Jun 2024 18:14:07 +0000 (02:14 +0800)
committerchen <chen89.chen@samsung.com>
Wed, 5 Jun 2024 18:15:42 +0000 (02:15 +0800)
Change-Id: I978b69c4a838d5cbc006d4170bdcab9cf0bfe3c2
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>