Changeset 248189 in webkit
- Timestamp:
- Aug 2, 2019 4:20:31 PM (5 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r248175 r248189 1 2019-08-02 Andres Gonzalez <andresg_22@apple.com> 2 3 [ Mac ] Layout Test accessibility/mac/press-not-work-for-disabled-menu-list.html is a flaky failure 4 https://bugs.webkit.org/show_bug.cgi?id=196505 5 <rdar://problem/49532620> 6 7 Reviewed by Chris Fleizach. 8 9 Re-wrote test in a timing independent way. This should fix the intermittent failures. 10 * accessibility/mac/press-not-work-for-disabled-menu-list.html: 11 1 12 2019-08-02 Yury Semikhatsky <yurys@chromium.org> 2 13 -
trunk/LayoutTests/accessibility/mac/press-not-work-for-disabled-menu-list.html
r241190 r248189 43 43 44 44 // We don't test for enabled controls because opening menu lists waits on the UI process to display the menu. 45 var numOfTests = 3, notificationCount= 0;45 var testCount = 3, testIndex = 0; 46 46 var lists = [null, null, null]; 47 if (window.accessibilityController) {48 jsTestIsAsync = true;49 pressNext(0);50 }51 47 52 function pressNext(testId) { 53 if (testId > numOfTests) 48 function testNextList() { 49 if (testIndex >= testCount) { 50 finishJSTest(); 54 51 return; 55 var menulist = accessibilityController.accessibleElementById("test" + testId); 52 } 53 54 var menulist = accessibilityController.accessibleElementById("test" + testIndex); 56 55 menulist.addNotificationListener(pressListener); 57 56 menulist.press(); 58 lists[testId] = menulist; 59 window.setTimeout(function() { 60 pressNext(testId + 1); 61 }, 0); 57 lists[testIndex] = menulist; 62 58 } 63 59 64 60 function pressListener(notification) { 65 if (notification == "AXPressDidFail" || notification == "AXPressDidSucceed") 66 notificationCount++; 61 lists[testIndex].removeNotificationListener(pressListener); 67 62 68 63 debug("Got notification: " + notification); 69 lists[notificationCount-1].removeNotificationListener(pressListener); 70 if (notificationCount == numOfTests) { 71 finishJSTest(); 72 } 64 65 testIndex++; 66 testNextList(); 67 } 68 69 if (window.accessibilityController) { 70 jsTestIsAsync = true; 71 testNextList(); 73 72 } 74 73 </script>
Note: See TracChangeset
for help on using the changeset viewer.