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

Side by Side Diff: pkg/mdv_observe/test/path_observer_test.dart

Issue 17434008: Move PathObserver to mdv_observe package (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « no previous file | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 PathObserver;
6 import 'package:unittest/html_config.dart';
7 import 'package:mdv_observe/mdv_observe.dart'; 5 import 'package:mdv_observe/mdv_observe.dart';
8 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
9 7
10 // This file contains code ported from: 8 // This file contains code ported from:
11 // https://github.com/rafaelw/ChangeSummary/blob/master/tests/test.js 9 // https://github.com/rafaelw/ChangeSummary/blob/master/tests/test.js
12 10
13 main() { 11 main() {
14 useHtmlConfiguration();
15 group('PathObserver', observePathTests); 12 group('PathObserver', observePathTests);
16 } 13 }
17 14
18 observePath(obj, path) => new PathObserver(obj, path); 15 observePath(obj, path) => new PathObserver(obj, path);
19 16
20 sym(x) => new Symbol(x); 17 sym(x) => new Symbol(x);
21 18
22 toSymbolMap(Map map) { 19 toSymbolMap(Map map) {
23 var result = new ObservableMap.linked(); 20 var result = new ObservableMap.linked();
24 map.forEach((key, value) { 21 map.forEach((key, value) {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 243 }
247 void setValueWorkaround(key, newValue) { 244 void setValueWorkaround(key, newValue) {
248 if (key == fieldName) value = newValue; 245 if (key == fieldName) value = newValue;
249 } 246 }
250 247
251 toString() => '#<$runtimeType $fieldName: $_value>'; 248 toString() => '#<$runtimeType $fieldName: $_value>';
252 } 249 }
253 250
254 _record(key, oldValue, newValue, [kind = ChangeRecord.FIELD]) => 251 _record(key, oldValue, newValue, [kind = ChangeRecord.FIELD]) =>
255 new ChangeRecord(key, oldValue, newValue, kind: kind); 252 new ChangeRecord(key, oldValue, newValue, kind: kind);
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698