Commit 455e41a4 authored by dtapuska's avatar dtapuska Committed by Commit bot

Import wpt@e1ad3cc6894b20da0a5d7dddf431c9e7848d0544

Using update-w3c-deps in Chromium f15c309c.

BUG=

Review-Url: https://codereview.chromium.org/2322083002
Cr-Commit-Position: refs/heads/master@{#417590}
parent 0d4141c0
......@@ -811,6 +811,10 @@ crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_releasepointerc
crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_pointerout_after_pointercancel_touch-manual.html [ Skip ]
crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_pointerleave_touch-manual.html [ Skip ]
crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_touch-action-auto-css_touch-manual.html [ Skip ]
crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_touch-action-pan-left-css_touch-manual.html [ Skip ]
crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_touch-action-pan-right-css_touch-manual.html [ Skip ]
crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_touch-action-pan-up-css_touch-manual.html [ Skip ]
crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_touch-action-pan-down-css_touch-manual.html [ Skip ]
crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_touch-action-pan-x-pan-y_touch-manual.html [ Skip ]
crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_touch-action-pan-x-css_touch-manual.html [ Skip ]
#crbug.com/613672 [ Mac ] imported/wpt/pointerevents/pointerevent_touch-action-button-test_touch-manual.html [ Skip ]
......
......@@ -446,6 +446,7 @@ imported/wpt/html/semantics/text-level-semantics/the-a-element/a-stringifier.htm
imported/wpt/html/webappapis/system-state-and-capabilities/the-navigator-object/NavigatorID.html [ Skip ]
# crbug.com/490940: Needs to load extra HTML resources.
imported/wpt/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html [ Skip ]
imported/wpt/dom/nodes/Document-createElement-namespace.html [ Skip ]
imported/wpt/dom/nodes/Element-getElementsByTagName-change-document-HTMLNess.html [ Skip ]
imported/wpt/dom/nodes/Node-isEqualNode-xhtml.xhtml [ Skip ]
......
CONSOLE ERROR: line 21: Uncaught Error
CONSOLE ERROR: line 2445: Uncaught Error: assert_unreached: connectedCallback should not be invoked if constructor threw Reached unreachable code
CONSOLE ERROR: line 2443: Uncaught Error: assert_unreached: connectedCallback should not be invoked if constructor threw Reached unreachable code
This is a testharness.js-based test.
PASS Custom Elements: Custom Element State "Failed" in Upgrades
Harness: the test ran to completion.
......
Annotation-Protocol: Guidelines for Contributing Tests
======================================================
This document describes the method people should use for authoring tests and
integrating them into the repository. Anyone is welcome to submit new tests to
this collection. If you do, please create the tests following the guidelines
below. Then submit them as a pull request so they can be evaluated
Structure
---------
Tests are organized by client or server, and then by major section of the Annotation
Protocol specification. The folders associated with these are:
* client - tests a client needs to run
* server - tests to be run against a server
Within these folders, special files ending with the suffix ".html" provide the source
for the test as a set javascript calls to perform the test.
* scripts - JavaScript that are included by tests
* tools - supporting scripts and files
Client Test Cases
-----------------
@@@TODO@@@ describe the structure of client test cases.
Server Test Cases
-----------------
@@@TODO@@@ describe the structure of server test cases.
Command Line Tools
------------------
### Stand-alone Annotation Server ###
Annotation-Protocol: Tests for the Web Annotation Protocol
==========================================================
The [Web Annotation Protocol](https://www.w3.org/TR/annotation-protocol)
specification presents set of messages to allow Annotation clients and servers
to interact seamlessly.
The purpose of these tests is to help validate that clients send and are
capable of receiving correctly formatted messages, and that servers are
able to receive and respond to correctly structured requests.
The general approach for this testing is to enable both manual and
automated testing. However, since the specification has no actual user
interface requirements, there is no general automation mechanism that
can be presented for testing clients. Also the server tests need to be
pointed at a server implementation to exercise. However, once provided
the basic information, testing is automated.
Implementors could take advantage of the plumbing we provide here to
help their implementations talk to the endpoint we provide or exercise
their endpoint with the provided server tests. This assumes knowledge
of the requirements of each test / collection of tests so that the input
data is relevant. Each test or test collection contains information
sufficient for the task.
With regard to server tests, the browser tests we provide can be
pointed at an endpoint and will exercise that endpoint using well
defined messages. This is done semi-automatically, although some set-up
is required.
Running Tests
-------------
In the case of this test collection, we will be initially creating manual
tests. These will automatically determine pass or fail and generate output for
the main WPT window. The plan is to minimize the number of such tests to
ease the burden on the testers while still exercising all the features.
The workflow for running these tests is something like:
1. Start up the test driver window and select the annotation-protocol tests -
either client or server - then click "Start".
2. A window pops up that shows a test - the description of which tells the
tester what is required. The window will contain fields into which some
information is provided.
3. In the case of client testing the tester (presumably in another window) brings up their
annotation client and points it at the supplied endpoint. They they perform the
action specified (annotating content in the test window, requesting an annotation from the server, etc.).
4. The server receives the information from the client, evaluates it, and reports the result of testing.
In the event of multi-step messages, the cycle repeats until complete.
5. Repeat steps 2-4 until done.
6. Download the JSON format report of test results, which can then be visually
inspected, reported on using various tools, or passed on to W3C for
evaluation and collection in the Implementation Report via github.
**Remember that while these tests are written to help exercise implementations,
their other (important) purpose is to increase confidence that there are
interoperable implementations.** So, implementers are our audience, but these
tests are not meant to be a comprehensive collection of tests for an implementor.
The bulk of the tests are manual because there are no UI requirements in the
Recommendation that would make it possible to effectively stimulate every client portably.
Having said that, because the structure of these "manual" tests is very rigid,
it is possible for an implementer who understands test automation to use an
open source tool such as [Selenium](http://www.seleniumhq.org/) to run these
"manual" tests against their implementation - exercising their implementation
against content they provide to create annotations and feed the data into our
test input field and run the test.
Capturing and Reporting Results
-------------------------------
As tests are run against implementations, if the results of testing are
submitted to [test-results](https://github.com/w3c/test-results/) then they will
be automatically included in documents generated by
[wptreport](https://www.github.com/w3c/wptreport). The same tool can be used
locally to view reports about recorded results.
Automating Test Execution
-------------------------
Writing Tests
-------------
If you are interested in writing tests for this environment, see the
associated [CONTRIBUTING](CONTRIBUTING.md) document.
......@@ -84,3 +84,12 @@ function _assertGreen(ctx, canvasWidth, canvasHeight)
}
}
}
function addCrossOriginYellowImage()
{
var img = new Image();
img.id = "yellow.png";
img.className = "resource";
img.src = get_host_info().HTTP_REMOTE_ORIGIN + "/images/yellow.png";
document.body.appendChild(img);
}
\ No newline at end of file
......@@ -7,6 +7,12 @@ function get_host_info() {
var REMOTE_HOST = (ORIGINAL_HOST === 'localhost') ? '127.0.0.1' : ('www1.' + ORIGINAL_HOST);
return {
HTTP_PORT: HTTP_PORT,
HTTP_PORT2: HTTP_PORT2,
HTTPS_PORT: HTTPS_PORT,
ORIGINAL_HOST: ORIGINAL_HOST,
REMOTE_HOST: REMOTE_HOST,
HTTP_ORIGIN: 'http://' + ORIGINAL_HOST + ':' + HTTP_PORT,
HTTPS_ORIGIN: 'https://' + ORIGINAL_HOST + ':' + HTTPS_PORT,
HTTPS_ORIGIN_WITH_CREDS: 'https://foo:bar@' + ORIGINAL_HOST + ':' + HTTPS_PORT,
......
This is a testharness.js-based test.
FAIL Use NewTarget's prototype, not the one stored at definition time promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'appendChild' of null"
FAIL Rethrow any exceptions thrown while getting the prototype promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'appendChild' of null"
FAIL If prototype is not object, derives the fallback from NewTarget's realm (autonomous custom elements) promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'appendChild' of null"
FAIL If prototype is not object, derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'appendChild' of null"
Harness: the test ran to completion.
<!DOCTYPE html>
<title>Custom Elements: [HTMLConstructor] derives prototype from NewTarget</title>
<meta name="author" title="Domenic Denicola" href="mailto:d@domenic.me">
<meta name="help" content="https://html.spec.whatwg.org/multipage/dom.html#htmlconstructor">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/custom-elements-helpers.js"></script>
<script>
"use strict";
test_with_window(w => {
let afterDefinition = false;
const proto1 = { "proto": "number one" };
const proto2 = { "proto": "number two" };
const TestElement = (function () {
assert_throws({ name: "prototype throws" }, () => {
const o = Reflect.construct(w.HTMLElement, [], new.target);
assert_equals(Object.getPrototypeOf(o), proto2,
"Must use the value returned from new.target.prototype");
assert_not_equals(Object.getPrototypeOf(o), proto1,
"Must not use the prototype stored at definition time");
});
}).bind({});
Object.defineProperty(TestElement, "prototype", {
get() {
return beforeDefinition ? proto1 : proto2;
}
});
w.customElements.define("test-element", TestElement);
beforeDefinition = true;
new TestElement();
}, "Use NewTarget's prototype, not the one stored at definition time");
test_with_window(w => {
// We have to not throw during define(), but throw during super()
let throws = false;
const TestElement = (function () {
assert_throws({ name: "prototype throws" }, () => {
return Reflect.construct(w.HTMLElement, [], new.target);
});
}).bind({});
Object.defineProperty(TestElement, "prototype", {
get() {
if (throws) {
throw { name: "prototype throws" };
}
return {};
}
});
w.customElements.define("test-element", TestElement);
throws = true;
new TestElement();
}, "Rethrow any exceptions thrown while getting the prototype");
test_with_window(w => {
for (const notAnObject of [null, undefined, 5, "string"]) {
// We have to return an object during define(), but not during super()
let returnNotAnObject = false;
const TestElement = (function () {
const o = Reflect.construct(w.HTMLElement, [], new.target);
assert_equals(Object.getPrototypeOf(o), window.HTMLElement,
"Must use the HTMLElement from the realm of NewTarget");
assert_not_equals(Object.getPrototypeOf(o), w.HTMLElement,
"Must not use the HTMLElement from the realm of the active function object (w.HTMLElement)");
return o;
}).bind({});
Object.defineProperty(TestElement, "prototype", {
get() {
return returnNotAnObject ? notAnObject : {};
}
});
w.customElements.define("test-element", TestElement);
returnNotAnObject = true;
new TestElement();
}
}, "If prototype is not object, derives the fallback from NewTarget's realm (autonomous custom elements)");
test_with_window(w => {
for (const notAnObject of [null, undefined, 5, "string"]) {
// We have to return an object during define(), but not during super()
let returnNotAnObject = false;
const TestElement = (function () {
const o = Reflect.construct(w.HTMLParagraphElement, [], new.target);
assert_equals(Object.getPrototypeOf(o), window.HTMLParagraphElement,
"Must use the HTMLParagraphElement from the realm of NewTarget");
assert_not_equals(Object.getPrototypeOf(o), w.HTMLParagraphElement,
"Must not use the HTMLParagraphElement from the realm of the active function object (w.HTMLParagraphElement)");
return o;
}).bind({});
Object.defineProperty(TestElement, "prototype", {
get() {
return returnNotAnObject ? notAnObject : {};
}
});
w.customElements.define("test-element", TestElement, { extends: "p" });
returnNotAnObject = true;
new TestElement();
}
}, "If prototype is not object, derives the fallback from NewTarget's realm (customized built-in elements)");
</script>
function create_window_in_test(t, srcdoc) {
let p = new Promise((resolve) => {
let f = document.createElement('iframe');
f.srcdoc = srcdoc ? srcdoc : '';
f.onload = (event) => {
let w = f.contentWindow;
t.add_cleanup(() => f.parentNode && f.remove());
resolve(w);
};
document.body.appendChild(f);
});
return p;
}
function test_with_window(f, name, srcdoc) {
promise_test((t) => {
return create_window_in_test(t, srcdoc)
.then((w) => {
f(w);
});
}, name);
}
This is a testharness.js-based test.
PASS Audio constructor
FAIL No arguments, without new Failed to construct 'Audio': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
PASS No arguments, with new
FAIL Empty string argument, without new Failed to construct 'Audio': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
PASS Empty string argument, with new
FAIL Non-empty string argument, without new Failed to construct 'Audio': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
PASS Non-empty string argument, with new
FAIL Null argument, without new Failed to construct 'Audio': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
PASS Null argument, with new
FAIL Undefined argument, without new Failed to construct 'Audio': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
PASS Undefined argument, with new
FAIL Extra argument, without new Failed to construct 'Audio': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
PASS Extra argument, with new
PASS Calling HTMLAudioElement should throw
PASS Constructing HTMLAudioElement should throw
Harness: the test ran to completion.
......@@ -11,18 +11,12 @@ test(function() {
valueOf: function() { throw Error() }
};
var tests = [
[function() { return Audio() }, null, "No arguments, without new"],
[function() { return new Audio() }, null, "No arguments, with new"],
[function() { return Audio("") }, "", "Empty string argument, without new"],
[function() { return new Audio("") }, "", "Empty string argument, with new"],
[function() { return Audio("src") }, "src", "Non-empty string argument, without new"],
[function() { return new Audio("src") }, "src", "Non-empty string argument, with new"],
[function() { return Audio(null) }, "null", "Null argument, without new"],
[function() { return new Audio(null) }, "null", "Null argument, with new"],
[function() { return Audio(undefined) }, null, "Undefined argument, without new"],
[function() { return new Audio(undefined) }, null, "Undefined argument, with new"],
[function() { return Audio("", throwingObject) }, "", "Extra argument, without new"],
[function() { return new Audio("", throwingObject) }, "", "Extra argument, with new"],
[function() { return new Audio() }, null, "No arguments"],
[function() { return new Audio("") }, "", "Empty string argument"],
[function() { return new Audio("src") }, "src", "Non-empty string argument"],
[function() { return new Audio(null) }, "null", "Null argument"],
[function() { return new Audio(undefined) }, null, "Undefined argument"],
[function() { return new Audio("", throwingObject) }, "", "Extra argument"],
];
tests.forEach(function(t) {
var fn = t[0], expectedSrc = t[1], description = t[2];
......@@ -38,6 +32,11 @@ test(function() {
}, description);
});
});
test(function() {
assert_throws(new TypeError(), function() {
Audio();
});
}, "Calling Audio should throw");
test(function() {
assert_throws(new TypeError(), function() {
HTMLAudioElement();
......
CONSOLE WARNING: The <keygen> element is deprecated and will be removed in M56, around January 2017. See https://www.chromestatus.com/features/5716060992962560 for more details.
This is a testharness.js-based test.
PASS The prototype for OL is HTMLOListElement.prototype
FAIL 'reversed' property should be defined on OL. assert_own_property: expected property "reversed" missing
FAIL 'start' property should be defined on OL. assert_own_property: expected property "start" missing
FAIL 'type' property should be defined on OL. assert_own_property: expected property "type" missing
PASS 'reversed' property should be defined on OL.
PASS 'start' property should be defined on OL.
PASS 'type' property should be defined on OL.
PASS OL's 'reversed' IDL property reflects content attribute.
PASS OL's 'start' IDL property reflects content attribute.
PASS OL's 'type' IDL property reflects content attribute.
......
......@@ -169,17 +169,17 @@
// check that "own" properties reversed, start, and type are present
test(function () {
testList = document.getElementById("basic");
assert_own_property(testList, "reversed");
assert_idl_attribute(testList, "reversed");
}, "'reversed' property should be defined on OL.");
test(function () {
testList = document.getElementById("basic");
assert_own_property(testList, "start");
assert_idl_attribute(testList, "start");
}, "'start' property should be defined on OL.");
test(function () {
testList = document.getElementById("basic");
assert_own_property(testList, "type");
assert_idl_attribute(testList, "type");
}, "'type' property should be defined on OL.");
// "The reversed, start, and type IDL attributes must reflect the respective content attributes of the same name."
......
#innerFrame {
position: absolute;
top: 250px;
top: 300px;
left: 200px;
height: 100px;
width: 100px;
......@@ -11,8 +11,8 @@ height: 100px;
}
#square1 {
top: 250px;
left: 100px;
top: 330px;
left: 150px;
background: black;
}
......
......@@ -15,7 +15,16 @@ var All_Pointer_Events = [
function check_PointerEvent(event, testNamePrefix) {
if (testNamePrefix === undefined)
testNamePrefix = "";
var pointerTestName = testNamePrefix + ' ' + event.pointerType + ' ' + event.type;
// Use expectedPointerType if set otherwise just use the incoming event pointerType in the test name.
var pointerTestName = testNamePrefix + ' ' + (expectedPointerType == null ? event.pointerType : expectedPointerType) + ' ' + event.type;
if (expectedPointerType != null) {
test(function () {
assert_equals(event.pointerType, expectedPointerType, "pointerType should be the same as the requested device.");
}, pointerTestName + " event pointerType is correct.");
}
test(function () {
assert_true(event instanceof event.target.ownerDocument.defaultView.PointerEvent, "event is a PointerEvent event");
}, pointerTestName + " event is a PointerEvent event");
......@@ -92,11 +101,12 @@ function check_PointerEvent(event, testNamePrefix) {
}
}, pointerTestName + ".pressure value is valid");
// Check mouse-specific properties
if (event.pointerType === "mouse") {
// TA: 1.9, 1.10, 1.13
test(function () {
assert_equals(event.width, 1, "width of mouse should be 1");
assert_equals(event.height, 1, "height of mouse should be 1");
assert_equals(event.tiltX, 0, event.type + ".tiltX is 0 for mouse");
assert_equals(event.tiltY, 0, event.type + ".tiltY is 0 for mouse");
assert_true(event.isPrimary, event.type + ".isPrimary is true for mouse");
......@@ -185,3 +195,46 @@ function rPointerCapture(e) {
catch(e) {
}
}
var globalPointerEventTest = null;
var expectedPointerType = null;
var HOVERABLE_POINTERS = ['mouse', 'pen'];
function MultiPointerTypeTest(testName, types) {
this.testName = testName;
this.types = types;
this.currentTypeIndex = 0;
this.currentTest = null;
this.createNextTest();
}
MultiPointerTypeTest.prototype.skip = function() {
var prevTest = this.currentTest;
this.createNextTest();
prevTest.timeout();
}
MultiPointerTypeTest.prototype.done = function() {
var prevTest = this.currentTest;
this.createNextTest();
if (prevTest != null)
prevTest.done();
}
MultiPointerTypeTest.prototype.createNextTest = function() {
if (this.currentTypeIndex < this.types.length) {
var pointerTypeDescription = document.getElementById('pointerTypeDescription');
document.getElementById('pointerTypeDescription').innerHTML = "Follow the test instructions with <span style='color: red'>" + this.types[this.currentTypeIndex] + "</span>. If you don't have the device <a href='javascript:;' onclick='globalPointerEventTest.skip()'>skip it</a>.";
this.currentTest = async_test(this.types[this.currentTypeIndex] + ' ' + this.testName);
expectedPointerType = this.types[this.currentTypeIndex];
this.currentTypeIndex++;
} else {
document.getElementById('pointerTypeDescription').innerHTML = "";
}
resetTestState();
}
function setup_pointerevent_test(testName, supportedPointerTypes) {
return globalPointerEventTest = new MultiPointerTypeTest(testName, supportedPointerTypes);
}
<!doctype html>
<html>
<head>
<title>touch-action: pan-down</title>
<meta name="assert" content="TA15.4 - With `touch-action: pan-down` on a swiped or click/dragged element, only panning in the y-axis down direction should be possible.">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="pointerevent_support.js"></script>
<style>
#target0 {
width: 700px;
height: 430px;
touch-action: pan-down;
}
</style>
</head>
<body onload="run()">
<h1>Pointer Events touch-action attribute support</h1>
<h4 id="desc">Test Description: Try to scroll element UP (drag down), then RIGHT (drag left), then DOWN (drag up). Tap Complete button under the rectangle when done. Expected: only pans in down direction.</h4>
<p>Note: this test is for touch-devices only</p>
<div id="target0">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
</div>
<input type="button" id="btnComplete" value="Complete test">
<script type='text/javascript'>
var detected_pointertypes = {};
var test_touchaction = async_test("touch-action attribute test");
add_completion_callback(showPointerTypes);
function run() {
var target0 = document.getElementById("target0");
var btnComplete = document.getElementById("btnComplete");
target0.scrollTop = 200;
var scrollListenerExecuted = false;
target0.addEventListener("scroll", function(event) {
scrollListenerExecuted = true;
assert_greater_than_equal(target0.scrollTop, 200);
});
// Check if "touch-action: pan-down" attribute works properly
//TA: 15.4
on_event(btnComplete, 'click', function(event) {
detected_pointertypes[event.pointerType] = true;
test_touchaction.step(function() {
assert_true(scrollListenerExecuted, "scroll listener should have been executed by the end of the test");
assert_equals(target0.scrollLeft, 0, "scroll x offset should be 0 in the end of the test");
assert_greater_than(target0.scrollTop, 200, "scroll y offset should be greater than 200 in the end of the test");
});
test_touchaction.done();
updateDescriptionComplete();
});
}
</script>
<h1>touch-action: pan-down</h1>
<div id="complete-notice">
<p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
</div>
<div id="log"></div>
</body>
</html>
<!doctype html>
<html>
<head>
<title>touch-action: pan-left</title>
<meta name="assert" content="TA15.3 - With `touch-action: pan-left` on a swiped or click/dragged element, only panning on the x-axis left direction should be possible.">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="pointerevent_support.js"></script>
<style>
#target0 {
width: 700px;
height: 430px;
touch-action: pan-left;
}
</style>
</head>
<body onload="run()">
<h1>Pointer Events touch-action attribute support</h1>
<h4 id="desc">Test Description: Try to scroll element DOWN (drag up), then RIGHT (drag left), then LEFT (drag right). Tap Complete button under the rectangle when done. Expected: only pans in left direction.</h4>
<p>Note: this test is for touch-devices only</p>
<div id="target0">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
</div>
<input type="button" id="btnComplete" value="Complete test">
<script type='text/javascript'>
var detected_pointertypes = {};
var test_touchaction = async_test("touch-action attribute test");
add_completion_callback(showPointerTypes);
function run() {
var target0 = document.getElementById("target0");
var btnComplete = document.getElementById("btnComplete");
target0.scrollLeft = 200;
var scrollListenerExecuted = false;
target0.addEventListener("scroll", function(event) {
scrollListenerExecuted = true;
assert_less_than_equal(target0.scrollLeft, 200);
});
// Check if "touch-action: pan-left" attribute works properly
//TA: 15.3
on_event(btnComplete, 'click', function(event) {
detected_pointertypes[event.pointerType] = true;
test_touchaction.step(function() {
assert_true(scrollListenerExecuted, "scroll listener should have been executed by the end of the test");
assert_less_than(target0.scrollLeft, 200, "scroll x offset should be less than 200 in the end of the test");
assert_equals(target0.scrollTop, 0, "scroll y offset should be 0 in the end of the test");
});
test_touchaction.done();
updateDescriptionComplete();
});
}
</script>
<h1>touch-action: pan-left</h1>
<div id="complete-notice">
<p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
</div>
<div id="log"></div>
</body>
</html>
<!doctype html>
<html>
<head>
<title>touch-action: pan-right</title>
<meta name="assert" content="TA15.3 - With `touch-action: pan-right` on a swiped or click/dragged element, only panning on the x-axis right direction should be possible.">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="pointerevent_support.js"></script>
<style>
#target0 {
width: 700px;
height: 430px;
touch-action: pan-right;
}
</style>
</head>
<body onload="run()">
<h1>Pointer Events touch-action attribute support</h1>
<h4 id="desc">Test Description: Try to scroll element DOWN (drag up), then LEFT (drag right), then RIGHT (drag left). Tap Complete button under the rectangle when done. Expected: only pans in right direction.</h4>
<p>Note: this test is for touch-devices only</p>
<div id="target0">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
</div>
<input type="button" id="btnComplete" value="Complete test">
<script type='text/javascript'>
var detected_pointertypes = {};
var test_touchaction = async_test("touch-action attribute test");
add_completion_callback(showPointerTypes);
function run() {
var target0 = document.getElementById("target0");
var btnComplete = document.getElementById("btnComplete");
target0.scrollLeft = 200;
var scrollListenerExecuted = false;
target0.addEventListener("scroll", function(event) {
scrollListenerExecuted = true;
assert_greater_than_equal(target0.scrollLeft, 200);
});
// Check if "touch-action: pan-right" attribute works properly
//TA: 15.3
on_event(btnComplete, 'click', function(event) {
detected_pointertypes[event.pointerType] = true;
test_touchaction.step(function() {
assert_true(scrollListenerExecuted, "scroll listener should have been executed by the end of the test");
assert_greater_than(target0.scrollLeft, 200, "scroll x offset should be greater than 200 in the end of the test");
assert_equals(target0.scrollTop, 0, "scroll y offset should be 0 in the end of the test");
});
test_touchaction.done();
updateDescriptionComplete();
});
}
</script>
<h1>touch-action: pan-right</h1>
<div id="complete-notice">
<p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
</div>
<div id="log"></div>
</body>
</html>
<!doctype html>
<html>
<head>
<title>touch-action: pan-up</title>
<meta name="assert" content="TA15.4 - With `touch-action: pan-up` on a swiped or click/dragged element, only panning in the y-axis up direction should be possible.">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="pointerevent_support.js"></script>
<style>
#target0 {
width: 700px;
height: 430px;
touch-action: pan-up;
}
</style>
</head>
<body onload="run()">
<h1>Pointer Events touch-action attribute support</h1>
<h4 id="desc">Test Description: Try to scroll element DOWN (drag up), then RIGHT (drag left), then UP (drag down). Tap Complete button under the rectangle when done. Expected: only pans in up direction.</h4>
<p>Note: this test is for touch-devices only</p>
<div id="target0">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem
nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat.
Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat.
</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
<p>Lorem ipsum dolor sit amet...</p>
</div>
<input type="button" id="btnComplete" value="Complete test">
<script type='text/javascript'>
var detected_pointertypes = {};
var test_touchaction = async_test("touch-action attribute test");
add_completion_callback(showPointerTypes);
function run() {
var target0 = document.getElementById("target0");
var btnComplete = document.getElementById("btnComplete");
target0.scrollTop = 200;
var scrollListenerExecuted = false;
target0.addEventListener("scroll", function(event) {
scrollListenerExecuted = true;
assert_less_than_equal(target0.scrollTop, 200);
});
// Check if "touch-action: pan-up" attribute works properly
//TA: 15.4
on_event(btnComplete, 'click', function(event) {
detected_pointertypes[event.pointerType] = true;
test_touchaction.step(function() {
assert_true(scrollListenerExecuted, "scroll listener should have been executed by the end of the test");
assert_equals(target0.scrollLeft, 0, "scroll x offset should be 0 in the end of the test");
assert_less_than(target0.scrollTop, 200, "scroll y offset should be less than 200 in the end of the test");
});
test_touchaction.done();
updateDescriptionComplete();
});
}
</script>
<h1>touch-action: pan-up</h1>
<div id="complete-notice">
<p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
</div>
<div id="log"></div>
</body>
</html>
......@@ -14,81 +14,32 @@
<script src="/resources/testharnessreport.js"></script>
<script src="pointerevent_support.js"></script>
<style>
#target0 {
width: 700px;
height: 20px;
touch-action: auto;
}
#target1 {
width: 700px;
height: 20px;
touch-action: none;
background: black;
margin-top: 5px;
touch-action: pan-x;
}
#target2 {
width: 700px;
height: 20px;
touch-action: none;
background: black;
margin-top: 5px;
touch-action: pan-y;
}
#target3 {
width: 700px;
height: 20px;
touch-action: none;
background: black;
margin-top: 5px;
touch-action: none;
}
#target4 {
width: 700px;
height: 20px;
touch-action: none;
background: black;
margin-top: 5px;
touch-action: manipulation;
}
/*
Give some rules below something to override in order to test
that they really are being parsed
*/
.defnone {
touch-action: none;
}
</style>
</head>
<body onload="run()">
<h2>Pointer Events touch-action attribute support</h2>
<h4 id="desc">Test Description: Test will automatically check behaviour of following values: 'auto', 'pan-x', 'pan-y', ' none', 'manipulation'</h4>
<div id="target0"></div>
<div id="target1"></div>
<div id="target2"></div>
<div id="target3"></div>
<div id="target4"></div>
<h4 id="desc">Test Description: Test will automatically check parsing behaviour of various touch-action combinations.</h4>
<script type='text/javascript'>
var detected_pointertypes = {};
setup({ explicit_done: true });
function run() {
var target0 = document.getElementById('target0');
var target1 = document.getElementById('target1');
var target2 = document.getElementById('target2');
var target3 = document.getElementById('target3');
var target4 = document.getElementById('target4');
var tests = document.querySelectorAll('.test');
//TA 15.20
test(function() {
assert_true(getComputedStyle(target0).touchAction == 'auto', "'auto' is set properly");
}, "'auto' is set properly");
test(function() {
assert_true(getComputedStyle(target1).touchAction == 'pan-x', "'pan-x' is corrected properly");
}, "'pan-x' is corrected properly");
test(function() {
assert_true(getComputedStyle(target2).touchAction == 'pan-y', "'pan-y' is set properly");
}, "'pan-y' is set properly");
test(function() {
assert_true(getComputedStyle(target3).touchAction == 'none', "'none' is set properly");
}, "'none' is set properly");
test(function() {
assert_true(getComputedStyle(target4).touchAction == 'manipulation', "'manipulation' is set properly");
}, "'manipulation' is set properly");
for (var i = 0; i < tests.length; i++) {
test(function() {
var style = window.getComputedStyle(tests[i]);
assert_equals(tests[i].attributes.expected.value, style.touchAction);
}, tests[i].id);
}
done();
}
</script>
......@@ -97,5 +48,44 @@
<p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
</div>
<div id="log"></div>
<div class="test" id="default" expected="auto"></div>
<div class="test defnone" id="stylesheet-none" expected="none"></div>
<div class="test defnone" id="explicit-auto" style="touch-action: auto;" expected="auto"></div>
<div class="test" id="explicit-pan-x" style="touch-action: pan-x;" expected="pan-x"></div>
<div class="test" id="explicit-pan-left" style="touch-action: pan-left;" expected="pan-left"></div>
<div class="test" id="explicit-pan-right" style="touch-action: pan-right;" expected="pan-right"></div>
<div class="test" id="explicit-pan-y" style="touch-action: pan-y;" expected="pan-y"></div>
<div class="test" id="explicit-pan-up" style="touch-action: pan-up;" expected="pan-up"></div>
<div class="test" id="explicit-pan-down" style="touch-action: pan-down;" expected="pan-down"></div>
<div class="test" id="explicit-pan-x-pan-y" style="touch-action: pan-x pan-y;" expected="pan-x pan-y"></div>
<div class="test" id="explicit-pan-y-pan-x" style="touch-action: pan-y pan-x;" expected="pan-x pan-y"></div>
<div class="test" id="explicit-pan-left-pan-up" style="touch-action: pan-left pan-up;" expected="pan-left pan-up"></div>
<div class="test" id="explicit-pan-left-pan-down" style="touch-action: pan-left pan-down;" expected="pan-left pan-down"></div>
<div class="test" id="explicit-pan-right-pan-up" style="touch-action: pan-right pan-up;" expected="pan-right pan-up"></div>
<div class="test" id="explicit-pan-right-pan-down" style="touch-action: pan-right pan-down;" expected="pan-right pan-down"></div>
<div class="test" id="explicit-pan-up-pan-left" style="touch-action: pan-up pan-left;" expected="pan-left pan-up"></div>
<div class="test" id="explicit-pan-up-pan-right" style="touch-action: pan-up pan-right;" expected="pan-right pan-up"></div>
<div class="test" id="explicit-pan-down-pan-left" style="touch-action: pan-down pan-left;" expected="pan-left pan-down"></div>
<div class="test" id="explicit-pan-down-pan-right" style="touch-action: pan-down pan-right;" expected="pan-right pan-down"></div>
<div class="test" id="explicit-manipulation" style="touch-action: manipulation;" expected="manipulation"></div>
<div class="test" id="explicit-none" style="touch-action: none;" expected="none"></div>
<div class="test" id="explicit-invalid-1" style="touch-action: bogus;" expected="auto"></div>
<div class="test defnone" id="explicit-invalid-2" style="touch-action: auto pan-x;" expected="none"></div>
<div class="test" id="explicit-invalid-3" style="touch-action: pan-y none;" expected="auto"></div>
<div class="test" id="explicit-invalid-4" style="touch-action: pan-x pan-x;" expected="auto"></div>
<div class="test" id="explicit-invalid-5" style="touch-action: manipulation pan-x;" expected="auto"></div>
<div class="test" id="explicit-invalid-6" style="touch-action: pan-x pan-left;" expected="auto"></div>
<div class="test" id="explicit-invalid-7" style="touch-action: auto pan-left;" expected="auto"></div>
<div class="test" id="explicit-invalid-8" style="touch-action: none pan-left;" expected="auto"></div>
<div class="test" id="explicit-invalid-9" style="touch-action: pan-x pan-right;" expected="auto"></div>
<div class="test" id="explicit-invalid-10" style="touch-action: pan-y pan-up;" expected="auto"></div>
<div class="test" id="explicit-invalid-11" style="touch-action: pan-y pan-down;" expected="auto"></div>
<div class="test" id="explicit-invalid-12" style="touch-action: pan-left pan-right;" expected="auto"></div>
<div class="test" id="explicit-invalid-13" style="touch-action: pan-up pan-down;" expected="auto"></div>
<div style="touch-action: none;">
<div class="test" id="not-inherited" expected="auto"></div>
<div class="test" id="inherit" style="touch-action: inherit;" expected="none"></div>
</div>
<div class="test defnone" id="initial" style="touch-action: initial;" expected="auto"></div>
</body>
</html>
\ No newline at end of file
</html>
......@@ -523,11 +523,9 @@ policies and contribution forms [3].
function promise_test(func, name, properties) {
var test = async_test(name, properties);
// If there is no promise tests queue make one.
test.step(function() {
if (!tests.promise_tests) {
tests.promise_tests = Promise.resolve();
}
});
if (!tests.promise_tests) {
tests.promise_tests = Promise.resolve();
}
tests.promise_tests = tests.promise_tests.then(function() {
return Promise.resolve(test.step(func, test, test))
.then(
......
CONSOLE ERROR: line 2445: Uncaught Error: assert_equals: expected Element node <script id="outerScriptElement">
CONSOLE ERROR: line 2443: Uncaught Error: assert_equals: expected Element node <script id="outerScriptElement">
var outerScriptElement ... but got null
CONSOLE ERROR: line 2445: Uncaught Error: assert_equals: expected Element node <script id="outerScriptElement">
CONSOLE ERROR: line 2443: Uncaught Error: assert_equals: expected Element node <script id="outerScriptElement">
var outerScriptElement ... but got null
This is a testharness.js-based test.
......
......@@ -523,11 +523,9 @@ policies and contribution forms [3].
function promise_test(func, name, properties) {
var test = async_test(name, properties);
// If there is no promise tests queue make one.
test.step(function() {
if (!tests.promise_tests) {
tests.promise_tests = Promise.resolve();
}
});
if (!tests.promise_tests) {
tests.promise_tests = Promise.resolve();
}
tests.promise_tests = tests.promise_tests.then(function() {
return Promise.resolve(test.step(func, test, test))
.then(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment