Bug 1385805 - Convert some more tests within layout/ to comply with new data: URI inheritance model. r=smaug
authorChristoph Kerschbaumer <ckerschb@christophkerschbaumer.com>
Tue, 01 Aug 2017 10:59:22 +0200
changeset 423304 ce4b1ba61a79936fc6d9a4effe507547083578e0
parent 423303 bd8bb33f871447a791987df7e12bf03f1611f53b
child 423305 46fcd660ce409f733ce77b3d9b1477080348e321
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1385805
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1385805 - Convert some more tests within layout/ to comply with new data: URI inheritance model. r=smaug
layout/base/tests/bug632215-1.html
layout/base/tests/bug632215-2.html
layout/base/tests/bug632215-ref.html
layout/base/tests/bug682712-1-ref.html
layout/base/tests/bug682712-1.html
layout/base/tests/bug746993-1-ref.html
layout/base/tests/bug746993-1.html
layout/base/tests/file_bug842853-frame.html
layout/base/tests/file_getBoxQuads_convertPointRectQuad_frame1.html
layout/base/tests/file_getBoxQuads_convertPointRectQuad_frame2.html
layout/base/tests/mochitest.ini
layout/base/tests/scroll_selection_into_view_window.html
layout/base/tests/scroll_selection_into_view_window_frame.html
layout/base/tests/test_bug842853.html
layout/base/tests/test_bug849219.html
layout/base/tests/test_getBoxQuads_convertPointRectQuad.html
layout/base/tests/transformed_scrolling_repaints_3_window.html
layout/base/tests/transformed_scrolling_repaints_3_window_frame.html
--- a/layout/base/tests/bug632215-1.html
+++ b/layout/base/tests/bug632215-1.html
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
 <html class="reftest-wait">
   <head>
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   </head>
   <body>
-    <iframe src="data:text/html,<body spellcheck=false></body>"></iframe>
+    <iframe srcdoc="<body spellcheck=false></body>"></iframe>
     <script>
       onload = function() {
         var i = document.querySelector("iframe");
         var d = i.contentDocument;
         var w = i.contentWindow;
         var s = w.getSelection();
         i.focus();
         d.body.contentEditable = true;
--- a/layout/base/tests/bug632215-2.html
+++ b/layout/base/tests/bug632215-2.html
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
 <html class="reftest-wait">
   <head>
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   </head>
   <body>
-    <iframe src="data:text/html,<body contenteditable spellcheck=false></body>"></iframe>
+    <iframe srcdoc="<body contenteditable spellcheck=false></body>"></iframe>
     <script>
       onload = function() {
         var i = document.querySelector("iframe");
         var d = i.contentDocument;
         var w = i.contentWindow;
         var s = w.getSelection();
         i.focus();
         d.body.contentEditable = false;
--- a/layout/base/tests/bug632215-ref.html
+++ b/layout/base/tests/bug632215-ref.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html>
   <body>
-    <iframe src="data:text/html,<body spellcheck=false>xx</body>"></iframe>
+    <iframe srcdoc="<body spellcheck=false>xx</body>"></iframe>
     <script>
       onload = function() {
         var i = document.querySelector("iframe");
         var d = i.contentDocument;
         var w = i.contentWindow;
         d.designMode = "on";
         i.focus();
         d.body.focus();
--- a/layout/base/tests/bug682712-1-ref.html
+++ b/layout/base/tests/bug682712-1-ref.html
@@ -1,14 +1,14 @@
 <html class="reftest-wait">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   </head>
   <body onload="start()">
-    <iframe src="data:text/html,<body contenteditable spellcheck=false>foo bar"></iframe>
+    <iframe srcdoc="<body contenteditable spellcheck=false>foo bar"></iframe>
     <script>
       function start() {
         var iframe = document.querySelector("iframe");
         var win = iframe.contentWindow;
         var doc = iframe.contentDocument;
 
         setTimeout(function() {
           doc.body.focus();
--- a/layout/base/tests/bug682712-1.html
+++ b/layout/base/tests/bug682712-1.html
@@ -1,15 +1,15 @@
 <html class="reftest-wait">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   </head>
   <body onload="start()">
-    <iframe src="data:text/html,<body contenteditable spellcheck=false>foo bar"></iframe>
+    <iframe srcdoc="<body contenteditable spellcheck=false>foo bar"></iframe>
     <script>
       function start() {
         var iframe = document.querySelector("iframe");
         var win = iframe.contentWindow;
         var doc = iframe.contentDocument;
 
         // Reframe the iframe
         iframe.style.display = "none";
--- a/layout/base/tests/bug746993-1-ref.html
+++ b/layout/base/tests/bug746993-1-ref.html
@@ -1,15 +1,15 @@
 <html class="reftest-wait">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   </head>
   <body onload="start()">
-    <iframe src="data:text/html,<body contenteditable spellcheck=false>Here's some text.<br /><br /><div></div></body>"></iframe>
+    <iframe srcdoc="<body contenteditable spellcheck=false>Here's some text.<br /><br /><div></div></body>"></iframe>
     <script>
       function start() {
         var iframe = document.querySelector("iframe");
         var win = iframe.contentWindow;
         var doc = iframe.contentDocument;
         iframe.focus();
         doc.body.focus();
         win.getSelection().collapse(doc.body, 3);
--- a/layout/base/tests/bug746993-1.html
+++ b/layout/base/tests/bug746993-1.html
@@ -1,15 +1,15 @@
 <html class="reftest-wait">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   </head>
   <body onload="start()">
-    <iframe src="data:text/html,<body contenteditable spellcheck=false><br /><div></div></body>"></iframe>
+    <iframe srcdoc="<body contenteditable spellcheck=false><br /><div></div></body>"></iframe>
     <script>
       function start() {
         var iframe = document.querySelector("iframe");
         var win = iframe.contentWindow;
         var doc = iframe.contentDocument;
         iframe.focus();
         doc.body.focus();
         win.getSelection().collapse(doc.body, 0);
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/file_bug842853-frame.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<a href="#anchor">Click to scroll to anchor</a><div style="height:5000px"></div><a name="anchor">FAIL</a>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/file_getBoxQuads_convertPointRectQuad_frame1.html
@@ -0,0 +1,3 @@
+<!DOCTYPE HTML>
+<html style='padding:25px'>
+<div id='f1d' style='position:absolute; left:14px; top:15px; width:16px; height:17px; background:pink'></div>
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/file_getBoxQuads_convertPointRectQuad_frame2.html
@@ -0,0 +1,1 @@
+<div id='d'>
--- a/layout/base/tests/mochitest.ini
+++ b/layout/base/tests/mochitest.ini
@@ -80,16 +80,18 @@ support-files =
 [test_bug696020.html]
 [test_bug718809.html]
 [test_bug725426.html]
 [test_bug731777.html]
 [test_bug749186.html]
 [test_bug761572.html]
 [test_bug770106.html]
 [test_bug842853.html]
+support-files =
+  file_bug842853-frame.html
 skip-if = toolkit == 'android' # Bug 1355821
 [test_bug842853-2.html]
 skip-if = toolkit == 'android' # Bug 1355821
 [test_bug849219.html]
 [test_bug851445.html]
 skip-if = toolkit == 'android' # Bug 1355821
 support-files = bug851445_helper.html
 [test_bug851485.html]
@@ -138,16 +140,19 @@ skip-if = e10s # bug 1020135, nested oop
 support-files = bug921928_event_target_iframe_apps_oop.html
 [test_event_target_radius.html]
 skip-if = toolkit == 'android' # Bug 1355836
 [test_flush_on_paint.html]
 skip-if = true # Bug 688128
 [test_frame_reconstruction_for_pseudo_elements.html]
 [test_frame_reconstruction_scroll_restore.html]
 [test_getBoxQuads_convertPointRectQuad.html]
+support-files =
+  file_getBoxQuads_convertPointRectQuad_frame1.html
+  file_getBoxQuads_convertPointRectQuad_frame2.html
 [test_getClientRects_emptytext.html]
 [test_mozPaintCount.html]
 skip-if = toolkit == 'android' # Requires plugin support
 [test_preserve3d_sorting_hit_testing.html]
 support-files = preserve3d_sorting_hit_testing_iframe.html
 [test_preserve3d_sorting_hit_testing2.html]
 support-files = preserve3d_sorting_hit_testing2_iframe.html
 [test_reftests_with_caret.html]
@@ -322,19 +327,23 @@ support-files =
   textarea-minlength-valid-change.html
   textarea-valid-ref.html
 [test_remote_frame.html]
 [test_resize_flush.html]
 support-files = resize_flush_iframe.html
 [test_scroll_event_ordering.html]
 [test_scroll_selection_into_view.html]
 skip-if = toolkit == 'android' # Bug 1355844
-support-files = scroll_selection_into_view_window.html
+support-files =
+  scroll_selection_into_view_window.html
+  scroll_selection_into_view_window_frame.html
 [test_scroll_snapping.html]
 skip-if = toolkit == 'android' || os == 'win' # Bug 1355851, win Bug 1379810
 [test_scroll_snapping_scrollbars.html]
 skip-if = toolkit == 'android' || (os == 'win' && !e10s) # Bug 1355851, bug 1381932
 [test_transformed_scrolling_repaints.html]
 [test_transformed_scrolling_repaints_2.html]
 [test_transformed_scrolling_repaints_3.html]
-support-files = transformed_scrolling_repaints_3_window.html
+support-files =
+  transformed_scrolling_repaints_3_window.html
+  transformed_scrolling_repaints_3_window_frame.html
 
 # *** Please maintain alphabetical ordering when adding new tests ***
--- a/layout/base/tests/scroll_selection_into_view_window.html
+++ b/layout/base/tests/scroll_selection_into_view_window.html
@@ -23,24 +23,17 @@
   <div style="height:400px;"></div>
   <div><span id="target3"
         style="display:inline-block; vertical-align:top; height:300px;"></span>
   </div>
   <div style="height:400px;"></div>
 </div>
 <div id="c4" style="overflow-y:scroll; width:200px; height:200px; position:absolute; top:200px; left:600px;">
   <iframe id="target4" style="border:none; width:100%; height:1100px; display:block;"
-          src="data:text/html,
-               <body style='margin:0; overflow:hidden;'>
-                 <div style='height:400px;'></div>
-                 <div><span id='target4'
-                            style='display:inline-block; vertical-align:top; height:300px;'></span>
-                 </div>
-                 <div style='height:400px;'></div>">
-  </iframe>
+          src="scroll_selection_into_view_window_frame.html"></iframe>
 </div>
 <div id="c5" style="overflow-y:scroll; width:200px; height:200px; position:absolute; top:400px; left:0;">
   <div style="-moz-transform:translateY(400px); transform:translateY(400px)">
     <span id="target5" style="display:inline-block; vertical-align:top; height:20px;"></span>
   </div>
   <div style="height:800px;"></div>
 </div>
 <div id="c6" style="overflow-y:scroll; width:200px; height:200px; position:absolute; top:400px; left:200px;">
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/scroll_selection_into_view_window_frame.html
@@ -0,0 +1,6 @@
+<body style='margin:0; overflow:hidden;'>
+<div style='height:400px;'></div>
+<div><span id='target4'
+           style='display:inline-block; vertical-align:top; height:300px;'></span>
+</div>
+<div style='height:400px;'></div>
--- a/layout/base/tests/test_bug842853.html
+++ b/layout/base/tests/test_bug842853.html
@@ -35,16 +35,16 @@ function runTest() {
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 </pre>
 <script>
 
 var e = document.createElement('iframe');
-var url = 'data:text/html,<a href="%23anchor">Click to scroll to anchor</a><div style="height:5000px"></div><a name="anchor">FAIL</a>'
+var url = 'file_bug842853-frame.html';
 e.setAttribute('src',url);
 e.setAttribute('onload','runTest()');
 document.body.appendChild(e);
 
 </script>
 </body>
 </html>
--- a/layout/base/tests/test_bug849219.html
+++ b/layout/base/tests/test_bug849219.html
@@ -35,16 +35,16 @@ function runTest() {
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 </pre>
 <script>
 
 var e = document.createElement('iframe');
-var url = 'data:text/html,<a href="%23anchor">Click to scroll to anchor</a><div style="height:5000px"></div><a name="anchor">FAIL</a>'
+var url = 'file_bug842853-frame.html';
 e.setAttribute('src',url);
 e.setAttribute('onload','runTest()');
 document.body.appendChild(e);
 
 </script>
 </body>
 </html>
--- a/layout/base/tests/test_getBoxQuads_convertPointRectQuad.html
+++ b/layout/base/tests/test_getBoxQuads_convertPointRectQuad.html
@@ -229,17 +229,17 @@ em {
               border-width:5px 6px 7px 8px; border-style:solid; border-color:yellow;
               margin:9px 10px 11px 12px; background:blue;">
   </div>
 </div>
 
 <div id="dUnrelated" style="width:50px; height:50px;"></div>
 
 <iframe id="f1" style="width:50px; height:50px; border:0; background:lime;"
-        src="data:text/html,<!DOCTYPE HTML><html style='padding:25px'><div id='f1d' style='position:absolute; left:14px; top:15px; width:16px; height:17px; background:pink'></div>">
+        src="file_getBoxQuads_convertPointRectQuad_frame1.html">
 </iframe>
 <!--
 It matters that the first part of this span is on the same line as the above <iframe>!
 That ensures the first quad's X position is not equal to the anonymous block's X position.
 -->
 <span id="ibSplit"
   ><em id="ibSplitPart1" style="width:100px;"></em
   ><div style="width:110px; height:20px; background:black"></div
@@ -681,17 +681,17 @@ function runTest() {
   checkQuadIsRect("svg", {box:"content"},
                   svgContainerX + 11, svgContainerY + 11, 200, 200);
 
   // XXX Test SVG text (probably broken; unclear what the best way is to handle it)
 
   // Test that converting between nodes in different toplevel browsing contexts
   // throws an exception.
   try {
-    openedWindow = window.open("data:text/html,<div id='d'>","");
+    openedWindow = window.open("file_getBoxQuads_convertPointRectQuad_frame2.html","");
   } catch (ex) {
     // in some cases we can't open the window.
     openedWindow = null;
   }
   if (openedWindow) {
     openedWindow.addEventListener("load", function() {
       checkException("openedWindow.d.getBoxQuads({relativeTo:document})", "NotFoundError");
       checkException("document.getBoxQuads({relativeTo:openedWindow.d})", "NotFoundError");
--- a/layout/base/tests/transformed_scrolling_repaints_3_window.html
+++ b/layout/base/tests/transformed_scrolling_repaints_3_window.html
@@ -2,75 +2,18 @@
 <html>
 <head>
   <title>Test that scaled elements with scrolled contents don't repaint unnecessarily when we scroll inside them</title>
   <script type="text/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
 </head>
 <!-- Need a timeout here to allow paint unsuppression before we start the test -->
 <body onload="setTimeout(startTest,0)" style="background:white;">
 <iframe id="t" style="-moz-transform: scale(0.48979); -moz-transform-origin:top left; width:500px; height:600px;"
-        src="data:text/html,
-<body style='background:yellow;'>
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p id='e'>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-<p>My graduate adviser was the most patient, understanding, and helpful
-person I've ever had the joy of dealing with. That doesn't change that 
-there are some real dicks out there, and some of them happen to be 
-scientists.
-</body>"></iframe>
+        src="transformed_scrolling_repaints_3_window_frame.html">
+</iframe>
 <pre id="test">
 <script type="application/javascript">
 var SimpleTest = window.opener.SimpleTest;
 var SpecialPowers = window.opener.SpecialPowers;
 var is = window.opener.is;
 var t, e, utils, iterations;
 var smoothScrollPref = "general.smoothScroll";
 
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/transformed_scrolling_repaints_3_window_frame.html
@@ -0,0 +1,58 @@
+<body style='background:yellow;'>
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p id='e'>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+<p>My graduate adviser was the most patient, understanding, and helpful
+person I've ever had the joy of dealing with. That doesn't change that 
+there are some real dicks out there, and some of them happen to be 
+scientists.
+</body>