aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/scenario/Application.js1
-rw-r--r--test/scenario/ApplicationSpec.js12
2 files changed, 7 insertions, 6 deletions
diff --git a/src/scenario/Application.js b/src/scenario/Application.js
index c94581e2..28561ed3 100644
--- a/src/scenario/Application.js
+++ b/src/scenario/Application.js
@@ -57,7 +57,6 @@ angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorF
frame.attr('src', url);
this.executeAction(loadFn);
} else {
- frame.css('display', 'none').attr('src', 'about:blank');
frame.remove();
this.context.find('#test-frames').append('<iframe>');
frame = this.getFrame_();
diff --git a/test/scenario/ApplicationSpec.js b/test/scenario/ApplicationSpec.js
index 673a328f..1cab11ec 100644
--- a/test/scenario/ApplicationSpec.js
+++ b/test/scenario/ApplicationSpec.js
@@ -79,14 +79,16 @@ describe('angular.scenario.Application', function() {
expect(called).toBeTruthy();
});
- it('should hide old iframes and navigate to about:blank', function() {
+ it('should remove old iframes', function() {
app.navigateTo('http://localhost/#foo');
+ frames.find('iframe')[0].id = 'test';
+
app.navigateTo('http://localhost/#bar');
var iframes = frames.find('iframe');
- expect(iframes.length).toEqual(2);
- expect(iframes[0].src).toEqual('about:blank');
- expect(iframes[1].src).toEqual('http://localhost/#bar');
- expect(_jQuery(iframes[0]).css('display')).toEqual('none');
+
+ expect(iframes.length).toEqual(1);
+ expect(iframes[0].src).toEqual('http://localhost/#bar');
+ expect(iframes[0].id).toBeFalsy();
});
it('should URL update description bar', function() {