Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8240)

Unified Diff: chrome/test/data/extensions/api_test/native_bindings/extension/background.js

Issue 2704823002: [Extensions Bindings] Add support for custom property types (Closed)
Patch Set: asan fix Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/native_bindings/extension/manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/native_bindings/extension/background.js
diff --git a/chrome/test/data/extensions/api_test/native_bindings/extension/background.js b/chrome/test/data/extensions/api_test/native_bindings/extension/background.js
index 57c73ca31ffe681f0491fd6cbffcd8862e8d6c0d..0a401d518e647cf9d4d4c72cbdea3518642f3fd4 100644
--- a/chrome/test/data/extensions/api_test/native_bindings/extension/background.js
+++ b/chrome/test/data/extensions/api_test/native_bindings/extension/background.js
@@ -124,6 +124,34 @@ var tests = [
chrome.test.succeed();
});
},
+ function testStorage() {
+ // Check API existence; StorageArea functions.
+ chrome.test.assertTrue(!!chrome.storage);
+ chrome.test.assertTrue(!!chrome.storage.local, 'no local');
+ chrome.test.assertTrue(!!chrome.storage.local.set, 'no set');
+ chrome.test.assertTrue(!!chrome.storage.local.get, 'no get');
+ // Check some properties.
+ chrome.test.assertTrue(!!chrome.storage.local.QUOTA_BYTES,
+ 'local quota bytes');
+ chrome.test.assertFalse(!!chrome.storage.local.MAX_ITEMS,
+ 'local max items');
+ chrome.test.assertTrue(!!chrome.storage.sync, 'sync');
+ chrome.test.assertTrue(!!chrome.storage.sync.QUOTA_BYTES,
+ 'sync quota bytes');
+ chrome.test.assertTrue(!!chrome.storage.sync.MAX_ITEMS,
+ 'sync max items');
+ chrome.test.assertTrue(!!chrome.storage.managed, 'managed');
+ chrome.test.assertFalse(!!chrome.storage.managed.QUOTA_BYTES,
+ 'managed quota bytes');
+ chrome.storage.local.set({foo: 'bar'}, () => {
+ chrome.storage.local.get('foo', (results) => {
+ chrome.test.assertTrue(!!results, 'no results');
+ chrome.test.assertTrue(!!results.foo, 'no foo');
+ chrome.test.assertEq('bar', results.foo);
+ chrome.test.succeed();
+ });
+ });
+ },
];
chrome.test.getConfig(config => {
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/native_bindings/extension/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698