| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 302 |
| 303 test("parseJSONP", 6, function() { | 303 test("parseJSONP", 6, function() { |
| 304 deepEqual(base.parseJSONP(""), {}); | 304 deepEqual(base.parseJSONP(""), {}); |
| 305 deepEqual(base.parseJSONP('p({"key": "value"})'), {"key": "value"}); | 305 deepEqual(base.parseJSONP('p({"key": "value"})'), {"key": "value"}); |
| 306 deepEqual(base.parseJSONP('ADD_RESULTS({"dummy":"data"});'), {"dummy":"data"
}); | 306 deepEqual(base.parseJSONP('ADD_RESULTS({"dummy":"data"});'), {"dummy":"data"
}); |
| 307 deepEqual(base.parseJSONP('{"dummy":"data"}'), {"dummy":"data"}); | 307 deepEqual(base.parseJSONP('{"dummy":"data"}'), {"dummy":"data"}); |
| 308 deepEqual(base.parseJSONP('ADD_RESULTS({"builder(1)":"data"});'), {"builder(
1)":"data"}); | 308 deepEqual(base.parseJSONP('ADD_RESULTS({"builder(1)":"data"});'), {"builder(
1)":"data"}); |
| 309 deepEqual(base.parseJSONP('{"builder(1)":"data"}'), {"builder(1)":"data"}); | 309 deepEqual(base.parseJSONP('{"builder(1)":"data"}'), {"builder(1)":"data"}); |
| 310 }); | 310 }); |
| 311 | 311 |
| 312 test("base.queryParam", 2, function() { |
| 313 equal(base.queryParam({}), ''); |
| 314 equal(base.queryParam({ |
| 315 'foo bar': 'bar baz', |
| 316 '1 2': '3 4', |
| 317 }), 'foo+bar=bar+baz&1+2=3+4'); |
| 318 }); |
| 319 |
| 312 })(); | 320 })(); |
| OLD | NEW |