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.
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, # You can obtain one at http://mozilla.org/MPL/2.0/.
5 from __future__ import unicode_literals
7 import os
8 import sys
10 from mach.decorators import (
11 CommandArgument,
12 CommandProvider,
13 Command,
14 )
16 from mozbuild.base import MachCommandBase
19 @CommandProvider
20 class WebIDLProvider(MachCommandBase):
21 @Command('webidl-example', category='misc',
22 description='Generate example files for a WebIDL interface.')
23 @CommandArgument('interface', nargs='+',
24 help='Interface(s) whose examples to generate.')
25 def webidl_example(self, interface):
26 from mozwebidlcodegen import BuildSystemWebIDL
28 manager = self._spawn(BuildSystemWebIDL).manager
29 for i in interface:
30 manager.generate_example_files(i)
32 @Command('webidl-parser-test', category='testing',
33 description='Run WebIDL tests.')
34 @CommandArgument('--verbose', '-v', action='store_true',
35 help='Run tests in verbose mode.')
36 def webidl_test(self, verbose=False):
37 sys.path.insert(0, os.path.join(self.topsrcdir, 'other-licenses',
38 'ply'))
40 from runtests import run_tests
41 return run_tests(None, verbose=verbose)