Bug 1382568: Test. r?heycam
MozReview-Commit-ID: DLvVBoXubGT
new file mode 100644
--- /dev/null
+++ b/layout/style/test/bug1382568-iframe.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<iframe src="http://example.com/doesnt-matter-because-it-gets-blocked-due-to-mixed-content"></iframe>
+<script>
+window.addEventListener('load', function(){
+ window[0].document.body.innerText;
+ window.parent.postMessage({ result: "ok" }, "*");
+}, false);
+</script>
--- a/layout/style/test/mochitest.ini
+++ b/layout/style/test/mochitest.ini
@@ -156,16 +156,18 @@ support-files = file_bug1055933_circle-x
support-files = file_bug1089417_iframe.html
[test_bug1112014.html]
[test_bug1203766.html]
[test_bug1232829.html]
[test_bug1292447.html]
[test_bug1371488.html]
[test_bug1375944.html]
support-files = file_bug1375944.html Ahem.ttf
+[test_bug1382568.html]
+support-files = bug1382568-iframe.html
[test_cascade.html]
[test_ch_ex_no_infloops.html]
[test_change_hint_optimizations.html]
[test_clip-path_polygon.html]
[test_color_rounding.html]
[test_compute_data_with_start_struct.html]
skip-if = toolkit == 'android'
[test_computed_style.html]
new file mode 100644
--- /dev/null
+++ b/layout/style/test/test_bug1382568.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>Test for bug 1382568: calling innerText on an uninitialized presshell doesn't crash</title>
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<script>
+ window.onmessage = function(e) {
+ is(e.data.result, "ok", "Child frame should load properly");
+ SimpleTest.finish();
+ };
+</script>
+<iframe src="https://example.com/tests/layout/style/test/bug1382568-iframe.html"></iframe>
+<script>
+ SimpleTest.waitForExplicitFinish();
+</script>