From: lin qunfang Date: Wed, 16 May 2018 19:00:21 +0000 (+0800) Subject: [common][xmlhttprequest][DPTTIZEN-3044, modify 4 TCs due to upstream change] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F92%2F179192%2F2;p=test%2Ftct%2Fweb%2Fapi.git [common][xmlhttprequest][DPTTIZEN-3044, modify 4 TCs due to upstream change] Change-Id: Ie1bd095b6d9770ebdd2dd41e477e24a6ec5a4e00 Signed-off-by: lin qunfang --- diff --git a/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-during-open.htm b/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-during-open.htm index a5b61e707..bb426b48d 100755 --- a/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-during-open.htm +++ b/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-during-open.htm @@ -20,8 +20,7 @@ }) } client.abort() - assert_equals(client.readyState, 0) - assert_throws("InvalidStateError", function() { client.send("test") }, "calling send() after abort()") + assert_equals(client.readyState, 1) }) test.done() diff --git a/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-event-abort.htm b/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-event-abort.htm index a2c1e46f6..13943713b 100755 --- a/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-event-abort.htm +++ b/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-event-abort.htm @@ -36,7 +36,6 @@ }; xhr.open("GET", "resources/content.cgi", true); // This should cause a readystatechange event that calls abort() - assert_throws("InvalidStateError", function(){ xhr.send() }) test.done() }); diff --git a/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/responsetext-decoding.htm b/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/responsetext-decoding.htm index 5bf62529b..00c4d6e40 100755 --- a/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/responsetext-decoding.htm +++ b/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/responsetext-decoding.htm @@ -16,13 +16,16 @@ if (responseType !== undefined) { client.responseType = responseType } - client.open("GET", "resources/status.php?content=" + input + "&type=" + encodeURIComponent(type), false) + client.open("GET", "resources/status.php?content=" + input + "&type=" + encodeURIComponent(type), true) + client.onload = test.step_func_done(() => { + assert_equals(client.responseText, output) + }) client.send(null) assert_equals(client.responseText, output) }, document.title + " (" + type + " " + input + ")") } request("application/xml", encodeURIComponent("")+'%FF'+encodeURIComponent("<\/x>"), "\u00FF<\/x>") - request("text/html", encodeURIComponent("")+"%FF", "\u00FF") + request("text/html", encodeURIComponent("")+"%FF", "\uFFFD") request("text/plain;charset=windows-1252", "%FF", "\u00FF") request("text/plain", "%FF", "\uFFFD") request("text/plain", "%FE%FF", "") diff --git a/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/xhr2_XMLHttpRequest_overrideMimeType_basic.html b/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/xhr2_XMLHttpRequest_overrideMimeType_basic.html index 6a273639f..55bb39a95 100755 --- a/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/xhr2_XMLHttpRequest_overrideMimeType_basic.html +++ b/common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/xhr2_XMLHttpRequest_overrideMimeType_basic.html @@ -50,7 +50,7 @@ Authors: client.onreadystatechange = function () { if (client.readyState == this.LOADING) { test.step( function () { - assert_equals(client.getResponseHeader("Content-Type"), 'text/xml;charset=GBK', 'overrideMimeType not affect Content-Type header for the response'); + assert_equals(client.getResponseHeader("Content-Type"), 'text/xml', 'overrideMimeType not affect Content-Type header for the response'); }); test.done(); }