<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>62108</bug_id>
          
          <creation_ts>2011-06-05 06:29:56 -0700</creation_ts>
          <short_desc>[Qt] Failing test media/video-document-types.html</short_desc>
          <delta_ts>2011-11-09 09:37:13 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>62089</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Hogan">robert</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bpwv64</cc>
    
    <cc>hausmann</cc>
    
    <cc>jesus</cc>
    
    <cc>menard</cc>
    
    <cc>ossy</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>415594</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2011-06-05 06:29:56 -0700</bug_when>
    <thetext>Do the Qt equivalent of  https://bugs.webkit.org/show_bug.cgi?id=31352 and http://trac.webkit.org/changeset/51104</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494541</commentid>
    <comment_count>1</comment_count>
      <attachid>113300</attachid>
    <who name="Deepak Sherveghar">bpwv64</who>
    <bug_when>2011-11-02 03:55:11 -0700</bug_when>
    <thetext>Created attachment 113300
patch

media/video-document-types.html (when removed from the QT skipped list) runs fine now with the latest code base.

But logically, we still need to cancel the main resource load, if the data is handled by MediaDocument.
Webkit2 as well as all other ports (GTK/Chromium etc) do that.

In my patch I didn&apos;t un-skip the media/video-document-types.html because the media folder itself is in 
skipped list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494616</commentid>
    <comment_count>2</comment_count>
    <who name="Jesus Sanchez-Palencia">jesus</who>
    <bug_when>2011-11-02 07:28:01 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Created an attachment (id=113300) [details]
&gt; patch
&gt; 
&gt; media/video-document-types.html (when removed from the QT skipped list) runs fine now with the latest code base.
&gt; 
&gt; But logically, we still need to cancel the main resource load, if the data is handled by MediaDocument.
&gt; Webkit2 as well as all other ports (GTK/Chromium etc) do that.
&gt; 
&gt; In my patch I didn&apos;t un-skip the media/video-document-types.html because the media folder itself is in 
&gt; skipped list.

LGTM. I was going to fix our WebKit1 shouldFallBack implementation, so thanks! :)

I&apos;m not 100% sure about the commitLoad part but I did a quick check and other ports are handling it like that, as you said. Isn&apos;t there any other tests we can un-skip after this?

By the way, can&apos;t we un-skip the media folder and this test and then just skip everything else in there?

Thanks again!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494665</commentid>
    <comment_count>3</comment_count>
      <attachid>113300</attachid>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2011-11-02 09:30:33 -0700</bug_when>
    <thetext>Comment on attachment 113300
patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494673</commentid>
    <comment_count>4</comment_count>
      <attachid>113300</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-02 09:44:53 -0700</bug_when>
    <thetext>Comment on attachment 113300
patch

Clearing flags on attachment: 113300

Committed r99071: &lt;http://trac.webkit.org/changeset/99071&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494674</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-02 09:44:57 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494816</commentid>
    <comment_count>6</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-11-02 12:37:51 -0700</bug_when>
    <thetext>Reopen, because it broke 4 layout tests on the Qt bot:
http://build.webkit.org/results/Qt%20Linux%20Release/r99073%20%2839226%29/results.html

Could you check it please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>495346</commentid>
    <comment_count>7</comment_count>
    <who name="Deepak Sherveghar">bpwv64</who>
    <bug_when>2011-11-03 04:37:26 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Reopen, because it broke 4 layout tests on the Qt bot:
&gt; http://build.webkit.org/results/Qt%20Linux%20Release/r99073%20%2839226%29/results.html
&gt; 
&gt; Could you check it please?

I spent some time debugging this issue and found the root cause.

The problem is not with my patch, but the enum that we have borrowed from mac

(code from FrameLoaderClientQt.cpp:930)
// This was copied from file &quot;WebKit/Source/WebKit/mac/Misc/WebKitErrors.h&quot;.
enum {
    WebKitErrorCannotShowMIMEType =                             100,
    WebKitErrorCannotShowURL =                                  101,
    WebKitErrorFrameLoadInterruptedByPolicyChange =             102,
    WebKitErrorCannotUseRestrictedPort =                        103,
    WebKitErrorCannotFindPlugIn =                               200,
    WebKitErrorCannotLoadPlugIn =                               201,
    WebKitErrorJavaUnavailable =                                202,
    WebKitErrorPluginWillHandleLoad =                           203
};

shouldFallBack() tells the DOM if it should attempt to render the next nested &lt;object&gt; if its parent fails to load. Now when a url fails to load, QNetworkReplyHandler sets the QNetworkReply::NetworkError ( reply-&gt;error() any one of all possible error conditions found during the processing of the request) and converts that to ResourceError object setting appropriate fields like domain, error code, description etc.

The QNetworkReply::NetworkError constant values clash with values selected for our enum (listed above).
ie:
QNetworkReply::NetworkError constant values :
Constant			Value	
=====================================
ProxyConnectionRefusedError	101	
ProxyConnectionClosedError	102	
ProxyNotFoundError		103	
ProxyTimeoutError		104	
ProxyAuthenticationRequiredError105	
ContentAccessDenied		201	
ContentOperationNotPermittedError202	
ContentNotFoundError		203	
AuthenticationRequiredError	204	
ContentReSendError		205	
ProtocolUnknownError		301	
ProtocolInvalidOperationError	302	
UnknownNetworkError		99	
UnknownProxyError		199	
UnknownContentError		299	
ProtocolFailure			399

In the failing test case we get error.errorCode() as 203, which with respect to network error is &apos;ContentNotFoundError&apos; and with respect to our enum is &apos;WebKitErrorPluginWillHandleLoad&apos;.

Changing the enum values for WebKitError&apos;s to some other constant values like WebKitErrorPluginWillHandleLoad = 2003,
Then the failing test cases work fine.

I think to track changes better we should file a separate bug for resolving this enum issue and close the current reopened issue.
Let me know if you have any comments ???? also let me know if I can go ahead and file a separate bug and a patch for that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>495352</commentid>
    <comment_count>8</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-11-03 04:50:32 -0700</bug_when>
    <thetext>Thanks for debugging. I agree with you, please file a separate bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>495361</commentid>
    <comment_count>9</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-11-03 05:06:18 -0700</bug_when>
    <thetext>I added the failing tests to the skipped list to make buildbot happier:
http://trac.webkit.org/changeset/99168 . Please unskip them with the fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496173</commentid>
    <comment_count>10</comment_count>
    <who name="Deepak Sherveghar">bpwv64</who>
    <bug_when>2011-11-04 05:39:06 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; I added the failing tests to the skipped list to make buildbot happier:
&gt; http://trac.webkit.org/changeset/99168 . Please unskip them with the fix.

Thanks Csaba Osztrogonac.
Done. https://bugs.webkit.org/show_bug.cgi?id=71554

(In reply to comment #2)
&gt; By the way, can&apos;t we un-skip the media folder and this test and then just skip &gt; everything else in there?

I actually tried that with my local QT build.
Many of the skipped test cases for media do work fine. Atleast on my local qt 
linux build.

I wasn&apos;t sure of the build-bot environment/configuration, hence didn&apos;t suggest this :).

With support of gstreamer coming in and extension map now supporting local media files, I think your suggestion makes absolute sense.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>496174</commentid>
    <comment_count>11</comment_count>
    <who name="Deepak Sherveghar">bpwv64</who>
    <bug_when>2011-11-04 05:40:47 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; I added the failing tests to the skipped list to make buildbot happier:
&gt; http://trac.webkit.org/changeset/99168 . Please unskip them with the fix.

BTW . I feel this issue can now be closed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>499048</commentid>
    <comment_count>12</comment_count>
    <who name="Deepak Sherveghar">bpwv64</who>
    <bug_when>2011-11-09 09:21:38 -0800</bug_when>
    <thetext>Hi Csaba , bug 71554 is now resolved fixed. Request you to close this bug as well. Let me know if you need something from my side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>499073</commentid>
    <comment_count>13</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-11-09 09:37:13 -0800</bug_when>
    <thetext>Thanks for the fix.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>113300</attachid>
            <date>2011-11-02 03:55:11 -0700</date>
            <delta_ts>2011-11-02 09:44:53 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch.diff</filename>
            <type>text/plain</type>
            <size>2286</size>
            <attacher name="Deepak Sherveghar">bpwv64</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQvcXQvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNvdXJjZS9X
ZWJLaXQvcXQvQ2hhbmd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