Bug 49802

Summary: [Qt] REGRESSION (r72360): http/tests/security/aboutBlank/xss-DENIED-* tests fail
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, barraclough, commit-queue, oliver, robert
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Csaba Osztrogonác 2010-11-19 06:20:33 PST
http://build.webkit.org/results/Qt%20Linux%20Release/r72366%20%2823972%29/results.html

diffs are same:
-CONSOLE MESSAGE: line 1: TypeError: 'undefined' is not an object (evaluating 'target.document.body')
+CONSOLE MESSAGE: line 0: TypeError: 'undefined' is not an object
Comment 1 Csaba Osztrogonác 2010-11-19 07:16:19 PST
I added the failing tests to the Skipped list: http://trac.webkit.org/changeset/72397
Comment 2 Gavin Barraclough 2010-11-19 15:05:31 PST
Hi Ossy,

This should be an easy fix, but there are a couple of options, and I'm not sure which way we prefer to resolve this.

We've deliberately made a change to remove the source snippet ("(evaluating 'target.document.body')" in this case) from from error messages in release builds, unless the developer extras are enabled (i.e. inspector support is turned on).  So these results match correctly match those a user would see, if the inspector is not showing.  So one valid resolution would be to say, these are the correct results for a release run of this test case, and we should just check in expected results matching these.

However in order to ensure we are still testing the correct generation of these errors when the inspector is up, we're now always enabling the developer extras from DRT (in Qt's case, we do so from DumpRenderTree/qt/DumpRenderTreeQt.cpp).  So an alternative resolution for this bug would be to explore why the developer extras are not be enabled when this test case is run, and change this (I'm guessing it's something to do with this being a http test...?).  I'm not sure this buys us much, since the correct generation of these error messages is already well covered by LayoutTests.

Any thoughts on a preferred solution?

cheers,
G.
Comment 3 Robert Hogan 2011-01-16 04:11:58 PST
(In reply to comment #2)
> 
> We've deliberately made a change to remove the source snippet ("(evaluating 'target.document.body')" in this case) from from error messages in release builds, unless the developer extras are enabled (i.e. inspector support is turned on).  So these results match correctly match those a user would see, if the inspector is not showing.  

In this case, developerExtras is enabled but the inspector is not showing - hence the failure.

> Any thoughts on a preferred solution?
> 

The new results seem sane - otherwise we'll need to display the web inspector for these tests.
Comment 4 Robert Hogan 2011-01-16 05:48:59 PST
Created attachment 79096 [details]
Patch
Comment 5 Robert Hogan 2011-01-16 05:54:46 PST
Created attachment 79097 [details]
Patch
Comment 6 WebKit Commit Bot 2011-01-22 04:33:35 PST
Comment on attachment 79097 [details]
Patch

Rejecting attachment 79097 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-3', 'apply-..." exit_code: 2

Last 500 characters of output:
te-expected.txt
patching file LayoutTests/platform/qt/http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url-expected.txt
patching file LayoutTests/platform/qt/http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt
patching file Tools/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Kenneth Rohde Christia..." exit_code: 1

Full output: http://queues.webkit.org/results/7605252
Comment 7 Robert Hogan 2011-01-22 04:57:54 PST
Created attachment 79843 [details]
Patch
Comment 8 WebKit Commit Bot 2011-01-22 06:14:05 PST
Comment on attachment 79843 [details]
Patch

Clearing flags on attachment: 79843

Committed r76446: <http://trac.webkit.org/changeset/76446>
Comment 9 WebKit Commit Bot 2011-01-22 06:14:11 PST
All reviewed patches have been landed.  Closing bug.