public void SelectChildImgAndBackgroundImageElements()
{
var dom = new XmlDocument();
dom.LoadXml("<div>" +
"<div id='thisShouldBeIgnored'>" +
"<img/>" +
"<div style=\"background-image : URL(\'old.png\')\"/>" +
"<img/>" +
"<div style=\"background-image : URL(\'old.png\')\"/>" +
"</div>" +
"<div id='thisOne'>" +
"<foo/>" +
"<img/>" +
"<div style=\"color:red;\">hello</div><div style=\" background-image : URL(\'old.png\')\"/>" +
"</div>" +
"</div>");
var elements = HtmlDom.SelectChildImgAndBackgroundImageElements(dom.SelectSingleNode("//*[@id='thisOne']") as XmlElement);
Assert.AreEqual(2,elements.Count);
}