зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1272857 - Fix some tree performance tests to read/write element.style.marginInlineStart instead of just element.marginInlineStart. r=gregtatum
This is a followup to bug 1111440. MozReview-Commit-ID: BHCexWmrHoT
This commit is contained in:
Родитель
c8210f43ce
Коммит
792af6db64
|
@ -38,7 +38,7 @@ add_task(function* () {
|
|||
"The root node has the correct parent.");
|
||||
is(treeRoot.level, 0,
|
||||
"The root node has the correct level.");
|
||||
is(treeRoot.target.marginInlineStart, "0px",
|
||||
is(treeRoot.target.style.marginInlineStart, "0px",
|
||||
"The root node's indentation is correct.");
|
||||
is(treeRoot.target.textContent, "root",
|
||||
"The root node's text contents are correct.");
|
||||
|
@ -77,7 +77,7 @@ add_task(function* () {
|
|||
"The 'foo' node has the correct parent.");
|
||||
is(fooItem.level, 1,
|
||||
"The 'foo' node has the correct level.");
|
||||
is(fooItem.target.marginInlineStart, "10px",
|
||||
is(fooItem.target.style.marginInlineStart, "10px",
|
||||
"The 'foo' node's indentation is correct.");
|
||||
is(fooItem.target.textContent, "foo",
|
||||
"The 'foo' node's text contents are correct.");
|
||||
|
@ -90,7 +90,7 @@ add_task(function* () {
|
|||
"The 'bar' node has the correct parent.");
|
||||
is(barItem.level, 1,
|
||||
"The 'bar' node has the correct level.");
|
||||
is(barItem.target.marginInlineStart, "10px",
|
||||
is(barItem.target.style.marginInlineStart, "10px",
|
||||
"The 'bar' node's indentation is correct.");
|
||||
is(barItem.target.textContent, "bar",
|
||||
"The 'bar' node's text contents are correct.");
|
||||
|
@ -143,7 +143,7 @@ add_task(function* () {
|
|||
"The 'baz' node has the correct parent.");
|
||||
is(bazItem.level, 2,
|
||||
"The 'baz' node has the correct level.");
|
||||
is(bazItem.target.marginInlineStart, "20px",
|
||||
is(bazItem.target.style.marginInlineStart, "20px",
|
||||
"The 'baz' node's indentation is correct.");
|
||||
is(bazItem.target.textContent, "baz",
|
||||
"The 'baz' node's text contents are correct.");
|
||||
|
|
|
@ -65,7 +65,7 @@ exports.synthesizeCustomTreeClass = () => {
|
|||
MyCustomTreeItem.prototype = Heritage.extend(AbstractTreeItem.prototype, {
|
||||
_displaySelf: function (document, arrowNode) {
|
||||
let node = document.createElement("hbox");
|
||||
node.marginInlineStart = (this.level * 10) + "px";
|
||||
node.style.marginInlineStart = (this.level * 10) + "px";
|
||||
node.appendChild(arrowNode);
|
||||
node.appendChild(document.createTextNode(this.itemDataSrc.label));
|
||||
return node;
|
||||
|
|
|
@ -50,7 +50,7 @@ this.EXPORTED_SYMBOLS = ["AbstractTreeItem"];
|
|||
* ...
|
||||
* // Use `this.itemDataSrc` to customize the tree item and
|
||||
* // `this.level` to calculate the indentation.
|
||||
* node.marginInlineStart = (this.level * 10) + "px";
|
||||
* node.style.marginInlineStart = (this.level * 10) + "px";
|
||||
* node.appendChild(document.createTextNode(this.itemDataSrc.label));
|
||||
* ...
|
||||
* return node;
|
||||
|
|
Загрузка…
Ссылка в новой задаче