From 0a1ca63b2e4e727b5866498b3b2c54f66b9ee671 Mon Sep 17 00:00:00 2001 From: "ctalbert@mozilla.com" Date: Thu, 7 Feb 2008 13:15:16 -0800 Subject: [PATCH] bug 416032 - expanding minotaur search URL checking r=Pike --- testing/release/minotaur/sb.js | 50 ++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/testing/release/minotaur/sb.js b/testing/release/minotaur/sb.js index 4946dd6dadd..91df8cf69b7 100644 --- a/testing/release/minotaur/sb.js +++ b/testing/release/minotaur/sb.js @@ -113,7 +113,7 @@ function outputProfileDir() { outFile.init(file, MODE_WRONLY | MODE_CREATE | MODE_APPEND | MODE_TRUNCATE, 0600, 0); // Need to create the converterStream - convStream = Cc["@mozilla.org/intl/converter-output-stream;1"] + var convStream = Cc["@mozilla.org/intl/converter-output-stream;1"] .createInstance(Ci.nsIConverterOutputStream); convStream.init(outFile, "UTF-8", 0, 0x0000); @@ -127,12 +127,47 @@ function outputProfileDir() { } function listEngines() { + // search field + var submission = null; + var engineIndex = 0; + + function outputEngine(idx, eng, submission) { + var url = null; + if (submission && submission.uri) + url = submission.uri.spec; + if (url) + output("" + idx + "|" + eng.name + "|" + url + "\n"); + else + output("" + idx + "|" + eng.name + "|" + "none" + "\n"); + } + + // List out the default engine information such as icon, description, and + // hidden status output("\n
\n"); for each (var engine in engines) { engineIndex++; - var submission = engine.getSubmission("foo", null); - var url = submission.uri.spec; - output("" + engineIndex + "|" + engine.name + "|" + url + "\n"); + // Output the engine details + if (engine.iconURI) + output("" + engineIndex + "|" + engine.name + "|" + engine.description + + "|" + engine.hidden + "|" + engine.alias + "|" + engine.iconURI.spec + "\n"); + else + output("" + engineIndex + "|" + engine.name + "|" + engine.description + + "|" + engine.hidden + "|" + engine.alias + "|none\n"); + + // Output the normal Search URL for when the user types a query into the + submission = engine.getSubmission("foo", null); + outputEngine(engineIndex, engine, submission); + + // List the search Form URL that is used when the field is left blank and the + // user hits enter. + if (engine.searchForm) + output("" + engineIndex + "|" + engine.name + "|" + engine.searchForm + "\n"); + else + output("" + engineIndex + "|" + engine.name + "|" + "none\n"); + + // List the search suggest URL. + submission = engine.getSubmission("foo", "application/x-suggestions+json"); + outputEngine(engineIndex, engine, submission); } output("
"); } @@ -251,8 +286,11 @@ function listExtensions() { var exts = extmgr.getItemList(Ci.nsIUpdateItem.TYPE_ANY, { }); for (var i=0; i < exts.length; ++i) { var item = exts[i]; - output("" + i + "|" + item.name + "|" + item.id + "|" + item.version + "|" - + item.iconURL + "|" + item.xpiURL + "|" + item.type + "\n"); + // Don't output DOM inspector and Ffx default theme information + if (item.id != "inspector@mozilla.org" && + item.id != "{972ce4c6-7e08-4474-a285-3208198ce6fd}") + output("" + i + "|" + item.name + "|" + item.id + "|" + item.version + "|" + + item.iconURL + "|" + item.xpiURL + "|" + item.type + "\n"); } output(""); }