Bug 1090913 - Make mochitests fail when it has 0 passes and 0 fails r=jmaher

This commit is contained in:
Michael Ratcliffe 2014-11-05 16:00:52 +00:00
parent 6df42325a9
commit 926bf1ca5d
51 changed files with 144 additions and 139 deletions

View File

@ -31,7 +31,6 @@ skip-if = os == "mac" # Intermittent failures, bug 898317
[browser_newtab_reflow_load.js]
support-files =
content-reflows.js
[browser_newtab_reset.js]
[browser_newtab_search.js]
support-files =
searchEngineNoLogo.xml
@ -42,7 +41,6 @@ support-files =
../general/searchSuggestionEngine.xml
../general/searchSuggestionEngine.sjs
[browser_newtab_sponsored_icon_click.js]
[browser_newtab_tabsync.js]
[browser_newtab_undo.js]
[browser_newtab_unpin.js]
[browser_newtab_update.js]

View File

@ -37,6 +37,12 @@ function runTests() {
// for the hidden newtab docshell.
let tab = gWindow.gBrowser.addTab("about:blank");
yield addNewTabPageTab();
// When newtab is loaded very quickly (which is what happens in 99% of cases)
// there is no need to wait so no tests are run. Because each test requires
// either a pass, fail or todo we run a dummy test here.
ok(true, "Each test requires at least one pass, fail or todo so here is a pass.");
let swapWaitCount = 0;
let swapped = imports.BrowserNewTabPreloader.newTab(tab);
while (!swapped) {

View File

@ -28,6 +28,8 @@ function runTests() {
// Clean up.
gBrowser.removeCurrentTab({animate: false});
ok(true, "Each test requires at least one pass, fail or todo so here is a pass.");
}
function whenBrowserLoaded(browser) {

View File

@ -1,28 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/*
* These tests make sure that resetting the 'New Tage Page' works as expected.
*/
function runTests() {
// Disabled until bug 716543 is fixed.
return;
// create a new tab page and check its modified state after blocking a site
yield setLinks("0,1,2,3,4,5,6,7,8");
setPinnedLinks("");
yield addNewTabPageTab();
let resetButton = getContentDocument().getElementById("toolbar-button-reset");
checkGrid("0,1,2,3,4,5,6,7,8");
ok(!resetButton.hasAttribute("modified"), "page is not modified");
yield blockCell(4);
checkGrid("0,1,2,3,5,6,7,8,");
ok(resetButton.hasAttribute("modified"), "page is modified");
yield getContentWindow().gToolbar.reset(TestRunner.next);
checkGrid("0,1,2,3,4,5,6,7,8");
ok(!resetButton.hasAttribute("modified"), "page is not modified");
}

View File

@ -1,61 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/*
* These tests make sure that all changes that are made to a specific
* 'New Tab Page' are synchronized with all other open 'New Tab Pages'
* automatically. All about:newtab pages should always be in the same
* state.
*/
function runTests() {
// Disabled until bug 716543 is fixed.
return;
yield setLinks("0,1,2,3,4,5,6,7,8,9");
setPinnedLinks(",1");
yield addNewTabPageTab();
checkGrid("0,1p,2,3,4,5,6,7,8");
let resetButton = getContentDocument().getElementById("toolbar-button-reset");
ok(!resetButton.hasAttribute("modified"), "page is not modified");
let oldSites = getGrid().sites;
let oldResetButton = resetButton;
// create the new tab page
yield addNewTabPageTab();
checkGrid("0,1p,2,3,4,5,6,7,8");
resetButton = getContentDocument().getElementById("toolbar-button-reset");
ok(!resetButton.hasAttribute("modified"), "page is not modified");
// unpin a cell
yield unpinCell(1);
checkGrid("0,1,2,3,4,5,6,7,8");
checkGrid("0,1,2,3,4,5,6,7,8", oldSites);
// remove a cell
yield blockCell(1);
checkGrid("0,2,3,4,5,6,7,8,9");
checkGrid("0,2,3,4,5,6,7,8,9", oldSites);
ok(resetButton.hasAttribute("modified"), "page is modified");
ok(oldResetButton.hasAttribute("modified"), "page is modified");
// insert a new cell by dragging
yield simulateExternalDrop(1);
checkGrid("0,99p,2,3,4,5,6,7,8");
checkGrid("0,99p,2,3,4,5,6,7,8", oldSites);
// drag a cell around
yield simulateDrop(2, 1);
checkGrid("0,2p,99p,3,4,5,6,7,8");
checkGrid("0,2p,99p,3,4,5,6,7,8", oldSites);
// reset the new tab page
yield getContentWindow().gToolbar.reset(TestRunner.next);
checkGrid("0,1,2,3,4,5,6,7,8");
checkGrid("0,1,2,3,4,5,6,7,8", oldSites);
ok(!resetButton.hasAttribute("modified"), "page is not modified");
ok(!oldResetButton.hasAttribute("modified"), "page is not modified");
}

View File

@ -48,6 +48,10 @@ function test() {
iframe.setAttribute("src", "about:mozilla");
});
});
// This test relies on the test timing out in order to indicate failure so
// let's add a dummy pass.
ok(true, "Each test requires at least one pass, fail or todo so here is a pass.");
}
function whenChildCount(aEntry, aChildCount, aCallback) {

View File

@ -2,3 +2,4 @@
[browser_420786.js]
[browser_633221.js]
run-if = os == "linux"

View File

@ -18,4 +18,8 @@ function test() {
EventUtils.synthesizeMouseAtCenter(button, {}, cw);
}, cw);
});
// This test relies on the test timing out in order to indicate failure so
// let's add a dummy pass.
ok(true, "Each test requires at least one pass, fail or todo so here is a pass.");
}

View File

@ -90,6 +90,7 @@ skip-if = true || e10s # Disabled until TZ bug is fixed
[browser_gcli_history.js]
[browser_gcli_incomplete.js]
[browser_gcli_inputter.js]
skip-if = true # Bug 1093205 - Test does not run in Firefox due to missing terminal bug
[browser_gcli_intro.js]
[browser_gcli_js.js]
[browser_gcli_keyboard1.js]
@ -105,5 +106,6 @@ skip-if = true || e10s # Disabled until TZ bug is fixed
[browser_gcli_split.js]
[browser_gcli_tokenize.js]
[browser_gcli_tooltip.js]
skip-if = true # Bug 1093205 - Test does not run in Firefox due to missing terminal
[browser_gcli_types.js]
[browser_gcli_union.js]

View File

@ -1170,6 +1170,11 @@ helpers.audit = function(options, audits) {
'due to ' + audit.skipRemainingIf.name :
'';
assert.log('Skipped ' + name + ' ' + skipReason);
// Tests need at least one pass, fail or todo. Let's create a dummy pass
// in case there are none.
ok(true, "Each test requires at least one pass, fail or todo so here is a pass.");
return Promise.resolve(undefined);
}
}

View File

@ -39,6 +39,7 @@ skip-if = e10s # Bug 1069044 - destroyInspector may hang during shutdown
[browser_toolbox_tool_remote_reopen.js]
[browser_toolbox_window_reload_target.js]
[browser_toolbox_window_shortcuts.js]
skip-if = os == "mac" && os_version == "10.8" || os == "win" && os_version == "5.1" # Bug 851129 - Re-enable browser_toolbox_window_shortcuts.js test after leaks are fixed
[browser_toolbox_window_title_changes.js]
[browser_toolbox_zoom.js]
[browser_toolbox_custom_host.js]

View File

@ -6,12 +6,6 @@ let Toolbox = devtools.Toolbox;
let toolbox, toolIDs, idIndex, modifiedPrefs = [];
function test() {
if (window.navigator.userAgent.indexOf("Mac OS X 10.8") != -1 ||
window.navigator.userAgent.indexOf("Windows NT 5.1") != -1) {
info("Skipping Mac OSX 10.8 and Windows xp, see bug 838069");
finish();
return;
}
addTab("about:blank").then(function() {
toolIDs = [];
for (let [id, definition] of gDevTools._tools) {

View File

@ -13,6 +13,8 @@ function ifWebGLSupported() {
ok(false, "A 'program-linked' notification shouldn't have been sent!");
});
ok(true, "Each test requires at least one pass, fail or todo so here is a pass.");
yield reload(target);
yield removeTab(target.tab);
finish();

View File

@ -9,6 +9,7 @@ support-files = head.js
[browser_tilt_02_notifications-tabs.js]
[browser_tilt_02_notifications.js]
[browser_tilt_03_tab_switch.js]
skip-if = true # Bug 1093215 - Failed assertion
[browser_tilt_04_initialization.js]
[browser_tilt_05_destruction-esc.js]
[browser_tilt_05_destruction-url.js]

View File

@ -6,10 +6,12 @@ let tabEvents = "";
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping notifications test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping notifications test because WebGL isn't supported.");
return;
}
@ -29,7 +31,7 @@ function test() {
info("Starting up the Tilt notifications test.");
createTilt({}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});
@ -74,10 +76,6 @@ function obs_DESTROYED(win) {
}
function finalize(win) {
if (!tabEvents) {
return;
}
is(win, gBrowser.selectedBrowser.contentWindow, "Saw the correct window");
is(tabEvents, "STARTUP;INITIALIZING;INITIALIZED;DESTROYING;BEFORE_DESTROYED;DESTROYED;",
"The notifications weren't fired in the correct order.");

View File

@ -35,10 +35,12 @@ function after(notification, callback) {
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping tab switch test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping tab switch test because WebGL isn't supported.");
return;
}
@ -71,7 +73,7 @@ let testSteps = [
createTilt({}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});
@ -87,7 +89,7 @@ let testSteps = [
createTilt({}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -8,10 +8,12 @@ let tabEvents = "";
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping notifications test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping notifications test because WebGL isn't supported.");
return;
}
@ -43,7 +45,7 @@ function createNewTab() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});
@ -95,10 +97,6 @@ let testSteps = [
];
function finalize(win) {
if (!tabEvents) {
return;
}
is(win, tab1.linkedBrowser.contentWindow, "Saw the correct window");
is(tabEvents, "STARTUP;INITIALIZING;HIDDEN;SHOWN;DESTROYING;",

View File

@ -6,6 +6,10 @@ let tab0, tab1, tab2;
let testStep = -1;
function test() {
// This test relies on a timeout to indicate pass or fail. All tests need at
// least one pass, fail or todo so let's create a dummy pass.
ok(true, "Each test requires at least one pass, fail or todo so here is a pass.");
if (!isTiltEnabled()) {
info("Skipping tab switch test because Tilt isn't enabled.");
return;
@ -32,7 +36,7 @@ function createTab1() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});
@ -49,7 +53,7 @@ function createTab2() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -4,10 +4,12 @@
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping initialization test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping initialization test because WebGL isn't supported.");
return;
}
@ -45,7 +47,7 @@ function test() {
}
}, true, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -6,10 +6,12 @@ let tiltOpened = false;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping destruction test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping destruction test because WebGL isn't supported.");
return;
}
@ -27,7 +29,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -6,10 +6,12 @@ let tiltOpened = false;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping destruction test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping destruction test because WebGL isn't supported.");
return;
}
@ -27,7 +29,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -6,10 +6,12 @@ let tiltOpened = false;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping destruction test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping destruction test because WebGL isn't supported.");
return;
}
@ -27,7 +29,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -6,10 +6,12 @@ let tiltOpened = false;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping part of the arcball test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping part of the arcball test because WebGL isn't supported.");
return;
}
@ -36,7 +38,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});
@ -46,7 +48,6 @@ function performTest(canvas, arcball, callback) {
is(document.activeElement, canvas,
"The visualizer canvas should be focused when performing this test.");
info("Starting arcball reset test.");
// start translating and rotating sometime at random

View File

@ -6,10 +6,12 @@ let tiltOpened = false;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping part of the arcball test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping part of the arcball test because WebGL isn't supported.");
return;
}
@ -34,7 +36,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});
@ -44,7 +46,6 @@ function performTest(canvas, arcball, callback) {
is(document.activeElement, canvas,
"The visualizer canvas should be focused when performing this test.");
info("Starting arcball reset test.");
// start translating and rotating sometime at random

View File

@ -4,10 +4,12 @@
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping controller test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping controller test because WebGL isn't supported.");
return;
}
@ -122,7 +124,7 @@ function test() {
}
}, true, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -14,6 +14,7 @@ function onWebGLSuccess() {
function test() {
if (!isWebGLSupported()) {
aborting();
info("Skipping tilt_gl01 because WebGL isn't supported on this hardware.");
return;
}
@ -24,6 +25,7 @@ function test() {
let gl = renderer.context;
if (!isWebGLAvailable) {
aborting();
return;
}

View File

@ -14,6 +14,7 @@ function onWebGLSuccess() {
function test() {
if (!isWebGLSupported()) {
aborting();
info("Skipping tilt_gl02 because WebGL isn't supported on this hardware.");
return;
}
@ -24,6 +25,7 @@ function test() {
let gl = renderer.context;
if (!isWebGLAvailable) {
aborting();
return;
}

View File

@ -14,6 +14,7 @@ function onWebGLSuccess() {
function test() {
if (!isWebGLSupported()) {
aborting();
info("Skipping tilt_gl03 because WebGL isn't supported on this hardware.");
return;
}
@ -24,6 +25,7 @@ function test() {
let gl = renderer.context;
if (!isWebGLAvailable) {
aborting();
return;
}

View File

@ -14,6 +14,7 @@ function onWebGLSuccess() {
function test() {
if (!isWebGLSupported()) {
aborting();
info("Skipping tilt_gl04 because WebGL isn't supported on this hardware.");
return;
}
@ -24,6 +25,7 @@ function test() {
let gl = renderer.context;
if (!isWebGLAvailable) {
aborting();
return;
}

View File

@ -14,6 +14,7 @@ function onWebGLSuccess() {
function test() {
if (!isWebGLSupported()) {
aborting();
info("Skipping tilt_gl05 because WebGL isn't supported on this hardware.");
return;
}
@ -24,6 +25,7 @@ function test() {
let gl = renderer.context;
if (!isWebGLAvailable) {
aborting();
return;
}

View File

@ -14,6 +14,7 @@ function onWebGLSuccess() {
function test() {
if (!isWebGLSupported()) {
aborting();
info("Skipping tilt_gl06 because WebGL isn't supported on this hardware.");
return;
}
@ -24,6 +25,7 @@ function test() {
let gl = renderer.context;
if (!isWebGLAvailable) {
aborting();
return;
}

View File

@ -14,6 +14,7 @@ function onWebGLSuccess() {
function test() {
if (!isWebGLSupported()) {
aborting();
info("Skipping tilt_gl07 because WebGL isn't supported on this hardware.");
return;
}
@ -24,6 +25,7 @@ function test() {
let gl = renderer.context;
if (!isWebGLAvailable) {
aborting();
return;
}

View File

@ -14,6 +14,7 @@ function onWebGLSuccess() {
function test() {
if (!isWebGLSupported()) {
aborting();
info("Skipping tilt_gl08 because WebGL isn't supported on this hardware.");
return;
}
@ -24,6 +25,7 @@ function test() {
let gl = renderer.context;
if (!isWebGLAvailable) {
aborting();
return;
}

View File

@ -6,10 +6,12 @@ let pickDone = false;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping picking test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping picking test because WebGL isn't supported.");
return;
}
@ -41,7 +43,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -7,10 +7,12 @@ let presenter;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping picking delete test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping picking delete test because WebGL isn't supported.");
return;
}
@ -43,7 +45,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -7,10 +7,12 @@ let presenter;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping highlight test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping highlight test because WebGL isn't supported.");
return;
}
@ -34,7 +36,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -7,10 +7,12 @@ let presenter;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping highlight test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping highlight test because WebGL isn't supported.");
return;
}
@ -34,7 +36,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -7,10 +7,12 @@ let presenter;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping highlight test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping highlight test because WebGL isn't supported.");
return;
}
@ -31,7 +33,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -7,10 +7,12 @@ let presenter;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping highlight test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping highlight test because WebGL isn't supported.");
return;
}
@ -31,7 +33,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -6,10 +6,12 @@ let presenter;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping highlight test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping highlight test because WebGL isn't supported.");
return;
}
@ -33,7 +35,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -7,10 +7,12 @@ let presenter;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping highlight test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping highlight test because WebGL isn't supported.");
return;
}
@ -34,7 +36,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -4,10 +4,12 @@
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping notifications test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping visualizer test because WebGL isn't supported.");
return;
}

View File

@ -8,10 +8,12 @@ let tiltOpened = false;
function test() {
if (!isTiltEnabled()) {
aborting();
info("Skipping controller test because Tilt isn't enabled.");
return;
}
if (!isWebGLSupported()) {
aborting();
info("Skipping controller test because WebGL isn't supported.");
return;
}
@ -78,7 +80,7 @@ function test() {
}
}, false, function suddenDeath()
{
info("Tilt could not be initialized properly.");
ok(false, "Tilt could not be initialized properly.");
cleanup();
});
});

View File

@ -13,7 +13,6 @@ let tempScope = {};
Components.utils.import("resource://gre/modules/devtools/LayoutHelpers.jsm", tempScope);
let LayoutHelpers = tempScope.LayoutHelpers;
const DEFAULT_HTML = "data:text/html," +
"<DOCTYPE html>" +
"<html>" +
@ -208,3 +207,9 @@ function getPickablePoint(presenter) {
return vec3.project(center, viewport, renderer.mvMatrix, renderer.projMatrix);
}
function aborting() {
// Tilt aborting and we need at least one pass, fail or todo so let's add a
// dummy pass.
ok(true, "Test aborted early.");
}

View File

@ -20,12 +20,15 @@ function spawnTest () {
"ChannelSplitterNode", "ChannelMergerNode", "DynamicsCompressorNode", "OscillatorNode"
];
nodeTypes.forEach(function (type, i) {
// For some reason nodeTypes.forEach and params.forEach fail here so we use
// simple for loops.
for (let i = 0; i < nodeTypes.length; i++) {
let type = nodeTypes[i];
let params = allNodeParams[i];
params.forEach(function ({param, value, flags}) {
let testFlags = yield nodes[i].getParamFlag(param);
ok(typeof testFlags === "object", type + " has flags from #getParamFlag(" + param + ")");
for (let {param, value, flags} of params) {
let testFlags = yield nodes[i].getParamFlags(param);
ok(typeof testFlags === "object", type + " has flags from #getParamFlags(" + param + ")");
if (param === "buffer") {
is(flags.Buffer, true, "`buffer` params have Buffer flag");
@ -38,8 +41,8 @@ function spawnTest () {
} else {
is(Object.keys(flags), 0, type + "-" + param + " has no flags set")
}
});
});
}
}
yield removeTab(target.tab);
finish();

View File

@ -29,6 +29,11 @@ function onUnload() {
// will be apparent by the checks the harness performs.
function test() {
waitForExplicitFinish();
// This test relies on the test timing out in order to indicate failure so
// let's add a dummy pass.
ok(true, "Each test requires at least one pass, fail or todo so here is a pass.");
Services.obs.addObserver(onLoad, "bug839193-loaded", false);
Services.obs.addObserver(onUnload, "bug839193-unloaded", false);

View File

@ -10,4 +10,4 @@ support-files =
[browser_bug666317.js]
skip-if = e10s # Bug 948194 - Decoded Images seem to not be discarded on memory-pressure notification with e10s enabled
[browser_image.js]
skip-if = e10s
skip-if = e10s || !debug # Test is only to run on debug builds

View File

@ -21,6 +21,11 @@ function onUnload() {
// there are no actual checks here.
function test() {
waitForExplicitFinish();
// This test relies on the test timing out in order to indicate failure so
// let's add a dummy pass.
ok(true, "Each test requires at least one pass, fail or todo so here is a pass.");
gBugWindow = window.openDialog("chrome://pippki/content/certManager.xul");
gBugWindow.addEventListener("load", onLoad);
}

View File

@ -354,7 +354,13 @@ Tester.prototype = {
catch (ex) {
this.currentTest.addResult(new testResult(false, "Cleanup function threw an exception", ex, false));
}
};
}
if (this.currentTest.passCount === 0 &&
this.currentTest.failCount === 0 &&
this.currentTest.todoCount === 0) {
this.currentTest.addResult(new testResult(false, "This test contains no passes, no fails and no todos. Maybe it threw a silent exception? Make sure you use waitForExplicitFinish() if you need it.", "", false));
}
if (testScope.__expected == 'fail' && testScope.__num_failed <= 0) {
this.currentTest.addResult(new testResult(false, "We expected at least one assertion to fail because this test file was marked as fail-if in the manifest", "", false));

View File

@ -25,6 +25,7 @@ skip-if = e10s # Bug ?????? - EventUtils.synthesizeKey not e10s friendly
[browser_bug591465.js]
[browser_bug591663.js]
[browser_bug593535.js]
skip-if = true # Bug 1093190 - Disabled due to leak
[browser_bug596336.js]
[browser_bug608316.js]
[browser_bug610764.js]

View File

@ -12,7 +12,6 @@ const QUERY = "NOTFOUND";
var gProvider;
function test() {
return;
waitForExplicitFinish();
// Turn on searching for this test