Skip to content

Commit 5165a1b

Browse files
committed
Remove get_safari_version
1 parent a827fc0 commit 5165a1b

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

test/common.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import json
1919
import logging
2020
import os
21-
import plistlib
2221
import psutil
2322
import re
2423
import shlex
@@ -230,17 +229,6 @@ def is_safari():
230229
return EMTEST_BROWSER and 'safari' in EMTEST_BROWSER.lower()
231230

232231

233-
def get_safari_version():
234-
plist_path = os.path.join(EMTEST_BROWSER.strip(), 'Contents', 'version.plist')
235-
version_str = plistlib.load(open(plist_path, 'rb')).get('CFBundleShortVersionString')
236-
# Split into parts (major.minor.patch)
237-
parts = (version_str.split('.') + ['0', '0', '0'])[:3]
238-
# Convert each part into integers, discarding any trailing string, e.g. '13a' -> 13.
239-
parts = [int(re.match(r"\d+", s).group()) if re.match(r"\d+", s) else 0 for s in parts]
240-
# Return version as XXYYZZ
241-
return parts[0] * 10000 + parts[1] * 100 + parts[2]
242-
243-
244232
def get_browser_config():
245233
if is_chrome():
246234
return ChromeConfig()

0 commit comments

Comments
 (0)