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

Side by Side Diff: LayoutTests/platform/chromium/accessibility/other-aria-attribute-change-sends-notification.html

Issue 14120003: Move LayoutTests from platform/chromium/... to generic location (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../../../fast/js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7
8 <div id="container">
9 <button id="aria-busy" aria-busy="false">Busy</button>
10 <button id="aria-disabled" aria-disabled="false">Disabled</button>
11 <button id="aria-readonly" aria-readonly="false">Readonly</button>
12 <button id="aria-required" aria-required="false">Required</button>
13 </div>
14
15 <div id="console"></div>
16 <script>
17 description("This test ensures that a change to any ARIA attribute, not just a s tate, sends a notification.");
18 window.jsTestIsAsync = true;
19
20 if (window.testRunner && window.accessibilityController) {
21 testRunner.dumpAsText();
22
23 function accessibleElementById(id) {
24 return accessibilityController.accessibleElementById(id);
25 }
26
27 window.successCount = 0;
28 function gotSuccessfulNotification() {
29 successCount++;
30 if (successCount != 4)
31 return;
32
33 debug('All notifications received successfully.');
34 accessibleElementById('aria-busy').removeNotificationListener();
35 accessibleElementById('aria-disabled').removeNotificationListener();
36 accessibleElementById('aria-readonly').removeNotificationListener();
37 accessibleElementById('aria-required').removeNotificationListener();
38
39 document.getElementById('container').hidden = true;
40 finishJSTest();
41 }
42
43 accessibleElementById('aria-busy').addNotificationListener(function(notifica tion) {
44 debug('Got ' + notification + ' notification on aria-busy');
45 gotSuccessfulNotification();
46 });
47 document.getElementById('aria-busy').setAttribute('aria-busy', 'true');
48
49 accessibleElementById('aria-disabled').addNotificationListener(function(noti fication) {
50 debug('Got ' + notification + ' notification on aria-disabled');
51 gotSuccessfulNotification();
52 });
53 document.getElementById('aria-disabled').setAttribute('aria-disabled', 'true ');
54
55 accessibleElementById('aria-readonly').addNotificationListener(function(noti fication) {
56 debug('Got ' + notification + ' notification on aria-readonly');
57 gotSuccessfulNotification();
58 });
59 document.getElementById('aria-readonly').setAttribute('aria-readonly', 'true ');
60
61 accessibleElementById('aria-required').addNotificationListener(function(noti fication) {
62 debug('Got ' + notification + ' notification on aria-required');
63 gotSuccessfulNotification();
64 });
65 document.getElementById('aria-required').setAttribute('aria-required', 'true ');
66
67 debug('');
68 }
69
70 </script>
71
72 <script src="../../../fast/js/resources/js-test-post.js"></script>
73 </body>
74 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698