Chromium Code Reviews| 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..9b3d7cb5487f0385fd2d726d6d3e0295db28dfa3 100644 |
| --- a/third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp |
| +++ b/third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp |
| @@ -29,7 +29,7 @@ TEST(PresentationRequestTest, TestMultipleUrlConstructor) { |
| V8TestingScope scope; |
| WTF::Vector<String> urls; |
| urls.append("https://example.com"); |
| - urls.append("cast://deadbeef?param=foo"); |
| + urls.append("http://deadbeef?param=foo"); |
| PresentationRequest* request = PresentationRequest::create( |
| scope.getExecutionContext(), urls, scope.getExceptionState()); |
| @@ -40,7 +40,20 @@ TEST(PresentationRequestTest, TestMultipleUrlConstructor) { |
| EXPECT_TRUE(requestUrls[0].isValid()); |
| EXPECT_EQ("https://example.com/", requestUrls[0].getString()); |
| EXPECT_TRUE(requestUrls[1].isValid()); |
| - EXPECT_EQ("cast://deadbeef?param=foo", requestUrls[1].getString()); |
| + EXPECT_EQ("http://deadbeef/?param=foo", requestUrls[1].getString()); |
| +} |
| + |
| +TEST(PresentationRequestTest, TestMultipleUrlConstructorInvalidURLFamily) { |
| + V8TestingScope scope; |
| + WTF::Vector<String> urls; |
| + urls.append("https://example.com"); |
| + urls.append("cast://deadbeef?param=foo"); |
|
zhaobin
2017/01/18 18:58:22
Some layout tests uses url with "cast://". They ma
mark a. foltz
2017/01/18 20:26:01
Yeah, now that we have tests for cast:// we should
|
| + |
| + PresentationRequest::create(scope.getExecutionContext(), urls, |
| + scope.getExceptionState()); |
| + ASSERT_TRUE(scope.getExceptionState().hadException()); |
| + |
| + EXPECT_EQ(SyntaxError, scope.getExceptionState().code()); |
| } |
| TEST(PresentationRequestTest, TestMultipleUrlConstructorInvalidUrl) { |