aboutsummaryrefslogtreecommitdiffstats
path: root/test/BrowserTest.js
diff options
context:
space:
mode:
authorMisko Hevery2010-04-03 17:04:36 -0700
committerMisko Hevery2010-04-03 17:04:36 -0700
commita80a61839a66d244c8bb14bbe2975746e02516c8 (patch)
tree5a7b4d9d3e2a7a15ebf55e068782fbf2aa4ac6bf /test/BrowserTest.js
parent35ca4fcb9c49e505e28669e951e01ddedb01d7db (diff)
downloadangular.js-a80a61839a66d244c8bb14bbe2975746e02516c8.tar.bz2
injection is now working
Diffstat (limited to 'test/BrowserTest.js')
-rw-r--r--test/BrowserTest.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/BrowserTest.js b/test/BrowserTest.js
new file mode 100644
index 00000000..2e630172
--- /dev/null
+++ b/test/BrowserTest.js
@@ -0,0 +1,25 @@
+BrowserTest = TestCase('BrowserTest');
+
+BrowserTest.prototype.testUrlWatcher = function () {
+ expectAsserts(2);
+ var location = {href:"http://server", hash:""};
+ var watcher = new Browser(location);
+ watcher.delay = 1;
+ watcher.watchUrl(function(url){
+ assertEquals('http://getangular.test', url);
+ });
+ watcher.setTimeout = function(fn, delay){
+ assertEquals(1, delay);
+ location.href = "http://getangular.test";
+ watcher.setTimeout = function(fn, delay) {
+ };
+ fn();
+ };
+ watcher.startUrlWatcher();
+};
+
+FunctionTest = TestCase("FunctionTest");
+
+FunctionTest.prototype.testEscapeHtml = function () {
+ assertEquals("&lt;div&gt;&amp;amp;&lt;/div&gt;", escapeHtml('<div>&amp;</div>'));
+};