Fixes bug 1032033, removes repeated function & errors in build/test/integration/helper.js and Applied Patch r=yurenju