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

Issue 2694903007: Add a warning for the deprecation of content-initiated data URL navigations (Closed)

Created:
3 years, 10 months ago by meacer
Modified:
3 years, 9 months ago
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org, nasko, clamy
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a warning for the deprecation of content-initiated data URL navigations This CL adds a console warning when a page navigates the top level frame to a data URL. The browser tests are added to WebContentsImpl tests to be consistent with the view-source URL tests. This CL also updates most of the layout tests to avoid loading data URLs at the top level. The only exceptions are xss-DENIED-* tests which will be updated when the actual blocking happens. BUG=594215 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2694903007 Cr-Commit-Position: refs/heads/master@{#455226} Committed: https://chromium.googlesource.com/chromium/src/+/b29954e8ac243142eaedbcc3c6e54d480373ee38

Patch Set 1 #

Total comments: 8

Patch Set 2 : Move logging to DidCommitNavigation #

Patch Set 3 : Update the URL #

Patch Set 4 : Fix layout tests #

Patch Set 5 : Fix layout tests that do top-level navigations to data: URLs #

Total comments: 14

Patch Set 6 : creis comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -123 lines) Patch
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_browsertest.cc View 2 chunks +85 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/mozilla-focus-blur.html View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/mozilla-focus-blur-expected.txt View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/resources/file-origin-window-open-frame.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/Window/resources/file-origin-window-open-popup.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/Window/resources/mozilla-focus-blur-popup-blur.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dom/Window/resources/mozilla-focus-blur-popup-opener-focus.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/id-attribute-shared.html View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/id-attribute-shared-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/move-event-handler-between-framehosts.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/onunload.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/onunload-clears-onbeforeunload.html View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/onunload-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/onunload-not-on-body.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/onunload-not-on-body-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/onunload-window-property.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/onunload-window-property-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/page-visibility-unload.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/pageshow-pagehide-on-back-uncached.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-mouse-click.html View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-mouse-click-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/fast/events/resources/move-event-handler-between-framehosts-popup.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/events/resources/onunload-clears-onbeforeunload-success.html View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/events/resources/onunload-single-alert-success.html View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/events/resources/page-visibility-alert-success.html View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/files/null-origin-string.html View 1 2 3 4 5 3 chunks +15 lines, -4 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/files/resources/notify-no-crash.html View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/button-state-restore.html View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/multiple-form-submission-protection-mouse.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/radio/state-restore-radio-group.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/fast/forms/resources/multiple-form-submission-protection-post-target.html View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/saved-state-adoptNode-crash.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/select/select-state-restore.html View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/state-restore-hidden.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/state-restore-to-non-autocomplete-form.html View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/state-restore-to-non-edited-controls.html View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/state-save-of-detached-control.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/frames/location-redirect-user-gesture.html View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/frames/location-redirect-user-gesture-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/history/history-back-initial-vs-final-url.html View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/history/history-back-initial-vs-final-url-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/history/history-length-append-subframe-no-hash.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/history/history-length-append-subframe-no-hash-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/history/history-length-append-subframe-with-hash.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/history/history-length-append-subframe-with-hash-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/fast/history/resources/alert-then-back.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/history/resources/back-on-load.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/history/saves-state-after-fragment-nav.html View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/form-state-restore-with-frames.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/redirect-with-open-subframe.html View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/redirect-with-open-subframe-2.html View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/reload-zero-byte-plugin.html View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/reload-zero-byte-plugin-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/scroll-position-restoration-without-premature-clamping.html View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/scroll-position-restored-on-back-at-load-event.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied.html View 1 2 3 4 1 chunk +11 lines, -13 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/loader/stateobjects/pushstate-in-data-url-denied-expected.txt View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/geolocation-api/clear-watch-invalid-id-crash.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/geolocation-api/clear-watch-invalid-id-crash-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/geolocation-api/notimer-after-unload.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/geolocation-api/notimer-after-unload-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/appcache/fail-on-update.html View 1 2 3 4 1 chunk +1 line, -4 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/appcache/resources/notify-no-crash.html View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/loading/onload-vs-immediate-refresh.pl View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/resources/notify-success-on-load.html View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/resource-timing-iframe-restored-from-history.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/misc/resources/alert-then-back.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/misc/resources/notify-success.html View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/timer-vs-loading.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/dataURL/xss-DENIED-from-javascript-url-window-open-expected.txt View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open-expected.txt View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/originHeader/origin-header-for-data.html View 1 2 3 4 1 chunk +10 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/originHeader/origin-header-for-data-expected.txt View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/popup-allowed-by-sandbox-is-sandboxed.html View 1 2 3 4 1 chunk +7 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/popup-allowed-by-sandbox-is-sandboxed-control.html View 1 2 3 4 1 chunk +7 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/popup-allowed-by-sandbox-when-allowed.html View 1 2 3 4 1 chunk +10 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/send-on-abort.html View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/send-on-abort-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/inspector/tracing/resources/hello.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-load-event.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/media/adopt-node-crash.html View 1 2 3 4 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/plugins/plugin-initiate-popup-window.html View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/plugins/plugin-initiate-popup-window-expected.txt View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/resources/back.html View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/resources/notify-success.html View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 65 (40 generated)
meacer
Charlie, can you PTAL? Thanks.
3 years, 10 months ago (2017-02-15 22:21:13 UTC) #6
Charlie Reis
[cc nasko, clamy] Good idea to add a deprecation warning, and glad we're still moving ...
3 years, 10 months ago (2017-02-15 23:36:43 UTC) #9
meacer
https://codereview.chromium.org/2694903007/diff/1/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2694903007/diff/1/content/browser/frame_host/navigation_handle_impl.cc#newcode157 content/browser/frame_host/navigation_handle_impl.cc:157: if (url_.SchemeIs(url::kDataScheme) && IsInMainFrame() && On 2017/02/15 23:36:43, Charlie ...
3 years, 10 months ago (2017-02-16 01:58:43 UTC) #12
Charlie Reis
Thanks, LGTM once the link is updated. https://codereview.chromium.org/2694903007/diff/1/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2694903007/diff/1/content/browser/frame_host/navigation_handle_impl.cc#newcode162 content/browser/frame_host/navigation_handle_impl.cc:162: "to data: ...
3 years, 10 months ago (2017-02-16 17:59:50 UTC) #15
meacer
Thanks Charlie. Changed the URL and updated the layout tests. crrev.com/2702503002 is an incomplete CL ...
3 years, 10 months ago (2017-02-17 22:47:04 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2694903007/60001
3 years, 10 months ago (2017-02-18 00:05:23 UTC) #27
Charlie Reis
On 2017/02/17 22:47:04, Mustafa Emre Acer wrote: > Thanks Charlie. Changed the URL and updated ...
3 years, 10 months ago (2017-02-18 00:20:33 UTC) #28
meacer
On 2017/02/18 00:20:33, Charlie Reis wrote: > On 2017/02/17 22:47:04, Mustafa Emre Acer wrote: > ...
3 years, 10 months ago (2017-02-18 00:28:18 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-18 02:09:10 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2694903007/60001
3 years, 10 months ago (2017-02-21 18:45:50 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-21 20:48:13 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2694903007/60001
3 years, 10 months ago (2017-02-21 22:23:20 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-22 00:27:49 UTC) #39
meacer
Charlie: I updated all the layout tests that I could find to not use data ...
3 years, 10 months ago (2017-02-22 23:44:53 UTC) #44
Charlie Reis
[+japhet] Whew, that's a lot to update! Generally looks good, though, with one concern and ...
3 years, 10 months ago (2017-02-23 18:39:11 UTC) #46
meacer
Thanks Charlie, updated the CL description. https://codereview.chromium.org/2694903007/diff/80001/third_party/WebKit/LayoutTests/fast/files/null-origin-string.html File third_party/WebKit/LayoutTests/fast/files/null-origin-string.html (right): https://codereview.chromium.org/2694903007/diff/80001/third_party/WebKit/LayoutTests/fast/files/null-origin-string.html#newcode18 third_party/WebKit/LayoutTests/fast/files/null-origin-string.html:18: console.log('PASS if no ...
3 years, 10 months ago (2017-02-23 20:47:25 UTC) #48
meacer
japhet: Ping as I'm planning to merge this to M57 :)
3 years, 9 months ago (2017-02-28 23:56:34 UTC) #49
Nate Chapin
Skimmed, seems reasonable. LGTM
3 years, 9 months ago (2017-03-06 23:54:23 UTC) #50
meacer
On 2017/03/06 23:54:23, Nate Chapin wrote: > Skimmed, seems reasonable. LGTM Thanks!
3 years, 9 months ago (2017-03-06 23:57:30 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2694903007/100001
3 years, 9 months ago (2017-03-06 23:58:14 UTC) #54
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/378829)
3 years, 9 months ago (2017-03-07 02:42:57 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2694903007/100001
3 years, 9 months ago (2017-03-07 02:55:27 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/395455)
3 years, 9 months ago (2017-03-07 05:18:33 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2694903007/100001
3 years, 9 months ago (2017-03-07 18:41:05 UTC) #62
commit-bot: I haz the power
3 years, 9 months ago (2017-03-07 21:22:43 UTC) #65
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/b29954e8ac243142eaedbcc3c6e5...

Powered by Google App Engine
This is Rietveld 408576698