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

Side by Side Diff: chrome/browser/resources/file_manager/background/js/test_util.js

Issue 188253002: Revert of [AudioPlayer] Add test for opening another file from Files.app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/file_manager_browsertest/background.js » ('j') | 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 /** 5 /**
6 * Namespace for test related things. 6 * Namespace for test related things.
7 */ 7 */
8 var test = test || {}; 8 var test = test || {};
9 9
10 /** 10 /**
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 var windowWrapper = background.appWindows[id]; 65 var windowWrapper = background.appWindows[id];
66 windows[id] = { 66 windows[id] = {
67 innerWidth: windowWrapper.contentWindow.innerWidth, 67 innerWidth: windowWrapper.contentWindow.innerWidth,
68 innerHeight: windowWrapper.contentWindow.innerHeight 68 innerHeight: windowWrapper.contentWindow.innerHeight
69 }; 69 };
70 } 70 }
71 return windows; 71 return windows;
72 }; 72 };
73 73
74 /** 74 /**
75 * Closes the specified window.
76 *
77 * @param {string} appId AppId of window to be closed.
78 * @return {boolean} Result: True if success, false otherwise.
79 */
80 test.util.sync.closeWindow = function(appId) {
81 if (appId in background.appWindows &&
82 background.appWindows[appId].contentWindow) {
83 background.appWindows[appId].close();
84 return true;
85 }
86 return false;
87 };
88
89 /**
90 * Gets a document in the Files.app's window, including iframes. 75 * Gets a document in the Files.app's window, including iframes.
91 * 76 *
92 * @param {Window} contentWindow Window to be used. 77 * @param {Window} contentWindow Window to be used.
93 * @param {string=} opt_iframeQuery Query for the iframe. 78 * @param {string=} opt_iframeQuery Query for the iframe.
94 * @return {Document=} Returns the found document or undefined if not found. 79 * @return {Document=} Returns the found document or undefined if not found.
95 * @private 80 * @private
96 */ 81 */
97 test.util.sync.getDocument_ = function(contentWindow, opt_iframeQuery) { 82 test.util.sync.getDocument_ = function(contentWindow, opt_iframeQuery) {
98 if (opt_iframeQuery) { 83 if (opt_iframeQuery) {
99 var iframe = contentWindow.document.querySelector(opt_iframeQuery); 84 var iframe = contentWindow.document.querySelector(opt_iframeQuery);
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 return false; 647 return false;
663 } else { 648 } else {
664 console.error('Invalid function name.'); 649 console.error('Invalid function name.');
665 return false; 650 return false;
666 } 651 }
667 }); 652 });
668 }; 653 };
669 654
670 // Register the test utils. 655 // Register the test utils.
671 test.util.registerRemoteTestUtils(); 656 test.util.registerRemoteTestUtils();
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/file_manager_browsertest/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698