diff --git a/js/src/wasm/WasmBaselineCompile.cpp b/js/src/wasm/WasmBaselineCompile.cpp index 305822aa07df..70d0874fa7c8 100644 --- a/js/src/wasm/WasmBaselineCompile.cpp +++ b/js/src/wasm/WasmBaselineCompile.cpp @@ -2425,7 +2425,6 @@ struct StackMapGenerator { class BaseCompiler final : public BaseCompilerInterface { using Local = BaseStackFrame::Local; using LabelVector = Vector; - using MIRTypeVector = Vector; // Bit set used for simple bounds check elimination. Capping this at 64 // locals makes sense; even 32 locals would probably be OK in practice. @@ -2546,17 +2545,6 @@ class BaseCompiler final : public BaseCompilerInterface { bceSafe_; // Locals that have been bounds checked and not updated since ValTypeVector SigD_; ValTypeVector SigF_; - MIRTypeVector SigP_; - MIRTypeVector SigPI_; - MIRTypeVector SigPL_; - MIRTypeVector SigPII_; - MIRTypeVector SigPIRI_; - MIRTypeVector SigPIII_; - MIRTypeVector SigPIIL_; - MIRTypeVector SigPIIR_; - MIRTypeVector SigPILL_; - MIRTypeVector SigPIIII_; - MIRTypeVector SigPIIIII_; NonAssertingLabel returnLabel_; LatentOp latentOp_; // Latent operation for branch (seen next) @@ -6478,19 +6466,13 @@ class BaseCompiler final : public BaseCompilerInterface { // postbarrier call is active, so push a uintptr_t value. #ifdef JS_64BIT pushI64(RegI64(Register64(valueAddr))); - if (!emitInstanceCall(bytecodeOffset, SigPL_, ExprType::Void, - SymbolicAddress::PostBarrier, - /*pushReturnedValue=*/false)) { - return false; - } #else pushI32(RegI32(valueAddr)); - if (!emitInstanceCall(bytecodeOffset, SigPI_, ExprType::Void, - SymbolicAddress::PostBarrier, +#endif + if (!emitInstanceCall(bytecodeOffset, SASigPostBarrier, /*pushReturnedValue=*/false)) { return false; } -#endif return true; } @@ -6708,6 +6690,7 @@ class BaseCompiler final : public BaseCompilerInterface { void doReturn(ExprType returnType, bool popStack); void pushReturnValueOfCall(const FunctionCall& call, ExprType type); + void pushReturnValueOfCall(const FunctionCall& call, MIRType type); void emitCompareI32(Assembler::Condition compareOp, ValType compareType); void emitCompareI64(Assembler::Condition compareOp, ValType compareType); @@ -6824,8 +6807,7 @@ class BaseCompiler final : public BaseCompilerInterface { void emitReinterpretI64AsF64(); void emitRound(RoundingMode roundingMode, ValType operandType); MOZ_MUST_USE bool emitInstanceCall(uint32_t lineOrBytecode, - const MIRTypeVector& sig, ExprType retType, - SymbolicAddress builtin, + const SymbolicAddressSignature& builtin, bool pushReturnedValue = true); MOZ_MUST_USE bool emitMemoryGrow(); MOZ_MUST_USE bool emitMemorySize(); @@ -8587,43 +8569,46 @@ bool BaseCompiler::emitCallArgs(const ValTypeVector& argTypes, } void BaseCompiler::pushReturnValueOfCall(const FunctionCall& call, - ExprType type) { - switch (type.code()) { - case ExprType::I32: { + MIRType type) { + switch (type) { + case MIRType::Int32: { RegI32 rv = captureReturnedI32(); pushI32(rv); break; } - case ExprType::I64: { + case MIRType::Int64: { RegI64 rv = captureReturnedI64(); pushI64(rv); break; } - case ExprType::F32: { + case MIRType::Float32: { RegF32 rv = captureReturnedF32(call); pushF32(rv); break; } - case ExprType::F64: { + case MIRType::Double: { RegF64 rv = captureReturnedF64(call); pushF64(rv); break; } - case ExprType::Ref: - case ExprType::AnyRef: { + case MIRType::RefOrNull: { RegPtr rv = captureReturnedRef(); pushRef(rv); break; } - case ExprType::NullRef: - MOZ_CRASH("NullRef not expressible"); default: - // In particular, passing |type| == ExprType::Void to this function is - // an error. + // In particular, passing |type| as MIRType::Void or MIRType::Pointer to + // this function is an error. MOZ_CRASH("Function return type"); } } +void BaseCompiler::pushReturnValueOfCall(const FunctionCall& call, + ExprType type) { + MOZ_ASSERT(type.code() != ExprType::NullRef); + pushReturnValueOfCall(call, ToMIRType(type)); +} + // For now, always sync() at the beginning of the call to easily save live // values. // @@ -9730,25 +9715,25 @@ void BaseCompiler::emitCompareRef(Assembler::Condition compareOp, } bool BaseCompiler::emitInstanceCall(uint32_t lineOrBytecode, - const MIRTypeVector& sig, ExprType retType, - SymbolicAddress builtin, + const SymbolicAddressSignature& builtin, bool pushReturnedValue /*=true*/) { - MOZ_ASSERT(sig[0] == MIRType::Pointer); + const MIRType* argTypes = builtin.argTypes; + MOZ_ASSERT(argTypes[0] == MIRType::Pointer); sync(); - uint32_t numArgs = sig.length() - 1 /* instance */; - size_t stackSpace = stackConsumed(numArgs); + uint32_t numNonInstanceArgs = builtin.numArgs - 1 /* instance */; + size_t stackSpace = stackConsumed(numNonInstanceArgs); FunctionCall baselineCall(lineOrBytecode); beginCall(baselineCall, UseABI::System, InterModule::True); ABIArg instanceArg = reservePointerArgument(&baselineCall); - startCallArgs(StackArgAreaSizeUnaligned(sig), &baselineCall); - for (uint32_t i = 1; i < sig.length(); i++) { + startCallArgs(StackArgAreaSizeUnaligned(builtin), &baselineCall); + for (uint32_t i = 1; i < builtin.numArgs; i++) { ValType t; - switch (sig[i]) { + switch (argTypes[i]) { case MIRType::Int32: t = ValType::I32; break; @@ -9758,34 +9743,39 @@ bool BaseCompiler::emitInstanceCall(uint32_t lineOrBytecode, case MIRType::RefOrNull: t = ValType::AnyRef; break; + case MIRType::Pointer: + // Instance function args can now be uninterpreted pointers (eg, for + // the cases PostBarrier and PostBarrierFilter) so we simply treat + // them like the equivalently sized integer. + t = sizeof(void*) == 4 ? ValType::I32 : ValType::I64; + break; default: MOZ_CRASH("Unexpected type"); } - passArg(t, peek(numArgs - i), &baselineCall); + passArg(t, peek(numNonInstanceArgs - i), &baselineCall); } CodeOffset raOffset = - builtinInstanceMethodCall(builtin, instanceArg, baselineCall); + builtinInstanceMethodCall(builtin.identity, instanceArg, baselineCall); if (!createStackMap("emitInstanceCall", raOffset)) { return false; } endCall(baselineCall, stackSpace); - popValueStackBy(numArgs); + popValueStackBy(numNonInstanceArgs); // Note, many clients of emitInstanceCall currently assume that pushing the // result here does not destroy ReturnReg. // - // Furthermore, clients assume that even if retType == ExprType::Void, the - // callee may have returned a status result and left it in ReturnReg for us - // to find, and that that register will not be destroyed here (or above). - // In this case the callee will have a C++ declaration stating that there is - // a return value. Examples include memory and table operations that are - // implemented as callouts. + // Furthermore, clients assume that if builtin.retType != MIRType::None, the + // callee will have returned a result and left it in ReturnReg for us to + // find, and that that register will not be destroyed here (or above). if (pushReturnedValue) { - MOZ_ASSERT(retType != ExprType::Void); - pushReturnValueOfCall(baselineCall, retType); + // For the return type only, MIRType::None is used to indicate that the + // call doesn't return a result, that is, returns a C/C++ "void". + MOZ_ASSERT(builtin.retType != MIRType::None); + pushReturnValueOfCall(baselineCall, builtin.retType); } return true; } @@ -9802,8 +9792,7 @@ bool BaseCompiler::emitMemoryGrow() { return true; } - return emitInstanceCall(lineOrBytecode, SigPI_, ExprType::I32, - SymbolicAddress::MemoryGrow); + return emitInstanceCall(lineOrBytecode, SASigMemoryGrow); } bool BaseCompiler::emitMemorySize() { @@ -9817,8 +9806,7 @@ bool BaseCompiler::emitMemorySize() { return true; } - return emitInstanceCall(lineOrBytecode, SigP_, ExprType::I32, - SymbolicAddress::MemorySize); + return emitInstanceCall(lineOrBytecode, SASigMemorySize); } bool BaseCompiler::emitRefNull() { @@ -10132,14 +10120,12 @@ bool BaseCompiler::emitWait(ValType type, uint32_t byteSize) { // Returns -1 on trap, otherwise nonnegative result. switch (type.code()) { case ValType::I32: - if (!emitInstanceCall(lineOrBytecode, SigPIIL_, ExprType::I32, - SymbolicAddress::WaitI32)) { + if (!emitInstanceCall(lineOrBytecode, SASigWaitI32)) { return false; } break; case ValType::I64: - if (!emitInstanceCall(lineOrBytecode, SigPILL_, ExprType::I32, - SymbolicAddress::WaitI64)) { + if (!emitInstanceCall(lineOrBytecode, SASigWaitI64)) { return false; } break; @@ -10169,8 +10155,7 @@ bool BaseCompiler::emitWake() { } // Returns -1 on trap, otherwise nonnegative result. - if (!emitInstanceCall(lineOrBytecode, SigPII_, ExprType::I32, - SymbolicAddress::Wake)) { + if (!emitInstanceCall(lineOrBytecode, SASigWake)) { return false; } @@ -10202,16 +10187,14 @@ bool BaseCompiler::emitMemOrTableCopy(bool isMem) { if (isMem) { MOZ_ASSERT(srcMemOrTableIndex == 0); MOZ_ASSERT(dstMemOrTableIndex == 0); - if (!emitInstanceCall(lineOrBytecode, SigPIII_, ExprType::I32, - SymbolicAddress::MemCopy, + if (!emitInstanceCall(lineOrBytecode, SASigMemCopy, /*pushReturnedValue=*/false)) { return false; } } else { pushI32(dstMemOrTableIndex); pushI32(srcMemOrTableIndex); - if (!emitInstanceCall(lineOrBytecode, SigPIIIII_, ExprType::I32, - SymbolicAddress::TableCopy, + if (!emitInstanceCall(lineOrBytecode, SASigTableCopy, /*pushReturnedValue=*/false)) { return false; } @@ -10241,10 +10224,9 @@ bool BaseCompiler::emitDataOrElemDrop(bool isData) { // // Returns -1 on trap, otherwise 0. pushI32(int32_t(segIndex)); - SymbolicAddress callee = - isData ? SymbolicAddress::DataDrop : SymbolicAddress::ElemDrop; - if (!emitInstanceCall(lineOrBytecode, SigPI_, ExprType::Void, callee, - /*pushReturnedValue=*/false)) { + const SymbolicAddressSignature& callee = + isData ? SASigDataDrop : SASigElemDrop; + if (!emitInstanceCall(lineOrBytecode, callee, /*pushReturnedValue=*/false)) { return false; } @@ -10269,8 +10251,7 @@ bool BaseCompiler::emitMemFill() { } // Returns -1 on trap, otherwise 0. - if (!emitInstanceCall(lineOrBytecode, SigPIII_, ExprType::Void, - SymbolicAddress::MemFill, + if (!emitInstanceCall(lineOrBytecode, SASigMemFill, /*pushReturnedValue=*/false)) { return false; } @@ -10301,15 +10282,13 @@ bool BaseCompiler::emitMemOrTableInit(bool isMem) { // Returns -1 on trap, otherwise 0. pushI32(int32_t(segIndex)); if (isMem) { - if (!emitInstanceCall(lineOrBytecode, SigPIIII_, ExprType::Void, - SymbolicAddress::MemInit, + if (!emitInstanceCall(lineOrBytecode, SASigMemInit, /*pushReturnedValue=*/false)) { return false; } } else { pushI32(dstTableIndex); - if (!emitInstanceCall(lineOrBytecode, SigPIIIII_, ExprType::Void, - SymbolicAddress::TableInit, + if (!emitInstanceCall(lineOrBytecode, SASigTableInit, /*pushReturnedValue=*/false)) { return false; } @@ -10340,16 +10319,23 @@ bool BaseCompiler::emitTableGet() { // Returns nullptr for error, otherwise a pointer to a nonmoveable memory // location that holds the anyref value. pushI32(tableIndex); - if (!emitInstanceCall(lineOrBytecode, SigPII_, ExprType::AnyRef, - SymbolicAddress::TableGet)) { + if (!emitInstanceCall(lineOrBytecode, SASigTableGet, + /*pushReturnedValue=*/false)) { return false; } Label noTrap; masm.branchTestPtr(Assembler::NonZero, ReturnReg, ReturnReg, &noTrap); trap(Trap::ThrowReported); masm.bind(&noTrap); + masm.loadPtr(Address(ReturnReg, 0), ReturnReg); + // Push the resulting anyref back on the eval stack. NOTE: needRef() must + // not kill the value in the register. + RegPtr r = RegPtr(ReturnReg); + needRef(r); + pushRef(r); + return true; } @@ -10369,8 +10355,7 @@ bool BaseCompiler::emitTableGrow() { // // infallible. pushI32(tableIndex); - return emitInstanceCall(lineOrBytecode, SigPIRI_, ExprType::I32, - SymbolicAddress::TableGrow); + return emitInstanceCall(lineOrBytecode, SASigTableGrow); } MOZ_MUST_USE @@ -10388,8 +10373,7 @@ bool BaseCompiler::emitTableSet() { // // Returns -1 on range error, otherwise 0 (which is then ignored). pushI32(tableIndex); - if (!emitInstanceCall(lineOrBytecode, SigPIRI_, ExprType::I32, - SymbolicAddress::TableSet, + if (!emitInstanceCall(lineOrBytecode, SASigTableSet, /*pushReturnedValue=*/false)) { return false; } @@ -10414,8 +10398,7 @@ bool BaseCompiler::emitTableSize() { // // infallible. pushI32(tableIndex); - return emitInstanceCall(lineOrBytecode, SigPI_, ExprType::I32, - SymbolicAddress::TableSize); + return emitInstanceCall(lineOrBytecode, SASigTableSize); } bool BaseCompiler::emitStructNew() { @@ -10439,8 +10422,7 @@ bool BaseCompiler::emitStructNew() { const StructType& structType = env_.types[typeIndex].structType(); pushI32(structType.moduleIndex_); - if (!emitInstanceCall(lineOrBytecode, SigPI_, ExprType::AnyRef, - SymbolicAddress::StructNew)) { + if (!emitInstanceCall(lineOrBytecode, SASigStructNew)) { return false; } @@ -10773,8 +10755,7 @@ bool BaseCompiler::emitStructNarrow() { pushI32(mustUnboxAnyref); pushI32(outputStruct.moduleIndex_); pushRef(rp); - return emitInstanceCall(lineOrBytecode, SigPIIR_, ExprType::AnyRef, - SymbolicAddress::StructNarrow); + return emitInstanceCall(lineOrBytecode, SASigStructNarrow); } bool BaseCompiler::emitBody() { @@ -11852,54 +11833,6 @@ bool BaseCompiler::init() { if (!SigF_.append(ValType::F32)) { return false; } - if (!SigP_.append(MIRType::Pointer)) { - return false; - } - if (!SigPI_.append(MIRType::Pointer) || !SigPI_.append(MIRType::Int32)) { - return false; - } - if (!SigPL_.append(MIRType::Pointer) || !SigPL_.append(MIRType::Int64)) { - return false; - } - if (!SigPII_.append(MIRType::Pointer) || !SigPII_.append(MIRType::Int32) || - !SigPII_.append(MIRType::Int32)) { - return false; - } - if (!SigPIRI_.append(MIRType::Pointer) || !SigPIRI_.append(MIRType::Int32) || - !SigPIRI_.append(MIRType::RefOrNull) || - !SigPIRI_.append(MIRType::Int32)) { - return false; - } - if (!SigPIII_.append(MIRType::Pointer) || !SigPIII_.append(MIRType::Int32) || - !SigPIII_.append(MIRType::Int32) || !SigPIII_.append(MIRType::Int32)) { - return false; - } - if (!SigPIIL_.append(MIRType::Pointer) || !SigPIIL_.append(MIRType::Int32) || - !SigPIIL_.append(MIRType::Int32) || !SigPIIL_.append(MIRType::Int64)) { - return false; - } - if (!SigPIIR_.append(MIRType::Pointer) || !SigPIIR_.append(MIRType::Int32) || - !SigPIIR_.append(MIRType::Int32) || - !SigPIIR_.append(MIRType::RefOrNull)) { - return false; - } - if (!SigPILL_.append(MIRType::Pointer) || !SigPILL_.append(MIRType::Int32) || - !SigPILL_.append(MIRType::Int64) || !SigPILL_.append(MIRType::Int64)) { - return false; - } - if (!SigPIIII_.append(MIRType::Pointer) || - !SigPIIII_.append(MIRType::Int32) || !SigPIIII_.append(MIRType::Int32) || - !SigPIIII_.append(MIRType::Int32) || !SigPIIII_.append(MIRType::Int32)) { - return false; - } - if (!SigPIIIII_.append(MIRType::Pointer) || - !SigPIIIII_.append(MIRType::Int32) || - !SigPIIIII_.append(MIRType::Int32) || - !SigPIIIII_.append(MIRType::Int32) || - !SigPIIIII_.append(MIRType::Int32) || - !SigPIIIII_.append(MIRType::Int32)) { - return false; - } if (!fr.setupLocals(locals_, funcType().args(), env_.debugEnabled(), &localInfo_)) { diff --git a/js/src/wasm/WasmBuiltins.cpp b/js/src/wasm/WasmBuiltins.cpp index 45e132e2c9f0..137484ec5c24 100644 --- a/js/src/wasm/WasmBuiltins.cpp +++ b/js/src/wasm/WasmBuiltins.cpp @@ -45,7 +45,153 @@ static const unsigned BUILTIN_THUNK_LIFO_SIZE = 64 * 1024; // ============================================================================ // WebAssembly builtin C++ functions called from wasm code to implement internal -// wasm operations. +// wasm operations: type descriptions. + +// Some abbreviations, for the sake of conciseness. +#define _F64 MIRType::Double +#define _F32 MIRType::Float32 +#define _I32 MIRType::Int32 +#define _I64 MIRType::Int64 +#define _PTR MIRType::Pointer +#define _RoN MIRType::RefOrNull +#define _VOID MIRType::None +#define _END MIRType::None + +namespace js { +namespace wasm { + +const SymbolicAddressSignature SASigSinD = { + SymbolicAddress::SinD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigCosD = { + SymbolicAddress::CosD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigTanD = { + SymbolicAddress::TanD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigASinD = { + SymbolicAddress::ASinD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigACosD = { + SymbolicAddress::ACosD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigATanD = { + SymbolicAddress::ATanD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigCeilD = { + SymbolicAddress::CeilD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigCeilF = { + SymbolicAddress::CeilF, _F32, 1, { _F32, _END } +}; +const SymbolicAddressSignature SASigFloorD = { + SymbolicAddress::FloorD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigFloorF = { + SymbolicAddress::FloorF, _F32, 1, { _F32, _END } +}; +const SymbolicAddressSignature SASigTruncD = { + SymbolicAddress::TruncD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigTruncF = { + SymbolicAddress::TruncF, _F32, 1, { _F32, _END } +}; +const SymbolicAddressSignature SASigNearbyIntD = { + SymbolicAddress::NearbyIntD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigNearbyIntF = { + SymbolicAddress::NearbyIntF, _F32, 1, { _F32, _END } +}; +const SymbolicAddressSignature SASigExpD = { + SymbolicAddress::ExpD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigLogD = { + SymbolicAddress::LogD, _F64, 1, { _F64, _END } +}; +const SymbolicAddressSignature SASigPowD = { + SymbolicAddress::PowD, _F64, 2, { _F64, _F64, _END } +}; +const SymbolicAddressSignature SASigATan2D = { + SymbolicAddress::ATan2D, _F64, 2, { _F64, _F64, _END } +}; +const SymbolicAddressSignature SASigMemoryGrow = { + SymbolicAddress::MemoryGrow, _I32, 2, { _PTR, _I32, _END } +}; +const SymbolicAddressSignature SASigMemorySize = { + SymbolicAddress::MemorySize, _I32, 1, { _PTR, _END } +}; +const SymbolicAddressSignature SASigWaitI32 = { + SymbolicAddress::WaitI32, _I32, 4, { _PTR, _I32, _I32, _I64, _END } +}; +const SymbolicAddressSignature SASigWaitI64 = { + SymbolicAddress::WaitI64, _I32, 4, { _PTR, _I32, _I64, _I64, _END } +}; +const SymbolicAddressSignature SASigWake = { + SymbolicAddress::Wake, _I32, 3, { _PTR, _I32, _I32, _END } +}; +const SymbolicAddressSignature SASigMemCopy = { + SymbolicAddress::MemCopy, _I32, 4, { _PTR, _I32, _I32, _I32, _END } +}; +const SymbolicAddressSignature SASigDataDrop = { + SymbolicAddress::DataDrop, _I32, 2, { _PTR, _I32, _END } +}; +const SymbolicAddressSignature SASigMemFill = { + SymbolicAddress::MemFill, _I32, 4, { _PTR, _I32, _I32, _I32, _END } +}; +const SymbolicAddressSignature SASigMemInit = { + SymbolicAddress::MemInit, _I32, 5, { _PTR, _I32, _I32, _I32, _I32, _END } +}; +const SymbolicAddressSignature SASigTableCopy = { + SymbolicAddress::TableCopy, + _I32, 6, { _PTR, _I32, _I32, _I32, _I32, _I32, _END } +}; +const SymbolicAddressSignature SASigElemDrop = { + SymbolicAddress::ElemDrop, _I32, 2, { _PTR, _I32, _END } +}; +const SymbolicAddressSignature SASigTableGet = { + SymbolicAddress::TableGet, _PTR, 3, { _PTR, _I32, _I32, _END } +}; +const SymbolicAddressSignature SASigTableGrow = { + SymbolicAddress::TableGrow, _I32, 4, { _PTR, _I32, _RoN, _I32, _END } +}; +const SymbolicAddressSignature SASigTableInit = { + SymbolicAddress::TableInit, + _I32, 6, { _PTR, _I32, _I32, _I32, _I32, _I32, _END } +}; +const SymbolicAddressSignature SASigTableSet = { + SymbolicAddress::TableSet, _I32, 4, { _PTR, _I32, _RoN, _I32, _END } +}; +const SymbolicAddressSignature SASigTableSize = { + SymbolicAddress::TableSize, _I32, 2, { _PTR, _I32, _END } +}; +const SymbolicAddressSignature SASigPostBarrier = { + SymbolicAddress::PostBarrier, _VOID, 2, { _PTR, _PTR, _END } +}; +const SymbolicAddressSignature SASigPostBarrierFiltering = { + SymbolicAddress::PostBarrierFiltering, _VOID, 2, { _PTR, _PTR, _END } +}; +const SymbolicAddressSignature SASigStructNew = { + SymbolicAddress::StructNew, _RoN, 2, { _PTR, _I32, _END } +}; +const SymbolicAddressSignature SASigStructNarrow = { + SymbolicAddress::StructNarrow, _RoN, 4, { _PTR, _I32, _I32, _RoN, _END } +}; + +} // namespace wasm +} // namespace js + +#undef _F64 +#undef _F32 +#undef _I32 +#undef _I64 +#undef _PTR +#undef _RoN +#undef _VOID +#undef _END + +// ============================================================================ +// WebAssembly builtin C++ functions called from wasm code to implement internal +// wasm operations: implementations. #if defined(JS_CODEGEN_ARM) extern "C" { diff --git a/js/src/wasm/WasmBuiltins.h b/js/src/wasm/WasmBuiltins.h index a29c6c0c4c0e..bda8d2ce668f 100644 --- a/js/src/wasm/WasmBuiltins.h +++ b/js/src/wasm/WasmBuiltins.h @@ -26,6 +26,48 @@ namespace wasm { class WasmFrameIter; +// These provide argument type information for a subset of the SymbolicAddress +// targets, for which type info is needed to generate correct stackmaps. + +extern const SymbolicAddressSignature SASigSinD; +extern const SymbolicAddressSignature SASigCosD; +extern const SymbolicAddressSignature SASigTanD; +extern const SymbolicAddressSignature SASigASinD; +extern const SymbolicAddressSignature SASigACosD; +extern const SymbolicAddressSignature SASigATanD; +extern const SymbolicAddressSignature SASigCeilD; +extern const SymbolicAddressSignature SASigCeilF; +extern const SymbolicAddressSignature SASigFloorD; +extern const SymbolicAddressSignature SASigFloorF; +extern const SymbolicAddressSignature SASigTruncD; +extern const SymbolicAddressSignature SASigTruncF; +extern const SymbolicAddressSignature SASigNearbyIntD; +extern const SymbolicAddressSignature SASigNearbyIntF; +extern const SymbolicAddressSignature SASigExpD; +extern const SymbolicAddressSignature SASigLogD; +extern const SymbolicAddressSignature SASigPowD; +extern const SymbolicAddressSignature SASigATan2D; +extern const SymbolicAddressSignature SASigMemoryGrow; +extern const SymbolicAddressSignature SASigMemorySize; +extern const SymbolicAddressSignature SASigWaitI32; +extern const SymbolicAddressSignature SASigWaitI64; +extern const SymbolicAddressSignature SASigWake; +extern const SymbolicAddressSignature SASigMemCopy; +extern const SymbolicAddressSignature SASigDataDrop; +extern const SymbolicAddressSignature SASigMemFill; +extern const SymbolicAddressSignature SASigMemInit; +extern const SymbolicAddressSignature SASigTableCopy; +extern const SymbolicAddressSignature SASigElemDrop; +extern const SymbolicAddressSignature SASigTableGet; +extern const SymbolicAddressSignature SASigTableGrow; +extern const SymbolicAddressSignature SASigTableInit; +extern const SymbolicAddressSignature SASigTableSet; +extern const SymbolicAddressSignature SASigTableSize; +extern const SymbolicAddressSignature SASigPostBarrier; +extern const SymbolicAddressSignature SASigPostBarrierFiltering; +extern const SymbolicAddressSignature SASigStructNew; +extern const SymbolicAddressSignature SASigStructNarrow; + // A SymbolicAddress that NeedsBuiltinThunk() will call through a thunk to the // C++ function. This will be true for all normal calls from normal wasm // function code. Only calls to C++ from other exits/thunks do not need a thunk. diff --git a/js/src/wasm/WasmGC.h b/js/src/wasm/WasmGC.h index 58e0f8630333..71595e754980 100644 --- a/js/src/wasm/WasmGC.h +++ b/js/src/wasm/WasmGC.h @@ -47,6 +47,37 @@ static inline size_t StackArgAreaSizeUnaligned(const T& argTypes) { return i.stackBytesConsumedSoFar(); } +static inline size_t StackArgAreaSizeUnaligned( + const SymbolicAddressSignature& saSig) { + // ABIArgIter::ABIArgIter wants the items to be iterated over to be + // presented in some type that has methods length() and operator[]. So we + // have to wrap up |saSig|'s array of types in this API-matching class. + class MOZ_STACK_CLASS ItemsAndLength { + const MIRType* items_; + size_t length_; + public: + ItemsAndLength(const MIRType* items, size_t length) + : items_(items), length_(length) + {} + size_t length() const { return length_; } + MIRType operator[](size_t i) const { return items_[i]; } + }; + + // Assert, at least crudely, that we're not accidentally going to run off + // the end of the array of types, nor into undefined parts of it, while + // iterating. + MOZ_ASSERT(saSig.numArgs < sizeof(saSig.argTypes) / sizeof(saSig.argTypes[0])); + MOZ_ASSERT(saSig.argTypes[saSig.numArgs] == MIRType::None/*the end marker*/); + + ItemsAndLength itemsAndLength(saSig.argTypes, saSig.numArgs); + + ABIArgIter i(itemsAndLength); + while (!i.done()) { + i++; + } + return i.stackBytesConsumedSoFar(); +} + static inline size_t AlignStackArgAreaSize(size_t unalignedSize) { return AlignBytes(unalignedSize, 16u); } diff --git a/js/src/wasm/WasmIonCompile.cpp b/js/src/wasm/WasmIonCompile.cpp index 224b7aa729d7..0ad32b3aba43 100644 --- a/js/src/wasm/WasmIonCompile.cpp +++ b/js/src/wasm/WasmIonCompile.cpp @@ -23,6 +23,7 @@ #include "jit/CodeGenerator.h" #include "wasm/WasmBaselineCompile.h" +#include "wasm/WasmBuiltins.h" #include "wasm/WasmGenerator.h" #include "wasm/WasmOpIter.h" #include "wasm/WasmSignalHandlers.h" @@ -986,12 +987,9 @@ class FunctionCompiler { return true; } - bool passArg(MDefinition* argDef, ValType type, CallCompileState* call) { - if (inDeadCode()) { - return true; - } - - ABIArg arg = call->abi_.next(ToMIRType(type)); + // Do not call this directly. Call one of the passArg() variants instead. + bool passArgWorker(MDefinition* argDef, MIRType type, CallCompileState* call) { + ABIArg arg = call->abi_.next(type); switch (arg.kind()) { #ifdef JS_CODEGEN_REGISTER_PAIR case ABIArg::GPR_PAIR: { @@ -1022,6 +1020,20 @@ class FunctionCompiler { MOZ_CRASH("Unknown ABIArg kind."); } + bool passArg(MDefinition* argDef, MIRType type, CallCompileState* call) { + if (inDeadCode()) { + return true; + } + return passArgWorker(argDef, type, call); + } + + bool passArg(MDefinition* argDef, ValType type, CallCompileState* call) { + if (inDeadCode()) { + return true; + } + return passArgWorker(argDef, ToMIRType(type), call); + } + bool finishCall(CallCompileState* call) { if (inDeadCode()) { return true; @@ -1126,8 +1138,8 @@ class FunctionCompiler { return true; } - bool builtinCall(SymbolicAddress builtin, uint32_t lineOrBytecode, - const CallCompileState& call, ValType ret, + bool builtinCall(const SymbolicAddressSignature& builtin, + uint32_t lineOrBytecode, const CallCompileState& call, MDefinition** def) { if (inDeadCode()) { *def = nullptr; @@ -1135,9 +1147,9 @@ class FunctionCompiler { } CallSiteDesc desc(lineOrBytecode, CallSiteDesc::Symbolic); - auto callee = CalleeDesc::builtin(builtin); + auto callee = CalleeDesc::builtin(builtin.identity); auto* ins = - MWasmCall::New(alloc(), desc, callee, call.regArgs_, ToMIRType(ret)); + MWasmCall::New(alloc(), desc, callee, call.regArgs_, builtin.retType); if (!ins) { return false; } @@ -1147,9 +1159,9 @@ class FunctionCompiler { return true; } - bool builtinInstanceMethodCall(SymbolicAddress builtin, + bool builtinInstanceMethodCall(const SymbolicAddressSignature& builtin, uint32_t lineOrBytecode, - const CallCompileState& call, MIRType ret, + const CallCompileState& call, MDefinition** def) { if (inDeadCode()) { *def = nullptr; @@ -1158,7 +1170,8 @@ class FunctionCompiler { CallSiteDesc desc(lineOrBytecode, CallSiteDesc::Symbolic); auto* ins = MWasmCall::NewBuiltinInstanceMethodCall( - alloc(), desc, builtin, call.instanceArg_, call.regArgs_, ret); + alloc(), desc, builtin.identity, call.instanceArg_, call.regArgs_, + builtin.retType); if (!ins) { return false; } @@ -1168,14 +1181,6 @@ class FunctionCompiler { return true; } - bool builtinInstanceMethodCall(SymbolicAddress builtin, - uint32_t lineOrBytecode, - const CallCompileState& call, ValType ret, - MDefinition** def) { - return builtinInstanceMethodCall(builtin, lineOrBytecode, call, - ToMIRType(ret), def); - } - /*********************************************** Control flow generation */ inline bool inDeadCode() const { return curBlock_ == nullptr; } @@ -2201,17 +2206,13 @@ static bool EmitSetGlobal(FunctionCompiler& f) { if (!f.passInstance(&args)) { return false; } - // TODO: The argument type here is MIRType::Pointer, Julian's fix will take - // care of this. if (!f.passArg(barrierAddr, ValType::AnyRef, &args)) { return false; } f.finishCall(&args); MDefinition* ret; - // TODO: The return type here is void (ExprType::Void or MIRType::None), - // Julian's fix will take care of this. - if (!f.builtinInstanceMethodCall(SymbolicAddress::PostBarrierFiltering, - lineOrBytecode, args, ValType::I32, &ret)) { + if (!f.builtinInstanceMethodCall(SASigPostBarrierFiltering, lineOrBytecode, + args, &ret)) { return false; } } @@ -2591,21 +2592,22 @@ static bool TryInlineUnaryBuiltin(FunctionCompiler& f, SymbolicAddress callee, } static bool EmitUnaryMathBuiltinCall(FunctionCompiler& f, - SymbolicAddress callee, - ValType operandType) { + const SymbolicAddressSignature& callee) { + MOZ_ASSERT(callee.numArgs == 1); + uint32_t lineOrBytecode = f.readCallSiteLineOrBytecode(); MDefinition* input; - if (!f.iter().readUnary(operandType, &input)) { + if (!f.iter().readUnary(ValType(callee.argTypes[0]), &input)) { return false; } - if (TryInlineUnaryBuiltin(f, callee, input)) { + if (TryInlineUnaryBuiltin(f, callee.identity, input)) { return true; } CallCompileState call; - if (!f.passArg(input, operandType, &call)) { + if (!f.passArg(input, callee.argTypes[0], &call)) { return false; } @@ -2614,7 +2616,7 @@ static bool EmitUnaryMathBuiltinCall(FunctionCompiler& f, } MDefinition* def; - if (!f.builtinCall(callee, lineOrBytecode, call, operandType, &def)) { + if (!f.builtinCall(callee, lineOrBytecode, call, &def)) { return false; } @@ -2623,22 +2625,25 @@ static bool EmitUnaryMathBuiltinCall(FunctionCompiler& f, } static bool EmitBinaryMathBuiltinCall(FunctionCompiler& f, - SymbolicAddress callee, - ValType operandType) { + const SymbolicAddressSignature& callee) { + MOZ_ASSERT(callee.numArgs == 2); + MOZ_ASSERT(callee.argTypes[0] == callee.argTypes[1]); + uint32_t lineOrBytecode = f.readCallSiteLineOrBytecode(); CallCompileState call; MDefinition* lhs; MDefinition* rhs; - if (!f.iter().readBinary(operandType, &lhs, &rhs)) { + // This call to readBinary assumes both operands have the same type. + if (!f.iter().readBinary(ValType(callee.argTypes[0]), &lhs, &rhs)) { return false; } - if (!f.passArg(lhs, operandType, &call)) { + if (!f.passArg(lhs, callee.argTypes[0], &call)) { return false; } - if (!f.passArg(rhs, operandType, &call)) { + if (!f.passArg(rhs, callee.argTypes[1], &call)) { return false; } @@ -2647,7 +2652,7 @@ static bool EmitBinaryMathBuiltinCall(FunctionCompiler& f, } MDefinition* def; - if (!f.builtinCall(callee, lineOrBytecode, call, operandType, &def)) { + if (!f.builtinCall(callee, lineOrBytecode, call, &def)) { return false; } @@ -2675,8 +2680,8 @@ static bool EmitMemoryGrow(FunctionCompiler& f) { f.finishCall(&args); MDefinition* ret; - if (!f.builtinInstanceMethodCall(SymbolicAddress::MemoryGrow, lineOrBytecode, - args, ValType::I32, &ret)) { + if (!f.builtinInstanceMethodCall(SASigMemoryGrow, lineOrBytecode, args, + &ret)) { return false; } @@ -2700,8 +2705,8 @@ static bool EmitMemorySize(FunctionCompiler& f) { f.finishCall(&args); MDefinition* ret; - if (!f.builtinInstanceMethodCall(SymbolicAddress::MemorySize, - lineOrBytecode, args, ValType::I32, &ret)) { + if (!f.builtinInstanceMethodCall(SASigMemorySize, lineOrBytecode, args, + &ret)) { return false; } @@ -2820,11 +2825,10 @@ static bool EmitWait(FunctionCompiler& f, ValType type, uint32_t byteSize) { return false; } - SymbolicAddress callee = type == ValType::I32 ? SymbolicAddress::WaitI32 - : SymbolicAddress::WaitI64; + const SymbolicAddressSignature& callee = + type == ValType::I32 ? SASigWaitI32 : SASigWaitI64; MDefinition* ret; - if (!f.builtinInstanceMethodCall(callee, lineOrBytecode, args, ValType::I32, - &ret)) { + if (!f.builtinInstanceMethodCall(callee, lineOrBytecode, args, &ret)) { return false; } @@ -2870,8 +2874,7 @@ static bool EmitWake(FunctionCompiler& f) { } MDefinition* ret; - if (!f.builtinInstanceMethodCall(SymbolicAddress::Wake, lineOrBytecode, args, - ValType::I32, &ret)) { + if (!f.builtinInstanceMethodCall(SASigWake, lineOrBytecode, args, &ret)) { return false; } @@ -2952,11 +2955,9 @@ static bool EmitMemOrTableCopy(FunctionCompiler& f, bool isMem) { return false; } - SymbolicAddress callee = - isMem ? SymbolicAddress::MemCopy : SymbolicAddress::TableCopy; + const SymbolicAddressSignature& callee = isMem ? SASigMemCopy : SASigTableCopy; MDefinition* ret; - if (!f.builtinInstanceMethodCall(callee, lineOrBytecode, args, ValType::I32, - &ret)) { + if (!f.builtinInstanceMethodCall(callee, lineOrBytecode, args, &ret)) { return false; } @@ -2994,11 +2995,10 @@ static bool EmitDataOrElemDrop(FunctionCompiler& f, bool isData) { return false; } - SymbolicAddress callee = - isData ? SymbolicAddress::DataDrop : SymbolicAddress::ElemDrop; + const SymbolicAddressSignature& callee = + isData ? SASigDataDrop : SASigElemDrop; MDefinition* ret; - if (!f.builtinInstanceMethodCall(callee, lineOrBytecode, args, ValType::I32, - &ret)) { + if (!f.builtinInstanceMethodCall(callee, lineOrBytecode, args, &ret)) { return false; } @@ -3041,8 +3041,7 @@ static bool EmitMemFill(FunctionCompiler& f) { } MDefinition* ret; - if (!f.builtinInstanceMethodCall(SymbolicAddress::MemFill, lineOrBytecode, - args, ValType::I32, &ret)) { + if (!f.builtinInstanceMethodCall(SASigMemFill, lineOrBytecode, args, &ret)) { return false; } @@ -3100,11 +3099,9 @@ static bool EmitMemOrTableInit(FunctionCompiler& f, bool isMem) { return false; } - SymbolicAddress callee = - isMem ? SymbolicAddress::MemInit : SymbolicAddress::TableInit; + const SymbolicAddressSignature& callee = isMem ? SASigMemInit : SASigTableInit; MDefinition* ret; - if (!f.builtinInstanceMethodCall(callee, lineOrBytecode, args, ValType::I32, - &ret)) { + if (!f.builtinInstanceMethodCall(callee, lineOrBytecode, args, &ret)) { return false; } @@ -3158,8 +3155,8 @@ static bool EmitTableGet(FunctionCompiler& f) { // The return value here is either null, denoting an error, or a pointer to an // unmovable location containing a possibly-null ref. MDefinition* result; - if (!f.builtinInstanceMethodCall(SymbolicAddress::TableGet, lineOrBytecode, - args, MIRType::Pointer, &result)) { + if (!f.builtinInstanceMethodCall(SASigTableGet, lineOrBytecode, args, + &result)) { return false; } if (!f.checkPointerNullMeansFailedResult(result)) { @@ -3216,8 +3213,8 @@ static bool EmitTableGrow(FunctionCompiler& f) { } MDefinition* ret; - if (!f.builtinInstanceMethodCall(SymbolicAddress::TableGrow, lineOrBytecode, - args, ValType::I32, &ret)) { + if (!f.builtinInstanceMethodCall(SASigTableGrow, lineOrBytecode, args, + &ret)) { return false; } @@ -3266,8 +3263,7 @@ static bool EmitTableSet(FunctionCompiler& f) { } MDefinition* ret; - if (!f.builtinInstanceMethodCall(SymbolicAddress::TableSet, lineOrBytecode, - args, ValType::I32, &ret)) { + if (!f.builtinInstanceMethodCall(SASigTableSet, lineOrBytecode, args, &ret)) { return false; } if (!f.checkI32NegativeMeansFailedResult(ret)) { @@ -3307,8 +3303,8 @@ static bool EmitTableSize(FunctionCompiler& f) { } MDefinition* ret; - if (!f.builtinInstanceMethodCall(SymbolicAddress::TableSize, lineOrBytecode, - args, ValType::I32, &ret)) { + if (!f.builtinInstanceMethodCall(SASigTableSize, lineOrBytecode, args, + &ret)) { return false; } @@ -3676,17 +3672,13 @@ static bool EmitBodyExprs(FunctionCompiler& f) { case uint16_t(Op::F32Neg): CHECK(EmitUnaryWithType(f, ValType::F32, MIRType::Float32)); case uint16_t(Op::F32Ceil): - CHECK( - EmitUnaryMathBuiltinCall(f, SymbolicAddress::CeilF, ValType::F32)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigCeilF)); case uint16_t(Op::F32Floor): - CHECK( - EmitUnaryMathBuiltinCall(f, SymbolicAddress::FloorF, ValType::F32)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigFloorF)); case uint16_t(Op::F32Trunc): - CHECK( - EmitUnaryMathBuiltinCall(f, SymbolicAddress::TruncF, ValType::F32)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigTruncF)); case uint16_t(Op::F32Nearest): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::NearbyIntF, - ValType::F32)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigNearbyIntF)); case uint16_t(Op::F32Sqrt): CHECK(EmitUnaryWithType(f, ValType::F32, MIRType::Float32)); case uint16_t(Op::F32Add): @@ -3709,17 +3701,13 @@ static bool EmitBodyExprs(FunctionCompiler& f) { case uint16_t(Op::F64Neg): CHECK(EmitUnaryWithType(f, ValType::F64, MIRType::Double)); case uint16_t(Op::F64Ceil): - CHECK( - EmitUnaryMathBuiltinCall(f, SymbolicAddress::CeilD, ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigCeilD)); case uint16_t(Op::F64Floor): - CHECK( - EmitUnaryMathBuiltinCall(f, SymbolicAddress::FloorD, ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigFloorD)); case uint16_t(Op::F64Trunc): - CHECK( - EmitUnaryMathBuiltinCall(f, SymbolicAddress::TruncD, ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigTruncD)); case uint16_t(Op::F64Nearest): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::NearbyIntD, - ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigNearbyIntD)); case uint16_t(Op::F64Sqrt): CHECK(EmitUnaryWithType(f, ValType::F64, MIRType::Double)); case uint16_t(Op::F64Add): @@ -4112,35 +4100,25 @@ static bool EmitBodyExprs(FunctionCompiler& f) { CHECK(EmitRem(f, ValType::F64, MIRType::Double, /* isUnsigned = */ false)); case uint16_t(MozOp::F64Sin): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::SinD, - ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigSinD)); case uint16_t(MozOp::F64Cos): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::CosD, - ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigCosD)); case uint16_t(MozOp::F64Tan): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::TanD, - ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigTanD)); case uint16_t(MozOp::F64Asin): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::ASinD, - ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigASinD)); case uint16_t(MozOp::F64Acos): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::ACosD, - ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigACosD)); case uint16_t(MozOp::F64Atan): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::ATanD, - ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigATanD)); case uint16_t(MozOp::F64Exp): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::ExpD, - ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigExpD)); case uint16_t(MozOp::F64Log): - CHECK(EmitUnaryMathBuiltinCall(f, SymbolicAddress::LogD, - ValType::F64)); + CHECK(EmitUnaryMathBuiltinCall(f, SASigLogD)); case uint16_t(MozOp::F64Pow): - CHECK(EmitBinaryMathBuiltinCall(f, SymbolicAddress::PowD, - ValType::F64)); + CHECK(EmitBinaryMathBuiltinCall(f, SASigPowD)); case uint16_t(MozOp::F64Atan2): - CHECK(EmitBinaryMathBuiltinCall(f, SymbolicAddress::ATan2D, - ValType::F64)); + CHECK(EmitBinaryMathBuiltinCall(f, SASigATan2D)); case uint16_t(MozOp::OldCallDirect): CHECK(EmitCall(f, /* asmJSFuncDef = */ true)); case uint16_t(MozOp::OldCallIndirect): diff --git a/js/src/wasm/WasmTypes.h b/js/src/wasm/WasmTypes.h index 82eb7c2d8b05..ea139e2cf736 100644 --- a/js/src/wasm/WasmTypes.h +++ b/js/src/wasm/WasmTypes.h @@ -396,6 +396,16 @@ class ValType { explicit ValType(PackedTypeCode ptc) : tc_(ptc) { MOZ_ASSERT(isValidCode()); } + explicit ValType(jit::MIRType mty) { + switch (mty) { + case jit::MIRType::Int32: tc_ = PackTypeCode(TypeCode::I32); break; + case jit::MIRType::Int64: tc_ = PackTypeCode(TypeCode::I64); break; + case jit::MIRType::Float32: tc_ = PackTypeCode(TypeCode::F32); break; + case jit::MIRType::Double: tc_ = PackTypeCode(TypeCode::F64); break; + default: MOZ_CRASH("ValType(MIRType): unexpected type"); + } + } + static ValType fromBitsUnsafe(uint32_t bits) { return ValType(PackedTypeCodeFromBits(bits)); } @@ -2091,6 +2101,40 @@ enum class SymbolicAddress { Limit }; +// SymbolicAddressSignature carries type information for a function referred +// to by a SymbolicAddress. In order that |argTypes| can be written out as a +// static initialiser, it has to have fixed length. At present +// SymbolicAddressType is used to describe functions with at most 6 arguments, +// so |argTypes| has 7 entries in order to allow the last value to be +// MIRType::None, in the hope of catching any accidental overruns of the +// defined section of the array. + +static constexpr size_t SymbolicAddressSignatureMaxArgs = 6; + +struct SymbolicAddressSignature { + // The SymbolicAddress that is described. + const SymbolicAddress identity; + // The return type, or MIRType::None to denote 'void'. + const jit::MIRType retType; + // The number of arguments, 0 .. SymbolicAddressSignatureMaxArgs only. + const uint8_t numArgs; + // The argument types; SymbolicAddressSignatureMaxArgs + 1 guard, which + // should be MIRType::None. + const jit::MIRType argTypes[SymbolicAddressSignatureMaxArgs + 1]; +}; + +// The 16 in this assertion is derived as follows: SymbolicAddress is probably +// size-4 aligned-4, but it's at the start of the struct, so there's no +// alignment hole before it. All other components (MIRType and uint8_t) are +// size-1 aligned-1, and there are 8 in total, so it is reasonable to assume +// that they also don't create any alignment holes. Hence it is also +// reasonable to assume that the actual size is 1 * 4 + 8 * 1 == 12. The +// worst-plausible-case rounding will take that up to 16. Hence, the +// assertion uses 16. + +static_assert(sizeof(SymbolicAddressSignature) <= 16, + "SymbolicAddressSignature unexpectedly large"); + bool IsRoundingFunction(SymbolicAddress callee, jit::RoundingMode* mode); // Represents the resizable limits of memories and tables. diff --git a/testing/mozharness/configs/android/android_common.py b/testing/mozharness/configs/android/android_common.py index 850f1ba0b7ff..71f7943bc60b 100644 --- a/testing/mozharness/configs/android/android_common.py +++ b/testing/mozharness/configs/android/android_common.py @@ -235,6 +235,9 @@ config = { "%(modules_dir)s", "--symbols-path=%(symbols_path)s", "--suite=crashtest", + "--log-raw=%(raw_log_file)s", + "--log-raw-level=%(log_raw_level)s", + "--log-errorsummary=%(error_summary_file)s", "--log-tbpl-level=%(log_tbpl_level)s", "--deviceSerial=%(device_serial)s", ], @@ -268,6 +271,9 @@ config = { "--symbols-path=%(symbols_path)s", "--extra-profile-file=jsreftest/tests/user.js", "--suite=jstestbrowser", + "--log-raw=%(raw_log_file)s", + "--log-raw-level=%(log_raw_level)s", + "--log-errorsummary=%(error_summary_file)s", "--log-tbpl-level=%(log_tbpl_level)s", "--deviceSerial=%(device_serial)s", ], @@ -304,6 +310,9 @@ config = { "--apk=%(installer_path)s", ".", "--deviceSerial=%(device_serial)s", + "--log-raw=%(raw_log_file)s", + "--log-raw-level=%(log_raw_level)s", + "--log-errorsummary=%(error_summary_file)s", ], }, "marionette": { @@ -337,6 +346,7 @@ config = { "--utility-path=%(utility_path)s", "--deviceSerial=%(device_serial)s", "--log-raw=%(raw_log_file)s", + "--log-raw-level=%(log_raw_level)s", ], }, diff --git a/testing/web-platform/meta/animation-worklet/playback-rate.https.html.ini b/testing/web-platform/meta/animation-worklet/playback-rate.https.html.ini new file mode 100644 index 000000000000..23787dc7ed8d --- /dev/null +++ b/testing/web-platform/meta/animation-worklet/playback-rate.https.html.ini @@ -0,0 +1,19 @@ +[playback-rate.https.html] + [Zero current time is not affected by playbackRate set while the animation is in play-pending state.] + expected: FAIL + + [Non zero current time is not affected by playbackRate set while the animation is in play state.] + expected: FAIL + + [When playback rate is updated, the underlying effect is properly updated with the current time of its WorkletAnimation and produces correct visual result.] + expected: FAIL + + [Zero current time is not affected by playbackRate set while the animation is in idle state.] + expected: FAIL + + [The playback rate affects the rate of progress of the current time.] + expected: FAIL + + [The playback rate set before the animation started playing affects the rate of progress of the current time] + expected: FAIL + diff --git a/testing/web-platform/meta/animation-worklet/worklet-animation-local-time-after-duration.https.html.ini b/testing/web-platform/meta/animation-worklet/worklet-animation-local-time-after-duration.https.html.ini new file mode 100644 index 000000000000..59a7fc77ce65 --- /dev/null +++ b/testing/web-platform/meta/animation-worklet/worklet-animation-local-time-after-duration.https.html.ini @@ -0,0 +1,2 @@ +[worklet-animation-local-time-after-duration.https.html] + expected: TIMEOUT diff --git a/testing/web-platform/meta/animation-worklet/worklet-animation-local-time-before-start.https.html.ini b/testing/web-platform/meta/animation-worklet/worklet-animation-local-time-before-start.https.html.ini new file mode 100644 index 000000000000..d0f0108c678e --- /dev/null +++ b/testing/web-platform/meta/animation-worklet/worklet-animation-local-time-before-start.https.html.ini @@ -0,0 +1,2 @@ +[worklet-animation-local-time-before-start.https.html] + expected: TIMEOUT diff --git a/testing/web-platform/meta/animation-worklet/worklet-animation-pause-immediately.https.html.ini b/testing/web-platform/meta/animation-worklet/worklet-animation-pause-immediately.https.html.ini new file mode 100644 index 000000000000..273789f17805 --- /dev/null +++ b/testing/web-platform/meta/animation-worklet/worklet-animation-pause-immediately.https.html.ini @@ -0,0 +1,2 @@ +[worklet-animation-pause-immediately.https.html] + expected: TIMEOUT diff --git a/testing/web-platform/meta/animation-worklet/worklet-animation-pause-resume.https.html.ini b/testing/web-platform/meta/animation-worklet/worklet-animation-pause-resume.https.html.ini new file mode 100644 index 000000000000..fabe0e00bcd4 --- /dev/null +++ b/testing/web-platform/meta/animation-worklet/worklet-animation-pause-resume.https.html.ini @@ -0,0 +1,2 @@ +[worklet-animation-pause-resume.https.html] + expected: TIMEOUT diff --git a/testing/web-platform/meta/animation-worklet/worklet-animation-pause.https.html.ini b/testing/web-platform/meta/animation-worklet/worklet-animation-pause.https.html.ini new file mode 100644 index 000000000000..90e7b94eacde --- /dev/null +++ b/testing/web-platform/meta/animation-worklet/worklet-animation-pause.https.html.ini @@ -0,0 +1,2 @@ +[worklet-animation-pause.https.html] + expected: TIMEOUT diff --git a/testing/web-platform/meta/animation-worklet/worklet-animation-set-keyframes.https.html.ini b/testing/web-platform/meta/animation-worklet/worklet-animation-set-keyframes.https.html.ini new file mode 100644 index 000000000000..ab47701defc9 --- /dev/null +++ b/testing/web-platform/meta/animation-worklet/worklet-animation-set-keyframes.https.html.ini @@ -0,0 +1,2 @@ +[worklet-animation-set-keyframes.https.html] + expected: TIMEOUT diff --git a/testing/web-platform/meta/animation-worklet/worklet-animation-set-timing.https.html.ini b/testing/web-platform/meta/animation-worklet/worklet-animation-set-timing.https.html.ini new file mode 100644 index 000000000000..8af5ed5e6b90 --- /dev/null +++ b/testing/web-platform/meta/animation-worklet/worklet-animation-set-timing.https.html.ini @@ -0,0 +1,2 @@ +[worklet-animation-set-timing.https.html] + expected: TIMEOUT diff --git a/testing/web-platform/meta/clipboard-apis/async-navigator-clipboard-basics.https.html.ini b/testing/web-platform/meta/clipboard-apis/async-navigator-clipboard-basics.https.html.ini index 0a31d3137c74..31b3fbcac5b0 100644 --- a/testing/web-platform/meta/clipboard-apis/async-navigator-clipboard-basics.https.html.ini +++ b/testing/web-platform/meta/clipboard-apis/async-navigator-clipboard-basics.https.html.ini @@ -5,6 +5,9 @@ [navigator.clipboard.writeImageExperimental(Blob) succeeds] expected: FAIL - [navigator.clipboard.writeImageExperimental() fails (expect Blob)] + [navigator.clipboard.write(Blob) succeeds] + expected: FAIL + + [navigator.clipboard.read() succeeds] expected: FAIL diff --git a/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.ini b/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.ini new file mode 100644 index 000000000000..d19959b9c597 --- /dev/null +++ b/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.ini @@ -0,0 +1,2 @@ +[font-display-feature-policy-01.tentative.html] + expected: FAIL diff --git a/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.ini b/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.ini new file mode 100644 index 000000000000..66291b17cf3c --- /dev/null +++ b/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.ini @@ -0,0 +1,10 @@ +[font-display-feature-policy-02.tentative.html] + expected: + if not debug and not webrender and e10s and (os == "win") and (version == "10.0.17134") and (processor == "x86_64") and (bits == 64): FAIL + if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL + if debug and webrender and e10s and (os == "win") and (version == "10.0.17134") and (processor == "x86_64") and (bits == 64): FAIL + if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL + if debug and not webrender and e10s and (os == "win") and (version == "10.0.17134") and (processor == "x86_64") and (bits == 64): FAIL + if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL + if not debug and webrender and e10s and (os == "win") and (version == "10.0.17134") and (processor == "x86_64") and (bits == 64): FAIL + if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL diff --git a/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.ini b/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.ini new file mode 100644 index 000000000000..a00de45d8203 --- /dev/null +++ b/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.ini @@ -0,0 +1,5 @@ +[font-display-feature-policy-report-only.tentative.html] + expected: TIMEOUT + [font-display-late-swap Report Format] + expected: NOTRUN + diff --git a/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.ini b/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.ini new file mode 100644 index 000000000000..8077cfbf7d47 --- /dev/null +++ b/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.ini @@ -0,0 +1,5 @@ +[font-display-feature-policy-reporting.tentative.html] + expected: TIMEOUT + [font-display-late-swap Report Format] + expected: NOTRUN + diff --git a/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy.tentative.html.ini b/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy.tentative.html.ini deleted file mode 100644 index 5345ae812b9a..000000000000 --- a/testing/web-platform/meta/css/css-fonts/font-display/font-display-feature-policy.tentative.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[font-display-feature-policy.tentative.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-scroll-anchoring/start-edge-in-block-layout-direction.html.ini b/testing/web-platform/meta/css/css-scroll-anchoring/start-edge-in-block-layout-direction.html.ini new file mode 100644 index 000000000000..236eac87a0ab --- /dev/null +++ b/testing/web-platform/meta/css/css-scroll-anchoring/start-edge-in-block-layout-direction.html.ini @@ -0,0 +1,21 @@ +[start-edge-in-block-layout-direction.html] + [Vertical-RL LTR.] + expected: + if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL + + [Horizontal RTL.] + expected: + if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL + + [Vertical-LR LTR.] + expected: + if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL + + [Vertical-RL RTL.] + expected: + if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL + + [Vertical-LR RTL.] + expected: + if not debug and not webrender and not e10s and (os == "android") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): FAIL + diff --git a/testing/web-platform/meta/css/css-syntax/urange-parsing.html.ini b/testing/web-platform/meta/css/css-syntax/urange-parsing.html.ini index 490f72f3c6ee..bc2f30a77853 100644 --- a/testing/web-platform/meta/css/css-syntax/urange-parsing.html.ini +++ b/testing/web-platform/meta/css/css-syntax/urange-parsing.html.ini @@ -227,3 +227,48 @@ ["u+0-0000001" is invalid] expected: FAIL + ["u+a" => "U+A"] + expected: FAIL + + ["u+aaaa" => "U+AAAA"] + expected: FAIL + + ["u+0" => "U+0"] + expected: FAIL + + ["u+aaa" => "U+AAA"] + expected: FAIL + + ["u+1e9a" => "U+1E9A"] + expected: FAIL + + ["U+abc" => "U+ABC"] + expected: FAIL + + ["u+aaaaa" => "U+AAAAA"] + expected: FAIL + + ["u+AbC" => "U+ABC"] + expected: FAIL + + ["U+ABC" => "U+ABC"] + expected: FAIL + + ["u+1e-20" => "U+1E-20"] + expected: FAIL + + ["u+1e3" => "U+1E3"] + expected: FAIL + + ["u+0-1" => "U+0-1"] + expected: FAIL + + ["u+ABC" => "U+ABC"] + expected: FAIL + + ["u+aa" => "U+AA"] + expected: FAIL + + ["u+abc" => "U+ABC"] + expected: FAIL + diff --git a/testing/web-platform/meta/css/cssom-view/long_scroll_composited.html.ini b/testing/web-platform/meta/css/cssom-view/long_scroll_composited.html.ini new file mode 100644 index 000000000000..78492fe90518 --- /dev/null +++ b/testing/web-platform/meta/css/cssom-view/long_scroll_composited.html.ini @@ -0,0 +1,2 @@ +[long_scroll_composited.html] + expected: FAIL diff --git a/testing/web-platform/meta/css/filter-effects/backdrop-filter-border-radius.html.ini b/testing/web-platform/meta/css/filter-effects/backdrop-filter-border-radius.html.ini deleted file mode 100644 index e65378d0e3f3..000000000000 --- a/testing/web-platform/meta/css/filter-effects/backdrop-filter-border-radius.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[backdrop-filter-border-radius.html] - expected: FAIL diff --git a/testing/web-platform/meta/domparsing/XMLSerializer-serializeToString.html.ini b/testing/web-platform/meta/domparsing/XMLSerializer-serializeToString.html.ini new file mode 100644 index 000000000000..102d2d596c76 --- /dev/null +++ b/testing/web-platform/meta/domparsing/XMLSerializer-serializeToString.html.ini @@ -0,0 +1,13 @@ +[XMLSerializer-serializeToString.html] + [Check if generated prefixes match to "ns${index}".] + expected: FAIL + + [Check if "ns1" is generated even if the element already has xmlns:ns1.] + expected: FAIL + + [Check if attribute serialization takes into account of following xmlns:* attributes] + expected: FAIL + + [Check if attribute serialization takes into account of the same prefix declared in an ancestor element] + expected: FAIL + diff --git a/testing/web-platform/meta/element-timing/image-TAO-wildcard.sub.html.ini b/testing/web-platform/meta/element-timing/image-TAO-wildcard.sub.html.ini new file mode 100644 index 000000000000..c516cfeec6c1 --- /dev/null +++ b/testing/web-platform/meta/element-timing/image-TAO-wildcard.sub.html.ini @@ -0,0 +1,4 @@ +[image-TAO-wildcard.sub.html] + [Cross-origin element with wildcard TAO is observed.] + expected: FAIL + diff --git a/testing/web-platform/meta/element-timing/observe-child-element.html.ini b/testing/web-platform/meta/element-timing/observe-child-element.html.ini index b8cfee097748..3353cb12c03f 100644 --- a/testing/web-platform/meta/element-timing/observe-child-element.html.ini +++ b/testing/web-platform/meta/element-timing/observe-child-element.html.ini @@ -1,5 +1,4 @@ [observe-child-element.html] - expected: TIMEOUT [Element from same-origin iframe is observable.] expected: TIMEOUT diff --git a/testing/web-platform/meta/feature-policy/reporting/serial-report-only.https.html.ini b/testing/web-platform/meta/feature-policy/reporting/serial-report-only.https.html.ini new file mode 100644 index 000000000000..83569dac26f0 --- /dev/null +++ b/testing/web-platform/meta/feature-policy/reporting/serial-report-only.https.html.ini @@ -0,0 +1,7 @@ +[serial-report-only.https.html] + [getPorts in serial report only mode] + expected: FAIL + + [requestPort in serial report only mode] + expected: FAIL + diff --git a/testing/web-platform/meta/feature-policy/reporting/serial-reporting.https.html.ini b/testing/web-platform/meta/feature-policy/reporting/serial-reporting.https.html.ini new file mode 100644 index 000000000000..15a8ff54d95e --- /dev/null +++ b/testing/web-platform/meta/feature-policy/reporting/serial-reporting.https.html.ini @@ -0,0 +1,7 @@ +[serial-reporting.https.html] + [requestPort in serial reporting mode] + expected: FAIL + + [getPorts in serial reporting mode] + expected: FAIL + diff --git a/testing/web-platform/meta/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html.ini b/testing/web-platform/meta/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html.ini deleted file mode 100644 index ad0fa7e1690e..000000000000 --- a/testing/web-platform/meta/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html.ini +++ /dev/null @@ -1,10 +0,0 @@ -[document_domain_setter_null.tentative.html] - [No access when frame sets a `null` 'document.domain'.] - expected: FAIL - - [No access when parent sets a `null` 'document.domain'.] - expected: FAIL - - [No access when both sides set a `null` 'document.domain'.] - expected: FAIL - diff --git a/testing/web-platform/meta/html/browsers/the-window-object/window-open-noopener.html.ini b/testing/web-platform/meta/html/browsers/the-window-object/window-open-noopener.html.ini new file mode 100644 index 000000000000..b7e2eabf1b07 --- /dev/null +++ b/testing/web-platform/meta/html/browsers/the-window-object/window-open-noopener.html.ini @@ -0,0 +1,10 @@ +[window-open-noopener.html?_self] + +[window-open-noopener.html?indexed] + [noopener=1 means the same as noopener] + expected: FAIL + + +[window-open-noopener.html?_parent] + +[window-open-noopener.html?_top] diff --git a/testing/web-platform/meta/html/editing/editing-0/__dir__.ini b/testing/web-platform/meta/html/editing/editing-0/__dir__.ini new file mode 100644 index 000000000000..2e2a85383b01 --- /dev/null +++ b/testing/web-platform/meta/html/editing/editing-0/__dir__.ini @@ -0,0 +1 @@ +leak-threshold: [gpu:51200] diff --git a/testing/web-platform/meta/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html.ini b/testing/web-platform/meta/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html.ini index 01fa9e7b5745..60083d173e0d 100644 --- a/testing/web-platform/meta/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html.ini +++ b/testing/web-platform/meta/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html.ini @@ -22,3 +22,32 @@ [getComputedStyle ] expected: FAIL + + +[attributes.sub.html?encoding=windows-1252] + [getComputedStyle ] + expected: FAIL + + [getComputedStyle ] + expected: FAIL + + [getComputedStyle ] + expected: FAIL + + [getComputedStyle ] + expected: FAIL + + [getComputedStyle ] + expected: FAIL + + [getComputedStyle ] + expected: FAIL + + [getComputedStyle ] + expected: FAIL + + [getComputedStyle
] + expected: FAIL + + +[attributes.sub.html?encoding=utf8] diff --git a/testing/web-platform/meta/html/infrastructure/urls/resolving-urls/query-encoding/navigation.sub.html.ini b/testing/web-platform/meta/html/infrastructure/urls/resolving-urls/query-encoding/navigation.sub.html.ini index 8d4935d45302..44f691fb7642 100644 --- a/testing/web-platform/meta/html/infrastructure/urls/resolving-urls/query-encoding/navigation.sub.html.ini +++ b/testing/web-platform/meta/html/infrastructure/urls/resolving-urls/query-encoding/navigation.sub.html.ini @@ -23,3 +23,16 @@ [hyperlink auditing ] expected: TIMEOUT + +[navigation.sub.html?encoding=windows-1252] + expected: + if not debug and e10s and (os == "linux") and (processor == "x86"): TIMEOUT + if not debug and not asan and e10s and (os == "linux") and (processor == "x86_64"): TIMEOUT + if not debug and (os == "win"): TIMEOUT + if not debug and (os == "mac"): TIMEOUT + [hyperlink auditing ] + expected: TIMEOUT + + [hyperlink auditing ] + expected: TIMEOUT + diff --git a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-classic.html.ini b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-classic.html.ini deleted file mode 100644 index 70e934e31466..000000000000 --- a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-classic.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[string-compilation-base-url-external-classic.html] - [inline-event-handlers-UA-code should successfully import] - expected: FAIL - - [reflected-inline-event-handlers should successfully import] - expected: FAIL - diff --git a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-module.html.ini b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-module.html.ini deleted file mode 100644 index 59aabc34dafb..000000000000 --- a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-external-module.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[string-compilation-base-url-external-module.html] - [inline-event-handlers-UA-code should successfully import] - expected: FAIL - - [reflected-inline-event-handlers should successfully import] - expected: FAIL - diff --git a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html.ini b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html.ini index 368d8710435f..52df99345e1c 100644 --- a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html.ini +++ b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html.ini @@ -1,7 +1,4 @@ [string-compilation-nonce-classic.html] - [setTimeout must inherit the nonce from the triggering script, thus execute] - expected: FAIL - [inline event handlers triggered via UA code must inherit the nonce from the triggering script, thus execute] expected: FAIL diff --git a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html.ini b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html.ini index 81c006b24353..7c41ed7aa3db 100644 --- a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html.ini +++ b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html.ini @@ -1,7 +1,4 @@ [string-compilation-nonce-module.html] - [setTimeout must inherit the nonce from the triggering script, thus execute] - expected: FAIL - [inline event handlers triggered via UA code must inherit the nonce from the triggering script, thus execute] expected: FAIL diff --git a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html.ini b/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html.ini deleted file mode 100644 index c6ccc93a2d7a..000000000000 --- a/testing/web-platform/meta/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html.ini +++ /dev/null @@ -1,7 +0,0 @@ -[string-compilation-other-document.html] - [inline event handlers triggered by JS should successfully import] - expected: FAIL - - [reflected inline event handlers should successfully import] - expected: FAIL - diff --git a/testing/web-platform/meta/lifecycle/child-display-none.tentative.html.ini b/testing/web-platform/meta/lifecycle/child-display-none.tentative.html.ini new file mode 100644 index 000000000000..6631efd924a8 --- /dev/null +++ b/testing/web-platform/meta/lifecycle/child-display-none.tentative.html.ini @@ -0,0 +1,5 @@ +[child-display-none.tentative.html] + expected: TIMEOUT + [Child frame frozen] + expected: TIMEOUT + diff --git a/testing/web-platform/meta/longtask-timing/supported-longtask-types.any.js.ini b/testing/web-platform/meta/longtask-timing/supported-longtask-types.any.js.ini deleted file mode 100644 index 0c2ab09a1b3f..000000000000 --- a/testing/web-platform/meta/longtask-timing/supported-longtask-types.any.js.ini +++ /dev/null @@ -1,15 +0,0 @@ -[supported-longtask-types.any.html] - [supportedEntryTypes contains 'longtask' and 'taskattribution'.] - expected: FAIL - - [supportedEntryTypes contains 'longtask' but not 'taskattribution'.] - expected: FAIL - - -[supported-longtask-types.any.worker.html] - [supportedEntryTypes contains 'longtask' and 'taskattribution'.] - expected: FAIL - - [supportedEntryTypes contains 'longtask' but not 'taskattribution'.] - expected: FAIL - diff --git a/testing/web-platform/meta/longtask-timing/supported-longtask-types.window.js.ini b/testing/web-platform/meta/longtask-timing/supported-longtask-types.window.js.ini new file mode 100644 index 000000000000..c38d339fc373 --- /dev/null +++ b/testing/web-platform/meta/longtask-timing/supported-longtask-types.window.js.ini @@ -0,0 +1,4 @@ +[supported-longtask-types.window.html] + [supportedEntryTypes contains 'longtask' but not 'taskattribution'.] + expected: FAIL + diff --git a/testing/web-platform/meta/mixed-content/video-tag/meta-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html.ini b/testing/web-platform/meta/mixed-content/video-tag/meta-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html.ini new file mode 100644 index 000000000000..e0b10ef7637a --- /dev/null +++ b/testing/web-platform/meta/mixed-content/video-tag/meta-csp/same-host-https/top-level/no-redirect/allowed/allowed.https.html.ini @@ -0,0 +1,2 @@ +[allowed.https.html] + max-asserts: 2 diff --git a/testing/web-platform/meta/mixed-content/video-tag/no-opt-in/same-host-http/top-level/no-redirect/optionally-blockable/no-opt-in-allows.https.html.ini b/testing/web-platform/meta/mixed-content/video-tag/no-opt-in/same-host-http/top-level/no-redirect/optionally-blockable/no-opt-in-allows.https.html.ini new file mode 100644 index 000000000000..6b776452d1cf --- /dev/null +++ b/testing/web-platform/meta/mixed-content/video-tag/no-opt-in/same-host-http/top-level/no-redirect/optionally-blockable/no-opt-in-allows.https.html.ini @@ -0,0 +1,2 @@ +[no-opt-in-allows.https.html] + max-asserts: 2 diff --git a/testing/web-platform/meta/mozilla-sync b/testing/web-platform/meta/mozilla-sync index 5547c4c2f18d..2165b6d89c4d 100644 --- a/testing/web-platform/meta/mozilla-sync +++ b/testing/web-platform/meta/mozilla-sync @@ -1,2 +1,2 @@ -local: 6153030f2e587bf87d8641038c687dce1fd3351a -upstream: fab38653d3a4a8ce01db100fa049bdc72f4b8270 +local: e4bdf1e9a4d7125e27efdffec2ebdb7307a42137 +upstream: f8a1bfbe5454352d3f5b58845829968ff212519b diff --git a/testing/web-platform/meta/navigation-timing/supported_navigation_type.any.js.ini b/testing/web-platform/meta/navigation-timing/supported_navigation_type.any.js.ini deleted file mode 100644 index 3029022e9cfe..000000000000 --- a/testing/web-platform/meta/navigation-timing/supported_navigation_type.any.js.ini +++ /dev/null @@ -1,9 +0,0 @@ -[supported_navigation_type.any.html] - [supportedEntryTypes contains 'navigation'.] - expected: FAIL - - -[supported_navigation_type.any.worker.html] - [supportedEntryTypes contains 'navigation'.] - expected: FAIL - diff --git a/testing/web-platform/meta/navigation-timing/supported_navigation_type.window.js.ini b/testing/web-platform/meta/navigation-timing/supported_navigation_type.window.js.ini new file mode 100644 index 000000000000..e528a82215cf --- /dev/null +++ b/testing/web-platform/meta/navigation-timing/supported_navigation_type.window.js.ini @@ -0,0 +1,4 @@ +[supported_navigation_type.window.html] + [supportedEntryTypes contains 'navigation'.] + expected: FAIL + diff --git a/testing/web-platform/meta/paint-timing/supported-paint-type.any.js.ini b/testing/web-platform/meta/paint-timing/supported-paint-type.any.js.ini deleted file mode 100644 index ad9fb64b3ffd..000000000000 --- a/testing/web-platform/meta/paint-timing/supported-paint-type.any.js.ini +++ /dev/null @@ -1,9 +0,0 @@ -[supported-paint-type.any.html] - [supportedEntryTypes contains 'paint'.] - expected: FAIL - - -[supported-paint-type.any.worker.html] - [supportedEntryTypes contains 'paint'.] - expected: FAIL - diff --git a/testing/web-platform/meta/paint-timing/supported-paint-type.window.js.ini b/testing/web-platform/meta/paint-timing/supported-paint-type.window.js.ini new file mode 100644 index 000000000000..a36fcf8b420a --- /dev/null +++ b/testing/web-platform/meta/paint-timing/supported-paint-type.window.js.ini @@ -0,0 +1,4 @@ +[supported-paint-type.window.html] + [supportedEntryTypes contains 'paint'.] + expected: FAIL + diff --git a/testing/web-platform/meta/payment-request/payment-request-hasenrolledinstrument-method-protection.https.html.ini b/testing/web-platform/meta/payment-request/payment-request-hasenrolledinstrument-method-protection.https.html.ini new file mode 100644 index 000000000000..3576bb226bbc --- /dev/null +++ b/testing/web-platform/meta/payment-request/payment-request-hasenrolledinstrument-method-protection.https.html.ini @@ -0,0 +1,4 @@ +[payment-request-hasenrolledinstrument-method-protection.https.html] + [Optionally, at the user agent's discretion, return a promise rejected with a "NotAllowedError" DOMException.] + expected: FAIL + diff --git a/testing/web-platform/meta/payment-request/payment-request-hasenrolledinstrument-method.https.html.ini b/testing/web-platform/meta/payment-request/payment-request-hasenrolledinstrument-method.https.html.ini new file mode 100644 index 000000000000..b12ab212f2ed --- /dev/null +++ b/testing/web-platform/meta/payment-request/payment-request-hasenrolledinstrument-method.https.html.ini @@ -0,0 +1,4 @@ +[payment-request-hasenrolledinstrument-method.https.html] + [hasEnrolledInstrument() resolves to false for unsupported payment methods.] + expected: FAIL + diff --git a/testing/web-platform/meta/picture-in-picture/request-picture-in-picture-twice.html.ini b/testing/web-platform/meta/picture-in-picture/request-picture-in-picture-twice.html.ini index bed756d1819f..c91aa97535a6 100644 --- a/testing/web-platform/meta/picture-in-picture/request-picture-in-picture-twice.html.ini +++ b/testing/web-platform/meta/picture-in-picture/request-picture-in-picture-twice.html.ini @@ -1,6 +1,9 @@ [request-picture-in-picture-twice.html] disabled: - if (os == "android"): https://bugzilla.mozilla.org/show_bug.cgi?id=1499003 + if os == "android": https://bugzilla.mozilla.org/show_bug.cgi?id=1499003 [request Picture-in-Picture consumes user gesture] expected: FAIL + [request Picture-in-Picture does not require user gesture if document.pictureInPictureElement is set] + expected: FAIL + diff --git a/testing/web-platform/meta/resource-timing/resource-reload-TAO.sub.html.ini b/testing/web-platform/meta/resource-timing/resource-reload-TAO.sub.html.ini new file mode 100644 index 000000000000..1c45e2aedce0 --- /dev/null +++ b/testing/web-platform/meta/resource-timing/resource-reload-TAO.sub.html.ini @@ -0,0 +1,5 @@ +[resource-reload-TAO.sub.html] + expected: TIMEOUT + [Test that TAO headers are reused on reloads.] + expected: TIMEOUT + diff --git a/testing/web-platform/meta/screen-orientation/event-before-promise.html.ini b/testing/web-platform/meta/screen-orientation/event-before-promise.html.ini new file mode 100644 index 000000000000..5507b9ecdb2f --- /dev/null +++ b/testing/web-platform/meta/screen-orientation/event-before-promise.html.ini @@ -0,0 +1,4 @@ +[event-before-promise.html] + [The 'change' event must fire before the [[orientationPendingPromise\]\] is resolved.] + expected: FAIL + diff --git a/testing/web-platform/meta/serial/serial-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html.ini b/testing/web-platform/meta/serial/serial-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html.ini new file mode 100644 index 000000000000..46e03e96c1b7 --- /dev/null +++ b/testing/web-platform/meta/serial/serial-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html.ini @@ -0,0 +1,14 @@ +[serial-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html] + expected: TIMEOUT + [Feature-Policy allow="serial" disallows cross-origin relocation.] + expected: TIMEOUT + + [Feature-Policy allow="serial" allows workers in same-origin relocation.] + expected: TIMEOUT + + [Feature-Policy allow="serial" allows same-origin relocation.] + expected: TIMEOUT + + [Feature-Policy allow="serial" disallows workers in cross-origin relocation.] + expected: TIMEOUT + diff --git a/testing/web-platform/meta/serial/serial-allowed-by-feature-policy-attribute.https.sub.html.ini b/testing/web-platform/meta/serial/serial-allowed-by-feature-policy-attribute.https.sub.html.ini new file mode 100644 index 000000000000..28be79f0a359 --- /dev/null +++ b/testing/web-platform/meta/serial/serial-allowed-by-feature-policy-attribute.https.sub.html.ini @@ -0,0 +1,17 @@ +[serial-allowed-by-feature-policy-attribute.https.sub.html] + expected: TIMEOUT + [Feature policy "serial" can be enabled in a worker in same-origin iframe using allow="serial" attribute] + expected: TIMEOUT + + [Feature policy "serial" can be enabled in a worker in cross-origin iframe using allow="serial" attribute] + expected: TIMEOUT + + [Feature policy "serial" can be enabled in cross-origin iframe using allow="serial" attribute] + expected: TIMEOUT + + [Feature policy "serial" can be enabled in same-origin iframe using allow="serial" attribute] + expected: TIMEOUT + + [Inherited header feature policy allows dedicated workers.] + expected: FAIL + diff --git a/testing/web-platform/meta/serial/serial-allowed-by-feature-policy.https.sub.html.ini b/testing/web-platform/meta/serial/serial-allowed-by-feature-policy.https.sub.html.ini new file mode 100644 index 000000000000..b9c0dfb5ee2d --- /dev/null +++ b/testing/web-platform/meta/serial/serial-allowed-by-feature-policy.https.sub.html.ini @@ -0,0 +1,20 @@ +[serial-allowed-by-feature-policy.https.sub.html] + expected: TIMEOUT + [Feature-Policy header {"serial" : ["*"\]} allows cross-origin iframes.] + expected: TIMEOUT + + [Feature-Policy header {"serial" : ["*"\]} allows workers in cross-origin iframes.] + expected: TIMEOUT + + [Inherited header feature policy allows dedicated workers.] + expected: FAIL + + [Feature-Policy header {"serial" : ["*"\]} allows the top-level document.] + expected: FAIL + + [Feature-Policy header {"serial" : ["*"\]} allows same-origin iframes.] + expected: TIMEOUT + + [Feature-Policy header {"serial" : ["*"\]} allows workers in same-origin iframes.] + expected: TIMEOUT + diff --git a/testing/web-platform/meta/serial/serial-default-feature-policy.https.sub.html.ini b/testing/web-platform/meta/serial/serial-default-feature-policy.https.sub.html.ini new file mode 100644 index 000000000000..ba60be7ae552 --- /dev/null +++ b/testing/web-platform/meta/serial/serial-default-feature-policy.https.sub.html.ini @@ -0,0 +1,11 @@ +[serial-default-feature-policy.https.sub.html] + expected: TIMEOUT + [Default "serial" feature policy ["self"\] disallows cross-origin iframes.] + expected: TIMEOUT + + [Default "serial" feature policy ["self"\] allows same-origin iframes.] + expected: TIMEOUT + + [Default "serial" feature policy ["self"\] allows the top-level document.] + expected: FAIL + diff --git a/testing/web-platform/meta/serial/serial-disabled-by-feature-policy.https.sub.html.ini b/testing/web-platform/meta/serial/serial-disabled-by-feature-policy.https.sub.html.ini new file mode 100644 index 000000000000..7b4eee1cc179 --- /dev/null +++ b/testing/web-platform/meta/serial/serial-disabled-by-feature-policy.https.sub.html.ini @@ -0,0 +1,20 @@ +[serial-disabled-by-feature-policy.https.sub.html] + expected: TIMEOUT + [Feature-Policy header {"serial" : [\]} disallows cross-origin iframes.] + expected: TIMEOUT + + [Feature-Policy header {"serial" : [\]} disallows same-origin iframes.] + expected: TIMEOUT + + [Feature-Policy header {"serial" : [\]} disallows workers in cross-origin iframes.] + expected: TIMEOUT + + [Feature-Policy header {"serial" : [\]} disallows workers in same-origin iframes.] + expected: TIMEOUT + + [Inherited Feature-Policy header {"serial" : [\]} disallows dedicated workers.] + expected: FAIL + + [Feature-Policy header {"serial" : [\]} disallows getPorts in the top-level document.] + expected: FAIL + diff --git a/testing/web-platform/meta/streams/readable-streams/async-iterator.any.js.ini b/testing/web-platform/meta/streams/readable-streams/async-iterator.any.js.ini new file mode 100644 index 000000000000..5a85e7cc23c7 --- /dev/null +++ b/testing/web-platform/meta/streams/readable-streams/async-iterator.any.js.ini @@ -0,0 +1,354 @@ +[async-iterator.any.serviceworker.html] + [Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function] + expected: FAIL + + [Calling return() twice rejects] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = true] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = true] + expected: FAIL + + [getIterator() throws if there's already a lock] + expected: FAIL + + [Async-iterating a push source] + expected: FAIL + + [Async-iterating a closed stream never executes the loop body, but works fine] + expected: FAIL + + [Acquiring a reader after exhaustively async-iterating a stream] + expected: FAIL + + [Async iterator instances should have the correct list of properties] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = false] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = false] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = false] + expected: FAIL + + [Async-iterating a pull source] + expected: FAIL + + [Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true] + expected: FAIL + + [Acquiring a reader after partially async-iterating a stream] + expected: FAIL + + [Async-iterating a partially consumed stream] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = false] + expected: FAIL + + [calling return() while there are pending reads rejects] + expected: FAIL + + [Async-iterating a pull source manually] + expected: FAIL + + [Async-iterating an errored stream throws] + expected: FAIL + + [next()'s fulfillment value has the right shape] + expected: FAIL + + +[async-iterator.any.sharedworker.html] + [Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function] + expected: FAIL + + [Calling return() twice rejects] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = true] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = true] + expected: FAIL + + [getIterator() throws if there's already a lock] + expected: FAIL + + [Async-iterating a push source] + expected: FAIL + + [Async-iterating a closed stream never executes the loop body, but works fine] + expected: FAIL + + [Acquiring a reader after exhaustively async-iterating a stream] + expected: FAIL + + [Async iterator instances should have the correct list of properties] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = false] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = false] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = false] + expected: FAIL + + [Async-iterating a pull source] + expected: FAIL + + [Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true] + expected: FAIL + + [Acquiring a reader after partially async-iterating a stream] + expected: FAIL + + [Async-iterating a partially consumed stream] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = false] + expected: FAIL + + [calling return() while there are pending reads rejects] + expected: FAIL + + [Async-iterating a pull source manually] + expected: FAIL + + [Async-iterating an errored stream throws] + expected: FAIL + + [next()'s fulfillment value has the right shape] + expected: FAIL + + +[async-iterator.any.worker.html] + [Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function] + expected: FAIL + + [Calling return() twice rejects] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = true] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = true] + expected: FAIL + + [getIterator() throws if there's already a lock] + expected: FAIL + + [Async-iterating a push source] + expected: FAIL + + [Async-iterating a closed stream never executes the loop body, but works fine] + expected: FAIL + + [Acquiring a reader after exhaustively async-iterating a stream] + expected: FAIL + + [Async iterator instances should have the correct list of properties] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = false] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = false] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = false] + expected: FAIL + + [Async-iterating a pull source] + expected: FAIL + + [Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true] + expected: FAIL + + [Acquiring a reader after partially async-iterating a stream] + expected: FAIL + + [Async-iterating a partially consumed stream] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = false] + expected: FAIL + + [calling return() while there are pending reads rejects] + expected: FAIL + + [Async-iterating a pull source manually] + expected: FAIL + + [Async-iterating an errored stream throws] + expected: FAIL + + [next()'s fulfillment value has the right shape] + expected: FAIL + + +[async-iterator.any.html] + [Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function] + expected: FAIL + + [Calling return() twice rejects] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = true] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = true] + expected: FAIL + + [getIterator() throws if there's already a lock] + expected: FAIL + + [Async-iterating a push source] + expected: FAIL + + [Async-iterating a closed stream never executes the loop body, but works fine] + expected: FAIL + + [Acquiring a reader after exhaustively async-iterating a stream] + expected: FAIL + + [Async iterator instances should have the correct list of properties] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = false] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = false] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = false] + expected: FAIL + + [Async-iterating a pull source] + expected: FAIL + + [Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true] + expected: FAIL + + [Acquiring a reader after partially async-iterating a stream] + expected: FAIL + + [Async-iterating a partially consumed stream] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = false] + expected: FAIL + + [calling return() while there are pending reads rejects] + expected: FAIL + + [Async-iterating a pull source manually] + expected: FAIL + + [Async-iterating an errored stream throws] + expected: FAIL + + [next()'s fulfillment value has the right shape] + expected: FAIL + + +[async-iterator.any.js] + [Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function] + expected: FAIL + + [Calling return() twice rejects] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = true] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = true] + expected: FAIL + + [getIterator() throws if there's already a lock] + expected: FAIL + + [Async-iterating a push source] + expected: FAIL + + [Async-iterating a closed stream never executes the loop body, but works fine] + expected: FAIL + + [Acquiring a reader after exhaustively async-iterating a stream] + expected: FAIL + + [Async iterator instances should have the correct list of properties] + expected: FAIL + + [Cancellation behavior when returning inside loop body; preventCancel = false] + expected: FAIL + + [Cancellation behavior when manually calling return(); preventCancel = false] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = true] + expected: FAIL + + [Cancellation behavior when throwing inside loop body; preventCancel = false] + expected: FAIL + + [Async-iterating a pull source] + expected: FAIL + + [Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true] + expected: FAIL + + [Acquiring a reader after partially async-iterating a stream] + expected: FAIL + + [Async-iterating a partially consumed stream] + expected: FAIL + + [Cancellation behavior when breaking inside loop body; preventCancel = false] + expected: FAIL + + [calling return() while there are pending reads rejects] + expected: FAIL + + [Async-iterating a pull source manually] + expected: FAIL + + [Async-iterating an errored stream throws] + expected: FAIL + + [next()'s fulfillment value has the right shape] + expected: FAIL + diff --git a/testing/web-platform/meta/streams/readable-streams/brand-checks.any.js.ini b/testing/web-platform/meta/streams/readable-streams/brand-checks.any.js.ini new file mode 100644 index 000000000000..52a08897768d --- /dev/null +++ b/testing/web-platform/meta/streams/readable-streams/brand-checks.any.js.ini @@ -0,0 +1,54 @@ +[brand-checks.any.worker.html] + [ReadableStreamAsyncIteratorPrototype.return enforces a brand check] + expected: FAIL + + [ReadableStreamAsyncIteratorPrototype.next enforces a brand check] + expected: FAIL + + [Can get ReadableStreamAsyncIteratorPrototype object indirectly] + expected: FAIL + + +[brand-checks.any.serviceworker.html] + [ReadableStreamAsyncIteratorPrototype.return enforces a brand check] + expected: FAIL + + [ReadableStreamAsyncIteratorPrototype.next enforces a brand check] + expected: FAIL + + [Can get ReadableStreamAsyncIteratorPrototype object indirectly] + expected: FAIL + + +[brand-checks.any.html] + [ReadableStreamAsyncIteratorPrototype.return enforces a brand check] + expected: FAIL + + [ReadableStreamAsyncIteratorPrototype.next enforces a brand check] + expected: FAIL + + [Can get ReadableStreamAsyncIteratorPrototype object indirectly] + expected: FAIL + + +[brand-checks.any.sharedworker.html] + [ReadableStreamAsyncIteratorPrototype.return enforces a brand check] + expected: FAIL + + [ReadableStreamAsyncIteratorPrototype.next enforces a brand check] + expected: FAIL + + [Can get ReadableStreamAsyncIteratorPrototype object indirectly] + expected: FAIL + + +[brand-checks.any.js] + [ReadableStreamAsyncIteratorPrototype.return enforces a brand check] + expected: FAIL + + [ReadableStreamAsyncIteratorPrototype.next enforces a brand check] + expected: FAIL + + [Can get ReadableStreamAsyncIteratorPrototype object indirectly] + expected: FAIL + diff --git a/testing/web-platform/meta/streams/readable-streams/patched-global.any.js.ini b/testing/web-platform/meta/streams/readable-streams/patched-global.any.js.ini new file mode 100644 index 000000000000..97eb7a4b459b --- /dev/null +++ b/testing/web-platform/meta/streams/readable-streams/patched-global.any.js.ini @@ -0,0 +1,24 @@ +[patched-global.any.serviceworker.html] + [ReadableStream getIterator() should use the original values of getReader() and ReadableStreamDefaultReader methods] + expected: FAIL + + +[patched-global.any.sharedworker.html] + [ReadableStream getIterator() should use the original values of getReader() and ReadableStreamDefaultReader methods] + expected: FAIL + + +[patched-global.any.worker.html] + [ReadableStream getIterator() should use the original values of getReader() and ReadableStreamDefaultReader methods] + expected: FAIL + + +[patched-global.any.html] + [ReadableStream getIterator() should use the original values of getReader() and ReadableStreamDefaultReader methods] + expected: FAIL + + +[patched-global.any.js] + [ReadableStream getIterator() should use the original values of getReader() and ReadableStreamDefaultReader methods] + expected: FAIL + diff --git a/testing/web-platform/meta/uievents/click/auxclick_event.html.ini b/testing/web-platform/meta/uievents/click/auxclick_event.html.ini new file mode 100644 index 000000000000..3e95cbe0479b --- /dev/null +++ b/testing/web-platform/meta/uievents/click/auxclick_event.html.ini @@ -0,0 +1,4 @@ +[auxclick_event.html] + [auxclick event sequence received.] + expected: FAIL + diff --git a/testing/web-platform/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini b/testing/web-platform/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini new file mode 100644 index 000000000000..e5a036b1bc27 --- /dev/null +++ b/testing/web-platform/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini @@ -0,0 +1,43 @@ +[sub-sample-buffer-stitching.html] + [# AUDIT TASK RUNNER FINISHED: 2 out of 2 tasks were failed.] + expected: FAIL + + [X Stitched sine-wave buffers at sample rate 44100 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732956767082214,0.4248766303062439,0.4807544946670532,0.5347436666488647,0.5866319537162781,0.6362155675888062,0.683299720287323,0.7276993989944458,0.7692402005195618,0.8077588677406311...\] with an element-wise tolerance of {"absoluteThreshold":0.000090957,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[2003\]\t-9.6732087433338165e-2\t-9.6823699772357941e-2\t9.1612339019775391e-5\t9.4617680624852212e-4\t9.0957000000000003e-5\n\t[2004\]\t-3.4187544137239456e-2\t-3.4279607236385345e-2\t9.2063099145889282e-5\t2.6856520995424621e-3\t9.0957000000000003e-5\n\t[2005\]\t2.8491314500570297e-2\t2.8398986905813217e-2\t9.2327594757080078e-5\t3.2510876202481997e-3\t9.0957000000000003e-5\n\t[2006\]\t9.1058239340782166e-2\t9.0966261923313141e-2\t9.1977417469024658e-5\t1.0111157205356415e-3\t9.0957000000000003e-5\n\t[2007\]\t1.5326742827892303e-1\t1.5317615866661072e-1\t9.1269612312316895e-5\t5.9584737668585898e-4\t9.0957000000000003e-5\n\t...and 38045 more errors.\n\tMax AbsError of 2.0274701528251171e-3 at index of 44050.\n\t[44050\]\t-7.1237324737012386e-3\t-5.0962623208761215e-3\t2.0274701528251171e-3\t3.9783473164634225e-1\t9.0957000000000003e-5\n\tMax RelError of 5.5714977262789269e+1 at index of 30419.\n\t[30419\]\t-1.4247581129893661e-3\t-2.5121373255387880e-5\t1.3996367397339782e-3\t5.5714977262789269e+1\t9.0957000000000003e-5\n] + expected: FAIL + + [< [buffer-stitching-2\] 1 out of 3 assertions were failed.] + expected: FAIL + + [X SNR (56.56582705421649 dB) is not greater than or equal to 65.737. Got 56.56582705421649.] + expected: FAIL + + [< [buffer-stitching-1\] 2 out of 3 assertions were failed.] + expected: FAIL + + [X SNR (58.62182031202294 dB) is not greater than or equal to 85.586. Got 58.62182031202294.] + expected: FAIL + + [X SNR (56.565827273128384 dB) is not greater than or equal to 65.737. Got 56.565827273128384.] + expected: FAIL + + [X SNR (58.62182032943065 dB) is not greater than or equal to 85.586. Got 58.62182032943065.] + expected: FAIL + + [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732956767082214,0.4248766303062439,0.4807544946670532,0.5347436666488647,0.5866319537162781,0.6362155675888062,0.683299720287323,0.7276993989944458,0.7692402005195618,0.8077588677406311...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[31\]\t9.2517089843750000e-1\t9.3139308691024780e-1\t6.2221884727478027e-3\t6.6805182046056925e-3\t3.8985999999999999e-3\n\t[270\]\t-9.3151855468750000e-1\t-9.3846446275711060e-1\t6.9459080696105957e-3\t7.4013543882143849e-3\t3.8985999999999999e-3\n\t[273\]\t-9.8104858398437500e-1\t-9.8648869991302490e-1\t5.4401159286499023e-3\t5.5146256912314735e-3\t3.8985999999999999e-3\n\t[421\]\t9.3499755859375000e-1\t9.5192760229110718e-1\t1.6930043697357178e-2\t1.7785011860786272e-2\t3.8985999999999999e-3\n\t[424\]\t9.7683715820312500e-1\t9.9241310358047485e-1\t1.5575945377349854e-2\t1.5695021882675898e-2\t3.8985999999999999e-3\n\t...and 535 more errors.\n\tMax AbsError of 4.4242441654205322e-2 at index of 43225.\n\t[43225\]\t9.4824218750000000e-1\t9.9248462915420532e-1\t4.4242441654205322e-2\t4.4577457780790718e-2\t3.8985999999999999e-3\n\tMax RelError of 4.4577457780790718e-2 at index of 43225.\n\t[43225\]\t9.4824218750000000e-1\t9.9248462915420532e-1\t4.4242441654205322e-2\t4.4577457780790718e-2\t3.8985999999999999e-3\n] + expected: FAIL + + [X SNR (58.62182025211463 dB) is not greater than or equal to 85.586. Got 58.62182025211463.] + expected: FAIL + + [< [buffer-stitching-2\] 2 out of 3 assertions were failed.] + expected: FAIL + + [X SNR (46.181437501508576 dB) is not greater than or equal to 65.737. Got 46.181437501508576.] + expected: FAIL + + [X SNR (56.56582707672834 dB) is not greater than or equal to 65.737. Got 56.56582707672834.] + expected: FAIL + + [X SNR (58.62182033056576 dB) is not greater than or equal to 85.586. Got 58.62182033056576.] + expected: FAIL + diff --git a/testing/web-platform/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-scheduling.html.ini b/testing/web-platform/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-scheduling.html.ini new file mode 100644 index 000000000000..b0c4ee5bcce4 --- /dev/null +++ b/testing/web-platform/meta/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-scheduling.html.ini @@ -0,0 +1,61 @@ +[sub-sample-scheduling.html] + [X With playbackRate 0.25: output0[17\] is not equal to 0. Got 0.6892558932304382.] + expected: FAIL + + [X With playbackRate 0.25: output0[18\] is not close to 1.0499999999999998 within a relative error of 4.542e-8 (RelErr=0.07462642306373217). Got 0.971642255783081.] + expected: FAIL + + [X With playbackRate 4: output1[17\] is not equal to 0. Got -0.09868232905864716.] + expected: FAIL + + [X output0[3\] is not equal to 0. Got 1.] + expected: FAIL + + [X output0[0:33\]: Expected 0 for all values but found 1 unexpected values: \n\tIndex\tActual\n\t[33\]\t1] + expected: FAIL + + [< [sub-sample-grain\] 3 out of 16 assertions were failed.] + expected: FAIL + + [X output0[37\] should not be equal to 0. Got 0.] + expected: FAIL + + [X With playbackRate 4: output1[18\] is not close to 1.7999999999999972 within a relative error of 4.542e-8 (RelErr=0.05661286248101295). Got 1.9019031524658203.] + expected: FAIL + + [X output1[33\] should not be equal to 0. Got 0.] + expected: FAIL + + [X output0 expected to be equal to the array [0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1...\] but differs in 2 places:\n\tIndex\tActual\t\t\tExpected\n\t[3\]\t1.0000000000000000e+0\t0.0000000000000000e+0\n\t[37\]\t0.0000000000000000e+0\t1.0000000000000000e+0] + expected: FAIL + + [X output1[34:8190\] does not equal [1.100000023841858,2.0999999046325684,3.0999999046325684,4.099999904632568,5.099999904632568,6.099999904632568,7.099999904632568,8.100000381469727,9.100000381469727,10.100000381469727,11.100000381469727,12.100000381469727,13.100000381469727,14.100000381469727,15.100000381469727,16.100000381469727...\] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[0\]\t1.0000000000000000e+0\t1.1000000238418579e+0\t1.0000002384185791e-1\t9.0909110613105290e-2\t0.0000000000000000e+0\n\t[1\]\t2.0000000000000000e+0\t2.0999999046325684e+0\t9.9999904632568359e-2\t4.7619004368509764e-2\t0.0000000000000000e+0\n\t[2\]\t3.0000000000000000e+0\t3.0999999046325684e+0\t9.9999904632568359e-2\t3.2258034744817511e-2\t0.0000000000000000e+0\n\t[3\]\t4.0000000000000000e+0\t4.0999999046325684e+0\t9.9999904632568359e-2\t2.4390221209414906e-2\t0.0000000000000000e+0\n\t[4\]\t5.0000000000000000e+0\t5.0999999046325684e+0\t9.9999904632568359e-2\t1.9607824804414951e-2\t0.0000000000000000e+0\n\t...and 8152 more errors.\n\tMax AbsError of 1.0009765625000000e-1 at index of 2047.\n\t[2047\]\t2.0480000000000000e+3\t2.0481000976562500e+3\t1.0009765625000000e-1\t4.8873419987893697e-5\t0.0000000000000000e+0\n\tMax RelError of 9.0909110613105290e-2 at index of 0.\n] + expected: FAIL + + [# AUDIT TASK RUNNER FINISHED: 4 out of 4 tasks were failed.] + expected: FAIL + + [< [sub-sample accurate start with playbackRate\] 4 out of 5 assertions were failed.] + expected: FAIL + + [X output0[34:8190\] does not equal [1.899999976158142,2.9000000953674316,3.9000000953674316,4.900000095367432,5.900000095367432,6.900000095367432,7.900000095367432,8.899999618530273,9.899999618530273,10.899999618530273,11.899999618530273,12.899999618530273,13.899999618530273,14.899999618530273,15.899999618530273,16.899999618530273...\] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[0\]\t2.0000000000000000e+0\t1.8999999761581421e+0\t1.0000002384185791e-1\t5.2631592156154129e-2\t0.0000000000000000e+0\n\t[1\]\t3.0000000000000000e+0\t2.9000000953674316e+0\t9.9999904632568359e-2\t3.4482724601392921e-2\t0.0000000000000000e+0\n\t[2\]\t4.0000000000000000e+0\t3.9000000953674316e+0\t9.9999904632568359e-2\t2.5641000560833845e-2\t0.0000000000000000e+0\n\t[3\]\t5.0000000000000000e+0\t4.9000000953674316e+0\t9.9999904632568359e-2\t2.0408143405366560e-2\t0.0000000000000000e+0\n\t[4\]\t6.0000000000000000e+0\t5.9000000953674316e+0\t9.9999904632568359e-2\t1.6949136104436064e-2\t0.0000000000000000e+0\n\t...and 8152 more errors.\n\tMax AbsError of 1.0009765625000000e-1 at index of 2047.\n\t[2047\]\t2.0490000000000000e+3\t2.0488999023437500e+3\t1.0009765625000000e-1\t4.8854341852180105e-5\t0.0000000000000000e+0\n\tMax RelError of 5.2631592156154129e-2 at index of 0.\n] + expected: FAIL + + [< [sub-sample accurate start\] 3 out of 6 assertions were failed.] + expected: FAIL + + [< [sub-sample accurate stop\] 1 out of 9 assertions were failed.] + expected: FAIL + + [X With playbackRate 0.25: output0[17\] is not equal to 0. Got 0.73760986328125.] + expected: FAIL + + [X With playbackRate 0.25: output0[18\] is not close to 1.0499999999999998 within a relative error of 4.542e-8 (RelErr=0.11400204613095223). Got 0.9302978515625.] + expected: FAIL + + [X With playbackRate 4: output1[17\] is not equal to 0. Got 0.058258056640625.] + expected: FAIL + + [X With playbackRate 4: output1[18\] is not close to 1.7999999999999972 within a relative error of 4.542e-8 (RelErr=0.5584106445312493). Got 0.79486083984375.] + expected: FAIL + diff --git a/testing/web-platform/meta/webrtc/RTCIceConnectionState-candidate-pair.https.html.ini b/testing/web-platform/meta/webrtc/RTCIceConnectionState-candidate-pair.https.html.ini new file mode 100644 index 000000000000..2a4783130514 --- /dev/null +++ b/testing/web-platform/meta/webrtc/RTCIceConnectionState-candidate-pair.https.html.ini @@ -0,0 +1,5 @@ +[RTCIceConnectionState-candidate-pair.https.html] + expected: TIMEOUT + [On ICE connected, getStats() contains a connected candidate-pair] + expected: TIMEOUT + diff --git a/testing/web-platform/meta/webrtc/RTCPeerConnection-iceConnectionState.html.ini b/testing/web-platform/meta/webrtc/RTCPeerConnection-iceConnectionState.https.html.ini similarity index 68% rename from testing/web-platform/meta/webrtc/RTCPeerConnection-iceConnectionState.html.ini rename to testing/web-platform/meta/webrtc/RTCPeerConnection-iceConnectionState.https.html.ini index a1f854991184..88beb64b03f9 100644 --- a/testing/web-platform/meta/webrtc/RTCPeerConnection-iceConnectionState.html.ini +++ b/testing/web-platform/meta/webrtc/RTCPeerConnection-iceConnectionState.https.html.ini @@ -1,4 +1,4 @@ -[RTCPeerConnection-iceConnectionState.html] +[RTCPeerConnection-iceConnectionState.https.html] [connection with one data channel should eventually have connected connection state] expected: FAIL diff --git a/testing/web-platform/meta/webrtc/RTCPeerConnection-track-stats.https.html.ini b/testing/web-platform/meta/webrtc/RTCPeerConnection-track-stats.https.html.ini index 5a67169e99f8..fe3995770049 100644 --- a/testing/web-platform/meta/webrtc/RTCPeerConnection-track-stats.https.html.ini +++ b/testing/web-platform/meta/webrtc/RTCPeerConnection-track-stats.https.html.ini @@ -1,4 +1,5 @@ [RTCPeerConnection-track-stats.https.html] + expected: TIMEOUT [addTrack() without setLocalDescription() yields track stats] expected: FAIL @@ -36,21 +37,25 @@ expected: FAIL [RTCRtpSender.getStats() contains only outbound-rtp and related stats] - expected: FAIL + expected: TIMEOUT [RTCRtpReceiver.getStats() contains only inbound-rtp and related stats] - expected: FAIL + expected: NOTRUN [RTCPeerConnection.getStats(track) throws InvalidAccessError when there are zero senders or receivers for the track] - expected: FAIL + expected: NOTRUN [RTCPeerConnection.getStats(track) throws InvalidAccessError when there are multiple senders for the track] - expected: FAIL + expected: NOTRUN [RTCPeerConnection.getStats(receivingTrack) is the same as RTCRtpReceiver.getStats()] disabled: if debug and not e10s and (os == "linux"): wpt-sync Bug 1453975 + expected: NOTRUN [Media stream stats references track stats] expected: FAIL + [RTCPeerConnection.getStats(sendingTrack) is the same as RTCRtpSender.getStats()] + expected: NOTRUN + diff --git a/testing/web-platform/meta/webrtc/simplecall.https.html.ini b/testing/web-platform/meta/webrtc/simplecall.https.html.ini new file mode 100644 index 000000000000..7a75314efe18 --- /dev/null +++ b/testing/web-platform/meta/webrtc/simplecall.https.html.ini @@ -0,0 +1,2 @@ +[simplecall.https.html] + max-asserts: 2 diff --git a/testing/web-platform/meta/webxr/xrSession_identity_referenceSpace.https.html.ini b/testing/web-platform/meta/webxr/xrSession_identity_referenceSpace.https.html.ini new file mode 100644 index 000000000000..94a48e74fe1d --- /dev/null +++ b/testing/web-platform/meta/webxr/xrSession_identity_referenceSpace.https.html.ini @@ -0,0 +1,7 @@ +[xrSession_identity_referenceSpace.https.html] + [Identity reference space provides correct poses for immersive sessions] + expected: FAIL + + [Identity reference space provides correct poses for inline sessions] + expected: FAIL + diff --git a/testing/web-platform/tests/.mailmap b/testing/web-platform/tests/.mailmap new file mode 100644 index 000000000000..5293948fc231 --- /dev/null +++ b/testing/web-platform/tests/.mailmap @@ -0,0 +1,9 @@ +# People who've changed name: + +# Sam Sneddon: +Sam Sneddon +Sam Sneddon + +# Theresa O'Connor: +Theresa O'Connor +Theresa O'Connor diff --git a/testing/web-platform/tests/CODEOWNERS b/testing/web-platform/tests/CODEOWNERS index e35f9232079a..fe7c29709473 100644 --- a/testing/web-platform/tests/CODEOWNERS +++ b/testing/web-platform/tests/CODEOWNERS @@ -1,2 +1,5 @@ -# Prevent accidentially touching CSS submodules -/css/tools/ @plinss @kojiishi @jgraham @gsnedders +# Prevent accidentially touching CSS subtree +/css/tools/apiclient/ @plinss @jgraham @gsnedders + +# Prevent accidentally touching tools/third_party +/tools/third_party/ @jgraham @gsnedders diff --git a/testing/web-platform/tests/animation-worklet/common.js b/testing/web-platform/tests/animation-worklet/common.js index eb114f246872..983c22403c44 100644 --- a/testing/web-platform/tests/animation-worklet/common.js +++ b/testing/web-platform/tests/animation-worklet/common.js @@ -30,3 +30,16 @@ function waitForAsyncAnimationFrames(count) { // AnimationWorklet. return waitForAnimationFrames(count + 1); } + +async function waitForAnimationFrameWithCondition(condition) { + do { + await new Promise(window.requestAnimationFrame); + } while (!condition()) +}; + +async function waitForDocumentTimelineAdvance() { + const timeAtStart = document.timeline.currentTime; + do { + await new Promise(window.requestAnimationFrame); + } while (timeAtStart === document.timeline.currentTime) +} diff --git a/testing/web-platform/tests/animation-worklet/playback-rate.https.html b/testing/web-platform/tests/animation-worklet/playback-rate.https.html new file mode 100644 index 000000000000..9c975814f1ed --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/playback-rate.https.html @@ -0,0 +1,140 @@ + + +The playback rate of a worklet animation + + + + + + + +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/animation-worklet/references/translated-box-ref.html b/testing/web-platform/tests/animation-worklet/references/translated-box-ref.html new file mode 100644 index 000000000000..c73f5a177bf7 --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/references/translated-box-ref.html @@ -0,0 +1,11 @@ + + + +
diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-after-duration-ref.html b/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-after-duration-ref.html new file mode 100644 index 000000000000..96acf1ad96c7 --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-after-duration-ref.html @@ -0,0 +1,12 @@ + +Reference for Animation Worklet local time set after duration + + +
diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-after-duration.https.html b/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-after-duration.https.html new file mode 100644 index 000000000000..adc90f1d3f6b --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-after-duration.https.html @@ -0,0 +1,41 @@ + +Animation Worklet local time set after duration + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-before-start-ref.html b/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-before-start-ref.html new file mode 100644 index 000000000000..cda4ca4132ca --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-before-start-ref.html @@ -0,0 +1,13 @@ + +Reference for Animation Worklet local time set before start + + +
diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-before-start.https.html b/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-before-start.https.html new file mode 100644 index 000000000000..addb16e7d175 --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-local-time-before-start.https.html @@ -0,0 +1,41 @@ + +Animation Worklet local time set before start + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-pause-immediately.https.html b/testing/web-platform/tests/animation-worklet/worklet-animation-pause-immediately.https.html new file mode 100644 index 000000000000..f9dcf30bc908 --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-pause-immediately.https.html @@ -0,0 +1,37 @@ + + +Verify that calling pause immediately after playing works as expected + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-pause-resume.https.html b/testing/web-platform/tests/animation-worklet/worklet-animation-pause-resume.https.html new file mode 100644 index 000000000000..f26a93468c07 --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-pause-resume.https.html @@ -0,0 +1,40 @@ + + +Verify that calling pause immediately after playing works as expected + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-pause.https.html b/testing/web-platform/tests/animation-worklet/worklet-animation-pause.https.html new file mode 100644 index 000000000000..417db9e37a61 --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-pause.https.html @@ -0,0 +1,60 @@ + +Verify that currentTime and playState are correct when animation is paused + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-set-keyframes-ref.html b/testing/web-platform/tests/animation-worklet/worklet-animation-set-keyframes-ref.html new file mode 100644 index 000000000000..26bf33fdb403 --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-set-keyframes-ref.html @@ -0,0 +1,12 @@ + +Reference for Worklet Animation sets keyframes + + +
\ No newline at end of file diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-set-keyframes.https.html b/testing/web-platform/tests/animation-worklet/worklet-animation-set-keyframes.https.html new file mode 100644 index 000000000000..017408494602 --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-set-keyframes.https.html @@ -0,0 +1,44 @@ + +Worklet Animation sets keyframes + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-set-timing-ref.html b/testing/web-platform/tests/animation-worklet/worklet-animation-set-timing-ref.html new file mode 100644 index 000000000000..8c354a8b06f8 --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-set-timing-ref.html @@ -0,0 +1,12 @@ + +Reference for Worklet Animation sets timing + + +
\ No newline at end of file diff --git a/testing/web-platform/tests/animation-worklet/worklet-animation-set-timing.https.html b/testing/web-platform/tests/animation-worklet/worklet-animation-set-timing.https.html new file mode 100644 index 000000000000..ac3f05f4234a --- /dev/null +++ b/testing/web-platform/tests/animation-worklet/worklet-animation-set-timing.https.html @@ -0,0 +1,46 @@ + +Worklet Animation sets timing + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/background-fetch/fetch.https.window.js b/testing/web-platform/tests/background-fetch/fetch.https.window.js index 35b5709d22b8..d4bc8bf12825 100644 --- a/testing/web-platform/tests/background-fetch/fetch.https.window.js +++ b/testing/web-platform/tests/background-fetch/fetch.https.window.js @@ -347,22 +347,9 @@ backgroundFetchTest(async (test, backgroundFetch) => { uniqueId(), ['resources/feature-name.txt', '/common/slow.py']); const record = await registration.match('resources/feature-name.txt'); - - await new Promise(resolve => { - const expectedResultText = 'Background Fetch'; - - registration.onprogress = async event => { - if (event.target.downloaded < expectedResultText.length) - return; - - const response = await record.responseReady; - - assert_true(response.url.includes('resources/feature-name.txt')); - const completedResponseText = await response.text(); - assert_equals(completedResponseText, expectedResultText); - - resolve(); - }; - }); + const response = await record.responseReady; + assert_true(response.url.includes('resources/feature-name.txt')); + const completedResponseText = await response.text(); + assert_equals(completedResponseText, 'Background Fetch'); }, 'Access to active fetches is supported.'); diff --git a/testing/web-platform/tests/background-fetch/idlharness.https.any.js b/testing/web-platform/tests/background-fetch/idlharness.https.any.js index f2c8a56590ae..f9744c8f944f 100644 --- a/testing/web-platform/tests/background-fetch/idlharness.https.any.js +++ b/testing/web-platform/tests/background-fetch/idlharness.https.any.js @@ -8,7 +8,7 @@ idl_test( ['background-fetch'], - ['service-workers', 'dedicated-workers', 'dom'], + ['service-workers', 'html', 'dom'], idl_array => { const isServiceWorker = location.pathname.includes('.serviceworker.'); if (isServiceWorker) { diff --git a/testing/web-platform/tests/clipboard-apis/async-navigator-clipboard-basics.https.html b/testing/web-platform/tests/clipboard-apis/async-navigator-clipboard-basics.https.html index ea0ca2902c5a..5a23598fb0bd 100644 --- a/testing/web-platform/tests/clipboard-apis/async-navigator-clipboard-basics.https.html +++ b/testing/web-platform/tests/clipboard-apis/async-navigator-clipboard-basics.https.html @@ -11,28 +11,27 @@ test(() => { assert_equals(navigator.clipboard, navigator.clipboard); }, "navigator.clipboard exists"); -/* clipboard.write() */ +/* clipboard.write(Blob/text) */ promise_test(async () => { - const dt = new DataTransfer(); - dt.items.add("Howdy", "text/plain"); - await navigator.clipboard.write(dt); -}, "navigator.clipboard.write(DataTransfer) succeeds"); + const blob = new Blob(["hello"], {type: 'text/plain'}); + await navigator.clipboard.write(blob); +}, "navigator.clipboard.write(Blob) succeeds"); promise_test(async t => { await promise_rejects(t, new TypeError(), navigator.clipboard.write()); -}, "navigator.clipboard.write() fails (expect DataTransfer)"); +}, "navigator.clipboard.write() fails (expect Blob)"); promise_test(async t => { await promise_rejects(t, new TypeError(), navigator.clipboard.write(null)); -}, "navigator.clipboard.write(null) fails (expect DataTransfer)"); +}, "navigator.clipboard.write(null) fails (expect Blob)"); promise_test(async t => { await promise_rejects(t, new TypeError(), navigator.clipboard.write("Bad string")); -}, "navigator.clipboard.write(DOMString) fails (expect DataTransfer)"); +}, "navigator.clipboard.write(DOMString) fails (expect Blob)"); /* clipboard.writeText() */ @@ -46,27 +45,28 @@ promise_test(async t => { navigator.clipboard.writeText()); }, "navigator.clipboard.writeText() fails (expect DOMString)"); -/* clipboard.writeImageExperimental() */ +/* clipboard.write(Blob/image) */ promise_test(async () => { const fetched = await fetch( 'http://localhost:8001/clipboard-apis/resources/greenbox.png'); const image = await fetched.blob(); - await navigator.clipboard.writeImageExperimental(image); + await navigator.clipboard.write(image); }, "navigator.clipboard.writeImageExperimental(Blob) succeeds"); promise_test(async t => { await promise_rejects(t, new TypeError(), - navigator.clipboard.writeImageExperimental()); + navigator.clipboard.write()); }, "navigator.clipboard.writeImageExperimental() fails (expect Blob)"); -/* clipboard.read() */ +/* Blob/text or Blob/image clipboard.read() */ promise_test(async () => { const result = await navigator.clipboard.read(); - assert_true(result instanceof DataTransfer); + assert_true(result instanceof Blob); + assert_equals(typeof result, "object"); }, "navigator.clipboard.read() succeeds"); @@ -77,11 +77,4 @@ promise_test(async () => { assert_equals(typeof result, "string"); }, "navigator.clipboard.readText() succeeds"); -/* clipboard.readImageExperimental() */ - -promise_test(async () => { - const result = await navigator.clipboard.readImageExperimental(); - assert_equals(typeof result, "object"); -}, "navigator.clipboard.readImageExperimental() succeeds"); - diff --git a/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-blobtext-manual.https.html b/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-blobtext-manual.https.html new file mode 100644 index 000000000000..f860bf23db2e --- /dev/null +++ b/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-blobtext-manual.https.html @@ -0,0 +1,27 @@ + + +Async Clipboard write (Blob/text) -> read (Blob/text) tests + + + +

+ Note: This is a manual test because it writes/reads to the shared system + clipboard and thus cannot be run async with other tests that might interact + with the clipboard. +

diff --git a/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-text-manual.https.html b/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-text-manual.https.html new file mode 100644 index 000000000000..685b6cb603dd --- /dev/null +++ b/testing/web-platform/tests/clipboard-apis/async-write-blobtext-read-text-manual.https.html @@ -0,0 +1,25 @@ + + +Async Clipboard write (Blob/text) -> readText tests + + + +

+ Note: This is a manual test because it writes/reads to the shared system + clipboard and thus cannot be run async with other tests that might interact + with the clipboard. +

diff --git a/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-dttext-manual.https.html b/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-dttext-manual.https.html deleted file mode 100644 index 2930b4716228..000000000000 --- a/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-dttext-manual.https.html +++ /dev/null @@ -1,25 +0,0 @@ - - -Async Clipboard write (dt/text) -> read (dt/text) tests - - - -Note: This is a manual test because it writes/reads to the shared system -clipboard and thus cannot be run async with other tests that might interact -with the clipboard. diff --git a/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-text-manual.https.html b/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-text-manual.https.html deleted file mode 100644 index 1b178696f17c..000000000000 --- a/testing/web-platform/tests/clipboard-apis/async-write-dttext-read-text-manual.https.html +++ /dev/null @@ -1,20 +0,0 @@ - - -Async Clipboard write (dt/text) -> readText tests - - - -Note: This is a manual test because it writes/reads to the shared system -clipboard and thus cannot be run async with other tests that might interact -with the clipboard. diff --git a/testing/web-platform/tests/clipboard-apis/async-write-image-read-image-manual.https.html b/testing/web-platform/tests/clipboard-apis/async-write-image-read-image-manual.https.html index 6117e469792f..ee90e7e89a89 100644 --- a/testing/web-platform/tests/clipboard-apis/async-write-image-read-image-manual.https.html +++ b/testing/web-platform/tests/clipboard-apis/async-write-image-read-image-manual.https.html @@ -39,8 +39,10 @@ async function loadBlob(fileName) { promise_test(async t => { const input = await loadBlob('resources/greenbox.png'); - await navigator.clipboard.writeImageExperimental(input); - const output = await navigator.clipboard.readImageExperimental(); + assert_equals(input.type, "image/png"); + await navigator.clipboard.write(input); + const output = await navigator.clipboard.read(); + assert_equals(output.type, "image/png"); document.getElementById('image-on-clipboard').src = window.URL.createObjectURL(output); diff --git a/testing/web-platform/tests/clipboard-apis/async-write-text-read-blobtext-manual.https.html b/testing/web-platform/tests/clipboard-apis/async-write-text-read-blobtext-manual.https.html new file mode 100644 index 000000000000..69f72db82c07 --- /dev/null +++ b/testing/web-platform/tests/clipboard-apis/async-write-text-read-blobtext-manual.https.html @@ -0,0 +1,25 @@ + + +Async Clipboard writeText -> read (Blob/text) tests + + + +

+ Note: This is a manual test because it writes/reads to the shared system + clipboard and thus cannot be run async with other tests that might interact + with the clipboard. +

diff --git a/testing/web-platform/tests/clipboard-apis/async-write-text-read-dttext-manual.https.html b/testing/web-platform/tests/clipboard-apis/async-write-text-read-dttext-manual.https.html deleted file mode 100644 index 9f524b93d719..000000000000 --- a/testing/web-platform/tests/clipboard-apis/async-write-text-read-dttext-manual.https.html +++ /dev/null @@ -1,23 +0,0 @@ - - -Async Clipboard writeText -> read (dt/text) tests - - - -Note: This is a manual test because it writes/reads to the shared system -clipboard and thus cannot be run async with other tests that might interact -with the clipboard. diff --git a/testing/web-platform/tests/clipboard-apis/async-write-text-read-text-manual.https.html b/testing/web-platform/tests/clipboard-apis/async-write-text-read-text-manual.https.html index 3a3922e626a1..496bdd78c7ab 100644 --- a/testing/web-platform/tests/clipboard-apis/async-write-text-read-text-manual.https.html +++ b/testing/web-platform/tests/clipboard-apis/async-write-text-read-text-manual.https.html @@ -4,15 +4,20 @@ -Note: This is a manual test because it writes/reads to the shared system -clipboard and thus cannot be run async with other tests that might interact -with the clipboard. +

+ Note: This is a manual test because it writes/reads to the shared system + clipboard and thus cannot be run async with other tests that might interact + with the clipboard. +

diff --git a/testing/web-platform/tests/css/CSS2/reference/filler-text-below-green.xht b/testing/web-platform/tests/css/CSS2/reference/filler-text-below-green.xht index d4aa114316a8..f9609b1d8ac9 100644 --- a/testing/web-platform/tests/css/CSS2/reference/filler-text-below-green.xht +++ b/testing/web-platform/tests/css/CSS2/reference/filler-text-below-green.xht @@ -2,7 +2,6 @@ Filler text below is green reference - diff --git a/testing/web-platform/tests/css/CSS2/reference/no-red-filler-text-ref.xht b/testing/web-platform/tests/css/CSS2/reference/no-red-filler-text-ref.xht index 25fcdae35efd..73c348f151af 100644 --- a/testing/web-platform/tests/css/CSS2/reference/no-red-filler-text-ref.xht +++ b/testing/web-platform/tests/css/CSS2/reference/no-red-filler-text-ref.xht @@ -2,7 +2,6 @@ No red visible, filler text, reference -

Test passes if there is no red visible on the page.

diff --git a/testing/web-platform/tests/css/CSS2/reference/no-red-on-blank-page-ref.xht b/testing/web-platform/tests/css/CSS2/reference/no-red-on-blank-page-ref.xht index 04606c197671..810e90fd42d7 100644 --- a/testing/web-platform/tests/css/CSS2/reference/no-red-on-blank-page-ref.xht +++ b/testing/web-platform/tests/css/CSS2/reference/no-red-on-blank-page-ref.xht @@ -2,7 +2,6 @@ No red visible, blank page, reference -

Test passes if there is no red visible on the page.

diff --git a/testing/web-platform/tests/css/CSS2/selectors/first-letter-punctuation-001-ref.xht b/testing/web-platform/tests/css/CSS2/selectors/first-letter-punctuation-001-ref.xht index ecb4970a3ce0..2bab5eb8f162 100644 --- a/testing/web-platform/tests/css/CSS2/selectors/first-letter-punctuation-001-ref.xht +++ b/testing/web-platform/tests/css/CSS2/selectors/first-letter-punctuation-001-ref.xht @@ -2,7 +2,6 @@ CSS Reference: Green 'right parenthesis' punctuation character - +

There should be two green rectangles below:

+
diff --git a/testing/web-platform/tests/css/css-backgrounds/reference/border-image-repeat-005-ref.html b/testing/web-platform/tests/css/css-backgrounds/reference/border-image-repeat-005-ref.html new file mode 100644 index 000000000000..0a372e088baa --- /dev/null +++ b/testing/web-platform/tests/css/css-backgrounds/reference/border-image-repeat-005-ref.html @@ -0,0 +1,15 @@ + +Reference: 'border-image-repeat' with 'space' and 'round' + +

There should be two green rectangles below:

+
+
+
+
diff --git a/testing/web-platform/tests/css/css-box/inheritance.html b/testing/web-platform/tests/css/css-box/inheritance.html new file mode 100644 index 000000000000..5047b8b1df07 --- /dev/null +++ b/testing/web-platform/tests/css/css-box/inheritance.html @@ -0,0 +1,29 @@ + + + + +Inheritance of CSS Box Model properties + + + + + + + + +
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-color/t31-color-text-a-ref.xht b/testing/web-platform/tests/css/css-color/t31-color-text-a-ref.xht index f11a57ffb3e8..95a0e03ac8a0 100644 --- a/testing/web-platform/tests/css/css-color/t31-color-text-a-ref.xht +++ b/testing/web-platform/tests/css/css-color/t31-color-text-a-ref.xht @@ -2,7 +2,6 @@ CSS Notref Black "should be green" - diff --git a/testing/web-platform/tests/css/css-flexbox/flex-grow-007.html b/testing/web-platform/tests/css/css-flexbox/flex-grow-007.html index da48135b9812..04a3041ed5c5 100644 --- a/testing/web-platform/tests/css/css-flexbox/flex-grow-007.html +++ b/testing/web-platform/tests/css/css-flexbox/flex-grow-007.html @@ -1,7 +1,6 @@ CSS Flexbox Test: flex-grow - less than one - diff --git a/testing/web-platform/tests/css/css-flexbox/flex-shrink-008.html b/testing/web-platform/tests/css/css-flexbox/flex-shrink-008.html index a01044899394..c93a3febdef6 100644 --- a/testing/web-platform/tests/css/css-flexbox/flex-shrink-008.html +++ b/testing/web-platform/tests/css/css-flexbox/flex-shrink-008.html @@ -1,7 +1,6 @@ CSS Flexbox Test: flex-shrink - less than one - diff --git a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy.tentative-ref.html b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative-ref.html similarity index 85% rename from testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy.tentative-ref.html rename to testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative-ref.html index 5b707e5b43ab..7928438702c9 100644 --- a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy.tentative-ref.html +++ b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative-ref.html @@ -1,5 +1,5 @@ -Test for font-display-late-swap feature policy +Test for font-display-late-swap feature policy behavior when set to reporting

Tests if font-display is set to optional for each option except for when it is set to fallback

diff --git a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy.tentative.html.headers b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.headers similarity index 100% rename from testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy.tentative.html.headers rename to testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-01.tentative.html.headers diff --git a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-02.tentative-ref.html b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-02.tentative-ref.html new file mode 100644 index 000000000000..7f6f56a93abb --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-02.tentative-ref.html @@ -0,0 +1,29 @@ + +Test for font-display-late-swap feature policy behavior when set to report-only + +

None of the font-display values should be changed

+ + + + + + + + + + + + + + + + + +
not-setautoblockswapfallbackoptional
aaaaaa
diff --git a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html new file mode 100644 index 000000000000..65f76b07846f --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html @@ -0,0 +1,46 @@ + + +Test for font-display-late-swap feature policy behavior when set to report-only + + + +

None of the font-display values should be changed

+ + + + + + + + + +
not-setautoblockswapfallbackoptional
+ + diff --git a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.headers b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.headers new file mode 100644 index 000000000000..e6c4898d5d3d --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-02.tentative.html.headers @@ -0,0 +1 @@ +Feature-Policy-Report-Only: font-display-late-swap 'none'; \ No newline at end of file diff --git a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html new file mode 100644 index 000000000000..ff3a7f197835 --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html @@ -0,0 +1,72 @@ + + + + Test for font-display-late-swap feature policy set to report-only + + + + + + +

+ Tests if the correct number of violation reports are generated and each report corresponds to this feature. + 4 reports should be created out of the 6 options below (reports for all except for 'fallback' and 'optional'). +

+ + + + + + + + + +
not-setautoblockswapfallbackoptional
+ + + \ No newline at end of file diff --git a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.headers b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.headers new file mode 100644 index 000000000000..e6c4898d5d3d --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-report-only.tentative.html.headers @@ -0,0 +1 @@ +Feature-Policy-Report-Only: font-display-late-swap 'none'; \ No newline at end of file diff --git a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html new file mode 100644 index 000000000000..6f6a51a28fda --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html @@ -0,0 +1,72 @@ + + + + Test for font-display-late-swap feature policy set to reporting + + + + + + +

+ Tests if the correct number of violation reports are generated and each report corresponds to this feature. + 4 reports should be created out of the 6 options below (reports for all except for 'fallback' and 'optional'). +

+ + + + + + + + + +
not-setautoblockswapfallbackoptional
+ + + \ No newline at end of file diff --git a/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.headers b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.headers new file mode 100644 index 000000000000..0c3e29db99f0 --- /dev/null +++ b/testing/web-platform/tests/css/css-fonts/font-display/font-display-feature-policy-reporting.tentative.html.headers @@ -0,0 +1 @@ +Feature-Policy: font-display-late-swap 'none'; \ No newline at end of file diff --git a/testing/web-platform/tests/css/css-fonts/support/fonts/makegsubfonts.py b/testing/web-platform/tests/css/css-fonts/support/fonts/makegsubfonts.py index 42b97bdd9b01..cd39e91d462c 100644 --- a/testing/web-platform/tests/css/css-fonts/support/fonts/makegsubfonts.py +++ b/testing/web-platform/tests/css/css-fonts/support/fonts/makegsubfonts.py @@ -1,3 +1,4 @@ +from __future__ import print_function import os import textwrap @@ -474,13 +475,13 @@ def makeJavascriptData(): # build fonts -print "Making lookup type 1 font..." +print("Making lookup type 1 font...") makeLookup1() -print "Making lookup type 3 font..." +print("Making lookup type 3 font...") makeLookup3() # output javascript data -print "Making javascript data file..." +print("Making javascript data file...") makeJavascriptData() diff --git a/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-001.html b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-001.html new file mode 100644 index 000000000000..f1b8567f34ea --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-001.html @@ -0,0 +1,18 @@ + + +CSS Grid Layout Test: Grid areas 'overflowing' the grid container size + + + + + + + +

The test passes if you see a grey square below without any scrollbar.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-002.html b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-002.html new file mode 100644 index 000000000000..dee656adcdcb --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-002.html @@ -0,0 +1,22 @@ + + +CSS Grid Layout Test: Grid areas 'overflowing' the grid container size + + + + + + + +

The test passes if you see a grey square below without any scrollbar.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-003.html b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-003.html new file mode 100644 index 000000000000..3d13eab22b8a --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-003.html @@ -0,0 +1,24 @@ + + +CSS Grid Layout Test: Grid areas 'overflowing' the grid container size + + + + + + + +

The test passes if you see a grey square below without any scrollbar.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-004.html b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-004.html new file mode 100644 index 000000000000..c4cd8b995dad --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-004.html @@ -0,0 +1,24 @@ + + +CSS Grid Layout Test: Grid areas 'overflowing' the grid container size + + + + + + + +

The test passes if you see a grey square below and only the horizontal scrollbar is visible.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-005.html b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-005.html new file mode 100644 index 000000000000..afbde5696020 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-005.html @@ -0,0 +1,24 @@ + + +CSS Grid Layout Test: Grid areas 'overflowing' the grid container size + + + + + + + +

The test passes if you see a grey square below and only the vertical scrollbar is visible.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-006.html b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-006.html new file mode 100644 index 000000000000..4c689acb6010 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-006.html @@ -0,0 +1,24 @@ + + +CSS Grid Layout Test: Grid areas 'overflowing' the grid container size + + + + + + + +

The test passes if you see a grey square below and both scrollbars are visible.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-007.html b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-007.html new file mode 100644 index 000000000000..96faa81db3d5 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-007.html @@ -0,0 +1,24 @@ + + +CSS Grid Layout Test: Grid areas 'overflowing' the grid container size + + + + + + + +

The test passes if you see a grey square below without any scrollbar.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-008.html b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-008.html new file mode 100644 index 000000000000..baab7ca34fc9 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/grid-areas-overflowing-grid-container-008.html @@ -0,0 +1,24 @@ + + +CSS Grid Layout Test: Grid areas 'overflowing' the grid container size + + + + + + + +

The test passes if you see a grey square below without any scrollbar.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box-with-horizontal-scrollbar.html b/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box-with-horizontal-scrollbar.html new file mode 100644 index 000000000000..8f73ef1207be --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box-with-horizontal-scrollbar.html @@ -0,0 +1,16 @@ + +Reference + + +

The test passes if you see a grey square below and only the horizontal scrollbar is visible.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box-with-scrollbars.html b/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box-with-scrollbars.html new file mode 100644 index 000000000000..e464ab879f4e --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box-with-scrollbars.html @@ -0,0 +1,16 @@ + +Reference + + +

The test passes if you see a grey square below and both scrollbars are visible.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box-with-vertical-scrollbar.html b/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box-with-vertical-scrollbar.html new file mode 100644 index 000000000000..26b4b6927e9b --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box-with-vertical-scrollbar.html @@ -0,0 +1,16 @@ + +Reference + + +

The test passes if you see a grey square below and only the vertical scrollbar is visible.

+
diff --git a/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box.html b/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box.html new file mode 100644 index 000000000000..0592f6d2ce58 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-model/reference/100x100-grey-box.html @@ -0,0 +1,12 @@ + +Reference + + +

The test passes if you see a grey square below without any scrollbar.

+
diff --git a/testing/web-platform/tests/css/css-multicol/multicol-span-all-under-clip-path-crash.html b/testing/web-platform/tests/css/css-multicol/multicol-span-all-under-clip-path-crash.html deleted file mode 100644 index d37a120b2e0c..000000000000 --- a/testing/web-platform/tests/css/css-multicol/multicol-span-all-under-clip-path-crash.html +++ /dev/null @@ -1,11 +0,0 @@ - -Should not crash on composited column-span:all under a clip-path - - - - -
-
-
column-span: all
-
-
diff --git a/testing/web-platform/tests/css/css-overscroll-behavior/META.yml b/testing/web-platform/tests/css/css-overscroll-behavior/META.yml index f15c86fd9069..97705c2df872 100644 --- a/testing/web-platform/tests/css/css-overscroll-behavior/META.yml +++ b/testing/web-platform/tests/css/css-overscroll-behavior/META.yml @@ -1,3 +1,4 @@ spec: https://drafts.csswg.org/css-overscroll-behavior/ suggested_reviewers: - majido + - theres-waldo diff --git a/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed.html b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed.html new file mode 100644 index 000000000000..af117f19f906 --- /dev/null +++ b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed.html @@ -0,0 +1,24 @@ + + + + +CSS Overscroll Behavior: getComputedValue().overscrollBehavior* + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-invalid.html b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-invalid.html new file mode 100644 index 000000000000..a29722f46570 --- /dev/null +++ b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-invalid.html @@ -0,0 +1,28 @@ + + + + +CSS Overscroll Behavior: parsing overscroll-behavior with invalid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid.html b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid.html new file mode 100644 index 000000000000..9dbd4fbb8f93 --- /dev/null +++ b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid.html @@ -0,0 +1,36 @@ + + + + +CSS Overscroll Behavior: parsing overscroll-behavior with valid values + + + + + + + + + + + diff --git a/testing/web-platform/tests/css/css-syntax/decimal-points-in-numbers.html b/testing/web-platform/tests/css/css-syntax/decimal-points-in-numbers.html new file mode 100644 index 000000000000..e59468678bee --- /dev/null +++ b/testing/web-platform/tests/css/css-syntax/decimal-points-in-numbers.html @@ -0,0 +1,56 @@ + +decimal points in numbers + + + + + + + + diff --git a/testing/web-platform/tests/css/css-syntax/urange-parsing.html b/testing/web-platform/tests/css/css-syntax/urange-parsing.html index 0a69faa39c1d..2d34e05a98ba 100644 --- a/testing/web-platform/tests/css/css-syntax/urange-parsing.html +++ b/testing/web-platform/tests/css/css-syntax/urange-parsing.html @@ -21,17 +21,17 @@ function testUrange(input, expected) { test(()=>{ const rule = document.styleSheets[0].cssRules[0]; - rule.style.unicodeRange = "U+1357"; - rule.style.unicodeRange = input; - assert_equals(rule.style.unicodeRange.toUpperCase(), expected.toUpperCase()); + rule.style.setProperty("unicode-range", "U+1357"); + rule.style.setProperty("unicode-range", input); + assert_equals(rule.style.getPropertyValue("unicode-range").toUpperCase(), expected.toUpperCase()); }, `"${input}" => "${expected}"`) } function testInvalidUrange(input) { test(()=>{ const rule = document.styleSheets[0].cssRules[0]; - rule.style.unicodeRange = "U+1357"; - rule.style.unicodeRange = input; - assert_equals(rule.style.unicodeRange.toUpperCase(), "U+1357"); + rule.style.setProperty("unicode-range", "U+1357"); + rule.style.setProperty("unicode-range", input); + assert_equals(rule.style.getPropertyValue("unicode-range").toUpperCase(), "U+1357"); }, `"${input}" is invalid`); } diff --git a/testing/web-platform/tests/css/css-syntax/url-whitespace-consumption.html b/testing/web-platform/tests/css/css-syntax/url-whitespace-consumption.html new file mode 100644 index 000000000000..2fd55873d9a3 --- /dev/null +++ b/testing/web-platform/tests/css/css-syntax/url-whitespace-consumption.html @@ -0,0 +1,32 @@ + +url whitespace consumption + + + + + + + + diff --git a/testing/web-platform/tests/css/css-transforms/individual-transform/individual-transform-1-ref.html b/testing/web-platform/tests/css/css-transforms/individual-transform/individual-transform-1-ref.html index 9271c77cb670..dbc5f05d8925 100644 --- a/testing/web-platform/tests/css/css-transforms/individual-transform/individual-transform-1-ref.html +++ b/testing/web-platform/tests/css/css-transforms/individual-transform/individual-transform-1-ref.html @@ -53,7 +53,7 @@ .rotate_2 { left: 450px; transform-origin: 50% 50%; - transform: rotate3d(0, 0, 1, 90deg); + transform: rotate3d(1, 0, 0, 45deg); } .row_3 { transform: perspective(500px); diff --git a/testing/web-platform/tests/css/css-transforms/individual-transform/individual-transform-1.html b/testing/web-platform/tests/css/css-transforms/individual-transform/individual-transform-1.html index 4f83e2eac47f..f21954e01dfc 100644 --- a/testing/web-platform/tests/css/css-transforms/individual-transform/individual-transform-1.html +++ b/testing/web-platform/tests/css/css-transforms/individual-transform/individual-transform-1.html @@ -6,7 +6,7 @@ - + + +

The number 7 should be visible in the scrolled window below.

+ +
+
+
+
+
7
+
+
+
+ + diff --git a/testing/web-platform/tests/css/cssom-view/long_scroll_composited.html b/testing/web-platform/tests/css/cssom-view/long_scroll_composited.html new file mode 100644 index 000000000000..aa91023c1ac4 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/long_scroll_composited.html @@ -0,0 +1,50 @@ + + +Long scrolling should work properly + + + + + + +

The number 7 should be visible in the scrolled window below.

+ +
+
+
+
0
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
+
+
+ + diff --git a/testing/web-platform/tests/css/filter-effects/backdrop-filter-border-radius-ref.html b/testing/web-platform/tests/css/filter-effects/backdrop-filter-border-radius-ref.html deleted file mode 100644 index e5712a23774b..000000000000 --- a/testing/web-platform/tests/css/filter-effects/backdrop-filter-border-radius-ref.html +++ /dev/null @@ -1,36 +0,0 @@ - - -backdrop-filter: Should clip using border radius. - - - - -
-
-
-
- - - diff --git a/testing/web-platform/tests/css/filter-effects/backdrop-filter-border-radius.html b/testing/web-platform/tests/css/filter-effects/backdrop-filter-border-radius.html deleted file mode 100644 index ec93de698aaa..000000000000 --- a/testing/web-platform/tests/css/filter-effects/backdrop-filter-border-radius.html +++ /dev/null @@ -1,32 +0,0 @@ - - -backdrop-filter: Should clip using border radius. - - - - -
-
- -
- - - diff --git a/testing/web-platform/tests/css/reference/pass_if_filler_text_slanted.xht b/testing/web-platform/tests/css/reference/pass_if_filler_text_slanted.xht index 3d1c7fd03479..bb2e25cdb57c 100644 --- a/testing/web-platform/tests/css/reference/pass_if_filler_text_slanted.xht +++ b/testing/web-platform/tests/css/reference/pass_if_filler_text_slanted.xht @@ -3,7 +3,6 @@ Reference rendering - pass if Filler Text slanted to one side - + + + + + +
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-007.html b/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-007.html new file mode 100644 index 000000000000..ea9179c32ca7 --- /dev/null +++ b/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-007.html @@ -0,0 +1,132 @@ + + + + + + + CSS Test: Testing how explicit main-size & cross-size constraints + influence sizing on non-stretched flex item w/ intrinsic ratio, + some padding, and box-sizing:border-box. + + + + + + + + + + + +
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-007v.html b/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-007v.html new file mode 100644 index 000000000000..2efb8b1c18fa --- /dev/null +++ b/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-007v.html @@ -0,0 +1,134 @@ + + + + + + + CSS Test: Testing how explicit main-size & cross-size constraints + influence sizing on non-stretched flex item w/ intrinsic ratio, + some padding, box-sizing:border-box, and a vertical writing-mode. + + + + + + + + + + + +
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/reftest.list b/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/reftest.list index 5bb3b650139c..850651a9f6ec 100644 --- a/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/reftest.list +++ b/testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/reftest.list @@ -146,6 +146,8 @@ == flexbox-intrinsic-ratio-005v.html flexbox-intrinsic-ratio-005-ref.html == flexbox-intrinsic-ratio-006.html flexbox-intrinsic-ratio-006-ref.html == flexbox-intrinsic-ratio-006v.html flexbox-intrinsic-ratio-006-ref.html +== flexbox-intrinsic-ratio-007.html flexbox-intrinsic-ratio-007-ref.html +== flexbox-intrinsic-ratio-007v.html flexbox-intrinsic-ratio-007-ref.html # Test for definite and indefinite sizes. == flexbox-definite-sizes-001.html flexbox-definite-sizes-001-ref.html diff --git a/testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html b/testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html index 8ee4aa486f63..ab373481204e 100644 --- a/testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html +++ b/testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html @@ -55,6 +55,42 @@ test(function() { '', '']); }, 'check XMLSerializer.serializeToString escapes attribute values for roundtripping'); +test(function() { + const root = (new Document()).createElement('root'); + root.setAttributeNS('uri1', 'p:foobar', 'value1'); + root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:p', 'uri2'); + const xmlString = (new XMLSerializer()).serializeToString(root); + assert_equals(xmlString, ''); +}, 'Check if attribute serialization takes into account of following xmlns:* attributes'); + +test(function() { + const input = ''; + const root = (new DOMParser()).parseFromString(input, 'text/xml').documentElement; + root.firstChild.setAttributeNS('uri2', 'p:foobar', 'v'); + const xmlString = (new XMLSerializer()).serializeToString(root); + assert_equals(xmlString, ''); +}, 'Check if attribute serialization takes into account of the same prefix declared in an ancestor element'); + +test(function() { + const input = ''; + const root = (new DOMParser()).parseFromString(input, 'text/xml').documentElement; + root.firstChild.setAttributeNS('uri1', 'attr1', 'value1'); + root.firstChild.setAttributeNS('uri2', 'attr2', 'value2'); + root.lastChild.setAttributeNS('uri3', 'attr3', 'value3'); + const xmlString = (new XMLSerializer()).serializeToString(root); + assert_equals(xmlString, ''); +}, 'Check if generated prefixes match to "ns${index}".'); + +test(function() { + const input = ''; + const root = (new DOMParser()).parseFromString(input, 'text/xml').documentElement; + root.firstChild.setAttributeNS('uri3', 'attr1', 'value1'); + const xmlString = (new XMLSerializer()).serializeToString(root); + // According to 'DOM Parsing and Serialization' draft as of 2018-12-11, + // 'generate a prefix' result can conflict with an existing xmlns:ns* declaration. + assert_equals(xmlString, ''); +}, 'Check if "ns1" is generated even if the element already has xmlns:ns1.'); + diff --git a/testing/web-platform/tests/domxpath/document.tentative.html b/testing/web-platform/tests/domxpath/document.tentative.html index b75c0f0d66da..5ec56f915b7c 100644 --- a/testing/web-platform/tests/domxpath/document.tentative.html +++ b/testing/web-platform/tests/domxpath/document.tentative.html @@ -27,5 +27,16 @@ test(function() { matched.push(cur); } assert_array_equals(matched, [document]); + // Evaluate again, but reuse result from previous evaluation. + result = document.evaluate("..", // expression + document.documentElement, // context node + null, // resolver + XPathResult.ANY_TYPE, // type + result); // result + matched = []; + while ((cur = result.iterateNext()) !== null) { + matched.push(cur); + } + assert_array_equals(matched, [document]); }); diff --git a/testing/web-platform/tests/element-timing/cross-origin-element.html b/testing/web-platform/tests/element-timing/cross-origin-element.sub.html similarity index 68% rename from testing/web-platform/tests/element-timing/cross-origin-element.html rename to testing/web-platform/tests/element-timing/cross-origin-element.sub.html index 1b899b00e3ab..ed820d0e6655 100644 --- a/testing/web-platform/tests/element-timing/cross-origin-element.html +++ b/testing/web-platform/tests/element-timing/cross-origin-element.sub.html @@ -16,17 +16,20 @@ // We add the image during onload to be sure that the observer is registered // in time for it to observe the element timing. // TODO(npm): change observer to use buffered flag. - window.onload = () => { + window.onload = t.step_func(() => { // Add a cross origin image resource. const img = document.createElement('img'); - img.src = - 'http://localhost:8000/resources/square100.png'; + img.src = 'http://{{domains[www]}}:{{ports[http][1]}}' + + '/element-timing/resources/square100.png'; + img.setAttribute('elementtiming', 'my_image'); + img.onload = t.step_func(() => { + t.step_timeout( () => { + // After some wait, assume observer did not receive the entry, so the test passes. + t.done(); + }, 100); + }); document.body.appendChild(img); - }; - t.step_timeout( () => { - // After some wait, assume observer did not receive the entry, so the test passes. - t.done(); - }, 100); + }); }, 'Cross-origin image element is NOT observable.'); diff --git a/testing/web-platform/tests/element-timing/cross-origin-iframe-element.html b/testing/web-platform/tests/element-timing/cross-origin-iframe-element.sub.html similarity index 71% rename from testing/web-platform/tests/element-timing/cross-origin-iframe-element.html rename to testing/web-platform/tests/element-timing/cross-origin-iframe-element.sub.html index 7f73881cc972..a369d25bd43c 100644 --- a/testing/web-platform/tests/element-timing/cross-origin-iframe-element.html +++ b/testing/web-platform/tests/element-timing/cross-origin-iframe-element.sub.html @@ -16,17 +16,19 @@ // We add the iframe during onload to be sure that the observer is registered // in time for it to observe the element timing. // TODO(npm): change observer to use buffered flag. - window.onload = () => { + window.onload = t.step_func(() => { // Add a cross origin iframe with an image. const iframe = document.createElement('iframe'); - iframe.src = - 'http://localhost:8000/performance-timing/element-resources/iframe-with-square.html'; + iframe.src = 'http://{{domains[www]}}:{{ports[http][1]}}' + + '/element-timing/resources/iframe-with-square.html'; document.body.appendChild(iframe); - }; - t.step_timeout( () => { - // After some wait, assume observer did not receive the entry, so the test passes. - t.done(); - }, 300); + iframe.onload = t.step_func(() => { + t.step_timeout( () => { + // After some wait, assume observer did not receive the entry, so the test passes. + t.done(); + }, 100); + }); + }); }, 'Element from cross origin iframe is NOT observable.'); diff --git a/testing/web-platform/tests/element-timing/image-TAO-wildcard.sub.html b/testing/web-platform/tests/element-timing/image-TAO-wildcard.sub.html new file mode 100644 index 000000000000..6d5abe21c3c3 --- /dev/null +++ b/testing/web-platform/tests/element-timing/image-TAO-wildcard.sub.html @@ -0,0 +1,47 @@ + + +Element Timing: observe elements from same-origin iframes + + + + + + + + diff --git a/testing/web-platform/tests/element-timing/observe-child-element.html b/testing/web-platform/tests/element-timing/observe-child-element.html index 5bb8290893a7..83cc2ef94b3f 100644 --- a/testing/web-platform/tests/element-timing/observe-child-element.html +++ b/testing/web-platform/tests/element-timing/observe-child-element.html @@ -11,15 +11,10 @@ body { diff --git a/testing/web-platform/tests/element-timing/resources/TAOImage.py b/testing/web-platform/tests/element-timing/resources/TAOImage.py new file mode 100644 index 000000000000..5d042c48941d --- /dev/null +++ b/testing/web-platform/tests/element-timing/resources/TAOImage.py @@ -0,0 +1,45 @@ +import os + +def main(request, response): + origin = request.GET.first('origin', ''); + if origin: + response.headers.set('Access-Control-Allow-Origin', origin) + + tao = request.GET.first('tao') + + if tao == 'wildcard': + # wildcard, pass + response.headers.set('Timing-Allow-Origin', '*') + elif tao == 'null': + # null, fail + response.headers.set('Timing-Allow-Origin', 'null') + elif tao == 'origin': + # case-sensitive match for origin, pass + response.headers.set('Timing-Allow-Origin', origin) + elif tao == 'space': + # space separated list of origin and wildcard, fail + response.headers.set('Timing-Allow-Origin', (origin + ' *')) + elif tao == 'multi': + # more than one TAO values, separated by comma, pass + response.headers.set('Timing-Allow-Origin', origin) + response.headers.append('Timing-Allow-Origin', '*') + elif tao == 'multi_wildcard': + # multiple wildcards, separated by comma, pass + response.headers.set('Timing-Allow-Origin', '*') + response.headers.append('Timing-Allow-Origin', '*') + elif tao == 'match_origin': + # contains a match of origin, separated by comma, pass + response.headers.set('Timing-Allow-Origin', origin) + response.headers.append('Timing-Allow-Origin', "fake") + elif tao == 'match_wildcard': + # contains a wildcard, separated by comma, pass + response.headers.set('Timing-Allow-Origin', "fake") + response.headers.append('Timing-Allow-Origin', '*') + elif tao == 'uppercase': + # non-case-sensitive match for origin, fail + response.headers.set('Timing-Allow-Origin', origin.upper()) + else: + pass + response.headers.set("Cache-Control", "no-cache, must-revalidate"); + image_path = os.path.join(os.path.dirname(__file__), "square20.png"); + response.content = open(image_path, mode='rb').read(); diff --git a/testing/web-platform/tests/feature-policy/reporting/serial-report-only.https.html b/testing/web-platform/tests/feature-policy/reporting/serial-report-only.https.html new file mode 100644 index 000000000000..11913a2ef771 --- /dev/null +++ b/testing/web-platform/tests/feature-policy/reporting/serial-report-only.https.html @@ -0,0 +1,46 @@ + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/feature-policy/reporting/serial-report-only.https.html.headers b/testing/web-platform/tests/feature-policy/reporting/serial-report-only.https.html.headers new file mode 100644 index 000000000000..d408ccf6b156 --- /dev/null +++ b/testing/web-platform/tests/feature-policy/reporting/serial-report-only.https.html.headers @@ -0,0 +1 @@ +Feature-Policy-Report-Only: serial 'none' diff --git a/testing/web-platform/tests/feature-policy/reporting/serial-reporting.https.html b/testing/web-platform/tests/feature-policy/reporting/serial-reporting.https.html new file mode 100644 index 000000000000..827bc89367c5 --- /dev/null +++ b/testing/web-platform/tests/feature-policy/reporting/serial-reporting.https.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + diff --git a/testing/web-platform/tests/feature-policy/reporting/serial-reporting.https.html.headers b/testing/web-platform/tests/feature-policy/reporting/serial-reporting.https.html.headers new file mode 100644 index 000000000000..be3e6afd423f --- /dev/null +++ b/testing/web-platform/tests/feature-policy/reporting/serial-reporting.https.html.headers @@ -0,0 +1 @@ +Feature-Policy: serial 'none' diff --git a/testing/web-platform/tests/feature-policy/resources/feature-policy-serial-worker.html b/testing/web-platform/tests/feature-policy/resources/feature-policy-serial-worker.html new file mode 100644 index 000000000000..9e6a7d02ba2b --- /dev/null +++ b/testing/web-platform/tests/feature-policy/resources/feature-policy-serial-worker.html @@ -0,0 +1,10 @@ + diff --git a/testing/web-platform/tests/feature-policy/resources/feature-policy-serial-worker.js b/testing/web-platform/tests/feature-policy/resources/feature-policy-serial-worker.js new file mode 100644 index 000000000000..2e8e6f5433a5 --- /dev/null +++ b/testing/web-platform/tests/feature-policy/resources/feature-policy-serial-worker.js @@ -0,0 +1,14 @@ +'use strict'; + +// Dedicated worker +if (typeof postMessage === 'function') { + onmessage = event => { + switch(event.data.type) { + case 'ready': + navigator.serial.getPorts().then( + () => postMessage({ enabled: true }), + error => postMessage ({ enabled: false })); + break; + } + }; +} diff --git a/testing/web-platform/tests/feature-policy/resources/feature-policy-serial.html b/testing/web-platform/tests/feature-policy/resources/feature-policy-serial.html new file mode 100644 index 000000000000..caf716d37ac5 --- /dev/null +++ b/testing/web-platform/tests/feature-policy/resources/feature-policy-serial.html @@ -0,0 +1,9 @@ + diff --git a/testing/web-platform/tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html b/testing/web-platform/tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html deleted file mode 100644 index fe7a73407792..000000000000 --- a/testing/web-platform/tests/html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_null.tentative.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - diff --git a/testing/web-platform/tests/html/browsers/the-window-object/window-open-noopener.html b/testing/web-platform/tests/html/browsers/the-window-object/window-open-noopener.html index 525605375374..cdda6335861e 100644 --- a/testing/web-platform/tests/html/browsers/the-window-object/window-open-noopener.html +++ b/testing/web-platform/tests/html/browsers/the-window-object/window-open-noopener.html @@ -15,13 +15,13 @@ var testData = [ { testDescription: "window.open() with 'noopener' should not reuse existing target", secondWindowFeatureString: "noopener", shouldReuse: false }, - { testDescription: "noopener needs to be present as a token on its own", + { testDescription: "noopener=1 means the same as noopener", secondWindowFeatureString: "noopener=1", - shouldReuse: true }, - { testDescription: "noopener needs to be present as a token on its own again", + shouldReuse: false }, + { testDescription: "noopener=0 means lack of noopener", secondWindowFeatureString: "noopener=0", shouldReuse: true }, - { testDescription: "noopener needs to be present as a token on its own yet again", + { testDescription: "noopener needs to be present as a token on its own", secondWindowFeatureString: "make me noopener", shouldReuse: true }, { testDescription: "Trailing noopener should work", diff --git a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html index c3d550a39b3f..d596f3771683 100644 --- a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html +++ b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html @@ -1,5 +1,6 @@ + diff --git a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html index 3ad228b0b271..a5c131e2bece 100644 --- a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html +++ b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html @@ -1,5 +1,6 @@ + diff --git a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/navigation.sub.html b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/navigation.sub.html index 80cf75104fc8..bca61372b4c8 100644 --- a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/navigation.sub.html +++ b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/navigation.sub.html @@ -1,5 +1,6 @@ + diff --git a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js index cf175eb4d3ae..77f8fff5b570 100644 --- a/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js +++ b/testing/web-platform/tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js @@ -26,6 +26,29 @@ onload = function() { return 'expected substring '+expected+' got '+got; } + function poll_for_stash(test_obj, uuid, expected) { + var start = new Date(); + var poll = test_obj.step_func(function () { + var xhr = new XMLHttpRequest(); + xhr.open('GET', stash_take + uuid); + xhr.onload = test_obj.step_func(function(e) { + if (xhr.response == "") { + if (new Date() - start > 10000) { + // If we set the status to TIMEOUT here we avoid a race between the + // page and the test timing out + test_obj.force_timeout(); + } + test_obj.step_timeout(poll, 200); + } else { + assert_equals(xhr.response, expected); + test_obj.done(); + } + }); + xhr.send(); + }) + test_obj.step_timeout(poll, 200); + } + // loading html (or actually svg to support ) function test_load_nested_browsing_context(tag, attr, spec_url) { async_test(function() { diff --git a/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-error-events.html b/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-error-events.html deleted file mode 100644 index ea7e496ae8ea..000000000000 --- a/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-error-events.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events.html b/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events.html deleted file mode 100644 index 24cd5ba70118..000000000000 --- a/testing/web-platform/tests/html/semantics/document-metadata/the-link-element/link-multiple-load-events.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html index 2cb85700230c..b657f26158a9 100644 --- a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html @@ -8,13 +8,20 @@ async_test(function(t) { var iframe = document.createElement("iframe"); document.body.appendChild(iframe); - iframe.onload = t.step_func(function() { - assert_true(iframe.contentDocument.location.toString().includes("support/blank.htm")); - t.done(); + var checkedDuringParse = false; + iframe.onload = t.step_func_done(function() { + testContentDocument(); + assert_true(checkedDuringParse); + }); + + let url = "support/iframe-that-checks-contentDocument.html"; + window.testContentDocument = t.step_func(function() { + assert_true(iframe.contentDocument.location.toString().includes(url)); + checkedDuringParse = true; }); assert_equals(iframe.contentDocument.location.toString(), "about:blank"); - iframe.src = "support/blank.htm?pipe=trickle(d2)"; + iframe.src = url + "?pipe=trickle(d2)"; // The location of the contentDocument should not change until the new document has matured. assert_equals(iframe.contentDocument.location.toString(), "about:blank"); }, "contentDocument should only change after a load matures."); diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html new file mode 100644 index 000000000000..bc35a977e8b2 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-checks-contentDocument.html @@ -0,0 +1,3 @@ + diff --git a/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_iplicit_noopener.html b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_implicit_noopener.html similarity index 100% rename from testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_iplicit_noopener.html rename to testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/support/target_blank_implicit_noopener.html diff --git a/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.tentative.html b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html similarity index 56% rename from testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.tentative.html rename to testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html index 39903dcd520c..32bf32c30418 100644 --- a/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.tentative.html +++ b/testing/web-platform/tests/html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html @@ -2,31 +2,34 @@ - Test behavior of rel="noopener" links + Test behavior of target=_blank links -
Click me - Click me - Click me - Click me - Click me + Click me + Click me + Click me + Click me + Click me + Click me + Click me + Click me - + - + - + - + - + + + + + + Click me + Click me + Click me + Click me + Click me + Click me + Click me + Click me + + + + + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/Function.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/Function.js index bc88bf7bd637..447e5060b14b 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/Function.js +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/Function.js @@ -1 +1,2 @@ +// import()s in a dynamically created function are resolved relative to the script. Function(`import('../../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`)(); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/eval.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/eval.js index a8bcffe9f811..100602733a8c 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/eval.js +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/eval.js @@ -1 +1,2 @@ +// import()s in eval are resolved relative to the script. eval(`import('../../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/inline-event-handlers-UA-code.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/inline-event-handlers-UA-code.js index c0bd8655873e..eaf98f3807fe 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/inline-event-handlers-UA-code.js +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/inline-event-handlers-UA-code.js @@ -1,2 +1,3 @@ -window.dummyDiv.setAttribute("onclick", `import('../../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`); +// import()s in an event handler are resolved relative to the document base. +window.dummyDiv.setAttribute("onclick", `import('../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`); window.dummyDiv.click(); // different from **on**click() diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/reflected-inline-event-handlers.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/reflected-inline-event-handlers.js index f19ec2b03f9f..402219d0b4c2 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/reflected-inline-event-handlers.js +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/reflected-inline-event-handlers.js @@ -1,2 +1,3 @@ -window.dummyDiv.setAttribute("onclick", `import('../../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`); +// import()s in an event handler are resolved relative to the document base. +window.dummyDiv.setAttribute("onclick", `import('../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`); window.dummyDiv.onclick(); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/setTimeout.js b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/setTimeout.js index c6f2dda55aaa..342b342e8efd 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/setTimeout.js +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/scripts/setTimeout.js @@ -1 +1,2 @@ +// import()s in a timeout handler are resolved relative to the script. setTimeout(`import('../../imports-a.js?label=' + window.label).then(window.continueTest, window.errorTest)`, 0); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html index 33714c70ca60..0efcab658ee1 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-classic.html @@ -37,7 +37,7 @@ function assertSuccessful(module) { promise_test(t => { const promise = createTestPromise(t); - setTimeout(`import('../imports-a.js?label=setTimeout').then(window.unreached, window.continueTest)`, 0); + setTimeout(`import('../imports-a.js?label=setTimeout').then(window.continueTest, window.errorTest)`, 0); return promise.then(assertSuccessful); }, "setTimeout must inherit the nonce from the triggering script, thus execute"); @@ -81,8 +81,8 @@ promise_test(t => { ); dummyDiv.onclick(); - return promise.then(assertSuccessful); -}, "reflected inline event handlers must inherit the nonce from the triggering script, thus execute"); + return promise_rejects(t, new TypeError(), promise); +}, "reflected inline event handlers must not inherit the nonce from the triggering script, thus fail"); promise_test(t => { t.add_cleanup(() => { @@ -99,6 +99,6 @@ promise_test(t => { assert_equals(typeof dummyDiv.onclick, "function", "the browser must be able to parse a string containing the import() syntax into a function"); dummyDiv.click(); // different from **on**click() - return promise.then(assertSuccessful); -}, "inline event handlers triggered via UA code must inherit the nonce from the triggering script, thus execute"); + return promise_rejects(t, new TypeError(), promise); +}, "inline event handlers triggered via UA code must not inherit the nonce from the triggering script, thus fail"); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html index 9411acd2a07b..50d7b30570e4 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-nonce-module.html @@ -36,7 +36,7 @@ function assertSuccessful(module) { promise_test(t => { const promise = createTestPromise(t); - setTimeout(`import('../imports-a.js?label=setTimeout').then(window.unreached, window.continueTest)`, 0); + setTimeout(`import('../imports-a.js?label=setTimeout').then(window.continueTest, window.errorTest)`, 0); return promise.then(assertSuccessful); }, "setTimeout must inherit the nonce from the triggering script, thus execute"); @@ -80,8 +80,8 @@ promise_test(t => { ); dummyDiv.onclick(); - return promise.then(assertSuccessful); -}, "reflected inline event handlers must inherit the nonce from the triggering script, thus execute"); + return promise_rejects(t, new TypeError(), promise); +}, "reflected inline event handlers must not inherit the nonce from the triggering script, thus fail"); promise_test(t => { t.add_cleanup(() => { @@ -98,6 +98,6 @@ promise_test(t => { assert_equals(typeof dummyDiv.onclick, 'function', "the browser must be able to parse a string containing the import() syntax into a function"); dummyDiv.click(); // different from **on**click() - return promise.then(assertSuccessful); -}, "inline event handlers triggered via UA code must inherit the nonce from the triggering script, thus execute"); + return promise_rejects(t, new TypeError(), promise); +}, "inline event handlers triggered via UA code must not inherit the nonce from the triggering script, thus fail"); diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html index a9c052821616..3b1d98f6b11e 100644 --- a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-other-document.html @@ -26,14 +26,6 @@ function startTest() { "the Function constructor"(x) { otherWindow.Function(x)(); }, - "reflected inline event handlers"(x) { - otherDiv.setAttribute("onclick", x); - otherDiv.onclick(); - }, - "inline event handlers triggered by JS"(x) { - otherDiv.setAttribute("onclick", x); - otherDiv.click(); // different from .**on**click() - } }; for (const [label, evaluator] of Object.entries(evaluators)) { @@ -53,6 +45,35 @@ function startTest() { }); }, label + " should successfully import"); }; + + const eventHandlerEvaluators = { + "reflected inline event handlers"(x) { + otherDiv.setAttribute("onclick", x); + otherDiv.onclick(); + }, + "inline event handlers triggered by JS"(x) { + otherDiv.setAttribute("onclick", x); + otherDiv.click(); // different from .**on**click() + } + }; + + for (const [label, evaluator] of Object.entries(eventHandlerEvaluators)) { + promise_test(t => { + t.add_cleanup(() => { + otherDiv.removeAttribute("onclick"); + delete otherWindow.evaluated_imports_a; + }); + + const promise = createTestPromise(); + + evaluator(`import('../../imports-a.js?label=${label}').then(window.continueTest, window.errorTest);`); + + return promise.then(module => { + assert_true(otherWindow.evaluated_imports_a, "The module must have been evaluated"); + assert_equals(module.A.from, "imports-a.js", "The module namespace object must be correct"); + }); + }, label + " should successfully import"); + }; } diff --git a/testing/web-platform/tests/html/semantics/text-level-semantics/historical.html b/testing/web-platform/tests/html/semantics/text-level-semantics/historical.html index 9de09fe5b389..7fe83a95ed04 100644 --- a/testing/web-platform/tests/html/semantics/text-level-semantics/historical.html +++ b/testing/web-platform/tests/html/semantics/text-level-semantics/historical.html @@ -26,7 +26,4 @@ t('datetime', 'time'); // removed in https://github.com/whatwg/html/commit/66fcb2357f205448fe2f40d7834a1e8ea2ed283b t('media', ['a', 'area']); - -// renamed to noreferrer in https://github.com/whatwg/html/commit/6a34274e99593e767ae99744a6c38a19489915c6 -t('noreferer', ['link', 'a', 'area']); diff --git a/testing/web-platform/tests/interfaces/cssom.idl b/testing/web-platform/tests/interfaces/cssom.idl index 7d9536d943f8..a914ac0d78c6 100644 --- a/testing/web-platform/tests/interfaces/cssom.idl +++ b/testing/web-platform/tests/interfaces/cssom.idl @@ -1,10 +1,17 @@ +// GENERATED PREAMBLE - DO NOT EDIT +// This preamble was added by reffy-reports for web-platform-tests. +// CSSOMString is an implementation-defined type of either DOMString or +// USVString in CSSOM: https://drafts.csswg.org/cssom/#cssomstring-type +// For web-platform-tests, use DOMString because USVString has additional +// requirements in type conversion and could result in spurious failures for +// implementations that use DOMString. +typedef DOMString CSSOMString; + // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into reffy-reports // (https://github.com/tidoust/reffy-reports) // Source: CSS Object Model (CSSOM) (https://drafts.csswg.org/cssom/) -typedef USVString CSSOMString; - [Exposed=Window] interface MediaList { stringifier attribute [TreatNullAs=EmptyString] CSSOMString mediaText; @@ -19,7 +26,7 @@ interface StyleSheet { readonly attribute CSSOMString type; readonly attribute USVString? href; readonly attribute (Element or ProcessingInstruction)? ownerNode; - readonly attribute StyleSheet? parentStyleSheet; + readonly attribute CSSStyleSheet? parentStyleSheet; readonly attribute DOMString? title; [SameObject, PutForwards=mediaText] readonly attribute MediaList media; attribute boolean disabled; @@ -35,16 +42,16 @@ interface CSSStyleSheet : StyleSheet { [Exposed=Window] interface StyleSheetList { - getter StyleSheet? item(unsigned long index); + getter CSSStyleSheet? item(unsigned long index); readonly attribute unsigned long length; }; -partial interface Document { +partial interface mixin DocumentOrShadowRoot { [SameObject] readonly attribute StyleSheetList styleSheets; }; interface mixin LinkStyle { - readonly attribute StyleSheet? sheet; + readonly attribute CSSStyleSheet? sheet; }; ProcessingInstruction includes LinkStyle; diff --git a/testing/web-platform/tests/interfaces/webxr.idl b/testing/web-platform/tests/interfaces/webxr.idl index b1ed0f907271..2bc100e100d8 100644 --- a/testing/web-platform/tests/interfaces/webxr.idl +++ b/testing/web-platform/tests/interfaces/webxr.idl @@ -3,6 +3,10 @@ // (https://github.com/tidoust/reffy-reports) // Source: WebXR Device API (https://immersive-web.github.io/webxr/) +partial interface Navigator { + [SecureContext, SameObject] readonly attribute XR xr; +}; + [SecureContext, Exposed=Window] interface XR : EventTarget { // Methods Promise supportsSessionMode(XRSessionMode mode); @@ -12,11 +16,6 @@ attribute EventHandler ondevicechange; }; -[SecureContext] -partial interface Navigator { - [SameObject] readonly attribute XR xr; -}; - enum XREnvironmentBlendMode { "opaque", "additive", diff --git a/testing/web-platform/tests/lifecycle/child-display-none.tentative.html b/testing/web-platform/tests/lifecycle/child-display-none.tentative.html new file mode 100644 index 000000000000..f76b4e7b608d --- /dev/null +++ b/testing/web-platform/tests/lifecycle/child-display-none.tentative.html @@ -0,0 +1,35 @@ + + +Child frame marked as frozen + + + + + diff --git a/testing/web-platform/tests/lifecycle/resources/subframe.html b/testing/web-platform/tests/lifecycle/resources/subframe.html new file mode 100644 index 000000000000..2f1d70a80a79 --- /dev/null +++ b/testing/web-platform/tests/lifecycle/resources/subframe.html @@ -0,0 +1,16 @@ + + + diff --git a/testing/web-platform/tests/lint.whitelist b/testing/web-platform/tests/lint.whitelist index 765256d05caf..64ff0296a46f 100644 --- a/testing/web-platform/tests/lint.whitelist +++ b/testing/web-platform/tests/lint.whitelist @@ -294,7 +294,8 @@ GENERATE_TESTS: shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/w SET TIMEOUT: css/css-fonts/font-display/font-display.html SET TIMEOUT: css/css-fonts/font-display/font-display-change.html SET TIMEOUT: css/css-fonts/font-display/font-display-change-ref.html -SET TIMEOUT: css/css-fonts/font-display/font-display-feature-policy.tentative.html +SET TIMEOUT: css/css-fonts/font-display/font-display-feature-policy-01.tentative.html +SET TIMEOUT: css/css-fonts/font-display/font-display-feature-policy-02.tentative.html SET TIMEOUT: css/css-fonts/font-display/font-display-preload.html SET TIMEOUT: html/browsers/windows/auxiliary-browsing-contexts/resources/close-opener.html SET TIMEOUT: html/dom/documents/dom-tree-accessors/Document.currentScript.html diff --git a/testing/web-platform/tests/longtask-timing/supported-longtask-types.any.js b/testing/web-platform/tests/longtask-timing/supported-longtask-types.window.js similarity index 100% rename from testing/web-platform/tests/longtask-timing/supported-longtask-types.any.js rename to testing/web-platform/tests/longtask-timing/supported-longtask-types.window.js diff --git a/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-1.html b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-1.html index fc650eb4c4a6..848eb5b144ce 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-1.html +++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-1.html @@ -79,51 +79,51 @@ +

− - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-1.html b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-1.html index a047a30873c7..543017e19006 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-1.html +++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-1.html @@ -133,11 +133,12 @@ +

- + - + @@ -146,20 +147,20 @@

+ height=".5em" depth=".5em" style="background: green"/> - +


- + - +

@@ -167,20 +168,20 @@

+ height=".5em" depth=".5em" style="background: green"/> - +


- + - +

@@ -188,9 +189,9 @@

+ height=".5em" depth=".5em" style="background: green"/> - + @@ -199,9 +200,9 @@

+ depth="1em" style="background: green"/> - + @@ -210,9 +211,9 @@

+ height=".5em" depth=".5em" style="background: green"/> - + @@ -221,9 +222,9 @@

+ depth="1em" style="background: green"/> - + @@ -232,11 +233,10 @@

- - + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-2.html b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-2.html index 544511388685..75074875c9e6 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-2.html +++ b/testing/web-platform/tests/mathml/presentation-markup/fractions/frac-parameters-2.html @@ -102,11 +102,12 @@ +

- + - + @@ -114,20 +115,20 @@


- + - +


- + - +

@@ -135,8 +136,8 @@

- - + +

@@ -144,17 +145,17 @@

- - + +


- + - + @@ -162,13 +163,12 @@


- + - +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/operators/mo-axis-height-1.html b/testing/web-platform/tests/mathml/presentation-markup/operators/mo-axis-height-1.html index 327a72e30b53..7b0031ac1ed6 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/operators/mo-axis-height-1.html +++ b/testing/web-platform/tests/mathml/presentation-markup/operators/mo-axis-height-1.html @@ -55,23 +55,23 @@ +

- - - - + + + + - - - - + + + + -

diff --git a/testing/web-platform/tests/mathml/presentation-markup/radicals/root-parameters-1.html b/testing/web-platform/tests/mathml/presentation-markup/radicals/root-parameters-1.html index 67a461381342..8ffcbe4a22d1 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/radicals/root-parameters-1.html +++ b/testing/web-platform/tests/mathml/presentation-markup/radicals/root-parameters-1.html @@ -129,12 +129,13 @@ +

- + - - + +

@@ -142,24 +143,24 @@

- - + + - - - + + +


- - + + - - - + + +

@@ -167,43 +168,42 @@

- - + +


- + - +


- - + + - - - + + +

- - + + - - - + + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-1.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-1.html index 2ff14a694c99..39768315e72d 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-1.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-1.html @@ -81,24 +81,24 @@ +

- - - - + + + + - - - + + + - - - - + + + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-2.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-2.html index abef28d12df6..26fa5de780b0 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-2.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-2.html @@ -120,44 +120,44 @@ +

- - - - + + + + - - + + - + - - - - + + + + - - + + - + - - + + - + - - + + - - + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-3.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-3.html index c49718979c30..231f65ab4f46 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-3.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-3.html @@ -107,74 +107,74 @@ +

- - - + + + - - + + - - - - + + + + - - + + - - - - - - + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-4.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-4.html index 2acc7746c4fb..c4bf4382f8ed 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-4.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-4.html @@ -51,74 +51,74 @@ +

- + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-5.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-5.html index 19b6eee66747..005ceea40199 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-5.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-5.html @@ -59,32 +59,32 @@ +

- + - - + + - - + + - - - + + + - - - + + + - - + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-1.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-1.html index 9bc6bcbf277c..b0ebaceb4355 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-1.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-1.html @@ -143,63 +143,64 @@ +

- - + + - + - - + + - + - + - + - + - + - + - + - + - +


- + - - + + - - - + + + - + - + - + - +

@@ -207,24 +208,24 @@

- + - - + + - - - + + + - + - + - + - + @@ -232,21 +233,21 @@


- + - - + + - - - + + + - - + + - + @@ -255,34 +256,34 @@

- - - + + + - + - - + +


- + - - - + + + - + - - + +

@@ -290,11 +291,11 @@

+ width="1em" style="background: green"/> - + + width="1em" style="background: red"/>

@@ -302,11 +303,11 @@

+ width="1em" style="background: green"/> - + + width="1em" style="background: red"/>

@@ -314,9 +315,9 @@

- + + width="1em" style="background: red"/>

@@ -324,12 +325,11 @@

- + + width="1em" style="background: red"/>

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-2.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-2.html index eaa4f0ffab15..5ba66b86c3da 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-2.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/subsup-parameters-2.html @@ -69,30 +69,30 @@ ⫿ - + ⫿ - + ⫿ - - + + ⫿ - - + + - - + +

@@ -101,30 +101,30 @@ ⫿ - + ⫿ - + ⫿ - - + + ⫿ - - + + - - + +

diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-1.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-1.html index 6e039b9d609d..6dcdbb7b388b 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-1.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-1.html @@ -89,73 +89,73 @@ +

- + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-1.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-1.html index 1e5a6606b03a..802293829fd8 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-1.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-1.html @@ -80,65 +80,65 @@ +

- + - + - - + +


- + - + - - + +


- + - + - - + +


- + - + - - + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-2.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-2.html index c28f29c99e69..e9d6af4901e1 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-2.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-2.html @@ -80,65 +80,65 @@ +

- + - + - - + +


- + - + - - + +


- + - + - - + +


- + - + - - + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-3.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-3.html index 0172ff1c7009..373d6d4d06ec 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-3.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-3.html @@ -187,137 +187,137 @@ +

- - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + +


- - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + +


- - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + +


- - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-4.html b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-4.html index 061cda79af9f..3b1fa575f724 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-4.html +++ b/testing/web-platform/tests/mathml/presentation-markup/scripts/underover-parameters-4.html @@ -187,137 +187,137 @@ +

- - - - ° + + + + ° - - - ˘ + + + ˘ - - - ˘ + + + ˘ - - - ° - ° + + + ° + ° - - - ˘ - ˘ + + + ˘ + ˘ - - - ˘ - ˘ + + + ˘ + ˘


- - - - ˘ + + + + ˘ - - - ˘ + + + ˘ - - - ° + + + ° - - - ˘ - ˘ + + + ˘ + ˘ - - - ˘ - ˘ + + + ˘ + ˘ - - - ˘ - ˘ + + + ˘ + ˘


- - - - ° + + + + ° - - - ° + + + ° - - - ˘ + + + ˘ - - - ° - ˘ + + + ° + ˘ - - - ˘ - ˘ + + + ˘ + ˘ - - - ˘ - ˘ + + + ˘ + ˘


- - - - ° + + + + ° - - - ° + + + ° - - - ˘ + + + ˘ - - - ° - ˘ + + + ° + ˘ - - - ˘ - ˘ + + + ˘ + ˘ - - - ˘ - ˘ + + + ˘ + ˘

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-1.html b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-1.html index adb363778422..cb9dd9e9acbd 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-1.html +++ b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-1.html @@ -68,6 +68,7 @@ +

@@ -81,11 +82,10 @@ - - - + + +

-
diff --git a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-2.html b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-2.html index 544cfb1f6689..072f2bda542f 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/spaces/space-2.html +++ b/testing/web-platform/tests/mathml/presentation-markup/spaces/space-2.html @@ -14,17 +14,17 @@
- - - - - - + + + + + + - - - + + +
diff --git a/testing/web-platform/tests/mathml/presentation-markup/tables/table-axis-height.html b/testing/web-platform/tests/mathml/presentation-markup/tables/table-axis-height.html index 50c3491e487b..024bdd29b116 100644 --- a/testing/web-platform/tests/mathml/presentation-markup/tables/table-axis-height.html +++ b/testing/web-platform/tests/mathml/presentation-markup/tables/table-axis-height.html @@ -43,10 +43,11 @@ +

- - + +

diff --git a/testing/web-platform/tests/mathml/relations/css-styling/display-1.html b/testing/web-platform/tests/mathml/relations/css-styling/display-1.html index 551f6402d859..a7d6277d70d1 100644 --- a/testing/web-platform/tests/mathml/relations/css-styling/display-1.html +++ b/testing/web-platform/tests/mathml/relations/css-styling/display-1.html @@ -10,7 +10,7 @@

Test passes if you see a green square.

- +
diff --git a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html index 2749e09c48a7..3143343da7e3 100644 --- a/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html +++ b/testing/web-platform/tests/mathml/relations/css-styling/displaystyle-1.html @@ -92,6 +92,7 @@ +
⫿ ⫿ ⫿ diff --git a/testing/web-platform/tests/mathml/relations/css-styling/lengths-3.html b/testing/web-platform/tests/mathml/relations/css-styling/lengths-3.html index a7133f89ecf4..68a144aca69c 100644 --- a/testing/web-platform/tests/mathml/relations/css-styling/lengths-3.html +++ b/testing/web-platform/tests/mathml/relations/css-styling/lengths-3.html @@ -93,6 +93,7 @@ +

@@ -154,6 +155,5 @@

-
diff --git a/testing/web-platform/tests/mathml/relations/html5-tree/class-2.html b/testing/web-platform/tests/mathml/relations/html5-tree/class-2.html index 9dbede840199..707500de37fc 100644 --- a/testing/web-platform/tests/mathml/relations/html5-tree/class-2.html +++ b/testing/web-platform/tests/mathml/relations/html5-tree/class-2.html @@ -13,7 +13,7 @@ var mtext = document.getElementsByClassName("cl"); test(function() { assert_equals(mtext.length, 3); - var mtext_ref = document.body.firstElementChild.firstElementChild; + var mtext_ref = document.body.lastElementChild.firstElementChild; mtext_ref = mtext_ref.nextElementSibling.nextElementSibling assert_equals(mtext[0], mtext_ref); mtext_ref = mtext_ref.nextElementSibling.nextElementSibling; @@ -26,6 +26,7 @@ +
diff --git a/testing/web-platform/tests/mathml/relations/html5-tree/display-1.html b/testing/web-platform/tests/mathml/relations/html5-tree/display-1.html index 4eb302c3ee82..64d862cf7614 100644 --- a/testing/web-platform/tests/mathml/relations/html5-tree/display-1.html +++ b/testing/web-platform/tests/mathml/relations/html5-tree/display-1.html @@ -70,6 +70,7 @@ +
diff --git a/testing/web-platform/tests/mathml/relations/html5-tree/href-click-1.html b/testing/web-platform/tests/mathml/relations/html5-tree/href-click-1.html index 80e4c754d805..6164346dc079 100644 --- a/testing/web-platform/tests/mathml/relations/html5-tree/href-click-1.html +++ b/testing/web-platform/tests/mathml/relations/html5-tree/href-click-1.html @@ -22,12 +22,12 @@
- +
- +
diff --git a/testing/web-platform/tests/mathml/relations/html5-tree/href-click-2.html b/testing/web-platform/tests/mathml/relations/html5-tree/href-click-2.html index 1e41f77cc437..6e5049392bd9 100644 --- a/testing/web-platform/tests/mathml/relations/html5-tree/href-click-2.html +++ b/testing/web-platform/tests/mathml/relations/html5-tree/href-click-2.html @@ -24,14 +24,14 @@ - +
- +
diff --git a/testing/web-platform/tests/mathml/relations/html5-tree/unique-identifier-2.html b/testing/web-platform/tests/mathml/relations/html5-tree/unique-identifier-2.html index b3226c293b5f..97e04a91ef13 100644 --- a/testing/web-platform/tests/mathml/relations/html5-tree/unique-identifier-2.html +++ b/testing/web-platform/tests/mathml/relations/html5-tree/unique-identifier-2.html @@ -12,13 +12,14 @@ window.addEventListener("DOMContentLoaded", function() { var mtext = document.getElementById("MTEXT"); test(function() { - assert_equals(mtext, document.body.firstElementChild.lastElementChild); + assert_equals(mtext, document.body.lastElementChild.lastElementChild); }, "getElementById()"); done(); }); +
diff --git a/testing/web-platform/tests/mixed-content/imageset.https.sub.html b/testing/web-platform/tests/mixed-content/imageset.https.sub.html index dd371566161d..1f3d0471fbd2 100644 --- a/testing/web-platform/tests/mixed-content/imageset.https.sub.html +++ b/testing/web-platform/tests/mixed-content/imageset.https.sub.html @@ -21,9 +21,9 @@ diff --git a/testing/web-platform/tests/navigation-timing/supported_navigation_type.any.js b/testing/web-platform/tests/navigation-timing/supported_navigation_type.window.js similarity index 100% rename from testing/web-platform/tests/navigation-timing/supported_navigation_type.any.js rename to testing/web-platform/tests/navigation-timing/supported_navigation_type.window.js diff --git a/testing/web-platform/tests/paint-timing/idlharness.window.js b/testing/web-platform/tests/paint-timing/idlharness.window.js index 115af73dfc80..049f0f18f1be 100644 --- a/testing/web-platform/tests/paint-timing/idlharness.window.js +++ b/testing/web-platform/tests/paint-timing/idlharness.window.js @@ -19,6 +19,9 @@ idl_test( resolve(); }); observer.observe({ entryTypes: ['paint'] }); + const div = document.createElement('div'); + div.innerHTML = 'Hello World'; + document.body.appendChild(div); }); const timeout = new Promise((_, reject) => { t.step_timeout(() => reject('Timed out waiting for paint event'), 3000); diff --git a/testing/web-platform/tests/paint-timing/supported-paint-type.any.js b/testing/web-platform/tests/paint-timing/supported-paint-type.window.js similarity index 100% rename from testing/web-platform/tests/paint-timing/supported-paint-type.any.js rename to testing/web-platform/tests/paint-timing/supported-paint-type.window.js diff --git a/testing/web-platform/tests/payment-handler/idlharness.https.any.js b/testing/web-platform/tests/payment-handler/idlharness.https.any.js index 6fbba53515eb..878114ec7ed8 100644 --- a/testing/web-platform/tests/payment-handler/idlharness.https.any.js +++ b/testing/web-platform/tests/payment-handler/idlharness.https.any.js @@ -9,7 +9,7 @@ idl_test( ['payment-handler'], - ['service-workers', 'dedicated-workers', 'dom'], + ['service-workers', 'html', 'dom'], async (idl_array, t) => { const isWindow = self.GLOBAL.isWindow(); const isServiceWorker = 'ServiceWorkerGlobalScope' in self; diff --git a/testing/web-platform/tests/payment-request/payment-request-abort-method-manual.https.html b/testing/web-platform/tests/payment-request/payment-request-abort-method-manual.https.html new file mode 100644 index 000000000000..a24bac864aad --- /dev/null +++ b/testing/web-platform/tests/payment-request/payment-request-abort-method-manual.https.html @@ -0,0 +1,95 @@ + + +Manual tests for PaymentRequest.abort() method + + + + +

Manual tests for PaymentRequest.abort() method

+

+ Click on each button in sequence from top to bottom without refreshing the + page. Each button will bring up the Payment Request UI window and then will + close it automatically. (If a payment sheet stays open, the test has failed.) +

+
    +
  1. + +
  2. +
  3. + +
  4. +
  5. +
+ + If you find a buggy test, please file a bug + and tag one of the suggested reviewers. + diff --git a/testing/web-platform/tests/payment-request/payment-request-abort-method.https.html b/testing/web-platform/tests/payment-request/payment-request-abort-method.https.html index 75e39a011c39..cf16401d0b0d 100644 --- a/testing/web-platform/tests/payment-request/payment-request-abort-method.https.html +++ b/testing/web-platform/tests/payment-request/payment-request-abort-method.https.html @@ -1,11 +1,11 @@ Test for PaymentRequest.abort() method - + - + - + + If you find a buggy test, please file a bug + and tag one of the suggested reviewers. + diff --git a/testing/web-platform/tests/payment-request/payment-request-canmakepayment-method-manual.https.html b/testing/web-platform/tests/payment-request/payment-request-canmakepayment-method-manual.https.html new file mode 100644 index 000000000000..fea45500b18b --- /dev/null +++ b/testing/web-platform/tests/payment-request/payment-request-canmakepayment-method-manual.https.html @@ -0,0 +1,105 @@ + + +Manual tests for PaymentRequest.canMakePayment() method + + + + + +

Manual tests for PaymentRequest.canMakePayment() method

+

+ Click on each button in sequence from top to bottom without refreshing the + page. Each button will bring up the Payment Request UI window and then will + close it automatically. (If a payment sheet stays open, the test has failed.) +

+
    +
  1. + +
  2. +
  3. + +
  4. +
  5. +
+ + If you find a buggy test, please file a bug + and tag one of the suggested reviewers. + diff --git a/testing/web-platform/tests/payment-request/payment-request-canmakepayment-method.https.html b/testing/web-platform/tests/payment-request/payment-request-canmakepayment-method.https.html index 672e5ce15714..cc8349a42239 100644 --- a/testing/web-platform/tests/payment-request/payment-request-canmakepayment-method.https.html +++ b/testing/web-platform/tests/payment-request/payment-request-canmakepayment-method.https.html @@ -1,11 +1,11 @@ Tests for PaymentRequest.canMakePayment() method - + - + + + + +

Manual tests for hasEnrolledInstrument() method

+

+ Follow the instructions from top to bottom. Click on each button in sequence + without refreshing the page. Some of the tests will bring up the Payment + Request UI and close them automatically. If a payment sheet stays open, the + test has failed. +

+
    +
  1. Follow browser-specific instructions to remove all cards from the test profile.
  2. +
  3. + +
  4. +
  5. Add a test Visa card to your test profile, e.g. 4012888888881881.
  6. +
  7. + +
  8. +
  9. + +
  10. +
  11. + +
  12. +
  13. + +
  14. +
  15. + +
  16. +
+ + If you find a buggy test, please file a bug + and tag one of the suggested reviewers. + diff --git a/testing/web-platform/tests/payment-request/payment-request-hasenrolledinstrument-method-protection.https.html b/testing/web-platform/tests/payment-request/payment-request-hasenrolledinstrument-method-protection.https.html new file mode 100644 index 000000000000..4da11304a214 --- /dev/null +++ b/testing/web-platform/tests/payment-request/payment-request-hasenrolledinstrument-method-protection.https.html @@ -0,0 +1,68 @@ + + +Tests for PaymentRequest.hasEnrolledInstrument() method + + + + + + + + + If you find a buggy test, please file a bug + and tag one of the suggested reviewers. + diff --git a/testing/web-platform/tests/payment-request/payment-request-hasenrolledinstrument-method.https.html b/testing/web-platform/tests/payment-request/payment-request-hasenrolledinstrument-method.https.html new file mode 100644 index 000000000000..c5139950d53e --- /dev/null +++ b/testing/web-platform/tests/payment-request/payment-request-hasenrolledinstrument-method.https.html @@ -0,0 +1,36 @@ + + +Tests for PaymentRequest.hasEnrolledInstrument() method + + + + + + + + + If you find a buggy test, please file a bug + and tag one of the suggested reviewers. + diff --git a/testing/web-platform/tests/payment-request/payment-request-multiple-show-manual.https.html b/testing/web-platform/tests/payment-request/payment-request-multiple-show-manual.https.html new file mode 100644 index 000000000000..cc412171a6d7 --- /dev/null +++ b/testing/web-platform/tests/payment-request/payment-request-multiple-show-manual.https.html @@ -0,0 +1,66 @@ + + +Manual test for multiple PaymentRequest.show() + + + + +

Manual test for multiple PaymentRequest.show()

+

+ Click on the button to bring up the Payment Request UI window and then will + close it automatically. (If a payment sheet stays open, the test has failed.) +

+
    +
  • + +
  • +
+ + If you find a buggy test, please file a bug + and tag one of the suggested reviewers. + diff --git a/testing/web-platform/tests/payment-request/payment-request-show-method-manual.https.html b/testing/web-platform/tests/payment-request/payment-request-show-method-manual.https.html new file mode 100644 index 000000000000..6ef98e85a609 --- /dev/null +++ b/testing/web-platform/tests/payment-request/payment-request-show-method-manual.https.html @@ -0,0 +1,97 @@ + + +Manual tests for PaymentRequest.show() method + + + + +

Manual tests for PaymentRequest.show() method

+

+ Click on each button in sequence from top to bottom without refreshing the + page. Each button will bring up the Payment Request UI window and then will + close it automatically. (If a payment sheet stays open, the test has failed.) +

+
    +
  1. + +
  2. +
  3. + +
  4. +
  5. + +
  6. +
  7. +
+ + If you find a buggy test, please file a bug + and tag one of the suggested reviewers. + diff --git a/testing/web-platform/tests/payment-request/payment-request-show-method.https.html b/testing/web-platform/tests/payment-request/payment-request-show-method.https.html index 3d362596c41c..dd04987092b4 100644 --- a/testing/web-platform/tests/payment-request/payment-request-show-method.https.html +++ b/testing/web-platform/tests/payment-request/payment-request-show-method.https.html @@ -1,11 +1,9 @@ Test for PaymentRequest.show() method - + - - If you find a buggy test, please file a bug diff --git a/testing/web-platform/tests/picture-in-picture/request-picture-in-picture-twice.html b/testing/web-platform/tests/picture-in-picture/request-picture-in-picture-twice.html index 17e494bbe88b..fd8541bc1dee 100644 --- a/testing/web-platform/tests/picture-in-picture/request-picture-in-picture-twice.html +++ b/testing/web-platform/tests/picture-in-picture/request-picture-in-picture-twice.html @@ -16,4 +16,13 @@ promise_test(async t => { await promise_rejects(t, 'NotAllowedError', video2.requestPictureInPicture()); return promise; }, 'request Picture-in-Picture consumes user gesture'); + +promise_test(async t => { + const video1 = await loadVideo(); + const video2 = await loadVideo(); + await test_driver.bless('request Picture-in-Picture'); + await video1.requestPictureInPicture(); + assert_equals(document.pictureInPictureElement, video1); + return video2.requestPictureInPicture(); +}, 'request Picture-in-Picture does not require user gesture if document.pictureInPictureElement is set'); diff --git a/testing/web-platform/tests/preload/avoid-delaying-onload-link-preload.html b/testing/web-platform/tests/preload/avoid-delaying-onload-link-preload.html index 77838c377419..a1b19c81c678 100644 --- a/testing/web-platform/tests/preload/avoid-delaying-onload-link-preload.html +++ b/testing/web-platform/tests/preload/avoid-delaying-onload-link-preload.html @@ -9,7 +9,7 @@ diff --git a/testing/web-platform/tests/preload/delaying-onload-link-preload-after-discovery.html b/testing/web-platform/tests/preload/delaying-onload-link-preload-after-discovery.html index 095d89ad90ca..1c856d16d409 100644 --- a/testing/web-platform/tests/preload/delaying-onload-link-preload-after-discovery.html +++ b/testing/web-platform/tests/preload/delaying-onload-link-preload-after-discovery.html @@ -11,8 +11,8 @@ diff --git a/testing/web-platform/tests/preload/dynamic-adding-preload-imagesrcset.tentative.html b/testing/web-platform/tests/preload/dynamic-adding-preload-imagesrcset.tentative.html index be8f0afcd5bd..e1b8431d7bca 100644 --- a/testing/web-platform/tests/preload/dynamic-adding-preload-imagesrcset.tentative.html +++ b/testing/web-platform/tests/preload/dynamic-adding-preload-imagesrcset.tentative.html @@ -17,15 +17,14 @@ link.imageSizes = "400px"; link.onload = t.step_func(function() { t.step_timeout(function() { - verifyNumberOfDownloads("resources/square.png?default", 0); - verifyNumberOfDownloads("resources/square.png?200", 0); - verifyNumberOfDownloads("resources/square.png?400", 1); - verifyNumberOfDownloads("resources/square.png?800", 0); + verifyNumberOfResourceTimingEntries("resources/square.png?default", 0); + verifyNumberOfResourceTimingEntries("resources/square.png?200", 0); + verifyNumberOfResourceTimingEntries("resources/square.png?400", 1); + verifyNumberOfResourceTimingEntries("resources/square.png?800", 0); t.done(); }, 0); }); document.body.appendChild(link); }); - diff --git a/testing/web-platform/tests/preload/dynamic-adding-preload-nonce.html b/testing/web-platform/tests/preload/dynamic-adding-preload-nonce.html index 10dae6b99586..19e09472eef3 100644 --- a/testing/web-platform/tests/preload/dynamic-adding-preload-nonce.html +++ b/testing/web-platform/tests/preload/dynamic-adding-preload-nonce.html @@ -14,7 +14,7 @@ async_test(function(t) { link.nonce = "abc"; link.onload = link.onerror = t.step_func(function() { t.step_timeout(function() { - verifyNumberOfDownloads("resources/dummy.js?with-nonce", 1); + verifyNumberOfResourceTimingEntries("resources/dummy.js?with-nonce", 1); t.done(); }, 0); }); @@ -29,7 +29,7 @@ async_test(function(t) { link.href = "resources/dummy.js?without-nonce"; link.onload = link.onerror = t.step_func(function() { t.step_timeout(function() { - verifyNumberOfDownloads("resources/dummy.js?without-nonce", 0); + verifyNumberOfResourceTimingEntries("resources/dummy.js?without-nonce", 0); t.done(); }, 0); }); diff --git a/testing/web-platform/tests/preload/dynamic-adding-preload.html b/testing/web-platform/tests/preload/dynamic-adding-preload.html index 2a299bd8446b..0cecc1983eaa 100644 --- a/testing/web-platform/tests/preload/dynamic-adding-preload.html +++ b/testing/web-platform/tests/preload/dynamic-adding-preload.html @@ -15,12 +15,11 @@ link.href = "resources/dummy.js?dynamic-adding-preload"; link.onload = t.step_func(function() { t.step_timeout(function() { - verifyNumberOfDownloads("resources/dummy.js?dynamic-adding-preload", 1); + verifyNumberOfResourceTimingEntries("resources/dummy.js?dynamic-adding-preload", 1); t.done(); }, 0); }); document.body.appendChild(link); }); - diff --git a/testing/web-platform/tests/preload/link-header-on-subresource.html b/testing/web-platform/tests/preload/link-header-on-subresource.html index a02bc7c819eb..087a3429e649 100644 --- a/testing/web-platform/tests/preload/link-header-on-subresource.html +++ b/testing/web-platform/tests/preload/link-header-on-subresource.html @@ -6,12 +6,13 @@ var t = async_test('Makes sure that Link headers on subresources preload resources'); - diff --git a/testing/web-platform/tests/preload/link-header-preload-delay-onload.html b/testing/web-platform/tests/preload/link-header-preload-delay-onload.html index 7f38f8c9ee53..a445d800a586 100644 --- a/testing/web-platform/tests/preload/link-header-preload-delay-onload.html +++ b/testing/web-platform/tests/preload/link-header-preload-delay-onload.html @@ -31,10 +31,10 @@ } } assert_true(found_background_first); - verifyNumberOfDownloads("resources/square.png?link-header-preload-delay-onload", 1); - verifyNumberOfDownloads("resources/square.png?background", 1); - verifyNumberOfDownloads("resources/dummy.js?link-header-preload-delay-onload", 1); - verifyNumberOfDownloads("resources/dummy.css?link-header-preload-delay-onload", 1); + verifyLoadedAndNoDoubleDownload("resources/square.png?link-header-preload-delay-onload"); + verifyLoadedAndNoDoubleDownload("resources/square.png?background"); + verifyLoadedAndNoDoubleDownload("resources/dummy.js?link-header-preload-delay-onload"); + verifyLoadedAndNoDoubleDownload("resources/dummy.css?link-header-preload-delay-onload"); t.done(); })); diff --git a/testing/web-platform/tests/preload/link-header-preload-nonce.html b/testing/web-platform/tests/preload/link-header-preload-nonce.html index 240d6f11dd59..dc1ec1007769 100644 --- a/testing/web-platform/tests/preload/link-header-preload-nonce.html +++ b/testing/web-platform/tests/preload/link-header-preload-nonce.html @@ -5,12 +5,13 @@ - diff --git a/testing/web-platform/tests/preload/link-header-preload-srcset.tentative.html b/testing/web-platform/tests/preload/link-header-preload-srcset.tentative.html index 024da965796f..8d057549a193 100644 --- a/testing/web-platform/tests/preload/link-header-preload-srcset.tentative.html +++ b/testing/web-platform/tests/preload/link-header-preload-srcset.tentative.html @@ -7,21 +7,22 @@ var t = async_test('Makes sure that Link headers preload images with (experimental) imagesrcset/imagesizes attributes.'); - diff --git a/testing/web-platform/tests/preload/link-header-preload.html b/testing/web-platform/tests/preload/link-header-preload.html index 94a731bdcebb..0ca364bdef71 100644 --- a/testing/web-platform/tests/preload/link-header-preload.html +++ b/testing/web-platform/tests/preload/link-header-preload.html @@ -6,14 +6,15 @@ var t = async_test('Makes sure that Link headers preload resources'); - diff --git a/testing/web-platform/tests/preload/onerror-event.html b/testing/web-platform/tests/preload/onerror-event.html index 5fae70d3bcab..8190be87a4b7 100644 --- a/testing/web-platform/tests/preload/onerror-event.html +++ b/testing/web-platform/tests/preload/onerror-event.html @@ -28,21 +28,22 @@ - diff --git a/testing/web-platform/tests/preload/onload-event.html b/testing/web-platform/tests/preload/onload-event.html index 6af2d64a1c1d..f9348b8ceb39 100644 --- a/testing/web-platform/tests/preload/onload-event.html +++ b/testing/web-platform/tests/preload/onload-event.html @@ -27,22 +27,23 @@ - diff --git a/testing/web-platform/tests/preload/preload-csp.sub.html b/testing/web-platform/tests/preload/preload-csp.sub.html index 8e5e45b9a1cd..7fe06eb07913 100644 --- a/testing/web-platform/tests/preload/preload-csp.sub.html +++ b/testing/web-platform/tests/preload/preload-csp.sub.html @@ -16,19 +16,20 @@ - diff --git a/testing/web-platform/tests/preload/preload-default-csp.sub.html b/testing/web-platform/tests/preload/preload-default-csp.sub.html index cb080e62ba3e..7813e36d4d8a 100644 --- a/testing/web-platform/tests/preload/preload-default-csp.sub.html +++ b/testing/web-platform/tests/preload/preload-default-csp.sub.html @@ -16,19 +16,20 @@ - diff --git a/testing/web-platform/tests/preload/preload-with-type.html b/testing/web-platform/tests/preload/preload-with-type.html index 8578143a2349..83eafc5848b9 100644 --- a/testing/web-platform/tests/preload/preload-with-type.html +++ b/testing/web-platform/tests/preload/preload-with-type.html @@ -47,19 +47,20 @@ - diff --git a/testing/web-platform/tests/preload/resources/preload_helper.js b/testing/web-platform/tests/preload/resources/preload_helper.js index b2cf8323db01..f464908fa513 100644 --- a/testing/web-platform/tests/preload/resources/preload_helper.js +++ b/testing/web-platform/tests/preload/resources/preload_helper.js @@ -10,19 +10,32 @@ function getAbsoluteURL(url) return new URL(url, location.href).href; } -function verifyNumberOfDownloads(url, number) -{ - var numDownloads = 0; - performance.getEntriesByName(getAbsoluteURL(url)).forEach(entry => { - if (entry.transferSize > 0) { - numDownloads++; - } - }); - assert_equals(numDownloads, number, url); -} - function verifyNumberOfResourceTimingEntries(url, number) { var numEntries = performance.getEntriesByName(getAbsoluteURL(url)).length; assert_equals(numEntries, number, url); } + +// Verifies that the resource is loaded, but not downloaded from network +// more than once. This can be used to verify that a preloaded resource is +// not downloaded again when used. +function verifyLoadedAndNoDoubleDownload(url) { + var entries = performance.getEntriesByName(getAbsoluteURL(url)); + // UA may create separate RT entries for preload and normal load, + // so we just check (entries.length > 0). + assert_greater_than(entries.length, 0, url + ' should be loaded'); + + var numDownloads = 0; + entries.forEach(entry => { + // transferSize is zero if the resource is loaded from cache. + if (entry.transferSize > 0) { + numDownloads++; + } + }); + // numDownloads can be zero if the resource was already cached before running + // the test (for example, when the test is running repeatedly without + // clearing cache between runs). + assert_less_than_equal( + numDownloads, 1, + url + ' should be downloaded from network at most once'); +} diff --git a/testing/web-platform/tests/preload/single-download-late-used-preload.html b/testing/web-platform/tests/preload/single-download-late-used-preload.html index 5549cb84fdb9..51533ba71445 100644 --- a/testing/web-platform/tests/preload/single-download-late-used-preload.html +++ b/testing/web-platform/tests/preload/single-download-late-used-preload.html @@ -9,11 +9,11 @@ assert_equals(link.as, "image"); link.addEventListener("load", () => { verifyPreloadAndRTSupport(); - verifyNumberOfDownloads("resources/square.png?pipe=trickle(d1)", 1); + verifyNumberOfResourceTimingEntries("resources/square.png?pipe=trickle(d1)", 1); var img = document.createElement("img"); img.src = "resources/square.png?pipe=trickle(d1)"; img.onload = () => { - verifyNumberOfDownloads("resources/square.png?pipe=trickle(d1)", 1); + verifyLoadedAndNoDoubleDownload("resources/square.png?pipe=trickle(d1)"); done(); }; document.body.appendChild(img); diff --git a/testing/web-platform/tests/preload/single-download-preload.html b/testing/web-platform/tests/preload/single-download-preload.html index e8f261787107..16d893ca7e54 100644 --- a/testing/web-platform/tests/preload/single-download-preload.html +++ b/testing/web-platform/tests/preload/single-download-preload.html @@ -16,7 +16,6 @@ - +
This fetches ahem font.
+ diff --git a/testing/web-platform/tests/screen-orientation/event-before-promise.html b/testing/web-platform/tests/screen-orientation/event-before-promise.html new file mode 100644 index 000000000000..d876b0c8873e --- /dev/null +++ b/testing/web-platform/tests/screen-orientation/event-before-promise.html @@ -0,0 +1,23 @@ + + + + + + diff --git a/testing/web-platform/tests/serial/resources/serial-allowed-by-feature-policy-worker.js b/testing/web-platform/tests/serial/resources/serial-allowed-by-feature-policy-worker.js new file mode 100644 index 000000000000..46c338e9a33a --- /dev/null +++ b/testing/web-platform/tests/serial/resources/serial-allowed-by-feature-policy-worker.js @@ -0,0 +1,14 @@ +'use strict'; + +importScripts('/resources/testharness.js'); + +let workerType; + +if (typeof postMessage === 'function') { + workerType = 'dedicated'; +} + +promise_test(() => navigator.serial.getPorts(), + `Inherited header feature policy allows ${workerType} workers.`); + +done(); diff --git a/testing/web-platform/tests/serial/resources/serial-disabled-by-feature-policy-worker.js b/testing/web-platform/tests/serial/resources/serial-disabled-by-feature-policy-worker.js new file mode 100644 index 000000000000..b64b1a861ecf --- /dev/null +++ b/testing/web-platform/tests/serial/resources/serial-disabled-by-feature-policy-worker.js @@ -0,0 +1,17 @@ +'use strict'; + +importScripts('/resources/testharness.js'); + +const header = 'Feature-Policy header {"serial" : []}'; +let workerType; + +if (typeof postMessage === 'function') { + workerType = 'dedicated'; +} + +promise_test(() => navigator.serial.getPorts().then( + () => assert_unreached('expected promise to reject with SecurityError'), + error => assert_equals(error.name, 'SecurityError')), + `Inherited ${header} disallows ${workerType} workers.`); + +done(); diff --git a/testing/web-platform/tests/serial/serial-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html b/testing/web-platform/tests/serial/serial-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html new file mode 100644 index 000000000000..7c3a88dd51f9 --- /dev/null +++ b/testing/web-platform/tests/serial/serial-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html @@ -0,0 +1,44 @@ + + + + + + + diff --git a/testing/web-platform/tests/serial/serial-allowed-by-feature-policy-attribute.https.sub.html b/testing/web-platform/tests/serial/serial-allowed-by-feature-policy-attribute.https.sub.html new file mode 100644 index 000000000000..1420c5c01434 --- /dev/null +++ b/testing/web-platform/tests/serial/serial-allowed-by-feature-policy-attribute.https.sub.html @@ -0,0 +1,46 @@ + + + + + + + diff --git a/testing/web-platform/tests/serial/serial-allowed-by-feature-policy.https.sub.html b/testing/web-platform/tests/serial/serial-allowed-by-feature-policy.https.sub.html new file mode 100644 index 000000000000..316256bbbb4d --- /dev/null +++ b/testing/web-platform/tests/serial/serial-allowed-by-feature-policy.https.sub.html @@ -0,0 +1,44 @@ + + + + + + + diff --git a/testing/web-platform/tests/serial/serial-allowed-by-feature-policy.https.sub.html.headers b/testing/web-platform/tests/serial/serial-allowed-by-feature-policy.https.sub.html.headers new file mode 100644 index 000000000000..113ce29ae9f5 --- /dev/null +++ b/testing/web-platform/tests/serial/serial-allowed-by-feature-policy.https.sub.html.headers @@ -0,0 +1 @@ +Feature-Policy: serial * diff --git a/testing/web-platform/tests/serial/serial-default-feature-policy.https.sub.html b/testing/web-platform/tests/serial/serial-default-feature-policy.https.sub.html new file mode 100644 index 000000000000..61a872f9b5c4 --- /dev/null +++ b/testing/web-platform/tests/serial/serial-default-feature-policy.https.sub.html @@ -0,0 +1,27 @@ + + + + + + + diff --git a/testing/web-platform/tests/serial/serial-disabled-by-feature-policy.https.sub.html b/testing/web-platform/tests/serial/serial-disabled-by-feature-policy.https.sub.html new file mode 100644 index 000000000000..cddf157e8ae5 --- /dev/null +++ b/testing/web-platform/tests/serial/serial-disabled-by-feature-policy.https.sub.html @@ -0,0 +1,48 @@ + + + + + + + diff --git a/testing/web-platform/tests/serial/serial-disabled-by-feature-policy.https.sub.html.headers b/testing/web-platform/tests/serial/serial-disabled-by-feature-policy.https.sub.html.headers new file mode 100644 index 000000000000..be3e6afd423f --- /dev/null +++ b/testing/web-platform/tests/serial/serial-disabled-by-feature-policy.https.sub.html.headers @@ -0,0 +1 @@ +Feature-Policy: serial 'none' diff --git a/testing/web-platform/tests/streams/readable-streams/async-iterator.any.js b/testing/web-platform/tests/streams/readable-streams/async-iterator.any.js new file mode 100644 index 000000000000..c59cbeb68201 --- /dev/null +++ b/testing/web-platform/tests/streams/readable-streams/async-iterator.any.js @@ -0,0 +1,340 @@ +// META: global=worker,jsshell +// META: script=../resources/rs-utils.js +// META: script=../resources/test-utils.js +// META: script=../resources/recording-streams.js +'use strict'; + +test(() => { + assert_equals(ReadableStream.prototype[Symbol.asyncIterator], ReadableStream.prototype.getIterator); +}, '@@asyncIterator() method is === to getIterator() method'); + +test(() => { + const s = new ReadableStream(); + const it = s.getIterator(); + const proto = Object.getPrototypeOf(it); + + const AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype); + assert_equals(Object.getPrototypeOf(proto), AsyncIteratorPrototype, 'prototype should extend AsyncIteratorPrototype'); + + const methods = ['next', 'return'].sort(); + assert_array_equals(Object.getOwnPropertyNames(proto).sort(), methods, 'should have all the correct methods'); + + for (const m of methods) { + const propDesc = Object.getOwnPropertyDescriptor(proto, m); + assert_false(propDesc.enumerable, 'method should be non-enumerable'); + assert_true(propDesc.configurable, 'method should be configurable'); + assert_true(propDesc.writable, 'method should be writable'); + assert_equals(typeof it[m], 'function', 'method should be a function'); + assert_equals(it[m].name, m, 'method should have the correct name'); + } + + assert_equals(it.next.length, 0, 'next should have no parameters'); + assert_equals(it.return.length, 1, 'return should have 1 parameter'); + assert_equals(typeof it.throw, 'undefined', 'throw should not exist'); +}, 'Async iterator instances should have the correct list of properties'); + +promise_test(async () => { + const s = new ReadableStream({ + start(c) { + c.enqueue(1); + c.enqueue(2); + c.enqueue(3); + c.close(); + }, + }); + + const chunks = []; + for await (const chunk of s) { + chunks.push(chunk); + } + assert_array_equals(chunks, [1, 2, 3]); +}, 'Async-iterating a push source'); + +promise_test(async () => { + let i = 1; + const s = new ReadableStream({ + pull(c) { + c.enqueue(i); + if (i >= 3) { + c.close(); + } + i += 1; + }, + }); + + const chunks = []; + for await (const chunk of s) { + chunks.push(chunk); + } + assert_array_equals(chunks, [1, 2, 3]); +}, 'Async-iterating a pull source'); + +promise_test(async () => { + let i = 1; + const s = recordingReadableStream({ + pull(c) { + c.enqueue(i); + if (i >= 3) { + c.close(); + } + i += 1; + }, + }, new CountQueuingStrategy({ highWaterMark: 0 })); + + const it = s.getIterator(); + assert_array_equals(s.events, []); + + const read1 = await it.next(); + assert_equals(read1.done, false); + assert_equals(read1.value, 1); + assert_array_equals(s.events, ['pull']); + + const read2 = await it.next(); + assert_equals(read2.done, false); + assert_equals(read2.value, 2); + assert_array_equals(s.events, ['pull', 'pull']); + + const read3 = await it.next(); + assert_equals(read3.done, false); + assert_equals(read3.value, 3); + assert_array_equals(s.events, ['pull', 'pull', 'pull']); + + const read4 = await it.next(); + assert_equals(read4.done, true); + assert_equals(read4.value, undefined); + assert_array_equals(s.events, ['pull', 'pull', 'pull']); +}, 'Async-iterating a pull source manually'); + +promise_test(async () => { + const s = new ReadableStream({ + start(c) { + c.error('e'); + }, + }); + + try { + for await (const chunk of s) {} + assert_unreached(); + } catch (e) { + assert_equals(e, 'e'); + } +}, 'Async-iterating an errored stream throws'); + +promise_test(async () => { + const s = new ReadableStream({ + start(c) { + c.close(); + } + }); + + for await (const chunk of s) { + assert_unreached(); + } +}, 'Async-iterating a closed stream never executes the loop body, but works fine'); + +promise_test(async () => { + const s = new ReadableStream(); + + const loop = async () => { + for await (const chunk of s) { + assert_unreached(); + } + assert_unreached(); + }; + + await Promise.race([ + loop(), + flushAsyncEvents() + ]); +}, 'Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function'); + +promise_test(async () => { + const s = new ReadableStream({ + start(c) { + c.enqueue(1); + c.enqueue(2); + c.enqueue(3); + c.close(); + }, + }); + + const reader = s.getReader(); + const readResult = await reader.read(); + assert_equals(readResult.done, false); + assert_equals(readResult.value, 1); + reader.releaseLock(); + + const chunks = []; + for await (const chunk of s) { + chunks.push(chunk); + } + assert_array_equals(chunks, [2, 3]); +}, 'Async-iterating a partially consumed stream'); + +for (const type of ['throw', 'break', 'return']) { + for (const preventCancel of [false, true]) { + promise_test(async () => { + const s = recordingReadableStream({ + start(c) { + c.enqueue(0); + } + }); + + // use a separate function for the loop body so return does not stop the test + const loop = async () => { + for await (const c of s.getIterator({ preventCancel })) { + if (type === 'throw') { + throw new Error(); + } else if (type === 'break') { + break; + } else if (type === 'return') { + return; + } + } + }; + + try { + await loop(); + } catch (e) {} + + if (preventCancel) { + assert_array_equals(s.events, ['pull'], `cancel() should not be called`); + } else { + assert_array_equals(s.events, ['pull', 'cancel', undefined], `cancel() should be called`); + } + }, `Cancellation behavior when ${type}ing inside loop body; preventCancel = ${preventCancel}`); + } +} + +for (const preventCancel of [false, true]) { + promise_test(async () => { + const s = recordingReadableStream({ + start(c) { + c.enqueue(0); + } + }); + + const it = s.getIterator({ preventCancel }); + await it.return(); + + if (preventCancel) { + assert_array_equals(s.events, [], `cancel() should not be called`); + } else { + assert_array_equals(s.events, ['cancel', undefined], `cancel() should be called`); + } + }, `Cancellation behavior when manually calling return(); preventCancel = ${preventCancel}`); +} + +promise_test(async () => { + const s = new ReadableStream(); + const it = s[Symbol.asyncIterator](); + await it.return(); + try { + await it.return(); + assert_unreached(); + } catch (e) {} +}, 'Calling return() twice rejects'); + +promise_test(async () => { + const s = new ReadableStream({ + start(c) { + c.enqueue(0); + c.close(); + }, + }); + const it = s[Symbol.asyncIterator](); + const next = await it.next(); + assert_equals(Object.getPrototypeOf(next), Object.prototype); + assert_array_equals(Object.getOwnPropertyNames(next).sort(), ['done', 'value']); +}, 'next()\'s fulfillment value has the right shape'); + +promise_test(async t => { + const s = recordingReadableStream(); + const it = s[Symbol.asyncIterator](); + it.next(); + + await promise_rejects(t, new TypeError(), it.return(), 'return() should reject'); + assert_array_equals(s.events, ['pull']); +}, 'calling return() while there are pending reads rejects'); + +test(() => { + const s = new ReadableStream({ + start(c) { + c.enqueue(0); + c.close(); + }, + }); + const it = s.getIterator(); + assert_throws(new TypeError(), () => s.getIterator(), 'getIterator() should throw'); +}, 'getIterator() throws if there\'s already a lock'); + +promise_test(async () => { + const s = new ReadableStream({ + start(c) { + c.enqueue(1); + c.enqueue(2); + c.enqueue(3); + c.close(); + }, + }); + + const chunks = []; + for await (const chunk of s) { + chunks.push(chunk); + } + assert_array_equals(chunks, [1, 2, 3]); + + const reader = s.getReader(); + await reader.closed; +}, 'Acquiring a reader after exhaustively async-iterating a stream'); + +promise_test(async () => { + const s = new ReadableStream({ + start(c) { + c.enqueue(1); + c.enqueue(2); + c.enqueue(3); + c.close(); + }, + }); + + // read the first two chunks, then cancel + const chunks = []; + for await (const chunk of s) { + chunks.push(chunk); + if (chunk >= 2) { + break; + } + } + assert_array_equals(chunks, [1, 2]); + + const reader = s.getReader(); + await reader.closed; +}, 'Acquiring a reader after partially async-iterating a stream'); + +promise_test(async () => { + const s = new ReadableStream({ + start(c) { + c.enqueue(1); + c.enqueue(2); + c.enqueue(3); + c.close(); + }, + }); + + // read the first two chunks, then release lock + const chunks = []; + for await (const chunk of s.getIterator({preventCancel: true})) { + chunks.push(chunk); + if (chunk >= 2) { + break; + } + } + assert_array_equals(chunks, [1, 2]); + + const reader = s.getReader(); + const readResult = await reader.read(); + assert_equals(readResult.done, false, 'should not be closed yet'); + assert_equals(readResult.value, 3, 'should read remaining chunk'); + await reader.closed; +}, 'Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true'); diff --git a/testing/web-platform/tests/streams/readable-streams/brand-checks.any.js b/testing/web-platform/tests/streams/readable-streams/brand-checks.any.js index 2906494bdf6b..521e4360667b 100644 --- a/testing/web-platform/tests/streams/readable-streams/brand-checks.any.js +++ b/testing/web-platform/tests/streams/readable-streams/brand-checks.any.js @@ -4,6 +4,7 @@ let ReadableStreamDefaultReader; let ReadableStreamDefaultController; +let ReadableStreamAsyncIteratorPrototype; test(() => { @@ -23,6 +24,13 @@ test(() => { }, 'Can get the ReadableStreamDefaultController constructor indirectly'); +test(() => { + + const rs = new ReadableStream(); + ReadableStreamAsyncIteratorPrototype = Object.getPrototypeOf(rs.getIterator()); + +}, 'Can get ReadableStreamAsyncIteratorPrototype object indirectly'); + function fakeRS() { return Object.setPrototypeOf({ cancel() { return Promise.resolve(); }, @@ -68,6 +76,13 @@ function realRSDefaultController() { return controller; } +function fakeRSAsyncIterator() { + return Object.setPrototypeOf({ + next() { }, + return(value = undefined) { } + }, ReadableStreamAsyncIteratorPrototype); +} + promise_test(t => { return methodRejectsForAll(t, ReadableStream.prototype, 'cancel', @@ -157,3 +172,17 @@ test(() => { [fakeRSDefaultController(), realRS(), realRSDefaultReader(), undefined, null]); }, 'ReadableStreamDefaultController.prototype.error enforces a brand check'); + +promise_test(t => { + + return methodRejectsForAll(t, ReadableStreamAsyncIteratorPrototype, 'next', + [fakeRSAsyncIterator(), realRS(), realRSDefaultReader(), undefined, null]); + +}, 'ReadableStreamAsyncIteratorPrototype.next enforces a brand check'); + +promise_test(t => { + + return methodRejectsForAll(t, ReadableStreamAsyncIteratorPrototype, 'return', + [fakeRSAsyncIterator(), realRS(), realRSDefaultReader(), undefined, null]); + +}, 'ReadableStreamAsyncIteratorPrototype.return enforces a brand check'); diff --git a/testing/web-platform/tests/streams/readable-streams/general.any.js b/testing/web-platform/tests/streams/readable-streams/general.any.js index f885ed6dbcdc..e9a107db1a36 100644 --- a/testing/web-platform/tests/streams/readable-streams/general.any.js +++ b/testing/web-platform/tests/streams/readable-streams/general.any.js @@ -39,13 +39,15 @@ test(() => { test(() => { - const methods = ['cancel', 'constructor', 'getReader', 'pipeThrough', 'pipeTo', 'tee']; + const methods = ['cancel', 'constructor', 'getReader', 'pipeThrough', 'pipeTo', 'tee', 'getIterator']; const properties = methods.concat(['locked']).sort(); + const symbols = [Symbol.asyncIterator]; const rs = new ReadableStream(); const proto = Object.getPrototypeOf(rs); - assert_array_equals(Object.getOwnPropertyNames(proto).sort(), properties, 'should have all the correct methods'); + assert_array_equals(Object.getOwnPropertyNames(proto).sort(), properties, 'should have all the correct properties'); + assert_array_equals(Object.getOwnPropertySymbols(proto).sort(), symbols, 'should have all the correct symbols'); for (const m of methods) { const propDesc = Object.getOwnPropertyDescriptor(proto, m); @@ -70,6 +72,15 @@ test(() => { assert_equals(rs.pipeThrough.length, 1, 'pipeThrough should have 1 parameters'); assert_equals(rs.pipeTo.length, 1, 'pipeTo should have 1 parameter'); assert_equals(rs.tee.length, 0, 'tee should have no parameters'); + assert_equals(rs.getIterator.length, 0, 'getIterator should have no required parameters'); + assert_equals(rs[Symbol.asyncIterator].length, 0, '@@asyncIterator should have no required parameters'); + + const asyncIteratorPropDesc = Object.getOwnPropertyDescriptor(proto, Symbol.asyncIterator); + assert_false(asyncIteratorPropDesc.enumerable, '@@asyncIterator should be non-enumerable'); + assert_true(asyncIteratorPropDesc.configurable, '@@asyncIterator should be configurable'); + assert_true(asyncIteratorPropDesc.writable, '@@asyncIterator should be writable'); + assert_equals(typeof rs[Symbol.asyncIterator], 'function', '@@asyncIterator should be a function'); + assert_equals(rs[Symbol.asyncIterator].name, 'getIterator', '@@asyncIterator should have the correct name'); }, 'ReadableStream instances should have the correct list of properties'); diff --git a/testing/web-platform/tests/streams/readable-streams/patched-global.any.js b/testing/web-platform/tests/streams/readable-streams/patched-global.any.js index fa49249a9b5e..500979f5b37a 100644 --- a/testing/web-platform/tests/streams/readable-streams/patched-global.any.js +++ b/testing/web-platform/tests/streams/readable-streams/patched-global.any.js @@ -57,3 +57,53 @@ test(t => { assert_true(isReadableStream(branch1), 'branch1 should be a ReadableStream'); assert_true(isReadableStream(branch2), 'branch2 should be a ReadableStream'); }, 'ReadableStream tee() should not call the global ReadableStream'); + +promise_test(async t => { + const rs = new ReadableStream({ + start(c) { + c.enqueue(1); + c.enqueue(2); + c.enqueue(3); + c.close(); + } + }); + + const oldReadableStreamGetReader = ReadableStream.prototype.getReader; + + const ReadableStreamDefaultReader = (new ReadableStream()).getReader().constructor; + const oldDefaultReaderRead = ReadableStreamDefaultReader.prototype.read; + const oldDefaultReaderCancel = ReadableStreamDefaultReader.prototype.cancel; + const oldDefaultReaderReleaseLock = ReadableStreamDefaultReader.prototype.releaseLock; + + self.ReadableStream.prototype.getReader = function() { + throw new Error('patched getReader() called'); + }; + + ReadableStreamDefaultReader.prototype.read = function() { + throw new Error('patched read() called'); + }; + ReadableStreamDefaultReader.prototype.cancel = function() { + throw new Error('patched cancel() called'); + }; + ReadableStreamDefaultReader.prototype.releaseLock = function() { + throw new Error('patched releaseLock() called'); + }; + + t.add_cleanup(() => { + self.ReadableStream.prototype.getReader = oldReadableStreamGetReader; + + ReadableStreamDefaultReader.prototype.read = oldDefaultReaderRead; + ReadableStreamDefaultReader.prototype.cancel = oldDefaultReaderCancel; + ReadableStreamDefaultReader.prototype.releaseLock = oldDefaultReaderReleaseLock; + }); + + // read the first chunk, then cancel + for await (const chunk of rs) { + break; + } + + // should be able to acquire a new reader + const reader = oldReadableStreamGetReader.call(rs); + // stream should be cancelled + await reader.closed; +}, 'ReadableStream getIterator() should use the original values of getReader() and ReadableStreamDefaultReader methods'); diff --git a/testing/web-platform/tests/tools/pywebsocket/example/echo_client.py b/testing/web-platform/tests/tools/pywebsocket/example/echo_client.py index 943ce64e8b88..7395f51a7710 100755 --- a/testing/web-platform/tests/tools/pywebsocket/example/echo_client.py +++ b/testing/web-platform/tests/tools/pywebsocket/example/echo_client.py @@ -51,6 +51,7 @@ or # run echo client to test IETF HyBi 00 protocol run with --protocol-version=hybi00 """ +from __future__ import print_function import base64 @@ -940,15 +941,15 @@ class EchoClient(object): for line in self._options.message.split(','): self._stream.send_message(line) if self._options.verbose: - print 'Send: %s' % line + print('Send: %s' % line) try: received = self._stream.receive_message() if self._options.verbose: - print 'Recv: %s' % received + print('Recv: %s' % received) except Exception, e: if self._options.verbose: - print 'Error: %s' % e + print('Error: %s' % e) raise self._do_closing_handshake() @@ -964,15 +965,15 @@ class EchoClient(object): self._logger.info('Wait for server-initiated closing handshake') message = self._stream.receive_message() if message is None: - print 'Recv close' - print 'Send ack' + print('Recv close') + print('Send ack') self._logger.info( 'Received closing handshake and sent ack') return - print 'Send close' + print('Send close') self._stream.close_connection() self._logger.info('Sent closing handshake') - print 'Recv ack' + print('Recv ack') self._logger.info('Received ack') diff --git a/testing/web-platform/tests/tools/pywebsocket/test/test_msgutil.py b/testing/web-platform/tests/tools/pywebsocket/test/test_msgutil.py index 9dbbb5d8d4b9..234735c63047 100755 --- a/testing/web-platform/tests/tools/pywebsocket/test/test_msgutil.py +++ b/testing/web-platform/tests/tools/pywebsocket/test/test_msgutil.py @@ -31,6 +31,7 @@ """Tests for msgutil module.""" +from __future__ import print_function import array @@ -884,7 +885,7 @@ class PerMessageDeflateTest(unittest.TestCase): compressed_empty = compressed_empty[:-4] expected += '\x80%c' % len(compressed_empty) expected += compressed_empty - print '%r' % expected + print('%r' % expected) self.assertEqual(expected, request.connection.written_data()) def test_send_message_fragmented_empty_last_frame(self): @@ -1064,7 +1065,7 @@ class PerMessageDeflateTest(unittest.TestCase): frame_count += 1 - print "Chunk sizes: %r" % chunk_sizes + print("Chunk sizes: %r" % chunk_sizes) self.assertTrue(len(chunk_sizes) > 10) # Close frame @@ -1167,9 +1168,9 @@ class PerMessageDeflateTest(unittest.TestCase): compress = None finish_used = True - print "Chunk sizes: %r" % chunk_sizes + print("Chunk sizes: %r" % chunk_sizes) self.assertTrue(len(chunk_sizes) > 10) - print "Methods: %r" % methods + print("Methods: %r" % methods) self.assertTrue(sync_used) self.assertTrue(finish_used) diff --git a/testing/web-platform/tests/tools/pywebsocket/test/test_util.py b/testing/web-platform/tests/tools/pywebsocket/test/test_util.py index 20f4ab059652..64ba3f47737a 100755 --- a/testing/web-platform/tests/tools/pywebsocket/test/test_util.py +++ b/testing/web-platform/tests/tools/pywebsocket/test/test_util.py @@ -31,6 +31,7 @@ """Tests for util module.""" +from __future__ import print_function import os @@ -172,7 +173,7 @@ class InflaterDeflaterTest(unittest.TestCase): [chr(random.randint(0, 255)) for i in xrange(100 * 1024)]) chunked_input = get_random_section(source, 10) - print "Input chunk sizes: %r" % [len(c) for c in chunked_input] + print("Input chunk sizes: %r" % [len(c) for c in chunked_input]) deflater = util._Deflater(15) compressed = [] diff --git a/testing/web-platform/tests/tools/tox.ini b/testing/web-platform/tests/tools/tox.ini index 975056ea2c27..bb9873d5bc67 100644 --- a/testing/web-platform/tests/tools/tox.ini +++ b/testing/web-platform/tests/tools/tox.ini @@ -9,7 +9,7 @@ deps = mock hypothesis -commands = pytest --cov {posargs} +commands = pytest {posargs} passenv = HYPOTHESIS_PROFILE diff --git a/testing/web-platform/tests/tools/wpt/tox.ini b/testing/web-platform/tests/tools/wpt/tox.ini index 0b354e755300..d0dead55d9aa 100644 --- a/testing/web-platform/tests/tools/wpt/tox.ini +++ b/testing/web-platform/tests/tools/wpt/tox.ini @@ -13,4 +13,4 @@ deps = -r{toxinidir}/../wptrunner/requirements_firefox.txt commands = - pytest --cov {posargs} + pytest {posargs} diff --git a/testing/web-platform/tests/tools/wptrunner/requirements_chrome.txt b/testing/web-platform/tests/tools/wptrunner/requirements_chrome.txt index 497cad357398..1bf6ef32ad47 100644 --- a/testing/web-platform/tests/tools/wptrunner/requirements_chrome.txt +++ b/testing/web-platform/tests/tools/wptrunner/requirements_chrome.txt @@ -1,2 +1,2 @@ -mozprocess == 0.26 +mozprocess==1.0.0 selenium==3.141.0 diff --git a/testing/web-platform/tests/tools/wptrunner/requirements_chrome_android.txt b/testing/web-platform/tests/tools/wptrunner/requirements_chrome_android.txt index 497cad357398..1bf6ef32ad47 100644 --- a/testing/web-platform/tests/tools/wptrunner/requirements_chrome_android.txt +++ b/testing/web-platform/tests/tools/wptrunner/requirements_chrome_android.txt @@ -1,2 +1,2 @@ -mozprocess == 0.26 +mozprocess==1.0.0 selenium==3.141.0 diff --git a/testing/web-platform/tests/tools/wptrunner/requirements_edge.txt b/testing/web-platform/tests/tools/wptrunner/requirements_edge.txt index 497cad357398..1bf6ef32ad47 100644 --- a/testing/web-platform/tests/tools/wptrunner/requirements_edge.txt +++ b/testing/web-platform/tests/tools/wptrunner/requirements_edge.txt @@ -1,2 +1,2 @@ -mozprocess == 0.26 +mozprocess==1.0.0 selenium==3.141.0 diff --git a/testing/web-platform/tests/tools/wptrunner/requirements_firefox.txt b/testing/web-platform/tests/tools/wptrunner/requirements_firefox.txt index 7e8514324947..656d57f4b200 100644 --- a/testing/web-platform/tests/tools/wptrunner/requirements_firefox.txt +++ b/testing/web-platform/tests/tools/wptrunner/requirements_firefox.txt @@ -1,9 +1,9 @@ marionette_driver==2.7.0 -mozprofile==2.1.0 -mozprocess == 0.26 +mozprofile==2.2.0 +mozprocess==1.0.0 mozcrash == 1.0 -mozrunner==7.2.0 +mozrunner==7.3.0 mozleak==0.2 mozinstall==2.0.0 mozdownload==1.25 -mozversion==1.5 +mozversion==2.1.0 diff --git a/testing/web-platform/tests/tools/wptrunner/requirements_ie.txt b/testing/web-platform/tests/tools/wptrunner/requirements_ie.txt index 497cad357398..1bf6ef32ad47 100644 --- a/testing/web-platform/tests/tools/wptrunner/requirements_ie.txt +++ b/testing/web-platform/tests/tools/wptrunner/requirements_ie.txt @@ -1,2 +1,2 @@ -mozprocess == 0.26 +mozprocess==1.0.0 selenium==3.141.0 diff --git a/testing/web-platform/tests/tools/wptrunner/requirements_opera.txt b/testing/web-platform/tests/tools/wptrunner/requirements_opera.txt index 497cad357398..1bf6ef32ad47 100644 --- a/testing/web-platform/tests/tools/wptrunner/requirements_opera.txt +++ b/testing/web-platform/tests/tools/wptrunner/requirements_opera.txt @@ -1,2 +1,2 @@ -mozprocess == 0.26 +mozprocess==1.0.0 selenium==3.141.0 diff --git a/testing/web-platform/tests/tools/wptrunner/requirements_safari.txt b/testing/web-platform/tests/tools/wptrunner/requirements_safari.txt index 497cad357398..1bf6ef32ad47 100644 --- a/testing/web-platform/tests/tools/wptrunner/requirements_safari.txt +++ b/testing/web-platform/tests/tools/wptrunner/requirements_safari.txt @@ -1,2 +1,2 @@ -mozprocess == 0.26 +mozprocess==1.0.0 selenium==3.141.0 diff --git a/testing/web-platform/tests/tools/wptrunner/requirements_sauce.txt b/testing/web-platform/tests/tools/wptrunner/requirements_sauce.txt index e38f4dea6703..f0a0965e0244 100644 --- a/testing/web-platform/tests/tools/wptrunner/requirements_sauce.txt +++ b/testing/web-platform/tests/tools/wptrunner/requirements_sauce.txt @@ -1,3 +1,3 @@ -mozprocess == 0.26 +mozprocess==1.0.0 selenium==3.141.0 requests==2.21.0 diff --git a/testing/web-platform/tests/tools/wptrunner/requirements_servo.txt b/testing/web-platform/tests/tools/wptrunner/requirements_servo.txt index 9115b7ac4e8f..470aaf9a9399 100644 --- a/testing/web-platform/tests/tools/wptrunner/requirements_servo.txt +++ b/testing/web-platform/tests/tools/wptrunner/requirements_servo.txt @@ -1 +1 @@ -mozprocess == 0.26 +mozprocess==1.0.0 diff --git a/testing/web-platform/tests/tools/wptrunner/setup.py b/testing/web-platform/tests/tools/wptrunner/setup.py index 63d3edde244d..0a16aa537b33 100644 --- a/testing/web-platform/tests/tools/wptrunner/setup.py +++ b/testing/web-platform/tests/tools/wptrunner/setup.py @@ -2,6 +2,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. +from __future__ import print_function + import glob import os import sys @@ -60,12 +62,12 @@ setup(name=PACKAGE_NAME, if "install" in sys.argv: path = os.path.relpath(os.path.join(sys.prefix, "requirements"), os.curdir) - print textwrap.fill("""In order to use with one of the built-in browser + print(textwrap.fill("""In order to use with one of the built-in browser products, you will need to install the extra dependencies. These are provided as requirements_[name].txt in the %s directory and can be installed using -e.g.""" % path, 80) +e.g.""" % path, 80)) - print """ + print(""" pip install -r %s/requirements_firefox.txt -""" % path +""" % path) diff --git a/testing/web-platform/tests/tools/wptrunner/test/test.py b/testing/web-platform/tests/tools/wptrunner/test/test.py index 9960dcd1e281..8f323a3386c9 100644 --- a/testing/web-platform/tests/tools/wptrunner/test/test.py +++ b/testing/web-platform/tests/tools/wptrunner/test/test.py @@ -1,3 +1,4 @@ +from __future__ import print_function import ConfigParser import argparse import os @@ -153,7 +154,7 @@ def main(): if args.pdb: import pdb import traceback - print traceback.format_exc() + print(traceback.format_exc()) pdb.post_mortem() else: raise diff --git a/testing/web-platform/tests/tools/wptrunner/tox.ini b/testing/web-platform/tests/tools/wptrunner/tox.ini index 4f5dcfb47bec..d784c5b299e3 100644 --- a/testing/web-platform/tests/tools/wptrunner/tox.ini +++ b/testing/web-platform/tests/tools/wptrunner/tox.ini @@ -20,6 +20,6 @@ deps = sauce: -r{toxinidir}/requirements_sauce.txt servo: -r{toxinidir}/requirements_servo.txt -commands = pytest {posargs:--cov} +commands = pytest {posargs} setenv = CURRENT_TOX_ENV = {envname} diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/edge.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/edge.py index 9a746819021c..25309617ad00 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/edge.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/edge.py @@ -1,3 +1,4 @@ +from __future__ import print_function from .base import Browser, ExecutorBrowser, require_arg from ..webdriver_server import EdgeDriverServer from ..executors import executor_kwargs as base_executor_kwargs @@ -76,7 +77,7 @@ class EdgeBrowser(Browser): def start(self, **kwargs): - print self.server.url + print(self.server.url) self.server.start() def stop(self, force=False): diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorselenium.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorselenium.py index fce1a5bc0d98..1ec1393a26b3 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorselenium.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorselenium.py @@ -372,7 +372,7 @@ class SeleniumRefTestExecutor(RefTestExecutor): """return [window.outerWidth - window.innerWidth, window.outerHeight - window.innerHeight];""" ) - self.protocol.webdriver.set_window_size(600 + width_offset, 600 + height_offset) + self.protocol.webdriver.set_window_rect(0, 0, 600 + width_offset, 600 + height_offset) result = self.implementation.run_test(test) diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorservo.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorservo.py index 506c0140d8ab..0c3aeda4eb13 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorservo.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorservo.py @@ -1,3 +1,4 @@ +from __future__ import print_function import base64 import json import os @@ -138,7 +139,7 @@ class ServoTestharnessExecutor(ProcessTestExecutor): self.result_flag.set() else: if self.interactive: - print line + print(line) else: self.logger.process_output(self.proc.pid, line, @@ -269,7 +270,7 @@ class ServoRefTestExecutor(ProcessTestExecutor): def on_output(self, line): line = line.decode("utf8", "replace") if self.interactive: - print line + print(line) else: self.logger.process_output(self.proc.pid, line, diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index dcab4b045291..92d5576a6e71 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -405,6 +405,7 @@ class WebDriverRefTestExecutor(RefTestExecutor): """return [window.outerWidth - window.innerWidth, window.outerHeight - window.innerHeight];""" ) + self.protocol.webdriver.window.position = (0, 0) self.protocol.webdriver.window.size = (600 + width_offset, 600 + height_offset) result = self.implementation.run_test(test) diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/reftest.js b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/reftest.js index 5bd5c609cbd5..97b3cacafc28 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/reftest.js +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/reftest.js @@ -1 +1 @@ -var win = window.open("about:blank", "test", "width=600,height=600"); +var win = window.open("about:blank", "test", "left=0,top=0,width=600,height=600"); diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/manifestupdate.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/manifestupdate.py index 90bcd593edec..86ac55f79157 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/manifestupdate.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/manifestupdate.py @@ -1,3 +1,4 @@ +from __future__ import print_function import itertools import os import urlparse @@ -89,7 +90,7 @@ class ExpectedManifest(ManifestItem): def append(self, child): ManifestItem.append(self, child) if child.id in self.child_map: - print "Warning: Duplicate heading %s" % child.id + print("Warning: Duplicate heading %s" % child.id) self.child_map[child.id] = child def _remove_child(self, child): diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/metadata.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/metadata.py index 35cc221bb2b7..2fe3defeb811 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/metadata.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/metadata.py @@ -1,3 +1,4 @@ +from __future__ import print_function import array import os import shutil @@ -49,9 +50,9 @@ def update_expected(test_paths, serve_root, log_file_names, for test in updated_ini.iterchildren(): for subtest in test.iterchildren(): if subtest.new_disabled: - print "disabled: %s" % os.path.dirname(subtest.root.test_path) + "/" + subtest.name + print("disabled: %s" % os.path.dirname(subtest.root.test_path) + "/" + subtest.name) if test.new_disabled: - print "disabled: %s" % test.root.test_path + print("disabled: %s" % test.root.test_path) def do_delayed_imports(serve_root): @@ -359,7 +360,7 @@ class ExpectedUpdater(object): try: test_data = self.id_test_map[test_id] except KeyError: - print "Test not found %s, skipping" % test_id + print("Test not found %s, skipping" % test_id) return if self.ignore_existing: diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/stability.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/stability.py index db388bbca0a2..c06f7e5e9d6b 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/stability.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/stability.py @@ -163,9 +163,12 @@ def err_string(results_dict, iterations): """Create and return string with errors from test run.""" rv = [] total_results = sum(results_dict.values()) - for key, value in sorted(results_dict.items()): - rv.append("%s%s" % - (key, ": %s/%s" % (value, iterations) if value != iterations else "")) + if total_results > iterations: + rv.append("Duplicate subtest name") + else: + for key, value in sorted(results_dict.items()): + rv.append("%s%s" % + (key, ": %s/%s" % (value, iterations) if value != iterations else "")) if total_results < iterations: rv.append("MISSING: %s/%s" % (iterations - total_results, iterations)) rv = ", ".join(rv) diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py index 1d6909daaca6..710f26ae81b4 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/wptcommandline.py @@ -1,3 +1,4 @@ +from __future__ import print_function import argparse import os import sys @@ -29,7 +30,7 @@ def require_arg(kwargs, name, value_func=None): value_func = lambda x: x is not None if name not in kwargs or not value_func(kwargs[name]): - print >> sys.stderr, "Missing required argument %s" % name + print("Missing required argument %s" % name, file=sys.stderr) sys.exit(1) @@ -417,7 +418,7 @@ def check_paths(kwargs): for test_paths in kwargs["test_paths"].itervalues(): if not ("tests_path" in test_paths and "metadata_path" in test_paths): - print "Fatal: must specify both a test path and metadata path" + print("Fatal: must specify both a test path and metadata path") sys.exit(1) if "manifest_path" not in test_paths: test_paths["manifest_path"] = os.path.join(test_paths["metadata_path"], @@ -431,11 +432,11 @@ def check_paths(kwargs): path = os.path.dirname(path) if not os.path.exists(path): - print "Fatal: %s path %s does not exist" % (name, path) + print("Fatal: %s path %s does not exist" % (name, path)) sys.exit(1) if not os.path.isdir(path): - print "Fatal: %s path %s is not a directory" % (name, path) + print("Fatal: %s path %s is not a directory" % (name, path)) sys.exit(1) @@ -488,7 +489,7 @@ def check_args(kwargs): if kwargs["binary"] is not None: if not os.path.exists(kwargs["binary"]): - print >> sys.stderr, "Binary path %s does not exist" % kwargs["binary"] + print("Binary path %s does not exist" % kwargs["binary"], file=sys.stderr) sys.exit(1) if kwargs["ssl_type"] is None: @@ -507,14 +508,14 @@ def check_args(kwargs): elif kwargs["ssl_type"] == "openssl": path = exe_path(kwargs["openssl_binary"]) if path is None: - print >> sys.stderr, "openssl-binary argument missing or not a valid executable" + print("openssl-binary argument missing or not a valid executable", file=sys.stderr) sys.exit(1) kwargs["openssl_binary"] = path if kwargs["ssl_type"] != "none" and kwargs["product"] == "firefox" and kwargs["certutil_binary"]: path = exe_path(kwargs["certutil_binary"]) if path is None: - print >> sys.stderr, "certutil-binary argument missing or not a valid executable" + print("certutil-binary argument missing or not a valid executable", file=sys.stderr) sys.exit(1) kwargs["certutil_binary"] = path @@ -524,7 +525,7 @@ def check_args(kwargs): kwargs['extra_prefs'] = [kwargs['extra_prefs']] missing = any('=' not in prefarg for prefarg in kwargs['extra_prefs']) if missing: - print >> sys.stderr, "Preferences via --setpref must be in key=value format" + print("Preferences via --setpref must be in key=value format", file=sys.stderr) sys.exit(1) kwargs['extra_prefs'] = [tuple(prefarg.split('=', 1)) for prefarg in kwargs['extra_prefs']] @@ -551,7 +552,7 @@ def check_args_update(kwargs): for item in kwargs["run_log"]: if os.path.isdir(item): - print >> sys.stderr, "Log file %s is a directory" % item + print("Log file %s is a directory" % item, file=sys.stderr) sys.exit(1) return kwargs diff --git a/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py b/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py index 48a932f1dc2f..79ec2844ebfe 100644 --- a/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py +++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/wptrunner.py @@ -1,4 +1,4 @@ -from __future__ import unicode_literals +from __future__ import print_function, unicode_literals import json import os @@ -87,7 +87,7 @@ def list_test_groups(test_paths, product, **kwargs): run_info_extras=run_info_extras, **kwargs) for item in sorted(test_loader.groups(kwargs["test_types"])): - print item + print(item) def list_disabled(test_paths, product, **kwargs): @@ -103,7 +103,7 @@ def list_disabled(test_paths, product, **kwargs): for test_type, tests in test_loader.disabled_tests.iteritems(): for test in tests: rv.append({"test": test.id, "reason": test.disabled()}) - print json.dumps(rv, indent=2) + print(json.dumps(rv, indent=2)) def list_tests(test_paths, product, **kwargs): @@ -115,7 +115,7 @@ def list_tests(test_paths, product, **kwargs): run_info_extras=run_info_extras, **kwargs) for test in test_loader.test_ids: - print test + print(test) def get_pause_after_test(test_loader, **kwargs): @@ -357,7 +357,7 @@ def main(): if kwargs["pdb"]: import pdb import traceback - print traceback.format_exc() + print(traceback.format_exc()) pdb.post_mortem() else: raise diff --git a/testing/web-platform/tests/uievents/click/auxclick_event-manual.html b/testing/web-platform/tests/uievents/click/auxclick_event.html similarity index 82% rename from testing/web-platform/tests/uievents/click/auxclick_event-manual.html rename to testing/web-platform/tests/uievents/click/auxclick_event.html index 786ebfaaebbc..9f4ffed96e6c 100644 --- a/testing/web-platform/tests/uievents/click/auxclick_event-manual.html +++ b/testing/web-platform/tests/uievents/click/auxclick_event.html @@ -6,6 +6,9 @@ + + + + + + +

Double Click

+

Double-click on the text area and check if the "dblclick" event is received.

+
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/web-animations/testcommon.js b/testing/web-platform/tests/web-animations/testcommon.js index 258d240cc5a1..889cab8bd31e 100644 --- a/testing/web-platform/tests/web-animations/testcommon.js +++ b/testing/web-platform/tests/web-animations/testcommon.js @@ -184,13 +184,13 @@ function waitForAnimationFramesWithDelay(minDelay) { function waitForNextFrame() { const timeAtStart = document.timeline.currentTime; return new Promise(resolve => { - window.requestAnimationFrame(() => { - if (timeAtStart === document.timeline.currentTime) { - window.requestAnimationFrame(resolve); - } else { - resolve(); - } - }); + (function handleFrame() { + if (timeAtStart === document.timeline.currentTime) { + window.requestAnimationFrame(handleFrame); + } else { + resolve(); + } + }()); }); } diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html b/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html new file mode 100644 index 000000000000..b69cb0e81259 --- /dev/null +++ b/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html @@ -0,0 +1,133 @@ + + + + + Test Sub-Sample Accurate Stitching of ABSNs + + + + + + + + + + diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/resources/sub-sample-scheduling.html b/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-scheduling.html similarity index 100% rename from testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/resources/sub-sample-scheduling.html rename to testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-scheduling.html diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html b/testing/web-platform/tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html index 386614ff2e20..0b09edd4a700 100644 --- a/testing/web-platform/tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html +++ b/testing/web-platform/tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html @@ -22,7 +22,9 @@ // Calculate the index for disconnection. function getDisconnectIndex(disconnectTime) { let disconnectIndex = disconnectTime * sampleRate; - return disconnectIndex -= (disconnectIndex) % renderQuantum; + disconnectIndex = renderQuantum * + Math.floor((disconnectIndex + renderQuantum - 1) / renderQuantum); + return disconnectIndex; } // Get the index of value change. @@ -35,7 +37,6 @@ // Task 1: test disconnect(AudioParam) method. audit.define('disconnect(AudioParam)', (task, should) => { - // Creates a buffer source with value [1] and then connect it to two // gain nodes in series. The output of the buffer source is lowered by // half @@ -89,14 +90,12 @@ should(channelData, 'Channel #0').containValues([2.25, 1.5]); should(valueChangeIndex, 'The index of value change') .beEqualTo(disconnectIndex); - }) .then(() => task.done()); }); // Task 2: test disconnect(AudioParam, output) method. audit.define('disconnect(AudioParam, output)', (task, should) => { - // Create a 2-channel buffer source with [1, 2] in each channel and // make a serial connection through gain1 and gain 2. The make the // buffer source half with a gain node and connect it to a 2-output @@ -168,7 +167,6 @@ valueChangeIndexCh1, 'The index of value change in channel #1') .beEqualTo(disconnectIndex); - }) .then(() => task.done()); }); @@ -191,19 +189,28 @@ gain3.connect(context.destination); // gain1 is not connected to gain3.gain. Exception should be thrown. - should(function() { - gain1.disconnect(gain3.gain); - }, 'gain1.disconnect(gain3.gain)').throw(DOMException, 'InvalidAccessError'); + should( + function() { + gain1.disconnect(gain3.gain); + }, + 'gain1.disconnect(gain3.gain)') + .throw(DOMException, 'InvalidAccessError'); // When the output index is good but the destination is invalid. - should(function() { - splitter.disconnect(gain1.gain, 1); - }, 'splitter.disconnect(gain1.gain, 1)').throw(DOMException, 'InvalidAccessError'); + should( + function() { + splitter.disconnect(gain1.gain, 1); + }, + 'splitter.disconnect(gain1.gain, 1)') + .throw(DOMException, 'InvalidAccessError'); // When both arguments are wrong, throw IndexSizeError first. - should(function() { - splitter.disconnect(gain1.gain, 2); - }, 'splitter.disconnect(gain1.gain, 2)').throw(DOMException, 'IndexSizeError'); + should( + function() { + splitter.disconnect(gain1.gain, 2); + }, + 'splitter.disconnect(gain1.gain, 2)') + .throw(DOMException, 'IndexSizeError'); task.done(); }); diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-disconnect.html b/testing/web-platform/tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-disconnect.html index 5fb18c8aee41..ad74d5e00457 100644 --- a/testing/web-platform/tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-disconnect.html +++ b/testing/web-platform/tests/webaudio/the-audio-api/the-channelmergernode-interface/audiochannelmerger-disconnect.html @@ -58,7 +58,9 @@ // Calculate the first zero index in the second channel. let channel1 = buffer.getChannelData(1); let disconnectIndex = disconnectTime * sampleRate; - disconnectIndex -= (disconnectIndex) % renderQuantum; + disconnectIndex = renderQuantum * + Math.floor( + (disconnectIndex + renderQuantum - 1) / renderQuantum); let firstZeroIndex = channel1.findIndex(function(element, index) { if (element === 0) return index; @@ -70,7 +72,6 @@ should( firstZeroIndex, 'The index of first zero in the channel #1') .beEqualTo(disconnectIndex); - }) .then(() => task.done()); }); diff --git a/testing/web-platform/tests/webrtc/RTCIceConnectionState-candidate-pair.https.html b/testing/web-platform/tests/webrtc/RTCIceConnectionState-candidate-pair.https.html new file mode 100644 index 000000000000..7280d0408563 --- /dev/null +++ b/testing/web-platform/tests/webrtc/RTCIceConnectionState-candidate-pair.https.html @@ -0,0 +1,33 @@ + + + +RTCIceConnectionState and RTCIceCandidatePair + + + + diff --git a/testing/web-platform/tests/webrtc/RTCPeerConnection-helper.js b/testing/web-platform/tests/webrtc/RTCPeerConnection-helper.js index 123402ccde6a..0b25df26190c 100644 --- a/testing/web-platform/tests/webrtc/RTCPeerConnection-helper.js +++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-helper.js @@ -205,6 +205,55 @@ async function doSignalingHandshake(localPc, remotePc, options={}) { await localPc.setRemoteDescription(answer); } +// Returns a promise that resolves when |pc.iceConnectionState| is 'connected' +// or 'completed'. +function listenToIceConnected(pc) { + return new Promise((resolve) => { + function isConnected(pc) { + return pc.iceConnectionState == 'connected' || + pc.iceConnectionState == 'completed'; + } + if (isConnected(pc)) { + resolve(); + return; + } + pc.oniceconnectionstatechange = () => { + if (isConnected(pc)) + resolve(); + }; + }); +} + +// Returns a promise that resolves when |pc.connectionState| is 'connected'. +function listenToConnected(pc) { + return new Promise((resolve) => { + if (pc.connectionState == 'connected') { + resolve(); + return; + } + pc.onconnectionstatechange = () => { + if (pc.connectionState == 'connected') + resolve(); + }; + }); +} + +// Resolves when RTP packets have been received. +function listenForSSRCs(t, receiver) { + return new Promise((resolve) => { + function listen() { + const ssrcs = receiver.getSynchronizationSources(); + assert_true(ssrcs != undefined); + if (ssrcs.length > 0) { + resolve(ssrcs); + return; + } + t.step_timeout(listen, 0); + }; + listen(); + }); +} + // Helper function to create a pair of connected data channel. // On success the promise resolves to an array with two data channels. // It does the heavy lifting of performing signaling handshake, diff --git a/testing/web-platform/tests/webrtc/RTCPeerConnection-iceConnectionState.html b/testing/web-platform/tests/webrtc/RTCPeerConnection-iceConnectionState.https.html similarity index 91% rename from testing/web-platform/tests/webrtc/RTCPeerConnection-iceConnectionState.html rename to testing/web-platform/tests/webrtc/RTCPeerConnection-iceConnectionState.https.html index b647b3d3e35e..8acabf49766b 100644 --- a/testing/web-platform/tests/webrtc/RTCPeerConnection-iceConnectionState.html +++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-iceConnectionState.https.html @@ -182,6 +182,26 @@ async_test(t => { }, 'connection with one data channel should eventually ' + 'have connected connection state'); + promise_test(async t => { + const caller = new RTCPeerConnection(); + t.add_cleanup(() => caller.close()); + const callee = new RTCPeerConnection(); + t.add_cleanup(() => callee.close()); + + caller.addTransceiver('audio', {direction:'recvonly'}); + const stream = await navigator.mediaDevices.getUserMedia({audio:true}); + const [track] = stream.getTracks(); + callee.addTrack(track, stream); + exchangeIceCandidates(caller, callee); + await doSignalingHandshake(caller, callee); + + assert_equals(caller.getTransceivers().length, 1); + const [transceiver] = caller.getTransceivers(); + assert_equals(transceiver.currentDirection, 'recvonly'); + + await listenToIceConnected(caller); + }, 'ICE can connect in a recvonly usecase'); + /* TODO 4.4.4 RTCIceConnectionState Enum diff --git a/testing/web-platform/tests/webrtc/RTCPeerConnection-track-stats.https.html b/testing/web-platform/tests/webrtc/RTCPeerConnection-track-stats.https.html index ed442129226a..2d0ce302a01b 100644 --- a/testing/web-platform/tests/webrtc/RTCPeerConnection-track-stats.https.html +++ b/testing/web-platform/tests/webrtc/RTCPeerConnection-track-stats.https.html @@ -417,7 +417,7 @@ callee.addTrack(tracks[1], streams[1]); exchangeIceCandidates(caller, callee); await doSignalingHandshake(caller, callee); - await onIceConnectionStateCompleted(caller); + await listenToConnected(caller); let receiver = caller.getReceivers()[0]; // Obtain inbound and outbound RTP stream stats on a full stats report. @@ -466,7 +466,7 @@ callee.addTrack(tracks[1], streams[1]); exchangeIceCandidates(caller, callee); await doSignalingHandshake(caller, callee); - await onIceConnectionStateCompleted(caller); + await listenToConnected(caller); let receiver = caller.getReceivers()[0]; // Obtain inbound and outbound RTP stream stats on a full stats report. @@ -515,7 +515,7 @@ callee.addTrack(tracks[1], streams[1]); exchangeIceCandidates(caller, callee); await doSignalingHandshake(caller, callee); - await onIceConnectionStateCompleted(caller); + await listenToIceConnected(caller); // Wait until RTCP has arrived so that it can not arrive between // the two get stats calls. @@ -547,7 +547,7 @@ callee.addTrack(tracks[1], streams[1]); exchangeIceCandidates(caller, callee); await doSignalingHandshake(caller, callee); - await onIceConnectionStateCompleted(caller); + await listenToIceConnected(caller); let receiver = caller.getReceivers()[0]; // Wait until RTCP has arrived so that it can not arrive between @@ -621,24 +621,6 @@ return stats; } - // Returns a promise that is resolved when pc.iceConnectionState reaches the - // 'connected' or 'completed' state. This is when transport stats can be - // expected to have its selectedCandidatePairId defined. - async function onIceConnectionStateCompleted(pc) { - if (pc.iceConnectionState == 'connected' || - pc.iceConnectionState == 'completed') { - return Promise.resolve(); - } - let resolver = new Resolver(); - pc.oniceconnectionstatechange = e => { - if (pc.iceConnectionState == 'connected' || - pc.iceConnectionState == 'completed') { - resolver.resolve(); - } - }; - return resolver; - } - // Explores the stats graph starting from |stat|, validating each stat // (validateRtcStats) and asserting that all stats of the report were visited. function validateStatsGraph(report, stat) { diff --git a/testing/web-platform/tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html b/testing/web-platform/tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html index 36460b479903..82ce3bd8467b 100644 --- a/testing/web-platform/tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html +++ b/testing/web-platform/tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html @@ -26,21 +26,6 @@ async function initiateSingleTrackCallAndReturnReceiver(t, kind) { return trackEvent.receiver; } -function listenForSSRCs(t, receiver) { - return new Promise((resolve) => { - function listen() { - const ssrcs = receiver.getSynchronizationSources(); - assert_true(ssrcs != undefined); - if (ssrcs.length > 0) { - resolve(ssrcs); - return; - } - t.step_timeout(listen, 0); - }; - listen(); - }); -} - for (const kind of ['audio', 'video']) { promise_test(async t => { const receiver = await initiateSingleTrackCallAndReturnReceiver(t, kind); diff --git a/testing/web-platform/tests/webxr/resources/webxr_util.js b/testing/web-platform/tests/webxr/resources/webxr_util.js index 7344fa05f655..26e30c48f36f 100644 --- a/testing/web-platform/tests/webxr/resources/webxr_util.js +++ b/testing/web-platform/tests/webxr/resources/webxr_util.js @@ -53,7 +53,8 @@ function xr_session_promise_test( testSession = session; // Session must have a baseLayer or frame requests // will be ignored. - session.baseLayer = new XRWebGLLayer(session, gl); + session.updateRenderState({ + baseLayer: new XRWebGLLayer(session, gl) }); resolve(func(session, testDeviceController, t)); }) .catch((err) => { diff --git a/testing/web-platform/tests/webxr/xrSession_identity_referenceSpace.https.html b/testing/web-platform/tests/webxr/xrSession_identity_referenceSpace.https.html new file mode 100644 index 000000000000..6cb25019fcd4 --- /dev/null +++ b/testing/web-platform/tests/webxr/xrSession_identity_referenceSpace.https.html @@ -0,0 +1,88 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_data_valid.https.html b/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_data_valid.https.html index f873a1158804..41801bcd3643 100644 --- a/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_data_valid.https.html +++ b/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_data_valid.https.html @@ -44,7 +44,7 @@ assert_not_equals(viewerPose, null); for(let i = 0; i < identityMatrix.length; i++) { - assert_equals(viewerPose.poseModelMatrix[i], identityMatrix[i]); + assert_equals(viewerPose.transform.matrix[i], identityMatrix[i]); } assert_not_equals(viewerPose.views, null); diff --git a/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html b/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html index ca6a71758c69..618dc13e4fe6 100644 --- a/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html +++ b/testing/web-platform/tests/webxr/xrSession_requestAnimationFrame_getViewerPose.https.html @@ -52,7 +52,7 @@ let pose = vrFrame.getViewerPose(referenceSpace); assert_not_equals(pose, null); - let poseMatrix = pose.poseModelMatrix; + let poseMatrix = pose.transform.matrix; assert_not_equals(poseMatrix, null); for(let i = 0; i < poseMatrix.length; i++) { diff --git a/testing/web-platform/tests/webxr/xrSession_requestReferenceSpace.https.html b/testing/web-platform/tests/webxr/xrSession_requestReferenceSpace.https.html index 1eb49e0b875b..bf4ec677655b 100644 --- a/testing/web-platform/tests/webxr/xrSession_requestReferenceSpace.https.html +++ b/testing/web-platform/tests/webxr/xrSession_requestReferenceSpace.https.html @@ -21,6 +21,14 @@ .then(() => promise_rejects(t, "NotSupportedError", session.requestReferenceSpace({ type: "stationary" }))) .then(() => promise_rejects(t, new TypeError(), session.requestReferenceSpace({ type: "stationary", subtype: "bar" }))) .then(() => Promise.all([ + session.requestReferenceSpace({ type: "identity" }).then( (referenceSpace) => { + t.step(() => { + assert_true(referenceSpace instanceof XRSpace, + "identity reference space is not correct type."); + assert_true(referenceSpace instanceof XRReferenceSpace, + "identity reference space is not correct type."); + }); + }), session.requestReferenceSpace({ type: "stationary", subtype: "position-disabled" }).then( (referenceSpace) => { t.step(() => { assert_true(referenceSpace instanceof XRSpace, diff --git a/toolkit/modules/LightweightThemeConsumer.jsm b/toolkit/modules/LightweightThemeConsumer.jsm index e4bdac16f3ef..a2fef1946397 100644 --- a/toolkit/modules/LightweightThemeConsumer.jsm +++ b/toolkit/modules/LightweightThemeConsumer.jsm @@ -135,7 +135,7 @@ function LightweightThemeConsumer(aDocument) { // We're responsible for notifying LightweightThemeManager when the OS is in // dark mode so it can activate the dark theme. We don't want this on Linux - // as default theme picks up the right colors from dark GTK themes. + // as the default theme picks up the right colors from dark GTK themes. if (AppConstants.platform != "linux") { this._darkThemeMediaQuery = this._win.matchMedia("(-moz-system-dark-theme)"); this._darkThemeMediaQuery.addListener(this.LightweightThemeManager); diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp index 13ec9f5cd4c7..e63308186779 100644 --- a/widget/windows/WinUtils.cpp +++ b/widget/windows/WinUtils.cpp @@ -1193,10 +1193,11 @@ AsyncFaviconDataReady::OnComplete(nsIURI* aFaviconURI, uint32_t aDataLen, RefPtr dataSurface; IntSize size; - if (mURLShortcut) { - // Create a 48x48 surface and paint the icon into the central 16x16 rect. - size.width = 48; - size.height = 48; + if (mURLShortcut && + (surface->GetSize().width < 48 || surface->GetSize().height < 48)) { + // Create a 48x48 surface and paint the icon into the central rect. + size.width = std::max(surface->GetSize().width, 48); + size.height = std::max(surface->GetSize().height, 48); dataSurface = Factory::CreateDataSourceSurface(size, SurfaceFormat::B8G8R8A8); NS_ENSURE_TRUE(dataSurface, NS_ERROR_FAILURE); @@ -1216,7 +1217,12 @@ AsyncFaviconDataReady::OnComplete(nsIURI* aFaviconURI, uint32_t aDataLen, } dt->FillRect(Rect(0, 0, size.width, size.height), ColorPattern(Color(1.0f, 1.0f, 1.0f, 1.0f))); - dt->DrawSurface(surface, Rect(16, 16, 16, 16), + IntPoint point; + point.x = (size.width - surface->GetSize().width) / 2; + point.y = (size.height - surface->GetSize().height) / 2; + dt->DrawSurface(surface, + Rect(point.x, point.y, surface->GetSize().width, + surface->GetSize().height), Rect(Point(0, 0), Size(surface->GetSize().width, surface->GetSize().height)));