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

Unified Diff: Source/platform/weborigin/SecurityPolicyTest.cpp

Issue 136583002: Never send a referrer header if the referrer is not a web url (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/weborigin/SecurityPolicy.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/weborigin/SecurityPolicyTest.cpp
diff --git a/Source/core/svg/SVGAnimatedLengthList.h b/Source/platform/weborigin/SecurityPolicyTest.cpp
similarity index 77%
copy from Source/core/svg/SVGAnimatedLengthList.h
copy to Source/platform/weborigin/SecurityPolicyTest.cpp
index 8b4f5f11713fd7671bb238493dd7462510445e5b..ebce73ba3521cb1b04524078e96920238e792d8e 100644
--- a/Source/core/svg/SVGAnimatedLengthList.h
+++ b/Source/platform/weborigin/SecurityPolicyTest.cpp
@@ -28,16 +28,21 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SVGAnimatedLengthList_h
-#define SVGAnimatedLengthList_h
+#include "config.h"
+#include "platform/weborigin/SecurityPolicy.h"
-#include "core/svg/SVGLengthListTearOff.h"
-#include "core/svg/properties/NewSVGAnimatedProperty.h"
+#include "platform/weborigin/KURL.h"
+#include <gtest/gtest.h>
-namespace WebCore {
+using WebCore::KURL;
+using WebCore::SecurityPolicy;
-typedef NewSVGAnimatedProperty<SVGLengthList> SVGAnimatedLengthList;
+namespace {
-} // namespace WebCore
+TEST(SecurityPolicyTest, ReferrerIsAlwaysAWebURL)
+{
+ EXPECT_TRUE(String() == SecurityPolicy::generateReferrerHeader(WebCore::ReferrerPolicyAlways, KURL(WebCore::ParsedURLString, "http://example.com/"), String::fromUTF8("chrome://somepage/")));
+}
+
+} // namespace
-#endif
« no previous file with comments | « Source/platform/weborigin/SecurityPolicy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698