While a black bear is capable of seriously maiming or killing a dog or human, s/he is more likely to run up a tree, or to run her cubs up a tree, to avoid an encounter.
Grizzlies are more likely to stand their ground and defend themselves; they are not good climbers.