Cscott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/197422
Change subject: Add more change methods to the selser parsertests.
......................................................................
Add more change methods to the selser parsertests.
Change-Id: I53758f0a7563c94c3dbb14ee03ad3903e0977466
---
M tests/parserTests.js
1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/22/197422/1
diff --git a/tests/parserTests.js b/tests/parserTests.js
index 99b1301..ac84324 100755
--- a/tests/parserTests.js
+++ b/tests/parserTests.js
@@ -785,8 +785,18 @@
// on the results of the selector in the first argument, which is
// a good way to get at the text and comment nodes
var jquery = {
+ after: function(html) {
+ var div = document.createElement('div');
+ div.innerHTML = html;
+ DU.migrateChildren(div, this.parentNode,
this.nextSibling);
+ },
attr: function(name, val) {
this.setAttribute(name, val);
+ },
+ before: function(html) {
+ var div = document.createElement('div');
+ div.innerHTML = html;
+ DU.migrateChildren(div, this.parentNode, this);
},
removeAttr: function(name) {
this.removeAttribute(name);
@@ -800,6 +810,9 @@
text: function(t) {
this.textContent = t;
},
+ html: function(h) {
+ this.innerHTML = h;
+ },
remove: function(optSelector) {
// jquery lets us specify an optional selector to
further
// restrict the removed elements.
--
To view, visit https://gerrit.wikimedia.org/r/197422
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I53758f0a7563c94c3dbb14ee03ad3903e0977466
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits