blob: 1d2644326d5e94284b874c92b7c312e184c97f80 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="/js-test-resources/js-test.js"></script>
<script>
description('Test to verify XMLHttpRequest.send(...), with an object, calls toString exactly once.');
var testObj = new function() {
this.callCounter = 0;
this.toString = function() {
this.callCounter++;
return 'Hello World';
};
}
xhr = new XMLHttpRequest;
xhr.open('GET', 'resources/get.txt', true);
xhr.send(testObj);
shouldBe('testObj.callCounter', '1');
</script>
</head>
</html>