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

Unified Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js

Issue 13896006: filemanager: Add a browsertest for the sidebar item "Shared with Me". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a merge failure and restore a test case. Created 7 years, 8 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
« no previous file with comments | « chrome/browser/google_apis/fake_drive_service_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5a0126003f939a64afb5ea71d2e094cb580b2bbe 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();
/**
@@ -85,6 +87,17 @@ var EXPECTED_FILES_IN_RECENT = [
*/
var EXPECTED_FILES_IN_OFFLINE = [
['Test Document.gdoc','--','Google document','Apr 10, 2013 4:20 PM'],
+ ['Test Shared Document.gdoc','--','Google document','Mar 20, 2013 10:40 PM']
+];
+
+/**
+ * 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']
];
/**
@@ -237,6 +250,31 @@ testcase.openSidebarOffline = function() {
};
/**
+ * Tests opening the "Shared with me" on the sidebar navigation by clicking the
+ * icon, and checks contents of the file list. Only the entries labeled with
+ * "shared-with-me" should be shown.
+ */
+testcase.openSidebarSharedWithMe = function() {
+ 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.
*/
« no previous file with comments | « chrome/browser/google_apis/fake_drive_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698