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

Unified Diff: chrome/browser/extensions/extension_special_storage_policy_unittest.cc

Issue 12225076: Delete most web intents code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
Index: chrome/browser/extensions/extension_special_storage_policy_unittest.cc
diff --git a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
index 522058733a7ebf07731d98a8733f3b36613ad865..62cd4f143342f52854937ed9ebc859b5059e0e91 100644
--- a/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy_unittest.cc
@@ -12,7 +12,6 @@
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/common/extensions/manifest_handler.h"
-#include "chrome/common/extensions/web_intents_handler.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -27,11 +26,6 @@ class ExtensionSpecialStoragePolicyTest : public testing::Test {
public:
virtual void SetUp() {
policy_ = new ExtensionSpecialStoragePolicy(NULL);
-#if defined(ENABLE_WEB_INTENTS)
- extensions::ManifestHandler::Register(
- keys::kIntents,
- make_linked_ptr(new extensions::WebIntentsHandler));
-#endif
}
protected:
@@ -134,42 +128,6 @@ class ExtensionSpecialStoragePolicyTest : public testing::Test {
return handler_app;
}
-#if defined(ENABLE_WEB_INTENTS)
- scoped_refptr<Extension> CreateWebIntentViewApp() {
-#if defined(OS_WIN)
- base::FilePath path(FILE_PATH_LITERAL("c:\\bar"));
-#elif defined(OS_POSIX)
- base::FilePath path(FILE_PATH_LITERAL("/bar"));
-#endif
- DictionaryValue manifest;
- manifest.SetString(keys::kName, "WebIntent");
- manifest.SetString(keys::kVersion, "1");
- manifest.SetString(keys::kLaunchWebURL, "http://explicit/unlimited/start");
-
- ListValue* view_intent_types = new ListValue;
- view_intent_types->Append(Value::CreateStringValue("text/plain"));
-
- DictionaryValue* view_intent = new DictionaryValue;
- view_intent->SetString(keys::kIntentTitle, "Test Intent");
- view_intent->Set(keys::kIntentType, view_intent_types);
-
- ListValue* view_intent_list = new ListValue;
- view_intent_list->Append(view_intent);
-
- DictionaryValue* intents = new DictionaryValue;
- intents->SetWithoutPathExpansion("http://webintents.org/view",
- view_intent_list);
- manifest.Set(keys::kIntents, intents);
-
- std::string error;
- scoped_refptr<Extension> intent_app = Extension::Create(
- path, Manifest::INVALID_LOCATION, manifest,
- Extension::NO_FLAGS, &error);
- EXPECT_TRUE(intent_app.get()) << error;
- return intent_app;
- }
-#endif
-
// Verifies that the set of extensions protecting |url| is *exactly* equal to
// |expected_extensions|. Pass in an empty set to verify that an origin is not
// protected.
@@ -291,18 +249,6 @@ TEST_F(ExtensionSpecialStoragePolicyTest, OverlappingApps) {
ExpectProtectedBy(empty_set, GURL("https://bar.wildcards/"));
}
-TEST_F(ExtensionSpecialStoragePolicyTest, WebIntentViewApp) {
-#if defined(ENABLE_WEB_INTENTS)
- scoped_refptr<Extension> intent_app(CreateWebIntentViewApp());
-
- policy_->GrantRightsForExtension(intent_app);
- EXPECT_TRUE(policy_->IsFileHandler(intent_app->id()));
-
- policy_->RevokeRightsForExtension(intent_app);
- EXPECT_FALSE(policy_->IsFileHandler(intent_app->id()));
-#endif
-}
-
TEST_F(ExtensionSpecialStoragePolicyTest, HasSessionOnlyOrigins) {
MessageLoop message_loop;
content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
« no previous file with comments | « chrome/browser/extensions/extension_special_storage_policy.cc ('k') | chrome/browser/extensions/platform_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698