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

Side by Side Diff: LayoutTests/media/video-test.js

Issue 1203693002: Unhide 'window.console' by renaming console variable in layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 1
2 var video = null; 2 var video = null;
3 var mediaElement = document; // If not set, an event from any element will trigg er a waitForEvent() callback. 3 var mediaElement = document; // If not set, an event from any element will trigg er a waitForEvent() callback.
4 var console = null; 4 var consoleLog = null;
philipj_slow 2015/07/01 08:32:25 I'd call it consoleDiv or consoleElement to avoid
Srirama 2015/07/01 09:48:38 Done.
5 var printFullTestDetails = true; // This is optionaly switched of by test whose tested values can differ. (see disableFullTestDetailsPrinting()) 5 var printFullTestDetails = true; // This is optionaly switched of by test whose tested values can differ. (see disableFullTestDetailsPrinting())
6 var Failed = false; 6 var Failed = false;
7 7
8 var track = null; // Current TextTrack being tested. 8 var track = null; // Current TextTrack being tested.
9 var cues = null; // Current TextTrackCueList being tested. 9 var cues = null; // Current TextTrackCueList being tested.
10 var numberOfTrackTests = 0; 10 var numberOfTrackTests = 0;
11 var numberOfTracksLoaded = 0; 11 var numberOfTracksLoaded = 0;
12 12
13 findMediaElement(); 13 findMediaElement();
14 logConsole(); 14 logConsole();
(...skipping 11 matching lines...) Expand all
26 printFullTestDetails = false; 26 printFullTestDetails = false;
27 } 27 }
28 28
29 function enableFullTestDetailsPrinting() 29 function enableFullTestDetailsPrinting()
30 { 30 {
31 printFullTestDetails = true; 31 printFullTestDetails = true;
32 } 32 }
33 33
34 function logConsole() 34 function logConsole()
35 { 35 {
36 if (!console && document.body) { 36 if (!consoleLog && document.body) {
37 console = document.createElement('div'); 37 consoleLog = document.createElement('div');
38 document.body.appendChild(console); 38 document.body.appendChild(consoleLog);
39 } 39 }
40 return console; 40 return consoleLog;
41 } 41 }
42 42
43 function findMediaElement() 43 function findMediaElement()
44 { 44 {
45 try { 45 try {
46 video = document.getElementsByTagName('video')[0]; 46 video = document.getElementsByTagName('video')[0];
47 if (video) 47 if (video)
48 mediaElement = video; 48 mediaElement = video;
49 else { 49 else {
50 audio = document.getElementsByTagName('audio')[0]; 50 audio = document.getElementsByTagName('audio')[0];
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 func(); 358 func();
359 } 359 }
360 360
361 requiredEvents = []; 361 requiredEvents = [];
362 for (var i = 0; i < eventList.length; i++) { 362 for (var i = 0; i < eventList.length; i++) {
363 requiredEvents[i] = eventList[i][1]; 363 requiredEvents[i] = eventList[i][1];
364 eventList[i][0].addEventListener(requiredEvents[i], _eventCallback, true ); 364 eventList[i][0].addEventListener(requiredEvents[i], _eventCallback, true );
365 } 365 }
366 } 366 }
OLDNEW
« no previous file with comments | « LayoutTests/media/encrypted-media/encrypted-media-utils.js ('k') | LayoutTests/media/w3c-media-utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698