Bug 1341045 - Use checked class instead of introducing active class. r=jryans

MozReview-Commit-ID: 6fC7hVRSvjh

--HG--
extra : rebase_source : a6051a964f42a22137f6128cd57a82e3701d463b
This commit is contained in:
Tim Nguyen 2017-02-25 15:42:26 +00:00
parent 4a0c3cbbd6
commit d762bbe438
4 changed files with 6 additions and 7 deletions

View File

@ -50,7 +50,7 @@ module.exports = createClass({
let touchButtonClass = "toolbar-button devtools-button";
if (touchSimulation.enabled) {
touchButtonClass += " active";
touchButtonClass += " checked";
}
return dom.header(

View File

@ -83,8 +83,7 @@ body,
background: none;
}
.toolbar-button:active::before,
.toolbar-button.active::before {
.toolbar-button:active::before {
filter: var(--checked-icon-filter);
}

View File

@ -171,17 +171,17 @@ function testTouchButton(ui) {
let { document } = ui.toolWindow;
let touchButton = document.querySelector("#global-touch-simulation-button");
ok(touchButton.classList.contains("active"),
ok(touchButton.classList.contains("checked"),
"Touch simulation is active at end of test.");
touchButton.click();
ok(!touchButton.classList.contains("active"),
ok(!touchButton.classList.contains("checked"),
"Touch simulation is stopped on click.");
touchButton.click();
ok(touchButton.classList.contains("active"),
ok(touchButton.classList.contains("checked"),
"Touch simulation is started on click.");
}

View File

@ -371,7 +371,7 @@ function* testTouchEventsOverride(ui, expected) {
let flag = yield ui.emulationFront.getTouchEventsOverride();
is(flag === Ci.nsIDocShell.TOUCHEVENTS_OVERRIDE_ENABLED, expected,
`Touch events override should be ${expected ? "enabled" : "disabled"}`);
is(touchButton.classList.contains("active"), expected,
is(touchButton.classList.contains("checked"), expected,
`Touch simulation button should be ${expected ? "" : "in"}active.`);
}