From: tangkaiyuan Date: Fri, 19 Feb 2021 19:42:22 +0000 (+0800) Subject: [common][sessionhistory][pushState&replaceState accept error object as data] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F45%2F253945%2F1;p=test%2Ftct%2Fweb%2Fapi.git [common][sessionhistory][pushState&replaceState accept error object as data] Change-Id: Id2e44de4c6cb9426567916d1a58d1a1fc83c7048 Signed-off-by: tangkaiyuan --- diff --git a/common/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html b/common/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html index 40a029d78..7c50866c2 100755 --- a/common/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html +++ b/common/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html @@ -175,11 +175,10 @@ function reportload() { }, 'pushState must not be able to use a DOM node as data'); test(function () { try { a.b = c; } catch(errdata) { - assert_throws( 'DATA_CLONE_ERR', function () { - history.pushState({dummy:errdata},''); - } ); + history.pushState({dummy:errdata},''); + assert_equals(ReferenceError.prototype, Object.getPrototypeOf(history.state.dummy)); } - }, 'pushState must not be able to use an error object as data'); + }, 'pushState must be able to use an error object as data'); test(function () { assert_throws( 'DATA_CLONE_ERR', function () { iframe.contentWindow.history.pushState(document,''); diff --git a/common/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html b/common/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html index 1d1d90f68..9f2e9dd79 100755 --- a/common/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html +++ b/common/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html @@ -156,11 +156,10 @@ function reportload() { }, 'replaceState must not be able to use a DOM node as data'); test(function () { try { a.b = c; } catch(errdata) { - assert_throws( 'DATA_CLONE_ERR', function () { - history.replaceState({dummy:errdata},''); - } ); + history.replaceState({dummy:errdata},''); + assert_equals(ReferenceError.prototype, Object.getPrototypeOf(history.state.dummy)); } - }, 'replaceState must not be able to use an error object as data'); + }, 'replaceState must be able to use an error object as data'); test(function () { assert_throws( 'DATA_CLONE_ERR', function () { iframe.contentWindow.history.replaceState(document,''); diff --git a/common/tct-sessionhistory-html5-tests/tests.full.xml b/common/tct-sessionhistory-html5-tests/tests.full.xml index 1b171d9a6..516c8c189 100755 --- a/common/tct-sessionhistory-html5-tests/tests.full.xml +++ b/common/tct-sessionhistory-html5-tests/tests.full.xml @@ -668,7 +668,7 @@ - + http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&locator_key=id&value=27 @@ -1052,7 +1052,7 @@ - + http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&locator_key=id&value=25 @@ -1863,7 +1863,7 @@ - + http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&locator_key=id&value=27 @@ -2247,7 +2247,7 @@ - + http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&locator_key=id&value=25 @@ -3058,7 +3058,7 @@ - + http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&locator_key=id&value=27 @@ -3442,7 +3442,7 @@ - + http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&locator_key=id&value=25 diff --git a/common/tct-sessionhistory-html5-tests/tests.xml b/common/tct-sessionhistory-html5-tests/tests.xml index 262fa6282..09086492e 100755 --- a/common/tct-sessionhistory-html5-tests/tests.xml +++ b/common/tct-sessionhistory-html5-tests/tests.xml @@ -289,7 +289,7 @@ /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&locator_key=id&value=26 - + /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&locator_key=id&value=27 @@ -449,7 +449,7 @@ /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&locator_key=id&value=24 - + /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&locator_key=id&value=25 @@ -797,7 +797,7 @@ /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&locator_key=id&value=26 - + /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&locator_key=id&value=27 @@ -957,7 +957,7 @@ /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&locator_key=id&value=24 - + /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&locator_key=id&value=25 @@ -1305,7 +1305,7 @@ /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&locator_key=id&value=26 - + /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&locator_key=id&value=27 @@ -1465,7 +1465,7 @@ /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&locator_key=id&value=24 - + /opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&locator_key=id&value=25