| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library trydart.paste_test; | 5 library trydart.paste_test; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 | 9 |
| 10 import 'package:try/src/interaction_manager.dart' show | 10 import 'package:try/src/interaction_manager.dart' show |
| 11 InteractionManager; | 11 InteractionManager; |
| 12 | 12 |
| 13 import 'package:try/src/ui.dart' show | 13 import 'package:try/src/ui.dart' show |
| 14 mainEditorPane, | 14 mainEditorPane, |
| 15 observer; | 15 observer; |
| 16 | 16 |
| 17 import 'package:try/src/user_option.dart' show | 17 import 'package:try/src/user_option.dart' show |
| 18 UserOption; | 18 UserOption; |
| 19 | 19 |
| 20 import '../../pkg/expect/lib/expect.dart'; | 20 import 'package:expect/expect.dart'; |
| 21 import '../../pkg/async_helper/lib/async_helper.dart'; | 21 import 'package:async_helper/async_helper.dart'; |
| 22 | 22 |
| 23 const Map<String, String> tests = const <String, String> { | 23 const Map<String, String> tests = const <String, String> { |
| 24 '<span><p>//...</p>}</span>': '//...\n}', | 24 '<span><p>//...</p>}</span>': '//...\n}', |
| 25 'someText': 'someText', | 25 'someText': 'someText', |
| 26 '"\$"': '"<DIAGNOSTIC>\$</DIAGNOSTIC>"', | 26 '"\$"': '"<DIAGNOSTIC>\$</DIAGNOSTIC>"', |
| 27 '"\$\$"': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>"', | 27 '"\$\$"': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>"', |
| 28 '"\$\$4"': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>4"', | 28 '"\$\$4"': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>4"', |
| 29 '"\$\$4 "': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>4 "', | 29 '"\$\$4 "': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>4 "', |
| 30 '1e': '<DIAGNOSTIC>1e</DIAGNOSTIC>', | 30 '1e': '<DIAGNOSTIC>1e</DIAGNOSTIC>', |
| 31 'r"""\n\n\'"""': 'r"""\n\n\'"""', | 31 'r"""\n\n\'"""': 'r"""\n\n\'"""', |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 var interaction = new InteractionManager(); | 72 var interaction = new InteractionManager(); |
| 73 mainEditorPane = new DivElement(); | 73 mainEditorPane = new DivElement(); |
| 74 document.body.append(mainEditorPane); | 74 document.body.append(mainEditorPane); |
| 75 observer = new MutationObserver(interaction.onMutation) | 75 observer = new MutationObserver(interaction.onMutation) |
| 76 ..observe( | 76 ..observe( |
| 77 mainEditorPane, childList: true, characterData: true, subtree: true); | 77 mainEditorPane, childList: true, characterData: true, subtree: true); |
| 78 | 78 |
| 79 asyncTest(runTests); | 79 asyncTest(runTests); |
| 80 } | 80 } |
| OLD | NEW |