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

Unified Diff: LayoutTests/fast/domurl/url-query-append.html

Issue 141003005: Old CL related to URL query (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/fast/domurl/url-query-constructor.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/domurl/url-query-append.html
diff --git a/LayoutTests/fast/domurl/url-query-append.html b/LayoutTests/fast/domurl/url-query-append.html
new file mode 100644
index 0000000000000000000000000000000000000000..a2950e291f57de1dc8f9a28b04975e9ee160601a
--- /dev/null
+++ b/LayoutTests/fast/domurl/url-query-append.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML>
+<meta charset="utf-8">
+<link rel="help" href="http://url.spec.whatwg.org/#dom-urlquery-append">
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+
+test(function() {
+ var q = new URLQuery();
+ q.append('a', 'b');
+ assert_equals(q + '', 'a=b');
+
+ q.append('a', 'b');
+ assert_equals(q + '', 'a=b&a=b');
+
+ q.append('a', 'c');
+ assert_equals(q + '', 'a=b&a=b&a=c');
+}, 'Append same name');
+
+test(function() {
+ var q = new URLQuery();
+ q.append('', '');
+ assert_equals(q + '', '=');
+
+ q.append('', '');
+ assert_equals(q + '', '=&=');
+}, 'Append empty strings');
+
+test(function() {
+ var q = new URLQuery();
+ q.append(null, null);
+ assert_equals(q + '', 'null=null');
+
+ q.append(null, null);
+ assert_equals(q + '', 'null=null&null=null');
+}, 'Append null');
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/domurl/url-query-constructor.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698