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

Unified Diff: dart/tests/try/paste_content_rewriting_test.dart

Issue 210873002: Add a test suite for Try Dart! (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 6 years, 9 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
« no previous file with comments | « no previous file | dart/tests/try/try.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/try/paste_content_rewriting_test.dart
diff --git a/dart/tests/try/paste_content_rewriting_test.dart b/dart/tests/try/paste_content_rewriting_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..cfe9418a1559383402c91bf4e3ebec6560483119
--- /dev/null
+++ b/dart/tests/try/paste_content_rewriting_test.dart
@@ -0,0 +1,40 @@
+// 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.
+
+// SharedOptions=--package-root=sdk/lib/_internal/
+
+library trydart.paste_test;
+
+import 'dart:html';
+import 'dart:async';
+
+import '../../site/try/src/interaction_manager.dart' show
+ InteractionManager;
+
+import '../../site/try/src/ui.dart' show
+ inputPre,
+ observer;
+
+import '../../site/try/src/user_option.dart' show
+ UserOption;
+
+import '../../pkg/expect/lib/expect.dart';
+import '../../pkg/async_helper/lib/async_helper.dart';
+
+main() {
+ UserOption.storage = {};
+
+ var interaction = new InteractionManager();
+ inputPre = new DivElement();
+ document.body.append(inputPre);
+ observer = new MutationObserver(interaction.onMutation)
+ ..observe(inputPre, childList: true, characterData: true, subtree: true);
+
+ inputPre.innerHtml = "<span><p>//...</p>}</span>";
+
+ asyncTest(() => new Future(() {
+ print('Welcome to the future');
+ Expect.stringEquals('//...\n}\n', inputPre.text);
+ }));
+}
« no previous file with comments | « no previous file | dart/tests/try/try.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698