Bug 1104973 - Fix browser_perf-data-samples.js with having atleast one assertion called. r=vp
authorJordan Santell <jsantell@gmail.com>
Tue, 25 Nov 2014 13:30:00 +0100
changeset 217675 81b55d99c4228f488a7f21b44af34d3695a20735
parent 217674 9e9df8e2e7e57a861c478a055ba900537d7eba96
child 217676 2273193cc52582acd6d89f4963c10d191866815e
push id27887
push userryanvm@gmail.com
push dateThu, 27 Nov 2014 02:08:38 +0000
treeherdermozilla-central@c63e741bca2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvp
bugs1104973
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
--- 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();
 }