Closed Bug 1614494 Opened 5 years ago Closed 5 years ago

Remove <iframe mozbrowser> usage in devtools server tests

Categories

(DevTools :: General, task, P2)

task

Tracking

(Fission Milestone:M5)

RESOLVED FIXED
Fission Milestone M5

People

(Reporter: kmag, Assigned: ochameau)

References

Details

Attachments

(2 files)

<iframe mozbrowser> is being removed, which means that any tests that use it need to either be updated or disabled.

Replace the remote iframes in those tests with something like this should work according to Alex:

b = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul","browser"); b.setAttribute("type", "content");

(In reply to Patrick Brosset <:pbro> from comment #1)

Related, RDM also uses <iframe mozbrowser> and the dependency removal is tracked in bug 1574886.

Note that RDM usage isn't a problem for bug 1614462, since it happens in the parent process, and that bug is only removing usage in child processes.

(In reply to Patrick Brosset <:pbro> from comment #2)

Replace the remote iframes in those tests with something like this should work according to Alex:

b = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul","browser"); b.setAttribute("type", "content");

Assuming that the tests run in the parent process, I think it should. Though in that case, it also shouldn't block bug 1614462, since I'm not removing mozbrowser support in parent process chrome documents until RDM is fixed. But it would still probably be best to get them updated as soon as possible in case we run into more <mozbrowser> issues that need more aggressive changes sooner.

Assignee: nobody → poirot.alex

(In reply to Patrick Brosset <:pbro> from comment #2)

Replace the remote iframes in those tests with something like this should work according to Alex:

b = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul","browser"); b.setAttribute("type", "content");

Unfortunately, this snippet, which works in the browser console, doesn't work in these tests as the chrome mochitests run within a browser tab and so within a <browser type=content>. This brings many limitations.
So. It would be easier to migrate them to browser mochitest while switching to <browser>.

Here is one test, I'll convert the others similarly after having a review of the first.

Tracking for Fission dogfooding (M5) because rm-mozbrowser bug 1614462 is blocking M5.

Fission Milestone: --- → M5
Keywords: leave-open
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4c15166aa140 Migrate connectToFrame to browser mochitest and use <browser> element. r=pbro,jdescottes
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/00d7c55bd88e Refactor all DevTools test using mozbrowser iframes. r=jdescottes
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: