Fix plugin test suite

Change-Id: Idbbcab85f0371e798fa7fe56d6a84fd65a86a9cd
diff --git a/dev/js/src/view.js b/dev/js/src/view.js
index aabad29..2f35c9e 100644
--- a/dev/js/src/view.js
+++ b/dev/js/src/view.js
@@ -80,7 +80,9 @@
      */
     close : function () {
       var e = this.element();
-      e.parentNode.removeChild(e);
+      if (e.parentNode) {
+        e.parentNode.removeChild(e);
+      };
       this.panel.delView(this);
       this._shown = false;
       if (this.onClose)