Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Issue 1304373007: Browser test for LoadDataWithBaseURL reload (Closed)

Created:
5 years, 3 months ago by boliu
Modified:
5 years ago
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, creis+watch_chromium.org, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix LoadDataWithBaseURL reload On a LoadDataWithBaseURL, renderer reports the history URL as the URL of the navigation, and is stored in the NavigationEntry::GetURL field, overwriting the data URL originally stored there. This causes a crash on a reload since the data URL has been lost. Fix this by saving the data URL DocumentState so that renderer can return it as the URL of the load. This means that GetURL and GetOriginalURL for a LoadDataWithBaseURL will now return the data URL, not the history URL. Also fix WebFrame::LoadData to not create new navigation for a reload. BUG=522567 Committed: https://crrev.com/15890e4b345bfef3854566899a0a462f7c5939a9 Cr-Commit-Position: refs/heads/master@{#361481}

Patch Set 1 #

Patch Set 2 : check renderer alive #

Patch Set 3 : potential fix #

Patch Set 4 : original_data_url #

Patch Set 5 : no reachableURL, check with base in DidNavigate #

Patch Set 6 : renderer side #

Patch Set 7 : store in DocumentState #

Patch Set 8 : did navigate virtual url #

Patch Set 9 : limit DidNavigate virtual url to data load #

Patch Set 10 : rebase #

Patch Set 11 : rebase, new test, fix blink reload, clean ups #

Patch Set 12 : more clean ups #

Total comments: 23

Patch Set 13 : upload for tests, do not review #

Patch Set 14 : address most review comments, try virtual URL from DidCommitProvisionalLoad #

Patch Set 15 : reverts #

Total comments: 15

Patch Set 16 : new test #

Total comments: 7

Patch Set 17 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -20 lines) Patch
M content/browser/frame_host/navigation_controller_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +87 lines, -6 lines 0 comments Download
M content/public/renderer/document_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +21 lines, -0 lines 0 comments Download
M content/public/renderer/document_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +48 lines, -11 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 32 (5 generated)
boliu
Added one workaround for the LoadDataWithBaseURL crash, but looks like it's still not quite right, ...
5 years, 3 months ago (2015-08-28 16:45:00 UTC) #2
boliu
On 2015/08/28 16:45:00, boliu wrote: > Added one workaround for the LoadDataWithBaseURL crash, but looks ...
5 years, 3 months ago (2015-08-28 20:30:53 UTC) #3
boliu
On 2015/08/28 20:30:53, boliu wrote: > On 2015/08/28 16:45:00, boliu wrote: > > Added one ...
5 years, 3 months ago (2015-08-28 20:47:42 UTC) #4
Charlie Reis
Hmm. I'm not thrilled with adding yet another URL that might disagree with other state ...
5 years, 3 months ago (2015-08-28 23:51:27 UTC) #5
boliu
Friendly ping on high level review here :)
5 years, 3 months ago (2015-09-08 23:57:44 UTC) #6
Charlie Reis
On 2015/09/08 23:57:44, boliu wrote: > Friendly ping on high level review here :) Sorry ...
5 years, 3 months ago (2015-09-10 23:15:36 UTC) #7
boliu
On 2015/09/10 23:15:36, Charlie Reis (slow till 9-14) wrote: > On 2015/09/08 23:57:44, boliu wrote: ...
5 years, 3 months ago (2015-09-10 23:26:22 UTC) #8
boliu
On 2015/09/10 23:26:22, boliu wrote: > On 2015/09/10 23:15:36, Charlie Reis (slow till 9-14) wrote: ...
5 years, 3 months ago (2015-09-10 23:30:50 UTC) #9
boliu
Ping on this. Quite late in m46, so mind if I merge the same crash ...
5 years, 3 months ago (2015-09-24 16:58:48 UTC) #10
Charlie Reis
On 2015/09/24 16:58:48, boliu wrote: > Ping on this. Quite late in m46, so mind ...
5 years, 3 months ago (2015-09-24 17:09:15 UTC) #11
boliu
On 2015/09/24 17:09:15, Charlie Reis wrote: > On 2015/09/24 16:58:48, boliu wrote: > > Ping ...
5 years, 3 months ago (2015-09-24 17:14:56 UTC) #12
Charlie Reis
I'm revisiting this one (patch set 10), since we both have some concerns about the ...
5 years, 1 month ago (2015-11-19 20:08:36 UTC) #13
boliu
Thanks for the detailed reply! On 2015/11/19 20:08:36, Charlie Reis wrote: > I'm revisiting this ...
5 years, 1 month ago (2015-11-19 20:42:14 UTC) #14
Charlie Reis
On 2015/11/19 20:42:14, boliu wrote: > Thanks for the detailed reply! > > On 2015/11/19 ...
5 years, 1 month ago (2015-11-19 20:51:49 UTC) #15
boliu
PTAL Fixed the new nav entry issue. Rebased and cleaned up everything a bit. On ...
5 years, 1 month ago (2015-11-20 17:52:33 UTC) #16
Charlie Reis
Very glad to see it passing the new test! I'm wondering if we can get ...
5 years, 1 month ago (2015-11-20 21:30:12 UTC) #18
boliu
Please don't review new patch sets yet. But a comment about getting the data URL ...
5 years, 1 month ago (2015-11-23 16:15:59 UTC) #19
boliu
Other than the DocumentState vs NavigationState comment, PS15 should have addressed everything else. PTAL https://codereview.chromium.org/1304373007/diff/220001/content/browser/frame_host/navigator_impl.cc ...
5 years ago (2015-11-23 22:32:25 UTC) #20
Charlie Reis
This is great. I almost approved but noticed one possible bug in didCreateDataSource. Since that ...
5 years ago (2015-11-24 00:22:59 UTC) #21
boliu
Added new test but not all checks pass. So turns out in-page navigation is semi-broken ...
5 years ago (2015-11-24 19:03:25 UTC) #22
Charlie Reis
I think I'm happy with where it is now, with the plan to fix in-page ...
5 years ago (2015-11-24 19:32:39 UTC) #23
Charlie Reis
https://codereview.chromium.org/1304373007/diff/300001/content/browser/frame_host/navigation_controller_impl_browsertest.cc File content/browser/frame_host/navigation_controller_impl_browsertest.cc (right): https://codereview.chromium.org/1304373007/diff/300001/content/browser/frame_host/navigation_controller_impl_browsertest.cc#newcode150 content/browser/frame_host/navigation_controller_impl_browsertest.cc:150: std::string script = "document.getElementById('fraglink').click()"; On 2015/11/24 19:32:38, Charlie Reis ...
5 years ago (2015-11-24 19:38:20 UTC) #24
boliu
Thanks. All comments on test addressed. +fsamuel for web_view_guest.cc
5 years ago (2015-11-24 19:55:55 UTC) #26
Fady Samuel
web_view lgtm
5 years ago (2015-11-24 22:17:02 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304373007/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304373007/320001
5 years ago (2015-11-24 22:18:19 UTC) #30
commit-bot: I haz the power
Committed patchset #17 (id:320001)
5 years ago (2015-11-24 23:08:13 UTC) #31
commit-bot: I haz the power
5 years ago (2015-11-24 23:09:52 UTC) #32
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/15890e4b345bfef3854566899a0a462f7c5939a9
Cr-Commit-Position: refs/heads/master@{#361481}

Powered by Google App Engine
This is Rietveld 408576698