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

Conversation

@SimonSapin
Copy link
Member

SimonSapin commented Jul 19, 2018

This succeeds on my machine:

./mach test-wpt --product servodriver --binary etc/run_in_headless_android_emulator.py --binary-arg servo-x86 --binary-arg target/i686-linux-android/release/servo.apk /_mozilla/mozilla/DOMParser.html


This change is Reviewable

SimonSapin added 12 commits Jul 19, 2018
Not setting one of them in a SetTimeouts requests should not remove it.
This fixes a panicking `unwrap()`.
When sending a webdriver load URL command soon enough after starting Servo,
that command could time out with a logged warning:

```
constellation: Webdriver load for closed browsing context (0,2).
```

When `closed` in this case really meant not opened yet.
```
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'
```
```
 0:27.48 pid:4157 Traceback (most recent call last):
 0:27.48 pid:4157   File "/home/simon/servo1/etc/run_in_headless_android_emulator.py", line 212, in <module>
 0:27.48 pid:4157     sys.exit(main(*sys.argv[1:]))
 0:27.48 pid:4157   File "/home/simon/servo1/etc/run_in_headless_android_emulator.py", line 72, in main
 0:27.48 pid:4157     forward_webdriver(adb, args)
 0:27.48 pid:4157   File "/home/simon/servo1/etc/run_in_headless_android_emulator.py", line 163, in forward_webdriver
 0:27.48 pid:4157     ports = [int(part) for part in split if part]
 0:27.48 pid:4157 ValueError: invalid literal for int() with base 10: 'None'
```
@highfive
Copy link

highfive commented Jul 19, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/webdriver_server/lib.rs, components/constellation/constellation.rs
  • @cbrewster: components/constellation/constellation.rs
  • @jgraham: components/webdriver_server/lib.rs
  • @paulrouget: components/constellation/constellation.rs
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Jul 19, 2018

Opened new PR for upstreamable changes.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#74.

@jdm jdm assigned jdm and unassigned asajeffrey Jul 19, 2018
@jdm
Copy link
Member

jdm commented Jul 19, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Jul 19, 2018

Trying commit cdd6460 with merge f9eeb92...

bors-servo added a commit that referenced this pull request Jul 19, 2018
Add some support for WPT tests in an Android emulator through WebDriver

This succeeds on my machine:

`./mach test-wpt --product servodriver --binary etc/run_in_headless_android_emulator.py --binary-arg servo-x86 --binary-arg target/i686-linux-android/release/servo.apk /_mozilla/mozilla/DOMParser.html`

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21213)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 19, 2018

💔 Test failed - mac-rel-css2

@jdm
Copy link
Member

jdm commented Jul 19, 2018

This did not break any existing test harness stuff that is executed on CI; all platforms passed.

@jdm jdm removed the S-tests-failed label Jul 19, 2018
This makes `/_mozilla/mozilla/webgl/context_creation_error.html` pass,
for example.

```
./ mach test-wpt --product servodriver \
  --binary etc/run_in_headless_android_emulator.py \
  --binary-arg servo-x86 \
  --binary-arg target/i686-linux-android/release/servo.apk \
  /_mozilla/mozilla/webgl/context_creation_error.html
```
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Jul 20, 2018

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#74.

@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Jul 20, 2018

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#74.

@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2018

💔 Test failed - mac-rel-wpt3

@jdm
Copy link
Member

jdm commented Jul 21, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Jul 21, 2018

@bors-servo bors-servo merged commit 2b5bba6 into master Jul 21, 2018
3 of 5 checks passed
3 of 5 checks passed
Tidelift An error occured
Details
Taskcluster (pull_request) TaskGroup: failure
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@SimonSapin SimonSapin deleted the android-wpt branch Jul 21, 2018
jdm added a commit to web-platform-tests/wpt that referenced this pull request Jul 22, 2018
jdm added a commit to web-platform-tests/wpt that referenced this pull request Jul 22, 2018
jdm added a commit to web-platform-tests/wpt that referenced this pull request Jul 22, 2018
jdm added a commit to web-platform-tests/wpt that referenced this pull request Jul 22, 2018
jdm added a commit to web-platform-tests/wpt that referenced this pull request Jul 22, 2018
jdm added a commit to web-platform-tests/wpt that referenced this pull request Jul 22, 2018
```
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'
```

Upstreamed from servo/servo#21213 [ci skip]
jdm added a commit to web-platform-tests/wpt that referenced this pull request Jul 22, 2018
```
 0:27.48 pid:4157 Traceback (most recent call last):
 0:27.48 pid:4157   File "/home/simon/servo1/etc/run_in_headless_android_emulator.py", line 212, in <module>
 0:27.48 pid:4157     sys.exit(main(*sys.argv[1:]))
 0:27.48 pid:4157   File "/home/simon/servo1/etc/run_in_headless_android_emulator.py", line 72, in main
 0:27.48 pid:4157     forward_webdriver(adb, args)
 0:27.48 pid:4157   File "/home/simon/servo1/etc/run_in_headless_android_emulator.py", line 163, in forward_webdriver
 0:27.48 pid:4157     ports = [int(part) for part in split if part]
 0:27.48 pid:4157 ValueError: invalid literal for int() with base 10: 'None'
```

Upstreamed from servo/servo#21213 [ci skip]
jdm added a commit to web-platform-tests/wpt that referenced this pull request Jul 22, 2018
This makes `/_mozilla/mozilla/webgl/context_creation_error.html` pass,
for example.

```
./ mach test-wpt --product servodriver \
  --binary etc/run_in_headless_android_emulator.py \
  --binary-arg servo-x86 \
  --binary-arg target/i686-linux-android/release/servo.apk \
  /_mozilla/mozilla/webgl/context_creation_error.html
```

Upstreamed from servo/servo#21213 [ci skip]
jdm added a commit to web-platform-tests/wpt that referenced this pull request Jul 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants
You can’t perform that action at this time.