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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html

Issue 1378543002: Add UMA for header values in XHR's setRequestHeader() checked against RFC 7230 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test expectations due to message change. Created 5 years, 2 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 <!doctype html>
2 <head>
3 <script src = "../../resources/testharness.js"></script>
4 <script src = "../../resources/testharnessreport.js"></script>
tyoshino (SeeGerritForStatus) 2015/09/29 09:02:24 Majority of the files in this directly are using /
hiroshige 2015/09/29 10:34:10 Done.
5 </head>
6 <body>
7 <script>
8 // Header values with control octets that will be rejected by RFC 7230.
9 // https://crbug.com/455099
10 async_test(function(t) {
11 var xhr = new XMLHttpRequest;
12 xhr.open("GET", "../resources/print-headers.cgi");
13
14 xhr.setRequestHeader('test1', 'a\x01b');
15
16 xhr.onload = t.step_func(function() {
17 // This expectation must be updated once we update header value checks.
18 assert_regexp_match(xhr.responseText, /HTTP_TEST1: a\x01b\r?\n/,
19 'Whitespaces remains in the middle of the header value.');
tyoshino (SeeGerritForStatus) 2015/09/29 09:02:24 Whitespace -> Control octets?
hiroshige 2015/09/29 10:34:10 Done.
20 t.done();
21 });
22 xhr.onerror = t.unreached_func('should not fail');
23 xhr.send();
24 }, 'setRequestHeader() with control octets');
25
26 done();
27 </script>
28 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698