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

Side by Side Diff: chrome/test/data/extensions/api_test/content_settings/getresourceidentifiers/test.html

Issue 8071025: Move contentSettings extension API out of experimental (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <script> 1 <script>
2 // Content settings API test 2 // Content settings API test
3 // Run with browser_tests 3 // Run with browser_tests
4 // --gtest_filter=ExtensionApiTest.ContentSettingsGetResourceIdentifiers 4 // --gtest_filter=ExtensionApiTest.ContentSettingsGetResourceIdentifiers
5 5
6 Object.prototype.forEach = function(f) { 6 Object.prototype.forEach = function(f) {
7 for (key in this) { 7 for (key in this) {
8 if (this.hasOwnProperty(key)) 8 if (this.hasOwnProperty(key))
9 f(key, this[key]); 9 f(key, this[key]);
10 } 10 }
11 } 11 }
12 12
13 var cs = chrome.experimental.contentSettings; 13 var cs = chrome.contentSettings;
14 chrome.test.runTests([ 14 chrome.test.runTests([
15 function getResourceIdentifiers() { 15 function getResourceIdentifiers() {
16 var contentTypes = { 16 var contentTypes = {
17 "cookies": undefined, 17 "cookies": undefined,
18 "images": undefined, 18 "images": undefined,
19 "javascript": undefined, 19 "javascript": undefined,
20 "plugins": [ 20 "plugins": [
21 { 21 {
22 "description": "Foo", 22 "description": "Foo",
23 "id": "foo", 23 "id": "foo",
24 }, 24 },
25 { 25 {
26 "description": "Bar Plugin", 26 "description": "Bar Plugin",
27 "id": "bar.plugin", 27 "id": "bar.plugin",
28 }, 28 },
29 ], 29 ],
30 "popups": undefined, 30 "popups": undefined,
31 "notifications": undefined 31 "notifications": undefined
32 }; 32 };
33 contentTypes.forEach(function(type, identifiers) { 33 contentTypes.forEach(function(type, identifiers) {
34 cs[type].getResourceIdentifiers(chrome.test.callbackPass(function(value) { 34 cs[type].getResourceIdentifiers(chrome.test.callbackPass(function(value) {
35 chrome.test.assertEq(identifiers, value); 35 chrome.test.assertEq(identifiers, value);
36 })); 36 }));
37 }); 37 });
38 }, 38 },
39 ]); 39 ]);
40 </script> 40 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698