[dom] Fix bodge DOM core tests

I found some bodge tests code in the `dom` module. This change simply fixes them.