mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-17 22:34:43 +08: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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user