Increase bandwidth of fake video signal used for testing. (#30226)

This will increase the size of an encoded 640x480 video from
approximately 8 Kbits/second to approximately 64 Kbits/second, which
means that limiting the bandwidth will actually have an effect.

This is done in preparation for further tests that limit the bandwidth
and expect an observable result.

Bug: None
Change-Id: Ib3c63c4ae8c41fe7c608f1c06c8c61c2beecbe11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3128063
Reviewed-by: Florent Castelli <orphis@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#916377}

Co-authored-by: Harald Alvestrand <hta@chromium.org>
diff --git a/webrtc/RTCPeerConnection-helper.js b/webrtc/RTCPeerConnection-helper.js
index 1521277..ac43527 100644
--- a/webrtc/RTCPeerConnection-helper.js
+++ b/webrtc/RTCPeerConnection-helper.js
@@ -407,6 +407,15 @@
       ctx.fillStyle = `rgb(${count%255}, ${count*count%255}, ${count%255})`;
       count += 1;
       ctx.fillRect(0, 0, width, height);
+      // Add some bouncing boxes in contrast color to add a little more noise.
+      const contrast = count + 128;
+      ctx.fillStyle = `rgb(${contrast%255}, ${contrast*contrast%255}, ${contrast%255})`;
+      const xpos = count % (width - 20);
+      const ypos = count % (height - 20);
+      ctx.fillRect(xpos, ypos, xpos + 20, ypos + 20);
+      const xpos2 = (count + width / 2) % (width - 20);
+      const ypos2 = (count + height / 2) % (height - 20);
+      ctx.fillRect(xpos2, ypos2, xpos2 + 20, ypos2 + 20);
       // If signal is set (0-255), add a constant-color box of that luminance to
       // the video frame at coordinates 20 to 60 in both X and Y direction.
       // (big enough to avoid color bleed from surrounding video in some codecs,