Skip to content

Commit

Permalink
Merge pull request #2 from bkardell/master
Browse files Browse the repository at this point in the history
various tweaks based on review comments
  • Loading branch information
bkardell authored Aug 1, 2019
2 parents 0d37523 + 178a8ee commit 6d77311
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,32 @@
</head>
<body>
<span>This tests the presence and functionality of features of the `ElementCSSInlineStyle` interface for MathMLElements</span>
<math>
<mi>E</mi>
</math>
<math></math>
</body>
<script>

let mathEl = document.querySelector("math");

test(function() {
mathEl.style.backgroundColor = "green"
assert_equals(
getComputedStyle(mathEl).backgroundColor,
"rgb(0, 255, 0)",
"The applied background should be green."
);
}, `The <math> element style property should be present and be functional.`);



Object.keys(MathMLFragments).forEach((elName) => {
mathEl.innerHTML = MathMLFragments[elName]
mathEl.style.backgroundColor = "green"
mathEl.style.display = "block"

test(function() {
let el = mathEl.firstElementChild
el.style.backgroundColor = "blue";
el.style.backgroundColor = "blue"

// guarantee that it isn't display: none somehow
el.style.display = "block"
assert_equals(
getComputedStyle(el).backgroundColor,
"rgb(0, 0, 255)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
test(function() {
assert_equals(
mathEl.tabIndex,
-1,
"MathML elements should have a tabIndex property"
-1
);
}, "MathML elements should have a tabIndex property");

Expand Down

0 comments on commit 6d77311

Please sign in to comment.