Author: yradtsevich
Date: 2011-06-03 15:18:57 -0400 (Fri, 03 Jun 2011)
New Revision: 31826
Added:
branches/jbosstools-3.2.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/Nullplugin_JBIDE8792.java
Modified:
branches/jbosstools-3.2.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java
Log:
https://issues.jboss.org/browse/JBIDE-8792 : Install flash plugin message appears in VPE
if on page used flash references
- added JUnit to check that there is no nullplugin in the XULRunner
Added:
branches/jbosstools-3.2.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/Nullplugin_JBIDE8792.java
===================================================================
---
branches/jbosstools-3.2.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/Nullplugin_JBIDE8792.java
(rev 0)
+++
branches/jbosstools-3.2.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/Nullplugin_JBIDE8792.java 2011-06-03
19:18:57 UTC (rev 31826)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.xulrunner.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser;
+import org.osgi.framework.Bundle;
+
+/**
+ * Check that there is no nullplugin in the XULRunner bundle.
+ * <p>
+ * The nullplugin is the default plug-in for Adobe Flash. The
+ * presence of it is undesirable for VPE, because it shows annoying
+ * message suggesting to download Adobe Flash plugin.
+ *
+ * @see <a
href="https://issues.jboss.org/browse/JBIDE-8792">JBIDE-8792...
+ * @author Yahor Radtsevich
+ */
+public class Nullplugin_JBIDE8792 extends TestCase {
+ public void testNullplugin() {
+ Bundle xulRunnerBundle = Platform.getBundle(XulRunnerBrowser.getXulRunnerBundle());
+ assertTrue("Nullplugin is found, but it should not be there.",
+ xulRunnerBundle.getResource("xulrunner/plugins/libnullplugin.so") == null
&&
+ xulRunnerBundle.getResource("xulrunner/plugins/npnul32.dll") == null);
+ }
+}
Modified:
branches/jbosstools-3.2.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java
===================================================================
---
branches/jbosstools-3.2.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java 2011-06-03
19:07:02 UTC (rev 31825)
+++
branches/jbosstools-3.2.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java 2011-06-03
19:18:57 UTC (rev 31826)
@@ -19,6 +19,7 @@
suite.addTestSuite(XulRunnerBrowserTest.class);
suite.addTestSuite(DOMCreatingTest.class);
suite.addTestSuite(XPCOMTest.class);
+ suite.addTestSuite(Nullplugin_JBIDE8792.class);
return suite;
}
}