Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Invalid aria.utils.Html test in Internet Explorer #322

Closed
wants to merge 1 commit into from

1 participant

Fabio Crisci
Fabio Crisci

Html test contains two errors

  1. disabled is a boolean attribute, so it's value should be disabled
  2. using border as style make testing IE painful, the returned value is border-top/bottom/left/right Using color reduces the problem but anyway the return value is COLOR: black : mixed case and no semicolon
Fabio Crisci piuccio fix #322 invalid html test
Html test contains two errors

1. disabled is a boolean attribute, so it's value should be 'disabled'
2. using border as style make testing IE painful, the returned value is "border-top/bottom/left/right"
Using color reduces the problem but anyway the return value is 'COLOR: black' : mixed case and no semicolon
d18281a
Fabio Crisci piuccio closed this pull request from a commit
Fabio Crisci piuccio fix #322 invalid html test
Html test contains two errors

1. disabled is a boolean attribute, so it's value should be 'disabled'
2. using border as style make testing IE painful, the returned value is "border-top/bottom/left/right"
Using color reduces the problem but anyway the return value is 'COLOR: black' : mixed case and no semicolon
37cccae
Fabio Crisci piuccio closed this in 37cccae
Susanta Kumar Behera susant123 referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 10, 2013
  1. Fabio Crisci

    fix #322 invalid html test

    piuccio authored
    Html test contains two errors
    
    1. disabled is a boolean attribute, so it's value should be 'disabled'
    2. using border as style make testing IE painful, the returned value is "border-top/bottom/left/right"
    Using color reduces the problem but anyway the return value is 'COLOR: black' : mixed case and no semicolon
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 4 deletions.
  1. +12 −4 test/aria/utils/Html.js
16 test/aria/utils/Html.js
View
@@ -52,8 +52,16 @@ Aria.classDefinition({
} else if (aria.templates.DomElementWrapper.attributesWhiteList.test(key)) {
var value = stringUtil.encodeForQuotedHTMLAttribute(attribute);
var got = div.getAttribute(key);
- this.assertEquals(got, value, "The attribute " + key + " should be equals to " + value
- + " got " + got);
+
+ if (key === "style") {
+ // IE messes up pretty badly with style tags
+ got = got.toLowerCase();
+ // just add a semicolon if missing
+ if (got.charAt(got.length - 1) !== ";") {
+ got += ";"
+ }
+ }
+ this.assertEquals(got, value, "The attribute " + key + " should be " + value + " got " + got);
}
}
}
@@ -83,7 +91,7 @@ Aria.classDefinition({
data3 : "data3-value"
},
dir : "ltr",
- disabled : "false",
+ disabled : "disabled",
height : "100px",
lang : "en-US",
maxlength : "10",
@@ -95,7 +103,7 @@ Aria.classDefinition({
rowspan : "2",
selected : "myValue",
size : "100px",
- style : "border: 1px solid black;",
+ style : "color: black;",
title : "myElement",
type : "text",
valign : "middle",
Something went wrong with that request. Please try again.