Skip to content

Commit 231f825

Browse files
authored
Only use new headless mode for Chrome (#44304)
* Only use new headless mode for Chrome We are going to use headful mode in Chromium, and results for wpt.fyi also comes from headful mode, thus there is no need to run tests in the old headless mode. crbug.com/753118 is also fixed now. Remove the special handling for print-ref tests also.
1 parent 16f2f19 commit 231f825

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tools/wptrunner/wptrunner/browsers/chrome.py

+6-8
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,17 @@ def executor_kwargs(logger, test_type, test_environment, run_info_data,
139139
if kwargs["enable_experimental"]:
140140
chrome_options["args"].extend(["--enable-experimental-web-platform-features"])
141141

142-
new_headless_mode = ("--headless=new" in kwargs.get("binary_args", []))
143-
144-
# Pass the --headless flag to Chrome if WPT's own --headless flag was set
145-
# or if we're running print reftests because of crbug.com/753118
146-
if ((kwargs["headless"] or test_type == "print-reftest") and
147-
"--headless" not in chrome_options["args"] and not new_headless_mode):
148-
chrome_options["args"].append("--headless")
149-
150142
# Copy over any other flags that were passed in via `--binary-arg`
151143
for arg in kwargs.get("binary_args", []):
152144
if arg not in chrome_options["args"]:
153145
chrome_options["args"].append(arg)
154146

147+
# Pass the --headless=new flag to Chrome if WPT's own --headless flag was
148+
# set. '--headless' should always mean the new headless mode, as the old
149+
# headless mode is not used anyway.
150+
if kwargs["headless"] and "--headless=new" not in chrome_options["args"]:
151+
chrome_options["args"].append("--headless=new")
152+
155153
if test_type == "wdspec":
156154
executor_kwargs["binary_args"] = chrome_options["args"]
157155

0 commit comments

Comments
 (0)