mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Use getAttribute('class') instead of className so that reftest can run SVG tests. On SVG elements className is of type SVGAnimatedString instead of DOMString.
This commit is contained in:
parent
ef68cab249
commit
f86cf234bc
@ -203,17 +203,22 @@ function OnDocumentLoad(event)
|
||||
// Ignore load events for subframes.
|
||||
return;
|
||||
|
||||
var contentRootElement = gBrowser.contentDocument.documentElement;
|
||||
|
||||
function shouldWait() {
|
||||
return contentRootElement.className.split(/\s+/)
|
||||
// use getAttribute because className works differently in HTML and SVG
|
||||
return contentRootElement.hasAttribute('class') &&
|
||||
contentRootElement.getAttribute('class').split(/\s+/)
|
||||
.indexOf("reftest-wait") != -1;
|
||||
}
|
||||
|
||||
function doPrintMode() {
|
||||
return contentRootElement.className.split(/\s+/)
|
||||
// use getAttribute because className works differently in HTML and SVG
|
||||
return contentRootElement.hasAttribute('class') &&
|
||||
contentRootElement.getAttribute('class').split(/\s+/)
|
||||
.indexOf("reftest-print") != -1;
|
||||
}
|
||||
|
||||
var contentRootElement = gBrowser.contentDocument.documentElement;
|
||||
if (shouldWait()) {
|
||||
// The testcase will let us know when the test snapshot should be made.
|
||||
// Register a mutation listener to know when the 'reftest-wait' class
|
||||
|
Loading…
Reference in New Issue
Block a user