3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../canvas-profiler-test.js"></script>
9 function createCanvasElement()
11 canvas = document.createElement("canvas");
12 console.assert(canvas, "Failed to create a canvas element");
15 function getCanvasContext()
17 var context = canvas.getContext("2d");
18 console.assert(context, "Failed to create a canvas context");
23 InspectorTest.evaluateInConsole("createCanvasElement()", step1);
26 InspectorTest.enableCanvasAgent(step2);
30 CanvasAgent.hasUninstrumentedCanvases(hasUninstrumentedCanvasesCallback1);
32 function hasUninstrumentedCanvasesCallback1(error, result)
34 InspectorTest.addResult("hasUninstrumentedCanvases: " + result);
35 InspectorTest.assertTrue(!error, "Unexpected error");
36 InspectorTest.assertEquals(false, result, "There should be no uninstrumented canvases");
37 InspectorTest.disableCanvasAgent(step3);
41 InspectorTest.evaluateInConsole("getCanvasContext()", step4);
45 InspectorTest.enableCanvasAgent(step5);
49 CanvasAgent.hasUninstrumentedCanvases(hasUninstrumentedCanvasesCallback2);
51 function hasUninstrumentedCanvasesCallback2(error, result)
53 InspectorTest.addResult("hasUninstrumentedCanvases: " + result);
54 InspectorTest.assertTrue(!error, "Unexpected error");
55 InspectorTest.assertEquals(true, result, "There is an uninstrumented canvas!");
56 InspectorTest.completeTest();
62 <body onload="runTest()">
64 Tests Canvas hasUninstrumentedCanvases protocol method.
66 <a href="https://bugs.webkit.org/show_bug.cgi?id=105721">Bug 105721</a>