Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-3349

iOS: Ti.include() not handling relative pathing properly

    Details

      Description

      {html}<div><p>This is the companion ticket to <a href=
      "/projects/32238/tickets/2585" title="Ticket #2585">#2585</a>.</p>
      <p>The tests are already in drillbit – see the "includes" test
      suite in drillbit. So for purposes of meeting our ticketing
      guideline for "Reproduction sequence", the drillbit suite
      suffices.</p>
      <p>But here's a short summary example as well:</p>
      <p><strong>Resources/app.js</strong></p>
      <pre>
      <code class="javascript">Ti.include("l2/l2_included.js");</code>
      </pre>
      <p><strong>Resources/l2/l2_included.js</strong></p>
      <pre>
      <code class=
      "javascript">Ti.include("../l1_included.js"); // Fails</code>
      </pre>
      <p><strong>Resources/l1_included.js</strong></p>
      <pre>
      <code class=
      "javascript">Ti.API.info("You've reached Resources/l1_included.js");</code>
      </pre></div>{html}

        Activity

        Hide
        Jeff Haynie added a comment -
        {html}<div><p>(from <a href=
        "/projects/32238/changesets/ebedeb89bd3c5238c53d189286cd15700ba7bf93"
        title=
        "Changeset [ebedeb89bd3c5238c53d189286cd15700ba7bf93]">[ebedeb89bd3c5238c53d189286cd15700ba7bf93]</a>)
        [<a href="/projects/32238/tickets/3349" title=
        "Ticket #3349">#3349</a> state:fixed-in-qa] Hooray for call stacks!
        it lets us recurse include right. <a href=
        "https://github.com/appcelerator/titanium_mobile/commit/ebedeb89bd3c5238c53d189286cd15700ba7bf93">
        https://github.com/appcelerator/titanium_mobile/commit/ebedeb89bd3c...</a></p></div>{html}
        Show
        Jeff Haynie added a comment - {html}<div><p>(from <a href= "/projects/32238/changesets/ebedeb89bd3c5238c53d189286cd15700ba7bf93" title= "Changeset [ebedeb89bd3c5238c53d189286cd15700ba7bf93] "> [ebedeb89bd3c5238c53d189286cd15700ba7bf93] </a>) [<a href="/projects/32238/tickets/3349" title= "Ticket #3349">#3349</a> state:fixed-in-qa] Hooray for call stacks! it lets us recurse include right. <a href= "https://github.com/appcelerator/titanium_mobile/commit/ebedeb89bd3c5238c53d189286cd15700ba7bf93"> https://github.com/appcelerator/titanium_mobile/commit/ebedeb89bd3c ...</a></p></div>{html}
        Hide
        Natalie Huynh added a comment -
        {html}<div><p>Ran ti.includes Drillbit test against Titanium SDK version:
        1.7.0 (03/18/11 12:00 19be393)<br>
        iphone results<br>
        relativeDown true 9 Success<br>
        slashToRoot false 16 should be true, was: false<br>
        dotdotSlash true 23 Success<br>
        dotSlash true 23 Success<br>
        lotsOfDots true 37 Success</p></div>{html}
        Show
        Natalie Huynh added a comment - {html}<div><p>Ran ti.includes Drillbit test against Titanium SDK version: 1.7.0 (03/18/11 12:00 19be393)<br> iphone results<br> relativeDown true 9 Success<br> slashToRoot false 16 should be true, was: false<br> dotdotSlash true 23 Success<br> dotSlash true 23 Success<br> lotsOfDots true 37 Success</p></div>{html}
        Hide
        Reggie Seagraves added a comment -
        {html}<div><p>I had to revert this change to fix 3411 to allow QE to proceed
        with testing. Please redress this issue and regress fully against
        3411.</p></div>{html}
        Show
        Reggie Seagraves added a comment - {html}<div><p>I had to revert this change to fix 3411 to allow QE to proceed with testing. Please redress this issue and regress fully against 3411.</p></div>{html}
        Hide
        hal added a comment -
        {html}<div><p>Image paths should also be tested, in this or a new ticket.</p>
        <p>Just to summarize paths for images, this has been tested on iOS
        4.2 / Ti 1.6.0 (3 Feb 2011) with the following results for both the
        image and backgroundImage properties of imageView (using the simple
        project attached):</p>
        <p>image: 'card/1.png', // no leading slash (relative) works<br>
        image: './card/2.png', // leading dot and slash works</p>
        <p>image: '/card/3.png', // leading slash does <em>not</em>
        work<br>
        image: 'app://card/4.png', // leading "app://" does <em>not</em>
        work</p>
        <p>Are "app://" cases also being tested? I don't see it in
        Natalie's Drillbit results.</p></div>{html}
        Show
        hal added a comment - {html}<div><p>Image paths should also be tested, in this or a new ticket.</p> <p>Just to summarize paths for images, this has been tested on iOS 4.2 / Ti 1.6.0 (3 Feb 2011) with the following results for both the image and backgroundImage properties of imageView (using the simple project attached):</p> <p>image: 'card/1.png', // no leading slash (relative) works<br> image: './card/2.png', // leading dot and slash works</p> <p>image: '/card/3.png', // leading slash does <em>not</em> work<br> image: 'app://card/4.png', // leading "app://" does <em>not</em> work</p> <p>Are "app://" cases also being tested? I don't see it in Natalie's Drillbit results.</p></div>{html}
        Hide
        Natalie Huynh added a comment -

        Tested with 1.7.0.ad264c9
        relativeDown false 9 should be true, was: false
        slashToRoot true 16 Success
        dotdotSlash false 23 should be true, was: false
        dotSlash true 23 Success
        lotsOfDots false 37 should be true, was: false

        Show
        Natalie Huynh added a comment - Tested with 1.7.0.ad264c9 relativeDown false 9 should be true, was: false slashToRoot true 16 Success dotdotSlash false 23 should be true, was: false dotSlash true 23 Success lotsOfDots false 37 should be true, was: false
        Hide
        Blain Hamon (Inactive) added a comment -

        Forgot to start the progress meter a while back.

        Show
        Blain Hamon (Inactive) added a comment - Forgot to start the progress meter a while back.
        Hide
        Blain Hamon (Inactive) added a comment -

        TIMOB-3349 #fixed-in-qa When doing an include and there's a leading slash, reset to the root path.

        Show
        Blain Hamon (Inactive) added a comment - TIMOB-3349 #fixed-in-qa When doing an include and there's a leading slash, reset to the root path.
        Hide
        Natalie Huynh added a comment -

        Tested with 1.7.0.879871b...(05/10/11 19:34)
        relativeDown true 9 Success
        slashToRoot true 16 Success
        dotdotSlash true 23 Success
        dotSlash true 23 Success
        lotsOfDots true 37 Success

        Show
        Natalie Huynh added a comment - Tested with 1.7.0.879871b...(05/10/11 19:34) relativeDown true 9 Success slashToRoot true 16 Success dotdotSlash true 23 Success dotSlash true 23 Success lotsOfDots true 37 Success

          People

          • Assignee:
            Blain Hamon (Inactive)
            Reporter:
            Bill Dawson
          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development