haikuwebkit/LayoutTests/inspector/page/main-frame-resource.html

22 lines
596 B
HTML

<!doctype html>
<html>
<head>
<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
<script>
function test()
{
WI.Frame.addEventListener(WI.Frame.Event.MainResourceDidChange, function(event) {
var url = WI.networkManager.mainFrame.url;
InspectorTest.log("Main frame: " + url.substring(url.lastIndexOf("/") + 1));
InspectorTest.completeTest();
});
InspectorTest.reloadPage();
}
</script>
</head>
<body onload="runTest()">
<p>Testing that the inspector scripts are loaded and the main frame URL can be received.</p>
</body>
</html>