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

Unified Diff: tests/try/web/paste_content_rewriting_test.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/paste_content_rewriting_test.dart
diff --git a/tests/try/web/paste_content_rewriting_test.dart b/tests/try/web/paste_content_rewriting_test.dart
deleted file mode 100644
index 20e015944eca8436cbcfc520b5b8012c0de63c0a..0000000000000000000000000000000000000000
--- a/tests/try/web/paste_content_rewriting_test.dart
+++ /dev/null
@@ -1,89 +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.paste_test;
-
-import 'dart:html';
-import 'dart:async';
-
-import 'package:try/src/interaction_manager.dart' show
- InteractionManager;
-
-import 'package:try/src/ui.dart' show
- mainEditorPane,
- observer;
-
-import 'package:try/src/user_option.dart' show
- UserOption;
-
-import 'package:expect/expect.dart';
-import 'package:async_helper/async_helper.dart';
-
-const Map<String, String> tests = const <String, String> {
- '<span><p>//...</p>}</span>': '//...\n}',
- 'someText': 'someText',
- '"\$"': '"<DIAGNOSTIC>\$</DIAGNOSTIC>"',
- '"\$\$"': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>"',
- '"\$\$4"': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>4"',
- '"\$\$4 "': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>4 "',
- '1e': '<DIAGNOSTIC>1e</DIAGNOSTIC>',
- 'r"""\n\n\'"""': 'r"""\n\n\'"""',
- '"': '<DIAGNOSTIC>"</DIAGNOSTIC>',
- '/**\n*/': '/**\n*/',
-
- // The following case tests that single line strings can span multiple lines
- // via ${}. The string is constructed so that it is possible to tell if the
- // line-bases scanner (incorrectly) reverses the order of the string quotes
- // in its state string. The example string is a complicated way of writing:
- // '[[{{}: {}}]]'. See also
- // tests/language/string_interpolation_newline_test.dart.
- '"\${ [ "\${ [ \'\${ { \'\${\n{\n} }\' : {\n} } }\' ] }" ] }"':
- '"\${ [ "\${ [ \'\${ { \'\${\n{\n} }\' : {\n} } }\' ] }" ] }"',
-};
-
-List<Node> queryDiagnosticNodes() {
- return mainEditorPane.querySelectorAll('a.diagnostic>span');
-}
-
-Future runTests() {
- Iterator<String> keys = tests.keys.iterator;
- keys.moveNext();
- mainEditorPane.innerHtml = keys.current;
-
- Future makeFuture() => new Future(() {
- String key = keys.current;
- print('Checking $key');
- queryDiagnosticNodes().forEach((Node node) {
- node.parent.append(new Text('</DIAGNOSTIC>'));
- node.replaceWith(new Text('<DIAGNOSTIC>'));
- observer.takeRecords(); // Discard mutations.
- });
- Expect.stringEquals(tests[key], mainEditorPane.text);
- if (keys.moveNext()) {
- key = keys.current;
- print('Setting $key');
- mainEditorPane.innerHtml = key;
- return makeFuture();
- } else {
- // Clear the DOM to work around a bug in test.dart.
- document.body.nodes.clear();
- return null;
- }
- });
-
- return makeFuture();
-}
-
-void main() {
- UserOption.storage = {};
-
- var interaction = new InteractionManager();
- mainEditorPane = new DivElement();
- document.body.append(mainEditorPane);
- observer = new MutationObserver(interaction.onMutation)
- ..observe(
- mainEditorPane, childList: true, characterData: true, subtree: true);
-
- asyncTest(runTests);
-}
« dart.gyp ('K') | « tests/try/web/mock_try.dart ('k') | tests/try/web/print.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698