Skip to content

Commit

Permalink
Updating sources to 98.0.4759.26
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Bendig committed Apr 28, 2023
1 parent d700dbf commit 291f771
Show file tree
Hide file tree
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.
29 changes: 0 additions & 29 deletions lgpl/sources/chromium/src/chrome/test/data/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import("//chrome/common/features.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/grit_rule.gni")

grit("chrome_test_resources") {
Expand Down Expand Up @@ -51,31 +50,3 @@ copy("web_ui_test_mojom_js_module") {
outputs = [ "$target_gen_dir/webui/{{source_file_part}}" ]
deps = [ ":web_ui_test_bindings_js__generator" ]
}

group("closure_compile") {
deps = [
":closure_compile_local",
"cast:closure_compile",
"extensions/api_test/file_system_provider/service_worker:closure_compile",
]

if (!is_android) {
deps += [ "webui:closure_compile" ]
}
}

js_type_check("closure_compile_local") {
deps = [
":test_api_js",
"cast",
]
}

js_library("test_api_js") {
sources = [ "webui/test_api.js" ]
externs_list = [
"//third_party/chaijs/externs/chai-3.5.js",
"//ui/webui/resources/js/dom_automation_controller.js",
]
deps = [ ":web_ui_test_bindings_js_library_for_compile" ]
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[style]
based_on_style = chromium
based_on_style = yapf

Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand Down
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>

This file was deleted.

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>
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>
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>
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>
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>
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>
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>
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;
});
}
Loading

0 comments on commit 291f771

Please sign in to comment.