port xmlreader_tests from compat

Change-Id: I8d8a51b58c1754c168e04d15b289ce61481dc221
Merge "port xmlreader_tests from compat"