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

Side by Side Diff: test/paper_radio_button_basic_test.dart

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, 1 month 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
« no previous file with comments | « test/paper_inky_focus_behavior_test.html ('k') | test/paper_radio_button_behavior_test.dart » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 @TestOn('browser') 4 @TestOn('browser')
5 library polymer_elements.test.paper_radio_button_basic_test; 5 library polymer_elements.test.paper_radio_button_basic_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'package:test/test.dart'; 8 import 'package:test/test.dart';
9 import 'package:web_components/web_components.dart'; 9 import 'package:web_components/web_components.dart';
10 import 'package:polymer_elements/paper_radio_button.dart'; 10 import 'package:polymer_elements/paper_radio_button.dart';
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 r1 = fixture('NoLabel'); 63 r1 = fixture('NoLabel');
64 r2 = fixture('WithLabel'); 64 r2 = fixture('WithLabel');
65 }); 65 });
66 66
67 test('has aria role "radio"', () { 67 test('has aria role "radio"', () {
68 expect(r1.attributes['role'], equals('radio')); 68 expect(r1.attributes['role'], equals('radio'));
69 expect(r2.attributes['role'], equals('radio')); 69 expect(r2.attributes['role'], equals('radio'));
70 }); 70 });
71 71
72 test('button with no label has no aria label', () { 72 test('button with no label has no aria label', () {
73 expect(r1.attributes['aria-label'], isEmpty); 73 expect(r1.attributes['aria-label'], isNull);
74 });
75
76 test('button with a label sets an aria label', () {
77 expect(r2.attributes['aria-label'], equals("Batman"));
78 }); 74 });
79 75
80 test('button respects the user set aria-label', () { 76 test('button respects the user set aria-label', () {
81 var c = fixture('AriaLabel'); 77 var c = fixture('AriaLabel');
82 expect(c.attributes['aria-label'], equals("Batman")); 78 expect(c.attributes['aria-label'], equals("Batman"));
83 }); 79 });
84 80
85 // TODO(jakemac): Investigate these. 81 // TODO(jakemac): Investigate these.
86 // a11ySuite('NoLabel'); 82 // a11ySuite('NoLabel');
87 // a11ySuite('WithLabel'); 83 // a11ySuite('WithLabel');
88 // a11ySuite('AriaLabel'); 84 // a11ySuite('AriaLabel');
89 }); 85 });
90 } 86 }
OLDNEW
« no previous file with comments | « test/paper_inky_focus_behavior_test.html ('k') | test/paper_radio_button_behavior_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698