Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use asynchronous test to check MathMLElement onevent attributes #19500

Closed
fred-wang opened this issue Oct 4, 2019 · 1 comment · Fixed by #19534
Closed

Don't use asynchronous test to check MathMLElement onevent attributes #19500

fred-wang opened this issue Oct 4, 2019 · 1 comment · Fixed by #19534

Comments

@fred-wang
Copy link
Contributor

cc @rwlbuis @bkardell

In mathml/relations/html5-tree/clipboard-event-handlers.tentative.html
and mathml/relations/html5-tree/math-global-event-handlers.tentative.html

@bzbarsky suggested we used the following instead:

var callbackCalled = false;
function callback() {
      callbackCalled = true;
}
doStuffThatShouldCallCallback();
assert_true(callbackCalled);
@bzbarsky
Copy link
Contributor

bzbarsky commented Oct 4, 2019

So concretely, in math-global-event-handlers.tentative.html the code could be:

    test(() => {
      const element = document.createElementNS(
        "http://www.w3.org/1998/Math/MathML",
        "math"
      );
      let target = undefined;
      element[name] = (e) => {
        target = e.currentTarget;
      });

      element.dispatchEvent(new Event(withoutOn));
      assert_equals(target, element,
                             "The event must be fired at the <math> element");
    }, `${name}: dispatching an Event at a <math> element must trigger element.${name}`);

in place of the current async_test bit.

fred-wang added a commit that referenced this issue Oct 5, 2019
- Don't use asynchronous test to check MathMLElement onevent attributes.
  closes #19500
- Only test tab-navigation of MathML links when HTML links are tab-navigable.
  https://github.com/mathml-refresh/mathml/issues/152
  https://github.com/Igalia/chromium-dev/issues/50
  https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30
fred-wang added a commit that referenced this issue Oct 7, 2019
* Miscellaneous improvements to MathML DOM tests

- Don't use asynchronous test to check MathMLElement onevent attributes.
  closes #19500
- Only test tab-navigation of MathML links when HTML links are tab-navigable.
  https://github.com/mathml-refresh/mathml/issues/152
  https://github.com/Igalia/chromium-dev/issues/50
  https://bugzilla.mozilla.org/show_bug.cgi?id=1571487#c30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants