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

Unified Diff: test/inspector/runtime/coverage.js

Issue 2718543005: [inspector] fix coverage test flakiness. (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/runtime/coverage.js
diff --git a/test/inspector/runtime/coverage.js b/test/inspector/runtime/coverage.js
index dff7eca3893aba64916735700fa68dbb4e96efda..0aa5da7318fa8168e72fd5dd4ca65ab3e1f73b35 100644
--- a/test/inspector/runtime/coverage.js
+++ b/test/inspector/runtime/coverage.js
@@ -23,6 +23,11 @@ function ClearAndGC() {
.then(() => Protocol.HeapProfiler.disable());
}
+function LogSorted(message) {
+ message.result.result.sort((a, b) => parseInt(a.scriptId) - parseInt(b.scriptId));
+ return InspectorTest.logMessage(message);
+}
+
InspectorTest.runTestSuite([
function testPreciseCoverage(next)
{
@@ -33,9 +38,9 @@ InspectorTest.runTestSuite([
.then(ClearAndGC)
.then(InspectorTest.logMessage)
.then(Protocol.Runtime.takePreciseCoverage)
- .then(InspectorTest.logMessage)
+ .then(LogSorted)
.then(Protocol.Runtime.takePreciseCoverage)
- .then(InspectorTest.logMessage)
+ .then(LogSorted)
.then(ClearAndGC)
.then(Protocol.Runtime.stopPreciseCoverage)
.then(Protocol.Runtime.disable)
@@ -62,9 +67,9 @@ InspectorTest.runTestSuite([
.then(InspectorTest.logMessage)
.then(ClearAndGC)
.then(Protocol.Runtime.getBestEffortCoverage)
- .then(InspectorTest.logMessage)
+ .then(LogSorted)
.then(Protocol.Runtime.getBestEffortCoverage)
- .then(InspectorTest.logMessage)
+ .then(LogSorted)
.then(ClearAndGC)
.then(Protocol.Runtime.disable)
.then(next);
@@ -78,9 +83,9 @@ InspectorTest.runTestSuite([
.then(InspectorTest.logMessage)
.then(ClearAndGC)
.then(Protocol.Runtime.getBestEffortCoverage)
- .then(InspectorTest.logMessage)
+ .then(LogSorted)
.then(Protocol.Runtime.getBestEffortCoverage)
- .then(InspectorTest.logMessage)
+ .then(LogSorted)
.then(ClearAndGC)
.then(Protocol.Runtime.stopPreciseCoverage)
.then(Protocol.Runtime.disable)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698