From dd99cac73f34d36d22f5f3fe1af6ef8f48055b34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Leif=20=C3=85strand?= Date: Mon, 2 Jan 2012 14:26:39 +0200 Subject: [PATCH] #8190 Recorder no longer waits for Vaadin application to load --- WebContent/VAADIN/vaadinBootstrap.js | 9 +++++++++ .../terminal/gwt/client/ApplicationConnection.java | 7 +++---- 2 files changed, 12 insertions(+), 4 deletions(-) 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."); -- 2.39.5