Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: third_party/WebKit/LayoutTests/media/media-audio-no-spurious-repaints.html

Issue 2343713003: Fix under-invalidation of media slider thumb when network state changes (Closed)
Patch Set: - Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/media-audio-no-spurious-repaints-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <title>Verifies there are no spurious repaints for audio in a video tag.</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <video></video>
6 <script>
7 async_test(function(t) {
8 var video = document.querySelector('video');
9
10 video.addEventListener('canplaythrough', t.step_func(function() {
11 internals.startTrackingRepaints(document);
12 video.play();
13 }), false);
14
15 video.addEventListener('ended', t.step_func(function() {
16 var layerTree = internals.layerTreeAsText(
17 document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS);
18 var repaintRects = JSON.parse(layerTree).children[0].repaintRects;
19 internals.stopTrackingRepaints(document);
20
21 // Manually verify the number of repaints instead of using a repaint
22 // test since media playback is asynchronous by nature and its threading
23 // will cause a variance in the number of repaints on test bots.
24 var minExpected = 3, maxExpected = 4, expectedRect = [8, 8, 300, 150];
25
26 t.add_cleanup(function() {
27 if (t.status == t.PASS)
28 return;
29 console.log('FAIL! An unexpected number of repaints occurred;' +
30 ' expected ' + minExpected + ' to ' + maxExpected +
31 ' with rects of [' + expectedRect.join(', ') + '].' +
32 ' Actual layer tree: ' + layerTree);
33 });
34
35 assert_between_inclusive(repaintRects.length, minExpected, maxExpected);
36 for (var i = 0; i < repaintRects.length; ++i)
37 assert_array_equals(repaintRects[i], expectedRect);
38
39 t.done();
40 }), false);
41
42 video.src = 'content/silence.wav';
43 });
44 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/media-audio-no-spurious-repaints-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698