Make AMPB a bundled browser runtime

This commit is contained in:
jwinterm
2026-07-07 17:05:58 -04:00
parent 8a96957f62
commit e059b134b3
16 changed files with 141 additions and 69 deletions
+9 -8
View File
@@ -6,18 +6,19 @@ from ampbrowser.metadata import BROWSER_BACKENDS
class BrowserStrategyTest(unittest.TestCase):
def test_primary_backend_is_hardened_firefox(self) -> None:
primary = [backend for backend in BROWSER_BACKENDS if backend.role == "primary web runtime"]
def test_primary_desktop_backend_is_bundled_gecko(self) -> None:
primary = [backend for backend in BROWSER_BACKENDS if backend.role == "primary desktop runtime"]
self.assertEqual(1, len(primary))
self.assertEqual("hardened-firefox", primary[0].name)
self.assertIn("Firefox", primary[0].privacy_posture)
self.assertEqual("ampb-gecko-desktop", primary[0].name)
self.assertIn("no system browser dependency", primary[0].privacy_posture)
def test_chromium_is_fallback_not_privacy_baseline(self) -> None:
chromium = next(backend for backend in BROWSER_BACKENDS if backend.name == "chromium-cef")
def test_primary_android_backend_is_bundled_geckoview(self) -> None:
primary = [backend for backend in BROWSER_BACKENDS if backend.role == "primary android runtime"]
self.assertEqual("fallback", chromium.status)
self.assertIn("not a Tor Browser", chromium.privacy_posture)
self.assertEqual(1, len(primary))
self.assertEqual("ampb-geckoview-android", primary[0].name)
self.assertIn("no system browser dependency", primary[0].privacy_posture)
if __name__ == "__main__":
+1 -1
View File
@@ -13,7 +13,7 @@ class ConfigTest(unittest.TestCase):
config = load_config(Path(tmp))
self.assertEqual(".ampb", config.state_dir)
self.assertEqual("hardened-firefox", config.default_engine)
self.assertEqual("ampb-gecko", config.default_engine)
self.assertEqual("adopt-or-prompt-manage", config.transport_mode("tor"))
self.assertEqual(".ampb/profiles/tor", config.profile_path("tor"))