aboutsummaryrefslogtreecommitdiffstats
path: root/test/BrowserSpecs.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/BrowserSpecs.js')
-rw-r--r--test/BrowserSpecs.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/BrowserSpecs.js b/test/BrowserSpecs.js
index 6951783b..3b5a9ba0 100644
--- a/test/BrowserSpecs.js
+++ b/test/BrowserSpecs.js
@@ -85,12 +85,16 @@ describe('browser', function(){
browser.notifyWhenNoOutstandingRequests(callback);
expect(callback).not.wasCalled();
expect(scripts.length).toEqual(1);
- var url = scripts[0].src.split('?cb=');
+ var script = scripts[0];
+ script.remove = function(){
+ log += 'remove();';
+ };
+ var url = script.attr('src').split('?cb=');
expect(url[0]).toEqual('http://example.org/path');
expect(typeof fakeWindow[url[1]]).toEqual($function);
fakeWindow[url[1]]('data');
expect(callback).wasCalled();
- expect(log).toEqual('200:data;');
+ expect(log).toEqual('remove();200:data;');
expect(typeof fakeWindow[url[1]]).toEqual('undefined');
});
});