Skip to content

Commit

Permalink
Remove unneeded styles from test iframe (#5652)
Browse files Browse the repository at this point in the history
  • Loading branch information
aghassemi committed Oct 19, 2016
1 parent 9ca3969 commit bf7b2aa
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions testing/iframe.js
Expand Up @@ -198,8 +198,7 @@ export function createIframePromise(opt_runtimeOff, opt_beforeLayoutCallback) {
let iframe = document.createElement('iframe');
iframe.name = 'test_' + iframeCount++;
iframe.srcdoc = '<!doctype><html><head>' +
'<style>.-amp-element {display: block;}</style>' +
'<body style="margin:0"><div id=parent></div>';
'<body><div id=parent></div>';
iframe.onload = function() {
// Flag as being a test window.
iframe.contentWindow.AMP_TEST_IFRAME = true;
Expand All @@ -224,8 +223,6 @@ export function createIframePromise(opt_runtimeOff, opt_beforeLayoutCallback) {
addElement: function(element) {
const iWin = iframe.contentWindow;
const p = onInsert(iWin).then(() => {
// Make sure it has dimensions since no styles are available.
element.style.display = 'block';
element.build(true);
if (!element.getPlaceholder()) {
const placeholder = element.createPlaceholder();
Expand Down

0 comments on commit bf7b2aa

Please sign in to comment.