michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: const PREF_NEWTAB_ENABLED = "browser.newtabpage.enabled"; michael@0: const PREF_NEWTAB_DIRECTORYSOURCE = "browser.newtabpage.directorySource"; michael@0: michael@0: Services.prefs.setBoolPref(PREF_NEWTAB_ENABLED, true); michael@0: // start with no directory links by default michael@0: Services.prefs.setCharPref(PREF_NEWTAB_DIRECTORYSOURCE, "data:application/json,{}"); michael@0: michael@0: let tmp = {}; michael@0: Cu.import("resource://gre/modules/Promise.jsm", tmp); michael@0: Cu.import("resource://gre/modules/NewTabUtils.jsm", tmp); michael@0: Cc["@mozilla.org/moz/jssubscript-loader;1"] michael@0: .getService(Ci.mozIJSSubScriptLoader) michael@0: .loadSubScript("chrome://browser/content/sanitize.js", tmp); michael@0: let {Promise, NewTabUtils, Sanitizer} = tmp; michael@0: michael@0: let uri = Services.io.newURI("about:newtab", null, null); michael@0: let principal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(uri); michael@0: michael@0: let isMac = ("nsILocalFileMac" in Ci); michael@0: let isLinux = ("@mozilla.org/gnome-gconf-service;1" in Cc); michael@0: let isWindows = ("@mozilla.org/windows-registry-key;1" in Cc); michael@0: let gWindow = window; michael@0: michael@0: // The tests assume all three rows of sites are shown, but the window may be too michael@0: // short to actually show three rows. Resize it if necessary. michael@0: let requiredInnerHeight = michael@0: 40 + 32 + // undo container + bottom margin michael@0: 44 + 32 + // search bar + bottom margin michael@0: (3 * (150 + 32)) + // 3 rows * (tile height + title and bottom margin) michael@0: 100; // breathing room michael@0: michael@0: let oldInnerHeight = null; michael@0: if (gBrowser.contentWindow.innerHeight < requiredInnerHeight) { michael@0: oldInnerHeight = gBrowser.contentWindow.innerHeight; michael@0: info("Changing browser inner height from " + oldInnerHeight + " to " + michael@0: requiredInnerHeight); michael@0: gBrowser.contentWindow.innerHeight = requiredInnerHeight; michael@0: let screenHeight = {}; michael@0: Cc["@mozilla.org/gfx/screenmanager;1"]. michael@0: getService(Ci.nsIScreenManager). michael@0: primaryScreen. michael@0: GetAvailRectDisplayPix({}, {}, {}, screenHeight); michael@0: screenHeight = screenHeight.value; michael@0: if (screenHeight < gBrowser.contentWindow.outerHeight) { michael@0: info("Warning: Browser outer height is now " + michael@0: gBrowser.contentWindow.outerHeight + ", which is larger than the " + michael@0: "available screen height, " + screenHeight + michael@0: ". That may cause problems."); michael@0: } michael@0: } michael@0: michael@0: registerCleanupFunction(function () { michael@0: while (gWindow.gBrowser.tabs.length > 1) michael@0: gWindow.gBrowser.removeTab(gWindow.gBrowser.tabs[1]); michael@0: michael@0: if (oldInnerHeight) michael@0: gBrowser.contentWindow.innerHeight = oldInnerHeight; michael@0: michael@0: Services.prefs.clearUserPref(PREF_NEWTAB_ENABLED); michael@0: Services.prefs.clearUserPref(PREF_NEWTAB_DIRECTORYSOURCE); michael@0: }); michael@0: michael@0: /** michael@0: * Provide the default test function to start our test runner. michael@0: */ michael@0: function test() { michael@0: TestRunner.run(); michael@0: } michael@0: michael@0: /** michael@0: * The test runner that controls the execution flow of our tests. michael@0: */ michael@0: let TestRunner = { michael@0: /** michael@0: * Starts the test runner. michael@0: */ michael@0: run: function () { michael@0: waitForExplicitFinish(); michael@0: michael@0: this._iter = runTests(); michael@0: this.next(); michael@0: }, michael@0: michael@0: /** michael@0: * Runs the next available test or finishes if there's no test left. michael@0: */ michael@0: next: function () { michael@0: try { michael@0: TestRunner._iter.next(); michael@0: } catch (e if e instanceof StopIteration) { michael@0: TestRunner.finish(); michael@0: } michael@0: }, michael@0: michael@0: /** michael@0: * Finishes all tests and cleans up. michael@0: */ michael@0: finish: function () { michael@0: function cleanupAndFinish() { michael@0: clearHistory(function () { michael@0: whenPagesUpdated(finish); michael@0: NewTabUtils.restore(); michael@0: }); michael@0: } michael@0: michael@0: let callbacks = NewTabUtils.links._populateCallbacks; michael@0: let numCallbacks = callbacks.length; michael@0: michael@0: if (numCallbacks) michael@0: callbacks.splice(0, numCallbacks, cleanupAndFinish); michael@0: else michael@0: cleanupAndFinish(); michael@0: } michael@0: }; michael@0: michael@0: /** michael@0: * Returns the selected tab's content window. michael@0: * @return The content window. michael@0: */ michael@0: function getContentWindow() { michael@0: return gWindow.gBrowser.selectedBrowser.contentWindow; michael@0: } michael@0: michael@0: /** michael@0: * Returns the selected tab's content document. michael@0: * @return The content document. michael@0: */ michael@0: function getContentDocument() { michael@0: return gWindow.gBrowser.selectedBrowser.contentDocument; michael@0: } michael@0: michael@0: /** michael@0: * Returns the newtab grid of the selected tab. michael@0: * @return The newtab grid. michael@0: */ michael@0: function getGrid() { michael@0: return getContentWindow().gGrid; michael@0: } michael@0: michael@0: /** michael@0: * Returns the cell at the given index of the selected tab's newtab grid. michael@0: * @param aIndex The cell index. michael@0: * @return The newtab cell. michael@0: */ michael@0: function getCell(aIndex) { michael@0: return getGrid().cells[aIndex]; michael@0: } michael@0: michael@0: /** michael@0: * Allows to provide a list of links that is used to construct the grid. michael@0: * @param aLinksPattern the pattern (see below) michael@0: * michael@0: * Example: setLinks("1,2,3") michael@0: * Result: [{url: "http://example.com/#1", title: "site#1"}, michael@0: * {url: "http://example.com/#2", title: "site#2"} michael@0: * {url: "http://example.com/#3", title: "site#3"}] michael@0: */ michael@0: function setLinks(aLinks) { michael@0: let links = aLinks; michael@0: michael@0: if (typeof links == "string") { michael@0: links = aLinks.split(/\s*,\s*/).map(function (id) { michael@0: return {url: "http://example.com/#" + id, title: "site#" + id}; michael@0: }); michael@0: } michael@0: michael@0: // Call populateCache() once to make sure that all link fetching that is michael@0: // currently in progress has ended. We clear the history, fill it with the michael@0: // given entries and call populateCache() now again to make sure the cache michael@0: // has the desired contents. michael@0: NewTabUtils.links.populateCache(function () { michael@0: clearHistory(function () { michael@0: fillHistory(links, function () { michael@0: NewTabUtils.links.populateCache(function () { michael@0: NewTabUtils.allPages.update(); michael@0: TestRunner.next(); michael@0: }, true); michael@0: }); michael@0: }); michael@0: }); michael@0: } michael@0: michael@0: function clearHistory(aCallback) { michael@0: Services.obs.addObserver(function observe(aSubject, aTopic, aData) { michael@0: Services.obs.removeObserver(observe, aTopic); michael@0: executeSoon(aCallback); michael@0: }, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false); michael@0: michael@0: PlacesUtils.history.removeAllPages(); michael@0: } michael@0: michael@0: function fillHistory(aLinks, aCallback) { michael@0: let numLinks = aLinks.length; michael@0: if (!numLinks) { michael@0: if (aCallback) michael@0: executeSoon(aCallback); michael@0: return; michael@0: } michael@0: michael@0: let transitionLink = Ci.nsINavHistoryService.TRANSITION_LINK; michael@0: michael@0: // Important: To avoid test failures due to clock jitter on Windows XP, call michael@0: // Date.now() once here, not each time through the loop. michael@0: let now = Date.now() * 1000; michael@0: michael@0: for (let i = 0; i < aLinks.length; i++) { michael@0: let link = aLinks[i]; michael@0: let place = { michael@0: uri: makeURI(link.url), michael@0: title: link.title, michael@0: // Links are secondarily sorted by visit date descending, so decrease the michael@0: // visit date as we progress through the array so that links appear in the michael@0: // grid in the order they're present in the array. michael@0: visits: [{visitDate: now - i, transitionType: transitionLink}] michael@0: }; michael@0: michael@0: PlacesUtils.asyncHistory.updatePlaces(place, { michael@0: handleError: function () ok(false, "couldn't add visit to history"), michael@0: handleResult: function () {}, michael@0: handleCompletion: function () { michael@0: if (--numLinks == 0 && aCallback) michael@0: aCallback(); michael@0: } michael@0: }); michael@0: } michael@0: } michael@0: michael@0: /** michael@0: * Allows to specify the list of pinned links (that have a fixed position in michael@0: * the grid. michael@0: * @param aLinksPattern the pattern (see below) michael@0: * michael@0: * Example: setPinnedLinks("3,,1") michael@0: * Result: 'http://example.com/#3' is pinned in the first cell. 'http://example.com/#1' is michael@0: * pinned in the third cell. michael@0: */ michael@0: function setPinnedLinks(aLinks) { michael@0: let links = aLinks; michael@0: michael@0: if (typeof links == "string") { michael@0: links = aLinks.split(/\s*,\s*/).map(function (id) { michael@0: if (id) michael@0: return {url: "http://example.com/#" + id, title: "site#" + id}; michael@0: }); michael@0: } michael@0: michael@0: let string = Cc["@mozilla.org/supports-string;1"] michael@0: .createInstance(Ci.nsISupportsString); michael@0: string.data = JSON.stringify(links); michael@0: Services.prefs.setComplexValue("browser.newtabpage.pinned", michael@0: Ci.nsISupportsString, string); michael@0: michael@0: NewTabUtils.pinnedLinks.resetCache(); michael@0: NewTabUtils.allPages.update(); michael@0: } michael@0: michael@0: /** michael@0: * Restore the grid state. michael@0: */ michael@0: function restore() { michael@0: whenPagesUpdated(); michael@0: NewTabUtils.restore(); michael@0: } michael@0: michael@0: /** michael@0: * Creates a new tab containing 'about:newtab'. michael@0: */ michael@0: function addNewTabPageTab() { michael@0: let tab = gWindow.gBrowser.selectedTab = gWindow.gBrowser.addTab("about:newtab"); michael@0: let browser = tab.linkedBrowser; michael@0: michael@0: function whenNewTabLoaded() { michael@0: if (NewTabUtils.allPages.enabled) { michael@0: // Continue when the link cache has been populated. michael@0: NewTabUtils.links.populateCache(function () { michael@0: executeSoon(TestRunner.next); michael@0: }); michael@0: } else { michael@0: // It's important that we call next() asynchronously. michael@0: // 'yield addNewTabPageTab()' would fail if next() is called michael@0: // synchronously because the iterator is already executing. michael@0: executeSoon(TestRunner.next); michael@0: } michael@0: } michael@0: michael@0: // The new tab page might have been preloaded in the background. michael@0: if (browser.contentDocument.readyState == "complete") { michael@0: whenNewTabLoaded(); michael@0: return; michael@0: } michael@0: michael@0: // Wait for the new tab page to be loaded. michael@0: browser.addEventListener("load", function onLoad() { michael@0: browser.removeEventListener("load", onLoad, true); michael@0: whenNewTabLoaded(); michael@0: }, true); michael@0: } michael@0: michael@0: /** michael@0: * Compares the current grid arrangement with the given pattern. michael@0: * @param the pattern (see below) michael@0: * @param the array of sites to compare with (optional) michael@0: * michael@0: * Example: checkGrid("3p,2,,1p") michael@0: * Result: We expect the first cell to contain the pinned site 'http://example.com/#3'. michael@0: * The second cell contains 'http://example.com/#2'. The third cell is empty. michael@0: * The fourth cell contains the pinned site 'http://example.com/#4'. michael@0: */ michael@0: function checkGrid(aSitesPattern, aSites) { michael@0: let length = aSitesPattern.split(",").length; michael@0: let sites = (aSites || getGrid().sites).slice(0, length); michael@0: let current = sites.map(function (aSite) { michael@0: if (!aSite) michael@0: return ""; michael@0: michael@0: let pinned = aSite.isPinned(); michael@0: let pinButton = aSite.node.querySelector(".newtab-control-pin"); michael@0: let hasPinnedAttr = pinButton.hasAttribute("pinned"); michael@0: michael@0: if (pinned != hasPinnedAttr) michael@0: ok(false, "invalid state (site.isPinned() != site[pinned])"); michael@0: michael@0: return aSite.url.replace(/^http:\/\/example\.com\/#(\d+)$/, "$1") + (pinned ? "p" : ""); michael@0: }); michael@0: michael@0: is(current, aSitesPattern, "grid status = " + aSitesPattern); michael@0: } michael@0: michael@0: /** michael@0: * Blocks a site from the grid. michael@0: * @param aIndex The cell index. michael@0: */ michael@0: function blockCell(aIndex) { michael@0: whenPagesUpdated(); michael@0: getCell(aIndex).site.block(); michael@0: } michael@0: michael@0: /** michael@0: * Pins a site on a given position. michael@0: * @param aIndex The cell index. michael@0: * @param aPinIndex The index the defines where the site should be pinned. michael@0: */ michael@0: function pinCell(aIndex, aPinIndex) { michael@0: getCell(aIndex).site.pin(aPinIndex); michael@0: } michael@0: michael@0: /** michael@0: * Unpins the given cell's site. michael@0: * @param aIndex The cell index. michael@0: */ michael@0: function unpinCell(aIndex) { michael@0: whenPagesUpdated(); michael@0: getCell(aIndex).site.unpin(); michael@0: } michael@0: michael@0: /** michael@0: * Simulates a drag and drop operation. michael@0: * @param aSourceIndex The cell index containing the dragged site. michael@0: * @param aDestIndex The cell index of the drop target. michael@0: */ michael@0: function simulateDrop(aSourceIndex, aDestIndex) { michael@0: let src = getCell(aSourceIndex).site.node; michael@0: let dest = getCell(aDestIndex).node; michael@0: michael@0: // Drop 'src' onto 'dest' and continue testing when all newtab michael@0: // pages have been updated (i.e. the drop operation is completed). michael@0: startAndCompleteDragOperation(src, dest, whenPagesUpdated); michael@0: } michael@0: michael@0: /** michael@0: * Simulates a drag and drop operation. Instead of rearranging a site that is michael@0: * is already contained in the newtab grid, this is used to simulate dragging michael@0: * an external link onto the grid e.g. the text from the URL bar. michael@0: * @param aDestIndex The cell index of the drop target. michael@0: */ michael@0: function simulateExternalDrop(aDestIndex) { michael@0: let dest = getCell(aDestIndex).node; michael@0: michael@0: // Create an iframe that contains the external link we'll drag. michael@0: createExternalDropIframe().then(iframe => { michael@0: let link = iframe.contentDocument.getElementById("link"); michael@0: michael@0: // Drop 'link' onto 'dest'. michael@0: startAndCompleteDragOperation(link, dest, () => { michael@0: // Wait until the drop operation is complete michael@0: // and all newtab pages have been updated. michael@0: whenPagesUpdated(() => { michael@0: // Clean up and remove the iframe. michael@0: iframe.remove(); michael@0: // Continue testing. michael@0: TestRunner.next(); michael@0: }); michael@0: }); michael@0: }); michael@0: } michael@0: michael@0: /** michael@0: * Starts and complete a drag-and-drop operation. michael@0: * @param aSource The node that is being dragged. michael@0: * @param aDest The node we're dragging aSource onto. michael@0: * @param aCallback The function that is called when we're done. michael@0: */ michael@0: function startAndCompleteDragOperation(aSource, aDest, aCallback) { michael@0: // Start by pressing the left mouse button. michael@0: synthesizeNativeMouseLDown(aSource); michael@0: michael@0: // Move the mouse in 5px steps until the drag operation starts. michael@0: let offset = 0; michael@0: let interval = setInterval(() => { michael@0: synthesizeNativeMouseDrag(aSource, offset += 5); michael@0: }, 10); michael@0: michael@0: // When the drag operation has started we'll move michael@0: // the dragged element to its target position. michael@0: aSource.addEventListener("dragstart", function onDragStart() { michael@0: aSource.removeEventListener("dragstart", onDragStart); michael@0: clearInterval(interval); michael@0: michael@0: // Place the cursor above the drag target. michael@0: synthesizeNativeMouseMove(aDest); michael@0: }); michael@0: michael@0: // As soon as the dragged element hovers the target, we'll drop it. michael@0: aDest.addEventListener("dragenter", function onDragEnter() { michael@0: aDest.removeEventListener("dragenter", onDragEnter); michael@0: michael@0: // Finish the drop operation. michael@0: synthesizeNativeMouseLUp(aDest); michael@0: aCallback(); michael@0: }); michael@0: } michael@0: michael@0: /** michael@0: * Helper function that creates a temporary iframe in the about:newtab michael@0: * document. This will contain a link we can drag to the test the dropping michael@0: * of links from external documents. michael@0: */ michael@0: function createExternalDropIframe() { michael@0: const url = "data:text/html;charset=utf-8," + michael@0: "link"; michael@0: michael@0: let deferred = Promise.defer(); michael@0: let doc = getContentDocument(); michael@0: let iframe = doc.createElement("iframe"); michael@0: iframe.setAttribute("src", url); michael@0: iframe.style.width = "50px"; michael@0: iframe.style.height = "50px"; michael@0: michael@0: let margin = doc.getElementById("newtab-margin-top"); michael@0: margin.appendChild(iframe); michael@0: michael@0: iframe.addEventListener("load", function onLoad() { michael@0: iframe.removeEventListener("load", onLoad); michael@0: executeSoon(() => deferred.resolve(iframe)); michael@0: }); michael@0: michael@0: return deferred.promise; michael@0: } michael@0: michael@0: /** michael@0: * Fires a synthetic 'mousedown' event on the current about:newtab page. michael@0: * @param aElement The element used to determine the cursor position. michael@0: */ michael@0: function synthesizeNativeMouseLDown(aElement) { michael@0: if (isLinux) { michael@0: let win = aElement.ownerDocument.defaultView; michael@0: EventUtils.synthesizeMouseAtCenter(aElement, {type: "mousedown"}, win); michael@0: } else { michael@0: let msg = isWindows ? 2 : 1; michael@0: synthesizeNativeMouseEvent(aElement, msg); michael@0: } michael@0: } michael@0: michael@0: /** michael@0: * Fires a synthetic 'mouseup' event on the current about:newtab page. michael@0: * @param aElement The element used to determine the cursor position. michael@0: */ michael@0: function synthesizeNativeMouseLUp(aElement) { michael@0: let msg = isWindows ? 4 : (isMac ? 2 : 7); michael@0: synthesizeNativeMouseEvent(aElement, msg); michael@0: } michael@0: michael@0: /** michael@0: * Fires a synthetic mouse drag event on the current about:newtab page. michael@0: * @param aElement The element used to determine the cursor position. michael@0: * @param aOffsetX The left offset that is added to the position. michael@0: */ michael@0: function synthesizeNativeMouseDrag(aElement, aOffsetX) { michael@0: let msg = isMac ? 6 : 1; michael@0: synthesizeNativeMouseEvent(aElement, msg, aOffsetX); michael@0: } michael@0: michael@0: /** michael@0: * Fires a synthetic 'mousemove' event on the current about:newtab page. michael@0: * @param aElement The element used to determine the cursor position. michael@0: */ michael@0: function synthesizeNativeMouseMove(aElement) { michael@0: let msg = isMac ? 5 : 1; michael@0: synthesizeNativeMouseEvent(aElement, msg); michael@0: } michael@0: michael@0: /** michael@0: * Fires a synthetic mouse event on the current about:newtab page. michael@0: * @param aElement The element used to determine the cursor position. michael@0: * @param aOffsetX The left offset that is added to the position (optional). michael@0: * @param aOffsetY The top offset that is added to the position (optional). michael@0: */ michael@0: function synthesizeNativeMouseEvent(aElement, aMsg, aOffsetX = 0, aOffsetY = 0) { michael@0: let rect = aElement.getBoundingClientRect(); michael@0: let win = aElement.ownerDocument.defaultView; michael@0: let x = aOffsetX + win.mozInnerScreenX + rect.left + rect.width / 2; michael@0: let y = aOffsetY + win.mozInnerScreenY + rect.top + rect.height / 2; michael@0: michael@0: let utils = win.QueryInterface(Ci.nsIInterfaceRequestor) michael@0: .getInterface(Ci.nsIDOMWindowUtils); michael@0: michael@0: let scale = utils.screenPixelsPerCSSPixel; michael@0: utils.sendNativeMouseEvent(x * scale, y * scale, aMsg, 0, null); michael@0: } michael@0: michael@0: /** michael@0: * Sends a custom drag event to a given DOM element. michael@0: * @param aEventType The drag event's type. michael@0: * @param aTarget The DOM element that the event is dispatched to. michael@0: * @param aData The event's drag data (optional). michael@0: */ michael@0: function sendDragEvent(aEventType, aTarget, aData) { michael@0: let event = createDragEvent(aEventType, aData); michael@0: let ifaceReq = getContentWindow().QueryInterface(Ci.nsIInterfaceRequestor); michael@0: let windowUtils = ifaceReq.getInterface(Ci.nsIDOMWindowUtils); michael@0: windowUtils.dispatchDOMEventViaPresShell(aTarget, event, true); michael@0: } michael@0: michael@0: /** michael@0: * Creates a custom drag event. michael@0: * @param aEventType The drag event's type. michael@0: * @param aData The event's drag data (optional). michael@0: * @return The drag event. michael@0: */ michael@0: function createDragEvent(aEventType, aData) { michael@0: let dataTransfer = new (getContentWindow()).DataTransfer("dragstart", false); michael@0: dataTransfer.mozSetDataAt("text/x-moz-url", aData, 0); michael@0: let event = getContentDocument().createEvent("DragEvents"); michael@0: event.initDragEvent(aEventType, true, true, getContentWindow(), 0, 0, 0, 0, 0, michael@0: false, false, false, false, 0, null, dataTransfer); michael@0: michael@0: return event; michael@0: } michael@0: michael@0: /** michael@0: * Resumes testing when all pages have been updated. michael@0: * @param aCallback Called when done. If not specified, TestRunner.next is used. michael@0: * @param aOnlyIfHidden If true, this resumes testing only when an update that michael@0: * applies to pre-loaded, hidden pages is observed. If michael@0: * false, this resumes testing when any update is observed. michael@0: */ michael@0: function whenPagesUpdated(aCallback, aOnlyIfHidden=false) { michael@0: let page = { michael@0: update: function (onlyIfHidden=false) { michael@0: if (onlyIfHidden == aOnlyIfHidden) { michael@0: NewTabUtils.allPages.unregister(this); michael@0: executeSoon(aCallback || TestRunner.next); michael@0: } michael@0: } michael@0: }; michael@0: michael@0: NewTabUtils.allPages.register(page); michael@0: registerCleanupFunction(function () { michael@0: NewTabUtils.allPages.unregister(page); michael@0: }); michael@0: } michael@0: michael@0: /** michael@0: * Waits a small amount of time for search events to stop occurring in the michael@0: * newtab page. michael@0: * michael@0: * newtab pages receive some search events around load time that are difficult michael@0: * to predict. There are two categories of such events: (1) "State" events michael@0: * triggered by engine notifications like engine-changed, due to the search michael@0: * service initializing itself on app startup. This can happen when a test is michael@0: * the first test to run. (2) "State" events triggered by the newtab page michael@0: * itself when gSearch first sets itself up. newtab preloading makes these a michael@0: * pain to predict. michael@0: */ michael@0: function whenSearchInitDone() { michael@0: info("Waiting for initial search events..."); michael@0: let numTicks = 0; michael@0: function reset(event) { michael@0: info("Got initial search event " + event.detail.type + michael@0: ", waiting for more..."); michael@0: numTicks = 0; michael@0: } michael@0: let eventName = "ContentSearchService"; michael@0: getContentWindow().addEventListener(eventName, reset); michael@0: let interval = window.setInterval(() => { michael@0: if (++numTicks >= 100) { michael@0: info("Done waiting for initial search events"); michael@0: window.clearInterval(interval); michael@0: getContentWindow().removeEventListener(eventName, reset); michael@0: TestRunner.next(); michael@0: } michael@0: }, 0); michael@0: }