Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Match content::WebContentsTester::For calls.
- let WCTFor callExpr(callee(cxxMethodDecl(hasName("::content::WebContentsTester::For"))), hasArgument(0, expr().bind("arg1")))
- # Match calls on the objects which are subclasses of WebContents.
- let WCSubclasses expr(hasType(pointerType(pointee(recordType(hasDeclaration(cxxRecordDecl(isSameOrDerivedFrom(hasName("::content::WebContents"))))))))).bind("arg1")
- # Match web_contents_tester() calls.
- # TODO
- # Match NavigateAndCommmit method.
- let NC cxxMethodDecl(hasName("NavigateAndCommit"))
- let FindAll cxxMemberCallExpr(on(anyOf(WCTFor, WCSubclasses)), callee(NC), hasArgument(0, expr().bind("arg2")))
- replace FindAll; content::NavigationSimulator::NavigateAndCommitFromBrowser($(arg1), $(arg2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement