]> source.dussan.org Git - vaadin-framework.git/commitdiff
#8190 Recorder no longer waits for Vaadin application to load
authorLeif Åstrand <leif@vaadin.com>
Mon, 2 Jan 2012 12:26:39 +0000 (14:26 +0200)
committerLeif Åstrand <leif@vaadin.com>
Mon, 2 Jan 2012 12:26:39 +0000 (14:26 +0200)
WebContent/VAADIN/vaadinBootstrap.js
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java

index f8eedb8fd1395bb373cb4b7ee32742751830953c..6adcb86c99c01065d1c82c4bb0b7cd74160a6acf 100644 (file)
                                throw "Application " + appId + " already initialized";
                        }
                        log("init application", appId, config);
+                       
+                       var testbenchId = appId.replace(/-\d+$/, '');
+                       window.vaadin.clients[testbenchId] = {
+                                       isActive: function() {
+                                               return true;
+                                       }
+                       }
+                       
                        var getConfig = function(name) {
                                var value = config[name];
                                if (value === undefined) {
                        
                        return app;
                },
+               clients: {},
                getApp: function(appId) {
                        var app = apps[appId]; 
                        return app;
index 3816a4e933a914f4284a4ff2e464ad46a8ad7e50..109f63964f7ecf0c158e973de00d249ff5b23ad8 100644 (file)
@@ -227,10 +227,6 @@ public class ApplicationConnection {
                return componentLocator.@com.vaadin.terminal.gwt.client.ComponentLocator::getPathForElement(Lcom/google/gwt/user/client/Element;)(element);
        }
 
-       if (!$wnd.vaadin.clients) {
-               $wnd.vaadin.clients = {};
-       }
-
        $wnd.vaadin.clients[TTAppId] = client;
     }-*/;
 
@@ -626,6 +622,9 @@ public class ApplicationConnection {
             cssWaits++;
         } else {
             cssLoaded = true;
+
+            // Update counter so TestBench knows something is going on
+            incrementActiveRequests();
             handleReceivedJSONMessage(new Date(), jsonText, json);
             if (cssWaits >= MAX_CSS_WAITS) {
                 VConsole.error("CSS files may have not loaded properly.");