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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp

Issue 1878273002: Remove URLencode/URLdecode for the inner origin of blob: URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unescape constants in tests & code Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 }; 77 };
78 78
79 const char insecureURLA[] = "http://a.test/path/to/file.html"; 79 const char insecureURLA[] = "http://a.test/path/to/file.html";
80 const char insecureURLB[] = "http://b.test/path/to/file.html"; 80 const char insecureURLB[] = "http://b.test/path/to/file.html";
81 const char insecureOriginA[] = "http://a.test/"; 81 const char insecureOriginA[] = "http://a.test/";
82 82
83 const char secureURLA[] = "https://a.test/path/to/file.html"; 83 const char secureURLA[] = "https://a.test/path/to/file.html";
84 const char secureURLB[] = "https://b.test/path/to/file.html"; 84 const char secureURLB[] = "https://b.test/path/to/file.html";
85 const char secureOriginA[] = "https://a.test/"; 85 const char secureOriginA[] = "https://a.test/";
86 86
87 const char blobURL[] = "blob:http%3A//a.test/b3aae9c8-7f90-440d-8d7c-43aa20d 72fde"; 87 const char blobURL[] =
88 const char filesystemURL[] = "filesystem:http%3A//a.test/path/t/file.html"; 88 "blob:http://a.test/b3aae9c8-7f90-440d-8d7c-43aa20d72fde";
89 const char filesystemURL[] = "filesystem:http://a.test/path/t/file.html";
89 90
90 TestCase inputs[] = { 91 TestCase inputs[] = {
91 // HTTP -> HTTP: Same Origin 92 // HTTP -> HTTP: Same Origin
92 { ReferrerPolicyAlways, insecureURLA, insecureURLA, insecureURLA }, 93 { ReferrerPolicyAlways, insecureURLA, insecureURLA, insecureURLA },
93 { ReferrerPolicyDefault, insecureURLA, insecureURLA, insecureURLA }, 94 { ReferrerPolicyDefault, insecureURLA, insecureURLA, insecureURLA },
94 { ReferrerPolicyNoReferrerWhenDowngrade, insecureURLA, insecureURLA, ins ecureURLA }, 95 { ReferrerPolicyNoReferrerWhenDowngrade, insecureURLA, insecureURLA, ins ecureURLA },
95 { ReferrerPolicyNever, insecureURLA, insecureURLA, 0 }, 96 { ReferrerPolicyNever, insecureURLA, insecureURLA, 0 },
96 { ReferrerPolicyOrigin, insecureURLA, insecureURLA, insecureOriginA }, 97 { ReferrerPolicyOrigin, insecureURLA, insecureURLA, insecureOriginA },
97 { ReferrerPolicyOriginWhenCrossOrigin, insecureURLA, insecureURLA, insec ureURLA }, 98 { ReferrerPolicyOriginWhenCrossOrigin, insecureURLA, insecureURLA, insec ureURLA },
98 99
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 205
205 EXPECT_FALSE(origin1->isPotentiallyTrustworthy()); 206 EXPECT_FALSE(origin1->isPotentiallyTrustworthy());
206 EXPECT_FALSE(origin2->isPotentiallyTrustworthy()); 207 EXPECT_FALSE(origin2->isPotentiallyTrustworthy());
207 SecurityPolicy::addOriginTrustworthyWhiteList(origin1); 208 SecurityPolicy::addOriginTrustworthyWhiteList(origin1);
208 EXPECT_TRUE(origin1->isPotentiallyTrustworthy()); 209 EXPECT_TRUE(origin1->isPotentiallyTrustworthy());
209 EXPECT_TRUE(origin2->isPotentiallyTrustworthy()); 210 EXPECT_TRUE(origin2->isPotentiallyTrustworthy());
210 } 211 }
211 } 212 }
212 213
213 } // namespace blink 214 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698