Update web-platform-tests to revision d7afcb8708eac08a614d161d5622a48172daf7e3

This commit is contained in:
WPT Sync Bot 2019-05-15 10:40:54 -04:00 committed by Josh Matthews
parent 6f8bb4dd40
commit edff458e23
791 changed files with 17647 additions and 10322 deletions

View file

@ -89,6 +89,42 @@ async_test(function() {
assert_equals(Object.getPrototypeOf(dp), child.DOMParser.prototype);
assert_equals(object_realm(dp), "parent window");
}, "Constructor in parent window with bad NewTarget from child window");
test(function() {
var badNewTarget = Function.prototype.bind.call(new child.Function());
badNewTarget.prototype = 7;
var dp = Reflect.construct(DOMParser, [], badNewTarget);
assert_equals(Object.getPrototypeOf(dp), child.DOMParser.prototype);
assert_equals(object_realm(dp), "parent window");
}, "Constructor in parent window with bad NewTarget from parent window that's a bound child window function");
test(function() {
var badNewTarget = child.Function.prototype.bind.call(new Function());
badNewTarget.prototype = 7;
var dp = Reflect.construct(child.DOMParser, [], badNewTarget);
assert_equals(Object.getPrototypeOf(dp), DOMParser.prototype);
assert_equals(object_realm(dp), "child window");
}, "Constructor in child window with bad NewTarget from child window that's a bound parent window function");
test(function() {
var badNewTarget = new Proxy(new child.Function(), {});
badNewTarget.prototype = 7;
var dp = Reflect.construct(DOMParser, [], badNewTarget);
assert_equals(Object.getPrototypeOf(dp), child.DOMParser.prototype);
assert_equals(object_realm(dp), "parent window");
}, "Constructor in parent window with bad NewTarget from parent window that's a proxy for a child window function");
test(function() {
var badNewTarget = new child.Proxy(new Function(), {});
badNewTarget.prototype = 7;
var dp = Reflect.construct(child.DOMParser, [], badNewTarget);
assert_equals(Object.getPrototypeOf(dp), DOMParser.prototype);
assert_equals(object_realm(dp), "child window");
}, "Constructor in child window with bad NewTarget from child window that's a proxy for a parent window function");
});
iframe.src = "constructors-support.html";
document.body.appendChild(iframe);

View file

@ -1,5 +1,5 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
[Constructor]
interface LotteryResults {
readonly attribute unsigned short[][] numbers;
};
readonly attribute FrozenArray<FrozenArray<unsigned short>> numbers;
};

View file

@ -1,14 +1,8 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
exception InvalidName {
DOMString reason;
};
exception NoSuchPet { };
interface Person {
// A simple attribute that can be set to any value the range an unsigned
// short can take.
attribute unsigned short age;
};
};

View file

@ -9,10 +9,3 @@ interface Util {
const unrestricted double minusonedividedbyzero = -Infinity;
const short notanumber = NaN;
};
exception Error {
const short ERR_UNKNOWN = 0;
const short ERR_OUT_OF_MEMORY = 1;
short errorCode;
};

View file

@ -1,7 +0,0 @@
// from http://lists.w3.org/Archives/Public/public-script-coord/2010OctDec/0112.html
exception DOMException {
unsigned short code;
};
exception HierarchyRequestError : DOMException { };
exception NoModificationAllowedError : DOMException { };

View file

@ -1,8 +0,0 @@
// Extracted from http://dev.w3.org/2006/webapi/WebIDL/ on 2011-05-06
interface Dahut {
attribute DOMString type;
};
exception SomeException {
};

View file

@ -5,14 +5,14 @@
// Exception identifier: "FrameworkException"
// Qualified name: "::framework::FrameworkException"
exception FrameworkException {
interface FrameworkException {
// Constant identifier: "ERR_NOT_FOUND"
// Qualified name: "::framework::FrameworkException::ERR_NOT_FOUND"
const long ERR_NOT_FOUND = 1;
// Exception field identifier: "code"
long code;
attribute long code;
};
// Interface identifier: "System"
@ -41,4 +41,4 @@
interface Foo {
void op(object interface);
};
};

View file

@ -7,6 +7,6 @@ interface OrderedMap {
deleter void removeByIndex(unsigned long index);
getter any get(DOMString name);
setter creator void set(DOMString name, any value);
setter void set(DOMString name, any value);
deleter void remove(DOMString name);
};
};

View file

@ -1,8 +1,6 @@
interface SessionManager {
Session getSessionForUser(DOMString username);
readonly attribute unsigned long sessionCount;
Session iterator;
};
interface Session {
@ -13,8 +11,6 @@ interface Session {
interface SessionManager2 {
Session2 getSessionForUser(DOMString username);
readonly attribute unsigned long sessionCount;
Session2 iterator = SessionIterator;
};
interface Session2 {
@ -25,11 +21,3 @@ interface Session2 {
interface SessionIterator {
readonly attribute unsigned long remainingSessions;
};
interface NodeList {
Node iterator = NodeIterator;
};
interface NodeIterator {
Node iterator object;
};

View file

@ -4,8 +4,6 @@ interface Dimensions {
attribute unsigned long height;
};
exception NoPointerDevice { };
interface Button {
// An operation that takes no arguments, returns a boolean
@ -14,4 +12,4 @@ interface Button {
// Overloaded operations.
void setDimensions(Dimensions size);
void setDimensions(unsigned long width, unsigned long height);
};
};

View file

@ -5,13 +5,13 @@ interface Transaction {
readonly attribute DOMString description;
readonly attribute unsigned long number;
serializer;
[Default] object toJSON();
};
interface Account {
attribute DOMString name;
attribute unsigned long number;
serializer DOMString serialize();
DOMString serialize();
};
interface Transaction2 {
@ -20,45 +20,35 @@ interface Transaction2 {
readonly attribute float amount;
readonly attribute DOMString description;
readonly attribute unsigned long number;
serializer = { from, to, amount, description };
};
interface Account2 {
attribute DOMString name;
attribute unsigned long number;
serializer = number;
};
interface Account3 {
attribute DOMString name;
attribute unsigned long number;
serializer = { attribute };
};
interface Account4 {
getter object getItem(unsigned long index);
serializer = { getter };
};
interface Account5 : Account {
attribute DOMString secondname;
serializer = { inherit, secondname };
};
interface Account6 : Account {
attribute DOMString secondname;
serializer = { inherit, attribute };
};
interface Account7 {
attribute DOMString name;
attribute unsigned long number;
serializer = [ name, number ];
};
interface Account8 {
getter object getItem(unsigned long index);
serializer = [ getter ];
};
};

View file

@ -1,3 +1,3 @@
interface Suffixes {
void test(sequence<DOMString[]?>? foo);
void test(sequence<FrozenArray<DOMString>?>? foo);
};