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

Unified Diff: content/test/data/media/mediarecorder_test.html

Issue 1565343002: MediaRecorder: content browsertests fix a few lint warnings in mediarecorder_test.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the "== true" checks in 4 locations Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/media/mediarecorder_test.html
diff --git a/content/test/data/media/mediarecorder_test.html b/content/test/data/media/mediarecorder_test.html
index 9b1ccd5fd9ad801073cb97e31c5e6456e00f6805..8644fb58b5996710a6db74541f929e82e4d24b41 100644
--- a/content/test/data/media/mediarecorder_test.html
+++ b/content/test/data/media/mediarecorder_test.html
@@ -14,7 +14,7 @@
'use strict';
-const DEFAULT_CONSTRAINTS= {audio:true, video:true};
+const DEFAULT_CONSTRAINTS = {audio: true, video: true};
const DEFAULT_RECORDER_MIME_TYPE = '';
const DEFAULT_TIME_SLICE = 100;
const FREQUENCY = 880;
@@ -128,7 +128,7 @@ function testStartAndRecorderState() {
.then(function() {
return waitFor('Make sure the start event was received',
function() {
- return startEventReceived == true;
+ return startEventReceived;
});
})
.catch(function(err) {
@@ -158,7 +158,7 @@ function testStartStopAndRecorderState() {
.then(function() {
return waitFor('Make sure the stop event was received',
function() {
- return stopEventReceived == true;
+ return stopEventReceived;
});
})
.catch(function(err) {
@@ -185,7 +185,7 @@ function testStartAndDataAvailable() {
recorder.ondataavailable = function(event) {
timeStamps.push(event.timeStamp);
if (event.data.size > 0)
- videoSize += event.data.size;
+ videoSize += event.data.size;
else
emptyBlobs += 1;
};
@@ -223,7 +223,7 @@ function testStartWithTimeSlice() {
recorder.ondataavailable = function(event) {
timeStamps.push(event.timeStamp);
if (event.data.size > 0)
- videoSize += event.data.size;
+ videoSize += event.data.size;
else
emptyBlobs += 1;
};
@@ -264,13 +264,13 @@ function testResumeAndRecorderState() {
theRecorder.onresume = function(event) {
resumeEventReceived = true;
assertEquals('recording', theRecorder.state);
- }
+ };
theRecorder.resume();
})
.then(function() {
return waitFor('Making sure the resume event has been received',
function() {
- return resumeEventReceived == true;
+ return resumeEventReceived;
});
})
.catch(function(err) {
@@ -309,7 +309,7 @@ function testResumeAndDataAvailable() {
.then(function() {
theRecorder.ondataavailable = function(event) {
if (event.data.size > 0) {
- videoSize += event.data.size;
+ videoSize += event.data.size;
} else {
console.log('This dataavailable event is empty', event);
emptyBlobs += 1;
@@ -352,13 +352,13 @@ function testPauseAndRecorderState() {
theRecorder.onpause = function(event) {
pauseEventReceived = true;
assertEquals('paused', theRecorder.state);
- }
+ };
theRecorder.pause();
})
.then(function() {
return waitFor('Making sure the pause event has been received',
function() {
- return pauseEventReceived == true;
+ return pauseEventReceived;
});
})
.catch(function(err) {
@@ -399,8 +399,6 @@ function testPauseStopAndRecorderState() {
// function is called.
function testPausePreventsDataavailableFromBeingFired() {
var theRecorder;
- var videoSize = 0;
- var emptyBlobs = 0;
navigator.mediaDevices.getUserMedia(DEFAULT_CONSTRAINTS)
.then(function(stream) {
return createAndStartMediaRecorder(stream, DEFAULT_RECORDER_MIME_TYPE);
@@ -515,7 +513,7 @@ function testTwoChannelAudio() {
var audioSize = 0;
var context = new OfflineAudioContext(2, NUM_SAMPLES, SAMPLING_RATE);
var oscillator = context.createOscillator();
- oscillator.type = "sine";
+ oscillator.type = 'sine';
oscillator.frequency.value = FREQUENCY;
var dest = context.createMediaStreamDestination();
dest.channelCount = 2;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698