diff --git a/js/tests/parse.js b/js/tests/parse.js
index <HASH>..<HASH> 100644
--- a/js/tests/parse.js
+++ b/js/tests/parse.js
@@ -148,7 +148,12 @@ function dumpFlags() {
 		'oldtextfile': {
 			description: 'File containing the old page text for a selective-serialization operation (see --selser)',
 			'boolean': false,
-			'default': false
+			'default': null,
+		},
+		'oldhtmlfile': {
+			description: 'File containing the old HTML for a selective-serialization operation (see --selser)',
+			'boolean': false,
+			'default': null,
 		},
         'inputfile': {
             description: 'File containing input as an alternative to stdin',
@@ -229,6 +234,9 @@ function dumpFlags() {
 			if ( argv.oldtextfile ) {
 				argv.oldtext = fs.readFileSync(argv.oldtextfile, 'utf8');
 			}
+			if ( argv.oldhtmlfile ) {
+				env.page.dom = Util.parseHTML(fs.readFileSync(argv.oldhtmlfile, 'utf8')).body;
+			}
 			env.setPageSrcInfo( argv.oldtext || null );
 			if ( argv.selser ) {
 				serializer = new SelectiveSerializer( { env: env, oldid: null } );
Tweaked parse.js to accept old dom to enable cmdline selser testing

Change-Id: I0ce<I>c<I>cdc<I>bf<I>a<I>cef<I>f8b