Chromium Code Reviews| 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..3da6bff28c638c0bff5355cb25a691c5f49ccab2 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 { |
| + chrome.test.assertTrue(!window.localStorage); |
|
Mihai Parparita -not on Chrome
2012/08/17 22:41:25
The chrome.test.assertTrue call seems unnecessary,
dharcourt
2012/08/17 22:55:42
Thanks, I removed the chrome.test.assertTrue.
|
| + 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(); |
| + } |
| } |
| ]); |