Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: LayoutTests/inspector/profiler/canvas2d/canvas-stack-trace.html

Issue 1073863003: DevTools: remove Canvas profiler from DevTools source base. See details in the bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tests gone Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../canvas-profiler-test.js"></script>
5 <script>
6
7 var canvas;
8 var context;
9
10 function createCanvasContext()
11 {
12 canvas = document.getElementById("canvas");
13 context = canvas.getContext("2d");
14 console.assert(context, "Failed to create a canvas context");
15 }
16
17 function doSomeCanvasCalls()
18 {
19 context.beginPath();
20 context.rect(0, 0, 100, 100);
21 context.fillStyle = 'red';
22 context.fill();
23 }
24
25 function test()
26 {
27 var traceLogId;
28 InspectorTest.enableCanvasAgent(step1);
29 function step1()
30 {
31 InspectorTest.evaluateInPage("createCanvasContext()", step2);
32 }
33 function step2()
34 {
35 InspectorTest.CanvasAgent.startCapturing(didStartCapturing);
36 }
37 function didStartCapturing(error, id)
38 {
39 InspectorTest.assertTrue(!error && !!id, "Unexpected error: " + error);
40 traceLogId = id;
41 InspectorTest.evaluateInPage("doSomeCanvasCalls()", didSomeCanvasCalls);
42 }
43 function didSomeCanvasCalls()
44 {
45 InspectorTest.CanvasAgent.getTraceLog(traceLogId, 0, undefined, didRecei veTraceLog);
46 }
47 function didReceiveTraceLog(error, traceLog)
48 {
49 InspectorTest.assertTrue(!error && !!traceLog, "Unexpected error: " + er ror);
50 InspectorTest.addResult("");
51 InspectorTest.dumpTraceLog(traceLog);
52 InspectorTest.completeTest();
53 }
54 }
55
56 </script>
57 </head>
58 <body onload="runTest()">
59 <p>
60 Tests stack traces in the Canvas TraceLog results.
61 </p>
62 <a href="https://bugs.webkit.org/show_bug.cgi?id=107805">Bug 107805</a>
63 <canvas id="canvas"></canvas>
64 </body>
65 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698