GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit 7b409c6c authored by boklm's avatar boklm
Browse files

Bug 27137: Fix the resource-timing test

parent 25ab7878
......@@ -377,6 +377,7 @@ our @tests = (
# uncomment this:
#prefs => {
# 'dom.enable_resource_timing' => 'true',
# 'privacy.resistFingerprinting' => 'false',
#},
},
{
......
......@@ -29,42 +29,39 @@ class Test(MarionetteTestCase):
# getEntriesByType()
err_msg = 'resource entries found (getEntriesByType())'
self.assertTrue(self.marionette.execute_script("""
var pass = false;
try {
let resources = document.defaultView.performance.
var resources = document.defaultView.performance.
getEntriesByType("resource")[0];
} catch (e) {
pass = true;
return false;
}
return pass;
return resources == undefined;
"""),
msg=err_msg)
# getEntriesByName()
err_msg = "resource entries found (getEntriesByName())"
self.assertTrue(self.marionette.execute_script("""
var pass = false;
try {
let resources = document.defaultView.performance.
var resources = document.defaultView.performance.
getEntriesByName(arguments[0])[0];
} catch (e) {
pass = true;
} catch (e) {
return false;
}
return pass;
return resources == undefined;
""", script_args=[self.RESOURCE_URL]),
msg=err_msg)
# getEntries()
err_msg = "resource entries found (getEntries())"
self.assertTrue(self.marionette.execute_script("""
var pass = false;
try {
let resources = document.defaultView.performance.
var resources = document.defaultView.performance.
getEntries()[0];
} catch (e) {
pass = true;
return false;
}
return pass;
return resources == undefined;
"""),
msg=err_msg)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment