Commit 7da2d0dd authored by dpapad's avatar dpapad Committed by Chromium LUCI CQ

PDF Viewer: Rename "Full screen" to "Present" in overflow menu.

Bug: 1148478
Change-Id: I0bf08e670f3e34d8c213d94c4f293973a2029459
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2593232
Auto-Submit: dpapad <dpapad@chromium.org>
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
Reviewed-by: default avatarDaniel Hosseinian <dhoss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837175}
parent 2e653741
......@@ -57,7 +57,6 @@ void AddPdfViewerStrings(base::Value* dict) {
{"bookmarkExpandIconAriaLabel", IDS_PDF_BOOKMARK_EXPAND_ICON_ARIA_LABEL},
{"downloadEdited", IDS_PDF_DOWNLOAD_EDITED},
{"downloadOriginal", IDS_PDF_DOWNLOAD_ORIGINAL},
{"fullscreen", IDS_PDF_FULLSCREEN},
{"labelPageNumber", IDS_PDF_LABEL_PAGE_NUMBER},
{"menu", IDS_MENU},
{"moreActions", IDS_DOWNLOAD_MORE_ACTIONS},
......@@ -65,6 +64,7 @@ void AddPdfViewerStrings(base::Value* dict) {
{"passwordInvalid", IDS_PDF_PASSWORD_INVALID},
{"passwordPrompt", IDS_PDF_NEED_PASSWORD},
{"passwordSubmit", IDS_PDF_PASSWORD_SUBMIT},
{"present", IDS_PDF_PRESENT},
{"thumbnailPageAriaLabel", IDS_PDF_THUMBNAIL_PAGE_ARIA_LABEL},
{"tooltipDocumentOutline", IDS_PDF_TOOLTIP_DOCUMENT_OUTLINE},
{"tooltipDownload", IDS_PDF_TOOLTIP_DOWNLOAD},
......
......@@ -273,10 +273,10 @@
<template is="dom-if" if="[[presentationModeEnabled]]">
<hr>
<button id="fullscreen-button" class="dropdown-item"
on-click="onFullscreenClick_">
<button id="present-button" class="dropdown-item"
on-click="onPresentClick_">
<span class="check-container" aria-hidden="true"></span>
$i18n{fullscreen}
$i18n{present}
</button>
</template>
</cr-action-menu>
......
......@@ -219,10 +219,10 @@ export class ViewerPdfToolbarNewElement extends PolymerElement {
}
/** @private */
onFullscreenClick_() {
onPresentClick_() {
assert(this.presentationModeEnabled);
this.getMenu_().close();
this.dispatchEvent(new CustomEvent('fullscreen-click'));
this.dispatchEvent(new CustomEvent('present-click'));
}
/**
......
......@@ -175,7 +175,7 @@
on-display-annotations-changed="onDisplayAnnotationsChanged_"
on-dropdown-opened="onDropdownOpened_"
on-fit-to-changed="onFitToChanged"
on-fullscreen-click="onFullscreenClick_"
on-present-click="onPresentClick_"
on-annotation-mode-dialog-confirmed="onResetView_"
on-sidenav-toggle-click="onSidenavToggleClick_"
on-two-up-view-changed="onTwoUpViewChanged_"
......
......@@ -705,7 +705,7 @@ export class PDFViewerElement extends PDFViewerBaseElement {
}
/** @private */
onFullscreenClick_() {
onPresentClick_() {
assert(this.presentationModeEnabled_);
const onWheel = e => {
......
......@@ -22,7 +22,7 @@ async function ensureFullscreen() {
}
const toolbar = viewer.shadowRoot.querySelector('viewer-pdf-toolbar-new');
toolbar.dispatchEvent(new CustomEvent('fullscreen-click'));
toolbar.dispatchEvent(new CustomEvent('present-click'));
await eventToPromise('fullscreenchange', scroller);
}
......
......@@ -298,17 +298,17 @@ const tests = [
toggleButton.click();
},
async function testEnterFullscreenButton() {
async function testPresentButton() {
const toolbar = createToolbar();
let button = toolbar.shadowRoot.querySelector('#fullscreen-button');
let button = toolbar.shadowRoot.querySelector('#present-button');
chrome.test.assertEq(null, button);
toolbar.presentationModeEnabled = true;
await flushTasks();
button = toolbar.shadowRoot.querySelector('#fullscreen-button');
button = toolbar.shadowRoot.querySelector('#present-button');
chrome.test.assertTrue(button !== null);
const whenFired = eventToPromise('fullscreen-click', toolbar);
const whenFired = eventToPromise('present-click', toolbar);
button.click();
await whenFired;
chrome.test.succeed();
......
......@@ -7,8 +7,8 @@
<message name="IDS_PDF_DOWNLOAD_EDITED" desc="The label for the menu option to download the edited PDF document (with user's changes).">
With your changes
</message>
<message name="IDS_PDF_FULLSCREEN" desc="The label for the menu option to switch to fullscreen mode.">
Full screen
<message name="IDS_PDF_PRESENT" desc="The label for the menu option to switch to Presentation mode.">
Present
</message>
<message name="IDS_PDF_NEED_PASSWORD" desc="A message asking the user for a password to open a PDF file.">
This document is password protected. Please enter a password.
......
63b8c9b6924406cdbc617e3209fbade2e54b1fe3
\ No newline at end of file
28f23534c6f8874de0170989e700bce657623f5f
\ No newline at end of file
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