Giving dogs chocolate, specifically in large quantities, can cause pancreatitis (inflamation of the pancreas). Supposedly, it's a difficult illness to combat and can be prevented by avoiding harmful foods and large amounts of table scraps. I've also heard from my vet that onions are not good for dogs. The way I view that one is that my dog has enough bad gas. He doesn't need anything else to promote it!
As far as guinea pigs go, I feed mine pellets, veggies, and Timothy Hay along with a weekly extra boost of Vitamin C. I'm not sure what such foods as chocolate will do to a guinea, but I don't recommend it at all. Hope this helped any.
Marlania
www.hopeforanimals.com