| Index: chrome/test/data/extensions/platform_apps/storage/test.js
|
| diff --git a/chrome/test/data/extensions/platform_apps/storage/test.js b/chrome/test/data/extensions/platform_apps/storage/test.js
|
| index 015517bbb7a1606b920c7cd23222d66a12790d2b..34efdca3e2aefc3514fd88d34fa299bb179e2641 100644
|
| --- a/chrome/test/data/extensions/platform_apps/storage/test.js
|
| +++ b/chrome/test/data/extensions/platform_apps/storage/test.js
|
| @@ -2,6 +2,10 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +function assertContains(string, substring, error) {
|
| + chrome.test.assertTrue(string.indexOf(substring) != -1, error);
|
| +}
|
| +
|
| chrome.test.runTests([
|
| function testOpenDatabase() {
|
| chrome.test.assertTrue(!window.openDatabase);
|
| @@ -14,7 +18,15 @@ chrome.test.runTests([
|
| },
|
|
|
| function testLocalStorage() {
|
| - chrome.test.assertTrue(!window.localStorage);
|
| - chrome.test.succeed();
|
| + try {
|
| + window.localStorage;
|
| + chrome.test.fail('error not thrown');
|
| + } catch (e) {
|
| + var message = e.message || e;
|
| + var expected = 'is not available in packaged apps. ' +
|
| + 'Use chrome.storage.local instead.';
|
| + assertContains(message, expected, 'Unexpected message ' + message);
|
| + chrome.test.succeed();
|
| + }
|
| }
|
| ]);
|
|
|