Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / label / label-event-order.html
blobbed0f68adba7d9da977cece9e6cb2723fa2b7b98
1 <!DOCTYPE html>
2 <body>
3 <script src="../../../resources/js-test.js"></script>
4 <label><input type="checkbox">Label for a checkbox</label>
5 <script>
6 description('Event order for a labeled control should be "focus" then "change"');
7 var label = document.querySelector('label');
8 var checkbox = document.querySelector('input');
9 var focusCount = 0;
10 var changeCount = 0;
11 checkbox.addEventListener('focus', function() {
12 debug('"focus" event has been dispatched.');
13 focusCount++;
14 shouldBe('changeCount', '0');
15 }, false);
16 checkbox.addEventListener('change', function() {
17 debug('"change" event has been dispatched.');
18 changeCount++;
19 shouldBe('focusCount', '1');
20 }, false);
21 label.click();
22 label.remove();
23 </script>
24 </body>