| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "chrome/browser/extensions/api/web_request/web_request_api.h" | 6 #include "chrome/browser/extensions/api/web_request/web_request_api.h" |
| 7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/extensions/extension_test_message_listener.h" | 9 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // Test split with incognito permission. | 235 // Test split with incognito permission. |
| 236 RunPermissionTest("split", true, true, "redirected1", "redirected2"); | 236 RunPermissionTest("split", true, true, "redirected1", "redirected2"); |
| 237 } | 237 } |
| 238 | 238 |
| 239 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, | 239 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, |
| 240 WebRequestDeclarativePermissionSplit2) { | 240 WebRequestDeclarativePermissionSplit2) { |
| 241 // Test split without incognito permission. | 241 // Test split without incognito permission. |
| 242 RunPermissionTest("split", false, false, "redirected1", ""); | 242 RunPermissionTest("split", false, false, "redirected1", ""); |
| 243 } | 243 } |
| 244 | 244 |
| 245 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, PostData) { | 245 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, PostData1) { |
| 246 // Request body access is only enabled on dev (and canary). | 246 // Request body access is only enabled on dev (and canary). |
| 247 Feature::ScopedCurrentChannel sc(chrome::VersionInfo::CHANNEL_DEV); | 247 Feature::ScopedCurrentChannel sc(chrome::VersionInfo::CHANNEL_DEV); |
| 248 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_post.html")) << | 248 // Test HTML form POST data access with the default and "url" encoding. |
| 249 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_post1.html")) << |
| 249 message_; | 250 message_; |
| 250 } | 251 } |
| 252 |
| 253 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, PostData2) { |
| 254 // Request body access is only enabled on dev (and canary). |
| 255 Feature::ScopedCurrentChannel sc(chrome::VersionInfo::CHANNEL_DEV); |
| 256 // Test HTML form POST data access with the multipart and plaintext encoding. |
| 257 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_post2.html")) << |
| 258 message_; |
| 259 } |
| OLD | NEW |