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.
diff --git a/tools/wptrunner/wptrunner/browsers/chrome.py b/tools/wptrunner/wptrunner/browsers/chrome.py
index 4669ec4..06f3d34 100644
--- a/tools/wptrunner/wptrunner/browsers/chrome.py
+++ b/tools/wptrunner/wptrunner/browsers/chrome.py
@@ -139,19 +139,17 @@
     if kwargs["enable_experimental"]:
         chrome_options["args"].extend(["--enable-experimental-web-platform-features"])
 
-    new_headless_mode = ("--headless=new" in kwargs.get("binary_args", []))
-
-    # Pass the --headless flag to Chrome if WPT's own --headless flag was set
-    # or if we're running print reftests because of crbug.com/753118
-    if ((kwargs["headless"] or test_type == "print-reftest") and
-        "--headless" not in chrome_options["args"] and not new_headless_mode):
-        chrome_options["args"].append("--headless")
-
     # Copy over any other flags that were passed in via `--binary-arg`
     for arg in kwargs.get("binary_args", []):
         if arg not in chrome_options["args"]:
             chrome_options["args"].append(arg)
 
+    # Pass the --headless=new flag to Chrome if WPT's own --headless flag was
+    # set. '--headless' should always mean the new headless mode, as the old
+    # headless mode is not used anyway.
+    if kwargs["headless"] and "--headless=new" not in chrome_options["args"]:
+        chrome_options["args"].append("--headless=new")
+
     if test_type == "wdspec":
         executor_kwargs["binary_args"] = chrome_options["args"]