Extend and improve modify-attributes-in-callback.html.
- Use cleanup functions to guarantee the state of the DOM tree before
each test. - Make more explicit why the length of the div's attribute list is
expected to be 2. - Add 2 tests for https://g-issues.chromium.org/issues/333739948
using setAttributeNS instead of setAttribute.
Differential Revision: https://phabricator.services.mozilla.com/D228776
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1925468
gecko-commit: 094b1d5348abe71e660808ee868437dea33d2b5f
gecko-reviewers: smaug