Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / extension_special_storage_policy_unittest.cc
index 06a5d33..d62eb47 100644 (file)
@@ -35,23 +35,21 @@ class ExtensionSpecialStoragePolicyTest : public testing::Test {
           expected_change_flags_(0) {
     }
 
-    virtual void OnGranted(const GURL& origin,
-                           int change_flags) OVERRIDE {
+    void OnGranted(const GURL& origin, int change_flags) override {
       EXPECT_EQ(expected_type_, NOTIFICATION_TYPE_GRANT);
       EXPECT_EQ(expected_origin_, origin);
       EXPECT_EQ(expected_change_flags_, change_flags);
       expected_type_ = NOTIFICATION_TYPE_NONE;
     }
 
-    virtual void OnRevoked(const GURL& origin,
-                           int change_flags) OVERRIDE {
+    void OnRevoked(const GURL& origin, int change_flags) override {
       EXPECT_EQ(expected_type_, NOTIFICATION_TYPE_REVOKE);
       EXPECT_EQ(expected_origin_, origin);
       EXPECT_EQ(expected_change_flags_, change_flags);
       expected_type_ = NOTIFICATION_TYPE_NONE;
     }
 
-    virtual void OnCleared() OVERRIDE {
+    void OnCleared() override {
       EXPECT_EQ(expected_type_, NOTIFICATION_TYPE_CLEAR);
       expected_type_ = NOTIFICATION_TYPE_NONE;
     }
@@ -92,9 +90,7 @@ class ExtensionSpecialStoragePolicyTest : public testing::Test {
     DISALLOW_COPY_AND_ASSIGN(PolicyChangeObserver);
   };
 
-  virtual void SetUp() OVERRIDE {
-    policy_ = new ExtensionSpecialStoragePolicy(NULL);
-  }
+  void SetUp() override { policy_ = new ExtensionSpecialStoragePolicy(NULL); }
 
   scoped_refptr<Extension> CreateProtectedApp() {
 #if defined(OS_WIN)
@@ -198,7 +194,7 @@ TEST_F(ExtensionSpecialStoragePolicyTest, EmptyPolicy) {
 
 TEST_F(ExtensionSpecialStoragePolicyTest, AppWithProtectedStorage) {
   scoped_refptr<Extension> extension(CreateProtectedApp());
-  policy_->GrantRightsForExtension(extension.get());
+  policy_->GrantRightsForExtension(extension.get(), NULL);
   ExtensionSet protecting_extensions;
   protecting_extensions.Insert(extension);
   ExtensionSet empty_set;
@@ -219,7 +215,7 @@ TEST_F(ExtensionSpecialStoragePolicyTest, AppWithProtectedStorage) {
 
 TEST_F(ExtensionSpecialStoragePolicyTest, AppWithUnlimitedStorage) {
   scoped_refptr<Extension> extension(CreateUnlimitedApp());
-  policy_->GrantRightsForExtension(extension.get());
+  policy_->GrantRightsForExtension(extension.get(), NULL);
   ExtensionSet protecting_extensions;
   protecting_extensions.Insert(extension);
   ExtensionSet empty_set;
@@ -253,9 +249,9 @@ TEST_F(ExtensionSpecialStoragePolicyTest, CanQueryDiskSize) {
   scoped_refptr<Extension> regular_app(CreateRegularApp());
   scoped_refptr<Extension> protected_app(CreateProtectedApp());
   scoped_refptr<Extension> unlimited_app(CreateUnlimitedApp());
-  policy_->GrantRightsForExtension(regular_app.get());
-  policy_->GrantRightsForExtension(protected_app.get());
-  policy_->GrantRightsForExtension(unlimited_app.get());
+  policy_->GrantRightsForExtension(regular_app.get(), NULL);
+  policy_->GrantRightsForExtension(protected_app.get(), NULL);
+  policy_->GrantRightsForExtension(unlimited_app.get(), NULL);
 
   EXPECT_FALSE(policy_->CanQueryDiskSize(kHttpUrl));
   EXPECT_FALSE(policy_->CanQueryDiskSize(kExtensionUrl));
@@ -268,7 +264,7 @@ TEST_F(ExtensionSpecialStoragePolicyTest, HasIsolatedStorage) {
   const GURL kHttpUrl("http://foo");
   const GURL kExtensionUrl("chrome-extension://bar");
   scoped_refptr<Extension> app(CreateRegularApp());
-  policy_->GrantRightsForExtension(app.get());
+  policy_->GrantRightsForExtension(app.get(), NULL);
 
   EXPECT_FALSE(policy_->HasIsolatedStorage(kHttpUrl));
   EXPECT_FALSE(policy_->HasIsolatedStorage(kExtensionUrl));
@@ -278,8 +274,8 @@ TEST_F(ExtensionSpecialStoragePolicyTest, HasIsolatedStorage) {
 TEST_F(ExtensionSpecialStoragePolicyTest, OverlappingApps) {
   scoped_refptr<Extension> protected_app(CreateProtectedApp());
   scoped_refptr<Extension> unlimited_app(CreateUnlimitedApp());
-  policy_->GrantRightsForExtension(protected_app.get());
-  policy_->GrantRightsForExtension(unlimited_app.get());
+  policy_->GrantRightsForExtension(protected_app.get(), NULL);
+  policy_->GrantRightsForExtension(unlimited_app.get(), NULL);
   ExtensionSet protecting_extensions;
   ExtensionSet empty_set;
   protecting_extensions.Insert(protected_app);
@@ -371,14 +367,14 @@ TEST_F(ExtensionSpecialStoragePolicyTest, NotificationTest) {
   for (size_t i = 0; i < arraysize(apps); ++i) {
     SCOPED_TRACE(testing::Message() << "i: " << i);
     observer.ExpectGrant(apps[i]->id(), change_flags[i]);
-    policy_->GrantRightsForExtension(apps[i].get());
+    policy_->GrantRightsForExtension(apps[i].get(), NULL);
     message_loop.RunUntilIdle();
     EXPECT_TRUE(observer.IsCompleted());
   }
 
   for (size_t i = 0; i < arraysize(apps); ++i) {
     SCOPED_TRACE(testing::Message() << "i: " << i);
-    policy_->GrantRightsForExtension(apps[i].get());
+    policy_->GrantRightsForExtension(apps[i].get(), NULL);
     message_loop.RunUntilIdle();
     EXPECT_TRUE(observer.IsCompleted());
   }