Tests: Replaced RegExp-based assertions with DOM-based ones.