diff options
author | Aparna Argade | 2018-10-19 14:16:39 +0000 |
---|---|---|
committer | Aparna Argade | 2018-10-19 14:35:28 +0000 |
commit | 1e677741bb91fc4be48737b6f9b8276cc3b8a672 (patch) | |
tree | 58dfae8a83915bb0409579998c1af9f739974439 | |
parent | ddc844af8170e80f3d8f641fe27c6be8b657117d (diff) | |
download | org.eclipse.swtbot-1e677741bb91fc4be48737b6f9b8276cc3b8a672.tar.gz org.eclipse.swtbot-1e677741bb91fc4be48737b6f9b8276cc3b8a672.tar.xz org.eclipse.swtbot-1e677741bb91fc4be48737b6f9b8276cc3b8a672.zip |
Bug 540314 - SWTBotBrowser should use syncExec instead of asyncExec
Use syncExec for back, forward, execute and refresh so that user will
get guaranteed changed state of widget when the call returns.
Change-Id: I2c1632a0dde904c1b678c5d63897cd99b67f1600
Signed-off-by: Aparna Argade <aprsac@yahoo.com>
-rw-r--r-- | org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/widgets/SWTBotBrowser.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/widgets/SWTBotBrowser.java b/org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/widgets/SWTBotBrowser.java index 3bed16f6..c4bcabfa 100644 --- a/org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/widgets/SWTBotBrowser.java +++ b/org.eclipse.swtbot.swt.finder/src/org/eclipse/swtbot/swt/finder/widgets/SWTBotBrowser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Red Hat, Inc. and others. + * Copyright (c) 2010, 2018 Red Hat, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -102,13 +102,13 @@ public class SWTBotBrowser extends AbstractSWTBotControl<Browser> { } /** - * Executes script in browser asynchronously - * + * Executes script in browser synchronously + * * @param script */ public void execute(final String script) { waitForPageLoaded(); - UIThreadRunnable.asyncExec(new VoidResult() { + UIThreadRunnable.syncExec(new VoidResult() { @Override public void run() { widget.execute(script); @@ -144,7 +144,7 @@ public class SWTBotBrowser extends AbstractSWTBotControl<Browser> { * Navigate to the previous session history item. */ public void back() { - UIThreadRunnable.asyncExec(new VoidResult() { + UIThreadRunnable.syncExec(new VoidResult() { @Override public void run() { progressListener.setDone(false); @@ -163,7 +163,7 @@ public class SWTBotBrowser extends AbstractSWTBotControl<Browser> { * Navigate to the next session history item. */ public void forward() { - UIThreadRunnable.asyncExec(new VoidResult() { + UIThreadRunnable.syncExec(new VoidResult() { @Override public void run() { progressListener.setDone(false); @@ -182,7 +182,7 @@ public class SWTBotBrowser extends AbstractSWTBotControl<Browser> { * Refreshes browser */ public void refresh() { - UIThreadRunnable.asyncExec(new VoidResult() { + UIThreadRunnable.syncExec(new VoidResult() { @Override public void run() { widget.refresh(); |