Fix test failure caused by updating Closure Compiler to v20160315
commit 1ed44cd59396de48b6915416466dce2db3e3c8bc
(change I94354fe3311e0bafb469f5a4273b2698cc19eace) caused test
failures. This commit fixed the hard-coded list of Closure Compiler
externs and added the dependency on Gson.
Change-Id: I8a2ee50f1cd2a150623d2a554a5769f7eff6b57b
diff --git a/dev/build.xml b/dev/build.xml
index f1af6a0..b9c8449 100755
--- a/dev/build.xml
+++ b/dev/build.xml
@@ -69,6 +69,7 @@
<include name="guava/guava-18.0/guava-18.0-rebased.jar"/>
<include name="icu4j/50.1.1/icu4j.jar"/>
<include name="jetty/jetty-9.2.14.v20151106/jetty-all-9.2.14.v20151106.jar"/>
+ <include name="gson/gson-2.6.2.jar"/>
<include name="jscomp/20160315/compiler-rebased.jar"/>
<include name="jscomp/20160315/sourcemap-rebased.jar"/>
<include name="jsr305/jsr305.jar"/>
@@ -122,6 +123,7 @@
<zipfileset src="${gwt.tools.lib}/icu4j/50.1.1/icu4j.jar"/>
<zipfileset
src="${gwt.tools.lib}/jetty/jetty-9.2.14.v20151106/jetty-all-9.2.14.v20151106.jar"/>
+ <zipfileset src="${gwt.tools.lib}/gson/gson-2.6.2.jar"/>
<zipfileset src="${gwt.tools.lib}/jscomp/20160315/compiler-rebased.jar"/>
<zipfileset src="${gwt.tools.lib}/jscomp/20160315/sourcemap-rebased.jar"/>
<zipfileset src="${gwt.tools.lib}/jsr305/jsr305.jar"/>
@@ -206,6 +208,7 @@
location="${gwt.tools.lib}/eclipse/jdtCompilerAdapter_3.11.2-CUSTOM-GWT-2.8-20160205.jar"/>
<pathelement
location="${gwt.tools.lib}/guava/guava-18.0/guava-18.0-rebased.jar"/>
+ <pathelement location="${gwt.tools.lib}/gson/gson-2.6.2.jar"/>
<pathelement location="${gwt.tools.lib}/jscomp/20160315/compiler-rebased.jar"/>
<pathelement location="${gwt.tools.lib}/jscomp/20160315/sourcemap-rebased.jar"/>
<pathelement location="${gwt.tools.lib}/json/android-sdk-19.1/json-android-rebased.jar"/>
diff --git a/dev/core/src/com/google/gwt/dev/js/ClosureJsRunner.java b/dev/core/src/com/google/gwt/dev/js/ClosureJsRunner.java
index 01a6f0d..b932ac6 100644
--- a/dev/core/src/com/google/gwt/dev/js/ClosureJsRunner.java
+++ b/dev/core/src/com/google/gwt/dev/js/ClosureJsRunner.java
@@ -67,33 +67,70 @@
// JS externs
"es3.js",
"es5.js",
+ "es6.js",
+ "es6_collections.js",
// Event APIs
- "w3c_event.js", "w3c_event3.js", "w3c_device_sensor_event.js",
"gecko_event.js",
"ie_event.js",
+ "w3c_device_sensor_event.js",
+ "w3c_event.js",
+ "w3c_event3.js",
+ "w3c_touch_event.js",
"webkit_event.js",
// DOM apis
- "w3c_dom1.js", "w3c_dom2.js", "w3c_dom3.js",
"gecko_dom.js",
"ie_dom.js",
+ "w3c_dom1.js",
+ "w3c_dom2.js",
+ "w3c_dom3.js",
"webkit_dom.js",
// CSS apis
- "w3c_css.js",
"gecko_css.js",
"ie_css.js",
+ "w3c_css.js",
"webkit_css.js",
// Top-level namespaces
- "chrome.js", "google.js",
+ "chrome.js",
+ "google.js",
- "deprecated.js", "fileapi.js", "flash.js", "gears_symbols.js", "gears_types.js",
- "gecko_xml.js", "html5.js", "ie_vml.js", "iphone.js", "webstorage.js", "w3c_anim_timing.js",
- "w3c_css3d.js", "w3c_elementtraversal.js", "w3c_geolocation.js", "w3c_indexeddb.js",
- "w3c_navigation_timing.js", "w3c_range.js", "w3c_selectors.js", "w3c_xml.js", "window.js",
- "webkit_notifications.js", "webgl.js");
+ // Miscellaneous
+ "deprecated.js",
+ "fetchapi.js",
+ "fileapi.js",
+ "flash.js",
+ "gecko_xml.js",
+ "html5.js",
+ "ie_vml.js",
+ "intl.js",
+ "iphone.js",
+ "mediasource.js",
+ "page_visibility.js",
+ "streamsapi.js",
+ "url.js",
+ "v8.js",
+ "w3c_anim_timing.js",
+ "w3c_audio.js",
+ "w3c_batterystatus.js",
+ "w3c_css3d.js",
+ "w3c_elementtraversal.js",
+ "w3c_geolocation.js",
+ "w3c_indexeddb.js",
+ "w3c_navigation_timing.js",
+ "w3c_range.js",
+ "w3c_rtc.js",
+ "w3c_selectors.js",
+ "w3c_serviceworker.js",
+ "w3c_webcrypto.js",
+ "w3c_xml.js",
+ "webstorage.js",
+ "webkit_notifications.js",
+ "webgl.js",
+ "whatwg_encoding.js",
+ "window.js");
/**
* @return a mutable list
diff --git a/dev/core/test/com/google/gwt/core/ext/linker/SourceMapTest.java b/dev/core/test/com/google/gwt/core/ext/linker/SourceMapTest.java
index 4af38e2..248ec65 100644
--- a/dev/core/test/com/google/gwt/core/ext/linker/SourceMapTest.java
+++ b/dev/core/test/com/google/gwt/core/ext/linker/SourceMapTest.java
@@ -15,6 +15,7 @@
*/
package com.google.gwt.core.ext.linker;
+import com.google.gson.JsonPrimitive;
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.core.ext.soyc.coderef.ClassDescriptor;
import com.google.gwt.core.ext.soyc.coderef.EntityDescriptor;
@@ -39,7 +40,6 @@
import junit.framework.TestCase;
import org.eclipse.jdt.internal.compiler.problem.ShouldNotImplement;
-
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
@@ -234,7 +234,8 @@
SourceMapConsumerV3 sourceMap = new SourceMapConsumerV3();
sourceMap.parse(stringContent(sourceMapFile));
if (firstIteration) {
- Integer permutationId = (Integer) sourceMap.getExtensions().get("x_gwt_permutation");
+ Integer permutationId =
+ ((JsonPrimitive) sourceMap.getExtensions().get("x_gwt_permutation")).getAsInt();
assertNotNull(permutationId);
mapping.put(permutationId, symbolTable);
firstIteration = false;
diff --git a/eclipse/dev/.classpath b/eclipse/dev/.classpath
index 1e421b3..57b1228 100644
--- a/eclipse/dev/.classpath
+++ b/eclipse/dev/.classpath
@@ -23,6 +23,7 @@
<classpathentry kind="var" path="GWT_TOOLS/lib/htmlunit/htmlunit-2.19/htmlunit-core-js-2.15.jar"/>
<classpathentry kind="var" path="GWT_TOOLS/lib/protobuf/protobuf-2.5.0/protobuf-java-rebased-2.5.0.jar"/>
<classpathentry kind="var" path="GWT_TOOLS/lib/guava/guava-18.0/guava-18.0-rebased.jar"/>
+ <classpathentry kind="var" path="GWT_TOOLS/lib/gson/gson-2.6.2.jar"/>
<classpathentry kind="var" path="GWT_TOOLS/lib/jscomp/20160315/sourcemap-rebased.jar"/>
<classpathentry kind="var" path="GWT_TOOLS/lib/jscomp/20160315/compiler-rebased.jar"/>
<classpathentry kind="var" path="GWT_TOOLS/lib/json/android-sdk-19.1/json-android-rebased.jar"/>
diff --git a/eclipse/dev/codeserver/.classpath b/eclipse/dev/codeserver/.classpath
index 34c26c9..b8d3580 100644
--- a/eclipse/dev/codeserver/.classpath
+++ b/eclipse/dev/codeserver/.classpath
@@ -4,6 +4,7 @@
<classpathentry kind="src" path="codeserver/javatests"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="GWT_TOOLS/lib/guava/guava-18.0/guava-18.0-rebased.jar"/>
+ <classpathentry kind="var" path="GWT_TOOLS/lib/gson-2.6.2.jar"/>
<classpathentry kind="var" path="GWT_TOOLS/lib/jscomp/20160315/sourcemap-rebased.jar"/>
<classpathentry kind="var" path="GWT_TOOLS/lib/jscomp/20160315/compiler-rebased.jar"/>
<classpathentry kind="var" path="GWT_TOOLS/lib/junit/junit-4.8.2.jar" sourcepath="/GWT_TOOLS/lib/junit/junit-4.8.2-src.zip"/>