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

Side by Side Diff: chrome/test/data/extensions/api_test/tab_capture/end_to_end.js

Issue 121203002: Use window.URL instead of window.webkitURL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: window.URL -> URL in user_images_grid.js Created 6 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The tests here cover the end-to-end functionality of tab capturing and 5 // The tests here cover the end-to-end functionality of tab capturing and
6 // playback as video. The page generates a test signal (a full color fill), and 6 // playback as video. The page generates a test signal (a full color fill), and
7 // the rendering output of the tab is captured into a LocalMediaStream. Then, 7 // the rendering output of the tab is captured into a LocalMediaStream. Then,
8 // the LocalMediaStream is plugged into a video element for playback, and a 8 // the LocalMediaStream is plugged into a video element for playback, and a
9 // canvas is used to examine the frames of the video for expected content. 9 // canvas is used to examine the frames of the video for expected content.
10 // 10 //
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ++curColorIdx; 78 ++curColorIdx;
79 updateTestDocument(); 79 updateTestDocument();
80 } else { 80 } else {
81 video.removeEventListener("timeupdate", checkVideoForFillColor); 81 video.removeEventListener("timeupdate", checkVideoForFillColor);
82 stream.stop(); 82 stream.stop();
83 chrome.test.succeed(); 83 chrome.test.succeed();
84 } 84 }
85 } 85 }
86 } 86 }
87 // Play the LocalMediaStream in the video element. 87 // Play the LocalMediaStream in the video element.
88 video.src = webkitURL.createObjectURL(stream); 88 video.src = URL.createObjectURL(stream);
89 video.play(); 89 video.play();
90 90
91 // Kick it off. 91 // Kick it off.
92 updateTestDocument(); 92 updateTestDocument();
93 video.addEventListener("timeupdate", checkVideoForFillColor); 93 video.addEventListener("timeupdate", checkVideoForFillColor);
94 } 94 }
95 95
96 // Set up a WebRTC connection and pipe |stream| through it. 96 // Set up a WebRTC connection and pipe |stream| through it.
97 // Call TestStream with the new stream when done. 97 // Call TestStream with the new stream when done.
98 function testThroughWebRTC(stream) { 98 function testThroughWebRTC(stream) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 chrome.test.runTests([ 153 chrome.test.runTests([
154 endToEndVideoTest, 154 endToEndVideoTest,
155 endToEndVideoTestWithWebRTC 155 endToEndVideoTestWithWebRTC
156 ]); 156 ]);
157 157
158 // TODO(miu): Once the WebAudio API is finalized, we should add a test to emit a 158 // TODO(miu): Once the WebAudio API is finalized, we should add a test to emit a
159 // tone from the sender page, and have the receiver page check for the audio 159 // tone from the sender page, and have the receiver page check for the audio
160 // tone. 160 // tone.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698