<div id="should_be_hidden">This should be hidden by a css selector from the content extension.</div>
<div id="should_not_be_hidden">This should not be hidden.</div>
<script>

if (window.testRunner) {
    testRunner.waitUntilDone();
    testRunner.dumpAsText();
}

function endTest() {
    if (window.testRunner)
        testRunner.notifyDone();
}

var ws = new WebSocket("ws://localhost:8880/websocket/tests/hybi/contentextensions/resources/echo");

ws.onopen = function() { 
    console.log("onopen");
    ws.send("sent"); 
}
ws.onmessage = function(message) { 
    console.log("onmessage " + message.data);
}
ws.onclose = function() {
    console.log("onclose");
    endTest();
}
ws.onerror = function() { 
    console.log("onerror"); 
    endTest(); 
}

setTimeout(function() { 
    console.log("timeout"); 
    endTest();
}, 3000);

</script>
