Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / inspector / network / x-frame-options-deny.html
blob079775a936f4a41a358446769b633bc2e72361f3
1 <html>
2 <head>
3 <script src="../inspector-test.js"></script>
4 <script>
5 function loadIFrameWithDownload()
7 var iframe = document.createElement("iframe");
8 iframe.setAttribute("src", "http://127.0.0.1:8000/security/XFrameOptions/resources/x-frame-options-deny.cgi");
9 document.body.appendChild(iframe);
12 function test()
14 InspectorTest.addSniffer(WebInspector.NetworkDispatcher.prototype, "responseReceived", responseReceived);
15 InspectorTest.addSniffer(WebInspector.NetworkDispatcher.prototype, "loadingFailed", loadingFailed);
16 InspectorTest.addSniffer(WebInspector.NetworkDispatcher.prototype, "loadingFinished", loadingFinished);
17 InspectorTest.evaluateInPage("loadIFrameWithDownload()");
19 function responseReceived(requestId, time, resourceType, response)
21 var request = InspectorTest.networkLog.requestForId(requestId);
22 if (/x-frame-options-deny\.cgi/.exec(request.url)) {
23 InspectorTest.addResult("Received response for x-frame-options-deny.cgi");
24 InspectorTest.addResult("SUCCESS");
25 InspectorTest.completeTest();
29 function loadingFinished(requestId, finishTime)
31 var request = InspectorTest.networkLog.requestForId(requestId);
32 if (/x-frame-options-deny\.cgi/.exec(request.url))
33 InspectorTest.completeTest();
36 function loadingFailed(requestId, time, localizedDescription, canceled)
38 var request = InspectorTest.networkLog.requestForId(requestId);
39 if (/x-frame-options-deny\.cgi/.exec(request.url))
40 InspectorTest.completeTest();
43 </script>
44 </head>
45 <body onload="runTest()">
46 <p>Tests that responseReceived is called on NetworkDispatcher for resource requests denied due to X-Frame-Options header.</p>
47 </body>
48 </html>