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

Side by Side Diff: lib/dom/src/native_DOMImplementation.dart

Issue 10222026: Migrate dom tests to dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class Utils { 5 class Utils {
6 static List convertToList(List list) { 6 static List convertToList(List list) {
7 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it. 7 // FIXME: [possible optimization]: do not copy the array if Dart_IsArray is fine w/ it.
8 final length = list.length; 8 final length = list.length;
9 List result = new List(length); 9 List result = new List(length);
10 result.copyFrom(list, 0, 0, length); 10 result.copyFrom(list, 0, 0, length);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Implementation support. 91 // Implementation support.
92 static LocationCrossFrameImplementation _createLocationCrossFrameImplementatio n() => new LocationCrossFrameImplementation._createLocationCrossFrameImplementat ion(); 92 static LocationCrossFrameImplementation _createLocationCrossFrameImplementatio n() => new LocationCrossFrameImplementation._createLocationCrossFrameImplementat ion();
93 LocationCrossFrameImplementation._createLocationCrossFrameImplementation(); 93 LocationCrossFrameImplementation._createLocationCrossFrameImplementation();
94 94
95 String get typeName() => "Location"; 95 String get typeName() => "Location";
96 } 96 }
97 97
98 class DOMStringMapImplementation extends DOMWrapperBase implements DOMStringMap { 98 class DOMStringMapImplementation extends DOMWrapperBase implements DOMStringMap {
99 static DOMStringMapImplementation _createDOMStringMapImplementation() => new D OMStringMapImplementation._createDOMStringMapImplementation(); 99 static DOMStringMapImplementation _createDOMStringMapImplementation() => new D OMStringMapImplementation._createDOMStringMapImplementation();
100 DOMStringMapImplementation._createDOMStringMapImplementation(); 100 DOMStringMapImplementation._createDOMStringMapImplementation();
101 String get typeName() => "DOMStringMap";
101 102
102 bool containsValue(String value) => Maps.containsValue(this, value); 103 bool containsValue(String value) => Maps.containsValue(this, value);
103 bool containsKey(String key) native "DOMStringMap_containsKey_Callback"; 104 bool containsKey(String key) native "DOMStringMap_containsKey_Callback";
104 String operator [](String key) native "DOMStringMap_item_Callback"; 105 String operator [](String key) native "DOMStringMap_item_Callback";
105 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb ack"; 106 void operator []=(String key, String value) native "DOMStringMap_setItem_Callb ack";
106 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke y, ifAbsent); 107 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke y, ifAbsent);
107 String remove(String key) native "DOMStringMap_remove_Callback"; 108 String remove(String key) native "DOMStringMap_remove_Callback";
108 void clear() => Maps.clear(this); 109 void clear() => Maps.clear(this);
109 void forEach(void f(String key, String value)) => Maps.forEach(this, f); 110 void forEach(void f(String key, String value)) => Maps.forEach(this, f);
110 Collection<String> getKeys() native "DOMStringMap_getKeys_Callback"; 111 Collection<String> getKeys() native "DOMStringMap_getKeys_Callback";
111 Collection<String> getValues() => Maps.getValues(this); 112 Collection<String> getValues() => Maps.getValues(this);
112 int get length() => Maps.length(this); 113 int get length() => Maps.length(this);
113 bool isEmpty() => Maps.isEmpty(this); 114 bool isEmpty() => Maps.isEmpty(this);
114 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698