Reviewers: bobv, Description: This patch adds a test for AsyncFragmentLoader. It pokes the loader with different sequences of runAsync requests, load success events, and load failed events, and makes sure that the correct fragments are requested in the correct order.
To make it work, AsyncFragmentLoader itself was modified in a few ways: 1. Its state is now all instance state. One instance is stored in the static field BROWSER_LOADER for use by the browser. 2. All JSNI browser-interop is moved behind interfaces that can be stubbed out for testing. Specifically, there is now a LoadingStrategy and a Logger inerface. 3. Removes the use of JsArray in favor of a simple JUnit-friendly int-queue class. Please review this at http://gwt-code-reviews.appspot.com/47806 Affected files: dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter.java dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java dev/core/src/com/google/gwt/dev/jjs/impl/FragmentExtractor.java dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java dev/core/src/com/google/gwt/dev/jjs/impl/JavaToJavaScriptMap.java dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java user/src/com/google/gwt/core/client/impl/AsyncFragmentLoader.java user/test/com/google/gwt/core/CoreSuite.java user/test/com/google/gwt/core/client/impl/AsyncFragmentLoaderTest.java --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
