Canadian Criminal Procedure and Practice/Pre-Trial Matters/Costs
Costs against the Crown necessarily require Crown misconduct or a serious interference with the authority of the court or administration of justice. 
While there is no closed list of circumstances, situations where costs may be ordered against the Crown is where the prosecution has been frivolous, for an oblique motive, or where the Crown has taken up the matter as a test case.
In determining whether there should be costs against the Crown, the Court may apply its "inherent power to protect against abuse of process"
The "jurisdiction for awarding costs in criminal matters is extremely narrow and the threshold is very high."
Under s.676.1, a party ordered to pay costs may appeal the order and amount with leave to the court of appeal.
R. v. Magda, 2006 CanLII 36822 (ON CA)
R. v. Griffin, 2009 ABQB 696 (CanLII) at para. 176
- R. v. King 1986 CanLII 1156 (BC CA), (1986), 26 C.C.C. (3d) 349 (B.C.C.A.) per Lambert J.A. at para. 13
- Canada (Attorney General) v. Foster 2006 CanLII 38732(ON CA), (2006), 215 C.C.C. (3d) 59 (Ont. C.A.) at para. 69
- R. v. Leyshon‑Hughes, 2009 ONCA 16 (CanLII), 2009 ONCA 16, 240 C.C.C. (3d) 181 at para. 55