The listed weapon damage takes into account all damage increasing affixes (elemental or none, percentage or flat). The listed weapon speed takes into account any IAS affix on the weapon. The listed DPS of the weapon is simply the average of the listed damage, times the listed speed.
What it won't account for is crit modifiers, dexterity, or any attack speed and damage bonus on your other equipment. If the listed DPS numbers on the item are close, I recommend doing the math as the higher listed DPS will not always do more damage.