Closed Bug 1074836 Opened 10 years ago Closed 9 years ago

Enable devtools/inspector tests with e10s

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(e10s+, firefox38 fixed)

RESOLVED FIXED
Firefox 38
Tracking Status
e10s + ---
firefox38 --- fixed

People

(Reporter: harth, Assigned: pbro)

References

Details

(Whiteboard: [e10s-m6])

Attachments

(8 files, 1 obsolete file)

      No description provided.
I may actually handle this in bug 985597. In any case, since I'm making a lot of inspector test changes right now, marking this bug as assigned to me so that noone starts working on this in parallel.
Assignee: nobody → pbrosset
Depends on: 985597
Depends on: 1036409
Makes all inspector tests pass locally with and without e10s.
Of course it's a little bit early for this patch yet, I still need to land the new document canvasFrame API (bug 1020244) and then the new highlighter that uses this API (bug 985597).
Moving DevTools test bugs to e10s milestone M7 (i.e. not blocking e10s merge to Aurora).
Whiteboard: [e10s-m7]
Whiteboard: [e10s-m7] → [e10s-m6]
Comment on attachment 8510131 [details] [diff] [review]
bug1074836-inspector-e10s-tests v1.patch

Marking this old patch as obsolete. I'm about to upload a new series of patches that should fix the inspector tests with e10s.
Attachment #8510131 - Attachment is obsolete: true
Hey Mike, remember when I introduced a way to retrieve the highlighter actor via frame scripts during inspector tests? Well, turns out it needed a minor adjustment with e10s: the actorID alone was not enough to retrieve the right actor, we also need to have the debugger server connection prefix to retrieve the right connection first.
So this patch changes just this. Of course this implied lot's of changes throughout many tests, but these changes are simple.
Attachment #8559021 - Flags: review?(mratcliffe)
R+ this patch myself, since this is just disabling a gcli test with e10s, knowing that gcli isn't fully remoted yet (pending bug 1128988).
Attachment #8559022 - Flags: review+
This fixes the browser context-menu test with e10s.
Attachment #8559024 - Flags: review?(bgrinstead)
This fixes the test that created and deleted iframes quickly (this use to make the inspector go blank).
I had to introduce a new custom event for this, because simply listening to the window load event with e10s wasn't working. My listener was getting called before the test page load event handler was done.
Attachment #8559025 - Flags: review?(bgrinstead)
R+'ing this patch myself since this is just disabling a test with e10s.
This test is simulating mouse wheel events in content, and according to bug 1035661, it's not really useful anyway, so instead of loosing time trying to make it work with e10s, I'm just disabling it for now.
Attachment #8559027 - Flags: review+
This fixes the inspector search field test with e10s. This test was accessing the raw DOMNode using `inspector.selection.node` which doesn't exist with e10s.
Attachment #8559029 - Flags: review?(jwalker)
Same as the previous patch, this one fixes the node reselection test with e10s by making it access nodeFronts rather than raw DOMNodes.
Attachment #8559031 - Flags: review?(jwalker)
And here is the last patch, which simply deletes the main |skip-if=e10s| line in browser.ini
R+ing this myself.
Attachment #8559032 - Flags: review+
Attachment #8559029 - Flags: review?(jwalker) → review+
Attachment #8559031 - Flags: review?(jwalker) → review+
Pending try build with all patches applied: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7dd89db5ab2e
Comment on attachment 8559024 [details] [diff] [review]
bug1074836-e10s-inspector-3-browser-ctx-menu v1.patch

Review of attachment 8559024 [details] [diff] [review]:
-----------------------------------------------------------------

I think there should be a new event listener in the frame script for opening the context menu on a node and clicking inspect element

::: browser/devtools/inspector/test/browser_inspector_initialization.js
@@ +112,5 @@
>    is(button.getAttribute("tooltiptext"), expectedText, "Crumb refers to the right node");
>  }
>  
>  function* clickOnInspectMenuItem(node) {
> +  info("Showing the contextual menu on node " + node);

This whole set of things all the way through to the contextMenu.hiding(); call looks like something that should happen in a frame script - Test:InspectElementWithContextMenu.  Then we wouldn't need the try / catch and expectation that the popupNode property is not used in e10s.

::: browser/devtools/inspector/test/doc_frame_script.js
@@ +227,5 @@
>   * - {Number} x
>   * - {Number} y
>   * - {Boolean} center If set to true, x/y will be ignored and
>   *             synthesizeMouseAtCenter will be used instead
> + * - {Object} options Other event options

Depending on which options we care about / want to support (I've only seend 'type' and 'button'), it may be simpler for the callers if you just flattened those two things out into the msg object.  Remembering which ones belong in options and which belong in the msg may be a cause for headaches later.  But then again, it does match the synthesizeMouse params so no big deal either way.
Attachment #8559024 - Flags: review?(bgrinstead)
Attachment #8559025 - Flags: review?(bgrinstead) → review+
(In reply to Brian Grinstead [:bgrins] from comment #14)
> ::: browser/devtools/inspector/test/browser_inspector_initialization.js
> @@ +112,5 @@
> >    is(button.getAttribute("tooltiptext"), expectedText, "Crumb refers to the right node");
> >  }
> >  
> >  function* clickOnInspectMenuItem(node) {
> > +  info("Showing the contextual menu on node " + node);
> 
> This whole set of things all the way through to the contextMenu.hiding();
> call looks like something that should happen in a frame script -
> Test:InspectElementWithContextMenu.  Then we wouldn't need the try / catch
> and expectation that the popupNode property is not used in e10s.
The problem with this is that the contextmenu DOM lives in the parent process, inside the browser chrome.
On this line for instance:
  let contentAreaContextMenu = document.querySelector("#contentAreaContextMenu");
document is actually the browser document, and #contentAreaContextMenu is a node in the browser chrome.
I wouldn't be able to do this from the frame script, in the content process.
NI?ing Brian for comment 15.
Flags: needinfo?(bgrinstead)
(In reply to Patrick Brosset [:pbrosset] [:patrick] from comment #15)
> (In reply to Brian Grinstead [:bgrins] from comment #14)
> > ::: browser/devtools/inspector/test/browser_inspector_initialization.js
> > @@ +112,5 @@
> > >    is(button.getAttribute("tooltiptext"), expectedText, "Crumb refers to the right node");
> > >  }
> > >  
> > >  function* clickOnInspectMenuItem(node) {
> > > +  info("Showing the contextual menu on node " + node);
> > 
> > This whole set of things all the way through to the contextMenu.hiding();
> > call looks like something that should happen in a frame script -
> > Test:InspectElementWithContextMenu.  Then we wouldn't need the try / catch
> > and expectation that the popupNode property is not used in e10s.
> The problem with this is that the contextmenu DOM lives in the parent
> process, inside the browser chrome.
> On this line for instance:
>   let contentAreaContextMenu =
> document.querySelector("#contentAreaContextMenu");
> document is actually the browser document, and #contentAreaContextMenu is a
> node in the browser chrome.
> I wouldn't be able to do this from the frame script, in the content process.

Ah, right - missed the context of that document
Flags: needinfo?(bgrinstead)
Attachment #8559024 - Flags: review+
Attachment #8559021 - Flags: review?(mratcliffe) → review+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: