Commit 00ac53ef authored by hirono@chromium.org's avatar hirono@chromium.org

Gallery.app: Replace the existing gallery with the new separated gallery.

This CL starts to use the new separated gallery without specifying the
file-manager-enable-new-gallery flag.

BUG=358698
TEST=none

Review URL: https://codereview.chromium.org/285373015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271546 0039d316-1c4b-4281-b951-d872f2087c98
parent 1593e8eb
......@@ -722,12 +722,9 @@ INSTANTIATE_TEST_CASE_P(
TestParameter(NOT_IN_GUEST_MODE, "fileDisplayDrive")));
INSTANTIATE_TEST_CASE_P(
OpenSpecialTypes,
OpenZipFiles,
FileManagerBrowserTest,
::testing::Values(TestParameter(IN_GUEST_MODE, "galleryOpenDownloads"),
TestParameter(NOT_IN_GUEST_MODE, "galleryOpenDownloads"),
TestParameter(NOT_IN_GUEST_MODE, "galleryOpenDrive"),
TestParameter(IN_GUEST_MODE, "zipOpenDownloads"),
::testing::Values(TestParameter(IN_GUEST_MODE, "zipOpenDownloads"),
TestParameter(NOT_IN_GUEST_MODE, "zipOpenDownloads"),
TestParameter(NOT_IN_GUEST_MODE, "zipOpenDrive")));
......
......@@ -296,7 +296,9 @@ void ComponentLoader::AddVideoPlayerExtension() {
}
void ComponentLoader::AddGalleryExtension() {
// TODO(hirono): Disable the new experimental gallery in M36 temporarily.
#if defined(OS_CHROMEOS)
Add(IDR_GALLERY_MANIFEST, base::FilePath(FILE_PATH_LITERAL("gallery")));
#endif
}
void ComponentLoader::AddHangoutServicesExtension() {
......
......@@ -19,7 +19,7 @@
"multi_profile.js",
"navigation_list.js",
"open_audio_files.js",
"open_special_types.js",
"open_zip_files.js",
"open_video_files.js",
"restore_geometry.js",
"restore_prefs.js",
......
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
/**
* Tests if the gallery shows up for the selected image and that the image
* gets displayed.
*
* @param {string} path Directory path to be tested.
*/
function galleryOpen(path) {
var appId;
StepsRunner.run([
function() {
setupAndWaitUntilReady(null, path, this.next);
},
// Resize the window to desired dimensions to avoid flakyness.
function(inAppId) {
appId = inAppId;
callRemoteTestUtil('resizeWindow',
appId,
[480, 480],
this.next);
},
// Select the image.
function(result) {
chrome.test.assertTrue(result);
callRemoteTestUtil('openFile',
appId,
['My Desktop Background.png'],
this.next);
},
// Wait for the image in the gallery's screen image.
function(result) {
chrome.test.assertTrue(result);
waitForElement(appId,
'.gallery .content canvas.image',
'iframe.overlay-pane').then(this.next);
},
// Verify the gallery's screen image.
function(element) {
chrome.test.assertEq('480', element.attributes.width);
chrome.test.assertEq('360', element.attributes.height);
// Get the full-resolution image.
waitForElement(appId,
'.gallery .content canvas.fullres',
'iframe.overlay-pane').then(this.next);
},
// Verify the gallery's full resolution image.
function(element) {
chrome.test.assertEq('800', element.attributes.width);
chrome.test.assertEq('600', element.attributes.height);
checkIfNoErrorsOccured(this.next);
}
]);
}
/**
* Tests if we can open and unmount a zip file.
* @param {string} path Directory path to be tested.
......@@ -124,14 +71,6 @@ function zipOpen(path) {
]);
}
testcase.galleryOpenDownloads = function() {
galleryOpen(RootPath.DOWNLOADS);
};
testcase.galleryOpenDrive = function() {
galleryOpen(RootPath.DRIVE);
};
testcase.zipOpenDownloads = function() {
zipOpen(RootPath.DOWNLOADS);
};
......
......@@ -119,10 +119,6 @@ const char kEnterpriseEnrollmentSkipRobotAuth[] =
const char kFileManagerEnableNewAudioPlayer[] =
"file-manager-enable-new-audio-player";
// Enables the new gallery in the Files.app.
const char kFileManagerEnableNewGallery[] =
"file-manager-enable-new-gallery";
// Passed to Chrome the first time that it's run after the system boots.
// Not passed on restart after sign out.
const char kFirstExecAfterBoot[] = "first-exec-after-boot";
......
......@@ -51,7 +51,6 @@ CHROMEOS_EXPORT extern const char kEnterpriseEnrollmentInitialModulus[];
CHROMEOS_EXPORT extern const char kEnterpriseEnrollmentModulusLimit[];
CHROMEOS_EXPORT extern const char kEnterpriseEnrollmentSkipRobotAuth[];
CHROMEOS_EXPORT extern const char kFileManagerEnableNewAudioPlayer[];
CHROMEOS_EXPORT extern const char kFileManagerEnableNewGallery[];
CHROMEOS_EXPORT extern const char kFirstExecAfterBoot[];
CHROMEOS_EXPORT extern const char kForceLoginManagerInTests[];
CHROMEOS_EXPORT extern const char kGuestSession[];
......
......@@ -94,21 +94,6 @@
"filesystem:*.txt"
]
},
{
"id": "gallery",
"default_title": "__MSG_OPEN_ACTION__",
"default_icon": "common/images/file_types/200/image.png",
"file_filters": [
// Image formats
"filesystem:*.bmp",
"filesystem:*.gif",
"filesystem:*.ico",
"filesystem:*.jpg",
"filesystem:*.jpeg",
"filesystem:*.png",
"filesystem:*.webp"
]
},
{
"id": "gallery-video",
"default_title": "__MSG_OPEN_ACTION__",
......
......@@ -25,7 +25,7 @@
"chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj"
],
"file_handlers": {
"video": {
"image": {
"types": [
"image/*"
],
......@@ -39,7 +39,7 @@
"webp"
],
// TODO(hirono): Rename and localize this.
"title": "Open in new Gallery"
"title": "Open"
}
},
"app": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment