From d81d78cf1f7ce98ee51e95dcda6259f4597fab24 Mon Sep 17 00:00:00 2001 From: Andrew Swan Date: Tue, 21 May 2019 19:26:11 +0000 Subject: [PATCH] Bug 1519577 Update devtools test to use a test-only xbl binding r=jdescottes Differential Revision: https://phabricator.services.mozilla.com/D31938 --HG-- extra : moz-landing-system : lando --- .../markup/test/browser_markup_anonymous_02.js | 12 ++++++------ .../markup/test/doc_markup_anonymous_xul.xul | 11 ++++++++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/devtools/client/inspector/markup/test/browser_markup_anonymous_02.js b/devtools/client/inspector/markup/test/browser_markup_anonymous_02.js index 4920557dfbe6..3259b8db8834 100644 --- a/devtools/client/inspector/markup/test/browser_markup_anonymous_02.js +++ b/devtools/client/inspector/markup/test/browser_markup_anonymous_02.js @@ -12,14 +12,14 @@ const TEST_URL = URL_ROOT + "doc_markup_anonymous_xul.xul"; add_task(async function() { const {inspector} = await openInspectorForURL(TEST_URL); - const toolbarbutton = await getNodeFront("toolbarbutton", inspector); - const children = await inspector.walker.children(toolbarbutton); + const boundNode = await getNodeFront("#xbl-host", inspector); + const children = await inspector.walker.children(boundNode); - is(toolbarbutton.numChildren, 4, "Correct number of children"); - is(children.nodes.length, 4, "Children returned from walker"); + is(boundNode.numChildren, 2, "Correct number of children"); + is(children.nodes.length, 2, "Children returned from walker"); - is(toolbarbutton.isAnonymous, false, "Toolbarbutton is not anonymous"); - await isEditingMenuEnabled(toolbarbutton, inspector); + is(boundNode.isAnonymous, false, "Node with XBL binding is not anonymous"); + await isEditingMenuEnabled(boundNode, inspector); for (const node of children.nodes) { ok(node.isAnonymous, "Child is anonymous"); diff --git a/devtools/client/inspector/markup/test/doc_markup_anonymous_xul.xul b/devtools/client/inspector/markup/test/doc_markup_anonymous_xul.xul index 09cc26101f57..dfd5602e93b7 100644 --- a/devtools/client/inspector/markup/test/doc_markup_anonymous_xul.xul +++ b/devtools/client/inspector/markup/test/doc_markup_anonymous_xul.xul @@ -3,6 +3,15 @@ - + + + + Anonymous + Anonymous + + + +