Manually set a hostname for IP address (i.e. /etc/hosts equiv.?)
Firefox Mobile supports HTTP proxies, so whilst it's a different rendering engine you should at least be able to get a feel for how your UI performs on a small touchscreen.  Here's how to get to the secret config section - http://support.mozilla.com/en-US/questions/758279

The default browser includes proxy support in Gingerbread (although that doesn't help you and your unrooted Desire right now, HTC should be offering an OTA update to Gingerbread soon, or it may spur you into rooting and re-flashing your phone).

(For both of these, you'd need to configure a proxy on your network so that it can serve up your foo.xyz domain)

Finally, you could always use the Android SDK's emulator.  Performance will be painfully slow, but you would at least be running the same rendering engine.

Edit: As GAThrawn mentions in the comments above, you could also possibly achieve what you want using DNS entries on your network's default DNS server or a development DNS server.  Your phone will pick up your wifi network's default DNS server, or you can change it to something specific via Settings > Wireless &amp; networks > Wi-Fi settings > Menu softkey > Advanced.