Commit d9d2716d authored by Chromium WPT Sync's avatar Chromium WPT Sync Committed by Commit Bot

Import wpt@e963de46200d021ff5756018e1c09928b223723f

Using wpt-import in Chromium f0759378.
With Chromium commits locally applied on WPT:
8f02a380 "Use allow attribute for delegation in web serial WPT"
c1a7d15a "[LayoutNG] Multicol baseline propagation support."
f30daabb "[COOP] access reporting: test with redirects."


Note to sheriffs: This CL imports external tests and adds
expectations for those tests; if this CL is large and causes
a few new failures, please fix the failures by adding new
lines to TestExpectations rather than reverting. See:
https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md

Directory owners for changes in this CL:
binji@chromium.org:
  external/wpt/wasm
foolip@chromium.org, lpz@chromium.org, robertma@chromium.org:
  external/wpt/tools
hbos@chromium.org, hta@chromium.org, guidou@chromium.org, philipp.hancke@googlemail.com:
  external/wpt/webrtc
iclelland@chromium.org:
  external/wpt/feature-policy
jsbell@chromium.org:
  external/wpt/resources
lanwei@chromium.org:
  external/wpt/infrastructure/testdriver/actions
nzolghadr@chromium.org:
  external/wpt/pointerlock

NOAUTOREVERT=true
TBR=foolip@google.com

No-Export: true
Change-Id: I568c48ca68952a65c16500d747e4ab973ba04fd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429591Reviewed-by: default avatarWPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: WPT Autoroller <wpt-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#810550}
parent d010ca32
...@@ -2684,6 +2684,7 @@ crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-20 ...@@ -2684,6 +2684,7 @@ crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-20
crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-206.xht [ Failure ] crbug.com/958381 [ Mac ] external/wpt/css/CSS2/tables/table-anonymous-objects-206.xht [ Failure ]
# ====== New tests from wpt-importer added here ====== # ====== New tests from wpt-importer added here ======
crbug.com/626703 external/wpt/infrastructure/testdriver/actions/wheelScroll.html [ Timeout ]
crbug.com/626703 external/wpt/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html [ Failure ] crbug.com/626703 external/wpt/css/css-fonts/math-script-level-and-math-style/math-script-level-auto-and-math-style-002.tentative.html [ Failure ]
crbug.com/626703 [ Fuchsia ] virtual/threaded/external/wpt/animation-worklet/worklet-animation-pause-immediately.https.html [ Failure ] crbug.com/626703 [ Fuchsia ] virtual/threaded/external/wpt/animation-worklet/worklet-animation-pause-immediately.https.html [ Failure ]
crbug.com/626703 [ Mac11.0 ] virtual/threaded/external/wpt/animation-worklet/worklet-animation-pause-immediately.https.html [ Failure ] crbug.com/626703 [ Mac11.0 ] virtual/threaded/external/wpt/animation-worklet/worklet-animation-pause-immediately.https.html [ Failure ]
......
...@@ -77,6 +77,12 @@ crbug.com/1020018 [ Linux ] external/wpt/webdriver/tests/get_active_element/get. ...@@ -77,6 +77,12 @@ crbug.com/1020018 [ Linux ] external/wpt/webdriver/tests/get_active_element/get.
crbug.com/1020018 [ Linux ] external/wpt/webdriver/tests/get_active_element/get.py>>test_sucess_input_non_interactable [ Failure ] crbug.com/1020018 [ Linux ] external/wpt/webdriver/tests/get_active_element/get.py>>test_sucess_input_non_interactable [ Failure ]
# ====== New tests from wpt-importer added here ====== # ====== New tests from wpt-importer added here ======
crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/perform_actions/wheel.py>>test_wheel_scroll_iframe [ Failure ]
crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/perform_actions/wheel.py>>test_wheel_scroll_overflow [ Failure ]
crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/perform_actions/wheel.py>>test_wheel_scroll [ Failure ]
crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/perform_actions/wheel.py>>test_no_browsing_context [ Failure ]
crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/perform_actions/wheel.py>>test_null_response_value [ Failure ]
crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/perform_actions/wheel.py>>test_no_top_browsing_context [ Failure ]
crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/get_active_element/get.py>>test_no_browsing_context [ Failure ] crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/get_active_element/get.py>>test_no_browsing_context [ Failure ]
crbug.com/626703 [ Mac10.13 ] external/wpt/webdriver/tests/get_active_element/get.py>>test_no_browsing_context [ Failure ] crbug.com/626703 [ Mac10.13 ] external/wpt/webdriver/tests/get_active_element/get.py>>test_no_browsing_context [ Failure ]
crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/get_page_source/source.py>>test_no_browsing_context [ Failure ] crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/get_page_source/source.py>>test_no_browsing_context [ Failure ]
......
...@@ -3253,8 +3253,8 @@ crbug.com/1050754 external/wpt/payment-handler/respond-with-minimal-ui.https.htm ...@@ -3253,8 +3253,8 @@ crbug.com/1050754 external/wpt/payment-handler/respond-with-minimal-ui.https.htm
crbug.com/1050754 external/wpt/payment-method-basic-card/apply_the_modifiers.html [ Timeout ] crbug.com/1050754 external/wpt/payment-method-basic-card/apply_the_modifiers.html [ Timeout ]
crbug.com/1050754 external/wpt/payment-method-basic-card/payment-request-canmakepayment-method.https.html [ Timeout ] crbug.com/1050754 external/wpt/payment-method-basic-card/payment-request-canmakepayment-method.https.html [ Timeout ]
crbug.com/1050754 external/wpt/payment-method-basic-card/steps_for_selecting_the_payment_handler.html [ Timeout ] crbug.com/1050754 external/wpt/payment-method-basic-card/steps_for_selecting_the_payment_handler.html [ Timeout ]
crbug.com/1050754 external/wpt/payment-request/MerchantValidationEvent/complete-method.https.html [ Failure ] crbug.com/1050754 external/wpt/merchant-validation/complete-method.tentative.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/MerchantValidationEvent/constructor.https.html [ Failure ] crbug.com/1050754 external/wpt/merchant-validation/constructor.tentative.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/idlharness.https.window.html [ Failure ] crbug.com/1050754 external/wpt/payment-request/idlharness.https.window.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/onmerchantvalidation-attribute.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-request/onmerchantvalidation-attribute.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/payment-is-showing.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-request/payment-is-showing.https.html [ Failure ]
......
...@@ -3223,8 +3223,8 @@ crbug.com/1050754 external/wpt/payment-method-basic-card/historical.https.html [ ...@@ -3223,8 +3223,8 @@ crbug.com/1050754 external/wpt/payment-method-basic-card/historical.https.html [
crbug.com/1050754 external/wpt/payment-method-basic-card/payment-request-canmakepayment-method.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-method-basic-card/payment-request-canmakepayment-method.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-method-basic-card/steps_for_selecting_the_payment_handler.html [ Timeout ] crbug.com/1050754 external/wpt/payment-method-basic-card/steps_for_selecting_the_payment_handler.html [ Timeout ]
crbug.com/1050754 external/wpt/payment-method-id/payment-request-ctor-pmi-handling.https.sub.html [ Failure ] crbug.com/1050754 external/wpt/payment-method-id/payment-request-ctor-pmi-handling.https.sub.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/MerchantValidationEvent/complete-method.https.html [ Failure ] crbug.com/1050754 external/wpt/merchant-validation/complete-method.tentative.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/MerchantValidationEvent/constructor.https.html [ Failure ] crbug.com/1050754 external/wpt/merchant-validation/constructor.tentative.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/PaymentMethodChangeEvent/methodDetails-attribute.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-request/PaymentMethodChangeEvent/methodDetails-attribute.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/PaymentMethodChangeEvent/methodName-attribute.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-request/PaymentMethodChangeEvent/methodName-attribute.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/PaymentRequestUpdateEvent/constructor.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-request/PaymentRequestUpdateEvent/constructor.https.html [ Failure ]
......
...@@ -3386,8 +3386,8 @@ crbug.com/1050754 external/wpt/payment-method-basic-card/historical.https.html [ ...@@ -3386,8 +3386,8 @@ crbug.com/1050754 external/wpt/payment-method-basic-card/historical.https.html [
crbug.com/1050754 external/wpt/payment-method-basic-card/payment-request-canmakepayment-method.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-method-basic-card/payment-request-canmakepayment-method.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-method-basic-card/steps_for_selecting_the_payment_handler.html [ Timeout ] crbug.com/1050754 external/wpt/payment-method-basic-card/steps_for_selecting_the_payment_handler.html [ Timeout ]
crbug.com/1050754 external/wpt/payment-method-id/payment-request-ctor-pmi-handling.https.sub.html [ Failure ] crbug.com/1050754 external/wpt/payment-method-id/payment-request-ctor-pmi-handling.https.sub.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/MerchantValidationEvent/complete-method.https.html [ Failure ] crbug.com/1050754 external/wpt/merchant-validation/complete-method.tentative.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/MerchantValidationEvent/constructor.https.html [ Failure ] crbug.com/1050754 external/wpt/merchant-validation/constructor.tentative.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/PaymentMethodChangeEvent/methodDetails-attribute.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-request/PaymentMethodChangeEvent/methodDetails-attribute.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/PaymentMethodChangeEvent/methodName-attribute.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-request/PaymentMethodChangeEvent/methodName-attribute.https.html [ Failure ]
crbug.com/1050754 external/wpt/payment-request/PaymentRequestUpdateEvent/constructor.https.html [ Failure ] crbug.com/1050754 external/wpt/payment-request/PaymentRequestUpdateEvent/constructor.https.html [ Failure ]
......
...@@ -4,16 +4,17 @@ ...@@ -4,16 +4,17 @@
"use strict"; "use strict";
// https://wicg.github.io/feature-policy/ // https://wicg.github.io/permissions-policy/
idl_test( idl_test(
['feature-policy'], ['permissions-policy'],
['reporting', 'html', 'dom'], ['reporting', 'html', 'dom'],
idl_array => { idl_array => {
idl_array.add_objects({ idl_array.add_objects({
Document: ['document'], Document: ['document'],
HTMLIframeElement: ['document.createElement("iframe")'], HTMLIframeElement: ['document.createElement("iframe")'],
FeaturePolicy: ['document.featurePolicy'], PermissionsPolicy: ['document.permissionsPolicy'],
}) // TODO: PermissionsPolicyViolationReportBody
});
} }
); );
<!DOCTYPE html>
<meta charset="utf-8">
<title>TestDriver actions: wheel scroll</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
#container {
width: 200px;
height: 200px;
overflow: scroll;
}
#content {
width: 600px;
height: 1000px;
background-color: blue;
}
</style>
<div id="container">
<div id="content"></div>
</div>
<script>
let event_type = [];
let event_id = [];
async_test(t => {
let container = document.getElementById("container");
container.addEventListener("wheel",
e => {event_type.push(e.type);});
let actions = new test_driver.Actions()
.scroll(0, 0, 0, 50, {origin: container});
actions.send()
.then(t.step_func_done(() => {assert_array_equals(event_type, ["wheel"]);}))
.catch(e => t.step_func(() => assert_unreached("Actions sequence failed " + e)));
});
</script>
// GENERATED CONTENT - DO NOT EDIT // GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref // Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref) // (https://github.com/w3c/webref)
// Source: Native File System (https://wicg.github.io/native-file-system/) // Source: File System Access (https://wicg.github.io/file-system-access/)
enum FileSystemPermissionMode { enum FileSystemPermissionMode {
"read", "read",
......
...@@ -24,7 +24,6 @@ interface PaymentRequest : EventTarget { ...@@ -24,7 +24,6 @@ interface PaymentRequest : EventTarget {
readonly attribute DOMString? shippingOption; readonly attribute DOMString? shippingOption;
readonly attribute PaymentShippingType? shippingType; readonly attribute PaymentShippingType? shippingType;
attribute EventHandler onmerchantvalidation;
attribute EventHandler onshippingaddresschange; attribute EventHandler onshippingaddresschange;
attribute EventHandler onshippingoptionchange; attribute EventHandler onshippingoptionchange;
attribute EventHandler onpaymentmethodchange; attribute EventHandler onpaymentmethodchange;
...@@ -175,19 +174,6 @@ dictionary PayerErrors { ...@@ -175,19 +174,6 @@ dictionary PayerErrors {
DOMString phone; DOMString phone;
}; };
[SecureContext, Exposed=Window]
interface MerchantValidationEvent : Event {
constructor(DOMString type, optional MerchantValidationEventInit eventInitDict = {});
readonly attribute DOMString methodName;
readonly attribute USVString validationURL;
undefined complete(Promise<any> merchantSessionPromise);
};
dictionary MerchantValidationEventInit : EventInit {
DOMString methodName = "";
USVString validationURL = "";
};
[SecureContext, Exposed=Window] [SecureContext, Exposed=Window]
interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent { interface PaymentMethodChangeEvent : PaymentRequestUpdateEvent {
constructor(DOMString type, optional PaymentMethodChangeEventInit eventInitDict = {}); constructor(DOMString type, optional PaymentMethodChangeEventInit eventInitDict = {});
......
// GENERATED CONTENT - DO NOT EDIT // GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref // Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref) // (https://github.com/w3c/webref)
// Source: Feature Policy (https://w3c.github.io/webappsec-feature-policy/) // Source: Permissions Policy (https://w3c.github.io/webappsec-permissions-policy/)
[Exposed=Window] [Exposed=Window]
interface FeaturePolicy { interface PermissionsPolicy {
boolean allowsFeature(DOMString feature, optional DOMString origin); boolean allowsFeature(DOMString feature, optional DOMString origin);
sequence<DOMString> features(); sequence<DOMString> features();
sequence<DOMString> allowedFeatures(); sequence<DOMString> allowedFeatures();
...@@ -12,15 +12,15 @@ interface FeaturePolicy { ...@@ -12,15 +12,15 @@ interface FeaturePolicy {
}; };
partial interface Document { partial interface Document {
[SameObject] readonly attribute FeaturePolicy featurePolicy; [SameObject] readonly attribute PermissionsPolicy permissionsPolicy;
}; };
partial interface HTMLIFrameElement { partial interface HTMLIFrameElement {
[SameObject] readonly attribute FeaturePolicy featurePolicy; [SameObject] readonly attribute PermissionsPolicy permissionsPolicy;
}; };
[Exposed=Window] [Exposed=Window]
interface FeaturePolicyViolationReportBody : ReportBody { interface PermissionsPolicyViolationReportBody : ReportBody {
readonly attribute DOMString featureId; readonly attribute DOMString featureId;
readonly attribute DOMString? sourceFile; readonly attribute DOMString? sourceFile;
readonly attribute long? lineNumber; readonly attribute long? lineNumber;
......
...@@ -12,21 +12,24 @@ enum ScrollDirection { ...@@ -12,21 +12,24 @@ enum ScrollDirection {
enum ScrollTimelineAutoKeyword { "auto" }; enum ScrollTimelineAutoKeyword { "auto" };
typedef (CSSNumericValue or CSSKeywordish) ContainerBasedOffset;
typedef (ContainerBasedOffset or ElementBasedOffset) ScrollTimelineOffset;
dictionary ScrollTimelineOptions { dictionary ScrollTimelineOptions {
Element? source = null; Element? source = null;
ScrollDirection orientation = "block"; ScrollDirection orientation = "block";
(DOMString or ElementBasedOffset) start = "auto"; ScrollTimelineOffset start = "auto";
(DOMString or ElementBasedOffset) end = "auto"; ScrollTimelineOffset end = "auto";
(double or ScrollTimelineAutoKeyword) timeRange = "auto"; (double or ScrollTimelineAutoKeyword) timeRange = "auto";
}; };
[Exposed=Window] [Exposed=Window]
interface ScrollTimeline : AnimationTimeline { interface ScrollTimeline : AnimationTimeline {
constructor(optional ScrollTimelineOptions options = {}); constructor(optional ScrollTimelineOptions options = {});
readonly attribute Element source; readonly attribute Element? source;
readonly attribute ScrollDirection orientation; readonly attribute ScrollDirection orientation;
readonly attribute DOMString start; readonly attribute ScrollTimelineOffset start;
readonly attribute DOMString end; readonly attribute ScrollTimelineOffset end;
readonly attribute (double or ScrollTimelineAutoKeyword) timeRange; readonly attribute (double or ScrollTimelineAutoKeyword) timeRange;
}; };
...@@ -37,3 +40,13 @@ dictionary ElementBasedOffset { ...@@ -37,3 +40,13 @@ dictionary ElementBasedOffset {
Edge edge = "start"; Edge edge = "start";
double threshold = 0.0; double threshold = 0.0;
}; };
[Exposed=Window]
interface CSSScrollTimelineRule : CSSRule {
readonly attribute CSSOMString name;
readonly attribute CSSOMString source;
readonly attribute CSSOMString orientation;
readonly attribute CSSOMString start;
readonly attribute CSSOMString end;
readonly attribute CSSOMString timeRange;
};
...@@ -782,3 +782,11 @@ TESTHARNESS-IN-OTHER-TYPE: svg/svg-in-svg/svg-in-svg-circular-filter-reference-c ...@@ -782,3 +782,11 @@ TESTHARNESS-IN-OTHER-TYPE: svg/svg-in-svg/svg-in-svg-circular-filter-reference-c
PRINT STATEMENT: webdriver/tests/print/printcmd.py PRINT STATEMENT: webdriver/tests/print/printcmd.py
PRINT STATEMENT: webdriver/tests/print/user_prompts.py PRINT STATEMENT: webdriver/tests/print/user_prompts.py
DUPLICATE-BASENAME-PATH: acid/acid3/empty.html
DUPLICATE-BASENAME-PATH: acid/acid3/empty.xml
DUPLICATE-BASENAME-PATH: dom/nodes/Document-createElement-namespace-tests/*
DUPLICATE-BASENAME-PATH: dom/nodes/ParentNode-querySelector-All-content.html
DUPLICATE-BASENAME-PATH: dom/nodes/ParentNode-querySelector-All-content.xht
DUPLICATE-BASENAME-PATH: svg/struct/reftests/reference/green-100x100.html
DUPLICATE-BASENAME-PATH: svg/struct/reftests/reference/green-100x100.svg
spec: https://w3c.github.io/merchant-validation/
suggested_reviewers:
- marcoscaceres
This is a testharness.js-based test. This is a testharness.js-based test.
Found 110 tests; 107 PASS, 3 FAIL, 0 TIMEOUT, 0 NOTRUN. Found 93 tests; 92 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS idl_test setup PASS idl_test setup
PASS idl_test validation PASS idl_test validation
PASS PaymentRequest interface: existence and properties of interface object PASS PaymentRequest interface: existence and properties of interface object
...@@ -16,7 +16,6 @@ PASS PaymentRequest interface: attribute id ...@@ -16,7 +16,6 @@ PASS PaymentRequest interface: attribute id
PASS PaymentRequest interface: attribute shippingAddress PASS PaymentRequest interface: attribute shippingAddress
PASS PaymentRequest interface: attribute shippingOption PASS PaymentRequest interface: attribute shippingOption
PASS PaymentRequest interface: attribute shippingType PASS PaymentRequest interface: attribute shippingType
FAIL PaymentRequest interface: attribute onmerchantvalidation assert_true: The prototype object must have a property "onmerchantvalidation" expected true got false
PASS PaymentRequest interface: attribute onshippingaddresschange PASS PaymentRequest interface: attribute onshippingaddresschange
PASS PaymentRequest interface: attribute onshippingoptionchange PASS PaymentRequest interface: attribute onshippingoptionchange
PASS PaymentRequest interface: attribute onpaymentmethodchange PASS PaymentRequest interface: attribute onpaymentmethodchange
...@@ -31,7 +30,6 @@ PASS PaymentRequest interface: paymentRequest must inherit property "id" with th ...@@ -31,7 +30,6 @@ PASS PaymentRequest interface: paymentRequest must inherit property "id" with th
PASS PaymentRequest interface: paymentRequest must inherit property "shippingAddress" with the proper type PASS PaymentRequest interface: paymentRequest must inherit property "shippingAddress" with the proper type
PASS PaymentRequest interface: paymentRequest must inherit property "shippingOption" with the proper type PASS PaymentRequest interface: paymentRequest must inherit property "shippingOption" with the proper type
PASS PaymentRequest interface: paymentRequest must inherit property "shippingType" with the proper type PASS PaymentRequest interface: paymentRequest must inherit property "shippingType" with the proper type
FAIL PaymentRequest interface: paymentRequest must inherit property "onmerchantvalidation" with the proper type assert_inherits: property "onmerchantvalidation" not found in prototype chain
PASS PaymentRequest interface: paymentRequest must inherit property "onshippingaddresschange" with the proper type PASS PaymentRequest interface: paymentRequest must inherit property "onshippingaddresschange" with the proper type
PASS PaymentRequest interface: paymentRequest must inherit property "onshippingoptionchange" with the proper type PASS PaymentRequest interface: paymentRequest must inherit property "onshippingoptionchange" with the proper type
PASS PaymentRequest interface: paymentRequest must inherit property "onpaymentmethodchange" with the proper type PASS PaymentRequest interface: paymentRequest must inherit property "onpaymentmethodchange" with the proper type
...@@ -70,21 +68,6 @@ PASS PaymentResponse interface: attribute payerPhone ...@@ -70,21 +68,6 @@ PASS PaymentResponse interface: attribute payerPhone
PASS PaymentResponse interface: operation complete(optional PaymentComplete) PASS PaymentResponse interface: operation complete(optional PaymentComplete)
PASS PaymentResponse interface: operation retry(optional PaymentValidationErrors) PASS PaymentResponse interface: operation retry(optional PaymentValidationErrors)
PASS PaymentResponse interface: attribute onpayerdetailchange PASS PaymentResponse interface: attribute onpayerdetailchange
PASS MerchantValidationEvent interface: existence and properties of interface object
PASS MerchantValidationEvent interface object length
PASS MerchantValidationEvent interface object name
PASS MerchantValidationEvent interface: existence and properties of interface prototype object
PASS MerchantValidationEvent interface: existence and properties of interface prototype object's "constructor" property
PASS MerchantValidationEvent interface: existence and properties of interface prototype object's @@unscopables property
PASS MerchantValidationEvent interface: attribute methodName
PASS MerchantValidationEvent interface: attribute validationURL
PASS MerchantValidationEvent interface: operation complete(Promise<any>)
PASS MerchantValidationEvent must be primary interface of new MerchantValidationEvent("merchantvalidation")
PASS Stringification of new MerchantValidationEvent("merchantvalidation")
PASS MerchantValidationEvent interface: new MerchantValidationEvent("merchantvalidation") must inherit property "methodName" with the proper type
PASS MerchantValidationEvent interface: new MerchantValidationEvent("merchantvalidation") must inherit property "validationURL" with the proper type
PASS MerchantValidationEvent interface: new MerchantValidationEvent("merchantvalidation") must inherit property "complete(Promise<any>)" with the proper type
PASS MerchantValidationEvent interface: calling complete(Promise<any>) on new MerchantValidationEvent("merchantvalidation") with too few arguments must throw TypeError
PASS PaymentMethodChangeEvent interface: existence and properties of interface object PASS PaymentMethodChangeEvent interface: existence and properties of interface object
PASS PaymentMethodChangeEvent interface object length PASS PaymentMethodChangeEvent interface object length
PASS PaymentMethodChangeEvent interface object name PASS PaymentMethodChangeEvent interface object name
......
...@@ -32,15 +32,28 @@ ...@@ -32,15 +32,28 @@
} }
}); });
document.addEventListener("pointerlockchange", function() {
assert_equals(document.pointerLockElement, document.body);
// Inject mouse input
var actions = new test_driver.Actions();
actions.pointerMove(1, 1)
.pointerDown({button: actions.ButtonType.BACK})
.pointerUp({button: actions.ButtonType.BACK})
.pointerDown({button: actions.ButtonType.FORWARD})
.pointerUp({button: actions.ButtonType.FORWARD})
.send();
}, { once: true });
document.addEventListener("pointerlockerror", function() {
assert_unreached("Pointer lock error");
});
// Inject mouse input // Inject mouse input
var actions = new test_driver.Actions(); var actions = new test_driver.Actions();
actions.pointerMove(1, 1) actions.pointerMove(1, 1)
.pointerDown({button: actions.ButtonType.LEFT}) .pointerDown({button: actions.ButtonType.LEFT})
.pointerUp({button: actions.ButtonType.LEFT}) .pointerUp({button: actions.ButtonType.LEFT})
.pointerDown({button: actions.ButtonType.BACK})
.pointerUp({button: actions.ButtonType.BACK})
.pointerDown({button: actions.ButtonType.FORWARD})
.pointerUp({button: actions.ButtonType.FORWARD})
.send(); .send();
</script> </script>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
function Actions(defaultTickDuration=16) { function Actions(defaultTickDuration=16) {
this.sourceTypes = new Map([["key", KeySource], this.sourceTypes = new Map([["key", KeySource],
["pointer", PointerSource], ["pointer", PointerSource],
["wheel", WheelSource],
["none", GeneralSource]]); ["none", GeneralSource]]);
this.sources = new Map(); this.sources = new Map();
this.sourceOrder = []; this.sourceOrder = [];
...@@ -73,7 +74,7 @@ ...@@ -73,7 +74,7 @@
* If no name is passed, a new source with the given type is * If no name is passed, a new source with the given type is
* created. * created.
* *
* @param {String} type - Source type ('none', 'key', or 'pointer') * @param {String} type - Source type ('none', 'key', 'pointer', or 'wheel')
* @param {String?} name - Name of the source * @param {String?} name - Name of the source
* @returns {Source} Source object for that source. * @returns {Source} Source object for that source.
*/ */
...@@ -154,6 +155,32 @@ ...@@ -154,6 +155,32 @@
return this; return this;
}, },
/**
* Add a new wheel input source with the given name
*
* @param {String} type - Name of the wheel source
* @param {Bool} set - Set source as the default wheel source
* @returns {Actions}
*/
addWheel: function(name, set=true) {
this.createSource("wheel", name);
if (set) {
this.setWheel(name);
}
return this;
},
/**
* Set the current default wheel source
*
* @param {String} name - Name of the wheel source
* @returns {Actions}
*/
setWheel: function(name) {
this.setSource("wheel", name);
return this;
},
createSource: function(type, name, parameters={}) { createSource: function(type, name, parameters={}) {
if (!this.sources.has(type)) { if (!this.sources.has(type)) {
throw new Error(`${type} is not a valid action type`); throw new Error(`${type} is not a valid action type`);
...@@ -196,8 +223,9 @@ ...@@ -196,8 +223,9 @@
* *
* @param {Number?} duration - Minimum length of the tick in ms. * @param {Number?} duration - Minimum length of the tick in ms.
* @param {String} sourceType - source type * @param {String} sourceType - source type
* @param {String?} sourceName - Named key or pointer source to use or null for the default * @param {String?} sourceName - Named key, pointer or wheel source to use
* key or pointer source * or null for the default key, pointer or
* wheel source
* @returns {Actions} * @returns {Actions}
*/ */
pause: function(duration=0, sourceType="none", {sourceName=null}={}) { pause: function(duration=0, sourceType="none", {sourceName=null}={}) {
...@@ -280,6 +308,27 @@ ...@@ -280,6 +308,27 @@
source.pointerMove(this, x, y, duration, origin); source.pointerMove(this, x, y, duration, origin);
return this; return this;
}, },
/**
* Create a scroll event for the current default wheel source
*
* @param {Number} x - mouse cursor x coordinate
* @param {Number} y - mouse cursor y coordinate
* @param {Number} deltaX - scroll delta value along the x-axis in pixels
* @param {Number} deltaY - scroll delta value along the y-axis in pixels
* @param {String|Element} origin - Origin of the coordinate system.
* Either "viewport" or an Element
* @param {Number?} duration - Time in ms for the scroll
* @param {String?} sourceName - Named wheel source to use or null for the
* default wheel source
* @returns {Actions}
*/
scroll: function(x, y, deltaX, deltaY,
{origin="viewport", duration, sourceName=null}={}) {
let source = this.getSource("wheel", sourceName);
source.scroll(this, x, y, deltaX, deltaY, duration, origin);
return this;
},
}; };
function GeneralSource() { function GeneralSource() {
...@@ -417,5 +466,46 @@ ...@@ -417,5 +466,46 @@
}, },
}; };
function WheelSource() {
this.actions = new Map();
}
WheelSource.prototype = {
serialize: function(tickCount) {
if (!this.actions.size) {
return undefined;
}
let actions = [];
let data = {"type": "wheel", "actions": actions};
for (let i=0; i<tickCount; i++) {
if (this.actions.has(i)) {
actions.push(this.actions.get(i));
} else {
actions.push({"type": "pause"});
}
}
return data;
},
scroll: function(actions, x, y, deltaX, deltaY, duration, origin) {
let tick = actions.tickIdx;
if (this.actions.has(tick)) {
tick = actions.addTick().tickIdx;
}
this.actions.set(tick, {type: "scroll", x, y, deltaX, deltaY, origin});
if (duration) {
this.actions.get(tick).duration = duration;
}
},
addPause: function(actions, duration) {
let tick = actions.tickIdx;
if (this.actions.has(tick)) {
tick = actions.addTick().tickIdx;
}
this.actions.set(tick, {type: "pause", duration: duration});
},
};
test_driver.Actions = Actions; test_driver.Actions = Actions;
})(); })();
This is a testharness.js-based test. This is a testharness.js-based test.
PASS idl_test setup FAIL idl_test setup promise_test: Unhandled rejection with value: object "CSSScrollTimelineRule inherits CSSRule, but CSSRule is undefined."
PASS idl_test validation PASS idl_test validation
PASS Partial interface Element: member names are unique PASS Partial interface Element: member names are unique
PASS Element includes Animatable: member names are unique PASS Element includes Animatable: member names are unique
...@@ -7,23 +7,5 @@ PASS Element includes ParentNode: member names are unique ...@@ -7,23 +7,5 @@ PASS Element includes ParentNode: member names are unique
PASS Element includes NonDocumentTypeChildNode: member names are unique PASS Element includes NonDocumentTypeChildNode: member names are unique
PASS Element includes ChildNode: member names are unique PASS Element includes ChildNode: member names are unique
PASS Element includes Slottable: member names are unique PASS Element includes Slottable: member names are unique
PASS ScrollTimeline interface: existence and properties of interface object
PASS ScrollTimeline interface object length
PASS ScrollTimeline interface object name
PASS ScrollTimeline interface: existence and properties of interface prototype object
PASS ScrollTimeline interface: existence and properties of interface prototype object's "constructor" property
PASS ScrollTimeline interface: existence and properties of interface prototype object's @@unscopables property
FAIL ScrollTimeline interface: attribute source assert_true: The prototype object must have a property "source" expected true got false
PASS ScrollTimeline interface: attribute orientation
FAIL ScrollTimeline interface: attribute start assert_true: The prototype object must have a property "start" expected true got false
FAIL ScrollTimeline interface: attribute end assert_true: The prototype object must have a property "end" expected true got false
PASS ScrollTimeline interface: attribute timeRange
FAIL ScrollTimeline must be primary interface of new ScrollTimeline() assert_equals: Unexpected exception when evaluating object expected null but got object "NotSupportedError: Failed to construct 'ScrollTimeline': 'auto' value for timeRange not yet supported"
FAIL Stringification of new ScrollTimeline() assert_equals: Unexpected exception when evaluating object expected null but got object "NotSupportedError: Failed to construct 'ScrollTimeline': 'auto' value for timeRange not yet supported"
FAIL ScrollTimeline interface: new ScrollTimeline() must inherit property "source" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "NotSupportedError: Failed to construct 'ScrollTimeline': 'auto' value for timeRange not yet supported"
FAIL ScrollTimeline interface: new ScrollTimeline() must inherit property "orientation" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "NotSupportedError: Failed to construct 'ScrollTimeline': 'auto' value for timeRange not yet supported"
FAIL ScrollTimeline interface: new ScrollTimeline() must inherit property "start" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "NotSupportedError: Failed to construct 'ScrollTimeline': 'auto' value for timeRange not yet supported"
FAIL ScrollTimeline interface: new ScrollTimeline() must inherit property "end" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "NotSupportedError: Failed to construct 'ScrollTimeline': 'auto' value for timeRange not yet supported"
FAIL ScrollTimeline interface: new ScrollTimeline() must inherit property "timeRange" with the proper type assert_equals: Unexpected exception when evaluating object expected null but got object "NotSupportedError: Failed to construct 'ScrollTimeline': 'auto' value for timeRange not yet supported"
Harness: the test ran to completion. Harness: the test ran to completion.
...@@ -367,7 +367,7 @@ def check_unique_testharness_basenames(repo_root, paths): ...@@ -367,7 +367,7 @@ def check_unique_testharness_basenames(repo_root, paths):
file_dict = defaultdict(list) file_dict = defaultdict(list)
for path in paths: for path in paths:
source_file = SourceFile(repo_root, path, "/") source_file = SourceFile(repo_root, path, "/")
if source_file.type != "testharness": if "testharness" not in source_file.possible_types:
continue continue
file_name, file_extension = os.path.splitext(path) file_name, file_extension = os.path.splitext(path)
file_dict[file_name].append(file_extension) file_dict[file_name].append(file_extension)
......
...@@ -865,9 +865,68 @@ class SourceFile(object): ...@@ -865,9 +865,68 @@ class SourceFile(object):
@property @property
def type(self): def type(self):
# type: () -> Text # type: () -> Text
possible_types = self.possible_types
if len(possible_types) == 1:
return possible_types.pop()
rv, _ = self.manifest_items() rv, _ = self.manifest_items()
return rv return rv
@property
def possible_types(self):
# type: () -> Set[Text]
"""Determines the set of possible types without reading the file"""
if self.items_cache:
return {self.items_cache[0]}
if self.name_is_non_test:
return {SupportFile.item_type}
if self.name_is_manual:
return {ManualTest.item_type}
if self.name_is_conformance:
return {ConformanceCheckerTest.item_type}
if self.name_is_conformance_support:
return {SupportFile.item_type}
if self.name_is_webdriver:
return {WebDriverSpecTest.item_type}
if self.name_is_visual:
return {VisualTest.item_type}
if self.name_is_crashtest:
return {CrashTest.item_type}
if self.name_is_print_reftest:
return {PrintRefTest.item_type}
if self.name_is_multi_global:
return {TestharnessTest.item_type}
if self.name_is_worker:
return {TestharnessTest.item_type}
if self.name_is_window:
return {TestharnessTest.item_type}
if self.markup_type is None:
return {SupportFile.item_type}
if not self.name_is_reference:
return {ManualTest.item_type,
TestharnessTest.item_type,
RefTest.item_type,
VisualTest.item_type,
SupportFile.item_type}
return {TestharnessTest.item_type,
RefTest.item_type,
SupportFile.item_type}
def manifest_items(self): def manifest_items(self):
# type: () -> Tuple[Text, List[ManifestItem]] # type: () -> Tuple[Text, List[ManifestItem]]
"""List of manifest items corresponding to the file. There is typically one """List of manifest items corresponding to the file. There is typically one
...@@ -1070,6 +1129,7 @@ class SourceFile(object): ...@@ -1070,6 +1129,7 @@ class SourceFile(object):
self.rel_path self.rel_path
)] )]
assert rv[0] in self.possible_types
assert len(rv[1]) == len(set(rv[1])) assert len(rv[1]) == len(set(rv[1]))
self.items_cache = rv self.items_cache = rv
......
...@@ -418,6 +418,19 @@ class ServerProc(object): ...@@ -418,6 +418,19 @@ class ServerProc(object):
def create_daemon(self, init_func, host, port, paths, routes, bind_address, def create_daemon(self, init_func, host, port, paths, routes, bind_address,
config, **kwargs): config, **kwargs):
if sys.platform == "darwin":
# on Darwin, NOFILE starts with a very low limit (256), so bump it up a little
# by way of comparison, Debian starts with a limit of 1024, Windows 512
import resource # local, as it only exists on Unix-like systems
maxfilesperproc = int(subprocess.check_output(
["sysctl", "-n", "kern.maxfilesperproc"]
).strip())
soft, hard = resource.getrlimit(resource.RLIMIT_NOFILE)
# 2048 is somewhat arbitrary, but gives us some headroom for wptrunner --parallel
# note that it's expected that 2048 will be the min here
new_soft = min(2048, maxfilesperproc, hard)
if soft < new_soft:
resource.setrlimit(resource.RLIMIT_NOFILE, (new_soft, hard))
try: try:
self.daemon = init_func(host, port, paths, routes, bind_address, config, **kwargs) self.daemon = init_func(host, port, paths, routes, bind_address, config, **kwargs)
except socket.error: except socket.error:
......
...@@ -203,6 +203,32 @@ class ActionSequence(object): ...@@ -203,6 +203,32 @@ class ActionSequence(object):
self.key_up(c) self.key_up(c)
return self return self
def scroll(self, x, y, delta_x, delta_y, duration=None, origin=None):
"""Queue a scroll action.
:param x: Destination x-axis coordinate of pointer in CSS pixels.
:param y: Destination y-axis coordinate of pointer in CSS pixels.
:param delta_x: scroll delta on x-axis in CSS pixels.
:param delta_y: scroll delta on y-axis in CSS pixels.
:param duration: Number of milliseconds over which to distribute the
scroll. If None, remote end defaults to 0.
:param origin: Origin of coordinates, either "viewport" or an Element.
If None, remote end defaults to "viewport".
"""
action = {
"type": "scroll",
"x": x,
"y": y,
"deltaX": delta_x,
"deltaY": delta_y
}
if duration is not None:
action["duration"] = duration
if origin is not None:
action["origin"] = origin
self._actions.append(action)
return self
class Actions(object): class Actions(object):
def __init__(self, session): def __init__(self, session):
......
...@@ -656,8 +656,36 @@ class Chrome(Browser): ...@@ -656,8 +656,36 @@ class Chrome(Browser):
self.logger.warning("Unable to find the browser binary.") self.logger.warning("Unable to find the browser binary.")
return None return None
def find_webdriver(self, channel=None): def find_webdriver(self, channel=None, browser_binary=None):
return find_executable("chromedriver") chromedriver_binary = find_executable("chromedriver")
if not chromedriver_binary:
return chromedriver_binary
chromedriver_version = self.webdriver_version(chromedriver_binary)
if not chromedriver_version:
self.logger.warning(
"Unable to get version for ChromeDriver %s, rejecting it" %
chromedriver_binary)
return None
if not browser_binary:
browser_binary = self.find_binary(channel)
browser_version = self.version(browser_binary)
if not browser_version:
# If we can't get the browser version, we just have to assume the
# ChromeDriver is good.
return chromedriver_binary
# Check that the ChromeDriver version matches the Chrome version.
chromedriver_major = chromedriver_version.split('.')[0]
browser_major = browser_version.split('.')[0]
if chromedriver_major != browser_major:
self.logger.warning(
"Found ChromeDriver %s; does not match Chrome/Chromium %s" %
(chromedriver_version, browser_version))
return None
return chromedriver_binary
def _official_chromedriver_url(self, chrome_version): def _official_chromedriver_url(self, chrome_version):
# http://chromedriver.chromium.org/downloads/version-selection # http://chromedriver.chromium.org/downloads/version-selection
...@@ -700,6 +728,17 @@ class Chrome(Browser): ...@@ -700,6 +728,17 @@ class Chrome(Browser):
def install_webdriver_by_version(self, version, dest=None): def install_webdriver_by_version(self, version, dest=None):
if dest is None: if dest is None:
dest = os.pwd dest = os.pwd
# There may be an existing chromedriver binary from a previous install.
# To provide a clean install experience, remove the old binary - this
# avoids tricky issues like unzipping over a read-only file.
existing_binary_path = find_executable("chromedriver", dest)
if existing_binary_path:
self.logger.info("Removing existing ChromeDriver binary: %s" %
existing_binary_path)
os.chmod(existing_binary_path, stat.S_IWUSR)
os.remove(existing_binary_path)
url = self._latest_chromedriver_url(version) if version \ url = self._latest_chromedriver_url(version) if version \
else self._chromium_chromedriver_url(None) else self._chromium_chromedriver_url(None)
self.logger.info("Downloading ChromeDriver from %s" % url) self.logger.info("Downloading ChromeDriver from %s" % url)
...@@ -749,6 +788,21 @@ class Chrome(Browser): ...@@ -749,6 +788,21 @@ class Chrome(Browser):
return None return None
return m.group(1) return m.group(1)
def webdriver_version(self, webdriver_binary):
if uname[0] == "Windows":
return _get_fileversion(webdriver_binary, self.logger)
try:
version_string = call(webdriver_binary, "--version").strip()
except subprocess.CalledProcessError:
self.logger.warning("Failed to call %s" % webdriver_binary)
return None
m = re.match(r"ChromeDriver ([0-9][0-9.]*)", version_string)
if not m:
self.logger.warning("Failed to extract version from: %s" % version_string)
return None
return m.group(1)
class ChromeAndroidBase(Browser): class ChromeAndroidBase(Browser):
"""A base class for ChromeAndroid and AndroidWebView. """A base class for ChromeAndroid and AndroidWebView.
......
...@@ -334,16 +334,19 @@ class Chrome(BrowserSetup): ...@@ -334,16 +334,19 @@ class Chrome(BrowserSetup):
logger.info("MojoJS enabled") logger.info("MojoJS enabled")
except Exception as e: except Exception as e:
logger.error("Cannot enable MojoJS: %s" % e) logger.error("Cannot enable MojoJS: %s" % e)
if kwargs["webdriver_binary"] is None: if kwargs["webdriver_binary"] is None:
webdriver_binary = None webdriver_binary = None
if not kwargs["install_webdriver"]: if not kwargs["install_webdriver"]:
webdriver_binary = self.browser.find_webdriver() webdriver_binary = self.browser.find_webdriver(
channel=kwargs["browser_channel"],
browser_binary=kwargs["binary"]
)
if webdriver_binary is None: if webdriver_binary is None:
install = self.prompt_install("chromedriver") install = self.prompt_install("chromedriver")
if install: if install:
logger.info("Downloading chromedriver")
webdriver_binary = self.browser.install_webdriver( webdriver_binary = self.browser.install_webdriver(
dest=self.venv.bin_path, dest=self.venv.bin_path,
channel=browser_channel, channel=browser_channel,
...@@ -355,7 +358,7 @@ class Chrome(BrowserSetup): ...@@ -355,7 +358,7 @@ class Chrome(BrowserSetup):
if webdriver_binary: if webdriver_binary:
kwargs["webdriver_binary"] = webdriver_binary kwargs["webdriver_binary"] = webdriver_binary
else: else:
raise WptrunError("Unable to locate or install chromedriver binary") raise WptrunError("Unable to locate or install matching ChromeDriver binary")
if browser_channel in self.experimental_channels: if browser_channel in self.experimental_channels:
logger.info("Automatically turning on experimental features for Chrome Dev/Canary or Chromium trunk") logger.info("Automatically turning on experimental features for Chrome Dev/Canary or Chromium trunk")
kwargs["binary_args"].append("--enable-experimental-web-platform-features") kwargs["binary_args"].append("--enable-experimental-web-platform-features")
......
This is a testharness.js-based test.
FAIL Initializing with both initial and minimum assert_throws_js: function "() => new WebAssembly.Memory(argument)" did not throw
FAIL Zero minimum WebAssembly.Memory(): Property 'initial' is required
FAIL Non-zero minimum WebAssembly.Memory(): Property 'initial' is required
Harness: the test ran to completion.
// META: global=jsshell // META: global=window,dedicatedworker,jsshell
// META: script=/wasm/jsapi/assertions.js // META: script=/wasm/jsapi/assertions.js
// META: script=/wasm/jsapi/memory/assertions.js // META: script=/wasm/jsapi/memory/assertions.js
...@@ -13,7 +13,7 @@ test(() => { ...@@ -13,7 +13,7 @@ test(() => {
assert_Memory(memory, { "size": 0 }); assert_Memory(memory, { "size": 0 });
}, "Zero minimum"); }, "Zero minimum");
test(() => { test(() => {
const argument = { minimum: 4 }; const argument = { minimum: 4 };
const memory = new WebAssembly.Memory(argument); const memory = new WebAssembly.Memory(argument);
assert_Memory(memory, { "size": 4 }); assert_Memory(memory, { "size": 4 });
......
This is a testharness.js-based test.
FAIL Initializing with both initial and minimum assert_throws_js: function "() => new WebAssembly.Memory(argument)" did not throw
FAIL Zero minimum WebAssembly.Memory(): Property 'initial' is required
FAIL Non-zero minimum WebAssembly.Memory(): Property 'initial' is required
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS name
PASS length
PASS No arguments
PASS Calling
PASS Invalid descriptor argument
PASS Undefined initial value in descriptor
PASS Out-of-range initial value in descriptor: NaN
PASS Out-of-range maximum value in descriptor: NaN
PASS Out-of-range initial value in descriptor: Infinity
PASS Out-of-range maximum value in descriptor: Infinity
PASS Out-of-range initial value in descriptor: -Infinity
PASS Out-of-range maximum value in descriptor: -Infinity
PASS Out-of-range initial value in descriptor: -1
PASS Out-of-range maximum value in descriptor: -1
PASS Out-of-range initial value in descriptor: 4294967296
PASS Out-of-range maximum value in descriptor: 4294967296
PASS Out-of-range initial value in descriptor: 68719476736
PASS Out-of-range maximum value in descriptor: 68719476736
PASS Initial value exceeds maximum
FAIL Proxy descriptor WebAssembly.Memory(): Property 'initial' is required
PASS Order of evaluation for descriptor
PASS Zero initial
PASS Non-zero initial
PASS Stray argument
Harness: the test ran to completion.
...@@ -76,7 +76,7 @@ test(() => { ...@@ -76,7 +76,7 @@ test(() => {
switch (x) { switch (x) {
case "shared": case "shared":
return false; return false;
case "minimum": case "initial":
case "maximum": case "maximum":
return 0; return 0;
default: default:
......
This is a testharness.js-based test.
PASS name
PASS length
PASS No arguments
PASS Calling
PASS Invalid descriptor argument
PASS Undefined initial value in descriptor
PASS Out-of-range initial value in descriptor: NaN
PASS Out-of-range maximum value in descriptor: NaN
PASS Out-of-range initial value in descriptor: Infinity
PASS Out-of-range maximum value in descriptor: Infinity
PASS Out-of-range initial value in descriptor: -Infinity
PASS Out-of-range maximum value in descriptor: -Infinity
PASS Out-of-range initial value in descriptor: -1
PASS Out-of-range maximum value in descriptor: -1
PASS Out-of-range initial value in descriptor: 4294967296
PASS Out-of-range maximum value in descriptor: 4294967296
PASS Out-of-range initial value in descriptor: 68719476736
PASS Out-of-range maximum value in descriptor: 68719476736
PASS Initial value exceeds maximum
FAIL Proxy descriptor WebAssembly.Memory(): Property 'initial' is required
PASS Order of evaluation for descriptor
PASS Zero initial
PASS Non-zero initial
PASS Stray argument
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL Initializing with both initial and minimum assert_throws_js: function "() => new WebAssembly.Table(argument)" did not throw
FAIL Zero minimum WebAssembly.Module(): Property 'initial' is required
FAIL Non-zero minimum WebAssembly.Module(): Property 'initial' is required
Harness: the test ran to completion.
// META: global=jsshell // META: global=window,dedicatedworker,jsshell
// META: script=/wasm/jsapi/assertions.js // META: script=/wasm/jsapi/assertions.js
// META: script=/wasm/jsapi/table/assertions.js // META: script=/wasm/jsapi/table/assertions.js
test(() => { test(() => {
const argument = { "element": "anyfunc", "initial": 0, "minimum": 0 }; const argument = { "element": "anyfunc", "initial": 0, "minimum": 0 };
assert_throws_js(TypeError, () => WebAssembly.Table(argument)); assert_throws_js(TypeError, () => new WebAssembly.Table(argument));
}, "Supplying both initial and minimum"); }, "Initializing with both initial and minimum");
test(() => { test(() => {
const argument = { "element": "anyfunc", "minimum": 0 }; const argument = { "element": "anyfunc", "minimum": 0 };
const table = new WebAssembly.Table(argument); const table = new WebAssembly.Table(argument);
assert_Table(table, { "length": 0 }); assert_Table(table, { "length": 0 });
}, "Basic (zero, minimum)"); }, "Zero minimum");
test(() => { test(() => {
const argument = { "element": "anyfunc", "minimum": 5 }; const argument = { "element": "anyfunc", "minimum": 5 };
const table = new WebAssembly.Table(argument); const table = new WebAssembly.Table(argument);
assert_Table(table, { "length": 5 }); assert_Table(table, { "length": 5 });
}, "Basic (non-zero, minimum)"); }, "Non-zero minimum");
\ No newline at end of file \ No newline at end of file
This is a testharness.js-based test.
FAIL Initializing with both initial and minimum assert_throws_js: function "() => new WebAssembly.Table(argument)" did not throw
FAIL Zero minimum WebAssembly.Module(): Property 'initial' is required
FAIL Non-zero minimum WebAssembly.Module(): Property 'initial' is required
Harness: the test ran to completion.
...@@ -18,6 +18,7 @@ def session_new_window(capabilities, session): ...@@ -18,6 +18,7 @@ def session_new_window(capabilities, session):
session.window_handle = original_handle session.window_handle = original_handle
@pytest.fixture @pytest.fixture
def key_chain(session): def key_chain(session):
return session.actions.sequence("key", "keyboard_id") return session.actions.sequence("key", "keyboard_id")
...@@ -36,6 +37,11 @@ def none_chain(session): ...@@ -36,6 +37,11 @@ def none_chain(session):
return session.actions.sequence("none", "none_id") return session.actions.sequence("none", "none_id")
@pytest.fixture
def wheel_chain(session):
return session.actions.sequence("wheel", "wheel_id")
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def release_actions(session, request): def release_actions(session, request):
# release all actions after each test # release all actions after each test
...@@ -55,3 +61,8 @@ def key_reporter(session, test_actions_page, request): ...@@ -55,3 +61,8 @@ def key_reporter(session, test_actions_page, request):
@pytest.fixture @pytest.fixture
def test_actions_page(session, url): def test_actions_page(session, url):
session.url = url("/webdriver/tests/perform_actions/support/test_actions_wdspec.html") session.url = url("/webdriver/tests/perform_actions/support/test_actions_wdspec.html")
@pytest.fixture
def test_actions_scroll_page(session, url):
session.url = url("/webdriver/tests/perform_actions/support/test_actions_scroll_wdspec.html")
<!doctype html>
<meta charset=utf-8>
<html>
<head>
<title>Test Actions</title>
<style>
div { padding:0px; margin: 0px; }
.area { width: 100px; height: 50px; background-color: #ccc; }
#scrollable { width: 100px; height: 100px; overflow: scroll; }
#scrollContent { width: 600px; height: 1000px; background-color: blue; }
#subframe { width: 100px; height: 100px; }
</style>
<script>
"use strict";
var els = {};
var allEvents = { events: [] };
function displayMessage(message) {
document.getElementById("events").innerHTML = "<p>" + message + "</p>";
}
function appendMessage(message) {
document.getElementById("events").innerHTML += "<p>" + message + "</p>";
}
function recordWheelEvent(event) {
allEvents.events.push({
"type": event.type,
"button": event.button,
"buttons": event.buttons,
"deltaX": event.deltaX,
"deltaY": event.deltaY,
"deltaZ": event.deltaZ,
"deltaMode": event.deltaMode,
"target": event.target.id
});
appendMessage(event.type + " " +
"button: " + event.button + ", " +
"pageX: " + event.pageX + ", " +
"pageY: " + event.pageY + ", " +
"button: " + event.button + ", " +
"buttons: " + event.buttons + ", " +
"deltaX: " + event.deltaX + ", " +
"deltaY: " + event.deltaY + ", " +
"deltaZ: " + event.deltaZ + ", " +
"deltaMode: " + event.deltaMode + ", " +
"target id: " + event.target.id);
}
function resetEvents() {
allEvents.events.length = 0;
displayMessage("");
}
document.addEventListener("DOMContentLoaded", function() {
var outer = document.getElementById("outer");
outer.addEventListener("wheel", recordWheelEvent);
var scrollable = document.getElementById("scrollable");
scrollable.addEventListener("wheel", recordWheelEvent);
});
</script>
</head>
<body>
<div>
<h2>ScrollReporter</h2>
<div id="outer" class="area">
</div>
</div>
<div>
<h2>OverflowScrollReporter</h2>
<div id="scrollable">
<div id="scrollContent"></div>
</div>
</div>
<div>
<h2>IframeScrollReporter</h2>
<iframe id='subframe' srcdoc='
<script>
document.scrollingElement.addEventListener("wheel",
function(event) {
window.parent.allEvents.events.push({
"type": event.type,
"button": event.button,
"buttons": event.buttons,
"deltaX": event.deltaX,
"deltaY": event.deltaY,
"deltaZ": event.deltaZ,
"deltaMode": event.deltaMode,
"target": event.target.id
});
}
);
</script>
<div id="iframeContent"
style="width: 7500px; height: 7500px; background-color:blue" ></div>'>
</iframe>
</div>
<div id="resultContainer">
<h2>Events</h2>
<div id="events"></div>
</div>
</body>
</html>
import pytest
from webdriver.error import NoSuchWindowException
from tests.perform_actions.support.refine import filter_dict, get_events
from tests.support.asserts import assert_move_to_coordinates
def test_null_response_value(session, wheel_chain):
value = wheel_chain.scroll(0, 0, 0, 10).perform()
assert value is None
def test_no_top_browsing_context(session, closed_window, wheel_chain):
with pytest.raises(NoSuchWindowException):
wheel_chain.scroll(0, 0, 0, 10).perform()
def test_no_browsing_context(session, closed_window, wheel_chain):
with pytest.raises(NoSuchWindowException):
wheel_chain.scroll(0, 0, 0, 10).perform()
def test_wheel_scroll(session, test_actions_scroll_page, wheel_chain):
session.execute_script("document.scrollingElement.scrollTop = 0")
outer = session.find.css("#outer", all=False)
wheel_chain.scroll(0, 0, 5, 10, origin=outer).perform()
events = get_events(session)
assert len(events) == 1
assert events[0]["type"] == "wheel"
assert events[0]["deltaX"] >= 5
assert events[0]["deltaY"] >= 10
assert events[0]["deltaZ"] == 0
assert events[0]["target"] == "outer"
def test_wheel_scroll_overflow(session, test_actions_scroll_page, wheel_chain):
session.execute_script("document.scrollingElement.scrollTop = 0")
scrollable = session.find.css("#scrollable", all=False)
wheel_chain.scroll(0, 0, 5, 10, origin=scrollable).perform()
events = get_events(session)
assert len(events) == 1
assert events[0]["type"] == "wheel"
assert events[0]["deltaX"] >= 5
assert events[0]["deltaY"] >= 10
assert events[0]["deltaZ"] == 0
assert events[0]["target"] == "scrollContent"
def test_wheel_scroll_iframe(session, test_actions_scroll_page, wheel_chain):
session.execute_script("document.scrollingElement.scrollTop = 0")
subframe = session.find.css("#subframe", all=False)
wheel_chain.scroll(0, 0, 5, 10, origin=subframe).perform()
events = get_events(session)
assert len(events) == 1
assert events[0]["type"] == "wheel"
assert events[0]["deltaX"] >= 5
assert events[0]["deltaY"] >= 10
assert events[0]["deltaZ"] == 0
assert events[0]["target"] == "iframeContent"
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
const dataChannel = pc1.createDataChannel('test-channel'); const dataChannel = pc1.createDataChannel('test-channel');
return getNoiseStream({ getNoiseStream({
audio: true, audio: true,
video: true video: true
}) })
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
async_test(t => { async_test(t => {
const caller = new RTCPeerConnection(); const caller = new RTCPeerConnection();
t.add_cleanup(() => caller.close()); t.add_cleanup(() => caller.close());
return getUserMediaTracksAndStreams(2) getUserMediaTracksAndStreams(2)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
const sender = caller.addTrack(tracks[0], streams[0]); const sender = caller.addTrack(tracks[0], streams[0]);
return sender.replaceTrack(tracks[1]) return sender.replaceTrack(tracks[1])
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
async_test(t => { async_test(t => {
const caller = new RTCPeerConnection(); const caller = new RTCPeerConnection();
t.add_cleanup(() => caller.close()); t.add_cleanup(() => caller.close());
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
const sender = caller.addTrack(tracks[0], streams[0]); const sender = caller.addTrack(tracks[0], streams[0]);
return sender.replaceTrack(null) return sender.replaceTrack(null)
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
async_test(t => { async_test(t => {
const caller = new RTCPeerConnection(); const caller = new RTCPeerConnection();
t.add_cleanup(() => caller.close()); t.add_cleanup(() => caller.close());
return getUserMediaTracksAndStreams(2) getUserMediaTracksAndStreams(2)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
const sender = caller.addTrack(tracks[0], streams[0]); const sender = caller.addTrack(tracks[0], streams[0]);
assert_equals(sender.track, tracks[0]); assert_equals(sender.track, tracks[0]);
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
const expectedException = 'InvalidStateError'; const expectedException = 'InvalidStateError';
const caller = new RTCPeerConnection(); const caller = new RTCPeerConnection();
t.add_cleanup(() => caller.close()); t.add_cleanup(() => caller.close());
return getUserMediaTracksAndStreams(2) getUserMediaTracksAndStreams(2)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
const sender = caller.addTrack(tracks[0], streams[0]); const sender = caller.addTrack(tracks[0], streams[0]);
caller.close(); caller.close();
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
const pc = new RTCPeerConnection(); const pc = new RTCPeerConnection();
t.add_cleanup(() => pc.close()); t.add_cleanup(() => pc.close());
let track; let track;
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
track = tracks[0]; track = tracks[0];
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
const pc = new RTCPeerConnection(); const pc = new RTCPeerConnection();
t.add_cleanup(() => pc.close()); t.add_cleanup(() => pc.close());
let stream; let stream;
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
let track = tracks[0]; let track = tracks[0];
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
const pc = new RTCPeerConnection(); const pc = new RTCPeerConnection();
t.add_cleanup(() => pc.close()); t.add_cleanup(() => pc.close());
let track; let track;
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
track = tracks[0]; track = tracks[0];
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
const pc = new RTCPeerConnection(); const pc = new RTCPeerConnection();
t.add_cleanup(() => pc.close()); t.add_cleanup(() => pc.close());
let stream; let stream;
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
let track = tracks[0]; let track = tracks[0];
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
t.add_cleanup(() => pc.close()); t.add_cleanup(() => pc.close());
let track; let track;
let stream; let stream;
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
track = tracks[0]; track = tracks[0];
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
t.add_cleanup(() => pc.close()); t.add_cleanup(() => pc.close());
let track; let track;
let stream; let stream;
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
track = tracks[0]; track = tracks[0];
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
const callee = new RTCPeerConnection(); const callee = new RTCPeerConnection();
t.add_cleanup(() => callee.close()); t.add_cleanup(() => callee.close());
let sendingTrack; let sendingTrack;
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
sendingTrack = tracks[0]; sendingTrack = tracks[0];
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
assert_equals(receivingTrack, undefined, 'ontrack has not fired before'); assert_equals(receivingTrack, undefined, 'ontrack has not fired before');
receivingTrack = trackEvent.track; receivingTrack = trackEvent.track;
}; };
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
caller.addTrack(tracks[0], streams[0]); caller.addTrack(tracks[0], streams[0]);
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
let sendingTrack1; let sendingTrack1;
let sendingTrack2; let sendingTrack2;
let sender; let sender;
return getUserMediaTracksAndStreams(2) getUserMediaTracksAndStreams(2)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
sendingTrack1 = tracks[0]; sendingTrack1 = tracks[0];
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
let sendingTrack1; let sendingTrack1;
let sendingTrack2; let sendingTrack2;
let sender; let sender;
return getUserMediaTracksAndStreams(2) getUserMediaTracksAndStreams(2)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
sendingTrack1 = tracks[0]; sendingTrack1 = tracks[0];
...@@ -339,7 +339,7 @@ ...@@ -339,7 +339,7 @@
let sendingTrack1; let sendingTrack1;
let sendingTrack2; let sendingTrack2;
let sender; let sender;
return getUserMediaTracksAndStreams(2) getUserMediaTracksAndStreams(2)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
sendingTrack1 = tracks[0]; sendingTrack1 = tracks[0];
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
let sendingTrack1; let sendingTrack1;
let sendingTrack2; let sendingTrack2;
let sender; let sender;
return getUserMediaTracksAndStreams(2) getUserMediaTracksAndStreams(2)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
t.add_cleanup(() => tracks.forEach(track => track.stop())); t.add_cleanup(() => tracks.forEach(track => track.stop()));
sendingTrack1 = tracks[0]; sendingTrack1 = tracks[0];
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
t.add_cleanup(() => pc.close()); t.add_cleanup(() => pc.close());
let track; let track;
let stream; let stream;
return getUserMediaTracksAndStreams(1) getUserMediaTracksAndStreams(1)
.then(t.step_func(([tracks, streams]) => { .then(t.step_func(([tracks, streams]) => {
track = tracks[0]; track = tracks[0];
stream = streams[0]; stream = streams[0];
......
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