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

Unified Diff: chrome/browser/resources/file_manager/js/share_client.js

Issue 22185002: Add browser test to the sharing dialog feature in Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed jsdoc. Created 7 years, 4 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/browser/resources/file_manager/js/share_client.js
diff --git a/chrome/browser/resources/file_manager/js/share_client.js b/chrome/browser/resources/file_manager/js/share_client.js
index d88f0140378d503b5007e07f9bb437e751d6a8cb..aecfd836d47c9c72674f1084111f07f26dc18d12 100644
--- a/chrome/browser/resources/file_manager/js/share_client.js
+++ b/chrome/browser/resources/file_manager/js/share_client.js
@@ -77,8 +77,9 @@ ShareClient.Observer.prototype.onClosed = function() {
* @private
*/
ShareClient.prototype.onMessage_ = function(e) {
- if (e.origin != ShareClient.SHARE_TARGET)
+ if (e.origin != ShareClient.SHARE_TARGET && !window.IN_TEST)
yoshiki 2013/08/05 16:19:38 How about creating utility functions to return the
mtomasz 2013/08/05 16:33:36 The origin can change for each test, since the tes
return;
+
var data = JSON.parse(e.data);
switch (data.type) {
case 'resize':
@@ -131,7 +132,8 @@ ShareClient.prototype.postMessage_ = function(type, opt_args) {
args: opt_args
};
this.webView_.contentWindow.postMessage(
- JSON.stringify(message), ShareClient.SHARE_TARGET);
+ JSON.stringify(message),
+ !window.IN_TEST ? ShareClient.SHARE_TARGET : '*');
};
/**

Powered by Google App Engine
This is Rietveld 408576698