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

Unified Diff: test/inspector/cpu-profiler/coverage.js

Issue 2723003007: [debugger] remove default count for top-level functions. (Closed)
Patch Set: fix url Created 3 years, 10 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
« no previous file with comments | « src/debug/debug-coverage.cc ('k') | test/inspector/cpu-profiler/coverage-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/cpu-profiler/coverage.js
diff --git a/test/inspector/cpu-profiler/coverage.js b/test/inspector/cpu-profiler/coverage.js
index 2ec24758444cec3afadca61e3ade62143fcded94..11c34521b7620955963afe197d4b7c4762534332 100644
--- a/test/inspector/cpu-profiler/coverage.js
+++ b/test/inspector/cpu-profiler/coverage.js
@@ -17,8 +17,11 @@ fib(5);
InspectorTest.log("Test collecting code coverage data with Profiler.collectCoverage.");
function ClearAndGC() {
- return Protocol.Runtime.evaluate({ expression: "fib = null;" })
- .then(() => Protocol.HeapProfiler.enable())
+ return Protocol.Runtime.evaluate({ expression: "fib = null;" }).then(GC);
+}
+
+function GC() {
+ return Protocol.HeapProfiler.enable()
.then(() => Protocol.HeapProfiler.collectGarbage())
.then(() => Protocol.HeapProfiler.disable());
}
@@ -29,6 +32,24 @@ function LogSorted(message) {
}
InspectorTest.runTestSuite([
+ function testPreciseBaseline(next)
+ {
+ Protocol.Runtime.enable()
+ .then(() => Protocol.Runtime.compileScript({ expression: source, sourceURL: "0", persistScript: true }))
+ .then((result) => Protocol.Runtime.runScript({ scriptId: result.result.scriptId }))
+ .then(GC)
+ .then(Protocol.Profiler.enable)
+ .then(Protocol.Profiler.startPreciseCoverage)
+ .then(Protocol.Profiler.takePreciseCoverage)
+ .then(LogSorted)
+ .then(Protocol.Profiler.takePreciseCoverage)
+ .then(LogSorted)
+ .then(Protocol.Profiler.stopPreciseCoverage)
+ .then(ClearAndGC)
+ .then(Protocol.Profiler.disable)
+ .then(Protocol.Runtime.disable)
+ .then(next);
+ },
function testPreciseCoverage(next)
{
Protocol.Runtime.enable()
« no previous file with comments | « src/debug/debug-coverage.cc ('k') | test/inspector/cpu-profiler/coverage-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698