Onions: No, dogs should not eat onions.
Tomatoes: No, dogs should probably avoid Tomatoes.
While the ripened fruit of the tomato plant (the red part humans normally eat) is generally considered safe for dogs, the green parts of the plant contain a toxic substance called solanine.