Update web-platform-tests to revision acdb8bf3e4714528b6b5f9ff038dc80ee4fb7dcf

This commit is contained in:
Ms2ger 2015-04-27 00:43:52 +02:00
parent 56a7981c9c
commit 93b883e1db
27 changed files with 1021 additions and 165 deletions

View file

@ -0,0 +1,60 @@
<!DOCTYPE html>
<link rel="help" href="https://html.spec.whatwg.org/multipage/#document.title">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
function newSVGDocument() {
return document.implementation.createDocument(SVG_NAMESPACE, "svg");
}
test(function() {
var doc = newSVGDocument();
assert_equals(doc.title, "");
var child = doc.createElementNS(SVG_NAMESPACE, "x-child");
doc.documentElement.appendChild(child);
doc.title = "foo";
var lastChild = doc.documentElement.lastChild;
assert_equals(lastChild.namespaceURI, SVG_NAMESPACE);
assert_equals(lastChild.localName, "title");
assert_equals(lastChild.textContent, "foo");
assert_equals(doc.title, "foo");
}, "No title element in SVG document");
test(function() {
var doc = newSVGDocument();
var title = doc.createElementNS(SVG_NAMESPACE, "title");
title.textContent = "foo";
doc.documentElement.appendChild(title)
assert_equals(doc.title, "foo");
doc.title += "bar";
assert_equals(title.textContent, "foobar");
assert_equals(title.childNodes.length, 1);
assert_true(title.childNodes[0] instanceof Text);
assert_equals(doc.title, "foobar");
doc.title = "";
assert_equals(title.textContent, "");
assert_equals(doc.title, "");
assert_equals(title.childNodes.length, 0);
}, "Title element in SVG document");
test(function() {
var doc = newSVGDocument();
var title = doc.createElementNS(SVG_NAMESPACE, "title");
title.textContent = "foo";
var child = doc.createElementNS(SVG_NAMESPACE, "x-child");
child.appendChild(title);
doc.documentElement.appendChild(child);
assert_equals(doc.title, "");
}, "Title element not child of SVG root");
test(function() {
var doc = newSVGDocument();
var title = doc.createElement("title");
title.textContent = "foo";
doc.documentElement.appendChild(title);
assert_equals(doc.title, "");
}, "Title element not in SVG namespace");
</script>

View file

@ -0,0 +1,5 @@
<!doctype html>
<meta charset=utf-8>
<title>Textarea cols</title>
<link rel=match href=textarea-ref.html>
<textarea cols=20></textarea>

View file

@ -0,0 +1,5 @@
<!doctype html>
<meta charset=utf-8>
<title>Textarea cols</title>
<link rel=match href=textarea-ref.html>
<textarea cols=0></textarea>

View file

@ -0,0 +1,5 @@
<!doctype html>
<meta charset=utf-8>
<title>Textarea rows</title>
<link rel=match href=textarea-ref.html>
<textarea rows=2></textarea>

View file

@ -0,0 +1,5 @@
<!doctype html>
<meta charset=utf-8>
<title>Textarea rows</title>
<link rel=match href=textarea-ref.html>
<textarea rows=0></textarea>

View file

@ -0,0 +1,4 @@
<!doctype html>
<meta charset=utf-8>
<title>Default textarea</title>
<textarea></textarea>

View file

@ -107,10 +107,9 @@ function t(desc, func, expect) {
var img = document.querySelector('[data-desc="' + desc + '"]');
img.onload = img.onerror = this.unreached_func('update the image data was run');
if (expect == 'timeout') {
setTimeout(this.step_func_done(), 250);
setTimeout(this.step_func_done(), 1000);
} else {
img['on' + expect] = this.step_func_done(function() {});
setTimeout(this.unreached_func('update the image data was not run'), 250)
}
func.call(this, img);
}, desc);

View file

@ -23,7 +23,20 @@ function run_test() {
}, "product");
test(function() {
assert_false(navigator.taintEnabled());
// See https://www.w3.org/Bugs/Public/show_bug.cgi?id=22555
if ("window" in self) {
// If you identify as WebKit, taintEnabled should not exist.
if (navigator.userAgent.indexOf("WebKit") != -1) {
assert_false("taintEnabled" in navigator);
}
// Otherwise it should exist and return false.
else {
assert_false(navigator.taintEnabled());
}
} else {
// taintEnabled should not exist in workers.
assert_false("taintEnabled" in navigator);
}
}, "taintEnabled");
test(function() {