A contentious internet surveillance bill that creates databases of Britons’ online activity has become law—though the government says some of its provisions still need “extensive testing” before taking effect. House of Commons Speaker John Bercow told lawmakers on Tuesday that the Investigatory Powers Bill had received royal assent, the last formality to becoming law. It…