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

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: Reflected tyoshino's comments. 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 <script src="/js-test-resources/js-test.js"></script>
3 <script>
4 window.jsTestIsAsync = true;
5 description('XMLHttpRequest.setRequestHeader() with control octets ' +
6 'rejected by RFC 7230 should show a deprecation message.');
7 // https://crbug.com/455099
8
9 var xhr = new XMLHttpRequest;
10 xhr.open("GET", "../resources/print-headers.cgi");
11
12 // '\x01' is invalid in RFC 7230 and thus deprecation warning should be shown.
13 xhr.setRequestHeader('test1', 'a\x01b');
14
15 xhr.onload = function() {
16 // This expectation must be updated once we update header value checks.
17 shouldNotBe('xhr.responseText.match(/HTTP_TEST1: a\\x01b\\r?\\n/)',
18 'null');
19 finishJSTest();
20 };
21 xhr.onerror = function() {
22 testFailed();
23 finishJSTest();
24 };
25 xhr.send();
26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698