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

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

Issue 1294933004: Take care of a FIXME in SecurityOrigin.cpp to check the validity of any innerURL during constructio… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/weborigin/SecurityOrigin.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/SecurityOriginTest.cpp
diff --git a/Source/platform/weborigin/SecurityOriginTest.cpp b/Source/platform/weborigin/SecurityOriginTest.cpp
index aed3b260ed5cb6baa9628213c4ca1857630892af..66678f9e996f7bc22f7c55462f0b7cc1ef8ad187 100644
--- a/Source/platform/weborigin/SecurityOriginTest.cpp
+++ b/Source/platform/weborigin/SecurityOriginTest.cpp
@@ -32,6 +32,7 @@
#include "platform/weborigin/SecurityOrigin.h"
#include "platform/RuntimeEnabledFeatures.h"
+#include "platform/blob/BlobURL.h"
#include "platform/weborigin/KURL.h"
#include "platform/weborigin/SecurityPolicy.h"
#include "wtf/text/StringBuilder.h"
@@ -385,4 +386,18 @@ TEST_F(SecurityOriginTest, CreateFromTuple)
}
+TEST_F(SecurityOriginTest, UniquenessPropagatesToBlobUrls)
+{
+ const char* uniqueOriginUrls[] = {
+ "",
+ "data:text/plain,hello_world",
palmer 2015/08/18 00:09:17 What should happen for file: URLs? And filesystem:
michaeln 2015/08/18 20:22:16 i've added some more cases, if you'd like to see o
+ };
+
+ for (const char* url : uniqueOriginUrls) {
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::create(KURL(ParsedURLString, url));
+ EXPECT_TRUE(origin->isUnique());
+ EXPECT_TRUE(SecurityOrigin::create(BlobURL::createPublicURL(origin.get()))->isUnique());
+ }
+}
+
} // namespace blink
« no previous file with comments | « Source/platform/weborigin/SecurityOrigin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698