chromium/third_party/blink/web_tests/fast/events/button-mouse-active.html

<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

window.onload = function() {
    if (window.eventSender) {
        var button = document.getElementById('button');
        eventSender.mouseMoveTo(button.offsetLeft + button.offsetWidth / 2,
            button.offsetTop + button.offsetTop / 2);

        eventSender.mouseDown();
        shouldBeEqualToString('getComputedStyle(button).backgroundColor', 'rgb(0, 255, 0)');

        eventSender.mouseUp();
        shouldBeEqualToString('getComputedStyle(button).backgroundColor', 'rgb(0, 0, 255)');
    }
};
</script>
<style>
button { background-color: rgb(0, 0, 255); }
button:active { background-color: rgb(0, 255, 0); }
</style>
<button id="button">button</button>
<div id="console"></div>