forked from jsantell/firefox-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1104973-fix-perf-test.patch
44 lines (36 loc) · 1.44 KB
/
1104973-fix-perf-test.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From e0becbd135c8d344ac9b0c933b171e6f9a335186 Mon Sep 17 00:00:00 2001
From: Jordan Santell <[email protected]>
Date: Tue, 25 Nov 2014 13:29:12 -0800
Subject: Bug 1104973 - Fix browser_perf-data-samples.js with having
atleast one assertion called. r=vp
---
browser/devtools/performance/test/browser_perf-data-samples.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/browser/devtools/performance/test/browser_perf-data-samples.js b/browser/devtools/performance/test/browser_perf-data-samples.js
index d3ec2b6..899a925 100644
--- a/browser/devtools/performance/test/browser_perf-data-samples.js
+++ b/browser/devtools/performance/test/browser_perf-data-samples.js
@@ -14,21 +14,26 @@ function spawnTest () {
let front = panel.panelWin.gFront;
yield front.startRecording();
busyWait(WAIT_TIME); // allow the profiler module to sample some cpu activity
let recordingData = yield front.stopRecording();
let profile = recordingData.profilerData.profile;
+ let sampleCount = 0;
+
for (let thread of profile.threads) {
info("Checking thread: " + thread.name);
for (let sample of thread.samples) {
+ sampleCount++;
if (sample.frames[0].location != "(root)") {
ok(false, "The sample " + sample.toSource() + " doesn't have a root node.");
}
}
}
+ ok(sampleCount > 0, "Atleast some samples have been iterated over, checking for root nodes.");
+
yield teardown(panel);
finish();
}
--
1.8.4.2