Bug 947816 - metadata unit test

Just one more thing: Can you put testParseMetadata in a separate file (e.g. `metadata_utils.js`), and `require()` it in all the xyz_test.js files? That way we're not duplicating this code unnecessarily.