| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_service_unittest.h" | 5 #include "chrome/browser/extensions/extension_service_unittest.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 scripts[1].js_scripts()[0].extension_root(), | 1016 scripts[1].js_scripts()[0].extension_root(), |
| 1017 scripts[1].js_scripts()[0].relative_path()); | 1017 scripts[1].js_scripts()[0].relative_path()); |
| 1018 expected_path = | 1018 expected_path = |
| 1019 extension->path().AppendASCII("js_files").AppendASCII("script3.js"); | 1019 extension->path().AppendASCII("js_files").AppendASCII("script3.js"); |
| 1020 ASSERT_TRUE(file_util::AbsolutePath(&expected_path)); | 1020 ASSERT_TRUE(file_util::AbsolutePath(&expected_path)); |
| 1021 EXPECT_TRUE(resource10.ComparePathWithDefault(expected_path)); | 1021 EXPECT_TRUE(resource10.ComparePathWithDefault(expected_path)); |
| 1022 | 1022 |
| 1023 expected_patterns.ClearPatterns(); | 1023 expected_patterns.ClearPatterns(); |
| 1024 AddPattern(&expected_patterns, "http://*.google.com/*"); | 1024 AddPattern(&expected_patterns, "http://*.google.com/*"); |
| 1025 AddPattern(&expected_patterns, "https://*.google.com/*"); | 1025 AddPattern(&expected_patterns, "https://*.google.com/*"); |
| 1026 EXPECT_EQ(expected_patterns, extension->permission_set()->explicit_hosts()); | 1026 EXPECT_EQ(expected_patterns, |
| 1027 extension->GetActivePermissions()->explicit_hosts()); |
| 1027 | 1028 |
| 1028 EXPECT_EQ(std::string(good1), loaded_[1]->id()); | 1029 EXPECT_EQ(std::string(good1), loaded_[1]->id()); |
| 1029 EXPECT_EQ(std::string("My extension 2"), loaded_[1]->name()); | 1030 EXPECT_EQ(std::string("My extension 2"), loaded_[1]->name()); |
| 1030 EXPECT_EQ(std::string(""), loaded_[1]->description()); | 1031 EXPECT_EQ(std::string(""), loaded_[1]->description()); |
| 1031 EXPECT_EQ(loaded_[1]->GetResourceURL("background.html"), | 1032 EXPECT_EQ(loaded_[1]->GetResourceURL("background.html"), |
| 1032 loaded_[1]->background_url()); | 1033 loaded_[1]->background_url()); |
| 1033 EXPECT_EQ(0u, loaded_[1]->content_scripts().size()); | 1034 EXPECT_EQ(0u, loaded_[1]->content_scripts().size()); |
| 1034 // We don't parse the plugins section on Chrome OS. | 1035 // We don't parse the plugins section on Chrome OS. |
| 1035 #if defined(OS_CHROMEOS) | 1036 #if defined(OS_CHROMEOS) |
| 1036 EXPECT_EQ(0u, loaded_[1]->plugins().size()); | 1037 EXPECT_EQ(0u, loaded_[1]->plugins().size()); |
| (...skipping 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3793 ASSERT_FALSE(AddPendingSyncInstall()); | 3794 ASSERT_FALSE(AddPendingSyncInstall()); |
| 3794 | 3795 |
| 3795 // Wait for the external source to install. | 3796 // Wait for the external source to install. |
| 3796 WaitForCrxInstall(crx_path_, true); | 3797 WaitForCrxInstall(crx_path_, true); |
| 3797 ASSERT_TRUE(IsCrxInstalled()); | 3798 ASSERT_TRUE(IsCrxInstalled()); |
| 3798 | 3799 |
| 3799 // Now that the extension is installed, sync request should fail | 3800 // Now that the extension is installed, sync request should fail |
| 3800 // because the extension is already installed. | 3801 // because the extension is already installed. |
| 3801 ASSERT_FALSE(AddPendingSyncInstall()); | 3802 ASSERT_FALSE(AddPendingSyncInstall()); |
| 3802 } | 3803 } |
| OLD | NEW |