Skip to content

Commit

Permalink
Add more displayIndent tests (for negative indents, and indents with …
Browse files Browse the repository at this point in the history
…centering). (mathjax/MathJax#769)
  • Loading branch information
dpvc committed Jan 17, 2015
1 parent 490bbe2 commit 783733a
Show file tree
Hide file tree
Showing 8 changed files with 244 additions and 12 deletions.
Expand Up @@ -7,14 +7,13 @@
<!-- Copyright (c) 2011 Design Science, Inc.
License: Apache License 2.0 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="../../../header.js"></script>
<script type="text/javascript">
function preMathJax()
{
gConfigObject.displayAlign = "left";
gConfigObject.displayIndent = "100px";
function preMathJax() {
gConfigObject.displayAlign = "left";
gConfigObject.displayIndent = "100px";
}
</script>
<script type="text/javascript" src="../../../header.js"></script>
</head>

<body>
Expand Down
47 changes: 47 additions & 0 deletions testsuite/Configuration/Hub/displayAlign/displayIndent-1b.html
@@ -0,0 +1,47 @@
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>displayIndent</title>
<!-- Copyright (c) 2011 Design Science, Inc.
License: Apache License 2.0 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="../../../header.js"></script>
<script type="text/javascript">
function preMathJax() {
gConfigObject.displayAlign = "left";
gConfigObject.displayIndent = "-100px";
}
</script>
</head>

<body>

<div style="position: absolute; left: 200px; top: 0; width: 600px;">
<math display="block">
<mspace height="100px" width="100px" mathbackground="yellow"></mspace>
</math>
</div>

<!-- gray borders to ignore possible size error of the square -->
<div style="position: absolute; left: 200px; top: 0; width: 600px;">
<div style="float: left;">
<div style="position: relative; left: -3px; margin-left: -100px;
width: 106px; height: 100px;">
<div style="width: 98px; height: 100px;
border-left: 4px solid gray;
border-right: 4px solid gray;"></div>
</div>
</div>
</div>

<!-- horizontal gray bands to ignore a possible vertical shift -->
<div style="position: absolute; background: gray;
left: 0; top: 0; height: 40px; width: 100%;"></div>

<div style="position: absolute; background: gray;
left: 0; top: 90px; height: 40px; width: 100%;"></div>

</body>
</html>
Expand Up @@ -7,14 +7,13 @@
<!-- Copyright (c) 2011 Design Science, Inc.
License: Apache License 2.0 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="../../../header.js"></script>
<script type="text/javascript">
function preMathJax()
{
gConfigObject.displayAlign = "right";
gConfigObject.displayIndent = "100px";
function preMathJax() {
gConfigObject.displayAlign = "right";
gConfigObject.displayIndent = "100px";
}
</script>
<script type="text/javascript" src="../../../header.js"></script>
</head>

<body>
Expand Down
48 changes: 48 additions & 0 deletions testsuite/Configuration/Hub/displayAlign/displayIndent-2b.html
@@ -0,0 +1,48 @@
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>displayIndent</title>
<!-- Copyright (c) 2011 Design Science, Inc.
License: Apache License 2.0 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="../../../header.js"></script>
<script type="text/javascript">
function preMathJax() {
gConfigObject.displayAlign = "right";
gConfigObject.displayIndent = "-100px";
}
</script>
</head>

<body>

<!-- gray borders to ignore possible size error of the square -->
<div style="position: absolute; left: 0; top: 0; width: 400px;">
<math display="block">
<mspace height="100px" width="100px" mathbackground="yellow"></mspace>
</math>
</div>

<!-- gray borders to ignore possible size error of the square -->
<div style="position: absolute; left: 0; top: 0; width: 400px;">
<div style="float: right;">
<div style="position: relative; left: +3px; margin-right: -100px;
width: 106px; height: 100px;">
<div style="width: 98px; height: 100px;
border-left: 4px solid gray;
border-right: 4px solid gray;"></div>
</div>
</div>
</div>

<!-- horizontal gray bands to ignore a possible vertical shift -->
<div style="position: absolute; background: gray;
left: 0; top: 0; height: 40px; width: 100%;"></div>

<div style="position: absolute; background: gray;
left: 0; top: 90px; height: 40px; width: 100%;"></div>

</body>
</html>
41 changes: 41 additions & 0 deletions testsuite/Configuration/Hub/displayAlign/displayIndent-3-ref.html
@@ -0,0 +1,41 @@
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>displayIndent</title>
<!-- Copyright (c) 2011 Design Science, Inc.
License: Apache License 2.0 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="../../../header.js"></script>
</head>

<body>

<div style="position: absolute; left: 0; top: 0; width: 600px;">
<div style="float: left; margin-left: 350px;">
<div style="width: 100px; height: 100px; background: yellow; "></div>
</div>
</div>

<!-- gray borders to ignore possible size error of the square -->
<div style="position: absolute; left: 0; top: 0; width: 600px;">
<div style="float: left; margin-left:250px;">
<div style="position: relative; left: -3px; margin-left: 100px;
width: 106px; height: 100px;">
<div style="width: 98px; height: 100px;
border-left: 4px solid gray;
border-right: 4px solid gray;"></div>
</div>
</div>
</div>

<!-- horizontal gray bands to ignore a possible vertical shift -->
<div style="position: absolute; background: gray; z-index: 1;
left: 0; top: 0; height: 40px; width: 100%;"></div>

<div style="position: absolute; background: gray; z-index: 1;
left: 0; top: 90px; height: 40px; width: 100%;"></div>

</body>
</html>
47 changes: 47 additions & 0 deletions testsuite/Configuration/Hub/displayAlign/displayIndent-3a.html
@@ -0,0 +1,47 @@
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>displayIndent</title>
<!-- Copyright (c) 2011 Design Science, Inc.
License: Apache License 2.0 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="../../../header.js"></script>
<script type="text/javascript">
function preMathJax() {
gConfigObject.displayAlign = "center";
gConfigObject.displayIndent = "100px";
}
</script>
</head>

<body>

<div style="position: absolute; left: 0; top: 0; width: 600px;">
<math display="block">
<mspace height="100px" width="100px" mathbackground="yellow"></mspace>
</math>
</div>

<!-- gray borders to ignore possible size error of the square -->
<div style="position: absolute; left: 0; top: 0; width: 600px;">
<div style="float: left; margin-left:250px;">
<div style="position: relative; left: -3px; margin-left: 100px;
width: 106px; height: 100px;">
<div style="width: 98px; height: 100px;
border-left: 4px solid gray;
border-right: 4px solid gray;"></div>
</div>
</div>
</div>

<!-- horizontal gray bands to ignore a possible vertical shift -->
<div style="position: absolute; background: gray;
left: 0; top: 0; height: 40px; width: 100%;"></div>

<div style="position: absolute; background: gray;
left: 0; top: 90px; height: 40px; width: 100%;"></div>

</body>
</html>
47 changes: 47 additions & 0 deletions testsuite/Configuration/Hub/displayAlign/displayIndent-3b.html
@@ -0,0 +1,47 @@
<!-- -*- mode: HTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
<!-- vim: set tabstop=2 expandtab shiftwidth=2 textwidth=80: -->
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>displayIndent</title>
<!-- Copyright (c) 2011 Design Science, Inc.
License: Apache License 2.0 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="../../../header.js"></script>
<script type="text/javascript">
function preMathJax() {
gConfigObject.displayAlign = "center";
gConfigObject.displayIndent = "-100px";
}
</script>
</head>

<body>

<div style="position: absolute; left: 200px; top: 0; width: 600px;">
<math display="block">
<mspace height="100px" width="100px" mathbackground="yellow"></mspace>
</math>
</div>

<!-- gray borders to ignore possible size error of the square -->
<div style="position: absolute; left: 200px; top: 0; width: 600px;">
<div style="float: left; margin-left:250px;">
<div style="position: relative; left: -3px; margin-left: -100px;
width: 106px; height: 100px;">
<div style="width: 98px; height: 100px;
border-left: 4px solid gray;
border-right: 4px solid gray;"></div>
</div>
</div>
</div>

<!-- horizontal gray bands to ignore a possible vertical shift -->
<div style="position: absolute; background: gray;
left: 0; top: 0; height: 40px; width: 100%;"></div>

<div style="position: absolute; background: gray;
left: 0; top: 90px; height: 40px; width: 100%;"></div>

</body>
</html>
8 changes: 6 additions & 2 deletions testsuite/Configuration/Hub/displayAlign/reftest.list
@@ -1,7 +1,11 @@
fails-if(Quirks) == displayAlign-1.html displayAlign-1-ref.html
fails-if(Quirks) == displayAlign-2.html displayAlign-2-ref.html
fails-if(Quirks) == displayAlign-3.html displayAlign-3-ref.html
fails-if(Quirks) == displayIndent-1.html displayIndent-1-ref.html
fails-if(Quirks) == displayIndent-2.html displayIndent-2-ref.html
fails-if(Quirks) == displayIndent-1a.html displayIndent-1-ref.html
fails-if(Quirks) == displayIndent-1b.html displayIndent-1-ref.html
fails-if(Quirks) == displayIndent-2a.html displayIndent-2-ref.html
fails-if(Quirks) == displayIndent-2b.html displayIndent-2-ref.html
fails-if(Quirks) == displayIndent-3a.html displayIndent-3-ref.html
fails-if(Quirks) == displayIndent-3b.html displayIndent-3-ref.html


0 comments on commit 783733a

Please sign in to comment.