Skip to content

Commit

Permalink
make parser unit tests more the same, add doc.body.removeChild(iframe…
Browse files Browse the repository at this point in the history
…) when done, to my recently added tests
  • Loading branch information
client9 committed Apr 15, 2010
1 parent 103c68c commit b8d2008
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions specs/parser/spec.js
Expand Up @@ -178,7 +178,6 @@ test('HTMLParser.parseDocument / simple content', function(){
expect(4);
var iframe = document.createElement("iframe");
document.body.appendChild(iframe);

iframe.addEventListener('load', function(){
var doc;
ok(true, 'frame loaded');
Expand All @@ -195,7 +194,6 @@ test('HTMLParser.parseDocument / simple content', function(){
doc.write("<body><p id='p1'>this is a pig</p></body>");
doc.close();
stop();

});

test('HTMLParser.parseDocument / malformed content', function(){
Expand Down Expand Up @@ -224,9 +222,6 @@ test('HTMLParser.parseDocument / malformed content', function(){

});




/**
* Test that image loading works in various contexts
*
Expand Down Expand Up @@ -282,6 +277,8 @@ test('Image Loading', function(){
// appendChild does not fire again (since we fired already)
doc.body.appendChild(img);
equals(counter, 5, "appendChild(img) does *not* fire");

document.body.removeChild(iframe);
start();
}, false);

Expand Down Expand Up @@ -352,6 +349,7 @@ test('Link Loading', function(){
*/
equals(counter, 4, "Link *not* fired during appendChild");

document.body.removeChild(iframe);
start();
}, false);

Expand Down

0 comments on commit b8d2008

Please sign in to comment.