| Index: LayoutTests/fast/css/namespaces/insert-namespace-with-same-prefix.xhtml
|
| diff --git a/LayoutTests/fast/css/namespaces/insert-namespace-with-same-prefix.xhtml b/LayoutTests/fast/css/namespaces/insert-namespace-with-same-prefix.xhtml
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..09969ebedff2c9200ea920ec4feb09cc28419d25
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/namespaces/insert-namespace-with-same-prefix.xhtml
|
| @@ -0,0 +1,26 @@
|
| +<html xmlns="http://www.w3.org/1999/xhtml">
|
| +
|
| +<style>
|
| +@namespace myprefix url(banana);
|
| +</style>
|
| +<div id="target1" xmlns="banana"></div>
|
| +<div id="target2" xmlns="apple"></div>
|
| +<div id="target3" xmlns="mango"></div>
|
| +
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +
|
| +<script>
|
| +test(function(){
|
| + var styleSheet = document.styleSheets[0];
|
| + styleSheet.insertRule('@namespace myprefix url("mango");', styleSheet.cssRules.length);
|
| + styleSheet.insertRule('@namespace myprefix url("apple");', 0);
|
| + styleSheet.insertRule('div { background-color: red; }', styleSheet.cssRules.length);
|
| + styleSheet.insertRule('myprefix|div { background-color: green; }', styleSheet.cssRules.length);
|
| +
|
| + assert_equals(getComputedStyle(document.getElementById('target1')).backgroundColor, 'rgb(255, 0, 0)');
|
| + assert_equals(getComputedStyle(document.getElementById('target2')).backgroundColor, 'rgb(0, 128, 0)');
|
| + assert_equals(getComputedStyle(document.getElementById('target3')).backgroundColor, 'rgb(255, 0, 0)');
|
| +}, "If namespace prefix is declated more than once only the last declaration should be used");
|
| +</script>
|
| +</html>
|
|
|