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

Add some support for WPT tests in an Android emulator through WebDriver #21213

Merged
merged 15 commits into from Jul 21, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

More Python fixes for servodriver

```
Traceback (most recent call last):
  File "/home/simon/servo1/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py", line 90, in run
    rv = commands[command](*args)
  File "/home/simon/servo1/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py", line 110, in wait
    self.executor.wait()
  File "/home/simon/servo1/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py", line 209, in wait
    self.protocol.base.wait()
AttributeError: 'ServoWebDriverProtocol' object has no attribute 'base'
```
  • Loading branch information
SimonSapin committed Jul 19, 2018
commit f10b47465ae9e72c2cd40f3173cb82a396debe33
@@ -6,6 +6,7 @@
import traceback

from .base import (Protocol,
BaseProtocolPart,
RefTestExecutor,
RefTestImplementation,
TestharnessExecutor,
@@ -46,7 +47,23 @@ def reset_prefs(self, *prefs):
return self.session.send_command("POST", "servo/prefs/reset", body)


class ServoBaseProtocolPart(BaseProtocolPart):

This comment has been minimized.

@jgraham

jgraham Jul 20, 2018

Contributor

So, a more correct implementation would put all the logic for connecting via WebDriver in here (the long term goal is that we are able to share the executors and just encapsulate browser differences in the Protocol objects, but we're not there yet). Having said that I don't mind if you wait to refactor in that way.

def execute_script(self, script, async=False):
pass

def set_timeout(self, timeout):
pass

def wait(self):
pass

def set_window(self, handle):
pass


class ServoWebDriverProtocol(Protocol):
implements = [ServoBaseProtocolPart]

def __init__(self, executor, browser, capabilities, **kwargs):
do_delayed_imports()
Protocol.__init__(self, executor, browser)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.