Skip to content
Permalink
Browse files
Update web-platform-tests to revision 7f2f85a88f434798e9d643427b34b05…
…fab8278c6
  • Loading branch information
Ms2ger committed Feb 1, 2016
1 parent 6b1a08c commit 73bc5cf
Show file tree
Hide file tree
Showing 180 changed files with 5,807 additions and 169 deletions.

Large diffs are not rendered by default.

@@ -0,0 +1,98 @@
[area-coords.html]
type: testharness
[COMMA: "2,2,10,10" (rect)]
expected: FAIL

[SEMICOLON: "2;2;10;10" (rect)]
expected: FAIL

[SPACE: "2 2 10 10" (rect)]
expected: FAIL

[TAB: "2\\t2\\t10\\t10" (rect)]
expected: FAIL

[FORM FEED: "2\\f2\\f10\\f10" (rect)]
expected: FAIL

[LINE FEED: "2\\n2\\n10\\n10" (rect)]
expected: FAIL

[CARRIGAGE RETURN: "2\\r2\\r10\\r10" (rect)]
expected: FAIL

[LINE TABULATION: "2\\v2\\v10\\v10" (rect)]
expected: FAIL

[LINE NEXT: "2…2…10…10" (rect)]
expected: FAIL

[EN QUAD: "2 2 10 10" (rect)]
expected: FAIL

[abc between numbers: "2a2b20c20,2,10,10" (rect)]
expected: FAIL

[COLON between numbers: "2:2:20:20,2,10,10" (rect)]
expected: FAIL

[U+0000 between numbers: "2\\02\\020\\020,2,10,10" (rect)]
expected: FAIL

[leading COMMA: ",2,2,10,10" (rect)]
expected: FAIL

[leading SPACE: " 2,2,10,10" (rect)]
expected: FAIL

[leading SEMICOLON: ";2,2,10,10" (rect)]
expected: FAIL

[trailing COMMA: "2,2,10," (rect)]
expected: FAIL

[trailing SPACE: "2,2,10 " (rect)]
expected: FAIL

[trailing SEMICOLON: "2,2,10;" (rect)]
expected: FAIL

[PERCENT: "2%,2%,10%,10%" (rect)]
expected: FAIL

[CSS units: "2in,2in,10cm,10cm" (rect)]
expected: FAIL

[float: "1.4,1.4,10,10" (rect)]
expected: FAIL

[number starting with PERIOD: ".4,.4,10,10" (rect)]
expected: FAIL

[sci-not: "2,2,1e1,1e1" (rect)]
expected: FAIL

[leading/trailing garbage: "='2,2,10,10' " (rect)]
expected: FAIL

[non-ascii garbage: "“2,2,10,10\\"" (rect)]
expected: FAIL
[URL garbage with number: "2,2,10ls/spain/holidays/regions/10/Canary+Islands/Canary+Islands.html" (rect)]
expected: FAIL
[consecutive COMMAs: "2,,10,10" (rect)]
expected: FAIL
[consecutive SPACEs: "2 10,10" (rect)]
expected: FAIL
[consecutive SEMICOLONs: "2;;10,10" (rect)]
expected: FAIL

[several consecutive separators: ",,2;,;2,;,10 \\t\\r\\n10;;" (rect)]
expected: FAIL

[one too many numbers, trailing COMMA: "100,100,120,100,100,120,300," (poly)]
expected: FAIL

@@ -0,0 +1,44 @@
[area-processing.html]
type: testharness
[too few numbers: "2,2,10" (rect)]
expected: FAIL

[negative: "-10,-10,10,10" (rect)]
expected: FAIL

[empty string: "" (rect)]
expected: FAIL

[omitted coords: null (rect)]
expected: FAIL

[first > third: "10,2,2,10" (rect)]
expected: FAIL

[second > fourth: "2,10,10,2" (rect)]
expected: FAIL

[first > third, second > fourth: "10,10,2,2" (rect)]
expected: FAIL

[negative: "-10,-10,-10,-10" (default)]
expected: FAIL

[too few numbers: "20,40" (circle)]
expected: FAIL

[negative radius: "20,40,-10" (circle)]
expected: FAIL

[zero radius: "20,40,0" (circle)]
expected: FAIL

[too few numbers: "100,100,120,100,100" (poly)]
expected: FAIL

[one too many numbers: "100,100,120,100,100,120,300" (poly)]
expected: FAIL

[even-odd rule: "100,100,200,100,100,200,150,50,200,200" (poly)]
expected: FAIL

@@ -0,0 +1,47 @@
[area-shape.html]
type: testharness
[missing value default: "2,2,10,10" (null)]
expected: FAIL

[missing value default: "20,40,10" (null)]
expected: FAIL

[missing value default: null (null)]
expected: FAIL

[invalid value default: "2,2,10,10" (foobar invalid)]
expected: FAIL

[invalid value default: "2,2,10,10" ()]
expected: FAIL

[empty string: "" (default)]
expected: FAIL

[omitted coords: null (DEFAULT)]
expected: FAIL

[simple: "20,40,10" (circle)]
expected: FAIL

[simple: "20,40,10" (circ)]
expected: FAIL

[simple: "20,40,10" (CIRCLE)]
expected: FAIL

[simple: "20,40,10" (CIRC)]
expected: FAIL

[LATIN CAPITAL LETTER I WITH DOT ABOVE: "20,40,10" (CİRCLE)]
expected: FAIL

[LATIN SMALL LETTER DOTLESS I: "20,40,10" (cırcle)]
expected: FAIL

[simple: "100,100,120,100,100,120" (poly)]
expected: FAIL

[simple: "100,100,120,100,100,120" (polygon)]
expected: FAIL

@@ -0,0 +1,5 @@
[embed-document.html]
type: testharness
[Test document type embedding]
expected: FAIL

@@ -1 +1 @@
8a1d0a8f3e4206c98f35a4bba98fc26237c1f906
6b1a08c051f3be4b7bc7e6200053dfa530ecd106
@@ -198,3 +198,9 @@
[Parsing: <file:a> against <http://www.example.com/test>]
expected: FAIL

[Parsing: <http://example.com/foo/%2e%2> against <about:blank>]
expected: FAIL

[Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> against <about:blank>]
expected: FAIL

@@ -33,7 +33,7 @@
return fd;
}

do_test("formdata with blob", create_formdata(['key', new Blob(['value'], {type: 'text/x-value'})]), '\nkey=blob:text/x-value:5,');
do_test("formdata with blob", create_formdata(['key', new Blob(['value'], {type: 'text/x-value'})]), 'key=value,\n');
do_test("formdata with named blob", create_formdata(['key', new Blob(['value'], {type: 'text/x-value'}), 'blob.txt']), '\nkey=blob.txt:text/x-value:5,');
// If 3rd argument is given and 2nd is not a Blob, formdata.append() should throw
var test = async_test('formdata.append() should throw if value is string and file name is given'); // needs to be async just because the others above are
@@ -0,0 +1,3 @@
@anssiko
@dontcallmedom
@zqzhang
@@ -0,0 +1,97 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>cssom-view - scrollingElement</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="quirksframe"></iframe>
<iframe id="nonquirksframe"></iframe>
<div id="log"></div>
<script>

var quirksFrame;
var nonQuirksFrame;

function loadTestFrames(callback) {
quirksFrame = document.getElementById("quirksframe");
quirksFrame.onload = function() {
nonQuirksFrame = document.getElementById("nonquirksframe");
nonQuirksFrame.onload = callback;
nonQuirksFrame.src =
URL.createObjectURL(new Blob(["<!doctype html>"], { type: "text/html" }));
}
quirksFrame.src =
URL.createObjectURL(new Blob([""], { type: "text/html" }));
}

var test = async_test("Tests for scrollingElement");
loadTestFrames(function() {
test.step(function() {
var quirksDoc = quirksFrame.contentDocument;
var nonQuirksDoc = nonQuirksFrame.contentDocument;

// Initial checks that we have the expected kinds of documents.
assert_equals(quirksDoc.compatMode, "BackCompat", "Should be in quirks mode.");
assert_equals(nonQuirksDoc.compatMode, "CSS1Compat", "Should be in standards mode.");

assert_not_equals(quirksDoc.body, null, "Should have a body element");
assert_not_equals(nonQuirksDoc.body, null, "Should have a body element");

// Tests for quirks mode document.
assert_equals(quirksDoc.scrollingElement, quirksDoc.body,
"scrollingElement in quirks mode should default to body element.");

quirksDoc.documentElement.style.overflow = "scroll";
quirksDoc.body.style.overflow = "scroll";
assert_equals(quirksDoc.scrollingElement, null,
"scrollingElement in quirks mode should be null if overflow of body and root element isn't visible.");
quirksDoc.documentElement.style.overflow = "visible";
assert_equals(quirksDoc.scrollingElement, quirksDoc.body);
quirksDoc.documentElement.style.overflow = "scroll";
quirksDoc.body.style.overflow = "visible";
assert_equals(quirksDoc.scrollingElement, quirksDoc.body);
quirksDoc.documentElement.style.overflow = "visible";
assert_equals(quirksDoc.scrollingElement, quirksDoc.body);

quirksDoc.body.style.display = "none";
assert_equals(quirksDoc.scrollingElement, quirksDoc.body)
quirksDoc.body.style.display = "block";
assert_equals(quirksDoc.scrollingElement, quirksDoc.body);

quirksDoc.documentElement.appendChild(quirksDoc.createElement("body"));
assert_equals(quirksDoc.scrollingElement, quirksDoc.body);
assert_equals(quirksDoc.scrollingElement, quirksDoc.getElementsByTagName("body")[0]);
quirksDoc.documentElement.removeChild(quirksDoc.documentElement.lastChild);
assert_equals(quirksDoc.scrollingElement, quirksDoc.body);

quirksDoc.documentElement.removeChild(quirksDoc.body);
assert_equals(quirksDoc.scrollingElement, null);
quirksDoc.documentElement.appendChild(quirksDoc.createElementNS("foobarNS", "body"));
assert_equals(quirksDoc.scrollingElement, null);

quirksDoc.removeChild(quirksDoc.documentElement);
assert_equals(quirksDoc.scrollingElement, null);

quirksDoc.appendChild(quirksDoc.createElementNS("foobarNS", "html"));
quirksDoc.documentElement.appendChild(quirksDoc.createElement("body"));
assert_equals(quirksDoc.scrollingElement, null);

quirksDoc.removeChild(quirksDoc.documentElement);
quirksDoc.appendChild(quirksDoc.createElement("body"));
assert_equals(quirksDoc.scrollingElement, null);

// Tests for standards mode document.
assert_equals(nonQuirksDoc.scrollingElement, nonQuirksDoc.documentElement,
"scrollingElement in standards mode should be the document element.");
nonQuirksDoc.documentElement.style.overflow = "scroll";
nonQuirksDoc.body.style.overflow = "scroll";
assert_equals(nonQuirksDoc.scrollingElement, nonQuirksDoc.documentElement);

nonQuirksDoc.removeChild(nonQuirksDoc.documentElement);
assert_equals(nonQuirksDoc.scrollingElement, null);
nonQuirksDoc.appendChild(nonQuirksDoc.createElement("foobar"));
assert_equals(nonQuirksDoc.scrollingElement.localName, "foobar");

});
test.done();
});
</script>
@@ -120,4 +120,14 @@
}
})
})

test(function() {
assert_throws(new TypeError(), function() {
document.implementation.createDocument()
}, "createDocument() should throw")

assert_throws(new TypeError(), function() {
document.implementation.createDocument('')
}, "createDocument('') should throw")
}, "createDocument with missing arguments");
</script>
@@ -0,0 +1,16 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Fetch in worker: accept header</title>
<meta name="help" href="https://fetch.spec.whatwg.org/#fetching">
<meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
fetch_tests_from_worker(new Worker("accept-header.js"));
</script>
</body>
</html>
@@ -0,0 +1,15 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Fetch: accept header</title>
<meta name="help" href="https://fetch.spec.whatwg.org/#fetching">
<meta name="author" title="Canon Research France" href="https://www.crf.canon.fr">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script src="../resources/utils.js"></script>
<script src="accept-header.js"></script>
</body>
</html>
@@ -0,0 +1,14 @@
if (this.document === undefined) {
importScripts("/resources/testharness.js");
importScripts("../resources/utils.js");
}

promise_test(function() {
return fetch(RESOURCES_DIR + "inspect-headers.py?headers=Accept").then(function(response) {
assert_equals(response.status, 200, "HTTP status is 200");
assert_equals(response.type , "basic", "Response's type is basic");
assert_equals(response.headers.get("x-request-accept"), "*/*", "Request has accept header with value '*/*'");
});
}, "Request through fetch should have 'accept' header with value '*/*'");

done();

0 comments on commit 73bc5cf

Please sign in to comment.