Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / declarative / rules_registry_with_cache_unittest.cc
index 6aa8a1c..d557eb3 100644 (file)
@@ -45,7 +45,7 @@ class RulesRegistryWithCacheTest : public testing::Test {
                                         &cache_delegate_,
                                         RulesRegistry::WebViewKey(0, 0))) {}
 
-  virtual void SetUp() {
+  void SetUp() override {
     env_.GetExtensionPrefs();  // Force creation before adding extensions.
     // Note that env_.MakeExtension below also forces the creation of
     // ExtensionService.
@@ -65,7 +65,7 @@ class RulesRegistryWithCacheTest : public testing::Test {
     CHECK_NE(extension2_->id(), extension1_->id());
   }
 
-  virtual ~RulesRegistryWithCacheTest() {}
+  ~RulesRegistryWithCacheTest() override {}
 
   std::string AddRule(const std::string& extension_id,
                       const std::string& rule_id,
@@ -254,16 +254,14 @@ TEST_F(RulesRegistryWithCacheTest, DeclarativeRulesStored) {
 
   scoped_ptr<base::ListValue> value(new base::ListValue);
   value->AppendBoolean(true);
-  cache_delegate->WriteToStorage(extension1_->id(),
-                                 value.PassAs<base::Value>());
+  cache_delegate->WriteToStorage(extension1_->id(), value.Pass());
   EXPECT_TRUE(cache_delegate->GetDeclarativeRulesStored(extension1_->id()));
   base::RunLoop().RunUntilIdle();
   EXPECT_EQ(write_count + 1, store->write_count());
   write_count = store->write_count();
 
   value.reset(new base::ListValue);
-  cache_delegate->WriteToStorage(extension1_->id(),
-                                 value.PassAs<base::Value>());
+  cache_delegate->WriteToStorage(extension1_->id(), value.Pass());
   EXPECT_FALSE(cache_delegate->GetDeclarativeRulesStored(extension1_->id()));
   base::RunLoop().RunUntilIdle();
   // No rules currently, but previously there were, so we expect a write.
@@ -271,8 +269,7 @@ TEST_F(RulesRegistryWithCacheTest, DeclarativeRulesStored) {
   write_count = store->write_count();
 
   value.reset(new base::ListValue);
-  cache_delegate->WriteToStorage(extension1_->id(),
-                                 value.PassAs<base::Value>());
+  cache_delegate->WriteToStorage(extension1_->id(), value.Pass());
   EXPECT_FALSE(cache_delegate->GetDeclarativeRulesStored(extension1_->id()));
   base::RunLoop().RunUntilIdle();
   EXPECT_EQ(write_count, store->write_count());