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

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

Issue 332873008: Add gallery tests to rotate an image. (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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/slide_mode.js
diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/slide_mode.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/slide_mode.js
index 186ffe862a5447d22f70250609655e142ddd3c53..8a78b4dd588585699f9b06996a057b37d5cb9d70 100644
--- a/chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/slide_mode.js
+++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/gallery/slide_mode.js
@@ -5,47 +5,6 @@
'use strict';
/**
- * Waits until the expected image is shown.
- *
- * @param {document} document Document.
- * @param {number} width Expected width of the image.
- * @param {number} height Expected height of the image.
- * @param {string} name Expected name of the image.
- * @return {Promise} Promsie to be fulfilled when the check is passed.
- */
-function waitForSlideImage(document, width, height, name) {
- var expected = {width: width, height: height, name: name};
- return repeatUntil(function() {
- var fullResCanvas = document.querySelector(
- '.gallery[mode="slide"] .content canvas.fullres');
- var nameBox = document.querySelector('.namebox');
- var actual = {
- width: fullResCanvas && fullResCanvas.width,
- height: fullResCanvas && fullResCanvas.height,
- name: nameBox && nameBox.value
- };
- if (!chrome.test.checkDeepEq(expected, actual)) {
- return pending('Slide mode state, expected is %j, actual is %j.',
- expected, actual);
- }
- return actual;
- });
-}
-
-/**
- * Shorthand for clicking an element.
- * @param {AppWindow} appWindow application window.
- * @param {string} query Query for the element.
- * @param {Promise} Promise to be fulfilled with the clicked element.
- */
-function waitAndClickElement(appWindow, query) {
- return waitForElement(appWindow, query).then(function(element) {
- element.click();
- return element;
- });
-}
-
-/**
* Runs a test to traverse images in the slide mode.
*
* @param {string} testVolumeName Test volume name passed to the addEntries

Powered by Google App Engine
This is Rietveld 408576698