Test Harness: Twitter

by David Simpson

HTML

<h1>Demo page for HTML5 sandboxing</h1>
<h2>Twitter</h2>
<ul>
  <li>View an embedded OneDrive document</li>  
  <li>Link to edit the OneDrive document</li>
</ul>

<h2>allow-scripts allow-popups allow-forms</h2>
<ul>
  <li>fails to display the embed</li>
  <li>fails to edit the file in PowerPoint Online</li>
</ul>
<iframe src="https://dl.dropboxusercontent.com/u/658119/ibm-connections-cloud-ee/twitter/ee.html" sandbox="allow-scripts allow-popups allow-forms"> 
</iframe>

<h2>allow-scripts allow-popups allow-forms <strong>allow-same-origin</strong></h2>
<ul>
  <li>embed works</li>
  <li>fails to edit with error <code>Uncaught SecurityError: Failed to set the 'domain' property on 'Document': Assignment is forbidden for sandboxed iframes.</code></li>
</ul>
<iframe src="https://dl.dropboxusercontent.com/u/658119/ibm-connections-cloud-ee/twitter/ee.html" sandbox="allow-scripts allow-popups allow-forms allow-same-origin"> 
</iframe>

<h2>allow-scripts allow-popups allow-forms <strong>allow-same-origin allow-popups-to-escape-sandbox</strong></h2>
<ul>
  <li>embed works</li>
  <li>fails to edit with error <code>Uncaught SecurityError: Failed to set the 'domain' property on 'Document': Assignment is forbidden for sandboxed iframes.</code></li>
</ul>
<iframe src="https://dl.dropboxusercontent.com/u/658119/ibm-connections-cloud-ee/twitter/ee.html" sandbox="allow-scripts allow-popups allow-forms allow-same-origin allow-popups-to-escape-sandbox"> 
</iframe>

CSS

body, h2 {
  font-family: helvetica neue, helvetica, sans-serif;
}
h1, h2 {
  font-weight: 100;  
}
h1, h2 {
  font-size: 24px;
}
h2 strong {
  font-weight: 300;
}
iframe {
  width: 100%;
  height: 370px;
  border: 1px solid #ccc;
}