tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

prod_config_windows_taskcluster.py (4768B)


      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 file,
      3 # You can obtain one at http://mozilla.org/MPL/2.0/.
      4 
      5 # This is a template config file for web-platform-tests test.
      6 
      7 import os
      8 import platform
      9 import sys
     10 
     11 # OS Specifics
     12 DISABLE_SCREEN_SAVER = False
     13 ADJUST_MOUSE_AND_SCREEN = True
     14 DESKTOP_VISUALFX_THEME = {
     15    "Let Windows choose": 0,
     16    "Best appearance": 1,
     17    "Best performance": 2,
     18    "Custom": 3,
     19 }.get("Best appearance")
     20 TASKBAR_AUTOHIDE_REG_PATH = {
     21    "Windows 7": r"HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2",
     22    "Windows 10": r"HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3",
     23 }.get(f"{platform.system()} {platform.release()}")
     24 #####
     25 
     26 config = {
     27    "options": [
     28        "--prefs-root=%(test_path)s\\prefs",
     29        "--config=%(test_path)s\\wptrunner.ini",
     30        "--ca-cert-path=%(test_path)s\\tests\\tools\\certs\\cacert.pem",
     31        "--host-key-path=%(test_path)s\\tests\\tools\\certs\\web-platform.test.key",
     32        "--host-cert-path=%(test_path)s\\tests\\tools\\certs\\web-platform.test.pem",
     33        "--certutil-binary=%(test_install_path)s\\bin\\certutil.exe",
     34    ],
     35    "exes": {
     36        "python": sys.executable,
     37        "hg": os.path.join(os.environ["PROGRAMFILES"], "Mercurial", "hg"),
     38    },
     39    "run_cmd_checks_enabled": True,
     40    "preflight_run_cmd_suites": [
     41        {
     42            "name": "disable_screen_saver",
     43            "cmd": ["xset", "s", "off", "s", "reset"],
     44            "architectures": ["32bit", "64bit"],
     45            "halt_on_failure": False,
     46            "enabled": DISABLE_SCREEN_SAVER,
     47        },
     48        {
     49            "name": "run mouse & screen adjustment script",
     50            "cmd": [
     51                sys.executable,
     52                os.path.join(
     53                    os.getcwd(),
     54                    "mozharness",
     55                    "external_tools",
     56                    "mouse_and_screen_resolution.py",
     57                ),
     58                "--configuration-file",
     59                os.path.join(
     60                    os.getcwd(),
     61                    "mozharness",
     62                    "external_tools",
     63                    "machine-configuration.json",
     64                ),
     65            ],
     66            "architectures": ["32bit", "64bit"],
     67            "halt_on_failure": True,
     68            "enabled": ADJUST_MOUSE_AND_SCREEN,
     69        },
     70        {
     71            "name": "disable windows security and maintenance notifications",
     72            "cmd": [
     73                "powershell",
     74                "-command",
     75                r"\"&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.SecurityAndMaintenance';if(!(Test-Path -Path $p)){&New-Item -Path $p -Force}&Set-ItemProperty -Path $p -Name Enabled -Value 0}\"",  # noqa
     76            ],
     77            "architectures": ["32bit", "64bit"],
     78            "halt_on_failure": True,
     79            "enabled": (platform.release() == 10),
     80        },
     81        {
     82            "name": "set windows VisualFX",
     83            "cmd": [
     84                "powershell",
     85                "-command",
     86                f"\"&{{&Set-ItemProperty -Path 'HKCU:Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\VisualEffects' -Name VisualFXSetting -Value {DESKTOP_VISUALFX_THEME}}}\"",
     87            ],
     88            "architectures": ["32bit", "64bit"],
     89            "halt_on_failure": True,
     90            "enabled": True,
     91        },
     92        {
     93            "name": "create scrollbars always show key",
     94            "cmd": [
     95                "powershell",
     96                "-command",
     97                r"New-ItemProperty -Path 'HKCU:\Control Panel\Accessibility' -Name 'DynamicScrollbars' -Value 0",
     98            ],
     99            "architectures": ["32bit", "64bit"],
    100            "halt_on_failure": False,
    101            "enabled": True,
    102        },
    103        {
    104            "name": "hide windows taskbar",
    105            "cmd": [
    106                "powershell",
    107                "-command",
    108                f"\"&{{$p='{TASKBAR_AUTOHIDE_REG_PATH}';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name Settings -Value $v}}\"",
    109            ],
    110            "architectures": ["32bit", "64bit"],
    111            "halt_on_failure": True,
    112            "enabled": True,
    113        },
    114        {
    115            "name": "restart windows explorer",
    116            "cmd": [
    117                "powershell",
    118                "-command",
    119                '"&{&Stop-Process -ProcessName explorer}"',
    120            ],
    121            "architectures": ["32bit", "64bit"],
    122            "halt_on_failure": True,
    123            "enabled": True,
    124        },
    125    ],
    126    "geckodriver": os.path.join("%(abs_fetches_dir)s", "geckodriver.exe"),
    127    "per_test_category": "web-platform",
    128 }