Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / closure_compiler / runner / test / com / google / javascript / jscomp / ChromePassTest.java
index d6264c1..df1d147 100644 (file)
@@ -192,6 +192,21 @@ public class ChromePassTest extends CompilerTestCase {
             "});\n");
     }
 
+    public void testCrDefineDoesNothingWithExportedNotAName() throws Exception {
+        test(
+            "cr.define('namespace', function() {\n" +
+            "  return {\n" +
+            "    a: 42\n" +
+            "  };\n" +
+            "});\n",
+            "var namespace = namespace || {};\n" +
+            "cr.define('namespace', function() {\n" +
+            "  return {\n" +
+            "    a: 42\n" +
+            "  };\n" +
+            "});\n");
+    }
+
     public void testCrDefineChangesReferenceToExportedFunction() throws Exception {
         test(
             "cr.define('namespace', function() {\n" +