htmltree: move the element test results to be applicable to more test cases