From 19e2d4a7dc233f418bd033987d7eff6989f599f0 Mon Sep 17 00:00:00 2001 From: Jeff Hammel Date: Wed, 22 Feb 2012 09:24:29 -0500 Subject: [PATCH] Bug 727705 - remove two copies of pageloader from m-c. r=jmaher --- layout/Makefile.in | 1 - layout/tools/pageloader/Makefile.in | 52 --- layout/tools/pageloader/README | 81 ---- layout/tools/pageloader/jar.mn | 6 - layout/tools/pageloader/pageloader.js | 441 ------------------ layout/tools/pageloader/pageloader.xul | 57 --- layout/tools/pageloader/quit.js | 110 ----- layout/tools/pageloader/report.js | 268 ----------- layout/tools/pageloader/tp-cmdline.js | 119 ----- layout/tools/pageloader/tp-cmdline.manifest | 3 - testing/tools/pageloader/Makefile | 6 - testing/tools/pageloader/README | 13 - testing/tools/pageloader/chrome.manifest | 1 - .../pageloader/chrome/content/pageloader.css | 3 - .../pageloader/chrome/content/pageloader.js | 199 -------- .../pageloader/chrome/content/pageloader.xul | 13 - .../tools/pageloader/chrome/content/report.js | 112 ----- testing/tools/pageloader/install.rdf | 27 -- .../test/chrome/content/pageloader.js | 46 -- .../pageloader/test/chrome/content/report.js | 19 - toolkit/toolkit-makefiles.sh | 1 - 21 files changed, 1578 deletions(-) delete mode 100644 layout/tools/pageloader/Makefile.in delete mode 100644 layout/tools/pageloader/README delete mode 100644 layout/tools/pageloader/jar.mn delete mode 100644 layout/tools/pageloader/pageloader.js delete mode 100644 layout/tools/pageloader/pageloader.xul delete mode 100644 layout/tools/pageloader/quit.js delete mode 100644 layout/tools/pageloader/report.js delete mode 100644 layout/tools/pageloader/tp-cmdline.js delete mode 100644 layout/tools/pageloader/tp-cmdline.manifest delete mode 100644 testing/tools/pageloader/Makefile delete mode 100644 testing/tools/pageloader/README delete mode 100644 testing/tools/pageloader/chrome.manifest delete mode 100644 testing/tools/pageloader/chrome/content/pageloader.css delete mode 100644 testing/tools/pageloader/chrome/content/pageloader.js delete mode 100644 testing/tools/pageloader/chrome/content/pageloader.xul delete mode 100644 testing/tools/pageloader/chrome/content/report.js delete mode 100644 testing/tools/pageloader/install.rdf delete mode 100755 testing/tools/pageloader/test/chrome/content/pageloader.js delete mode 100755 testing/tools/pageloader/test/chrome/content/report.js diff --git a/layout/Makefile.in b/layout/Makefile.in index c7f65493ecf..353081d3aee 100644 --- a/layout/Makefile.in +++ b/layout/Makefile.in @@ -77,7 +77,6 @@ PARALLEL_DIRS += \ $(NULL) TOOL_DIRS += tools/reftest reftests/fonts reftests/fonts/mplus -DIRS += tools/pageloader ifdef MOZ_DEBUG DIRS += tools/layout-debug diff --git a/layout/tools/pageloader/Makefile.in b/layout/tools/pageloader/Makefile.in deleted file mode 100644 index e32f3e1656c..00000000000 --- a/layout/tools/pageloader/Makefile.in +++ /dev/null @@ -1,52 +0,0 @@ -# vim: set shiftwidth=8 tabstop=8 autoindent noexpandtab copyindent: -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is Mozilla's pageloader test -# -# The Initial Developer of the Original Code is the Mozilla Foundation. -# Portions created by the Initial Developer are Copyright (C) 2007 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Vladimir Vukicevic -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -DEPTH = ../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -include $(DEPTH)/config/autoconf.mk - -MODULE = layout - -EXTRA_COMPONENTS= \ - tp-cmdline.js \ - tp-cmdline.manifest \ - $(NULL) - -include $(topsrcdir)/config/rules.mk diff --git a/layout/tools/pageloader/README b/layout/tools/pageloader/README deleted file mode 100644 index 3a89372869b..00000000000 --- a/layout/tools/pageloader/README +++ /dev/null @@ -1,81 +0,0 @@ -Pageload Test Component -======================= - -Usage: - - ./firefox -tp file:///path/to/manifest.txt [-tpargs...] - -See ./firefox -help for other arguments. - - -Manifest file format -==================== - -Comments in the manifest file start with a #. Each line may be: - -* a URL (absolute or relative to the manifest) - -This URL is added to the list of tests. - -* one or more flags, followed by whitespace, followed by a URL - -The only flag supported currently is '%', which indicates that -a test will do its own timing. (See Self-timing Tests below.) - -* "include" followed by whitespace, followed by a URL - -Parse the given manifest file. - -Self-timing Tests -================= - -Most timing tests are interested in timing how long it takes the page -to load; that is, from the start of page loading until the 'load' -event is dispatched. By default, this is what the pageloader will -time. However, if a test URL has the % flag, the test is expected to -report its own timing. For this purpose, the pageloader will provide -a function named "tpRecordTime" in the test's global object that it -should call once it has performed whatever timing it wants to do. -The given value will be used as the timing result for this test. - -Output format -============= - -The result is a dump to stdout via dump() -- -browser.dom.window.dump.enabled must be set to true in the profile. A -number of output formats can be specified via the -tpformat command -line option, currently 'js', 'text', and 'tinderbox' are supported. - -Sample 'js' format output: - -([({page:"1280x1024-PNG/index.html", value:133, stddev:20.049937655763422}),({page:"bugzilla.mozilla.org/index.html", value:233, stddev:36.66606060105176}),({page:"espn.go.com/index.html", value:117.6, stddev:1.2}),({page:"home.netscape.com/index.html", value:97.8, stddev:47.41898354035017}),]) - -Sample 'text' format output: - -============================================================ - Page mean stdd min max raw - 0 1280x1024-PNG/index.html 133 20 121 297 297,173,122,121,124,125 - 1 bugzilla.mozilla.org/index.html 233 37 192 395 395,273,223,192,198,279 - 2 espn.go.com/index.html 118 1 116 254 254,117,116,119,119,117 - 3 home.netscape.com/index.html 98 47 3 124 3,121,120,124,124,121 -============================================================ - -Sample 'tinderbox' format output: - -__start_tp_report -_x_x_mozilla_page_load,778.5,NaN,NaN -_x_x_mozilla_page_load_details,avgmedian|778.5|average|766.75|minimum|NaN|maximum|NaN|stddev|NaN|0;file:///c:/proj/mozilla-cvs/perf/tp2/base/www.cnn.com/index.html;778.5;766.75;722;1027;1027;788;777;722;780|... -__end_tp_report - -Note that the minimum, maximum, stddev are not calculated; they're -always reported as NaN. (They were the minimum and maximum values of -any sampled value, and the standard deviation across all sampled -values -- not very useful.) - -TODO -==== - -* Command line option to choose whether to run with or without browser chrome. Currently runs without. - -* Tinderbox-dropping style output - * better yet would be to teach tinderbox about JSON diff --git a/layout/tools/pageloader/jar.mn b/layout/tools/pageloader/jar.mn deleted file mode 100644 index 39a81788dca..00000000000 --- a/layout/tools/pageloader/jar.mn +++ /dev/null @@ -1,6 +0,0 @@ -pageloader.jar: -% content pageloader %content/ -* content/quit.js (quit.js) -* content/pageloader.js (pageloader.js) - content/pageloader.xul (pageloader.xul) -* content/report.js (report.js) diff --git a/layout/tools/pageloader/pageloader.js b/layout/tools/pageloader/pageloader.js deleted file mode 100644 index cddf1009bac..00000000000 --- a/layout/tools/pageloader/pageloader.js +++ /dev/null @@ -1,441 +0,0 @@ -/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is tp. - * - * The Initial Developer of the Original Code is - * Mozilla Corporation. - * Portions created by the Initial Developer are Copyright (C) 2007 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Rob Helmer - * Vladimir Vukicevic - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -const Cc = Components.classes; -const Ci = Components.interfaces; - -var NUM_CYCLES = 5; - -var pageFilterRegexp = null; -var reportFormat = "js"; -var useBrowser = true; -var winWidth = 1024; -var winHeight = 768; - -var doRenderTest = false; - -var pages; -var pageIndex; -var start_time; -var cycle; -var report; -var renderReport; -var noisy = false; -var timeout = -1; -var timeoutEvent = -1; -var running = false; -var forceCC = true; - -var content; - -var TEST_DOES_OWN_TIMING = 1; - -var browserWindow = null; - -// the io service -var gIOS = null; - -function plInit() { - if (running) { - return; - } - running = true; - - cycle = 0; - - try { - var args = window.arguments[0].wrappedJSObject; - - var manifestURI = args.manifest; - var startIndex = 0; - var endIndex = -1; - if (args.startIndex) startIndex = parseInt(args.startIndex); - if (args.endIndex) endIndex = parseInt(args.endIndex); - if (args.numCycles) NUM_CYCLES = parseInt(args.numCycles); - if (args.format) reportFormat = args.format; - if (args.width) winWidth = parseInt(args.width); - if (args.height) winHeight = parseInt(args.height); - if (args.filter) pageFilterRegexp = new RegExp(args.filter); - if (args.noisy) noisy = true; - if (args.timeout) timeout = parseInt(args.timeout); - forceCC = !args.noForceCC; - doRenderTest = args.doRender; - - if (forceCC && - !window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) - .getInterface(Components.interfaces.nsIDOMWindowUtils) - .garbageCollect) { - forceCC = false; - } - - gIOS = Cc["@mozilla.org/network/io-service;1"] - .getService(Ci.nsIIOService); - if (args.offline) - gIOS.offline = true; - var fileURI = gIOS.newURI(manifestURI, null, null); - pages = plLoadURLsFromURI(fileURI); - - if (!pages) { - dumpLine('tp: could not load URLs, quitting'); - plStop(true); - } - - if (pages.length == 0) { - dumpLine('tp: no pages to test, quitting'); - plStop(true); - } - - if (startIndex < 0) - startIndex = 0; - if (endIndex == -1 || endIndex >= pages.length) - endIndex = pages.length-1; - if (startIndex > endIndex) { - dumpLine("tp: error: startIndex >= endIndex"); - plStop(true); - } - - pages = pages.slice(startIndex,endIndex+1); - var pageUrls = pages.map(function(p) { return p.url.spec.toString(); }); - report = new Report(pageUrls); - - if (doRenderTest) - renderReport = new Report(pageUrls); - - pageIndex = 0; - - if (args.useBrowserChrome) { - var wwatch = Cc["@mozilla.org/embedcomp/window-watcher;1"] - .getService(Ci.nsIWindowWatcher); - var blank = Cc["@mozilla.org/supports-string;1"] - .createInstance(Ci.nsISupportsString); - blank.data = "about:blank"; - browserWindow = wwatch.openWindow - (null, "chrome://browser/content/", "_blank", - "chrome,dialog=no,width=" + winWidth + ",height=" + winHeight, blank); - - // get our window out of the way - window.resizeTo(10,10); - - var browserLoadFunc = function (ev) { - browserWindow.removeEventListener('load', browserLoadFunc, true); - - // do this half a second after load, because we need to be - // able to resize the window and not have it get clobbered - // by the persisted values - setTimeout(function () { - browserWindow.resizeTo(winWidth, winHeight); - browserWindow.moveTo(0, 0); - browserWindow.focus(); - - content = browserWindow.getBrowser(); - setTimeout(plLoadPage, 100); - }, 500); - }; - - browserWindow.addEventListener('load', browserLoadFunc, true); - } else { - window.resizeTo(winWidth, winHeight); - - content = document.getElementById('contentPageloader'); - - setTimeout(plLoadPage, 250); - } - } catch(e) { - dumpLine(e); - plStop(true); - } -} - -function plPageFlags() { - return pages[pageIndex].flags; -} - -// load the current page, start timing -var removeLastAddedListener = null; -function plLoadPage() { - var pageName = pages[pageIndex].url.spec; - - if (removeLastAddedListener) - removeLastAddedListener(); - - if (plPageFlags() & TEST_DOES_OWN_TIMING) { - // if the page does its own timing, use a capturing handler - // to make sure that we can set up the function for content to call - content.addEventListener('load', plLoadHandlerCapturing, true); - removeLastAddedListener = function() { - content.removeEventListener('load', plLoadHandlerCapturing, true); - }; - } else { - // if the page doesn't do its own timing, use a bubbling handler - // to make sure that we're called after the page's own onload() handling - - // XXX we use a capturing event here too -- load events don't bubble up - // to the element. See bug 390263. - content.addEventListener('load', plLoadHandler, true); - removeLastAddedListener = function() { - content.removeEventListener('load', plLoadHandler, true); - }; - } - - if (timeout > 0) { - timeoutEvent = setTimeout('loadFail()', timeout); - } - start_time = Date.now(); - content.loadURI(pageName); -} - -function loadFail() { - var pageName = pages[pageIndex].url.spec; - dumpLine("__FAILTimeout exceeded on " + pageName + "__FAIL") - plStop(true); -} - -function plNextPage() { - if (pageIndex < pages.length-1) { - pageIndex++; - - if (forceCC) { - var tccstart = new Date(); - window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) - .getInterface(Components.interfaces.nsIDOMWindowUtils) - .garbageCollect(); - var tccend = new Date(); - report.recordCCTime(tccend - tccstart); - } - - setTimeout(plLoadPage, 250); - } else { - plStop(false); - } -} - -function plRecordTime(time) { - var pageName = pages[pageIndex].url.spec; - var i = pageIndex - if (i < pages.length-1) { - i++; - } else { - i = 0; - } - var nextName = pages[i].url.spec; - report.recordTime(pageIndex, time); - if (noisy) { - dumpLine("Cycle " + (cycle+1) + ": loaded " + pageName + " (next: " + nextName + ")"); - } -} - -function plLoadHandlerCapturing(evt) { - // make sure we pick up the right load event - if (evt.type != 'load' || - evt.originalTarget.defaultView.frameElement) - return; - if (timeout > 0) { - clearTimeout(timeoutEvent); - } - - if (!(plPageFlags() & TEST_DOES_OWN_TIMING)) { - dumpLine("tp: Capturing onload handler used with page that doesn't do its own timing?"); - plStop(true); - } - - // set up the function for content to call - content.contentWindow.wrappedJSObject.tpRecordTime = function (time) { - plRecordTime(time); - setTimeout(plNextPage, 250); - }; -} - -// the onload handler -function plLoadHandler(evt) { - // make sure we pick up the right load event - if (evt.type != 'load' || - evt.originalTarget.defaultView.frameElement) - return; - if (timeout > 0) { - clearTimeout(timeoutEvent); - } - var end_time = Date.now(); - var time = (end_time - start_time); - - // does this page want to do its own timing? - // if so, we shouldn't be here - if (plPageFlags() & TEST_DOES_OWN_TIMING) { - dumpLine("tp: Bubbling onload handler used with page that does its own timing?"); - plStop(true); - } - - plRecordTime(time); - - if (doRenderTest) - runRenderTest(); - - plNextPage(); -} - -function runRenderTest() { - const redrawsPerSample = 500; - - if (!Ci.nsIDOMWindowUtils) - return; - - var win; - - if (browserWindow) - win = content.contentWindow; - else - win = window; - var wu = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); - - var start = Date.now(); - for (var j = 0; j < redrawsPerSample; j++) - wu.redraw(); - var end = Date.now(); - - renderReport.recordTime(pageIndex, end - start); -} - -function plStop(force) { - try { - if (force == false) { - pageIndex = 0; - if (cycle < NUM_CYCLES-1) { - cycle++; - setTimeout(plLoadPage, 250); - return; - } - - var formats = reportFormat.split(","); - - if (!renderReport) { - for each (var fmt in formats) - dumpLine(report.getReport(fmt)); - } - else { - dumpLine ("*************** Render report *******************"); - for each (var fmt in formats) - dumpLine(renderReport.getReport(fmt)); - } - } - } catch (e) { - dumpLine(e); - } - - if (content) - content.removeEventListener('load', plLoadHandler, true); - - goQuitApplication(); -} - -/* Returns array */ -function plLoadURLsFromURI(manifestUri) { - var fstream = Cc["@mozilla.org/network/file-input-stream;1"] - .createInstance(Ci.nsIFileInputStream); - var uriFile = manifestUri.QueryInterface(Ci.nsIFileURL); - - fstream.init(uriFile.file, -1, 0, 0); - var lstream = fstream.QueryInterface(Ci.nsILineInputStream); - - var d = []; - - var lineNo = 0; - var line = {value:null}; - var more; - do { - lineNo++; - more = lstream.readLine(line); - var s = line.value; - - // strip comments - s = s.replace(/#.*/, ''); - - // strip leading and trailing whitespace - s = s.replace(/^\s*/, '').replace(/s\*$/, ''); - - if (!s) - continue; - - var flags = 0; - var urlspec = s; - - // split on whitespace, and figure out if we have any flags - var items = s.split(/\s+/); - if (items[0] == "include") { - if (items.length != 2) { - dumpLine("tp: Error on line " + lineNo + " in " + manifestUri.spec + ": include must be followed by the manifest to include!"); - return null; - } - - var subManifest = gIOS.newURI(items[1], null, manifestUri); - if (subManifest == null) { - dumpLine("tp: invalid URI on line " + manifestUri.spec + ":" + lineNo + " : '" + line.value + "'"); - return null; - } - - var subItems = plLoadURLsFromURI(subManifest); - if (subItems == null) - return null; - d = d.concat(subItems); - } else { - if (items.length == 2) { - if (items[0].indexOf("%") != -1) - flags |= TEST_DOES_OWN_TIMING; - - urlspec = items[1]; - } else if (items.length != 1) { - dumpLine("tp: Error on line " + lineNo + " in " + manifestUri.spec + ": whitespace must be %-escaped!"); - return null; - } - - var url = gIOS.newURI(urlspec, null, manifestUri); - - if (pageFilterRegexp && !pageFilterRegexp.test(url.spec)) - continue; - - d.push({ url: url, - flags: flags }); - } - } while (more); - - return d; -} - -function dumpLine(str) { - dump(str); - dump("\n"); -} diff --git a/layout/tools/pageloader/pageloader.xul b/layout/tools/pageloader/pageloader.xul deleted file mode 100644 index f096a057107..00000000000 --- a/layout/tools/pageloader/pageloader.xul +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/testing/tools/pageloader/chrome/content/report.js b/testing/tools/pageloader/chrome/content/report.js deleted file mode 100644 index d87fdde9733..00000000000 --- a/testing/tools/pageloader/chrome/content/report.js +++ /dev/null @@ -1,112 +0,0 @@ -// Constructor -function Report(pages) { - this.pages = pages; - this.timeVals = new Array(pages.length); // matrix of times - for (var i = 0; i < this.timeVals.length; ++i) { - this.timeVals[i] = new Array; - } -} - -// returns an object with the following properties: -// min : min value of array elements -// max : max value of array elements -// mean : mean value of array elements -// vari : variance computation -// stdd : standard deviation, sqrt(vari) -// indexOfMax : index of max element (the element that is -// removed from the mean computation) -Report.prototype.getArrayStats = function(ary) { - var r = {}; - r.min = ary[0]; - r.max = ary[0]; - r.indexOfMax = 0; - var sum = 0; - for (var i = 0; i < ary.length; ++i) { - if (ary[i] < r.min) { - r.min = ary[i]; - } else if (ary[i] > r.max) { - r.max = ary[i]; - r.indexOfMax = i; - } - sum = sum + ary[i]; - } - - // median - sorted_ary = ary.concat(); - sorted_ary.sort(); - // remove longest run - sorted_ary.pop(); - if (sorted_ary.length%2) { - r.median = sorted_ary[(sorted_ary.length-1)/2]; - }else{ - var n = Math.floor(sorted_ary.length / 2); - r.median = (sorted_ary[n] + sorted_ary[n + 1]) / 2; - } - - // ignore max value when computing mean and stddev - r.mean = (sum - r.max) / (ary.length - 1); - - r.vari = 0; - for (var i = 0; i < ary.length; ++i) { - if (i == r.indexOfMax) - continue; - var d = r.mean - ary[i]; - r.vari = r.vari + d * d; - } - - r.vari = r.vari / (ary.length - 1); - r.stdd = Math.sqrt(r.vari); - return r; -} - -Report.prototype.getReport = function() { - var all = new Array(); - var counter = 0; - - for (var i = 0; i < this.timeVals.length; ++i) { - for (var j = 0; j < this.timeVals[i].length; ++j) { - all[counter] = this.timeVals[i][j]; - ++counter; - } - } - - // avg and avg median are cumulative for all the pages - var avgs = new Array(); - var medians = new Array(); - for (var i = 0; i < this.timeVals.length; ++i) { - avgs[i] = this.getArrayStats(this.timeVals[i]).mean; - medians[i] = this.getArrayStats(this.timeVals[i]).median; - } - var avg = this.getArrayStats(avgs).mean; - var avgmed = this.getArrayStats(medians).mean; - - var r = this.getArrayStats(all); - - var report = ''; - - report += - "(tinderbox dropping follows)\n"+ - "_x_x_mozilla_page_load,"+avgmed+","+r.max+","+r.min+"\n"+ - "_x_x_mozilla_page_load_details,avgmedian|"+avgmed+"|average|"+avg.toFixed(2)+"|minimum|"+r.min+"|maximum|"+r.max+"|stddev|"+r.stdd.toFixed(2)+":" - - for (var i = 0; i < this.timeVals.length; ++i) { - r = this.getArrayStats(this.timeVals[i]); - report += - '|'+ - i+';'+ - pages[i]+';'+ - r.median+';'+ - r.mean+';'+ - r.min+';'+ - r.max - for (var j = 0; j < this.timeVals[i].length; ++j) { - report += - ';'+this.timeVals[i][j] - } - } - return report; -} - -Report.prototype.recordTime = function(pageIndex, ms) { - this.timeVals[pageIndex].push(ms); -} diff --git a/testing/tools/pageloader/install.rdf b/testing/tools/pageloader/install.rdf deleted file mode 100644 index 70babd0c2ba..00000000000 --- a/testing/tools/pageloader/install.rdf +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - pageloader@mozilla.org - 0.5 - 2 - - - - - {ec8030f7-c20a-464f-9b0e-13a3a9e97384} - 1.0+ - 4.0 - - - - - PageLoader - A pageloader extension. - Robert Helmer - http://www.roberthelmer.com/ - - diff --git a/testing/tools/pageloader/test/chrome/content/pageloader.js b/testing/tools/pageloader/test/chrome/content/pageloader.js deleted file mode 100755 index 897a958bd64..00000000000 --- a/testing/tools/pageloader/test/chrome/content/pageloader.js +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/js - -// mock objects -function alert(str) { - print(str); -} -function dump(str) { - print(str); -} -window = new Object(); -document = new Object(); -document.createEvent = function(str) { - obj = new Object(); - obj.initMouseEvent = function() {} - return obj; -} -document.getElementById = function(str) { - obj = new Object(); - if (str == 'contentPageloader') { - obj.content = new Object(); - obj.content.addEventListener = function() {} - obj.content.removeEventListener = function() {} - obj.content.loadURI = function() {} - return obj.content; - } else if (str == 'plStartButton') { - obj.startButton = new Object(); - obj.startButton.setAttribute = function(key, value) {} - return obj.startButton; - } -} -evt = new Object(); -evt.type = 'load'; -window.setTimeout = function() {} -this.content = document.getElementById('content'); - -// dummy data -pages = ['http://google.com']; - -load(['chrome/content/pageloader.js']); -load(['chrome/content/report.js']); - -plInit(true); -plInit(false); -for (cycle = 0; cycle < NUM_CYCLES*2; cycle++) { - plLoadHandler(evt); -} diff --git a/testing/tools/pageloader/test/chrome/content/report.js b/testing/tools/pageloader/test/chrome/content/report.js deleted file mode 100755 index 1658f19db71..00000000000 --- a/testing/tools/pageloader/test/chrome/content/report.js +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/js -load(['chrome/content/report.js']); - -pages = [ - 'http://www.google.com', - 'http://www.yahoo.com', - 'http://www.msn.com', -]; - -cycle_time = 5; -report = new Report(pages); - -for (var c=0; c < cycle_time; c++) { - for (var p=0; p < pages.length; p++) { - report.recordTime(p, c+1); - } -} - -print(report.getReport()); diff --git a/toolkit/toolkit-makefiles.sh b/toolkit/toolkit-makefiles.sh index b02f33eba4e..6c91aa5633b 100644 --- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -834,7 +834,6 @@ if [ "$ENABLE_TESTS" ]; then layout/style/test/Makefile layout/style/test/chrome/Makefile layout/tables/test/Makefile - layout/tools/pageloader/Makefile layout/tools/reftest/Makefile layout/xul/base/test/Makefile layout/xul/test/Makefile