Commit 66888471 authored by Ben Wagner's avatar Ben Wagner Committed by Chromium LUCI CQ

Don't change copyright/license notices on imported files

Followup to
https://chromium-review.googlesource.com/c/chromium/src/+/2566935/5#message-8b391d170d115a9b89c0a985ab0a8a42a208695b

The license was discussed in the original code review in
https://codereview.chromium.org/2761163003#msg15, but it seems that
changing the license was chosen instead. There no longer appears to be
an issue with presubmits when a compatible license is used.

Only tools/perf/page_sets/update_webrtc_cases is manually edited in this
CL. Other changes were generated by this script.

`./tools/perf/run_benchmark run webrtc --browser=system` passes locally
on Mac.

Change-Id: I6fc40e29731205b7115c91127015a9f299449389
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2573141Reviewed-by: default avatarMirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
Cr-Commit-Position: refs/heads/master@{#836248}
parent 98f82f42
......@@ -42,16 +42,6 @@ ADDED_SCRIPT_TAGS = (
'</body></html>'
)
COPYRIGHT_NOTICE = [
'Copyright 2017 The Chromium Authors. All rights reserved.\n',
'Use of this source code is governed by a BSD-style license that can be\n',
'found in the LICENSE file.\n',
]
COPYRIGHT_NOTICE_LENGTH = 8
JS_COPYRIGHT_NOTICE = ' * '.join(['/*\n'] + COPYRIGHT_NOTICE) + ' */\n'
HTML_COPYRIGHT_NOTICE = ' * '.join(['<!--\n'] + COPYRIGHT_NOTICE) + '-->\n'
STRIPPED_TAGS_RE = ('( *<meta.*?>\n?| *<link.*?>\n?|'
' *<script.*>.*?</script>\n?| *</body>.*?</html>)')
......@@ -70,22 +60,21 @@ class TemporaryDirectory(object):
def ConcatJSDir(origin, destination):
dest_contents = [JS_COPYRIGHT_NOTICE]
contents = ''
for filename in sorted(os.listdir(origin)):
if filename.endswith('.js'):
with open(os.path.join(origin, filename)) as input_file:
src_contents = input_file.readlines()
dest_contents += src_contents[COPYRIGHT_NOTICE_LENGTH:]
if contents:
contents += '\n'
contents += input_file.read()
# Replace references to chrome.webm with road_trip_640_480.mp4, which has
# already been uploaded to cloud storage.
dest_contents = [re.sub('(../)+video/chrome.webm', 'road_trip_640_480.mp4', x)
for x in dest_contents]
contents = re.sub('(../)+video/chrome.webm', 'road_trip_640_480.mp4',
contents, flags=re.MULTILINE)
with open(destination, 'w') as output_file:
output_file.writelines(dest_contents)
output_file.write(contents)
def CopyHTMLFile(test_name, origin, destination):
......@@ -97,12 +86,8 @@ def CopyHTMLFile(test_name, origin, destination):
flags=re.MULTILINE|re.DOTALL)
contents += ADDED_SCRIPT_TAGS % test_name
contents = [line + '\n' for line in contents.split('\n')]
contents = (contents[:1] + [HTML_COPYRIGHT_NOTICE] +
contents[COPYRIGHT_NOTICE_LENGTH:])
with open(destination, 'w') as output_file:
output_file.writelines(contents)
output_file.write(contents)
def main():
......@@ -113,7 +98,6 @@ def main():
'This script downloads the test pages from the WebRTC GitHub '
'repository and copies them to the DESTINATION directory after '
'processing them as follows: \n'
' * Adds a copyright notice on top of the HTML and JS files.\n'
' * Deletes the <meta> tags.\n'
' * Discards the CSS files and corresponding link tags.\n'
' * Renames the index.html to testname.html.\n'
......
<!DOCTYPE html>
<!--
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
-->
<html><head>
<title>Canvas capture stream to peerConnection</title>
......@@ -21,4 +23,4 @@
<script src="canvas-capture.js"></script>
</body></html>
</body></html>
\ No newline at end of file
/*
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
const DEFAULT_FRAME_RATE = 30;
......
<!DOCTYPE html>
<!--
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
-->
<html>
<head>
......@@ -51,4 +53,4 @@
<script src="codec_constraints.js"></script>
</body></html>
</body></html>
\ No newline at end of file
/*
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
var startButton = document.getElementById('startButton');
......
<!DOCTYPE html>
<!--
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
-->
<html>
<head>
......@@ -78,4 +80,4 @@
<script src="datatransfer.js"></script>
</body></html>
</body></html>
\ No newline at end of file
/*
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
const MAX_CHUNK_SIZE = 262144;
......
<!DOCTYPE html>
<!--
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
-->
<html>
<head>
......@@ -40,4 +42,4 @@
<script src="multiple-peerconnections.js"></script>
</body></html>
</body></html>
\ No newline at end of file
/*
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
/* jshint esversion: 6 */
'use strict';
......
......@@ -4,6 +4,8 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
-->
<html>
<head>
<title>Pause Play Test</title>
</head>
<body>
......@@ -12,4 +14,4 @@
<table border="0" id="test-table"></table>
<script src="pause-play.js"></script>
</body></html>
</body></html>
\ No newline at end of file
......@@ -3,6 +3,9 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* exported startTest */
'use strict';
const $ = document.getElementById.bind(document);
......
<!DOCTYPE html>
<!--
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
-->
<html>
<head>
......@@ -100,4 +102,4 @@
<script src="resolution.js"></script>
</body></html>
</body></html>
\ No newline at end of file
/*
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
const dimensions = document.querySelector('#dimensions');
......
<!DOCTYPE html>
<!--
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
-->
<html>
<head>
......@@ -72,4 +74,4 @@
<script src="video-processing.js"></script>
</body></html>
</body></html>
\ No newline at end of file
/*
* Copyright 2017 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/* global VideoMirrorHelper */ // defined in video-mirror-helper.js
......@@ -53,6 +56,15 @@ class CameraSource { // eslint-disable-line no-unused-vars
}
}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/**
......@@ -124,6 +136,15 @@ class CanvasTransform { // eslint-disable-line no-unused-vars
/** @override */
destroy() {}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/* global MediaStreamTrackProcessor, MediaStreamTrackGenerator */
......@@ -388,6 +409,15 @@ function initUI() {
}
window.onload = initUI;
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/**
......@@ -486,6 +516,15 @@ class PeerConnectionPipe { // eslint-disable-line no-unused-vars
this.callee_.close();
}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/* global PeerConnectionPipe */ // defined in peer-connection-pipe.js
......@@ -535,6 +574,15 @@ class PeerConnectionSink { // eslint-disable-line no-unused-vars
if (this.pipe_) this.pipe_.destroy();
}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/* global PeerConnectionPipe */ // defined in peer-connection-pipe.js
......@@ -614,6 +662,15 @@ class PeerConnectionSource { // eslint-disable-line no-unused-vars
this.originalStreamSource_.destroy();
}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/* global createProcessedMediaStreamTrack */ // defined in main.js
......@@ -818,6 +875,15 @@ class Pipeline { // eslint-disable-line no-unused-vars
if (this.sink_) this.sink_.destroy();
}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/**
......@@ -854,6 +920,15 @@ class DelayTransform { // eslint-disable-line no-unused-vars
/** @override */
destroy() {}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/**
......@@ -928,6 +1003,15 @@ class VideoMirrorHelper { // eslint-disable-line no-unused-vars
}
}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/**
......@@ -975,6 +1059,15 @@ class VideoSink { // eslint-disable-line no-unused-vars
}
}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/**
......@@ -1077,6 +1170,15 @@ class VideoSource { // eslint-disable-line no-unused-vars
}
}
}
/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
*/
'use strict';
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment