Closed Bug 1488767 Opened 6 years ago Closed 6 years ago

Remove enableWebComponents() in shadow dom tests

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1503019

People

(Reporter: jdescottes, Unassigned, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

WebComponents are enabled by default, so we should be able to remove the enableWebComponents() call (as well as its definition) from our shadow dom tests.
Mentor: balbeza
Keywords: good-first-bug
Flags: needinfo?(balbeza)
More details about the bug:

- `enableWebComponents` is defined at https://searchfox.org/mozilla-central/source/devtools/client/shared/test/shared-head.js#729 We should remove this function
- We are calling enableWebComponents in the shadow DOM tests under `devtools/client/inspector/markup/test` and `devtools/client/inspector/rules/test` (see: https://searchfox.org/mozilla-central/search?q=enableWebComponents()%3B&path= ). These calls are no longer necessary –since web components are already enabled by default– so we should remove them as well. For instance, in this test (https://searchfox.org/mozilla-central/source/devtools/client/inspector/markup/test/browser_markup_shadowdom_clickreveal.js#44 ) there's a `testRevealLink` function with:

```
await enableWebComponents();
```

That is the line we need to delete in that file –and do the same with the other tests.
Flags: needinfo?(balbeza)
Hello everyone!I would like to work on this bug in case no one is working on it, so can someone please assign me this bug?
Thanks in advance!
Assignee: nobody → preetimukherjee98
Status: NEW → ASSIGNED
Hi :preeti, thanks for offering to implement this patch! :) I have assigned it to you, as requested. I'm the mentor of the bug, but on next week I will not be working – however, if you have any questions pls do reach the team at the DevTools slack or IRC channel (see https://firefox-dev.tools/#getting-in-touch ). Otherwise, I'll be happy to offer help and/or review the patch once I'm back.

Thanks a lot!
(In reply to Belén [:ladybenko] PTO until Sep 25 from comment #3)
> Hi :preeti, thanks for offering to implement this patch! :) I have assigned
> it to you, as requested. I'm the mentor of the bug, but on next week I will
> not be working – however, if you have any questions pls do reach the team at
> the DevTools slack or IRC channel (see
> https://firefox-dev.tools/#getting-in-touch ). Otherwise, I'll be happy to
> offer help and/or review the patch once I'm back.
> 
> Thanks a lot!

Thank you! 
However, I am unable to find out the required function in https://searchfox.org/mozilla-central/source/devtools/client/shared/test/shared-head.js#729

The command :grep -iRn "async"

gives the following output:


shared-head.js:57:// All test are asynchronous
shared-head.js:137:registerCleanupFunction(async function cleanup() {
shared-head.js:154:var addTab = async function(url, options = {}) {
shared-head.js:189:var removeTab = async function(tab) {
shared-head.js:205:var refreshTab = async function(tab = gBrowser.selectedTab) {
shared-head.js:407:var openToolboxForTab = async function(tab, toolId, hostType) {
shared-head.js:442:var openNewTabAndToolbox = async function(url, toolId, hostType) {
shared-head.js:453:var closeTabAndToolbox = async function(tab = gBrowser.selectedTab) {
shared-head.js:468:var closeToolboxAndTab = async function(toolbox) {
shared-head.js:495:async function asyncWaitUntil(predicate, interval = 10) {
shared-head.js:514:    mm.sendAsyncMessage("devtools:test:eval", { script, id });
shared-head.js:620:var closeToolbox = async function() {
shared-head.js:674:  registerCleanupFunction(async function cleanup() {
shared-head.js:692:async function injectEventUtilsInContentTask(browser) {
shared-head.js:693:  await ContentTask.spawn(browser, {}, async function() {

Could you please help?
Hi Preeti! Sorry we missed your message. You can use the needinfo flags ("need more information" below the textarea) to make sure people get a notification about your question :) 

If you can't find the method on your local clone of mozilla-central, you probably need to update it. If you cloned with mercurial `hg pull && hg up tip` should do the trick.
Flags: needinfo?(preetimukherjee98)
Sorry Preeti, but this as already been fixed via another bug.
Assignee: preetimukherjee98 → nobody
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(preetimukherjee98)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.