Tests for bug 755994, r=roc
authorSimon Montagu <smontagu@smontagu.org>
Thu, 17 May 2012 13:32:45 +0300
changeset 94294 414b22167f9dded86a88127e629e3a766d33e87b
parent 94293 a3f95b85178e9b88afd97a55a375dee8f23d71be
child 94295 c479a917544ae11e3ffa54e686204d043f5681dc
push id22705
push userMs2ger@gmail.com
push dateFri, 18 May 2012 08:29:06 +0000
treeherdermozilla-central@20fbb51c9462 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs755994
milestone15.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
Tests for bug 755994, r=roc
layout/reftests/text-shadow/reftest.list
layout/reftests/text-shadow/text-shadow-selected-2-notref.html
layout/reftests/text-shadow/text-shadow-selected-2-ref.html
layout/reftests/text-shadow/text-shadow-selected-2.html
--- a/layout/reftests/text-shadow/reftest.list
+++ b/layout/reftests/text-shadow/reftest.list
@@ -18,12 +18,14 @@ random-if(Android) == basic-negcoord.xul
 == lineoverflow.html lineoverflow-ref.html
 
 == overflow-not-scrollable-1.html overflow-not-scrollable-1-ref.html
 == overflow-not-scrollable-1.html overflow-not-scrollable-1-ref2.html
 == overflow-not-scrollable-2.html overflow-not-scrollable-2-ref.html
 
 != text-shadow-selected-1.html text-shadow-selected-1-notref.html
 == text-shadow-selected-1.html text-shadow-selected-1-ref.html
+!= text-shadow-selected-2.html text-shadow-selected-2-notref.html
+== text-shadow-selected-2.html text-shadow-selected-2-ref.html
 
 # bug 692744
 == text-shadow-on-space-1.html text-shadow-on-space-1-ref.html
 
new file mode 100644
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-selected-2-notref.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function onload() {
+  var range = document.createRange();
+  range.selectNodeContents(document.getElementById("selectMe"));
+  var sel = window.getSelection();
+  sel.removeAllRanges();
+  sel.addRange(range);
+}
+</script>
+<style type="text/css">
+body {
+  background: lightGray;
+}
+div {
+  position: absolute;
+  top: 10px;
+  left: 10px;
+  font: 36px monospace;
+  color: white;
+}
+</style>
+</head>
+<!-- NOTREF case has selected text but the shadow is missing -->
+<body onload="onload()">
+<div id="selectMe">
+<bdo dir="rtl">selected shadowed rtl text</bdo>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-selected-2-ref.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function onload() {
+  var range = document.createRange();
+  range.selectNodeContents(document.getElementById("selectMe"));
+  var sel = window.getSelection();
+  sel.removeAllRanges();
+  sel.addRange(range);
+}
+</script>
+<style type="text/css">
+body {
+  background: lightGray;
+}
+div {
+  position: absolute;
+  top: 10px;
+  left: 10px;
+  font: 36px monospace;
+  color: white;
+}
+</style>
+</head>
+<!-- REF case renders the selection first, using &nbsp; to avoid any show-through of glyph edges,
+     then the shadowed text on top of that -->
+<body onload="onload()">
+<div id="selectMe">
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+</div>
+<div style="text-shadow:1px 1px 1px red;">
+<bdo dir="rtl">selected shadowed rtl text</bdo>
+</div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/text-shadow/text-shadow-selected-2.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+function onload() {
+  var range = document.createRange();
+  range.selectNodeContents(document.getElementById("selectMe"));
+  var sel = window.getSelection();
+  sel.removeAllRanges();
+  sel.addRange(range);
+}
+</script>
+<style type="text/css">
+body {
+  background: lightGray;
+}
+div {
+  position: absolute;
+  top: 10px;
+  left: 10px;
+  font: 36px monospace;
+  color: white;
+}
+</style>
+</head>
+<!-- test for bug 692752 - paint text shadow on top of selection highlight -->
+<body onload="onload()">
+<div style="text-shadow:1px 1px 1px red;" id="selectMe">
+<bdo dir="rtl">selected shadowed rtl text</bdo>
+</div>
+</body>
+</html>