Bug 1110277 patch 0 - Add mochitest for patch 1 and patch 3. r=heycam
authorL. David Baron <dbaron@dbaron.org>
Sun, 11 Jan 2015 15:43:10 -0800
changeset 248996 ca02a661d6dc7a4a844488e30961da354ae7227c
parent 248995 9fe58932c19292f5df92507aa611db1506ea51d5
child 248997 86088b6c69e8414e6a9845fc7985de6dbbf6f16e
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1110277
milestone37.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 1110277 patch 0 - Add mochitest for patch 1 and patch 3. r=heycam Patch 1 and patch 3 will change the todo status of the first and second tests, respectively, since they are what fix the tests.
layout/base/tests/mochitest.ini
layout/base/tests/test_frame_reconstruction_for_pseudo_elements.html
--- a/layout/base/tests/mochitest.ini
+++ b/layout/base/tests/mochitest.ini
@@ -502,11 +502,12 @@ support-files =
 [test_bug990340.html]
 [test_bug1070851.html]
 [test_bug1080360.html]
 support-files = bug1080360_inner.html
 [test_bug1078327.html]
 support-files = bug1078327_inner.html
 [test_bug1080361.html]
 support-files = bug1080361_inner.html
+[test_frame_reconstruction_for_pseudo_elements.html]
 [test_touchcaret_visibility.html]
 [test_bug1093686.html]
 support-files = bug1093686_inner.html
new file mode 100644
--- /dev/null
+++ b/layout/base/tests/test_frame_reconstruction_for_pseudo_elements.html
@@ -0,0 +1,74 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1110277
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 1110277</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <style>
+  .testspan {
+    color: yellow;
+  }
+  .testspan[attributestate],
+  .testspan[attributestate]::before, .testspan[attributestate]::after {
+    color: blue;
+  }
+
+  #firstlinetest::first-line {
+    color: purple;
+  }
+  #firstlinetest > .testspan::before {
+    content: "[*]";
+  }
+
+  #aftertest > .testspan::after {
+    content: "[*]";
+  }
+  </style>
+  <script type="application/javascript">
+
+  /** Test for Bug 1110277 **/
+
+  SimpleTest.waitForExplicitFinish();
+
+  function run() {
+    runtest("first line test", "#firstlinetest > .testspan", { todo: true });
+    runtest("after test", "#aftertest > .testspan", { todo: true });
+    SimpleTest.finish();
+  }
+
+  function runtest(description, selector, flags) {
+    var utils = SpecialPowers.getDOMWindowUtils(window);
+    var span = document.querySelector(selector);
+    var cs = getComputedStyle(span, "");
+
+    var startcolor = cs.color;
+    var startcount = utils.framesConstructed;
+    is(startcolor, "rgb(255, 255, 0)", description + ": initial color");
+
+    span.setAttribute("attributestate", "true");
+
+    var endcolor = cs.color;
+    var endcount = utils.framesConstructed;
+    is(endcolor, "rgb(0, 0, 255)", description + ": final color");
+    (flags.todo ? todo_is : is)(endcount, startcount,
+       description + ": should not do frame construction")
+  }
+
+  </script>
+</head>
+<body onload="run()">
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1110277">Mozilla Bug 1110277</a>
+<div id="firstlinetest">
+  <span class="testspan">This <span style="display:block">is a</span> test.</span>
+</div>
+<div id="aftertest">
+  <span class="testspan">This <span style="display:block">is a</span> test.</span>
+</div>
+<pre id="test">
+</pre>
+</body>
+</html>