Skip to content

Commit

Permalink
Project import generated by Copybara.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 3ef0faf7a37d1a34ab4990f794094b7654b87456
  • Loading branch information
jiaqzhao authored and jiaqzhao committed Nov 7, 2018
1 parent c877d34 commit 1970b8f
Show file tree
Hide file tree
Showing 33 changed files with 1,243 additions and 988 deletions.
30 changes: 16 additions & 14 deletions harness/compactTestList.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
/*
Copyright 2018 Google Inc. All rights reserved.
/**
* @license
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';

(function() {
Expand Down
33 changes: 18 additions & 15 deletions harness/compactTestView.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
/*
Copyright 2018 Google Inc. All rights reserved.
/**
* @license
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';

var compactTestView = (function() {
Expand Down Expand Up @@ -41,7 +43,8 @@ function CompactTestView(fields, style) {
this.addLink('Links', 'links.html');
this.addLink('Instructions', 'instructions.html');
this.addLink('Changelog', 'changelog.html');
this.addLink('Download', 'download.tar.gz');
this.addLink('Download-Source', 'download.tar.gz');
this.addLink('Download-Media-files', 'YTS-media-files.tar.gz');
if (harnessConfig.novp9) {
this.addLink('No VP9', 'main.html');
}
Expand Down
30 changes: 16 additions & 14 deletions harness/constants.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
/*
Copyright 2018 Google Inc. All rights reserved.
/**
* @license
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';

var testVersion = 'Test-In-Progress';
30 changes: 16 additions & 14 deletions harness/eventListener.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
/*
Copyright 2018 Google Inc. All rights reserved.
/**
* @license
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';

(function() {
Expand Down
60 changes: 46 additions & 14 deletions harness/focusManager.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
/*
Copyright 2018 Google Inc. All rights reserved.
/**
* @license
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';

(function() {
Expand Down Expand Up @@ -281,6 +283,36 @@ function FocusManager() {
e.stopPropagation();
e.preventDefault();
}

// Animated WebP page scrolling
if (document.getElementById('webp-animated-container')) {
var target = document.getElementById('webp-animated-container');
var vpad = 0;
var hpad = 0;
switch(dir) {
case LEFT:
hpad = 0;
vpad = parseInt(target.style.top) / 2;
break;
case UP:
vpad = parseInt(target.style.top) / 2;
break;
case RIGHT:
hpad += 200;
vpad = parseInt(target.style.top) / 2;
break;
case DOWN:
vpad = parseInt(target.style.top);
break;
default:
break;
}
target.style.top = '0px';
target.style.left = '0px';
var rect = document.activeElement.getBoundingClientRect();
target.style.top = -(rect.top - vpad)/2 +'px';
target.style.left = -(rect.left + hpad)/2 +'px';
}
}

return true;
Expand Down
50 changes: 18 additions & 32 deletions harness/key.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/*
Copyright 2018 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @license
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

var keydb = {
0x25: 'Left',
Expand Down Expand Up @@ -40,7 +41,8 @@ var keydb = {
0x194: 'Green',
0x195: 'Yellow',
0x196: 'Blue',
0xAC:' YouTube button',
0xAC: 'YouTube button',
0x3000: 'YouTube button',
0x1AB: 'ChannelUp',
0x1AC: 'ChannelDown',
0x25F: 'Last',
Expand Down Expand Up @@ -131,19 +133,3 @@ function getKeyName(keycode) {
function translateKeycode(e) {
return getKeyName(e.keyCode);
};

function getKeycode(e) {
var keycode;
if (window.event) {
keycode = window.event.keyCode;
}
else if (e) {
if (e.which != 0) {
keycode = e.which;
} else {
keycode = e.keyCode;
}
}

return keycode;
};
30 changes: 16 additions & 14 deletions harness/logger.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
/*
Copyright 2018 Google Inc. All rights reserved.
/**
* @license
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';

(function() {
Expand Down
Loading

0 comments on commit 1970b8f

Please sign in to comment.