Commit 1523a186 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

FileManagerUITest fixes to remove console error messages

Update some missing strings, CSS, and fileManagerPrivate API.

Bug: 1111393
Change-Id: I2cfcf722fa0982899b89b404a8eb030255251e71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2374188Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803315}
parent b330e6c0
...@@ -37,6 +37,12 @@ chrome.fileManagerPrivate = { ...@@ -37,6 +37,12 @@ chrome.fileManagerPrivate = {
NO_NETWORK: 'NO_NETWORK', NO_NETWORK: 'NO_NETWORK',
NO_SERVICE: 'NO_SERVICE', NO_SERVICE: 'NO_SERVICE',
}, },
InspectionType: {
NORMAL: 'normal',
CONSOLE: 'console',
ELEMENT: 'element',
BACKGROUND: 'background',
},
SearchType: { SearchType: {
ALL: 'ALL', ALL: 'ALL',
SHARED_WITH_ME: 'SHARED_WITH_ME', SHARED_WITH_ME: 'SHARED_WITH_ME',
...@@ -85,6 +91,9 @@ chrome.fileManagerPrivate = { ...@@ -85,6 +91,9 @@ chrome.fileManagerPrivate = {
// Returns opened|message_sent|failed|empty. // Returns opened|message_sent|failed|empty.
setTimeout(callback, 0, 'failed'); setTimeout(callback, 0, 'failed');
}, },
getContentMimeType: (entry, callback) => {
setTimeout(callback, 0, '');
},
getDriveConnectionState: (callback) => { getDriveConnectionState: (callback) => {
setTimeout(callback, 0, mockVolumeManager.getDriveConnectionState()); setTimeout(callback, 0, mockVolumeManager.getDriveConnectionState());
}, },
......
...@@ -10,8 +10,10 @@ loadTimeData.data = $GRDP; ...@@ -10,8 +10,10 @@ loadTimeData.data = $GRDP;
// Extend with additional fields not found in grdp files. // Extend with additional fields not found in grdp files.
loadTimeData.overrideValues({ loadTimeData.overrideValues({
'CROSTINI_ENABLED': true, 'CROSTINI_ENABLED': true,
'DRIVE_BIDIRECTIONAL_NATIVE_MESSAGING_ENABLED': false,
'FILES_NG_ENABLED': true, 'FILES_NG_ENABLED': true,
'FILES_TRANSFER_DETAILS_ENABLED': false, 'FILES_TRANSFER_DETAILS_ENABLED': false,
'FILTERS_IN_RECENTS_ENABLED': false,
'FEEDBACK_PANEL_ENABLED': false, 'FEEDBACK_PANEL_ENABLED': false,
'GOOGLE_DRIVE_REDEEM_URL': 'http://www.google.com/intl/en/chrome/devices' + 'GOOGLE_DRIVE_REDEEM_URL': 'http://www.google.com/intl/en/chrome/devices' +
'/goodies.html?utm_source=filesapp&utm_medium=banner&utm_campaign=gsg', '/goodies.html?utm_source=filesapp&utm_medium=banner&utm_campaign=gsg',
......
...@@ -123,23 +123,25 @@ def i18n(template): ...@@ -123,23 +123,25 @@ def i18n(template):
return re.sub(r'\$i18n(?:Raw)?\{(.*?)\}', repl, template) return re.sub(r'\$i18n(?:Raw)?\{(.*?)\}', repl, template)
# Copy tree from src_dir to dst_dir with substitutions. # Copy from src_dir to R_GEN/dst_dir with substitutions.
def copytree(src_dir, dst_dir): def copyresources(src_dir, dst_dir):
for root, _, files in os.walk(SRC + src_dir): for root, _, files in os.walk(SRC + src_dir):
for f in files: for f in files:
srcf = os.path.join(root[len(SRC):], f) srcf = os.path.join(root[len(SRC):], f)
dstf = dst_dir + srcf[len(src_dir):] dstf = R_GEN + dst_dir + srcf[len(src_dir):]
write(dstf, i18n(read(srcf).replace('chrome://resources/', GEN + R_GEN))) relpath = os.path.relpath(R_GEN, os.path.dirname(dstf)) + '/'
write(dstf, i18n(read(srcf).replace('chrome://resources/', relpath)))
# Copy any files required in chrome://resources/... into test/gen/resources. # Copy any files required in chrome://resources/... into test/gen/resources.
copytree('ui/webui/resources/', R_GEN) copyresources('ui/webui/resources/', '')
copytree('third_party/polymer/v1_0/components-chromium/', copyresources('third_party/polymer/v1_0/components-chromium/', 'polymer/v1_0/')
R_GEN + 'polymer/v1_0/')
shutil.rmtree(GEN + R_GEN + 'polymer/v1_0/polymer', ignore_errors=True) shutil.rmtree(GEN + R_GEN + 'polymer/v1_0/polymer', ignore_errors=True)
os.rename(GEN + R_GEN + 'polymer/v1_0/polymer2', os.rename(GEN + R_GEN + 'polymer/v1_0/polymer2',
GEN + R_GEN + 'polymer/v1_0/polymer') GEN + R_GEN + 'polymer/v1_0/polymer')
for css in glob.glob(GEN + '../../webui/resources/css/*.css'): for css in glob.glob(GEN + '../../webui/resources/css/*.css'):
shutil.copy(css, GEN + R_GEN + 'css/') shutil.copy(css, GEN + R_GEN + 'css/')
colors = 'chromeos/colors/cros_colors.generated.css'
write(GEN + R_GEN + colors, open(GEN + '../../' + colors).read())
# Substitute $i18n{}. # Substitute $i18n{}.
# Update relative paths, and paths to chrome://resources/. # Update relative paths, and paths to chrome://resources/.
......
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