Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: LayoutTests/fast/css/namespaces/insert-namespace-with-same-prefix.xhtml

Issue 1321943002: Support for CSSOM CSSNamespaceRule interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html xmlns="http://www.w3.org/1999/xhtml">
2
3 <style>
4 @namespace myprefix url(banana);
5 </style>
6 <div id="target1" xmlns="banana"></div>
7 <div id="target2" xmlns="apple"></div>
8 <div id="target3" xmlns="mango"></div>
9
10 <script src="../../../resources/testharness.js"></script>
11 <script src="../../../resources/testharnessreport.js"></script>
12
13 <script>
14 test(function(){
15 var styleSheet = document.styleSheets[0];
16 styleSheet.insertRule('@namespace myprefix url("mango");', styleSheet.cssRul es.length);
17 styleSheet.insertRule('@namespace myprefix url("apple");', 0);
18 styleSheet.insertRule('div { background-color: red; }', styleSheet.cssRules. length);
19 styleSheet.insertRule('myprefix|div { background-color: green; }', styleShee t.cssRules.length);
20
21 assert_equals(getComputedStyle(document.getElementById('target1')).backgroun dColor, 'rgb(255, 0, 0)');
22 assert_equals(getComputedStyle(document.getElementById('target2')).backgroun dColor, 'rgb(0, 128, 0)');
23 assert_equals(getComputedStyle(document.getElementById('target3')).backgroun dColor, 'rgb(255, 0, 0)');
24 }, "If namespace prefix is declated more than once only the last declaration sho uld be used");
25 </script>
26 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/css-namespace-rule-expected.txt ('k') | LayoutTests/fast/dom/css-mediarule-functions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698