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

Unified Diff: pkg/mdv/test/custom_element_bindings_test.dart

Issue 26734004: use symbol literals instead of const ctor in packages (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/mdv/test/element_bindings_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/mdv/test/custom_element_bindings_test.dart
diff --git a/pkg/mdv/test/custom_element_bindings_test.dart b/pkg/mdv/test/custom_element_bindings_test.dart
index 0c277bd1b5cc44afb1bc2593ca8f0cb6dfa6f30d..3952fe175cbea818601c4770bf90cc8364b7f526 100644
--- a/pkg/mdv/test/custom_element_bindings_test.dart
+++ b/pkg/mdv/test/custom_element_bindings_test.dart
@@ -16,8 +16,6 @@ main() {
group('Custom Element Bindings', customElementBindingsTest);
}
-sym(x) => new Symbol(x);
-
customElementBindingsTest() {
var testDiv;
@@ -53,22 +51,22 @@ customElementBindingsTest() {
expect(element.attributes, isNot(contains('my-point')));
expect(element.attributes, isNot(contains('scary-monster')));
- expect(element.myPoint, model[sym('a')]);
- expect(element.scaryMonster, model[sym('b')]);
+ expect(element.myPoint, model[#a]);
+ expect(element.scaryMonster, model[#b]);
- model[sym('a')] = null;
+ model[#a] = null;
performMicrotaskCheckpoint();
expect(element.myPoint, null);
element.unbind('my-point');
- model[sym('a')] = new Point(1, 2);
- model[sym('b')] = new Monster(200);
+ model[#a] = new Point(1, 2);
+ model[#b] = new Monster(200);
performMicrotaskCheckpoint();
- expect(element.scaryMonster, model[sym('b')]);
+ expect(element.scaryMonster, model[#b]);
expect(element.myPoint, null, reason: 'a was unbound');
element.unbindAll();
- model[sym('b')] = null;
+ model[#b] = null;
performMicrotaskCheckpoint();
expect(element.scaryMonster.health, 200);
});
@@ -83,22 +81,22 @@ customElementBindingsTest() {
expect(element.attributes['hidden'], '');
expect(element.id, '2');
- model[sym('a')] = null;
+ model[#a] = null;
performMicrotaskCheckpoint();
expect(element.attributes, isNot(contains('hidden')),
reason: 'null is false-y');
- model[sym('a')] = false;
+ model[#a] = false;
performMicrotaskCheckpoint();
expect(element.attributes, isNot(contains('hidden')));
- model[sym('a')] = 'foo';
+ model[#a] = 'foo';
// TODO(jmesserly): this is here to force an ordering between the two
// changes. Otherwise the order depends on what order StreamController
// chooses to fire the two listeners in.
performMicrotaskCheckpoint();
- model[sym('b')] = 'x';
+ model[#b] = 'x';
performMicrotaskCheckpoint();
expect(element.attributes, contains('hidden'));
expect(element.attributes['hidden'], '');
@@ -139,13 +137,13 @@ customElementBindingsTest() {
expect(element.xtag is MyCustomElement, true,
reason: '${element.xtag} should be a MyCustomElement');
- expect(element.xtag.myPoint, model[sym('a')]);
- expect(element.xtag.scaryMonster, model[sym('b')]);
+ expect(element.xtag.myPoint, model[#a]);
+ expect(element.xtag.scaryMonster, model[#b]);
expect(element.attributes, isNot(contains('my-point')));
expect(element.attributes, isNot(contains('scary-monster')));
- model[sym('a')] = null;
+ model[#a] = null;
performMicrotaskCheckpoint();
expect(element.xtag.myPoint, null);
@@ -154,8 +152,8 @@ customElementBindingsTest() {
expect(element.parentNode, null, reason: 'element was detached');
- model[sym('a')] = new Point(1, 2);
- model[sym('b')] = new Monster(200);
+ model[#a] = new Point(1, 2);
+ model[#b] = new Monster(200);
performMicrotaskCheckpoint();
expect(element.xtag.myPoint, null, reason: 'model was unbound');
« no previous file with comments | « no previous file | pkg/mdv/test/element_bindings_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698