зеркало из 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");
|
||||
|
||||
let expectedProps = {
|
||||
"constructor": { value: { type: "object" } },
|
||||
};
|
||||
let expectedProps = Object.getOwnPropertyNames(document.__proto__);
|
||||
|
||||
let props = aResponse.ownProperties;
|
||||
ok(props, "response properties available");
|
||||
|
||||
if (props) {
|
||||
ok(Object.keys(props).length == Object.keys(expectedProps).length,
|
||||
"number of enumerable properties");
|
||||
checkObject(props, expectedProps);
|
||||
isDeeply(Object.keys(props), expectedProps, "Same own properties.");
|
||||
}
|
||||
|
||||
closeDebugger(aState, function() {
|
||||
|
|
|
@ -115,7 +115,7 @@ function doConsoleCalls(aState)
|
|||
{
|
||||
type: "object",
|
||||
actor: /[a-z]/,
|
||||
class: "XULDocument",
|
||||
class: "HTMLDocument",
|
||||
},
|
||||
{
|
||||
type: "object",
|
||||
|
|
|
@ -87,7 +87,7 @@ function doConsoleCalls(aState)
|
|||
{
|
||||
type: "object",
|
||||
actor: /[a-z]/,
|
||||
class: "XULDocument",
|
||||
class: "HTMLDocument",
|
||||
},
|
||||
{
|
||||
type: "object",
|
||||
|
|
|
@ -91,7 +91,7 @@ async function doWindowEval() {
|
|||
input: "document",
|
||||
result: {
|
||||
type: "object",
|
||||
class: "XULDocument",
|
||||
class: "HTMLDocument",
|
||||
actor: /[a-z]/,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -79,7 +79,7 @@ function onAttach(state, response) {
|
|||
"foobaz": {
|
||||
value: {
|
||||
type: "object",
|
||||
class: "XULDocument",
|
||||
class: "HTMLDocument",
|
||||
actor: /[a-z]/,
|
||||
},
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче