mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Remove URL.domainToASCII and URL.domainToUnicode
This commit is contained in:
parent
a1306e1dd3
commit
943233afd6
7 changed files with 20 additions and 48 deletions
|
@ -37715,7 +37715,9 @@
|
|||
]
|
||||
},
|
||||
"local_changes": {
|
||||
"deleted": [],
|
||||
"deleted": [
|
||||
"url/url-domainToUnicode.html"
|
||||
],
|
||||
"deleted_reftests": {},
|
||||
"items": {
|
||||
"reftest": {
|
||||
|
|
|
@ -26,4 +26,12 @@ test(function() {
|
|||
url.href = "./bar";
|
||||
});
|
||||
}, "Setting URL's href attribute and base URLs");
|
||||
|
||||
test(function() {
|
||||
assert_equals(URL.domainToASCII, undefined);
|
||||
}, "URL.domainToASCII should be undefined");
|
||||
|
||||
test(function() {
|
||||
assert_equals(URL.domainToUnicode, undefined);
|
||||
}, "URL.domainToUnicode should be undefined");
|
||||
</script>
|
||||
|
|
|
@ -13,4 +13,12 @@ test(function() {
|
|||
});
|
||||
}, "Setting URL's href attribute and base URLs");
|
||||
|
||||
test(function() {
|
||||
assert_equals(URL.domainToASCII, undefined);
|
||||
}, "URL.domainToASCII should be undefined");
|
||||
|
||||
test(function() {
|
||||
assert_equals(URL.domainToUnicode, undefined);
|
||||
}, "URL.domainToUnicode should be undefined");
|
||||
|
||||
done();
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
[Constructor(USVString url, optional USVString base),
|
||||
Exposed=(Window,Worker)]
|
||||
interface URL {
|
||||
static USVString domainToASCII(USVString domain);
|
||||
static USVString domainToUnicode(USVString domain);
|
||||
|
||||
stringifier attribute USVString href;
|
||||
readonly attribute USVString origin;
|
||||
attribute USVString protocol;
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(function() {
|
||||
var domain = 'example.org'
|
||||
assert_true(URL.domainToUnicode(domain) === domain, 'Ascii domain should be parsed correctly.')
|
||||
}, 'URL.domainToUnicode valid input')
|
||||
|
||||
test(function() {
|
||||
var domain = 'xn--maana-pta.com'
|
||||
assert_true(URL.domainToUnicode(domain) === 'mañana.com', ' Ascii encoded domain should be parsed correctly.')
|
||||
}, 'URL.domainToUnicode valid encoded input')
|
||||
|
||||
test(function() {
|
||||
var domain = 'http://not.a.domain'
|
||||
assert_true(URL.domainToUnicode(domain) === "", 'Invalid domain should be return an empty string.')
|
||||
}, 'URL.domainToUnicode invalid input')
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue