Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1360)

Unified Diff: chrome/browser/chromeos/drive/drive_app_registry_unittest.cc

Issue 125163004: Clean up DriveAppRegistry (part 1 of 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused helper function. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/drive/drive_app_registry.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/drive_app_registry_unittest.cc
diff --git a/chrome/browser/chromeos/drive/drive_app_registry_unittest.cc b/chrome/browser/chromeos/drive/drive_app_registry_unittest.cc
index 5bb44cad8e9768aae6bbfcf33aaddaeb3240d4a1..645961a119f0a181a78393c4782ebddfa45b7c32 100644
--- a/chrome/browser/chromeos/drive/drive_app_registry_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_app_registry_unittest.cc
@@ -35,26 +35,19 @@ class DriveAppRegistryTest : public testing::Test {
}
bool VerifyApp(const ScopedVector<DriveAppInfo>& list,
- const std::string& web_store_id,
const std::string& app_id,
- const std::string& app_name,
- const std::string& object_type,
- bool is_primary) {
+ const std::string& app_name) {
bool found = false;
for (ScopedVector<DriveAppInfo>::const_iterator it = list.begin();
it != list.end(); ++it) {
const DriveAppInfo* app = *it;
- if (web_store_id == app->web_store_id) {
- EXPECT_EQ(app_id, app->app_id);
+ if (app_id == app->app_id) {
EXPECT_EQ(app_name, app->app_name);
- EXPECT_EQ(object_type, app->object_type);
- EXPECT_EQ(is_primary, app->is_primary_selector);
found = true;
break;
}
}
- EXPECT_TRUE(found) << "Unable to find app with web_store_id "
- << web_store_id;
+ EXPECT_TRUE(found) << "Unable to find app with app_id " << app_id;
return found;
}
@@ -74,24 +67,21 @@ TEST_F(DriveAppRegistryTest, LoadAndFindDriveApps) {
base::FilePath ext_file(FILE_PATH_LITERAL("drive/file.exe"));
web_apps_registry_->GetAppsForFile(ext_file.Extension(), "", &ext_results);
ASSERT_EQ(1U, ext_results.size());
- VerifyApp(ext_results, "abcdefghabcdefghabcdefghabcdefgh", "123456788192",
- "Drive app 1", "", true);
+ VerifyApp(ext_results, "123456788192", "Drive app 1");
// Find by primary MIME type.
ScopedVector<DriveAppInfo> primary_app;
web_apps_registry_->GetAppsForFile(base::FilePath::StringType(),
"application/vnd.google-apps.drive-sdk.123456788192", &primary_app);
ASSERT_EQ(1U, primary_app.size());
- VerifyApp(primary_app, "abcdefghabcdefghabcdefghabcdefgh", "123456788192",
- "Drive app 1", "", true);
+ VerifyApp(primary_app, "123456788192", "Drive app 1");
// Find by secondary MIME type.
ScopedVector<DriveAppInfo> secondary_app;
web_apps_registry_->GetAppsForFile(
base::FilePath::StringType(), "text/html", &secondary_app);
ASSERT_EQ(1U, secondary_app.size());
- VerifyApp(secondary_app, "abcdefghabcdefghabcdefghabcdefgh", "123456788192",
- "Drive app 1", "", false);
+ VerifyApp(secondary_app, "123456788192", "Drive app 1");
}
TEST_F(DriveAppRegistryTest, UpdateFromAppList) {
« no previous file with comments | « chrome/browser/chromeos/drive/drive_app_registry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698