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

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

Issue 212533003: Add test for tokenization of 1e (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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 11 matching lines...) Expand all
22 import '../../pkg/expect/lib/expect.dart'; 22 import '../../pkg/expect/lib/expect.dart';
23 import '../../pkg/async_helper/lib/async_helper.dart'; 23 import '../../pkg/async_helper/lib/async_helper.dart';
24 24
25 const Map<String, String> tests = const <String, String> { 25 const Map<String, String> tests = const <String, String> {
26 '<span><p>//...</p>}</span>': '//...\n}\n', 26 '<span><p>//...</p>}</span>': '//...\n}\n',
27 'someText': 'someText\n', 27 'someText': 'someText\n',
28 '"\$"': '"\$"<DIAGNOSTIC>\n', 28 '"\$"': '"\$"<DIAGNOSTIC>\n',
29 '"\$\$"': '"\$\$<DIAGNOSTIC>"<DIAGNOSTIC>\n', 29 '"\$\$"': '"\$\$<DIAGNOSTIC>"<DIAGNOSTIC>\n',
30 '"\$\$4"': '"\$\$<DIAGNOSTIC>4<DIAGNOSTIC>"\n', 30 '"\$\$4"': '"\$\$<DIAGNOSTIC>4<DIAGNOSTIC>"\n',
31 '"\$\$4 "': '"\$\$<DIAGNOSTIC>4<DIAGNOSTIC> "\n', 31 '"\$\$4 "': '"\$\$<DIAGNOSTIC>4<DIAGNOSTIC> "\n',
32 '1e': '1<DIAGNOSTIC>e\n',
32 }; 33 };
33 34
34 List<Node> queryDiagnosticNodes() { 35 List<Node> queryDiagnosticNodes() {
35 return mainEditorPane.querySelectorAll('a.diagnostic>span'); 36 return mainEditorPane.querySelectorAll('a.diagnostic>span');
36 } 37 }
37 38
38 Future runTests() { 39 Future runTests() {
39 Iterator<String> keys = tests.keys.iterator; 40 Iterator<String> keys = tests.keys.iterator;
40 keys.moveNext(); 41 keys.moveNext();
41 mainEditorPane.innerHtml = keys.current; 42 mainEditorPane.innerHtml = keys.current;
(...skipping 27 matching lines...) Expand all
69 var interaction = new InteractionManager(); 70 var interaction = new InteractionManager();
70 mainEditorPane = new DivElement(); 71 mainEditorPane = new DivElement();
71 document.body.append(mainEditorPane); 72 document.body.append(mainEditorPane);
72 observer = new MutationObserver(interaction.onMutation) 73 observer = new MutationObserver(interaction.onMutation)
73 ..observe(mainEditorPane, childList: true, characterData: true, subtree: t rue); 74 ..observe(mainEditorPane, childList: true, characterData: true, subtree: t rue);
74 75
75 mainEditorPane.innerHtml = "<span><p>//...</p>}</span>"; 76 mainEditorPane.innerHtml = "<span><p>//...</p>}</span>";
76 77
77 asyncTest(runTests); 78 asyncTest(runTests);
78 } 79 }
OLDNEW
« 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