[common][sessionhistory][pushState&replaceState accept error object as data] 45/253945/1
authortangkaiyuan <kaiyuan.tang@samsung.com>
Fri, 19 Feb 2021 19:42:22 +0000 (03:42 +0800)
committertangkaiyuan <kaiyuan.tang@samsung.com>
Fri, 19 Feb 2021 19:42:33 +0000 (03:42 +0800)
Change-Id: Id2e44de4c6cb9426567916d1a58d1a1fc83c7048
Signed-off-by: tangkaiyuan <kaiyuan.tang@samsung.com>
common/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html
common/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html
common/tct-sessionhistory-html5-tests/tests.full.xml
common/tct-sessionhistory-html5-tests/tests.xml

index 40a029d787766968a428e8412f7482ac366cab68..7c50866c2b13fd5214de27d3aeb4b558f68613cf 100755 (executable)
@@ -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,'');
index 1d1d90f68336c7d0f79e7fa9b947cdedc6b6f03c..9f2e9dd795d6fe69084f15682fc0e4be879a6ab3 100755 (executable)
@@ -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,'');
index 1b171d9a6ac4e9692ea140459d3e87cfc2a019f5..516c8c189699045b1b08922b2929575331e327fc 100755 (executable)
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="pushState must not be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_pushState_not_able_to_use_error_object_as_data">
+      <testcase purpose="pushState must be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_pushState_able_to_use_error_object_as_data">
         <description>
           <test_script_entry>http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&amp;locator_key=id&amp;value=27</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="replaceState must not be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_replaceState_arguments_with_a_error_object">
+      <testcase purpose="replaceState must be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_replaceState_arguments_with_a_error_object">
         <description>
           <test_script_entry>http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&amp;locator_key=id&amp;value=25</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="pushState must not be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_pushState_not_able_to_use_error_object_as_data">
+      <testcase purpose="pushState must be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_pushState_able_to_use_error_object_as_data">
         <description>
           <test_script_entry>http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&amp;locator_key=id&amp;value=27</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="replaceState must not be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_replaceState_arguments_with_a_error_object">
+      <testcase purpose="replaceState must be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_replaceState_arguments_with_a_error_object">
         <description>
           <test_script_entry>http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&amp;locator_key=id&amp;value=25</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="pushState must not be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_pushState_not_able_to_use_error_object_as_data">
+      <testcase purpose="pushState must be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_pushState_able_to_use_error_object_as_data">
         <description>
           <test_script_entry>http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&amp;locator_key=id&amp;value=27</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="replaceState must not be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_replaceState_arguments_with_a_error_object">
+      <testcase purpose="replaceState must be able to use an error object as data" type="compliance" status="approved" component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" priority="P2" id="history_replaceState_arguments_with_a_error_object">
         <description>
           <test_script_entry>http://127.0.0.1:8080/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&amp;locator_key=id&amp;value=25</test_script_entry>
         </description>
index 262fa62821f822605b044ee34609df8deb37dd9c..09086492e55f834860fa88ed5a142b9e2b644340 100755 (executable)
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&amp;locator_key=id&amp;value=26</test_script_entry>
         </description>
       </testcase>
-      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_pushState_not_able_to_use_error_object_as_data" priority="P2" purpose="pushState must not be able to use an error object as data">
+      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_pushState_able_to_use_error_object_as_data" priority="P2" purpose="pushState must be able to use an error object as data">
         <description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&amp;locator_key=id&amp;value=27</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&amp;locator_key=id&amp;value=24</test_script_entry>
         </description>
       </testcase>
-      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_replaceState_arguments_with_a_error_object" priority="P2" purpose="replaceState must not be able to use an error object as data">
+      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_replaceState_arguments_with_a_error_object" priority="P2" purpose="replaceState must be able to use an error object as data">
         <description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&amp;locator_key=id&amp;value=25</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&amp;locator_key=id&amp;value=26</test_script_entry>
         </description>
       </testcase>
-      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_pushState_not_able_to_use_error_object_as_data" priority="P2" purpose="pushState must not be able to use an error object as data">
+      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_pushState_able_to_use_error_object_as_data" priority="P2" purpose="pushState must be able to use an error object as data">
         <description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&amp;locator_key=id&amp;value=27</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&amp;locator_key=id&amp;value=24</test_script_entry>
         </description>
       </testcase>
-      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_replaceState_arguments_with_a_error_object" priority="P2" purpose="replaceState must not be able to use an error object as data">
+      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_replaceState_arguments_with_a_error_object" priority="P2" purpose="replaceState must be able to use an error object as data">
         <description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&amp;locator_key=id&amp;value=25</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&amp;locator_key=id&amp;value=26</test_script_entry>
         </description>
       </testcase>
-      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_pushState_not_able_to_use_error_object_as_data" priority="P2" purpose="pushState must not be able to use an error object as data">
+      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_pushState_able_to_use_error_object_as_data" priority="P2" purpose="pushState must be able to use an error object as data">
         <description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/001.html?total_num=40&amp;locator_key=id&amp;value=27</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&amp;locator_key=id&amp;value=24</test_script_entry>
         </description>
       </testcase>
-      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_replaceState_arguments_with_a_error_object" priority="P2" purpose="replaceState must not be able to use an error object as data">
+      <testcase component="W3C_HTML5 APIs/Communication/HTML5 The session history of browsing contexts (Partial)" execution_type="auto" id="history_replaceState_arguments_with_a_error_object" priority="P2" purpose="replaceState must not able to use an error object as data">
         <description>
           <test_script_entry>/opt/tct-sessionhistory-html5-tests/sessionhistory/w3c/002.html?total_num=38&amp;locator_key=id&amp;value=25</test_script_entry>
         </description>