2014-09-10 17:11:06 +00:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tests if the timeline blueprint has a correct structure.
|
|
|
|
*/
|
|
|
|
|
2015-05-25 12:42:51 +00:00
|
|
|
function* spawnTest() {
|
2015-05-22 20:25:52 +00:00
|
|
|
let { TIMELINE_BLUEPRINT } = devtools.require("devtools/performance/global");
|
2014-09-10 17:11:06 +00:00
|
|
|
|
|
|
|
ok(TIMELINE_BLUEPRINT,
|
|
|
|
"A timeline blueprint should be available.");
|
|
|
|
|
|
|
|
ok(Object.keys(TIMELINE_BLUEPRINT).length,
|
|
|
|
"The timeline blueprint has at least one entry.");
|
|
|
|
|
|
|
|
for (let [key, value] of Iterator(TIMELINE_BLUEPRINT)) {
|
2015-05-27 21:24:13 +00:00
|
|
|
if (key.startsWith("meta::")) {
|
|
|
|
ok(!("group" in value),
|
|
|
|
"No meta entry in the timeline blueprint can contain a `group` key.");
|
|
|
|
ok("colorName" in value,
|
|
|
|
"Each meta entry in the timeline blueprint contains a `colorName` key.");
|
|
|
|
ok("label" in value,
|
|
|
|
"Each meta entry in the timeline blueprint contains a `label` key.");
|
|
|
|
} else {
|
|
|
|
ok("group" in value,
|
|
|
|
"Each entry in the timeline blueprint contains a `group` key.");
|
|
|
|
ok("colorName" in value,
|
|
|
|
"Each entry in the timeline blueprint contains a `colorName` key.");
|
|
|
|
ok("label" in value,
|
|
|
|
"Each entry in the timeline blueprint contains a `label` key.");
|
|
|
|
}
|
2014-09-10 17:11:06 +00:00
|
|
|
}
|
2015-02-11 20:23:32 +00:00
|
|
|
}
|