[CustomScheme] Fix a wrong url validation check in VerifyCustomHandlerURL
In VerifyCustomHandlerURL, though it should check the URL validation after removing '%s' in the given URL, it has checked it original URL even though it already removed '%s'. This CL fixes it as well as adds a new invalid URL test case to the tests. Additionally, we need to fix 2 tests of registerProtocolHandler in the protocol.html of wpt. According to the spec, If the %s placeholder is in the scheme, host, or port parts of the URL, this should throw a SecurityError exception forcibly. However, the 2 tests have been checked if it throws a syntax error. Fixed it too. Spec: https://html.spec.whatwg.org/multipage/webappapis.html#custom-handlers TEST: Add a new invalid url test to http/tests/navigatorcontentutils. external/wpt/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.html Bug: none Change-Id: I11f3c626b767b6fdc880bda157741d68d67ee001 Reviewed-on: https://chromium-review.googlesource.com/796252 Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com> Reviewed-by:Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#520821}
Showing
Please register or sign in to comment