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

Unified Diff: third_party/WebKit/LayoutTests/inspector/extensions/extensions-timeline-api.html

Issue 2128133002: Timeline AddTraceProvider API Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into record Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/extensions/extensions-timeline-api.html
diff --git a/third_party/WebKit/LayoutTests/inspector/extensions/extensions-timeline-api.html b/third_party/WebKit/LayoutTests/inspector/extensions/extensions-timeline-api.html
new file mode 100644
index 0000000000000000000000000000000000000000..1ed18900af5309b107333ca73411ffd3e217eb9f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/extensions/extensions-timeline-api.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/extensions-test.js"></script>
+<script src="../../http/tests/inspector/timeline-test.js"></script>
+
+<script type="text/javascript">
+function extension_testTimeline(nextTest)
+{
+ function onRecordingStarted()
+ {
+ output("traceProvider.onRecordingStarted fired.");
+ }
+ function onRecordingStopped()
+ {
+ output("traceProvider.onRecordingStopped fired.");
+ nextTest();
+ }
+ var traceProvider = webInspector.timeline.addTraceProvider("extension trace provider", "tooltip");
+ dumpObject(traceProvider);
+ traceProvider.onRecordingStarted.addListener(onRecordingStarted);
+ traceProvider.onRecordingStopped.addListener(onRecordingStopped);
+ extension_startTimeline(() => extension_stopTimeline(() => {}));
+}
+
+function extension_startTimeline(callback)
+{
+ evaluateOnFrontend("InspectorTest.startTimeline(reply);", callback);
+}
+
+function extension_stopTimeline(callback)
+{
+ evaluateOnFrontend("InspectorTest.stopTimeline(reply);", callback);
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests timeline support in WebInspector Extensions API</p>
+<span id="test-element"><b></b></span>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698