Skip to content

Commit

Permalink
fix: test,使用赋值代替setAttribute #104
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Nov 19, 2020
1 parent 91852cf commit 1a22220
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7824,10 +7824,12 @@
o = hash[key] = document.createElement('canvas');
} else {
o = hash[key];
}
} // o.setAttribute('width', width + 'px');
// o.setAttribute('height', height + 'px');


o.setAttribute('width', width + 'px');
o.setAttribute('height', height + 'px');
o.width = width;
o.height = height;

if (typeof karas !== 'undefined' && karas.debug) {
o.style.width = width + 'px';
Expand Down
2 changes: 1 addition & 1 deletion index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/util/inject.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/visibility-hidden/test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/visibility-inherit-update-svg/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
browser
.url('file://' + path.join(__dirname, 'index.html'))
.waitForElementVisible('body', 1000)
.assert.value('input', '{"bb":[],"children":[{"bb":[],"children":[{"type":"text","children":[]},{"bb":[],"children":[{"type":"text","children":[]}],"visibility":"hidden","type":"dom"}],"visibility":"hidden","type":"dom"}],"visibility":"visible","type":"dom","defs":[]}hidden')
.assert.value('input', '{"bb":[],"children":[{"bb":[],"children":[{"type":"text","children":[{"type":"item","tagName":"text","props":[["x",0],["y",14.484375],["fill","rgba(0,0,0,1)"],["font-family","arial"],["font-weight",400],["font-style","normal"],["font-size","16px"]],"content":"1"}]},{"bb":[],"children":[{"type":"text","children":[{"type":"item","tagName":"text","props":[["x",8.90625],["y",14.484375],["fill","rgba(0,0,0,1)"],["font-family","arial"],["font-weight",400],["font-style","normal"],["font-size","16px"]],"content":"2"}]}],"visibility":"visible","type":"dom"}],"visibility":"visible","type":"dom"}],"visibility":"visible","type":"dom","defs":[],"lv":0}')
.end();
}
};
Loading

0 comments on commit 1a22220

Please sign in to comment.