Does China have it out for U.S. companies? Apple recently lost a patent case in China and has faced some bad press there as well. Now Tesla is facing a lawsuit and also bad press in China. It’s probably no coincidence, as China has a history of targeting foreign companies. And yet, Chinese consumers have shown that they have an appetite for products made by U.S. companies and both Tesla Motors Inc (NASDAQ:TSLA) and Apple Inc. (NASDAQ:AAPL) have emphasized how important the Chinese market is for them.

Apple Buy Tesla

Apple versus China

This week Apple lost one of its many patent cases, this time in China. A court there ruled in favor of the Chinese company that opposed Apple. Zhizhen sued Apple in 2012 over its Siri digital personal assistant feature, claiming that Apple infringed upon its patents for voice recognition technology. Apple counter-sued, saying that the Chinese company’s patents were invalid, but the Chinese court ruled against Apple. Unsurprisingly, Apple plans to appeal the case.

Of course a patent infringement case doesn’t really say much about what Chinese officials think about Apple, as the company has won and lost cases in countries around the world. However, Chinese state-run media targeted Apple last year, complaining about the company’s return and repair policies and calling Apple arrogant. The company has also been accused of tempting poor college students with “fancy electronic products” that they can’t really afford. Undaunted, Apple hasn’t really suffered from these reputation attacks, as Chinese consumers continue to snap up the company’s products.

Apple has also faced trademark infringement lawsuits in China. A little over a week ago, a Chinese company sued Apple in connection with the use of its Homevv trademark on the App Store. In 2012, Apple was in danger with losing the iPad trademark in China.

Tesla Motors versus China

Tesla got a taste of doing business in China more recently, as it also faces a lawsuit for trademark infringement. This story has been going on for months. Zhan Baosheng previously owned the Tesla trademark in China, although he never seems to have actually released any products using the mark, so the Chinese government has so far backed Tesla Motors. It’s too early to know yet if Zhan will prevail in the case in the end.

Tesla Motors also faced the ire of one angry Chinese consumer who smashed the windshield of his Model S to protest the automaker. Just as the Chinese media called Apple arrogant last year, so this consumer has now called Tesla arrogant. He and other angry Tesla customers protested the delivery delays. However, the automaker has emphasized repeatedly that it has production constraints.

If Apple’s problems in China are any indication though, Tesla Motors should be able to weather the storms in China as well.