The EU banned testing cosmetics on animals in March 2013. However, this only applies to finished products and not ingredients. It is entirely likely that many cosmetic ingredients were tested on animals prior to 2013, in order to determine the toxicity and safety of the ingredient. Finding out if an ingredient was tested on animals in the past is difficult, because you would need to also know which company supplies the ingredient used in a specific cosmetic. There are often many companies supplying the same ingredient on the market.
Outside the EU, there are countries such as China that still require all imported cosmetics to be tested on animals. So those concerned about animal testing may want to check if a specific product is sold in China.