Index: extensions/common/manifest_handlers/incognito_manifest_unittest.cc |
diff --git a/extensions/common/manifest_handlers/incognito_manifest_unittest.cc b/extensions/common/manifest_handlers/incognito_manifest_unittest.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c27f4bfe2bb6fffd9a7541fce6af88de36fce160 |
--- /dev/null |
+++ b/extensions/common/manifest_handlers/incognito_manifest_unittest.cc |
@@ -0,0 +1,36 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "extensions/browser/extension_util.h" |
+#include "extensions/common/extension.h" |
+#include "extensions/common/manifest_test.h" |
+ |
+namespace extensions { |
+ |
+using IncognitoManifestTest = ManifestTest; |
+ |
+TEST_F(IncognitoManifestTest, IncognitoNotAllowed) { |
+ scoped_refptr<Extension> extension( |
+ LoadAndExpectSuccess("incognito_not_allowed.json")); |
not at google - send to devlin
2015/09/18 21:49:20
actually can you also make assertions about the In
Not at Google. Contact bengr
2015/09/18 22:07:33
Done.
|
+ EXPECT_FALSE(util::CanBeIncognitoEnabled(extension.get())); |
+} |
+ |
+TEST_F(IncognitoManifestTest, IncognitoSpanning) { |
+ scoped_refptr<Extension> extension( |
+ LoadAndExpectSuccess("incognito_spanning.json")); |
+ EXPECT_TRUE(util::CanBeIncognitoEnabled(extension.get())); |
+} |
+ |
+TEST_F(IncognitoManifestTest, IncognitoSplit) { |
+ scoped_refptr<Extension> extension( |
+ LoadAndExpectSuccess("incognito_split.json")); |
+ EXPECT_TRUE(util::CanBeIncognitoEnabled(extension.get())); |
+} |
+ |
+TEST_F(IncognitoManifestTest, IncognitoUnspecified) { |
+ scoped_refptr<Extension> extension(LoadAndExpectSuccess("minimal.json")); |
+ EXPECT_TRUE(util::CanBeIncognitoEnabled(extension.get())); |
+} |
+ |
+} // namespace extensions |