mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 06:45:42 +00:00
Bug 1345119 - Part 5: Fix eslint errors in unit tests. r=me
This commit is contained in:
parent
a62beb9141
commit
06f7801997
@ -8,9 +8,11 @@
|
||||
<div id="no_parent" style="position: absolute"></div>
|
||||
<div id="fixed" style="position: fixed"></div>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
window.onload = () => {
|
||||
window.opener.postMessage('ready', '*')
|
||||
}
|
||||
window.opener.postMessage("ready", "*");
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -11,19 +11,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1345119
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
|
||||
<script type="application/javascript" src="inspector-helpers.js"></script>
|
||||
<script type="application/javascript">
|
||||
const inspector = require("devtools/shared/fronts/inspector");
|
||||
"use strict";
|
||||
|
||||
window.onload = function() {
|
||||
window.onload = function () {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
runNextTest();
|
||||
}
|
||||
};
|
||||
|
||||
var gWalker;
|
||||
var gBodyNode;
|
||||
|
||||
addTest(function setup() {
|
||||
let url = document.getElementById("inspectorContent").href;
|
||||
attachURL(url, function(err, client, tab, doc) {
|
||||
attachURL(url, function (err, client, tab, doc) {
|
||||
let {InspectorFront} = require("devtools/shared/fronts/inspector");
|
||||
let inspector = InspectorFront(client, tab);
|
||||
|
||||
@ -36,8 +36,9 @@ addTest(function setup() {
|
||||
});
|
||||
});
|
||||
|
||||
addTest(function() {
|
||||
info("Try to get the offset parent for a node that is absolutely positioned inside a relative node");
|
||||
addTest(function () {
|
||||
info("Try to get the offset parent for a node that is absolutely positioned inside a " +
|
||||
"relative node");
|
||||
gWalker.querySelector(gWalker.rootNode, "#absolute_child").then(node => {
|
||||
return gWalker.getOffsetParent(node);
|
||||
}).then(offsetParent => {
|
||||
@ -49,8 +50,9 @@ addTest(function() {
|
||||
});
|
||||
});
|
||||
|
||||
addTest(function() {
|
||||
info("Try to get the offset parent for a node that is absolutely positioned outside a relative node");
|
||||
addTest(function () {
|
||||
info("Try to get the offset parent for a node that is absolutely positioned outside a" +
|
||||
" relative node");
|
||||
gWalker.querySelector(gWalker.rootNode, "#no_parent").then(node => {
|
||||
return gWalker.getOffsetParent(node);
|
||||
}).then(offsetParent => {
|
||||
@ -59,7 +61,7 @@ addTest(function() {
|
||||
});
|
||||
});
|
||||
|
||||
addTest(function() {
|
||||
addTest(function () {
|
||||
info("Try to get the offset parent for a relatively positioned node");
|
||||
gWalker.querySelector(gWalker.rootNode, "#relative_parent").then(node => {
|
||||
return gWalker.getOffsetParent(node);
|
||||
@ -69,7 +71,7 @@ addTest(function() {
|
||||
});
|
||||
});
|
||||
|
||||
addTest(function() {
|
||||
addTest(function () {
|
||||
info("Try to get the offset parent for a statically positioned node");
|
||||
gWalker.querySelector(gWalker.rootNode, "#static").then(node => {
|
||||
return gWalker.getOffsetParent(node);
|
||||
@ -79,7 +81,7 @@ addTest(function() {
|
||||
});
|
||||
});
|
||||
|
||||
addTest(function() {
|
||||
addTest(function () {
|
||||
info("Try to get the offset parent for a fixed positioned node");
|
||||
gWalker.querySelector(gWalker.rootNode, "#fixed").then(node => {
|
||||
return gWalker.getOffsetParent(node);
|
||||
@ -89,7 +91,7 @@ addTest(function() {
|
||||
});
|
||||
});
|
||||
|
||||
addTest(function() {
|
||||
addTest(function () {
|
||||
info("Try to get the offset parent for the body");
|
||||
gWalker.querySelector(gWalker.rootNode, "body").then(node => {
|
||||
return gWalker.getOffsetParent(node);
|
||||
@ -99,7 +101,7 @@ addTest(function() {
|
||||
});
|
||||
});
|
||||
|
||||
addTest(function() {
|
||||
addTest(function () {
|
||||
gWalker = null;
|
||||
gBodyNode = null;
|
||||
runNextTest();
|
||||
|
Loading…
Reference in New Issue
Block a user