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

Side by Side Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/thumbnails.js

Issue 304683002: Add the browser test for the new gallery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 'use strict';
6
7 /**
8 * Tests if a thumbnail for the selected item shows up in the preview panel.
9 * This thumbnail is fetched via the image loader.
10 */
11 testcase.thumbnailsDownloads = function() {
12 var appId;
13 StepsRunner.run([
14 function() {
15 setupAndWaitUntilReady(null, RootPath.DOWNLOADS, this.next);
16 },
17 // Select the image.
18 function(inAppId) {
19 appId = inAppId;
20 callRemoteTestUtil('selectFile',
21 appId,
22 ['My Desktop Background.png'],
23 this.next);
24 },
25 // Wait until the thumbnail shows up.
26 function(result) {
27 chrome.test.assertTrue(result);
28 waitForElement(appId, '.preview-thumbnails .img-container img').
29 then(this.next);
30 },
31 // Verify the thumbnail.
32 function(element) {
33 chrome.test.assertTrue(element.attributes.src.indexOf(
34 'data:image/jpeg') === 0);
35 checkIfNoErrorsOccured(this.next);
36 }
37 ]);
38 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698