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
Родитель 6df42325a9
Коммит 926bf1ca5d
51 изменённых файлов: 144 добавлений и 139 удалений

Просмотреть файл

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

Просмотреть файл

@ -37,6 +37,12 @@ function runTests() {
// for the hidden newtab docshell. // for the hidden newtab docshell.
let tab = gWindow.gBrowser.addTab("about:blank"); let tab = gWindow.gBrowser.addTab("about:blank");
yield addNewTabPageTab(); 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 swapWaitCount = 0;
let swapped = imports.BrowserNewTabPreloader.newTab(tab); let swapped = imports.BrowserNewTabPreloader.newTab(tab);
while (!swapped) { while (!swapped) {

Просмотреть файл

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

Просмотреть файл

@ -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");
}

Просмотреть файл

@ -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");
}

Просмотреть файл

@ -48,6 +48,10 @@ function test() {
iframe.setAttribute("src", "about:mozilla"); 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) { function whenChildCount(aEntry, aChildCount, aCallback) {

Просмотреть файл

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

Просмотреть файл

@ -18,4 +18,8 @@ function test() {
EventUtils.synthesizeMouseAtCenter(button, {}, cw); EventUtils.synthesizeMouseAtCenter(button, {}, cw);
}, 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.");
} }

Просмотреть файл

@ -90,6 +90,7 @@ skip-if = true || e10s # Disabled until TZ bug is fixed
[browser_gcli_history.js] [browser_gcli_history.js]
[browser_gcli_incomplete.js] [browser_gcli_incomplete.js]
[browser_gcli_inputter.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_intro.js]
[browser_gcli_js.js] [browser_gcli_js.js]
[browser_gcli_keyboard1.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_split.js]
[browser_gcli_tokenize.js] [browser_gcli_tokenize.js]
[browser_gcli_tooltip.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_types.js]
[browser_gcli_union.js] [browser_gcli_union.js]

Просмотреть файл

@ -1170,6 +1170,11 @@ helpers.audit = function(options, audits) {
'due to ' + audit.skipRemainingIf.name : 'due to ' + audit.skipRemainingIf.name :
''; '';
assert.log('Skipped ' + name + ' ' + skipReason); 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); return Promise.resolve(undefined);
} }
} }

Просмотреть файл

@ -39,6 +39,7 @@ skip-if = e10s # Bug 1069044 - destroyInspector may hang during shutdown
[browser_toolbox_tool_remote_reopen.js] [browser_toolbox_tool_remote_reopen.js]
[browser_toolbox_window_reload_target.js] [browser_toolbox_window_reload_target.js]
[browser_toolbox_window_shortcuts.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_window_title_changes.js]
[browser_toolbox_zoom.js] [browser_toolbox_zoom.js]
[browser_toolbox_custom_host.js] [browser_toolbox_custom_host.js]

Просмотреть файл

@ -6,12 +6,6 @@ let Toolbox = devtools.Toolbox;
let toolbox, toolIDs, idIndex, modifiedPrefs = []; let toolbox, toolIDs, idIndex, modifiedPrefs = [];
function test() { 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() { addTab("about:blank").then(function() {
toolIDs = []; toolIDs = [];
for (let [id, definition] of gDevTools._tools) { for (let [id, definition] of gDevTools._tools) {

Просмотреть файл

@ -13,6 +13,8 @@ function ifWebGLSupported() {
ok(false, "A 'program-linked' notification shouldn't have been sent!"); 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 reload(target);
yield removeTab(target.tab); yield removeTab(target.tab);
finish(); finish();

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -6,6 +6,10 @@ let tab0, tab1, tab2;
let testStep = -1; let testStep = -1;
function test() { 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()) { if (!isTiltEnabled()) {
info("Skipping tab switch test because Tilt isn't enabled."); info("Skipping tab switch test because Tilt isn't enabled.");
return; return;
@ -32,7 +36,7 @@ function createTab1() {
} }
}, false, function suddenDeath() }, false, function suddenDeath()
{ {
info("Tilt could not be initialized properly."); ok(false, "Tilt could not be initialized properly.");
cleanup(); cleanup();
}); });
}); });
@ -49,7 +53,7 @@ function createTab2() {
} }
}, false, function suddenDeath() }, false, function suddenDeath()
{ {
info("Tilt could not be initialized properly."); ok(false, "Tilt could not be initialized properly.");
cleanup(); cleanup();
}); });
}); });

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -13,7 +13,6 @@ let tempScope = {};
Components.utils.import("resource://gre/modules/devtools/LayoutHelpers.jsm", tempScope); Components.utils.import("resource://gre/modules/devtools/LayoutHelpers.jsm", tempScope);
let LayoutHelpers = tempScope.LayoutHelpers; let LayoutHelpers = tempScope.LayoutHelpers;
const DEFAULT_HTML = "data:text/html," + const DEFAULT_HTML = "data:text/html," +
"<DOCTYPE html>" + "<DOCTYPE html>" +
"<html>" + "<html>" +
@ -208,3 +207,9 @@ function getPickablePoint(presenter) {
return vec3.project(center, viewport, renderer.mvMatrix, renderer.projMatrix); 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.");
}

Просмотреть файл

@ -20,12 +20,15 @@ function spawnTest () {
"ChannelSplitterNode", "ChannelMergerNode", "DynamicsCompressorNode", "OscillatorNode" "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]; let params = allNodeParams[i];
params.forEach(function ({param, value, flags}) {
let testFlags = yield nodes[i].getParamFlag(param); for (let {param, value, flags} of params) {
ok(typeof testFlags === "object", type + " has flags from #getParamFlag(" + param + ")"); let testFlags = yield nodes[i].getParamFlags(param);
ok(typeof testFlags === "object", type + " has flags from #getParamFlags(" + param + ")");
if (param === "buffer") { if (param === "buffer") {
is(flags.Buffer, true, "`buffer` params have Buffer flag"); is(flags.Buffer, true, "`buffer` params have Buffer flag");
@ -38,8 +41,8 @@ function spawnTest () {
} else { } else {
is(Object.keys(flags), 0, type + "-" + param + " has no flags set") is(Object.keys(flags), 0, type + "-" + param + " has no flags set")
} }
}); }
}); }
yield removeTab(target.tab); yield removeTab(target.tab);
finish(); finish();

Просмотреть файл

@ -29,6 +29,11 @@ function onUnload() {
// will be apparent by the checks the harness performs. // will be apparent by the checks the harness performs.
function test() { function test() {
waitForExplicitFinish(); 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(onLoad, "bug839193-loaded", false);
Services.obs.addObserver(onUnload, "bug839193-unloaded", false); Services.obs.addObserver(onUnload, "bug839193-unloaded", false);

Просмотреть файл

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

Просмотреть файл

@ -21,6 +21,11 @@ function onUnload() {
// there are no actual checks here. // there are no actual checks here.
function test() { function test() {
waitForExplicitFinish(); 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 = window.openDialog("chrome://pippki/content/certManager.xul");
gBugWindow.addEventListener("load", onLoad); gBugWindow.addEventListener("load", onLoad);
} }

Просмотреть файл

@ -354,7 +354,13 @@ Tester.prototype = {
catch (ex) { catch (ex) {
this.currentTest.addResult(new testResult(false, "Cleanup function threw an exception", ex, false)); 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) { 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)); 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));

Просмотреть файл

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

Просмотреть файл

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