shadow-dom:use testcommon.js and compact code