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

Unified Diff: chrome/browser/apps/drive/drive_app_converter_browsertest.cc

Issue 308003005: app_list: Drive app integration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for comemnts in #5 Created 6 years, 6 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
Index: chrome/browser/apps/drive/drive_app_converter_browsertest.cc
diff --git a/chrome/browser/ui/app_list/drive/drive_app_converter_browsertest.cc b/chrome/browser/apps/drive/drive_app_converter_browsertest.cc
similarity index 85%
rename from chrome/browser/ui/app_list/drive/drive_app_converter_browsertest.cc
rename to chrome/browser/apps/drive/drive_app_converter_browsertest.cc
index ec6ba393ac920a8ed4fe7d16bfe79e5a26e7a014..31c0ba6e1dfe5a48e9c6de71174d8cbeec166c76 100644
--- a/chrome/browser/ui/app_list/drive/drive_app_converter_browsertest.cc
+++ b/chrome/browser/apps/drive/drive_app_converter_browsertest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/app_list/drive/drive_app_converter.h"
+#include "chrome/browser/apps/drive/drive_app_converter.h"
#include <utility>
@@ -15,6 +15,7 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
+#include "chrome/common/extensions/sync_helper.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension.h"
@@ -23,6 +24,10 @@
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
+using extensions::AppLaunchInfo;
+using extensions::Extension;
+using extensions::ExtensionRegistry;
+
namespace {
const char kAppName[] = "Test drive app";
@@ -30,7 +35,7 @@ const char kAppUrl[] = "http://foobar.com/drive_app";
} // namespace
-class DriveAppConverterTest : public ExtensionBrowserTest {
+class DriveAppConverterTest : public ExtensionBrowserTest {
public:
DriveAppConverterTest() {}
virtual ~DriveAppConverterTest() {}
@@ -102,22 +107,22 @@ class DriveAppConverterTest : public ExtensionBrowserTest {
IN_PROC_BROWSER_TEST_F(DriveAppConverterTest, GoodApp) {
InstallAndWaitFinish(GetTestDriveApp());
- const extensions::Extension* app = converter()->app();
+ const Extension* app = converter()->app();
ASSERT_TRUE(app != NULL);
EXPECT_EQ(kAppName, app->name());
EXPECT_TRUE(app->is_hosted_app());
EXPECT_TRUE(app->from_bookmark());
- EXPECT_EQ(GURL(kAppUrl), extensions::AppLaunchInfo::GetLaunchWebURL(app));
+ EXPECT_EQ(GURL(kAppUrl), AppLaunchInfo::GetLaunchWebURL(app));
EXPECT_EQ(extensions::LAUNCH_CONTAINER_TAB,
- extensions::AppLaunchInfo::GetLaunchContainer(app));
+ AppLaunchInfo::GetLaunchContainer(app));
EXPECT_EQ(0u, app->GetActivePermissions()->apis().size());
EXPECT_EQ(1u, extensions::IconsInfo::GetIcons(app).map().size());
- const extensions::Extension* installed =
- extensions::ExtensionSystem::Get(profile())
- ->extension_service()
- ->GetInstalledExtension(app->id());
+ const Extension* installed = extensions::ExtensionSystem::Get(profile())
+ ->extension_service()
+ ->GetInstalledExtension(app->id());
EXPECT_EQ(app, installed);
+ EXPECT_FALSE(extensions::sync_helper::IsSyncable(app));
}
IN_PROC_BROWSER_TEST_F(DriveAppConverterTest, BadApp) {
@@ -134,14 +139,14 @@ IN_PROC_BROWSER_TEST_F(DriveAppConverterTest, BadApp) {
IN_PROC_BROWSER_TEST_F(DriveAppConverterTest, InstallTwice) {
InstallAndWaitFinish(GetTestDriveApp());
- const extensions::Extension* first_install = converter()->app();
+ const Extension* first_install = converter()->app();
ASSERT_TRUE(first_install != NULL);
const std::string first_install_id = first_install->id();
const base::Version first_install_version(first_install->VersionString());
ASSERT_TRUE(first_install_version.IsValid());
InstallAndWaitFinish(GetTestDriveApp());
- const extensions::Extension* second_install = converter()->app();
+ const Extension* second_install = converter()->app();
ASSERT_TRUE(second_install != NULL);
// Two different app instances.

Powered by Google App Engine
This is Rietveld 408576698