Chromium Code Reviews| Index: dart/tests/try/paste_test.dart |
| diff --git a/dart/tests/try/paste_test.dart b/dart/tests/try/paste_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..52ff67989e33c0b68a2337e280c1811afd1d4644 |
| --- /dev/null |
| +++ b/dart/tests/try/paste_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/ -v |
|
kasperl
2014/03/25 09:48:07
Get rid of -v.
ahe
2014/03/25 14:06:51
Done.
|
| + |
| +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); |
| + })); |
| +} |