[MediaWiki-commits] [Gerrit] Modify mockAPI to return correct answer for not existing files - change (mediawiki...Parsoid)

2013-09-16 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Modify mockAPI to return correct answer for not existing files
..


Modify mockAPI to return correct answer for not existing files

This change fixes couple of wt2wt tests, because what previously was
parsed as figure is now handled as meta placeholder so there is no 
information lost while serializing.

Change-Id: Iec1ec2f099dd6d850d70aa4e48e813cd4ade07c7
---
M js/tests/mockAPI.js
M js/tests/parserTests-blacklist.js
2 files changed, 15 insertions(+), 5 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/js/tests/mockAPI.js b/js/tests/mockAPI.js
index 0825182..ce1628f 100644
--- a/js/tests/mockAPI.js
+++ b/js/tests/mockAPI.js
@@ -87,6 +87,21 @@
var filename = body.titles,
normPagename = pnames[filename] || filename,
normFilename = fnames[filename] || filename;
+   if(!(normFilename in FILE_PROPS )) {
+   cb( null, {
+   'query': {
+   'pages': {
+   '-1': {
+   'ns': 6,
+   'title': 
filename,
+   'missing': '',
+   
'imagerepository': ''
+   }
+   }
+   }
+   } );
+   return;
+   }
var props = FILE_PROPS[normFilename] || 
Object.create(null);
var md5 = crypto.createHash('md5').update(normFilename).
digest('hex');
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index b9f4dca..e33f0b9 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -615,8 +615,6 @@
 add(wt2wt, pre-save transform: Signature expansion);
 add(wt2wt, pre-save transform: Signature expansion in nowiki tags (bug 
93));
 add(wt2wt, Image with multiple captions -- only last one is accepted 
(parsoid));
-add(wt2wt, SVG thumbnails with language de);
-add(wt2wt, SVG thumbnails with invalid language code);
 add(wt2wt, BUG 561: {{/Subpage}});
 add(wt2wt, Handling of sections up to level 6 and beyond);
 add(wt2wt, div with single-quoted attribute);
@@ -671,7 +669,6 @@
 add(wt2wt, Free external link invading image caption);
 add(wt2wt, preload: check that it doesn't try to do tricks);
 add(wt2wt, HTML5 data attributes);
-add(wt2wt, percent-encoding and + signs in internal links (Bug 26410));
 add(wt2wt, Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed 
external links);
 add(wt2wt, Bug31490 Turkish: ucfırst (with a dotless i));
 add(wt2wt, Bug31490 ucfırst (with a dotless i) with English language);
@@ -3579,8 +3576,6 @@
 add(selser, percent-encoding and + signs in internal links (Bug 26410) 
[[4,0,[3],0,0,0,4,2,1,0,3,0,[4],4,4,0,0,0,2,0,3]]);
 add(selser, percent-encoding and + signs in internal links (Bug 26410) 
[[2,0,0,0,0,0,[3],0,3,4,3,0,0,4,1,4,0,4,[4],0,1]]);
 add(selser, percent-encoding and + signs in internal links (Bug 26410) 
[[[2],0,3,0,1,0,0,0,1,0,0,2,0,0,0,0,0,0,0,4,[3]]]);
-add(selser, percent-encoding and + signs in internal links (Bug 26410) 
[1]);
-add(selser, percent-encoding and + signs in internal links (Bug 26410) 
[2]);
 add(selser, percent-encoding and + signs in internal links (Bug 26410) 
[[4,0,0,4,0,4,2,0,[3],0,0,0,[4],3,0,4,0,2,4,2,4]]);
 add(selser, percent-encoding and + signs in internal links (Bug 26410) 
[[1,0,2,0,0,0,[3],4,0,2,[3],0,3,4,1,4,0,4,[2],0,2]]);
 add(selser, percent-encoding and + signs in internal links (Bug 26410) 
[[1,2,[2],0,4,2,[3],0,1,0,[2],0,1,4,[3],2,0,0,[2],0,1]]);

-- 
To view, visit https://gerrit.wikimedia.org/r/84186
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec1ec2f099dd6d850d70aa4e48e813cd4ade07c7
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Inez i...@wikia-inc.com
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Modify mockAPI to return correct answer for not existing files - change (mediawiki...Parsoid)

2013-09-13 Thread Inez (Code Review)
Inez has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84186


Change subject: Modify mockAPI to return correct answer for not existing files
..

Modify mockAPI to return correct answer for not existing files

This change fixes couple of wt2wt tests, because what previously was parser
to figure now is handled as meta placeholder so there is no information lost
while serializing

Change-Id: Iec1ec2f099dd6d850d70aa4e48e813cd4ade07c7
---
M js/tests/mockAPI.js
M js/tests/parserTests-blacklist.js
2 files changed, 15 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/86/84186/1

diff --git a/js/tests/mockAPI.js b/js/tests/mockAPI.js
index 0825182..ce1628f 100644
--- a/js/tests/mockAPI.js
+++ b/js/tests/mockAPI.js
@@ -87,6 +87,21 @@
var filename = body.titles,
normPagename = pnames[filename] || filename,
normFilename = fnames[filename] || filename;
+   if(!(normFilename in FILE_PROPS )) {
+   cb( null, {
+   'query': {
+   'pages': {
+   '-1': {
+   'ns': 6,
+   'title': 
filename,
+   'missing': '',
+   
'imagerepository': ''
+   }
+   }
+   }
+   } );
+   return;
+   }
var props = FILE_PROPS[normFilename] || 
Object.create(null);
var md5 = crypto.createHash('md5').update(normFilename).
digest('hex');
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index b9f4dca..6940770 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -615,8 +615,6 @@
 add(wt2wt, pre-save transform: Signature expansion);
 add(wt2wt, pre-save transform: Signature expansion in nowiki tags (bug 
93));
 add(wt2wt, Image with multiple captions -- only last one is accepted 
(parsoid));
-add(wt2wt, SVG thumbnails with language de);
-add(wt2wt, SVG thumbnails with invalid language code);
 add(wt2wt, BUG 561: {{/Subpage}});
 add(wt2wt, Handling of sections up to level 6 and beyond);
 add(wt2wt, div with single-quoted attribute);
@@ -671,7 +669,6 @@
 add(wt2wt, Free external link invading image caption);
 add(wt2wt, preload: check that it doesn't try to do tricks);
 add(wt2wt, HTML5 data attributes);
-add(wt2wt, percent-encoding and + signs in internal links (Bug 26410));
 add(wt2wt, Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed 
external links);
 add(wt2wt, Bug31490 Turkish: ucfırst (with a dotless i));
 add(wt2wt, Bug31490 ucfırst (with a dotless i) with English language);

-- 
To view, visit https://gerrit.wikimedia.org/r/84186
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec1ec2f099dd6d850d70aa4e48e813cd4ade07c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Inez i...@wikia-inc.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits