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

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

Issue 1315793002: Revert of Take care of a FIXME in SecurityOrigin.cpp to check the validity (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 a4765df5969a6e0ba9eff1988a480dcbad5afc8b..aed3b260ed5cb6baa9628213c4ca1857630892af 100644
--- a/Source/platform/weborigin/SecurityOriginTest.cpp
+++ b/Source/platform/weborigin/SecurityOriginTest.cpp
@@ -32,7 +32,6 @@
#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"
@@ -386,36 +385,4 @@
}
-TEST_F(SecurityOriginTest, UniquenessPropagatesToBlobUrls)
-{
- struct TestCase {
- const char* url;
- bool expectedUniqueness;
- const char* expectedOriginString;
- } cases[] {
- { "", true, "null" },
- { "null", true, "null" },
- { "data:text/plain,hello_world", true, "null" },
- { "file:///path", false, "file://" },
- { "filesystem:http://host/filesystem-path", false, "http://host" },
- { "filesystem:file:///filesystem-path", false, "file://" },
- { "filesystem:null/filesystem-path", true, "null" },
- { "blob:http://host/blob-id", false, "http://host" },
- { "blob:file:///blob-id", false, "file://" },
- { "blob:null/blob-id", true, "null" },
- };
-
- for (const TestCase& test : cases) {
- RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(test.url);
- EXPECT_EQ(test.expectedUniqueness, origin->isUnique());
- EXPECT_EQ(test.expectedOriginString, origin->toString());
-
- KURL blobUrl = BlobURL::createPublicURL(origin.get());
- RefPtr<SecurityOrigin> blobUrlOrigin = SecurityOrigin::create(blobUrl);
- EXPECT_EQ(blobUrlOrigin->isUnique(), origin->isUnique());
- EXPECT_EQ(blobUrlOrigin->toString(), origin->toString());
- EXPECT_EQ(blobUrlOrigin->toRawString(), origin->toRawString());
- }
-}
-
} // 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