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

Side by Side Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix automation_util and thread issue. Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 TEST_F(ExtensionManifestTest, ForbidPortsInPermissions) { 540 TEST_F(ExtensionManifestTest, ForbidPortsInPermissions) {
541 // Loading as a user would shoud not trigger an error. 541 // Loading as a user would shoud not trigger an error.
542 LoadAndExpectSuccess("forbid_ports_in_permissions.json"); 542 LoadAndExpectSuccess("forbid_ports_in_permissions.json");
543 543
544 // Ideally, loading as a developer would give an error. 544 // Ideally, loading as a developer would give an error.
545 // To ensure that we do not error out on a valid permission 545 // To ensure that we do not error out on a valid permission
546 // in a future version of chrome, validation is to loose 546 // in a future version of chrome, validation is to loose
547 // to flag this case. 547 // to flag this case.
548 LoadStrictAndExpectSuccess("forbid_ports_in_permissions.json"); 548 LoadStrictAndExpectSuccess("forbid_ports_in_permissions.json");
549 } 549 }
550
551 TEST_F(ExtensionManifestTest, IsolatedApps) {
552 // Requires --enable-experimental-app-manifests
553 scoped_refptr<Extension> extension(
554 LoadAndExpectSuccess("isolated_app_valid.json"));
555 EXPECT_FALSE(extension->is_storage_isolated());
556
557 CommandLine old_command_line = *CommandLine::ForCurrentProcess();
558 CommandLine::ForCurrentProcess()->AppendSwitch(
559 switches::kEnableExperimentalAppManifests);
560 scoped_refptr<Extension> extension2(
561 LoadAndExpectSuccess("isolated_app_valid.json"));
562 EXPECT_TRUE(extension2->is_storage_isolated());
563 *CommandLine::ForCurrentProcess() = old_command_line;
564 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698