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

Side by Side Diff: extensions/common/manifest_handlers/incognito_manifest_unittest.cc

Issue 1351223003: Allow extensions to specify that they are not allowed in incognito mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests. Refactor CanBeIncognitoEnabled to util. Created 5 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 unified diff | Download patch
« no previous file with comments | « extensions/common/manifest_handlers/incognito_info.cc ('k') | extensions/extensions_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "extensions/browser/extension_util.h"
6 #include "extensions/common/extension.h"
7 #include "extensions/common/manifest_test.h"
8
9 namespace extensions {
10
11 using IncognitoManifestTest = ManifestTest;
12
13 TEST_F(IncognitoManifestTest, IncognitoNotAllowed) {
14 scoped_refptr<Extension> extension(
15 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.
16 EXPECT_FALSE(util::CanBeIncognitoEnabled(extension.get()));
17 }
18
19 TEST_F(IncognitoManifestTest, IncognitoSpanning) {
20 scoped_refptr<Extension> extension(
21 LoadAndExpectSuccess("incognito_spanning.json"));
22 EXPECT_TRUE(util::CanBeIncognitoEnabled(extension.get()));
23 }
24
25 TEST_F(IncognitoManifestTest, IncognitoSplit) {
26 scoped_refptr<Extension> extension(
27 LoadAndExpectSuccess("incognito_split.json"));
28 EXPECT_TRUE(util::CanBeIncognitoEnabled(extension.get()));
29 }
30
31 TEST_F(IncognitoManifestTest, IncognitoUnspecified) {
32 scoped_refptr<Extension> extension(LoadAndExpectSuccess("minimal.json"));
33 EXPECT_TRUE(util::CanBeIncognitoEnabled(extension.get()));
34 }
35
36 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/manifest_handlers/incognito_info.cc ('k') | extensions/extensions_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698