michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: # You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: import os michael@0: import unittest michael@0: michael@0: import mozprofile michael@0: import mozrunner michael@0: michael@0: michael@0: @unittest.skipIf(not os.environ.get('BROWSER_PATH'), michael@0: 'No binary has been specified.') michael@0: class MozrunnerTestCase(unittest.TestCase): michael@0: michael@0: def setUp(self): michael@0: self.pids = [] michael@0: self.threads = [ ] michael@0: michael@0: self.profile = mozprofile.FirefoxProfile() michael@0: self.runner = mozrunner.FirefoxRunner(self.profile) michael@0: michael@0: def tearDown(self): michael@0: for thread in self.threads: michael@0: thread.join() michael@0: michael@0: self.runner.cleanup() michael@0: michael@0: # Clean-up any left over and running processes michael@0: for pid in self.pids: michael@0: # TODO: Bug 925408 michael@0: # mozprocess is not able yet to kill specific processes michael@0: pass