I'm not going to comment on the general intelligence of dogs because I simply do not know enough about them, but I can tell you about how my cats would deal with these tests. They would all get the treats, but in different ways..
Kika (average 
): She would take the longest time. Lots of trial and error. Eventually she'll figure it out. She's kinda gentle also. Approach wise her equivalent would be Saga the dog of this video.
Uufje (smart 
): I've seen her grabbing objects with her little paw like she's just a tiny human. She'd understand glass barriers too, and that they would need to be removed first. Uufje does these things carefully and with precision.
Note: she would do this only if she'd feel like it. If not very hungry it would not be worth the effort.
Prom (bless his heart 
): "
A CANDY? GIMME GIMME GIMME!! WAIT, WHAT IS THIS THING? ATTAAAACK!!!!!!!"
In other words, he would just bruteforce his way pretty quickly through the problem without even knowing what he is doing, lol.
Dibbetje I would not know yet. Still winning her trust.