From 2bc39950acd36b29a1e035b975eac1c104a6bf7c Mon Sep 17 00:00:00 2001 From: Mark Cote Date: Fri, 4 May 2012 14:34:53 -0700 Subject: [PATCH] Bug 749275 Add ability to run peptests with configurable number of iterations r=ctalbert --- testing/peptest/peptest/__init__.py | 39 +---------- .../peptest/extension/chrome/content/init.js | 41 ++---------- .../peptest/extension/chrome/content/quit.js | 39 +---------- .../extension/components/pep-cmdline.js | 39 +---------- .../peptest/extension/resource/pep/api.js | 55 +++++----------- .../peptest/extension/resource/pep/logger.js | 39 +---------- .../peptest/extension/resource/pep/results.js | 43 ++---------- .../extension/resource/pep/testsuite.js | 65 ++++++------------- .../peptest/extension/resource/pep/utils.js | 39 +---------- testing/peptest/peptest/pepprocess.py | 38 +---------- testing/peptest/peptest/pepresults.py | 38 +---------- testing/peptest/peptest/peputils.py | 38 +---------- testing/peptest/peptest/runpeptests.py | 53 +++++---------- testing/peptest/setup.py | 41 ++---------- testing/peptest/tests/firefox/firefox_all.ini | 1 - .../peptest/tests/firefox/test_contextMenu.js | 50 +++----------- .../tests/firefox/test_openBlankTab.js | 38 +---------- .../tests/firefox/test_openBookmarksMenu.js | 40 ++---------- .../peptest/tests/firefox/test_openWindow.js | 40 ++---------- .../tests/firefox/test_resizeWindow.js | 38 +---------- .../tests/firefox/test_searchGoogle.js | 38 +---------- 21 files changed, 113 insertions(+), 739 deletions(-) diff --git a/testing/peptest/peptest/__init__.py b/testing/peptest/peptest/__init__.py index 8e49e8edc5bf..79273ea9421c 100644 --- a/testing/peptest/peptest/__init__.py +++ b/testing/peptest/peptest/__init__.py @@ -1,38 +1,5 @@ -# ***** 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 peptest. -# -# The Initial Developer of the Original Code is -# The Mozilla Foundation. -# Portions created by the Initial Developer are Copyright (C) 2___ -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Andrew Halberstadt -# -# 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 ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. from runpeptests import * diff --git a/testing/peptest/peptest/extension/chrome/content/init.js b/testing/peptest/peptest/extension/chrome/content/init.js index 554d254d883b..8d9d4a8dbd1d 100644 --- a/testing/peptest/peptest/extension/chrome/content/init.js +++ b/testing/peptest/peptest/extension/chrome/content/init.js @@ -1,39 +1,6 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011. - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ const cmdLineHandler = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=pep"] @@ -75,7 +42,7 @@ function initialize() { APPCONTENT = document.getElementById('appcontent'); function runTests() { APPCONTENT.removeEventListener('pageshow', runTests); - suite = new TestSuite(obj.tests); + suite = new TestSuite(obj.tests, obj.options); suite.run(); goQuitApplication(); }; diff --git a/testing/peptest/peptest/extension/chrome/content/quit.js b/testing/peptest/peptest/extension/chrome/content/quit.js index 7323c80dc35a..c58e8ca76ea7 100644 --- a/testing/peptest/peptest/extension/chrome/content/quit.js +++ b/testing/peptest/peptest/extension/chrome/content/quit.js @@ -1,39 +1,6 @@ -/* ***** 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 The Original Code is Mozilla Automated Testing Code -* -* The Initial Developer of the Original Code is -* The Mozilla Foundation. -* Portions created by the Initial Developer are Copyright (C) 2005 -* the Initial Developer. All Rights Reserved. -* -* Contributor(s): -* Bob Clary -* -* 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 ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ /* From mozilla/toolkit/content diff --git a/testing/peptest/peptest/extension/components/pep-cmdline.js b/testing/peptest/peptest/extension/components/pep-cmdline.js index e6b16bc4d78d..adac3d541ff4 100644 --- a/testing/peptest/peptest/extension/components/pep-cmdline.js +++ b/testing/peptest/peptest/extension/components/pep-cmdline.js @@ -1,39 +1,6 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ const PEP_CONTRACTID = "@mozilla.org/commandlinehandler/general-startup;1?type=pep"; const PEP_CID = Components.ID('{807b1ae9-df22-40bd-8d0a-2a583da551bb}'); diff --git a/testing/peptest/peptest/extension/resource/pep/api.js b/testing/peptest/peptest/extension/resource/pep/api.js index 339341f59267..b9a46db921fc 100644 --- a/testing/peptest/peptest/extension/resource/pep/api.js +++ b/testing/peptest/peptest/extension/resource/pep/api.js @@ -1,39 +1,6 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011. - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ var EXPORTED_SYMBOLS = ['PepAPI']; var results = {}; Components.utils.import('resource://pep/results.js', results); @@ -53,8 +20,9 @@ const ios = Components.classes["@mozilla.org/network/io-service;1"] * Any properties of this object will be injected into test scope * under the 'pep' namespace. */ -function PepAPI(test) { +function PepAPI(test, options) { this.test = test; + this.options = options; this.log = new Log(this.test.name); this.resultHandler = new results.ResultHandler(this.test.name); @@ -67,7 +35,18 @@ function PepAPI(test) { */ PepAPI.prototype.performAction = function(actionName, func) { this.resultHandler.startAction(actionName); - func(); + try { + func(); + } catch (e) { + log.error(test.name + ' | ' + e); + if (e['stack'] !== undefined) { + log.debug(test.name + ' | Traceback:'); + let lines = e.stack.split('\n'); + for (let i = 0; i < lines.length - 1; ++i) { + log.debug('\t' + lines[i]); + } + } + } this.resultHandler.endAction(); }; /** diff --git a/testing/peptest/peptest/extension/resource/pep/logger.js b/testing/peptest/peptest/extension/resource/pep/logger.js index b9e5fb6e46ef..18c29dde3cf9 100644 --- a/testing/peptest/peptest/extension/resource/pep/logger.js +++ b/testing/peptest/peptest/extension/resource/pep/logger.js @@ -1,39 +1,6 @@ -/* ***** 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 peptest. -* -* The Initial Developer of the Original Code is -* The Mozilla Foundation. -* Portions created by the Initial Developer are Copyright (C) 2011. -* the Initial Developer. All Rights Reserved. -* -* Contributor(s): -* Andrew Halberstadt -* -* 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 ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ /** * Simple logging module that dumps to the console diff --git a/testing/peptest/peptest/extension/resource/pep/results.js b/testing/peptest/peptest/extension/resource/pep/results.js index 624b9cfa8b61..99296fd8462a 100644 --- a/testing/peptest/peptest/extension/resource/pep/results.js +++ b/testing/peptest/peptest/extension/resource/pep/results.js @@ -1,39 +1,6 @@ -/* ***** 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 peptest. -* -* The Initial Developer of the Original Code is -* The Mozilla Foundation. -* Portions created by the Initial Developer are Copyright (C) 2011. -* the Initial Developer. All Rights Reserved. -* -* Contributor(s): -* Andrew Halberstadt -* -* 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 ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ var EXPORTED_SYMBOLS = ['ResultHandler']; @@ -48,7 +15,7 @@ function ResultHandler(testName) { ResultHandler.prototype.startAction = function(actionName) { this.currentAction = {}; - this.currentAction['test_name'] = this.testName + this.currentAction['test_name'] = this.testName; this.currentAction['action_name'] = actionName; this.currentAction['start_time'] = Date.now(); log.log('ACTION-START', this.testName + ' ' + this.currentAction['action_name']); @@ -69,5 +36,5 @@ ResultHandler.prototype.endAction = function() { } ResultHandler.prototype.getResults = function() { - return this.results + return this.results; } diff --git a/testing/peptest/peptest/extension/resource/pep/testsuite.js b/testing/peptest/peptest/extension/resource/pep/testsuite.js index f60ed0cfcf6d..2ef92169610b 100644 --- a/testing/peptest/peptest/extension/resource/pep/testsuite.js +++ b/testing/peptest/peptest/extension/resource/pep/testsuite.js @@ -1,46 +1,13 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011. - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ var EXPORTED_SYMBOLS = ['TestSuite']; const gIOS = Components.classes['@mozilla.org/network/io-service;1'] - .getService(Components.interfaces.nsIIOService); + .getService(Components.interfaces.nsIIOService); const scriptLoader = Components.classes['@mozilla.org/moz/jssubscript-loader;1'] - .getService(Components.interfaces.mozIJSSubScriptLoader); + .getService(Components.interfaces.mozIJSSubScriptLoader); var api = {}; // api that gets injected into each test scope var log = {}; @@ -56,17 +23,23 @@ Components.utils.import('resource://pep/utils.js', utils); * * tests - a list of test objects to run */ -function TestSuite(tests) { +function TestSuite(tests, options) { this.tests = tests; + this.options = options; + if (!this.options.numIterations) { + this.options.numIterations = 1; + } } TestSuite.prototype.run = function() { - for (let i = 0; i < this.tests.length; ++i) { - this.loadTest(this.tests[i]); - // Sleep for a second because tests will interfere - // with each other if loaded too quickly - // TODO Figure out why they interfere with each other - utils.sleep(1000); + for (let i = 0; i < this.options.numIterations; ++i) { + for (let j = 0; j < this.tests.length; ++j) { + this.loadTest(this.tests[j]); + // Sleep for a second because tests will interfere + // with each other if loaded too quickly + // TODO Figure out why they interfere with each other + utils.sleep(1000); + } } log.info('Test Suite Finished'); }; @@ -83,7 +56,7 @@ TestSuite.prototype.loadTest = function(test) { try { let testScope = { - pep: new api.PepAPI(test) + pep: new api.PepAPI(test, this.options) }; // pre-test diff --git a/testing/peptest/peptest/extension/resource/pep/utils.js b/testing/peptest/peptest/extension/resource/pep/utils.js index a05649a419da..d3676b0ff396 100644 --- a/testing/peptest/peptest/extension/resource/pep/utils.js +++ b/testing/peptest/peptest/extension/resource/pep/utils.js @@ -1,39 +1,6 @@ -/* ***** 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 peptest. -* -* The Initial Developer of the Original Code is -* The Mozilla Foundation. -* Portions created by the Initial Developer are Copyright (C) 2011. -* the Initial Developer. All Rights Reserved. -* -* Contributor(s): -* Andrew Halberstadt -* -* 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 ***** */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ var EXPORTED_SYMBOLS = ['readFile', 'sleep']; diff --git a/testing/peptest/peptest/pepprocess.py b/testing/peptest/peptest/pepprocess.py index 661af2e0eec5..10c891bd8df6 100644 --- a/testing/peptest/peptest/pepprocess.py +++ b/testing/peptest/peptest/pepprocess.py @@ -1,38 +1,6 @@ -# ***** 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 Peptest. -# -# The Initial Developer of the Original Code is -# The Mozilla Foundation. -# Portions created by the Initial Developer are Copyright (C) 2011 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Andrew Halberstadt -# -# 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 ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. from mozprocess import ProcessHandler from pepresults import Results diff --git a/testing/peptest/peptest/pepresults.py b/testing/peptest/peptest/pepresults.py index 0c9ca391f824..6b9f6bd688a4 100644 --- a/testing/peptest/peptest/pepresults.py +++ b/testing/peptest/peptest/pepresults.py @@ -1,38 +1,6 @@ -# ***** 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 Peptest. -# -# The Initial Developer of the Original Code is -# The Mozilla Foundation. -# Portions created by the Initial Developer are Copyright (C) 2011 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Andrew Halberstadt -# -# 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 ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. # singleton class class Results(object): diff --git a/testing/peptest/peptest/peputils.py b/testing/peptest/peptest/peputils.py index 6d5639c53148..6b495f2dd5a3 100644 --- a/testing/peptest/peptest/peputils.py +++ b/testing/peptest/peptest/peputils.py @@ -1,38 +1,6 @@ -# ***** 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 Peptest. -# -# The Initial Developer of the Original Code is -# The Mozilla Foundation. -# Portions created by the Initial Developer are Copyright (C) 2011 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Andrew Halberstadt -# -# 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 ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. import urllib2 import urlparse diff --git a/testing/peptest/peptest/runpeptests.py b/testing/peptest/peptest/runpeptests.py index b1acaf919a6f..cf06dcec40ea 100644 --- a/testing/peptest/peptest/runpeptests.py +++ b/testing/peptest/peptest/runpeptests.py @@ -1,38 +1,6 @@ -# ***** 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 Peptest. -# -# The Initial Developer of the Original Code is -# The Mozilla Foundation. -# Portions created by the Initial Developer are Copyright (C) 2011 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Andrew Halberstadt -# -# 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 ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. from optparse import OptionParser from mozprofile import FirefoxProfile, ThunderbirdProfile, Profile @@ -51,6 +19,11 @@ import shutil import os import sys +try: + import json +except ImportError: + import simplejson as json + results = Results() here = os.path.dirname(os.path.realpath(__file__)) @@ -109,10 +82,11 @@ class Peptest(): # create a manifest object to be read by the JS side manifestObj = {} manifestObj['tests'] = tests + manifestObj['options'] = options.__dict__ # write manifest to a JSON file jsonManifest = open(os.path.join(here, 'manifest.json'), 'w') - jsonManifest.write(str(manifestObj).replace("'", "\"")) + jsonManifest.write(json.dumps(manifestObj)) jsonManifest.close() # setup environment @@ -343,6 +317,10 @@ class PeptestOptions(OptionParser): help="Starts a basic HTTP server rooted at the specified " "directory. Can be used for hosting test related files") + self.add_option("--iterations", action="store", type="int", + dest="numIterations", default=1, + help="Number of times each test should be run") + self.add_option("--symbols-path", action = "store", type = "string", dest = "symbolsPath", default = None, @@ -372,6 +350,9 @@ class PeptestOptions(OptionParser): def verifyOptions(self, options): """ verify correct options and cleanup paths """ # TODO Verify all command line args + if options.numIterations < 1: + print "error: number of iterations must be a positive integer" + return None if not options.testPath: print "error: --test-path must specify the path to a test or test manifest" return None diff --git a/testing/peptest/setup.py b/testing/peptest/setup.py index 08f55222bf69..e90ea84d656b 100644 --- a/testing/peptest/setup.py +++ b/testing/peptest/setup.py @@ -1,39 +1,6 @@ -# ***** 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 peptest. -# -# The Initial Developer of the Original Code is -# The Mozilla Foundation. -# Portions created by the Initial Developer are Copyright (C) 2011 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Andrew Halberstadt -# -# 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 ***** +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. import os from setuptools import setup, find_packages @@ -67,7 +34,7 @@ setup(name='peptest', author='Andrew Halberstadt', author_email='ahalberstadt@mozilla.com', url='https://wiki.mozilla.org/Auto-tools/Projects/peptest', - license='MPL', + license='MPL 2.0', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, package_data={'': ['*.js', '*.css', '*.html', '*.txt', '*.xpi', '*.rdf', '*.xul', '*.jsm', '*.xml'],}, diff --git a/testing/peptest/tests/firefox/firefox_all.ini b/testing/peptest/tests/firefox/firefox_all.ini index 11e933c67643..d25219339c83 100644 --- a/testing/peptest/tests/firefox/firefox_all.ini +++ b/testing/peptest/tests/firefox/firefox_all.ini @@ -1,6 +1,5 @@ [test_contextMenu.js] [test_openBlankTab.js] [test_openBookmarksMenu.js] -failThreshold = 40 [test_openWindow.js] [test_resizeWindow.js] diff --git a/testing/peptest/tests/firefox/test_contextMenu.js b/testing/peptest/tests/firefox/test_contextMenu.js index 0001081c1387..f704bb28a602 100644 --- a/testing/peptest/tests/firefox/test_contextMenu.js +++ b/testing/peptest/tests/firefox/test_contextMenu.js @@ -1,40 +1,5 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ - +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ /** * This test is designed to test responsiveness while performing actions @@ -82,17 +47,18 @@ pep.performAction('content_scroll', function() { } }); +// close the context menu +page.keypress('VK_ESCAPE'); + // Now test context menus in chrome let bar = findElement.ID(c.window.document, "toolbar-menubar"); bar.click(); pep.performAction('chrome_navigation', function() { bar.rightClick(); bar.keypress('n'); -}); - -pep.performAction('chrome_addon', function() { + c.sleep(100); bar.rightClick(); - bar.keypress('a'); + bar.keypress('n'); }); pep.performAction('chrome_scroll', function() { @@ -103,3 +69,5 @@ pep.performAction('chrome_scroll', function() { c.sleep(10); } }); + +bar.keypress('VK_ESCAPE'); diff --git a/testing/peptest/tests/firefox/test_openBlankTab.js b/testing/peptest/tests/firefox/test_openBlankTab.js index 62ad1cdc936e..6b62c9f0ef5b 100644 --- a/testing/peptest/tests/firefox/test_openBlankTab.js +++ b/testing/peptest/tests/firefox/test_openBlankTab.js @@ -1,39 +1,5 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ // Initialize mozmill Components.utils.import('resource://mozmill/driver/mozmill.js'); diff --git a/testing/peptest/tests/firefox/test_openBookmarksMenu.js b/testing/peptest/tests/firefox/test_openBookmarksMenu.js index c363884cbf4d..c88bad96cae3 100644 --- a/testing/peptest/tests/firefox/test_openBookmarksMenu.js +++ b/testing/peptest/tests/firefox/test_openBookmarksMenu.js @@ -1,39 +1,5 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ // Import mozmill and initialize a controller Components.utils.import('resource://mozmill/driver/mozmill.js'); @@ -56,3 +22,5 @@ let showall = findElement.ID(c.window.document, "bookmarksShowAll"); pep.performAction('show_all_bookmarks', function() { showall.click(); }); + +pep.getWindow("Places:Organizer").close(); \ No newline at end of file diff --git a/testing/peptest/tests/firefox/test_openWindow.js b/testing/peptest/tests/firefox/test_openWindow.js index 8caea2dbbc2f..7648a5d9e39e 100644 --- a/testing/peptest/tests/firefox/test_openWindow.js +++ b/testing/peptest/tests/firefox/test_openWindow.js @@ -1,39 +1,5 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ Components.utils.import("resource://mozmill/driver/mozmill.js"); let controller = getBrowserController(); @@ -42,3 +8,5 @@ let win = findElement.ID(controller.window.document, 'main-window'); pep.performAction("open_window", function() { win.keypress("n", {"ctrlKey":true}); }); + +pep.getWindow().close(); diff --git a/testing/peptest/tests/firefox/test_resizeWindow.js b/testing/peptest/tests/firefox/test_resizeWindow.js index 21eaad394302..7432a4a4b273 100644 --- a/testing/peptest/tests/firefox/test_resizeWindow.js +++ b/testing/peptest/tests/firefox/test_resizeWindow.js @@ -1,39 +1,5 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ // Most of the other example tests use Mozmill to perform various // automation. Note that this is not necessary. diff --git a/testing/peptest/tests/firefox/test_searchGoogle.js b/testing/peptest/tests/firefox/test_searchGoogle.js index a9e15debe910..d1265ca1c544 100644 --- a/testing/peptest/tests/firefox/test_searchGoogle.js +++ b/testing/peptest/tests/firefox/test_searchGoogle.js @@ -1,39 +1,5 @@ -/* ***** 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 peptest. - * - * The Initial Developer of the Original Code is - * The Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * Andrew Halberstadt - * - * 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 ***** */ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ // Import mozmill and initialize a controller Components.utils.import("resource://mozmill/driver/mozmill.js");