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

Webdriver browsing contexts not pipelines #16997

Merged

Conversation

asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented May 22, 2017

At the moment, a webdriver session stores a pipeline_ids, which causes a mismatch with the spec, which asks a session to store a browsing context and a top-level browsing context. This PR fixes this mismatch.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because we are not testing webdriver

This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @jgraham: components/webdriver_server/lib.rs
  • @fitzgen: components/script/dom/htmliframeelement.rs, components/script/dom/document.rs, components/script/webdriver_handlers.rs, components/script/dom/history.rs, components/script/dom/windowproxy.rs and 10 more
  • @KiChjang: components/script/dom/htmliframeelement.rs, components/script/dom/document.rs, components/script/webdriver_handlers.rs, components/script/dom/history.rs, components/script/dom/windowproxy.rs and 10 more

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 22, 2017
@highfive
Copy link

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@asajeffrey asajeffrey added the S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. label May 22, 2017
@asajeffrey
Copy link
Member Author

The first commit is from #16916.

@asajeffrey
Copy link
Member Author

r? @jgraham

@highfive highfive assigned jgraham and unassigned glennw May 22, 2017
@asajeffrey
Copy link
Member Author

This is part of the ongoing effort to introduce top-level browsing context ids, in order to support multiple windows (#13994). cc @jdm @cbrewster @paulrouget

@asajeffrey
Copy link
Member Author

IRC conversation with @jgraham: http://logs.glob.uno/?c=mozilla%23servo&s=22+May+2017&e=22+May+2017#c678807 and http://logs.glob.uno/?c=mozilla%23servo&s=22+May+2017&e=22+May+2017#c678945.

TL;DR: argh testing! (I ended up driving servo by hand with curl, got it to navigate, traverse and execute a script.)

@asajeffrey asajeffrey removed the S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. label May 24, 2017
@asajeffrey
Copy link
Member Author

#16916 has landed, so this PR is next in the queue.

@asajeffrey asajeffrey force-pushed the webdriver-browsing-contexts-not-pipelines branch from c472ff8 to 79743b5 Compare May 25, 2017 22:16
@asajeffrey
Copy link
Member Author

@jgraham are you OK reviewing this or should I find another victim?

@jgraham
Copy link
Contributor

jgraham commented May 26, 2017

I'm not an expert on all of this code, but the changes seem quite reasonable.


Reviewed 12 of 12 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions.


components/constellation/constellation.rs, line 906 at r1 (raw file):

            }
            // Handle a forward or back request
            // Handle a forward or back request

This seems to be duplicated.


components/script/dom/htmliframeelement.rs, line 501 at r1 (raw file):

        MozBrowserEvent::LocationChange(url, can_go_back, can_go_forward) => {
            BrowserElementLocationChangeEventDetail {
                url: Some(DOMString::from(url.as_str())),

Seems maybe unrelated?


components/webdriver_server/lib.rs, line 785 at r1 (raw file):

            Err(WebDriverError::new(ErrorStatus::UnsupportedOperation, "Failed to convert keycodes"))));

        // TODO: there's a race condition caused by these being two separate messages,

It's not quite clear what "these" means in this comment.


Comments from Reviewable

@asajeffrey
Copy link
Member Author

Thanks! I made changes based on your comments.


Review status: all files reviewed at latest revision, 3 unresolved discussions.


components/constellation/constellation.rs, line 906 at r1 (raw file):

Previously, jgraham wrote…

This seems to be duplicated.

Oops. Fixed.


components/script/dom/htmliframeelement.rs, line 501 at r1 (raw file):

Previously, jgraham wrote…

Seems maybe unrelated?

OK, I reverted this change.


components/webdriver_server/lib.rs, line 785 at r1 (raw file):

Previously, jgraham wrote…

It's not quite clear what "these" means in this comment.

Fixed.


Comments from Reviewable

@jgraham
Copy link
Contributor

jgraham commented May 26, 2017

Reviewed 4 of 4 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@jgraham
Copy link
Contributor

jgraham commented May 26, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 3f761be has been approved by jgraham

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels May 26, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 3f761be with merge 0bc7e2f...

bors-servo pushed a commit that referenced this pull request May 26, 2017
…elines, r=jgraham

Webdriver browsing contexts not pipelines

<!-- Please describe your changes on the following line: -->

At the moment, a webdriver session stores a `pipeline_id`s, which causes a mismatch with the spec, which asks a session to store a browsing context and a top-level browsing context. This PR fixes this mismatch.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because we are not testing webdriver

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/16997)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-msvc-dev
Approved by: jgraham
Pushing 0bc7e2f to master...

@bors-servo bors-servo merged commit 3f761be into servo:master May 26, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label May 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants