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

Unified Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/restore_prefs.js

Issue 304683002: Add the browser test for the new gallery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 7 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/test/data/extensions/api_test/file_manager_browsertest/restore_prefs.js
diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/restore_prefs.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/restore_prefs.js
deleted file mode 100644
index 3952ab3e6d6e20819821277968ded5d49b9a2fc5..0000000000000000000000000000000000000000
--- a/chrome/test/data/extensions/api_test/file_manager_browsertest/restore_prefs.js
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) 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 restoring the sorting order.
- */
-testcase.restoreSortColumn = function() {
- var appId;
- var EXPECTED_FILES = TestEntryInfo.getExpectedRows([
- ENTRIES.world,
- ENTRIES.photos,
- ENTRIES.desktop,
- ENTRIES.hello,
- ENTRIES.beautiful
- ]);
- StepsRunner.run([
- // Set up File Manager.
- function() {
- setupAndWaitUntilReady(null, RootPath.DOWNLOADS, this.next);
- },
- // Sort by name.
- function(inAppId) {
- appId = inAppId;
- callRemoteTestUtil('fakeMouseClick',
- appId,
- ['.table-header-cell:nth-of-type(1)'],
- this.next);
- },
- // Check the sorted style of the header.
- function() {
- waitForElement(appId, '.table-header-sort-image-asc').then(this.next);
- },
- // Sort by name.
- function() {
- callRemoteTestUtil('fakeMouseClick',
- appId,
- ['.table-header-cell:nth-of-type(1)'],
- this.next);
- },
- // Check the sorted style of the header.
- function() {
- waitForElement(appId, '.table-header-sort-image-desc').
- then(this.next);
- },
- // Check the sorted files.
- function() {
- waitForFiles(appId, EXPECTED_FILES, {orderCheck: true}).then(this.next);
- },
- // Open another window, where the sorted column should be restored.
- function() {
- setupAndWaitUntilReady(null, RootPath.DOWNLOADS, this.next);
- },
- // Check the sorted style of the header.
- function(inAppId) {
- appId = inAppId;
- waitForElement(appId, '.table-header-sort-image-desc').
- then(this.next);
- },
- // Check the sorted files.
- function() {
- waitForFiles(appId, EXPECTED_FILES, {orderCheck: true}).then(this.next);
- },
- // Check the error.
- function() {
- checkIfNoErrorsOccured(this.next);
- }
- ]);
-};
-
-/**
- * Tests restoring the current view (the file list or the thumbnail grid).
- */
-testcase.restoreCurrentView = function() {
- var appId;
- StepsRunner.run([
- // Set up File Manager.
- function() {
- setupAndWaitUntilReady(null, RootPath.DOWNLOADS, this.next);
- },
- // Check the initial view.
- function(inAppId) {
- appId = inAppId;
- waitForElement(appId, '.thumbnail-grid[hidden]').then(this.next);
- },
- // Opens the gear menu.
- function() {
- callRemoteTestUtil('fakeMouseClick',
- appId,
- ['#gear-button'],
- this.next);
- },
- // Change the current view.
- function() {
- callRemoteTestUtil('fakeMouseClick',
- appId,
- ['#thumbnail-view'],
- this.next);
- },
- // Check the new current view.
- function(result) {
- chrome.test.assertTrue(result);
- waitForElement(appId, '.detail-table[hidden]').then(this.next);
- },
- // Open another window, where the current view is restored.
- function() {
- openNewWindow(null, RootPath.DOWNLOADS, this.next);
- },
- // Check the current view.
- function(inAppId) {
- appId = inAppId;
- waitForElement(appId, '.detail-table[hidden]').then(this.next);
- },
- // Check the error.
- function() {
- checkIfNoErrorsOccured(this.next);
- }
- ]);
-};

Powered by Google App Engine
This is Rietveld 408576698