New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 732083 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Out until 24 Jan
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

case where webNavigation event doesn't fire

Reported by huglovef...@gmail.com, Jun 10 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3126.0 Safari/537.36

Steps to reproduce the problem:
1. install the attached extension
2. inspect its background page
3. open the attached testpage.html
4. click the link that says "click me" (it refreshes the page)

What is the expected behavior?
the background page should log details about the navigation to the console

What went wrong?
nothing is logged, meaning the navigation event listener wasn't called

WebStore page: 

Did this work before? Yes 50.0.2646.0

Chrome version: 61.0.3126.0  Channel: canary
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

last version with correct behavior:
Revision ad618c3357e189fb685ea88fe4b8b25ac34f2c75-refs/heads/master@{#374424}

first version with incorrect behavior:
Revision 4d966747c892278a7d84e2343602ae770de03eda-refs/heads/master@{#374605}

probably related change:
https://chromium.googlesource.com/chromium/src/+/e419e2171ce22acc291c5c30c251633daeb0740d
 
extension.zip
564 bytes Download
testpage.html
306 bytes View Download

Comment 1 by woxxom@gmail.com, Jun 11 2017

Narrowed bisect range: 374499 (good) - 374513 (bad), 50.0.2646.0
https://chromium.googlesource.com/chromium/src/+log/ec7d228c..5aa87513?pretty=fuller
Suspecting the above-mentioned r374505 "Refactor the implementation of the webNavigation extension API"

Comment 2 by ajha@chromium.org, Jun 14 2017

Labels: Needs-Bisect Needs-Triage-M61

Comment 3 by ajha@chromium.org, Jun 14 2017

Cc: ajha@chromium.org
Labels: -Pri-2 -Needs-Bisect -Needs-Triage-M61 M-61 hasbisect OS-Linux OS-Mac Pri-1
Owner: nasko@chromium.org
Status: Assigned (was: Unconfirmed)
Able to observe the similar behavior on chrome canary version(61.0.3130.0) on Windows-10, Mac OS 10.12.5 and Linux Ubuntu 14.04.

Based on the bisect result in C#1, assigning to nasko@ for further investigation of this.

Thank you! 

Comment 4 by nasko@chromium.org, Jun 16 2017

Unfortunately I won't be able to look into what broke this in the next week or two. I have reproduced locally, so once I get to it I have reliable test case. Thanks!

Comment 5 by nasko@chromium.org, Jul 26 2017

Thanks for filing the bug. I finally had a chance to dig into the code and find out what is happening. There is indeed a bug where the URLs are being checked and the code assumes that it is a fragment navigation, because the URLs before and after differ only in the fragment. I'll put up a fix for this.
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/540bf8c405967d64ab8b646a86f5af78670ce6b7

commit 540bf8c405967d64ab8b646a86f5af78670ce6b7
Author: Nasko Oskov <nasko@chromium.org>
Date: Thu Jul 27 22:52:29 2017

Fix webNavigation extension API to properly fire onCommit event.

When classifying navigations, the webNavigation API incorrectly uses
only the URL difference to check whether a navigation is fragment one
or not. This creates a problem when real navigations occur that differ
only in the fragment.
The fix is to ensure that only same-document navigations are considered
as fragment ones.

Bug:  732083 
Change-Id: If3a6753e1a78169e031d330f742dae298c098ae1
Reviewed-on: https://chromium-review.googlesource.com/588027
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490040}
[modify] https://crrev.com/540bf8c405967d64ab8b646a86f5af78670ce6b7/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
[add] https://crrev.com/540bf8c405967d64ab8b646a86f5af78670ce6b7/chrome/test/data/extensions/api_test/webnavigation/referenceFragment/b.html
[add] https://crrev.com/540bf8c405967d64ab8b646a86f5af78670ce6b7/chrome/test/data/extensions/api_test/webnavigation/referenceFragment/b.js
[modify] https://crrev.com/540bf8c405967d64ab8b646a86f5af78670ce6b7/chrome/test/data/extensions/api_test/webnavigation/referenceFragment/test_referenceFragment.js

Comment 7 by nasko@chromium.org, Jul 28 2017

Status: Fixed (was: Assigned)

Sign in to add a comment