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

Issue 2540803002: predictors: Add browsertests that check fetching through javascript. (Closed)

Created:
4 years ago by alexilin
Modified:
4 years ago
Reviewers:
pasko, Benoit L
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

predictors: Add browsertests that check fetching through javascript. Make sure that ResourcePrefetchPredictor awares about javascript initiated requests + test for iframe. BUG=650253 Committed: https://crrev.com/7d03e6b973c673b3fcfd24c3e962f59875078fb8 Cr-Commit-Position: refs/heads/master@{#436566}

Patch Set 1 #

Patch Set 2 : Add comment. #

Total comments: 16

Patch Set 3 : Rebase. #

Patch Set 4 : Address pasko comments. #

Total comments: 4

Patch Set 5 : Some comments. #

Patch Set 6 : Add copyrights. #

Total comments: 8

Patch Set 7 : Address lizeb comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -17 lines) Patch
M chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc View 1 2 3 4 5 6 5 chunks +130 lines, -11 lines 0 comments Download
A chrome/test/data/predictors/append_child.html View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/predictors/append_child.js View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/test/data/predictors/document_write.html View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/predictors/document_write.js View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/predictors/html_iframe.html View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/test/data/predictors/html_subresources.html View 1 2 3 1 chunk +5 lines, -6 lines 0 comments Download
A chrome/test/data/predictors/inner_html.html View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
A chrome/test/data/predictors/inner_html.js View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/predictors/xhr.html View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/predictors/xhr.js View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
alexilin
Hi, PTAL at another bunch of browser tests for ResourcePrefetchPredictor.
4 years ago (2016-11-29 19:30:56 UTC) #2
pasko
https://codereview.chromium.org/2540803002/diff/20001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2540803002/diff/20001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode29 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:29: static const char kStylePath2[] = "/predictors/style2.css"; it would be ...
4 years ago (2016-11-30 13:52:48 UTC) #3
alexilin
Manipulations with innerHTML behave interesting. I didn't investigate it yet. https://codereview.chromium.org/2540803002/diff/20001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2540803002/diff/20001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode29 ...
4 years ago (2016-11-30 18:43:50 UTC) #4
alexilin
I've found following reference in W3C html5 Working Draft: "script elements inserted using innerHTML do ...
4 years ago (2016-11-30 19:48:39 UTC) #5
alexilin
Wow, it seems like the test https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/dom/script-innerHTML-x.xhtml works only for xhtml and doesn't work if ...
4 years ago (2016-11-30 19:54:16 UTC) #6
alexilin
My previous comment was wrong. LayoutTest https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/dom/script-innerHTML-x.xhtml works fine for html file extension if delete ...
4 years ago (2016-12-01 09:23:35 UTC) #7
pasko
ok, innerHTML is good to have, but let's *not* block this change behind it. Feel ...
4 years ago (2016-12-01 15:38:01 UTC) #8
alexilin
I've changed some comments in code. Now I'm pretty sure that innerHTML behaves correctly so ...
4 years ago (2016-12-01 18:22:10 UTC) #13
pasko
On 2016/12/01 18:22:10, alexilin wrote: > I've changed some comments in code. Now I'm pretty ...
4 years ago (2016-12-02 18:27:04 UTC) #14
alexilin
Still waiting for your LGTMs :)
4 years ago (2016-12-05 08:12:01 UTC) #16
Benoit L
lgtm with a few minor questions and comments. https://codereview.chromium.org/2540803002/diff/60001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc File chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc (right): https://codereview.chromium.org/2540803002/diff/60001/chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc#newcode450 chrome/browser/predictors/resource_prefetch_predictor_browsertest.cc:450: // ...
4 years ago (2016-12-05 14:03:31 UTC) #20
alexilin
I've switched xhr test from fetch to sync XHR + added mime types to subresources ...
4 years ago (2016-12-06 09:10:44 UTC) #21
Benoit L
still lgtm, thanks.
4 years ago (2016-12-06 09:22:31 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/2540803002/120001
4 years ago (2016-12-06 09:42:05 UTC) #24
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years ago (2016-12-06 10:44:32 UTC) #26
commit-bot: I haz the power
4 years ago (2016-12-06 10:46:12 UTC) #28
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/7d03e6b973c673b3fcfd24c3e962f59875078fb8
Cr-Commit-Position: refs/heads/master@{#436566}

Powered by Google App Engine
This is Rietveld 408576698