Commit 4ead1735 authored by François Degros's avatar François Degros Committed by Commit Bot

[Files App] Minor cleanup in zipFileCannotOpen

Fixed comments.
Made zipFileCannotOpen more consistent with zipCannotZipFile.

BUG=912236
TEST=browser_tests --gtest_filter="*/zip*"

Change-Id: I8ff87195fff80435e1f78ffc29fee509b06bac1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225996
Commit-Queue: François Degros <fdegros@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773984}
parent 59e331da
...@@ -117,7 +117,7 @@ testcase.zipFileOpenDownloads = async () => { ...@@ -117,7 +117,7 @@ testcase.zipFileOpenDownloads = async () => {
}; };
/** /**
* Tests zip file open (aka unzip) from Downloads. * Tests that trying to mount a ZIP file fails.
*/ */
testcase.zipFileCannotOpen = async () => { testcase.zipFileCannotOpen = async () => {
// Open Files app on Downloads containing a zip file. // Open Files app on Downloads containing a zip file.
...@@ -136,13 +136,12 @@ testcase.zipFileCannotOpen = async () => { ...@@ -136,13 +136,12 @@ testcase.zipFileCannotOpen = async () => {
!!await remoteCall.callRemoteTestUtil('fakeKeyDown', appId, key), !!await remoteCall.callRemoteTestUtil('fakeKeyDown', appId, key),
'fakeKeyDown failed'); 'fakeKeyDown failed');
// Check for the error message displayed to the user about ZipNoNaCl. // Check: an error message should appear.
const errorMsg = const element =
await remoteCall.waitForElement(appId, ['#progress-panel', '#open-zip']); await remoteCall.waitForElement(appId, ['#progress-panel', '#open-zip']);
chrome.test.assertEq( chrome.test.assertEq(
errorMsg.attributes['primary-text'],
'Cannot open zip file: Not implemented yet', 'Cannot open zip file: Not implemented yet',
'failed to find ZipNoNaCl error message'); element.attributes['primary-text']);
}; };
/** /**
...@@ -452,8 +451,9 @@ testcase.zipCannotZipFile = async () => { ...@@ -452,8 +451,9 @@ testcase.zipCannotZipFile = async () => {
// Check: a zip error message should appear. // Check: a zip error message should appear.
const element = const element =
await remoteCall.waitForElement(appId, ['#progress-panel', '#no_zip']); await remoteCall.waitForElement(appId, ['#progress-panel', '#no_zip']);
const error = element.attributes['primary-text']; chrome.test.assertEq(
chrome.test.assertEq(error, 'Cannot zip selection: Not implemented yet'); 'Cannot zip selection: Not implemented yet',
element.attributes['primary-text']);
}; };
......
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