summaryrefslogtreecommitdiffstats
path: root/devtools/client/performance/test/unit/test_marker-blueprint.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/performance/test/unit/test_marker-blueprint.js')
-rw-r--r--devtools/client/performance/test/unit/test_marker-blueprint.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/devtools/client/performance/test/unit/test_marker-blueprint.js b/devtools/client/performance/test/unit/test_marker-blueprint.js
new file mode 100644
index 000000000..b3db47c0f
--- /dev/null
+++ b/devtools/client/performance/test/unit/test_marker-blueprint.js
@@ -0,0 +1,29 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+/**
+ * Tests if the timeline blueprint has a correct structure.
+ */
+
+function run_test() {
+ run_next_test();
+}
+
+add_task(function () {
+ let { TIMELINE_BLUEPRINT } = require("devtools/client/performance/modules/markers");
+
+ 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 value of Object.values(TIMELINE_BLUEPRINT)) {
+ 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.");
+ }
+});