Determine if the WM entry is complete or not
Use the same logic from CTS tests Read the information from flickerlib and display in winscope Test: yarn run dev and open a few WM traces Bug: 167521440 Change-Id: I96cb956968066afaabb3acf53615db53bdfabe37
This commit is contained in:
@@ -26,6 +26,21 @@ export const DiffType = Object.freeze({
|
||||
MODIFIED: 'modified',
|
||||
});
|
||||
|
||||
export function asRawTreeViewObject(obj) {
|
||||
const children = obj.children?.map(child => child.rawTreeViewObject) ?? []
|
||||
|
||||
return {
|
||||
kind: obj.kind,
|
||||
name: obj.name,
|
||||
shortName: obj.shortName,
|
||||
stableId: obj.stableId,
|
||||
chips: obj.chips,
|
||||
obj: obj.obj,
|
||||
children,
|
||||
ref: obj,
|
||||
};
|
||||
}
|
||||
|
||||
export function defaultModifiedCheck(newNode, oldNode) {
|
||||
if (!newNode && !oldNode) {
|
||||
return false;
|
||||
@@ -44,16 +59,16 @@ function isPrimitive(test) {
|
||||
|
||||
export class DiffGenerator {
|
||||
constructor(tree) {
|
||||
if (tree.asRawTreeViewObject) {
|
||||
this.tree = tree.asRawTreeViewObject();
|
||||
if (tree.rawTreeViewObject) {
|
||||
this.tree = tree.rawTreeViewObject;
|
||||
} else {
|
||||
this.tree = tree;
|
||||
}
|
||||
}
|
||||
|
||||
compareWith(tree) {
|
||||
if (tree?.asRawTreeViewObject) {
|
||||
this.diffWithTree = tree.asRawTreeViewObject();
|
||||
if (tree?.rawTreeViewObject) {
|
||||
this.diffWithTree = tree.rawTreeViewObject;
|
||||
} else {
|
||||
this.diffWithTree = tree;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user