In addition to the posts above, it is worth pointing out that this exact scenario is part of the flight testing of any new aircraft. If you can find it, there is a whole episode of the PBS show on the B777 that shows this test being carried out.
It was an especially odd one, because the aircraft had P&W engines and brakes designed to handle that, but they wanted to test the performance as if it was equipped with the more powerful RR engines. The chief pilot originally said no, but as the engineers at the various companies said ok, he relented.
The test required the aircraft to go to maximum power, in this case higher than the official rating so they could test the RR case. After it reached a certain speed, they put on full brakes, with the engines still at max power. When it finally came to a stop, the brakes were bright yellow. It then had to sit for a time (5 minutes IIRC) to simulate the emergency vehicles arriving, which then sprayed the brakes with water. It was quite impressive.
As they were careful to say, the idea of the test is not to pass some requirement, but to simply give future pilots an understanding of what to expect in the case it happened.