| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/common/features/simple_feature.h" | 5 #include "extensions/common/features/simple_feature.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 test.manifest_version, | 108 test.manifest_version, |
| 109 test.platform).result()); | 109 test.platform).result()); |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 | 112 |
| 113 TEST_F(SimpleFeatureTest, Whitelist) { | 113 TEST_F(SimpleFeatureTest, Whitelist) { |
| 114 const std::string kIdFoo("fooabbbbccccddddeeeeffffgggghhhh"); | 114 const std::string kIdFoo("fooabbbbccccddddeeeeffffgggghhhh"); |
| 115 const std::string kIdBar("barabbbbccccddddeeeeffffgggghhhh"); | 115 const std::string kIdBar("barabbbbccccddddeeeeffffgggghhhh"); |
| 116 const std::string kIdBaz("bazabbbbccccddddeeeeffffgggghhhh"); | 116 const std::string kIdBaz("bazabbbbccccddddeeeeffffgggghhhh"); |
| 117 SimpleFeature feature; | 117 SimpleFeature feature; |
| 118 feature.whitelist()->push_back(kIdFoo); | 118 feature.whitelist_.push_back(kIdFoo); |
| 119 feature.whitelist()->push_back(kIdBar); | 119 feature.whitelist_.push_back(kIdBar); |
| 120 | 120 |
| 121 EXPECT_EQ( | 121 EXPECT_EQ( |
| 122 Feature::IS_AVAILABLE, | 122 Feature::IS_AVAILABLE, |
| 123 feature.IsAvailableToManifest(kIdFoo, | 123 feature.IsAvailableToManifest(kIdFoo, |
| 124 Manifest::TYPE_UNKNOWN, | 124 Manifest::TYPE_UNKNOWN, |
| 125 Manifest::INVALID_LOCATION, | 125 Manifest::INVALID_LOCATION, |
| 126 -1, | 126 -1, |
| 127 Feature::UNSPECIFIED_PLATFORM).result()); | 127 Feature::UNSPECIFIED_PLATFORM).result()); |
| 128 EXPECT_EQ( | 128 EXPECT_EQ( |
| 129 Feature::IS_AVAILABLE, | 129 Feature::IS_AVAILABLE, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 141 -1, | 141 -1, |
| 142 Feature::UNSPECIFIED_PLATFORM).result()); | 142 Feature::UNSPECIFIED_PLATFORM).result()); |
| 143 EXPECT_EQ( | 143 EXPECT_EQ( |
| 144 Feature::NOT_FOUND_IN_WHITELIST, | 144 Feature::NOT_FOUND_IN_WHITELIST, |
| 145 feature.IsAvailableToManifest(std::string(), | 145 feature.IsAvailableToManifest(std::string(), |
| 146 Manifest::TYPE_UNKNOWN, | 146 Manifest::TYPE_UNKNOWN, |
| 147 Manifest::INVALID_LOCATION, | 147 Manifest::INVALID_LOCATION, |
| 148 -1, | 148 -1, |
| 149 Feature::UNSPECIFIED_PLATFORM).result()); | 149 Feature::UNSPECIFIED_PLATFORM).result()); |
| 150 | 150 |
| 151 feature.extension_types()->push_back(Manifest::TYPE_LEGACY_PACKAGED_APP); | 151 feature.extension_types_.push_back(Manifest::TYPE_LEGACY_PACKAGED_APP); |
| 152 EXPECT_EQ( | 152 EXPECT_EQ( |
| 153 Feature::NOT_FOUND_IN_WHITELIST, | 153 Feature::NOT_FOUND_IN_WHITELIST, |
| 154 feature.IsAvailableToManifest(kIdBaz, | 154 feature.IsAvailableToManifest(kIdBaz, |
| 155 Manifest::TYPE_LEGACY_PACKAGED_APP, | 155 Manifest::TYPE_LEGACY_PACKAGED_APP, |
| 156 Manifest::INVALID_LOCATION, | 156 Manifest::INVALID_LOCATION, |
| 157 -1, | 157 -1, |
| 158 Feature::UNSPECIFIED_PLATFORM).result()); | 158 Feature::UNSPECIFIED_PLATFORM).result()); |
| 159 } | 159 } |
| 160 | 160 |
| 161 TEST_F(SimpleFeatureTest, HashedIdWhitelist) { | 161 TEST_F(SimpleFeatureTest, HashedIdWhitelist) { |
| 162 // echo -n "fooabbbbccccddddeeeeffffgggghhhh" | | 162 // echo -n "fooabbbbccccddddeeeeffffgggghhhh" | |
| 163 // sha1sum | tr '[:lower:]' '[:upper:]' | 163 // sha1sum | tr '[:lower:]' '[:upper:]' |
| 164 const std::string kIdFoo("fooabbbbccccddddeeeeffffgggghhhh"); | 164 const std::string kIdFoo("fooabbbbccccddddeeeeffffgggghhhh"); |
| 165 const std::string kIdFooHashed("55BC7228A0D502A2A48C9BB16B07062A01E62897"); | 165 const std::string kIdFooHashed("55BC7228A0D502A2A48C9BB16B07062A01E62897"); |
| 166 SimpleFeature feature; | 166 SimpleFeature feature; |
| 167 | 167 |
| 168 feature.whitelist()->push_back(kIdFooHashed); | 168 feature.whitelist_.push_back(kIdFooHashed); |
| 169 | 169 |
| 170 EXPECT_EQ( | 170 EXPECT_EQ( |
| 171 Feature::IS_AVAILABLE, | 171 Feature::IS_AVAILABLE, |
| 172 feature.IsAvailableToManifest(kIdFoo, | 172 feature.IsAvailableToManifest(kIdFoo, |
| 173 Manifest::TYPE_UNKNOWN, | 173 Manifest::TYPE_UNKNOWN, |
| 174 Manifest::INVALID_LOCATION, | 174 Manifest::INVALID_LOCATION, |
| 175 -1, | 175 -1, |
| 176 Feature::UNSPECIFIED_PLATFORM).result()); | 176 Feature::UNSPECIFIED_PLATFORM).result()); |
| 177 EXPECT_NE( | 177 EXPECT_NE( |
| 178 Feature::IS_AVAILABLE, | 178 Feature::IS_AVAILABLE, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 195 Manifest::INVALID_LOCATION, | 195 Manifest::INVALID_LOCATION, |
| 196 -1, | 196 -1, |
| 197 Feature::UNSPECIFIED_PLATFORM).result()); | 197 Feature::UNSPECIFIED_PLATFORM).result()); |
| 198 } | 198 } |
| 199 | 199 |
| 200 TEST_F(SimpleFeatureTest, Blacklist) { | 200 TEST_F(SimpleFeatureTest, Blacklist) { |
| 201 const std::string kIdFoo("fooabbbbccccddddeeeeffffgggghhhh"); | 201 const std::string kIdFoo("fooabbbbccccddddeeeeffffgggghhhh"); |
| 202 const std::string kIdBar("barabbbbccccddddeeeeffffgggghhhh"); | 202 const std::string kIdBar("barabbbbccccddddeeeeffffgggghhhh"); |
| 203 const std::string kIdBaz("bazabbbbccccddddeeeeffffgggghhhh"); | 203 const std::string kIdBaz("bazabbbbccccddddeeeeffffgggghhhh"); |
| 204 SimpleFeature feature; | 204 SimpleFeature feature; |
| 205 feature.blacklist()->push_back(kIdFoo); | 205 feature.blacklist_.push_back(kIdFoo); |
| 206 feature.blacklist()->push_back(kIdBar); | 206 feature.blacklist_.push_back(kIdBar); |
| 207 | 207 |
| 208 EXPECT_EQ( | 208 EXPECT_EQ( |
| 209 Feature::FOUND_IN_BLACKLIST, | 209 Feature::FOUND_IN_BLACKLIST, |
| 210 feature.IsAvailableToManifest(kIdFoo, | 210 feature.IsAvailableToManifest(kIdFoo, |
| 211 Manifest::TYPE_UNKNOWN, | 211 Manifest::TYPE_UNKNOWN, |
| 212 Manifest::INVALID_LOCATION, | 212 Manifest::INVALID_LOCATION, |
| 213 -1, | 213 -1, |
| 214 Feature::UNSPECIFIED_PLATFORM).result()); | 214 Feature::UNSPECIFIED_PLATFORM).result()); |
| 215 EXPECT_EQ( | 215 EXPECT_EQ( |
| 216 Feature::FOUND_IN_BLACKLIST, | 216 Feature::FOUND_IN_BLACKLIST, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 236 Feature::UNSPECIFIED_PLATFORM).result()); | 236 Feature::UNSPECIFIED_PLATFORM).result()); |
| 237 } | 237 } |
| 238 | 238 |
| 239 TEST_F(SimpleFeatureTest, HashedIdBlacklist) { | 239 TEST_F(SimpleFeatureTest, HashedIdBlacklist) { |
| 240 // echo -n "fooabbbbccccddddeeeeffffgggghhhh" | | 240 // echo -n "fooabbbbccccddddeeeeffffgggghhhh" | |
| 241 // sha1sum | tr '[:lower:]' '[:upper:]' | 241 // sha1sum | tr '[:lower:]' '[:upper:]' |
| 242 const std::string kIdFoo("fooabbbbccccddddeeeeffffgggghhhh"); | 242 const std::string kIdFoo("fooabbbbccccddddeeeeffffgggghhhh"); |
| 243 const std::string kIdFooHashed("55BC7228A0D502A2A48C9BB16B07062A01E62897"); | 243 const std::string kIdFooHashed("55BC7228A0D502A2A48C9BB16B07062A01E62897"); |
| 244 SimpleFeature feature; | 244 SimpleFeature feature; |
| 245 | 245 |
| 246 feature.blacklist()->push_back(kIdFooHashed); | 246 feature.blacklist_.push_back(kIdFooHashed); |
| 247 | 247 |
| 248 EXPECT_EQ( | 248 EXPECT_EQ( |
| 249 Feature::FOUND_IN_BLACKLIST, | 249 Feature::FOUND_IN_BLACKLIST, |
| 250 feature.IsAvailableToManifest(kIdFoo, | 250 feature.IsAvailableToManifest(kIdFoo, |
| 251 Manifest::TYPE_UNKNOWN, | 251 Manifest::TYPE_UNKNOWN, |
| 252 Manifest::INVALID_LOCATION, | 252 Manifest::INVALID_LOCATION, |
| 253 -1, | 253 -1, |
| 254 Feature::UNSPECIFIED_PLATFORM).result()); | 254 Feature::UNSPECIFIED_PLATFORM).result()); |
| 255 EXPECT_NE( | 255 EXPECT_NE( |
| 256 Feature::FOUND_IN_BLACKLIST, | 256 Feature::FOUND_IN_BLACKLIST, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 270 Feature::IS_AVAILABLE, | 270 Feature::IS_AVAILABLE, |
| 271 feature.IsAvailableToManifest("tooshortforanextensionid", | 271 feature.IsAvailableToManifest("tooshortforanextensionid", |
| 272 Manifest::TYPE_UNKNOWN, | 272 Manifest::TYPE_UNKNOWN, |
| 273 Manifest::INVALID_LOCATION, | 273 Manifest::INVALID_LOCATION, |
| 274 -1, | 274 -1, |
| 275 Feature::UNSPECIFIED_PLATFORM).result()); | 275 Feature::UNSPECIFIED_PLATFORM).result()); |
| 276 } | 276 } |
| 277 | 277 |
| 278 TEST_F(SimpleFeatureTest, PackageType) { | 278 TEST_F(SimpleFeatureTest, PackageType) { |
| 279 SimpleFeature feature; | 279 SimpleFeature feature; |
| 280 feature.extension_types()->push_back(Manifest::TYPE_EXTENSION); | 280 feature.extension_types_.push_back(Manifest::TYPE_EXTENSION); |
| 281 feature.extension_types()->push_back(Manifest::TYPE_LEGACY_PACKAGED_APP); | 281 feature.extension_types_.push_back(Manifest::TYPE_LEGACY_PACKAGED_APP); |
| 282 | 282 |
| 283 EXPECT_EQ( | 283 EXPECT_EQ( |
| 284 Feature::IS_AVAILABLE, | 284 Feature::IS_AVAILABLE, |
| 285 feature.IsAvailableToManifest(std::string(), | 285 feature.IsAvailableToManifest(std::string(), |
| 286 Manifest::TYPE_EXTENSION, | 286 Manifest::TYPE_EXTENSION, |
| 287 Manifest::INVALID_LOCATION, | 287 Manifest::INVALID_LOCATION, |
| 288 -1, | 288 -1, |
| 289 Feature::UNSPECIFIED_PLATFORM).result()); | 289 Feature::UNSPECIFIED_PLATFORM).result()); |
| 290 EXPECT_EQ( | 290 EXPECT_EQ( |
| 291 Feature::IS_AVAILABLE, | 291 Feature::IS_AVAILABLE, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 307 feature.IsAvailableToManifest(std::string(), | 307 feature.IsAvailableToManifest(std::string(), |
| 308 Manifest::TYPE_THEME, | 308 Manifest::TYPE_THEME, |
| 309 Manifest::INVALID_LOCATION, | 309 Manifest::INVALID_LOCATION, |
| 310 -1, | 310 -1, |
| 311 Feature::UNSPECIFIED_PLATFORM).result()); | 311 Feature::UNSPECIFIED_PLATFORM).result()); |
| 312 } | 312 } |
| 313 | 313 |
| 314 TEST_F(SimpleFeatureTest, Context) { | 314 TEST_F(SimpleFeatureTest, Context) { |
| 315 SimpleFeature feature; | 315 SimpleFeature feature; |
| 316 feature.set_name("somefeature"); | 316 feature.set_name("somefeature"); |
| 317 feature.contexts()->push_back(Feature::BLESSED_EXTENSION_CONTEXT); | 317 feature.contexts_.push_back(Feature::BLESSED_EXTENSION_CONTEXT); |
| 318 feature.extension_types()->push_back(Manifest::TYPE_LEGACY_PACKAGED_APP); | 318 feature.extension_types_.push_back(Manifest::TYPE_LEGACY_PACKAGED_APP); |
| 319 feature.platforms()->push_back(Feature::CHROMEOS_PLATFORM); | 319 feature.platforms_.push_back(Feature::CHROMEOS_PLATFORM); |
| 320 feature.set_min_manifest_version(21); | 320 feature.set_min_manifest_version(21); |
| 321 feature.set_max_manifest_version(25); | 321 feature.set_max_manifest_version(25); |
| 322 | 322 |
| 323 base::DictionaryValue manifest; | 323 base::DictionaryValue manifest; |
| 324 manifest.SetString("name", "test"); | 324 manifest.SetString("name", "test"); |
| 325 manifest.SetString("version", "1"); | 325 manifest.SetString("version", "1"); |
| 326 manifest.SetInteger("manifest_version", 21); | 326 manifest.SetInteger("manifest_version", 21); |
| 327 manifest.SetString("app.launch.local_path", "foo.html"); | 327 manifest.SetString("app.launch.local_path", "foo.html"); |
| 328 | 328 |
| 329 std::string error; | 329 std::string error; |
| 330 scoped_refptr<const Extension> extension(Extension::Create( | 330 scoped_refptr<const Extension> extension(Extension::Create( |
| 331 base::FilePath(), Manifest::INTERNAL, manifest, Extension::NO_FLAGS, | 331 base::FilePath(), Manifest::INTERNAL, manifest, Extension::NO_FLAGS, |
| 332 &error)); | 332 &error)); |
| 333 EXPECT_EQ("", error); | 333 EXPECT_EQ("", error); |
| 334 ASSERT_TRUE(extension.get()); | 334 ASSERT_TRUE(extension.get()); |
| 335 | 335 |
| 336 feature.whitelist()->push_back("monkey"); | 336 feature.whitelist_.push_back("monkey"); |
| 337 EXPECT_EQ(Feature::NOT_FOUND_IN_WHITELIST, feature.IsAvailableToContext( | 337 EXPECT_EQ(Feature::NOT_FOUND_IN_WHITELIST, feature.IsAvailableToContext( |
| 338 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, | 338 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, |
| 339 Feature::CHROMEOS_PLATFORM).result()); | 339 Feature::CHROMEOS_PLATFORM).result()); |
| 340 feature.whitelist()->clear(); | 340 feature.whitelist_.clear(); |
| 341 | 341 |
| 342 feature.extension_types()->clear(); | 342 feature.extension_types_.clear(); |
| 343 feature.extension_types()->push_back(Manifest::TYPE_THEME); | 343 feature.extension_types_.push_back(Manifest::TYPE_THEME); |
| 344 { | 344 { |
| 345 Feature::Availability availability = feature.IsAvailableToContext( | 345 Feature::Availability availability = feature.IsAvailableToContext( |
| 346 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, | 346 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, |
| 347 Feature::CHROMEOS_PLATFORM); | 347 Feature::CHROMEOS_PLATFORM); |
| 348 EXPECT_EQ(Feature::INVALID_TYPE, availability.result()); | 348 EXPECT_EQ(Feature::INVALID_TYPE, availability.result()); |
| 349 EXPECT_EQ("'somefeature' is only allowed for themes, " | 349 EXPECT_EQ("'somefeature' is only allowed for themes, " |
| 350 "but this is a legacy packaged app.", | 350 "but this is a legacy packaged app.", |
| 351 availability.message()); | 351 availability.message()); |
| 352 } | 352 } |
| 353 | 353 |
| 354 feature.extension_types()->clear(); | 354 feature.extension_types_.clear(); |
| 355 feature.extension_types()->push_back(Manifest::TYPE_LEGACY_PACKAGED_APP); | 355 feature.extension_types_.push_back(Manifest::TYPE_LEGACY_PACKAGED_APP); |
| 356 feature.contexts()->clear(); | 356 feature.contexts_.clear(); |
| 357 feature.contexts()->push_back(Feature::UNBLESSED_EXTENSION_CONTEXT); | 357 feature.contexts_.push_back(Feature::UNBLESSED_EXTENSION_CONTEXT); |
| 358 feature.contexts()->push_back(Feature::CONTENT_SCRIPT_CONTEXT); | 358 feature.contexts_.push_back(Feature::CONTENT_SCRIPT_CONTEXT); |
| 359 { | 359 { |
| 360 Feature::Availability availability = feature.IsAvailableToContext( | 360 Feature::Availability availability = feature.IsAvailableToContext( |
| 361 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, | 361 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, |
| 362 Feature::CHROMEOS_PLATFORM); | 362 Feature::CHROMEOS_PLATFORM); |
| 363 EXPECT_EQ(Feature::INVALID_CONTEXT, availability.result()); | 363 EXPECT_EQ(Feature::INVALID_CONTEXT, availability.result()); |
| 364 EXPECT_EQ("'somefeature' is only allowed to run in extension iframes and " | 364 EXPECT_EQ("'somefeature' is only allowed to run in extension iframes and " |
| 365 "content scripts, but this is a privileged page", | 365 "content scripts, but this is a privileged page", |
| 366 availability.message()); | 366 availability.message()); |
| 367 } | 367 } |
| 368 | 368 |
| 369 feature.contexts()->push_back(Feature::WEB_PAGE_CONTEXT); | 369 feature.contexts_.push_back(Feature::WEB_PAGE_CONTEXT); |
| 370 { | 370 { |
| 371 Feature::Availability availability = feature.IsAvailableToContext( | 371 Feature::Availability availability = feature.IsAvailableToContext( |
| 372 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, | 372 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, |
| 373 Feature::CHROMEOS_PLATFORM); | 373 Feature::CHROMEOS_PLATFORM); |
| 374 EXPECT_EQ(Feature::INVALID_CONTEXT, availability.result()); | 374 EXPECT_EQ(Feature::INVALID_CONTEXT, availability.result()); |
| 375 EXPECT_EQ("'somefeature' is only allowed to run in extension iframes, " | 375 EXPECT_EQ("'somefeature' is only allowed to run in extension iframes, " |
| 376 "content scripts, and web pages, but this is a privileged page", | 376 "content scripts, and web pages, but this is a privileged page", |
| 377 availability.message()); | 377 availability.message()); |
| 378 } | 378 } |
| 379 | 379 |
| 380 feature.contexts()->clear(); | 380 feature.contexts_.clear(); |
| 381 feature.contexts()->push_back(Feature::BLESSED_EXTENSION_CONTEXT); | 381 feature.contexts_.push_back(Feature::BLESSED_EXTENSION_CONTEXT); |
| 382 feature.set_location(SimpleFeature::COMPONENT_LOCATION); | 382 feature.set_location(SimpleFeature::COMPONENT_LOCATION); |
| 383 EXPECT_EQ(Feature::INVALID_LOCATION, feature.IsAvailableToContext( | 383 EXPECT_EQ(Feature::INVALID_LOCATION, feature.IsAvailableToContext( |
| 384 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, | 384 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, |
| 385 Feature::CHROMEOS_PLATFORM).result()); | 385 Feature::CHROMEOS_PLATFORM).result()); |
| 386 feature.set_location(SimpleFeature::UNSPECIFIED_LOCATION); | 386 feature.set_location(SimpleFeature::UNSPECIFIED_LOCATION); |
| 387 | 387 |
| 388 EXPECT_EQ(Feature::INVALID_PLATFORM, feature.IsAvailableToContext( | 388 EXPECT_EQ(Feature::INVALID_PLATFORM, feature.IsAvailableToContext( |
| 389 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, | 389 extension.get(), Feature::BLESSED_EXTENSION_CONTEXT, |
| 390 Feature::UNSPECIFIED_PLATFORM).result()); | 390 Feature::UNSPECIFIED_PLATFORM).result()); |
| 391 | 391 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 Manifest::EXTERNAL_PREF_DOWNLOAD)); | 444 Manifest::EXTERNAL_PREF_DOWNLOAD)); |
| 445 | 445 |
| 446 // External component extensions can access the "external_component" | 446 // External component extensions can access the "external_component" |
| 447 // location. | 447 // location. |
| 448 EXPECT_TRUE(LocationIsAvailable(SimpleFeature::EXTERNAL_COMPONENT_LOCATION, | 448 EXPECT_TRUE(LocationIsAvailable(SimpleFeature::EXTERNAL_COMPONENT_LOCATION, |
| 449 Manifest::EXTERNAL_COMPONENT)); | 449 Manifest::EXTERNAL_COMPONENT)); |
| 450 } | 450 } |
| 451 | 451 |
| 452 TEST_F(SimpleFeatureTest, Platform) { | 452 TEST_F(SimpleFeatureTest, Platform) { |
| 453 SimpleFeature feature; | 453 SimpleFeature feature; |
| 454 feature.platforms()->push_back(Feature::CHROMEOS_PLATFORM); | 454 feature.platforms_.push_back(Feature::CHROMEOS_PLATFORM); |
| 455 EXPECT_EQ(Feature::IS_AVAILABLE, | 455 EXPECT_EQ(Feature::IS_AVAILABLE, |
| 456 feature.IsAvailableToManifest(std::string(), | 456 feature.IsAvailableToManifest(std::string(), |
| 457 Manifest::TYPE_UNKNOWN, | 457 Manifest::TYPE_UNKNOWN, |
| 458 Manifest::INVALID_LOCATION, | 458 Manifest::INVALID_LOCATION, |
| 459 -1, | 459 -1, |
| 460 Feature::CHROMEOS_PLATFORM).result()); | 460 Feature::CHROMEOS_PLATFORM).result()); |
| 461 EXPECT_EQ( | 461 EXPECT_EQ( |
| 462 Feature::INVALID_PLATFORM, | 462 Feature::INVALID_PLATFORM, |
| 463 feature.IsAvailableToManifest(std::string(), | 463 feature.IsAvailableToManifest(std::string(), |
| 464 Manifest::TYPE_UNKNOWN, | 464 Manifest::TYPE_UNKNOWN, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 Manifest::TYPE_UNKNOWN, | 523 Manifest::TYPE_UNKNOWN, |
| 524 Manifest::INVALID_LOCATION, | 524 Manifest::INVALID_LOCATION, |
| 525 7, | 525 7, |
| 526 Feature::UNSPECIFIED_PLATFORM).result()); | 526 Feature::UNSPECIFIED_PLATFORM).result()); |
| 527 } | 527 } |
| 528 | 528 |
| 529 TEST_F(SimpleFeatureTest, ParseNull) { | 529 TEST_F(SimpleFeatureTest, ParseNull) { |
| 530 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 530 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 531 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); | 531 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); |
| 532 feature->Parse(value.get()); | 532 feature->Parse(value.get()); |
| 533 EXPECT_TRUE(feature->whitelist()->empty()); | 533 EXPECT_TRUE(feature->whitelist().empty()); |
| 534 EXPECT_TRUE(feature->extension_types()->empty()); | 534 EXPECT_TRUE(feature->extension_types().empty()); |
| 535 EXPECT_TRUE(feature->contexts()->empty()); | 535 EXPECT_TRUE(feature->contexts().empty()); |
| 536 EXPECT_EQ(SimpleFeature::UNSPECIFIED_LOCATION, feature->location()); | 536 EXPECT_EQ(SimpleFeature::UNSPECIFIED_LOCATION, feature->location()); |
| 537 EXPECT_TRUE(feature->platforms()->empty()); | 537 EXPECT_TRUE(feature->platforms().empty()); |
| 538 EXPECT_EQ(0, feature->min_manifest_version()); | 538 EXPECT_EQ(0, feature->min_manifest_version()); |
| 539 EXPECT_EQ(0, feature->max_manifest_version()); | 539 EXPECT_EQ(0, feature->max_manifest_version()); |
| 540 } | 540 } |
| 541 | 541 |
| 542 TEST_F(SimpleFeatureTest, ParseWhitelist) { | 542 TEST_F(SimpleFeatureTest, ParseWhitelist) { |
| 543 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 543 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 544 base::ListValue* whitelist = new base::ListValue(); | 544 base::ListValue* whitelist = new base::ListValue(); |
| 545 whitelist->AppendString("foo"); | 545 whitelist->AppendString("foo"); |
| 546 whitelist->AppendString("bar"); | 546 whitelist->AppendString("bar"); |
| 547 value->Set("whitelist", whitelist); | 547 value->Set("whitelist", whitelist); |
| 548 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); | 548 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); |
| 549 feature->Parse(value.get()); | 549 feature->Parse(value.get()); |
| 550 EXPECT_EQ(2u, feature->whitelist()->size()); | 550 EXPECT_EQ(2u, feature->whitelist().size()); |
| 551 EXPECT_TRUE(STLCount(*(feature->whitelist()), "foo")); | 551 EXPECT_TRUE(STLCount(feature->whitelist(), "foo")); |
| 552 EXPECT_TRUE(STLCount(*(feature->whitelist()), "bar")); | 552 EXPECT_TRUE(STLCount(feature->whitelist(), "bar")); |
| 553 } | 553 } |
| 554 | 554 |
| 555 TEST_F(SimpleFeatureTest, ParsePackageTypes) { | 555 TEST_F(SimpleFeatureTest, ParsePackageTypes) { |
| 556 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 556 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 557 base::ListValue* extension_types = new base::ListValue(); | 557 base::ListValue* extension_types = new base::ListValue(); |
| 558 extension_types->AppendString("extension"); | 558 extension_types->AppendString("extension"); |
| 559 extension_types->AppendString("theme"); | 559 extension_types->AppendString("theme"); |
| 560 extension_types->AppendString("legacy_packaged_app"); | 560 extension_types->AppendString("legacy_packaged_app"); |
| 561 extension_types->AppendString("hosted_app"); | 561 extension_types->AppendString("hosted_app"); |
| 562 extension_types->AppendString("platform_app"); | 562 extension_types->AppendString("platform_app"); |
| 563 extension_types->AppendString("shared_module"); | 563 extension_types->AppendString("shared_module"); |
| 564 value->Set("extension_types", extension_types); | 564 value->Set("extension_types", extension_types); |
| 565 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); | 565 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); |
| 566 feature->Parse(value.get()); | 566 feature->Parse(value.get()); |
| 567 EXPECT_EQ(6u, feature->extension_types()->size()); | 567 EXPECT_EQ(6u, feature->extension_types().size()); |
| 568 EXPECT_TRUE(STLCount(feature->extension_types(), Manifest::TYPE_EXTENSION)); |
| 569 EXPECT_TRUE(STLCount(feature->extension_types(), Manifest::TYPE_THEME)); |
| 568 EXPECT_TRUE( | 570 EXPECT_TRUE( |
| 569 STLCount(*(feature->extension_types()), Manifest::TYPE_EXTENSION)); | 571 STLCount(feature->extension_types(), Manifest::TYPE_LEGACY_PACKAGED_APP)); |
| 572 EXPECT_TRUE(STLCount(feature->extension_types(), Manifest::TYPE_HOSTED_APP)); |
| 570 EXPECT_TRUE( | 573 EXPECT_TRUE( |
| 571 STLCount(*(feature->extension_types()), Manifest::TYPE_THEME)); | 574 STLCount(feature->extension_types(), Manifest::TYPE_PLATFORM_APP)); |
| 572 EXPECT_TRUE( | 575 EXPECT_TRUE( |
| 573 STLCount( | 576 STLCount(feature->extension_types(), Manifest::TYPE_SHARED_MODULE)); |
| 574 *(feature->extension_types()), Manifest::TYPE_LEGACY_PACKAGED_APP)); | |
| 575 EXPECT_TRUE( | |
| 576 STLCount(*(feature->extension_types()), Manifest::TYPE_HOSTED_APP)); | |
| 577 EXPECT_TRUE( | |
| 578 STLCount(*(feature->extension_types()), Manifest::TYPE_PLATFORM_APP)); | |
| 579 EXPECT_TRUE( | |
| 580 STLCount(*(feature->extension_types()), Manifest::TYPE_SHARED_MODULE)); | |
| 581 | 577 |
| 582 value->SetString("extension_types", "all"); | 578 value->SetString("extension_types", "all"); |
| 583 std::unique_ptr<SimpleFeature> feature2(new SimpleFeature()); | 579 std::unique_ptr<SimpleFeature> feature2(new SimpleFeature()); |
| 584 feature2->Parse(value.get()); | 580 feature2->Parse(value.get()); |
| 585 EXPECT_EQ(*(feature->extension_types()), *(feature2->extension_types())); | 581 EXPECT_EQ(feature->extension_types(), feature2->extension_types()); |
| 586 } | 582 } |
| 587 | 583 |
| 588 TEST_F(SimpleFeatureTest, ParseContexts) { | 584 TEST_F(SimpleFeatureTest, ParseContexts) { |
| 589 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 585 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 590 base::ListValue* contexts = new base::ListValue(); | 586 base::ListValue* contexts = new base::ListValue(); |
| 591 contexts->AppendString("blessed_extension"); | 587 contexts->AppendString("blessed_extension"); |
| 592 contexts->AppendString("unblessed_extension"); | 588 contexts->AppendString("unblessed_extension"); |
| 593 contexts->AppendString("content_script"); | 589 contexts->AppendString("content_script"); |
| 594 contexts->AppendString("web_page"); | 590 contexts->AppendString("web_page"); |
| 595 contexts->AppendString("blessed_web_page"); | 591 contexts->AppendString("blessed_web_page"); |
| 596 contexts->AppendString("webui"); | 592 contexts->AppendString("webui"); |
| 597 contexts->AppendString("extension_service_worker"); | 593 contexts->AppendString("extension_service_worker"); |
| 598 value->Set("contexts", contexts); | 594 value->Set("contexts", contexts); |
| 599 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); | 595 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); |
| 600 feature->Parse(value.get()); | 596 feature->Parse(value.get()); |
| 601 EXPECT_EQ(7u, feature->contexts()->size()); | 597 EXPECT_EQ(7u, feature->contexts().size()); |
| 602 EXPECT_TRUE( | 598 EXPECT_TRUE( |
| 603 STLCount(*(feature->contexts()), Feature::BLESSED_EXTENSION_CONTEXT)); | 599 STLCount(feature->contexts(), Feature::BLESSED_EXTENSION_CONTEXT)); |
| 604 EXPECT_TRUE( | 600 EXPECT_TRUE( |
| 605 STLCount(*(feature->contexts()), Feature::UNBLESSED_EXTENSION_CONTEXT)); | 601 STLCount(feature->contexts(), Feature::UNBLESSED_EXTENSION_CONTEXT)); |
| 606 EXPECT_TRUE( | 602 EXPECT_TRUE(STLCount(feature->contexts(), Feature::CONTENT_SCRIPT_CONTEXT)); |
| 607 STLCount(*(feature->contexts()), Feature::CONTENT_SCRIPT_CONTEXT)); | 603 EXPECT_TRUE(STLCount(feature->contexts(), Feature::WEB_PAGE_CONTEXT)); |
| 608 EXPECT_TRUE( | 604 EXPECT_TRUE(STLCount(feature->contexts(), Feature::BLESSED_WEB_PAGE_CONTEXT)); |
| 609 STLCount(*(feature->contexts()), Feature::WEB_PAGE_CONTEXT)); | |
| 610 EXPECT_TRUE( | |
| 611 STLCount(*(feature->contexts()), Feature::BLESSED_WEB_PAGE_CONTEXT)); | |
| 612 | 605 |
| 613 value->SetString("contexts", "all"); | 606 value->SetString("contexts", "all"); |
| 614 std::unique_ptr<SimpleFeature> feature2(new SimpleFeature()); | 607 std::unique_ptr<SimpleFeature> feature2(new SimpleFeature()); |
| 615 feature2->Parse(value.get()); | 608 feature2->Parse(value.get()); |
| 616 EXPECT_EQ(*(feature->contexts()), *(feature2->contexts())); | 609 EXPECT_EQ(feature->contexts(), feature2->contexts()); |
| 617 } | 610 } |
| 618 | 611 |
| 619 TEST_F(SimpleFeatureTest, ParseLocation) { | 612 TEST_F(SimpleFeatureTest, ParseLocation) { |
| 620 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 613 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 621 value->SetString("location", "component"); | 614 value->SetString("location", "component"); |
| 622 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); | 615 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); |
| 623 feature->Parse(value.get()); | 616 feature->Parse(value.get()); |
| 624 EXPECT_EQ(SimpleFeature::COMPONENT_LOCATION, feature->location()); | 617 EXPECT_EQ(SimpleFeature::COMPONENT_LOCATION, feature->location()); |
| 625 } | 618 } |
| 626 | 619 |
| 627 TEST_F(SimpleFeatureTest, ParsePlatforms) { | 620 TEST_F(SimpleFeatureTest, ParsePlatforms) { |
| 628 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 621 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 629 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); | 622 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); |
| 630 base::ListValue* platforms = new base::ListValue(); | 623 base::ListValue* platforms = new base::ListValue(); |
| 631 value->Set("platforms", platforms); | 624 value->Set("platforms", platforms); |
| 632 feature->Parse(value.get()); | 625 feature->Parse(value.get()); |
| 633 EXPECT_TRUE(feature->platforms()->empty()); | 626 EXPECT_TRUE(feature->platforms().empty()); |
| 634 | 627 |
| 635 platforms->AppendString("chromeos"); | 628 platforms->AppendString("chromeos"); |
| 636 feature->Parse(value.get()); | 629 feature->Parse(value.get()); |
| 637 EXPECT_FALSE(feature->platforms()->empty()); | 630 EXPECT_FALSE(feature->platforms().empty()); |
| 638 EXPECT_EQ(Feature::CHROMEOS_PLATFORM, *feature->platforms()->begin()); | 631 EXPECT_EQ(Feature::CHROMEOS_PLATFORM, *feature->platforms().begin()); |
| 639 | 632 |
| 640 platforms->Clear(); | 633 platforms->Clear(); |
| 641 platforms->AppendString("win"); | 634 platforms->AppendString("win"); |
| 642 feature->Parse(value.get()); | 635 feature->Parse(value.get()); |
| 643 EXPECT_FALSE(feature->platforms()->empty()); | 636 EXPECT_FALSE(feature->platforms().empty()); |
| 644 EXPECT_EQ(Feature::WIN_PLATFORM, *feature->platforms()->begin()); | 637 EXPECT_EQ(Feature::WIN_PLATFORM, *feature->platforms().begin()); |
| 645 | 638 |
| 646 platforms->Clear(); | 639 platforms->Clear(); |
| 647 platforms->AppendString("win"); | 640 platforms->AppendString("win"); |
| 648 platforms->AppendString("chromeos"); | 641 platforms->AppendString("chromeos"); |
| 649 feature->Parse(value.get()); | 642 feature->Parse(value.get()); |
| 650 std::vector<Feature::Platform> expected_platforms; | 643 std::vector<Feature::Platform> expected_platforms; |
| 651 expected_platforms.push_back(Feature::CHROMEOS_PLATFORM); | 644 expected_platforms.push_back(Feature::CHROMEOS_PLATFORM); |
| 652 expected_platforms.push_back(Feature::WIN_PLATFORM); | 645 expected_platforms.push_back(Feature::WIN_PLATFORM); |
| 653 | 646 |
| 654 EXPECT_FALSE(feature->platforms()->empty()); | 647 EXPECT_FALSE(feature->platforms().empty()); |
| 655 EXPECT_EQ(expected_platforms, *feature->platforms()); | 648 EXPECT_EQ(expected_platforms, feature->platforms()); |
| 656 } | 649 } |
| 657 | 650 |
| 658 TEST_F(SimpleFeatureTest, ParseManifestVersion) { | 651 TEST_F(SimpleFeatureTest, ParseManifestVersion) { |
| 659 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 652 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 660 value->SetInteger("min_manifest_version", 1); | 653 value->SetInteger("min_manifest_version", 1); |
| 661 value->SetInteger("max_manifest_version", 5); | 654 value->SetInteger("max_manifest_version", 5); |
| 662 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); | 655 std::unique_ptr<SimpleFeature> feature(new SimpleFeature()); |
| 663 feature->Parse(value.get()); | 656 feature->Parse(value.get()); |
| 664 EXPECT_EQ(1, feature->min_manifest_version()); | 657 EXPECT_EQ(1, feature->min_manifest_version()); |
| 665 EXPECT_EQ(5, feature->max_manifest_version()); | 658 EXPECT_EQ(5, feature->max_manifest_version()); |
| 666 } | 659 } |
| 667 | 660 |
| 668 TEST_F(SimpleFeatureTest, Inheritance) { | 661 TEST_F(SimpleFeatureTest, Inheritance) { |
| 669 SimpleFeature feature; | 662 SimpleFeature feature; |
| 670 feature.whitelist()->push_back("foo"); | 663 feature.whitelist_.push_back("foo"); |
| 671 feature.extension_types()->push_back(Manifest::TYPE_THEME); | 664 feature.extension_types_.push_back(Manifest::TYPE_THEME); |
| 672 feature.contexts()->push_back(Feature::BLESSED_EXTENSION_CONTEXT); | 665 feature.contexts_.push_back(Feature::BLESSED_EXTENSION_CONTEXT); |
| 673 feature.set_location(SimpleFeature::COMPONENT_LOCATION); | 666 feature.set_location(SimpleFeature::COMPONENT_LOCATION); |
| 674 feature.platforms()->push_back(Feature::CHROMEOS_PLATFORM); | 667 feature.platforms_.push_back(Feature::CHROMEOS_PLATFORM); |
| 675 feature.set_min_manifest_version(1); | 668 feature.set_min_manifest_version(1); |
| 676 feature.set_max_manifest_version(2); | 669 feature.set_max_manifest_version(2); |
| 677 | 670 |
| 678 // Test additive parsing. Parsing an empty dictionary should result in no | 671 // Test additive parsing. Parsing an empty dictionary should result in no |
| 679 // changes to a SimpleFeature. | 672 // changes to a SimpleFeature. |
| 680 base::DictionaryValue definition; | 673 base::DictionaryValue definition; |
| 681 feature.Parse(&definition); | 674 feature.Parse(&definition); |
| 682 EXPECT_EQ(1u, feature.whitelist()->size()); | 675 EXPECT_EQ(1u, feature.whitelist().size()); |
| 683 EXPECT_EQ(1u, feature.extension_types()->size()); | 676 EXPECT_EQ(1u, feature.extension_types().size()); |
| 684 EXPECT_EQ(1u, feature.contexts()->size()); | 677 EXPECT_EQ(1u, feature.contexts().size()); |
| 685 EXPECT_EQ(1, STLCount(*(feature.whitelist()), "foo")); | 678 EXPECT_EQ(1, STLCount(feature.whitelist(), "foo")); |
| 686 EXPECT_EQ(SimpleFeature::COMPONENT_LOCATION, feature.location()); | 679 EXPECT_EQ(SimpleFeature::COMPONENT_LOCATION, feature.location()); |
| 687 EXPECT_EQ(1u, feature.platforms()->size()); | 680 EXPECT_EQ(1u, feature.platforms().size()); |
| 688 EXPECT_EQ(1, STLCount(*(feature.platforms()), Feature::CHROMEOS_PLATFORM)); | 681 EXPECT_EQ(1, STLCount(feature.platforms(), Feature::CHROMEOS_PLATFORM)); |
| 689 EXPECT_EQ(1, feature.min_manifest_version()); | 682 EXPECT_EQ(1, feature.min_manifest_version()); |
| 690 EXPECT_EQ(2, feature.max_manifest_version()); | 683 EXPECT_EQ(2, feature.max_manifest_version()); |
| 691 | 684 |
| 692 base::ListValue* whitelist = new base::ListValue(); | 685 base::ListValue* whitelist = new base::ListValue(); |
| 693 base::ListValue* extension_types = new base::ListValue(); | 686 base::ListValue* extension_types = new base::ListValue(); |
| 694 base::ListValue* contexts = new base::ListValue(); | 687 base::ListValue* contexts = new base::ListValue(); |
| 695 whitelist->AppendString("bar"); | 688 whitelist->AppendString("bar"); |
| 696 extension_types->AppendString("extension"); | 689 extension_types->AppendString("extension"); |
| 697 contexts->AppendString("unblessed_extension"); | 690 contexts->AppendString("unblessed_extension"); |
| 698 definition.Set("whitelist", whitelist); | 691 definition.Set("whitelist", whitelist); |
| 699 definition.Set("extension_types", extension_types); | 692 definition.Set("extension_types", extension_types); |
| 700 definition.Set("contexts", contexts); | 693 definition.Set("contexts", contexts); |
| 701 // Can't test location or platform because we only have one value so far. | 694 // Can't test location or platform because we only have one value so far. |
| 702 definition.Set("min_manifest_version", new base::FundamentalValue(2)); | 695 definition.Set("min_manifest_version", new base::FundamentalValue(2)); |
| 703 definition.Set("max_manifest_version", new base::FundamentalValue(3)); | 696 definition.Set("max_manifest_version", new base::FundamentalValue(3)); |
| 704 | 697 |
| 705 feature.Parse(&definition); | 698 feature.Parse(&definition); |
| 706 EXPECT_EQ(1u, feature.whitelist()->size()); | 699 EXPECT_EQ(1u, feature.whitelist().size()); |
| 707 EXPECT_EQ(1u, feature.extension_types()->size()); | 700 EXPECT_EQ(1u, feature.extension_types().size()); |
| 708 EXPECT_EQ(1u, feature.contexts()->size()); | 701 EXPECT_EQ(1u, feature.contexts().size()); |
| 709 EXPECT_EQ(1, STLCount(*(feature.whitelist()), "bar")); | 702 EXPECT_EQ(1, STLCount(feature.whitelist(), "bar")); |
| 703 EXPECT_EQ(1, STLCount(feature.extension_types(), Manifest::TYPE_EXTENSION)); |
| 710 EXPECT_EQ(1, | 704 EXPECT_EQ(1, |
| 711 STLCount(*(feature.extension_types()), Manifest::TYPE_EXTENSION)); | 705 STLCount(feature.contexts(), Feature::UNBLESSED_EXTENSION_CONTEXT)); |
| 712 EXPECT_EQ(1, | |
| 713 STLCount( | |
| 714 *(feature.contexts()), Feature::UNBLESSED_EXTENSION_CONTEXT)); | |
| 715 EXPECT_EQ(2, feature.min_manifest_version()); | 706 EXPECT_EQ(2, feature.min_manifest_version()); |
| 716 EXPECT_EQ(3, feature.max_manifest_version()); | 707 EXPECT_EQ(3, feature.max_manifest_version()); |
| 717 } | 708 } |
| 718 | 709 |
| 719 TEST_F(SimpleFeatureTest, CommandLineSwitch) { | 710 TEST_F(SimpleFeatureTest, CommandLineSwitch) { |
| 720 SimpleFeature feature; | 711 SimpleFeature feature; |
| 721 feature.set_command_line_switch("laser-beams"); | 712 feature.set_command_line_switch("laser-beams"); |
| 722 { | 713 { |
| 723 EXPECT_EQ(Feature::MISSING_COMMAND_LINE_SWITCH, | 714 EXPECT_EQ(Feature::MISSING_COMMAND_LINE_SWITCH, |
| 724 feature.IsAvailableToEnvironment().result()); | 715 feature.IsAvailableToEnvironment().result()); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 EXPECT_NE(Feature::IS_AVAILABLE, | 967 EXPECT_NE(Feature::IS_AVAILABLE, |
| 977 feature | 968 feature |
| 978 ->IsAvailableToManifest("1", Manifest::TYPE_EXTENSION, | 969 ->IsAvailableToManifest("1", Manifest::TYPE_EXTENSION, |
| 979 Manifest::INVALID_LOCATION, | 970 Manifest::INVALID_LOCATION, |
| 980 Feature::UNSPECIFIED_PLATFORM) | 971 Feature::UNSPECIFIED_PLATFORM) |
| 981 .result()); | 972 .result()); |
| 982 } | 973 } |
| 983 } | 974 } |
| 984 | 975 |
| 985 } // namespace extensions | 976 } // namespace extensions |
| OLD | NEW |