[FHub][background,multicolumn][add chrome version check for columnRuleWidth, borderWi... 18/300518/1
authorchen <chen89.chen@samsung.com>
Thu, 26 Oct 2023 12:08:25 +0000 (20:08 +0800)
committerchen <chen89.chen@samsung.com>
Thu, 26 Oct 2023 12:08:30 +0000 (20:08 +0800)
Change-Id: I6e9ae844dfea35622b5c51586dfa609bb4adfe1d
Signed-off-by: chen <chen89.chen@samsung.com>
14 files changed:
common/tct-backgrounds-css3-tests/backgrounds/CSS3BG_border_0point5px_dashed_000.html
common/tct-backgrounds-css3-tests/backgrounds/support/cssstyle.js
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule-width_initial_value.html
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule_dashed.html
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule_dotted.html
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule_double.html
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule_green_inset.html
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule_green_outset.html
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule_green_solid.html
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule_groove.html
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule_pink_ridge.html
common/tct-multicolumn-css3-tests/multicolumn/CSS3Multicolumn_column-rule_solid.html
common/tct-multicolumn-css3-tests/multicolumn/support/cssstyle.js
common/tct-multicolumn-css3-tests/multicolumn/support/user.js

index 536064ad36e67414fdf2978f4ce58a8f5afebfee..7548b4fd458a5cf1acab4a958d1718f89f989b31 100755 (executable)
@@ -49,14 +49,14 @@ Authors:
         var div = document.querySelector("#test");
         test(function () {
             div.style[headProp("border")] = "0.5px dashed #000";
-            var borderWidth = GetCurrentStyle("border-width");
-            var armv8 = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv8");
-            var arch = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
-            if (armv8 && arch === 'aarch64'){
-                assert_equals(borderWidth, "0.5px", "The border-width value");
+            var border_width = GetCurrentStyle("border-width");
+            var default_border_width = 1;
+            if(chromeversion === M108){
+                var result_to_compare = (default_border_width / window.devicePixelRatio).toString() + 'px'; 
             }else{
-                assert_equals(borderWidth, "1px", "The border-width value");
+                var result_to_compare = (default_border_width).toString() + 'px';
             }
+            assert_equals(border_width, result_to_compare, "The border-width value");
             var borderStyle = GetCurrentStyle("border-style");
             assert_equals(borderStyle, "dashed", "The border-style value");
             var borderColor = GetCurrentStyle("border-color");
index a66c0797e4c26738df3ec1bc7a23ef7007eb228b..6f7ee025fe670bc8bafda888671c3800b7be71f2 100755 (executable)
@@ -30,6 +30,16 @@ Authors:
 
 */
 
+var M108 = '108'
+var chromeversion = (function getChromeVersion() {
+    var chromeVer = navigator.userAgent.match(/Chrome\/(\d+)/);
+    if (chromeVer && chromeVer.length > 1) {
+        var versionNumber = chromeVer[1];
+        return versionNumber;
+    } else {
+        return '';
+    }
+})()
 var browser = (function getBrowser() {
     if (navigator.userAgent.indexOf("WebKit") > 0) {
         return "webkit";
index 1f602d9e29e3c211fdf4174c18e6168008eb5864..48f16caf19c786c070d0ee3f6348d12208067841 100755 (executable)
@@ -41,6 +41,7 @@ Authors:
     <script src="../resources/testharness.js"></script>
     <script src="../resources/testharnessreport.js"></script>
     <script src="support/user.js"></script>
+       <script type="text/javascript" src="support/cssstyle.js"></script>
     <style type="text/css">
             #test{
             height: 100px;
@@ -63,11 +64,13 @@ Authors:
         var column_rule_width = GetCurrentStyle("columnRuleWidth");
         var t = async_test(document.title, {timeout: 500});
         t.step(function () {
-            if(ARMV8 && ARCH === 'aarch64'){
-                assert_equals(column_rule_width, "1.5px", "The div column-rule-width");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-                assert_equals(column_rule_width, "3px", "The div column-rule-width");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
         });
         t.done();
     </script>
index 776bd1b1004e34a997aa6b9bc94d9a0a43fcd841..cb50bc061d79d54db66feed035f32af9f5eea5a4 100755 (executable)
@@ -39,7 +39,6 @@ Authors:
     <script type="text/javascript" src="../resources/testharness.js"></script>
     <script type="text/javascript" src="../resources/testharnessreport.js"></script>
     <script type="text/javascript" src="support/cssstyle.js"></script>
-    <script src="support/user.js"></script>
     <style>
         #test{
             height: 100px;
@@ -63,14 +62,14 @@ Authors:
             var columnRuleColor = GetCurrentStyle("column-rule-color");
             var propcolumnRuleColor = columnRuleColor.indexOf("rgb(0, 0, 0)") != -1;
             assert_true(propcolumnRuleColor, "The element column-rule-color should not be rgb(0, 0, 0)");
-            var columnRuleWidth = GetCurrentStyle("columnRuleWidth");
-            if(ARMV8 && ARCH === 'aarch64'){
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("1.5px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 1.5px");
+            var column_rule_width = GetCurrentStyle("columnRuleWidth");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("3px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 3px");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
             var columnRuleStyle = GetCurrentStyle("column-rule-style");
             var propcolumnRuleStyle = columnRuleStyle.indexOf("dashed") != -1;
             assert_true(propcolumnRuleStyle, "The element column-rule-style should not be dashed");
index 8d427e391fd70e953950f5698e7cb1ae88b7923a..1b868ef15890c43cbf8f40c25f34b634051f72f3 100755 (executable)
@@ -39,7 +39,6 @@ Authors:
     <script type="text/javascript" src="../resources/testharness.js"></script>
     <script type="text/javascript" src="../resources/testharnessreport.js"></script>
     <script type="text/javascript" src="support/cssstyle.js"></script>
-    <script src="support/user.js"></script>
     <style>
         #test{
             height: 100px;
@@ -63,14 +62,14 @@ Authors:
             var columnRuleColor = GetCurrentStyle("column-rule-color");
             var propcolumnRuleColor = columnRuleColor.indexOf("rgb(0, 0, 0)") != -1;
             assert_true(propcolumnRuleColor, "The element column-rule-color should not be rgb(0, 0, 0)");
-            var columnRuleWidth = GetCurrentStyle("columnRuleWidth");
-            if(ARMV8 && ARCH === 'aarch64'){
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("1.5px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 1.5px");
+            var column_rule_width = GetCurrentStyle("columnRuleWidth");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-              var propcolumnRuleWidth = columnRuleWidth.indexOf("3px") != -1;
-              assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 3px");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
             var columnRuleStyle = GetCurrentStyle("column-rule-style");
             var propcolumnRuleStyle = columnRuleStyle.indexOf("dotted") != -1;
             assert_true(propcolumnRuleStyle, "The element column-rule-style should not be dotted");
index 1910cfe99bbe3875927738e89877d5734dfccb2b..f6d620e0ca4e97be59292160b7b91da20605eedb 100755 (executable)
@@ -39,7 +39,6 @@ Authors:
     <script type="text/javascript" src="../resources/testharness.js"></script>
     <script type="text/javascript" src="../resources/testharnessreport.js"></script>
     <script type="text/javascript" src="support/cssstyle.js"></script>
-    <script src="support/user.js"></script>
     <style>
         #test{
             height: 100px;
@@ -63,14 +62,14 @@ Authors:
             var columnRuleColor = GetCurrentStyle("column-rule-color");
             var propcolumnRuleColor = columnRuleColor.indexOf("rgb(0, 0, 0)") != -1;
             assert_true(propcolumnRuleColor, "The element column-rule-color should not be rgb(0, 0, 0)");
-            var columnRuleWidth = GetCurrentStyle("columnRuleWidth");
-            if(ARMV8 && ARCH === 'aarch64'){
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("1.5px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 1.5px");
+            var column_rule_width = GetCurrentStyle("columnRuleWidth");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("3px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 3px");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
             var columnRuleStyle = GetCurrentStyle("column-rule-style");
             var propcolumnRuleStyle = columnRuleStyle.indexOf("double") != -1;
             assert_true(propcolumnRuleStyle, "The element column-rule-style should not be double");
index d154e648006073ddabe4e0dc75f955f3e212f9f8..e76ea02f2081f4c416479722cd038729fd65be09 100755 (executable)
@@ -39,7 +39,6 @@ Authors:
     <script type="text/javascript" src="../resources/testharness.js"></script>
     <script type="text/javascript" src="../resources/testharnessreport.js"></script>
     <script type="text/javascript" src="support/cssstyle.js"></script>
-    <script src="support/user.js"></script>
     <style>
         #test{
             height: 100px;
@@ -64,13 +63,14 @@ Authors:
             var propcolumnRuleColor = columnRuleColor.indexOf("rgb(0, 128, 0)") != -1;
             assert_true(propcolumnRuleColor, "The element column-rule-color should not be rgb(255, 0, 0)");
             var columnRuleWidth = GetCurrentStyle("columnRuleWidth");
-            if(ARMV8 && ARCH === 'aarch64'){
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("1.5px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 1.5px");
+            var column_rule_width = GetCurrentStyle("columnRuleWidth");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("3px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 3px");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
             var columnRuleStyle = GetCurrentStyle("column-rule-style");
             var propcolumnRuleStyle = columnRuleStyle.indexOf("inset") != -1;
             assert_true(propcolumnRuleStyle, "The element column-rule-style should not be inset");
index 6f146563e177482750154f679e3e240117114a01..b59844e720c5430af3ff8decfd7ae462f2b2c338 100755 (executable)
@@ -39,7 +39,6 @@ Authors:
     <script type="text/javascript" src="../resources/testharness.js"></script>
     <script type="text/javascript" src="../resources/testharnessreport.js"></script>
     <script type="text/javascript" src="support/cssstyle.js"></script>
-    <script src="support/user.js"></script>
     <style>
         #test{
             height: 100px;
@@ -63,14 +62,14 @@ Authors:
             var columnRuleColor = GetCurrentStyle("column-rule-color");
             var propcolumnRuleColor = columnRuleColor.indexOf("rgb(0, 128, 0)") != -1;
             assert_true(propcolumnRuleColor, "The element column-rule-color should not be rgb(255, 0, 0)");
-            var columnRuleWidth = GetCurrentStyle("columnRuleWidth");
-            if(ARMV8 && ARCH === 'aarch64'){
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("1.5px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 1.5px");
+            var column_rule_width = GetCurrentStyle("columnRuleWidth");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("3px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 3px");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
             var columnRuleStyle = GetCurrentStyle("column-rule-style");
             var propcolumnRuleStyle = columnRuleStyle.indexOf("outset") != -1;
             assert_true(propcolumnRuleStyle, "The element column-rule-style should not be outset");
index 428dba60afcdd0f214ca6ac81230071207cc42d6..1e5bf61c0f667d9cd8fa0c3e3141555e7078c14e 100755 (executable)
@@ -39,7 +39,6 @@ Authors:
     <script type="text/javascript" src="../resources/testharness.js"></script>
     <script type="text/javascript" src="../resources/testharnessreport.js"></script>
     <script type="text/javascript" src="support/cssstyle.js"></script>
-    <script src="support/user.js"></script>
     <style>
         #test{
             height: 100px;
@@ -63,14 +62,15 @@ Authors:
             var columnRuleColor = GetCurrentStyle("column-rule-color");
             var propcolumnRuleColor = columnRuleColor.indexOf("rgb(0, 128, 0)") != -1;
             assert_true(propcolumnRuleColor, "The element column-rule-color should not be rgb(255, 0, 0)");
-            var columnRuleWidth = GetCurrentStyle("columnRuleWidth");
-            if(ARMV8 && ARCH === 'aarch64'){
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("1.5px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 1.5px");
+            var column_rule_width = GetCurrentStyle("columnRuleWidth");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("3px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 3px");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            console.log(chromeversion, column_rule_width, result_to_compare, window.devicePixelRatio)
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
             var columnRuleStyle = GetCurrentStyle("column-rule-style");
             var propcolumnRuleStyle = columnRuleStyle.indexOf("solid") != -1;
             assert_true(propcolumnRuleStyle, "The element column-rule-style should not be solid");
index 4d1f178c5614fd0085e027fdcbc5ff70315f6151..401f41d68a27442c215f6fb7dda245506dcdc3ff 100755 (executable)
@@ -39,7 +39,6 @@ Authors:
     <script type="text/javascript" src="../resources/testharness.js"></script>
     <script type="text/javascript" src="../resources/testharnessreport.js"></script>
     <script type="text/javascript" src="support/cssstyle.js"></script>
-    <script src="support/user.js"></script>
     <style>
         #test{
             height: 100px;
@@ -63,14 +62,14 @@ Authors:
             var columnRuleColor = GetCurrentStyle("column-rule-color");
             var propcolumnRuleColor = columnRuleColor.indexOf("rgb(0, 0, 0)") != -1;
             assert_true(propcolumnRuleColor, "The element column-rule-color should not be rgb(0, 0, 0)");
-            var columnRuleWidth = GetCurrentStyle("columnRuleWidth");
-            if(ARMV8 && ARCH === 'aarch64'){
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("1.5px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 1.5px");
+            var column_rule_width = GetCurrentStyle("columnRuleWidth");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("3px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 3px");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
             var columnRuleStyle = GetCurrentStyle("column-rule-style");
             var propcolumnRuleStyle = columnRuleStyle.indexOf("groove") != -1;
             assert_true(propcolumnRuleStyle, "The element column-rule-style should not be groove");
index d0f5eeeb5d5d5feba520d9627ee548f1eba3cd11..afe72dfb1ac6994e38c2a98d114f115476dfbb63 100755 (executable)
@@ -39,7 +39,6 @@ Authors:
     <script type="text/javascript" src="../resources/testharness.js"></script>
     <script type="text/javascript" src="../resources/testharnessreport.js"></script>
     <script type="text/javascript" src="support/cssstyle.js"></script>
-    <script src="support/user.js"></script>
     <style>
         #test{
             height: 100px;
@@ -63,14 +62,14 @@ Authors:
             var columnRuleColor = GetCurrentStyle("column-rule-color");
             var propcolumnRuleColor = columnRuleColor.indexOf("rgb(255, 192, 203)") != -1;
             assert_true(propcolumnRuleColor, "The element column-rule-color should not be pink");
-            var columnRuleWidth = GetCurrentStyle("columnRuleWidth");
-            if(ARMV8 && ARCH === 'aarch64'){
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("1.5px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 1.5px");
+            var column_rule_width = GetCurrentStyle("columnRuleWidth");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("3px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 3px");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
             var columnRuleStyle = GetCurrentStyle("column-rule-style");
             var propcolumnRuleStyle = columnRuleStyle.indexOf("ridge") != -1;
             assert_true(propcolumnRuleStyle, "The element column-rule-style should not be ridge");
index 0884bdf9bdcfeee4e61fb69bcc3eef6df5cf0626..bc177c65b129a3680d48b03f9bcccb377103b504 100755 (executable)
@@ -39,7 +39,6 @@ Authors:
     <script type="text/javascript" src="../resources/testharness.js"></script>
     <script type="text/javascript" src="../resources/testharnessreport.js"></script>
     <script type="text/javascript" src="support/cssstyle.js"></script>
-    <script src="support/user.js"></script>
     <style>
         #test{
             height: 100px;
@@ -63,14 +62,14 @@ Authors:
             var columnRuleColor = GetCurrentStyle("column-rule-color");
             var propcolumnRuleColor = columnRuleColor.indexOf("rgb(0, 0, 0)") != -1;
             assert_true(propcolumnRuleColor, "The element column-rule-color should not be rgb(0, 0, 0)");
-            var columnRuleWidth = GetCurrentStyle("columnRuleWidth");
-            if(ARMV8 && ARCH === 'aarch64'){
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("1.5px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 1.5px");
+            var column_rule_width = GetCurrentStyle("columnRuleWidth");
+            var default_column_rule_width = 3;
+            if(chromeversion === M108){
+                var result_to_compare = (default_column_rule_width / window.devicePixelRatio).toString() + 'px';
             }else{
-                var propcolumnRuleWidth = columnRuleWidth.indexOf("3px") != -1;
-                assert_true(propcolumnRuleWidth, "The element column-rule-width should not be 3px");
+                var result_to_compare = (default_column_rule_width).toString() + 'px';
             }
+            assert_equals(column_rule_width, result_to_compare, "The element column-rule-width")
             var columnRuleStyle = GetCurrentStyle("column-rule-style");
             var propcolumnRuleStyle = columnRuleStyle.indexOf("solid") != -1;
             assert_true(propcolumnRuleStyle, "The element column-rule-style should not be solid");
index a66c0797e4c26738df3ec1bc7a23ef7007eb228b..6f7ee025fe670bc8bafda888671c3800b7be71f2 100755 (executable)
@@ -30,6 +30,16 @@ Authors:
 
 */
 
+var M108 = '108'
+var chromeversion = (function getChromeVersion() {
+    var chromeVer = navigator.userAgent.match(/Chrome\/(\d+)/);
+    if (chromeVer && chromeVer.length > 1) {
+        var versionNumber = chromeVer[1];
+        return versionNumber;
+    } else {
+        return '';
+    }
+})()
 var browser = (function getBrowser() {
     if (navigator.userAgent.indexOf("WebKit") > 0) {
         return "webkit";
index e113c2359aa831de84cb964026f374fb59e503d0..8b486b534730a892df5da5b903cd2487f55b2994 100755 (executable)
@@ -29,8 +29,6 @@ Authors:
 
 */
 
-var ARMV8 = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch.armv8");
-var ARCH = tizen.systeminfo.getCapability("http://tizen.org/feature/platform.core.cpu.arch");
 
 function GetCurrentStyle(prop) {
     var div = document.querySelector("#test");