Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: third_party/closure_compiler/runner/test/com/google/javascript/jscomp/ChromePassTest.java

Issue 543863002: Typecheck chrome://bookmarks using Closure Compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: debug warns Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/closure_compiler/runner/src/com/google/javascript/jscomp/ChromePass.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/runner/test/com/google/javascript/jscomp/ChromePassTest.java
diff --git a/third_party/closure_compiler/runner/test/com/google/javascript/jscomp/ChromePassTest.java b/third_party/closure_compiler/runner/test/com/google/javascript/jscomp/ChromePassTest.java
index d6264c1ad06919f8b3c0c6ca0581bcaf7f493e58..830b9ba414499ec45fc260a6ab610876c841c568 100644
--- a/third_party/closure_compiler/runner/test/com/google/javascript/jscomp/ChromePassTest.java
+++ b/third_party/closure_compiler/runner/test/com/google/javascript/jscomp/ChromePassTest.java
@@ -192,6 +192,36 @@ 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 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" +
« no previous file with comments | « third_party/closure_compiler/runner/src/com/google/javascript/jscomp/ChromePass.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698