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

Side by Side Diff: dart/tests/try/paste_content_rewriting_test.dart

Issue 373563002: Handle multiline interpolated strings in line-based scanner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
(...skipping 13 matching lines...) Expand all
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\'"""',
32 '"': '<DIAGNOSTIC>"</DIAGNOSTIC>', 32 '"': '<DIAGNOSTIC>"</DIAGNOSTIC>',
33 '/**\n*/': '/**\n*/', 33 '/**\n*/': '/**\n*/',
34 '"\${ [ "\${ [ \'\${ { \'\${\n{\n} }\' : {\n} } }\' ] }" ] }"':
kasperl 2014/07/07 11:16:39 Add a comment that explains what this is?
ahe 2014/07/09 10:11:13 Done.
35 '"\${ [ "\${ [ \'\${ { \'\${\n{\n} }\' : {\n} } }\' ] }" ] }"',
ahe 2014/07/07 09:36:55 The best test I have found so far simply ensures t
34 }; 36 };
35 37
36 List<Node> queryDiagnosticNodes() { 38 List<Node> queryDiagnosticNodes() {
37 return mainEditorPane.querySelectorAll('a.diagnostic>span'); 39 return mainEditorPane.querySelectorAll('a.diagnostic>span');
38 } 40 }
39 41
40 Future runTests() { 42 Future runTests() {
41 Iterator<String> keys = tests.keys.iterator; 43 Iterator<String> keys = tests.keys.iterator;
42 keys.moveNext(); 44 keys.moveNext();
43 mainEditorPane.innerHtml = keys.current; 45 mainEditorPane.innerHtml = keys.current;
(...skipping 27 matching lines...) Expand all
71 73
72 var interaction = new InteractionManager(); 74 var interaction = new InteractionManager();
73 mainEditorPane = new DivElement(); 75 mainEditorPane = new DivElement();
74 document.body.append(mainEditorPane); 76 document.body.append(mainEditorPane);
75 observer = new MutationObserver(interaction.onMutation) 77 observer = new MutationObserver(interaction.onMutation)
76 ..observe( 78 ..observe(
77 mainEditorPane, childList: true, characterData: true, subtree: true); 79 mainEditorPane, childList: true, characterData: true, subtree: true);
78 80
79 asyncTest(runTests); 81 asyncTest(runTests);
80 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698