OLD | NEW |
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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 extension_manifest_errors::kInvalidTtsVoicesGender); | 437 extension_manifest_errors::kInvalidTtsVoicesGender); |
438 | 438 |
439 scoped_refptr<Extension> extension( | 439 scoped_refptr<Extension> extension( |
440 LoadAndExpectSuccess("tts_provider_valid.json")); | 440 LoadAndExpectSuccess("tts_provider_valid.json")); |
441 | 441 |
442 ASSERT_EQ(1u, extension->tts_voices().size()); | 442 ASSERT_EQ(1u, extension->tts_voices().size()); |
443 EXPECT_EQ("name", extension->tts_voices()[0].voice_name); | 443 EXPECT_EQ("name", extension->tts_voices()[0].voice_name); |
444 EXPECT_EQ("en-US", extension->tts_voices()[0].locale); | 444 EXPECT_EQ("en-US", extension->tts_voices()[0].locale); |
445 EXPECT_EQ("female", extension->tts_voices()[0].gender); | 445 EXPECT_EQ("female", extension->tts_voices()[0].gender); |
446 } | 446 } |
| 447 |
| 448 TEST_F(ExtensionManifestTest, IsolatedApps) { |
| 449 // Requires --enable-experimental-app-manifests |
| 450 scoped_refptr<Extension> extension( |
| 451 LoadAndExpectSuccess("isolated_app_valid.json")); |
| 452 EXPECT_FALSE(extension->is_storage_isolated()); |
| 453 |
| 454 CommandLine old_command_line = *CommandLine::ForCurrentProcess(); |
| 455 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 456 switches::kEnableExperimentalAppManifests); |
| 457 scoped_refptr<Extension> extension2( |
| 458 LoadAndExpectSuccess("isolated_app_valid.json")); |
| 459 EXPECT_TRUE(extension2->is_storage_isolated()); |
| 460 *CommandLine::ForCurrentProcess() = old_command_line; |
| 461 } |
| 462 |
OLD | NEW |