summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/css-shorthand-common-value.html
blob: 51e82f925f4720cc687d25ea0b132750ba33b8db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!doctype html>
<style>
#test {
    border: 10px solid red;
    border-top-width: 50px;
}
</style>
<p>getPropertyValue('border') should not return a value for any property that doesn't have the same value for top, left, right and bottom, even if the values that differ are implicitly set by a shorthand.
<pre id="result">
</pre>

<script>
  if (window.testRunner)
    testRunner.dumpAsText();
  var sheet = document.querySelector('style').sheet;
  var expected = 'solid red';
  var actual = sheet.cssRules[0].style.getPropertyValue('border');

if (expected == actual)
    document.getElementById('result').innerText = 'PASS';
else
    document.getElementById('result').innerText = 'FAIL: expected "' + expected + '", got "' + actual + '"';

</script>