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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>14882</bug_id>
          
          <creation_ts>2011-11-19 10:59:19 +0000</creation_ts>
          <short_desc>Test framework runs tests inside &lt;object&gt;, leading to unexpected results</short_desc>
          <delta_ts>2012-07-18 14:59:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Testing</product>
          <component>Test Framework</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Boris Zbarsky">bzbarsky</reporter>
          <assigned_to name="Peter Linss">peter.linss</assigned_to>
          <cc>ayg</cc>
    
    <cc>fd</cc>
    
    <cc>peter.linss</cc>
    
    <cc>plh</cc>
    
    <cc>public-test-infra</cc>
    
    <cc>robin</cc>
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>60172</commentid>
    <comment_count>0</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2011-11-19 10:59:19 +0000</bug_when>
    <thetext>Due to the way &lt;object&gt; loads work, the browsing context is not created until the server response has been received.  This can lead to unexpected behavior for some things that tests may want to test.

It would be better to run the tests in an iframe instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60175</commentid>
    <comment_count>1</comment_count>
    <who name="Peter Linss">peter.linss</who>
    <bug_when>2011-11-20 03:25:11 +0000</bug_when>
    <thetext>Boris, can you give an example of &quot;unexpected behavior&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60273</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2011-11-21 04:08:58 +0000</bug_when>
    <thetext>Well, for example the Navigation Timing APIs behave somewhat differently in an &lt;object&gt; and an &lt;iframe&gt;, because in the former case the object that should record the load start time doesn&apos;t exist at load start.  At least in Gecko.  Per spec it&apos;s not obvious to me what the &lt;object&gt; behavior should be.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60293</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2011-11-21 19:31:33 +0000</bug_when>
    <thetext>I believe that the mobile folks are also interested in using an iframe instead of an object, btw.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60304</commentid>
    <comment_count>4</comment_count>
    <who name="Peter Linss">peter.linss</who>
    <bug_when>2011-11-21 20:07:26 +0000</bug_when>
    <thetext>IIRC the code used an iframe but was changed to an object before I took over. I&apos;m trying to find out what the reason was for the change back then.

If there are some tests that need an object then this will have to be a configurable option... if so, I&apos;m trying to determine if it needs to be per test or per suite.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60306</commentid>
    <comment_count>5</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2011-11-21 20:12:06 +0000</bug_when>
    <thetext>Tests that want an object can put an &lt;object&gt; in their test, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60321</commentid>
    <comment_count>6</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-11-22 01:25:14 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; I believe that the mobile folks are also interested in using an iframe instead
&gt; of an object, btw.

Yes, I think I remember Francois saying that you can&apos;t scroll in the object area when you are using the system from a mobile browser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60351</commentid>
    <comment_count>7</comment_count>
    <who name="fd">fd</who>
    <bug_when>2011-11-22 14:51:35 +0000</bug_when>
    <thetext>I confirm.

Actually, whether an &lt;object&gt; or an &lt;iframe&gt; gets used doesn&apos;t make a difference in terms of scrolling in typical mobile browsers on touchscreens: they don&apos;t allow users to scroll embedded contents. Scrolling only works for the whole page.

The difference between &lt;object&gt; and &lt;iframe&gt; is that these mobile browsers will automatically adjust the size of an &lt;iframe&gt; to fit that of the content it contains. They won&apos;t do so with &lt;object&gt; meaning that, no matter what value of &quot;overflow&quot; you may set, the embedded content is likely to appear truncated on mobile browsers.

I don&apos;t think there is any drawback in using an &lt;iframe&gt; instead of an &lt;object&gt; to embed content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60360</commentid>
    <comment_count>8</comment_count>
    <who name="Peter Linss">peter.linss</who>
    <bug_when>2011-11-23 00:04:57 +0000</bug_when>
    <thetext>Taking this bug. I have a number of page style improvements from the Shepherd project that I&apos;m going to back-port into the test framework, among which include a fix for scrolling behavior on mobiles. I&apos;ll do the object/iframe switch as part of that work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70509</commentid>
    <comment_count>9</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2012-07-18 14:59:23 +0000</bug_when>
    <thetext>This is now fixed in the release that&apos;s now online. In the running interface, there&apos;s a checkbox for &quot;use iframe&quot; which switches the test runner from object to iframe.

That preference sticks in a cookie so that once you&apos;ve used it your choice will stick for the same browser/device combo, which is probably the behaviour you want.

You can see an example at http://w3c-test.org/framework/app/suite/css-selectors-api-1-baseline/run/full/most-needed/1/level1-additional.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>