mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add a test for changing the media attribute on a link element.
This commit is contained in:
parent
b15c55e407
commit
361e41f0e7
6 changed files with 61 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
color: red;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: text/css
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test</title>
|
||||
<style>
|
||||
body {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
<p>This text should be green.
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test</title>
|
||||
<link rel=match href=stylesheet-media-ref.html>
|
||||
<style>
|
||||
body {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
<link rel=stylesheet id=link>
|
||||
<script>
|
||||
// This tests for a bug in Servo, where it would treat the media attribute as
|
||||
// if it was the href attribute.
|
||||
var link = document.getElementById("link");
|
||||
link.setAttribute("media", "all")
|
||||
</script>
|
||||
<p>This text should be green.
|
Loading…
Add table
Add a link
Reference in a new issue