Commit 0578baaf authored by Robert Ma's avatar Robert Ma Committed by Commit Bot

Create a copy of webidl2.js for non-WPT layout tests

With this change, non-WPT layout tests are completely independent of
WPT files and hence won't be affected by imports. The change also makes
the behaviour more consistent as we already have copies of
testharness.js, testdriver.js and idlharness.js, with webidl2.js being
the only left. An apache alias rule is changed accordingly.

See crbug.com/685854 for maintaining these Chromium copies.

Besides, WebIDLParser.js (which is an old version of webidl2.js) is
removed from resources/ to avoid confusion. The only three files using
it are modified to use webidl2.js instead.

Bug: 787829, 685854
Change-Id: I2d9966646cc7db557d87ec403cd0c833ee262279
Reviewed-on: https://chromium-review.googlesource.com/785992
Commit-Queue: Robert Ma <robertma@chromium.org>
Reviewed-by: default avatarQuinten Yearsley <qyearsley@chromium.org>
Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519834}
parent cc79c9c9
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<link rel="help" href="https://github.com/WICG/get-installed-related-apps/blob/master/EXPLAINER.md"> <link rel="help" href="https://github.com/WICG/get-installed-related-apps/blob/master/EXPLAINER.md">
<script src=../resources/testharness.js></script> <script src=../resources/testharness.js></script>
<script src=../resources/testharnessreport.js></script> <script src=../resources/testharnessreport.js></script>
<script src=../resources/WebIDLParser.js></script> <script src=../resources/webidl2.js></script>
<script src=../resources/idlharness.js></script> <script src=../resources/idlharness.js></script>
<script type="text/plain" id="untested"> <script type="text/plain" id="untested">
interface Navigator { interface Navigator {
......
The following files are used to run W3C testharness.js-style tests, The following files are used to run W3C testharness.js-based tests.
either authored for Blink or imported from W3C's web-platform-tests. These files should not be modified locally, as they are manually
These files should not be modified locally, as they are imported. synced from LayoutTests/external/wpt/resources (https://crbug.com/685854),
which is automatically synced with W3C web-platform-tests.
* testharness.js from testharness.js * testdriver.js
* testharness.css from testharness.js * testharness.js
* idlharness.js from testharness.js * testharness.css
* WebIDLParser.js from webidl2.js * idlharness.js
* webidl2.js
NOTE: The 'WebIDLParser.js' file is developed as 'webidl2.js' but
web-platform-tests's wpt-tools server is configured to serve the
resource under a different name, which is matched here.
The following files are native to Blink and can be modified: The following files are native to Blink and can be modified:
* testdriver-vendor.js automation via Blink internal APIs
* testharnessreport.js integration with Blink's test runner * testharnessreport.js integration with Blink's test runner
See also: See also:
* https://www.chromium.org/blink/importing-the-w3c-tests https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md
* LayoutTests/imported/README
References: References:
* web-platform-tests https://github.com/w3c/web-platform-tests * web-platform-tests https://github.com/w3c/web-platform-tests
* testharness.js https://github.com/w3c/testharness.js * webidl2.js https://github.com/w3c/webidl2.js
* webidl2.js https://github.com/darobin/webidl2.js
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</title> </title>
<script src="../../resources/testharness.js"></script> <script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script> <script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/WebIDLParser.js"></script> <script src="../../resources/webidl2.js"></script>
<script src="../../resources/idlharness.js"></script> <script src="../../resources/idlharness.js"></script>
</head> </head>
<body> <body>
......
<!DOCTYPE html> <!DOCTYPE html>
<script src=../resources/testharness.js></script> <script src=../resources/testharness.js></script>
<script src=../resources/testharnessreport.js></script> <script src=../resources/testharnessreport.js></script>
<script src=../resources/WebIDLParser.js></script> <script src=../resources/webidl2.js></script>
<script src=../resources/idlharness.js></script> <script src=../resources/idlharness.js></script>
<script type="text/plain" id="tested"> <script type="text/plain" id="tested">
[SecureContext] [SecureContext]
......
...@@ -58,7 +58,6 @@ class ApacheHTTP(server_base.ServerBase): ...@@ -58,7 +58,6 @@ class ApacheHTTP(server_base.ServerBase):
test_dir = self._port_obj.layout_tests_dir() test_dir = self._port_obj.layout_tests_dir()
document_root = self._filesystem.join(test_dir, 'http', 'tests') document_root = self._filesystem.join(test_dir, 'http', 'tests')
forms_test_resources_dir = self._filesystem.join(test_dir, 'fast', 'forms', 'resources') forms_test_resources_dir = self._filesystem.join(test_dir, 'fast', 'forms', 'resources')
imported_resources_dir = self._filesystem.join(test_dir, 'external', 'wpt', 'resources')
media_resources_dir = self._filesystem.join(test_dir, 'media') media_resources_dir = self._filesystem.join(test_dir, 'media')
webaudio_resources_dir = self._filesystem.join(test_dir, 'webaudio', 'resources') webaudio_resources_dir = self._filesystem.join(test_dir, 'webaudio', 'resources')
mime_types_path = self._filesystem.join(self._port_obj.apache_config_directory(), 'mime.types') mime_types_path = self._filesystem.join(self._port_obj.apache_config_directory(), 'mime.types')
...@@ -80,7 +79,6 @@ class ApacheHTTP(server_base.ServerBase): ...@@ -80,7 +79,6 @@ class ApacheHTTP(server_base.ServerBase):
'-c', 'Alias /geolocation-api/js-test-resources "%s/geolocation-api/resources"' % test_dir, '-c', 'Alias /geolocation-api/js-test-resources "%s/geolocation-api/resources"' % test_dir,
'-c', 'Alias /resources/testharness.js "%s/resources/testharness.js"' % test_dir, '-c', 'Alias /resources/testharness.js "%s/resources/testharness.js"' % test_dir,
'-c', 'Alias /resources/testharnessreport.js "%s/resources/testharnessreport.js"' % test_dir, '-c', 'Alias /resources/testharnessreport.js "%s/resources/testharnessreport.js"' % test_dir,
'-c', 'Alias /w3c/resources/WebIDLParser.js "%s/webidl2/lib/webidl2.js"' % imported_resources_dir,
'-c', 'Alias /w3c/resources "%s/resources"' % test_dir, '-c', 'Alias /w3c/resources "%s/resources"' % test_dir,
'-c', 'Alias /forms-test-resources "%s"' % forms_test_resources_dir, '-c', 'Alias /forms-test-resources "%s"' % forms_test_resources_dir,
'-c', 'Alias /media-resources "%s"' % media_resources_dir, '-c', 'Alias /media-resources "%s"' % media_resources_dir,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment