Skip to content
Snippets Groups Projects
Commit 21437f85 authored by Andrea Marchesini's avatar Andrea Marchesini
Browse files

Bug 1463614 - Fix intermittent failure in test_timer.html, r=me

parent 16731e01
No related branches found
No related tags found
No related merge requests found
......@@ -21,16 +21,11 @@ function ConsoleListener() {
ConsoleListener.prototype = {
observe(aSubject, aTopic, aData) {
let obj = aSubject.wrappedJSObject;
if (obj.arguments[0] != 'test') {
if (obj.arguments[0] != "test_bug1463614") {
return;
}
if (!this._cb) {
ok(false, "Callback not set!");
return;
}
if (!this._cb(obj)) {
if (!this._cb || !this._cb(obj)) {
return;
}
......@@ -57,10 +52,10 @@ async function runTest() {
let cl = listener.waitFor(obj => {
return ("timer" in obj) &&
("name" in obj.timer) &&
obj.timer.name == 'test';
obj.timer.name == "test_bug1463614";
});
console.time('test');
console.time("test_bug1463614");
await cl;
ok(true, "Console.time received!");
......@@ -68,7 +63,7 @@ async function runTest() {
cl = listener.waitFor(obj => {
return ("timer" in obj) &&
("name" in obj.timer) &&
obj.timer.name == 'test' &&
obj.timer.name == "test_bug1463614" &&
("duration" in obj.timer) &&
obj.timer.duration >= 0 &&
obj.arguments[1] == 1 &&
......@@ -76,7 +71,7 @@ async function runTest() {
obj.arguments[3] == 3 &&
obj.arguments[4] == 4;
});
console.timeLog('test', 1, 2, 3, 4);
console.timeLog("test_bug1463614", 1, 2, 3, 4);
await cl;
ok(true, "Console.timeLog received!");
......@@ -84,11 +79,11 @@ async function runTest() {
cl = listener.waitFor(obj => {
return ("timer" in obj) &&
("name" in obj.timer) &&
obj.timer.name == 'test' &&
obj.timer.name == "test_bug1463614" &&
("duration" in obj.timer) &&
obj.timer.duration >= 0;
});
console.timeEnd('test');
console.timeEnd("test_bug1463614");
await cl;
ok(true, "Console.timeEnd received!");
......@@ -96,10 +91,10 @@ async function runTest() {
cl = listener.waitFor(obj => {
return ("timer" in obj) &&
("name" in obj.timer) &&
obj.timer.name == 'test' &&
obj.timer.name == "test_bug1463614" &&
("error" in obj.timer);
});
console.timeLog('test');
console.timeLog("test_bug1463614");
await cl;
ok(true, "Console.time with error received!");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment