[Extensions Cleanup] Remove state parameter from test UninstallExtension
Remove the Extension::State parameter in
ExtensionServiceTestWithInstall::UninstallExtension. The burden of
verifying the extension's state prior to uninstallation should be part
of the calling tests, rather than part of the UninstallExtension method,
in order to reduce complexity and improve predictability.
Bug: 794205
Change-Id: Ia00758b58e20786d43799ea33a2dd72cfa42c565
Reviewed-on: https://chromium-review.googlesource.com/823011
Reviewed-by: Istiaque Ahmed <[email protected]>
Commit-Queue: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#523999}
diff --git a/chrome/browser/extensions/extension_service_sync_unittest.cc b/chrome/browser/extensions/extension_service_sync_unittest.cc
index 2675109..87c004f 100644
--- a/chrome/browser/extensions/extension_service_sync_unittest.cc
+++ b/chrome/browser/extensions/extension_service_sync_unittest.cc
@@ -1305,10 +1305,13 @@
prefs->GetGrantedPermissions(good_crx);
EXPECT_EQ(test_case.expect_permissions_granted, !permissions->IsEmpty());
ASSERT_FALSE(service()->pending_extension_manager()->IsIdPending(good_crx));
+ if (test_case.sync_enabled)
+ EXPECT_TRUE(registry()->enabled_extensions().GetByID(good_crx));
+ else
+ EXPECT_TRUE(registry()->disabled_extensions().GetByID(good_crx));
// Remove the extension again, so we can install it again for the next case.
- UninstallExtension(good_crx, test_case.sync_enabled ? Extension::ENABLED
- : Extension::DISABLED);
+ UninstallExtension(good_crx);
}
}
@@ -1567,8 +1570,7 @@
EXPECT_EQ(test_case.expect_disable_reasons, prefs->GetDisableReasons(id));
// Remove the extension again, so we can install it again for the next case.
- UninstallExtension(
- id, expect_enabled ? Extension::ENABLED : Extension::DISABLED);
+ UninstallExtension(id);
}
}
@@ -1745,8 +1747,7 @@
}
// Remove the extension again, so we can install it again for the next case.
- UninstallExtension(
- id, expect_enabled ? Extension::ENABLED : Extension::DISABLED);
+ UninstallExtension(id);
}
}