Bug 1322593 - Allow asynchronous checking of text change events. r=yzen, a=gchang
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Thu, 19 Jan 2017 16:37:09 -0500
changeset 378148 eb3fc0d1eacef3105b18bfd8aceb5765f7ac6ef8
parent 378147 babb718be60a568a490fb1458c069a3feebdd504
child 378149 1c35b1fd511d7fc928f51cc9c19bd1bdbd758efc
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzen, gchang
bugs1322593
milestone53.0a2
Bug 1322593 - Allow asynchronous checking of text change events. r=yzen, a=gchang This allows us to check for multiple text change events that could come in any order.
accessible/tests/mochitest/events.js
--- a/accessible/tests/mochitest/events.js
+++ b/accessible/tests/mochitest/events.js
@@ -1758,23 +1758,24 @@ function nofocusChecker(aID)
   this.__proto__ = new focusChecker(aID);
   this.unexpected = true;
 }
 
 /**
  * Text inserted/removed events checker.
  * @param aFromUser  [in, optional] kNotFromUserInput or kFromUserInput
  */
-function textChangeChecker(aID, aStart, aEnd, aTextOrFunc, aIsInserted, aFromUser)
+function textChangeChecker(aID, aStart, aEnd, aTextOrFunc, aIsInserted, aFromUser, aAsync)
 {
   this.target = getNode(aID);
   this.type = aIsInserted ? EVENT_TEXT_INSERTED : EVENT_TEXT_REMOVED;
   this.startOffset = aStart;
   this.endOffset = aEnd;
   this.textOrFunc = aTextOrFunc;
+  this.async = aAsync;
 
   this.match = function stextChangeChecker_match(aEvent)
   {
     if (!(aEvent instanceof nsIAccessibleTextChangeEvent) ||
         aEvent.accessible !== getAccessible(this.target)) {
       return false;
     }