| 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 // SharedOptions=--package-root=sdk/lib/_internal/ | 5 // SharedOptions=--package-root=sdk/lib/_internal/ |
| 6 | 6 |
| 7 library trydart.paste_test; | 7 library trydart.paste_test; |
| 8 | 8 |
| 9 import 'dart:html'; | 9 import 'dart:html'; |
| 10 import 'dart:async'; | 10 import 'dart:async'; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 inputPre = new DivElement(); | 29 inputPre = new DivElement(); |
| 30 document.body.append(inputPre); | 30 document.body.append(inputPre); |
| 31 observer = new MutationObserver(interaction.onMutation) | 31 observer = new MutationObserver(interaction.onMutation) |
| 32 ..observe(inputPre, childList: true, characterData: true, subtree: true); | 32 ..observe(inputPre, childList: true, characterData: true, subtree: true); |
| 33 | 33 |
| 34 inputPre.innerHtml = "<span><p>//...</p>}</span>"; | 34 inputPre.innerHtml = "<span><p>//...</p>}</span>"; |
| 35 | 35 |
| 36 asyncTest(() => new Future(() { | 36 asyncTest(() => new Future(() { |
| 37 print('Welcome to the future'); | 37 print('Welcome to the future'); |
| 38 Expect.stringEquals('//...\n}\n', inputPre.text); | 38 Expect.stringEquals('//...\n}\n', inputPre.text); |
| 39 }).then((_) { |
| 40 inputPre.innerHtml = 'someText'; |
| 41 return new Future(() { |
| 42 Expect.stringEquals('someText\n', inputPre.text); |
| 43 |
| 44 // Clear the DOM to work around a bug in test.dart. |
| 45 document.body.nodes.clear(); |
| 46 }); |
| 39 })); | 47 })); |
| 40 } | 48 } |
| OLD | NEW |