Fixed tests in browsers and SauceLabs

Using `this` can very problematic and is unsafe in many cases.