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

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: Update cookie logic in test. Created 9 years, 11 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_util.h" 10 #include "base/string_util.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 extension_manifest_errors::kInvalidTtsVoicesGender); 401 extension_manifest_errors::kInvalidTtsVoicesGender);
402 402
403 scoped_refptr<Extension> extension( 403 scoped_refptr<Extension> extension(
404 LoadAndExpectSuccess("tts_provider_valid.json")); 404 LoadAndExpectSuccess("tts_provider_valid.json"));
405 405
406 ASSERT_EQ(1u, extension->tts_voices().size()); 406 ASSERT_EQ(1u, extension->tts_voices().size());
407 EXPECT_EQ("name", extension->tts_voices()[0].voice_name); 407 EXPECT_EQ("name", extension->tts_voices()[0].voice_name);
408 EXPECT_EQ("en-US", extension->tts_voices()[0].locale); 408 EXPECT_EQ("en-US", extension->tts_voices()[0].locale);
409 EXPECT_EQ("female", extension->tts_voices()[0].gender); 409 EXPECT_EQ("female", extension->tts_voices()[0].gender);
410 } 410 }
411
412 TEST_F(ExtensionManifestTest, IsolatedApps) {
413 // Requires --enable-experimental-app-manifests
414 scoped_refptr<Extension> extension(
415 LoadAndExpectSuccess("isolated_app_valid.json"));
416 ASSERT_FALSE(extension->is_storage_isolated());
Matt Perry 2011/01/26 20:09:23 nit: probably fine to use EXPECT_ here (and below)
Charlie Reis 2011/03/01 21:33:11 Done.
417
418 CommandLine old_command_line = *CommandLine::ForCurrentProcess();
419 CommandLine::ForCurrentProcess()->AppendSwitch(
420 switches::kEnableExperimentalAppManifests);
421 scoped_refptr<Extension> extension2(
422 LoadAndExpectSuccess("isolated_app_valid.json"));
423 ASSERT_TRUE(extension2->is_storage_isolated());
424 *CommandLine::ForCurrentProcess() = old_command_line;
425 }
426
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698