Typo
Cookies handling cleanup

Move cookies init and injecting code to separate methods
Results: handle asserts
Report failed asserts in plain format
results: add a check in setAsserts()