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

Unified Diff: tests/html/unknownelement_test.dart

Issue 11696004: Removing noSuchMethod from Element. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/unknownelement_test.dart
diff --git a/tests/html/unknownelement_test.dart b/tests/html/unknownelement_test.dart
index 5b1a8d273c71fc0e1d54c5d46e6220ec4837a558..6632974c6c037d38a96e4784eea0388b2468239e 100644
--- a/tests/html/unknownelement_test.dart
+++ b/tests/html/unknownelement_test.dart
@@ -31,45 +31,4 @@ main() {
expect(() => foo.field1, throwsNoSuchMethodError);
expect(() { foo.field1 = 42; }, throwsNoSuchMethodError);
});
-
- test('dispatch', () {
- dispatch(element, name, args) {
- if (element.xtag == null) {
- element.xtag = new Map();
- }
- var map = element.xtag;
-
- // FIXME: Remove once VM and Dart2JS converge.
- name = name.replaceFirst(' ', ':');
- switch (element.tagName.toLowerCase()) {
- case 'foo':
- switch (name) {
- case 'get:x':
- return 42;
- case 'baz':
- return '${element.id} - ${args[0]}';
- }
- break;
- case 'bar':
- switch (name) {
- case 'get:y':
- return map['y'];
- case 'set:y=':
- map['y'] = args[0];
- return;
- }
- break;
- }
- throw new NoSuchMethodError(element, name, args, {});
- }
- dynamicUnknownElementDispatcher = dispatch;
-
- expect(foo.x, equals(42));
- expect(() { foo.x = 7; }, throwsNoSuchMethodError);
- expect(foo.id, equals('foo'));
- expect(() => bar.x, throwsNoSuchMethodError);
- bar.y = 11;
- expect(bar.y, equals(11));
- expect(foo.baz('hello'), equals('foo - hello'));
- });
}
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698