summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_cookies_api.h20
-rw-r--r--chrome/browser/extensions/extension_cookies_api_constants.cc2
-rw-r--r--chrome/browser/extensions/extension_cookies_apitest.cc10
-rw-r--r--chrome/common/extensions/api/extension_api.json2
-rw-r--r--chrome/common/extensions/docs/a11y.html1
-rw-r--r--chrome/common/extensions/docs/api_index.html3
-rw-r--r--chrome/common/extensions/docs/api_other.html1
-rw-r--r--chrome/common/extensions/docs/autoupdate.html1
-rw-r--r--chrome/common/extensions/docs/background_pages.html1
-rw-r--r--chrome/common/extensions/docs/bookmarks.html1
-rw-r--r--chrome/common/extensions/docs/browserAction.html1
-rw-r--r--chrome/common/extensions/docs/content_scripts.html1
-rw-r--r--chrome/common/extensions/docs/devguide.html5
-rw-r--r--chrome/common/extensions/docs/docs.html1
-rw-r--r--chrome/common/extensions/docs/events.html1
-rw-r--r--chrome/common/extensions/docs/experimental.clipboard.html1
-rw-r--r--chrome/common/extensions/docs/experimental.contextMenus.html1
-rw-r--r--chrome/common/extensions/docs/experimental.html2
-rw-r--r--chrome/common/extensions/docs/experimental.infobars.html1
-rw-r--r--chrome/common/extensions/docs/experimental.omnibox.html1
-rw-r--r--chrome/common/extensions/docs/experimental.processes.html1
-rw-r--r--chrome/common/extensions/docs/extension.html1
-rw-r--r--chrome/common/extensions/docs/external_extensions.html1
-rw-r--r--chrome/common/extensions/docs/faq.html1
-rw-r--r--chrome/common/extensions/docs/getstarted.html1
-rw-r--r--chrome/common/extensions/docs/history.html1
-rw-r--r--chrome/common/extensions/docs/hosting.html1
-rw-r--r--chrome/common/extensions/docs/i18n-messages.html1
-rw-r--r--chrome/common/extensions/docs/i18n.html1
-rw-r--r--chrome/common/extensions/docs/idle.html1
-rw-r--r--chrome/common/extensions/docs/index.html1
-rw-r--r--chrome/common/extensions/docs/manifest.html21
-rw-r--r--chrome/common/extensions/docs/match_patterns.html1
-rw-r--r--chrome/common/extensions/docs/messaging.html1
-rw-r--r--chrome/common/extensions/docs/notifications.html1
-rw-r--r--chrome/common/extensions/docs/npapi.html1
-rw-r--r--chrome/common/extensions/docs/options.html1
-rw-r--r--chrome/common/extensions/docs/override.html1
-rw-r--r--chrome/common/extensions/docs/overview.html1
-rw-r--r--chrome/common/extensions/docs/packaging.html1
-rw-r--r--chrome/common/extensions/docs/pageAction.html1
-rw-r--r--chrome/common/extensions/docs/samples.html1
-rw-r--r--chrome/common/extensions/docs/static/cookies.html21
-rw-r--r--chrome/common/extensions/docs/static/devguide.html4
-rw-r--r--chrome/common/extensions/docs/static/experimental.cookies.html7
-rw-r--r--chrome/common/extensions/docs/static/manifest.html20
-rw-r--r--chrome/common/extensions/docs/tabs.html1
-rw-r--r--chrome/common/extensions/docs/template/api_template.html1
-rw-r--r--chrome/common/extensions/docs/themes.html1
-rw-r--r--chrome/common/extensions/docs/tut_analytics.html1
-rw-r--r--chrome/common/extensions/docs/tut_debugging.html1
-rw-r--r--chrome/common/extensions/docs/tut_oauth.html1
-rw-r--r--chrome/common/extensions/docs/tutorials.html1
-rw-r--r--chrome/common/extensions/docs/windows.html1
-rw-r--r--chrome/common/extensions/docs/xhr.html1
-rw-r--r--chrome/common/extensions/extension.cc2
-rw-r--r--chrome/common/extensions/extension.h1
-rw-r--r--chrome/renderer/resources/renderer_extension_bindings.js2
-rw-r--r--chrome/test/data/extensions/api_test/cookies/api/manifest.json2
-rw-r--r--chrome/test/data/extensions/api_test/cookies/api/tab.html108
-rw-r--r--chrome/test/data/extensions/api_test/cookies/events/manifest.json2
-rw-r--r--chrome/test/data/extensions/api_test/cookies/events/test.html10
-rw-r--r--chrome/test/data/extensions/api_test/cookies/no_permission/background.html17
-rw-r--r--chrome/test/data/extensions/api_test/cookies/no_permission/manifest.json13
64 files changed, 101 insertions, 216 deletions
diff --git a/chrome/browser/extensions/extension_cookies_api.h b/chrome/browser/extensions/extension_cookies_api.h
index e783f31..a250524 100644
--- a/chrome/browser/extensions/extension_cookies_api.h
+++ b/chrome/browser/extensions/extension_cookies_api.h
@@ -87,12 +87,12 @@ class CookiesFunction : public AsyncExtensionFunction {
std::string* store_id);
};
-// Implements the cookies.get() extension function.
+// Implements the experimental.cookies.get() extension function.
class GetCookieFunction : public CookiesFunction {
public:
GetCookieFunction();
virtual bool RunImpl();
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.get")
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.get")
private:
void GetCookieOnIOThread();
@@ -105,12 +105,12 @@ class GetCookieFunction : public CookiesFunction {
net::CookieMonster::CookieList cookie_list_;
};
-// Implements the cookies.getAll() extension function.
+// Implements the experimental.cookies.getAll() extension function.
class GetAllCookiesFunction : public CookiesFunction {
public:
GetAllCookiesFunction();
virtual bool RunImpl();
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAll")
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.getAll")
private:
void GetAllCookiesOnIOThread();
@@ -123,12 +123,12 @@ class GetAllCookiesFunction : public CookiesFunction {
net::CookieMonster::CookieList cookie_list_;
};
-// Implements the cookies.set() extension function.
+// Implements the experimental.cookies.set() extension function.
class SetCookieFunction : public CookiesFunction {
public:
SetCookieFunction();
virtual bool RunImpl();
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.set")
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.set")
private:
void SetCookieOnIOThread();
@@ -146,7 +146,7 @@ class SetCookieFunction : public CookiesFunction {
scoped_refptr<URLRequestContextGetter> store_context_;
};
-// Implements the cookies.remove() extension function.
+// Implements the experimental.cookies.remove() extension function.
class RemoveCookieFunction : public CookiesFunction {
public:
virtual bool RunImpl();
@@ -154,10 +154,10 @@ class RemoveCookieFunction : public CookiesFunction {
virtual void Run() {
SendResponse(RunImpl());
}
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.remove")
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.remove")
};
-// Implements the cookies.getAllCookieStores() extension function.
+// Implements the experimental.cookies.getAllCookieStores() extension function.
class GetAllCookieStoresFunction : public CookiesFunction {
public:
virtual bool RunImpl();
@@ -165,7 +165,7 @@ class GetAllCookieStoresFunction : public CookiesFunction {
virtual void Run() {
SendResponse(RunImpl());
}
- DECLARE_EXTENSION_FUNCTION_NAME("cookies.getAllCookieStores")
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.cookies.getAllCookieStores")
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_COOKIES_API_H_
diff --git a/chrome/browser/extensions/extension_cookies_api_constants.cc b/chrome/browser/extensions/extension_cookies_api_constants.cc
index 1524d36..e77482b 100644
--- a/chrome/browser/extensions/extension_cookies_api_constants.cc
+++ b/chrome/browser/extensions/extension_cookies_api_constants.cc
@@ -22,7 +22,7 @@ const wchar_t kTabIdsKey[] = L"tabIds";
const wchar_t kUrlKey[] = L"url";
const wchar_t kValueKey[] = L"value";
-const char kOnChanged[] = "cookies.onChanged";
+const char kOnChanged[] = "experimental.cookies.onChanged";
const char kCookieSetFailedError[] =
"Failed to parse or set cookie named \"*\".";
diff --git a/chrome/browser/extensions/extension_cookies_apitest.cc b/chrome/browser/extensions/extension_cookies_apitest.cc
index 1da9500..396f8c7 100644
--- a/chrome/browser/extensions/extension_cookies_apitest.cc
+++ b/chrome/browser/extensions/extension_cookies_apitest.cc
@@ -7,13 +7,15 @@
#include "chrome/common/chrome_switches.h"
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Cookies) {
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableExperimentalExtensionApis);
+
ASSERT_TRUE(RunExtensionTest("cookies/api")) << message_;
}
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CookiesEvents) {
- ASSERT_TRUE(RunExtensionTest("cookies/events")) << message_;
-}
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableExperimentalExtensionApis);
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, CookiesNoPermission) {
- ASSERT_TRUE(RunExtensionTest("cookies/no_permission")) << message_;
+ ASSERT_TRUE(RunExtensionTest("cookies/events")) << message_;
}
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index d2bf7f9..1805e9b 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -2756,7 +2756,7 @@
"events": []
},
{
- "namespace": "cookies",
+ "namespace": "experimental.cookies",
"types": [
{
"id": "Cookie",
diff --git a/chrome/common/extensions/docs/a11y.html b/chrome/common/extensions/docs/a11y.html
index 67a0694..17aa5a4 100644
--- a/chrome/common/extensions/docs/a11y.html
+++ b/chrome/common/extensions/docs/a11y.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/api_index.html b/chrome/common/extensions/docs/api_index.html
index a7cad32..f473e2e 100644
--- a/chrome/common/extensions/docs/api_index.html
+++ b/chrome/common/extensions/docs/api_index.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
@@ -295,7 +294,7 @@ Here are the supported chrome.* APIs:
</p>
<ul>
- <li><a href="bookmarks.html" js="">bookmarks</a></li><li><a href="browserAction.html" js="">browserAction</a></li><li><a href="cookies.html" js="">cookies</a></li><li><a href="extension.html" js="">extension</a></li><li><a href="history.html" js="">history</a></li><li><a href="i18n.html" js="">i18n</a></li><li><a href="idle.html" js="">idle</a></li><li><a href="pageAction.html" js="">pageAction</a></li><li><a href="tabs.html" js="">tabs</a></li><li><a href="windows.html" js="">windows</a></li>
+ <li><a href="bookmarks.html" js="">bookmarks</a></li><li><a href="browserAction.html" js="">browserAction</a></li><li><a href="extension.html" js="">extension</a></li><li><a href="history.html" js="">history</a></li><li><a href="i18n.html" js="">i18n</a></li><li><a href="idle.html" js="">idle</a></li><li><a href="pageAction.html" js="">pageAction</a></li><li><a href="tabs.html" js="">tabs</a></li><li><a href="windows.html" js="">windows</a></li>
</ul>
<h2 id="experimental">Experimental APIs</h2>
diff --git a/chrome/common/extensions/docs/api_other.html b/chrome/common/extensions/docs/api_other.html
index 7e036c4..4917280 100644
--- a/chrome/common/extensions/docs/api_other.html
+++ b/chrome/common/extensions/docs/api_other.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/autoupdate.html b/chrome/common/extensions/docs/autoupdate.html
index 0d1a1d5..5d8937b 100644
--- a/chrome/common/extensions/docs/autoupdate.html
+++ b/chrome/common/extensions/docs/autoupdate.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/background_pages.html b/chrome/common/extensions/docs/background_pages.html
index 76bb393..f8ebc15 100644
--- a/chrome/common/extensions/docs/background_pages.html
+++ b/chrome/common/extensions/docs/background_pages.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/bookmarks.html b/chrome/common/extensions/docs/bookmarks.html
index e3414acb..734a920 100644
--- a/chrome/common/extensions/docs/bookmarks.html
+++ b/chrome/common/extensions/docs/bookmarks.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li class="leftNavSelected">Bookmarks</li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/browserAction.html b/chrome/common/extensions/docs/browserAction.html
index 5c74487..1aa50ad 100644
--- a/chrome/common/extensions/docs/browserAction.html
+++ b/chrome/common/extensions/docs/browserAction.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/content_scripts.html b/chrome/common/extensions/docs/content_scripts.html
index 6e288bc..1f47bf0 100644
--- a/chrome/common/extensions/docs/content_scripts.html
+++ b/chrome/common/extensions/docs/content_scripts.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/devguide.html b/chrome/common/extensions/docs/devguide.html
index 191c072..3c20258 100644
--- a/chrome/common/extensions/docs/devguide.html
+++ b/chrome/common/extensions/docs/devguide.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
@@ -317,10 +316,6 @@ and <a href="overview.html">Overview</a>.
<td> Create, organize, and otherwise manipulate the user's bookmarks </td>
</tr>
<tr>
- <td> <a href="cookies.html">Cookies</a> </td>
- <td> Explore and modify the browser's cookie system </td>
- </tr>
- <tr>
<td> <a href="events.html">Events</a> </td>
<td> Detect when something interesting happens </td>
</tr>
diff --git a/chrome/common/extensions/docs/docs.html b/chrome/common/extensions/docs/docs.html
index d8696b9..3988b49 100644
--- a/chrome/common/extensions/docs/docs.html
+++ b/chrome/common/extensions/docs/docs.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/events.html b/chrome/common/extensions/docs/events.html
index 80a3f8d..3ab418c 100644
--- a/chrome/common/extensions/docs/events.html
+++ b/chrome/common/extensions/docs/events.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li class="leftNavSelected">Events</li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/experimental.clipboard.html b/chrome/common/extensions/docs/experimental.clipboard.html
index 167f4cb..6a5650a 100644
--- a/chrome/common/extensions/docs/experimental.clipboard.html
+++ b/chrome/common/extensions/docs/experimental.clipboard.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/experimental.contextMenus.html b/chrome/common/extensions/docs/experimental.contextMenus.html
index 10e9a72..5994d51 100644
--- a/chrome/common/extensions/docs/experimental.contextMenus.html
+++ b/chrome/common/extensions/docs/experimental.contextMenus.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/experimental.html b/chrome/common/extensions/docs/experimental.html
index 5850c16..e528484 100644
--- a/chrome/common/extensions/docs/experimental.html
+++ b/chrome/common/extensions/docs/experimental.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
@@ -276,6 +275,7 @@ on the following experimental APIs:
<li>
<a href="experimental.clipboard.html">experimental.clipboard</a></li><li>
<a href="experimental.contextMenus.html">experimental.contextMenus</a></li><li>
+ <a href="experimental.cookies.html">experimental.cookies</a></li><li>
<a href="experimental.infobars.html">experimental.infobars</a></li><li>
<a href="experimental.omnibox.html">experimental.omnibox</a></li><li>
<a href="experimental.processes.html">experimental.processes</a></li>
diff --git a/chrome/common/extensions/docs/experimental.infobars.html b/chrome/common/extensions/docs/experimental.infobars.html
index 78382f3..7535e41 100644
--- a/chrome/common/extensions/docs/experimental.infobars.html
+++ b/chrome/common/extensions/docs/experimental.infobars.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/experimental.omnibox.html b/chrome/common/extensions/docs/experimental.omnibox.html
index 1d61f4d..32ad149 100644
--- a/chrome/common/extensions/docs/experimental.omnibox.html
+++ b/chrome/common/extensions/docs/experimental.omnibox.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/experimental.processes.html b/chrome/common/extensions/docs/experimental.processes.html
index 38136e3..a71707e 100644
--- a/chrome/common/extensions/docs/experimental.processes.html
+++ b/chrome/common/extensions/docs/experimental.processes.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/extension.html b/chrome/common/extensions/docs/extension.html
index ea55b3a..27df88b 100644
--- a/chrome/common/extensions/docs/extension.html
+++ b/chrome/common/extensions/docs/extension.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/external_extensions.html b/chrome/common/extensions/docs/external_extensions.html
index 838299a..00354db 100644
--- a/chrome/common/extensions/docs/external_extensions.html
+++ b/chrome/common/extensions/docs/external_extensions.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/faq.html b/chrome/common/extensions/docs/faq.html
index 357bfe4..1a8a3e3 100644
--- a/chrome/common/extensions/docs/faq.html
+++ b/chrome/common/extensions/docs/faq.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/getstarted.html b/chrome/common/extensions/docs/getstarted.html
index 6ebf025..c7a0d4c 100644
--- a/chrome/common/extensions/docs/getstarted.html
+++ b/chrome/common/extensions/docs/getstarted.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/history.html b/chrome/common/extensions/docs/history.html
index d6ce36a..81688fe 100644
--- a/chrome/common/extensions/docs/history.html
+++ b/chrome/common/extensions/docs/history.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li class="leftNavSelected">History</li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/hosting.html b/chrome/common/extensions/docs/hosting.html
index 9830f67..d96f922 100644
--- a/chrome/common/extensions/docs/hosting.html
+++ b/chrome/common/extensions/docs/hosting.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/i18n-messages.html b/chrome/common/extensions/docs/i18n-messages.html
index e252eab..3d35a35 100644
--- a/chrome/common/extensions/docs/i18n-messages.html
+++ b/chrome/common/extensions/docs/i18n-messages.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/i18n.html b/chrome/common/extensions/docs/i18n.html
index c84a8e9..7468647 100644
--- a/chrome/common/extensions/docs/i18n.html
+++ b/chrome/common/extensions/docs/i18n.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/idle.html b/chrome/common/extensions/docs/idle.html
index e368c0e..04b57a7 100644
--- a/chrome/common/extensions/docs/idle.html
+++ b/chrome/common/extensions/docs/idle.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/index.html b/chrome/common/extensions/docs/index.html
index f329bdd..7cf5048 100644
--- a/chrome/common/extensions/docs/index.html
+++ b/chrome/common/extensions/docs/index.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html
index fc6182b..763a07e 100644
--- a/chrome/common/extensions/docs/manifest.html
+++ b/chrome/common/extensions/docs/manifest.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
@@ -521,15 +520,12 @@ The following table lists the permissions an extension can use.
</tr>
<tr>
<td> <em>match pattern</em> </td>
- <td> Specifies a <em>host permission</em>.
- Required if the extension wants to interact
- with the code running on pages.
- Many extension capabilities, such as
- <a href="xhr.html">cross-origin XMLHttpRequests</a>,
- <a href="content_scripts.html#pi">programmatically injected
- content scripts</a>, and <a href="cookies.html">the Cookies API</a>
- require host permissions. For details on the syntax, see
- <a href="match_patterns.html">Match Patterns</a>.
+ <td> Required if the extension makes
+ <a href="xhr.html">cross-origin XMLHttpRequests</a>
+ or
+ <a href="content_scripts.html#pi">programmatically injects
+ JavaScript or CSS</a>
+ into web pages.
</td>
</tr>
<tr>
@@ -538,11 +534,6 @@ The following table lists the permissions an extension can use.
<a href="bookmarks.html">chrome.bookmarks</a> module. </td>
</tr>
<tr>
- <td> "cookies" </td>
- <td> Required if the extension uses the
- <a href="cookies.html">chrome.cookies</a> module. </td>
-</tr>
-<tr>
<td> "chrome://favicon/" </td>
<td> Required if the extension uses the
"chrome://favicon/<em>url</em>" mechanism
diff --git a/chrome/common/extensions/docs/match_patterns.html b/chrome/common/extensions/docs/match_patterns.html
index a1f8f0c..6891bbf 100644
--- a/chrome/common/extensions/docs/match_patterns.html
+++ b/chrome/common/extensions/docs/match_patterns.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/messaging.html b/chrome/common/extensions/docs/messaging.html
index aecf4b7..b5fed3e 100644
--- a/chrome/common/extensions/docs/messaging.html
+++ b/chrome/common/extensions/docs/messaging.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/notifications.html b/chrome/common/extensions/docs/notifications.html
index 1cc70c0..644a13d 100644
--- a/chrome/common/extensions/docs/notifications.html
+++ b/chrome/common/extensions/docs/notifications.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/npapi.html b/chrome/common/extensions/docs/npapi.html
index f72740c..9956ae8 100644
--- a/chrome/common/extensions/docs/npapi.html
+++ b/chrome/common/extensions/docs/npapi.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/options.html b/chrome/common/extensions/docs/options.html
index 47846e9..cc5b61f 100644
--- a/chrome/common/extensions/docs/options.html
+++ b/chrome/common/extensions/docs/options.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/override.html b/chrome/common/extensions/docs/override.html
index 9856cf6..695db97 100644
--- a/chrome/common/extensions/docs/override.html
+++ b/chrome/common/extensions/docs/override.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/overview.html b/chrome/common/extensions/docs/overview.html
index 63ebf4c..e1eb4cb 100644
--- a/chrome/common/extensions/docs/overview.html
+++ b/chrome/common/extensions/docs/overview.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/packaging.html b/chrome/common/extensions/docs/packaging.html
index c7f8783..aa3bcb9 100644
--- a/chrome/common/extensions/docs/packaging.html
+++ b/chrome/common/extensions/docs/packaging.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/pageAction.html b/chrome/common/extensions/docs/pageAction.html
index 2c1917fb..1649465 100644
--- a/chrome/common/extensions/docs/pageAction.html
+++ b/chrome/common/extensions/docs/pageAction.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/samples.html b/chrome/common/extensions/docs/samples.html
index 698d4a0..41bf32e 100644
--- a/chrome/common/extensions/docs/samples.html
+++ b/chrome/common/extensions/docs/samples.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/static/cookies.html b/chrome/common/extensions/docs/static/cookies.html
deleted file mode 100644
index b74bdfe..0000000
--- a/chrome/common/extensions/docs/static/cookies.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!-- BEGIN AUTHORED CONTENT -->
-<h2 id="manifest">Manifest</h2>
-
-<p>To use the cookies API,
-you must declare the "cookies" permission in your manifest,
-along with <a href="manifest.html#permissions">host permissions</a>
-for any hosts whose cookies
-you want to access.
-For example:</p>
-
-<pre>{
- "name": "My extension",
- ...
- <b>"permissions": [
- "cookies",
- "*://*.google.com"
- ]</b>,
- ...
-}</pre>
-
-<!-- END AUTHORED CONTENT -->
diff --git a/chrome/common/extensions/docs/static/devguide.html b/chrome/common/extensions/docs/static/devguide.html
index d9189e4..63ac400 100644
--- a/chrome/common/extensions/docs/static/devguide.html
+++ b/chrome/common/extensions/docs/static/devguide.html
@@ -50,10 +50,6 @@ and <a href="overview.html">Overview</a>.
<td> Create, organize, and otherwise manipulate the user's bookmarks </td>
</tr>
<tr>
- <td> <a href="cookies.html">Cookies</a> </td>
- <td> Explore and modify the browser's cookie system </td>
- </tr>
- <tr>
<td> <a href="events.html">Events</a> </td>
<td> Detect when something interesting happens </td>
</tr>
diff --git a/chrome/common/extensions/docs/static/experimental.cookies.html b/chrome/common/extensions/docs/static/experimental.cookies.html
new file mode 100644
index 0000000..bc07cad
--- /dev/null
+++ b/chrome/common/extensions/docs/static/experimental.cookies.html
@@ -0,0 +1,7 @@
+<!-- BEGIN AUTHORED CONTENT -->
+<p id="classSummary">
+For information on how to use experimental APIs,
+see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
+</p>
+
+<!-- END AUTHORED CONTENT -->
diff --git a/chrome/common/extensions/docs/static/manifest.html b/chrome/common/extensions/docs/static/manifest.html
index 90a2f43..0f87450 100644
--- a/chrome/common/extensions/docs/static/manifest.html
+++ b/chrome/common/extensions/docs/static/manifest.html
@@ -236,15 +236,12 @@ The following table lists the permissions an extension can use.
</tr>
<tr>
<td> <em>match pattern</em> </td>
- <td> Specifies a <em>host permission</em>.
- Required if the extension wants to interact
- with the code running on pages.
- Many extension capabilities, such as
- <a href="xhr.html">cross-origin XMLHttpRequests</a>,
- <a href="content_scripts.html#pi">programmatically injected
- content scripts</a>, and <a href="cookies.html">the Cookies API</a>
- require host permissions. For details on the syntax, see
- <a href="match_patterns.html">Match Patterns</a>.
+ <td> Required if the extension makes
+ <a href="xhr.html">cross-origin XMLHttpRequests</a>
+ or
+ <a href="content_scripts.html#pi">programmatically injects
+ JavaScript or CSS</a>
+ into web pages.
</td>
</tr>
<tr>
@@ -253,11 +250,6 @@ The following table lists the permissions an extension can use.
<a href="bookmarks.html">chrome.bookmarks</a> module. </td>
</tr>
<tr>
- <td> "cookies" </td>
- <td> Required if the extension uses the
- <a href="cookies.html">chrome.cookies</a> module. </td>
-</tr>
-<tr>
<td> "chrome://favicon/" </td>
<td> Required if the extension uses the
"chrome://favicon/<em>url</em>" mechanism
diff --git a/chrome/common/extensions/docs/tabs.html b/chrome/common/extensions/docs/tabs.html
index faca514..9fa90d8 100644
--- a/chrome/common/extensions/docs/tabs.html
+++ b/chrome/common/extensions/docs/tabs.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li class="leftNavSelected">Tabs</li>
diff --git a/chrome/common/extensions/docs/template/api_template.html b/chrome/common/extensions/docs/template/api_template.html
index 643c20b..9b09aaa 100644
--- a/chrome/common/extensions/docs/template/api_template.html
+++ b/chrome/common/extensions/docs/template/api_template.html
@@ -143,7 +143,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/themes.html b/chrome/common/extensions/docs/themes.html
index 988ad74..bb55246 100644
--- a/chrome/common/extensions/docs/themes.html
+++ b/chrome/common/extensions/docs/themes.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/tut_analytics.html b/chrome/common/extensions/docs/tut_analytics.html
index 132efe5..2723b17 100644
--- a/chrome/common/extensions/docs/tut_analytics.html
+++ b/chrome/common/extensions/docs/tut_analytics.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/tut_debugging.html b/chrome/common/extensions/docs/tut_debugging.html
index e14df2e..c1bb620 100644
--- a/chrome/common/extensions/docs/tut_debugging.html
+++ b/chrome/common/extensions/docs/tut_debugging.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/tut_oauth.html b/chrome/common/extensions/docs/tut_oauth.html
index 63b6fcc..e608677 100644
--- a/chrome/common/extensions/docs/tut_oauth.html
+++ b/chrome/common/extensions/docs/tut_oauth.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/tutorials.html b/chrome/common/extensions/docs/tutorials.html
index 4a93974..e05091a 100644
--- a/chrome/common/extensions/docs/tutorials.html
+++ b/chrome/common/extensions/docs/tutorials.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/windows.html b/chrome/common/extensions/docs/windows.html
index 3cebe1e..7fed1aa 100644
--- a/chrome/common/extensions/docs/windows.html
+++ b/chrome/common/extensions/docs/windows.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/docs/xhr.html b/chrome/common/extensions/docs/xhr.html
index 3ce681e..32a58ba 100644
--- a/chrome/common/extensions/docs/xhr.html
+++ b/chrome/common/extensions/docs/xhr.html
@@ -156,7 +156,6 @@
<li>Browser Interaction
<ul>
<li><a href="bookmarks.html">Bookmarks</a></li>
- <li><a href="cookies.html">Cookies</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="history.html">History</a></li>
<li><a href="tabs.html">Tabs</a></li>
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 2e5932a..a99d582 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -114,7 +114,6 @@ const int Extension::kBrowserActionIconMaxSize = 19;
const char* Extension::kBackgroundPermission = "background";
const char* Extension::kBookmarkPermission = "bookmarks";
-const char* Extension::kCookiePermission = "cookies";
const char* Extension::kExperimentalPermission = "experimental";
const char* Extension::kGeolocationPermission = "geolocation";
const char* Extension::kHistoryPermission = "history";
@@ -126,7 +125,6 @@ const char* Extension::kUnlimitedStoragePermission = "unlimited_storage";
const char* Extension::kPermissionNames[] = {
Extension::kBackgroundPermission,
Extension::kBookmarkPermission,
- Extension::kCookiePermission,
Extension::kExperimentalPermission,
Extension::kGeolocationPermission,
Extension::kIdlePermission,
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index b109909..9685c9f 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -96,7 +96,6 @@ class Extension {
// - ExtensionInstallUI::GetV2Warnings()
static const char* kBackgroundPermission;
static const char* kBookmarkPermission;
- static const char* kCookiePermission;
static const char* kExperimentalPermission;
static const char* kGeolocationPermission;
static const char* kHistoryPermission;
diff --git a/chrome/renderer/resources/renderer_extension_bindings.js b/chrome/renderer/resources/renderer_extension_bindings.js
index c03c841..b4246c7 100644
--- a/chrome/renderer/resources/renderer_extension_bindings.js
+++ b/chrome/renderer/resources/renderer_extension_bindings.js
@@ -243,12 +243,12 @@ var chrome = chrome || {};
// Entire namespaces.
"bookmarks",
"browserAction",
- "cookies",
"devtools",
"experimental.accessibility",
"experimental.bookmarkManager",
"experimental.clipboard",
"experimental.contextMenus",
+ "experimental.cookies",
"experimental.extension",
"experimental.infobars",
"experimental.metrics",
diff --git a/chrome/test/data/extensions/api_test/cookies/api/manifest.json b/chrome/test/data/extensions/api_test/cookies/api/manifest.json
index fa14136..81ad918 100644
--- a/chrome/test/data/extensions/api_test/cookies/api/manifest.json
+++ b/chrome/test/data/extensions/api_test/cookies/api/manifest.json
@@ -4,8 +4,8 @@
"description": "end-to-end browser test for chrome.experimental.cookies API",
"background_page": "background.html",
"permissions": [
- "cookies",
"tabs",
+ "experimental",
"http://*.chrome_extensions.cookies.com/",
"http://chromium.cookies.com/",
"https://*.cookies.com/",
diff --git a/chrome/test/data/extensions/api_test/cookies/api/tab.html b/chrome/test/data/extensions/api_test/cookies/api/tab.html
index f49376e..0d3eddee 100644
--- a/chrome/test/data/extensions/api_test/cookies/api/tab.html
+++ b/chrome/test/data/extensions/api_test/cookies/api/tab.html
@@ -63,14 +63,14 @@ function expectNullCookie(cookie) {
}
function removeTestCookies() {
- chrome.cookies.remove(
+ chrome.experimental.cookies.remove(
{url: TEST_URL, name: TEST_BASIC_COOKIE.name});
- chrome.cookies.remove(
+ chrome.experimental.cookies.remove(
{url: TEST_URL, name: TEST_DOMAIN_COOKIE.name});
- chrome.cookies.remove(
+ chrome.experimental.cookies.remove(
{url: TEST_URL4, name: TEST_SECURE_COOKIE.name});
- chrome.cookies.remove({url: TEST_URL, name: 'abcd'});
- chrome.cookies.remove({url: TEST_ODD_URL, name: 'abcd'});
+ chrome.experimental.cookies.remove({url: TEST_URL, name: 'abcd'});
+ chrome.experimental.cookies.remove({url: TEST_ODD_URL, name: 'abcd'});
}
var pass = chrome.test.callbackPass;
@@ -83,34 +83,34 @@ chrome.test.runTests([
chrome.test.assertEq('3', readCookie('c'));
chrome.test.assertEq(null, readCookie('nonexistent'));
// Invalid schemes don't work with the cookie API.
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: document.location.href, name: 'a'},
fail('No host permissions for cookies at url: "' +
document.location.href + '".'));
},
function getBasicCookie() {
removeTestCookies();
- chrome.cookies.set(TEST_BASIC_COOKIE);
+ chrome.experimental.cookies.set(TEST_BASIC_COOKIE);
// Domain doesn't match.
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: TEST_URL2, name: TEST_BASIC_COOKIE.name},
pass(expectNullCookie));
// URL invalid.
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: 'invalid url', name: TEST_BASIC_COOKIE.name},
fail('Invalid url: "invalid url".'));
// URL lacking permissions.
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: TEST_UNPERMITTED_URL, name: TEST_BASIC_COOKIE.name},
fail('No host permissions for cookies at url: "' +
TEST_UNPERMITTED_URL + '".'));
// Store ID invalid.
- chrome.cookies.get({
+ chrome.experimental.cookies.get({
url: TEST_BASIC_COOKIE.url,
name: TEST_BASIC_COOKIE.name,
storeId: 'invalid'
}, fail('Invalid cookie store id: "invalid".'));
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: TEST_BASIC_COOKIE.url, name: TEST_BASIC_COOKIE.name},
pass(function(cookie) {
expectValidCookie(cookie);
@@ -130,8 +130,8 @@ chrome.test.runTests([
},
function getDomainCookie() {
removeTestCookies();
- chrome.cookies.set(TEST_DOMAIN_COOKIE);
- chrome.cookies.get(
+ chrome.experimental.cookies.set(TEST_DOMAIN_COOKIE);
+ chrome.experimental.cookies.get(
{url: TEST_URL2, name: TEST_DOMAIN_COOKIE.name},
pass(function(cookie) {
expectValidCookie(cookie);
@@ -148,16 +148,16 @@ chrome.test.runTests([
},
function getSecureCookie() {
removeTestCookies();
- chrome.cookies.set(TEST_SECURE_COOKIE);
+ chrome.experimental.cookies.set(TEST_SECURE_COOKIE);
// Original URL doesn't work because scheme isn't secure.
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: TEST_SECURE_COOKIE.url, name: TEST_SECURE_COOKIE.name},
pass(expectNullCookie));
// Path doesn't match.
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: TEST_URL3, name: TEST_SECURE_COOKIE.name},
pass(expectNullCookie));
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: TEST_URL4, name: TEST_SECURE_COOKIE.name},
pass(function(cookie) {
expectValidCookie(cookie);
@@ -174,33 +174,33 @@ chrome.test.runTests([
function setOddCookies() {
removeTestCookies();
// URL lacking permissions.
- chrome.cookies.set(
+ chrome.experimental.cookies.set(
{url: TEST_UNPERMITTED_URL, name: 'abcd', domain: TEST_DOMAIN});
- chrome.cookies.get({url: TEST_URL, name: 'abcd'},
+ chrome.experimental.cookies.get({url: TEST_URL, name: 'abcd'},
pass(expectNullCookie));
// Attribute values containing invalid characters are disallowed.
- chrome.cookies.set({url: TEST_URL, name: 'abcd=efg'});
- chrome.cookies.get({url: TEST_URL, name: 'abcd'},
+ chrome.experimental.cookies.set({url: TEST_URL, name: 'abcd=efg'});
+ chrome.experimental.cookies.get({url: TEST_URL, name: 'abcd'},
pass(expectNullCookie));
- chrome.cookies.set(
+ chrome.experimental.cookies.set(
{url: TEST_URL, name: 'abcd', value: 'HI;LO'});
- chrome.cookies.get({url: TEST_URL, name: 'abcd'},
+ chrome.experimental.cookies.get({url: TEST_URL, name: 'abcd'},
pass(expectNullCookie));
- chrome.cookies.set(
+ chrome.experimental.cookies.set(
{url: TEST_URL, name: 'abcd', domain: 'cookies.com\r'});
- chrome.cookies.get({url: TEST_URL, name: 'abcd'},
+ chrome.experimental.cookies.get({url: TEST_URL, name: 'abcd'},
pass(expectNullCookie));
- chrome.cookies.set(
+ chrome.experimental.cookies.set(
{url: TEST_URL, name: 'abcd', domain: 'somedomain.com'});
- chrome.cookies.get({url: TEST_URL, name: 'abcd'},
+ chrome.experimental.cookies.get({url: TEST_URL, name: 'abcd'},
pass(expectNullCookie));
- chrome.cookies.set({
+ chrome.experimental.cookies.set({
url: TEST_ODD_URL,
name: 'abcd',
domain: TEST_ODD_DOMAIN,
path: TEST_ODD_PATH
});
- chrome.cookies.get({url: TEST_ODD_URL, name: 'abcd'},
+ chrome.experimental.cookies.get({url: TEST_ODD_URL, name: 'abcd'},
pass(function(cookie) {
expectValidCookie(cookie);
chrome.test.assertEq(TEST_ODD_DOMAIN, unescape(cookie.domain));
@@ -209,65 +209,65 @@ chrome.test.runTests([
},
function removeCookie() {
removeTestCookies();
- chrome.cookies.set(TEST_BASIC_COOKIE);
- chrome.cookies.get(
+ chrome.experimental.cookies.set(TEST_BASIC_COOKIE);
+ chrome.experimental.cookies.get(
{url: TEST_URL, name: TEST_BASIC_COOKIE.name},
pass(expectValidCookie));
// Removal with any domain-matching URL will do.
- chrome.cookies.remove(
+ chrome.experimental.cookies.remove(
{url: TEST_URL4, name: TEST_BASIC_COOKIE.name});
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: TEST_URL, name: TEST_BASIC_COOKIE.name},
pass(expectNullCookie));
// Set with an expired date should also remove the cookie.
- chrome.cookies.set(TEST_BASIC_COOKIE);
- chrome.cookies.get(
+ chrome.experimental.cookies.set(TEST_BASIC_COOKIE);
+ chrome.experimental.cookies.get(
{url: TEST_URL, name: TEST_BASIC_COOKIE.name},
pass(expectValidCookie));
- chrome.cookies.set(TEST_BASIC_EXPIRED_COOKIE);
- chrome.cookies.get(
+ chrome.experimental.cookies.set(TEST_BASIC_EXPIRED_COOKIE);
+ chrome.experimental.cookies.get(
{url: TEST_URL, name: TEST_BASIC_COOKIE.name},
pass(expectNullCookie));
// Removal with a disallowed URL shouldn't do anything.
- chrome.cookies.set(TEST_DOMAIN_COOKIE);
- chrome.cookies.get(
+ chrome.experimental.cookies.set(TEST_DOMAIN_COOKIE);
+ chrome.experimental.cookies.get(
{url: TEST_URL2, name: TEST_DOMAIN_COOKIE.name},
pass(expectValidCookie));
- chrome.cookies.remove(
+ chrome.experimental.cookies.remove(
{url: TEST_UNPERMITTED_URL, name: TEST_DOMAIN_COOKIE.name});
- chrome.cookies.get(
+ chrome.experimental.cookies.get(
{url: TEST_URL2, name: TEST_DOMAIN_COOKIE.name},
pass(expectValidCookie));
},
function getAllCookies() {
removeTestCookies();
- chrome.cookies.getAll({}, pass(function(cookies) {
+ chrome.experimental.cookies.getAll({}, pass(function(cookies) {
chrome.test.assertEq(0, cookies.length);
}));
- chrome.cookies.set(TEST_BASIC_COOKIE);
- chrome.cookies.set(TEST_SECURE_COOKIE);
- chrome.cookies.getAll(
+ chrome.experimental.cookies.set(TEST_BASIC_COOKIE);
+ chrome.experimental.cookies.set(TEST_SECURE_COOKIE);
+ chrome.experimental.cookies.getAll(
{domain: TEST_DOMAIN}, pass(function(cookies) {
chrome.test.assertEq(2, cookies.length);
chrome.test.assertEq(TEST_BASIC_COOKIE.name, cookies[0].name);
chrome.test.assertEq(TEST_SECURE_COOKIE.name, cookies[1].name);
}));
- chrome.cookies.getAll({
+ chrome.experimental.cookies.getAll({
name: TEST_BASIC_COOKIE.name
}, pass(function(cookies) {
chrome.test.assertEq(1, cookies.length);
chrome.test.assertEq(TEST_BASIC_COOKIE.name, cookies[0].name);
}));
- chrome.cookies.getAll({
+ chrome.experimental.cookies.getAll({
secure: true
}, pass(function(cookies) {
chrome.test.assertEq(1, cookies.length);
chrome.test.assertEq(TEST_SECURE_COOKIE.name, cookies[0].name);
}));
- chrome.cookies.getAll({
+ chrome.experimental.cookies.getAll({
url: 'invalid url'
}, fail('Invalid url: "invalid url".'));
- chrome.cookies.getAll({
+ chrome.experimental.cookies.getAll({
url: TEST_URL,
}, pass(function(cookies) {
chrome.test.assertEq(1, cookies.length);
@@ -276,16 +276,16 @@ chrome.test.runTests([
},
function getAllCookieStores() {
removeTestCookies();
- chrome.cookies.getAllCookieStores(
+ chrome.experimental.cookies.getAllCookieStores(
pass(function(cookieStores) {
chrome.test.assertEq(1, cookieStores.length);
- chrome.cookies.set(TEST_BASIC_COOKIE);
- chrome.cookies.get(
+ chrome.experimental.cookies.set(TEST_BASIC_COOKIE);
+ chrome.experimental.cookies.get(
{url: TEST_URL, name: TEST_BASIC_COOKIE.name},
pass(function(cookie) {
chrome.test.assertEq(cookieStores[0].id, cookie.storeId);
}));
- chrome.cookies.getAll(
+ chrome.experimental.cookies.getAll(
{storeId: cookieStores[0].id},
pass(function(cookies) {
chrome.test.assertEq(1, cookies.length);
diff --git a/chrome/test/data/extensions/api_test/cookies/events/manifest.json b/chrome/test/data/extensions/api_test/cookies/events/manifest.json
index 1778ecc..e1a901f 100644
--- a/chrome/test/data/extensions/api_test/cookies/events/manifest.json
+++ b/chrome/test/data/extensions/api_test/cookies/events/manifest.json
@@ -2,6 +2,6 @@
"name": "events",
"version": "1.0",
"description": "Tests cookie events.",
- "permissions": ["cookies", "http://a.com/"],
+ "permissions": ["http://a.com/", "experimental"],
"background_page": "test.html"
}
diff --git a/chrome/test/data/extensions/api_test/cookies/events/test.html b/chrome/test/data/extensions/api_test/cookies/events/test.html
index f5b9eb6..d42f385 100644
--- a/chrome/test/data/extensions/api_test/cookies/events/test.html
+++ b/chrome/test/data/extensions/api_test/cookies/events/test.html
@@ -1,5 +1,5 @@
<script>
-chrome.cookies.onChanged.addListener(function (info) {
+chrome.experimental.cookies.onChanged.addListener(function (info) {
if (!info.removed &&
info.cookie.name == 'test' &&
info.cookie.value == '42' &&
@@ -16,8 +16,8 @@ chrome.cookies.onChanged.addListener(function (info) {
chrome.test.notifyFail("Got an invalid cookie: " + JSON.stringify(info));
}
});
-chrome.cookies.set({url: 'http://a.com/path',
- name: 'test',
- value: '42',
- expirationDate: 12345678900});
+chrome.experimental.cookies.set({url: 'http://a.com/path',
+ name: 'test',
+ value: '42',
+ expirationDate: 12345678900});
</script>
diff --git a/chrome/test/data/extensions/api_test/cookies/no_permission/background.html b/chrome/test/data/extensions/api_test/cookies/no_permission/background.html
deleted file mode 100644
index a0abbdf..0000000
--- a/chrome/test/data/extensions/api_test/cookies/no_permission/background.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<script>
-chrome.test.runTests([
- function readCookies() {
- try {
- chrome.cookies.get({url: document.location.href, name: 'a'}, function() {
- });
- } catch (e) {
- chrome.test.assertTrue(e.message.indexOf(
- "You do not have permission to use 'chrome.cookies'.") == 0);
- chrome.test.succeed();
- return;
- }
-
- chrome.test.fail();
- }
-]);
-</script>
diff --git a/chrome/test/data/extensions/api_test/cookies/no_permission/manifest.json b/chrome/test/data/extensions/api_test/cookies/no_permission/manifest.json
deleted file mode 100644
index 74b4572..0000000
--- a/chrome/test/data/extensions/api_test/cookies/no_permission/manifest.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "name": "chrome.cookies.nopermission",
- "version": "0.1",
- "description": "Tests that the cookies permission is required in order to use the cookies API.",
- "background_page": "background.html",
- "permissions": [
- "tabs",
- "http://*.chrome_extensions.cookies.com/",
- "http://chromium.cookies.com/",
- "https://*.cookies.com/",
- "http://.strange%20stuff%21%21.com/"
- ]
-}