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

Side by Side Diff: appengine/monorail/static/js/framework/framework-ajax_test.js

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 /* Copyright 2016 The Chromium Authors. All Rights Reserved.
2 *
3 * Use of this source code is governed by a BSD-style
4 * license that can be found in the LICENSE file or at
5 * https://developers.google.com/open-source/licenses/bsd
6 */
7
8 /**
9 * @fileoverview Tests for framework-ajax.js.
10 */
11
12 var CS_env;
13
14 function setUp() {
15 CS_env = {'token': 'd34db33f'};
16 }
17
18 function testPostData() {
19 assertEquals(
20 'token=d34db33f',
21 CS_postData({}));
22 assertEquals(
23 'token=d34db33f',
24 CS_postData({}, true));
25 assertEquals(
26 '',
27 CS_postData({}, false));
28 assertEquals(
29 'a=5&b=foo&token=d34db33f',
30 CS_postData({a: 5, b: 'foo'}));
31
32 var unescaped = {};
33 unescaped['f oo?'] = 'b&ar';
34 assertEquals(
35 'f%20oo%3F=b%26ar',
36 CS_postData(unescaped, false));
37 }
OLDNEW
« no previous file with comments | « appengine/monorail/static/js/framework/framework-ajax.js ('k') | appengine/monorail/static/js/framework/framework-cues.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698