chromium/chrome/test/data/page_with_focus_events.html

<!DOCTYPE html>
<html>
<head>
<script>

var popup;

function openPopup(url, name) {
  popup = window.open(url, name);
}

function focusPopup(url) {
  popup.focus();
}

window.addEventListener('focus', function() {
  domAutomationController.send(window.name + '-got-focus');
});

window.addEventListener('blur', function() {
  domAutomationController.send(window.name + '-lost-focus');
});

</script>
</head>

<body>
This page has focus and blur window events.
</body>
</html>