From: Leif Åstrand Date: Mon, 2 Jan 2012 12:26:39 +0000 (+0200) Subject: #8190 Recorder no longer waits for Vaadin application to load X-Git-Tag: 7.0.0.alpha2~541^2~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dd99cac73f34d36d22f5f3fe1af6ef8f48055b34;p=vaadin-framework.git #8190 Recorder no longer waits for Vaadin application to load --- diff --git a/WebContent/VAADIN/vaadinBootstrap.js b/WebContent/VAADIN/vaadinBootstrap.js index f8eedb8fd1..6adcb86c99 100644 --- a/WebContent/VAADIN/vaadinBootstrap.js +++ b/WebContent/VAADIN/vaadinBootstrap.js @@ -72,6 +72,14 @@ 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) { @@ -176,6 +184,7 @@ return app; }, + clients: {}, getApp: function(appId) { var app = apps[appId]; return app; diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index 3816a4e933..109f63964f 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@ -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.");