1test(function() 2{ 3 self.performance.mark("mark1"); 4 self.performance.measure("measure1", "mark1"); 5 self.performance.mark("mark2"); 6 self.performance.measure("measure2", "mark2"); 7 8 // test that two measures have been created 9 var entries = self.performance.getEntriesByType("measure"); 10 assert_equals(entries.length, 2, "Two measures have been created for this test."); 11 12 // clear all measures 13 self.performance.clearMeasures(); 14 15 // test that all measures were cleared 16 entries = self.performance.getEntriesByType("measure"); 17 assert_equals(entries.length, 0, 18 "After a call to self.performance.clearMeasures(), " + 19 "self.performance.getEntriesByType(\"measure\") returns an empty object."); 20 21}, "Clearing all marks remove all of them."); 22