Fix test for scenario.Application - should remove old iframe

This behavior was changed by e83465c362
So this commit should have been part of e83465c362

Also removed hiding and navigating to about:blank as it makes no sense now...
This commit is contained in:
Vojta Jina 2011-06-15 22:58:32 +02:00 committed by Igor Minar
parent 3c87611188
commit 7460a7ef61
2 changed files with 7 additions and 6 deletions

View file

@ -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_();

View file

@ -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() {