The White House is testing smartphones from Samsung Electronics Corp. and LG Electronics Inc. for internal use, a person familiar with the matter said, threatening one of the last and most high-profile strongholds of BlackBerry Ltd.

The devices are being tested by the White House's internal technology team and the White House Communications Agency, a military unit in charge of President Barack Obama's communications, the person said. The tests are in the early stages, the person said, and any implementation of Samsung or LG...