Commit 25a074d3 authored by Carsten "Tomcat" Book's avatar Carsten "Tomcat" Book
Browse files

merge mozilla-inbound to mozilla-central a=merge

parents 6acc7fef 1560ed91
Loading
Loading
Loading
Loading

.cargo/config.in

0 → 100644
+6 −0
Original line number Diff line number Diff line
[source.crates-io]
registry = 'https://github.com/rust-lang/crates.io-index'
replace-with = 'vendored-sources'

[source.vendored-sources]
directory = '@top_srcdir@/third_party/rust'
+10 −3
Original line number Diff line number Diff line
@@ -445,10 +445,17 @@ EventTree::Mutated(AccMutationEvent* aEv)
  // discard those subtree mutations as we are no longer interested in them.
  UniquePtr<EventTree>* node = &mFirst;
  while (*node) {
    if ((*node)->mContainer == aEv->mAccessible) {
    Accessible* cntr = (*node)->mContainer;
    while (cntr != mContainer) {
      if (cntr == aEv->mAccessible) {
        *node = Move((*node)->mNext);
        break;
      }
      cntr = cntr->Parent();
    }
    if (cntr == aEv->mAccessible) {
      continue;
    }
    node = &(*node)->mNext;
  }

+16 −18
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ function eventQueue(aEventType)
              if (matchIdx == -1 || eventSeq.length > 0)
                matchIdx = scnIdx;

              // Report everythign is ok.
              // Report everything is ok.
              for (var idx = 0; idx < eventSeq.length; idx++) {
                var checker = eventSeq[idx];

@@ -346,15 +346,15 @@ function eventQueue(aEventType)
                  "' succeed. ";

                if (checker.unexpected) {
                  if (checker.todo) {
                    todo(false, "Event " + typeStr + " event is still missing");
                  ok(true, msg + `There's no unexpected '${typeStr}' event.`);
                }
                else {
                    ok(true, msg + "There's no unexpected " + typeStr + " event.");
                  }
                  if (checker.todo) {
                    todo(false, `Todo event '${typeStr}' was caught`);
                  }
                  else {
                  ok(true, msg + "Event " + typeStr + " was handled.");
                    ok(true, `${msg} Event '${typeStr}' was handled.`);
                  }
                }
              }
            }
@@ -378,15 +378,13 @@ function eventQueue(aEventType)
                ok(false, msg + "Dupe " + typeStr + " event.");

              if (checker.unexpected) {
                if (checker.todo) {
                  todo(checker.wasCaught,
                       "Event " + typeStr + " event is still missing");
                }
                else if (checker.wasCaught) {
                if (checker.wasCaught) {
                  ok(false, msg + "There's unexpected " + typeStr + " event.");
                }
              } else if (!checker.wasCaught) {
                ok(false, msg + typeStr + " event was missed.");
              }
              else if (!checker.wasCaught) {
                var rf = checker.todo ? todo : ok;
                rf(false, `${msg} '${typeStr} event is missed.`);
              }
            }
          }
@@ -596,6 +594,7 @@ function eventQueue(aEventType)

    while (aEventSeq.idx < aEventSeq.length &&
           (aEventSeq[aEventSeq.idx].unexpected ||
            aEventSeq[aEventSeq.idx].todo ||
            aEventSeq[aEventSeq.idx].async ||
            aEventSeq[aEventSeq.idx].wasCaught > 0)) {
      aEventSeq.idx++;
@@ -612,7 +611,8 @@ function eventQueue(aEventType)
      // Check if we have unhandled async (can be anywhere in the sequance) or
      // sync expcected events yet.
      for (var idx = 0; idx < aEventSeq.length; idx++) {
        if (!aEventSeq[idx].unexpected && !aEventSeq[idx].wasCaught)
        if (!aEventSeq[idx].unexpected && !aEventSeq[idx].todo &&
            !aEventSeq[idx].wasCaught)
          return true;
      }

@@ -636,7 +636,7 @@ function eventQueue(aEventType)
    for (var scnIdx = 0; scnIdx < this.mScenarios.length; scnIdx++) {
      var eventSeq = this.mScenarios[scnIdx];
      for (var idx = 0; idx < eventSeq.length; idx++) {
        if (eventSeq[idx].unexpected)
        if (eventSeq[idx].unexpected || eventSeq[idx].todo)
          return false;
      }
    }
@@ -648,7 +648,7 @@ function eventQueue(aEventType)
    function eventQueue_isUnexpectedEventsScenario(aScenario)
  {
    for (var idx = 0; idx < aScenario.length; idx++) {
      if (!aScenario[idx].unexpected)
      if (!aScenario[idx].unexpected && !aScenario[idx].todo)
        break;
    }

@@ -1686,8 +1686,6 @@ function todo_invokerChecker(aEventType, aTargetOrFunc, aTargetFuncArg)
{
  this.__proto__ = new invokerChecker(aEventType, aTargetOrFunc,
                                      aTargetFuncArg, true);

  this.unexpected = true;
  this.todo = true;
}

+44 −0
Original line number Diff line number Diff line
@@ -487,6 +487,41 @@
      };
    }

    /**
     * Insert text nodes under direct and grand children, and then hide
     * their container by means of aria-owns.
     *
     * Markup:
     * <div id="t7_moveplace" aria-owns="t7_c"></div>
     * <div id="t7_c">
     *   <div id="t7_c_directchild">ha</div>
     *   <div><div id="t7_c_grandchild">ha</div></div>
     * </div>
     */
    function test7()
    {
      this.eventSeq = [
        new todo_invokerChecker(EVENT_HIDE, getNode('t7_c')),
        new invokerChecker(EVENT_SHOW, getNode('t7_c')),
        new invokerChecker(EVENT_REORDER, getNode('t7')),
        new unexpectedInvokerChecker(EVENT_REORDER, getNode('t7_c_directchild')),
        new unexpectedInvokerChecker(EVENT_REORDER, getNode('t7_c_grandchild')),
        new unexpectedInvokerChecker(EVENT_SHOW, () => getNode('t7_c_directchild').firstChild),
        new unexpectedInvokerChecker(EVENT_SHOW, () => getNode('t7_c_grandchild').firstChild)
      ];

      this.invoke = function test7_invoke()
      {
        getNode('t7_c_directchild').textContent = 'ha';
        getNode('t7_c_grandchild').textContent = 'ha';
        getNode('t7_moveplace').setAttribute('aria-owns', 't7_c');
      };

      this.getID = function test7_getID() {
        return "Show child accessibles and then hide their container";
      };
    }

    ////////////////////////////////////////////////////////////////////////////
    // Do tests.

@@ -519,6 +554,7 @@
      gQueue.push(new test4());
      gQueue.push(new test5());
      gQueue.push(new test6());
      gQueue.push(new test7());

      gQueue.invoke(); // Will call SimpleTest.finish();
    }
@@ -612,5 +648,13 @@

  <div id="t6">
  </div>

  <div id="t7">
    <div id="t7_moveplace"></div>
    <div id="t7_c">
      <div><div id="t7_c_grandchild"></div></div>
      <div id="t7_c_directchild"></div>
    </div>
  </div>
</body>
</html>
+9 −12
Original line number Diff line number Diff line
@@ -4,26 +4,23 @@
const gBaseURL = "https://example.com/browser/browser/base/content/test/general/";

add_task(function *() {
  let tab = gBrowser.addTab();
  let browser = gBrowser.getBrowserForTab(tab);
  let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, gBaseURL + "subtst_contextmenu.html");

  gBrowser.selectedTab = tab;
  yield promiseTabLoadEvent(tab, gBaseURL + "subtst_contextmenu.html");

  let popupShownPromise = promiseWaitForEvent(window, "popupshown", true);
  let contextMenu = document.getElementById("contentAreaContextMenu");

  // Get the point of the element with the page menu (test-pagemenu) and
  // synthesize a right mouse click there.
  let eventDetails = { type : "contextmenu", button : 2 };
  let rect = browser.contentWindow.document.getElementById("test-pagemenu").getBoundingClientRect();
  EventUtils.synthesizeMouse(browser, rect.x + rect.width / 2, rect.y + rect.height / 2, eventDetails, window);

  let popupShownPromise = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
  yield BrowserTestUtils.synthesizeMouse("#test-pagemenu", 5, 5, { type : "contextmenu", button : 2 }, tab.linkedBrowser);
  let event = yield popupShownPromise;

  let contextMenu = document.getElementById("contentAreaContextMenu");
  checkMenu(contextMenu);

  let popupHiddenPromise = BrowserTestUtils.waitForEvent(contextMenu, "popuphidden");
  contextMenu.hidePopup();
  gBrowser.removeCurrentTab();
  yield popupHiddenPromise;

  yield BrowserTestUtils.removeTab(tab);
});

function checkItems(menuitem, arr)
Loading