aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit_tests/settings_test.coffee
AgeCommit message (Collapse)Author
2015-06-25Merge branch 'hud-iframe-input-with-store-all-settings'Stephen Blott
2015-06-20Add test that every option has a default value.Stephen Blott
This prevents issues like #1731 and is an (better) alternative to #1732.
2015-06-17Fix non-default front-end settings.Stephen Blott
(@mrmr1993: This is yet another approach to the Settings problem.) With the new Settings implemetation, settings which have a non-default value and which are not in synced storage (that is, they have not been changed since synced storage was introduced) are not currently accessible to content scripts. This commit makes such settings accessible via chrome.storage.local. Important: - There's a change to the established settings data model here. Previously, settings with default values were not stored; here, they are. This eliminates a considerable amount logic from Settings, but means that migrations will be required if default values are changed in future. (Other than type changes, have we ever changed a default value?) - There's also a change (bug fix?) to the behaviour when an affected setting is reset to its default value. Previously, the change would *not* have been synced (whereas all other changes are). Here, such changes *are* synced. The previous behaviour was inconsistent with the syncing behaviour of all other options changes. Note: - This isn't particularly well tested. It's being committed mainly just for consideration of the approach, initially.
2015-06-01Refactor and eliminate Sync object.Stephen Blott
2015-06-01Re-work unified settings.Stephen Blott
This is a minor re-working of #1705 from @mrmr1993. The main changes are: - Simplify initialisation logic. - Always initialise Settings immediately and automatically (ie. don't initialise Settings separately and manually in the background, content scripts, options and tests). - Get rid of addEventListener (it's only being used for on "load"). - Add Settings.use() in its place.
2015-05-29Make Settings explicitly use a cachemrmr1993
The Settings object used by the background page now uses 1 of 3 caches, depending on the context it is available in: * localStorage - in the background page * a copy of localStorage - in non-background extension pages (options.html, popup.html, etc.) * an empty object - in all other pages (where localStorage doesn't point to the extension's localStorage object). For any extension page which is *not* the background page, a copy of localStorage is used instead of true localStorage: * Once localStorage is updated by one background page, the others can only see the updated copy. - Pages with an updated cache can't tell which changes are new, and so don't know which postUpdateHooks to run. * By copying localStorage's contents into a new object, extension pages can still access settings synchronously. - This is especially important to options.html and popup.html; they will not work without it.
2015-05-29Move settings.coffee from background_scripts/ to lib/mrmr1993
2015-05-29Remove all direct calls to Sync, stop exporting itmrmr1993
This stops Sync from being referred to from anywhere except settings.coffee and settings_test.coffee.
2015-05-29Combine sync.coffee with settings.coffeemrmr1993
2015-05-10Search completion; refactor searchEngineCompleter.Stephen Blott
This revamps how search-engine configuration is handled, and revises some rather strange legacy code.
2015-05-08Search completion; fix DOM tests.Stephen Blott
2015-05-08Search completion; fix unit tests.Stephen Blott
2015-05-04Search completion; tweak scoring and synchronization.Stephen Blott
2015-05-02Rename SearchEngineCompleter to CustomSearchEngineCompleter.Stephen Blott
The name "SearchEngineCompleter" is more appropriate for completions actually delivered by a search engine. Also, what was SearchEngineCompleter is usually referred to as "custom search engines" elsewhere.
2015-03-29Move the search-engine logic out of settings.coffee.Stephen Blott
This logic should never have been in settings.coffee. This moves it to completion.coffee, where it belongs.
2014-12-29Descriptions for custom search engines.Stephen Blott
2014-10-29Fix testsmrmr1993
2014-05-29Adding in search engines feature to fix #1009mike-work
2014-04-27Response to @philc's comments regarding sync.Stephen Blott
2014-04-19Add a couple more test cases for Sync.Stephen Blott
2014-04-19Test that all stored settings are JSONified.Stephen Blott
2014-04-19Delay initializing sync until other components have started.Stephen Blott
2014-04-19Add remote sync test for setting cleared.Stephen Blott
2014-04-19Add test cases for "asynchronous" sync.Stephen Blott
2014-04-19Add tests for sync.Stephen Blott
2014-04-19Fix indentation and disable sync.log() messages.Stephen Blott
2014-04-19Settings tests pass, Sync still has an error.Stephen Blott
2013-11-06Update version number to 1.44Phil Crosby
2013-05-11Update version numberPhil Crosby
2012-10-29Integrate with Travis CI.Jez Ng
2012-10-29Convert strings to numbers when saving options page.Jez Ng
This avoids the need to continually re-parse the strings each time we load the option value.
2012-09-09Add more tests, and remove old settings code.Jez Ng