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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp

Issue 2566503002: Adds HTTP check to PresentationRequest creation. (Closed)
Patch Set: Updates browser test. Created 3 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 | « third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp
index f76d06334b6c63a755957b2edcc4bc7020afeb6e..ceed6901167cddb411afdd89cf976b86ff996329 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp
@@ -43,6 +43,19 @@ TEST(PresentationRequestTest, TestMultipleUrlConstructor) {
EXPECT_EQ("cast://deadbeef?param=foo", requestUrls[1].getString());
}
+TEST(PresentationRequestTest, TestMultipleUrlConstructorInvalidURLFamily) {
+ V8TestingScope scope;
+ WTF::Vector<String> urls;
+ urls.append("https://example.com");
+ urls.append("about://deadbeef?param=foo");
+
+ PresentationRequest::create(scope.getExecutionContext(), urls,
+ scope.getExceptionState());
+ ASSERT_TRUE(scope.getExceptionState().hadException());
+
+ EXPECT_EQ(SyntaxError, scope.getExceptionState().code());
+}
+
TEST(PresentationRequestTest, TestMultipleUrlConstructorInvalidUrl) {
V8TestingScope scope;
WTF::Vector<String> urls;
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698