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

Unified Diff: lib/src/paper-radio-group/test/basic.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 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 | « lib/src/paper-radio-group/paper-radio-group.html ('k') | lib/src/paper-ripple/paper-ripple.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/paper-radio-group/test/basic.html
diff --git a/lib/src/paper-radio-group/test/basic.html b/lib/src/paper-radio-group/test/basic.html
index f9a125551a704b9cd4433171fda35e10cd45a31a..1f3ec0a414779b62bd1edb6ac89860cda44cd9f2 100644
--- a/lib/src/paper-radio-group/test/basic.html
+++ b/lib/src/paper-radio-group/test/basic.html
@@ -154,15 +154,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// The selection should not change, but wait for a little bit just
// in case it would and an event would be fired.
setTimeout(function() {
- try {
- expect(items[0].checked).to.be.equal(true);
- expect(items[1].checked).to.be.equal(false);
- expect(items[2].checked).to.be.equal(false);
- done();
- } catch (e) {
- done(e)
- }
- }, 200);
+ expect(items[0].checked).to.be.equal(true);
+ expect(items[1].checked).to.be.equal(false);
+ expect(items[2].checked).to.be.equal(false);
+ done();
+ }, 1);
+ });
+
+ test('clicking the selected item should deselect if allow-empty-selection is set', function (done) {
+ var g = fixture('WithSelection');
+ g.allowEmptySelection = true;
+ var items = g.items;
+
+ expect(items[0].checked).to.be.equal(true);
+ MockInteractions.tap(items[0]);
+
+ // The selection should not change, but wait for a little bit just
+ // in case it would and an event would be fired.
+ setTimeout(function() {
+ expect(items[0].checked).to.be.equal(false);
+ expect(items[1].checked).to.be.equal(false);
+ expect(items[2].checked).to.be.equal(false);
+ done();
+ }, 1);
});
});
« no previous file with comments | « lib/src/paper-radio-group/paper-radio-group.html ('k') | lib/src/paper-ripple/paper-ripple.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698