Summary: | Web Automation: implement Automation.addSingleCookie | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | BJ Burg <bburg> | ||||||
Component: | Web Inspector | Assignee: | BJ Burg <bburg> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bburg, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | 156091 | ||||||||
Bug Blocks: | 156345 | ||||||||
Attachments: |
|
Description
BJ Burg
2016-04-06 16:48:09 PDT
Created attachment 275832 [details]
Proposed Fix
Created attachment 275941 [details]
For EWS
Committed r199197: <http://trac.webkit.org/changeset/199197> Comment on attachment 275941 [details] For EWS View in context: https://bugs.webkit.org/attachment.cgi?id=275941&action=review > Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:754 > + WebCore::URL activeURL = WebCore::URL(WebCore::URL(), page->pageLoadState().activeURL()); I suggest writing this in a way where WebCore::URL is not repeated as much. Either with auto, or just as a declaration without the "=". > Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:755 > + ASSERT(activeURL.isValid()); Why is this a valid assertion? Is there some guarantee? > Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:759 > + if (!cookieObject.getString(WTF::ASCIILiteral("name"), cookie.name)) WTF prefix here is unneeded. > Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:782 > + cookie.expires = expires * 1000.0; No need for the ".0" here. > Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:794 > + WebCookieManagerProxy* cookieManager = m_processPool->supplement<WebCookieManagerProxy>(); > + cookieManager->addCookie(cookie, activeURL.host()); I suggest writing this on a single line. |