PPAPI: Make tests really delete the plugin on shutdown

The old code tried to set removePlugin on the plugin element itself. This ends
up calling HasProperty and SetProperty on the scriptable object (usually
MessageChannel's special forwarding NPObject, or the script object that the
test might provide). So it usually gets ignored, so isn't there when we try
to read it.

BUG=314212

Review URL: https://codereview.chromium.org/47873009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232599 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ppapi/tests/test_case.html b/ppapi/tests/test_case.html
index 9da9c7c..1552ae2a 100644
--- a/ppapi/tests/test_case.html
+++ b/ppapi/tests/test_case.html
@@ -13,7 +13,7 @@
 // passed, or information about the failure if the test(s) did not pass.
 function DidExecuteTests(result) {
   var plugin = document.getElementById("plugin");
-  if (plugin.removePlugin) {
+  if (plugin.parentNode.removePlugin) {
     plugin.parentNode.removeChild(plugin);
     plugin = undefined;
   }
@@ -127,7 +127,7 @@
 }
 
 function RemovePluginWhenFinished() {
-  window.document.getElementById("plugin").removePlugin = true;
+  window.document.getElementById("container").removePlugin = true;
 }
 
 function sendAutomationMessage(msg) {