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

Unified Diff: remoting/webapp/unittests/base_unittest.js

Issue 503063004: Hangouts Remote Desktop Part VI - Show confirm dialog before retrieving access code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: remoting/webapp/unittests/base_unittest.js
diff --git a/remoting/webapp/unittests/base_unittest.js b/remoting/webapp/unittests/base_unittest.js
index c36c6acad4254dca35fcf7affb8194799e603138..3b6f2772ee042b7f3f7e3d3a8f2a22694280a67e 100644
--- a/remoting/webapp/unittests/base_unittest.js
+++ b/remoting/webapp/unittests/base_unittest.js
@@ -75,6 +75,12 @@ test('urljoin(url, opt_param) should urlencode |opt_param|',
'&escapist=%3A%2F%3F%23%5B%5D%40%24%26%2B%2C%3B%3D');
});
+test('escapeHTML(str) should escape special characters', function() {
+ QUnit.equal(
+ base.escapeHTML('<script>alert("hello")</script>'),
+ '&lt;script&gt;alert("hello")&lt;/script&gt;');
+});
+
QUnit.asyncTest('Promise.sleep(delay) should fulfill the promise after |delay|',
function() {
var isCalled = false;

Powered by Google App Engine
This is Rietveld 408576698