blob: 53aa0d5d835183771f7ffafe374459338d772d0f [file] [log] [blame]
<html>
<body>
<div id="description"></div>
<div id="console"></div>
<script src="../js/resources/js-test-pre.js"></script>
<script>
description('This test checks if setting non-supported type does not throw an exception');
var xhr = new XMLHttpRequest();
xhr.open('GET', 'resources/plist.app', true);
// Setting valid type does change the responseType value.
["", "arraybuffer", "blob", "document", "text"].forEach(function(type) {
xhr.responseType = type;
shouldBeEqualToString('xhr.responseType', type);
});
// Setting invalid type should not throw an exception.
shouldNotThrow('xhr.responseType = "dkjdfkjdfkj"');
// Setting invalid type doesn not change the responseType value.
shouldBeEqualToString('xhr.responseType = "text"; xhr.responseType = "asdfasdfasd"; xhr.responseType', 'text');
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>