Bug 858399 - context menu should work in panels

Tests added for `contextMenu` options (see pull #1542).

I'd love to see this in `sdk/` somewhere, but short of that let's make a reusable module somewhere in `test/` for other test files.