Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / send-object-tostring-check.html
blob1d2644326d5e94284b874c92b7c312e184c97f80
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="/js-test-resources/js-test.js"></script>
5 <script>
6 description('Test to verify XMLHttpRequest.send(...), with an object, calls toString exactly once.');
7 var testObj = new function() {
8 this.callCounter = 0;
9 this.toString = function() {
10 this.callCounter++;
11 return 'Hello World';
15 xhr = new XMLHttpRequest;
16 xhr.open('GET', 'resources/get.txt', true);
17 xhr.send(testObj);
18 shouldBe('testObj.callCounter', '1');
19 </script>
20 </head>
21 </html>