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

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

Issue 258673002: Easier-to-read expectations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | no next file » | 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
index 970d6462b69a8abcc8d80284bf7bbb0b8136af8a..8355275d87029456a024b994a9c305ee8816c4ce 100644
--- a/dart/tests/try/paste_content_rewriting_test.dart
+++ b/dart/tests/try/paste_content_rewriting_test.dart
@@ -25,11 +25,11 @@ import '../../pkg/async_helper/lib/async_helper.dart';
const Map<String, String> tests = const <String, String> {
'<span><p>//...</p>}</span>': '//...\n}\n',
'someText': 'someText\n',
- '"\$"': '"\$<DIAGNOSTIC>"\n',
- '"\$\$"': '"\$<DIAGNOSTIC>\$<DIAGNOSTIC>"\n',
- '"\$\$4"': '"\$<DIAGNOSTIC>\$<DIAGNOSTIC>4"\n',
- '"\$\$4 "': '"\$<DIAGNOSTIC>\$<DIAGNOSTIC>4 "\n',
- '1e': '1e<DIAGNOSTIC>\n',
+ '"\$"': '"<DIAGNOSTIC>\$</DIAGNOSTIC>"\n',
+ '"\$\$"': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>"\n',
+ '"\$\$4"': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>4"\n',
+ '"\$\$4 "': '"<DIAGNOSTIC>\$</DIAGNOSTIC><DIAGNOSTIC>\$</DIAGNOSTIC>4 "\n',
+ '1e': '<DIAGNOSTIC>1e</DIAGNOSTIC>\n',
};
List<Node> queryDiagnosticNodes() {
@@ -45,7 +45,9 @@ Future runTests() {
String key = keys.current;
print('Checking $key');
queryDiagnosticNodes().forEach((Node node) {
- node.replaceWith(new Text('<DIAGNOSTIC>'));
+ node.parent.insertBefore(
+ new Text('<DIAGNOSTIC>'), node.parent.firstChild);
+ node.replaceWith(new Text('</DIAGNOSTIC>'));
observer.takeRecords(); // Discard mutations.
});
Expect.stringEquals(tests[key], mainEditorPane.text);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698