Bug 845366 - Need unit tests for operator-variant logic. r=kaze

See bug https://bugzilla.mozilla.org/show_bug.cgi?id=845366 please.