blob: c146214ef2d6a8ab1d6b8ae387865e107ba3f70c [file] [log] [blame]
Basic Interface test for performance-timeline APIs.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PerformanceEntry
PASS PerformanceEntry is defined.
PASS "name" in PerformanceEntry.prototype is true
PASS "entryType" in PerformanceEntry.prototype is true
PASS "startTime" in PerformanceEntry.prototype is true
PASS "duration" in PerformanceEntry.prototype is true
PASS new PerformanceEntry() threw exception TypeError: Illegal constructor.
Performance extensions
PASS Performance.prototype.getEntries is defined.
PASS Performance.prototype.getEntriesByType is defined.
PASS Performance.prototype.getEntriesByName is defined.
PASS performance.getEntries() instanceof Array is true
PASS performance.getEntries().length === 1 is true
PASS performance.mark("test"); did not throw exception.
PASS performance.getEntries().length === 2 is true
PASS performance.getEntries()[markIndex] instanceof PerformanceEntry is true
PASS performance.getEntries()[markIndex].name is "test"
PASS performance.getEntries()[markIndex].entryType is "mark"
PASS typeof performance.getEntries()[markIndex].startTime === "number" is true
PASS typeof performance.getEntries()[markIndex].duration === "number" is true
PASS performance.getEntriesByType() threw exception TypeError: Not enough arguments.
PASS performance.getEntriesByType("not-real").length === 0 is true
PASS performance.getEntriesByType("mark").length === 1 is true
PASS performance.getEntriesByType("mark")[0] instanceof PerformanceEntry is true
PASS performance.getEntriesByType("mark")[0].name is "test"
PASS performance.getEntriesByType("mark")[0].entryType is "mark"
PASS typeof performance.getEntriesByType("mark")[0].startTime === "number" is true
PASS typeof performance.getEntriesByType("mark")[0].duration === "number" is true
PASS performance.getEntriesByName() threw exception TypeError: Not enough arguments.
PASS performance.getEntriesByName("not-real").length === 0 is true
PASS performance.getEntriesByName("test").length === 1 is true
PASS performance.getEntriesByName("test")[0] instanceof PerformanceEntry is true
PASS performance.getEntriesByName("test")[0].name is "test"
PASS performance.getEntriesByName("test")[0].entryType is "mark"
PASS typeof performance.getEntriesByName("test")[0].startTime === "number" is true
PASS typeof performance.getEntriesByName("test")[0].duration === "number" is true
PASS performance.getEntriesByName("test", "not-real").length === 0 is true
PASS performance.getEntriesByName("test", "mark").length === 1 is true
Starting worker: resources/timeline-api.js
[Worker] PerformanceEntry
PASS [Worker] PerformanceEntry is defined.
PASS [Worker] "name" in PerformanceEntry.prototype is true
PASS [Worker] "entryType" in PerformanceEntry.prototype is true
PASS [Worker] "startTime" in PerformanceEntry.prototype is true
PASS [Worker] "duration" in PerformanceEntry.prototype is true
PASS [Worker] new PerformanceEntry() threw exception TypeError: Illegal constructor.
[Worker]
[Worker] Performance extensions
PASS [Worker] Performance.prototype.getEntries is defined.
PASS [Worker] Performance.prototype.getEntriesByType is defined.
PASS [Worker] Performance.prototype.getEntriesByName is defined.
PASS [Worker] performance.getEntries() instanceof Array is true
PASS [Worker] performance.getEntries().length === 0 is true
PASS [Worker] performance.mark("test"); did not throw exception.
PASS [Worker] performance.getEntries().length === 1 is true
PASS [Worker] performance.getEntries()[markIndex] instanceof PerformanceEntry is true
PASS [Worker] performance.getEntries()[markIndex].name is "test"
PASS [Worker] performance.getEntries()[markIndex].entryType is "mark"
PASS [Worker] typeof performance.getEntries()[markIndex].startTime === "number" is true
PASS [Worker] typeof performance.getEntries()[markIndex].duration === "number" is true
PASS [Worker] performance.getEntriesByType() threw exception TypeError: Not enough arguments.
PASS [Worker] performance.getEntriesByType("not-real").length === 0 is true
PASS [Worker] performance.getEntriesByType("mark").length === 1 is true
PASS [Worker] performance.getEntriesByType("mark")[0] instanceof PerformanceEntry is true
PASS [Worker] performance.getEntriesByType("mark")[0].name is "test"
PASS [Worker] performance.getEntriesByType("mark")[0].entryType is "mark"
PASS [Worker] typeof performance.getEntriesByType("mark")[0].startTime === "number" is true
PASS [Worker] typeof performance.getEntriesByType("mark")[0].duration === "number" is true
PASS [Worker] performance.getEntriesByName() threw exception TypeError: Not enough arguments.
PASS [Worker] performance.getEntriesByName("not-real").length === 0 is true
PASS [Worker] performance.getEntriesByName("test").length === 1 is true
PASS [Worker] performance.getEntriesByName("test")[0] instanceof PerformanceEntry is true
PASS [Worker] performance.getEntriesByName("test")[0].name is "test"
PASS [Worker] performance.getEntriesByName("test")[0].entryType is "mark"
PASS [Worker] typeof performance.getEntriesByName("test")[0].startTime === "number" is true
PASS [Worker] typeof performance.getEntriesByName("test")[0].duration === "number" is true
PASS [Worker] performance.getEntriesByName("test", "not-real").length === 0 is true
PASS [Worker] performance.getEntriesByName("test", "mark").length === 1 is true
PASS successfullyParsed is true
TEST COMPLETE