blob: 18b86ea4ec6fbf87f423c924b9537cc7b6fffc09 [file] [log] [blame]
<html>
<head>
<script src="console-test.js"></script>
<script src="inspector-test.js"></script>
<script>
function test()
{
InspectorTest.showConsolePanel();
var selector = WebInspector.consoleView._frameSelector._selectElement;
var option = selector.firstChild;
while (option) {
if (option.textContent && option.textContent.indexOf("myIFrame") === 0)
break;
option = option.nextSibling;
}
if (!option) {
InspectorTest.addResult("FAILED: myIFrame not found in the context list");
InspectorTest.completeTest();
return;
}
option.selected = true;
WebInspector.consoleView._frameChanged();
InspectorTest.evaluateInConsoleAndDump("foo", finish);
function finish()
{
InspectorTest.completeTest();
}
}
</script>
</head>
<body>
<p>
Tests that console evaluation can be performed in an iframe context.<a href="https://bugs.webkit.org/show_bug.cgi?id=19872">Bug 19872.</a>
</p>
<iframe name="myIFrame" src="http://localhost:8000/inspector/resources/console-cd-iframe.html" onload="runTest()"></iframe>
</body>
</html>