| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 const Version* version, | 71 const Version* version, |
| 72 const base::FilePath& path, | 72 const base::FilePath& path, |
| 73 Manifest::Location unused, | 73 Manifest::Location unused, |
| 74 int unused2, | 74 int unused2, |
| 75 bool unused3) OVERRIDE { | 75 bool unused3) OVERRIDE { |
| 76 ADD_FAILURE() << "There should be no external extensions from files."; | 76 ADD_FAILURE() << "There should be no external extensions from files."; |
| 77 return false; | 77 return false; |
| 78 } | 78 } |
| 79 | 79 |
| 80 virtual bool OnExternalExtensionUpdateUrlFound( | 80 virtual bool OnExternalExtensionUpdateUrlFound( |
| 81 const std::string& id, const GURL& update_url, | 81 const std::string& id, |
| 82 Manifest::Location location, int unused1, bool unused2) OVERRIDE { | 82 const std::string& install_parameter, |
| 83 const GURL& update_url, |
| 84 Manifest::Location location, |
| 85 int unused1, |
| 86 bool unused2) OVERRIDE { |
| 83 // Extension has the correct location. | 87 // Extension has the correct location. |
| 84 EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, location); | 88 EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, location); |
| 85 | 89 |
| 86 // Provider returns the correct location when asked. | 90 // Provider returns the correct location when asked. |
| 87 Manifest::Location location1; | 91 Manifest::Location location1; |
| 88 scoped_ptr<Version> version1; | 92 scoped_ptr<Version> version1; |
| 89 provider_->GetExtensionDetails(id, &location1, &version1); | 93 provider_->GetExtensionDetails(id, &location1, &version1); |
| 90 EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, location1); | 94 EXPECT_EQ(Manifest::EXTERNAL_POLICY_DOWNLOAD, location1); |
| 91 EXPECT_FALSE(version1.get()); | 95 EXPECT_FALSE(version1.get()); |
| 92 | 96 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 forced_extensions.SetString("invalid", "http://www.example.com/crx"); | 144 forced_extensions.SetString("invalid", "http://www.example.com/crx"); |
| 141 forced_extensions.SetString("dddddddddddddddddddddddddddddddd", | 145 forced_extensions.SetString("dddddddddddddddddddddddddddddddd", |
| 142 std::string()); | 146 std::string()); |
| 143 forced_extensions.SetString("invalid", "bad"); | 147 forced_extensions.SetString("invalid", "bad"); |
| 144 | 148 |
| 145 MockExternalPolicyProviderVisitor mv; | 149 MockExternalPolicyProviderVisitor mv; |
| 146 mv.Visit(forced_extensions, expected_extensions); | 150 mv.Visit(forced_extensions, expected_extensions); |
| 147 } | 151 } |
| 148 | 152 |
| 149 } // namespace extensions | 153 } // namespace extensions |
| OLD | NEW |