Bug 1337432 - browser_new_content_window_chromeflags.js should test the new CHROME_SUPPRESS_ANIMATION flag. r=jaws

Before bug 1336230 landed, we were successfully testing the CHROME_MAC_SUPPRESS_ANIMATION
flag. Then we renamed the flag to CHROME_SUPPRESS_ANIMATION, but didn't update the test.

The test continued to pass though, since we ended up doing bitwise AND on undefined,
which produced the 0 value that the test expected.

This patch makes sure that the flag is non-zero-ish before doing the bitwise
operation. It also updates the flag to be CHROME_SUPPRESS_ANIMATION.

MozReview-Commit-ID: 2ztJ7oqlQMe

--HG--
extra : rebase_source : aa591a18c0d525ff2490016186b5b0776a6489c8
This commit is contained in:
Mike Conley 2017-02-07 12:00:31 -05:00
Родитель 2844b8cf52
Коммит 979ea52dcf
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -89,7 +89,7 @@ const DISALLOWED = {
defaults_to: false,
},
"suppressanimation": {
flag: Ci.nsIWebBrowserChrome.CHROME_MAC_SUPPRESS_ANIMATION,
flag: Ci.nsIWebBrowserChrome.CHROME_SUPPRESS_ANIMATION,
defaults_to: false,
},
"extrachrome": {
@ -192,6 +192,7 @@ function assertContentFlags(chromeFlags) {
for (let feature in DISALLOWED) {
let flag = DISALLOWED[feature].flag;
Assert.ok(flag, "Expected flag to be a non-zeroish value");
if (DISALLOWED[feature].defaults_to) {
// The feature is supposed to default to true, so it should
// stay true.