mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-21 03:32:35 +03:00
Test for [TreatNullAs=EmptyString]
This commit is contained in:
parent
9fb755b754
commit
25b88e42e6
24
test/js/idl-treatnullas-emptystring.html
Normal file
24
test/js/idl-treatnullas-emptystring.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Ensure that [TreatNullAs=EmptyString] works correctly</title>
|
||||
<link rel="stylesheet" type="text/css" href="tst.css">
|
||||
</head>
|
||||
<body text="blue">
|
||||
<h1>Ensure that [TreatNullAs=EmptyString] works correctly</h1>
|
||||
|
||||
<script>
|
||||
var e = document.createElement("p");
|
||||
var t = document.createTextNode("Initial body text:\""+document.body.text+"\" (should be \"blue\")");
|
||||
e.appendChild(t);
|
||||
document.body.appendChild(e);
|
||||
|
||||
document.body.text = null;
|
||||
var e2 = document.createElement("p");
|
||||
var t2 = document.createTextNode("New body text:\""+document.body.text+"\" (should be \"\")");
|
||||
e2.appendChild(t2);
|
||||
document.body.appendChild(e2);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user