--- a/jdk/test/javax/script/NullUndefinedVarTest.java Sun Aug 17 17:02:04 2008 -0700
+++ b/jdk/test/javax/script/NullUndefinedVarTest.java Mon Aug 18 15:28:54 2008 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6346732
+ * @bug 6346732 6705893
* @summary should be able to assign null and undefined
* value to JavaScript global variables.
*/
@@ -34,9 +34,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;
}
jsengine.eval("var n = null; " +
"if (n !== null) throw 'expecting null';" +