Commit 6c7ccc16 authored by yoshiki@chromium.org's avatar yoshiki@chromium.org

[Files.app] Fix a potential issue in ShareDialog/FileManagerBrowserTest

In the share dialog mock, the wrong function was called and this patch fixes it. Currently that didn't cause a test failure because the 'waitElement' has some bug as well .

And this patch added some assertion into the test for reliability.

BUG=328762
TEST=manually
R=mtomasz@chromium.org

Review URL: https://codereview.chromium.org/115253002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241146 0039d316-1c4b-4281-b951-d872f2087c98
parent c193c814
......@@ -7,7 +7,7 @@
<body style="display: none">
<div id="container">
This is a mocked sharing dialog.
<button onclick="javascript:client.setVisible(false);">Close</button>
<button onclick="javascript:shareDialog.setVisible(false);">Close</button>
</div>
</body>
</html>
......@@ -92,6 +92,15 @@ shareDialog.onResizeComplete_ = function() {
container.style.height = shareDialog.TARGET_HEIGHT + 'px';
};
/**
* Changes the visibility of the dialog.
* @param {boolean} visible True to set the dialog visible, false to set it
* invisible.
*/
shareDialog.setVisible = function(visible) {
shareDialog.sendMessage_('setVisible', {visible: visible});
};
/**
* Prepares the embedder to make the contents visible.
*/
......
......@@ -982,6 +982,7 @@ testcase.intermediate.share = function(path) {
this.next);
},
function(result) {
chrome.test.assertTrue(!!result);
callRemoteTestUtil('waitForStyles',
appId,
[{
......@@ -1003,6 +1004,7 @@ testcase.intermediate.share = function(path) {
},
// Wait until the share dialog's contents are hidden.
function(result) {
chrome.test.assertTrue(!!result);
callRemoteTestUtil('waitForElement',
appId,
['.share-dialog-webview-wrapper.loaded',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment