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

Side by Side Diff: third_party/polymer/v0_8/components-chromium/iron-test-helpers/README.md

Issue 1162963002: Revert "Rename polymer and cr_elements v0_8 to v1_0" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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.down(button);
22 }); 22 });
23 ``` 23 ```
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698