<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Scripts with protocol-relative URLs fail to load when nested in two or more friendly iframes"
   href="https://bugs.webkit.org/show_bug.cgi?id=145692">145692</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Scripts with protocol-relative URLs fail to load when nested in two or more friendly iframes
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Mac OS X 10.10
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit Misc.
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>x&#64;jx0.co
          </td>
        </tr></table>
      <p>
        <div>
        <pre>See the bug report for the same issue in Chrome, presumably in shared WebKit code: <a href="https://code.google.com/p/chromium/issues/detail?id=496814">https://code.google.com/p/chromium/issues/detail?id=496814</a>

Example URL:
<a href="http://viajon.net/test/protocol_relative_test.html">http://viajon.net/test/protocol_relative_test.html</a>

Steps to reproduce the problem:
1. Click &quot;Load Protocol-Relative Script&quot; button to see the issue.
2. You can click the http or https (need to accept self-signed cert first) versions of the button to see the script loading working.

What is the expected behavior?
The script should load and run properly.

What went wrong?
When a script tag is loaded with a protocol-relative URL inside of two friendly iframes, the load fails. Specifying an explicit scheme causes the load to succeed. For example:

&lt;iframe id=&quot;outer&quot;&gt;
  &lt;iframe id=&quot;inner&quot;&gt;
    &lt;script src=&quot;//domain.com/script-to-load.js&quot;&gt;&lt;/script&gt;
  &lt;/iframe&gt;
&lt;/iframe&gt;

The script-to-load.js file is never downloaded and run.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>