summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/css-parser/attribute-selector-whitespace.html
blob: c41c0c9ca248392f77134349e2c59663b3cbf15c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>

<div id="div1" data="hello"></div>
<div id="div2" test="yay"></div>

<script>
test(function () {
    assert_equals(div1, document.querySelector("[ data ]"));
    assert_equals(div1, document.querySelector("[ data = hello ]"));
    assert_equals(div2, document.querySelector("[ test $=ay ]"));
    assert_equals(div2, document.querySelector("[test *= a]"));
    assert_equals(div1, document.querySelector("[ data^=h ]"));
}, "Checks that whitespaces are allowed in attribute selectors");
</script>