fix func test failures on firefox

Most of the failing tests were due to the newly-implemented `scoped`
style tag attribute in Firefox, revealing our incorrectly setup test. By
rendering the tooltip within the scope of the styles that the test
relies on, the tests pass as expected.

After the previous fix, another test failure was revealed. This one was
a simple "expected 10000px but got 9999.28px" failure. This was fixed by
allowing a 1px margin of error.
Merge pull request #996 from ekashida/fix-widget-func-tests

fix func test failures on firefox
Merge branch 'dev-master' into dev-3.x