<script src="common.js"></script>
<h1 id="status">Close BG Page</h1>
<div style="display:none" id="pageToScriptTunnel"></div>
<div style="display:none" id="scriptToPageTunnel"></div>
<script>
var backgroundWindow;
window.onload = function() {
// This page just closes an existing BG window.
setupScriptTunnel();
backgroundWindow = window.open('bg.html', 'bg', 'background');
if (backgroundWindow) {
setStatus('closing background page');
backgroundWindow.close();
notifyBackgroundPageClosed();
} else {
notifyBackgroundPagePermissionDenied();
setStatus('background page permission denied');
}
}
</script>