mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
Fix test for scenario.Application - should remove old iframe
This behavior was changed bye83465c362So this commit should have been part ofe83465c362Also removed hiding and navigating to about:blank as it makes no sense now...
This commit is contained in:
parent
3c87611188
commit
7460a7ef61
2 changed files with 7 additions and 6 deletions
|
|
@ -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_();
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue