Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WAVE test runner #46286

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tools/wave/configuration_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import json
import os
from io import open

from tools.wpt import wpt

Expand Down Expand Up @@ -91,7 +92,7 @@ def load_configuration_file(path):
return {}

configuration = None
with open(path) as configuration_file:
with open(path, "r") as configuration_file:
configuration_file_content = configuration_file.read()
configuration = json.loads(configuration_file_content)
return configuration
2 changes: 1 addition & 1 deletion tools/wave/data/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mypy: allow-untyped-defs

class Client:
class Client(object):
def __init__(self, session_token):
self.session_token = session_token

Expand Down
2 changes: 1 addition & 1 deletion tools/wave/data/device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mypy: allow-untyped-defs

class Device:
class Device(object):
def __init__(self, token, user_agent, name, last_active):
self.token = token
self.user_agent = user_agent
Expand Down
4 changes: 2 additions & 2 deletions tools/wave/data/event_listener.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# mypy: allow-untyped-defs

class EventListener:
class EventListener(object):
def __init__(self, dispatcher_token):
super().__init__()
super(EventListener, self).__init__()
self.dispatcher_token = dispatcher_token
self.token = None

Expand Down
2 changes: 1 addition & 1 deletion tools/wave/data/http_polling_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class HttpPollingClient(Client):
def __init__(self, session_token, event):
super().__init__(session_token)
super(HttpPollingClient, self).__init__(session_token)
self.event = event

def send_message(self, message):
Expand Down
2 changes: 1 addition & 1 deletion tools/wave/data/http_polling_event_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class HttpPollingEventListener(EventListener):
def __init__(self, dispatcher_token, event):
super().__init__(dispatcher_token)
super(HttpPollingEventListener, self).__init__(dispatcher_token)
self.event = event
self.message = None

Expand Down
7 changes: 4 additions & 3 deletions tools/wave/data/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
PENDING = "pending"
UNKNOWN = "unknown"

WMAS = "wmas"
DPCTF = "dpctf"

class Session:

class Session(object):
def __init__(
self,
token=None,
Expand All @@ -32,7 +35,6 @@ def __init__(
reference_tokens=None,
browser=None,
expiration_date=None,
type=None,
malfunctioning_tests=None
):
if token is None:
Expand Down Expand Up @@ -72,7 +74,6 @@ def __init__(
self.reference_tokens = reference_tokens
self.browser = browser
self.expiration_date = expiration_date
self.type = type
if malfunctioning_tests is None:
malfunctioning_tests = []
self.malfunctioning_tests = malfunctioning_tests
51 changes: 51 additions & 0 deletions tools/wave/ecmascript/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# WMAS2017 ECMA Integration

## Generating Tests

Clone the ECMAScript 5 tests into the working directory

```
$ git clone [email protected]:tc39/test262.git -b es5-tests
```

Working directory should look like this

```
generate-tests.js
test262
test-template.html
webplatform-adapter.js
```

Generate the tests by running

```
$ node generate-tests.js
```

Generated tests are placed in `ecmascript` directory. Copy this
directory into the top level directory of the Web Platform Tests
hierarchy in order for the Web Platform Test Runner to run them.

## Test generation parameters

```
$ node generate-tests.js < test262-repo-dir > < output-dir >
```

You can specify where the test262 repository is located and where the
generated tests should be put in by passing the paths to the
generator script as shown above.

## Excluded tests

The following tests are automatically excluded, because they are
causing the browser to freeze.

```
ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js
ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js
ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js
ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js
ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js
```
Loading
Loading