Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: LayoutTests/http/tests/xmlhttprequest/send-object-tostring-check.html

Issue 1030613002: [bindings] Make XMLHttpRequest.send() use the generated binding code over the custom one. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/send-object-tostring-check-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/xmlhttprequest/send-object-tostring-check.html
diff --git a/LayoutTests/http/tests/xmlhttprequest/send-object-tostring-check.html b/LayoutTests/http/tests/xmlhttprequest/send-object-tostring-check.html
new file mode 100644
index 0000000000000000000000000000000000000000..1d2644326d5e94284b874c92b7c312e184c97f80
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/send-object-tostring-check.html
@@ -0,0 +1,21 @@
+<!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>
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/send-object-tostring-check-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698