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

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

Issue 341923005: Update imports to use package:compiler and package:try. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r37512. Created 6 years, 6 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 import 'dart:html' show 5 import 'dart:html' show
6 DivElement, 6 DivElement,
7 MutationObserver, 7 MutationObserver,
8 document; 8 document;
9 9
10 import '../../site/try/src/interaction_manager.dart' show 10 import 'package:try/src/interaction_manager.dart' show
11 InteractionManager; 11 InteractionManager;
12 12
13 import '../../site/try/src/ui.dart' show 13 import 'package:try/src/ui.dart' show
14 hackDiv, 14 hackDiv,
15 mainEditorPane, 15 mainEditorPane,
16 observer; 16 observer;
17 17
18 import '../../site/try/src/user_option.dart' show 18 import 'package:try/src/user_option.dart' show
19 UserOption; 19 UserOption;
20 20
21 InteractionManager mockTryDartInteraction() { 21 InteractionManager mockTryDartInteraction() {
22 UserOption.storage = {}; 22 UserOption.storage = {};
23 23
24 InteractionManager interaction = new InteractionManager(); 24 InteractionManager interaction = new InteractionManager();
25 25
26 hackDiv = new DivElement(); 26 hackDiv = new DivElement();
27 mainEditorPane = new DivElement() 27 mainEditorPane = new DivElement()
28 ..style.whiteSpace = 'pre' 28 ..style.whiteSpace = 'pre'
29 ..contentEditable = 'true'; 29 ..contentEditable = 'true';
30 30
31 observer = new MutationObserver(interaction.onMutation); 31 observer = new MutationObserver(interaction.onMutation);
32 observer.observe( 32 observer.observe(
33 mainEditorPane, childList: true, characterData: true, subtree: true); 33 mainEditorPane, childList: true, characterData: true, subtree: true);
34 34
35 document.body.nodes.addAll([mainEditorPane, hackDiv]); 35 document.body.nodes.addAll([mainEditorPane, hackDiv]);
36 36
37 return interaction; 37 return interaction;
38 } 38 }
39 39
40 void clearEditorPaneWithoutNotifications() { 40 void clearEditorPaneWithoutNotifications() {
41 mainEditorPane.nodes.clear(); 41 mainEditorPane.nodes.clear();
42 observer.takeRecords(); 42 observer.takeRecords();
43 } 43 }
OLDNEW
« no previous file with comments | « dart/tests/try/internal_error_test.dart ('k') | dart/tests/try/paste_content_rewriting_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698