Any ingredient used in cosmetics cannot be tested for the cosmetic use, but if it is also used in pharmaceuticals or is tested as a chemical outside of the cosmetic use, those animal tests will not preclude the use of the ingredient in cosmetics. Thus, the ingredients used in cosmetics can be tested on animals, but not just for the use in cosmetics.
Say a company wants to use dihydrogen oxide in a cosmetic, but there is a concern over the use. They cannot use animal testing to determine the safety of the use. However, if dihyrdogen oxide is tested for exposure as a chemical used for other purposes, the company can then use it in cosmetics with some level of comfort. The same thing applies if dihyrogen oxide were used in some pharmaceutical application, which may involve an even greater level of testing and therfore comfort. The only thing they cannot do is test the new usage specifically as a cosmetic application.
Not the case, you need to read the directive and not hang onto reports in the press, quote legislation.