11cb0ef41Sopenharmony_citest(function() { 21cb0ef41Sopenharmony_ci self.performance.mark("mark1"); 31cb0ef41Sopenharmony_ci self.performance.mark("mark2"); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci // test that two marks have been created 61cb0ef41Sopenharmony_ci var entries = self.performance.getEntriesByType("mark"); 71cb0ef41Sopenharmony_ci assert_equals(entries.length, 2, "Two marks have been created for this test."); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci // clear existent mark 101cb0ef41Sopenharmony_ci self.performance.clearMarks("mark1"); 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ci // test that "mark1" was cleared 131cb0ef41Sopenharmony_ci entries = self.performance.getEntriesByName("mark1"); 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ci assert_equals(entries.length, 0, 161cb0ef41Sopenharmony_ci "After a call to self.performance.clearMarks(\"mark1\"), " + 171cb0ef41Sopenharmony_ci "window.performance.getEntriesByName(\"mark1\") returns an empty object."); 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ci // test that "mark2" still exists 201cb0ef41Sopenharmony_ci entries = self.performance.getEntriesByName("mark2"); 211cb0ef41Sopenharmony_ci assert_equals(entries[0].name, "mark2", 221cb0ef41Sopenharmony_ci "After a call to self.performance.clearMarks(\"mark1\"), " + 231cb0ef41Sopenharmony_ci "window.performance.getEntriesByName(\"mark2\") returns an object containing the " + 241cb0ef41Sopenharmony_ci "\"mark2\" mark."); 251cb0ef41Sopenharmony_ci 261cb0ef41Sopenharmony_ci}, "Clearing an existent mark doesn't affect other existing marks"); 27