Open Bug 1157414 Opened 5 years ago Updated 1 year ago
Add X window manager name to mozinfo keys in Mochitest
39 bytes, text/x-review-board-request
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 _NET_SUPPORTING_WM_CHECK=0x2200005 $ xprop -notype -id 0x2200005 8t '=$0' _NET_WM_NAME ; echo _NET_WM_NAME="Compiz" 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.
/r/7455 - bug 1157414 - Add X window manager name to mozinfo keys in Mochitest. r=jmaher Pull down this commit: hg pull -r 1cb3610260a9ab42f290701814904b4d00e06d45 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8596127 - Flags: review?(jmaher)
Attachment #8596127 - Flags: review?(jmaher) → review+
Comment on attachment 8596127 [details] MozReview Request: bz://1157414/ted https://reviewboard.mozilla.org/r/7453/#review6227 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.
You need to log in before you can comment on or make changes to this bug.