diff --git a/Meta/import-wpt-test.py b/Meta/import-wpt-test.py new file mode 100755 index 00000000000..4cbe0a2cc44 --- /dev/null +++ b/Meta/import-wpt-test.py @@ -0,0 +1,142 @@ +#!/usr/bin/env python3 + +import os +import sys +from pathlib import Path +from bs4 import BeautifulSoup +from urllib.request import urlopen +from collections import namedtuple + +wpt_base_url = 'https://wpt.live/' +wpt_import_path = 'Tests/LibWeb/Text/input/wpt-import' +wpt_expected_path = 'Tests/LibWeb/Text/expected/wpt-import' +PathMapping = namedtuple('PathMapping', ['source', 'destination']) + + +def get_script_sources(page_source): + # Find all the