Unreviewed, rolling out r142113.
[WebKit-https.git] / LayoutTests / inspector / profiler / memory-instrumentation-canvas.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="memory-instrumentation-test.js"></script>
5 <script>
6
7 function displayAndRunTest()
8 {
9     var canvasContext = document.getElementById("canvas").getContext("2d");
10     canvasContext.fillRect(0, 0, 1024, 1024);
11
12     if (window.testRunner)
13         testRunner.display();
14     runTest();
15 }
16
17 function test()
18 {
19     var canvasImageBufferExpected = 4000000;
20     InspectorTest.validateMemoryBlockSize(["ProcessPrivateMemory", "Page", "Image"], canvasImageBufferExpected);
21 }
22
23 </script>
24 </head>
25
26 <body onload="displayAndRunTest()">
27 <p>
28 This test checks that page's image size reported by the memory agent includes size of canvas internal image buffer.
29 </p>
30 <canvas id="canvas" width="1024" height="1024"></canvas>
31 </body>
32 </html>