PDF extension should not navigate current tab when PDF requests navigation |
|||
Issue description
Chrome Version: 57.0.2945.0, 55.0.2883.75
OS: Windows 10
What steps will reproduce the problem?
(1) data:text/html,<embed src="data:application/pdf,">
(2) Right click on the failed PDF embed and choose Inspect.
(3) In the DevTools opened for the GuestView, type:
setTimeout(function () {chrome.tabs.update({url: "chrome://settings"});}, 5000);
(4) Before the 5 second timer finishes, switch to a different tab.
What is the expected result?
The tab with the PDF should navigate, not the new tab.
What happens instead?
The new (unrelated) tab navigates.
This was discovered in issue 661831, which only fixed part of the problem. The PDF extension should be specifying a specific tab to navigate if it uses chrome.tabs.update to handle navigations triggered by the PDF.
(I'm not sure what script code is possible within a PDF, but if it can set timers and navigate, then this bug will be a problem.)
raymes@: Can you help triage and find an owner or fix?
,
Dec 13 2016
,
Dec 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cf2bc970b5ee619700cc1f334b4c2145cf0a5ab5 commit cf2bc970b5ee619700cc1f334b4c2145cf0a5ab5 Author: mcnee <mcnee@chromium.org> Date: Wed Dec 14 18:57:54 2016 PDF viewer: Specify tabId when navigating with chrome.tabs.update. Currently, the use of chrome.tabs.update to navigate defaults to using the selected tab. If another tab is selected before the navigation is performed, this other tab will be navigated instead of the PDF viewer's tab. We pass the viewer's tabId to chrome.tabs.update to ensure the correct tab is navigated. BUG= 672563 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2568903002 Cr-Commit-Position: refs/heads/master@{#438563} [modify] https://crrev.com/cf2bc970b5ee619700cc1f334b4c2145cf0a5ab5/chrome/browser/pdf/pdf_extension_test.cc [modify] https://crrev.com/cf2bc970b5ee619700cc1f334b4c2145cf0a5ab5/chrome/browser/resources/pdf/navigator.js [modify] https://crrev.com/cf2bc970b5ee619700cc1f334b4c2145cf0a5ab5/chrome/browser/resources/pdf/pdf.js
,
Dec 14 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by raymes@chromium.org
, Dec 12 2016Owner: mcnee@chromium.org