The new law will come into effect in six years' time.
But the people who make the cosmetics are already angry about it.
They say animal testing is by far the best way to check for chemicals that can cause cancer and allergies.
And that animal testing has been helped them make, for example, better toothpaste and safer sunscreen.
But animal rights groups are also angry - because the law will allow products that could be poisonous or prevent people from having babies to be tested on animals until at least 2013.