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

Side by Side Diff: pkg/mdv/test/mdv_test_utils.dart

Issue 19482024: fix parsing of semantic template interation w/ shadowdom polyfill (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 5 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 | pkg/mdv/test/template_element_test.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 library observe_utils; 5 library observe_utils;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html';
8 import 'package:observe/observe.dart'; 9 import 'package:observe/observe.dart';
9 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
10 11
12 final bool parserHasNativeTemplate = () {
13 var div = new DivElement()..innerHtml = '<table><template>';
14 return div.firstChild.firstChild != null &&
15 div.firstChild.firstChild.tagName == 'TEMPLATE';
16 }();
17
11 toSymbolMap(Map map) { 18 toSymbolMap(Map map) {
12 var result = new ObservableMap.linked(); 19 var result = new ObservableMap.linked();
13 map.forEach((key, value) { 20 map.forEach((key, value) {
14 if (value is Map) value = toSymbolMap(value); 21 if (value is Map) value = toSymbolMap(value);
15 result[new Symbol(key)] = value; 22 result[new Symbol(key)] = value;
16 }); 23 });
17 return result; 24 return result;
18 } 25 }
19 26
20 class FooBarModel extends ObservableBase { 27 class FooBarModel extends ObservableBase {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } finally { 80 } finally {
74 performMicrotaskCheckpoint(); 81 performMicrotaskCheckpoint();
75 } 82 }
76 }, onRunAsync: (callback) => _pending.add(callback)); 83 }, onRunAsync: (callback) => _pending.add(callback));
77 }; 84 };
78 } 85 }
79 86
80 observeTest(name, testCase) => test(name, wrapMicrotask(testCase)); 87 observeTest(name, testCase) => test(name, wrapMicrotask(testCase));
81 88
82 solo_observeTest(name, testCase) => solo_test(name, wrapMicrotask(testCase)); 89 solo_observeTest(name, testCase) => solo_test(name, wrapMicrotask(testCase));
OLDNEW
« no previous file with comments | « no previous file | pkg/mdv/test/template_element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698