This commit is contained in:
Florian Bruhin 2018-06-09 23:00:57 +02:00
parent 7fdeeb25b7
commit c9fddfe458

View File

@ -194,7 +194,9 @@ class TestWindowIsolation:
# The compiled source of that scripts with some additional setup # The compiled source of that scripts with some additional setup
# bookending it. # bookending it.
ret.test_script = "\n".join([ ret.test_script = "\n".join([
"var result = [];", """
const result = [];
""",
test_script.code(), test_script.code(),
""" """
// Now check that the actual global scope has // Now check that the actual global scope has
@ -202,14 +204,14 @@ class TestWindowIsolation:
result.push(window.$); result.push(window.$);
result.push($); result.push($);
// And return our findings // And return our findings
result;""" result;
"""
]) ])
# What we expect the script to report back. # What we expect the script to report back.
ret.expected = [ ret.expected = ["global", "global",
"global", "global", "shadowed", "shadowed",
"shadowed", "shadowed", "global", "global"]
"global", "global"]
return ret return ret
def test_webengine(self, callback_checker, webengineview, setup): def test_webengine(self, callback_checker, webengineview, setup):