Closed
Bug 941749
Opened 12 years ago
Closed 11 years ago
getWindows should return tabs
Categories
(Remote Protocol :: Marionette, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla37
People
(Reporter: jlal, Assigned: chmanchester)
References
Details
(Keywords: pi-marionette-server, pi-marionette-spec, Whiteboard: [spec][affects=gaia])
Attachments
(3 files, 2 obsolete files)
I have a firefox profile with some extensions that is running with marionette enabled. When it starts it is in a tab running "system.gaiamobile.org" when I start the session I am now in about:blank and cannot find the tab with getWindows.
Comment 1•12 years ago
|
||
geWindows should return all available tabs, and right now we just retrieve "navigator:browser" type windows, which doesn't return tabs.
Summary: Cannot find tabs with getWindows. ? → getWindows should return tabs
Updated•12 years ago
|
Assignee: nobody → mdas
Comment 2•12 years ago
|
||
also related: Bug 941770 (stop creating the new tab)
Updated•11 years ago
|
Whiteboard: [spec]
Updated•11 years ago
|
Keywords: ateam-marionette-spec
Updated•11 years ago
|
Whiteboard: [spec] → [spec][affects=loop gaia]
Updated•11 years ago
|
Whiteboard: [spec][affects=loop gaia] → [spec][affects=gaia]
Assignee | ||
Comment 5•11 years ago
|
||
Two test cases I came up with when I thought this was bug 1097221.
Assignee | ||
Comment 6•11 years ago
|
||
Basing the window handle commands on tabs rather than windows should be doable, but will require a pretty extensive re-work of marionette's internal mechanism for keeping track of things.
Comment 7•11 years ago
|
||
(It really helps to talk about top level browsing contexts here rather than "tabs". Otherwise it's hard to tell if you are going to implement the right thing).
Assignee | ||
Comment 8•11 years ago
|
||
Assignee | ||
Comment 9•11 years ago
|
||
/r/751 - Bug 941749 - A test managing open windows and tabs with marionette.
/r/753 - Bug 941749 - Add support for returning both known tabs and chrome windows from the marionette server.
Pull down these commits:
hg pull review -r 5921494d714ba584753e5f9020c8f78fa5777c6a
Assignee | ||
Comment 10•11 years ago
|
||
The commits above are a rough version of what we discussed in the m21s meeting yesterday. I'm interested in feedback on the api and implementation.
Try: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=e6de410e3933
Comment 11•11 years ago
|
||
https://reviewboard.mozilla.org/r/749/#review343
::: testing/marionette/client/marionette/tests/unit/test_window_handles.py
(Diff revision 1)
> + self.marionette.navigate("about:blank")
> + self.marionette.navigate("about:home")
> + self.marionette.navigate("about:blank")
about:home loads external content, consider using data URI's with a <title> tag or something.
Assignee | ||
Updated•11 years ago
|
Attachment #8524791 -
Flags: feedback?(dburns)
Assignee | ||
Comment 12•11 years ago
|
||
A b2g-oriented try run: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=b6c236cca413
Comment 13•11 years ago
|
||
https://reviewboard.mozilla.org/r/749/#review397
from a quick look this looks great. I would like to see how it fares on Try
::: testing/marionette/client/marionette/tests/unit/test_window_handles.py
(Diff revision 1)
> + def test_tab_and_window_handles(self):
This scenario is the most important one really, thanks for writing a test!
Updated•11 years ago
|
Attachment #8524791 -
Flags: feedback?(dburns) → feedback+
Assignee | ||
Comment 14•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8524791 -
Flags: feedback+
Assignee | ||
Comment 15•11 years ago
|
||
/r/751 - Bug 941749 - A test managing open windows and tabs with marionette.
/r/753 - Bug 941749 - Add support for returning both known tabs and chrome windows from the marionette server.
Pull down these commits:
hg pull review -r 7b84c35142ecdc0ba3bb4aeffdbef1d86d14591b
Assignee | ||
Comment 16•11 years ago
|
||
I noticed from pushing my updated patch to try that wpt relies on the old behavior, so we'll need an update there before landing this.
Assignee | ||
Comment 17•11 years ago
|
||
This should fix the wpt issue (I'll submit a pr upstream when the changes are finalized and ready to land):
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ed769b37d4d5
Assignee | ||
Updated•11 years ago
|
Attachment #8520966 -
Attachment is obsolete: true
Assignee | ||
Comment 18•11 years ago
|
||
(In reply to Chris Manchester [:chmanchester] from comment #17)
> This should fix the wpt issue (I'll submit a pr upstream when the changes
> are finalized and ready to land):
>
> https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ed769b37d4d5
According to jgraham this intention of this assertion is that top level browsing contexts aren't being leaked between tests, but isn't quite doing that because of just this bug. So all we need here is a stopgap to keep things working between when this bug lands in tree and the upstream harness can be fixed to take the it in to account and enforce the original intent.
Assignee | ||
Updated•11 years ago
|
Attachment #8524791 -
Flags: review?(dburns)
Assignee | ||
Comment 19•11 years ago
|
||
/r/751 - Bug 941749 - A test managing open windows and tabs with marionette.
/r/753 - Bug 941749 - Add support for returning both known tabs and chrome windows from the marionette server.
Pull down these commits:
hg pull review -r fa56c5604c21cd1b2236c697d769036dde27cd6f
Assignee | ||
Comment 20•11 years ago
|
||
https://reviewboard.mozilla.org/r/749/#review537
::: testing/marionette/marionette-server.js
(Diff revision 3)
> + if (appName == 'Firefox' && this.curBrowser.curFrameId) {
:whimboo noted on irc that this checks for appName == 'Firefox' here and appName != 'B2G' below. Not sure if one is prefereable to the other, but they should be consistent.
Updated•11 years ago
|
Attachment #8524791 -
Flags: review?(dburns) → review+
Comment 21•11 years ago
|
||
Assignee | ||
Comment 22•11 years ago
|
||
Opened https://github.com/w3c/wptrunner/pull/58 to prevent wpt bustage when this lands.
Assignee | ||
Updated•11 years ago
|
Attachment #8524791 -
Flags: review+ → review?(dburns)
Assignee | ||
Comment 23•11 years ago
|
||
/r/751 - Bug 941749 - A test managing open windows and tabs with marionette.;r=automatedtester
/r/753 - Bug 941749 - Add support for returning both known tabs and chrome windows from the marionette server.;r=automatedtester
Pull down these commits:
hg pull review -r 4775706a1f7a4c345fa1481cfed453ccd8be160c
Assignee | ||
Comment 24•11 years ago
|
||
Comment on attachment 8524791 [details]
MozReview Request: bz://941749/chmanchester
Didn't mean for mozreview to re-set that.
Attachment #8524791 -
Flags: review?(dburns) → review+
Assignee | ||
Comment 25•11 years ago
|
||
Attachment #8529186 -
Flags: review?(james)
Updated•11 years ago
|
Keywords: ateam-marionette-server
Comment 26•11 years ago
|
||
Comment on attachment 8529186 [details] [review]
Remove assertion in wpt invalidated by the fix.
Forgot to say here that I merged the wptrunner fix upstream, so we just need to pull the latest version into the tree.
Attachment #8529186 -
Flags: review?(james) → review+
Assignee | ||
Comment 27•11 years ago
|
||
I just found pushing to try this fails a test on b2g, investigating now.
Assignee: mdas → cmanchester
Assignee | ||
Comment 28•11 years ago
|
||
New try run with a fix:
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=9aff47efdace
Assignee | ||
Updated•11 years ago
|
Attachment #8524791 -
Flags: review+ → review?(dburns)
Assignee | ||
Comment 29•11 years ago
|
||
/r/751 - Bug 941749 - A test managing open windows and tabs with marionette.;r=automatedtester
/r/753 - Bug 941749 - Add support for returning both known tabs and chrome windows from the marionette server.;r=automatedtester
Pull down these commits:
hg pull review -r 3d26a4a0d9ab5b72b02c62f0b8891204579be0c9
Assignee | ||
Comment 30•11 years ago
|
||
https://reviewboard.mozilla.org/r/749/#review783
::: testing/marionette/marionette-server.js
(Diff revisions 4 - 5)
> + winId += (appName == "B2G") ? "-b2g" : "";
The previous patch didn't add the '-b2g' suffix, so tests switching windows on b2g started failing.
Wasn't sure whether this required re-review, so decided to err on the side of caution.
Updated•11 years ago
|
Attachment #8524791 -
Flags: review?(dburns) → review+
Comment 31•11 years ago
|
||
Assignee | ||
Comment 32•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/957cfd26d6e1
https://hg.mozilla.org/mozilla-central/rev/9011ae0f6be8
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Comment 34•11 years ago
|
||
Chris, one thing I noticed here is the different implementation as shown below:
> 2.275 "getCurrentWindowHandle": MarionetteServerConnection.prototype.getWindowHandle, // Selenium 2 compat
> 2.276 + "getChromeWindowHandle": MarionetteServerConnection.prototype.getChromeWindowHandle,
Was there a reason not to use getCurrentChromeWindowHandle together with .current_chrome_window_handle? Was it just the length which let you do the shorter property name? .chrome_window_handle doesn't really tell that it is the one for the currently selected chrome window.
Updated•11 years ago
|
Flags: needinfo?(cmanchester)
Assignee | ||
Comment 35•11 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #34)
> Chris, one thing I noticed here is the different implementation as shown
> below:
>
> > 2.275 "getCurrentWindowHandle": MarionetteServerConnection.prototype.getWindowHandle, // Selenium 2 compat
> > 2.276 + "getChromeWindowHandle": MarionetteServerConnection.prototype.getChromeWindowHandle,
>
> Was there a reason not to use getCurrentChromeWindowHandle together with
> .current_chrome_window_handle? Was it just the length which let you do the
> shorter property name? .chrome_window_handle doesn't really tell that it is
> the one for the currently selected chrome window.
Yes, for a reasonably short name. I think it's ok, but I wouldn't really have a problem with changing it.
Flags: needinfo?(cmanchester)
Comment 36•11 years ago
|
||
(In reply to Chris Manchester [:chmanchester] from comment #35)
> > > 2.275 "getCurrentWindowHandle": MarionetteServerConnection.prototype.getWindowHandle, // Selenium 2 compat
> > > 2.276 + "getChromeWindowHandle": MarionetteServerConnection.prototype.getChromeWindowHandle,
> >
> > Was there a reason not to use getCurrentChromeWindowHandle together with
> > .current_chrome_window_handle? Was it just the length which let you do the
> > shorter property name? .chrome_window_handle doesn't really tell that it is
> > the one for the currently selected chrome window.
>
> Yes, for a reasonably short name. I think it's ok, but I wouldn't really
> have a problem with changing it.
David, what is your opinion here?
Flags: needinfo?(dburns)
Comment 37•11 years ago
|
||
No problem changing it, let's get this sorted ASAP
Flags: needinfo?(dburns)
Assignee | ||
Comment 38•10 years ago
|
||
Attachment #8524791 -
Attachment is obsolete: true
Attachment #8618062 -
Flags: review+
Attachment #8618063 -
Flags: review+
Assignee | ||
Comment 39•10 years ago
|
||
Assignee | ||
Comment 40•10 years ago
|
||
Updated•3 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•