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

Side by Side Diff: third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp

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, 4 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
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 CheckHeaderFails("dnt"); 609 CheckHeaderFails("dnt");
610 CheckHeaderFails("expect"); 610 CheckHeaderFails("expect");
611 CheckHeaderFails("host"); 611 CheckHeaderFails("host");
612 CheckHeaderFails("keep-alive"); 612 CheckHeaderFails("keep-alive");
613 CheckHeaderFails("origin"); 613 CheckHeaderFails("origin");
614 CheckHeaderFails("referer", "http://example.com/"); 614 CheckHeaderFails("referer", "http://example.com/");
615 CheckHeaderFails("te"); 615 CheckHeaderFails("te");
616 CheckHeaderFails("trailer"); 616 CheckHeaderFails("trailer");
617 CheckHeaderFails("transfer-encoding"); 617 CheckHeaderFails("transfer-encoding");
618 CheckHeaderFails("upgrade"); 618 CheckHeaderFails("upgrade");
619 CheckHeaderFails("user-agent");
620 CheckHeaderFails("via"); 619 CheckHeaderFails("via");
621 620
622 CheckHeaderFails("proxy-"); 621 CheckHeaderFails("proxy-");
623 CheckHeaderFails("proxy-foo"); 622 CheckHeaderFails("proxy-foo");
624 CheckHeaderFails("sec-"); 623 CheckHeaderFails("sec-");
625 CheckHeaderFails("sec-foo"); 624 CheckHeaderFails("sec-foo");
626 625
627 // Check that validation is case-insensitive. 626 // Check that validation is case-insensitive.
628 CheckHeaderFails("AcCePt-ChArSeT"); 627 CheckHeaderFails("AcCePt-ChArSeT");
629 CheckHeaderFails("ProXy-FoO"); 628 CheckHeaderFails("ProXy-FoO");
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 m_expectedLoader->loadAsynchronously(request, this); 679 m_expectedLoader->loadAsynchronously(request, this);
681 serveRequests(); 680 serveRequests();
682 EXPECT_TRUE(m_didReceiveResponse); 681 EXPECT_TRUE(m_didReceiveResponse);
683 EXPECT_TRUE(m_didReceiveData); 682 EXPECT_TRUE(m_didReceiveData);
684 EXPECT_TRUE(m_didFinishLoading); 683 EXPECT_TRUE(m_didFinishLoading);
685 684
686 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); 685 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty());
687 } 686 }
688 687
689 } // namespace blink 688 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698