mw.storage: Fix broken test (incompatible with Chrome 45)
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 22 Sep 2015 20:44:52 +0000 (21:44 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 22 Sep 2015 21:14:13 +0000 (22:14 +0100)
commit430a0d3984fe188531175a295a24906d472abe42
treef0a6f2c3c7ddc0ec972240d5c920ff4d1b9bc0cc
parent5ed149d76a6737f36828dac97941bc5e859f5d95
mw.storage: Fix broken test (incompatible with Chrome 45)

The localStorage global is read-only which Chrome 45 enforces.

Simplify things by dropping mediaWiki.storage.isStorageEnabled, and
by wrapping each operation with a try / catch.

Bug: T113413
Change-Id: Iecbdeb050b9a69febd3388898d98293a84588a94
resources/src/mediawiki/mediawiki.storage.js
tests/qunit/suites/resources/mediawiki/mediawiki.storage.test.js