9 <a href=
"chromium-selectionAsMarkup.html" class=
"red">hello
</a>
16 var range
= document
.createRange();
17 range
.selectNodeContents(document
.getElementById("selection"));
18 document
.getSelection().addRange(range
);
19 var sel
= testRunner
.selectionAsMarkup();
23 if (sel
.indexOf("not selection") != -1)
24 errors
+= "FAIL: non-selection text found\n";
25 if (sel
.indexOf("color: red") == -1)
26 errors
+= "FAIL: style not pushed down\n";
27 if (sel
.indexOf("resources/chromium-selectionAsMarkup.html") == -1)
28 errors
+= "FAIL: url not resolved\n";
31 document
.body
.innerText
= "PASS";
33 document
.body
.innerText
= errors
;
35 testRunner
.notifyDone();
40 This test makes sure that the markup used by print selection
41 contains absolute urls and pushed down styles. This test depends