blob: 0e072afca617e7b0f64e4191f0e166d8c68212a3 [file] [log] [blame]
This test if the :not selector gets the specificity of its simple selector in various scenarios.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
debug("These spans should alternate red and green");
span id= span10 class = evenclass1 span id= span11 class = oddclass1 span id= span12 class = evenclass1 span id= span13 class = oddclass1
debug("These spans should alternate green and blue");
span id= span20 class = evenclass2 span id= span21 class = oddclass2 span id= span22 class = evenclass2 span id= span23 class = oddclass2
debug("These spans should alternate blue and gray");
span id= span30 class = evenclass3 span id= span31 class = oddclass3 span id= span32 class = evenclass3 span id= span33 class = oddclass3
debug("These spans should be red, green, blue, green");
span id= span40 class = evenclass4 span id= span41 class = oddclass4 span id= span42 class = evenclass4 span id= span43 class = oddclass4
Test that :not selector with class name gets higher specificity than :not selector with tag name, or a selector with tag name
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
Test that :not selector with tag name does not get higher specificity than a selector with class name
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 0, 255)'
Test that :not selector with class name gets the same specificity as any selector with class name
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 0, 255)'
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(128, 128, 128)'
Test that :not selector with id gets higher specificity than a selector with class name, but the same specificity as any selector with id
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(255, 0, 0)'
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 0, 255)'
PASS document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color') is 'rgb(0, 128, 0)'
PASS successfullyParsed is true
TEST COMPLETE