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 : '*'); |
}; |
/** |