Replace DOMString type with USVStrin for URL properties in Document.idl
Latest spec has used USVString instead of DOMString for url argument.
- spec: https://dom.spec.whatwg.org/#interface-document
Bug: 790860
Change-Id: Ia8744c4dc97047afe11a5d328673412bdfcefeb7
Reviewed-on: https://chromium-review.googlesource.com/853535
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung.kim@lge.com>
Cr-Commit-Position: refs/heads/master@{#527870}
diff --git a/html/dom/usvstring-reflection.html b/html/dom/usvstring-reflection.html
index c3a79e7..0f5559a 100644
--- a/html/dom/usvstring-reflection.html
+++ b/html/dom/usvstring-reflection.html
@@ -86,4 +86,10 @@
var wsocket = new EventSource('ws://www.example.com/socketserve\uD899/');
assert_true(wsocket.url.endsWith('ws://www.example.com/socketserve%EF%BF%BD/'));
}, "websocket url : unpaired surrogate codepoint should be replaced with U+FFFD")
+
+test(() => {
+ var w = window.open("about:blank#\uD800");
+ assert_equals(w.document.URL, 'about:blank#%EF%BF%BD');
+ assert_equals(w.document.documentURI, 'about:blank#%EF%BF%BD');
+}, "Document URLs: unpaired surrogate codepoint should be replaced with U+FFFD")
</script>