Index: polymer_1.0.4/bower_components/paper-fab/test/a11y.html |
diff --git a/polymer_0.5.4/bower_components/paper-fab/test/a11y.html b/polymer_1.0.4/bower_components/paper-fab/test/a11y.html |
similarity index 50% |
copy from polymer_0.5.4/bower_components/paper-fab/test/a11y.html |
copy to polymer_1.0.4/bower_components/paper-fab/test/a11y.html |
index 1394520354f77c697d258e998594789681047678..2a2cbe3141065ee19f97d4829b7799f4cbe784a2 100644 |
--- a/polymer_0.5.4/bower_components/paper-fab/test/a11y.html |
+++ b/polymer_1.0.4/bower_components/paper-fab/test/a11y.html |
@@ -1,6 +1,7 @@ |
<!doctype html> |
<!-- |
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved. |
+@license |
+Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt |
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt |
@@ -13,51 +14,55 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
<title>paper-fab a11y tests</title> |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> |
- <script src="../../webcomponentsjs/webcomponents.js"></script> |
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
<script src="../../web-component-tester/browser.js"></script> |
+ <script src="../../test-fixture/test-fixture-mocha.js"></script> |
- <link href="../../core-icons/core-icons.html" rel="import"> |
- <link href="../paper-fab.html" rel="import"> |
+ <link rel="import" href="../../core-icons/core-icons.html"> |
+ <link rel="import" href="../../test-fixture/test-fixture.html"> |
+ <link rel="import" href="../paper-fab.html"> |
</head> |
<body> |
- <paper-fab id="fab1" icon="add"></paper-fab> |
+ <test-fixture id="A11yFabs"> |
+ <template> |
+ <paper-fab id="fab1" icon="add"></paper-fab> |
+ <paper-fab id="fab2" icon="add" disabled></paper-fab> |
+ <paper-fab id="fab3" icon="add" aria-label="custom"></paper-fab> |
+ </template> |
+ </test-fixture> |
- <paper-fab id="fab2" icon="add" disabled></paper-fab> |
+ <script> |
- <paper-fab id="fab3" icon="add" aria-label="custom"></paper-fab> |
+ var f1; |
+ var f2; |
+ var f3; |
- <script> |
+ setup(function() { |
+ var fabs = fixture('A11yFabs'); |
- var f1 = document.getElementById('fab1'); |
- var f2 = document.getElementById('fab2'); |
- var f3 = document.getElementById('fab3'); |
+ f1 = fabs[0]; |
+ f2 = fabs[1]; |
+ f3 = fabs[2]; |
+ }); |
test('aria role is a button', function() { |
assert.strictEqual(f1.getAttribute('role'), 'button'); |
}); |
- test('aria-disabled is set', function(done) { |
+ test('aria-disabled is set', function() { |
assert.ok(f2.hasAttribute('aria-disabled')); |
f2.removeAttribute('disabled'); |
- flush(function() { |
- assert.ok(!f2.hasAttribute('aria-disabled')); |
- done(); |
- }); |
+ assert.strictEqual(f2.getAttribute('aria-disabled'), 'false'); |
}); |
- test('aria-label is set', function() { |
- assert.strictEqual(f1.getAttribute('aria-label'), 'add'); |
- }); |
+ test('aria-label is set'); |
- test('user-defined aria-label is preserved', function(done) { |
+ test('user-defined aria-label is preserved', function() { |
assert.strictEqual(f3.getAttribute('aria-label'), 'custom'); |
f3.icon = 'arrow-forward'; |
- flush(function() { |
- assert.strictEqual(f3.getAttribute('aria-label'), 'custom'); |
- done(); |
- }); |
+ assert.strictEqual(f3.getAttribute('aria-label'), 'custom'); |
}); |
</script> |