Bug 44725

Summary: Userscripts on special documents should be tested
Product: WebKit Reporter: Brian Weinstein <bweinstein>
Component: WebCore Misc.Assignee: Brian Weinstein <bweinstein>
Status: RESOLVED FIXED    
Severity: Normal CC: rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Tests hyatt: review+, bweinstein: commit-queue-

Description Brian Weinstein 2010-08-26 15:32:20 PDT
We should be testing injecting user scripts on MediaDocument, PluginDocument, and ImageDocument. These follow a different code path to have scripts injected (their documents are custom-built), and this should be tested.

We had a bug where start scripts weren't injected for these documents, and this was fixed in http://trac.webkit.org/changeset/66129 and http://trac.webkit.org/changeset/61271, but wasn't tested.
Comment 1 Brian Weinstein 2010-08-26 15:37:47 PDT
Created attachment 65632 [details]
[PATCH] Tests
Comment 2 Dave Hyatt 2010-08-26 15:52:57 PDT
Comment on attachment 65632 [details]
[PATCH] Tests

r=me
Comment 3 Brian Weinstein 2010-08-26 15:55:25 PDT
Landed in r66144.
Comment 4 Ryosuke Niwa 2010-08-26 18:09:28 PDT
Tests added in http://trac.webkit.org/changeset/66144 seem to be failing on Snow Leopard (WebKit2):
@@ -1,5 +1,2 @@
-CONSOLE MESSAGE: line 1: Start Script
-CONSOLE MESSAGE: line 1: End Script
-CONSOLE MESSAGE: line 1: Start Script
-CONSOLE MESSAGE: line 1: End Script
+CONSOLE MESSAGE: line 6: TypeError: Result of expression 'window.layoutTestController.addUserScript' [undefined] is not a function.