[common][xmlhttprequest][DPTTIZEN-3044, modify 4 TCs due to upstream change] 92/179192/2
authorlin qunfang <qunfang.lin@samsung.com>
Wed, 16 May 2018 19:00:21 +0000 (03:00 +0800)
committerlin qunfang <qunfang.lin@samsung.com>
Wed, 16 May 2018 19:07:49 +0000 (03:07 +0800)
Change-Id: Ie1bd095b6d9770ebdd2dd41e477e24a6ec5a4e00
Signed-off-by: lin qunfang <qunfang.lin@samsung.com>
common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-during-open.htm
common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/abort-event-abort.htm
common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/w3c/responsetext-decoding.htm
common/tct-xmlhttprequest-w3c-tests/xmlhttprequest/xhr2_XMLHttpRequest_overrideMimeType_basic.html

index a5b61e707d9fdc71da573c85f77ddff0266ab450..bb426b48ddbd4de02c5db8edc819ee0eaf5b9c4f 100755 (executable)
@@ -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()
     </script>
index a2c1e46f68ea5b8cf86810502abbc585784f031e..13943713b2f195a1d82dde8049b6ee0a17ff0317 100755 (executable)
@@ -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()
         });
     </script>
index 5bf62529b7caf9c88bfc80ee455e8bff8f42f7a2..00c4d6e40c7d4693a2ef20bc80ba4f088e9f6956 100755 (executable)
           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("<?xml version='1.0' encoding='windows-1252'?><x>")+'%FF'+encodeURIComponent("<\/x>"), "<?xml version='1.0' encoding='windows-1252'?><x>\u00FF<\/x>")
-      request("text/html", encodeURIComponent("<!doctype html><meta charset=windows-1252>")+"%FF", "<!doctype html><meta charset=windows-1252>\u00FF")
+      request("text/html", encodeURIComponent("<!doctype html><meta charset=windows-1252>")+"%FF", "<!doctype html><meta charset=windows-1252>\uFFFD")
       request("text/plain;charset=windows-1252", "%FF", "\u00FF")
       request("text/plain", "%FF", "\uFFFD")
       request("text/plain", "%FE%FF", "")
index 6a273639f7c4195cbee184fb94fa6fad6572f56d..55bb39a95d3d7790bfd5491919c025bc4769ab71 100755 (executable)
@@ -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();
             }