-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Łukasz Bendig
committed
Apr 28, 2023
1 parent
d700dbf
commit 291f771
Showing
10,185 changed files
with
480,349 additions
and
262,946 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[style] | ||
based_on_style = chromium | ||
based_on_style = yapf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,6 @@ | |
|
||
<a href="test_link2.html" id="testLink2">Test Link 2></a><br /> | ||
|
||
<a href="test_link2.html?plzblock=asdf" id="testLinkFiltered">Test Link Filtered></a><br /> | ||
|
||
<a href="test_link.html" id="testImageLink"><img src="test_image.png"></a><br /><br /> | ||
|
||
<a href="mailto:[email protected],[email protected]?Subject=EmailTest" id="testEmail">EmailTest</a><br /> | ||
|
15 changes: 15 additions & 0 deletions
15
...urces/chromium/src/chrome/test/data/android/url_overriding/navigation_from_page_show.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script> | ||
document.addEventListener("visibilitychange", () => { | ||
if (document.visibilityState === "visible") { | ||
window.location = 'intent://test/#Intent;scheme=externalappscheme;end'; | ||
} | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
Redirect on show. | ||
</body> | ||
</html> |
8 changes: 0 additions & 8 deletions
8
...rc/chrome/test/data/android/url_overriding/navigation_with_fallback_url_parent_frame.html
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
lgpl/sources/chromium/src/chrome/test/data/android/url_overriding/renavigate_frame.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> | ||
<script> | ||
function openWindow() { | ||
var x = window.open("hello.html"); | ||
var interval = setInterval(function () { | ||
if (!x.document.URL.includes("hello.html")) return; | ||
if (x.document.readyState !== "complete") return; | ||
x.location.href = "intent://test/#Intent;scheme=externalappscheme;end"; | ||
clearInterval(interval); | ||
}, 10); | ||
}; | ||
</script> | ||
</head> | ||
|
||
<body style='height:10000px;' onclick='openWindow();'> | ||
Click page to open App!! | ||
</body> | ||
|
||
</html> |
12 changes: 12 additions & 0 deletions
12
...urces/chromium/src/chrome/test/data/android/url_overriding/subframe_navigation_child.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<head> | ||
<meta name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> | ||
<script> | ||
function openApp() { | ||
location.href = 'PARAM_SUBFRAME_URL'; | ||
}; | ||
</script> | ||
</head> | ||
<body style='height:10000px;' onclick='openApp();'> | ||
Click page to open App!! | ||
</body> |
10 changes: 10 additions & 0 deletions
10
...chromium/src/chrome/test/data/android/url_overriding/subframe_navigation_child_blank.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<head> | ||
<meta name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> | ||
</head> | ||
<body> | ||
<a href='PARAM_SUBFRAME_URL' target='_Blank'> | ||
<div style='height:10000px; width:100%;'></div> | ||
</a> | ||
Click page to open App!! | ||
</body> |
8 changes: 8 additions & 0 deletions
8
...rces/chromium/src/chrome/test/data/android/url_overriding/subframe_navigation_parent.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!DOCTYPE html> | ||
<meta name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/> | ||
<body style='height:10000px'> | ||
<p>Hello World</p> | ||
<iframe src="subframe_navigation_childPARAM_BLANK.html?replace_text=PARAM_BASE64_NAME:PARAM_BASE64_VALUE" | ||
width="100%" height="99%"></iframe> | ||
</body> |
8 changes: 8 additions & 0 deletions
8
...omium/src/chrome/test/data/android/url_overriding/subframe_navigation_parent_sandbox.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!DOCTYPE html> | ||
<meta name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/> | ||
<body style='height:10000px'> | ||
<p>Hello World</p> | ||
<iframe src="subframe_navigation_childPARAM_BLANK.html?replace_text=PARAM_BASE64_NAME:PARAM_BASE64_VALUE" | ||
width="100%" height="99%" sandbox="allow-popups allow-script"></iframe> | ||
</body> |
100 changes: 100 additions & 0 deletions
100
lgpl/sources/chromium/src/chrome/test/data/android/view_transition.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script> | ||
const params = new URLSearchParams(window.location.search); | ||
let metaTagContent = 'width=device-width,minimum-scale=1'; | ||
if (params.has('resizes-content')) | ||
metaTagContent += ',interactive-widget=resizes-content'; | ||
else if (params.has('resizes-visual')) | ||
metaTagContent += ',interactive-widget=resizes-visual'; | ||
else if (params.has('overlays-content')) { | ||
metaTagContent += ',interactive-widget=overlays-content'; | ||
} | ||
|
||
let meta = document.createElement('meta'); | ||
meta.name = 'viewport'; | ||
meta.content = metaTagContent; | ||
document.head.appendChild(meta); | ||
</script> | ||
<script src="view_transition_util.js"></script> | ||
<style> | ||
body { | ||
margin: 0; | ||
} | ||
|
||
input { | ||
/* Invisible so that blinking cursor doesn't affect pixel tests */ | ||
position: absolute; | ||
top: 50px; | ||
opacity: 0; | ||
} | ||
|
||
#bottomfixed { | ||
position: fixed; | ||
left: 20px; | ||
bottom: 10px; | ||
width: 100px; | ||
height: 30px; | ||
background-color: coral; | ||
view-transition-name: bottom; | ||
contain: paint; | ||
} | ||
|
||
#topfixed { | ||
position: fixed; | ||
left: 20px; | ||
top: 10px; | ||
width: 100px; | ||
height: 30px; | ||
background-color: dodgerblue; | ||
view-transition-name: top; | ||
contain: paint; | ||
} | ||
|
||
#inflow { | ||
position: absolute; | ||
left: 100px; | ||
top: 200px; | ||
width: 100px; | ||
height: 300px; | ||
background-color: rebeccapurple; | ||
} | ||
|
||
/* This element will cover and show the position:fixed viewport to make it | ||
* easier to see in screenshot what's being rendered below the keyboard. */ | ||
#background { | ||
width: 100dvw; | ||
height: 100dvh; | ||
background-color: whitesmoke; | ||
} | ||
|
||
/* Step function means we'll keep the old snapshots in their initial state | ||
* for half the duration, then the new snapshots in their final state for | ||
* the last half of the duration. Note that tests pause the animation | ||
* and control the progress programmatically so the duration is used only | ||
* for live testing. */ | ||
::view-transition-group(*), | ||
::view-transition-new(*), | ||
::view-transition-old(*) { | ||
animation-duration: 5s; | ||
animation-timing-function: steps(2, jump-none); | ||
} | ||
</style> | ||
<script> | ||
updateDOM = function() { | ||
document.getElementById("inflow").style.transform = "translateX(100px)"; | ||
document.getElementById("bottomfixed").style.transform = "translateX(100px)"; | ||
document.getElementById("topfixed").style.transform = "translateX(100px)"; | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<div id="background"> | ||
<input id="inputElement" type="text"> | ||
<div id="inflow"></div> | ||
<div id="bottomfixed"></div> | ||
<div id="topfixed"></div> | ||
</div> | ||
</body> | ||
</html> |
61 changes: 61 additions & 0 deletions
61
lgpl/sources/chromium/src/chrome/test/data/android/view_transition_dialog.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width,minimum-scale=1"> | ||
<style> | ||
/* Step function means we'll keep the old snapshots in their initial state | ||
* for half the duration, then the new snapshots in their final state for | ||
* the last half of the duration. Note that tests pause the animation | ||
* and control the progress programmatically so the duration is used only | ||
* for live testing. */ | ||
::view-transition-group(*), | ||
::view-transition-new(*), | ||
::view-transition-old(*) { | ||
animation-duration: 5s; | ||
animation-timing-function: steps(2, jump-none); | ||
} | ||
|
||
dialog { | ||
width: 50dvw; | ||
height: 50dvh; | ||
box-sizing: border-box; | ||
border: 2px solid rebeccapurple; | ||
outline: none; | ||
} | ||
|
||
div { | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
background-color: red; | ||
} | ||
|
||
.vline { | ||
width: 2px; | ||
height: 100dvh; | ||
} | ||
|
||
.hline { | ||
width: 100dvw; | ||
height: 2px; | ||
} | ||
|
||
</style> | ||
<script src="view_transition_util.js"></script> | ||
<script> | ||
updateDOM = function() { | ||
document.getElementById("thedialog").showModal(); | ||
} | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<div class="vline" style="left: calc(25dvw - 2px)"></div> | ||
<div class="vline" style="left:75dvw"></div> | ||
<div class="hline" style="top: calc(25dvh - 2px)"></div> | ||
<div class="hline" style="top:75dvh"></div> | ||
<dialog id="thedialog"> | ||
This is a dialog. It should be positioned within the intersection of the red lines. | ||
</dialog> | ||
</body> | ||
</html> |
75 changes: 75 additions & 0 deletions
75
lgpl/sources/chromium/src/chrome/test/data/android/view_transition_util.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
let transition = null; | ||
|
||
// Allow tests to control when the transition starts. Tests call | ||
// startTransitionAnimation() to complete the author DOM callback and allow the | ||
// view-transition to start the animation. | ||
let startTransitionAnimation = null; | ||
let startPromise = | ||
new Promise(resolve => {startTransitionAnimation = resolve;}); | ||
|
||
// Allow tests to wait until the snapshot has been taken and is ready to start | ||
// transitioning. Tests use readyToStartPromise to wait until the the author | ||
// updateDOM callback has been invoked. | ||
let readyToStartResolve = null; | ||
let readyToStartPromise = | ||
new Promise(resolve => {readyToStartResolve = resolve;}); | ||
|
||
// Individual test files set this to perform the DOM update to the new | ||
// transition state. | ||
let updateDOM = null; | ||
|
||
// Sets the animation time to just before the end (not the end itself) to | ||
// prevent finishing the animation. Since the animations have steps timing | ||
// function the state is equivalent to the end state itself. | ||
function animateToEndState() { | ||
if (transition == null) | ||
throw new Error('Transition was already finished or never started.'); | ||
|
||
for (const anim of document.getAnimations()) | ||
anim.currentTime = anim.effect.getTiming().duration - 1; | ||
} | ||
|
||
// Finishes animations, and thus the view transition. | ||
function finishAnimations() { | ||
if (transition == null) | ||
throw new Error('Transition was already finished or never started.'); | ||
|
||
for (const anim of document.getAnimations()) | ||
anim.finish(); | ||
} | ||
|
||
// Creates a view transition. The transition will call the test's defined | ||
// updateDOM function to mutate the DOM into the new state and resolve the | ||
// readyToStartPromise when the DOM has been updated. The animation won't start | ||
// until the test calls startTransitionAnimation(). | ||
function createTransition() { | ||
if (transition != null) | ||
throw new Error('In-progress transition already exists.'); | ||
if (updateDOM == null) | ||
throw new Error('Test must set an updateDOM function'); | ||
|
||
transition = document.startViewTransition(() => { | ||
updateDOM(); | ||
|
||
readyToStartResolve(); | ||
|
||
return startPromise; | ||
}); | ||
|
||
// Initially pause the animation at the old state so the test can take a | ||
// screenshot. Tests can then use moveAnimationToNewState() to play the | ||
// animation forward to the new state. | ||
transition.ready.then(() => { | ||
for (const anim of document.getAnimations()) { | ||
anim.pause(); | ||
} | ||
}); | ||
|
||
transition.finished.then( () => { | ||
transition = null; | ||
}); | ||
} |
Oops, something went wrong.