Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
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 |
michael@0 | 3 | # file, # You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 4 | |
michael@0 | 5 | from __future__ import unicode_literals |
michael@0 | 6 | |
michael@0 | 7 | import os |
michael@0 | 8 | import sys |
michael@0 | 9 | |
michael@0 | 10 | from mach.decorators import ( |
michael@0 | 11 | CommandArgument, |
michael@0 | 12 | CommandProvider, |
michael@0 | 13 | Command, |
michael@0 | 14 | ) |
michael@0 | 15 | |
michael@0 | 16 | from mozbuild.base import MachCommandBase |
michael@0 | 17 | |
michael@0 | 18 | |
michael@0 | 19 | @CommandProvider |
michael@0 | 20 | class WebIDLProvider(MachCommandBase): |
michael@0 | 21 | @Command('webidl-example', category='misc', |
michael@0 | 22 | description='Generate example files for a WebIDL interface.') |
michael@0 | 23 | @CommandArgument('interface', nargs='+', |
michael@0 | 24 | help='Interface(s) whose examples to generate.') |
michael@0 | 25 | def webidl_example(self, interface): |
michael@0 | 26 | from mozwebidlcodegen import BuildSystemWebIDL |
michael@0 | 27 | |
michael@0 | 28 | manager = self._spawn(BuildSystemWebIDL).manager |
michael@0 | 29 | for i in interface: |
michael@0 | 30 | manager.generate_example_files(i) |
michael@0 | 31 | |
michael@0 | 32 | @Command('webidl-parser-test', category='testing', |
michael@0 | 33 | description='Run WebIDL tests.') |
michael@0 | 34 | @CommandArgument('--verbose', '-v', action='store_true', |
michael@0 | 35 | help='Run tests in verbose mode.') |
michael@0 | 36 | def webidl_test(self, verbose=False): |
michael@0 | 37 | sys.path.insert(0, os.path.join(self.topsrcdir, 'other-licenses', |
michael@0 | 38 | 'ply')) |
michael@0 | 39 | |
michael@0 | 40 | from runtests import run_tests |
michael@0 | 41 | return run_tests(None, verbose=verbose) |