| 1 |
<!DOCTYPE html><!-- DO NOT EDIT. This file auto-generated by generate_closure_unit_tests.js --><!-- |
| 2 |
Copyright 2017 The Closure Library Authors. All Rights Reserved. |
| 3 |
|
| 4 |
Use of this source code is governed by the Apache License, Version 2.0. |
| 5 |
See the COPYING file for details. |
| 6 |
--><html><head><meta charset="UTF-8"> |
| 7 |
|
| 8 |
<script src="../base.js"></script> |
| 9 |
|
| 10 |
<script>goog.require('goog.style.bidiTest');</script> |
| 11 |
<title>Closure Unit Tests - goog.style.bidiTest</title><!-- |
| 12 |
Copyright 2017 The Closure Library Authors. All Rights Reserved. |
| 13 |
|
| 14 |
Use of this source code is governed by the Apache License, Version 2.0. |
| 15 |
See the COPYING file for details. |
| 16 |
--> |
| 17 |
<style> |
| 18 |
/* Using borders, padding, and margins of various prime values. */ |
| 19 |
.scrollDiv { |
| 20 |
left:50px; width:250px; height: 100px; |
| 21 |
position:absolute; overflow:auto; border-left: 3px solid green; |
| 22 |
border-right: 17px solid green; margin: 7px; padding: 13px; |
| 23 |
} |
| 24 |
</style> |
| 25 |
</head><body><span id="bodyChild" style="position:fixed;left:60px"> |
| 26 |
bodyChild |
| 27 |
</span> |
| 28 |
<div> |
| 29 |
<span> |
| 30 |
LTR |
| 31 |
</span> |
| 32 |
<div class="scrollDiv" dir="ltr" id="scrollDivLtr" onscroll="updateInfo()"> |
| 33 |
<div style="width: 1000px; height: 2000px;background-color: blue"> |
| 34 |
</div> |
| 35 |
<div id="scrolledElementLtr" style="background:yellow; top: 25px; left:85px; |
| 36 |
width: 100px; position:absolute"> |
| 37 |
elm |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
<div style="left:400px; position:absolute;"> |
| 41 |
<div> |
| 42 |
elm.offsetParent.scrollLeft: |
| 43 |
<span id="elementScrollLeftLtr"> |
| 44 |
</span> |
| 45 |
</div> |
| 46 |
<div> |
| 47 |
bidi.getScrollLeft(...): |
| 48 |
<span id="bidiScrollLeftLtr"> |
| 49 |
</span> |
| 50 |
</div> |
| 51 |
<div> |
| 52 |
bidi.getOffsetStart(...): |
| 53 |
<span id="bidiOffsetStartLtr"> |
| 54 |
</span> |
| 55 |
</div> |
| 56 |
<form action="bidi_test.html#" name="formLtr"> |
| 57 |
goog.style.bidi.setScrollOffset: |
| 58 |
<input name="pixelsLtr" type="text"> |
| 59 |
<a href="bidi_test.html#" onclick="goog.style.bidi.setScrollOffset( |
| 60 |
document.getElementById('scrollDivLtr'), |
| 61 |
parseInt(formLtr.elements['pixelsLtr'].value));"> |
| 62 |
set |
| 63 |
</a> |
| 64 |
</form> |
| 65 |
</div> |
| 66 |
<br> |
| 67 |
<br> |
| 68 |
<br> |
| 69 |
<br> |
| 70 |
<br> |
| 71 |
<br> |
| 72 |
<br> |
| 73 |
<br> |
| 74 |
</div> |
| 75 |
<hr> |
| 76 |
<div> |
| 77 |
<span> |
| 78 |
RTL |
| 79 |
</span> |
| 80 |
<div class="scrollDiv" dir="rtl" id="scrollDivRtl" onscroll="updateInfo();"> |
| 81 |
<div style="width:1000px; height:70px;background-color:blue"> |
| 82 |
</div> |
| 83 |
<div id="scrolledElementRtl" style="background:yellow; top: 25px; right:85px; |
| 84 |
width: 100px; position:absolute"> |
| 85 |
elm |
| 86 |
</div> |
| 87 |
</div> |
| 88 |
<div style="left:400px; position:absolute;"> |
| 89 |
<div> |
| 90 |
elm.offsetParent.scrollLeft: |
| 91 |
<span id="elementScrollLeftRtl"> |
| 92 |
</span> |
| 93 |
</div> |
| 94 |
<div> |
| 95 |
bidi.getScrollLeft(...): |
| 96 |
<span id="bidiScrollLeftRtl"> |
| 97 |
</span> |
| 98 |
</div> |
| 99 |
<div> |
| 100 |
bidi.getOffsetStart(...): |
| 101 |
<span id="bidiOffsetStartRtl"> |
| 102 |
</span> |
| 103 |
</div> |
| 104 |
<form action="bidi_test.html#" name="formRtl"> |
| 105 |
goog.style.setScrollOffset: |
| 106 |
<input name="pixelsRtl" type="text"> |
| 107 |
<a href="bidi_test.html#" onclick="goog.style.bidi.setScrollOffset( |
| 108 |
document.getElementById('scrollDivRtl'), |
| 109 |
parseInt(formRtl.elements['pixelsRtl'].value));"> |
| 110 |
set |
| 111 |
</a> |
| 112 |
</form> |
| 113 |
</div> |
| 114 |
<br> |
| 115 |
<br> |
| 116 |
<br> |
| 117 |
<br> |
| 118 |
<br> |
| 119 |
<br> |
| 120 |
<br> |
| 121 |
<br> |
| 122 |
</div> |
| 123 |
<div dir="rtl" id="scrollLeftRtl" style="position: relative; width: 100px; height: 100px; |
| 124 |
background-color: blue"> |
| 125 |
<div style="position:absolute; width: 200px; height: 20px; background-color: |
| 126 |
green"> |
| 127 |
INNER |
| 128 |
</div> |
| 129 |
</div> |
| 130 |
<hr> |
| 131 |
<br> |
| 132 |
<br> |
| 133 |
</body></html> |