Index: remoting/webapp/unittests/base_unittest.js |
diff --git a/remoting/webapp/unittests/base_unittest.js b/remoting/webapp/unittests/base_unittest.js |
index d021a809b20a35d2eceae7700c51d6ff1dcb97d8..3836cd1b5e367405dfb310e6dbd2f79a2e1b633f 100644 |
--- a/remoting/webapp/unittests/base_unittest.js |
+++ b/remoting/webapp/unittests/base_unittest.js |
@@ -56,6 +56,21 @@ test('dispose(obj) should not crash if |obj| is null', |
base.dispose(null); |
}); |
+test('urljoin(url, opt_param) should return url if |opt_param| is missing', |
+ function() { |
+ QUnit.equal( |
+ base.urlJoin('http://www.chromium.org'), 'http://www.chromium.org'); |
+}); |
+ |
+test('urljoin(url, opt_param) should urlencode |opt_param|', |
+ function() { |
+ var result = base.urlJoin('http://www.chromium.org', { |
+ a: 'a', |
+ foo: 'foo=' |
Jamie
2014/08/12 20:42:55
Can you add a few more escape-requiring characters
kelvinp
2014/08/12 21:42:43
Done.
|
+ }); |
+ QUnit.equal(result, 'http://www.chromium.org?a=a&foo=foo%3D'); |
+}); |
+ |
QUnit.asyncTest('Promise.sleep(delay) should fulfill the promise after |delay|', |
function() { |
var isCalled = false; |