From b8d20082bbb0563397c5d00fa114e824511c3afa Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 15 Apr 2010 00:00:00 -0400 Subject: [PATCH] make parser unit tests more the same, add doc.body.removeChild(iframe) when done, to my recently added tests --- specs/parser/spec.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/specs/parser/spec.js b/specs/parser/spec.js index 42f411bd..96bd5a57 100644 --- a/specs/parser/spec.js +++ b/specs/parser/spec.js @@ -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'); @@ -195,7 +194,6 @@ test('HTMLParser.parseDocument / simple content', function(){ doc.write("

this is a pig

"); doc.close(); stop(); - }); test('HTMLParser.parseDocument / malformed content', function(){ @@ -224,9 +222,6 @@ test('HTMLParser.parseDocument / malformed content', function(){ }); - - - /** * Test that image loading works in various contexts * @@ -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); @@ -352,6 +349,7 @@ test('Link Loading', function(){ */ equals(counter, 4, "Link *not* fired during appendChild"); + document.body.removeChild(iframe); start(); }, false);