summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/inspector/file-reader-with-network-panel.html
blob: 49a659db815334ee66ec0cf6100d771860d3c775 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
<head>
<script src="../http/tests/inspector/inspector-test.js"></script>
<script src="../http/tests/inspector/network-test.js"></script>
<script>
function readBlob()
{
    var reader = new FileReader();
    reader.onloadend = function () {
        console.log('done');
    };
    reader.readAsArrayBuffer(new Blob([ 'test' ]));
}

function test()
{
    InspectorTest.resetInspectorResourcesData(main);

    function main()
    {
        InspectorTest.addConsoleSniffer(messageAdded);
        InspectorTest.evaluateInPage("readBlob();");
    }

    function messageAdded(payload)
    {
        InspectorTest.addResult("requests in the network panel: " + WebInspector.panel("network").requests.length);
        InspectorTest.assertTrue(WebInspector.panel("network").requests.length == 0, "Blob load request to the browser is shown in the network panel.");
        InspectorTest.completeTest();
    }
}

</script>
</head>
<body onload="runTest()">
<p>Tests that FileReader's Blob request isn't shown in network panel.</p>
</body>
</html>