source: https://en.wikipedia.org/wiki/Protest_and_dissent_in_China
https://en.wikipedia.org/wiki/2012_China_anti-Japanese_demon...
These are usually broadcasted openly on the Chinese internet and allowed by the Chinese government. Like I'm of Chinese ethnicity and I occasionally see Chinese news, these are the only protests put on Chinese State news that you can see because it forwards Chinese govt. agenda.
EDIT: Note that a BBC News article about it says that "The BBC's Martin Patience in Beijing says the outbreak of protests was almost certainly sanctioned by the Chinese authorities, as they were well policed."
http://www.bbc.com/news/world-asia-19312226
If there is police allowed around a protest in China, it usually is legal
Chinese government often uses demonstrations that prove their point or to forward their political agenda