Skip to content

Commit 7460a7e

Browse files
vojtajinaIgorMinar
authored andcommitted
Fix test for scenario.Application - should remove old iframe
This behavior was changed by e83465c So this commit should have been part of e83465c Also removed hiding and navigating to about:blank as it makes no sense now...
1 parent 3c87611 commit 7460a7e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/scenario/Application.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorF
5757
frame.attr('src', url);
5858
this.executeAction(loadFn);
5959
} else {
60-
frame.css('display', 'none').attr('src', 'about:blank');
6160
frame.remove();
6261
this.context.find('#test-frames').append('<iframe>');
6362
frame = this.getFrame_();

test/scenario/ApplicationSpec.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,16 @@ describe('angular.scenario.Application', function() {
7979
expect(called).toBeTruthy();
8080
});
8181

82-
it('should hide old iframes and navigate to about:blank', function() {
82+
it('should remove old iframes', function() {
8383
app.navigateTo('http://localhost/#foo');
84+
frames.find('iframe')[0].id = 'test';
85+
8486
app.navigateTo('http://localhost/#bar');
8587
var iframes = frames.find('iframe');
86-
expect(iframes.length).toEqual(2);
87-
expect(iframes[0].src).toEqual('about:blank');
88-
expect(iframes[1].src).toEqual('http://localhost/#bar');
89-
expect(_jQuery(iframes[0]).css('display')).toEqual('none');
88+
89+
expect(iframes.length).toEqual(1);
90+
expect(iframes[0].src).toEqual('http://localhost/#bar');
91+
expect(iframes[0].id).toBeFalsy();
9092
});
9193

9294
it('should URL update description bar', function() {

0 commit comments

Comments
 (0)