Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src-framework/com/google/dart/ui/test/driver/ShellClosedOperation.java

Issue 18548007: UI tests for 'Rename' and 'Extract Local Variable' refactorings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui_test/src-framework/com/google/dart/ui/test/driver/ShellClosedOperation.java
diff --git a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/refactoring/NullProgressMonitor.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src-framework/com/google/dart/ui/test/driver/ShellClosedOperation.java
similarity index 53%
copy from editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/refactoring/NullProgressMonitor.java
copy to editor/tools/plugins/com.google.dart.tools.ui_test/src-framework/com/google/dart/ui/test/driver/ShellClosedOperation.java
index 8262ac0b1df93e5efd1186a894040a3ad6960346..78d451e4ebb207cf2e0bb055b0eb0a9d169424d6 100644
--- a/editor/tools/plugins/com.google.dart.engine.services/src/com/google/dart/engine/services/refactoring/NullProgressMonitor.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src-framework/com/google/dart/ui/test/driver/ShellClosedOperation.java
@@ -11,39 +11,29 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
+package com.google.dart.ui.test.driver;
-package com.google.dart.engine.services.refactoring;
+import com.google.dart.ui.test.util.UiContext;
+
+import org.eclipse.swt.widgets.Shell;
/**
- * {@link ProgressMonitor} which ignores interactions.
+ * The {@link Operation} that waits for the {@link Shell} closing.
*/
-public class NullProgressMonitor implements ProgressMonitor {
- @Override
- public void beginTask(String name, int totalWork) {
- }
+public class ShellClosedOperation extends Operation {
+ private final String shellText;
- @Override
- public void done() {
- }
-
- @Override
- public void internalWorked(double work) {
- }
-
- @Override
- public boolean isCanceled() {
- return false;
- }
-
- @Override
- public void setCanceled() {
+ public ShellClosedOperation(String shellText) {
+ this.shellText = shellText;
}
@Override
- public void subTask(String name) {
+ public boolean isReady(UiContext context) throws Exception {
+ Shell shell = context.findShell(shellText);
+ return shell == null || shell.isDisposed();
}
@Override
- public void worked(int work) {
+ public void run(UiContext context) throws Exception {
}
}

Powered by Google App Engine
This is Rietveld 408576698