Open Bug 1157414 Opened 9 years ago Updated 2 years ago

Add X window manager name to mozinfo keys in Mochitest


(Testing :: Mochitest, defect)



(Not tracked)


(Reporter: ted, Unassigned)


(Blocks 1 open bug)



(1 file, 1 obsolete file)

I'm writing a browser-chrome Mochitest that only works under Compiz, which is not fantastic but that's life. I'd like to add a manifest condition so that it only runs under Compiz. It turns out to be not that hard to get the name of the active window manager using the xprop tool:
$ xprop -notype -root 32x '=$0' _NET_SUPPORTING_WM_CHECK ; echo

$ xprop -notype -id 0x2200005 8t '=$0' _NET_WM_NAME ; echo

You first ask the root window for its _NET_SUPPORTING_WM_CHECK property, which is a window ID, then you ask that window for its _NET_WM_NAME property. The rest of the commandline arguments are just formatting to make it easier to parse.
Attached file MozReview Request: bz://1157414/ted (obsolete) —
/r/7455 - bug 1157414 - Add X window manager name to mozinfo keys in Mochitest. r=jmaher

Pull down this commit:

hg pull -r 1cb3610260a9ab42f290701814904b4d00e06d45
Attachment #8596127 - Flags: review?(jmaher)
Attachment #8596127 - Flags: review?(jmaher) → review+
Comment on attachment 8596127 [details]
MozReview Request: bz://1157414/ted

please ensure there is some form of documentation that explains this.  A unit test for this would be easy to write and it would serve as an example of how to use this :)
I'm not sure that a unit test would be easy to write--we'd have to know the window manger name in some other way in order to test against it, right?
we could verify on non linux machines that it is ''.  For linux we could validate that it is in a list of ones we have good test coverage on, or just skip it on linux.
I'd be happy to write a simple test that checks that this is set on Linux and unset on other platforms, I think that's the best we can do.
Attachment #8596127 - Attachment is obsolete: true
Attachment #8620118 - Flags: review+
Assignee: ted → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.