Bug 1583314 - Skip or port XBL tests to shadow DOM. r=bzbarsky

Where possible I ported tests to use the shadow DOM. The following could
potentially be ported, but don't think it worth of it:
  test_bug414907.xul - uses children nodes in constructor which is very
different in shadow DOM world
  test_bug233643.xul - really tests XBL behavior
  test_anonymous_content.py - bug on file already to create shadow DOM
test from scratch

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

--HG--
rename : devtools/client/inspector/test/browser_inspector_highlighter-xbl.js => devtools/client/inspector/test/browser_inspector_highlighter-custom-element.js
extra : moz-landing-system : lando
This commit is contained in:
Brendan Dahl 2019-10-21 20:21:20 +00:00
Родитель 64335a9857
Коммит 48a59e061b
23 изменённых файлов: 154 добавлений и 158 удалений

Просмотреть файл

@ -99,7 +99,7 @@ skip-if = os == "mac" # Full keyboard navigation on OSX only works if Full Keybo
[browser_markup_accessibility_semantics.js]
[browser_markup_anonymous_01.js]
[browser_markup_anonymous_02.js]
skip-if = (os == 'win' && processor == 'aarch64') # bug 1531584
skip-if = !xbl || (os == 'win' && processor == 'aarch64') # bug 1531584
[browser_markup_anonymous_03.js]
skip-if = (os == 'win' && processor == 'aarch64') # bug 1531584
[browser_markup_anonymous_04.js]

Просмотреть файл

@ -10,6 +10,7 @@ support-files =
doc_inspector_delete-selected-node-01.html
doc_inspector_delete-selected-node-02.html
doc_inspector_embed.html
doc_inspector_eyedropper_disabled.xhtml
doc_inspector_highlight_after_transition.html
doc_inspector_highlighter-comments.html
doc_inspector_highlighter-geometry_01.html
@ -23,7 +24,7 @@ support-files =
doc_inspector_highlighter_rect.html
doc_inspector_highlighter_rect_iframe.html
doc_inspector_highlighter_scroll.html
doc_inspector_highlighter_xbl.xul
doc_inspector_highlighter_custom_element.xhtml
doc_inspector_infobar_01.html
doc_inspector_infobar_02.html
doc_inspector_infobar_03.html
@ -136,7 +137,7 @@ skip-if = os == 'win' # bug 1413442
skip-if = (os == 'win' && !debug) # Bug 1449754
[browser_inspector_highlighter-selector_01.js]
[browser_inspector_highlighter-selector_02.js]
[browser_inspector_highlighter-xbl.js]
[browser_inspector_highlighter-custom-element.js]
[browser_inspector_highlighter-zoom.js]
[browser_inspector_iframe-navigation.js]
[browser_inspector_infobar_01.js]

Просмотреть файл

@ -5,20 +5,20 @@
// Test that the picker works correctly with XBL anonymous nodes
const TEST_URL = URL_ROOT + "doc_inspector_highlighter_xbl.xul";
const TEST_URL = URL_ROOT + "doc_inspector_highlighter_custom_element.xhtml";
add_task(async function() {
const { inspector, toolbox, testActor } = await openInspectorForURL(TEST_URL);
await startPicker(toolbox);
info("Selecting the host element");
await moveMouseOver("#xbl-host");
info("Selecting the custom element");
await moveMouseOver("#custom-element");
await doKeyPick({ key: "VK_RETURN", options: {} });
is(
inspector.selection.nodeFront.className,
"xbl-anon",
"The .xbl-anon inside the box was selected"
"custom-element-anon",
"The .custom-element-anon inside the div was selected"
);
function doKeyPick(msg) {

Просмотреть файл

@ -6,7 +6,7 @@
// Test that the eyedropper icons in the toolbar and in the color picker aren't displayed
// when the page isn't an HTML one.
const TEST_URL = URL_ROOT + "doc_inspector_highlighter_xbl.xul";
const TEST_URL = URL_ROOT + "doc_inspector_eyedropper_disabled.xhtml";
const TEST_URL_2 =
"data:text/html;charset=utf-8,<h1 style='color:red'>HTML test page</h1>";
@ -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("#xbl-host", inspector);
await selectNode("#box", inspector);
// Find the color swatch in the rule-view.
let ruleView = inspector.getPanel("ruleview").view;

Просмотреть файл

@ -0,0 +1,3 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<box id="box" style="background-color: red;">Hello</box>
</window>

Просмотреть файл

@ -0,0 +1,20 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test that the picker works correctly with custom element anonymous nodes</title>
</head>
<body>
<template id="template"><div class="custom-element-anon">Anonymous</div></template>
<custom-element id="custom-element" style="background:red; display: block;"/>
<script>
"use strict";
customElements.define("custom-element", class extends HTMLElement {
constructor() {
super();
const template = document.getElementById("template");
this.attachShadow({mode: "open"})
.appendChild(template.content.cloneNode(true));
}
});
</script>
</body>
</html>

Просмотреть файл

@ -1,12 +0,0 @@
<?xml version="1.0"?>
<window title="Test that the picker works correctly with XBL anonymous nodes"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<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>

Просмотреть файл

@ -5,15 +5,24 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=683852
-->
<window title="Mozilla Bug 683852"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gaktekeeper/there.is.only.xul">
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<xbl:bindings xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gaktekeeper/there.is.only.xul">
<xbl:binding id="test">
<xbl:content><xul:box anonid="xbl-anon">Anonymous</xul:box></xbl:content>
</xbl:binding>
</xbl:bindings>
<box id="xbl-host" style="-moz-binding: url(#test)"/>
<script>
<![CDATA[
customElements.define("custom-element", class extends XULElement {
constructor() {
super();
const template = document.getElementById("template");
const shadowRoot = this.attachShadow({mode: "open"})
.appendChild(template.content.cloneNode(true));
}
});
]]>
</script>
<html:template id="template"><xul:box anonid="anon">Anonymous</xul:box></html:template>
<custom-element id="custom-element"/>
<!-- test results are displayed in the html:body -->
<body xmlns="http://www.w3.org/1999/xhtml">
@ -32,10 +41,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=683852
function startTest() {
is(document.contains(document), true, "Document should contain itself!");
let box = document.getElementById("xbl-host");
let box = document.getElementById("custom-element");
is(document.contains(box), true, "Document should contain element in it!");
is(box.contains(box), true, "Element should contain itself.")
let anon = document.getAnonymousElementByAttribute(box, "anonid", "xbl-anon");
let anon = box.shadowRoot.querySelector("[anonid=anon]");
is(document.contains(anon), false, "Document should not contain anonymous element in it!");
is(box.contains(anon), false, "Element should not contain anonymous element in it!");
is(anon.contains(anon), true, "Anonymous element should contain itself.")

Просмотреть файл

@ -7,35 +7,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=419527
<title>Test for Bug 419527</title>
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="rangebinding">
<content><html:span>Foo</html:span>
</content>
<implementation>
<constructor>
var win = window;
var span = document.getAnonymousNodes(this)[0];
win.ok(span.localName == "span", "Wrong anon node!");
var range = document.createRange();
range.selectNode(span.firstChild);
win.ok(range.startContainer == span, "Wrong start container!");
win.ok(range.endContainer == span, "Wrong end container!");
var newSubTree = win.newSubTree;
newSubTree.appendChild(this);
range.setStart(newSubTree.firstChild, 0);
win.ok(range.startContainer == newSubTree.firstChild,
"Range should have been collapsed to newSubTree.firstChild!");
win.ok(range.endContainer == newSubTree.firstChild,
"Range should have been collapsed to newSubTree.firstChild!");
//XXX This should just call SimpleTest.finish(), bugs 478528, 499735.
setTimeout(win.finish, 0);
</constructor>
</implementation>
</binding>
</bindings>
</head>
<body>
<template id="template"><span>Foo</span></template>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=419527">Mozilla Bug 419527</a>
<p id="display"></p>
<div id="content" style="display: none">
@ -46,6 +20,32 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=419527
<![CDATA[
/** Test for Bug 419527 **/
customElements.define("custom-element", class extends HTMLElement {
constructor() {
super();
const template = document.getElementById("template");
const shadowRoot = this.attachShadow({mode: "open"})
.appendChild(template.content.cloneNode(true));
}
connectedCallback() {
var win = window;
var span = this.shadowRoot.children[0];
win.ok(span.textContent == "Foo", "Right span.");
win.ok(span.localName == "span", "Wrong anon node!");
var range = document.createRange();
range.selectNode(span.firstChild);
win.ok(range.startContainer == span, "Wrong start container!");
win.ok(range.endContainer == span, "Wrong end container!");
var newSubTree = win.newSubTree;
newSubTree.appendChild(this);
range.setStart(newSubTree.firstChild, 0);
win.ok(range.startContainer == newSubTree.firstChild,
"Range should have been collapsed to newSubTree.firstChild!");
win.ok(range.endContainer == newSubTree.firstChild,
"Range should have been collapsed to newSubTree.firstChild!");
SimpleTest.finish();
}
});
var d;
@ -53,19 +53,13 @@ function runRangeTest() {
window.newSubTree = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
newSubTree.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml", "div"));
d = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
d.style.MozBinding = "url('" + window.location + "#rangebinding" + "')";
d = document.createElementNS("http://www.w3.org/1999/xhtml", "custom-element");
document.body.appendChild(d);
}
function finish() {
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
setTimeout(runRangeTest, 0);
]]>
</script>
</pre>

Просмотреть файл

@ -13,6 +13,7 @@ support-files =
[test_bug336682_2.xul]
[test_bug391568.xhtml]
skip-if = !xbl
[test_bug415498.xul]
[test_bug418986-3.xul]
[test_bug524674.xul]

Просмотреть файл

@ -59,6 +59,7 @@ skip-if = os != 'mac' || os_version == '10.14' # 10.14 due to bug 1558642
skip-if = os == 'linux' && !debug # bug 1296622
[test_focus_docnav.xul]
[test_focus_switchbinding.xul]
skip-if = !xbl
[test_focused_link_scroll.xul]
[test_fullscreen.xul]
tags = fullscreen

Просмотреть файл

@ -6,11 +6,13 @@ support-files =
[test_bug199692.xul]
[test_bug233643.xul]
skip-if = !xbl
[test_bug311681.xul]
[test_bug391002.xul]
[test_bug398289.html]
[test_bug403868.xul]
[test_bug414907.xul]
skip-if = !xbl
[test_bug418216.xul]
[test_bug445177.xul]
[test_bug449457.xul]

Просмотреть файл

@ -11,18 +11,22 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=199692
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<vbox hidden="true">
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="anon">
<content>
<xul:label id="anon-label" value="ANON"/>
</content>
</binding>
</bindings>
</vbox>
<script type="text/javascript">
<![CDATA[
customElements.define("test-xul-element", class CustomElement extends XULElement {
constructor() {
super();
const template = document.getElementById("template");
const shadowRoot = this.attachShadow({mode: "open"})
.appendChild(template.content.cloneNode(true));
}
});
]]>
</script>
<body id="body" xmlns="http://www.w3.org/1999/xhtml">
<template id="template">
<xul:label id="anon-label" value="ANON"/>
</template>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=199692">Mozilla Bug 199692</a>
<vbox id="content" style="position: relative;"
@ -34,7 +38,7 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<xul:radio id="selected-radio" label="Violet" selected="true"/>
<xul:radio id="disabled-radio" label="Yellow" disabled="true"/>
</xul:radiogroup>
<hbox id="bound" style="-moz-binding:url('#anon'); border: 2px solid green;"></hbox>
<test-xul-element id="bound" style="border: 2px solid green;"></test-xul-element>
</vbox>
<pre id="test">
<script class="testbody" type="text/javascript">
@ -78,7 +82,7 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
test(lower_right, 'textbox', "Point on textbox's scrollbar should return textbox element");
test(scrollbar_button, 'textbox', "Point on textbox's scrollbar button should return textbox element");
test(middle, 'non-anon-label', "Point on label should return label");
test(upper_left, 'bound', "Point on XBL content should return element with -moz-binding style");
test(upper_left, 'bound', "Point on custom element content should return custom element");
SimpleTest.finish();
}

Просмотреть файл

@ -22,7 +22,6 @@ support-files =
!/js/xpconnect/tests/mochitest/file_bug738244.html
!/js/xpconnect/tests/mochitest/file_bug760131.html
!/js/xpconnect/tests/mochitest/file_bug795275.html
!/js/xpconnect/tests/mochitest/file_bug795275.xml
!/js/xpconnect/tests/mochitest/file_bug799348.html
!/js/xpconnect/tests/mochitest/file_bug860494.html
!/js/xpconnect/tests/mochitest/file_documentdomain.html
@ -81,6 +80,7 @@ skip-if = os == 'win' || os == 'mac' || (os == 'linux' && !debug) # bug 1131110,
[test_bug1041626.xhtml]
[test_bug1042436.xhtml]
[test_bug1050049.html]
skip-if = !xbl
[test_bug1065185.html]
[test_bug1074863.html]
[test_bug1092477.xhtml]

Просмотреть файл

@ -65,8 +65,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=795275
getWin('frame2').touchInterfaces();
getWin('frame4').touchComponents();
getWin('frame4').touchInterfaces();
// This should warn twice.
getWin('frame5').touchViaXBL();
// Warnings are dispatched async, so stick ourselves at the end of the event
// queue.
@ -75,7 +73,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=795275
function done() {
gConsoleService.unregisterListener(gListener);
is(gWarnings, 5, "Got the right number of warnings");
is(gWarnings, 3, "Got the right number of warnings");
SimpleTest.finish();
}
@ -86,6 +84,5 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=795275
<iframe id="frame2"/>
<iframe id="frame3"/>
<iframe id="frame4"/>
<iframe id="frame5"/>
</window>

Просмотреть файл

@ -1,10 +1,5 @@
<html>
<head>
<style>
.bound {
-moz-binding: url(file_bug795275.xml#xbltest);
}
</style>
<script type="application/javascript">
function touchComponents() {
Components;
@ -12,17 +7,8 @@
function touchInterfaces() {
Components.interfaces;
}
function touchViaXBL() {
// Make sure none of this warns.
var div = document.getElementById('dummy');
div.testProp;
div.testMethod();
}
</script>
</head>
<body>
<div id="dummy" class="bound"></div>
</body>
</html>

Просмотреть файл

@ -1,19 +0,0 @@
<?xml version="1.0"?>
<bindings id="xbltestBindings" xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="xbltest">
<implementation>
<method name="testMethod" exposeToUntrustedContent="true">
<body>
Components.interfaces;
</body>
</method>
<property name="testProp" readonly="true"
onget="Components; return 3;"
exposeToUntrustedContent="true" />
<constructor>
var foo = Components;
</constructor>
</implementation>
</binding>
</bindings>

Просмотреть файл

@ -19,7 +19,6 @@ support-files =
file_bug781476.html
file_bug789713.html
file_bug795275.html
file_bug795275.xml
file_bug799348.html
file_bug802557.html
file_bug860494.html

Просмотреть файл

@ -138,7 +138,6 @@ skip-if = e10s
[test_scrollframe_abspos_interrupt.html]
[test_selection_doubleclick.html]
[test_selection_expanding.html]
support-files = selection_expanding_xbl.xml
[test_selection_preventDefault.html]
[test_selection_splitText-normalize.html]
[test_selection_touchevents.html]

Просмотреть файл

@ -1,11 +0,0 @@
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="binding">
<content>
<html:div xmlns:html="http://www.w3.org/1999/xhtml">
<p>xxxxxxx xxxxxxx xxxxxxx</p>
<children/>
</html:div>
</content>
</binding>
</bindings>

Просмотреть файл

@ -5,7 +5,16 @@
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script>
customElements.define("custom-element", class extends HTMLElement {
constructor() {
super();
const template = document.getElementById("template");
const shadowRoot = this.attachShadow({mode: "open"})
.appendChild(template.content.cloneNode(true));
}
});
</script>
<style type="text/css">
.testingDiv {
font-size: 16px;
@ -32,13 +41,16 @@
margin: 0;
padding: 0;
}
#xbl {
-moz-binding: url(selection_expanding_xbl.xml#binding);
}
</style>
</head>
<body>
<template id="template">
<div>
<p>xxxxxxx xxxxxxx xxxxxxx</p>
<slot></slot>
</div>
</template>
<div id="div1" class="testingDiv">
aaaaaaa
<iframe id="iframe" srcdoc="<style type='text/css'>*{margin: 0; padding: 0; font-size: 16px;}</style><div>ffffff ffffff ffffff ffffff</div>"></iframe>
@ -57,9 +69,9 @@
dddddd dddddd dddddd
</div>
</div>
<div id="xbl">
<p id="xbl_child">yyyyyyy yyyyyyy yyyyyyy</p>
</div>
<custom-element id="custom">
<p id="custom_child">yyyyyyy yyyyyyy yyyyyyy</p>
</custom-element>
<div id="fixedDiv2" class="testingDiv">
eeeeee eeeeee eeeeee
</div>
@ -69,8 +81,7 @@
var div1 = document.getElementById("div1");
var div2 = document.getElementById("div2");
var div3 = document.getElementById("div3");
var xbl = document.getElementById("xbl");
var xbl_child = document.getElementById("xbl_child");
var custom_child = document.getElementById("custom_child");
var fixedDiv1 = document.getElementById("fixedDiv1");
var fixedDiv2 = document.getElementById("fixedDiv2");
var iframe = document.getElementById("iframe");
@ -116,7 +127,7 @@ function test()
aDiv2ShouldBeSelected,
aDiv3ShouldBeSelected,
aFixedDiv1ShouldBeSelected,
aXBLChildShouldBeSelected,
aCustomChildShouldBeSelected,
aFixedDiv2ShouldBeSelected,
aIFrameShouldBeSelected,
aInputShouldBeSelected,
@ -148,15 +159,15 @@ function test()
checkCharacter(sel, "a", aDiv1ShouldBeSelected, "div1");
checkCharacter(sel, "b", aDiv2ShouldBeSelected, "div2");
checkCharacter(sel, "c", aDiv3ShouldBeSelected, "div3");
checkCharacter(sel, "y", aXBLChildShouldBeSelected, "xbl_child");
checkCharacter(sel, "y", aCustomChildShouldBeSelected, "custom_child");
checkCharacter(sel, "d", aFixedDiv1ShouldBeSelected, "fixedDiv1");
checkCharacter(sel, "e", aFixedDiv2ShouldBeSelected, "fixedDiv2");
// iframe/input/xbl-bound contents must not be included on the parent
// iframe/input/custom-element contents must not be included on the parent
// selection.
checkCharacter(sel, "f", false, "iframe (checking on parent)");
checkCharacter(sel, "i", false, "input (checking on parent)");
checkCharacter(sel, "x", false, "XBL bound contents (checking on parent)");
checkCharacter(sel, "x", false, "Custom element contents (checking on parent)");
var selInIFrame = iframe.contentWindow.getSelection().toString();
checkCharacter(selInIFrame, "f", aIFrameShouldBeSelected, "iframe");
@ -222,11 +233,11 @@ function test()
kTrue, kFalse, kFalse, kFalse, kFalse, kFalse,
"div1-fixedDiv1, all boxes are overflow: " + kOverflows[i] + ";");
// to xbl_child
synthesizeMouse(xbl_child, 30, 5, { type: "mousemove" });
// to custom_child
synthesizeMouse(custom_child, 30, 5, { type: "mousemove" });
check(kTrue, kTrue, kTrue,
kTrue, kTrue, kFalse, kFalse, kFalse, kFalse,
"div1-xbl_child, all boxes are overflow: " + kOverflows[i] + ";");
"div1-custom_child, all boxes are overflow: " + kOverflows[i] + ";");
// to fixedDiv2 (sibling of div*)
synthesizeMouse(fixedDiv2, 30, 5, { type: "mousemove" });
@ -240,11 +251,11 @@ function test()
// selection starting at fixedDiv1
synthesizeMouse(fixedDiv1, 30, 5, { type: "mousedown" });
// to xbl_child
synthesizeMouse(xbl_child, 30, 5, { type: "mousemove" });
// to custom_child
synthesizeMouse(custom_child, 30, 5, { type: "mousemove" });
check(kFalse, kFalse, kFalse,
kTrue, kTrue, kFalse, kFalse, kFalse, kFalse,
"fixedDiv1-xbl_child, all boxes are overflow: " + kOverflows[i] + ";");
"fixedDiv1-custom_child, all boxes are overflow: " + kOverflows[i] + ";");
// to fixedDiv2
synthesizeMouse(fixedDiv2, 30, 5, { type: "mousemove" });
@ -258,11 +269,11 @@ function test()
// selection starting at fixedDiv2
synthesizeMouse(fixedDiv2, 30, 5, { type: "mousedown" });
// to xbl_child
synthesizeMouse(xbl_child, 30, 5, { type: "mousemove" });
// to custom_child
synthesizeMouse(custom_child, 30, 5, { type: "mousemove" });
check(kFalse, kFalse, kFalse,
kFalse, kTrue, kTrue, kFalse, kFalse, kFalse,
"fixedDiv2-xbl_child, all boxes are overflow: " + kOverflows[i] + ";");
"fixedDiv2-custom_child, all boxes are overflow: " + kOverflows[i] + ";");
// to fixedDiv1
synthesizeMouse(fixedDiv1, 30, 5, { type: "mousemove" });
@ -293,11 +304,11 @@ function test()
"div2-fixedDiv1, div3 is overflow: " + kOverflows[i] +
";, but div2 is overflow: visible;");
// to xbl_child
synthesizeMouse(xbl_child, 30, 5, { type: "mousemove" });
// to custom_child
synthesizeMouse(custom_child, 30, 5, { type: "mousemove" });
check(kFalse, kTrue, kTrue,
kTrue, kTrue, kFalse, kFalse, kFalse, kFalse,
"div2-xbl_child, div3 is overflow: " + kOverflows[i] +
"div2-custom_child, div3 is overflow: " + kOverflows[i] +
";, but div2 is overflow: visible;");
// to fixedDiv2 (sibling of div*)
@ -327,11 +338,11 @@ function test()
"div3-fixedDiv1, div3 is overflow: " + kOverflows[i] +
";, but div2 is overflow: visible;");
// to xbl_child
synthesizeMouse(xbl_child, 30, 5, { type: "mousemove" });
// to custom_child
synthesizeMouse(custom_child, 30, 5, { type: "mousemove" });
check(kFalse, kFalse, kTrue,
kTrue, kTrue, kFalse, kFalse, kFalse, kFalse,
"div3-xbl_child, div3 is overflow: " + kOverflows[i] +
"div3-custom_child, div3 is overflow: " + kOverflows[i] +
";, but div2 is overflow: visible;");
// to fixedDiv2 (sibling of div*)

Просмотреть файл

@ -13,6 +13,16 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=375363
<p id="display"><iframe id="iframe" src="about:blank"></iframe></p>
<pre id="test">
<script class="testbody" type="text/javascript">
const { AppConstants } = SpecialPowers.Cu.import(
"resource://gre/modules/AppConstants.jsm",
{}
);
if (!AppConstants.MOZ_XBL) {
// This property still exists when XBL is disabled, but we don't want to
// test it, since it will crash. Will be removed in bug 1566221.
delete gCSSProperties["-moz-binding"]
}
/** Test for cloning of CSS property values (including 'inherit', 'initial' and 'unset') **/
var test_queue = [];

Просмотреть файл

@ -35,6 +35,7 @@ expected = fail
[test_timeouts.py]
[test_anonymous_content.py]
skip-if = !xbl
[test_switch_frame.py]
[test_switch_frame_chrome.py]
[test_switch_window_chrome.py]