Revision 3ed3aadd4dc48c259493ec9f916faaee921f6ef3 authored by Tom Schuster on 11 April 2018, 09:30:04 UTC, committed by moz-wptsync-bot on 11 April 2018, 14:16:05 UTC
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1404744 gecko-commit: 42cda784d2c54c8730e7fd218a00fb5846263e76 gecko-integration-branch: central gecko-reviewers: me
1 parent 6d1dd02
clear_all_measures.any.js
test(function()
{
self.performance.mark("mark1", "responseStart");
self.performance.measure("measure1", "mark1");
self.performance.mark("mark2", "responseStart");
self.performance.measure("measure2", "mark2");
// test that two measures have been created
var entries = self.performance.getEntriesByType("measure");
assert_equals(entries.length, 2, "Two measures have been created for this test.");
// clear all measures
self.performance.clearMeasures();
// test that all measures were cleared
entries = self.performance.getEntriesByType("measure");
assert_equals(entries.length, 0,
"After a call to self.performance.clearMeasures(), " +
"self.performance.getEntriesByType(\"measure\") returns an empty object.");
}, "Clearing all marks remove all of them.");
Computing file changes ...