Bug 92307 - Improve the output of editing/pasteboard/paste-noscript-xhtml.xhtml
Summary: Improve the output of editing/pasteboard/paste-noscript-xhtml.xhtml
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 92310
  Show dependency treegraph
 
Reported: 2012-07-25 15:17 PDT by Ryosuke Niwa
Modified: 2012-07-25 16:41 PDT (History)
5 users (show)

See Also:


Attachments
Patch (12.05 KB, patch)
2012-07-25 15:30 PDT, Ryosuke Niwa
tony: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2012-07-25 15:17:08 PDT
Improve the output of editing/pasteboard/paste-noscript-xhtml.xhtml
Comment 1 Ryosuke Niwa 2012-07-25 15:30:03 PDT
Created attachment 154462 [details]
Patch
Comment 2 Tony Chang 2012-07-25 15:58:48 PDT
Comment on attachment 154462 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154462&action=review

> LayoutTests/editing/pasteboard/resources/paste-noscript-content.html:13
> -<iframe id="iframe1" src="javascript:sayHello()" style="width: 200px; height: 100px; background-color:#cee;"></iframe>
> +<iframe id="iframe1" src="javascript:alert('hello')" style="width: 200px; height: 100px; background-color:#cee;"></iframe>

Wasn't this testing that sayHello isn't in the same context?  Maybe change it to something like alert(window.sayHello ? 'FAILED' : 'PASSED: sayHello not found').
Comment 3 Ryosuke Niwa 2012-07-25 16:00:39 PDT
Comment on attachment 154462 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154462&action=review

>> LayoutTests/editing/pasteboard/resources/paste-noscript-content.html:13
>> +<iframe id="iframe1" src="javascript:alert('hello')" style="width: 200px; height: 100px; background-color:#cee;"></iframe>
> 
> Wasn't this testing that sayHello isn't in the same context?  Maybe change it to something like alert(window.sayHello ? 'FAILED' : 'PASSED: sayHello not found').

No. The test simply checks that this attribute value is stripped. So the reference error you see is generated the first time this document is loaded in the iframe, not when it's pasted.
Comment 4 Ryosuke Niwa 2012-07-25 16:41:58 PDT
Committed r123678: <http://trac.webkit.org/changeset/123678>