1 This test if the :not selector gets the specificity of its simple selector in various scenarios.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 debug("These spans should alternate red and green");
7 span id= span10 class = evenclass1 span id= span11 class = oddclass1 span id= span12 class = evenclass1 span id= span13 class = oddclass1
9 debug("These spans should alternate green and blue");
10 span id= span20 class = evenclass2 span id= span21 class = oddclass2 span id= span22 class = evenclass2 span id= span23 class = oddclass2
12 debug("These spans should alternate blue and gray");
13 span id= span30 class = evenclass3 span id= span31 class = oddclass3 span id= span32 class = evenclass3 span id= span33 class = oddclass3
15 debug("These spans should be red, green, blue, green");
16 span id= span40 class = evenclass4 span id= span41 class = oddclass4 span id= span42 class = evenclass4 span id= span43 class = oddclass4
19 Test that :not selector with class name gets higher specificity than :not selector with tag name, or a selector with tag name
20 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
21 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
22 Test that :not selector with tag name does not get higher specificity than a selector with class name
23 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
24 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 0, 255)'
25 Test that :not selector with class name gets the same specificity as any selector with class name
26 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 0, 255)'
27 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(128, 128, 128)'
28 Test that :not selector with id gets higher specificity than a selector with class name, but the same specificity as any selector with id
29 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
30 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
31 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 0, 255)'
32 PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
33 PASS successfullyParsed is true