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

Side by Side Diff: polymer_1.2.3/bower_components/iron-test-helpers/README.md

Issue 1581713003: [third_party] add polymer 1.2.3 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: 1.2.3 Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 # iron-test-helpers 1 # iron-test-helpers
2 2
3 Utility classes to make testing easier. 3 Utility classes to make testing easier.
4 4
5 ## Mock Interactions 5 ## Mock Interactions
6 6
7 This is a set of methods to simulate mouse or keyboard interaction with an eleme nt. Include `mock-interactions.js` and then use them like so: 7 This is a set of methods to simulate mouse or keyboard interaction with an eleme nt. Include `mock-interactions.js` and then use them like so:
8 8
9 ```javascript 9 ```javascript
10 test('can be triggered with space', function(done) { 10 test('can be triggered with space', function(done) {
11 button.addEventListener('keydown', function() { 11 button.addEventListener('keydown', function() {
12 done(); 12 done();
13 }); 13 });
14 MockInteractions.pressSpace(button); 14 MockInteractions.pressSpace(button);
15 }); 15 });
16 16
17 test('can be clicked', function(done) { 17 test('can be clicked', function(done) {
18 button.addEventListener('click', function() { 18 button.addEventListener('click', function() {
19 done(); 19 done();
20 }); 20 });
21 MockInteractions.down(button); 21 MockInteractions.tap(button);
22 }); 22 });
23 ``` 23 ```
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698