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

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

Issue 115253002: [Files.app] Fix a potential error in ShareDialog/FileManagerBrowserTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years 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
« no previous file with comments | « chrome/test/data/chromeos/file_manager/share_dialog_mock/main.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * @enum {string} 8 * @enum {string}
9 * @const 9 * @const
10 */ 10 */
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 }, 975 },
976 // Wait until the share dialog's contents are shown. 976 // Wait until the share dialog's contents are shown.
977 function(result) { 977 function(result) {
978 chrome.test.assertTrue(result); 978 chrome.test.assertTrue(result);
979 callRemoteTestUtil('waitForElement', 979 callRemoteTestUtil('waitForElement',
980 appId, 980 appId,
981 ['.share-dialog-webview-wrapper.loaded'], 981 ['.share-dialog-webview-wrapper.loaded'],
982 this.next); 982 this.next);
983 }, 983 },
984 function(result) { 984 function(result) {
985 chrome.test.assertTrue(!!result);
985 callRemoteTestUtil('waitForStyles', 986 callRemoteTestUtil('waitForStyles',
986 appId, 987 appId,
987 [{ 988 [{
988 query: '.share-dialog-webview-wrapper.loaded', 989 query: '.share-dialog-webview-wrapper.loaded',
989 styles: { 990 styles: {
990 width: '350px', 991 width: '350px',
991 height: '250px' 992 height: '250px'
992 } 993 }
993 }], 994 }],
994 this.next); 995 this.next);
995 }, 996 },
996 // Wait until the share dialog's contents are shown. 997 // Wait until the share dialog's contents are shown.
997 function(result) { 998 function(result) {
998 callRemoteTestUtil('executeScriptInWebView', 999 callRemoteTestUtil('executeScriptInWebView',
999 appId, 1000 appId,
1000 ['.share-dialog-webview-wrapper.loaded webview', 1001 ['.share-dialog-webview-wrapper.loaded webview',
1001 'document.querySelector("button").click()'], 1002 'document.querySelector("button").click()'],
1002 this.next); 1003 this.next);
1003 }, 1004 },
1004 // Wait until the share dialog's contents are hidden. 1005 // Wait until the share dialog's contents are hidden.
1005 function(result) { 1006 function(result) {
1007 chrome.test.assertTrue(!!result);
1006 callRemoteTestUtil('waitForElement', 1008 callRemoteTestUtil('waitForElement',
1007 appId, 1009 appId,
1008 ['.share-dialog-webview-wrapper.loaded', 1010 ['.share-dialog-webview-wrapper.loaded',
1009 null, // iframeQuery 1011 null, // iframeQuery
1010 true], // inverse 1012 true], // inverse
1011 this.next); 1013 this.next);
1012 }, 1014 },
1013 // Check for Javascript errros. 1015 // Check for Javascript errros.
1014 function() { 1016 function() {
1015 checkIfNoErrorsOccured(this.next); 1017 checkIfNoErrorsOccured(this.next);
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 this.next); 1779 this.next);
1778 }, 1780 },
1779 // Verify the thumbnail. 1781 // Verify the thumbnail.
1780 function(element) { 1782 function(element) {
1781 chrome.test.assertTrue(element.attributes.src.indexOf( 1783 chrome.test.assertTrue(element.attributes.src.indexOf(
1782 'data:image/jpeg') === 0); 1784 'data:image/jpeg') === 0);
1783 checkIfNoErrorsOccured(this.next); 1785 checkIfNoErrorsOccured(this.next);
1784 } 1786 }
1785 ]); 1787 ]);
1786 }; 1788 };
OLDNEW
« no previous file with comments | « chrome/test/data/chromeos/file_manager/share_dialog_mock/main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698