Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / custom / testutils.js
index d037e74..3b267c4 100644 (file)
@@ -34,8 +34,12 @@ if (!isParentFrame()) {
     };
 
     destroyContext = function () {
-        parent.document.querySelector('iframe').remove();
-        log('PASS destroyed context');
+        // This function can be called more than once so we need to check whether the iframe exists.
+        var frame = parent.document.querySelector('iframe');
+        if (frame) {
+            frame.remove();
+            log('PASS destroyed context');
+        }
     };
 }
 
@@ -48,7 +52,7 @@ withFrame = function (f) {
             testFailed(e);
         }
     };
-    frame.src = 'data:text/html,';
+    frame.src = 'about:blank';
     document.body.appendChild(frame);
 };