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

Side by Side Diff: tools/dom/src/shared_html.dart

Issue 133313004: pkg/unittest: Run tests in zones (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nit Created 6 years, 10 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 | « tests/lib/async/future_timeout_test.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) 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 part of dart.dom.html; 5 part of dart.dom.html;
6 6
7 _wrapZone(callback) { 7 _wrapZone(callback(arg)) {
8 // For performance reasons avoid wrapping if we are in the root zone. 8 // For performance reasons avoid wrapping if we are in the root zone.
9 if (Zone.current == Zone.ROOT) return callback; 9 if (Zone.current == Zone.ROOT) return callback;
10 if (callback == null) return null;
10 return Zone.current.bindUnaryCallback(callback, runGuarded: true); 11 return Zone.current.bindUnaryCallback(callback, runGuarded: true);
11 } 12 }
12 13
13 _wrapBinaryZone(callback) { 14 _wrapBinaryZone(callback(arg1, arg2)) {
14 if (Zone.current == Zone.ROOT) return callback; 15 if (Zone.current == Zone.ROOT) return callback;
16 if (callback == null) return null;
15 return Zone.current.bindBinaryCallback(callback, runGuarded: true); 17 return Zone.current.bindBinaryCallback(callback, runGuarded: true);
16 } 18 }
17 19
18 /** 20 /**
19 * Alias for [querySelector]. Note this function is deprecated because its 21 * Alias for [querySelector]. Note this function is deprecated because its
20 * semantics will be changing in the future. 22 * semantics will be changing in the future.
21 */ 23 */
22 @deprecated 24 @deprecated
23 @Experimental() 25 @Experimental()
24 Element query(String relativeSelectors) => document.query(relativeSelectors); 26 Element query(String relativeSelectors) => document.query(relativeSelectors);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 * save typing a few characters. 61 * save typing a few characters.
60 * 62 *
61 * [selectors] should be a string using CSS selector syntax. 63 * [selectors] should be a string using CSS selector syntax.
62 * 64 *
63 * var items = document.querySelectorAll('.itemClassName'); 65 * var items = document.querySelectorAll('.itemClassName');
64 * 66 *
65 * For details about CSS selector syntax, see the 67 * For details about CSS selector syntax, see the
66 * [CSS selector specification](http://www.w3.org/TR/css3-selectors/). 68 * [CSS selector specification](http://www.w3.org/TR/css3-selectors/).
67 */ 69 */
68 ElementList querySelectorAll(String selectors) => document.querySelectorAll(sele ctors); 70 ElementList querySelectorAll(String selectors) => document.querySelectorAll(sele ctors);
OLDNEW
« no previous file with comments | « tests/lib/async/future_timeout_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698