Bug 1526320 - Convert DevTools XBL test to use a test binding instead of a xul:tree;r=pbro

This will unblock removing XBL for tree.

Differential Revision: https://phabricator.services.mozilla.com/D19087

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Grinstead 2019-02-08 23:37:17 +00:00
parent 87fb14088b
commit d164d21cd7
3 changed files with 11 additions and 8 deletions

View File

@ -18,7 +18,7 @@ add_task(async function() {
ok(isDisabled(button), "The button is hidden in the toolbar");
info("Check the color picker");
await selectNode("#tree", inspector);
await selectNode("#xbl-host", inspector);
// Find the color swatch in the rule-view.
let ruleView = inspector.getPanel("ruleview").view;

View File

@ -12,11 +12,11 @@ add_task(async function() {
await startPicker(toolbox);
info("Selecting the tree");
await moveMouseOver("#tree");
info("Selecting the host element");
await moveMouseOver("#xbl-host");
await doKeyPick({key: "VK_RETURN", options: {}});
is(inspector.selection.nodeFront.className, "tree-bodybox",
"The .tree-bodybox inside the tree was selected");
is(inspector.selection.nodeFront.className, "xbl-anon",
"The .xbl-anon inside the box was selected");
function doKeyPick(msg) {
info("Key pressed. Waiting for element to be picked");

View File

@ -1,9 +1,12 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window title="Test that the picker works correctly with XBL anonymous nodes"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tree id="tree" style="background:red"/>
<box id="xbl-host" style="background:red; -moz-binding: url(#foo)"/>
<xbl:bindings xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<xbl:binding id="foo"><xbl:content><xul:box class="xbl-anon">Anonymous</xul:box></xbl:content></xbl:binding>
</xbl:bindings>
</window>