See the explainer for details. The Badge interface is a member on Window and exposes two static methods:
set(contents): Sets the associated app's badge as a “flag” (the argument is ignored).
clear(): Sets the associated app's badge to nothing.
web_tests/badging/*.html tests that the API accepts/rejects the appropriate inputs (with a mock Mojo service). Testing at other layers will be added during implementation.