blob: 17abdf16893053bb230cfd89f0e9dd40bc94de55 [file] [log] [blame]
<html>
<head>
<script src="../inspector-test.js"></script>
<script>
function loadStylesheet()
{
var css = document.createElement("link");
css.rel = "stylesheet";
css.type = "text/css";
css.href = "resources/style.css";
document.head.appendChild(css);
}
function test()
{
WebInspector.workspace.addEventListener(WebInspector.UISourceCodeProvider.Events.UISourceCodeAdded, step2);
InspectorTest.evaluateInPage("loadStylesheet()");
var resource;
function step2(event)
{
var eventUISourceCode = event.data;
if (eventUISourceCode.originURL().indexOf("style.css") == -1)
return;
var request = WebInspector.panel("network").requests[WebInspector.panel("network").requests.length - 1];
uiSourceCode = WebInspector.workspace.uiSourceCodeForOriginURL(request.url);
if (!uiSourceCode)
return;
uiSourceCode.addRevision("");
uiSourceCode.history[0].requestContent(step3);
}
function step3(content)
{
InspectorTest.addResult(uiSourceCode.originURL());
InspectorTest.addResult(content);
InspectorTest.completeTest();
}
}
</script>
</head>
<body onload="runTest()">
<p>Tests how revision requests content if original content was not loaded yet.</p>
<a href="https://bugs.webkit.org/show_bug.cgi?id=63631">Bug 63631</a>
</body>
</html>