import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.Window;
import com.vaadin.terminal.gwt.client.ui.VUnknownComponent;
public class ApplicationConfiguration implements EntryPoint {
*
* @return true if client side is currently been debugged
*/
- public native static boolean isDebugMode()
+ public static boolean isDebugMode() {
+ return isDebugAvailable()
+ && Window.Location.getParameter("debug") != null;
+ }
+
+ private native static boolean isDebugAvailable()
/*-{
if($wnd.vaadin.debug) {
- var parameters = $wnd.location.search;
- var re = /debug[^\/]*$/;
- return re.test(parameters);
+ return true;
} else {
return false;
}
*
* @return <code>true</code> if debug logging should be quiet
*/
- public native static boolean isQuietDebugMode()
- /*-{
- var uri = $wnd.location;
- var re = /debug=q[^\/]*$/;
- return re.test(uri);
- }-*/;
+ public static boolean isQuietDebugMode() {
+ String debugParameter = Window.Location.getParameter("debug");
+ return isDebugAvailable() && debugParameter != null
+ && debugParameter.startsWith("q");
+ }
}
</thead><tbody>
<tr>
<td>open</td>
- <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug</td>
+ <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug&otherparam</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementPresent</td>
+ <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.debug.DebugWindowPresent?debug&restartApplication</td>
<td></td>
</tr>
<tr>
<td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td>
<td></td>
</tr>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&mode=debug</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.debug.DebugWindowPresent?nodebug&restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&nodebug</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug=quiet</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.debug.DebugWindowPresent?debug=quiet&restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.debug.DebugWindowPresent?restartApplication&debug=quiet#/asdf</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestsdebugDebugWindowPresent::Root/VDebugConsole[0]</td>
+ <td></td>
+</tr>
</tbody></table>
</body>
</html>