<div dir="ltr">This is really nice, thanks so much asurkov! I think this will make writing tests, especially Fission-exercising ones, easier.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 9 Jan 2020 at 13:55, Alexander Surkov <<a href="mailto:surkov.alexander@gmail.com">surkov.alexander@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi.</div><div><br></div><div>Here's a small feature for those who deals with fission automated testing.<br></div><div><br></div><div>Some background: when you design a fission compatible test, you often need to put content into out-of-process iframe to trigger a certain code path. The only way to do this is to use iframe URL of a different origin other than the test document has itself. For example <iframe src='<a href="http://example.com" target="_blank">http://example.com</a>'> will put iframe into a separate process when fission is on.<br></div><div><br></div><div>If you need to put a custom document into out-of-process iframe, then the following technique is widely used: create html file and then refer it from URL, for example:</div><div><iframe src='<a href="http://example.com/path_to_file" target="_blank">http://example.com/path_to_file</a>'></div><div><br></div><div>It works nicely, but you have to have a file and it adds some overhead. When it comes to no fission testing, then people prefer to use data URLs, especially when a code snippet size is reasonably small. Apparently, you cannot use data URL in the fission world because iframe document is not loaded into a separate process in this case.</div><div><br></div><div>The idea to workaround the issue is to use sjs script which takes a code snippet and feeds it to iframe. The script was implemented by yzen and was used in accessibility for a while, but recently it was ported to the mochitest suite (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1601733" target="_blank">https://bugzilla.mozilla.org/show_bug.cgi?id=1601733</a>). So now you can do things like:</div><div><br></div><div><iframe src='<a href="http://example.com/document-builder.sjs?html=" target="_blank">http://example.com/document-builder.sjs?html=</a><input>'></div><div><br></div><div>Thanks!</div><div>Alexander.</div><div><br></div></div>
_______________________________________________<br>
firefox-dev mailing list<br>
<a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/firefox-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br>
</blockquote></div>