What happens when an attacker completely controlls your Internet connection? Bitcoin assumes that everybody sees the same ledger. However, what if your ISP is evil, and modifies your view of the Bitcoin network? Is it possible for such an evil ISP to make your own transactions not go to the real Bitcoin network, while returning results that make you believe that everything is fine? Your local blockchain could end up extremely badly out of sync with the global blockchain.

Is this scenario possible? If so, what happens when you finally sync back with the real blockchain? As far as I understand, Bitcoin always chooses the longest blockchain, but couldn't your evil ISP simulate a really busy Bitcoin network to you so that your fake blockchain is even longer?

Does this mean that applications like Satoshi Proof and Namecoin aren't really secure if networks can be maliciously partitioned? In Namecoin, for example, wouldn't it be possible for a bad ISP to simulate a blockchain that contains wrong domain information?
Yes, the scenario is possible. The attacker has two possibilities: censoring data sent to the network (likely your transactions) and censoring what the nodes sees from the network.

In the first case the isolated node will attempt to resend transactions that belong to it until they get invalidated or committed into the blockchain.

In the second case the isolated node will not receive incoming transactions and eventually will not receive blocks (if these contain censored transactions). It is however not possible to fool the node into considering transactions as confirmed without the attacker also producing a valid proof-of-work.

The same argument is valid for Satoshi Proof and Namecoin, you can hide transactions, facts and domains, but you cannot inject wrong information.

Once reconnected the node will synchronize with the network (download blockchain &amp; send its transactions) and eventually be up to date.