Summary: | Fix to enable XSSAuditor on child windows | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||
Component: | DOM | Assignee: | Adam Barth <abarth> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | abarth, dbates | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Daniel Bates
2009-06-20 23:57:07 PDT
Created attachment 31606 [details]
Patch with a test
Comment on attachment 31606 [details] Patch with a test Thanks Dan! Below are some minor style nits. I'll fix them before landing the patch. > +XSSAuditor::XSSAuditor(Frame* frame) : m_frame(frame) The ": m_frame" bit should be on the next line. > + layoutTestController.dumpChildFramesAsText(); The test doesn't create any child windows, so this call doesn't do anything. > + var event = document.createEvent('MouseEvent'); > + event.initEvent('click', true, true); > + document.getElementById('anchorLink').dispatchEvent(event); I think the anchor tag has a click() method that would be eaiser, but this does the job. > +if (window.layoutTestController) { > + layoutTestController.notifyDone(); > +} No braces needed for if statements with single-line bodies. Sending LayoutTests/ChangeLog Adding LayoutTests/http/tests/security/xssAuditor/link-opens-new-window-expected.txt Adding LayoutTests/http/tests/security/xssAuditor/link-opens-new-window.html Adding LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag-and-notify.php Sending WebCore/ChangeLog Sending WebCore/page/XSSAuditor.cpp Sending WebCore/page/XSSAuditor.h Transmitting file data ....... Committed revision 44927. |