summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-typed-om/stylevalue-serialization/cssImageValue.html
blob: 92256e59673143b147f3d7612be812f4c6c2c027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!doctype html>
<meta charset="utf-8">
<title>CSSURLImageValue serialization tests</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#urlimagevalue-serialization">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../resources/testhelper.js"></script>
<body>
<div id="log"></div>
<div id="testUrl" style="background-image: url('/media/1x1-green.png')"></div>
<script>
'use strict';

test(() => {
  const result = document.getElementById('testUrl').attributeStyleMap.get('background-image');
  assert_equals(result.toString(), 'url("/media/1x1-green.png")');
}, 'CSSUrlImageValue serializes correctly');

</script>