Mariapacana has uploaded a new change for review.
https://gerrit.wikimedia.org/r/97456
Change subject: parse-js, roundtrip-test.js: Set debugging flags with
ParsoidConfig.
......................................................................
parse-js, roundtrip-test.js: Set debugging flags with ParsoidConfig.
Set debugging flags after creating the parsoidConfig object instead of using
env.conf.parsoid inside a callback function.
Change-Id: I29694e6296ea9c8368a91aef511c63a176f8ad55
---
M js/tests/parse.js
M js/tests/roundtrip-test.js
2 files changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid
refs/changes/56/97456/1
diff --git a/js/tests/parse.js b/js/tests/parse.js
index 45f7f60..fab5088 100755
--- a/js/tests/parse.js
+++ b/js/tests/parse.js
@@ -232,6 +232,8 @@
}
parsoidConfig.fetchConfig = Util.booleanOption( argv.fetchConfig );
+ Util.setDebuggingFlags( parsoidConfig, argv );
+
ParserEnv.getParserEnv( parsoidConfig, null, prefix, argv.page || null,
null, function ( err, env ) {
if ( err !== null ) {
console.error( err.toString() );
@@ -247,8 +249,6 @@
env.conf.parsoid.usePHPPreProcessor =
env.conf.parsoid.fetchTemplates && Util.booleanOption( argv.usephppreprocessor
);
env.conf.parsoid.maxDepth = argv.maxdepth ||
env.conf.parsoid.maxDepth;
env.conf.parsoid.editMode = Util.booleanOption( argv.editMode );
-
- Util.setDebuggingFlags( env.conf.parsoid, argv );
if ( argv.dp ) {
env.conf.parsoid.storeDataParsoid = true;
diff --git a/js/tests/roundtrip-test.js b/js/tests/roundtrip-test.js
index 2c0859a..39c95e7 100755
--- a/js/tests/roundtrip-test.js
+++ b/js/tests/roundtrip-test.js
@@ -440,7 +440,6 @@
return;
}
env.profile = { time: { total: 0, total_timer: new Date() },
size: {} };
- Util.setDebuggingFlags( env.conf.parsoid, options );
var target = env.resolveTitle( env.normalizeTitle(
env.page.name ), '' );
var tpr = new TemplateRequest( env, target, null );
@@ -485,6 +484,8 @@
}
parsoidConfig.editMode = Util.booleanOption( options.editMode );
+ Util.setDebuggingFlags( parsoidConfig, options );
+
MWParserEnvironment.getParserEnv( parsoidConfig, null, prefix, page,
null, envCb );
};
--
To view, visit https://gerrit.wikimedia.org/r/97456
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I29694e6296ea9c8368a91aef511c63a176f8ad55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Mariapacana <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits