These are tests for an old API that is almost entirely incompatible with the new one.
Created attachment 260351 [details] proposed patch
Comment on attachment 260351 [details] proposed patch rs=me
Committed r189204.