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

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

Issue 211273002: Rename "inputPre" to "mainEditorPane". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also update test. Created 6 years, 9 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 | « dart/site/try/src/ui.dart ('k') | 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';
11 11
12 import '../../site/try/src/interaction_manager.dart' show 12 import '../../site/try/src/interaction_manager.dart' show
13 InteractionManager; 13 InteractionManager;
14 14
15 import '../../site/try/src/ui.dart' show 15 import '../../site/try/src/ui.dart' show
16 inputPre, 16 mainEditorPane,
17 observer; 17 observer;
18 18
19 import '../../site/try/src/user_option.dart' show 19 import '../../site/try/src/user_option.dart' show
20 UserOption; 20 UserOption;
21 21
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 main() { 25 main() {
26 UserOption.storage = {}; 26 UserOption.storage = {};
27 27
28 var interaction = new InteractionManager(); 28 var interaction = new InteractionManager();
29 inputPre = new DivElement(); 29 mainEditorPane = new DivElement();
30 document.body.append(inputPre); 30 document.body.append(mainEditorPane);
31 observer = new MutationObserver(interaction.onMutation) 31 observer = new MutationObserver(interaction.onMutation)
32 ..observe(inputPre, childList: true, characterData: true, subtree: true); 32 ..observe(mainEditorPane, childList: true, characterData: true, subtree: t rue);
33 33
34 inputPre.innerHtml = "<span><p>//...</p>}</span>"; 34 mainEditorPane.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', mainEditorPane.text);
39 }).then((_) { 39 }).then((_) {
40 inputPre.innerHtml = 'someText'; 40 mainEditorPane.innerHtml = 'someText';
41 return new Future(() { 41 return new Future(() {
42 Expect.stringEquals('someText\n', inputPre.text); 42 Expect.stringEquals('someText\n', mainEditorPane.text);
43 43
44 // Clear the DOM to work around a bug in test.dart. 44 // Clear the DOM to work around a bug in test.dart.
45 document.body.nodes.clear(); 45 document.body.nodes.clear();
46 }); 46 });
47 })); 47 }));
48 } 48 }
OLDNEW
« no previous file with comments | « dart/site/try/src/ui.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698