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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/fetch/resources/useragent-header-iframe.html

Issue 2254693002: Delay generation of User-Agent header to URLRequestHttpJob and accept custom User-Agent from XHR/Fe… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed Android test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <script src = "useragent-header.js"></script>
2 <script>
3 function get_useragent() {
4 return fetch('/resources/echo-headers.php')
5 .then(response => {
horo 2016/08/24 01:38:33 you don't need brackets and "return". .then(respon
6 return response.text();
7 })
8 .then(body => {
horo 2016/08/24 01:38:33 ditto .then(body => parse_response(body))
9 return parse_response(body);
10 });
11 }
12
13 function get_overridden_useragent() {
14 return fetch('/resources/echo-headers.php', {headers: {'user-agent': 'foobar'} })
15 .then(response => {
horo 2016/08/24 01:38:33 ditto .then(response => response.text())
16 return response.text();
17 })
18 .then(body => {
horo 2016/08/24 01:38:33 ditto .then(body => parse_response(body))
19 return parse_response(body);
20 });
21 }
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698