Fixed #23806 -- Added a test case for settings.DISALLOWED_USER_AGENTS.

Any suggestions or feedback is welcome.