Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js |
| diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js |
| index 747f41a5b153962f66955c24c1e2096d1ccb572b..0f1fd057fe0a32c31daf7c3a18f4c99812dbeaaa 100644 |
| --- a/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js |
| +++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js |
| @@ -25,7 +25,8 @@ var EXPECTED_FILES_BEFORE_DRIVE = [ |
| ['world.mpeg', '1,000 bytes', 'MPEG video', 'Jul 4, 2012 10:35 AM'], |
| ['My Desktop Background.png', '1 KB', 'PNG image', 'Jan 18, 2038 1:02 AM'], |
| ['photos', '--', 'Folder', 'Jan 1, 1980 11:59 PM'], |
| - ['Test Document.gdoc','--','Google document','Apr 10, 2013 4:20 PM'] |
| + ['Test Document.gdoc','--','Google document','Apr 10, 2013 4:20 PM'], |
| + ['Test Shared Document.gdoc','--','Google document','Mar 20, 2013 10:40 PM'] |
| ].sort(); |
| /** |
| @@ -74,6 +75,7 @@ var EXPECTED_FILES_IN_RECENT = [ |
| ['world.mpeg', '1,000 bytes', 'MPEG video', 'Jul 4, 2012 10:35 AM'], |
| ['My Desktop Background.png', '1 KB', 'PNG image', 'Jan 18, 2038 1:02 AM'], |
| ['Test Document.gdoc','--','Google document','Apr 10, 2013 4:20 PM'], |
| + ['Test Shared Document.gdoc','--','Google document','Mar 20, 2013 10:40 PM'] |
| ].sort(); |
| /** |
| @@ -88,6 +90,16 @@ var EXPECTED_FILES_IN_OFFLINE = [ |
| ]; |
| /** |
| + * Expected files shown in "Shared with me", which should be the entries labeled |
| + * with "shared-with-me". |
| + * @type {Array.<Array.<string>>} |
| + * @const |
| + */ |
| +var EXPECTED_FILES_IN_SHARED_WITH_ME = [ |
| + ['Test Shared Document.gdoc','--','Google document','Mar 20, 2013 10:40 PM'] |
| +]; |
| + |
| +/** |
| * Namespace for test cases. |
| */ |
| var testcase = {}; |
| @@ -237,6 +249,32 @@ testcase.openSidebarOffline = function() { |
| }; |
| /** |
| + * Tests opening the "Shared with me" on the sidebar navigation by clicking the |
| + * icon, and checks contenets of the file list. Only the entries labeled with |
|
mtomasz
2013/04/18 09:46:03
contenets -> contents
Haruki Sato
2013/04/18 11:33:44
Done. Thanks.
|
| + * "shared-with-me" should be shown. |
| + */ |
| +testcase.openSidebarSharedWithMe = function() { |
| + console.log(' haruki DEBUG: openSidebarSharedWithMe'); |
|
mtomasz
2013/04/18 09:46:03
Remove debugs after they are not needed.
Haruki Sato
2013/04/18 11:33:44
Done. Thanks!
|
| + var onFileListChange = chrome.test.callbackPass(function(actualFilesAfter) { |
| + chrome.test.assertEq(EXPECTED_FILES_IN_SHARED_WITH_ME, actualFilesAfter); |
| + }); |
| + |
| + setupAndWaitUntilReady('/drive/root/', function(appId) { |
| + // Use the icon for a click target. |
| + callRemoteTestUtil( |
| + 'fakeMouseClick', appId, ['[volume-type-icon=drive_shared_with_me]'], |
| + function(result) { |
| + chrome.test.assertFalse(!result); |
| + callRemoteTestUtil( |
| + 'waitForFileListChange', |
| + appId, |
| + [getExpectedFilesBefore(true /* isDrive */).length], |
| + onFileListChange); |
| + }); |
| + }); |
| +}; |
| + |
| +/** |
| * Tests autocomplete with a query 'hello'. This test is only available for |
| * Drive. |
| */ |