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

Unified Diff: chrome/browser/extensions/api/web_request/web_request_apitest.cc

Issue 10694055: Add read-only access to POST data for webRequest's onBeforeRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: No change in code, but with a patch generated without copy detection Created 8 years, 3 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
Index: chrome/browser/extensions/api/web_request/web_request_apitest.cc
diff --git a/chrome/browser/extensions/api/web_request/web_request_apitest.cc b/chrome/browser/extensions/api/web_request/web_request_apitest.cc
index 87e7f8353858b7dc0f087a78e4222c3f6ffa8c77..baaba2a937143cb797fbb334734e776971aeaef4 100644
--- a/chrome/browser/extensions/api/web_request/web_request_apitest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_apitest.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/login/login_prompt.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/extensions/features/feature.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
@@ -23,6 +24,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
using content::WebContents;
+using extensions::Feature;
namespace {
@@ -228,3 +230,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
// Test split without incognito permission.
RunPermissionTest("split", false, false, "redirected1", "");
}
+
+IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, PostData) {
+ // Request body access is only enabled on dev (and canary).
+ Feature::ScopedCurrentChannel sc(chrome::VersionInfo::CHANNEL_DEV);
+ ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_post.html")) <<
+ message_;
+}
« no previous file with comments | « chrome/browser/extensions/api/web_request/web_request_api_unittest.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698