Commit a95cd07e authored by Gyuyoung Kim's avatar Gyuyoung Kim Committed by Commit Bot

[USVString] Add a rough test case for navigator.registerProtocolHandler

Although r525634 updated the URL type of registerProtocolHandler from DOMString
to USVString, it didn't add a test case because it was a bit complex. Though
it's still hard to add a test case for it, this CL adds a rough test case for now.

Bug: 790860
Change-Id: Ia688494293274ab2c0aa62f9e33a588ca80d2a82
Reviewed-on: https://chromium-review.googlesource.com/933668Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Cr-Commit-Position: refs/heads/master@{#539114}
parent dd4d74b8
...@@ -104,6 +104,11 @@ test(() => { ...@@ -104,6 +104,11 @@ test(() => {
} }
}, "sendBeacon URL: unpaired surrogate codepoint should not make any exceptions.") }, "sendBeacon URL: unpaired surrogate codepoint should not make any exceptions.")
test(() => {
// This shouldn't throw an exception.
window.navigator.registerProtocolHandler('web+myprotocol', "custom-scheme\uD800/url=%s", "title");
}, "RegisterPtotocolHandler URL: unpaired surrogate codepoint should not make any exceptions.")
test(() => { test(() => {
var w = window.open("about:blank#\uD800"); var w = window.open("about:blank#\uD800");
assert_equals(w.document.URL, 'about:blank#%EF%BF%BD'); assert_equals(w.document.URL, 'about:blank#%EF%BF%BD');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment