From 446face30b84c17446d353ee1b7d8ef02f290ee4 Mon Sep 17 00:00:00 2001 From: lin qunfang Date: Thu, 17 May 2018 03:00:21 +0800 Subject: [PATCH] [common][xmlhttprequest][DPTTIZEN-3044, modify 4 TCs due to upstream change] Change-Id: Ie1bd095b6d9770ebdd2dd41e477e24a6ec5a4e00 Signed-off-by: lin qunfang --- .../xmlhttprequest/w3c/abort-during-open.htm | 3 +-- .../xmlhttprequest/w3c/abort-event-abort.htm | 1 - .../xmlhttprequest/w3c/responsetext-decoding.htm | 7 +++++-- .../xhr2_XMLHttpRequest_overrideMimeType_basic.html | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) 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(); } -- 2.34.1