Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | # License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 3 | # You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | |
michael@0 | 5 | import os |
michael@0 | 6 | import unittest |
michael@0 | 7 | |
michael@0 | 8 | import mozprofile |
michael@0 | 9 | import mozrunner |
michael@0 | 10 | |
michael@0 | 11 | |
michael@0 | 12 | @unittest.skipIf(not os.environ.get('BROWSER_PATH'), |
michael@0 | 13 | 'No binary has been specified.') |
michael@0 | 14 | class MozrunnerTestCase(unittest.TestCase): |
michael@0 | 15 | |
michael@0 | 16 | def setUp(self): |
michael@0 | 17 | self.pids = [] |
michael@0 | 18 | self.threads = [ ] |
michael@0 | 19 | |
michael@0 | 20 | self.profile = mozprofile.FirefoxProfile() |
michael@0 | 21 | self.runner = mozrunner.FirefoxRunner(self.profile) |
michael@0 | 22 | |
michael@0 | 23 | def tearDown(self): |
michael@0 | 24 | for thread in self.threads: |
michael@0 | 25 | thread.join() |
michael@0 | 26 | |
michael@0 | 27 | self.runner.cleanup() |
michael@0 | 28 | |
michael@0 | 29 | # Clean-up any left over and running processes |
michael@0 | 30 | for pid in self.pids: |
michael@0 | 31 | # TODO: Bug 925408 |
michael@0 | 32 | # mozprocess is not able yet to kill specific processes |
michael@0 | 33 | pass |