27 lines
881 B
HTML
27 lines
881 B
HTML
<html>
|
|
<body>
|
|
<div id="description"></div>
|
|
<div id="console"></div>
|
|
<script src="../../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="../../resources/js-test-post.js"></script>
|
|
</body>
|