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

Unified Diff: tests/try/web/test_case.dart

Issue 2232273004: Delete site/try (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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: tests/try/web/test_case.dart
diff --git a/tests/try/web/test_case.dart b/tests/try/web/test_case.dart
deleted file mode 100644
index 56e1157492815f3ce56bd5bdef896d574509731f..0000000000000000000000000000000000000000
--- a/tests/try/web/test_case.dart
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library trydart.test_case;
-
-import 'dart:html' show
- document;
-
-import 'dart:async';
-
-import 'package:async_helper/async_helper.dart';
-
-typedef void VoidFunction();
-
-class TestCase {
- final String description;
- final VoidFunction setup;
- final VoidFunction validate;
-
- TestCase(this.description, this.setup, this.validate);
-}
-
-/**
- * Executes [tests] each test in order using the following approach for each
- * test:
- *
- * 1. Run setup synchronously.
- *
- * 2. Schedule a new (async) Future which runs validate followed by the next
- * test's setup.
- *
- * 3. Repeat step 2 until there are no more tests.
- *
- * The purpose of this test is to simulate edits (during setup), and then let
- * the mutation observer to process the mutations followed by validation.
- */
-void runTests(List<TestCase> tests) {
- Completer completer = new Completer();
- asyncTest(() => completer.future.then((_) {
- // Clear the DOM to work around a bug in test.dart.
- document.body.nodes.clear();
- }));
-
- void iterateTests(Iterator<TestCase> iterator) {
- if (iterator.moveNext()) {
- TestCase test = iterator.current;
- print('${test.description}\nSetup.');
- test.setup();
- new Future(() {
- test.validate();
- print('${test.description}\nDone.');
- iterateTests(iterator);
- });
- } else {
- completer.complete(null);
- }
- }
-
- iterateTests(tests.iterator);
-}

Powered by Google App Engine
This is Rietveld 408576698