forked from greasemonkey/greasemonkey
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The enabled bit is really just the first option. Good place to handle all the other "save these user specified values". Refs greasemonkey#2843
- Loading branch information
Showing
5 changed files
with
36 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
describe('bg/options', () => { | ||
describe('global enable bit', () => { | ||
// Leave GM globally enabled after these tests run. | ||
after(() => { | ||
setGlobalEnabled(true); | ||
}); | ||
|
||
it('passes data between setGlobalEnabled() and getGlobalEnabled()', () => { | ||
setGlobalEnabled(true); | ||
assert.equal(getGlobalEnabled(), true); | ||
setGlobalEnabled(false); | ||
assert.equal(getGlobalEnabled(), false); | ||
}); | ||
|
||
it('toggles enabled state', () => { | ||
setGlobalEnabled(true); | ||
assert.equal(getGlobalEnabled(), true); | ||
toggleGlobalEnabled(); | ||
assert.equal(getGlobalEnabled(), false); | ||
}); | ||
}); | ||
}); |