Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / extensions / extensions-network.html
blob7a78707eb806adb4bd9ac24d084383a958137939
1 <html>
2 <head>
3 <link rel="stylesheet" href="resources/audits-style1.css" type="text/css">
4 <style>
5 @font-face {
6 font-family: 'test';
7 src: url(../../resources/Ahem.ttf);
10 p { font-family: 'test'; }
11 </style>
13 <script src="../../http/tests/inspector/inspector-test.js"></script>
14 <script src="../../http/tests/inspector/extensions-test.js"></script>
15 <script src="../../http/tests/inspector/extensions-network-test.js"></script>
16 <script type="text/javascript">
18 function extension_testGetHAR(nextTest)
20 function compareEntries(a, b)
22 return a.request.url.toLowerCase().localeCompare(b.request.url.toLowerCase());
25 function onHAR(result)
27 result.entries.sort(compareEntries);
29 for (var i = 0; i < result.entries.length; ++i)
30 output("resource: " + result.entries[i].request.url.replace(/.*((\/[^/]*){3}$)/,"...$1"));
32 extension_doXHR(function() {
33 webInspector.network.getHAR(callbackAndNextTest(onHAR, nextTest));
34 });
37 function doXHR()
39 var xhr = new XMLHttpRequest();
40 xhr.open("GET", "", false);
41 xhr.send(null);
44 function extension_doXHR(callback)
46 webInspector.inspectedWindow.eval("doXHR()", callback);
49 function extension_testRequestNotification(nextTest)
51 function onRequestFinished(request)
53 output("Request finished: " + request.request.url.replace(/.*((\/[^/]*){3}$)/,"...$1"));
56 webInspector.network.onRequestFinished.addListener(callbackAndNextTest(onRequestFinished, nextTest));
57 extension_doXHR();
60 function extension_onRequestBody(content, encoding)
62 dumpObject(Array.prototype.slice.call(arguments));
65 function extension_testGetRequestContent(nextTest)
67 extension_getRequestByUrl([/audits-style1.css$/], function(request) {
68 request.getContent(callbackAndNextTest(extension_onRequestBody, nextTest));
69 });
72 function extension_testGetResourceContentEncoded(nextTest)
74 extension_getRequestByUrl([/abe.png$/ ], function(request) {
75 request.getContent(callbackAndNextTest(extension_onRequestBody, nextTest));
76 });
79 var test = function()
81 InspectorTest.reloadPage(InspectorTest.runExtensionTests);
84 </script>
85 </head>
86 <body onload="runTest()">
87 <p>Tests WebInspector extension API</p>
88 <img src="resources/abe.png">
89 <img src="resources/missing-image.png">
90 </body>
91 </html>