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

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

Issue 269343009: Add (failing) source_update_test.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/tests/try/mock_try.dart ('k') | dart/tests/try/test_case.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // SharedOptions=--package-root=sdk/lib/_internal/
6
7 import 'test_try.dart';
8
9 InteractionContext interaction;
10
11 void main() {
12 interaction = mockTryDartInteraction();
13
14 runTests(<TestCase>[
15
16 new TestCase('Test setting full source', () {
17 clearEditorPaneWithoutNotifications();
18 mainEditorPane.appendText('Foo\nBar');
19 }, () {
20 expectSource('Foo\nBar');
21 }),
22
23 new TestCase('Test modifying a single line', () {
24 Element lastLine = mainEditorPane.lastChild;
25 lastLine.appendText('Baz');
26 }, () {
27 expectSource('Foo\nBarBaz');
28 }),
29
30 ]);
31 }
32
33 void expectSource(String expected) {
34 String actualSource = interaction.currentCompilationUnit.content;
35 Expect.stringEquals(expected, actualSource);
36 }
OLDNEW
« no previous file with comments | « dart/tests/try/mock_try.dart ('k') | dart/tests/try/test_case.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698