China on Tuesday condemned violent protests in Hong Kong as an “undisguised challenge” to the formula under which the city is ruled, hours after police fired tear gas to disperse hundreds of protesters who stormed and trashed the legislature.