nixos/tests/chromium: Check the version and that it's an official build

This also prints and screenshots the output of chrome://version which
contains useful information.

Outputs (stable, beta, ungoogled, chrome-stable, chrome-beta, chrome-dev):
Chromium	92.0.4515.107 (Official Build) (64-bit)
Chromium        92.0.4515.107 (Official Build) (64-bit)
Chromium        91.0.4472.164 (Official Build, ungoogled-chromium) (64-bit)
Google Chrome   92.0.4515.107 (Official Build) (64-bit)
Google Chrome   92.0.4515.107 (Official Build) beta (64-bit)
Google Chrome   93.0.4577.8 (Official Build) dev (64-bit)
This commit is contained in:
Michael Weiss 2021-07-25 11:49:57 +02:00
parent a0b7bd69ac
commit 7b3c054514
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83

View File

@ -243,6 +243,16 @@ mapAttrs (channel: chromiumPkg: makeTest rec {
machine.wait_for_text("Graphics Feature Status")
with test_new_win("version_info", "chrome://version", "About Version") as clipboard:
filters = [
r"${chromiumPkg.version} \(Official Build",
]
if not all(
re.search(filter, clipboard) for filter in filters
):
assert False, "Version info not correct."
machine.shutdown()
'';
}) channelMap