6705893: javax.script tests should not require a js engine on OpenJDK
Summary: Fixed the tests to pass with open JDK.
Reviewed-by: darcy
diff --git a/test/javax/script/E4XErrorTest.java b/test/javax/script/E4XErrorTest.java
index 5936fd4..11aa5f0 100644
--- a/test/javax/script/E4XErrorTest.java
+++ b/test/javax/script/E4XErrorTest.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6346734
+ * @bug 6346734 6705893
  * @summary We do *not* support E4X (ECMAScript for XML) in our
  * implementation. We want to throw error on XML literals
  * as early as possible rather than at "runtime" - i.e., when
@@ -37,9 +37,10 @@
 
         public static void main(String[] args) throws Exception {
             ScriptEngineManager manager = new ScriptEngineManager();
-            ScriptEngine jsengine = manager.getEngineByName("js");
+            ScriptEngine jsengine = Helper.getJsEngine(manager);
             if (jsengine == null) {
-                throw new RuntimeException("no js engine found");
+                System.out.println("Warning: No js engine found; test vacuously passes.");
+                return;
             }
 
             // The test below depends on the error message content