зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1550801 - Replace expected XULDocument with HTMLDocument in devtools tests. r=nchevobbe
test_bug819670_getter_throws.html: Previously, the document context inspected in the console was the test harness XULDocument, but now it will be an HTMLDocument. Update the checks to make sure the inspected object has the same own properties as the test documents own properties. other tests: Simply replace the expected document type. Differential Revision: https://phabricator.services.mozilla.com/D38695 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b5907700eb
Коммит
efab80cbeb
|
@ -49,17 +49,13 @@ function onInspect(aState, aResponse)
|
||||||
{
|
{
|
||||||
ok(!aResponse.error, "no response error");
|
ok(!aResponse.error, "no response error");
|
||||||
|
|
||||||
let expectedProps = {
|
let expectedProps = Object.getOwnPropertyNames(document.__proto__);
|
||||||
"constructor": { value: { type: "object" } },
|
|
||||||
};
|
|
||||||
|
|
||||||
let props = aResponse.ownProperties;
|
let props = aResponse.ownProperties;
|
||||||
ok(props, "response properties available");
|
ok(props, "response properties available");
|
||||||
|
|
||||||
if (props) {
|
if (props) {
|
||||||
ok(Object.keys(props).length == Object.keys(expectedProps).length,
|
isDeeply(Object.keys(props), expectedProps, "Same own properties.");
|
||||||
"number of enumerable properties");
|
|
||||||
checkObject(props, expectedProps);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
closeDebugger(aState, function() {
|
closeDebugger(aState, function() {
|
||||||
|
|
|
@ -115,7 +115,7 @@ function doConsoleCalls(aState)
|
||||||
{
|
{
|
||||||
type: "object",
|
type: "object",
|
||||||
actor: /[a-z]/,
|
actor: /[a-z]/,
|
||||||
class: "XULDocument",
|
class: "HTMLDocument",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "object",
|
type: "object",
|
||||||
|
|
|
@ -87,7 +87,7 @@ function doConsoleCalls(aState)
|
||||||
{
|
{
|
||||||
type: "object",
|
type: "object",
|
||||||
actor: /[a-z]/,
|
actor: /[a-z]/,
|
||||||
class: "XULDocument",
|
class: "HTMLDocument",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "object",
|
type: "object",
|
||||||
|
|
|
@ -91,7 +91,7 @@ async function doWindowEval() {
|
||||||
input: "document",
|
input: "document",
|
||||||
result: {
|
result: {
|
||||||
type: "object",
|
type: "object",
|
||||||
class: "XULDocument",
|
class: "HTMLDocument",
|
||||||
actor: /[a-z]/,
|
actor: /[a-z]/,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -79,7 +79,7 @@ function onAttach(state, response) {
|
||||||
"foobaz": {
|
"foobaz": {
|
||||||
value: {
|
value: {
|
||||||
type: "object",
|
type: "object",
|
||||||
class: "XULDocument",
|
class: "HTMLDocument",
|
||||||
actor: /[a-z]/,
|
actor: /[a-z]/,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче