[Extensions] Fix bug where placeholder extension icon is an unknown symbol (RTL)
The placeholder icon for an extension is the first letter of the extension's name on a grey background. extension->name() (which we currently use) is padded with formatting characters if RTL mode is enabled, and grabbing the first character in that case does not get us the extension's actual name. Fix is implemented by reversing the RTL adjustment of the extension's name before getting the first letter. Bug: 869358 Change-Id: I986c2aade64e981ce634f5d14befd21df759d9cd TEST: This behavior is difficult to automatically test. To test manually: 1) Load an extension without an icon set in the manifest and note the appearance of the placeholder icon. 2) Navigate to chrome://flags and toggle "force ui direction" to RTL (search for rtl to find this flag), then click to relaunch when prompted. 3) The extension placeholder icon's appearance should not change and should show the first letter of the extension's name as defined in the manifest. Change-Id: I986c2aade64e981ce634f5d14befd21df759d9cd Reviewed-on: https://chromium-review.googlesource.com/c/1302633Reviewed-by:Devlin <rdevlin.cronin@chromium.org> Commit-Queue: Kelvin Jiang <kelvinjiang@chromium.org> Cr-Commit-Position: refs/heads/master@{#604653}
Showing
Please register or sign in to comment