1 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
2 /* Any copyright is dedicated to the Public Domain.
3 http://creativecommons.org/publicdomain/zero/1.0/ */
7 // Test that the computed view is initialized when the computed view is the default tab
11 <style type="text/css">
16 <span id="matches">Some styled text</span>
19 add_task(async function() {
20 await pushPref("devtools.inspector.activeSidebar", "computedview");
21 await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
22 const {inspector, view} = await openComputedView();
23 await selectNode("#matches", inspector);
24 is(isPropertyVisible("color", view), true, "span #matches color property is visible");
27 function isPropertyVisible(name, view) {
28 info("Checking property visibility for " + name);
29 const propertyViews = view.propertyViews;
30 for (const propView of propertyViews) {
31 if (propView.name == name) {
32 return propView.visible;