Index: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/test/AbstractDartCoreTest.java |
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/AbstractDartTest.java b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/test/AbstractDartCoreTest.java |
similarity index 86% |
copy from editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/AbstractDartTest.java |
copy to editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/test/AbstractDartCoreTest.java |
index 68c9064c7607bf60989682adda5c4b22f82bcc85..6d99a47fc636ec8ce9e72d174737db9a378cd35b 100644 |
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/AbstractDartTest.java |
+++ b/editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/test/AbstractDartCoreTest.java |
@@ -11,7 +11,7 @@ |
* or implied. See the License for the specific language governing permissions and limitations under |
* the License. |
*/ |
-package com.google.dart.tools.ui.refactoring; |
+package com.google.dart.tools.core.test; |
import com.google.common.base.Joiner; |
import com.google.common.base.Splitter; |
@@ -24,8 +24,6 @@ import com.google.dart.tools.core.test.util.TestUtilities; |
import junit.framework.TestCase; |
-import org.eclipse.swt.widgets.Display; |
- |
import static org.fest.assertions.Assertions.assertThat; |
import java.util.concurrent.atomic.AtomicReference; |
@@ -33,13 +31,11 @@ import java.util.concurrent.atomic.AtomicReference; |
/** |
* Abstract base for any Dart test which uses {@link TestProject}. |
*/ |
-public abstract class AbstractDartTest extends TestCase { |
+public abstract class AbstractDartCoreTest extends TestCase { |
/** |
* @return {@link DartNode} which has required offset and type. |
*/ |
- public static <E extends DartNode> E findNode( |
- DartNode root, |
- final int offset, |
+ public static <E extends DartNode> E findNode(DartNode root, final int offset, |
final Class<E> clazz) { |
final AtomicReference<E> result = new AtomicReference<E>(); |
root.accept(new ASTVisitor<Void>() { |
@@ -56,31 +52,6 @@ public abstract class AbstractDartTest extends TestCase { |
} |
/** |
- * Waits given number of milliseconds and runs events loop every 1 millisecond. At least one |
- * events loop will be executed. |
- */ |
- public static void waitEventLoop(int time) { |
- waitEventLoop(time, 0); |
- } |
- |
- /** |
- * Waits given number of milliseconds and runs events loop every <code>sleepMillis</code> |
- * milliseconds. At least one events loop will be executed. |
- */ |
- public static void waitEventLoop(int time, long sleepMillis) { |
- long start = System.currentTimeMillis(); |
- do { |
- try { |
- Thread.sleep(sleepMillis); |
- } catch (Throwable e) { |
- } |
- while (Display.getCurrent().readAndDispatch()) { |
- // do nothing |
- } |
- } while (System.currentTimeMillis() - start < time); |
- } |
- |
- /** |
* Asserts that {@link CompilationUnit} has expected content. |
*/ |
protected static void assertUnitContent(CompilationUnit unit, String... lines) throws Exception { |