diff --git a/DEPS b/DEPS index 0126e41..a5096db 100644 --- a/DEPS +++ b/DEPS
@@ -291,19 +291,19 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'src_internal_revision': '70b21a9e7529654dc682f591a19a27a5b999771a', + 'src_internal_revision': 'ac3566084be15e2d1322eeb396e76469b50d19b0', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '49e39cd3cf1847f5e0464b4652735d6f0091f93d', + 'skia_revision': 'af6d6eb383a6c8610d54bd3b0d8f69abf1020e34', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': 'eda6309abc2088b5d77b91470c3d971bdc5d962b', + 'v8_revision': '4b9a2f41d761531d56ae2c58b7e5f8daa4cf7a5c', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '2ef85c2418f433ee6d59052bc4fa7c4ac8a8cc8e', + 'angle_revision': 'b6b2f380814eadf33f215adc2e99f208c800ae47', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -383,7 +383,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': 'c0f621140e1c433cf5a0f9b2009dba08a42edb32', + 'devtools_frontend_revision': 'e9ce822a5399d3177aea5756cd24d9c7ecec2c2c', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -467,7 +467,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling nearby # and whatever else without interference from each other. - 'nearby_revision': 'fcd3cb0fc319b2a0269479e1f7e306e57337ea11', + 'nearby_revision': 'c55262ad13aba122cfa32bda67c17ef0a887a0a8', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling securemessage # and whatever else without interference from each other. @@ -515,11 +515,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling llvm-libc # and whatever else without interference from each other. - 'compiler_rt_revision': 'a0b0e482f99c0b79b1c5330bd017157d9f23e700', + 'compiler_rt_revision': '50e43403df8d49d03776b12025f63c925ccadd77', # If you change this, also update the libc++ revision in # //buildtools/deps_revisions.gni. - 'libcxx_revision': '1ce2525ae355a30a61bacd896916c3416d1827b1', + 'libcxx_revision': 'adbb4a5210ae2a8a4e27fa6199221156c02a9b1a', # GN CIPD package version. 'gn_version': 'git_revision:3a4f5cea73eca32e9586e8145f97b04cbd4a1aee', @@ -1182,7 +1182,7 @@ 'packages': [ { 'package': 'chromium/chrome/android/orderfiles/arm', - 'version': 'ssvlEKaR-IaW5VqNy5s2gYjzDkEPJNFewk5miD4XQ8sC', + 'version': 't7Elm4eIbw82xIdkxdRsCWKaCEwkHn_Em3EHdek28TcC', }, ], 'condition': 'checkout_android', @@ -1193,7 +1193,7 @@ 'packages': [ { 'package': 'chromium/chrome/android/orderfiles/arm64', - 'version': 'H9AZhdhmfluw7cYEWgUfbiOJDqlMUAiSeyFRfNXMOxkC', + 'version': 'cnj-_TcTMzfBZyjmr9scI3Zl0V8KNh9BbBxbafXrU20C', }, ], 'condition': 'checkout_android', @@ -1596,7 +1596,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - 'dc223ca45f40208adbfa36bb82127259ef6775bd', + '6415c39dd9286521d7b37a4b63c4da46a37879e3', 'condition': 'checkout_android and checkout_src_internal', }, @@ -1746,7 +1746,7 @@ 'packages': [ { 'package': 'chromium/third_party/androidx', - 'version': 'B83vmV8nan6y-jdaamQyzhSD5dw4rAa3CJOUfsyEDXAC', + 'version': 'IG08WxVoI4_gwNrbpXqXXmytPWFopEI1x0EaFC1KosAC', }, ], 'condition': 'checkout_android and non_git_source', @@ -2618,7 +2618,7 @@ Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'), 'src/third_party/perfetto': - Var('chromium_git') + '/external/github.com/google/perfetto.git' + '@' + 'd248102abcfb167da566d0ca45d2fa32652aa31c', + Var('chromium_git') + '/external/github.com/google/perfetto.git' + '@' + '0c893ed6bf6b42e3fee58daf3380d301c72550ed', 'src/base/tracing/test/data': { 'bucket': 'perfetto', @@ -2924,7 +2924,7 @@ Var('chromium_git') + '/external/github.com/GoogleChromeLabs/text-fragments-polyfill.git' + '@' + 'c036420683f672d685e27415de0a5f5e85bdc23f', 'src/third_party/tflite/src': - Var('chromium_git') + '/external/github.com/tensorflow/tensorflow.git' + '@' + 'b5e11e3b029d533246345f0f22efb950c9c1e50b', + Var('chromium_git') + '/external/github.com/tensorflow/tensorflow.git' + '@' + 'e979aba360252470603b339cc22c9f3b380fcc69', 'src/third_party/turbine/cipd': { 'packages': [ @@ -2937,7 +2937,7 @@ 'dep_type': 'cipd', }, - 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@5755777e263c93928218fef6d1a0c3f6750efbf3', + 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@f62e36eef4788eb7a1b20ddb1814f7feeac79a76', 'src/third_party/glslang/src': '{chromium_git}/external/github.com/KhronosGroup/glslang@38f6708b6b6f213010c51ffa8f577a7751e12ce7', 'src/third_party/spirv-cross/src': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Cross@b8fcf307f1f347089e3c46eb4451d27f32ebc8d3', 'src/third_party/spirv-headers/src': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Headers@97e96f9e9defeb4bba3cfbd034dec516671dd7a3', @@ -2946,7 +2946,7 @@ 'src/third_party/vulkan-loader/src': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Loader@f2389e27734347c1d9f40e03be53f69f969976b1', 'src/third_party/vulkan-tools/src': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Tools@f766b30b2de3ffe2cf6b656d943720882617ec58', 'src/third_party/vulkan-utility-libraries/src': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Utility-Libraries@b0a40d2e50310e9f84327061290a390a061125a3', - 'src/third_party/vulkan-validation-layers/src': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@f113d73531fb6b82f6cb3aebc0e7c0915b3f611e', + 'src/third_party/vulkan-validation-layers/src': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@71bacddea636c10f1f9f01a163d8f3809620b5e3', 'src/third_party/vulkan_memory_allocator': Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git' + '@' + 'cb0597213b0fcb999caa9ed08c2f88dc45eb7d50', @@ -3013,7 +3013,7 @@ }, 'src/third_party/xnnpack/src': - Var('chromium_git') + '/external/github.com/google/XNNPACK.git' + '@' + 'da77f69692eb5f7080ed7033032befe9a5c4f0b5', + Var('chromium_git') + '/external/github.com/google/XNNPACK.git' + '@' + 'ae40b1a2d93d5c516bc7657c6c3eea1470f917ae', 'src/third_party/libei/cipd': { @@ -3561,7 +3561,7 @@ 'src/chrome/browser/resources/webui_browser/internal': { 'url': Var('chrome_git') + '/chrome/browser/resources/webui_browser/internal.git' + '@' + - '9ead2ea7645ae98342974de132ce9c6fe7c0c626', + '54ba496f51ce3792b7ef8161558985b192ac078b', 'condition': 'checkout_src_internal', }, @@ -3758,7 +3758,7 @@ 'src/ios_internal': { 'url': Var('chrome_git') + '/chrome/ios_internal.git' + '@' + - 'da5a5f1af633b218714f6e7bd89de070769284ae', + '1e3f30098be16da5f4dbdb581d80f7739847bc2d', 'condition': 'checkout_ios and checkout_src_internal', },
diff --git a/agents/extensions/install.py b/agents/extensions/install.py index 56dafeb0..45a3cc3f 100755 --- a/agents/extensions/install.py +++ b/agents/extensions/install.py
@@ -22,7 +22,7 @@ from pathlib import Path -def get_mcp_servers(mcp_dir: Path) -> list[str]: +def get_mcp_servers_from_dir(mcp_dir: Path) -> list[str]: """Returns a list of all MCP servers in the given directory. Args: @@ -31,6 +31,8 @@ Returns: A list of server names. """ + if not mcp_dir.exists(): + return [] return [p.parent.name for p in mcp_dir.glob('*/gemini-extension.json')] @@ -44,13 +46,35 @@ return None +def get_mcp_dirs() -> list[Path]: + """Returns a list of all MCP directories.""" + mcp_dirs = [] + # The primary extensions dir is the one containing this script. + primary_mcp_dir = Path(__file__).parent.resolve() + mcp_dirs.append(primary_mcp_dir) + + # Check for internal extensions. + if repo_root := get_git_repo_root(): + internal_mcp_dir = repo_root / 'internal' / 'agents' / 'extensions' + if internal_mcp_dir.exists(): + mcp_dirs.append(internal_mcp_dir) + return mcp_dirs + + +def find_mcp_dir_for_server(server_name: str, + mcp_dirs: list[Path]) -> Path | None: + """Finds the MCP directory for a given server.""" + for mcp_dir in mcp_dirs: + if (mcp_dir / server_name).exists(): + return mcp_dir + return None + + def get_extension_dir(use_global: bool = False) -> Path: """Returns the Gemini CLI extension directory.""" if use_global: return Path.home() / '.gemini' / 'extensions' - - repo_root = get_git_repo_root() - if repo_root: + if repo_root := get_git_repo_root(): return repo_root / '.gemini' / 'extensions' return Path('.gemini/extensions') @@ -135,13 +159,14 @@ return source_hash == dest_hash -def list_servers(mcp_dir: Path) -> None: +def list_servers(mcp_dirs: list[Path]) -> None: """Lists all available and installed MCP servers.""" # Get available, local, and global servers - available_servers = { - name: get_server_version(mcp_dir / name) - for name in get_mcp_servers(mcp_dir) - } + available_servers = {} + for mcp_dir in mcp_dirs: + for name in get_mcp_servers_from_dir(mcp_dir): + available_servers[name] = get_server_version(mcp_dir / name) + local_servers = { name: get_server_version(get_extension_dir(use_global=False) / name) for name in get_installed_servers(get_extension_dir(use_global=False)) @@ -230,7 +255,7 @@ def main() -> None: """Installs and manages MCP server configurations.""" - mcp_dir = Path(__file__).parent.resolve() + mcp_dirs = get_mcp_dirs() parser = argparse.ArgumentParser( description='Install and manage MCP server configurations.') @@ -294,7 +319,8 @@ servers_to_process = get_installed_servers(extension_dir) for server in servers_to_process: - if not (mcp_dir / server).exists(): + mcp_dir = find_mcp_dir_for_server(server, mcp_dirs) + if not mcp_dir: print(f"Error: Server '{server}' not found. Skipping.", file=sys.stderr) continue @@ -307,7 +333,7 @@ remove_server(server, extension_dir) elif args.command == 'list' or args.command is None: - list_servers(mcp_dir) + list_servers(mcp_dirs) if __name__ == '__main__':
diff --git a/agents/extensions/install_integration_test.py b/agents/extensions/install_integration_test.py index f26bc759..f052f35 100755 --- a/agents/extensions/install_integration_test.py +++ b/agents/extensions/install_integration_test.py
@@ -49,25 +49,58 @@ encoding='utf-8') as f: f.write('{"name": "sample_server_2", "version": "2.0.0"}') + self.internal_mcp_dir = Path( + self.tmpdir) / 'internal' / 'agents' / 'extensions' + self.internal_mcp_dir.mkdir(parents=True) + self.server3_dir = self.internal_mcp_dir / 'sample_server_3' + self.server3_dir.mkdir() + with open(self.server3_dir / 'gemini-extension.json', + 'w', + encoding='utf-8') as f: + f.write('{"name": "sample_server_3", "version": "3.0.0"}') + # Patch the script's dependencies - self.mock_mcp_dir = patch('install.Path.resolve', - return_value=self.mcp_dir) + self.mock_mcp_dirs = patch( + 'install.get_mcp_dirs', + return_value=[self.mcp_dir, self.internal_mcp_dir]) self.mock_git_root = patch('install.get_git_repo_root', return_value=Path(self.tmpdir)) self.mock_home = patch('pathlib.Path.home', return_value=Path(self.tmpdir) / 'home') - self.mock_mcp_dir.start() + self.mock_mcp_dirs.start() self.mock_git_root.start() self.mock_home.start() def tearDown(self): """Tears down the test environment.""" shutil.rmtree(self.tmpdir) - self.mock_mcp_dir.stop() + self.mock_mcp_dirs.stop() self.mock_git_root.stop() self.mock_home.stop() + def test_list_from_multiple_sources(self): + """Tests listing servers from multiple source directories.""" + with patch('sys.stdout', new_callable=io.StringIO) as mock_stdout: + with patch('sys.argv', ['install.py', 'list']): + install.main() + output = mock_stdout.getvalue() + self.assertIn('sample_server_1', output) + self.assertIn('sample_server_2', output) + self.assertIn('sample_server_3', output) + + def test_add_from_multiple_sources(self): + """Tests adding servers from different source directories.""" + # Add server from the primary mcp_dir + with patch('sys.argv', ['install.py', 'add', 'sample_server_1']): + install.main() + self.assertTrue((self.extension_dir / 'sample_server_1').exists()) + + # Add server from the internal_mcp_dir + with patch('sys.argv', ['install.py', 'add', 'sample_server_3']): + install.main() + self.assertTrue((self.extension_dir / 'sample_server_3').exists()) + def test_add_remove_sequence(self): """Tests adding and then removing a server.""" with patch('sys.argv', ['install.py', 'add', 'sample_server_1']): @@ -206,7 +239,7 @@ """Tests behavior with an empty source directory.""" empty_mcp_dir = Path(self.tmpdir) / 'empty_mcp' empty_mcp_dir.mkdir() - with patch('install.Path.resolve', return_value=empty_mcp_dir): + with patch('install.get_mcp_dirs', return_value=[empty_mcp_dir]): # Test list command with patch('sys.stdout', new_callable=io.StringIO) as mock_stdout: with patch('sys.argv', ['install.py', 'list']):
diff --git a/agents/extensions/install_unittest.py b/agents/extensions/install_unittest.py index a9de9da..a5b839f 100755 --- a/agents/extensions/install_unittest.py +++ b/agents/extensions/install_unittest.py
@@ -47,6 +47,16 @@ encoding='utf-8') as f: f.write('{"name": "sample_server_2", "version": "2.0.0"}') + self.internal_mcp_dir = Path( + self.tmpdir) / 'internal' / 'agents' / 'extensions' + self.internal_mcp_dir.mkdir(parents=True) + self.server3_dir = self.internal_mcp_dir / 'sample_server_3' + self.server3_dir.mkdir() + with open(self.server3_dir / 'gemini-extension.json', + 'w', + encoding='utf-8') as f: + f.write('{"name": "sample_server_3", "version": "3.0.0"}') + def tearDown(self): """Tears down the test environment.""" shutil.rmtree(self.tmpdir) @@ -63,6 +73,28 @@ hash3 = install.get_dir_hash(self.server1_dir) self.assertNotEqual(hash1, hash3) + def test_find_mcp_dir_for_server(self): + """Tests the find_mcp_dir_for_server function.""" + mcp_dirs = [self.mcp_dir, self.internal_mcp_dir] + self.assertEqual( + install.find_mcp_dir_for_server('sample_server_1', mcp_dirs), + self.mcp_dir) + self.assertEqual( + install.find_mcp_dir_for_server('sample_server_3', mcp_dirs), + self.internal_mcp_dir) + self.assertIsNone( + install.find_mcp_dir_for_server('non_existent_server', mcp_dirs)) + + @patch('install.get_git_repo_root') + @patch('pathlib.Path.resolve') + def test_get_mcp_dirs(self, mock_resolve, mock_get_git_repo_root): + """Tests the get_mcp_dirs function.""" + mock_resolve.return_value = self.mcp_dir + mock_get_git_repo_root.return_value = Path(self.tmpdir) + mcp_dirs = install.get_mcp_dirs() + self.assertIn(self.mcp_dir, mcp_dirs) + self.assertIn(self.internal_mcp_dir, mcp_dirs) + @patch('subprocess.check_output', side_effect=FileNotFoundError) def test_get_dir_hash_fallback(self, mock_check_output): """Tests the get_dir_hash function's fallback mechanism.""" @@ -131,38 +163,41 @@ @patch('install.get_extension_dir') @patch('install.add_server') - @patch('pathlib.Path.resolve') - def test_main_add_global(self, mock_resolve, mock_add_server, + @patch('install.find_mcp_dir_for_server') + def test_main_add_global(self, mock_find_mcp, mock_add_server, mock_get_extension_dir): """Tests the main function with the add command and --global flag.""" - mock_resolve.return_value = self.mcp_dir + mock_find_mcp.return_value = self.mcp_dir mock_get_extension_dir.return_value = self.global_extension_dir with patch('sys.argv', ['install.py', 'add', '-g', 'sample_server_1']): - install.main() + with patch('install.get_mcp_dirs', return_value=[self.mcp_dir]): + install.main() mock_add_server.assert_called_once_with('sample_server_1', self.mcp_dir, self.global_extension_dir) @patch('install.update_server') @patch('install.get_installed_servers', return_value=['sample_server_1']) - @patch('pathlib.Path.resolve') - def test_main_update_all(self, mock_resolve, mock_get_installed, + @patch('install.find_mcp_dir_for_server') + def test_main_update_all(self, mock_find_mcp, mock_get_installed, mock_update_server): """Tests the main function with the update command and no servers.""" - mock_resolve.return_value = self.mcp_dir + mock_find_mcp.return_value = self.mcp_dir with patch('sys.argv', ['install.py', 'update']): - install.main() - mock_update_server.assert_called_once() + with patch('install.get_mcp_dirs', return_value=[self.mcp_dir]): + install.main() + mock_update_server.assert_called_once() @patch('sys.stderr', new_callable=io.StringIO) - @patch('pathlib.Path.resolve') - def test_main_invalid_server(self, mock_resolve, mock_stderr): + @patch('install.find_mcp_dir_for_server') + def test_main_invalid_server(self, mock_find_mcp, mock_stderr): """Tests that main handles invalid server names gracefully.""" - mock_resolve.return_value = self.mcp_dir + mock_find_mcp.return_value = None with patch('sys.argv', ['install.py', 'add', 'invalid_server']): - install.main() - self.assertIn("Error: Server 'invalid_server' not found", - mock_stderr.getvalue()) + with patch('install.get_mcp_dirs', return_value=[self.mcp_dir]): + install.main() + self.assertIn("Error: Server 'invalid_server' not found", + mock_stderr.getvalue()) if __name__ == '__main__':
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc index feb1bec..39762ba 100644 --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc
@@ -661,11 +661,6 @@ aw_settings->PopulateWebPreferences(web_prefs); } - // This preference is needed for back-forward transitions, but they are not - // enabled for webview (crbug.com/361600214). - web_prefs->increment_local_surface_id_for_mainframe_same_doc_navigation = - false; - AwWebContentsDelegate* delegate = static_cast<AwWebContentsDelegate*>(web_contents->GetDelegate()); web_prefs->modal_context_menu =
diff --git a/android_webview/browser/aw_field_trials.cc b/android_webview/browser/aw_field_trials.cc index e5b207c..53ce3887 100644 --- a/android_webview/browser/aw_field_trials.cc +++ b/android_webview/browser/aw_field_trials.cc
@@ -204,9 +204,11 @@ // enabling site isolation. See crbug.com/356170748. aw_feature_overrides.DisableFeature(blink::features::kPaintHoldingForIframes); - // Default Nav Transition does not support WebView. - // TODO(crbug.com/434928245): cleanup this feature gate in M141. - aw_feature_overrides.DisableFeature(blink::features::kBackForwardTransitions); + // Since Default Nav Transition does not support WebView yet, disable the + // LocalSurfaceId increment flag. TODO(crbug.com/361600214): Re-enable for + // WebView when we start introducing this feature. + aw_feature_overrides.DisableFeature( + blink::features::kIncrementLocalSurfaceIdForMainframeSameDocNavigation); // Disabling this feature for WebView, since it can switch focus when scrolled // in cases with multiple views which can trigger HTML focus changes that
diff --git a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java index c16239da..56e6073 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java +++ b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
@@ -687,6 +687,10 @@ "Register, unregister Battery Status Manager broadcast receiver on a background" + " thread."), Flag.baseFeature( + BlinkFeatures.INCREMENT_LOCAL_SURFACE_ID_FOR_MAINFRAME_SAME_DOC_NAVIGATION, + "When enabled, every mainframe same-doc navigation will increment the" + + " `viz::LocalSurfaceId` from the impl thread."), + Flag.baseFeature( BaseFeatures.BACKGROUND_NOT_PERCEPTIBLE_BINDING, "If enabled, not perceptible binding put processes to the background cpu cgroup"), Flag.baseFeature(
diff --git a/ash/app_list/views/app_list_bubble_view.cc b/ash/app_list/views/app_list_bubble_view.cc index f835513..b06c598f 100644 --- a/ash/app_list/views/app_list_bubble_view.cc +++ b/ash/app_list/views/app_list_bubble_view.cc
@@ -68,6 +68,7 @@ #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rounded_corners_f.h" #include "ui/views/animation/animation_builder.h" +#include "ui/views/background.h" #include "ui/views/controls/scroll_view.h" #include "ui/views/controls/textfield/textfield.h" #include "ui/views/focus/focus_manager.h" @@ -163,8 +164,8 @@ : view_delegate_(view_delegate) { DCHECK(view_delegate); SetProperty(views::kElementIdentifierKey, kAppListBubbleViewElementId); + // Set up rounded corners and background blur, similar to TrayBubbleView. - // Layer background is set in OnThemeChanged(). SetPaintToLayer(); layer()->SetRoundedCornerRadius(gfx::RoundedCornersF{kBubbleCornerRadius}); layer()->SetIsFastRoundedCorner(true); @@ -178,8 +179,7 @@ chromeos::features::IsSystemBlurEnabled() ? cros_tokens::kCrosSysSystemBaseElevated : cros_tokens::kCrosSysSystemBaseElevatedOpaque; - SetBackground(views::CreateRoundedRectBackground(background_color_id, - kBubbleCornerRadius)); + SetBackground(views::CreateSolidBackground(background_color_id)); SetBorder(std::make_unique<views::HighlightBorder>( kBubbleCornerRadius,
diff --git a/ash/app_list/views/app_list_view_pixeltest.cc b/ash/app_list/views/app_list_view_pixeltest.cc index f91b3d7..2bc2f33 100644 --- a/ash/app_list/views/app_list_view_pixeltest.cc +++ b/ash/app_list/views/app_list_view_pixeltest.cc
@@ -187,7 +187,7 @@ UseFixedPlaceholderTextAndHideCursor(test_helper->GetSearchBoxView()); EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - "bubble_launcher_answer_card_search_results", /*revision_number=*/16, + "bubble_launcher_answer_card_search_results", /*revision_number=*/17, GetAppListTestHelper()->GetBubbleView(), GetPrimaryShelf()->navigation_widget())); } @@ -209,7 +209,7 @@ UseFixedPlaceholderTextAndHideCursor(test_helper->GetSearchBoxView()); EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - "bubble_launcher_url_search_results", /*revision_number=*/15, + "bubble_launcher_url_search_results", /*revision_number=*/16, GetAppListTestHelper()->GetBubbleView(), GetPrimaryShelf()->navigation_widget())); } @@ -231,7 +231,7 @@ UseFixedPlaceholderTextAndHideCursor(test_helper->GetSearchBoxView()); EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - "bubble_launcher_ks_search_results", /*revision_number=*/6, + "bubble_launcher_ks_search_results", /*revision_number=*/7, GetAppListTestHelper()->GetBubbleView())); } @@ -244,7 +244,7 @@ UseFixedPlaceholderTextAndHideCursor( GetAppListTestHelper()->GetSearchBoxView()); EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - "bubble_launcher_basics", /*revision_number=*/18, + "bubble_launcher_basics", /*revision_number=*/19, GetAppListTestHelper()->GetBubbleView(), GetPrimaryShelf()->navigation_widget())); } @@ -266,7 +266,7 @@ /*position=*/20); EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - "bubble_launcher_gradient_zone", /*revision_number=*/18, + "bubble_launcher_gradient_zone", /*revision_number=*/19, GetAppListTestHelper()->GetBubbleView(), GetPrimaryShelf()->navigation_widget())); } @@ -281,7 +281,7 @@ GetAppListTestHelper()->GetSearchBoxView()); EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - "bubble_launcher_gemini_button", /*revision_number=*/1, + "bubble_launcher_gemini_button", /*revision_number=*/2, GetAppListTestHelper()->GetBubbleView(), GetPrimaryShelf()->navigation_widget())); }
diff --git a/ash/clipboard/clipboard_history_controller_impl.cc b/ash/clipboard/clipboard_history_controller_impl.cc index 6c06f342..3085bb2 100644 --- a/ash/clipboard/clipboard_history_controller_impl.cc +++ b/ash/clipboard/clipboard_history_controller_impl.cc
@@ -227,21 +227,6 @@ display::Screen::GetScreen()->GetDisplayForNewWindows().id()); CHECK(host); - // Because we do not require the user to release Ctrl+V before selecting a - // clipboard history item to paste, the Ctrl+V event we synthesize below may - // be discarded as a perceived continuation of the long press. Preempt this - // scenario by issuing a Ctrl+V release to ensure that the press and release - // below are handled as an independent paste. - // TODO(http://b/283533126): Replace this workaround with a long-term fix. - if (paste_source == crosapi::mojom::ClipboardHistoryControllerShowSource:: - kControlVLongpress) { - ui::KeyEvent v_release = SyntheticCtrlV(ui::EventType::kKeyReleased); - host->DeliverEventToSink(&v_release); - - ui::KeyEvent ctrl_release = SyntheticCtrl(ui::EventType::kKeyReleased); - host->DeliverEventToSink(&ctrl_release); - } - ui::KeyEvent ctrl_press = SyntheticCtrl(ui::EventType::kKeyPressed); host->DeliverEventToSink(&ctrl_press);
diff --git a/ash/clipboard/clipboard_history_controller_unittest.cc b/ash/clipboard/clipboard_history_controller_unittest.cc index b6da442..a7a68fe 100644 --- a/ash/clipboard/clipboard_history_controller_unittest.cc +++ b/ash/clipboard/clipboard_history_controller_unittest.cc
@@ -787,12 +787,7 @@ : public ClipboardHistoryControllerTest, public testing::WithParamInterface<ClipboardHistoryControllerShowSource> { public: - ClipboardHistoryControllerShowSourceTest() { - scoped_feature_list_.InitWithFeatureState( - features::kClipboardHistoryLongpress, - GetSource() == - ClipboardHistoryControllerShowSource::kControlVLongpress); - } + ClipboardHistoryControllerShowSourceTest() = default; ClipboardHistoryControllerShowSource GetSource() const { return GetParam(); } @@ -806,6 +801,10 @@ // Tests that `ShowMenu()` returns whether the menu was shown successfully. TEST_P(ClipboardHistoryControllerShowSourceTest, ShowMenuReturnsSuccess) { + if (GetSource() == ClipboardHistoryControllerShowSource::kControlVLongpress) { + GTEST_SKIP(); + } + base::HistogramTester histogram_tester; // Try to show the menu without populating the clipboard. The menu should not
diff --git a/ash/clipboard/clipboard_history_menu_model_adapter.cc b/ash/clipboard/clipboard_history_menu_model_adapter.cc index 58630d6..2558d78 100644 --- a/ash/clipboard/clipboard_history_menu_model_adapter.cc +++ b/ash/clipboard/clipboard_history_menu_model_adapter.cc
@@ -74,9 +74,6 @@ const std::optional<base::Time>& nudge_last_time_shown) { // A footer is always required when the menu is shown via Ctrl+V long press. using crosapi::mojom::ClipboardHistoryControllerShowSource; - if (show_source == ClipboardHistoryControllerShowSource::kControlVLongpress) { - return true; - } // A footer is required if the menu hasn't been shown in the past 60 days. if (TimeSince(menu_last_time_shown.value_or(base::Time())) >= @@ -126,17 +123,6 @@ text_style.custom_font = Resolve(TypographyToken::kCrosAnnotation1); text_style.override_color_id = cros_tokens::kCrosSysOnSurfaceVariant; - // When the clipboard history menu is shown from a Ctrl+V long press event, a - // specific educational text is used which does not require inline icons. - using crosapi::mojom::ClipboardHistoryControllerShowSource; - if (show_source == ClipboardHistoryControllerShowSource::kControlVLongpress) { - styled_label->SetText(l10n_util::GetStringUTF16( - IDS_ASH_CLIPBOARD_HISTORY_CONTROL_V_LONGPRESS_FOOTER)); - styled_label->AddStyleRange(gfx::Range(0u, styled_label->GetText().size()), - std::move(text_style)); - return; - } - // When the clipboard history menu is *not* shown from a Ctrl+V long press // event, set text based on keyboard layout, caching the offset where an // inline icon should be inserted.
diff --git a/ash/clipboard/clipboard_history_menu_model_adapter_unittest.cc b/ash/clipboard/clipboard_history_menu_model_adapter_unittest.cc index 2b2b8aecb..758f9d6 100644 --- a/ash/clipboard/clipboard_history_menu_model_adapter_unittest.cc +++ b/ash/clipboard/clipboard_history_menu_model_adapter_unittest.cc
@@ -232,11 +232,7 @@ /*time_since_nudge_shown=*/std::optional<base::TimeDelta>>> { public: ClipboardHistoryMenuModelAdapterMenuItemTest() - : AshTestBase(base::test::TaskEnvironment::TimeSource::MOCK_TIME) { - scoped_feature_list_.InitWithFeatureStates( - {{features::kClipboardHistoryLongpress, - IsClipboardHistoryLongpressEnabled()}}); - } + : AshTestBase(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {} // AshTestBase: void SetUp() override { @@ -279,14 +275,6 @@ const std::optional<base::TimeDelta>& GetTimeSinceNudgeShown() const { return std::get<2>(GetParam()); } - - bool IsClipboardHistoryLongpressEnabled() const { - return GetSource() == - ClipboardHistoryControllerShowSource::kControlVLongpress; - } - - private: - base::test::ScopedFeatureList scoped_feature_list_; }; INSTANTIATE_TEST_SUITE_P(All, @@ -303,6 +291,10 @@ TEST_P(ClipboardHistoryMenuModelAdapterMenuItemTest, HeaderAndFooterConditionallyPresent) { + if (GetSource() == ClipboardHistoryControllerShowSource::kControlVLongpress) { + GTEST_SKIP(); + } + // Write items to clipboard history so that the menu can show. WriteTextToClipboardAndFlushMessageLoop(u"A"); WriteTextToClipboardAndFlushMessageLoop(u"B"); @@ -321,8 +313,7 @@ GetTimeSinceNudgeShown().value_or(base::TimeDelta::Max()); const bool has_header = true; - const bool has_footer = IsClipboardHistoryLongpressEnabled() || - ((time_since_menu_shown >= base::Days(60)) || + const bool has_footer = ((time_since_menu_shown >= base::Days(60)) || (time_since_nudge_shown <= base::Seconds(60))); // Verify the number of items in the menu model. @@ -364,15 +355,10 @@ footer->GetViewByID(clipboard_history_util::kFooterContentV2ViewID), GetViewById<views::StyledLabel>( clipboard_history_util::kFooterContentV2LabelID, - Property( - &views::StyledLabel::GetText, - Conditional( - IsClipboardHistoryLongpressEnabled(), - l10n_util::GetStringUTF16( - IDS_ASH_CLIPBOARD_HISTORY_CONTROL_V_LONGPRESS_FOOTER), - l10n_util::GetStringFUTF16( - IDS_ASH_CLIPBOARD_HISTORY_FOOTER, - clipboard_history_util::GetShortcutKeyName()))))); + Property(&views::StyledLabel::GetText, + l10n_util::GetStringFUTF16( + IDS_ASH_CLIPBOARD_HISTORY_FOOTER, + clipboard_history_util::GetShortcutKeyName())))); } } // namespace ash
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index 3a0ceda..7eec7ece 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -471,9 +471,6 @@ // When enabled alongside the keyboard auto-repeat setting, holding down Ctrl+V // will cause the clipboard history menu to show. From there, the user can // select a clipboard history item to replace the initially pasted content. -BASE_FEATURE(kClipboardHistoryLongpress, - "ClipboardHistoryLongpress", - base::FEATURE_DISABLED_BY_DEFAULT); // Controls enabling/disabling conch. BASE_FEATURE(kConch, "Conch", base::FEATURE_DISABLED_BY_DEFAULT); @@ -3464,10 +3461,6 @@ return base::FeatureList::IsEnabled(kCheckPasswordsAgainstCryptohomeHelper); } -bool IsClipboardHistoryLongpressEnabled() { - return base::FeatureList::IsEnabled(kClipboardHistoryLongpress); -} - bool IsContinuousOverviewScrollAnimationEnabled() { return base::FeatureList::IsEnabled(kContinuousOverviewScrollAnimation); }
diff --git a/ash/constants/ash_features.h b/ash/constants/ash_features.h index ac5db2f..a378bee 100644 --- a/ash/constants/ash_features.h +++ b/ash/constants/ash_features.h
@@ -157,7 +157,6 @@ COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kCheckPasswordsAgainstCryptohomeHelper); COMPONENT_EXPORT(ASH_CONSTANTS) -BASE_DECLARE_FEATURE(kClipboardHistoryLongpress); COMPONENT_EXPORT(ASH_CONSTANTS) COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kConch); COMPONENT_EXPORT(ASH_CONSTANTS) @@ -1098,7 +1097,6 @@ COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCaptureModeOnDeviceOcrEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCheckPasswordsAgainstCryptohomeHelperEnabled(); -COMPONENT_EXPORT(ASH_CONSTANTS) bool IsClipboardHistoryLongpressEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsContinuousOverviewScrollAnimationEnabled(); COMPONENT_EXPORT(ASH_CONSTANTS) bool IsCoralFeatureEnabled();
diff --git a/ash/display/cursor_window_controller_unittest.cc b/ash/display/cursor_window_controller_unittest.cc index 81deaed..d2883c8 100644 --- a/ash/display/cursor_window_controller_unittest.cc +++ b/ash/display/cursor_window_controller_unittest.cc
@@ -457,7 +457,7 @@ // The no drop cursor has red in it, check it's still there: // Most of the cursor should be colored, but the red part shouldn't be // re-colored. - {SK_ColorBLUE, SK_ColorGREEN, SkColorSetRGB(172, 0, 0), + {SK_ColorBLUE, SK_ColorGREEN, SkColorSetRGB(181, 70, 72), CursorType::kNoDrop}, // Similarly, the copy cursor has green in it. {SK_ColorBLUE, SK_ColorRED, SkColorSetRGB(57, 149, 88),
diff --git a/base/allocator/allocator_check.cc b/base/allocator/allocator_check.cc index 59e41bd..3c7aa03 100644 --- a/base/allocator/allocator_check.cc +++ b/base/allocator/allocator_check.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/allocator_check.h" #include "build/build_config.h"
diff --git a/base/allocator/allocator_check.h b/base/allocator/allocator_check.h index 58add8b9..ff93a32 100644 --- a/base/allocator/allocator_check.h +++ b/base/allocator/allocator_check.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_ALLOCATOR_CHECK_H_ #define BASE_ALLOCATOR_ALLOCATOR_CHECK_H_
diff --git a/base/allocator/dispatcher/configuration.h b/base/allocator/dispatcher/configuration.h index 4488cf8..5f892aa 100644 --- a/base/allocator/dispatcher/configuration.h +++ b/base/allocator/dispatcher/configuration.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_ #define BASE_ALLOCATOR_DISPATCHER_CONFIGURATION_H_
diff --git a/base/allocator/dispatcher/dispatcher.cc b/base/allocator/dispatcher/dispatcher.cc index f680f63..4b6c0b305 100644 --- a/base/allocator/dispatcher/dispatcher.cc +++ b/base/allocator/dispatcher/dispatcher.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/dispatcher.h" #include "base/allocator/dispatcher/internal/dispatch_data.h"
diff --git a/base/allocator/dispatcher/dispatcher.h b/base/allocator/dispatcher/dispatcher.h index ef46c79..af25707 100644 --- a/base/allocator/dispatcher/dispatcher.h +++ b/base/allocator/dispatcher/dispatcher.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_DISPATCHER_H_ #define BASE_ALLOCATOR_DISPATCHER_DISPATCHER_H_
diff --git a/base/allocator/dispatcher/dispatcher_unittest.cc b/base/allocator/dispatcher/dispatcher_unittest.cc index 9557d0e..507f311 100644 --- a/base/allocator/dispatcher/dispatcher_unittest.cc +++ b/base/allocator/dispatcher/dispatcher_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/dispatcher.h" #include "base/allocator/dispatcher/configuration.h"
diff --git a/base/allocator/dispatcher/initializer.h b/base/allocator/dispatcher/initializer.h index a01646c..744647e 100644 --- a/base/allocator/dispatcher/initializer.h +++ b/base/allocator/dispatcher/initializer.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_INITIALIZER_H_ #define BASE_ALLOCATOR_DISPATCHER_INITIALIZER_H_
diff --git a/base/allocator/dispatcher/initializer_unittest.cc b/base/allocator/dispatcher/initializer_unittest.cc index f15d3e6..e9b3d7c 100644 --- a/base/allocator/dispatcher/initializer_unittest.cc +++ b/base/allocator/dispatcher/initializer_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/initializer.h" #include <functional>
diff --git a/base/allocator/dispatcher/internal/dispatch_data.cc b/base/allocator/dispatcher/internal/dispatch_data.cc index c27ca912d..ff2f602 100644 --- a/base/allocator/dispatcher/internal/dispatch_data.cc +++ b/base/allocator/dispatcher/internal/dispatch_data.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/internal/dispatch_data.h" #include "partition_alloc/buildflags.h"
diff --git a/base/allocator/dispatcher/internal/dispatch_data.h b/base/allocator/dispatcher/internal/dispatch_data.h index 9953111..60a210af 100644 --- a/base/allocator/dispatcher/internal/dispatch_data.h +++ b/base/allocator/dispatcher/internal/dispatch_data.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_INTERNAL_DISPATCH_DATA_H_ #define BASE_ALLOCATOR_DISPATCHER_INTERNAL_DISPATCH_DATA_H_
diff --git a/base/allocator/dispatcher/internal/dispatcher_internal.h b/base/allocator/dispatcher/internal/dispatcher_internal.h index 0321b12..1ae112b 100644 --- a/base/allocator/dispatcher/internal/dispatcher_internal.h +++ b/base/allocator/dispatcher/internal/dispatcher_internal.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_INTERNAL_DISPATCHER_INTERNAL_H_ #define BASE_ALLOCATOR_DISPATCHER_INTERNAL_DISPATCHER_INTERNAL_H_
diff --git a/base/allocator/dispatcher/internal/dispatcher_internal_unittest.cc b/base/allocator/dispatcher/internal/dispatcher_internal_unittest.cc index 85cbcdc9..ee97fdeec 100644 --- a/base/allocator/dispatcher/internal/dispatcher_internal_unittest.cc +++ b/base/allocator/dispatcher/internal/dispatcher_internal_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/internal/dispatcher_internal.h" #include <iostream>
diff --git a/base/allocator/dispatcher/internal/tools.h b/base/allocator/dispatcher/internal/tools.h index 692232e..3c81549 100644 --- a/base/allocator/dispatcher/internal/tools.h +++ b/base/allocator/dispatcher/internal/tools.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_INTERNAL_TOOLS_H_ #define BASE_ALLOCATOR_DISPATCHER_INTERNAL_TOOLS_H_
diff --git a/base/allocator/dispatcher/memory_tagging.cc b/base/allocator/dispatcher/memory_tagging.cc index 33a6c0ec..240ad101 100644 --- a/base/allocator/dispatcher/memory_tagging.cc +++ b/base/allocator/dispatcher/memory_tagging.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/memory_tagging.h" namespace base::allocator::dispatcher {
diff --git a/base/allocator/dispatcher/memory_tagging.h b/base/allocator/dispatcher/memory_tagging.h index ef1cb68..769b185 100644 --- a/base/allocator/dispatcher/memory_tagging.h +++ b/base/allocator/dispatcher/memory_tagging.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_MEMORY_TAGGING_H_ #define BASE_ALLOCATOR_DISPATCHER_MEMORY_TAGGING_H_
diff --git a/base/allocator/dispatcher/notification_data.h b/base/allocator/dispatcher/notification_data.h index 8aa715ea..8826536f 100644 --- a/base/allocator/dispatcher/notification_data.h +++ b/base/allocator/dispatcher/notification_data.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_NOTIFICATION_DATA_H_ #define BASE_ALLOCATOR_DISPATCHER_NOTIFICATION_DATA_H_
diff --git a/base/allocator/dispatcher/reentry_guard.cc b/base/allocator/dispatcher/reentry_guard.cc index 890bcbf..988161c7 100644 --- a/base/allocator/dispatcher/reentry_guard.cc +++ b/base/allocator/dispatcher/reentry_guard.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/reentry_guard.h" #include "base/check.h"
diff --git a/base/allocator/dispatcher/reentry_guard.h b/base/allocator/dispatcher/reentry_guard.h index 61cbc60f..de686c84 100644 --- a/base/allocator/dispatcher/reentry_guard.h +++ b/base/allocator/dispatcher/reentry_guard.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_REENTRY_GUARD_H_ #define BASE_ALLOCATOR_DISPATCHER_REENTRY_GUARD_H_
diff --git a/base/allocator/dispatcher/subsystem.h b/base/allocator/dispatcher/subsystem.h index f9500bd..d404d4a 100644 --- a/base/allocator/dispatcher/subsystem.h +++ b/base/allocator/dispatcher/subsystem.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_SUBSYSTEM_H_ #define BASE_ALLOCATOR_DISPATCHER_SUBSYSTEM_H_
diff --git a/base/allocator/dispatcher/testing/dispatcher_test.cc b/base/allocator/dispatcher/testing/dispatcher_test.cc index cc12f672..f95fd86c 100644 --- a/base/allocator/dispatcher/testing/dispatcher_test.cc +++ b/base/allocator/dispatcher/testing/dispatcher_test.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/testing/dispatcher_test.h" #include "base/allocator/dispatcher/reentry_guard.h"
diff --git a/base/allocator/dispatcher/testing/dispatcher_test.h b/base/allocator/dispatcher/testing/dispatcher_test.h index 9cc232e..0e97d21 100644 --- a/base/allocator/dispatcher/testing/dispatcher_test.h +++ b/base/allocator/dispatcher/testing/dispatcher_test.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_TESTING_DISPATCHER_TEST_H_ #define BASE_ALLOCATOR_DISPATCHER_TESTING_DISPATCHER_TEST_H_
diff --git a/base/allocator/dispatcher/testing/observer_mock.h b/base/allocator/dispatcher/testing/observer_mock.h index a29ea7d..03fab35 100644 --- a/base/allocator/dispatcher/testing/observer_mock.h +++ b/base/allocator/dispatcher/testing/observer_mock.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_TESTING_OBSERVER_MOCK_H_ #define BASE_ALLOCATOR_DISPATCHER_TESTING_OBSERVER_MOCK_H_
diff --git a/base/allocator/dispatcher/testing/tools.h b/base/allocator/dispatcher/testing/tools.h index a9b5fbdf..a8dd86e 100644 --- a/base/allocator/dispatcher/testing/tools.h +++ b/base/allocator/dispatcher/testing/tools.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_TESTING_TOOLS_H_ #define BASE_ALLOCATOR_DISPATCHER_TESTING_TOOLS_H_
diff --git a/base/allocator/dispatcher/tls.cc b/base/allocator/dispatcher/tls.cc index 18cdcaf2..0086878 100644 --- a/base/allocator/dispatcher/tls.cc +++ b/base/allocator/dispatcher/tls.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/tls.h" #include <string_view>
diff --git a/base/allocator/dispatcher/tls.h b/base/allocator/dispatcher/tls.h index 483d4c5..ce725aea 100644 --- a/base/allocator/dispatcher/tls.h +++ b/base/allocator/dispatcher/tls.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_DISPATCHER_TLS_H_ #define BASE_ALLOCATOR_DISPATCHER_TLS_H_
diff --git a/base/allocator/dispatcher/tls_unittest.cc b/base/allocator/dispatcher/tls_unittest.cc index 9bd4bee7..3045ee8 100644 --- a/base/allocator/dispatcher/tls_unittest.cc +++ b/base/allocator/dispatcher/tls_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/dispatcher/tls.h" #include <string_view>
diff --git a/base/allocator/early_zone_registration_apple.cc b/base/allocator/early_zone_registration_apple.cc index 32a9a00..a2938d49 100644 --- a/base/allocator/early_zone_registration_apple.cc +++ b/base/allocator/early_zone_registration_apple.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/early_zone_registration_apple.h" #include <mach/mach.h>
diff --git a/base/allocator/early_zone_registration_apple.h b/base/allocator/early_zone_registration_apple.h index 272a872..cc884f8d 100644 --- a/base/allocator/early_zone_registration_apple.h +++ b/base/allocator/early_zone_registration_apple.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_EARLY_ZONE_REGISTRATION_APPLE_H_ #define BASE_ALLOCATOR_EARLY_ZONE_REGISTRATION_APPLE_H_
diff --git a/base/allocator/miracle_parameter.cc b/base/allocator/miracle_parameter.cc index 7b30a30..22ac9df 100644 --- a/base/allocator/miracle_parameter.cc +++ b/base/allocator/miracle_parameter.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/miracle_parameter.h" #include "base/command_line.h"
diff --git a/base/allocator/miracle_parameter.h b/base/allocator/miracle_parameter.h index 7a5d23b..8a9d1f6 100644 --- a/base/allocator/miracle_parameter.h +++ b/base/allocator/miracle_parameter.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_MIRACLE_PARAMETER_H_ #define BASE_ALLOCATOR_MIRACLE_PARAMETER_H_
diff --git a/base/allocator/partition_alloc_features.cc b/base/allocator/partition_alloc_features.cc index 6a60ff2..fbf5019 100644 --- a/base/allocator/partition_alloc_features.cc +++ b/base/allocator/partition_alloc_features.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/partition_alloc_features.h" #include "base/allocator/miracle_parameter.h"
diff --git a/base/allocator/partition_alloc_features.h b/base/allocator/partition_alloc_features.h index 16ebe75..bff5bb0 100644 --- a/base/allocator/partition_alloc_features.h +++ b/base/allocator/partition_alloc_features.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_PARTITION_ALLOC_FEATURES_H_ #define BASE_ALLOCATOR_PARTITION_ALLOC_FEATURES_H_
diff --git a/base/allocator/partition_alloc_support.cc b/base/allocator/partition_alloc_support.cc index 7923076..cdbc241 100644 --- a/base/allocator/partition_alloc_support.cc +++ b/base/allocator/partition_alloc_support.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/partition_alloc_support.h" #include <algorithm>
diff --git a/base/allocator/partition_alloc_support.h b/base/allocator/partition_alloc_support.h index 3ae83a9eb..a70c2db4 100644 --- a/base/allocator/partition_alloc_support.h +++ b/base/allocator/partition_alloc_support.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef BASE_ALLOCATOR_PARTITION_ALLOC_SUPPORT_H_ #define BASE_ALLOCATOR_PARTITION_ALLOC_SUPPORT_H_
diff --git a/base/allocator/partition_alloc_support_unittest.cc b/base/allocator/partition_alloc_support_unittest.cc index 93c8799..a2931467 100644 --- a/base/allocator/partition_alloc_support_unittest.cc +++ b/base/allocator/partition_alloc_support_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "base/allocator/partition_alloc_support.h" #include <array>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h b/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h index 2fed57e..ffd93db 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h +++ b/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_AARCH64_SUPPORT_H_ #define PARTITION_ALLOC_AARCH64_SUPPORT_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.cc b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.cc index 1d8245f..67a38cb8a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/address_pool_manager.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h index ebc5bf50..05f96377 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_ADDRESS_POOL_MANAGER_H_ #define PARTITION_ALLOC_ADDRESS_POOL_MANAGER_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.cc b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.cc index c0aedbcd..268fd72b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/address_pool_manager_bitmap.h" #include "partition_alloc/buildflags.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h index 8befb27..303963cba 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_ADDRESS_POOL_MANAGER_BITMAP_H_ #define PARTITION_ALLOC_ADDRESS_POOL_MANAGER_BITMAP_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h index 4503c512..05d0f63 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_ADDRESS_POOL_MANAGER_TYPES_H_ #define PARTITION_ALLOC_ADDRESS_POOL_MANAGER_TYPES_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_unittest.cc index 2427cd4..0e012f7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/address_pool_manager.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.cc b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.cc index a24b552..6dfa9a14 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/address_space_randomization.h" #include "partition_alloc/build_config.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h index 3059af18..597bce1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h +++ b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_ADDRESS_SPACE_RANDOMIZATION_H_ #define PARTITION_ALLOC_ADDRESS_SPACE_RANDOMIZATION_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization_unittest.cc index 8d93dab..b05c90fc 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/address_space_randomization.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h b/base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h index 4fa4f82..1da5989 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h +++ b/base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_ADDRESS_SPACE_STATS_H_ #define PARTITION_ALLOC_ADDRESS_SPACE_STATS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.cc b/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.cc index dda4730..b28fd86 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/allocation_guard.h" #include "partition_alloc/partition_alloc_base/immediate_crash.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h b/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h index 27bb76f..0c90258 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h +++ b/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_ALLOCATION_GUARD_H_ #define PARTITION_ALLOC_ALLOCATION_GUARD_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/arm_bti_test_functions.h b/base/allocator/partition_allocator/src/partition_alloc/arm_bti_test_functions.h index ddfaa35..1472230a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/arm_bti_test_functions.h +++ b/base/allocator/partition_allocator/src/partition_alloc/arm_bti_test_functions.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_ARM_BTI_TEST_FUNCTIONS_H_ #define PARTITION_ALLOC_ARM_BTI_TEST_FUNCTIONS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/bucket_lookup.h b/base/allocator/partition_allocator/src/partition_alloc/bucket_lookup.h index 671c58df..7f05e54 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/bucket_lookup.h +++ b/base/allocator/partition_allocator/src/partition_alloc/bucket_lookup.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_BUCKET_LOOKUP_H_ #define PARTITION_ALLOC_BUCKET_LOOKUP_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/build_config.h b/base/allocator/partition_allocator/src/partition_alloc/build_config.h index 5261d98..ff0580e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/build_config.h +++ b/base/allocator/partition_allocator/src/partition_alloc/build_config.h
@@ -1,6 +1,11 @@ // Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif #ifndef PARTITION_ALLOC_BUILD_CONFIG_H_ #define PARTITION_ALLOC_BUILD_CONFIG_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/buildflag.h b/base/allocator/partition_allocator/src/partition_alloc/buildflag.h index 6201d7bb..30d6db6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/buildflag.h +++ b/base/allocator/partition_allocator/src/partition_alloc/buildflag.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_BUILDFLAG_H_ #define PARTITION_ALLOC_BUILDFLAG_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.cc b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.cc index 6a62a27c..263a2c54 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/compressed_pointer.h" #include "partition_alloc/buildflags.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h index 57d40ee..04d4c2c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h +++ b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_COMPRESSED_POINTER_H_ #define PARTITION_ALLOC_COMPRESSED_POINTER_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer_unittest.cc index 64e0515f..50b51d0c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/compressed_pointer.h" #include "partition_alloc/buildflags.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.cc b/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.cc index b2d5632..e0b21be 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/dangling_raw_ptr_checks.h" #include "partition_alloc/partition_alloc_base/component_export.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h b/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h index dfe3173..fa8ea3b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h +++ b/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_DANGLING_RAW_PTR_CHECKS_H_ #define PARTITION_ALLOC_DANGLING_RAW_PTR_CHECKS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h b/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h index 92b8f411..7ccd24a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h +++ b/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_ENCODED_NEXT_FREELIST_H_ #define PARTITION_ALLOC_ENCODED_NEXT_FREELIST_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/extended_api.cc b/base/allocator/partition_allocator/src/partition_alloc/extended_api.cc index 61f08cda..9914e308 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/extended_api.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/extended_api.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/extended_api.h" #include "partition_alloc/buildflags.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/extended_api.h b/base/allocator/partition_allocator/src/partition_alloc/extended_api.h index 0b4be9a..2b8b9de 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/extended_api.h +++ b/base/allocator/partition_allocator/src/partition_alloc/extended_api.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_EXTENDED_API_H_ #define PARTITION_ALLOC_EXTENDED_API_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/flags.h b/base/allocator/partition_allocator/src/partition_alloc/flags.h index 6f85c57c..75e1909 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/flags.h +++ b/base/allocator/partition_allocator/src/partition_alloc/flags.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This header provides a type-safe way of storing OR-combinations of enum // values. //
diff --git a/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.cc b/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.cc index 4c87f596..4c34510b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/gwp_asan_support.h" #if PA_BUILDFLAG(ENABLE_GWP_ASAN_SUPPORT)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.h b/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.h index 71ea678..9b28390 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.h +++ b/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_GWP_ASAN_SUPPORT_H_ #define PARTITION_ALLOC_GWP_ASAN_SUPPORT_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/hardening_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/hardening_unittest.cc index 3d88707..58a5422c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/hardening_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/hardening_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <cstdint> #include <string> #include <vector>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/in_slot_metadata.cc b/base/allocator/partition_allocator/src/partition_alloc/in_slot_metadata.cc index 02c5bad..f301496 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/in_slot_metadata.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/in_slot_metadata.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/in_slot_metadata.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/in_slot_metadata.h b/base/allocator/partition_allocator/src/partition_alloc/in_slot_metadata.h index c5287b5..b97bbde 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/in_slot_metadata.h +++ b/base/allocator/partition_allocator/src/partition_alloc/in_slot_metadata.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_IN_SLOT_METADATA_H_ #define PARTITION_ALLOC_IN_SLOT_METADATA_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.cc b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.cc index 65c5076..a5ddd654 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/internal_allocator.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h index 4e6ed30..21e4929e5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h +++ b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_INTERNAL_ALLOCATOR_H_ #define PARTITION_ALLOC_INTERNAL_ALLOCATOR_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h index 759668c..77d415f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h +++ b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_INTERNAL_ALLOCATOR_FORWARD_H_ #define PARTITION_ALLOC_INTERNAL_ALLOCATOR_FORWARD_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.cc b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.cc index 2ddc226..e13bee6e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/memory_reclaimer.h" #include "partition_alloc/buildflags.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h index 0bd35f8..c2c66938 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h +++ b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_MEMORY_RECLAIMER_H_ #define PARTITION_ALLOC_MEMORY_RECLAIMER_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer_unittest.cc index eb6f54e..4afa8ae 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/memory_reclaimer.h" #include <memory>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/oom.cc b/base/allocator/partition_allocator/src/partition_alloc/oom.cc index 037e9081..6073acca 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/oom.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/oom.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/oom.h" #include "partition_alloc/build_config.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/oom.h b/base/allocator/partition_allocator/src/partition_alloc/oom.h index 85123a1..a577a493 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/oom.h +++ b/base/allocator/partition_allocator/src/partition_alloc/oom.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_OOM_H_ #define PARTITION_ALLOC_OOM_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/oom_callback.cc b/base/allocator/partition_allocator/src/partition_alloc/oom_callback.cc index 0db8407..afd87d11 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/oom_callback.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/oom_callback.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/oom_callback.h" #include "partition_alloc/partition_alloc_check.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/oom_callback.h b/base/allocator/partition_allocator/src/partition_alloc/oom_callback.h index 3a4d32b..ef703fd 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/oom_callback.h +++ b/base/allocator/partition_allocator/src/partition_alloc/oom_callback.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_OOM_CALLBACK_H_ #define PARTITION_ALLOC_OOM_CALLBACK_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator.cc b/base/allocator/partition_allocator/src/partition_alloc/page_allocator.cc index f07ec59..6a9cc24 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/page_allocator.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h index 2832ca8..5831c889 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PAGE_ALLOCATOR_H_ #define PARTITION_ALLOC_PAGE_ALLOCATOR_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h index 4f38bdd0..cbb3c78f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PAGE_ALLOCATOR_CONSTANTS_H_ #define PARTITION_ALLOC_PAGE_ALLOCATOR_CONSTANTS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h index d02f4548..1433a58 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PAGE_ALLOCATOR_INTERNAL_H_ #define PARTITION_ALLOC_PAGE_ALLOCATOR_INTERNAL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_fuchsia.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_fuchsia.h index 53ce771c..e8c15fb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_fuchsia.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_fuchsia.h
@@ -1,6 +1,11 @@ // Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif // // This file implements memory allocation primitives for PageAllocator using // Fuchsia's VMOs (Virtual Memory Objects). VMO API is documented in
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc index 51d0c9d8..f3d809b6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc
@@ -1,6 +1,11 @@ // Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif #include <stdint.h> #include <sys/mman.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h index 6836720..9c4c51488 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PAGE_ALLOCATOR_INTERNALS_POSIX_H_ #define PARTITION_ALLOC_PAGE_ALLOCATOR_INTERNALS_POSIX_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h index 70ba396f..9492afd 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PAGE_ALLOCATOR_INTERNALS_WIN_H_ #define PARTITION_ALLOC_PAGE_ALLOCATOR_INTERNALS_WIN_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc index 4e1b6bd..02f4cfe 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/page_allocator.h" #include <algorithm>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc index 47dab68d..9133e5f5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_address_space.h" #include <array>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h b/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h index c5b94a4..b9b4d59b6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ADDRESS_SPACE_H_ #define PARTITION_ALLOC_PARTITION_ADDRESS_SPACE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h index 7d36a1c..cbc327c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_INL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_INL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.cc index 80a338f..8196440 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h index db88b67..cce9eec 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_allocation_data.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_allocation_data.h index e0fd1801..8281971 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_allocation_data.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_allocation_data.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_ALLOCATION_DATA_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_ALLOCATION_DATA_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h index 663863de..38ca8b50 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_FOUNDATION_UTIL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_FOUNDATION_UTIL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.mm index 4cf23dde..f32b8975 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.mm
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/apple/foundation_util.h" #include "partition_alloc/partition_alloc_base/check.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.cc index 759fb15..76f21f22 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/apple/mach_logging.h" #include <iomanip>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h index 719e4c06..f8527c9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_MACH_LOGGING_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_MACH_LOGGING_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h index ffa00c2..02678a3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_SCOPED_CFTYPEREF_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_SCOPED_CFTYPEREF_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_typeref.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_typeref.h index 729fdf9..dbe09c7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_typeref.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_typeref.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_SCOPED_TYPEREF_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_SCOPED_TYPEREF_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/atomic_ref_count.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/atomic_ref_count.h index d34edfc1..b894e26 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/atomic_ref_count.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/atomic_ref_count.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This is a low level implementation of atomic semantics for reference // counting. Please use base/memory/ref_counted.h directly instead.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/augmentations/compiler_specific.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/augmentations/compiler_specific.h index 95769a8..a73948f5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/augmentations/compiler_specific.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/augmentations/compiler_specific.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_AUGMENTATIONS_COMPILER_SPECIFIC_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_AUGMENTATIONS_COMPILER_SPECIFIC_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bit_cast.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bit_cast.h index 3c625a5..20edba5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bit_cast.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bit_cast.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_BIT_CAST_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_BIT_CAST_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h index a99b3ff..0f0f6f9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This file defines some bit utilities. #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_BITS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits_pa_unittest.cc index 7c4d8de1..b14a6328 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This file contains the unit tests for the bit utilities. #include <cstddef>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.cc index 957d662e..584f7d5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/check.h" #include "partition_alloc/partition_alloc_base/logging.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h index 2358e80..22244bf 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_CHECK_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_CHECK_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h index 96fa6891..7a7916d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_COMPILER_SPECIFIC_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_COMPILER_SPECIFIC_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h index 94a565b..4d16758 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_COMPONENT_EXPORT_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_COMPONENT_EXPORT_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export_pa_unittest.cc index 4d205b05..8adb7b6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/component_export.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_map.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_map.h index ddbf380..180c73a2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_map.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_map.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_CONTAINERS_FLAT_MAP_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_CONTAINERS_FLAT_MAP_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_map_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_map_pa_unittest.cc index db1d1b6..e7d5426 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_map_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_map_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <string> #include <string_view> #include <type_traits>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_tree.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_tree.h index f39dd6b..6f86246 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_tree.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_tree.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_CONTAINERS_FLAT_TREE_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_CONTAINERS_FLAT_TREE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_tree_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_tree_pa_unittest.cc index 91ef87f7..dff45c21 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_tree_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/containers/flat_tree_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/containers/flat_tree.h" #include "partition_alloc/partition_alloc_base/cxx20_identity.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.cc index 382cb7fa..0837dc7e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/cpu.h" #include <cinttypes>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h index 27f2ea2f..7f6ada7c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_CPU_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_CPU_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu_pa_unittest.cc index 0679596..c790d0f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/build_config.h" #include "partition_alloc/partition_alloc_base/cpu.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_identity.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_identity.h index 624165f..e4b679c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_identity.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_identity.h
@@ -1,6 +1,11 @@ // Copyright 2025 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_CXX20_IDENTITY_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_CXX20_IDENTITY_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h index cdacb7f..84cc320 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_CXX20_IS_CONSTANT_EVALUATED_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_CXX20_IS_CONSTANT_EVALUATED_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx_wrapper/algorithm.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx_wrapper/algorithm.h index 3df94f07..8476e98 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx_wrapper/algorithm.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx_wrapper/algorithm.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This is a header which wraps algorithm to avoid missing // libcpp_verbose_abort().
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx_wrapper/optional.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx_wrapper/optional.h index 597b613..61516e79 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx_wrapper/optional.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx_wrapper/optional.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This is a header which wraps optional to avoid missing // libcpp_verbose_abort().
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.cc index 842266a..2ded933 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/debug/alias.h" #include "partition_alloc/partition_alloc_base/compiler_specific.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h index ab7410b..ebf2d7a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_DEBUG_ALIAS_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_DEBUG_ALIAS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.cc index d5875b3..6b7832fa 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.cc
@@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif #include "partition_alloc/partition_alloc_base/debug/proc_maps_linux.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.h index e8e6ccc..ac6c0a4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/proc_maps_linux.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_DEBUG_PROC_MAPS_LINUX_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_DEBUG_PROC_MAPS_LINUX_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.cc index 76e3c1a..3f228c70 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/debug/stack_trace.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h index 287765d49..9e946d7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_DEBUG_STACK_TRACE_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_DEBUG_STACK_TRACE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_android.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_android.cc index 42fd3b0..9061734 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_android.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_android.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/debug/stack_trace.h" #include <unistd.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_linux.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_linux.cc index f2bfb20..d37cd43 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_linux.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_linux.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/debug/stack_trace.h" #include "partition_alloc/build_config.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_mac.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_mac.cc index 74a17d2..acc2c95 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_mac.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_mac.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/debug/stack_trace.h" #include "partition_alloc/build_config.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc index 8b4a734..1745f2ca 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/debug/stack_trace.h" #include <fcntl.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_win.cc index 8c3ef6a..00a4ac2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_win.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/debug/stack_trace.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/export_template.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/export_template.h index 14dd5dd..0965e2c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/export_template.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/export_template.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_EXPORT_TEMPLATE_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_EXPORT_TEMPLATE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.cc index 539b5992..c6bc239 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/files/file_path.h" #include <cstring>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h index 204e2969..bfcd12d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // FilePath is a container for pathnames stored in a platform's native string // type, providing containers for manipulation in according with the // platform's conventions for pathnames. It supports the following path
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path_pa_unittest.cc index c48a029..af316b86 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <cstddef> #include <sstream>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h index ce21e32..86ffccd 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This file contains utility functions for dealing with the local // filesystem.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util_posix.cc index bf0dbfc..3359e7d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util_posix.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/files/file_util.h" #include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/platform_file.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/platform_file.h index cd7c1617e..a589226 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/platform_file.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/platform_file.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_FILES_PLATFORM_FILE_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_FILES_PLATFORM_FILE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.cc index 3c9e10e..21c4784 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h" #include <zircon/status.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h index cbddde3..f818edd7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_FUCHSIA_FUCHSIA_LOGGING_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_FUCHSIA_FUCHSIA_LOGGING_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc index f4da404b..e76be20 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <fuchsia/logger/cpp/fidl.h> #include <lib/fidl/cpp/binding.h> #include <lib/sys/cpp/component_context.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h index e0ee3ec..649ee1b3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_IMMEDIATE_CRASH_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_IMMEDIATE_CRASH_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h index b389022..4e041b7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_IOS_IOS_UTIL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_IOS_IOS_UTIL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.mm index bd89dc2..a9ec3a1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.mm
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/ios/ios_util.h" #include <array>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.cc index d61be9b..3ffbac5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/log_message.h" // TODO(crbug.com/40158212): After finishing copying //base files to PA library,
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h index 46b233d6..465cf3c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_LOG_MESSAGE_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_LOG_MESSAGE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.cc index da8003f8..dc0d990 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/logging.h" // TODO(crbug.com/40158212): After finishing copying //base files to PA library,
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h index 3f4ed8b..3e799f3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_LOGGING_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_LOGGING_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging_pa_unittest.cc index 1194ceb..65f0a493 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <sstream> #include <string>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h index d692294..4d8e549 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_MAC_MAC_UTIL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_MAC_MAC_UTIL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.mm index 9bf9f1dd..0f34a7c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.mm
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/mac/mac_util.h" #include <sys/sysctl.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h index 7180f034f..b2f7a79 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_PAGE_SIZE_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_PAGE_SIZE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_posix.cc index 245bc58..e05be9f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_posix.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/memory/page_size.h" #include <unistd.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_win.cc index e5bfb76e..efc39cf 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_win.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/memory/page_size.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.cc index f952f31..29d7308 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/memory/ref_counted.h" #include <limits>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h index 2b8b87ba..ce52e9a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_REF_COUNTED_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_REF_COUNTED_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_policy.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_policy.h index e8e9a20..32f88bc2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_policy.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_policy.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_SCOPED_POLICY_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_SCOPED_POLICY_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h index 872c16d..29f3471 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_SCOPED_REFPTR_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_SCOPED_REFPTR_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.cc index 23ab7a3..a21a8fa 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/native_library.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h index 0801af0..033bb7e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NATIVE_LIBRARY_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NATIVE_LIBRARY_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_pa_unittest.cc index 89ed1fd51..65e545c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/files/file_path.h" #include "partition_alloc/partition_alloc_base/native_library.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_posix.cc index cddd47e..fdc18de 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_posix.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/native_library.h" #include <dlfcn.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h index 2daa62cee..eb4e196 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NO_DESTRUCTOR_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NO_DESTRUCTOR_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor_pa_unittest.cc index 063714c..bc31e74 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <vector> #include "partition_alloc/partition_alloc_base/compiler_specific.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h index 57086c2..4c26985e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NOTREACHED_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NOTREACHED_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h index 739a5e9..89d6c5f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_CHECKED_MATH_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_CHECKED_MATH_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math_impl.h index ea92dba..8e78e8e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_CHECKED_MATH_IMPL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_CHECKED_MATH_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h index e579ced1..235c3c2d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_CLAMPED_MATH_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_CLAMPED_MATH_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h index b18d1d62..329bf361 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_CLAMPED_MATH_IMPL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_CLAMPED_MATH_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h index 4fc28dcd..cf582ec 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_CONVERSIONS_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_CONVERSIONS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h index 354d53e..73abf2d5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_CONVERSIONS_ARM_IMPL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_CONVERSIONS_ARM_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_impl.h index 4c5ab0f..f5099cd 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_CONVERSIONS_IMPL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_CONVERSIONS_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math.h index fcf72d3..197bf72 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h index a352d71..51acb69 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_ARM_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h index b20b5277..07c08bd9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_CLANG_GCC_IMPL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_CLANG_GCC_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h index a0dda7a..907d3a9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_SHARED_IMPL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_SHARED_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h index 35d4f45..fe8b5d0f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This provides a wrapper around system calls which may be interrupted by a // signal and return EINTR. See man 7 signal. // To prevent long-lasting loops (which would likely be a bug, such as a signal
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.cc index a910431e..e5b9630 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/posix/safe_strerror.h" #include <cerrno>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h index 1637536..9fe68542 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_POSIX_SAFE_STRERROR_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_POSIX_SAFE_STRERROR_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h index f2961dd6..2e634e6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_PROCESS_PROCESS_HANDLE_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_PROCESS_PROCESS_HANDLE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_posix.cc index 8989883..8ce8c47 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_posix.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/process/process_handle.h" #include <unistd.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_win.cc index 9fcc809..2b9d68c0 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_win.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/process/process_handle.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.cc index 84634564..765cd9a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/rand_util.h" #include <climits>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h index 3682a342..df8cea7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_RAND_UTIL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_RAND_UTIL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_fuchsia.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_fuchsia.cc index e3e7773..412ef24 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_fuchsia.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_fuchsia.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/rand_util.h" #include <zircon/syscalls.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_pa_unittest.cc index 5ac81945..a8aae6ab 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <algorithm> #include <cmath> #include <cstddef>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc index db79a652..d95e72c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/rand_util.h" #include <fcntl.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_win.cc index 1596bc2..428ac1e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_win.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/rand_util.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/algorithm.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/algorithm.h index c3f58e3..4560dd5a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/algorithm.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/algorithm.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_RANGES_ALGORITHM_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_RANGES_ALGORITHM_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/algorithm_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/algorithm_pa_unittest.cc index add1857fc..d68b234 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/algorithm_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/algorithm_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <algorithm> #include <functional> #include <initializer_list>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/functional.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/functional.h index f74dda35..5346002a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/functional.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/functional.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_RANGES_FUNCTIONAL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_RANGES_FUNCTIONAL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/functional_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/functional_pa_unittest.cc index f40a08d..b364869 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/functional_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/functional_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/ranges/functional.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/ranges.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/ranges.h index d05af4d4..e9722f45 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/ranges.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/ranges.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Since PartitionAlloc disallows c++20 ranges, use base::ranges instead. #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_RANGES_RANGES_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_RANGES_RANGES_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/ranges_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/ranges_pa_unittest.cc index 8aed29b..f5296ae2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/ranges_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ranges/ranges_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <array> #include <initializer_list> #include <vector>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h index d3460d9..7cbfe82 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_SCOPED_CLEAR_LAST_ERROR_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_SCOPED_CLEAR_LAST_ERROR_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc index afe7bcb..78d0c20 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/build_config.h" #include "partition_alloc/partition_alloc_base/logging.h" #include "partition_alloc/partition_alloc_base/scoped_clear_last_error.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_win.cc index e6ebe6a..bb5a964 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_win.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/scoped_clear_last_error.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.cc index e3d1060c..35393519 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/strings/cstring_builder.h" #include "partition_alloc/build_config.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h index e6987da..ecf54f5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_CSTRING_BUILDER_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_CSTRING_BUILDER_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder_pa_unittest.cc index 1f7c1d21..bdc17667 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <cmath> #include "partition_alloc/build_config.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.cc index 46453a8..b3958451 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" #include <cerrno>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h index 8f4f9492..c846c45 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_SAFE_SPRINTF_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_SAFE_SPRINTF_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf_pa_unittest.cc index cc931c24..19311d2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <cstddef> #include <cstdint> #include <cstdio>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.cc index ef124f3..ad9f26dc 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/strings/string_util.h" #include <cstring>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h index 41e1b91..35b3b13 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_STRING_UTIL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_STRING_UTIL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util_pa_unittest.cc index 510d26d..3427450 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/build_config.h" #include "partition_alloc/partition_alloc_base/strings/string_util.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.cc index a9be5a7..df3e8f3f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/strings/stringprintf.h" #include <cstdarg>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h index b445669..6927f006 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_STRINGPRINTF_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_STRINGPRINTF_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf_pa_unittest.cc index a4db0a9..777caf2a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <cerrno> #include <cstddef>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h index b88a3d7f..4f47372 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_SYSTEM_SYS_INFO_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_SYSTEM_SYS_INFO_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_ios.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_ios.mm index 0082bcb13..bd01f38 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_ios.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_ios.mm
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/system/sys_info.h" #import <Foundation/Foundation.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_mac.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_mac.mm index 20a4205..14b9b711 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_mac.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_mac.mm
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/system/sys_info.h" #import <Foundation/Foundation.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/template_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/template_util.h index dbc7a7a..7854ecb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/template_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/template_util.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_TEMPLATE_UTIL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_TEMPLATE_UTIL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/template_util_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/template_util_pa_unittest.cc index 20205fbe..46b9b78 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/template_util_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/template_util_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <stdint.h> #include "partition_alloc/partition_alloc_base/template_util.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/test/gtest_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/test/gtest_util.h index 4b39dd1..ed3ee5f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/test/gtest_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/test/gtest_util.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_TEST_GTEST_UTIL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_TEST_GTEST_UTIL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/test/move_only_int.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/test/move_only_int.h index 79c914142..943592f9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/test/move_only_int.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/test/move_only_int.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_TEST_MOVE_ONLY_INT_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_TEST_MOVE_ONLY_INT_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h index feb1d13..cb7bb3ea 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This header file contains macro definitions for thread safety annotations // that allow developers to document the locking policies of multi-threaded // code. The annotations can also help program analysis tools to identify
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_nocompile.nc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_nocompile.nc index 3ba937a..118709bf 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_nocompile.nc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_nocompile.nc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This is a "No Compile Test" suite. // https://dev.chromium.org/developers/testing/no-compile-tests
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_unittest.cc index 3e5198c..99fa6a6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/thread_annotations.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.cc index 27d2cff..ff4871b9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/threading/platform_thread.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h index f6c40b7..b779ac5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // WARNING: You should *NOT* be using this class directly. PlatformThread is // the low-level platform-specific abstraction to the OS's threading interface. // You should instead be using a message-loop driven Thread, see thread.h.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_android_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_android_for_testing.cc index 0ee3fae..4c1e809 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_android_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_android_for_testing.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <pthread.h> #include <cstddef>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_apple_for_testing.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_apple_for_testing.mm index 63f6a91..19b5eec 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_apple_for_testing.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_apple_for_testing.mm
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #import <Foundation/Foundation.h> #include <mach/mach.h> #include <mach/mach_time.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h index a99b483..01c1e9c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // WARNING: You should *NOT* be using this class directly. PlatformThread is // the low-level platform-specific abstraction to the OS's threading interface. // You should instead be using a message-loop driven Thread, see thread.h.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.cc index d0eb7ef..e89b9a9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <pthread.h> #include <cstddef>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h index aa217b8..dea63375 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_THREADING_PLATFORM_THREAD_INTERNAL_POSIX_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_THREADING_PLATFORM_THREAD_INTERNAL_POSIX_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_linux_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_linux_for_testing.cc index 17a8334..7e67506 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_linux_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_linux_for_testing.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <pthread.h> #include <cstddef>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc index ccb4119..c181294d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/threading/platform_thread.h" #include <pthread.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix_for_testing.cc index a5c2625..e127111 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix_for_testing.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <pthread.h> #include <sched.h> #include <sys/time.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_ref.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_ref.h index 751f83a..d9fd321978 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_ref.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_ref.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // WARNING: *DO NOT* use this class directly. base::PlatformThreadRef is a // low-level platform-specific abstraction to the OS's threading interface. // Instead, consider using a message-loop driven base::Thread, see
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win.cc index 82aa2e5..5df1aaa 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/threading/platform_thread.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win_for_testing.cc index 5648472..af3beb1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win_for_testing.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <windows.h> #include <cstddef>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.cc index 5e7e92eb..a0476e70 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/time/time.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h index 37452755..cbe7526a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // `Time` represents an absolute point in coordinated universal time (UTC), // internally represented as microseconds (s/1,000,000) since the Windows epoch // (1601-01-01 00:00:00 UTC). System-dependent clock interface routines are
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_apple.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_apple.mm index 989adb8..ee2c8de 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_apple.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_apple.mm
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/time/time.h" #import <Foundation/Foundation.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_conversion_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_conversion_posix.cc index 1039869a..38bed1da 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_conversion_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_conversion_posix.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <sys/time.h> #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_fuchsia.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_fuchsia.cc index 475b49d..c32311ef1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_fuchsia.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_fuchsia.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/time/time.h" #include <threads.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_now_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_now_posix.cc index 04d5b324..eb0acc4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_now_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_now_posix.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <sys/time.h> #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.cc index b1c4c92..5a4fc856 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_base/time/time_override.h" #include "partition_alloc/partition_alloc_base/check.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h index adff6be..f3777cee 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_TIME_TIME_OVERRIDE_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_TIME_TIME_OVERRIDE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_win.cc index bf37a99..8a896bc 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_win.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Windows Timer Primer // // A good article: http://www.ddj.com/windows/184416651
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/types/same_as_any.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/types/same_as_any.h index bed3cf34..4cc8b23b0 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/types/same_as_any.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/types/same_as_any.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_TYPES_SAME_AS_ANY_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_TYPES_SAME_AS_ANY_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/types/strong_alias.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/types/strong_alias.h index 68703b7..7046f43 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/types/strong_alias.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/types/strong_alias.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_TYPES_STRONG_ALIAS_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_TYPES_STRONG_ALIAS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types.h index 733aec1..ca93f6b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_WIN_WIN_HANDLE_TYPES_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_WIN_WIN_HANDLE_TYPES_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types_list.inc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types_list.inc index 8d730ff..322ffc6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types_list.inc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types_list.inc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This file intentionally does not have header guards, it's included // inside a macro to generate enum values. The following line silences a // presubmit and Tricium warning that would otherwise be triggered by this:
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_handle_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_handle_util.h index 0f87eb49..d2eef4a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_handle_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_handle_util.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BASE_WIN_WINDOWS_HANDLE_UTIL_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BASE_WIN_WINDOWS_HANDLE_UTIL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h index 649a3b7..2d86cde 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This file contains defines and typedefs that allow popular Windows types to // be used without the overhead of including windows.h.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h index 4225e0f..f6f59deb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h
@@ -1,6 +1,11 @@ // Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif #ifndef PARTITION_ALLOC_PARTITION_ALLOC_BUILDFLAGS_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_BUILDFLAGS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h index 8156bac..3377e75 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_CHECK_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_CHECK_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h index dd71a92..0756517 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_CONFIG_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_CONFIG_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h index bd17e1e..7f33bd55 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_CONSTANTS_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_CONSTANTS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h index 49773244..fecc9f91 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_FOR_TESTING_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_FOR_TESTING_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h index 7d7acee3..e7d9b68 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_FORWARD_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_FORWARD_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.cc index 209ac547..8fbce59 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_hooks.h" #include <ostream>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h index 12176ed..f7cbbc5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ALLOC_HOOKS_H_ #define PARTITION_ALLOC_PARTITION_ALLOC_HOOKS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_perftest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_perftest.cc index 261013b1..a7a504e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_perftest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_perftest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc.h" #include <algorithm>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest.cc index 791fb74..6f77120 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/bucket_lookup.h" #if !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc index 68a6f7c..5850222 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_bucket.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h index cd0c0a7c..e6c8f54 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h
@@ -1,6 +1,11 @@ // Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif #ifndef PARTITION_ALLOC_PARTITION_BUCKET_H_ #define PARTITION_ALLOC_PARTITION_BUCKET_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.cc index 72851e3..85f74cf7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_cookie.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h b/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h index 686b2ab..0a7be124 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_COOKIE_H_ #define PARTITION_ALLOC_PARTITION_COOKIE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.cc index ae7ea45..ea2dcfb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_dcheck_helper.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h b/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h index 0392c57..a59a38fb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_DCHECK_HELPER_H_ #define PARTITION_ALLOC_PARTITION_DCHECK_HELPER_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h b/base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h index 34889b2..23fffeb1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_DIRECT_MAP_EXTENT_H_ #define PARTITION_ALLOC_PARTITION_DIRECT_MAP_EXTENT_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.cc index 10ab7c6..d00a58e7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_freelist_entry.h" #include "partition_alloc/partition_alloc_base/immediate_crash.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h b/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h index 3b1a6c3..7d6df99d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_FREELIST_ENTRY_H_ #define PARTITION_ALLOC_PARTITION_FREELIST_ENTRY_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_lock.h b/base/allocator/partition_allocator/src/partition_alloc/partition_lock.h index 0209ec6..eb260cb4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_lock.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_lock.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_LOCK_H_ #define PARTITION_ALLOC_PARTITION_LOCK_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_lock_perftest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_lock_perftest.cc index 1bf5c01..18f1e239 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_lock_perftest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_lock_perftest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_lock.h" #include <vector>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_lock_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_lock_unittest.cc index 2a9e54c5..66880dd 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_lock_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_lock_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_lock.h" #include <algorithm>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_oom.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_oom.cc index e56402d..9e390fd 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_oom.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_oom.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_oom.h" #include "partition_alloc/build_config.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_oom.h b/base/allocator/partition_allocator/src/partition_alloc/partition_oom.h index 6145c65..345fdc89 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_oom.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_oom.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Holds functions for generating OOM errors from PartitionAlloc. This is // distinct from oom.h in that it is meant only for use in PartitionAlloc.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_page.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_page.cc index fbe9473f..d629b99 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_page.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_page.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_page.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_page.h b/base/allocator/partition_allocator/src/partition_alloc/partition_page.h index c86f813..ac78fd1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_page.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_PAGE_H_ #define PARTITION_ALLOC_PARTITION_PAGE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h b/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h index 68090efc..4f1a354 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_PAGE_CONSTANTS_H_ #define PARTITION_ALLOC_PARTITION_PAGE_CONSTANTS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc index c21dc413..c21be8e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_root.h" #include <algorithm>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_root.h b/base/allocator/partition_allocator/src/partition_alloc/partition_root.h index ba9f01d1..d816183 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_root.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_root.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_ROOT_H_ #define PARTITION_ALLOC_PARTITION_ROOT_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_stats.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_stats.cc index 93a314a..c8cf441 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_stats.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_stats.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_stats.h" #include <cstring>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_stats.h b/base/allocator/partition_allocator/src/partition_alloc/partition_stats.h index ac68d42..c717556 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_stats.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_stats.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_STATS_H_ #define PARTITION_ALLOC_PARTITION_STATS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_superpage_extent_entry.h b/base/allocator/partition_allocator/src/partition_alloc/partition_superpage_extent_entry.h index a7d08a1..8f6ea39c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_superpage_extent_entry.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_superpage_extent_entry.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_SUPERPAGE_EXTENT_ENTRY_H_ #define PARTITION_ALLOC_PARTITION_SUPERPAGE_EXTENT_ENTRY_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_tls.h b/base/allocator/partition_allocator/src/partition_alloc/partition_tls.h index 6191155..741ba120 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_tls.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_tls.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_PARTITION_TLS_H_ #define PARTITION_ALLOC_PARTITION_TLS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_tls_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_tls_win.cc index e28ffe8..e8d26ca 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_tls_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_tls_win.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_tls.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/empty.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/empty.cc index f2cab740..26ae2c5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/empty.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/empty.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This empty.cc is built when raw_ptr_noop_impl.h is used to avoid // the situation: no object files are linked to build raw_ptr.dll. // If raw_ptr target's sources has only header files, no object
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc index fecc2c3..6e800ada 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/pointers/instance_tracer.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.h index c8e55d7b..7612e41 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_POINTERS_INSTANCE_TRACER_H_ #define PARTITION_ALLOC_POINTERS_INSTANCE_TRACER_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h index bab29dd..0546bb2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // IWYU pragma: private, include "base/memory/raw_ptr.h" #ifndef PARTITION_ALLOC_POINTERS_RAW_PTR_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.cc index 00724df..4705d9b7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/pointers/raw_ptr_asan_unowned_impl.h" #include <sanitizer/asan_interface.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h index c2ba4a81..c0bac52 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_POINTERS_RAW_PTR_ASAN_UNOWNED_IMPL_H_ #define PARTITION_ALLOC_POINTERS_RAW_PTR_ASAN_UNOWNED_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.cc index 7c63aac..20f2e83 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/pointers/raw_ptr_backup_ref_impl.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h index f49a35b..2de9421 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_POINTERS_RAW_PTR_BACKUP_REF_IMPL_H_ #define PARTITION_ALLOC_POINTERS_RAW_PTR_BACKUP_REF_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_cast.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_cast.h index f00bad8d..e4e5f915 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_cast.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_cast.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // IWYU pragma: private, include "base/memory/raw_ptr_cast.h" #ifndef PARTITION_ALLOC_POINTERS_RAW_PTR_CAST_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.cc index 9813442..1d55e39 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/pointers/raw_ptr_counting_impl_for_test.h" int base::test::RawPtrCountingImplForTest::wrap_raw_ptr_cnt = INT_MIN;
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h index 3628c09..df7e7b2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_POINTERS_RAW_PTR_COUNTING_IMPL_FOR_TEST_H_ #define PARTITION_ALLOC_POINTERS_RAW_PTR_COUNTING_IMPL_FOR_TEST_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_exclusion.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_exclusion.h index f56f7339..eaa2710f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_exclusion.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_exclusion.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // IWYU pragma: private, include "base/memory/raw_ptr_exclusion.h" #ifndef PARTITION_ALLOC_POINTERS_RAW_PTR_EXCLUSION_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.cc index e23ee52..be5a85e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/pointers/raw_ptr_hookable_impl.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h index 404c8ed..64d28ad 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_POINTERS_RAW_PTR_HOOKABLE_IMPL_H_ #define PARTITION_ALLOC_POINTERS_RAW_PTR_HOOKABLE_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_nocompile.nc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_nocompile.nc index 75d2de6b..7224bef 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_nocompile.nc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_nocompile.nc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This is a "No Compile Test" suite. // http://dev.chromium.org/developers/testing/no-compile-tests
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h index cee1131..d4ef251d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_POINTERS_RAW_PTR_NOOP_IMPL_H_ #define PARTITION_ALLOC_POINTERS_RAW_PTR_NOOP_IMPL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_test_support.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_test_support.h index 8f3b550..8cd44a48 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_test_support.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_test_support.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_POINTERS_RAW_PTR_TEST_SUPPORT_H_ #define PARTITION_ALLOC_POINTERS_RAW_PTR_TEST_SUPPORT_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_unittest.cc index f02743f..177808d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/pointers/raw_ptr.h" #include <climits>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h index 2e619ba..b21e468 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // IWYU pragma: private, include "base/memory/raw_ref.h" #ifndef PARTITION_ALLOC_POINTERS_RAW_REF_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_nocompile.nc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_nocompile.nc index e4e9b02..634ad1c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_nocompile.nc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_nocompile.nc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This is a "No Compile Test" suite. // http://dev.chromium.org/developers/testing/no-compile-tests
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_unittest.cc index a3b1ebae..fa4000b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/pointers/raw_ref.h" #include <functional>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h b/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h index 56b7f39..90688eac 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_POOL_OFFSET_FREELIST_H_ #define PARTITION_ALLOC_POOL_OFFSET_FREELIST_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/random.cc b/base/allocator/partition_allocator/src/partition_alloc/random.cc index 32ddc75..06447a79 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/random.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/random.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/random.h" #include <type_traits>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/random.h b/base/allocator/partition_allocator/src/partition_alloc/random.h index 9355b749f..de6b29a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/random.h +++ b/base/allocator/partition_allocator/src/partition_alloc/random.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_RANDOM_H_ #define PARTITION_ALLOC_RANDOM_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.cc b/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.cc index a333a742..6bbe423f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/reservation_offset_table.h" #include "partition_alloc/buildflags.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h b/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h index a7636b1..0269eff 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h +++ b/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_RESERVATION_OFFSET_TABLE_H_ #define PARTITION_ALLOC_RESERVATION_OFFSET_TABLE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h b/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h index d9db43e1..1173806 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h +++ b/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_REVERSE_BYTES_H_ #define PARTITION_ALLOC_REVERSE_BYTES_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes_unittest.cc index 975cef23..f671a32d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/reverse_bytes.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine.cc b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine.cc index f8318c6..32aaef24 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/scheduler_loop_quarantine.h" #include "partition_alloc/internal_allocator.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine.h b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine.h index b3286e9f..7d2465e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine.h +++ b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Scheduler-loop Quarantine is a quarantine pool behind PartitionAlloc with // Advanced Checks and `ADVANCED_MEMORY_SAFETY_CHECKS()`. // Both requests to prevent `free()`d allocation getting released to free-list,
diff --git a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_support.cc b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_support.cc index 2daeca1b..4505a9d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_support.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_support.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/scheduler_loop_quarantine_support.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_support.h b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_support.h index 824dbce..4eac1a5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_support.h +++ b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_support.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SCHEDULER_LOOP_QUARANTINE_SUPPORT_H_ #define PARTITION_ALLOC_SCHEDULER_LOOP_QUARANTINE_SUPPORT_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_unittest.cc index 9872470..40a678a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/scheduler_loop_quarantine_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/scheduler_loop_quarantine.h" #include "partition_alloc/extended_api.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_dispatch.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_dispatch.h index ebde848..bc11296 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_dispatch.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_dispatch.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_ALLOCATOR_DISPATCH_H_ #define PARTITION_ALLOC_SHIM_ALLOCATOR_DISPATCH_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h index 0ffe987..de10bbf5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_ALLOCATOR_INTERCEPTION_APPLE_H_ #define PARTITION_ALLOC_SHIM_ALLOCATOR_INTERCEPTION_APPLE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.mm b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.mm index 63345f8..f0f8723 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.mm
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This file contains all the logic necessary to intercept allocations on // macOS. "malloc zones" are an abstraction that allows the process to intercept // all malloc-related functions. There is no good mechanism [short of
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple_unittest.mm b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple_unittest.mm index 4cde447..90c3e6ade 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple_unittest.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple_unittest.mm
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_interception_apple.h" #include "partition_alloc/buildflags.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.cc index fa5ee97..b5ce80db 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_shim.h" #include <unistd.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h index d43a9fff..fae4719 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_H_ #define PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_android.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_android.cc index a92a713..3659a1b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_android.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_android.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_shim.h" #include <unistd.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_apple.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_apple.cc index 6a89deec..3214cf5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_apple.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_apple.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_shim.h" #include <malloc/malloc.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_apple_zoned_malloc.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_apple_zoned_malloc.cc index 65eb0b30..a59ee70 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_apple_zoned_malloc.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_apple_zoned_malloc.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <utility> #include "partition_alloc/shim/allocator_interception_apple.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_glibc.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_glibc.cc index 143c1d3b..aa42c8d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_glibc.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_glibc.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <dlfcn.h> #include <malloc.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc index 3ef3f91..668ce7b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <malloc.h> #include "partition_alloc/build_config.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc index b7e026b..7917845 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h index d969bc9..4aaf8fa 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DEFAULT_DISPATCH_TO_PARTITION_ALLOC_H_ #define PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DEFAULT_DISPATCH_TO_PARTITION_ALLOC_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_internal.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_internal.h index b65a3b3..2fa7ea2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_internal.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_internal.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DEFAULT_DISPATCH_TO_PARTITION_ALLOC_INTERNAL_H_ #define PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DEFAULT_DISPATCH_TO_PARTITION_ALLOC_INTERNAL_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc index 79696de..6953784 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" #include <cstdlib>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_with_advanced_checks.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_with_advanced_checks.cc index 99c63379..bfa15991 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_with_advanced_checks.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_with_advanced_checks.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_with_advanced_checks.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_with_advanced_checks.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_with_advanced_checks.h index 635d8135..57ea1f77 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_with_advanced_checks.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_with_advanced_checks.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DEFAULT_DISPATCH_TO_PARTITION_ALLOC_WITH_ADVANCED_CHECKS_H_ #define PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DEFAULT_DISPATCH_TO_PARTITION_ALLOC_WITH_ADVANCED_CHECKS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_winheap.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_winheap.cc index f994c535..fff088ff 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_winheap.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_winheap.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include <ostream> #include "partition_alloc/partition_alloc_check.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.cc index 2fa401bd..7fca9c9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.h" #include <cstddef>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.h index b37bf97b..614c1ba 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_dispatch_to_noop_on_free.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DISPATCH_TO_NOOP_ON_FREE_H_ #define PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DISPATCH_TO_NOOP_ON_FREE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_functions.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_functions.h index 15b8e5b..0df8695 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_functions.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_functions.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifdef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_FUNCTIONS_H_ #error This header is meant to be included only once by allocator_shim*.cc except allocator_shim_win_component.cc #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_functions_win_component.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_functions_win_component.cc index 3781708..a2d2872 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_functions_win_component.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_functions_win_component.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_shim.h" #include "partition_alloc/shim/allocator_shim_functions.h" #include "partition_alloc/shim/checked_multiply_win.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h index afa8151..992f440 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_INTERNALS_H_ #define PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_INTERNALS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_default_zone.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_default_zone.h index 51d4b74..5c32bd85 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_default_zone.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_default_zone.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifdef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_OVERRIDE_APPLE_DEFAULT_ZONE_H_ #error This header is meant to be included only once by allocator_shim.cc #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_symbols.h index 4537d02..d208a39 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_symbols.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifdef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_OVERRIDE_APPLE_SYMBOLS_H_ #error This header is meant to be included only once by allocator_shim.cc #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_cpp_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_cpp_symbols.h index 1ba4cca..fd9bf4c0 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_cpp_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_cpp_symbols.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifdef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_OVERRIDE_CPP_SYMBOLS_H_ #error This header is meant to be included only once by allocator_shim.cc #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h index e26027f..68fb5a4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifdef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_OVERRIDE_GLIBC_WEAK_SYMBOLS_H_ #error This header is meant to be included only once by allocator_shim.cc #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_libc_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_libc_symbols.h index 5037b703..e339eb16d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_libc_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_libc_symbols.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Its purpose is to preempt the Libc symbols for malloc/new so they call the // shim layer entry points.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h index 3a63ea77..98457c7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifdef PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_OVERRIDE_LINKER_WRAPPED_SYMBOLS_H_ #error This header is meant to be included only once by allocator_shim.cc #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h index 450719d..1bfc7d3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This header defines symbols to override the same functions in the Visual C++ // CRT implementation.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_unittest.cc index 02b41372..bd22e37 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/allocator_shim.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_win_component.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_win_component.cc index f60e2b7..2cd1ae1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_win_component.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_win_component.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/build_config.h" #include "partition_alloc/buildflags.h" #include "partition_alloc/shim/allocator_dispatch.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_win_static.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_win_static.cc index dc1061e..2439b45 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_win_static.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_win_static.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/build_config.h" #include "partition_alloc/buildflags.h" #include "partition_alloc/partition_alloc_base/compiler_specific.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/checked_multiply_win.h b/base/allocator/partition_allocator/src/partition_alloc/shim/checked_multiply_win.h index a520b07..e868dec5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/checked_multiply_win.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/checked_multiply_win.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_CHECKED_MULTIPLY_WIN_H_ #define PARTITION_ALLOC_SHIM_CHECKED_MULTIPLY_WIN_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/early_zone_registration_constants.h b/base/allocator/partition_allocator/src/partition_alloc/shim/early_zone_registration_constants.h index 68c7324..821a84d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/early_zone_registration_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/early_zone_registration_constants.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_EARLY_ZONE_REGISTRATION_CONSTANTS_H_ #define PARTITION_ALLOC_SHIM_EARLY_ZONE_REGISTRATION_CONSTANTS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/empty.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/empty.cc index b8096fd..d7d300c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/empty.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/empty.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This empty.cc is built when use_allocator_shim is false to avoid // the situation: no object files are linked to build allocator_shim.dll. // If allocator_shim target's sources has only header files, no object
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.cc index 6d7b5c96..eeb33dd2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/malloc_zone_functions_apple.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h index 1eeb3b7..a964494 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SHIM_MALLOC_ZONE_FUNCTIONS_APPLE_H_ #define PARTITION_ALLOC_SHIM_MALLOC_ZONE_FUNCTIONS_APPLE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple_unittest.cc index 49e1013..5ac27ee 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/malloc_zone_functions_apple.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/shim_alloc_functions.h b/base/allocator/partition_allocator/src/partition_alloc/shim/shim_alloc_functions.h index 7ae82b0..2d0a64436 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/shim_alloc_functions.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/shim_alloc_functions.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifdef PARTITION_ALLOC_SHIM_SHIM_ALLOC_FUNCTIONS_H_ #error This header is meant to be included only once by allocator_shim*.cc #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.cc index cc02584..8dc4a7d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // This code should move into the default Windows shim once the win-specific // allocation shim has been removed, and the generic shim has becaome the // default.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h index 61055584..e3fef1fe 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Thin allocation wrappers for the windows heap. This file should be deleted // once the win-specific allocation shim has been removed, and the generic shim // has becaome the default.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win_unittest.cc index 0237c54..63c5eb2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/shim/winheap_stubs_win.h" #include "partition_alloc/partition_alloc_base/bits.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/slot_start_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/slot_start_unittest.cc index 568a508d..2c779fa2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/slot_start_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/slot_start_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/partition_alloc_for_testing.h" #include "partition_alloc/partition_page.h" #include "partition_alloc/use_death_tests.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc b/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc index e427e536..da78857 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/spinning_mutex.h" #include <atomic>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h b/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h index 08e99d6..a456727 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h +++ b/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_SPINNING_MUTEX_H_ #define PARTITION_ALLOC_SPINNING_MUTEX_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/arm/push_registers_asm.cc b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/arm/push_registers_asm.cc index 4a0e0cb..b18a0ea 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/arm/push_registers_asm.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/arm/push_registers_asm.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Push all callee-saved registers to get them on the stack for conservative // stack scanning. //
diff --git a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/arm64/push_registers_asm.cc b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/arm64/push_registers_asm.cc index e9e872f..75885b11 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/arm64/push_registers_asm.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/arm64/push_registers_asm.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Push all callee-saved registers to get them on the stack for conservative // stack scanning. //
diff --git a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/loong64/push_registers_asm.cc b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/loong64/push_registers_asm.cc index 574c9ea..c58a5bd 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/loong64/push_registers_asm.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/loong64/push_registers_asm.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Push all callee-saved registers to get them on the stack for conservative // stack scanning. //
diff --git a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/riscv64/push_registers_asm.cc b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/riscv64/push_registers_asm.cc index b387211a..4ddfd17 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/riscv64/push_registers_asm.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/riscv64/push_registers_asm.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Push all callee-saved registers to get them on the stack for conservative // stack scanning. //
diff --git a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/x64/push_registers_asm.cc b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/x64/push_registers_asm.cc index b5ed711..d204a6ce 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/x64/push_registers_asm.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/x64/push_registers_asm.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Push all callee-saved registers to get them on the stack for conservative // stack scanning. //
diff --git a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/x86/push_registers_asm.cc b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/x86/push_registers_asm.cc index edf6d11..40cf734 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/stack/asm/x86/push_registers_asm.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/stack/asm/x86/push_registers_asm.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // Push all callee-saved registers to get them on the stack for conservative // stack scanning. //
diff --git a/base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc b/base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc index efa2fc2..542b30c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/stack/stack.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/stack/stack.h b/base/allocator/partition_allocator/src/partition_alloc/stack/stack.h index 504924c4..b57e09e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/stack/stack.h +++ b/base/allocator/partition_allocator/src/partition_alloc/stack/stack.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_STACK_STACK_H_ #define PARTITION_ALLOC_STACK_STACK_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/stack/stack_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/stack/stack_unittest.cc index adcb2166..565fca1e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/stack/stack_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/stack/stack_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/stack/stack.h" #include <memory>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/tagging.cc b/base/allocator/partition_allocator/src/partition_alloc/tagging.cc index 0258d90d..c598bb3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/tagging.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/tagging.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/tagging.h" #include <stdint.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/tagging.h b/base/allocator/partition_allocator/src/partition_alloc/tagging.h index 08b6d24..a603112 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/tagging.h +++ b/base/allocator/partition_allocator/src/partition_alloc/tagging.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_TAGGING_H_ #define PARTITION_ALLOC_TAGGING_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/tagging_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/tagging_unittest.cc index 89ed62acb..049cf70 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/tagging_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/tagging_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/tagging.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_cache.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_cache.cc index b47adffb..e0a5292 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_cache.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_cache.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/thread_cache.h" #include <sys/types.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_cache.h b/base/allocator/partition_allocator/src/partition_alloc/thread_cache.h index f2b6836..67c9c9a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_cache.h +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_cache.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_THREAD_CACHE_H_ #define PARTITION_ALLOC_THREAD_CACHE_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_cache_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_cache_unittest.cc index 6c7149fa..a38469ea 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_cache_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_cache_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/thread_cache.h" #include <algorithm>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h index 9b68a05f..4a7ed28 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_THREAD_ISOLATION_ALIGNMENT_H_ #define PARTITION_ALLOC_THREAD_ISOLATION_ALIGNMENT_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc index 47ea68c..005fb0d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/thread_isolation/pkey.h" #if PA_BUILDFLAG(ENABLE_PKEYS)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h index 8c233f6b..38d5df2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_THREAD_ISOLATION_PKEY_H_ #define PARTITION_ALLOC_THREAD_ISOLATION_PKEY_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey_unittest.cc index 435a878b0..dda9e7b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey_unittest.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/address_pool_manager.h" #include "partition_alloc/buildflags.h" #include "partition_alloc/partition_alloc_constants.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.cc index f22b55b4..089316c8 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #include "partition_alloc/thread_isolation/thread_isolation.h" #if PA_BUILDFLAG(ENABLE_THREAD_ISOLATION)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h index f3dbe9d..454c214 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_THREAD_ISOLATION_THREAD_ISOLATION_H_ #define PARTITION_ALLOC_THREAD_ISOLATION_THREAD_ISOLATION_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/use_death_tests.h b/base/allocator/partition_allocator/src/partition_alloc/use_death_tests.h index 7c795d4..ed52070 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/use_death_tests.h +++ b/base/allocator/partition_allocator/src/partition_alloc/use_death_tests.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_USE_DEATH_TESTS_H_ #define PARTITION_ALLOC_USE_DEATH_TESTS_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/yield_processor.h b/base/allocator/partition_allocator/src/partition_alloc/yield_processor.h index e486f59..82e7bd1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/yield_processor.h +++ b/base/allocator/partition_allocator/src/partition_alloc/yield_processor.h
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + #ifndef PARTITION_ALLOC_YIELD_PROCESSOR_H_ #define PARTITION_ALLOC_YIELD_PROCESSOR_H_
diff --git a/base/allocator/unittest_utils.cc b/base/allocator/unittest_utils.cc index 6e728b29..fcec8c4 100644 --- a/base/allocator/unittest_utils.cc +++ b/base/allocator/unittest_utils.cc
@@ -2,6 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/40284755): Remove this and spanify to fix the errors. +#pragma allow_unsafe_buffers +#endif + // The unittests need a this in order to link up without pulling in tons // of other libraries
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc index 8ba3f60..364b9fb 100644 --- a/base/files/file_posix.cc +++ b/base/files/file_posix.cc
@@ -79,6 +79,23 @@ MacFileFlushMechanism::kFullFsync}; #endif // BUILDFLAG(IS_APPLE) +#if BUILDFLAG(IS_ANDROID) +#define OffsetType off64_t +#else +#define OffsetType off_t +#endif + +static_assert(sizeof(int64_t) == sizeof(OffsetType)); + +bool IsReadWriteRangeValid(int64_t offset, int size) { + if (size < 0 || !CheckAdd(offset, size - 1).IsValid() || + !IsValueInRangeForNumericType<OffsetType>(offset + size - 1)) { + return false; + } + + return true; +} + // AIX doesn't provide the following system calls, so either simulate them or // wrap them in order to minimize the number of #ifdef's in this file. #if !BUILDFLAG(IS_AIX) @@ -88,8 +105,6 @@ int CallFtruncate(PlatformFile file, int64_t length) { #if BUILDFLAG(IS_BSD) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) - static_assert(sizeof(off_t) >= sizeof(int64_t), - "off_t is not a 64-bit integer"); return HANDLE_EINTR(ftruncate(file, length)); #else return HANDLE_EINTR(ftruncate64(file, length)); @@ -279,11 +294,9 @@ SCOPED_FILE_TRACE_WITH_SIZE("Seek", offset); #if BUILDFLAG(IS_ANDROID) - static_assert(sizeof(int64_t) == sizeof(off64_t), "off64_t must be 64 bits"); return lseek64(file_.get(), static_cast<off64_t>(offset), static_cast<int>(whence)); #else - static_assert(sizeof(int64_t) == sizeof(off_t), "off_t must be 64 bits"); return lseek(file_.get(), static_cast<off_t>(offset), static_cast<int>(whence)); #endif @@ -292,8 +305,7 @@ int File::Read(int64_t offset, char* data, int size) { ScopedBlockingCall scoped_blocking_call(FROM_HERE, BlockingType::MAY_BLOCK); DCHECK(IsValid()); - if (size < 0 || !CheckAdd(offset, size - 1).IsValid() || - !IsValueInRangeForNumericType<off_t>(offset + size - 1)) { + if (!IsReadWriteRangeValid(offset, size)) { return -1; } @@ -302,9 +314,17 @@ int bytes_read = 0; long rv; do { +#if BUILDFLAG(IS_ANDROID) + // In case __USE_FILE_OFFSET64 is not used, we need to call pread64() + // instead of pread(). + rv = HANDLE_EINTR(pread64(file_.get(), data + bytes_read, + static_cast<size_t>(size - bytes_read), + static_cast<off64_t>(offset + bytes_read))); +#else rv = HANDLE_EINTR(pread(file_.get(), data + bytes_read, static_cast<size_t>(size - bytes_read), static_cast<off_t>(offset + bytes_read))); +#endif if (rv <= 0) { break; } @@ -372,7 +392,7 @@ } DCHECK(IsValid()); - if (size < 0 || !CheckAdd(offset, size - 1).IsValid()) { + if (!IsReadWriteRangeValid(offset, size)) { return -1; } @@ -384,15 +404,13 @@ #if BUILDFLAG(IS_ANDROID) // In case __USE_FILE_OFFSET64 is not used, we need to call pwrite64() // instead of pwrite(). - static_assert(sizeof(int64_t) == sizeof(off64_t), - "off64_t must be 64 bits"); rv = HANDLE_EINTR(pwrite64(file_.get(), data + bytes_written, static_cast<size_t>(size - bytes_written), - offset + bytes_written)); + static_cast<off64_t>(offset + bytes_written))); #else rv = HANDLE_EINTR(pwrite(file_.get(), data + bytes_written, static_cast<size_t>(size - bytes_written), - offset + bytes_written)); + static_cast<off_t>(offset + bytes_written))); #endif if (rv <= 0) { break;
diff --git a/base/files/file_unittest.cc b/base/files/file_unittest.cc index 139a6ec4..e33ab73 100644 --- a/base/files/file_unittest.cc +++ b/base/files/file_unittest.cc
@@ -827,13 +827,11 @@ "{is_valid:true,created:true,async:false,error_details:FILE_OK}"); } -#if BUILDFLAG(IS_WIN) -// Flakily times out on Windows, see http://crbug.com/846276. -#define MAYBE_WriteDataToLargeOffset DISABLED_WriteDataToLargeOffset -#else -#define MAYBE_WriteDataToLargeOffset WriteDataToLargeOffset -#endif -TEST(FileTest, MAYBE_WriteDataToLargeOffset) { +#if !BUILDFLAG(IS_WIN) +// This test is too slow on Windows which ends up with Timeout. +// Writing to a large offset can be slow on some filesystems if they don't +// efficiently support sparse files. +TEST(FileTest, ReadWriteDataToLargeOffset) { ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); FilePath file_path = temp_dir.GetPath().AppendASCII("file"); @@ -845,14 +843,28 @@ const int kDataLen = sizeof(kData) - 1; const int64_t kLargeFileOffset = (1LL << 31); + int bytes_written = + file.Write(kLargeFileOffset - kDataLen - 1, kData, kDataLen); + // If the file fails to write, it is probably we are running out of disk space // and the file system doesn't support sparse file. - if (file.Write(kLargeFileOffset - kDataLen - 1, kData, kDataLen) < 0) { + if (bytes_written < 0) { return; } - ASSERT_EQ(kDataLen, file.Write(kLargeFileOffset + 1, kData, kDataLen)); + ASSERT_EQ(kDataLen, bytes_written); + + // Now, try reading the content. + char data_read[kDataLen]; + int bytes_read = + file.Read(kLargeFileOffset - kDataLen - 1, data_read, kDataLen); + + ASSERT_EQ(kDataLen, bytes_read); + for (int i = 0; i < bytes_read; i++) { + EXPECT_EQ(kData[i], data_read[i]); + } } +#endif // !BUILDFLAG(IS_WIN) TEST(FileTest, AddFlagsForPassingToUntrustedProcess) { {
diff --git a/base/process/process_metrics.cc b/base/process/process_metrics.cc index 9caf420..f885e563 100644 --- a/base/process/process_metrics.cc +++ b/base/process/process_metrics.cc
@@ -69,27 +69,6 @@ return system_metrics; } -Value::Dict SystemMetrics::ToDict() const { - Value::Dict res; - - res.Set("committed_memory", static_cast<int>(committed_memory_)); -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) - Value::Dict meminfo = memory_info_.ToDict(); - meminfo.Merge(vmstat_info_.ToDict()); - res.Set("meminfo", std::move(meminfo)); - res.Set("diskinfo", disk_info_.ToDict()); -#endif -#if BUILDFLAG(IS_CHROMEOS) - res.Set("swapinfo", swap_info_.ToDict()); - res.Set("gpu_meminfo", gpu_memory_info_.ToDict()); -#endif -#if BUILDFLAG(IS_WIN) - res.Set("perfinfo", performance_.ToDict()); -#endif - - return res; -} - ProcessMetrics::~ProcessMetrics() = default; std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateCurrentProcessMetrics() {
diff --git a/base/process/process_metrics.h b/base/process/process_metrics.h index d996d8b4..4ade83b 100644 --- a/base/process/process_metrics.h +++ b/base/process/process_metrics.h
@@ -326,9 +326,6 @@ SystemMemoryInfoKB(const SystemMemoryInfoKB& other); SystemMemoryInfoKB& operator=(const SystemMemoryInfoKB& other); - // Serializes the platform specific fields to value. - Value::Dict ToDict() const; - int total = 0; #if !BUILDFLAG(IS_WIN) @@ -426,9 +423,6 @@ // Data from /proc/vmstat. struct BASE_EXPORT VmStatInfo { - // Serializes the platform specific fields to value. - Value::Dict ToDict() const; - uint64_t pswpin = 0; uint64_t pswpout = 0; uint64_t pgmajfault = 0; @@ -450,9 +444,6 @@ SystemDiskInfo(const SystemDiskInfo&); SystemDiskInfo& operator=(const SystemDiskInfo&); - // Serializes the platform specific fields to value. - Value::Dict ToDict() const; - uint64_t reads = 0; uint64_t reads_merged = 0; uint64_t sectors_read = 0; @@ -491,9 +482,6 @@ orig_data_size(0), mem_used_total(0) {} - // Serializes the platform specific fields to value. - Value::Dict ToDict() const; - uint64_t num_reads = 0; uint64_t num_writes = 0; uint64_t compr_data_size = 0; @@ -521,9 +509,6 @@ // Data about GPU memory usage. These fields will be -1 if not supported. struct BASE_EXPORT GraphicsMemoryInfoKB { - // Serializes the platform specific fields to value. - Value::Dict ToDict() const; - int gpu_objects = -1; int64_t gpu_memory_size = -1; }; @@ -541,9 +526,6 @@ SystemPerformanceInfo(const SystemPerformanceInfo& other); SystemPerformanceInfo& operator=(const SystemPerformanceInfo& other); - // Serializes the platform specific fields to value. - Value::Dict ToDict() const; - // Total idle time of all processes in the system (units of 100 ns). uint64_t idle_time = 0; // Number of bytes read. @@ -584,9 +566,6 @@ static SystemMetrics Sample(); - // Serializes the system metrics to value. - Value::Dict ToDict() const; - private: FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics);
diff --git a/base/process/process_metrics_linux.cc b/base/process/process_metrics_linux.cc index d327b12..c1fe2c2e 100644 --- a/base/process/process_metrics_linux.cc +++ b/base/process/process_metrics_linux.cc
@@ -379,30 +379,6 @@ } // namespace -Value::Dict SystemMemoryInfoKB::ToDict() const { - Value::Dict res; - res.Set("total", total); - res.Set("free", free); - res.Set("available", available); - res.Set("buffers", buffers); - res.Set("cached", cached); - res.Set("active_anon", active_anon); - res.Set("inactive_anon", inactive_anon); - res.Set("active_file", active_file); - res.Set("inactive_file", inactive_file); - res.Set("swap_total", swap_total); - res.Set("swap_free", swap_free); - res.Set("swap_used", swap_total - swap_free); - res.Set("dirty", dirty); - res.Set("reclaimable", reclaimable); -#if BUILDFLAG(IS_CHROMEOS) - res.Set("shmem", shmem); - res.Set("slab", slab); -#endif - - return res; -} - bool ParseProcMeminfo(std::string_view meminfo_data, SystemMemoryInfoKB* meminfo) { // The format of /proc/meminfo is: @@ -553,16 +529,6 @@ return true; } -Value::Dict VmStatInfo::ToDict() const { - Value::Dict res; - // TODO(crbug.com/40228085): Make base::Value able to hold uint64_t and remove - // casts below. - res.Set("pswpin", static_cast<int>(pswpin)); - res.Set("pswpout", static_cast<int>(pswpout)); - res.Set("pgmajfault", static_cast<int>(pgmajfault)); - return res; -} - bool GetVmStatInfo(VmStatInfo* vmstat) { // Synchronously reading files in /proc is safe. ScopedAllowBlockingForProcessMetrics allow_blocking; @@ -598,26 +564,6 @@ SystemDiskInfo& SystemDiskInfo::operator=(const SystemDiskInfo&) = default; -Value::Dict SystemDiskInfo::ToDict() const { - Value::Dict res; - - // Write out uint64_t variables as doubles. - // Note: this may discard some precision, but for JS there's no other option. - res.Set("reads", static_cast<double>(reads)); - res.Set("reads_merged", static_cast<double>(reads_merged)); - res.Set("sectors_read", static_cast<double>(sectors_read)); - res.Set("read_time", static_cast<double>(read_time)); - res.Set("writes", static_cast<double>(writes)); - res.Set("writes_merged", static_cast<double>(writes_merged)); - res.Set("sectors_written", static_cast<double>(sectors_written)); - res.Set("write_time", static_cast<double>(write_time)); - res.Set("io", static_cast<double>(io)); - res.Set("io_time", static_cast<double>(io_time)); - res.Set("weighted_io_time", static_cast<double>(weighted_io_time)); - - return res; -} - bool IsValidDiskName(std::string_view candidate) { if (candidate.length() < 3) { return false; @@ -732,32 +678,6 @@ } #if BUILDFLAG(IS_CHROMEOS) -Value::Dict SwapInfo::ToDict() const { - Value::Dict res; - - // Write out uint64_t variables as doubles. - // Note: this may discard some precision, but for JS there's no other option. - res.Set("num_reads", static_cast<double>(num_reads)); - res.Set("num_writes", static_cast<double>(num_writes)); - res.Set("orig_data_size", static_cast<double>(orig_data_size)); - res.Set("compr_data_size", static_cast<double>(compr_data_size)); - res.Set("mem_used_total", static_cast<double>(mem_used_total)); - double ratio = compr_data_size ? static_cast<double>(orig_data_size) / - static_cast<double>(compr_data_size) - : 0; - res.Set("compression_ratio", ratio); - - return res; -} - -Value::Dict GraphicsMemoryInfoKB::ToDict() const { - Value::Dict res; - - res.Set("gpu_objects", gpu_objects); - res.Set("gpu_memory_size", static_cast<double>(gpu_memory_size)); - - return res; -} bool ParseZramMmStat(std::string_view mm_stat_data, SwapInfo* swap_info) { // There are 7 columns in /sys/block/zram0/mm_stat,
diff --git a/base/process/process_metrics_win.cc b/base/process/process_metrics_win.cc index 4d2ba62..0cf0300 100644 --- a/base/process/process_metrics_win.cc +++ b/base/process/process_metrics_win.cc
@@ -279,31 +279,6 @@ SystemPerformanceInfo& SystemPerformanceInfo::operator=( const SystemPerformanceInfo& other) = default; -Value::Dict SystemPerformanceInfo::ToDict() const { - Value::Dict result; - - // Write out uint64_t variables as doubles. - // Note: this may discard some precision, but for JS there's no other option. - result.Set("idle_time", strict_cast<double>(idle_time)); - result.Set("read_transfer_count", strict_cast<double>(read_transfer_count)); - result.Set("write_transfer_count", strict_cast<double>(write_transfer_count)); - result.Set("other_transfer_count", strict_cast<double>(other_transfer_count)); - result.Set("read_operation_count", strict_cast<double>(read_operation_count)); - result.Set("write_operation_count", - strict_cast<double>(write_operation_count)); - result.Set("other_operation_count", - strict_cast<double>(other_operation_count)); - result.Set("pagefile_pages_written", - strict_cast<double>(pagefile_pages_written)); - result.Set("pagefile_pages_write_ios", - strict_cast<double>(pagefile_pages_write_ios)); - result.Set("available_pages", strict_cast<double>(available_pages)); - result.Set("pages_read", strict_cast<double>(pages_read)); - result.Set("page_read_ios", strict_cast<double>(page_read_ios)); - - return result; -} - // Retrieves performance counters from the operating system. // Fills in the provided |info| structure. Returns true on success. BASE_EXPORT bool GetSystemPerformanceInfo(SystemPerformanceInfo* info) {
diff --git a/build/config/unsafe_buffers_paths.txt b/build/config/unsafe_buffers_paths.txt index 561dd55..57c1d12 100644 --- a/build/config/unsafe_buffers_paths.txt +++ b/build/config/unsafe_buffers_paths.txt
@@ -8,7 +8,6 @@ .buffers,libc # Directories to exempt from checks --base/allocator/ -base/third_party/ -codelabs/ # Examples, keep simple. -chrome/browser/platform_experience/win/
diff --git a/build/rust/run_build_script.py b/build/rust/run_build_script.py index 9d6ca08..2dab24d 100755 --- a/build/rust/run_build_script.py +++ b/build/rust/run_build_script.py
@@ -72,6 +72,9 @@ # (derived from `rustflags` maybe?). args = [rustc_path, "--print=cfg", f"--target={target_triple}"] + # TODO(https://crbug.com/435437947): Ideally `rustc --print=cfg + # --target=...` would only be invoked **once** per build (not once per + # `run_cxxbridge.py` and once per `run_build_script.py`). proc = subprocess.Popen(args, stdout=subprocess.PIPE) for line in io.TextIOWrapper(proc.stdout, encoding="utf-8"): line = line.strip()
diff --git a/build/rust/tests/BUILD.gn b/build/rust/tests/BUILD.gn index 5a2c262..3e45e22a 100644 --- a/build/rust/tests/BUILD.gn +++ b/build/rust/tests/BUILD.gn
@@ -29,6 +29,7 @@ "//build/rust/tests/test_aliased_deps", "//build/rust/tests/test_aliased_deps:test_aliased_deps_exe", "//build/rust/tests/test_bin_crate", + "//build/rust/tests/test_cxx_cfg", "//build/rust/tests/test_rlib_crate:target1", "//build/rust/tests/test_rlib_crate:target2", "//build/rust/tests/test_rlib_crate:test_rlib_crate_associated_bin",
diff --git a/build/rust/tests/test_cpp_including_rust/BUILD.gn b/build/rust/tests/test_cpp_including_rust/BUILD.gn index 3e974fc..42f35419 100644 --- a/build/rust/tests/test_cpp_including_rust/BUILD.gn +++ b/build/rust/tests/test_cpp_including_rust/BUILD.gn
@@ -16,6 +16,7 @@ "//base", "//base/allocator:buildflags", "//base/test:run_all_unittests", + "//build/rust/tests/test_cxx_cfg", "//build/rust/tests/test_rust_static_library", "//testing/gmock", "//testing/gtest",
diff --git a/build/rust/tests/test_cxx_cfg/BUILD.gn b/build/rust/tests/test_cxx_cfg/BUILD.gn new file mode 100644 index 0000000..a36c320 --- /dev/null +++ b/build/rust/tests/test_cxx_cfg/BUILD.gn
@@ -0,0 +1,23 @@ +# Copyright 2025 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/rust/rust_static_library.gni") +import("//testing/test.gni") + +source_set("test_cxx_cfg") { + testonly = true + sources = [ "cxx_cfg_unittests.cc" ] + deps = [ + ":rust_lib", + "//testing/gtest", + ] +} + +rust_static_library("rust_lib") { + crate_root = "cxx_cfg_lib.rs" + sources = [ crate_root ] + cxx_bindings = [ crate_root ] + allow_unsafe = true + visibility = [ ":*" ] +}
diff --git a/build/rust/tests/test_cxx_cfg/cxx_cfg_lib.rs b/build/rust/tests/test_cxx_cfg/cxx_cfg_lib.rs new file mode 100644 index 0000000..13f2c8c --- /dev/null +++ b/build/rust/tests/test_cxx_cfg/cxx_cfg_lib.rs
@@ -0,0 +1,39 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +//! This focuses on testing if `#[cfg(...)]` works inside `#[cxx::bridge]`. +//! For that to work, the appropriate `--cfg=foo=bar` configuration values +//! have to be passed into `cxxbridge-cmd` invocation. + +// TODO(https://crbug.com/435437947): This should also cover additional configuration conditions: +// +// * Ones without `=` like `unix` +// * Ones associated with crate features (maybe; we don't provide `cxx` +// integration for `cargo_crate` targets...) +// * Ones associated with plain-vanilla `--cfg=...` set via `rustflags` of +// `rust_static_library` or of `config`. + +#[cxx::bridge(namespace = "rust_test")] +mod ffi { + extern "Rust" { + // TODO(https://crbug.com/435437947): Also handle + test the spelling of + // `#[cfg(unix)]`. This requires knowing somehow (?) that `unix=false` + // for Windows target triples :-/ + #[cfg(target_family = "unix")] + fn double_unix_value(x: u32) -> u32; + + #[cfg(not(target_family = "unix"))] + fn double_non_unix_value(x: u32) -> u32; + } +} + +#[cfg(target_family = "unix")] +fn double_unix_value(x: u32) -> u32 { + x * 2 +} + +#[cfg(not(target_family = "unix"))] +fn double_non_unix_value(x: u32) -> u32 { + x + x +}
diff --git a/build/rust/tests/test_cxx_cfg/cxx_cfg_unittests.cc b/build/rust/tests/test_cxx_cfg/cxx_cfg_unittests.cc new file mode 100644 index 0000000..52e5839 --- /dev/null +++ b/build/rust/tests/test_cxx_cfg/cxx_cfg_unittests.cc
@@ -0,0 +1,27 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <stdint.h> + +#include "build/build_config.h" +#include "build/rust/tests/test_cxx_cfg/cxx_cfg_lib.rs.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace { + +TEST(RustCxxCfgTest, MainTest) { +// `#[cfg(target_family = "unix")]` covers Fuchsia, but +// `BUILD_FLAG(IS_POSIX)` does not cover Fuchsia. +// +// So we need to `||` two conditions together to get an equivalent of Rust-side +// `#[cfg(target_family = "unix")]` from `cxx_cfg_lib.rs`. +#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) + uint32_t actual = rust_test::double_unix_value(123); +#else + uint32_t actual = rust_test::double_non_unix_value(123); +#endif + EXPECT_EQ(actual, 123u * 2u); +} + +} // namespace
diff --git a/buildtools/deps_revisions.gni b/buildtools/deps_revisions.gni index caf7951..fe1a656 100644 --- a/buildtools/deps_revisions.gni +++ b/buildtools/deps_revisions.gni
@@ -5,5 +5,5 @@ declare_args() { # Used to cause full rebuilds on libc++ rolls. This should be kept in sync # with the libcxx_revision var in //DEPS. - libcxx_revision = "1ce2525ae355a30a61bacd896916c3416d1827b1" + libcxx_revision = "adbb4a5210ae2a8a4e27fa6199221156c02a9b1a" }
diff --git a/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/PasswordGenerationIntegrationTest.java b/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/PasswordGenerationIntegrationTest.java index 31ecec7..319d4d32 100644 --- a/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/PasswordGenerationIntegrationTest.java +++ b/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/PasswordGenerationIntegrationTest.java
@@ -206,7 +206,7 @@ assertPasswordText(PASSWORD_NODE_ID, generatedPassword); clickNode(SUBMIT_NODE_ID); ChromeTabUtils.waitForTabPageLoaded( - mActivityTestRule.getActivity().getActivityTab(), mTestServer.getURL(DONE_URL)); + mActivityTestRule.getActivityTab(), mTestServer.getURL(DONE_URL)); waitForMessageShown(); CriteriaHelper.pollUiThread( () -> { @@ -239,7 +239,7 @@ assertPasswordText(PASSWORD_NODE_ID_MANUAL, generatedPassword); clickNode(SUBMIT_NODE_ID_MANUAL); ChromeTabUtils.waitForTabPageLoaded( - mActivityTestRule.getActivity().getActivityTab(), mTestServer.getURL(DONE_URL)); + mActivityTestRule.getActivityTab(), mTestServer.getURL(DONE_URL)); waitForMessageShown(); CriteriaHelper.pollUiThread( () -> { @@ -340,7 +340,7 @@ ThreadUtils.runOnUiThreadBlocking( () -> { Assert.assertFalse( - InfoBarContainer.from(mActivityTestRule.getActivity().getActivityTab()) + InfoBarContainer.from(mActivityTestRule.getActivityTab()) .hasInfoBars()); }); }
diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/SelectableTabListEditorTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/SelectableTabListEditorTest.java index fc8800e3..9f4d9dc 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/SelectableTabListEditorTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/SelectableTabListEditorTest.java
@@ -1919,14 +1919,16 @@ /** Retrieves all tabs from the current tab model */ private List<Tab> getTabsInCurrentTabModel() { - List<Tab> tabs = new ArrayList<>(); + return ThreadUtils.runOnUiThreadBlocking( + () -> { + List<Tab> tabs = new ArrayList<>(); - TabModel currentTabModel = mTabModelSelector.getCurrentModel(); - for (int i = 0; i < currentTabModel.getCount(); i++) { - tabs.add(currentTabModel.getTabAt(i)); - } - - return tabs; + TabModel currentTabModel = mTabModelSelector.getCurrentModel(); + for (int i = 0; i < currentTabModel.getCount(); i++) { + tabs.add(currentTabModel.getTabAt(i)); + } + return tabs; + }); } /** @@ -1934,15 +1936,20 @@ * tab model */ private List<Tab> getTabsInCurrentTabGroupModelFilter() { - List<Tab> tabs = new ArrayList<>(); + return ThreadUtils.runOnUiThreadBlocking( + () -> { + List<Tab> tabs = new ArrayList<>(); - TabGroupModelFilter filter = - mTabModelSelector.getTabGroupModelFilterProvider().getCurrentTabGroupModelFilter(); - for (int i = 0; i < filter.getIndividualTabAndGroupCount(); i++) { - tabs.add(filter.getRepresentativeTabAt(i)); - } + TabGroupModelFilter filter = + mTabModelSelector + .getTabGroupModelFilterProvider() + .getCurrentTabGroupModelFilter(); + for (int i = 0; i < filter.getIndividualTabAndGroupCount(); i++) { + tabs.add(filter.getRepresentativeTabAt(i)); + } - return tabs; + return tabs; + }); } private void showSelectionEditor(List<Tab> tabs, @Nullable List<TabListEditorAction> actions) {
diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogTest.java index db3624a..29a9dff 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogTest.java
@@ -297,7 +297,10 @@ if (cta.getLayoutManager().isLayoutVisible(LayoutType.TAB_SWITCHER) && !cta.getLayoutManager().isLayoutStartingToHide(LayoutType.TAB_SWITCHER)) { - if (cta.getTabModelSelectorSupplier().get().getTotalTabCount() == 0) { + int tabCount = + ThreadUtils.runOnUiThreadBlocking( + () -> cta.getTabModelSelectorSupplier().get().getTotalTabCount()); + if (tabCount == 0) { addBlankTabs(cta, false, 1); LayoutTestUtils.waitForLayout(cta.getLayoutManager(), LayoutType.BROWSING); } else {
diff --git a/chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/FeedV2NewTabPageTest.java b/chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/FeedV2NewTabPageTest.java index 1510588c2..d54ff42 100644 --- a/chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/FeedV2NewTabPageTest.java +++ b/chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/FeedV2NewTabPageTest.java
@@ -223,7 +223,7 @@ private void openNewTabPage() { mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - mTab = mActivityTestRule.getActivity().getActivityTab(); + mTab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(mTab); Assert.assertTrue(mTab.getNativePage() instanceof NewTabPage); @@ -259,7 +259,7 @@ @MediumTest @Feature({"FeedNewTabPage"}) @CommandLineFlags.Add({ - "enable-features=BackForwardTransitions:min-required-physical-ram-mb/0", + "enable-features=BackForwardTransitions", "force-prefers-no-reduced-motion", // Resampling can make scroll offsets non-deterministic so turn it off. "disable-features=ResamplingScrollEvents",
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillCardBenefitsFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillCardBenefitsFragment.java index 5f6518e..6ef2128 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillCardBenefitsFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillCardBenefitsFragment.java
@@ -82,6 +82,9 @@ // Create blank preference screen. PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getStyledContext()); + // Suppresses unwanted animations while Preferences are removed from and re-added to the + // screen. + screen.setShouldUseGeneratedIds(false); setPreferenceScreen(screen); if (sObserverForTest != null) { sObserverForTest.onResult(this);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java index c0f05c06..238d51a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java
@@ -53,9 +53,6 @@ import org.chromium.chrome.browser.tab.TabSelectionType; import org.chromium.chrome.browser.tab.TabUtils; import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarButtonVariant; -import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar; -import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; -import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManagerProvider; import org.chromium.components.dom_distiller.core.DistilledPagePrefs; import org.chromium.components.dom_distiller.core.DomDistillerFeatures; import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils; @@ -668,8 +665,7 @@ } /** Navigate the current tab to a Reader Mode URL. */ - @VisibleForTesting - void navigateToReaderMode() { + private void navigateToReaderMode() { WebContents webContents = mTab.getWebContents(); if (webContents == null) return; @@ -691,33 +687,7 @@ browserControlsVisibilityManager.getBrowserVisibilityDelegate().showControlsTransient(); } - DomDistillerTabUtils.distillCurrentPageAndViewIfSuccessful( - webContents, - (success) -> { - // If successful, or any of the dependencies needed to show a bottom sheet - // aren't available then return early. - if (success || mTab == null || mTab.getWindowAndroid() == null) { - return; - } - SnackbarManager snackbarManager = - SnackbarManagerProvider.from(mTab.getWindowAndroid()); - if (snackbarManager == null) { - return; - } - - snackbarManager.showSnackbar( - Snackbar.make( - mTab.getContext() - .getString( - R.string - .reader_mode_unavailable_snackbar_message), - new SnackbarManager.SnackbarController() {}, - Snackbar.TYPE_NOTIFICATION, - Snackbar.UMA_UNKNOWN) - .setAction( - mTab.getContext().getString(R.string.chrome_dismiss), - null)); - }); + DomDistillerTabUtils.distillCurrentPageAndView(webContents); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManagerImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManagerImpl.java index 7163bd69..fa4fd37 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManagerImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManagerImpl.java
@@ -343,7 +343,7 @@ * * @param intent Intent that contains the download action. */ - private DownloadSharedPreferenceEntry getDownloadEntryFromIntent(Intent intent) { + private @Nullable DownloadSharedPreferenceEntry getDownloadEntryFromIntent(Intent intent) { return mDownloadSharedPreferenceHelper.getDownloadSharedPreferenceEntry( getContentIdFromIntent(intent)); } @@ -386,7 +386,10 @@ * @param contentId Content ID of the download. */ private void openDownload( - Context context, Intent intent, OtrProfileId otrProfileId, ContentId contentId) { + Context context, + Intent intent, + @Nullable OtrProfileId otrProfileId, + ContentId contentId) { String downloadFilePath = IntentUtils.safeGetStringExtra( intent, DownloadNotificationService.EXTRA_DOWNLOAD_FILE_PATH);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java index 7a7f68de..e02e553 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
@@ -874,7 +874,7 @@ */ // Deprecated after new download backend. @Override - public void cancelDownload(ContentId id, OtrProfileId otrProfileId) { + public void cancelDownload(ContentId id, @Nullable OtrProfileId otrProfileId) { DownloadManagerServiceJni.get() .cancelDownload( getNativeDownloadManagerService(), @@ -900,7 +900,7 @@ */ // Deprecated after new download backend. @Override - public void pauseDownload(ContentId id, OtrProfileId otrProfileId) { + public void pauseDownload(ContentId id, @Nullable OtrProfileId otrProfileId) { DownloadManagerServiceJni.get() .pauseDownload( getNativeDownloadManagerService(), @@ -952,7 +952,7 @@ * @param mimeType MIME type of the file. * @return Whether the download is openable by the browser. */ - public boolean isDownloadOpenableInBrowser(String mimeType) { + public boolean isDownloadOpenableInBrowser(@Nullable String mimeType) { // TODO(qinmin): for audio and video, check if the codec is supported by Chrome. return isSupportedMimeType(mimeType); } @@ -1323,7 +1323,7 @@ DownloadInfo downloadInfo = downloadItem.getDownloadInfo(); boolean canOpen = DownloadUtils.openFile( - downloadInfo.getFilePath(), + assertNonNull(downloadInfo.getFilePath()), downloadInfo.getMimeType(), downloadInfo.getDownloadGuid(), downloadInfo.getOtrProfileId(),
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadMetrics.java index 883cf81..847950d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadMetrics.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadMetrics.java
@@ -42,7 +42,8 @@ * @param source The source where the user opened the download media file. * @param mimeType The mime type of the download. */ - public static void recordDownloadOpen(@DownloadOpenSource int source, String mimeType) { + public static void recordDownloadOpen( + @DownloadOpenSource int source, @Nullable String mimeType) { @DownloadFilter.Type int type = DownloadFilter.fromMimeType(mimeType); if (type == DownloadFilter.Type.VIDEO) { RecordHistogram.recordEnumeratedHistogram(
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadServiceDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadServiceDelegate.java index e31e211..b2e981e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadServiceDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadServiceDelegate.java
@@ -4,10 +4,13 @@ package org.chromium.chrome.browser.download; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.browser.profiles.OtrProfileId; import org.chromium.components.offline_items_collection.ContentId; /** Interface for classes implementing concrete implementation of UI behavior. */ +@NullMarked public interface DownloadServiceDelegate { /** * Called to cancel a download. @@ -15,7 +18,7 @@ * @param id The {@link ContentId} of the download to cancel. * @param otrProfileId The {@link OtrProfileId} of the download. Null if in regular mode. */ - void cancelDownload(ContentId id, OtrProfileId otrProfileId); + void cancelDownload(ContentId id, @Nullable OtrProfileId otrProfileId); /** * Called to pause a download. @@ -23,7 +26,7 @@ * @param id The {@link ContentId} of the download to pause. * @param otrProfileId The {@link OtrProfileId} of the download. Null if in regular mode. */ - void pauseDownload(ContentId id, OtrProfileId otrProfileId); + void pauseDownload(ContentId id, @Nullable OtrProfileId otrProfileId); /** * Called to resume a paused download.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java index e441cc2..618b2d6a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceEntry.java
@@ -9,6 +9,8 @@ import androidx.annotation.VisibleForTesting; import org.chromium.base.Log; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.browser.profiles.OtrProfileId; import org.chromium.components.offline_items_collection.ContentId; import org.chromium.components.offline_items_collection.LegacyHelpers; @@ -19,6 +21,7 @@ * Class representing the download information stored in SharedPreferences to construct a * download notification. */ +@NullMarked public class DownloadSharedPreferenceEntry { private static final String TAG = "DownloadEntry"; private static final String NO_OTR_PROFILE_ID = ""; @@ -28,7 +31,7 @@ @VisibleForTesting static final int VERSION = 7; public final int notificationId; - public final OtrProfileId otrProfileId; // The OtrProfileId of download. + public final @Nullable OtrProfileId otrProfileId; // The OtrProfileId of download. public final boolean canDownloadWhileMetered; public final String fileName; // This can only be false for paused downloads. For downloads that are pending or in progress, @@ -43,7 +46,7 @@ DownloadSharedPreferenceEntry( ContentId id, int notificationId, - OtrProfileId otrProfileId, + @Nullable OtrProfileId otrProfileId, boolean canDownloadWhileMetered, String fileName, boolean isAutoResumable,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceHelper.java index d55bcc5c..8a26abb 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceHelper.java
@@ -6,6 +6,8 @@ import org.chromium.base.ObserverList; import org.chromium.base.shared_preferences.SharedPreferencesManager; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.components.offline_items_collection.ContentId; @@ -17,6 +19,7 @@ import java.util.Set; /** Class for maintaining all entries of DownloadSharedPreferenceEntry. */ +@NullMarked public class DownloadSharedPreferenceHelper { /** Observes modifications to the SharedPreferences for {@link DownloadItem}s. */ public interface Observer { @@ -144,7 +147,8 @@ * @param id The {@link ContentId} to query for. * @return a DownloadSharedPreferenceEntry that has the specified {@link ContentId}. */ - public DownloadSharedPreferenceEntry getDownloadSharedPreferenceEntry(ContentId id) { + public @Nullable DownloadSharedPreferenceEntry getDownloadSharedPreferenceEntry( + @Nullable ContentId id) { for (int i = 0; i < mDownloadSharedPreferenceEntries.size(); ++i) { if (mDownloadSharedPreferenceEntries.get(i).id.equals(id)) { return mDownloadSharedPreferenceEntries.get(i);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSnackbarController.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSnackbarController.java index 9caeba6e..6fdd71a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSnackbarController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSnackbarController.java
@@ -8,24 +8,27 @@ import org.chromium.base.ApplicationStatus; import org.chromium.base.ContextUtils; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.R; import org.chromium.chrome.browser.profiles.OtrProfileId; import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; /** Class for displaying a snackbar when a download completes. */ +@NullMarked public class DownloadSnackbarController implements SnackbarManager.SnackbarController { public static final int INVALID_NOTIFICATION_ID = -1; private static final int SNACKBAR_DURATION_MS = 7000; @Override - public void onAction(Object actionData) { + public void onAction(@Nullable Object actionData) { DownloadManagerService.openDownloadsPage( /* otrProfileId= */ null, DownloadOpenSource.SNACK_BAR); } @Override - public void onDismissNoAction(Object actionData) {} + public void onDismissNoAction(@Nullable Object actionData) {} /** * Called to display the download failed snackbar. @@ -36,7 +39,7 @@ * @param otrProfileId The {@link OtrProfileId} of the download. Null if in regular mode. */ public void onDownloadFailed( - String errorMessage, boolean showAllDownloads, OtrProfileId otrProfileId) { + String errorMessage, boolean showAllDownloads, @Nullable OtrProfileId otrProfileId) { if (isShowingDownloadInfoBar(otrProfileId)) return; if (getSnackbarManager() == null) return; // TODO(qinmin): Coalesce snackbars if multiple downloads finish at the same time. @@ -75,7 +78,7 @@ getSnackbarManager().showSnackbar(snackbar); } - private Activity getActivity() { + private @Nullable Activity getActivity() { if (ApplicationStatus.hasVisibleActivities()) { return ApplicationStatus.getLastTrackedFocusedActivity(); } else { @@ -83,7 +86,7 @@ } } - public SnackbarManager getSnackbarManager() { + public @Nullable SnackbarManager getSnackbarManager() { Activity activity = getActivity(); if (activity != null && activity instanceof SnackbarManager.SnackbarManageable) { return ((SnackbarManager.SnackbarManageable) activity).getSnackbarManager(); @@ -91,7 +94,7 @@ return null; } - private boolean isShowingDownloadInfoBar(OtrProfileId otrProfileId) { + private boolean isShowingDownloadInfoBar(@Nullable OtrProfileId otrProfileId) { DownloadMessageUiController messageUiController = DownloadManagerService.getDownloadManagerService() .getMessageUiController(otrProfileId);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUserInitiatedTaskManager.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUserInitiatedTaskManager.java index 3ced64d..8b42385 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUserInitiatedTaskManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUserInitiatedTaskManager.java
@@ -13,6 +13,7 @@ import org.chromium.base.Log; import org.chromium.base.metrics.RecordHistogram; +import org.chromium.build.annotations.NullMarked; import org.chromium.components.background_task_scheduler.BackgroundTask.TaskFinishedCallback; import java.util.HashMap; @@ -24,6 +25,7 @@ * attaching the notification to the job life cycle. Starting and stopping of jobs is * handled in AutoResumptionHandler in native. Only active for Android versions >= U. */ +@NullMarked public class DownloadUserInitiatedTaskManager extends DownloadContinuityManager { private static final String TAG = "DownloadUitm";
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java index ed95fa9..924b3d01 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java
@@ -4,6 +4,9 @@ package org.chromium.chrome.browser.download; +import static org.chromium.build.NullUtil.assertNonNull; +import static org.chromium.build.NullUtil.assumeNonNull; + import android.app.Activity; import android.app.DownloadManager; import android.content.ActivityNotFoundException; @@ -21,7 +24,6 @@ import android.text.style.StyleSpan; import androidx.annotation.MainThread; -import androidx.annotation.Nullable; import org.jni_zero.CalledByNative; import org.jni_zero.JniType; @@ -34,6 +36,8 @@ import org.chromium.base.FileUtils; import org.chromium.base.IntentUtils; import org.chromium.base.Log; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeTabbedActivity; import org.chromium.chrome.browser.IntentHandler; @@ -55,6 +59,7 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabLaunchType; import org.chromium.chrome.browser.tabmodel.document.ChromeAsyncTabLauncher; +import org.chromium.chrome.browser.ui.native_page.NativePage; import org.chromium.chrome.browser.util.ChromeAccessibilityUtil; import org.chromium.components.background_task_scheduler.TaskIds; import org.chromium.components.download.DownloadState; @@ -78,6 +83,7 @@ import java.io.File; /** A class containing some utility static methods. */ +@NullMarked public class DownloadUtils { private static final String TAG = "download"; @@ -85,7 +91,7 @@ "org.chromium.chrome.browser.download.OTR_PROFILE_ID"; private static final String MIME_TYPE_ZIP = "application/zip"; private static final String DOCUMENTS_UI_PACKAGE_NAME = "com.android.documentsui"; - private static Boolean sIsDownloadRestrictedByPolicyForTesting; + private static @Nullable Boolean sIsDownloadRestrictedByPolicyForTesting; /** * Displays the download manager UI. Note the UI is different on tablets and on phones. @@ -145,7 +151,7 @@ // If the profile is off-the-record and it does not exist, then do not start the activity. if (OtrProfileId.isOffTheRecord(otrProfileId) && !ProfileManager.getLastUsedRegularProfile() - .hasOffTheRecordProfile(otrProfileId)) { + .hasOffTheRecordProfile(assertNonNull(otrProfileId))) { return false; } @@ -153,11 +159,14 @@ // Download Home shows up as a tab on tablets. LoadUrlParams params = new LoadUrlParams(UrlConstants.DOWNLOADS_URL); if ((ChromeFeatureList.sAndroidNativePagesInNewTab.isEnabled() - && ChromeFeatureList.sAndroidNativePagesInNewTabDownloadsEnabled.getValue()) - || tab == null || !tab.isInitialized()) { + && ChromeFeatureList.sAndroidNativePagesInNewTabDownloadsEnabled + .getValue()) + || tab == null + || !tab.isInitialized()) { // Open a new tab, which pops Chrome into the foreground. - ChromeAsyncTabLauncher delegate = new ChromeAsyncTabLauncher( - /* incognito= */ OtrProfileId.isOffTheRecord(otrProfileId)); + ChromeAsyncTabLauncher delegate = + new ChromeAsyncTabLauncher( + /* incognito= */ OtrProfileId.isOffTheRecord(otrProfileId)); delegate.launchNewTab(params, TabLaunchType.FROM_CHROME_UI, /* parent= */ tab); } else { // Download Home shows up inside an existing tab, but only if the last Activity was @@ -197,8 +206,8 @@ * @param intent An {@link Intent} instance. * @return The {@link OtrProfileId} that is attached to the given intent. */ - public static OtrProfileId getOtrProfileIdFromIntent(Intent intent) { - String serializedId = IntentUtils.safeGetString(intent.getExtras(), EXTRA_OTR_PROFILE_ID); + public static @Nullable OtrProfileId getOtrProfileIdFromIntent(Intent intent) { + String serializedId = IntentUtils.safeGetStringExtra(intent, EXTRA_OTR_PROFILE_ID); return OtrProfileId.deserialize(serializedId); } @@ -212,7 +221,7 @@ return false; } - String serializedId = IntentUtils.safeGetString(intent.getExtras(), EXTRA_OTR_PROFILE_ID); + String serializedId = IntentUtils.safeGetStringExtra(intent, EXTRA_OTR_PROFILE_ID); OtrProfileId otrProfileId = OtrProfileId.deserializeWithoutVerify(serializedId); return otrProfileId == null @@ -267,7 +276,8 @@ */ public static void downloadOfflinePage(Context context, Tab tab, boolean fromAppMenu) { Tracker tracker = TrackerFactory.getTrackerForProfile(tab.getProfile()); - if (tab.isNativePage() && tab.getNativePage().isPdf()) { + NativePage nativePage = tab.getNativePage(); + if (nativePage != null && nativePage.isPdf()) { DownloadController.downloadUrl(tab.getUrl().getSpec(), tab); if (fromAppMenu) { tracker.notifyEvent(EventConstants.APP_MENU_PDF_PAGE_DOWNLOADED); @@ -280,6 +290,7 @@ // The download needs to be scheduled to happen at later time due to current network // error. This is not available in incognito mode. final OfflinePageBridge bridge = OfflinePageBridge.getForProfile(tab.getProfile()); + assumeNonNull(bridge); bridge.scheduleDownload( tab.getWebContents(), OfflinePageBridge.ASYNC_NAMESPACE, @@ -389,13 +400,13 @@ new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS) .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); } else if (source == DownloadOpenSource.DOWNLOAD_PROGRESS_MESSAGE - && offlineItem.mimeType.equals(MimeTypeUtils.PDF_MIME_TYPE) + && MimeTypeUtils.PDF_MIME_TYPE.equals(offlineItem.mimeType) && PdfUtils.shouldOpenPdfInline(OtrProfileId.isOffTheRecord(otrProfileId))) { if (!openFileWithExternalApps( - offlineItem.filePath, + assertNonNull(offlineItem.filePath), offlineItem.mimeType, - offlineItem.originalUrl.getSpec(), - offlineItem.referrerUrl.getSpec(), + assumeNonNull(offlineItem.originalUrl).getSpec(), + assumeNonNull(offlineItem.referrerUrl).getSpec(), context == null ? ContextUtils.getApplicationContext() : context, OpenWithExternalAppsSource.DOWNLOAD_PROGRESS_MESSAGE)) { DownloadUtils.showDownloadManager(null, null, otrProfileId, source); @@ -403,7 +414,8 @@ } else { OpenParams openParams = new OpenParams(LaunchLocation.PROGRESS_BAR); openParams.openInIncognito = OtrProfileId.isOffTheRecord(otrProfileId); - OfflineContentAggregatorFactory.get().openItem(openParams, offlineItem.id); + OfflineContentAggregatorFactory.get() + .openItem(openParams, assertNonNull(offlineItem.id)); } } @@ -421,9 +433,9 @@ */ public static boolean openFile( String filePath, - String mimeType, - String downloadGuid, - OtrProfileId otrProfileId, + @Nullable String mimeType, + @Nullable String downloadGuid, + @Nullable OtrProfileId otrProfileId, String originalUrl, String referrer, @DownloadOpenSource int source, @@ -542,7 +554,9 @@ if (PdfUtils.shouldOpenPdfInline(isIncognito) && newMimeType.equals(MimeTypeUtils.PDF_MIME_TYPE)) { String fileUri = getUriForItem(filePath).toString(); - LoadUrlParams params = new LoadUrlParams(PdfUtils.encodePdfPageUrl(fileUri)); + String encodedPdfUrl = PdfUtils.encodePdfPageUrl(fileUri); + assertNonNull(encodedPdfUrl); + LoadUrlParams params = new LoadUrlParams(encodedPdfUrl); ChromeAsyncTabLauncher delegate = new ChromeAsyncTabLauncher(isIncognito); delegate.launchNewTab(params, TabLaunchType.FROM_CHROME_UI, /* parent= */ null); return; @@ -583,7 +597,7 @@ "Activity not found for " + intent.getType() + " over " - + intent.getData().getScheme(), + + assumeNonNull(intent.getData()).getScheme(), ex); } catch (SecurityException ex) { Log.d(TAG, "cannot open intent: " + intent, ex); @@ -780,7 +794,7 @@ public static boolean openFileWithExternalApps( String filePath, - String mimeType, + @Nullable String mimeType, String originalUrl, String referrer, Context context,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java index 9dc597e..26b0cdb 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
@@ -71,6 +71,7 @@ import org.chromium.chrome.browser.magic_stack.ModuleDelegateHost; import org.chromium.chrome.browser.magic_stack.ModuleRegistry; import org.chromium.chrome.browser.metrics.StartupMetricsTracker; +import org.chromium.chrome.browser.ntp_customization.NtpCustomizationConfigManager; import org.chromium.chrome.browser.ntp_customization.NtpCustomizationCoordinator; import org.chromium.chrome.browser.ntp_customization.NtpCustomizationUtils; import org.chromium.chrome.browser.ntp_customization.edge_to_edge.TopInsetCoordinator; @@ -791,9 +792,7 @@ } private void initTopInsetCoordinatorObserver() { - mTopInsetChangeObserver = - (systemTopInset, consumeTopInset) -> - mNewTabPageLayout.onTopInsetChange(systemTopInset); + mTopInsetChangeObserver = this::onToEdgeChange; if (mTopInsetCoordinatorSupplier.hasValue()) { mTopInsetCoordinatorSupplier.get().addObserver(mTopInsetChangeObserver); return; @@ -811,6 +810,20 @@ } /** + * Called when the layout changes between edge-to-edge and standard. + * + * @param systemTopInset The system's top inset, i.e., the height of the Status bar. While + * usually greater than zero, it can be zero in split-screen mode. + * @param consumeTopInset Whether the parent layout will consume the top inset. + */ + void onToEdgeChange(int systemTopInset, boolean consumeTopInset) { + // When consumeTopInset is false, it is possible: 1) the next Tab isn't NTP and 2) the next + // Tab is NTP while NTP should show regular toolbar. NewTabPageLayout should only be + // adjusted based on supportsEdgeToEdgeOnTop(), not the parent view's decision. + mNewTabPageLayout.onToEdgeChange(systemTopInset, supportsEdgeToEdgeOnTop()); + } + + /** * @param isTablet Whether the activity is running in tablet mode. * @param searchProviderHasLogo Whether the default search engine has logo. * @return Whether the NTP is in single url bar mode, i.e. the url bar is shown in-line on the @@ -1152,8 +1165,11 @@ @Override public boolean supportsEdgeToEdgeOnTop() { - // TODO(https://crbug.com/432527690): Implement here. - return false; + return mCanSupportEdgeToEdgeForCustomizedTheme + && !mIsTablet + && isInSingleUrlBarMode() + && NtpCustomizationConfigManager.getInstance().getBackgroundImageType() + != NtpCustomizationUtils.NtpBackgroundImageType.DEFAULT; } @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java index be3cfb8..837a319 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
@@ -51,6 +51,7 @@ import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; import org.chromium.chrome.browser.ntp.NewTabPage.OnSearchBoxScrollListener; import org.chromium.chrome.browser.ntp.search.SearchBoxCoordinator; +import org.chromium.chrome.browser.ntp_customization.NtpCustomizationUtils; import org.chromium.chrome.browser.omnibox.SearchEngineUtils; import org.chromium.chrome.browser.omnibox.status.StatusProperties; import org.chromium.chrome.browser.profiles.Profile; @@ -170,6 +171,7 @@ private final int mFakeSearchBoxStartPadding; private final int mFakeSearchBoxStartPaddingWithDseLogo; private int mCurrentNtpFakeSearchBoxTransitionStartOffset; + private int mTopInset; /** Constructor for inflating from XML. */ public NewTabPageLayout(Context context, AttributeSet attrs) { @@ -944,19 +946,25 @@ } } - private void setSearchProviderTopMargin() { - boolean showFakeSearchBoxWithoutLogo = - !mSearchProviderHasLogo && mIsOmniboxMobileParityUpdateV2Enabled; + /** Returns the fake search box's transition start offset on NTP. */ + private int getNtpSearchBoxTransitionStartOffset(boolean showFakeSearchBoxWithoutLogo) { if (mIsTablet && showFakeSearchBoxWithoutLogo) { // On tablets, it is possible to show fake search box if DSE doesn't have logo if DSE // mobile parity v2 is enabled. The mNTPFakeSearchBoxTransitionStartOffset is used to // calculate scrolling percentage in getToolbarTransitionPercentage(). Reset to 0 when // no doodle is shown for 3p DSE to prevent the alpha of fake search box being set to 0 // (transparent) by ToolbarTablet#updateNtp(). - mCurrentNtpFakeSearchBoxTransitionStartOffset = 0; + return 0; } else { - mCurrentNtpFakeSearchBoxTransitionStartOffset = mNtpSearchBoxTransitionStartOffset; + return mNtpSearchBoxTransitionStartOffset; } + } + + private void setSearchProviderTopMargin() { + boolean showFakeSearchBoxWithoutLogo = + !mSearchProviderHasLogo && mIsOmniboxMobileParityUpdateV2Enabled; + mCurrentNtpFakeSearchBoxTransitionStartOffset = + getNtpSearchBoxTransitionStartOffset(showFakeSearchBoxWithoutLogo); MarginLayoutParams params = (MarginLayoutParams) mFakeSearchBoxLayout.getLayoutParams(); params.topMargin = showFakeSearchBoxWithoutLogo ? mNtpSearchBoxTopMarginWithoutLogo : 0; @@ -1288,8 +1296,34 @@ mFakeSearchBoxEditText.setHint(newHint); } - void onTopInsetChange(int topInsect) { - // TODO(https://crbug.com/432527690): Implement here. + /** + * Called when the layout changes between edge-to-edge and standard. + * + * @param systemTopInset The system's top inset, i.e., the height of the Status bar. It is + * always bigger than 0. + * @param supportsEdgeToEdgeOnTop Determines if the NTP should consume this top inset, extending + * itself to the Status bar area. + */ + void onToEdgeChange(int systemTopInset, boolean supportsEdgeToEdgeOnTop) { + // Exits early if the NTP's top padding doesn't require adjustment. + if (NtpCustomizationUtils.shouldSkipTopInsetsChange( + mTopInset, systemTopInset, supportsEdgeToEdgeOnTop)) { + return; + } + + mTopInset = supportsEdgeToEdgeOnTop ? systemTopInset : 0; + mCurrentNtpFakeSearchBoxTransitionStartOffset = + getNtpSearchBoxTransitionStartOffset( + !mSearchProviderHasLogo && mIsOmniboxMobileParityUpdateV2Enabled) + + mTopInset; + + // Top padding is applied to the NTP layout, ensuring all UI components remain in their + // original positions after Status bar is hidden. + setPaddingRelative( + getPaddingStart(), + getResources().getDimensionPixelSize(R.dimen.toolbar_height_no_shadow) + mTopInset, + getPaddingEnd(), + getPaddingBottom()); } private boolean isInSingleUrlMode() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java index 0f83208..7e823ca 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java
@@ -447,7 +447,7 @@ * @param webContents Contents of the page to check. * @return True if download button is being shown in the error page. */ - public boolean isShowingDownloadButtonInErrorPage(WebContents webContents) { + public boolean isShowingDownloadButtonInErrorPage(@Nullable WebContents webContents) { return org.chromium.chrome.browser.offlinepages.OfflinePageBridgeJni.get() .isShowingDownloadButtonInErrorPage(mNativeOfflinePageBridge, webContents); } @@ -484,7 +484,7 @@ * @param origin Origin of the page. */ public void scheduleDownload( - WebContents webContents, + @Nullable WebContents webContents, String nameSpace, String url, int uiAction, @@ -797,11 +797,11 @@ long nativeOfflinePageBridge, @Nullable WebContents webContents); boolean isShowingDownloadButtonInErrorPage( - long nativeOfflinePageBridge, WebContents webContents); + long nativeOfflinePageBridge, @Nullable WebContents webContents); void scheduleDownload( long nativeOfflinePageBridge, - WebContents webContents, + @Nullable WebContents webContents, @JniType("std::string") String nameSpace, @JniType("std::string") String url, int uiAction,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncErrorNotifier.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncErrorNotifier.java index 30231375..cfc2fa0 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncErrorNotifier.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/SyncErrorNotifier.java
@@ -8,7 +8,6 @@ import android.content.Intent; import androidx.annotation.IntDef; -import androidx.annotation.Nullable; import androidx.annotation.StringRes; import androidx.annotation.VisibleForTesting; @@ -16,6 +15,8 @@ import org.chromium.base.Log; import org.chromium.base.Promise; import org.chromium.base.ThreadUtils; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.R; import org.chromium.chrome.browser.notifications.NotificationConstants; import org.chromium.chrome.browser.notifications.NotificationUmaTracker; @@ -40,6 +41,7 @@ * {@link SyncErrorNotifier} displays Android notifications regarding sync errors. * Errors can be fixed by clicking the notification. */ +@NullMarked public class SyncErrorNotifier implements SyncService.SyncStateChangedListener { @IntDef({ NotificationState.REQUIRE_PASSPHRASE, @@ -80,9 +82,11 @@ } private static SyncErrorNotifier buildForProfile(Profile profile) { + var syncService = SyncServiceFactory.getForProfile(profile); + assert syncService != null : "SyncService should be non-null."; return new SyncErrorNotifier( BaseNotificationManagerProxyFactory.create(), - SyncServiceFactory.getForProfile(profile), + syncService, TrustedVaultClient.get()); } @@ -126,8 +130,7 @@ case NotificationState.REQUIRE_PASSPHRASE: { mSyncService.markPassphrasePromptMutedForCurrentProductVersion(); - showNotification( - createPassphraseIntent()); + showNotification(createPassphraseIntent()); break; } case NotificationState.REQUIRE_TRUSTED_VAULT_KEY_FOR_PASSWORDS: @@ -151,10 +154,9 @@ // We still want to show the trusted vault notification but // couldn't produce the intent. Just reset the state. mNotificationState = previousState; - Log.w( - TAG, - "Error creating key retrieval intent: ", - exception); + var error = + exception == null ? "unknown error." : exception; + Log.w(TAG, "Error creating key retrieval intent: ", error); }); break; }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseActivity.java index 6084a81..03f23503 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseActivity.java
@@ -4,6 +4,8 @@ package org.chromium.chrome.browser.sync.ui; +import static org.chromium.build.NullUtil.assumeNonNull; + import android.accounts.Account; import android.app.Dialog; import android.app.ProgressDialog; @@ -13,6 +15,8 @@ import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeBaseAppCompatActivity; import org.chromium.chrome.browser.init.ChromeBrowserInitializer; @@ -25,24 +29,26 @@ import org.chromium.components.signin.identitymanager.ConsentLevel; import org.chromium.components.signin.identitymanager.IdentityManager; import org.chromium.components.sync.SyncService; +import org.chromium.components.sync.SyncService.SyncStateChangedListener; /** * This activity is used for requesting a sync passphrase from the user. Typically, this will be the * target of an Android notification. */ +@NullMarked public class PassphraseActivity extends ChromeBaseAppCompatActivity implements PassphraseDialogFragment.Delegate, FragmentManager.OnBackStackChangedListener { public static final String FRAGMENT_PASSPHRASE = "passphrase_fragment"; public static final String FRAGMENT_SPINNER = "spinner_fragment"; private Profile mProfile; - private IdentityManager mIdentityManager; + private @Nullable IdentityManager mIdentityManager; private SyncService mSyncService; - private SyncService.SyncStateChangedListener mSyncStateChangedListener; + private @Nullable SyncStateChangedListener mSyncStateChangedListener; @Override - protected void onCreate(Bundle savedInstanceState) { + protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); // The Chrome browser process must be started here because this Activity // may be started explicitly from Android notifications. @@ -51,14 +57,16 @@ ChromeBrowserInitializer.getInstance().handleSynchronousStartup(); mProfile = ProfileManager.getLastUsedRegularProfile(); mIdentityManager = IdentityServicesProvider.get().getIdentityManager(mProfile); - mSyncService = SyncServiceFactory.getForProfile(mProfile); - assert mSyncService != null; + var syncService = SyncServiceFactory.getForProfile(mProfile); + assert syncService != null; + mSyncService = syncService; getSupportFragmentManager().addOnBackStackChangedListener(this); } @Override protected void onResume() { super.onResume(); + assumeNonNull(mIdentityManager); Account account = CoreAccountInfo.getAndroidAccountFrom( mIdentityManager.getPrimaryAccountInfo(ConsentLevel.SIGNIN)); @@ -141,7 +149,7 @@ @Override public void onPassphraseCanceled() { // Re add the notification. - SyncErrorNotifier.getForProfile(mProfile).syncStateChanged(); + assumeNonNull(SyncErrorNotifier.getForProfile(mProfile)).syncStateChanged(); finish(); } @@ -160,7 +168,7 @@ /** Dialog shown while sync is loading. */ public static class SpinnerDialogFragment extends DialogFragment { @Override - public Dialog onCreateDialog(Bundle savedInstanceState) { + public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { ProgressDialog dialog = new ProgressDialog(getActivity()); dialog.setMessage(getResources().getString(R.string.sync_loading)); return dialog;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseCreationDialogFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseCreationDialogFragment.java index 82db463c..2a13d68 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseCreationDialogFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseCreationDialogFragment.java
@@ -4,6 +4,8 @@ package org.chromium.chrome.browser.sync.ui; +import static org.chromium.build.NullUtil.assumeNonNull; + import android.app.Dialog; import android.os.Bundle; import android.text.SpannableString; @@ -17,10 +19,12 @@ import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; -import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.DialogFragment; +import org.chromium.build.annotations.Initializer; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.R; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.settings.ProfileDependentSetting; @@ -30,23 +34,25 @@ import org.chromium.ui.text.SpanApplier.SpanInfo; /** Dialog to ask the user to enter a new custom passphrase. */ +@NullMarked public class PassphraseCreationDialogFragment extends DialogFragment implements ProfileDependentSetting { public interface Listener { void onPassphraseCreated(String passphrase); } - private Profile mProfile; + private @Nullable Profile mProfile; private EditText mEnterPassphrase; private EditText mConfirmPassphrase; @Override - public void setProfile(@NonNull Profile profile) { + public void setProfile(Profile profile) { mProfile = profile; } + @Initializer @Override - public Dialog onCreateDialog(Bundle savedInstanceState) { + public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { super.onCreateDialog(savedInstanceState); LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.sync_custom_passphrase, null); @@ -80,8 +86,9 @@ } private SpannableString getInstructionsText() { + assert mProfile != null : "Profile should be non-null."; boolean shouldReplaceSyncSettingsWithAccountSettings = - !SyncServiceFactory.getForProfile(mProfile).hasSyncConsent(); + !assumeNonNull(SyncServiceFactory.getForProfile(mProfile)).hasSyncConsent(); return SpanApplier.applySpans( getString( shouldReplaceSyncSettingsWithAccountSettings @@ -135,7 +142,7 @@ } // The passphrase is not empty and matches. - ((Listener) getTargetFragment()).onPassphraseCreated(passphrase); - getDialog().dismiss(); + assumeNonNull((Listener) getTargetFragment()).onPassphraseCreated(passphrase); + assumeNonNull(getDialog()).dismiss(); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java index 44b34f1..06a39eac 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java
@@ -4,6 +4,8 @@ package org.chromium.chrome.browser.sync.ui; +import static org.chromium.build.NullUtil.assumeNonNull; + import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; @@ -26,6 +28,9 @@ import androidx.fragment.app.DialogFragment; import androidx.fragment.app.Fragment; +import org.chromium.build.annotations.Initializer; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.R; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.ProfileManager; @@ -36,6 +41,7 @@ import org.chromium.ui.text.SpanApplier.SpanInfo; /** Dialog to ask to user to enter their sync passphrase. */ +@NullMarked public class PassphraseDialogFragment extends DialogFragment implements OnClickListener { private static final String TAG = "Sync_UI"; @@ -59,7 +65,7 @@ private Drawable mErrorBackground; /** Create a new instanceof of {@link PassphraseDialogFragment} and set its arguments. */ - public static PassphraseDialogFragment newInstance(Fragment target) { + public static PassphraseDialogFragment newInstance(@Nullable Fragment target) { PassphraseDialogFragment dialog = new PassphraseDialogFragment(); if (target != null) { dialog.setTargetFragment(target, -1); @@ -75,8 +81,9 @@ return profile == null ? ProfileManager.getLastUsedRegularProfile() : profile; } + @Initializer @Override - public Dialog onCreateDialog(Bundle savedInstanceState) { + public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { assert SyncServiceFactory.getForProfile(getProfile()) != null; LayoutInflater inflater = getActivity().getLayoutInflater(); @@ -109,7 +116,7 @@ // https://crbug.com/602943 was caused by modifying the Drawable from getBackground() // without taking a copy. mOriginalBackground = mPassphraseEditText.getBackground(); - mErrorBackground = mOriginalBackground.getConstantState().newDrawable(); + mErrorBackground = assumeNonNull(mOriginalBackground.getConstantState()).newDrawable(); mErrorBackground .mutate() .setColorFilter( @@ -165,9 +172,11 @@ } private SpannableString getPromptText() { - SyncService syncService = SyncServiceFactory.getForProfile(getProfile()); + SyncService syncService = assumeNonNull(SyncServiceFactory.getForProfile(getProfile())); String accountName = - getString(R.string.sync_account_info, syncService.getAccountInfo().getEmail()) + getString( + R.string.sync_account_info, + assumeNonNull(syncService.getAccountInfo()).getEmail()) + "\n\n"; return new SpannableString( accountName + getString(R.string.sync_enter_passphrase_body_with_email));
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragment.java index 3b289c0..14d855b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragment.java
@@ -4,6 +4,7 @@ package org.chromium.chrome.browser.sync.ui; +import static org.chromium.build.NullUtil.assumeNonNull; import static org.chromium.components.sync.Passphrase.isExplicitPassphraseType; import android.app.Dialog; @@ -18,6 +19,8 @@ import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.DialogFragment; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.R; import org.chromium.chrome.browser.sync.settings.SyncSettingsUtils; import org.chromium.components.sync.PassphraseType; @@ -26,6 +29,7 @@ import org.chromium.ui.widget.TextViewWithClickableSpans; /** Dialog to ask the user select what type of password to use for encryption. */ +@NullMarked public class PassphraseTypeDialogFragment extends DialogFragment implements DialogInterface.OnClickListener { public interface Listener { @@ -55,7 +59,7 @@ } @Override - public Dialog onCreateDialog(Bundle savedInstanceState) { + public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { final View dialog = getActivity().getLayoutInflater().inflate(R.layout.sync_passphrase_types, null); @@ -111,7 +115,7 @@ } private void onCustomPassphraseCheckboxClicked(View unused) { - ((Listener) getTargetFragment()).onChooseCustomPassphraseRequested(); + assumeNonNull((Listener) getTargetFragment()).onChooseCustomPassphraseRequested(); dismiss(); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncErrorMessage.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncErrorMessage.java index 69a6f73..2b41d46 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncErrorMessage.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncErrorMessage.java
@@ -5,6 +5,7 @@ package org.chromium.chrome.browser.sync.ui; import static org.chromium.base.ContextUtils.getApplicationContext; +import static org.chromium.build.NullUtil.assumeNonNull; import android.app.Activity; import android.content.Context; @@ -22,6 +23,8 @@ import org.chromium.base.UnownedUserDataHost; import org.chromium.base.UnownedUserDataKey; import org.chromium.base.metrics.RecordHistogram; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.R; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.profiles.Profile; @@ -56,6 +59,7 @@ * practice however, because the time limit imposed between 2 displays is global, only one instance * in the whole application will exist at a time. */ +@NullMarked public class SyncErrorMessage implements SyncService.SyncStateChangedListener, UnownedUserData { // Note: Not all SyncErrors have a corresponding SyncErrorMessage, see getError(). private final @SyncError int mError; @@ -65,7 +69,7 @@ private final SyncService mSyncService; private final MessageDispatcher mMessageDispatcher; private final PropertyModel mModel; - private static MessageDispatcher sMessageDispatcherForTesting; + private static @Nullable MessageDispatcher sMessageDispatcherForTesting; private static final UnownedUserDataKey<SyncErrorMessage> SYNC_ERROR_MESSAGE_KEY = new UnownedUserDataKey<>(SyncErrorMessage.class); @@ -110,9 +114,10 @@ // Show message next time when the previous message has disappeared. return; } + var activity = windowAndroid.getActivity().get(); + assert activity != null : "Activity should be non-null."; SYNC_ERROR_MESSAGE_KEY.attachToHost( - host, - new SyncErrorMessage(dispatcher, windowAndroid.getActivity().get(), profile)); + host, new SyncErrorMessage(dispatcher, activity, profile)); } } @@ -120,8 +125,10 @@ mError = getError(profile); mActivity = activity; mProfile = profile; - mIdentityManager = IdentityServicesProvider.get().getIdentityManager(mProfile); - mSyncService = SyncServiceFactory.getForProfile(mProfile); + var identityManager = IdentityServicesProvider.get().getIdentityManager(mProfile); + assert identityManager != null : "IdentityManager should be non-null."; + mIdentityManager = identityManager; + mSyncService = assumeNonNull(SyncServiceFactory.getForProfile(mProfile)); mSyncService.addSyncStateChangedListener(this); String errorMessage = getMessage(activity); @@ -393,11 +400,13 @@ TrustedVaultUserActionTriggerForUMA .NEW_TAB_PAGE_INFOBAR)); }, - (exception) -> - Log.w( - TAG, - "Error creating trusted vault key retrieval intent: ", - exception)); + (exception) -> { + var error = exception == null ? "unknown error." : exception; + Log.w( + TAG, + "Error creating trusted vault key retrieval intent: ", + error); + }); } private void openTrustedVaultRecoverabilityDegradedActivity() { @@ -417,11 +426,13 @@ intent, action); IntentUtils.safeStartActivity(getApplicationContext(), proxyIntent); }, - (exception) -> - Log.w( - TAG, - "Error creating trusted vault recoverability intent: ", - exception)); + (exception) -> { + var error = exception == null ? "unknown error." : exception; + Log.w( + TAG, + "Error creating trusted vault recoverability intent: ", + error); + }); } private void openSettings() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncTrustedVaultProxyActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncTrustedVaultProxyActivity.java index 929416bc..3186f7d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncTrustedVaultProxyActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncTrustedVaultProxyActivity.java
@@ -8,13 +8,12 @@ import android.content.Intent; import android.content.IntentSender; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - import org.chromium.base.ContextUtils; import org.chromium.base.Log; import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.supplier.OneshotSupplierImpl; +import org.chromium.build.annotations.NullMarked; +import org.chromium.build.annotations.Nullable; import org.chromium.chrome.browser.init.AsyncInitializationActivity; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.ProfileProvider; @@ -27,6 +26,7 @@ * this proxy activity is to detect when the proxied activity (key retrieval or degraded * recoverability fix UI) finishes and notify TrustedVaultClient about changes. */ +@NullMarked public class SyncTrustedVaultProxyActivity extends AsyncInitializationActivity { private static final String TAG = "SyncUI"; @@ -132,16 +132,15 @@ OneshotSupplierImpl<ProfileProvider> supplier = new OneshotSupplierImpl<>(); ProfileProvider profileProvider = new ProfileProvider() { - @NonNull + @Override public Profile getOriginalProfile() { throw new IllegalStateException( "Unexpected access of the original profile."); } - @Nullable @Override - public Profile getOffTheRecordProfile(boolean createIfNeeded) { + public @Nullable Profile getOffTheRecordProfile(boolean createIfNeeded) { throw new IllegalStateException( "Unexpected access of the incognito profile."); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegate.java index a09bdbe..19f9829 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegate.java
@@ -1058,6 +1058,8 @@ protected boolean shouldShowContentFilterHelpCenterMenuItem(@Nullable Tab currentTab) { return currentTab != null + && ChromeFeatureList.isEnabled( + ChromeFeatureList.PROPAGATE_DEVICE_CONTENT_FILTERS_TO_SUPERVISED_USER) && SupervisedUserServiceBridge.isSupervisedLocally(currentTab.getProfile()); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCollectionTabModelImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCollectionTabModelImpl.java index 932711bb..b21754f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCollectionTabModelImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCollectionTabModelImpl.java
@@ -57,6 +57,76 @@ @JNINamespace("tabs") public class TabCollectionTabModelImpl extends TabModelJniBridge implements TabGroupModelFilterInternal { + private static class UndoGroupTabData { + public final Tab tab; + public final int originalIndex; + public final boolean originalIsPinned; + public final @Nullable Token originalTabGroupId; + + UndoGroupTabData( + Tab tab, + int originalIndex, + boolean originalIsPinned, + @Nullable Token originalTabGroupId) { + this.tab = tab; + this.originalIndex = originalIndex; + this.originalIsPinned = originalIsPinned; + this.originalTabGroupId = originalTabGroupId; + } + } + + private static class UndoGroupMetadataImpl implements UndoGroupMetadata { + private final Token mDestinationGroupId; + private final boolean mIsIncognito; + + public final List<UndoGroupTabData> mergedTabsData = new ArrayList<>(); + public final int adoptedTabGroupOriginalIndex; + public final List<Token> removedTabGroupIds; + public final boolean didCreateNewGroup; + public final boolean adoptedTabGroupTitle; + public final boolean wasDestinationTabGroupCollapsed; + + UndoGroupMetadataImpl( + Token destinationGroupId, + boolean isIncognito, + @Nullable UndoGroupTabData destinationTabData, + int adoptedTabGroupOriginalIndex, + List<Token> removedTabGroupIds, + boolean didCreateNewGroup, + boolean adoptedTabGroupTitle, + boolean wasDestinationTabGroupCollapsed) { + mDestinationGroupId = destinationGroupId; + mIsIncognito = isIncognito; + if (destinationTabData != null) { + this.mergedTabsData.add(destinationTabData); + } + this.adoptedTabGroupOriginalIndex = adoptedTabGroupOriginalIndex; + this.removedTabGroupIds = removedTabGroupIds; + this.didCreateNewGroup = didCreateNewGroup; + this.adoptedTabGroupTitle = adoptedTabGroupTitle; + this.wasDestinationTabGroupCollapsed = wasDestinationTabGroupCollapsed; + } + + void addMergedTab( + Tab tab, + int originalIndex, + boolean originalIsPinned, + @Nullable Token originalTabGroupId) { + this.mergedTabsData.add( + new UndoGroupTabData(tab, originalIndex, originalIsPinned, originalTabGroupId)); + } + + @Override + public Token getTabGroupId() { + return mDestinationGroupId; + } + + @Override + public boolean isIncognito() { + return mIsIncognito; + } + } + /** Holds a tab and its index in the tab collection. */ private static class IndexAndTab { public final int index; @@ -939,12 +1009,56 @@ @Override public void performUndoGroupOperation(UndoGroupMetadata undoGroupMetadata) { - // TODO(crbug.com/432794806): Support undoable group operations. + assertOnUiThread(); + if (mNativeTabCollectionTabModelImplPtr == 0) return; + + UndoGroupMetadataImpl undoGroupMetadataImpl = (UndoGroupMetadataImpl) undoGroupMetadata; + Token tabGroupId = undoGroupMetadataImpl.getTabGroupId(); + + // Move each of the merged tabs back to their original state in reverse order. If the + // destination tab was moved it will be moved last. + List<UndoGroupTabData> mergedTabs = undoGroupMetadataImpl.mergedTabsData; + for (int i = mergedTabs.size() - 1; i >= 0; i--) { + UndoGroupTabData undoTabData = mergedTabs.get(i); + Tab mergedTab = undoTabData.tab; + Token originalTabGroupId = undoTabData.originalTabGroupId; + moveTabInternal( + mergedTab, + indexOf(mergedTab), + undoTabData.originalIndex, + originalTabGroupId, + undoTabData.originalIsPinned, + !tabGroupExists(originalTabGroupId)); + } + + // If the destination tab adopted the metadata of an existing tab group, move the adopted + // tab group back to its original position. + if (undoGroupMetadataImpl.adoptedTabGroupOriginalIndex != INVALID_TAB_INDEX) { + moveGroupToIndex(tabGroupId, undoGroupMetadataImpl.adoptedTabGroupOriginalIndex); + } + + // Reset or delete the state of the undone group. + if (undoGroupMetadataImpl.adoptedTabGroupTitle) { + deleteTabGroupTitle(tabGroupId); + } + if (undoGroupMetadataImpl.didCreateNewGroup) { + TabCollectionTabModelImplJni.get() + .closeDetachedTabGroup(mNativeTabCollectionTabModelImplPtr, tabGroupId); + } else if (undoGroupMetadataImpl.wasDestinationTabGroupCollapsed) { + setTabGroupCollapsed(tabGroupId, true); + } } @Override public void undoGroupOperationExpired(UndoGroupMetadata undoGroupMetadata) { - // TODO(crbug.com/432794806): Support undoable group operations. + assertOnUiThread(); + if (mNativeTabCollectionTabModelImplPtr == 0) return; + + UndoGroupMetadataImpl undoGroupMetadataImpl = (UndoGroupMetadataImpl) undoGroupMetadata; + for (Token removedTabGroupId : undoGroupMetadataImpl.removedTabGroupIds) { + TabCollectionTabModelImplJni.get() + .closeDetachedTabGroup(mNativeTabCollectionTabModelImplPtr, removedTabGroupId); + } } @Override @@ -1379,6 +1493,7 @@ boolean wasDestinationTabInGroup = destinationTab.getTabGroupId() != null; + // Find a destination tab group ID. final Token destinationTabGroupId; final boolean adoptCandidateGroupId; if (wasDestinationTabInGroup) { @@ -1402,13 +1517,27 @@ // kept if it came from the list of candidateTabGroupIds. candidateTabGroupIds.remove(destinationTabGroupId); + // If we are using an existing group that the destination tab is not part of we need to + // move the group to the index of the destination tab. + int adoptedTabGroupIndex = INVALID_TAB_INDEX; if (adoptCandidateGroupId) { + List<Tab> tabsInAdoptedGroup = getTabsInGroup(destinationTabGroupId); + adoptedTabGroupIndex = indexOf(tabsInAdoptedGroup.get(0)); assert indexInGroup == null : "indexInGroup should not be set when adopting a candidate group."; moveGroupToIndex(destinationTabGroupId, indexOf(destinationTab)); } + + // Move the destination tab into the group if it is not already part of the group. int destinationTabIndex = indexOf(destinationTab); + UndoGroupTabData undoGroupDestinationTabData = null; if (!wasDestinationTabInGroup) { + undoGroupDestinationTabData = + new UndoGroupTabData( + destinationTab, + destinationTabIndex, + destinationTab.getIsPinned(), + destinationTab.getTabGroupId()); moveTabInternal( destinationTab, destinationTabIndex, @@ -1420,16 +1549,24 @@ // Adopt the title of the first candidate group with a title that was merged into the // destination group if the destination group does not have a title. + boolean adoptedGroupTitle = false; if (TextUtils.isEmpty(getTabGroupTitle(destinationTabGroupId))) { for (Token tabGroupId : candidateTabGroupIds) { String title = getTabGroupTitle(tabGroupId); if (!TextUtils.isEmpty(title)) { + adoptedGroupTitle = true; setTabGroupTitle(destinationTabGroupId, title); break; } } } + // Ensure the destination group is not collapsed. + boolean wasDestinationTabGroupCollapsed = getTabGroupCollapsed(destinationTabGroupId); + if (wasDestinationTabGroupCollapsed) { + setTabGroupCollapsed(destinationTabGroupId, false); + } + // Calculate the initial insertion point in the tab model. int destinationIndexInTabModel; if (wasDestinationTabInGroup || adoptCandidateGroupId) { @@ -1452,8 +1589,19 @@ : destinationTabIndex + 1; } - for (Tab tab : tabs) { + UndoGroupMetadataImpl undoGroupMetadata = + new UndoGroupMetadataImpl( + destinationTabGroupId, + isIncognito(), + undoGroupDestinationTabData, + adoptedTabGroupIndex, + candidateTabGroupIds, + willCreateNewGroup, + adoptedGroupTitle, + wasDestinationTabGroupCollapsed); + // Move all tabs into the destination group. + for (Tab tab : tabs) { int currentIndex = indexOf(tab); assert currentIndex != TabModel.INVALID_TAB_INDEX; @@ -1471,10 +1619,13 @@ adjustedDestinationIndexInTabModel--; } + boolean oldIsPinned = tab.getIsPinned(); + Token oldTabGroupId = tab.getTabGroupId(); + // Iff the tab is already a part of the destination group, and is at the required index, // we can skip the move. We require the tab to be at the right index to ensure the order // of the tabs in the list of tabs being merged is replicated in the tab group. - if (destinationTabGroupId.equals(tab.getTabGroupId()) + if (destinationTabGroupId.equals(oldTabGroupId) && currentIndex == adjustedDestinationIndexInTabModel) { destinationIndexInTabModel++; continue; @@ -1491,6 +1642,8 @@ if (currentIndex >= destinationIndexInTabModel) { destinationIndexInTabModel++; } + + undoGroupMetadata.addMergedTab(tab, currentIndex, oldIsPinned, oldTabGroupId); } for (TabGroupModelFilterObserver observer : mTabGroupObservers) { @@ -1498,14 +1651,17 @@ observer.didCreateNewGroup(destinationTab, this); } - // TODO(crbug.com/429145597): If notify is set trigger the undo snackbar. - for (Token tabGroupId : candidateTabGroupIds) { observer.didRemoveTabGroup( Tab.INVALID_TAB_ID, tabGroupId, DidRemoveTabGroupReason.MERGE); - - // TODO(crbug.com/429145597): Don't delete this yet if the undo snackbar is - // triggered. Instead wait for the undo bar to be dismissed. + } + } + if (notify && !willCreateNewGroup) { + for (TabGroupModelFilterObserver observer : mTabGroupObservers) { + observer.showUndoGroupSnackbar(undoGroupMetadata); + } + } else { + for (Token tabGroupId : candidateTabGroupIds) { TabCollectionTabModelImplJni.get() .closeDetachedTabGroup(mNativeTabCollectionTabModelImplPtr, tabGroupId); } @@ -1705,6 +1861,15 @@ return TabModelImplUtil.findNearbyNotClosingTab(tabsInGroup, indexInGroup, tabsToExclude); } + // Testing methods. + + public boolean detachedTabGroupExistsForTesting(Token tabGroupId) { + assertOnUiThread(); + assert mNativeTabCollectionTabModelImplPtr != 0; + return TabCollectionTabModelImplJni.get() + .detachedTabGroupExists(mNativeTabCollectionTabModelImplPtr, tabGroupId); + } + @NativeMethods interface Natives { long init(TabCollectionTabModelImpl javaObject, @JniType("Profile*") Profile profile); @@ -1769,6 +1934,9 @@ boolean getTabGroupCollapsed( long nativeTabCollectionTabModelImpl, @JniType("base::Token") Token tabGroupId); + boolean detachedTabGroupExists( + long nativeTabCollectionTabModelImpl, @JniType("base::Token") Token tabGroupId); + void closeDetachedTabGroup( long nativeTabCollectionTabModelImpl, @JniType("base::Token") Token tabGroupId);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java index c388739..a297563c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
@@ -96,6 +96,7 @@ import org.chromium.chrome.browser.ntp.IncognitoNewTabPage; import org.chromium.chrome.browser.ntp.NewTabPage; import org.chromium.chrome.browser.ntp.NewTabPageUma; +import org.chromium.chrome.browser.ntp_customization.edge_to_edge.TopInsetCoordinator; import org.chromium.chrome.browser.offlinepages.OfflinePageTabData; import org.chromium.chrome.browser.omaha.UpdateMenuItemHelper; import org.chromium.chrome.browser.omnibox.BackKeyBehaviorDelegate; @@ -233,6 +234,7 @@ private AppThemeColorProvider mAppThemeColorProvider; private final SettableThemeColorProvider mCustomTabThemeColorProvider; private final TopToolbarCoordinator mToolbar; + private final ToolbarLayout mToolbarLayout; private final ToolbarControlContainer mControlContainer; private final View mToolbarHairline; private final BrowserControlsStateProvider.Observer mBrowserControlsObserver; @@ -314,6 +316,7 @@ private final UserEducationHelper mUserEducationHelper; private final ToolbarLongPressMenuHandler mToolbarLongPressMenuHandler; private final OverrideUrlLoadingDelegateImpl mOverrideUrlLoadingDelegate; + private final ObservableSupplier<TopInsetCoordinator> mTopInsetCoordinatorSupplier; private HomeButtonCoordinator mHomeButtonCoordinator; private HomePageButtonsCoordinator mHomePageButtonsCoordinator; @@ -739,6 +742,7 @@ * @param tabBookmarkerSupplier Supplier of {@link TabBookmarker} for bookmarking a given tab. * @param menuButtonVisibilityDelegate Delegate for handling the visibility of the menu button. * @param topControlsStacker TopControlsStacker to manage the view's y-offset. + * @param topInsetCoordinatorSupplier Supplier of (@link TopInsetCoordinator}. * @param xrSpaceModeObservableSupplier Supplies current XR space mode status. True for XR full * space mode, false otherwise. */ @@ -790,6 +794,7 @@ @NonNull ObservableSupplier<TabBookmarker> tabBookmarkerSupplier, @Nullable MenuButtonCoordinator.VisibilityDelegate menuButtonVisibilityDelegate, TopControlsStacker topControlsStacker, + ObservableSupplier<TopInsetCoordinator> topInsetCoordinatorSupplier, @Nullable ObservableSupplier<Boolean> xrSpaceModeObservableSupplier) { TraceEvent.begin("ToolbarManager.ToolbarManager"); mActivity = activity; @@ -825,6 +830,7 @@ mOverrideUrlLoadingDelegate = new OverrideUrlLoadingDelegateImpl(); mMultiInstanceManager = multiInstanceManager; mTabBookmarkerSupplier = tabBookmarkerSupplier; + mTopInsetCoordinatorSupplier = topInsetCoordinatorSupplier; mCustomTabCount = new CustomTabCount( tabModelSelectorSupplier.get().getCurrentModelTabCountSupplier()); @@ -834,8 +840,8 @@ && ChromeFeatureList.sNewTabPageCustomization.isEnabled() && ChromeFeatureList.sNewTabPageCustomizationToolbarButton.isEnabled(); - ToolbarLayout toolbarLayout = mActivity.findViewById(R.id.toolbar); - mNtpDelegate = createNewTabPageDelegate(toolbarLayout); + mToolbarLayout = mActivity.findViewById(R.id.toolbar); + mNtpDelegate = createNewTabPageDelegate(); mLocationBarModel = new LocationBarModel( activity, @@ -938,7 +944,7 @@ ThemeColorProvider overviewModeThemeColorProvider = mAppThemeColorProvider; Runnable requestFocusRunnable = compositorViewHolder::requestFocus; - mIsCustomTab = toolbarLayout instanceof CustomTabToolbar; + mIsCustomTab = mToolbarLayout instanceof CustomTabToolbar; ThemeColorProvider menuButtonThemeColorProvider = mIsCustomTab ? mCustomTabThemeColorProvider : browsingModeThemeColorProvider; @@ -1094,7 +1100,6 @@ mToolbar = createTopToolbarCoordinator( controlContainer, - toolbarLayout, buttonDataProviders, browsingModeThemeColorProvider, mIncognitoStateProvider, @@ -1114,7 +1119,7 @@ tabObscuringHandler.addObserver(this); if (mIsCustomTab) { - CustomTabToolbar customTabToolbar = ((CustomTabToolbar) toolbarLayout); + CustomTabToolbar customTabToolbar = ((CustomTabToolbar) mToolbarLayout); mLocationBar = customTabToolbar.createLocationBar( mLocationBarModel, @@ -1135,8 +1140,8 @@ mTabCreatorManager.getTabCreator( mIncognitoStateProvider.isIncognitoSelected())); OmniboxSuggestionsDropdownScrollListener scrollListener = - toolbarLayout instanceof OmniboxSuggestionsDropdownScrollListener - ? (OmniboxSuggestionsDropdownScrollListener) toolbarLayout + mToolbarLayout instanceof OmniboxSuggestionsDropdownScrollListener + ? (OmniboxSuggestionsDropdownScrollListener) mToolbarLayout : null; Supplier<Integer> bottomWindowPaddingSupplier = @@ -1148,7 +1153,7 @@ LocationBarCoordinator locationBarCoordinator = new LocationBarCoordinator( mActivity.findViewById(R.id.location_bar), - toolbarLayout, + mToolbarLayout, mProfileSupplier, mLocationBarModel, mActionModeController.getActionModeCallback(), @@ -1184,9 +1189,9 @@ mBrowserControlsSizer, ToolbarPositionController.isToolbarPositionCustomizationEnabled( mActivity, mIsCustomTab)); - toolbarLayout.setLocationBarCoordinator(locationBarCoordinator); - toolbarLayout.setBrowserControlsVisibilityDelegate(mControlsVisibilityDelegate); - toolbarLayout.setBrowserControlsStateProvider(mBrowserControlsSizer); + mToolbarLayout.setLocationBarCoordinator(locationBarCoordinator); + mToolbarLayout.setBrowserControlsVisibilityDelegate(mControlsVisibilityDelegate); + mToolbarLayout.setBrowserControlsStateProvider(mBrowserControlsSizer); mLocationBar = locationBarCoordinator; } @@ -1440,8 +1445,7 @@ mLocationBarModel.notifyDidStartNavigation( navigationHandle.isSameDocument()); if (mIsCustomTab) { - ToolbarLayout toolbarLayout = mActivity.findViewById(R.id.toolbar); - ((CustomTabToolbar) toolbarLayout).resetOptionalButtonState(); + ((CustomTabToolbar) mToolbarLayout).resetOptionalButtonState(); } } @@ -1774,11 +1778,13 @@ keyboardAccessoryStateSupplier, mWindowAndroid.getKeyboardDelegate(), mControlContainer, + mToolbarLayout, mBottomControlsStacker, mBottomToolbarControlsOffsetSupplier, mProgressBarContainer, controlContainerTranslationSupplier, controlContainerHeightSupplier, + mTopInsetCoordinatorSupplier, new Handler(Looper.getMainLooper()), mActivity); if (ChromeFeatureList.sMiniOriginBar.isEnabled()) { @@ -1836,7 +1842,6 @@ private TopToolbarCoordinator createTopToolbarCoordinator( ToolbarControlContainer controlContainer, - ToolbarLayout toolbarLayout, List<ButtonDataProvider> buttonDataProviders, ThemeColorProvider browsingModeThemeColorProvider, IncognitoStateProvider incognitoStateProvider, @@ -1848,7 +1853,7 @@ TopToolbarCoordinator toolbar = new TopToolbarCoordinator( controlContainer, - toolbarLayout, + mToolbarLayout, mLocationBarModel, mToolbarTabController, mUserEducationHelper, @@ -2051,15 +2056,15 @@ } } - private NewTabPageDelegate createNewTabPageDelegate(ToolbarLayout toolbarLayout) { - if (toolbarLayout instanceof ToolbarPhone) { + private NewTabPageDelegate createNewTabPageDelegate() { + if (mToolbarLayout instanceof ToolbarPhone) { return new ToolbarNtpDelegate() { @Override protected boolean shouldUpdateListener() { return mVisibleNtp.isLocationBarShownInNtp(); } }; - } else if (toolbarLayout instanceof ToolbarTablet) { + } else if (mToolbarLayout instanceof ToolbarTablet) { return new ToolbarNtpDelegate() { @Override public void setSearchBoxScrollListener(Callback<Float> scrollCallback) { @@ -3184,7 +3189,7 @@ * @return The {@link ToolbarLayout} that constitutes the toolbar. */ public ToolbarLayout getToolbarLayoutForTesting() { - return mToolbar.getToolbarLayoutForTesting(); + return mToolbarLayout; } public HomeButtonCoordinator getHomeButtonCoordinatorForTesting() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java index 54159c8..aee9a32 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
@@ -1581,6 +1581,7 @@ mTabBookmarkerSupplier, getMenuButtonVisibilityDelegate(), mTopControlsStacker, + mTopInsetCoordinatorSupplier, mXrSpaceModeObservableSupplier); if (!mSupportsAppMenuSupplier.getAsBoolean()) { mToolbarManager.getToolbar().disableMenuButton();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/LauncherShortcutTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/LauncherShortcutTest.java index 7ea1450..ce0790ec 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/LauncherShortcutTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/LauncherShortcutTest.java
@@ -97,7 +97,8 @@ @MediumTest @ParameterAnnotations.UseMethodParameter(IncognitoParams.class) public void testLauncherShortcut(boolean incognito) throws Exception { - int initialTabCount = mTabModelSelector.getTotalTabCount(); + int initialTabCount = + ThreadUtils.runOnUiThreadBlocking(() -> mTabModelSelector.getTotalTabCount()); Intent intent = new Intent( @@ -112,9 +113,7 @@ // Verify NTP was created. - Tab activityTab = - ThreadUtils.runOnUiThreadBlocking( - () -> mActivityTestRule.getActivity().getActivityTab()); + Tab activityTab = mActivityTestRule.getActivityTab(); Assert.assertEquals( "Incorrect tab launch type.", TabLaunchType.FROM_LAUNCHER_SHORTCUT, @@ -129,18 +128,16 @@ "Incorrect tab model selected.", incognito, mTabModelSelector.isIncognitoSelected()); - Assert.assertEquals( - "Incorrect total tab count.", - initialTabCount + 1, - mTabModelSelector.getTotalTabCount()); + int tabCount = ThreadUtils.runOnUiThreadBlocking(() -> mTabModelSelector.getTotalTabCount()); + Assert.assertEquals("Incorrect total tab count.", initialTabCount + 1, tabCount); Assert.assertEquals( "Incorrect normal tab count.", incognito ? initialTabCount : initialTabCount + 1, - mTabModelSelector.getModel(false).getCount()); + mActivityTestRule.tabsCount(false)); Assert.assertEquals( "Incorrect incognito tab count.", incognito ? 1 : 0, - mTabModelSelector.getModel(true).getCount()); + mActivityTestRule.tabsCount(true)); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/TabTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/TabTest.java index 1e1cafc..cc82e207 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/TabTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/TabTest.java
@@ -93,7 +93,7 @@ @Before public void setUp() throws Exception { - mTab = mActivityTestRule.getActivity().getActivityTab(); + mTab = mActivityTestRule.getActivityTab(); ThreadUtils.runOnUiThreadBlocking(() -> mTab.addObserver(mTabObserver)); mOnTitleUpdatedHelper = new CallbackHelper(); mRootIdForReset = mTab.getRootId();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java index b9d0a4ca..52e1183 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java
@@ -160,7 +160,7 @@ @CommandLineFlags.Add(ContentSwitches.DISABLE_POPUP_BLOCKING) public void testSpawnPopupOnBackgroundTab() { mActivityTestRule.loadUrl(getUrl(TEST_FILE_PATH)); - final Tab tab = mActivityTestRule.getActivity().getActivityTab(); + final Tab tab = mActivityTestRule.getActivityTab(); mActivityTestRule.newIncognitoTabFromMenu(); @@ -190,7 +190,7 @@ public void testAlertDialogDoesNotChangeActiveModel() { mActivityTestRule.newIncognitoTabFromMenu(); mActivityTestRule.loadUrl(getUrl(TEST_FILE_PATH)); - final Tab tab = mActivityTestRule.getActivity().getActivityTab(); + final Tab tab = mActivityTestRule.getActivityTab(); runOnUiThreadBlocking( () -> tab.getWebContents() @@ -419,7 +419,7 @@ InstrumentationRegistry.getInstrumentation().waitForIdleSync(); // Make sure we're on the NTP - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(tab); mActivityTestRule.loadUrl(INITIAL_SIZE_TEST_URL); @@ -512,8 +512,7 @@ assertEquals( "URL mismatch after switching back to the tab from tab-switch mode", urls[lastUrlIndex], - ChromeTabUtils.getUrlStringOnUiThread( - mActivityTestRule.getActivity().getActivityTab())); + ChromeTabUtils.getUrlStringOnUiThread(mActivityTestRule.getActivityTab())); } } @@ -526,7 +525,7 @@ assertTrue( "Current Tab should be an incognito tab.", - mActivityTestRule.getActivity().getActivityTab().isIncognito()); + mActivityTestRule.getActivityTab().isIncognito()); } /** Test that orientation changes cause the live tab reflow. */ @@ -835,7 +834,7 @@ @MediumTest @Feature({"Android-TabSwitcher"}) public void testTabsAreDestroyedOnModelDestruction() throws Exception { - final Tab tab = mActivityTestRule.getActivity().getActivityTab(); + final Tab tab = mActivityTestRule.getActivityTab(); final CallbackHelper webContentsDestroyed = new CallbackHelper(); @@ -918,7 +917,7 @@ InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); TabModelSelectorImpl selector = (TabModelSelectorImpl) mActivityTestRule.getActivity().getTabModelSelector(); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // Start undoable tab closure. runOnUiThreadBlocking(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/UrlSchemeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/UrlSchemeTest.java index 905cbc91..6c1304ac 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/UrlSchemeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/UrlSchemeTest.java
@@ -123,8 +123,7 @@ CriteriaHelper.pollUiThread( () -> { Criteria.checkThat( - ChromeTabUtils.getTitleOnUiThread( - mActivityTestRule.getActivity().getActivityTab()), + ChromeTabUtils.getTitleOnUiThread(mActivityTestRule.getActivityTab()), Matchers.is("iframe loaded")); }); // Make sure that content provider was asked to provide the content. @@ -135,8 +134,7 @@ CriteriaHelper.pollUiThread( () -> { Criteria.checkThat( - ChromeTabUtils.getTitleOnUiThread( - mActivityTestRule.getActivity().getActivityTab()), + ChromeTabUtils.getTitleOnUiThread(mActivityTestRule.getActivityTab()), Matchers.is("fail")); }); } @@ -159,15 +157,14 @@ CriteriaHelper.pollUiThread( () -> { Criteria.checkThat( - ChromeTabUtils.getTitleOnUiThread( - mActivityTestRule.getActivity().getActivityTab()), + ChromeTabUtils.getTitleOnUiThread(mActivityTestRule.getActivityTab()), Matchers.not("running")); }); // Make sure that content provider was asked to provide the content. ensureResourceRequestCountInContentProviderNotLessThan(resource, 1); - return ChromeTabUtils.getTitleOnUiThread(mActivityTestRule.getActivity().getActivityTab()); + return ChromeTabUtils.getTitleOnUiThread(mActivityTestRule.getActivityTab()); } @Test @@ -214,8 +211,7 @@ CriteriaHelper.pollUiThread( () -> { Criteria.checkThat( - ChromeTabUtils.getTitleOnUiThread( - mActivityTestRule.getActivity().getActivityTab()), + ChromeTabUtils.getTitleOnUiThread(mActivityTestRule.getActivityTab()), Matchers.not("running")); }); @@ -223,9 +219,7 @@ ensureResourceRequestCountInContentProviderNotLessThan(resource, 1); Assert.assertEquals( - "exception", - ChromeTabUtils.getTitleOnUiThread( - mActivityTestRule.getActivity().getActivityTab())); + "exception", ChromeTabUtils.getTitleOnUiThread(mActivityTestRule.getActivityTab())); } /** Test that a content URL is *ALLOWED* to access an image provided by a content URL. */ @@ -263,8 +257,7 @@ CriteriaHelper.pollUiThread( () -> { Criteria.checkThat( - ChromeTabUtils.getTitleOnUiThread( - mActivityTestRule.getActivity().getActivityTab()), + ChromeTabUtils.getTitleOnUiThread(mActivityTestRule.getActivityTab()), Matchers.is(expectedTitle)); }); ensureResourceRequestCountInContentProviderNotLessThan(resource, expectedLoadCount); @@ -310,9 +303,7 @@ TestFileUtil.createNewHtmlFile(file, "File", null); mActivityTestRule.loadUrl("file://" + file.getAbsolutePath()); Assert.assertEquals( - "File", - ChromeTabUtils.getTitleOnUiThread( - mActivityTestRule.getActivity().getActivityTab())); + "File", ChromeTabUtils.getTitleOnUiThread(mActivityTestRule.getActivityTab())); } finally { TestFileUtil.deleteFile(file); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ViewTransitionPixelTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ViewTransitionPixelTest.java index 4eb56c6..9aa711e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/ViewTransitionPixelTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ViewTransitionPixelTest.java
@@ -134,7 +134,7 @@ } private WebContents getWebContents() { - return mActivityTestRule.getActivity().getActivityTab().getWebContents(); + return mActivityTestRule.getActivityTab().getWebContents(); } private void showAndWaitForKeyboard() throws Throwable { @@ -187,7 +187,7 @@ private void setLocationAndWaitForLoad(String url) { ChromeTabUtils.waitForTabPageLoaded( - mActivityTestRule.getActivity().getActivityTab(), + mActivityTestRule.getActivityTab(), url, () -> { try { @@ -267,8 +267,7 @@ } private String getCurrentUrl() { - return ChromeTabUtils.getUrlStringOnUiThread( - mActivityTestRule.getActivity().getActivityTab()); + return ChromeTabUtils.getUrlStringOnUiThread(mActivityTestRule.getActivityTab()); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/background_sync/BackgroundSyncTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/background_sync/BackgroundSyncTest.java index d476d54..e0e996f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/background_sync/BackgroundSyncTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/background_sync/BackgroundSyncTest.java
@@ -143,7 +143,7 @@ @SuppressWarnings("MissingFail") private void assertTitleBecomes(String expectedTitle) { - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); TabTitleObserver titleObserver = new TabTitleObserver(tab, expectedTitle); try { titleObserver.waitForTitleUpdate(TITLE_UPDATE_TIMEOUT_SECONDS);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncTest.java index b8a8cc7..a0323aa 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/background_sync/PeriodicBackgroundSyncTest.java
@@ -208,7 +208,7 @@ @SuppressWarnings("MissingFail") private void assertTitleBecomes(String expectedTitle) throws InterruptedException { - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); TabTitleObserver titleObserver = new TabTitleObserver(tab, expectedTitle); try { titleObserver.waitForTitleUpdate(TITLE_UPDATE_TIMEOUT_SECONDS);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataBridgeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataBridgeTest.java index 1ef855e..23d4f6c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataBridgeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataBridgeTest.java
@@ -497,7 +497,8 @@ /* incognito= */ false); // Survey should be triggered on the first activity. - WebContents firstWebContents = firstActivity.getCurrentWebContents(); + WebContents firstWebContents = + ThreadUtils.runOnUiThreadBlocking(() -> firstActivity.getCurrentWebContents()); verify(mBrowsingDataBridgeJniMock, times(1)) .triggerHatsSurvey(any(), eq(firstWebContents), eq(false));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataRemoverIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataRemoverIntegrationTest.java index e52e4a4d..33033e2 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataRemoverIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/browsing_data/BrowsingDataRemoverIntegrationTest.java
@@ -191,14 +191,16 @@ Assert.assertTrue( UrlUtilities.isNtpUrl(mActivityTestRule.getWebContents().getVisibleUrl())); - Assert.assertEquals( - new GURL(testUrl), - mActivityTestRule - .getActivity() - .getTabModelSelectorSupplier() - .get() - .getModel(/* incognito= */ true) - .getTabAt(0) - .getUrl()); + GURL url = + ThreadUtils.runOnUiThreadBlocking( + () -> + mActivityTestRule + .getActivity() + .getTabModelSelectorSupplier() + .get() + .getModel(/* incognito= */ true) + .getTabAt(0) + .getUrl()); + Assert.assertEquals(new GURL(testUrl), url); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuTest.java index 42ee9163..15be9df 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuTest.java
@@ -796,7 +796,7 @@ @LargeTest public void testOpenLinksInNewTabsAndVerifyTabIndexOrdering() throws TimeoutException { TabModel tabModel = sDownloadTestRule.getActivity().getCurrentTabModel(); - int numOpenedTabs = tabModel.getCount(); + int numOpenedTabs = ThreadUtils.runOnUiThreadBlocking(() -> tabModel.getCount()); Tab tab = sDownloadTestRule.getActivityTab(); ContextMenuUtils.selectContextMenuItem( InstrumentationRegistry.getInstrumentation(),
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/display_cutout/DisplayCutoutTestRule.java b/chrome/android/javatests/src/org/chromium/chrome/browser/display_cutout/DisplayCutoutTestRule.java index b597541c..3daba042 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/display_cutout/DisplayCutoutTestRule.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/display_cutout/DisplayCutoutTestRule.java
@@ -154,7 +154,7 @@ super.before(); startActivity(); - mTab = getActivity().getActivityTab(); + mTab = getActivityTab(); ThreadUtils.runOnUiThreadBlocking( () -> {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/dom_distiller/ReaderModeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/dom_distiller/ReaderModeTest.java index 9981905..f9fa568 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/dom_distiller/ReaderModeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/dom_distiller/ReaderModeTest.java
@@ -129,7 +129,7 @@ @MediumTest public void testReaderModeInCct() throws TimeoutException { mDownloadTestRule.loadUrl(mURL); - Tab originalTab = mDownloadTestRule.getActivity().getActivityTab(); + Tab originalTab = mDownloadTestRule.getActivityTab(); String innerHtml = getInnerHtml(originalTab); assertThat(innerHtml).doesNotContain("article-header"); @@ -154,7 +154,7 @@ public void testReaderModeInRegularTab() throws TimeoutException { mDownloadTestRule.loadUrl(mURL); - Tab originalTab = mDownloadTestRule.getActivity().getActivityTab(); + Tab originalTab = mDownloadTestRule.getActivityTab(); ThreadUtils.runOnUiThreadBlocking( () -> { originalTab @@ -170,7 +170,7 @@ @DisabledTest(message = "https://crbug.com/423646543") public void testReaderModeInCct_Downloaded() throws TimeoutException { mDownloadTestRule.loadUrl(mURL); - Tab originalTab = mDownloadTestRule.getActivity().getActivityTab(); + Tab originalTab = mDownloadTestRule.getActivityTab(); String innerHtml = getInnerHtml(originalTab); assertThat(innerHtml).doesNotContain("article-header"); @@ -229,7 +229,7 @@ mURL, true); - Tab originalTab = mDownloadTestRule.getActivity().getActivityTab(); + Tab originalTab = mDownloadTestRule.getActivityTab(); assertTrue(originalTab.isIncognito()); String innerHtml = getInnerHtml(originalTab); assertThat(innerHtml).doesNotContain("article-header"); @@ -269,7 +269,7 @@ }); // Load the page that has an offline copy. The offline page should be shown. - Tab tab = mDownloadTestRule.getActivity().getActivityTab(); + Tab tab = mDownloadTestRule.getActivityTab(); Assert.assertFalse(isOfflinePage(tab)); mDownloadTestRule.loadUrl(ChromeTabUtils.getUrlOnUiThread(tab).getSpec()); Assert.assertTrue(isOfflinePage(tab)); @@ -286,7 +286,7 @@ @DisabledTest(message = "https://crbug.com/423967273") public void testPreferenceInCct() throws TimeoutException { mDownloadTestRule.loadUrl(mURL); - Tab originalTab = mDownloadTestRule.getActivity().getActivityTab(); + Tab originalTab = mDownloadTestRule.getActivityTab(); ThreadUtils.runOnUiThreadBlocking( () -> { originalTab @@ -311,7 +311,7 @@ DomDistillerUrlUtils.getDistillerViewUrlFromUrl( DISTILLER_SCHEME, mURL, PAGE_TITLE)); - Tab tab = mDownloadTestRule.getActivity().getActivityTab(); + Tab tab = mDownloadTestRule.getActivityTab(); waitForDistillation(PAGE_TITLE, tab); doTestSettingPreferences(mDownloadTestRule.getActivity(), tab);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java index 9953fd8..4b17787 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadTest.java
@@ -267,7 +267,7 @@ public void testHttpGetDownload() throws Exception { loadUrl(sTestServer.getURL(TEST_DOWNLOAD_DIRECTORY + "get.html")); waitForFocus(); - View currentView = sDownloadTestRule.getActivity().getActivityTab().getView(); + View currentView = sDownloadTestRule.getActivityTab().getView(); int callCount = sDownloadTestRule.getChromeDownloadCallCount(); TouchCommon.singleClickView(currentView); @@ -281,7 +281,7 @@ public void testHttpPostDownload() throws Exception { loadUrl(sTestServer.getURL(TEST_DOWNLOAD_DIRECTORY + "post.html")); waitForFocus(); - View currentView = sDownloadTestRule.getActivity().getActivityTab().getView(); + View currentView = sDownloadTestRule.getActivityTab().getView(); int callCount = sDownloadTestRule.getChromeDownloadCallCount(); TouchCommon.singleClickView(currentView); @@ -299,7 +299,7 @@ waitForFocus(); final int initialTabCount = sDownloadTestRule.getActivity().getCurrentTabModel().getCount(); int currentCallCount = sDownloadTestRule.getChromeDownloadCallCount(); - View currentView = sDownloadTestRule.getActivity().getActivityTab().getView(); + View currentView = sDownloadTestRule.getActivityTab().getView(); TouchCommon.singleClickView(currentView); Assert.assertTrue(sDownloadTestRule.waitForChromeDownloadToFinish(currentCallCount)); @@ -317,7 +317,7 @@ public void testUrlEscaping() throws Exception { loadUrl(sTestServer.getURL(TEST_DOWNLOAD_DIRECTORY + "urlescaping.html")); waitForFocus(); - View currentView = sDownloadTestRule.getActivity().getActivityTab().getView(); + View currentView = sDownloadTestRule.getActivityTab().getView(); int callCount = sDownloadTestRule.getChromeDownloadCallCount(); TouchCommon.singleClickView(currentView); @@ -329,7 +329,7 @@ sDownloadTestRule.loadUrlInTab( url, PageTransition.TYPED | PageTransition.FROM_ADDRESS_BAR, - sDownloadTestRule.getActivity().getActivityTab(), + sDownloadTestRule.getActivityTab(), 20L // 20 seconds timeout ); } @@ -376,7 +376,7 @@ } private void waitForFocus() { - View currentView = sDownloadTestRule.getActivity().getActivityTab().getView(); + View currentView = sDownloadTestRule.getActivityTab().getView(); if (!currentView.hasFocus()) { TouchCommon.singleClickView(currentView); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/findinpage/FindTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/findinpage/FindTest.java index 4549147..8992143e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/findinpage/FindTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/findinpage/FindTest.java
@@ -257,7 +257,7 @@ public void testFullscreen() { loadTestAndVerifyFindInPage("pitts", "1/7"); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); FullscreenTestUtils.togglePersistentFullscreenAndAssert( tab, true, mActivityTestRule.getActivity()); waitForFindInPageVisibility(false);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/fullscreen/FullscreenManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/fullscreen/FullscreenManagerTest.java index c6e85b2..888ad52 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/fullscreen/FullscreenManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/fullscreen/FullscreenManagerTest.java
@@ -259,7 +259,7 @@ // Put the tab foreground and assert the fullscreen was entered. ChromeTabUtils.switchTabInCurrentTabModel(activity, tab.getId()); - Assert.assertEquals(tab, activity.getActivityTab()); + Assert.assertEquals(tab, mActivityTestRule.getActivityTab()); Assert.assertTrue(getPersistentFullscreenMode()); } @@ -288,7 +288,7 @@ // Put the tab foreground and assert the fullscreen was entered. ChromeTabUtils.switchTabInCurrentTabModel(activity, tab.getId()); - Assert.assertEquals(tab, activity.getActivityTab()); + Assert.assertEquals(tab, mActivityTestRule.getActivityTab()); Assert.assertTrue(getPersistentFullscreenMode()); } @@ -771,7 +771,7 @@ PostTask.runOrPostTask(TaskTraits.UI_DEFAULT, delegate::rendererResponsive); // TODO(tedchoc): This is running into timing issues with the renderer offset logic. - // waitForBrowserControlsToBeMoveable(getActivity().getActivityTab()); + // waitForBrowserControlsToBeMoveable(getActivityTab()); } @Test @@ -803,7 +803,7 @@ PostTask.runOrPostTask(TaskTraits.UI_DEFAULT, delegate::rendererResponsive); // TODO(tedchoc): This is running into timing issues with the renderer offset logic. - // waitForBrowserControlsToBeMoveable(getActivity().getActivityTab()); + // waitForBrowserControlsToBeMoveable(getActivityTab()); } @Test @@ -1263,7 +1263,7 @@ .getResources() .getDisplayMetrics() .density; - View tabView = mActivityTestRule.getActivity().getActivityTab().getContentView(); + View tabView = mActivityTestRule.getActivityTab().getContentView(); Assert.assertEquals(tabView.getHeight() / pixelDensity, getPageHeight(), 1); } @@ -1283,12 +1283,12 @@ .getResources() .getDisplayMetrics() .density; - View tabView = mActivityTestRule.getActivity().getActivityTab().getContentView(); + View tabView = mActivityTestRule.getActivityTab().getContentView(); Assert.assertEquals(tabView.getHeight() / pixelDensity, getPageHeight(), 1); } private WebContents getWebContents() { - return mActivityTestRule.getActivity().getActivityTab().getWebContents(); + return mActivityTestRule.getWebContents(); } private int getPageHeight() throws Throwable {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/gesturenav/NavigationTransitionsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/gesturenav/NavigationTransitionsTest.java index 5fe82a0a..dea44c167 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/gesturenav/NavigationTransitionsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/gesturenav/NavigationTransitionsTest.java
@@ -88,8 +88,7 @@ @UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class) @CommandLineFlags.Add({ ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, - "enable-features=BackForwardTransitions" - + ":min-required-physical-ram-mb/0/screenshot-send-result-delay-ms/0", + "enable-features=BackForwardTransitions", "force-prefers-no-reduced-motion", // Resampling can make scroll offsets non-deterministic so turn it off. "disable-features=ResamplingScrollEvents", @@ -645,6 +644,7 @@ @Test @MediumTest @EnableFeatures({UiAndroidFeatures.MIRROR_BACK_FORWARD_GESTURES_IN_RTL}) + @DisabledTest(message = "crbug.com/434971032") public void testBackNavInRTL() throws Throwable { if (mTestNavigationMode == NAVIGATION_MODE_GESTURAL && VERSION.SDK_INT < VERSION_CODES.UPSIDE_DOWN_CAKE) return; @@ -655,24 +655,13 @@ String url1 = mTestServer.getURL("/chrome/test/data/android/blue.html"); String url2 = mTestServer.getURL("/chrome/test/data/android/green.html"); String url3 = mTestServer.getURL("/chrome/test/data/android/simple.html"); - - var helper = mScreenshotCallback.expectRequested(true); mActivityTestRule.loadUrl(url1); - WebContentsUtils.waitForCopyableViewInWebContents(getWebContents()); - helper.waitForNext(); - mActivityTestRule.loadUrl(url2); - WebContentsUtils.waitForCopyableViewInWebContents(getWebContents()); - helper.waitForNext(); - mActivityTestRule.loadUrl(url3); - WebContentsUtils.waitForCopyableViewInWebContents(getWebContents()); - helper.waitForNext(); + WebContentsUtils.waitForCopyableViewInWebContents(getWebContents()); // No screenshot on gesture mode when navigating back. - helper = - mScreenshotCallback.expectRequested( - mTestNavigationMode == NAVIGATION_MODE_THREE_BUTTON); + mScreenshotCallback.expectRequested(mTestNavigationMode == NAVIGATION_MODE_THREE_BUTTON); performNavigationTransition(url2, BackEventCompat.EDGE_RIGHT); waitForTransitionFinished(); @@ -690,8 +679,6 @@ waitForTransitionFinished(); Assert.assertEquals(url1, getCurrentUrl()); } - - helper.waitForNext(); } /** @@ -886,6 +873,7 @@ @Test @MediumTest @MinAndroidSdkLevel(Build.VERSION_CODES.UPSIDE_DOWN_CAKE) + @DisabledTest(message = "crbug.com/434971032") public void testNoCrashWhenGestureIsNotInProgress() throws TimeoutException { if (mTestNavigationMode == NAVIGATION_MODE_THREE_BUTTON) { return; @@ -893,25 +881,14 @@ String url1 = mTestServer.getURL("/chrome/test/data/android/blue.html"); String url2 = mTestServer.getURL("/chrome/test/data/android/green.html"); String url3 = mTestServer.getURL("/chrome/test/data/android/simple.html"); - - var helper = mScreenshotCallback.expectRequested(true); mActivityTestRule.loadUrl(url1); - WebContentsUtils.waitForCopyableViewInWebContents(getWebContents()); - helper.waitForNext(); - mActivityTestRule.loadUrl(url2); - WebContentsUtils.waitForCopyableViewInWebContents(getWebContents()); - helper.waitForNext(); - mActivityTestRule.loadUrl(url3); WebContentsUtils.waitForCopyableViewInWebContents(getWebContents()); - helper.waitForNext(); // Perform a back gesture transition from the left edge. // No screenshot on gesture mode when navigating back. - helper = - mScreenshotCallback.expectRequested( - mTestNavigationMode == NAVIGATION_MODE_THREE_BUTTON); + mScreenshotCallback.expectRequested(mTestNavigationMode == NAVIGATION_MODE_THREE_BUTTON); performNavigationTransition(url2, BackEventCompat.EDGE_LEFT); waitForTransitionFinished(); @@ -929,8 +906,6 @@ }); ChromeTabUtils.waitForTabPageLoaded(mActivityTestRule.getActivity().getActivityTab(), url1); - - helper.waitForNext(); } /** Test that it doesn't crash when the edge is somehow changed in the mid of swipe gesture. */
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/jsdialog/JavascriptAppModalDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/jsdialog/JavascriptAppModalDialogTest.java index d397365f..ee9eedd 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/jsdialog/JavascriptAppModalDialogTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/jsdialog/JavascriptAppModalDialogTest.java
@@ -93,11 +93,7 @@ Assert.assertEquals( BEFORE_UNLOAD_URL, - mActivityTestRule - .getActivity() - .getCurrentWebContents() - .getLastCommittedUrl() - .getSpec()); + mActivityTestRule.getWebContents().getLastCommittedUrl().getSpec()); executeJavaScriptAndWaitForDialog("history.back();"); jsDialog = getCurrentDialog(); @@ -110,12 +106,7 @@ onViewWaiting(withText(R.string.leave), /* checkRootDialog= */ true).perform(click()); onPageLoaded.waitForCallback(callCount); Assert.assertEquals( - EMPTY_PAGE, - mActivityTestRule - .getActivity() - .getCurrentWebContents() - .getLastCommittedUrl() - .getSpec()); + EMPTY_PAGE, mActivityTestRule.getWebContents().getLastCommittedUrl().getSpec()); } /** @@ -189,11 +180,7 @@ onViewWaiting(withText(R.string.cancel)).perform(click()); Assert.assertEquals( BEFORE_UNLOAD_URL, - mActivityTestRule - .getActivity() - .getCurrentWebContents() - .getLastCommittedUrl() - .getSpec()); + mActivityTestRule.getWebContents().getLastCommittedUrl().getSpec()); // Show it again, it should have the option to suppress subsequent dialogs. OnEvaluateJavaScriptResultHelper resultHelper = @@ -207,11 +194,7 @@ onViewWaiting(withText(R.string.cancel)).perform(click()); Assert.assertEquals( BEFORE_UNLOAD_URL, - mActivityTestRule - .getActivity() - .getCurrentWebContents() - .getLastCommittedUrl() - .getSpec()); + mActivityTestRule.getWebContents().getLastCommittedUrl().getSpec()); // Try showing a dialog again and verify it is not shown. resultHelper.evaluateJavaScriptForTests( @@ -258,7 +241,7 @@ WebContentsUtils.getGestureListenerManager(mActivityTestRule.getWebContents()) .addListener(tapGestureStateListener); }); - TouchCommon.singleClickView(mActivityTestRule.getActivity().getActivityTab().getView()); + TouchCommon.singleClickView(mActivityTestRule.getActivityTab().getView()); tapGestureStateListener.waitForTap(callCount); } @@ -276,8 +259,7 @@ */ private OnEvaluateJavaScriptResultHelper executeJavaScriptAndWaitForDialog( final OnEvaluateJavaScriptResultHelper helper, String script) { - helper.evaluateJavaScriptForTests( - mActivityTestRule.getActivity().getCurrentWebContents(), script); + helper.evaluateJavaScriptForTests(mActivityTestRule.getWebContents(), script); assertJavascriptAppModalDialogShownState(true); return helper; }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/jsdialog/JavascriptTabModalDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/jsdialog/JavascriptTabModalDialogTest.java index 6f8d28410..7e8fb8e7 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/jsdialog/JavascriptTabModalDialogTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/jsdialog/JavascriptTabModalDialogTest.java
@@ -325,7 +325,7 @@ */ private OnEvaluateJavaScriptResultHelper executeJavaScriptAndWaitForDialog( final OnEvaluateJavaScriptResultHelper helper, String script) { - helper.evaluateJavaScriptForTests(mActivity.getCurrentWebContents(), script); + helper.evaluateJavaScriptForTests(mActivityTestRule.getWebContents(), script); checkDialogShowing("Could not spawn or locate a modal dialog.", true); return helper; }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/login/ChromeHttpAuthHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/login/ChromeHttpAuthHandlerTest.java index 75deb56..eb26d6b6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/login/ChromeHttpAuthHandlerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/login/ChromeHttpAuthHandlerTest.java
@@ -69,8 +69,7 @@ ChromeHttpAuthHandler handler = triggerAuth(); verifyAuthDialogVisibility(handler, true); ChromeTabUtils.loadUrlOnUiThread( - mActivityTestRule.getActivity().getActivityTab(), - ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL); + mActivityTestRule.getActivityTab(), ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL); verifyAuthDialogVisibility(handler, false); } @@ -103,7 +102,7 @@ @Restriction(Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE) @DisabledTest(message = "https://crbug.com/1218039") public void authDialogSuppressedOnBackgroundTab() throws Exception { - Tab firstTab = mActivityTestRule.getActivity().getActivityTab(); + Tab firstTab = mActivityTestRule.getActivityTab(); ChromeTabUtils.newTabFromMenu( InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); // If the first tab was closed due to OOM, then just exit the test. @@ -116,7 +115,7 @@ } private ChromeHttpAuthHandler triggerAuth() throws Exception { - return triggerAuthForTab(mActivityTestRule.getActivity().getActivityTab()); + return triggerAuthForTab(mActivityTestRule.getActivityTab()); } private ChromeHttpAuthHandler triggerAuthForTab(Tab tab) throws Exception {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/AutoplayMutedNotificationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/AutoplayMutedNotificationTest.java index 0e6d3ad..e289857 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/AutoplayMutedNotificationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/AutoplayMutedNotificationTest.java
@@ -92,7 +92,7 @@ @SmallTest @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) public void testBasic() throws Exception { - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // Taking audio focus. Assert.assertEquals( @@ -117,7 +117,7 @@ @SmallTest @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) public void testDoesNotReactToAudioFocus() throws Exception { - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // The page will autoplay the video. DOMUtils.waitForMediaPlay(tab.getWebContents(), VIDEO_ID); @@ -143,7 +143,7 @@ @SmallTest @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) public void testAutoplayMutedThenUnmute() throws Exception { - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // Taking audio focus. Assert.assertEquals( @@ -184,7 +184,7 @@ @SmallTest @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) public void testMutedPlaybackDoesNotTakeAudioFocus() throws Exception { - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // Taking audio focus. Assert.assertEquals( @@ -215,7 +215,7 @@ @SmallTest @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) public void testUnmutedPlaybackTakesAudioFocus() throws Exception { - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // Taking audio focus. Assert.assertEquals(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/StartupLoadingMetricsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/StartupLoadingMetricsTest.java index 8a40bf42..ca49777a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/StartupLoadingMetricsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/StartupLoadingMetricsTest.java
@@ -499,9 +499,9 @@ // Wait for a tab to be loaded. mTabbedActivityTestRule.waitForActivityNativeInitializationComplete(); CriteriaHelper.pollUiThread( - () -> mTabbedActivityTestRule.getActivity().getActivityTab() != null, + () -> mTabbedActivityTestRule.getActivityTab() != null, "Tab never selected/initialized."); - Tab tab = mTabbedActivityTestRule.getActivity().getActivityTab(); + Tab tab = mTabbedActivityTestRule.getActivityTab(); ChromeTabUtils.waitForTabPageLoaded(tab, (String) null); }); assertMainIntentLaunchColdStartHistogramRecorded(0); @@ -594,7 +594,7 @@ HistogramWatcher ntpColdStartWatcher = createNtpColdStartHistogramWatcher(0); runAndWaitForPageLoadMetricsRecorded( () -> mCustomTabActivityTestRule.startCustomTabActivityWithIntent(intent)); - Tab tab = mCustomTabActivityTestRule.getActivity().getActivityTab(); + Tab tab = mCustomTabActivityTestRule.getActivityTab(); // Verify the URL and check that startup metrics are *not* recorded. Assert.assertEquals(getTestPage(), ChromeTabUtils.getUrlStringOnUiThread(tab));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java index 6ed18e437..5f2e419 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java
@@ -202,7 +202,7 @@ mSuggestionsDeps.getFactory().mostVisitedSites = mMostVisitedSites; mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - mTab = mActivityTestRule.getActivity().getActivityTab(); + mTab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(mTab); Assert.assertTrue(mTab.getNativePage() instanceof NewTabPage);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/ShowNtpAtStartupTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/ShowNtpAtStartupTest.java index 51c365120..d456c67 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/ShowNtpAtStartupTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/ShowNtpAtStartupTest.java
@@ -104,7 +104,7 @@ 2, UrlConstants.NTP_URL, /* expectHomeSurfaceUiShown= */ true); - waitForNtpLoaded(mActivityTestRule.getActivity().getActivityTab()); + waitForNtpLoaded(mActivityTestRule.getActivityTab()); histogram.assertExpected(); } @@ -200,11 +200,12 @@ .build(), /* allowDialog= */ false); }); - Assert.assertEquals(2, cta.getCurrentTabModel().getCount()); + Assert.assertEquals(2, mActivityTestRule.tabsCount(false)); Assert.assertFalse(ntp.isMagicStackVisibleForTesting()); // Tests to set another tracking Tab on the NTP. - Tab newTrackingTab = cta.getCurrentTabModel().getTabAt(0); + Tab newTrackingTab = + ThreadUtils.runOnUiThreadBlocking(() -> cta.getCurrentTabModel().getTabAt(0)); ThreadUtils.runOnUiThreadBlocking( () -> { ntp.showMagicStack(newTrackingTab); @@ -221,7 +222,7 @@ .build(), /* allowDialog= */ false); }); - Assert.assertEquals(1, cta.getCurrentTabModel().getCount()); + Assert.assertEquals(1, mActivityTestRule.tabsCount(false)); Assert.assertFalse(ntp.isMagicStackVisibleForTesting()); } @@ -534,7 +535,9 @@ private void verifyTabCountAndActiveTabUrl( ChromeTabbedActivity cta, int tabCount, String url, Boolean expectHomeSurfaceUiShown) { - Assert.assertEquals(tabCount, cta.getCurrentTabModel().getCount()); + int currentTabCount = + ThreadUtils.runOnUiThreadBlocking(() -> cta.getCurrentTabModel().getCount()); + Assert.assertEquals(tabCount, currentTabCount); Tab tab = HomeSurfaceTestUtils.getCurrentTabFromUiThread(cta); ThreadUtils.runOnUiThreadBlocking( () -> {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoAboutThisSiteTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoAboutThisSiteTest.java index bb304b3..b21e6bdc 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoAboutThisSiteTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoAboutThisSiteTest.java
@@ -141,7 +141,7 @@ private void openPageInfo() { ChromeTabbedActivity activity = mActivityTestRule.getActivity(); - Tab tab = activity.getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); ThreadUtils.runOnUiThreadBlocking( () -> { new ChromePageInfo(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewDarkModeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewDarkModeTest.java index da727cb..ed91c8c5 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewDarkModeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewDarkModeTest.java
@@ -85,7 +85,7 @@ private void openPageInfo() { ChromeActivity activity = mActivityTestRule.getActivity(); - Tab tab = activity.getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); ThreadUtils.runOnUiThreadBlocking( () -> { new ChromePageInfo(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java index cbf63bc..26f60f0 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java
@@ -329,7 +329,7 @@ private void openPageInfo(@ContentSettingsType.EnumType int highlightedPermission) { ChromeActivity activity = mActivityTestRule.getActivity(); - Tab tab = activity.getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); ThreadUtils.runOnUiThreadBlocking( () -> { new ChromePageInfo(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java b/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java index a716adf..440affa 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java
@@ -173,7 +173,7 @@ final ChromeActivity activity = permissionTestRule.getActivity(); activity.getWindowAndroid().setAndroidPermissionDelegate(testAndroidPermissionDelegate); - final Tab tab = activity.getActivityTab(); + final Tab tab = ThreadUtils.runOnUiThreadBlocking(() -> activity.getActivityTab()); final PermissionUpdateWaiter permissionUpdateWaiter = new PermissionUpdateWaiter( expectPermissionAllowed ? "Granted" : "Denied", activity);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegateTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegateTest.java index f3dcdc66..64ac14f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegateTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegateTest.java
@@ -57,7 +57,7 @@ ContentSwitches.HOST_RESOLVER_RULES + "=MAP * 127.0.0.1", "ignore-certificate-errors" }) -@Batch(SiteSettingsTest.SITE_SETTINGS_BATCH_NAME) +@Batch(Batch.PER_CLASS) public class ChromeSiteSettingsDelegateTest { public static final String BROWSING_DATA_HOST = "browsing-data.com";
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/PermissionInfoTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/PermissionInfoTest.java index 5735a2f..91e3750 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/PermissionInfoTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/PermissionInfoTest.java
@@ -10,7 +10,6 @@ import org.junit.AfterClass; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -30,8 +29,8 @@ import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; -import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; +import org.chromium.chrome.test.transit.AutoResetCtaTransitTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; import org.chromium.components.browser_ui.site_settings.GeolocationSetting; import org.chromium.components.browser_ui.site_settings.PermissionInfo; import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge; @@ -52,20 +51,17 @@ ContentSwitches.HOST_RESOLVER_RULES + "=MAP * 127.0.0.1", "ignore-certificate-errors" }) -@Batch(SiteSettingsTest.SITE_SETTINGS_BATCH_NAME) +@Batch(Batch.PER_CLASS) public class PermissionInfoTest { private static final String DSE_ORIGIN = "https://www.google.com"; - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public BlankCTATabInitialStateRule mBlankCTATabInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, false); + public AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.fastAutoResetCtaActivityRule(); @Before public void setUp() throws TimeoutException { + mActivityTestRule.startOnBlankPage(); clearPermissions(); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTest.java index 4760c34..c0860b81 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTest.java
@@ -186,7 +186,6 @@ }) // TODO(crbug.com/344672098): Failing when batched, batch this again. public class SiteSettingsTest { - public static final String SITE_SETTINGS_BATCH_NAME = "site_settings"; @ClassRule public static PermissionTestRule mPermissionRule = new PermissionTestRule(true); @@ -269,7 +268,6 @@ ThreadUtils.runOnUiThreadBlocking( () -> { mPermissionRule - .getActivity() .getActivityTab() .removeObserver(mPermissionUpdateWaiter); }); @@ -311,12 +309,11 @@ ThreadUtils.runOnUiThreadBlocking( () -> { mPermissionRule - .getActivity() .getActivityTab() .removeObserver(mPermissionUpdateWaiter); }); } - Tab tab = mPermissionRule.getActivity().getActivityTab(); + Tab tab = mPermissionRule.getActivityTab(); mPermissionUpdateWaiter = new PermissionUpdateWaiter(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tab/InterceptNavigationDelegateTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tab/InterceptNavigationDelegateTest.java index 08acdec..4a2b11b19 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tab/InterceptNavigationDelegateTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tab/InterceptNavigationDelegateTest.java
@@ -88,7 +88,7 @@ class TestExternalNavigationHandler extends ExternalNavigationHandler { public TestExternalNavigationHandler() { - super(new ExternalNavigationDelegateImpl(mActivity.getActivityTab())); + super(new ExternalNavigationDelegateImpl(mActivityTestRule.getActivityTab())); } @Override @@ -179,7 +179,7 @@ mTestServer.getURL(NAVIGATION_FROM_USER_GESTURE_PAGE)); Assert.assertEquals(1, mNavParamHistory.size()); - TouchCommon.singleClickView(mActivity.getActivityTab().getView()); + TouchCommon.singleClickView(mActivityTestRule.getActivityTab().getView()); waitTillExpectedCallsComplete(2, DEFAULT_MAX_TIME_TO_WAIT_IN_MS); Assert.assertTrue(mNavParamHistory.get(1).hasUserGesture()); } @@ -192,7 +192,7 @@ mTestServer.getURL(NAVIGATION_FROM_XHR_CALLBACK_PAGE)); Assert.assertEquals(1, mNavParamHistory.size()); - TouchCommon.singleClickView(mActivity.getActivityTab().getView()); + TouchCommon.singleClickView(mActivityTestRule.getActivityTab().getView()); waitTillExpectedCallsComplete(2, DEFAULT_MAX_TIME_TO_WAIT_IN_MS); Assert.assertTrue(mNavParamHistory.get(1).hasUserGesture()); @@ -206,7 +206,7 @@ mTestServer.getURL(NAVIGATION_FROM_XHR_CALLBACK_AND_SHORT_TIMEOUT_PAGE)); Assert.assertEquals(1, mNavParamHistory.size()); - TouchCommon.singleClickView(mActivity.getActivityTab().getView()); + TouchCommon.singleClickView(mActivityTestRule.getActivityTab().getView()); waitTillExpectedCallsComplete(2, DEFAULT_MAX_TIME_TO_WAIT_IN_MS); Assert.assertTrue(mNavParamHistory.get(1).hasUserGesture()); @@ -220,7 +220,7 @@ mTestServer.getURL(NAVIGATION_FROM_XHR_CALLBACK_AND_LONG_TIMEOUT_PAGE)); Assert.assertEquals(1, mNavParamHistory.size()); - TouchCommon.singleClickView(mActivity.getActivityTab().getView()); + TouchCommon.singleClickView(mActivityTestRule.getActivityTab().getView()); waitTillExpectedCallsComplete(2, LONG_MAX_TIME_TO_WAIT_IN_MS); Assert.assertFalse(mNavParamHistory.get(1).hasUserGesture()); } @@ -233,7 +233,7 @@ mTestServer.getURL(NAVIGATION_FROM_IMAGE_ONLOAD_PAGE)); Assert.assertEquals(1, mNavParamHistory.size()); - TouchCommon.singleClickView(mActivity.getActivityTab().getView()); + TouchCommon.singleClickView(mActivityTestRule.getActivityTab().getView()); waitTillExpectedCallsComplete(2, DEFAULT_MAX_TIME_TO_WAIT_IN_MS); Assert.assertTrue(mNavParamHistory.get(1).hasUserGesture()); @@ -247,7 +247,7 @@ mTestServer.getURL(NAVIGATION_FROM_USER_GESTURE_IFRAME_PAGE)); Assert.assertEquals(1, mNavParamHistory.size()); - TouchCommon.singleClickView(mActivity.getActivityTab().getView()); + TouchCommon.singleClickView(mActivityTestRule.getActivityTab().getView()); waitTillExpectedCallsComplete(2, DEFAULT_MAX_TIME_TO_WAIT_IN_MS); mSubframeExternalProtocolCalled.waitForOnly(); @@ -266,7 +266,7 @@ // The click will reload the page with a user gesture. The delegate // should still only hear about the navigation in the primary main // frame, not the prerendering one. - TouchCommon.singleClickView(mActivity.getActivityTab().getView()); + TouchCommon.singleClickView(mActivityTestRule.getActivityTab().getView()); waitTillExpectedCallsComplete(2, DEFAULT_MAX_TIME_TO_WAIT_IN_MS); Assert.assertEquals(2, mNavParamHistory.size()); Assert.assertEquals(2, mExternalNavParamHistory.size());
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabArchiverTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabArchiverTest.java index 5a1a713..0b7d116 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabArchiverTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabArchiverTest.java
@@ -31,7 +31,6 @@ import org.junit.After; import org.junit.AfterClass; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -66,8 +65,8 @@ import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.tabwindow.TabWindowManager; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; -import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; +import org.chromium.chrome.test.transit.AutoResetCtaTransitTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; import org.chromium.components.tab_group_sync.LocalTabGroupId; import org.chromium.components.tab_group_sync.SavedTabGroup; import org.chromium.components.tab_group_sync.SavedTabGroupTab; @@ -86,13 +85,9 @@ @EnableFeatures({ChromeFeatureList.ANDROID_TAB_DECLUTTER_RESCUE_KILLSWITCH}) @DisableFeatures({ChromeFeatureList.ANDROID_TAB_DECLUTTER_ARCHIVE_TAB_GROUPS}) public class TabArchiverTest { - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public BlankCTATabInitialStateRule mBlankCTATabInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, false); + public AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.fastAutoResetCtaActivityRule(); @Rule public MockitoRule mMockitoRule = MockitoJUnit.rule().strictness(Strictness.LENIENT); @@ -124,7 +119,7 @@ runOnUiThreadBlocking( () -> ArchivedTabModelOrchestrator.getForProfile( - sActivityTestRule + mActivityTestRule .getActivity() .getProfileProviderSupplier() .get() @@ -137,9 +132,9 @@ mArchivedTabModel = archivedTabGroupModelFilter.getTabModel(); mArchivedTabCreator = mArchivedTabModelOrchestrator.getArchivedTabCreatorForTesting(); - mRegularTabModelSelector = sActivityTestRule.getActivity().getTabModelSelector(); - mRegularTabModel = sActivityTestRule.getActivity().getCurrentTabModel(); - mRegularTabCreator = sActivityTestRule.getActivity().getTabCreator(false); + mRegularTabModelSelector = mActivityTestRule.getActivity().getTabModelSelector(); + mRegularTabModel = mActivityTestRule.getActivity().getCurrentTabModel(); + mRegularTabCreator = mActivityTestRule.getActivity().getTabCreator(false); doReturn(mSelector).when(mTabWindowManager).getTabModelSelectorById(anyInt()); doReturn(mRegularTabModel).when(mSelector).getModel(anyBoolean()); @@ -211,8 +206,8 @@ @MediumTest public void testArchiveThenUnarchiveTab() { Tab tab = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); assertEquals(2, mRegularTabModel.getCount()); @@ -274,8 +269,8 @@ @MediumTest public void testArchiveThenUnarchiveTab_NoTimestampUpdate() { Tab tab = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); assertEquals(2, mRegularTabModel.getCount()); @@ -345,8 +340,8 @@ when(mTabGroupSyncService.getGroup(any(LocalTabGroupId.class))).thenReturn(savedTabGroup); Tab tab = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Simulate the first tab being added to a group. @@ -387,10 +382,10 @@ @Test @MediumTest public void testGroupedTabsAreNotArchived() { - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); runOnUiThreadBlocking( () -> { @@ -428,7 +423,7 @@ runOnUiThreadBlocking( () -> mTabArchiver.doArchivePass( - sActivityTestRule + mActivityTestRule .getActivity() .getTabModelSelectorSupplier() .get())); @@ -449,8 +444,8 @@ savedTabGroup.savedTabs = Arrays.asList(savedTabGroupTab1, savedTabGroupTab2); when(mTabGroupSyncService.getGroup(any(LocalTabGroupId.class))).thenReturn(savedTabGroup); - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); runOnUiThreadBlocking( () -> { @@ -490,7 +485,7 @@ runOnUiThreadBlocking( () -> mTabArchiver.doArchivePass( - sActivityTestRule + mActivityTestRule .getActivity() .getTabModelSelectorSupplier() .get())); @@ -512,8 +507,8 @@ savedTabGroup.savedTabs = Arrays.asList(savedTabGroupTab1, savedTabGroupTab2); when(mTabGroupSyncService.getGroup(any(LocalTabGroupId.class))).thenReturn(savedTabGroup); - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); runOnUiThreadBlocking( () -> { @@ -552,7 +547,7 @@ runOnUiThreadBlocking( () -> mTabArchiver.doArchivePass( - sActivityTestRule + mActivityTestRule .getActivity() .getTabModelSelectorSupplier() .get())); @@ -565,10 +560,10 @@ @MediumTest @EnableFeatures(ChromeFeatureList.ANDROID_TAB_DECLUTTER_ARCHIVE_TAB_GROUPS) public void testTabsAreNotArchived_userNotActive() { - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); runOnUiThreadBlocking( () -> { @@ -607,7 +602,7 @@ runOnUiThreadBlocking( () -> mTabArchiver.doArchivePass( - sActivityTestRule + mActivityTestRule .getActivity() .getTabModelSelectorSupplier() .get())); @@ -619,12 +614,12 @@ @Test @MediumTest public void testGroupedDuplicateTabsAreNotArchived() { - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); runOnUiThreadBlocking( () -> { @@ -663,7 +658,7 @@ runOnUiThreadBlocking( () -> mTabArchiver.doArchivePass( - sActivityTestRule + mActivityTestRule .getActivity() .getTabModelSelectorSupplier() .get())); @@ -676,14 +671,14 @@ @MediumTest public void testDuplicateTabsAreArchived() { // Tab 2 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Tab 3 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Tab 4 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH_2), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH_2), /* incognito= */ false); runOnUiThreadBlocking( () -> { @@ -710,7 +705,7 @@ () -> { mTabArchiveSettings.setArchiveDuplicateTabsEnabled(true); mTabArchiver.doArchivePass( - sActivityTestRule.getActivity().getTabModelSelectorSupplier().get()); + mActivityTestRule.getActivity().getTabModelSelectorSupplier().get()); }); CriteriaHelper.pollUiThread(() -> 3 == mRegularTabModel.getCount()); // Check that tab 3 (which is now tab 2) is the duplicate that remains as it is last active. @@ -727,14 +722,14 @@ @MediumTest public void testDuplicateTabsAreNotArchivedWithSwitchOff() { // Tab 2 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Tab 3 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Tab 4 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH_2), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH_2), /* incognito= */ false); runOnUiThreadBlocking( () -> { @@ -759,7 +754,7 @@ () -> { mTabArchiveSettings.setArchiveDuplicateTabsEnabled(false); mTabArchiver.doArchivePass( - sActivityTestRule.getActivity().getTabModelSelectorSupplier().get()); + mActivityTestRule.getActivity().getTabModelSelectorSupplier().get()); }); CriteriaHelper.pollUiThread(() -> 4 == mRegularTabModel.getCount()); assertEquals(0, mArchivedTabModel.getCount()); @@ -770,14 +765,14 @@ @MediumTest public void testDuplicateTabsNotArchivedWithUiThemeChange() { // Tab 2 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Tab 3 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Tab 4 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH_2), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH_2), /* incognito= */ false); runOnUiThreadBlocking( () -> { @@ -804,7 +799,7 @@ () -> { mTabArchiveSettings.setArchiveDuplicateTabsEnabled(true); mTabArchiver.doArchivePass( - sActivityTestRule.getActivity().getTabModelSelectorSupplier().get()); + mActivityTestRule.getActivity().getTabModelSelectorSupplier().get()); }); CriteriaHelper.pollUiThread(() -> 4 == mRegularTabModel.getCount()); assertEquals(0, mArchivedTabModel.getCount()); @@ -815,14 +810,14 @@ @MediumTest public void testDuplicateTabInGroupIsNotArchived_BaseDuplicateOutOfGroup() { // Tab 2 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Tab 3 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Tab 4 - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH_2), /* incognito= */ false); + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH_2), /* incognito= */ false); runOnUiThreadBlocking( () -> { @@ -858,7 +853,7 @@ runOnUiThreadBlocking( () -> mTabArchiver.doArchivePass( - sActivityTestRule + mActivityTestRule .getActivity() .getTabModelSelectorSupplier() .get())); @@ -883,13 +878,13 @@ // Leave the first two tabs at 0, it will be archived. ((TabImpl) mRegularTabModel.getTabAt(0)).setTimestampMillisForTesting(0); Tab tab1 = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); ((TabImpl) tab1).setTimestampMillisForTesting(0); Tab tab2 = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); // Setup the 3rd tab be kept in the regular TabModel ((TabImpl) tab2).setTimestampMillisForTesting(TimeUnit.HOURS.toMillis(1)); @@ -905,7 +900,7 @@ runOnUiThreadBlocking( () -> mTabArchiver.doArchivePass( - sActivityTestRule + mActivityTestRule .getActivity() .getTabModelSelectorSupplier() .get())); @@ -923,8 +918,8 @@ }); Tab tab = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); assertEquals(2, mRegularTabModel.getCount()); @@ -1044,8 +1039,8 @@ }); Tab tab = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); assertEquals(2, mRegularTabModel.getCount()); @@ -1142,8 +1137,8 @@ @MediumTest public void testArchivedTabParentRootIdsReset() { Tab tab = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); assertEquals(2, mRegularTabModel.getCount()); @@ -1183,8 +1178,8 @@ @MediumTest public void testTabIdPresentInBothModelsDeletesRegularTab() { Tab tab = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false); TabState state = runOnUiThreadBlocking(() -> TabStateExtractor.from(tab)); @@ -1205,7 +1200,7 @@ runOnUiThreadBlocking( () -> mTabArchiver.doArchivePass( - sActivityTestRule + mActivityTestRule .getActivity() .getTabModelSelectorSupplier() .get())); @@ -1414,8 +1409,8 @@ private void addRegularTabInBackgroundForArchive(String path) { Tab tab = - sActivityTestRule.loadUrlInNewTab( - sActivityTestRule.getTestServer().getURL(TEST_PATH), + mActivityTestRule.loadUrlInNewTab( + mActivityTestRule.getTestServer().getURL(TEST_PATH), /* incognito= */ false, TabLaunchType.FROM_LONGPRESS_BACKGROUND); runOnUiThreadBlocking(() -> tab.setTimestampMillis(0));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabCollectionTabModelImplTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabCollectionTabModelImplTest.java index 60d2a61..621bf9df 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabCollectionTabModelImplTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabCollectionTabModelImplTest.java
@@ -69,6 +69,10 @@ @Before public void setUp() throws Exception { + // Methods that would normally be triggered by snackbar lifecycle are manually invoked in + // this test. + mActivityTestRule.getActivity().getSnackbarManager().disableForTesting(); + mTestUrl = mActivityTestRule.getTestServer().getURL("/chrome/test/data/android/ok.txt"); mPage = mActivityTestRule.startOnBlankPage(); mTabModelSelector = mActivityTestRule.getActivity().getTabModelSelector(); @@ -1416,6 +1420,7 @@ TabGroupColorId.GREY, mCollectionModel.getTabGroupColorWithFallback(tabGroupId)); assertFalse(mCollectionModel.getTabGroupCollapsed(tabGroupId)); + mCollectionModel.removeTabGroupObserver(deleteAllObserver); }); deleteAllTitleHelper.waitForOnly("deleteTabGroupTitle failed"); deleteAllColorHelper.waitForOnly("deleteTabGroupColor failed"); @@ -1937,6 +1942,201 @@ }); } + @Test + @MediumTest + public void testUndoGroupOperation_MergeGroupIntoGroup() throws Exception { + Tab tab0 = getTabAt(0); + Tab tab1 = createTab(); + Tab tab2 = createTab(); + Tab tab3 = createTab(); + assertTabsInOrderAre(List.of(tab0, tab1, tab2, tab3)); + + AtomicReference<UndoGroupMetadata> undoGroupMetadataRef = new AtomicReference<>(); + CallbackHelper showUndoSnackbarHelper = new CallbackHelper(); + + ThreadUtils.runOnUiThreadBlocking( + () -> { + // Create group 1 with tab0, tab1. + mCollectionModel.mergeListOfTabsToGroup( + List.of(tab0, tab1), tab0, /* notify= */ false); + Token groupId1 = tab0.getTabGroupId(); + assertNotNull(groupId1); + + // Create group 2 with tab2, tab3. + mCollectionModel.mergeListOfTabsToGroup( + List.of(tab2, tab3), tab2, /* notify= */ false); + Token groupId2 = tab2.getTabGroupId(); + assertNotNull(groupId2); + + assertTabsInOrderAre(List.of(tab0, tab1, tab2, tab3)); + + TabGroupModelFilterObserver observer = + new TabGroupModelFilterObserver() { + @Override + public void showUndoGroupSnackbar( + UndoGroupMetadata undoGroupMetadata) { + undoGroupMetadataRef.set(undoGroupMetadata); + showUndoSnackbarHelper.notifyCalled(); + } + }; + mCollectionModel.addTabGroupObserver(observer); + + // Merge group 1 into group 2. + mCollectionModel.mergeListOfTabsToGroup( + List.of(tab0, tab1), tab2, /* notify= */ true); + + mCollectionModel.removeTabGroupObserver(observer); + + assertEquals(groupId2, tab0.getTabGroupId()); + assertEquals(groupId2, tab1.getTabGroupId()); + assertEquals(4, mCollectionModel.getTabsInGroup(groupId2).size()); + assertTrue(mCollectionModel.detachedTabGroupExistsForTesting(groupId1)); + // The group is detached, but not closed yet. The tabGroupExists check is based + // on number of tabs so it will be false. + assertFalse(mCollectionModel.tabGroupExists(groupId1)); + assertTabsInOrderAre(List.of(tab2, tab3, tab0, tab1)); + }); + + showUndoSnackbarHelper.waitForOnly(); + assertNotNull(undoGroupMetadataRef.get()); + + ThreadUtils.runOnUiThreadBlocking( + () -> { + mCollectionModel.performUndoGroupOperation(undoGroupMetadataRef.get()); + + // State should be restored. + Token groupId1 = tab0.getTabGroupId(); + Token groupId2 = tab2.getTabGroupId(); + assertNotNull(groupId1); + assertNotNull(groupId2); + assertNotEquals(groupId1, groupId2); + assertEquals(groupId1, tab1.getTabGroupId()); + assertEquals(groupId2, tab3.getTabGroupId()); + assertEquals(2, mCollectionModel.getTabsInGroup(groupId1).size()); + assertEquals(2, mCollectionModel.getTabsInGroup(groupId2).size()); + assertTabsInOrderAre(List.of(tab0, tab1, tab2, tab3)); + }); + } + + @Test + @MediumTest + public void testUndoGroupOperation_SingleTabIntoGroup() throws Exception { + Tab tab0 = getTabAt(0); + Tab tab1 = createTab(); + Tab tab2 = createTab(); + assertTabsInOrderAre(List.of(tab0, tab1, tab2)); + + AtomicReference<UndoGroupMetadata> undoGroupMetadataRef = new AtomicReference<>(); + CallbackHelper showUndoSnackbarHelper = new CallbackHelper(); + + ThreadUtils.runOnUiThreadBlocking( + () -> { + // Create group with tab1, tab2. + mCollectionModel.mergeListOfTabsToGroup( + List.of(tab1, tab2), tab1, /* notify= */ false); + Token groupId = tab1.getTabGroupId(); + assertNotNull(groupId); + assertTabsInOrderAre(List.of(tab0, tab1, tab2)); + + TabGroupModelFilterObserver observer = + new TabGroupModelFilterObserver() { + @Override + public void showUndoGroupSnackbar( + UndoGroupMetadata undoGroupMetadata) { + undoGroupMetadataRef.set(undoGroupMetadata); + showUndoSnackbarHelper.notifyCalled(); + } + }; + mCollectionModel.addTabGroupObserver(observer); + + // Merge tab0 into the group. + mCollectionModel.mergeListOfTabsToGroup( + List.of(tab0), tab1, /* notify= */ true); + + mCollectionModel.removeTabGroupObserver(observer); + + assertEquals(groupId, tab0.getTabGroupId()); + assertEquals(3, mCollectionModel.getTabsInGroup(groupId).size()); + assertTabsInOrderAre(List.of(tab1, tab2, tab0)); + }); + + showUndoSnackbarHelper.waitForOnly(); + assertNotNull(undoGroupMetadataRef.get()); + + ThreadUtils.runOnUiThreadBlocking( + () -> { + mCollectionModel.performUndoGroupOperation(undoGroupMetadataRef.get()); + + // State should be restored. + Token groupId = tab1.getTabGroupId(); + assertNull(tab0.getTabGroupId()); + assertNotNull(groupId); + assertEquals(groupId, tab2.getTabGroupId()); + assertEquals(2, mCollectionModel.getTabsInGroup(groupId).size()); + assertTabsInOrderAre(List.of(tab0, tab1, tab2)); + }); + } + + @Test + @MediumTest + public void testUndoGroupOperationExpired() throws Exception { + Tab tab0 = getTabAt(0); + Tab tab1 = createTab(); + Tab tab2 = createTab(); + assertTabsInOrderAre(List.of(tab0, tab1, tab2)); + + AtomicReference<UndoGroupMetadata> undoGroupMetadataRef = new AtomicReference<>(); + AtomicReference<Token> groupId1Ref = new AtomicReference<>(); + CallbackHelper showUndoSnackbarHelper = new CallbackHelper(); + final String group1Title = "Group 1 Title"; + + ThreadUtils.runOnUiThreadBlocking( + () -> { + // Create group 1 with tab0. + mCollectionModel.createSingleTabGroup(tab0); + Token groupId1 = tab0.getTabGroupId(); + groupId1Ref.set(groupId1); + assertNotNull(groupId1); + mCollectionModel.setTabGroupTitle(groupId1, group1Title); + + // Create group 2 with tab1. + mCollectionModel.createSingleTabGroup(tab1); + Token groupId2 = tab1.getTabGroupId(); + assertNotNull(groupId2); + + TabGroupModelFilterObserver observer = + new TabGroupModelFilterObserver() { + @Override + public void showUndoGroupSnackbar( + UndoGroupMetadata undoGroupMetadata) { + undoGroupMetadataRef.set(undoGroupMetadata); + showUndoSnackbarHelper.notifyCalled(); + } + }; + mCollectionModel.addTabGroupObserver(observer); + + // Merge group 1 into group 2. + mCollectionModel.mergeListOfTabsToGroup(List.of(tab0), tab1, true); + mCollectionModel.removeTabGroupObserver(observer); + + // Group 1 is now detached. Its title should still be available. + assertEquals(group1Title, mCollectionModel.getTabGroupTitle(groupId1)); + }); + + showUndoSnackbarHelper.waitForOnly(); + assertNotNull(undoGroupMetadataRef.get()); + + ThreadUtils.runOnUiThreadBlocking( + () -> { + assertTrue( + mCollectionModel.detachedTabGroupExistsForTesting(groupId1Ref.get())); + + mCollectionModel.undoGroupOperationExpired(undoGroupMetadataRef.get()); + assertFalse( + mCollectionModel.detachedTabGroupExistsForTesting(groupId1Ref.get())); + }); + } + private void assertTabsInOrderAre(List<Tab> tabs) { assertEquals( "Mismatched tab count",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/TabSwitcherDrawableRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/TabSwitcherDrawableRenderTest.java index 19b464a..0c249d87 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/TabSwitcherDrawableRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/TabSwitcherDrawableRenderTest.java
@@ -111,7 +111,7 @@ ChromeTabbedActivity activity = mActivityTestRule.getActivity(); mActivityTestRule.loadUrlInNewTab(UrlConstants.NTP_URL, /* incognito= */ false); - NewTabPageTestUtils.waitForNtpLoaded(activity.getActivityTab()); + NewTabPageTestUtils.waitForNtpLoaded(mActivityTestRule.getActivityTab()); ThreadUtils.runOnUiThreadBlocking( () -> { @@ -128,7 +128,7 @@ ChromeTabbedActivity activity = mActivityTestRule.getActivity(); mActivityTestRule.loadUrlInNewTab(UrlConstants.NTP_URL, /* incognito= */ true); - NewTabPageTestUtils.waitForNtpLoaded(activity.getActivityTab()); + NewTabPageTestUtils.waitForNtpLoaded(mActivityTestRule.getActivityTab()); ThreadUtils.runOnUiThreadBlocking( () -> {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/ToolbarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/ToolbarTest.java index 882be65..04719d8 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/ToolbarTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/ToolbarTest.java
@@ -252,7 +252,7 @@ ApplicationProvider.getApplicationContext()); String testUrl = testServer.getURL(TEST_PAGE); - Tab tab = mActivity.getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // Load new tab page. mActivityTestRule.loadUrl(UrlConstants.NTP_URL); @@ -443,7 +443,7 @@ final ToolbarPhone toolbarPhone = (ToolbarPhone) mActivity.getToolbarManager().getToolbarLayoutForTesting(); - final View incognitoNtpView = mActivity.getActivityTab().getView(); + final View incognitoNtpView = mActivityTestRule.getActivityTab().getView(); setControlsPosition(ControlsPosition.TOP); verifyTopControlsAccessibilityOrder(toolbarPhone, incognitoNtpView); @@ -459,7 +459,7 @@ final ToolbarPhone toolbarPhone = (ToolbarPhone) mActivity.getToolbarManager().getToolbarLayoutForTesting(); - final View incognitoNtpView = mActivity.getActivityTab().getView(); + final View incognitoNtpView = mActivityTestRule.getActivityTab().getView(); setControlsPosition(ControlsPosition.BOTTOM); verifyBottomControlsAccessibilityOrder(toolbarPhone, incognitoNtpView); @@ -475,7 +475,7 @@ final ToolbarPhone toolbarPhone = (ToolbarPhone) mActivity.getToolbarManager().getToolbarLayoutForTesting(); - final View regularNtpView = mActivity.getActivityTab().getView(); + final View regularNtpView = mActivityTestRule.getActivityTab().getView(); setControlsPosition(ControlsPosition.BOTTOM); verifyAccessibilityOrderIsReset(toolbarPhone, regularNtpView); @@ -489,7 +489,7 @@ mActivityTestRule.loadUrlInNewTab(UrlConstants.NTP_URL, true); - final Tab incognitoNtpTab = mActivity.getActivityTab(); + final Tab incognitoNtpTab = mActivityTestRule.getActivityTab(); ToolbarPhone toolbarPhone = (ToolbarPhone) mActivity.getToolbarManager().getToolbarLayoutForTesting(); @@ -503,7 +503,8 @@ ThreadUtils.runOnUiThreadBlocking(mActivity::onBackPressed); CriteriaHelper.pollUiThread( () -> { - Criteria.checkThat(mActivity.getActivityTab(), Matchers.is(incognitoNtpTab)); + Criteria.checkThat( + mActivityTestRule.getActivityTab(), Matchers.is(incognitoNtpTab)); }); NewTabPageTestUtils.waitForNtpLoaded(incognitoNtpTab); @@ -532,7 +533,8 @@ }); CriteriaHelper.pollUiThread( () -> { - Criteria.checkThat(mActivity.getActivityTab(), Matchers.is(incognitoNtpTab)); + Criteria.checkThat( + mActivityTestRule.getActivityTab(), Matchers.is(incognitoNtpTab)); }); NewTabPageTestUtils.waitForNtpLoaded(incognitoNtpTab);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuBatchedPTTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuBatchedPTTest.java index dc649156..6cfc65a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuBatchedPTTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuBatchedPTTest.java
@@ -9,6 +9,7 @@ import static org.junit.Assert.assertTrue; import static org.chromium.base.test.transit.TransitAsserts.assertFinalDestination; +import static org.chromium.chrome.test.util.ChromeTabUtils.getTabCountOnUiThread; import androidx.test.filters.LargeTest; @@ -60,7 +61,7 @@ TabSwitcherActionMenuFacility actionMenu = blankPage.openTabSwitcherActionMenu(); RegularTabSwitcherStation tabSwitcher = actionMenu.selectCloseTabAndDisplayTabSwitcher(); - assertEquals(0, getCurrentTabModel().getCount()); + assertEquals(0, getTabCountOnUiThread(getCurrentTabModel())); blankPage = tabSwitcher.openNewTab().loadAboutBlank(); assertFinalDestination(blankPage); @@ -76,7 +77,7 @@ RegularNewTabPageStation ntp = actionMenu.selectNewTab(); assertFalse(getTabModelSelector().isIncognitoSelected()); - assertEquals(2, getCurrentTabModel().getCount()); + assertEquals(2, getTabCountOnUiThread(getCurrentTabModel())); // Return to one non-incognito blank tab actionMenu = ntp.openTabSwitcherActionMenu(); @@ -94,7 +95,7 @@ IncognitoNewTabPageStation incognitoNtp = actionMenu.selectNewIncognitoTab(); assertTrue(getTabModelSelector().isIncognitoSelected()); - assertEquals(1, getCurrentTabModel().getCount()); + assertEquals(1, getTabCountOnUiThread(getCurrentTabModel())); // Return to one non-incognito blank tab actionMenu = incognitoNtp.openTabSwitcherActionMenu(); @@ -113,8 +114,8 @@ TabModel regularTabModel = getTabModelSelector().getModel(/* incognito= */ false); TabModel incognitoTabModel = getTabModelSelector().getModel(/* incognito= */ true); - assertEquals(2, regularTabModel.getCount()); - assertEquals(1, incognitoTabModel.getCount()); + assertEquals(2, getTabCountOnUiThread(regularTabModel)); + assertEquals(1, getTabCountOnUiThread(incognitoTabModel)); // Close second regular tab opened. TabSwitcherActionMenuFacility actionMenu = ntp.openTabSwitcherActionMenu(); @@ -126,8 +127,8 @@ actionMenu.selectCloseTabAndDisplayTabSwitcher(); // Only the incognito tab should still remain. - assertEquals(0, regularTabModel.getCount()); - assertEquals(1, incognitoTabModel.getCount()); + assertEquals(0, getTabCountOnUiThread(regularTabModel)); + assertEquals(1, getTabCountOnUiThread(incognitoTabModel)); // Return to one non-incognito blank tab IncognitoTabSwitcherStation incognitoTabSwitcher =
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuPTTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuPTTest.java index 7e01c389..e072e69 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuPTTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuPTTest.java
@@ -9,6 +9,7 @@ import static org.junit.Assert.assertTrue; import static org.chromium.base.test.transit.TransitAsserts.assertFinalDestination; +import static org.chromium.chrome.test.util.ChromeTabUtils.getTabCountOnUiThread; import androidx.test.filters.LargeTest; @@ -59,7 +60,7 @@ RegularNewTabPageStation ntp = actionMenu.selectNewTab(); assertFalse(getTabModelSelector().isIncognitoSelected()); - assertEquals(2, getCurrentTabModel().getCount()); + assertEquals(2, getTabCountOnUiThread(getCurrentTabModel())); assertFinalDestination(ntp); } @@ -73,7 +74,7 @@ IncognitoNewTabPageStation incognitoNtp = actionMenu.selectNewIncognitoTab(); assertTrue(getTabModelSelector().isIncognitoSelected()); - assertEquals(1, getCurrentTabModel().getCount()); + assertEquals(1, getTabCountOnUiThread(getCurrentTabModel())); assertFinalDestination(incognitoNtp); } @@ -86,7 +87,7 @@ TabSwitcherActionMenuFacility actionMenu = page.openTabSwitcherActionMenu(); RegularTabSwitcherStation tabSwitcher = actionMenu.selectCloseTabAndDisplayTabSwitcher(); - assertEquals(0, getCurrentTabModel().getCount()); + assertEquals(0, getTabCountOnUiThread(getCurrentTabModel())); assertFinalDestination(tabSwitcher); } @@ -101,8 +102,8 @@ TabModel regularTabModel = getTabModelSelector().getModel(/* incognito= */ false); TabModel incognitoTabModel = getTabModelSelector().getModel(/* incognito= */ true); - assertEquals(2, regularTabModel.getCount()); - assertEquals(1, incognitoTabModel.getCount()); + assertEquals(2, getTabCountOnUiThread(regularTabModel)); + assertEquals(1, getTabCountOnUiThread(incognitoTabModel)); // Close second regular tab opened. TabSwitcherActionMenuFacility actionMenu = ntp.openTabSwitcherActionMenu(); @@ -113,8 +114,8 @@ RegularTabSwitcherStation tabSwitcher = actionMenu.selectCloseTabAndDisplayTabSwitcher(); // Only the incognito tab should still remain. - assertEquals(0, regularTabModel.getCount()); - assertEquals(1, incognitoTabModel.getCount()); + assertEquals(0, getTabCountOnUiThread(regularTabModel)); + assertEquals(1, getTabCountOnUiThread(incognitoTabModel)); assertFinalDestination(tabSwitcher); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhoneTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhoneTest.java index a879991e..6e1d876 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhoneTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhoneTest.java
@@ -539,7 +539,7 @@ // Load the new tab page. mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(tab); assertEquals(true, mToolbar.isLocationBarShownInNtp()); assertEquals(homeSurfaceToolbarBackgroundColor, toolbarBackgroundDrawable.getColor()); @@ -569,7 +569,7 @@ // Load the new tab page. mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(tab); assertEquals(true, mToolbar.isLocationBarShownInNtp()); ThreadUtils.runOnUiThreadBlocking( @@ -611,7 +611,7 @@ // Load the new tab page. mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(tab); assertEquals(true, mToolbar.isLocationBarShownInGeneralNtp()); assertEquals(homeSurfaceToolbarBackgroundColor, toolbarBackgroundDrawable.getColor()); @@ -645,7 +645,7 @@ // Load the new tab page. mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(tab); ViewGroup fakeSearchBox = mActivityTestRule.getActivity().findViewById(R.id.search_box); assertEquals(true, mToolbar.isLocationBarShownInGeneralNtp()); @@ -678,7 +678,7 @@ // Load the new tab page. mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(tab); ViewGroup fakeSearchBox = mActivityTestRule.getActivity().findViewById(R.id.search_box); assertEquals(true, mToolbar.isLocationBarShownInGeneralNtp()); @@ -695,7 +695,7 @@ public void testFocusAnimation_optionalButtonRestored() { mToolbar.setOptionalButtonCoordinatorForTesting(mOptionalButtonCoordinator); mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(tab); assertEquals(true, mToolbar.isLocationBarShownInNtp()); @@ -736,7 +736,7 @@ }); mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(tab); assertEquals(true, mToolbar.isLocationBarShownInNtp()); @@ -813,7 +813,7 @@ public void testNtpAnimation_onGTSExit() { // Load NTP mActivityTestRule.loadUrl(UrlConstants.NTP_URL); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); NewTabPageTestUtils.waitForNtpLoaded(tab); // Location bar alpha is 0 when NTP is shown. assertEquals(0f, mToolbar.getLocationBar().getContainerView().getAlpha(), EPSILON);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ui/MediaCaptureOverlayControllerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ui/MediaCaptureOverlayControllerTest.java index afc3b17..3130e39 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/ui/MediaCaptureOverlayControllerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ui/MediaCaptureOverlayControllerTest.java
@@ -65,7 +65,7 @@ public Tab openNewTab() { // Launch a new tab in the foreground. ChromeTabUtils.newTabFromMenu(InstrumentationRegistry.getInstrumentation(), mActivity); - return mActivity.getActivityTab(); + return mActivityTestRule.getActivityTab(); } public void waitForOverlayVisibility(boolean visible) { @@ -82,7 +82,7 @@ @SmallTest @Restriction(DeviceFormFactor.PHONE) public void testSimpleCapture() { - Tab tab = mActivity.getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // Before capture starts the overlay should not be visible. waitForOverlayVisibility(false); @@ -100,7 +100,7 @@ @SmallTest @Restriction(DeviceFormFactor.PHONE) public void testShowHideWithOverview() throws TimeoutException { - Tab tab = mActivity.getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // Start capturing the tab and assert that the overlay is visible. ThreadUtils.runOnUiThreadBlocking(() -> mController.startCapture(tab)); @@ -120,7 +120,7 @@ @SmallTest @Restriction(DeviceFormFactor.PHONE) public void testCloseTabStopsOverlay() { - Tab tab = mActivity.getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); // Start capturing the tab and assert that the overlay is visible. ThreadUtils.runOnUiThreadBlocking(() -> mController.startCapture(tab)); @@ -135,7 +135,7 @@ @SmallTest @Restriction(DeviceFormFactor.PHONE) public void testSwitchToNonCapturedTab() throws TimeoutException { - Tab firstTab = mActivity.getActivityTab(); + Tab firstTab = mActivityTestRule.getActivityTab(); // Start capturing the tab and assert that the overlay is visible. ThreadUtils.runOnUiThreadBlocking(() -> mController.startCapture(firstTab)); @@ -150,7 +150,7 @@ @SmallTest @Restriction(DeviceFormFactor.PHONE) public void testStopOtherCapturedTab() throws TimeoutException { - Tab firstTab = mActivity.getActivityTab(); + Tab firstTab = mActivityTestRule.getActivityTab(); // Start capturing the tab and assert that the overlay is visible. ThreadUtils.runOnUiThreadBlocking(() -> mController.startCapture(firstTab));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/usage_stats/TabSuspensionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/usage_stats/TabSuspensionTest.java index 138d98e..4ed37cd 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/usage_stats/TabSuspensionTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/usage_stats/TabSuspensionTest.java
@@ -171,7 +171,7 @@ // completing, and loadUrlInNewTab expects loading to succeed. ChromeTabUtils.newTabFromMenu( InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); - Tab tab2 = mActivity.getActivityTab(); + Tab tab2 = ThreadUtils.runOnUiThreadBlocking(() -> mActivity.getActivityTab()); startLoadingUrl(tab2, mDifferentUrl); waitForSuspendedTabToShow(tab2, DIFFERENT_FQDN); @@ -182,7 +182,10 @@ public void testTabSwitchBackToSuspended() { mActivityTestRule.loadUrl(mStartingUrl); final int originalTabIndex = - mActivity.getTabModelSelector().getCurrentModel().indexOf(mTab); + ThreadUtils.runOnUiThreadBlocking( + () -> { + return mActivity.getTabModelSelector().getCurrentModel().indexOf(mTab); + }); mActivityTestRule.loadUrlInNewTab(mDifferentUrl); doReturn(true).when(mSuspensionTracker).isWebsiteSuspended(STARTING_FQDN); @@ -321,7 +324,9 @@ R.id.open_in_browser_id); MultiWindowTestHelper.waitForTabs("CustomTab", mActivity, 2, Tab.INVALID_TAB_ID); - waitForSuspendedTabToShow(mActivity.getActivityTab(), STARTING_FQDN); + waitForSuspendedTabToShow( + ThreadUtils.runOnUiThreadBlocking(() -> mActivity.getActivityTab()), + STARTING_FQDN); } @Test @@ -350,7 +355,8 @@ startLoadingUrl(mTab, mStartingUrl); waitForSuspendedTabToShow(mTab, STARTING_FQDN); final int originalTabIndex = - mActivity.getTabModelSelector().getCurrentModel().indexOf(mTab); + ThreadUtils.runOnUiThreadBlocking( + () -> mActivity.getTabModelSelector().getCurrentModel().indexOf(mTab)); ThreadUtils.runOnUiThreadBlocking( () -> { @@ -408,7 +414,7 @@ // completing, and loadUrlInNewTab expects loading to succeed. ChromeTabUtils.newTabFromMenu( InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); - Tab tab2 = mActivity.getActivityTab(); + Tab tab2 = ThreadUtils.runOnUiThreadBlocking(() -> mActivity.getActivityTab()); startLoadingUrl(tab2, mStartingUrl); waitForSuspendedTabToShow(tab2, STARTING_FQDN);
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManagerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManagerTest.java index b4adc42..dbdb7d88 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManagerTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManagerTest.java
@@ -12,7 +12,6 @@ import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; @@ -31,8 +30,6 @@ import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; -import org.chromium.base.Callback; -import org.chromium.base.UnownedUserDataHost; import org.chromium.base.UserDataHost; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.Feature; @@ -49,8 +46,6 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabObserver; import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarButtonVariant; -import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; -import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManagerProvider; import org.chromium.components.dom_distiller.core.DomDistillerFeatures; import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils; import org.chromium.components.dom_distiller.core.DomDistillerUrlUtilsJni; @@ -67,7 +62,6 @@ import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.WebContentsObserver; import org.chromium.content_public.browser.test.mock.MockWebContents; -import org.chromium.ui.base.WindowAndroid; import org.chromium.url.GURL; import org.chromium.url.JUnitTestGURLs; @@ -92,8 +86,6 @@ @Mock private UserPrefs.Natives mUserPrefsJniMock; @Mock private PrefService mPrefService; @Mock private UkmRecorder.Natives mUkmRecorderJniMock; - @Mock private WindowAndroid mWindowAndroid; - @Mock private SnackbarManager mSnackbarManager; @Captor private ArgumentCaptor<TabObserver> mTabObserverCaptor; private TabObserver mTabObserver; @@ -104,10 +96,7 @@ @Captor private ArgumentCaptor<WebContentsObserver> mWebContentsObserverCaptor; private WebContentsObserver mWebContentsObserver; - @Captor private ArgumentCaptor<Callback<Boolean>> mDistillationCallbackCaptor; - private UserDataHost mUserDataHost; - private UnownedUserDataHost mUnownedUserDataHost; private ReaderModeManager mManager; @Before @@ -122,11 +111,6 @@ mUserDataHost = new UserDataHost(); mUserDataHost.setUserData(TabDistillabilityProvider.USER_DATA_KEY, mDistillabilityProvider); - mUnownedUserDataHost = new UnownedUserDataHost(); - when(mWindowAndroid.getUnownedUserDataHost()).thenReturn(mUnownedUserDataHost); - SnackbarManagerProvider.attach(mWindowAndroid, mSnackbarManager); - - when(mTab.getWindowAndroid()).thenReturn(mWindowAndroid); when(mTab.getUserDataHost()).thenReturn(mUserDataHost); when(mTab.getWebContents()).thenReturn(mWebContents); when(mTab.getUrl()).thenReturn(MOCK_URL); @@ -545,34 +529,6 @@ assertEquals(1, userActionTester.getActionCount("MobileReaderModeHidden")); } - @Test - @Feature("ReaderMode") - @EnableFeatures({DomDistillerFeatures.READER_MODE_DISTILL_IN_APP}) - public void testDistillationSuccess_noSnackbar() { - when(mTab.getWebContents()).thenReturn(mWebContents); - - mManager.navigateToReaderMode(); - verify(mDistillerTabUtilsJniMock) - .distillCurrentPageAndViewIfSuccessful( - any(), mDistillationCallbackCaptor.capture()); - mDistillationCallbackCaptor.getValue().onResult(true); - verify(mSnackbarManager, times(0)).showSnackbar(any()); - } - - @Test - @Feature("ReaderMode") - @EnableFeatures({DomDistillerFeatures.READER_MODE_DISTILL_IN_APP}) - public void testDistillationFailure_showSnackbar() { - when(mTab.getWebContents()).thenReturn(mWebContents); - - mManager.navigateToReaderMode(); - verify(mDistillerTabUtilsJniMock) - .distillCurrentPageAndViewIfSuccessful( - any(), mDistillationCallbackCaptor.capture()); - mDistillationCallbackCaptor.getValue().onResult(false); - verify(mSnackbarManager).showSnackbar(any()); - } - /** * @param index The index of the entry. * @param url The URL the entry represents.
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegateUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegateUnitTest.java index 728d7a8..9913095 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegateUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegateUnitTest.java
@@ -166,6 +166,7 @@ DomDistillerFeatures.READER_MODE_IMPROVEMENTS, DomDistillerFeatures.READER_MODE_DISTILL_IN_APP }) +@EnableFeatures({ChromeFeatureList.PROPAGATE_DEVICE_CONTENT_FILTERS_TO_SUPERVISED_USER}) public class TabbedAppMenuPropertiesDelegateUnitTest { // Constants defining flags that determines multi-window menu items visibility. private static final boolean TAB_M = true; // multiple tabs
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index bff17b5d..369d21280 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -5175,7 +5175,7 @@ <ph name="EXTENSION_NAME">$1<ex>Adblock</ex></ph> is disabled </message> - <if expr="enable_extensions"> + <if expr="enable_extensions_core"> <!-- Extension blocked action bubble --> <message name="IDS_EXTENSION_SITE_RELOAD_PAGE_BUBBLE_HEADING" desc="Heading of the bubble to tell users that in order to run or not run an extension, they'll need to refresh the page. Deliberately similar to IDS_PAGE_INFO_INFOBAR_TEXT, but used for an different permission setting so they are not combined. If updating the one, please update the other or consult the extensions and privacy teams."> Reload this page to apply your updated settings on this site
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index a0b2c5d4..ccd8d56 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -3326,8 +3326,6 @@ constexpr char kBorealisScaleClientByDPIInternalName[] = "borealis-scale-client-by-dpi"; constexpr char kBorealisZinkGlDriverInternalName[] = "borealis-zink-gl-driver"; -constexpr char kClipboardHistoryLongpressInternalName[] = - "clipboard-history-longpress"; constexpr char kBluetoothUseFlossInternalName[] = "bluetooth-use-floss"; constexpr char kBluetoothUseLLPrivacyInternalName[] = "bluetooth-use-llprivacy"; constexpr char kAssistantIphInternalName[] = "assistant-iph"; @@ -9011,10 +9009,7 @@ FEATURE_VALUE_TYPE(content_settings::features::kTrackingProtection3pcd)}, #if BUILDFLAG(IS_CHROMEOS) - {kClipboardHistoryLongpressInternalName, - flag_descriptions::kClipboardHistoryLongpressName, - flag_descriptions::kClipboardHistoryLongpressDescription, kOsCrOS, - FEATURE_VALUE_TYPE(ash::features::kClipboardHistoryLongpress)}, + #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_WIN) @@ -9294,6 +9289,16 @@ FEATURE_VALUE_TYPE(chrome::android::kIncognitoScreenshot)}, #endif + {"increment-local-surface-id-for-mainframe-same-doc-navigation", + flag_descriptions:: + kIncrementLocalSurfaceIdForMainframeSameDocNavigationName, + flag_descriptions:: + kIncrementLocalSurfaceIdForMainframeSameDocNavigationDescription, + kOsAndroid, + FEATURE_VALUE_TYPE( + blink::features:: + kIncrementLocalSurfaceIdForMainframeSameDocNavigation)}, + {"enable-speculation-rules-prerendering-target-hint", flag_descriptions::kSpeculationRulesPrerenderingTargetHintName, flag_descriptions::kSpeculationRulesPrerenderingTargetHintDescription, @@ -11990,6 +11995,11 @@ FEATURE_WITH_PARAMS_VALUE_TYPE(features::kGlicPanelResetOnSessionTimeout, kGlicPanelResetOnSessionTimeoutVariations, "GlicPanelResetOnSessionTimeout")}, + {"glic-panel-reset-size-and-location-on-open", + flag_descriptions::kGlicPanelResetSizeAndLocationName, + flag_descriptions::kGlicPanelResetSizeAndLocationDescription, + kOsMac | kOsWin | kOsLinux, + FEATURE_VALUE_TYPE(features::kGlicPanelResetSizeAndLocationOnOpen)}, {"glic-pre-warming", flag_descriptions::kGlicWarmingName, flag_descriptions::kGlicWarmingDescription, kOsMac | kOsWin | kOsLinux, FEATURE_WITH_PARAMS_VALUE_TYPE(features::kGlicWarming, @@ -13013,15 +13023,13 @@ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \ BUILDFLAG(IS_CHROMEOS) - {"autofill-enable-buy-now-pay-later-for-externally-linked-klarna", + {"autofill-enable-buy-now-pay-later-for-externally-linked", + flag_descriptions::kAutofillEnableBuyNowPayLaterForExternallyLinkedName, flag_descriptions:: - kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarnaName, - flag_descriptions:: - kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarnaDescription, + kAutofillEnableBuyNowPayLaterForExternallyLinkedDescription, kOsDesktop, FEATURE_VALUE_TYPE( - autofill::features:: - kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarna)}, + autofill::features::kAutofillEnableBuyNowPayLaterForExternallyLinked)}, #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_ANDROID) @@ -13321,15 +13329,6 @@ channel != version_info::Channel::UNKNOWN); } - // Only show clipboard history longpress flag if channel is one of - // Beta/Dev/Canary/Unknown. - if (!strcmp(kClipboardHistoryLongpressInternalName, entry.internal_name)) { - return channel != version_info::Channel::BETA && - channel != version_info::Channel::DEV && - channel != version_info::Channel::CANARY && - channel != version_info::Channel::UNKNOWN; - } - // Disable and prevent users from enabling LL privacy on boards that were // explicitly built without floss or hardware does not support LL privacy. if (!strcmp(kBluetoothUseLLPrivacyInternalName, entry.internal_name)) {
diff --git a/chrome/browser/accessibility/media_app/ax_media_app_untrusted_service.cc b/chrome/browser/accessibility/media_app/ax_media_app_untrusted_service.cc index 1e90852..75c75fcd 100644 --- a/chrome/browser/accessibility/media_app/ax_media_app_untrusted_service.cc +++ b/chrome/browser/accessibility/media_app/ax_media_app_untrusted_service.cc
@@ -35,31 +35,27 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "ui/accessibility/ax_action_data.h" #include "ui/accessibility/ax_action_handler_registry.h" -#include "ui/accessibility/ax_enum_util.h" #include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_node.h" #include "ui/accessibility/ax_node_data.h" -#include "ui/accessibility/ax_node_id_forward.h" #include "ui/accessibility/ax_node_position.h" #include "ui/accessibility/ax_tree.h" #include "ui/accessibility/ax_tree_id.h" #include "ui/accessibility/ax_tree_manager.h" #include "ui/accessibility/ax_tree_serializer.h" #include "ui/accessibility/ax_updates_and_events.h" -#include "ui/accessibility/platform/inspect/ax_inspect.h" #include "ui/base/l10n/l10n_util.h" #include "ui/display/screen.h" -#include "ui/events/types/event_type.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/rect_f.h" #include "ui/gfx/geometry/transform.h" +#include "ui/native_window_tracker/native_window_tracker.h" #include "ui/strings/grit/auto_image_annotation_strings.h" #if defined(USE_AURA) #include "extensions/browser/api/automation_internal/automation_event_router.h" #include "ui/accessibility/ax_event.h" #include "ui/aura/env.h" -#include "ui/aura/window.h" #endif // defined(USE_AURA) namespace ash { @@ -89,6 +85,7 @@ mojo::PendingRemote<media_app_ui::mojom::OcrUntrustedPage> page) : browser_context_(context), native_window_(native_window), + native_window_tracker_(ui::NativeWindowTracker::Create(native_window)), media_app_page_(std::move(page)) { // Unretained is safe because `this` owns the subscription. accessibility_status_subscription_ = @@ -1479,7 +1476,7 @@ AXMediaAppUntrustedService::MakeTransformFromOffsetAndScale() const { auto transform = std::make_unique<gfx::Transform>(); float device_pixel_ratio = 1.0f; - if (native_window_ && !native_window_->is_destroying()) { + if (native_window_ && !native_window_tracker_->WasNativeWindowDestroyed()) { const auto maybe_device_pixel_ratio = display::Screen::GetScreen()->GetPreferredScaleFactorForWindow( native_window_);
diff --git a/chrome/browser/accessibility/media_app/ax_media_app_untrusted_service.h b/chrome/browser/accessibility/media_app/ax_media_app_untrusted_service.h index e416236..7740e14 100644 --- a/chrome/browser/accessibility/media_app/ax_media_app_untrusted_service.h +++ b/chrome/browser/accessibility/media_app/ax_media_app_untrusted_service.h
@@ -65,6 +65,7 @@ struct AXActionData; class AXNode; struct AXUpdatesAndEvents; +class NativeWindowTracker; class RectF; } // namespace ui @@ -195,6 +196,7 @@ // This `BrowserContext` will always outlive the WebUI, so this is safe. raw_ref<content::BrowserContext> browser_context_; gfx::NativeWindow native_window_; + std::unique_ptr<ui::NativeWindowTracker> native_window_tracker_; mojo::Remote<media_app_ui::mojom::OcrUntrustedPage> media_app_page_; gfx::RectF viewport_box_; float scale_factor_ = 0.0f;
diff --git a/chrome/browser/actor/BUILD.gn b/chrome/browser/actor/BUILD.gn index 86856635..e5f0590 100644 --- a/chrome/browser/actor/BUILD.gn +++ b/chrome/browser/actor/BUILD.gn
@@ -36,6 +36,7 @@ "tools/select_tool_request.h", "tools/tab_management_tool_request.h", "tools/tool_controller.h", + "tools/tool_delegate.h", "tools/tool_request.h", "tools/type_tool_request.h", "tools/wait_tool_request.h", @@ -45,6 +46,7 @@ "//base", "//chrome/browser/actor/ui:states", "//chrome/browser/page_content_annotations:fetcher", + "//chrome/browser/password_manager/actor_login:service", "//chrome/browser/profiles", "//chrome/common", "//components/optimization_guide/content/browser",
diff --git a/chrome/browser/actor/execution_engine.cc b/chrome/browser/actor/execution_engine.cc index 88aabb8..c206f2e2 100644 --- a/chrome/browser/actor/execution_engine.cc +++ b/chrome/browser/actor/execution_engine.cc
@@ -28,6 +28,8 @@ #include "chrome/browser/actor/tools/tool_controller.h" #include "chrome/browser/actor/tools/tool_request.h" #include "chrome/browser/actor/ui/event_dispatcher.h" +#include "chrome/browser/password_manager/actor_login/actor_login_service.h" +#include "chrome/browser/password_manager/actor_login/actor_login_service_impl.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_navigator_params.h" @@ -106,7 +108,8 @@ void ExecutionEngine::SetOwner(ActorTask* task) { task_ = task; - tool_controller_ = std::make_unique<ToolController>(*task_, *journal_); + actor_login_service_ = std::make_unique<actor_login::ActorLoginServiceImpl>(); + tool_controller_ = std::make_unique<ToolController>(*task_, *this); } void ExecutionEngine::SetState(State state) { @@ -437,6 +440,19 @@ return actions_weak_ptr_factory_.GetWeakPtr(); } +AggregatedJournal& ExecutionEngine::GetJournal() { + return *journal_; +} + +actor_login::ActorLoginService& ExecutionEngine::GetActorLoginService() { + return *actor_login_service_; +} + +void ExecutionEngine::SetActorLoginServiceForTesting( + std::unique_ptr<actor_login::ActorLoginService> test_service) { + actor_login_service_ = std::move(test_service); +} + const ToolRequest& ExecutionEngine::GetNextAction() const { CHECK_LT(next_action_index_, action_sequence_.size()); return *action_sequence_.at(next_action_index_).get();
diff --git a/chrome/browser/actor/execution_engine.h b/chrome/browser/actor/execution_engine.h index 74db2ff..910bce6 100644 --- a/chrome/browser/actor/execution_engine.h +++ b/chrome/browser/actor/execution_engine.h
@@ -20,6 +20,8 @@ #include "chrome/browser/actor/aggregated_journal.h" #include "chrome/browser/actor/task_id.h" #include "chrome/browser/actor/tools/tool_controller.h" +#include "chrome/browser/actor/tools/tool_delegate.h" +#include "chrome/browser/password_manager/actor_login/actor_login_service.h" #include "chrome/common/actor.mojom-forward.h" #include "components/optimization_guide/proto/features/actions_data.pb.h" #include "components/tabs/public/tab_interface.h" @@ -48,7 +50,7 @@ } // Coordinates the execution of a multi-step task. -class ExecutionEngine { +class ExecutionEngine : public ToolDelegate { public: // State machine (success case) // @@ -79,7 +81,7 @@ ExecutionEngine(Profile* profile, tabs::TabInterface* tab); ExecutionEngine(const ExecutionEngine&) = delete; ExecutionEngine& operator=(const ExecutionEngine&) = delete; - ~ExecutionEngine(); + ~ExecutionEngine() override; static std::unique_ptr<ExecutionEngine> CreateForTesting( Profile* profile, @@ -113,6 +115,13 @@ // Invalidated anytime `action_sequence_` is reset. base::WeakPtr<ExecutionEngine> GetWeakPtr(); + // ToolDelegate: + AggregatedJournal& GetJournal() override; + actor_login::ActorLoginService& GetActorLoginService() override; + + void SetActorLoginServiceForTesting( + std::unique_ptr<actor_login::ActorLoginService> test_service); + static std::string StateToString(State state); private: @@ -174,6 +183,7 @@ // Created when task_ is set. Handles execution details for an individual tool // request. std::unique_ptr<ToolController> tool_controller_; + std::unique_ptr<actor_login::ActorLoginService> actor_login_service_; std::unique_ptr<ui::UiEventDispatcher> ui_event_dispatcher_; std::vector<std::unique_ptr<ToolRequest>> action_sequence_;
diff --git a/chrome/browser/actor/tools/attempt_login_tool.cc b/chrome/browser/actor/tools/attempt_login_tool.cc index ecb1aad7..88c44b1 100644 --- a/chrome/browser/actor/tools/attempt_login_tool.cc +++ b/chrome/browser/actor/tools/attempt_login_tool.cc
@@ -8,9 +8,13 @@ #include "chrome/browser/actor/actor_task.h" #include "chrome/browser/actor/tools/observation_delay_controller.h" #include "chrome/browser/actor/tools/tool_callbacks.h" +#include "chrome/browser/password_manager/actor_login/actor_login_service.h" #include "chrome/common/actor/action_result.h" #include "content/public/browser/web_contents.h" +// TODO(crbug.com/427817201): Throughout this file replace +// ActionResultCode::kError with new error codes. + namespace actor { namespace { @@ -19,12 +23,35 @@ return *tab_handle.Get()->GetContents()->GetPrimaryMainFrame(); } +mojom::ActionResultCode LoginErrorToActorError( + actor_login::ActorLoginError login_error) { + switch (login_error) { + case actor_login::ActorLoginError::kServiceBusy: + return mojom::ActionResultCode::kError; + case actor_login::ActorLoginError::kInvalidTabInterface: + return mojom::ActionResultCode::kTabWentAway; + case actor_login::ActorLoginError::kUnknown: + default: + return mojom::ActionResultCode::kError; + } +} + +mojom::ActionResultCode LoginResultToActorResult( + actor_login::LoginStatusResult login_result) { + switch (login_result) { + case actor_login::LoginStatusResult::kSuccessUsernameAndPasswordFilled: + return mojom::ActionResultCode::kOk; + case actor_login::LoginStatusResult::kErrorNoSigninForm: + return mojom::ActionResultCode::kError; + } +} + } // namespace AttemptLoginTool::AttemptLoginTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, tabs::TabInterface& tab) - : Tool(task_id, journal), tab_handle_(tab.GetHandle()) {} + : Tool(task_id, tool_delegate), tab_handle_(tab.GetHandle()) {} AttemptLoginTool::~AttemptLoginTool() = default; @@ -33,9 +60,67 @@ } void AttemptLoginTool::Invoke(InvokeCallback callback) { - // TODO(crbug.com/427817201): Implement the tool. - NOTIMPLEMENTED(); - PostResponseTask(std::move(callback), MakeOkResult()); + tabs::TabInterface* tab = tab_handle_.Get(); + if (!tab) { + PostResponseTask(std::move(callback), + MakeResult(mojom::ActionResultCode::kTabWentAway)); + return; + } + + invoke_callback_ = std::move(callback); + GetActorLoginService().GetCredentials( + tab, base::BindOnce(&AttemptLoginTool::OnGetCredentials, + weak_ptr_factory_.GetWeakPtr())); +} + +void AttemptLoginTool::OnGetCredentials( + actor_login::CredentialsOrError credentials) { + if (!credentials.has_value()) { + PostResponseTask(std::move(invoke_callback_), + MakeResult(LoginErrorToActorError(credentials.error()))); + return; + } + + std::vector<actor_login::Credential> creds = credentials.value(); + if (creds.empty()) { + PostResponseTask(std::move(invoke_callback_), + MakeResult(mojom::ActionResultCode::kError)); + return; + } + + std::erase_if(creds, [](const actor_login::Credential& cred) { + return !cred.immediatelyAvailableToLogin; + }); + if (creds.empty()) { + PostResponseTask(std::move(invoke_callback_), + MakeResult(mojom::ActionResultCode::kError)); + return; + } + + tabs::TabInterface* tab = tab_handle_.Get(); + if (!tab) { + PostResponseTask(std::move(invoke_callback_), + MakeResult(mojom::ActionResultCode::kTabWentAway)); + return; + } + + // TODO(crbug.com/427817882): Ask the client to choose the credential. + GetActorLoginService().AttemptLogin( + tab, creds.front(), + base::BindOnce(&AttemptLoginTool::OnAttemptLogin, + weak_ptr_factory_.GetWeakPtr())); +} + +void AttemptLoginTool::OnAttemptLogin( + actor_login::LoginStatusResultOrError login_status) { + if (!login_status.has_value()) { + PostResponseTask(std::move(invoke_callback_), + MakeResult(LoginErrorToActorError(login_status.error()))); + return; + } + + PostResponseTask(std::move(invoke_callback_), + MakeResult(LoginResultToActorResult(login_status.value()))); } std::string AttemptLoginTool::DebugString() const { @@ -57,4 +142,8 @@ task.AddTab(tab_handle_, std::move(callback)); } +actor_login::ActorLoginService& AttemptLoginTool::GetActorLoginService() { + return tool_delegate().GetActorLoginService(); +} + } // namespace actor
diff --git a/chrome/browser/actor/tools/attempt_login_tool.h b/chrome/browser/actor/tools/attempt_login_tool.h index 2b062e4..7d52991 100644 --- a/chrome/browser/actor/tools/attempt_login_tool.h +++ b/chrome/browser/actor/tools/attempt_login_tool.h
@@ -5,7 +5,9 @@ #ifndef CHROME_BROWSER_ACTOR_TOOLS_ATTEMPT_LOGIN_TOOL_H_ #define CHROME_BROWSER_ACTOR_TOOLS_ATTEMPT_LOGIN_TOOL_H_ +#include "base/memory/weak_ptr.h" #include "chrome/browser/actor/tools/tool.h" +#include "chrome/browser/password_manager/actor_login/actor_login_service.h" #include "components/tabs/public/tab_interface.h" namespace actor { @@ -13,7 +15,7 @@ class AttemptLoginTool : public Tool { public: AttemptLoginTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, tabs::TabInterface& tab); ~AttemptLoginTool() override; @@ -28,7 +30,16 @@ InvokeCallback callback) const override; private: + void OnGetCredentials(actor_login::CredentialsOrError credentials); + void OnAttemptLogin(actor_login::LoginStatusResultOrError login_status); + + actor_login::ActorLoginService& GetActorLoginService(); + tabs::TabHandle tab_handle_; + + InvokeCallback invoke_callback_; + + base::WeakPtrFactory<AttemptLoginTool> weak_ptr_factory_{this}; }; } // namespace actor
diff --git a/chrome/browser/actor/tools/attempt_login_tool_browsertest.cc b/chrome/browser/actor/tools/attempt_login_tool_browsertest.cc index fd6fd5b..fc17d56 100644 --- a/chrome/browser/actor/tools/attempt_login_tool_browsertest.cc +++ b/chrome/browser/actor/tools/attempt_login_tool_browsertest.cc
@@ -2,10 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/actor/tools/attempt_login_tool.h" + +#include "base/strings/utf_string_conversions.h" #include "base/test/test_future.h" #include "chrome/browser/actor/actor_test_util.h" +#include "chrome/browser/actor/execution_engine.h" #include "chrome/browser/actor/tools/tool_request.h" #include "chrome/browser/actor/tools/tools_test_util.h" +#include "chrome/browser/password_manager/actor_login/actor_login_service.h" #include "chrome/common/actor.mojom.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" @@ -16,16 +21,197 @@ namespace { -// TODO(crbug.com/427817201): This tool is currently a no-op. Update this test -// to do something meaningful once the tool is actually implemented. -IN_PROC_BROWSER_TEST_F(ActorToolsTest, AttemptLoginTool) { - const GURL url = embedded_https_test_server().GetURL("/actor/blank.html"); +actor_login::Credential MakeTestCredential( + const std::u16string& username, + const GURL& url, + bool immediately_available_to_login) { + actor_login::Credential credential; + credential.username = username; + // TODO(crbug.com/427171031): Clarify the format. + credential.source_site_or_app = + base::UTF8ToUTF16(url.GetWithEmptyPath().spec()); + credential.type = actor_login::CredentialType::kPassword; + credential.immediatelyAvailableToLogin = immediately_available_to_login; + return credential; +} + +class MockActorLoginService : public actor_login::ActorLoginService { + public: + MockActorLoginService() = default; + ~MockActorLoginService() override = default; + + void GetCredentials(tabs::TabInterface* tab, + actor_login::CredentialsOrErrorReply callback) override { + std::move(callback).Run(credentials_); + } + + void AttemptLogin( + tabs::TabInterface* tab, + const actor_login::Credential& credential, + actor_login::LoginStatusResultOrErrorReply callback) override { + last_credential_used_ = credential; + std::move(callback).Run(login_status_); + } + + void SetCredentials(const actor_login::CredentialsOrError& credentials) { + credentials_ = credentials; + } + + void SetCredential(const actor_login::Credential& credential) { + SetCredentials(std::vector{credential}); + } + + void SetLoginStatus(actor_login::LoginStatusResultOrError login_status) { + login_status_ = login_status; + } + + const actor_login::Credential& last_credential_used() const { + return last_credential_used_; + } + + private: + actor_login::CredentialsOrError credentials_; + actor_login::LoginStatusResultOrError login_status_; + + actor_login::Credential last_credential_used_; +}; + +class ActorAttemptLoginToolTest : public ActorToolsTest { + public: + ActorAttemptLoginToolTest() = default; + ~ActorAttemptLoginToolTest() override = default; + + void SetUpOnMainThread() override { + ActorToolsTest::SetUpOnMainThread(); + execution_engine().SetActorLoginServiceForTesting( + std::make_unique<MockActorLoginService>()); + } + + MockActorLoginService& mock_login_service() { + return static_cast<MockActorLoginService&>( + execution_engine().GetActorLoginService()); + } +}; + +IN_PROC_BROWSER_TEST_F(ActorAttemptLoginToolTest, Basic) { + const GURL url = + embedded_https_test_server().GetURL("example.com", "/actor/blank.html"); + ASSERT_TRUE(content::NavigateToURL(web_contents(), url)); + + mock_login_service().SetCredential(MakeTestCredential( + u"username", url, /*immediately_available_to_login=*/true)); + mock_login_service().SetLoginStatus( + actor_login::LoginStatusResult::kSuccessUsernameAndPasswordFilled); + + std::unique_ptr<ToolRequest> action = MakeAttemptLoginRequest(*active_tab()); + TestFuture<mojom::ActionResultPtr, std::optional<size_t>> result; + actor_task().Act(ToRequestList(action), result.GetCallback()); + ExpectOkResult(result); + EXPECT_EQ(u"username", mock_login_service().last_credential_used().username); +} + +IN_PROC_BROWSER_TEST_F(ActorAttemptLoginToolTest, NoCredentials) { + const GURL url = + embedded_https_test_server().GetURL("example.com", "/actor/blank.html"); ASSERT_TRUE(content::NavigateToURL(web_contents(), url)); std::unique_ptr<ToolRequest> action = MakeAttemptLoginRequest(*active_tab()); TestFuture<mojom::ActionResultPtr, std::optional<size_t>> result; actor_task().Act(ToRequestList(action), result.GetCallback()); - EXPECT_TRUE(result.Wait()); + ExpectErrorResult(result, mojom::ActionResultCode::kError); +} + +IN_PROC_BROWSER_TEST_F(ActorAttemptLoginToolTest, MultipleCredentials) { + const GURL url = + embedded_https_test_server().GetURL("example.com", "/actor/blank.html"); + ASSERT_TRUE(content::NavigateToURL(web_contents(), url)); + + const bool immediately_available_to_login = true; + mock_login_service().SetCredentials(std::vector{ + MakeTestCredential(u"username1", url, immediately_available_to_login), + MakeTestCredential(u"username2", url, immediately_available_to_login)}); + mock_login_service().SetLoginStatus( + actor_login::LoginStatusResult::kSuccessUsernameAndPasswordFilled); + + std::unique_ptr<ToolRequest> action = MakeAttemptLoginRequest(*active_tab()); + TestFuture<mojom::ActionResultPtr, std::optional<size_t>> result; + actor_task().Act(ToRequestList(action), result.GetCallback()); + ExpectOkResult(result); + // TODO(crbug.com/427817882): We currently just choose the first credential. + // This test should be updated once the ability to select the credential is + // implemented. + EXPECT_EQ(u"username1", mock_login_service().last_credential_used().username); +} + +IN_PROC_BROWSER_TEST_F(ActorAttemptLoginToolTest, NoAvailableCredentials) { + const GURL url = + embedded_https_test_server().GetURL("example.com", "/actor/blank.html"); + ASSERT_TRUE(content::NavigateToURL(web_contents(), url)); + + mock_login_service().SetCredential(MakeTestCredential( + u"username", url, /*immediately_available_to_login=*/false)); + mock_login_service().SetLoginStatus( + actor_login::LoginStatusResult::kSuccessUsernameAndPasswordFilled); + + std::unique_ptr<ToolRequest> action = MakeAttemptLoginRequest(*active_tab()); + TestFuture<mojom::ActionResultPtr, std::optional<size_t>> result; + actor_task().Act(ToRequestList(action), result.GetCallback()); + ExpectErrorResult(result, mojom::ActionResultCode::kError); +} + +IN_PROC_BROWSER_TEST_F(ActorAttemptLoginToolTest, + MultipleCredentialsOnlyOneAvailable) { + const GURL url = + embedded_https_test_server().GetURL("example.com", "/actor/blank.html"); + ASSERT_TRUE(content::NavigateToURL(web_contents(), url)); + + mock_login_service().SetCredentials(std::vector{ + MakeTestCredential(u"username1", url, + /*immediately_available_to_login=*/false), + MakeTestCredential(u"username2", url, + /*immediately_available_to_login=*/true), + MakeTestCredential(u"username2", url, + /*immediately_available_to_login=*/false)}); + mock_login_service().SetLoginStatus( + actor_login::LoginStatusResult::kSuccessUsernameAndPasswordFilled); + + std::unique_ptr<ToolRequest> action = MakeAttemptLoginRequest(*active_tab()); + TestFuture<mojom::ActionResultPtr, std::optional<size_t>> result; + actor_task().Act(ToRequestList(action), result.GetCallback()); + ExpectOkResult(result); + EXPECT_EQ(u"username2", mock_login_service().last_credential_used().username); +} + +IN_PROC_BROWSER_TEST_F(ActorAttemptLoginToolTest, NoSigninForm) { + const GURL url = + embedded_https_test_server().GetURL("example.com", "/actor/blank.html"); + ASSERT_TRUE(content::NavigateToURL(web_contents(), url)); + + mock_login_service().SetCredential(MakeTestCredential( + u"username", url, /*immediately_available_to_login=*/true)); + mock_login_service().SetLoginStatus( + actor_login::LoginStatusResult::kErrorNoSigninForm); + + std::unique_ptr<ToolRequest> action = MakeAttemptLoginRequest(*active_tab()); + TestFuture<mojom::ActionResultPtr, std::optional<size_t>> result; + actor_task().Act(ToRequestList(action), result.GetCallback()); + ExpectErrorResult(result, mojom::ActionResultCode::kError); +} + +IN_PROC_BROWSER_TEST_F(ActorAttemptLoginToolTest, FailedAttemptLogin) { + const GURL url = + embedded_https_test_server().GetURL("example.com", "/actor/blank.html"); + ASSERT_TRUE(content::NavigateToURL(web_contents(), url)); + + mock_login_service().SetCredential(MakeTestCredential( + u"username", url, /*immediately_available_to_login=*/true)); + mock_login_service().SetLoginStatus( + base::unexpected(actor_login::ActorLoginError::kServiceBusy)); + + std::unique_ptr<ToolRequest> action = MakeAttemptLoginRequest(*active_tab()); + TestFuture<mojom::ActionResultPtr, std::optional<size_t>> result; + actor_task().Act(ToRequestList(action), result.GetCallback()); + ExpectErrorResult(result, mojom::ActionResultCode::kError); } } // namespace
diff --git a/chrome/browser/actor/tools/attempt_login_tool_request.cc b/chrome/browser/actor/tools/attempt_login_tool_request.cc index f85a0cc2..07187a3 100644 --- a/chrome/browser/actor/tools/attempt_login_tool_request.cc +++ b/chrome/browser/actor/tools/attempt_login_tool_request.cc
@@ -19,14 +19,14 @@ ToolRequest::CreateToolResult AttemptLoginToolRequest::CreateTool( TaskId task_id, - AggregatedJournal& journal) const { + ToolDelegate& tool_delegate) const { tabs::TabInterface* tab = GetTabHandle().Get(); if (!tab) { return {/*tool=*/nullptr, MakeResult(mojom::ActionResultCode::kTabWentAway, "The tab is no longer present.")}; } - return {std::make_unique<AttemptLoginTool>(task_id, journal, *tab), + return {std::make_unique<AttemptLoginTool>(task_id, tool_delegate, *tab), MakeOkResult()}; }
diff --git a/chrome/browser/actor/tools/attempt_login_tool_request.h b/chrome/browser/actor/tools/attempt_login_tool_request.h index ef8087b3..750f4977 100644 --- a/chrome/browser/actor/tools/attempt_login_tool_request.h +++ b/chrome/browser/actor/tools/attempt_login_tool_request.h
@@ -22,7 +22,7 @@ // ToolRequest: CreateToolResult CreateTool(TaskId task_id, - AggregatedJournal& journal) const override; + ToolDelegate& tool_delegate) const override; void Apply(ToolRequestVisitorFunctor& f) const override; std::string JournalEvent() const override; };
diff --git a/chrome/browser/actor/tools/history_tool.cc b/chrome/browser/actor/tools/history_tool.cc index 007f0c7..7d73005c 100644 --- a/chrome/browser/actor/tools/history_tool.cc +++ b/chrome/browser/actor/tools/history_tool.cc
@@ -34,10 +34,10 @@ using ::tabs::TabInterface; HistoryTool::HistoryTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, TabInterface& tab, HistoryToolRequest::Direction direction) - : Tool(task_id, journal), + : Tool(task_id, tool_delegate), WebContentsObserver(tab.GetContents()), direction_(direction), tab_handle_(tab.GetHandle()) {}
diff --git a/chrome/browser/actor/tools/history_tool.h b/chrome/browser/actor/tools/history_tool.h index c7852bc..1a05fae 100644 --- a/chrome/browser/actor/tools/history_tool.h +++ b/chrome/browser/actor/tools/history_tool.h
@@ -29,7 +29,7 @@ class HistoryTool : public Tool, content::WebContentsObserver { public: HistoryTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, tabs::TabInterface& tab, HistoryToolRequest::Direction direction); ~HistoryTool() override;
diff --git a/chrome/browser/actor/tools/history_tool_request.cc b/chrome/browser/actor/tools/history_tool_request.cc index 438dc80..78a0ec1a 100644 --- a/chrome/browser/actor/tools/history_tool_request.cc +++ b/chrome/browser/actor/tools/history_tool_request.cc
@@ -20,7 +20,7 @@ ToolRequest::CreateToolResult HistoryToolRequest::CreateTool( TaskId task_id, - AggregatedJournal& journal) const { + ToolDelegate& tool_delegate) const { TabInterface* tab = GetTabHandle().Get(); if (!tab) { @@ -29,8 +29,9 @@ } CHECK(tab->GetContents()); - return {std::make_unique<HistoryTool>(task_id, journal, *tab, direction_), - MakeOkResult()}; + return { + std::make_unique<HistoryTool>(task_id, tool_delegate, *tab, direction_), + MakeOkResult()}; } void HistoryToolRequest::Apply(ToolRequestVisitorFunctor& f) const {
diff --git a/chrome/browser/actor/tools/history_tool_request.h b/chrome/browser/actor/tools/history_tool_request.h index 6dfa3ef..20200f8 100644 --- a/chrome/browser/actor/tools/history_tool_request.h +++ b/chrome/browser/actor/tools/history_tool_request.h
@@ -30,7 +30,7 @@ // ToolRequest CreateToolResult CreateTool(TaskId task_id, - AggregatedJournal& journal) const override; + ToolDelegate& tool_delegate) const override; std::string JournalEvent() const override; // Whether the navigation is backwards or forwards in session history.
diff --git a/chrome/browser/actor/tools/navigate_tool.cc b/chrome/browser/actor/tools/navigate_tool.cc index be86427..a2a227a 100644 --- a/chrome/browser/actor/tools/navigate_tool.cc +++ b/chrome/browser/actor/tools/navigate_tool.cc
@@ -34,10 +34,10 @@ } // namespace NavigateTool::NavigateTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, TabInterface& tab, const GURL& url) - : Tool(task_id, journal), + : Tool(task_id, tool_delegate), WebContentsObserver(tab.GetContents()), url_(url), tab_handle_(tab.GetHandle()) {}
diff --git a/chrome/browser/actor/tools/navigate_tool.h b/chrome/browser/actor/tools/navigate_tool.h index 91a2538..451f69bf 100644 --- a/chrome/browser/actor/tools/navigate_tool.h +++ b/chrome/browser/actor/tools/navigate_tool.h
@@ -23,7 +23,7 @@ class NavigateTool : public Tool, content::WebContentsObserver { public: NavigateTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, tabs::TabInterface& tab, const GURL& url); ~NavigateTool() override;
diff --git a/chrome/browser/actor/tools/navigate_tool_request.cc b/chrome/browser/actor/tools/navigate_tool_request.cc index 74183fb9..6b6c1831 100644 --- a/chrome/browser/actor/tools/navigate_tool_request.cc +++ b/chrome/browser/actor/tools/navigate_tool_request.cc
@@ -21,14 +21,14 @@ ToolRequest::CreateToolResult NavigateToolRequest::CreateTool( TaskId task_id, - AggregatedJournal& journal) const { + ToolDelegate& tool_delegate) const { TabInterface* tab = GetTabHandle().Get(); if (!tab) { return {/*tool=*/nullptr, MakeResult(mojom::ActionResultCode::kTabWentAway, "The tab is no longer present.")}; } - return {std::make_unique<NavigateTool>(task_id, journal, *tab, url_), + return {std::make_unique<NavigateTool>(task_id, tool_delegate, *tab, url_), MakeOkResult()}; }
diff --git a/chrome/browser/actor/tools/navigate_tool_request.h b/chrome/browser/actor/tools/navigate_tool_request.h index bc1810c..b74d945 100644 --- a/chrome/browser/actor/tools/navigate_tool_request.h +++ b/chrome/browser/actor/tools/navigate_tool_request.h
@@ -25,7 +25,7 @@ // ToolRequest CreateToolResult CreateTool(TaskId task_id, - AggregatedJournal& journal) const override; + ToolDelegate& tool_delegate) const override; std::string JournalEvent() const override; private:
diff --git a/chrome/browser/actor/tools/page_tool.cc b/chrome/browser/actor/tools/page_tool.cc index 98d41f6..bfb5fab91 100644 --- a/chrome/browser/actor/tools/page_tool.cc +++ b/chrome/browser/actor/tools/page_tool.cc
@@ -248,9 +248,9 @@ }; PageTool::PageTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, const PageToolRequest& request) - : Tool(task_id, journal), request_(request.Clone()) {} + : Tool(task_id, tool_delegate), request_(request.Clone()) {} PageTool::~PageTool() = default;
diff --git a/chrome/browser/actor/tools/page_tool.h b/chrome/browser/actor/tools/page_tool.h index 87693ca..ad3fd44 100644 --- a/chrome/browser/actor/tools/page_tool.h +++ b/chrome/browser/actor/tools/page_tool.h
@@ -24,7 +24,6 @@ namespace actor { -class AggregatedJournal; class PageToolRequest; class RenderFrameChangeObserver; @@ -34,7 +33,7 @@ class PageTool : public Tool { public: PageTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, const PageToolRequest& params); ~PageTool() override;
diff --git a/chrome/browser/actor/tools/page_tool_request.cc b/chrome/browser/actor/tools/page_tool_request.cc index 56b44c3..068a896 100644 --- a/chrome/browser/actor/tools/page_tool_request.cc +++ b/chrome/browser/actor/tools/page_tool_request.cc
@@ -45,13 +45,14 @@ ToolRequest::CreateToolResult PageToolRequest::CreateTool( TaskId task_id, - AggregatedJournal& journal) const { + ToolDelegate& tool_delegate) const { if (!GetTabHandle().Get()) { return {/*tool=*/nullptr, MakeResult(mojom::ActionResultCode::kTabWentAway, "The tab is no longer present.")}; } - return {std::make_unique<PageTool>(task_id, journal, *this), MakeOkResult()}; + return {std::make_unique<PageTool>(task_id, tool_delegate, *this), + MakeOkResult()}; } const PageTarget& PageToolRequest::GetTarget() const {
diff --git a/chrome/browser/actor/tools/page_tool_request.h b/chrome/browser/actor/tools/page_tool_request.h index 4bed1cd..e32c94d 100644 --- a/chrome/browser/actor/tools/page_tool_request.h +++ b/chrome/browser/actor/tools/page_tool_request.h
@@ -19,8 +19,6 @@ namespace actor { -class AggregatedJournal; - mojom::ToolTargetPtr ToMojo(const PageTarget& target); // Tool requests targeting a specific, existing document should inherit from @@ -46,7 +44,7 @@ // ToolRequest CreateToolResult CreateTool(TaskId task_id, - AggregatedJournal& journal) const override; + ToolDelegate& tool_delegate) const override; // Returns what in the page the tool should act upon. const PageTarget& GetTarget() const;
diff --git a/chrome/browser/actor/tools/tab_management_tool.cc b/chrome/browser/actor/tools/tab_management_tool.cc index 8839fb9..5240415 100644 --- a/chrome/browser/actor/tools/tab_management_tool.cc +++ b/chrome/browser/actor/tools/tab_management_tool.cc
@@ -26,19 +26,19 @@ using ::tabs::TabHandle; TabManagementTool::TabManagementTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, int32_t window_id, WindowOpenDisposition create_disposition) - : Tool(task_id, journal), + : Tool(task_id, tool_delegate), action_(Action::kCreate), create_disposition_(create_disposition), window_id_(window_id) {} TabManagementTool::TabManagementTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, Action action, TabHandle tab_handle) - : Tool(task_id, journal), action_(action), target_tab_(tab_handle) {} + : Tool(task_id, tool_delegate), action_(action), target_tab_(tab_handle) {} TabManagementTool::~TabManagementTool() = default;
diff --git a/chrome/browser/actor/tools/tab_management_tool.h b/chrome/browser/actor/tools/tab_management_tool.h index 9feedab..0ab6dab 100644 --- a/chrome/browser/actor/tools/tab_management_tool.h +++ b/chrome/browser/actor/tools/tab_management_tool.h
@@ -29,12 +29,12 @@ // Create constructor TabManagementTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, int32_t window, WindowOpenDisposition create_disposition); // Activate|Close constructor. TabManagementTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, Action action, tabs::TabHandle target_tab);
diff --git a/chrome/browser/actor/tools/tab_management_tool_request.cc b/chrome/browser/actor/tools/tab_management_tool_request.cc index 875535b..514cb5ac 100644 --- a/chrome/browser/actor/tools/tab_management_tool_request.cc +++ b/chrome/browser/actor/tools/tab_management_tool_request.cc
@@ -26,9 +26,9 @@ ToolRequest::CreateToolResult CreateTabToolRequest::CreateTool( TaskId task_id, - AggregatedJournal& journal) const { - return {std::make_unique<TabManagementTool>(task_id, journal, window_id_, - disposition_), + ToolDelegate& tool_delegate) const { + return {std::make_unique<TabManagementTool>(task_id, tool_delegate, + window_id_, disposition_), MakeOkResult()}; } @@ -47,15 +47,16 @@ ToolRequest::CreateToolResult ActivateTabToolRequest::CreateTool( TaskId task_id, - AggregatedJournal& journal) const { + ToolDelegate& tool_delegate) const { TabInterface* tab = GetTabHandle().Get(); if (!tab) { return {/*tool=*/nullptr, MakeResult(mojom::ActionResultCode::kTabWentAway, "The tab is no longer present.")}; } - return {std::make_unique<TabManagementTool>( - task_id, journal, TabManagementTool::kActivate, GetTabHandle()), - MakeOkResult()}; + return { + std::make_unique<TabManagementTool>( + task_id, tool_delegate, TabManagementTool::kActivate, GetTabHandle()), + MakeOkResult()}; } void ActivateTabToolRequest::Apply(ToolRequestVisitorFunctor& f) const { @@ -73,15 +74,16 @@ ToolRequest::CreateToolResult CloseTabToolRequest::CreateTool( TaskId task_id, - AggregatedJournal& journal) const { + ToolDelegate& tool_delegate) const { TabInterface* tab = GetTabHandle().Get(); if (!tab) { return {/*tool=*/nullptr, MakeResult(mojom::ActionResultCode::kTabWentAway, "The tab is no longer present.")}; } - return {std::make_unique<TabManagementTool>( - task_id, journal, TabManagementTool::kClose, GetTabHandle()), - MakeOkResult()}; + return { + std::make_unique<TabManagementTool>( + task_id, tool_delegate, TabManagementTool::kClose, GetTabHandle()), + MakeOkResult()}; } void CloseTabToolRequest::Apply(ToolRequestVisitorFunctor& f) const {
diff --git a/chrome/browser/actor/tools/tab_management_tool_request.h b/chrome/browser/actor/tools/tab_management_tool_request.h index d9c0153..d666ea5 100644 --- a/chrome/browser/actor/tools/tab_management_tool_request.h +++ b/chrome/browser/actor/tools/tab_management_tool_request.h
@@ -22,7 +22,7 @@ bool AddsTabToObservationSet() const override; CreateToolResult CreateTool(TaskId task_id, - AggregatedJournal& journal) const override; + ToolDelegate& tool_delegate) const override; void Apply(ToolRequestVisitorFunctor& f) const override; @@ -39,7 +39,7 @@ explicit ActivateTabToolRequest(tabs::TabHandle tab); ~ActivateTabToolRequest() override; CreateToolResult CreateTool(TaskId task_id, - AggregatedJournal& journal) const override; + ToolDelegate& tool_delegate) const override; void Apply(ToolRequestVisitorFunctor& f) const override; std::string JournalEvent() const override; }; @@ -50,7 +50,7 @@ explicit CloseTabToolRequest(tabs::TabHandle tab); ~CloseTabToolRequest() override; CreateToolResult CreateTool(TaskId task_id, - AggregatedJournal& journal) const override; + ToolDelegate& tool_delegate) const override; void Apply(ToolRequestVisitorFunctor& f) const override; std::string JournalEvent() const override; };
diff --git a/chrome/browser/actor/tools/tool.cc b/chrome/browser/actor/tools/tool.cc index 223faf4..e159fa8 100644 --- a/chrome/browser/actor/tools/tool.cc +++ b/chrome/browser/actor/tools/tool.cc
@@ -9,8 +9,8 @@ namespace actor { -Tool::Tool(TaskId task_id, AggregatedJournal& journal) - : task_id_(task_id), journal_(journal.GetSafeRef()) {} +Tool::Tool(TaskId task_id, ToolDelegate& tool_delegate) + : task_id_(task_id), tool_delegate_(tool_delegate) {} Tool::~Tool() = default; mojom::ActionResultPtr Tool::TimeOfUseValidation(
diff --git a/chrome/browser/actor/tools/tool.h b/chrome/browser/actor/tools/tool.h index db64746..1bf0d5f 100644 --- a/chrome/browser/actor/tools/tool.h +++ b/chrome/browser/actor/tools/tool.h
@@ -9,8 +9,9 @@ #include <string> #include "base/functional/callback_forward.h" -#include "base/memory/safe_ref.h" +#include "base/memory/raw_ref.h" #include "chrome/browser/actor/task_id.h" +#include "chrome/browser/actor/tools/tool_delegate.h" #include "chrome/common/actor.mojom.h" #include "url/gurl.h" @@ -33,7 +34,7 @@ // eliminate the other redundant definitions. using ValidateCallback = base::OnceCallback<void(mojom::ActionResultPtr)>; using InvokeCallback = base::OnceCallback<void(mojom::ActionResultPtr)>; - Tool(TaskId task_id, AggregatedJournal& journal); + Tool(TaskId task_id, ToolDelegate& tool_delegate); virtual ~Tool(); // Not copyable or movable. @@ -89,11 +90,12 @@ protected: TaskId task_id() const { return task_id_; } - AggregatedJournal& journal() { return *journal_; } + AggregatedJournal& journal() { return tool_delegate().GetJournal(); } + ToolDelegate& tool_delegate() { return *tool_delegate_; } private: TaskId task_id_; - base::SafeRef<AggregatedJournal> journal_; + raw_ref<ToolDelegate> tool_delegate_; }; } // namespace actor
diff --git a/chrome/browser/actor/tools/tool_controller.cc b/chrome/browser/actor/tools/tool_controller.cc index 98d4c5d7..33cfe23 100644 --- a/chrome/browser/actor/tools/tool_controller.cc +++ b/chrome/browser/actor/tools/tool_controller.cc
@@ -40,15 +40,15 @@ } ToolController::ActiveState::~ActiveState() = default; -ToolController::ToolController(ActorTask& task, AggregatedJournal& journal) - : task_(&task), journal_(journal.GetSafeRef()) { +ToolController::ToolController(ActorTask& task, ToolDelegate& tool_delegate) + : task_(&task), tool_delegate_(tool_delegate) { CHECK(base::FeatureList::IsEnabled(features::kGlicActor)); } ToolController::~ToolController() = default; void ToolController::SetState(State state) { - journal_->Log(active_state_ ? active_state_->tool->JournalURL() : GURL(), + journal().Log(active_state_ ? active_state_->tool->JournalURL() : GURL(), task_->id(), mojom::JournalTrack::kActor, "ToolControllerStateChange", absl::StrFormat("State: %s -> %s", StateToString(state_), @@ -104,13 +104,13 @@ ResultCallback result_callback) { SetState(State::kCreating); ToolRequest::CreateToolResult create_result = - request.CreateTool(task_->id(), *journal_); + request.CreateTool(task_->id(), *tool_delegate_); VLOG(4) << "Creating Tool for " << request.JournalEvent() << " " << request.GetURLForJournal(); if (!IsOk(*create_result.result)) { CHECK(!create_result.tool); - journal_->Log(request.GetURLForJournal(), task_->id(), + journal().Log(request.GetURLForJournal(), task_->id(), mojom::JournalTrack::kActor, "ToolController CreateToolAndValidate Failed", create_result.result->message); @@ -122,7 +122,7 @@ std::unique_ptr<Tool>& tool = create_result.tool; CHECK(tool); - auto journal_event = journal_->CreatePendingAsyncEntry( + auto journal_event = journal().CreatePendingAsyncEntry( tool->JournalURL(), task_->id(), mojom::JournalTrack::kActor, tool->JournalEvent(), tool->DebugString()); active_state_.emplace(std::move(tool), std::move(result_callback), @@ -162,7 +162,7 @@ mojom::ActionResultPtr toctou_result = active_state_->tool->TimeOfUseValidation(active_state_->last_observation); if (!IsOk(*toctou_result)) { - journal_->Log(active_state_->tool->JournalURL(), task_->id(), + journal().Log(active_state_->tool->JournalURL(), task_->id(), mojom::JournalTrack::kActor, "TOCTOU Check Failed", ToDebugString(*toctou_result)); CompleteToolRequest(std::move(toctou_result));
diff --git a/chrome/browser/actor/tools/tool_controller.h b/chrome/browser/actor/tools/tool_controller.h index f0f99b0..c4fbab8 100644 --- a/chrome/browser/actor/tools/tool_controller.h +++ b/chrome/browser/actor/tools/tool_controller.h
@@ -10,11 +10,11 @@ #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/raw_ref.h" -#include "base/memory/safe_ref.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/actor/aggregated_journal.h" #include "chrome/browser/actor/task_id.h" #include "chrome/browser/actor/tools/observation_delay_controller.h" +#include "chrome/browser/actor/tools/tool_delegate.h" #include "chrome/common/actor.mojom-forward.h" #include "components/optimization_guide/proto/features/common_quality_data.pb.h" #include "content/public/browser/weak_document_ptr.h" @@ -46,7 +46,7 @@ kPostInvoke, }; - ToolController(ActorTask& actor_task, AggregatedJournal& journal); + ToolController(ActorTask& actor_task, ToolDelegate& tool_delegate); ~ToolController(); ToolController(const ToolController&) = delete; ToolController& operator=(const ToolController&) = delete; @@ -74,6 +74,8 @@ void PostUpdateTask(mojom::ActionResultPtr result); void PostInvokeTool(mojom::ActionResultPtr result); + AggregatedJournal& journal() { return tool_delegate_->GetJournal(); } + State state_ = State::kInit; // This state is non-null whenever a tool invocation is in progress. @@ -108,7 +110,7 @@ // ActorTask indirectly owns `this`. raw_ptr<ActorTask> task_; - base::SafeRef<AggregatedJournal> journal_; + raw_ref<ToolDelegate> tool_delegate_; base::WeakPtrFactory<ToolController> weak_ptr_factory_{this}; };
diff --git a/chrome/browser/actor/tools/tool_delegate.h b/chrome/browser/actor/tools/tool_delegate.h new file mode 100644 index 0000000..e3c2d1b6 --- /dev/null +++ b/chrome/browser/actor/tools/tool_delegate.h
@@ -0,0 +1,31 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_ACTOR_TOOLS_TOOL_DELEGATE_H_ +#define CHROME_BROWSER_ACTOR_TOOLS_TOOL_DELEGATE_H_ + +namespace actor_login { +class ActorLoginService; +} // namespace actor_login + +namespace actor { + +class AggregatedJournal; + +// Provides tools with functionality implemented by the code invoking the tool. +class ToolDelegate { + public: + virtual ~ToolDelegate() = default; + + // Returns the journal so that tools may log information related to their + // execution. + virtual AggregatedJournal& GetJournal() = 0; + + // Returns the login service associated with the task. + virtual actor_login::ActorLoginService& GetActorLoginService() = 0; +}; + +} // namespace actor + +#endif // CHROME_BROWSER_ACTOR_TOOLS_TOOL_DELEGATE_H_
diff --git a/chrome/browser/actor/tools/tool_request.h b/chrome/browser/actor/tools/tool_request.h index c769fe7..6bfb421 100644 --- a/chrome/browser/actor/tools/tool_request.h +++ b/chrome/browser/actor/tools/tool_request.h
@@ -18,8 +18,8 @@ namespace actor { -class AggregatedJournal; class Tool; +class ToolDelegate; class ToolRequestVisitorFunctor; // Base class for all tool requests. For tools scoped to a tab (e.g. History @@ -63,7 +63,7 @@ // Instantiates the tool requested by this object. virtual CreateToolResult CreateTool(TaskId task_id, - AggregatedJournal& journal) const = 0; + ToolDelegate& tool_delegate) const = 0; }; // Tool requests targeting a specific, existing tab should inherit from this
diff --git a/chrome/browser/actor/tools/wait_tool.cc b/chrome/browser/actor/tools/wait_tool.cc index 24e874d..f3ad072 100644 --- a/chrome/browser/actor/tools/wait_tool.cc +++ b/chrome/browser/actor/tools/wait_tool.cc
@@ -17,9 +17,9 @@ bool WaitTool::no_delay_for_testing_ = false; WaitTool::WaitTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, base::TimeDelta wait_duration) - : Tool(task_id, journal), wait_duration_(wait_duration) {} + : Tool(task_id, tool_delegate), wait_duration_(wait_duration) {} WaitTool::~WaitTool() = default;
diff --git a/chrome/browser/actor/tools/wait_tool.h b/chrome/browser/actor/tools/wait_tool.h index a892bbc..944b5db 100644 --- a/chrome/browser/actor/tools/wait_tool.h +++ b/chrome/browser/actor/tools/wait_tool.h
@@ -17,7 +17,7 @@ class WaitTool : public Tool { public: explicit WaitTool(TaskId task_id, - AggregatedJournal& journal, + ToolDelegate& tool_delegate, base::TimeDelta wait_duration); ~WaitTool() override;
diff --git a/chrome/browser/actor/tools/wait_tool_request.cc b/chrome/browser/actor/tools/wait_tool_request.cc index 57f7953..76bc899 100644 --- a/chrome/browser/actor/tools/wait_tool_request.cc +++ b/chrome/browser/actor/tools/wait_tool_request.cc
@@ -17,8 +17,8 @@ ToolRequest::CreateToolResult WaitToolRequest::CreateTool( TaskId task_id, - AggregatedJournal& journal) const { - return {std::make_unique<WaitTool>(task_id, journal, wait_duration_), + ToolDelegate& tool_delegate) const { + return {std::make_unique<WaitTool>(task_id, tool_delegate, wait_duration_), MakeOkResult()}; }
diff --git a/chrome/browser/actor/tools/wait_tool_request.h b/chrome/browser/actor/tools/wait_tool_request.h index 4cd3844..47f49fc 100644 --- a/chrome/browser/actor/tools/wait_tool_request.h +++ b/chrome/browser/actor/tools/wait_tool_request.h
@@ -24,7 +24,7 @@ // ToolRequest CreateToolResult CreateTool(TaskId task_id, - AggregatedJournal& journal) const override; + ToolDelegate& tool_delegate) const override; std::string JournalEvent() const override; private:
diff --git a/chrome/browser/actor/ui/BUILD.gn b/chrome/browser/actor/ui/BUILD.gn index 3ac7dd9..43253aab 100644 --- a/chrome/browser/actor/ui/BUILD.gn +++ b/chrome/browser/actor/ui/BUILD.gn
@@ -43,6 +43,7 @@ "//chrome/browser/profiles:profile", "//chrome/browser/resources/actor_overlay:resources", "//chrome/browser/ui/browser_window", + "//chrome/browser/ui/tabs:tab_strip", "//chrome/browser/ui/tabs:tabs_public", "//chrome/browser/ui/toasts", "//chrome/browser/ui/toasts/api:toasts", @@ -180,6 +181,7 @@ "//chrome/browser/actor:impl", "//chrome/browser/actor:test_support", "//chrome/browser/ui/tabs:tabs_public", + "//chrome/browser/ui/tabs:test_support", "//chrome/common", "//chrome/test:test_support", "//components/tabs:public", @@ -199,7 +201,10 @@ defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] - sources = [ "actor_overlay_browsertest.cc" ] + sources = [ + "actor_overlay_browsertest.cc", + "actor_ui_tab_controller_browsertest.cc", + ] deps = [ ":ui",
diff --git a/chrome/browser/actor/ui/actor_ui_state_manager.cc b/chrome/browser/actor/ui/actor_ui_state_manager.cc index e9e6e5e2..424716f 100644 --- a/chrome/browser/actor/ui/actor_ui_state_manager.cc +++ b/chrome/browser/actor/ui/actor_ui_state_manager.cc
@@ -32,33 +32,34 @@ constexpr int kToastShownMax = 2; using tabs::TabInterface; +using enum HandoffButtonState::ControlOwnership; // TODO(crbug.com/424495020): Hardcoded states; Move this out to it's own file // to be shared with tab controller. const UiTabState& GetActorControlledUiTabState() { static const UiTabState kActorState = { .actor_overlay = ActorOverlayState(/*is_active=*/true), - .handoff_button = { - .is_active = true, - .controller = HandoffButtonState::ControlOwnership::kActor}}; + .handoff_button = {.is_active = true, .controller = kActor}, + .tab_indicator_visible = true, + }; return kActorState; } const UiTabState& GetPausedUiTabState() { static const UiTabState kPausedState = { .actor_overlay = ActorOverlayState(/*is_active=*/false), - .handoff_button = { - .is_active = true, - .controller = HandoffButtonState::ControlOwnership::kClient}}; + .handoff_button = {.is_active = true, .controller = kClient}, + .tab_indicator_visible = false, + }; return kPausedState; } const UiTabState& GetCompletedUiTabState() { static const UiTabState kCompletedState = { .actor_overlay = ActorOverlayState(/*is_active=*/false), - .handoff_button = { - .is_active = false, - .controller = HandoffButtonState::ControlOwnership::kClient}}; + .handoff_button = {.is_active = false, .controller = kClient}, + .tab_indicator_visible = false, + }; return kCompletedState; }
diff --git a/chrome/browser/actor/ui/actor_ui_state_manager_unittest.cc b/chrome/browser/actor/ui/actor_ui_state_manager_unittest.cc index a34bc86..0bbedc4 100644 --- a/chrome/browser/actor/ui/actor_ui_state_manager_unittest.cc +++ b/chrome/browser/actor/ui/actor_ui_state_manager_unittest.cc
@@ -23,6 +23,7 @@ namespace actor::ui { namespace { + using ::actor::mojom::ActionResultPtr; using ::tabs::MockTabInterface; using ::tabs::TabFeatures; @@ -32,6 +33,9 @@ using ::testing::NiceMock; using ::testing::Return; using ::testing::ValuesIn; + +using enum HandoffButtonState::ControlOwnership; + class ActorUiStateManagerFake : public ActorUiStateManager { public: explicit ActorUiStateManagerFake(ActorKeyedService& actor_service) @@ -368,24 +372,27 @@ {ActorTask::State::kActing, UiTabState{ .actor_overlay = ActorOverlayState(/*is_active=*/true), - .handoff_button = - {.is_active = true, - .controller = HandoffButtonState::ControlOwnership::kActor}}}, + .handoff_button = {.is_active = true, .controller = kActor}, + .tab_indicator_visible = true, + }}, {ActorTask::State::kReflecting, UiTabState{ .actor_overlay = ActorOverlayState(/*is_active=*/true), - .handoff_button = - {.is_active = true, - .controller = HandoffButtonState::ControlOwnership::kActor}}}, + .handoff_button = {.is_active = true, .controller = kActor}, + .tab_indicator_visible = true, + }}, {ActorTask::State::kPausedByClient, - UiTabState{.actor_overlay = ActorOverlayState(/*is_active=*/false), - .handoff_button = - {.is_active = true, - .controller = - HandoffButtonState::ControlOwnership::kClient}}}, + UiTabState{ + .actor_overlay = ActorOverlayState(/*is_active=*/false), + .handoff_button = {.is_active = true, .controller = kClient}, + .tab_indicator_visible = false, + }}, {ActorTask::State::kFinished, - UiTabState{.actor_overlay = ActorOverlayState(/*is_active=*/false), - .handoff_button = {.is_active = false}}}}; + UiTabState{ + .actor_overlay = ActorOverlayState(/*is_active=*/false), + .handoff_button = {.is_active = false}, + .tab_indicator_visible = false, + }}}; INSTANTIATE_TEST_SUITE_P(ActorUiStateManagerActorTaskUiTabScopedTest, ActorUiStateManagerActorTaskUiTabScopedTest, @@ -412,9 +419,8 @@ OnStartingToActOnTab_UpdatesUiCorrectly) { UiTabState expected_ui_tab_state{ .actor_overlay = ActorOverlayState(/*is_active=*/true), - .handoff_button = { - .is_active = true, - .controller = HandoffButtonState::ControlOwnership::kActor}}; + .handoff_button = {.is_active = true, .controller = kActor}, + .tab_indicator_visible = true}; VerifyUiEvent(StartingToActOnTab{mock_tab_.GetHandle(), TaskId(123)}, expected_ui_tab_state); } @@ -423,7 +429,9 @@ OnStoppedActingOnTab_UpdatesUiCorrectly) { UiTabState expected_ui_tab_state{ .actor_overlay = ActorOverlayState(/*is_active=*/false), - .handoff_button = {.is_active = false}}; + .handoff_button = {.is_active = false}, + .tab_indicator_visible = false, + }; VerifyUiEvent(StoppedActingOnTab{mock_tab_.GetHandle()}, expected_ui_tab_state); } @@ -434,9 +442,9 @@ UiTabState expected_ui_tab_state{ .actor_overlay = ActorOverlayState( /*is_active=*/true, /*mouse_down=*/false, page_target), - .handoff_button = { - .is_active = true, - .controller = HandoffButtonState::ControlOwnership::kActor}}; + .handoff_button = {.is_active = true, .controller = kActor}, + .tab_indicator_visible = true, + }; VerifyUiEvent(MouseMove{mock_tab_.GetHandle(), page_target}, expected_ui_tab_state); } @@ -446,9 +454,9 @@ UiTabState expected_ui_tab_state{ .actor_overlay = ActorOverlayState(/*is_active=*/true, /*mouse_down=*/true), - .handoff_button = { - .is_active = true, - .controller = HandoffButtonState::ControlOwnership::kActor}}; + .handoff_button = {.is_active = true, .controller = kActor}, + .tab_indicator_visible = true, + }; VerifyUiEvent(MouseClick{mock_tab_.GetHandle(), MouseClickType::kLeft, MouseClickCount::kSingle}, expected_ui_tab_state);
diff --git a/chrome/browser/actor/ui/actor_ui_tab_controller.cc b/chrome/browser/actor/ui/actor_ui_tab_controller.cc index cb7552c3..5dec441 100644 --- a/chrome/browser/actor/ui/actor_ui_tab_controller.cc +++ b/chrome/browser/actor/ui/actor_ui_tab_controller.cc
@@ -11,6 +11,8 @@ #include "chrome/browser/actor/ui/handoff_button_controller.h" #include "chrome/browser/ui/browser_window/public/browser_window_features.h" #include "chrome/browser/ui/browser_window/public/browser_window_interface.h" +#include "chrome/browser/ui/tabs/tab_change_type.h" +#include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_features.h" #include "components/tabs/public/tab_interface.h" @@ -100,6 +102,27 @@ } } +bool ActorUiTabController::ShouldShowActorTabIndicator() { + return features::kGlicActorUiTabIndicator.Get() && + should_show_actor_tab_indicator_; +} + +void ActorUiTabController::SetActorTabIndicatorVisibility( + bool should_show_tab_indicator) { + // When GLIC isn't enabled, we never set the tab indicator. + // TODO(crbug.com/422538779) remove GLIC dependency once the tab + // alert migrates away from the GLIC_ACCESSING alert. +#if BUILDFLAG(ENABLE_GLIC) + if (should_show_actor_tab_indicator_ == should_show_tab_indicator) { + return; + } + should_show_actor_tab_indicator_ = should_show_tab_indicator; + tab_->GetBrowserWindowInterface()->GetTabStripModel()->NotifyTabChanged( + base::to_address(tab_), TabChangeType::kAll); +#endif + return; +} + void ActorUiTabController::MaybeUpdateState(const UiTabState& ui_tab_state, bool tab_active_status, UiResultCallback callback) { @@ -139,6 +162,11 @@ handoff_button_controller_->UpdateState( current_ui_tab_state_.handoff_button, ComputeHandoffButtonVisibility()); } + + if (features::kGlicActorUiTabIndicator.Get()) { + SetActorTabIndicatorVisibility(ui_tab_state.tab_indicator_visible); + } + // TODO(crbug.com/425952887): Change this once ui components are implemented, // for now always return true. base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
diff --git a/chrome/browser/actor/ui/actor_ui_tab_controller.h b/chrome/browser/actor/ui/actor_ui_tab_controller.h index 373fd7c..07a8bc7d 100644 --- a/chrome/browser/actor/ui/actor_ui_tab_controller.h +++ b/chrome/browser/actor/ui/actor_ui_tab_controller.h
@@ -50,6 +50,7 @@ void SetOverlayHoverStatus(bool is_hovering) override; void SetHandoffButtonHoverStatus(bool is_hovering) override; void SetCallbackForTesting(base::OnceClosure callback) override; + bool ShouldShowActorTabIndicator() override; // Binds the Mojo receiver to the tab's ActorOverlayViewController. // Called by ActorOverlayUI when the chrome://actor-overlay page loads. @@ -85,6 +86,9 @@ // Run the test callback after updates have been made. void OnUpdateFinished(); + // Sets the Tab Indicator visibility. + void SetActorTabIndicatorVisibility(bool should_show_tab_indicator); + // The current UiTabState. UiTabState current_ui_tab_state_ = { .actor_overlay = ActorOverlayState(), @@ -119,6 +123,8 @@ std::unique_ptr<HandoffButtonController> handoff_button_controller_; std::unique_ptr<ActorUiTabControllerFactoryInterface> controller_factory_; + bool should_show_actor_tab_indicator_ = false; + base::WeakPtrFactory<ActorUiTabController> weak_factory_{this}; };
diff --git a/chrome/browser/actor/ui/actor_ui_tab_controller_browsertest.cc b/chrome/browser/actor/ui/actor_ui_tab_controller_browsertest.cc new file mode 100644 index 0000000..77b12494 --- /dev/null +++ b/chrome/browser/actor/ui/actor_ui_tab_controller_browsertest.cc
@@ -0,0 +1,240 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/actor/ui/actor_ui_tab_controller.h" + +#include "base/test/test_future.h" +#include "chrome/browser/actor/actor_keyed_service.h" +#include "chrome/browser/actor/actor_test_util.h" +#include "chrome/browser/actor/ui/actor_ui_state_manager_interface.h" +#include "chrome/browser/actor/ui/ui_event.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/tabs/alert/tab_alert.h" +#include "chrome/browser/ui/tabs/public/tab_features.h" +#include "chrome/browser/ui/tabs/tab_strip_model_observer.h" +#include "chrome/browser/ui/tabs/tab_utils.h" +#include "chrome/common/actor.mojom-forward.h" +#include "chrome/common/chrome_features.h" +#include "chrome/test/base/in_process_browser_test.h" +#include "components/tabs/public/tab_interface.h" +#include "content/public/test/browser_test.h" + +namespace actor::ui { +namespace { + +using actor::mojom::ActionResultPtr; +using base::test::TestFuture; + +class FutureTabStripModelObserver : public TabStripModelObserver { + public: + // TabStripModelObserver: + void TabChangedAt(content::WebContents* contents, + int index, + TabChangeType change_type) override { + if (change_type == TabChangeType::kAll) { + Reset(); + future_.SetValue(); + } + } + + // Returns true if the future was fulfilled. + bool Wait() { return future_.Wait(); } + + // Resets the future for the next event. + void Reset() { future_.Clear(); } + + private: + base::test::TestFuture<void> future_; +}; + +class ActorUiTabControllerTest : public InProcessBrowserTest { + public: + void SetUp() override { + feature_list_.InitAndEnableFeatureWithParameters( + features::kGlicActorUi, + {{features::kGlicActorUiTabIndicator.name, "true"}}); + InProcessBrowserTest::SetUp(); + } + + private: + base::test::ScopedFeatureList feature_list_; +}; + +#if BUILDFLAG(ENABLE_GLIC) +IN_PROC_BROWSER_TEST_F(ActorUiTabControllerTest, + TabIndicatorVisibleDuringActuation) { + Profile* const profile = browser()->profile(); + ActorUiStateManagerInterface* state_manager = + actor::ActorKeyedService::Get(profile)->GetActorUiStateManager(); + ASSERT_NE(state_manager, nullptr); + tabs::TabInterface* tab = browser()->tab_strip_model()->GetActiveTab(); + ASSERT_NE(tab, nullptr); + ActorUiTabControllerInterface* controller = + tab->GetTabFeatures()->actor_ui_tab_controller(); + ASSERT_NE(controller, nullptr); + + // Initially, the indicator should not be visible. + std::vector<tabs::TabAlert> initial_alerts = GetTabAlertStatesForTab(tab); + EXPECT_EQ(std::find(initial_alerts.begin(), initial_alerts.end(), + tabs::TabAlert::GLIC_ACCESSING), + initial_alerts.end()); + + // Start acting on the tab. + TestFuture<ActionResultPtr> result; + state_manager->OnUiEvent( + StartingToActOnTab(tab->GetHandle(), actor::TaskId(1)), + result.GetCallback()); + actor::ExpectOkResult(result); + + // The indicator should now be visible. + std::vector<tabs::TabAlert> alerts_during_actuation = + GetTabAlertStatesForTab(tab); + EXPECT_NE( + std::find(alerts_during_actuation.begin(), alerts_during_actuation.end(), + tabs::TabAlert::GLIC_ACCESSING), + alerts_during_actuation.end()); + + TestFuture<void> future; + static_cast<ActorUiTabController*>(controller) + ->SetCallbackForTesting(future.GetCallback()); + + // Stop acting on the tab. + state_manager->OnUiEvent(StoppedActingOnTab(tab->GetHandle())); + + ASSERT_TRUE(future.Wait()); + + // The indicator should be hidden again. + std::vector<tabs::TabAlert> final_alerts = GetTabAlertStatesForTab(tab); + EXPECT_EQ(std::find(final_alerts.begin(), final_alerts.end(), + tabs::TabAlert::GLIC_ACCESSING), + final_alerts.end()); +} +#else // !BUILDFLAG(ENABLE_GLIC) +IN_PROC_BROWSER_TEST_F(ActorUiTabControllerTest, + TabIndicatorNotVisibleWhenGlicIsDisabled) { + Profile* const profile = browser()->profile(); + ActorUiStateManagerInterface* state_manager = + actor::ActorKeyedService::Get(profile)->GetActorUiStateManager(); + ASSERT_NE(state_manager, nullptr); + tabs::TabInterface* tab = browser()->tab_strip_model()->GetActiveTab(); + ASSERT_NE(tab, nullptr); + ActorUiTabControllerInterface* controller = + tab->GetTabFeatures()->actor_ui_tab_controller(); + ASSERT_NE(controller, nullptr); + + TestFuture<void> future; + static_cast<ActorUiTabController*>(controller) + ->SetCallbackForTesting(future.GetCallback()); + + // Initially, the indicator should not be visible. + std::vector<tabs::TabAlert> initial_alerts = GetTabAlertStatesForTab(tab); + EXPECT_EQ(std::find(initial_alerts.begin(), initial_alerts.end(), + tabs::TabAlert::GLIC_ACCESSING), + initial_alerts.end()); + + // Start acting on the tab. + TestFuture<ActionResultPtr> result; + state_manager->OnUiEvent( + StartingToActOnTab(tab->GetHandle(), actor::TaskId(1)), + result.GetCallback()); + actor::ExpectOkResult(result); + + ASSERT_TRUE(future.Wait()); + // The indicator should still not be visible. + std::vector<tabs::TabAlert> alerts_during_actuation = + GetTabAlertStatesForTab(tab); + EXPECT_EQ( + std::find(alerts_during_actuation.begin(), alerts_during_actuation.end(), + tabs::TabAlert::GLIC_ACCESSING), + alerts_during_actuation.end()); +} +#endif // BUILDFLAG(ENABLE_GLIC) + +#if BUILDFLAG(ENABLE_GLIC) +IN_PROC_BROWSER_TEST_F(ActorUiTabControllerTest, + TabStripModelNotifiedOnUpdate) { + Profile* const profile = browser()->profile(); + ActorUiStateManagerInterface* state_manager = + actor::ActorKeyedService::Get(profile)->GetActorUiStateManager(); + ASSERT_NE(state_manager, nullptr); + tabs::TabInterface* tab = browser()->tab_strip_model()->GetActiveTab(); + ASSERT_NE(tab, nullptr); + + TabStripModel* tab_strip_model = browser()->tab_strip_model(); + FutureTabStripModelObserver observer; + tab_strip_model->AddObserver(&observer); + + // The observer should be notified when the indicator is shown. + TestFuture<ActionResultPtr> result; + state_manager->OnUiEvent( + StartingToActOnTab(tab->GetHandle(), actor::TaskId(1)), + result.GetCallback()); + actor::ExpectOkResult(result); + + EXPECT_TRUE(observer.Wait()); + + // The observer should also be notified when the indicator is hidden. + observer.Reset(); + state_manager->OnUiEvent(StoppedActingOnTab(tab->GetHandle())); + EXPECT_TRUE(observer.Wait()); + + tab_strip_model->RemoveObserver(&observer); +} +#endif // BUILDFLAG(ENABLE_GLIC) + +class ActorUiTabControllerDisabledTest : public InProcessBrowserTest { + public: + void SetUp() override { + feature_list_.InitAndEnableFeatureWithParameters( + features::kGlicActorUi, + {{features::kGlicActorUiTabIndicator.name, "false"}}); + InProcessBrowserTest::SetUp(); + } + + private: + base::test::ScopedFeatureList feature_list_; +}; + +IN_PROC_BROWSER_TEST_F(ActorUiTabControllerDisabledTest, + TabIndicatorNotVisibleWhenFeatureDisabled) { + Profile* const profile = browser()->profile(); + ActorUiStateManagerInterface* state_manager = + actor::ActorKeyedService::Get(profile)->GetActorUiStateManager(); + ASSERT_NE(state_manager, nullptr); + tabs::TabInterface* tab = browser()->tab_strip_model()->GetActiveTab(); + ASSERT_NE(tab, nullptr); + ActorUiTabControllerInterface* controller = + tab->GetTabFeatures()->actor_ui_tab_controller(); + ASSERT_NE(controller, nullptr); + + TestFuture<void> future; + static_cast<ActorUiTabController*>(controller) + ->SetCallbackForTesting(future.GetCallback()); + + // Initially, the indicator should not be visible. + std::vector<tabs::TabAlert> initial_alerts = GetTabAlertStatesForTab(tab); + EXPECT_EQ(std::find(initial_alerts.begin(), initial_alerts.end(), + tabs::TabAlert::GLIC_ACCESSING), + initial_alerts.end()); + + // Start acting on the tab. + TestFuture<ActionResultPtr> result; + state_manager->OnUiEvent( + StartingToActOnTab(tab->GetHandle(), actor::TaskId(1)), + result.GetCallback()); + actor::ExpectOkResult(result); + + ASSERT_TRUE(future.Wait()); + // The indicator should still not be visible. + std::vector<tabs::TabAlert> alerts_during_actuation = + GetTabAlertStatesForTab(tab); + EXPECT_EQ( + std::find(alerts_during_actuation.begin(), alerts_during_actuation.end(), + tabs::TabAlert::GLIC_ACCESSING), + alerts_during_actuation.end()); +} + +} // namespace +} // namespace actor::ui
diff --git a/chrome/browser/actor/ui/actor_ui_tab_controller_interface.h b/chrome/browser/actor/ui/actor_ui_tab_controller_interface.h index 7724fdd..a044e24 100644 --- a/chrome/browser/actor/ui/actor_ui_tab_controller_interface.h +++ b/chrome/browser/actor/ui/actor_ui_tab_controller_interface.h
@@ -20,12 +20,15 @@ bool operator==(const UiTabState& other) const = default; ActorOverlayState actor_overlay; HandoffButtonState handoff_button; + bool tab_indicator_visible = false; }; inline std::ostream& operator<<(std::ostream& os, UiTabState state) { return os << "UiTabState{\n" << " actor_overlay: " << state.actor_overlay << ",\n" << " handoff_button: " << state.handoff_button << "\n" + << " tab_indicator_visible: " << state.tab_indicator_visible + << "\n" << "}"; } @@ -74,6 +77,9 @@ virtual void SetOverlayHoverStatus(bool is_hovering) = 0; virtual void SetHandoffButtonHoverStatus(bool is_hovering) = 0; + // Returns whether the tab should show the actor tab indicator. + virtual bool ShouldShowActorTabIndicator() = 0; + virtual base::WeakPtr<ActorUiTabControllerInterface> GetWeakPtr() = 0; virtual void BindActorOverlay( mojo::PendingReceiver<mojom::ActorOverlayPageHandler> receiver) = 0;
diff --git a/chrome/browser/actor/ui/actor_ui_tab_controller_unittest.cc b/chrome/browser/actor/ui/actor_ui_tab_controller_unittest.cc index d844f58..44cb5943 100644 --- a/chrome/browser/actor/ui/actor_ui_tab_controller_unittest.cc +++ b/chrome/browser/actor/ui/actor_ui_tab_controller_unittest.cc
@@ -16,6 +16,8 @@ #include "chrome/browser/actor/ui/states/actor_overlay_state.h" #include "chrome/browser/actor/ui/states/handoff_button_state.h" #include "chrome/browser/ui/browser_window/test/mock_browser_window_interface.h" +#include "chrome/browser/ui/tabs/tab_strip_model.h" +#include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h" #include "chrome/common/actor/action_result.h" #include "chrome/common/chrome_features.h" #include "chrome/test/base/testing_profile.h" @@ -65,7 +67,7 @@ class ActorUiTabControllerTest : public testing::Test { public: - ActorUiTabControllerTest() = default; + ActorUiTabControllerTest() : tab_strip_model_(&delegate_, profile()) {} ~ActorUiTabControllerTest() override = default; // testing::Test: @@ -88,6 +90,8 @@ .WillByDefault(Return(&mock_browser_window_interface_)); ON_CALL(mock_browser_window_interface_, GetProfile) .WillByDefault(Return(profile())); + ON_CALL(mock_browser_window_interface_, GetTabStripModel) + .WillByDefault(Return(&tab_strip_model_)); actor_ui_tab_controller_ = std::make_unique<ActorUiTabController>( mock_tab_, actor_keyed_service(), std::move(controller_factory)); @@ -137,6 +141,8 @@ std::unique_ptr<ActorKeyedServiceFake> actor_keyed_service_; MockTabInterface mock_tab_; MockBrowserWindowInterface mock_browser_window_interface_; + TestTabStripModelDelegate delegate_; + TabStripModel tab_strip_model_; base::test::ScopedFeatureList scoped_feature_list_; TaskId task_id_; std::unique_ptr<ActorUiTabController> actor_ui_tab_controller_;
diff --git a/chrome/browser/actor/ui/mock_actor_ui_tab_controller.h b/chrome/browser/actor/ui/mock_actor_ui_tab_controller.h index 5abfab0..d6ec83b9 100644 --- a/chrome/browser/actor/ui/mock_actor_ui_tab_controller.h +++ b/chrome/browser/actor/ui/mock_actor_ui_tab_controller.h
@@ -54,6 +54,7 @@ SetCallbackForTesting, (base::OnceClosure callback), (override)); + MOCK_METHOD(bool, ShouldShowActorTabIndicator, (), (override)); private: base::WeakPtrFactory<MockActorUiTabController> weak_factory_{this};
diff --git a/chrome/browser/ai/ai_language_model.cc b/chrome/browser/ai/ai_language_model.cc index cd07a72..f14563a 100644 --- a/chrome/browser/ai/ai_language_model.cc +++ b/chrome/browser/ai/ai_language_model.cc
@@ -504,7 +504,7 @@ AILanguageModel::GetSupportedLanguageBaseCodes() { // Comma-separated language codes to enable; or "*" enables all supported. const base::FeatureParam<std::string> kAIPromptAPILanguagesEnabled{ - &blink::features::kAIPromptAPI, "langs", /*default_value=*/"en"}; + &blink::features::kAIPromptAPI, "langs", /*default=*/"en,es,ja"}; // TODO(crbug.com/394841624): Get supported languages from the model config. auto kSupportedBaseLanguages = base::MakeFixedFlatSet<std::string_view>({"en", "ja", "es"});
diff --git a/chrome/browser/ai/ai_manager.cc b/chrome/browser/ai/ai_manager.cc index 1279436..3fe578e 100644 --- a/chrome/browser/ai/ai_manager.cc +++ b/chrome/browser/ai/ai_manager.cc
@@ -53,6 +53,7 @@ #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/remote_set.h" #include "services/on_device_model/public/cpp/capabilities.h" +#include "third_party/abseil-cpp/absl/container/flat_hash_set.h" #include "third_party/blink/public/common/features_generated.h" #include "third_party/blink/public/mojom/ai/ai_common.mojom.h" #include "third_party/blink/public/mojom/ai/ai_language_model.mojom.h" @@ -77,17 +78,14 @@ base::MakeFixedFlatSet<std::string_view>({"en"}); const char kUnsupportedLanguageError[] = - "Cannot proceed with API call for %s. Expected language contains one or " - "more unsupported languages. This API call requires expected language to " - "specify only languages from our supported list to ensure successful " - "processing and guarantee output characteristics. Please update it with " - "valid language codes from this list: ['en']"; -const char kEmptyExpectedOutputLanguageWarning[] = - "The output language is not specified for %s API call. Without specifying " - "the language, we cannot ensure optimal output quality or properly attest " - "to output safety for potentially unsupported languages. Please specify it " - "when possible for best and most reliable results using our supported " - "list: ['en']"; + "Unsupported %s API languages were specified, and the request was aborted. " + "API calls must only specify supported languages to ensure successful " + "processing and guarantee output characteristics. Please only specify " + "supported language codes: [%s]"; +const char kEmptyOutputLanguageWarning[] = + "No output language was specified in a %s API request. An output language " + "should be specified to ensure optimal output quality and properly attest " + "to output safety. Please specify a supported output language code: [%s]"; blink::mojom::ModelAvailabilityCheckResult ConvertOnDeviceModelEligibilityReasonToModelAvailabilityCheckResult( @@ -168,33 +166,6 @@ NOTREACHED(); } -bool IsLanguageSupported( - const AILanguageCodePtr& language, - const base::flat_set<std::string_view>& allowed_languages) { - return language->code.empty() || - allowed_languages.contains( - language::ExtractBaseLanguage(language->code)); -} - -// Returns whether optional LanguageModel expected_inputs or expected_outputs -// vectors contain only supported languages. Returns true for absent languages. -bool AreExpectedLanguagesSupported( - const std::optional<std::vector<blink::mojom::AILanguageModelExpectedPtr>>& - expected_vector, - const base::flat_set<std::string_view>& allowed_languages) { - if (!expected_vector) { - return true; - } - for (const auto& expected_entry : expected_vector.value()) { - if (expected_entry->languages.has_value() && - !AIManager::IsLanguagesSupported(expected_entry->languages.value(), - allowed_languages)) { - return false; - } - } - return true; -} - template <typename ContextBoundObjectType, typename ContextBoundObjectReceiverInterface, typename ClientRemoteInterface, @@ -357,6 +328,131 @@ : on_device_model::mojom::Priority::kBackground; } +// A struct for hashing and comparison of language base codes. +struct BaseCode { + size_t operator()(const AILanguageCodePtr& l) const { + return absl::DefaultHashContainerHash<std::string_view>()( + language::ExtractBaseLanguage(l->code)); + } + bool operator()(const AILanguageCodePtr& a, + const AILanguageCodePtr& b) const { + return language::ExtractBaseLanguage(a->code) == + language::ExtractBaseLanguage(b->code); + } +}; +using LanguageSet = absl::flat_hash_set<AILanguageCodePtr, BaseCode, BaseCode>; + +void Insert(LanguageSet& set, const AILanguageCodePtr& language) { + if (language && !language->code.empty()) { + set.insert(language.Clone()); + } +} + +void Insert(LanguageSet& set, const std::vector<AILanguageCodePtr>& languages) { + for (const AILanguageCodePtr& language : languages) { + Insert(set, language); + } +} + +template <typename OptionsPtr> +LanguageSet GetLanguages(const OptionsPtr& options) { + LanguageSet languages; + if (options) { + Insert(languages, options->expected_input_languages); + Insert(languages, options->expected_context_languages); + Insert(languages, options->output_language); + } + return languages; +} + +template <> +LanguageSet GetLanguages( + const blink::mojom::AIProofreaderCreateOptionsPtr& options) { + LanguageSet languages; + if (options) { + Insert(languages, options->expected_input_languages); + Insert(languages, options->correction_explanation_language); + } + return languages; +} + +template <> +LanguageSet GetLanguages( + const blink::mojom::AILanguageModelCreateOptionsPtr& options) { + LanguageSet languages; + if (options && options->expected_inputs.has_value()) { + for (const auto& expected_entry : options->expected_inputs.value()) { + if (expected_entry->languages.has_value()) { + for (const auto& language : expected_entry->languages.value()) { + Insert(languages, language); + } + } + } + } + if (options && options->expected_outputs.has_value()) { + for (const auto& expected_entry : options->expected_outputs.value()) { + if (expected_entry->languages.has_value()) { + for (const auto& language : expected_entry->languages.value()) { + Insert(languages, language); + } + } + } + } + return languages; +} + +bool AreLanguagesSupported(const LanguageSet& requested, + const base::flat_set<std::string_view>& supported) { + return std::ranges::all_of(requested, [&](const AILanguageCodePtr& lang) { + return supported.contains(language::ExtractBaseLanguage(lang->code)); + }); +} + +// Returns whether an output language was specified or initialized here using an +// inferred language, i.e. when all input languages use the same base language. +template <typename OptionsWithOutputLanguagePtrType> +bool CheckAndFixOutputLanguage(OptionsWithOutputLanguagePtrType& options, + const LanguageSet& languages) { + if ((!options->output_language || options->output_language->code.empty()) && + languages.size() == 1) { + options->output_language = languages.begin()->Clone(); + } + return options->output_language && !options->output_language->code.empty(); +} + +template <> +bool CheckAndFixOutputLanguage( + blink::mojom::AIProofreaderCreateOptionsPtr& options, + const LanguageSet& languages) { + if ((!options->correction_explanation_language || + options->correction_explanation_language->code.empty()) && + languages.size() == 1) { + options->correction_explanation_language = languages.begin()->Clone(); + } + return options->correction_explanation_language && + !options->correction_explanation_language->code.empty(); +} + +// Returns whether an output language was specified; does not initialize. +template <> +bool CheckAndFixOutputLanguage( + blink::mojom::AILanguageModelCreateOptionsPtr& options, + const LanguageSet& languages) { + if (options->expected_outputs.has_value()) { + for (const auto& expected_entry : options->expected_outputs.value()) { + if (expected_entry->languages.has_value()) { + if (std::ranges::any_of(expected_entry->languages.value(), + [](const AILanguageCodePtr& lang) { + return !lang->code.empty(); + })) { + return true; + } + } + } + } + return false; +} + } // namespace AIManager::AIManager( @@ -379,26 +475,6 @@ AIManager::~AIManager() = default; -bool AIManager::IsLanguagesSupported( - const std::vector<AILanguageCodePtr>& languages, - const base::flat_set<std::string_view>& allowed_languages) { - return std::ranges::all_of( - languages, [&allowed_languages](const AILanguageCodePtr& language) { - return IsLanguageSupported(language, allowed_languages); - }); -} - -// Templated to accept flat_set or fixed_flat_set `allowed_languages`. -bool AIManager::IsLanguagesSupported( - const std::vector<AILanguageCodePtr>& input, - const std::vector<AILanguageCodePtr>& context, - const AILanguageCodePtr& output, - const base::flat_set<std::string_view>& allowed_languages) { - return IsLanguagesSupported(input, allowed_languages) && - IsLanguagesSupported(context, allowed_languages) && - IsLanguageSupported(output, allowed_languages); -} - bool AIManager::IsBuiltInAIAPIsEnabledByPolicy() { PrefService* prefs = Profile::FromBrowserContext(browser_context_)->GetPrefs(); @@ -411,28 +487,6 @@ receivers_.Add(this, std::move(receiver)); } -void AIManager::AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel level, - std::string message) { - bool* flag = nullptr; - if (level == blink::mojom::ConsoleMessageLevel::kWarning) { - flag = &did_add_warning_console_message_for_unexpected_language_; - } - if (level == blink::mojom::ConsoleMessageLevel::kError) { - flag = &did_add_error_console_message_for_unexpected_language_; - } - if (flag != nullptr) { - if (*flag) { - return; - } - *flag = true; - } - - if (auto* rfh = rfh_.AsRenderFrameHostIfValid()) { - rfh->AddMessageToConsole(level, message); - } -} - void AIManager::CanCreateLanguageModel( blink::mojom::AILanguageModelCreateOptionsPtr options, CanCreateLanguageModelCallback callback) { @@ -453,22 +507,13 @@ kUnavailableModelAdaptationNotAvailable); return; } - if (!options || !options->expected_outputs) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kWarning, - base::StringPrintf(kEmptyExpectedOutputLanguageWarning, - "LanguageModel")); - } - const auto languages = AILanguageModel::GetSupportedLanguageBaseCodes(); - if (!AreExpectedLanguagesSupported(options->expected_inputs, languages) || - !AreExpectedLanguagesSupported(options->expected_outputs, languages)) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kError, - base::StringPrintf(kUnsupportedLanguageError, "LanguageModel")); - std::move(callback).Run(blink::mojom::ModelAvailabilityCheckResult:: - kUnavailableUnsupportedLanguage); - return; - } + } + + if (!CheckAndFixLanguages(options, "LanguageModel", + AILanguageModel::GetSupportedLanguageBaseCodes())) { + std::move(callback).Run(blink::mojom::ModelAvailabilityCheckResult:: + kUnavailableUnsupportedLanguage); + return; } CanCreateSession(optimization_guide::ModelBasedCapabilityKey::kPromptApi, @@ -480,12 +525,8 @@ client, blink::mojom::AILanguageModelCreateOptionsPtr options) { CHECK(options); - const auto languages = AILanguageModel::GetSupportedLanguageBaseCodes(); - if (!AreExpectedLanguagesSupported(options->expected_inputs, languages) || - !AreExpectedLanguagesSupported(options->expected_outputs, languages)) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kError, - base::StringPrintf(kUnsupportedLanguageError, "LanguageModel")); + if (!CheckAndFixLanguages(options, "LanguageModel", + AILanguageModel::GetSupportedLanguageBaseCodes())) { mojo::Remote<blink::mojom::AIManagerCreateLanguageModelClient> client_remote(std::move(client)); AIUtils::SendClientRemoteError( @@ -583,19 +624,8 @@ kUnavailableEnterprisePolicyDisabled); return; } - if (!options || !options->output_language) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kWarning, - base::StringPrintf(kEmptyExpectedOutputLanguageWarning, "Summarizer")); - } - if (options && - !IsLanguagesSupported(options->expected_input_languages, - options->expected_context_languages, - options->output_language, + if (!CheckAndFixLanguages(options, "Summarizer", AISummarizer::GetSupportedLanguageBaseCodes())) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kError, - base::StringPrintf(kUnsupportedLanguageError, "Summarizer")); std::move(callback).Run(blink::mojom::ModelAvailabilityCheckResult:: kUnavailableUnsupportedLanguage); return; @@ -607,19 +637,8 @@ void AIManager::CreateSummarizer( mojo::PendingRemote<blink::mojom::AIManagerCreateSummarizerClient> client, blink::mojom::AISummarizerCreateOptionsPtr options) { - if (!options || !options->output_language) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kWarning, - base::StringPrintf(kEmptyExpectedOutputLanguageWarning, "Summarizer")); - } - if (options && - !IsLanguagesSupported(options->expected_input_languages, - options->expected_context_languages, - options->output_language, + if (!CheckAndFixLanguages(options, "Summarizer", AISummarizer::GetSupportedLanguageBaseCodes())) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kError, - base::StringPrintf(kUnsupportedLanguageError, "Summarizer")); mojo::Remote<blink::mojom::AIManagerCreateSummarizerClient> client_remote( std::move(client)); AIUtils::SendClientRemoteError( @@ -654,13 +673,9 @@ // TODO(crbug.com/424673180): Add a warning message when options // `includeCorrectionTypes` and `includeCorrectionExplanations` are set to // true as those features are not yet supported by the API. - - // TODO(crbug.com/424799314): Add console message for handling - // missing/unsupported input/explanation languages. - if (options && !IsLanguagesSupported(options->expected_input_languages, {}, - options->correction_explanation_language, - base::MakeFlatSet<std::string_view>( - kDefaultSupportedBaseLanguages))) { + auto supported = + base::MakeFlatSet<std::string_view>(kDefaultSupportedBaseLanguages); + if (!CheckAndFixLanguages(options, "Proofreader", supported)) { std::move(callback).Run(blink::mojom::ModelAvailabilityCheckResult:: kUnavailableUnsupportedLanguage); return; @@ -672,13 +687,9 @@ void AIManager::CreateProofreader( mojo::PendingRemote<blink::mojom::AIManagerCreateProofreaderClient> client, blink::mojom::AIProofreaderCreateOptionsPtr options) { - if (options && !IsLanguagesSupported(options->expected_input_languages, {}, - options->correction_explanation_language, - base::MakeFlatSet<std::string_view>( - kDefaultSupportedBaseLanguages))) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kError, - base::StringPrintf(kUnsupportedLanguageError, "Proofreader")); + auto supported = + base::MakeFlatSet<std::string_view>(kDefaultSupportedBaseLanguages); + if (!CheckAndFixLanguages(options, "Proofreader", supported)) { mojo::Remote<blink::mojom::AIManagerCreateProofreaderClient> client_remote( std::move(client)); AIUtils::SendClientRemoteError( @@ -754,19 +765,8 @@ kUnavailableEnterprisePolicyDisabled); return; } - if (!options || !options->output_language) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kWarning, - base::StringPrintf(kEmptyExpectedOutputLanguageWarning, "Writer")); - } - if (options && - !IsLanguagesSupported(options->expected_input_languages, - options->expected_context_languages, - options->output_language, + if (!CheckAndFixLanguages(options, "Writer", AIWriter::GetSupportedLanguageBaseCodes())) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kError, - base::StringPrintf(kUnsupportedLanguageError, "Writer")); std::move(callback).Run(blink::mojom::ModelAvailabilityCheckResult:: kUnavailableUnsupportedLanguage); return; @@ -779,19 +779,8 @@ void AIManager::CreateWriter( mojo::PendingRemote<blink::mojom::AIManagerCreateWriterClient> client, blink::mojom::AIWriterCreateOptionsPtr options) { - if (!options || !options->output_language) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kWarning, - base::StringPrintf(kEmptyExpectedOutputLanguageWarning, "Writer")); - } - if (options && - !IsLanguagesSupported(options->expected_input_languages, - options->expected_context_languages, - options->output_language, + if (!CheckAndFixLanguages(options, "Writer", AIWriter::GetSupportedLanguageBaseCodes())) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kError, - base::StringPrintf(kUnsupportedLanguageError, "Writer")); mojo::Remote<blink::mojom::AIManagerCreateWriterClient> client_remote( std::move(client)); AIUtils::SendClientRemoteError( @@ -828,19 +817,8 @@ kUnavailableEnterprisePolicyDisabled); return; } - if (!options || !options->output_language) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kWarning, - base::StringPrintf(kEmptyExpectedOutputLanguageWarning, "Rewriter")); - } - if (options && - !IsLanguagesSupported(options->expected_input_languages, - options->expected_context_languages, - options->output_language, - AIWriter::GetSupportedLanguageBaseCodes())) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kError, - base::StringPrintf(kUnsupportedLanguageError, "Rewriter")); + if (!CheckAndFixLanguages(options, "Rewriter", + AIRewriter::GetSupportedLanguageBaseCodes())) { std::move(callback).Run(blink::mojom::ModelAvailabilityCheckResult:: kUnavailableUnsupportedLanguage); return; @@ -853,19 +831,8 @@ void AIManager::CreateRewriter( mojo::PendingRemote<blink::mojom::AIManagerCreateRewriterClient> client, blink::mojom::AIRewriterCreateOptionsPtr options) { - if (!options || !options->output_language) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kWarning, - base::StringPrintf(kEmptyExpectedOutputLanguageWarning, "Rewriter")); - } - if (options && - !IsLanguagesSupported(options->expected_input_languages, - options->expected_context_languages, - options->output_language, - AIWriter::GetSupportedLanguageBaseCodes())) { - AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel::kError, - base::StringPrintf(kUnsupportedLanguageError, "Rewriter")); + if (!CheckAndFixLanguages(options, "Rewriter", + AIRewriter::GetSupportedLanguageBaseCodes())) { mojo::Remote<blink::mojom::AIManagerCreateRewriterClient> client_remote( std::move(client)); AIUtils::SendClientRemoteError( @@ -962,6 +929,22 @@ blink::mojom::ModelAvailabilityCheckResult::kAvailable); } +template <typename OptionsPtrType> +bool AIManager::CheckAndFixLanguages( + OptionsPtrType& options, + std::string_view api_name, + const base::flat_set<std::string_view>& supported) { + LanguageSet languages = GetLanguages(options); + if (!AreLanguagesSupported(languages, supported)) { + MaybeLogUnsupportedLanguageError(api_name, supported); + return false; + } + if (!options || !CheckAndFixOutputLanguage(options, languages)) { + MaybeLogMissingOutputLanguageWarning(api_name, supported); + } + return true; +} + void AIManager::OnModelPathValidationComplete(const base::FilePath& model_path, bool is_valid_path) { // TODO(crbug.com/346491542): Remove this when the error page is implemented. @@ -996,3 +979,31 @@ DCHECK(widget_observer_.IsObservingSource(widget_host)); widget_observer_.Reset(); } + +void AIManager::MaybeLogMissingOutputLanguageWarning( + const std::string_view api_name, + const base::flat_set<std::string_view>& supported_languages) { + auto* rfh = rfh_.AsRenderFrameHostIfValid(); + if (!rfh || did_log_missing_output_language_warning_) { + return; + } + did_log_missing_output_language_warning_ = true; + auto list = base::JoinString(supported_languages, ", "); + rfh->AddMessageToConsole( + blink::mojom::ConsoleMessageLevel::kWarning, + base::StringPrintf(kEmptyOutputLanguageWarning, api_name, list)); +} + +void AIManager::MaybeLogUnsupportedLanguageError( + const std::string_view api_name, + const base::flat_set<std::string_view>& supported_languages) { + auto* rfh = rfh_.AsRenderFrameHostIfValid(); + if (!rfh || did_log_unsupported_language_error_) { + return; + } + did_log_unsupported_language_error_ = true; + auto list = base::JoinString(supported_languages, ", "); + rfh->AddMessageToConsole( + blink::mojom::ConsoleMessageLevel::kError, + base::StringPrintf(kUnsupportedLanguageError, api_name, list)); +}
diff --git a/chrome/browser/ai/ai_manager.h b/chrome/browser/ai/ai_manager.h index b024d19c..9db0458 100644 --- a/chrome/browser/ai/ai_manager.h +++ b/chrome/browser/ai/ai_manager.h
@@ -69,18 +69,6 @@ return model_download_progress_manager_.GetNumberOfReporters(); } - // Returns if all of the language codes in `languages` are supported. - static bool IsLanguagesSupported( - const std::vector<AILanguageCodePtr>& languages, - const base::flat_set<std::string_view>& allowed_languages); - - // Returns if `output` and all of the language codes in `input` and `context` - // are supported. - static bool IsLanguagesSupported( - const std::vector<AILanguageCodePtr>& input, - const std::vector<AILanguageCodePtr>& context, - const AILanguageCodePtr& output, - const base::flat_set<std::string_view>& allowed_languages); // Return the default and max sampling params for the LanguageModel API. blink::mojom::AILanguageModelParamsPtr GetLanguageModelParams(); @@ -126,6 +114,13 @@ bool IsBuiltInAIAPIsEnabledByPolicy(); + // Returns true if `options` uses only `supported` languages, false otherwise. + // Logs errors and warnings and initializes empty output languages as needed. + template <typename OptionsPtrType> + bool CheckAndFixLanguages(OptionsPtrType& options, + std::string_view api_name, + const base::flat_set<std::string_view>& supported); + private: void OnModelPathValidationComplete(const base::FilePath& model_path, bool is_valid_path); @@ -150,9 +145,12 @@ CanCreateLanguageModelCallback callback, optimization_guide::OnDeviceModelEligibilityReason eligibility); - void AddMessageToConsoleForUnexpectedLanguage( - blink::mojom::ConsoleMessageLevel level, - std::string message); + void MaybeLogMissingOutputLanguageWarning( + const std::string_view api_name, + const base::flat_set<std::string_view>& supported_languages); + void MaybeLogUnsupportedLanguageError( + const std::string_view api_name, + const base::flat_set<std::string_view>& supported_languages); mojo::ReceiverSet<blink::mojom::AIManager> receivers_; @@ -170,8 +168,8 @@ content::WeakDocumentPtr rfh_; - bool did_add_warning_console_message_for_unexpected_language_ = false; - bool did_add_error_console_message_for_unexpected_language_ = false; + bool did_log_missing_output_language_warning_ = false; + bool did_log_unsupported_language_error_ = false; base::WeakPtrFactory<AIManager> weak_factory_{this}; };
diff --git a/chrome/browser/ai/ai_manager_unittest.cc b/chrome/browser/ai/ai_manager_unittest.cc index 98838445..85a86b9 100644 --- a/chrome/browser/ai/ai_manager_unittest.cc +++ b/chrome/browser/ai/ai_manager_unittest.cc
@@ -38,6 +38,17 @@ using testing::Invoke; using testing::NiceMock; +namespace { + +std::vector<blink::mojom::AILanguageCodePtr> MakeLanguageCodeVector( + const std::vector<std::string>& languages) { + std::vector<blink::mojom::AILanguageCodePtr> result; + for (const auto& language : languages) { + result.push_back(blink::mojom::AILanguageCode::New(language)); + } + return result; +} + class AIManagerTest : public AITestUtils::AITestBase { protected: AIManagerTest() @@ -265,65 +276,92 @@ SetBuildInAIAPIsEnterprisePolicy(true); } -class AIManagerIsLanguagesSupportedTest : public AITestUtils::AITestBase { - protected: - static constexpr char kSupportedLanguageCode[] = "en"; - static constexpr char kUnsupportedLanguageCode[] = "fr"; +// Test CheckAndFixLanguages templates for LanguageModel. +TEST_F(AIManagerTest, CheckAndFixLanguagesLanguageModel) { + base::flat_set<std::string_view> supported = {"en", "es", "ja"}; + auto make_expected = [](const base::flat_set<std::string>& languages) { + auto expected = blink::mojom::AILanguageModelExpected::New(); + expected->languages.emplace(); + for (const auto& language : languages) { + expected->languages->push_back( + blink::mojom::AILanguageCode::New(language)); + } + return expected; + }; - base::flat_set<std::string_view> DefaultSupportedBaseLanguages() { - static constexpr auto kDefaultSupportedBaseLanguages = - base::MakeFixedFlatSet<std::string_view>({"en"}); - return base::MakeFlatSet<std::string_view>(kDefaultSupportedBaseLanguages); - } + auto make_options = [&](const base::flat_set<std::string>& inputs, + const base::flat_set<std::string>& outputs) { + auto options = blink::mojom::AILanguageModelCreateOptions::New(); + options->expected_inputs.emplace(); + options->expected_inputs->push_back(make_expected(inputs)); + options->expected_outputs.emplace(); + options->expected_outputs->push_back(make_expected(outputs)); + return options; + }; - std::vector<blink::mojom::AILanguageCodePtr> valid_language_codes() { - std::vector<blink::mojom::AILanguageCodePtr> languages; - languages.emplace_back( - blink::mojom::AILanguageCode::New(kSupportedLanguageCode)); - return languages; - } - - std::vector<blink::mojom::AILanguageCodePtr> invalid_language_codes() { - std::vector<blink::mojom::AILanguageCodePtr> languages; - languages.emplace_back( - blink::mojom::AILanguageCode::New(kUnsupportedLanguageCode)); - return languages; - } - - std::vector<blink::mojom::AILanguageCodePtr> mixed_language_codes() { - std::vector<blink::mojom::AILanguageCodePtr> languages; - languages.emplace_back( - blink::mojom::AILanguageCode::New(kSupportedLanguageCode)); - languages.emplace_back( - blink::mojom::AILanguageCode::New(kUnsupportedLanguageCode)); - return languages; - } -}; - -TEST_F(AIManagerIsLanguagesSupportedTest, OneVector) { - EXPECT_TRUE(AIManager::IsLanguagesSupported(valid_language_codes(), - DefaultSupportedBaseLanguages())); - EXPECT_FALSE(AIManager::IsLanguagesSupported( - invalid_language_codes(), DefaultSupportedBaseLanguages())); - EXPECT_FALSE(AIManager::IsLanguagesSupported( - mixed_language_codes(), DefaultSupportedBaseLanguages())); + auto options = blink::mojom::AILanguageModelCreateOptions::New(); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + options = make_options({"en", "es-MX"}, {}); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + options = make_options({}, {"en-UK", "es-SP", "ja-JP"}); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + options = make_options({"en", "fr"}, {}); + EXPECT_FALSE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + options = make_options({"en"}, {"hi"}); + EXPECT_FALSE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); } -TEST_F(AIManagerIsLanguagesSupportedTest, TwoVectorsAndOneCode) { - EXPECT_TRUE(AIManager::IsLanguagesSupported( - valid_language_codes(), valid_language_codes(), - blink::mojom::AILanguageCode::New(kSupportedLanguageCode), - DefaultSupportedBaseLanguages())); - EXPECT_FALSE(AIManager::IsLanguagesSupported( - valid_language_codes(), invalid_language_codes(), - blink::mojom::AILanguageCode::New(kSupportedLanguageCode), - DefaultSupportedBaseLanguages())); - EXPECT_FALSE(AIManager::IsLanguagesSupported( - invalid_language_codes(), mixed_language_codes(), - blink::mojom::AILanguageCode::New(kSupportedLanguageCode), - DefaultSupportedBaseLanguages())); - EXPECT_FALSE(AIManager::IsLanguagesSupported( - valid_language_codes(), valid_language_codes(), - blink::mojom::AILanguageCode::New(kUnsupportedLanguageCode), - DefaultSupportedBaseLanguages())); +// Test CheckAndFixLanguages templates for Summarizer, Writer, and Rewriter. +TEST_F(AIManagerTest, CheckAndFixLanguagesWritingAssistance) { + base::flat_set<std::string_view> supported = {"en", "es", "ja"}; + auto make_options = [](const std::vector<std::string>& input, + const std::vector<std::string>& context, + const std::string& output) { + auto options = blink::mojom::AISummarizerCreateOptions::New(); + options->expected_input_languages = MakeLanguageCodeVector(input); + options->expected_context_languages = MakeLanguageCodeVector(context); + options->output_language = blink::mojom::AILanguageCode::New(output); + return options; + }; + + auto options = blink::mojom::AISummarizerCreateOptions::New(); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + options = make_options({}, {}, ""); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + EXPECT_TRUE(options->output_language->code.empty()); + options = make_options({"en", "es-MX"}, {"ja"}, "en-US"); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + options = make_options({"en-UK", "en-US"}, {"en"}, ""); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + EXPECT_EQ(options->output_language->code, "en-UK"); + options = make_options({"en", "fr"}, {}, "hi"); + EXPECT_FALSE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); } + +// Test CheckAndFixLanguages templates for Proofreader. +TEST_F(AIManagerTest, CheckAndFixLanguagesProofreader) { + base::flat_set<std::string_view> supported = {"en", "es", "ja"}; + auto make_options = [](const std::vector<std::string>& input, + const std::string& correction_explanation) { + auto options = blink::mojom::AIProofreaderCreateOptions::New(); + options->expected_input_languages = MakeLanguageCodeVector(input); + options->correction_explanation_language = + blink::mojom::AILanguageCode::New(correction_explanation); + return options; + }; + + auto options = blink::mojom::AIProofreaderCreateOptions::New(); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + options = make_options({}, ""); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + EXPECT_TRUE(options->correction_explanation_language->code.empty()); + options = make_options({"en", "es-MX", "ja"}, "en-US"); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + options = make_options({"en-UK", "en-US", "en"}, ""); + EXPECT_TRUE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); + EXPECT_EQ(options->correction_explanation_language->code, "en-UK"); + options = make_options({"en", "fr"}, "hi"); + EXPECT_FALSE(ai_manager_->CheckAndFixLanguages(options, "API", supported)); +} + +} // namespace
diff --git a/chrome/browser/ai/ai_rewriter.cc b/chrome/browser/ai/ai_rewriter.cc index 3c1afd3..2dfa8c7 100644 --- a/chrome/browser/ai/ai_rewriter.cc +++ b/chrome/browser/ai/ai_rewriter.cc
@@ -114,7 +114,7 @@ base::flat_set<std::string_view> AIRewriter::GetSupportedLanguageBaseCodes() { // Comma-separated language codes to enable; or "*" enables all supported. const base::FeatureParam<std::string> kAIRewriterAPILanguagesEnabled{ - &blink::features::kAIWriterAPI, "langs", /*default_value=*/"en"}; + &blink::features::kAIWriterAPI, "langs", /*default=*/"en,es,ja"}; // TODO(crbug.com/394841624): Get supported languages from the model config. auto kSupportedBaseLanguages = base::MakeFixedFlatSet<std::string_view>({"en", "ja", "es"});
diff --git a/chrome/browser/ai/ai_summarizer.cc b/chrome/browser/ai/ai_summarizer.cc index 94bca3b..e926288 100644 --- a/chrome/browser/ai/ai_summarizer.cc +++ b/chrome/browser/ai/ai_summarizer.cc
@@ -110,7 +110,7 @@ base::flat_set<std::string_view> AISummarizer::GetSupportedLanguageBaseCodes() { // Comma-separated language codes to enable; or "*" enables all supported. const base::FeatureParam<std::string> kAISummarizationAPILanguagesEnabled{ - &blink::features::kAISummarizationAPI, "langs", /*default_value=*/"en"}; + &blink::features::kAISummarizationAPI, "langs", /*default=*/"en,es,ja"}; // TODO(crbug.com/394841624): Get supported languages from the model config. auto kSupportedBaseLanguages = base::MakeFixedFlatSet<std::string_view>({"en", "ja", "es"});
diff --git a/chrome/browser/ai/ai_writer.cc b/chrome/browser/ai/ai_writer.cc index 3f9b1f5..1b4c4dc6 100644 --- a/chrome/browser/ai/ai_writer.cc +++ b/chrome/browser/ai/ai_writer.cc
@@ -106,7 +106,7 @@ base::flat_set<std::string_view> AIWriter::GetSupportedLanguageBaseCodes() { // Comma-separated language codes to enable; or "*" enables all supported. const base::FeatureParam<std::string> kAIWriterAPILanguagesEnabled{ - &blink::features::kAIWriterAPI, "langs", /*default_value=*/"en"}; + &blink::features::kAIWriterAPI, "langs", /*default=*/"en,es,ja"}; // TODO(crbug.com/394841624): Get supported languages from the model config. auto kSupportedBaseLanguages = base::MakeFixedFlatSet<std::string_view>({"en", "ja", "es"});
diff --git a/chrome/browser/android/data_import/data_importer_bridge.cc b/chrome/browser/android/data_import/data_importer_bridge.cc index dc55440..c6d1203 100644 --- a/chrome/browser/android/data_import/data_importer_bridge.cc +++ b/chrome/browser/android/data_import/data_importer_bridge.cc
@@ -29,7 +29,7 @@ importer_ = std::make_unique<user_data_importer::StablePortabilityDataImporter>( history_service, bookmark_model, reading_list_model, - base::MakeRefCounted<user_data_importer::ContentBookmarkParser>()); + std::make_unique<user_data_importer::ContentBookmarkParser>()); } DataImporterBridge::~DataImporterBridge() = default;
diff --git a/chrome/browser/ash/boot_times_recorder/boot_times_recorder.cc b/chrome/browser/ash/boot_times_recorder/boot_times_recorder.cc index 992f0ff..9adc978 100644 --- a/chrome/browser/ash/boot_times_recorder/boot_times_recorder.cc +++ b/chrome/browser/ash/boot_times_recorder/boot_times_recorder.cc
@@ -107,6 +107,7 @@ LoginEventRecorder::Get()->ScheduleWriteLoginTimes( kLoginTimes, (is_user_new ? kUmaLoginNewUser : kUmaLogin), kUmaLoginPrefix); + render_widget_host_observations_.RemoveAllObservations(); } void BootTimesRecorder::WriteLogoutTimes() { @@ -242,8 +243,10 @@ RenderWidgetHost* old_rwh = old_host->GetRenderWidgetHost(); if (render_widget_host_observations_.IsObservingSource(old_rwh)) { render_widget_host_observations_.RemoveObservation(old_rwh); - render_widget_host_observations_.AddObservation( - new_host->GetRenderWidgetHost()); + RenderWidgetHost* new_rwh = new_host->GetRenderWidgetHost(); + if (!render_widget_host_observations_.IsObservingSource(new_rwh)) { + render_widget_host_observations_.AddObservation(new_rwh); + } } }
diff --git a/chrome/browser/ash/dbus/BUILD.gn b/chrome/browser/ash/dbus/BUILD.gn index eef94f2..9efd0d2 100644 --- a/chrome/browser/ash/dbus/BUILD.gn +++ b/chrome/browser/ash/dbus/BUILD.gn
@@ -114,6 +114,7 @@ "//chromeos/ash/components/dbus/device_management", "//chromeos/ash/components/dbus/dlcservice", "//chromeos/ash/components/dbus/easy_unlock", + "//chromeos/ash/components/dbus/featured", "//chromeos/ash/components/dbus/gnubby", "//chromeos/ash/components/dbus/hermes", "//chromeos/ash/components/dbus/human_presence",
diff --git a/chrome/browser/ash/dbus/ash_dbus_helper.cc b/chrome/browser/ash/dbus/ash_dbus_helper.cc index 0f52f66..2edc97b0 100644 --- a/chrome/browser/ash/dbus/ash_dbus_helper.cc +++ b/chrome/browser/ash/dbus/ash_dbus_helper.cc
@@ -41,6 +41,7 @@ #include "chromeos/ash/components/dbus/device_management/install_attributes_client.h" #include "chromeos/ash/components/dbus/dlcservice/dlcservice_client.h" #include "chromeos/ash/components/dbus/easy_unlock/easy_unlock_client.h" +#include "chromeos/ash/components/dbus/featured/featured_client.h" #include "chromeos/ash/components/dbus/gnubby/gnubby_client.h" #include "chromeos/ash/components/dbus/hermes/hermes_clients.h" #include "chromeos/ash/components/dbus/human_presence/human_presence_dbus_client.h" @@ -262,6 +263,10 @@ features::IsQuickDimEnabled()) { InitializeDBusClient<HumanPresenceDBusClient>(bus); } + + // FeaturedClient is not a feature and instead uses the FieldTrialList (which + // is initialized with the FeatureList) to record early-boot trials in UMA. + InitializeDBusClient<featured::FeaturedClient>(bus); } void ShutdownDBus() { @@ -332,6 +337,7 @@ ImageBurnerClient::Shutdown(); hermes_clients::Shutdown(); GnubbyClient::Shutdown(); + featured::FeaturedClient::Shutdown(); EasyUnlockClient::Shutdown(); DlcserviceClient::Shutdown(); chromeos::DlpClient::Shutdown();
diff --git a/chrome/browser/ash/extensions/autotest_private/autotest_private_api.cc b/chrome/browser/ash/extensions/autotest_private/autotest_private_api.cc index a9afb5c..e002584 100644 --- a/chrome/browser/ash/extensions/autotest_private/autotest_private_api.cc +++ b/chrome/browser/ash/extensions/autotest_private/autotest_private_api.cc
@@ -93,7 +93,6 @@ #include "chrome/browser/ash/arc/session/arc_session_manager.h" #include "chrome/browser/ash/arc/tracing/arc_app_performance_tracing.h" #include "chrome/browser/ash/arc/tracing/arc_app_performance_tracing_session.h" -#include "chrome/browser/ash/assistant/assistant_util.h" #include "chrome/browser/ash/borealis/borealis_installer.h" #include "chrome/browser/ash/borealis/borealis_service.h" #include "chrome/browser/ash/borealis/borealis_service_factory.h" @@ -178,8 +177,6 @@ #include "chromeos/ash/experiences/arc/session/arc_bridge_service.h" #include "chromeos/ash/experiences/arc/session/arc_service_manager.h" #include "chromeos/ash/experiences/arc/system_ui/arc_system_ui_bridge.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_prefs.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h" #include "chromeos/components/quick_answers/public/cpp/quick_answers_prefs.h" #include "chromeos/printing/printer_configuration.h" #include "chromeos/services/machine_learning/public/cpp/service_connection.h" @@ -561,42 +558,7 @@ return std::string(); } - if (pref_name == ash::assistant::prefs::kAssistantEnabled) { - if (!value.is_bool()) { - return "Invalid value type."; - } - // Validate the Assistant service allowed state. - ash::assistant::AssistantAllowedState allowed_state = - assistant::IsAssistantAllowedForProfile(profile); - if (allowed_state != ash::assistant::AssistantAllowedState::ALLOWED) { - return base::StringPrintf("Assistant not allowed - state: %d", - allowed_state); - } - } else if (pref_name == ash::assistant::prefs::kAssistantConsentStatus) { - if (!value.is_int()) { - return "Invalid value type."; - } - if (!profile->GetPrefs()->GetBoolean( - ash::assistant::prefs::kAssistantEnabled)) { - return "Unable to set the pref because Assistant has not been enabled."; - } - } else if (pref_name == ash::assistant::prefs::kAssistantContextEnabled || - pref_name == ash::assistant::prefs::kAssistantHotwordEnabled) { - if (!value.is_bool()) { - return "Invalid value type."; - } - // Assistant service must be enabled first for those prefs to take effect. - if (!profile->GetPrefs()->GetBoolean( - ash::assistant::prefs::kAssistantEnabled)) { - return std::string( - "Unable to set the pref because Assistant has not been enabled."); - } - } else if (pref_name == - ash::prefs::kAssistantNumSessionsWhereOnboardingShown) { - if (!value.is_int()) { - return "Invalid value type."; - } - } else if (pref_name == ash::prefs::kAccessibilitySpokenFeedbackEnabled) { + if (pref_name == ash::prefs::kAccessibilitySpokenFeedbackEnabled) { DCHECK(value.is_bool()); } else if (pref_name == ash::prefs::kAccessibilityVirtualKeyboardEnabled) { DCHECK(value.is_bool()); @@ -1048,26 +1010,6 @@ std::move(callback).Run(frame_data, std::move(throughput)); } -std::string ResolutionToString( - ash::assistant::AssistantInteractionResolution resolution) { - using ash::assistant::AssistantInteractionResolution; - switch (resolution) { - case AssistantInteractionResolution::kNormal: - return "kNormal"; - case AssistantInteractionResolution::kError: - return "kError"; - case AssistantInteractionResolution::kInterruption: - return "kInterruption"; - case AssistantInteractionResolution::kMicTimeout: - return "kMicTimeout"; - case AssistantInteractionResolution::kMultiDeviceHotwordLoss: - return "kMultiDeviceHotwordLoss"; - } - - // Not reachable here. - DCHECK(false); -} - // Update when `startThroughputTrackerDataCollection` is called. base::TimeTicks g_last_start_throughput_data_collection_tick; @@ -3147,443 +3089,6 @@ } /////////////////////////////////////////////////////////////////////////////// -// AutotestPrivateSetAssistantEnabled -/////////////////////////////////////////////////////////////////////////////// - -AutotestPrivateSetAssistantEnabledFunction:: - AutotestPrivateSetAssistantEnabledFunction() { - // |AddObserver| will immediately trigger |OnAssistantStatusChanged|. - ash::AssistantState::Get()->AddObserver(this); -} - -AutotestPrivateSetAssistantEnabledFunction:: - ~AutotestPrivateSetAssistantEnabledFunction() { - ash::AssistantState::Get()->RemoveObserver(this); -} - -ExtensionFunction::ResponseAction -AutotestPrivateSetAssistantEnabledFunction::Run() { - DVLOG(1) << "AutotestPrivateSetAssistantEnabledFunction"; - - std::optional<api::autotest_private::SetAssistantEnabled::Params> params = - api::autotest_private::SetAssistantEnabled::Params::Create(args()); - EXTENSION_FUNCTION_VALIDATE(params); - - Profile* profile = Profile::FromBrowserContext(browser_context()); - const std::string& err_msg = - SetAllowedPref(profile, ash::assistant::prefs::kAssistantEnabled, - base::Value(params->enabled)); - if (!err_msg.empty()) { - return RespondNow(Error(err_msg)); - } - - // Any state that's not |NOT_READY| would be considered a ready state. - const bool not_ready = (ash::AssistantState::Get()->assistant_status() == - ash::assistant::AssistantStatus::NOT_READY); - const bool success = (params->enabled != not_ready); - if (success) { - return RespondNow(NoArguments()); - } - - // Assistant service has not responded yet, set up a delayed timer to wait for - // it and holder a reference to |this|. Also make sure we stop and respond - // when timeout. - enabled_ = params->enabled; - timeout_timer_.Start( - FROM_HERE, base::Milliseconds(params->timeout_ms), - base::BindOnce(&AutotestPrivateSetAssistantEnabledFunction::Timeout, - this)); - return RespondLater(); -} - -void AutotestPrivateSetAssistantEnabledFunction::OnAssistantStatusChanged( - ash::assistant::AssistantStatus status) { - // Must check if the Optional contains value first to avoid possible - // segmentation fault caused by Respond() below being called before - // RespondLater() in Run(). This will happen due to AddObserver() call - // in the constructor will trigger this function immediately. - if (!enabled_.has_value()) { - return; - } - - const bool not_ready = (status == ash::assistant::AssistantStatus::NOT_READY); - const bool success = (enabled_.value() != not_ready); - if (!success) { - return; - } - - Respond(NoArguments()); - enabled_.reset(); - timeout_timer_.Stop(); -} - -void AutotestPrivateSetAssistantEnabledFunction::Timeout() { - DCHECK(!did_respond()); - Respond(Error("Assistant service timed out")); -} - -/////////////////////////////////////////////////////////////////////////////// -// AutotestPrivateEnableAssistantAndWaitForReadyFunction -/////////////////////////////////////////////////////////////////////////////// - -AutotestPrivateEnableAssistantAndWaitForReadyFunction:: - AutotestPrivateEnableAssistantAndWaitForReadyFunction() = default; - -AutotestPrivateEnableAssistantAndWaitForReadyFunction:: - ~AutotestPrivateEnableAssistantAndWaitForReadyFunction() = default; - -ExtensionFunction::ResponseAction -AutotestPrivateEnableAssistantAndWaitForReadyFunction::Run() { - DVLOG(1) << "AutotestPrivateEnableAssistantAndWaitForReadyFunction"; - - if (ash::AssistantState::Get()->assistant_status() == - ash::assistant::AssistantStatus::READY) { - return RespondNow(Error("Assistant is already enabled.")); - } - - Profile* profile = Profile::FromBrowserContext(browser_context()); - const std::string& err_msg = SetAllowedPref( - profile, ash::assistant::prefs::kAssistantEnabled, base::Value(true)); - if (!err_msg.empty()) { - return RespondNow(Error(err_msg)); - } - - return RespondLater(); -} - -void AutotestPrivateEnableAssistantAndWaitForReadyFunction:: - OnInitializedInternal() { - Respond(NoArguments()); -} - -// AssistantInteractionHelper is a helper class used to interact with Assistant -// server and store interaction states for tests. It is shared by -// |AutotestPrivateSendAssistantTextQueryFunction| and -// |AutotestPrivateWaitForAssistantQueryStatusFunction|. -class AssistantInteractionHelper - : public ash::assistant::AssistantInteractionSubscriber { - public: - using OnInteractionFinishedCallback = - base::OnceCallback<void(const std::optional<std::string>& error)>; - - AssistantInteractionHelper() = default; - - AssistantInteractionHelper(const AssistantInteractionHelper&) = delete; - AssistantInteractionHelper& operator=(const AssistantInteractionHelper&) = - delete; - - ~AssistantInteractionHelper() override { - if (GetAssistant()) { - GetAssistant()->RemoveAssistantInteractionSubscriber(this); - } - } - - void Init(OnInteractionFinishedCallback on_interaction_finished_callback) { - // Subscribe to Assistant interaction events. - GetAssistant()->AddAssistantInteractionSubscriber(this); - - on_interaction_finished_callback_ = - std::move(on_interaction_finished_callback); - } - - void SendTextQuery(const std::string& query, bool allow_tts) { - // Start text interaction with Assistant server. - GetAssistant()->StartTextInteraction( - query, ash::assistant::AssistantQuerySource::kUnspecified, allow_tts); - - query_status_.Set("queryText", query); - } - - base::Value::Dict GetQueryStatus() { return std::move(query_status_); } - - ash::assistant::Assistant* GetAssistant() { - auto* assistant_service = ash::assistant::AssistantService::Get(); - return assistant_service ? assistant_service->GetAssistant() : nullptr; - } - - private: - // ash::assistant::AssistantInteractionSubscriber: - using AssistantSuggestion = ash::assistant::AssistantSuggestion; - using AssistantInteractionMetadata = - ash::assistant::AssistantInteractionMetadata; - using AssistantInteractionResolution = - ash::assistant::AssistantInteractionResolution; - - void OnInteractionStarted( - const AssistantInteractionMetadata& metadata) override { - const bool is_voice_interaction = - ash::assistant::AssistantInteractionType::kVoice == metadata.type; - query_status_.Set("isMicOpen", is_voice_interaction); - interaction_in_progress_ = true; - } - - void OnInteractionFinished( - AssistantInteractionResolution resolution) override { - // If you send an Assistant text query while another query is already - // running, OnInteractionFinished can be called for it. We have to subscribe - // assistant interactions before sending a text query as it can trigger - // OnInteractionStarted. - // - // e.g. - // 1. autotestPrivate.sendAssistantTextQuery("your query", ...). - // 2. AutoTestPrivate starts listening Assistant interactions. - // 3. AutoTestPrivate sends the text query to Assistant. - // 4. Assistant cancels the on-going query. -> OnInteractionFinished - // 5. Assistant starts the new query. -> OnInteractionStarted - if (!interaction_in_progress_) { - DVLOG(1) << "Ignoring an uninterested OnInteractionFinished call"; - return; - } - - interaction_in_progress_ = false; - - CHECK(on_interaction_finished_callback_) - << "on_interaction_finished_callback_ is not set."; - - if (resolution == AssistantInteractionResolution::kError) { - SendErrorResponse( - base::StringPrintf("Interaction closed with resolution %s", - ResolutionToString(resolution).c_str())); - return; - } - - // Only invoke the callback when |result_| is not empty to avoid an early - // return before the entire session is completed. This happens when - // sending queries to modify device settings, e.g. "turn on bluetooth", - // which results in a round trip due to the need to fetch device state - // on the client and return that to the server as part of a follow-up - // interaction. - if (result_.empty()) { - return; - } - - if (resolution != AssistantInteractionResolution::kNormal) { - SendErrorResponse( - base::StringPrintf("Interaction closed with resolution %s", - ResolutionToString(resolution).c_str())); - return; - } - - query_status_.Set("queryResponse", std::move(result_)); - SendSuccessResponse(); - } - - void OnHtmlResponse(const std::string& response, - const std::string& fallback) override { - result_.Set("htmlResponse", response); - CheckResponseIsValid(__FUNCTION__); - } - - void OnTextResponse(const std::string& response) override { - result_.Set("text", response); - CheckResponseIsValid(__FUNCTION__); - } - - void OnOpenUrlResponse(const ::GURL& url, bool in_background) override { - result_.Set("openUrl", url.possibly_invalid_spec()); - } - - void OnOpenAppResponse( - const ash::assistant::AndroidAppInfo& app_info) override { - result_.Set("openAppResponse", app_info.package_name); - CheckResponseIsValid(__FUNCTION__); - } - - void OnSpeechRecognitionFinalResult( - const std::string& final_result) override { - query_status_.Set("queryText", final_result); - } - - void CheckResponseIsValid(const std::string& function_name) { - if (!interaction_in_progress_) { - // We should only get a response while the interaction is open - // (started and not finished). - SendErrorResponse(function_name + - " was called after the interaction was closed"); - } - } - - void SendSuccessResponse() { - std::move(on_interaction_finished_callback_).Run(std::nullopt); - } - - void SendErrorResponse(const std::string& error) { - std::move(on_interaction_finished_callback_).Run(error); - } - - base::Value::Dict query_status_; - base::Value::Dict result_; - bool interaction_in_progress_ = false; - - // Callback triggered when interaction finished with non-empty response. - OnInteractionFinishedCallback on_interaction_finished_callback_; -}; - -/////////////////////////////////////////////////////////////////////////////// -// AutotestPrivateSendAssistantTextQueryFunction -/////////////////////////////////////////////////////////////////////////////// - -AutotestPrivateSendAssistantTextQueryFunction:: - AutotestPrivateSendAssistantTextQueryFunction() - : interaction_helper_(std::make_unique<AssistantInteractionHelper>()) {} - -AutotestPrivateSendAssistantTextQueryFunction:: - ~AutotestPrivateSendAssistantTextQueryFunction() = default; - -ExtensionFunction::ResponseAction -AutotestPrivateSendAssistantTextQueryFunction::Run() { - DVLOG(1) << "AutotestPrivateSendAssistantTextQueryFunction"; - - std::optional<api::autotest_private::SendAssistantTextQuery::Params> params = - api::autotest_private::SendAssistantTextQuery::Params::Create(args()); - EXTENSION_FUNCTION_VALIDATE(params); - - Profile* profile = Profile::FromBrowserContext(browser_context()); - ash::assistant::AssistantAllowedState allowed_state = - assistant::IsAssistantAllowedForProfile(profile); - if (allowed_state != ash::assistant::AssistantAllowedState::ALLOWED) { - return RespondNow(Error(base::StringPrintf( - "Assistant not allowed - state: %d", allowed_state))); - } - - session_manager::SessionState session_state = - session_manager::SessionManager::Get()->session_state(); - if (session_state != session_manager::SessionState::ACTIVE) { - // tast side code matches with this error string, i.e. update both if you - // change this. - return RespondNow( - Error("Session state must be ACTIVE to send a text query. Session " - "state was *", - ToString(session_state))); - } - - interaction_helper_->Init( - base::BindOnce(&AutotestPrivateSendAssistantTextQueryFunction:: - OnInteractionFinishedCallback, - this)); - - // Start text interaction with Assistant server. - interaction_helper_->SendTextQuery(params->query, /*allow_tts=*/false); - - // Set up a delayed timer to wait for the query response and hold a reference - // to |this| to avoid being destructed. Also make sure we stop and respond - // when timeout. - timeout_timer_.Start( - FROM_HERE, base::Milliseconds(params->timeout_ms), - base::BindOnce(&AutotestPrivateSendAssistantTextQueryFunction::Timeout, - this)); - - return RespondLater(); -} - -void AutotestPrivateSendAssistantTextQueryFunction:: - OnInteractionFinishedCallback(const std::optional<std::string>& error) { - DCHECK(!did_respond()); - if (error) { - Respond(Error(error.value())); - } else { - Respond(WithArguments(interaction_helper_->GetQueryStatus())); - } - - // |timeout_timer_| need to be hold until |Respond(.)| is called to avoid - // |this| being destructed. - timeout_timer_.Stop(); -} - -void AutotestPrivateSendAssistantTextQueryFunction::Timeout() { - DCHECK(!did_respond()); - Respond(Error("Assistant response timeout.")); - - // Reset to unsubscribe OnInteractionFinishedCallback(). - interaction_helper_.reset(); -} - -std::string AutotestPrivateSendAssistantTextQueryFunction::ToString( - session_manager::SessionState session_state) { - switch (session_state) { - case session_manager::SessionState::UNKNOWN: - return "UNKNOWN"; - case session_manager::SessionState::OOBE: - return "OOBE"; - case session_manager::SessionState::LOGIN_PRIMARY: - return "LOGIN_PRIMARY"; - case session_manager::SessionState::LOGGED_IN_NOT_ACTIVE: - return "LOGGED_IN_NOT_ACTIVE"; - case session_manager::SessionState::ACTIVE: - return "ACTIVE"; - case session_manager::SessionState::LOCKED: - return "LOCKED"; - case session_manager::SessionState::LOGIN_SECONDARY: - return "LOGIN_SECONDARY"; - case session_manager::SessionState::RMA: - return "RMA"; - } -} - -/////////////////////////////////////////////////////////////////////////////// -// AutotestPrivateWaitForAssistantQueryStatusFunction -/////////////////////////////////////////////////////////////////////////////// -AutotestPrivateWaitForAssistantQueryStatusFunction:: - AutotestPrivateWaitForAssistantQueryStatusFunction() - : interaction_helper_(std::make_unique<AssistantInteractionHelper>()) {} - -AutotestPrivateWaitForAssistantQueryStatusFunction:: - ~AutotestPrivateWaitForAssistantQueryStatusFunction() = default; - -ExtensionFunction::ResponseAction -AutotestPrivateWaitForAssistantQueryStatusFunction::Run() { - DVLOG(1) << "AutotestPrivateWaitForAssistantQueryStatusFunction"; - - std::optional<api::autotest_private::WaitForAssistantQueryStatus::Params> - params = - api::autotest_private::WaitForAssistantQueryStatus::Params::Create( - args()); - EXTENSION_FUNCTION_VALIDATE(params); - - Profile* profile = Profile::FromBrowserContext(browser_context()); - ash::assistant::AssistantAllowedState allowed_state = - assistant::IsAssistantAllowedForProfile(profile); - if (allowed_state != ash::assistant::AssistantAllowedState::ALLOWED) { - return RespondNow(Error(base::StringPrintf( - "Assistant not allowed - state: %d", allowed_state))); - } - - interaction_helper_->Init( - base::BindOnce(&AutotestPrivateWaitForAssistantQueryStatusFunction:: - OnInteractionFinishedCallback, - this)); - - // Start waiting for the response before time out. - timeout_timer_.Start( - FROM_HERE, base::Seconds(params->timeout_s), - base::BindOnce( - &AutotestPrivateWaitForAssistantQueryStatusFunction::Timeout, this)); - return RespondLater(); -} - -void AutotestPrivateWaitForAssistantQueryStatusFunction:: - OnInteractionFinishedCallback(const std::optional<std::string>& error) { - DCHECK(!did_respond()); - if (error) { - Respond(Error(error.value())); - } else { - Respond(WithArguments(interaction_helper_->GetQueryStatus())); - } - - // |timeout_timer_| need to be hold until |Respond(.)| is called to avoid - // |this| being destructed. - timeout_timer_.Stop(); -} - -void AutotestPrivateWaitForAssistantQueryStatusFunction::Timeout() { - DCHECK(!did_respond()); - Respond(Error("No query response received before time out.")); - - // Reset to unsubscribe OnInteractionFinishedCallback(). - interaction_helper_.reset(); -} - -/////////////////////////////////////////////////////////////////////////////// // AutotestPrivateIsArcPackageListInitialRefreshedFunction ///////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/ash/extensions/autotest_private/autotest_private_api.h b/chrome/browser/ash/extensions/autotest_private/autotest_private_api.h index 5bb0d21..1132bf3 100644 --- a/chrome/browser/ash/extensions/autotest_private/autotest_private_api.h +++ b/chrome/browser/ash/extensions/autotest_private/autotest_private_api.h
@@ -11,7 +11,6 @@ #include <vector> #include "ash/display/screen_orientation_controller.h" -#include "ash/public/cpp/assistant/assistant_state.h" #include "ash/rotator/screen_rotation_animator_observer.h" #include "base/memory/raw_ptr.h" #include "base/scoped_observation.h" @@ -62,7 +61,6 @@ namespace extensions { -class AssistantInteractionHelper; class WindowStateChangeObserver; class WindowBoundsChangeObserver; class EventGenerator; @@ -707,96 +705,6 @@ int timer_triggered_count_ = 0; }; -// Enable/disable the Google Assistant feature. This toggles the Assistant user -// pref which will indirectly bring up or shut down the Assistant service. -class AutotestPrivateSetAssistantEnabledFunction - : public ExtensionFunction, - public ash::AssistantStateObserver { - public: - AutotestPrivateSetAssistantEnabledFunction(); - DECLARE_EXTENSION_FUNCTION("autotestPrivate.setAssistantEnabled", - AUTOTESTPRIVATE_SETASSISTANTENABLED) - - private: - ~AutotestPrivateSetAssistantEnabledFunction() override; - ResponseAction Run() override; - - // ash::AssistantStateObserver overrides: - void OnAssistantStatusChanged( - ash::assistant::AssistantStatus status) override; - - // Called when the Assistant service does not respond in a timely fashion. We - // will respond with an error. - void Timeout(); - - std::optional<bool> enabled_; - base::OneShotTimer timeout_timer_; -}; - -// Bring up the Assistant service, and wait until the ready signal is received. -class AutotestPrivateEnableAssistantAndWaitForReadyFunction - : public ExtensionFunction { - public: - AutotestPrivateEnableAssistantAndWaitForReadyFunction(); - DECLARE_EXTENSION_FUNCTION("autotestPrivate.enableAssistantAndWaitForReady", - AUTOTESTPRIVATE_ENABLEASSISTANTANDWAITFORREADY) - - private: - ~AutotestPrivateEnableAssistantAndWaitForReadyFunction() override; - ResponseAction Run() override; - - void OnInitializedInternal(); -}; - -// Send text query to Assistant and return response. -class AutotestPrivateSendAssistantTextQueryFunction : public ExtensionFunction { - public: - AutotestPrivateSendAssistantTextQueryFunction(); - DECLARE_EXTENSION_FUNCTION("autotestPrivate.sendAssistantTextQuery", - AUTOTESTPRIVATE_SENDASSISTANTTEXTQUERY) - - private: - ~AutotestPrivateSendAssistantTextQueryFunction() override; - ResponseAction Run() override; - - // Called when the interaction finished with non-empty response. - void OnInteractionFinishedCallback(const std::optional<std::string>& error); - - // Called when Assistant service fails to respond in a certain amount of - // time. We will respond with an error. - void Timeout(); - - // Convert session_manager::SessionState to string for error logging. - std::string ToString(session_manager::SessionState session_state); - - std::unique_ptr<AssistantInteractionHelper> interaction_helper_; - base::OneShotTimer timeout_timer_; -}; - -// Wait for the next text/voice query interaction completed and respond with -// the query status if any valid response was caught before time out. -class AutotestPrivateWaitForAssistantQueryStatusFunction - : public ExtensionFunction { - public: - AutotestPrivateWaitForAssistantQueryStatusFunction(); - DECLARE_EXTENSION_FUNCTION("autotestPrivate.waitForAssistantQueryStatus", - AUTOTESTPRIVATE_WAITFORASSISTANTQUERYSTATUS) - - private: - ~AutotestPrivateWaitForAssistantQueryStatusFunction() override; - ResponseAction Run() override; - - // Called when the current interaction finished with non-empty response. - void OnInteractionFinishedCallback(const std::optional<std::string>& error); - - // Called when Assistant service fails to respond in a certain amount of - // time. We will respond with an error. - void Timeout(); - - std::unique_ptr<AssistantInteractionHelper> interaction_helper_; - base::OneShotTimer timeout_timer_; -}; - class AutotestPrivateIsArcPackageListInitialRefreshedFunction : public ExtensionFunction { public:
diff --git a/chrome/browser/ash/geolocation/system_geolocation_source_browsertest.cc b/chrome/browser/ash/geolocation/system_geolocation_source_browsertest.cc index 0e880c0..55b511c 100644 --- a/chrome/browser/ash/geolocation/system_geolocation_source_browsertest.cc +++ b/chrome/browser/ash/geolocation/system_geolocation_source_browsertest.cc
@@ -33,9 +33,9 @@ // device::GeolocationSystemPermissionManager::PermissionObserver: void OnSystemPermissionUpdated( device::LocationSystemPermissionStatus status) override { - status_.GetRepeatingCallback().Run(std::move(status)); + status_ = status; } - base::test::TestFuture<device::LocationSystemPermissionStatus> status_; + device::LocationSystemPermissionStatus status_; }; class MockObserver @@ -128,24 +128,21 @@ // Check that the change in pref was registered. EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, observer.status_); // Change the pref value SetActiveUserPref(ash::GeolocationAccessLevel::kAllowed); // Check that the change in pref was registered. EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, observer.status_); // Change the pref value SetActiveUserPref(ash::GeolocationAccessLevel::kOnlyAllowedForSystem); // Check that the change in pref was registered. EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, observer.status_); // Observer needs to be removed here because it is allocated on stack. manager->RemoveObserver(&observer); @@ -173,8 +170,7 @@ // state. EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, observer.status_); // Add second user to the session and sign in. ash::UserAddingScreen::Get()->Start(); @@ -235,20 +231,17 @@ SetPrimaryUserPref(ash::GeolocationAccessLevel::kDisallowed); EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, observer.status_); SetPrimaryUserPref(ash::GeolocationAccessLevel::kAllowed); EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, observer.status_); SetPrimaryUserPref(ash::GeolocationAccessLevel::kOnlyAllowedForSystem); EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kDenied, observer.status_); // Observer needs to be removed here because it is allocated on stack. manager->RemoveObserver(&observer); @@ -273,24 +266,21 @@ // Check that the permission is not changed. EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, observer.status_); // Change the pref value SetActiveUserPref(ash::GeolocationAccessLevel::kAllowed); // Check that the change in pref was registered. EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, observer.status_); // Change the pref value SetActiveUserPref(ash::GeolocationAccessLevel::kOnlyAllowedForSystem); // Check that the change in pref was registered. EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, manager->GetSystemPermission()); - EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, - observer.status_.Take()); + EXPECT_EQ(device::LocationSystemPermissionStatus::kAllowed, observer.status_); // Observer needs to be removed here because it is allocated on stack. manager->RemoveObserver(&observer);
diff --git a/chrome/browser/ash/input_method/assistive_suggester.cc b/chrome/browser/ash/input_method/assistive_suggester.cc index 95acbf5..7ca53145 100644 --- a/chrome/browser/ash/input_method/assistive_suggester.cc +++ b/chrome/browser/ash/input_method/assistive_suggester.cc
@@ -45,10 +45,6 @@ using ime::AssistiveSuggestionType; using ime::SuggestionsTextContext; -constexpr int kModifierKeysMask = ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN | - ui::EF_FUNCTION_DOWN | ui::EF_ALTGR_DOWN; - const char kMaxTextBeforeCursorLength = 50; constexpr base::TimeDelta kLongpressActivationDelay = base::Milliseconds(500); @@ -158,34 +154,6 @@ state); } -// Returns whether Ctrl+V is pressed with Ctrl+V long-press behavior enabled. -bool IsLongpressEnabledControlV(const ui::KeyEvent& event) { - if (!features::IsClipboardHistoryLongpressEnabled()) { - return false; - } - - return event.key_code() == ui::VKEY_V && - (event.flags() & kModifierKeysMask) == ui::EF_CONTROL_DOWN; -} - -// Returns the location to which the clipboard history menu should anchor. When -// possible, this anchor is where a clipboard history item would be pasted if -// the user made a selection; otherwise, this function returns a point at (0,0). -gfx::Rect GetClipboardHistoryMenuAnchor() { - TextInputTarget* input_context = IMEBridge::Get()->GetInputContextHandler(); - if (!input_context) { - return gfx::Rect(); - } - - ui::TextInputClient* input_client = - input_context->GetInputMethod()->GetTextInputClient(); - if (!input_client) { - return gfx::Rect(); - } - - return input_client->GetCaretBounds(); -} - void RecordMultiWordTextInputState( PrefService* pref_service, const std::string& engine_id, @@ -231,8 +199,7 @@ bool AssistiveSuggester::IsAssistiveFeatureEnabled() { return IsEmojiSuggestAdditionEnabled() || IsMultiWordSuggestEnabled() || - IsDiacriticsOnPhysicalKeyboardLongpressEnabled() || - features::IsClipboardHistoryLongpressEnabled(); + IsDiacriticsOnPhysicalKeyboardLongpressEnabled(); } void AssistiveSuggester::FetchEnabledSuggestionsFromBrowserContextThen( @@ -421,7 +388,7 @@ enabled_suggestions_from_last_onfocus_ && enabled_suggestions_from_last_onfocus_->diacritic_suggestions && kDefaultLongpressEnabledKeys.contains(event.GetCharacter()); - if (!is_enabled_diacritic_long_press && !IsLongpressEnabledControlV(event)) { + if (!is_enabled_diacritic_long_press) { return AssistiveSuggesterKeyResult::kNotHandled; } @@ -434,8 +401,7 @@ // be emitted once per Press->Release cycle. if (!auto_repeat_suppress_metric_emitted_ && !longpress_diacritics_suggester_.HasDiacriticSuggestions( - event.GetCharacter()) && - !IsLongpressEnabledControlV(event)) { + event.GetCharacter())) { auto_repeat_suppress_metric_emitted_ = true; RecordLongPressDiacriticAutoRepeatSuppressedMetric(); } @@ -447,10 +413,6 @@ event.type() == ui::EventType::kKeyPressed) { current_longpress_keydown_ = event; - if (IsLongpressEnabledControlV(event)) { - longpress_control_v_suggester_.CachePastedTextStart(); - } - longpress_timer_.Start( FROM_HERE, kLongpressActivationDelay, base::BindOnce(&AssistiveSuggester::OnLongpressDetected, @@ -470,24 +432,12 @@ } void AssistiveSuggester::OnLongpressDetected() { - if (!(current_longpress_keydown_.has_value() || - IsLongpressEnabledControlV(current_longpress_keydown_.value()))) { + if (!current_longpress_keydown_.has_value()) { return; } - if (IsLongpressEnabledControlV(current_longpress_keydown_.value())) { - if (Shell::Get()->clipboard_history_controller()->ShowMenu( - GetClipboardHistoryMenuAnchor(), - ui::mojom::MenuSourceType::kKeyboard, - crosapi::mojom::ClipboardHistoryControllerShowSource:: - kControlVLongpress, - base::BindOnce(&AssistiveSuggester::OnClipboardHistoryMenuClosing, - weak_ptr_factory_.GetWeakPtr()))) { - // Only set `current_suggester_` if the clipboard history menu was shown. - current_suggester_ = &longpress_control_v_suggester_; - } - } else if (longpress_diacritics_suggester_.TrySuggestOnLongpress( - current_longpress_keydown_->GetCharacter())) { + if (longpress_diacritics_suggester_.TrySuggestOnLongpress( + current_longpress_keydown_->GetCharacter())) { current_suggester_ = &longpress_diacritics_suggester_; } current_longpress_keydown_ = std::nullopt;
diff --git a/chrome/browser/ash/input_method/assistive_suggester_unittest.cc b/chrome/browser/ash/input_method/assistive_suggester_unittest.cc index d0e3fb2..de766d9 100644 --- a/chrome/browser/ash/input_method/assistive_suggester_unittest.cc +++ b/chrome/browser/ash/input_method/assistive_suggester_unittest.cc
@@ -276,8 +276,8 @@ AssistiveControlVLongpressPrefDisabled_AssistiveFeatureDisabled) { base::test::ScopedFeatureList feature_list; feature_list.InitWithFeatures( - /*enabled_features=*/{}, /*disabled_features=*/{ - features::kClipboardHistoryLongpress, features::kAssistMultiWord}); + /*enabled_features=*/{}, + /*disabled_features=*/{features::kAssistMultiWord}); SetInputMethodOptions(*profile_, /*predictive_writing_enabled=*/false, /*diacritics_on_longpress_enabled=*/false); EXPECT_FALSE(assistive_suggester_->IsAssistiveFeatureEnabled()); @@ -1223,174 +1223,4 @@ EXPECT_EQ(suggestion_handler_->GetSuggestionText(), u"←;↑;→"); } -class AssistiveSuggesterControlVLongpressTest : public ChromeAshTestBase { - protected: - AssistiveSuggesterControlVLongpressTest() - : ChromeAshTestBase(std::unique_ptr<base::test::TaskEnvironment>( - std::make_unique<content::BrowserTaskEnvironment>( - base::test::TaskEnvironment::TimeSource::MOCK_TIME))), - assistive_suggester_( - &suggestion_handler_, - &profile_, - std::make_unique<AssistiveSuggesterClientFilter>( - base::BindRepeating(&GetFocusedTabUrl), - base::BindRepeating(&GetFocusedWindowProperties))) { - feature_list_.InitAndEnableFeature(features::kClipboardHistoryLongpress); - } - - void SetUp() override { - ChromeAshTestBase::SetUp(); - - Shell::Get() - ->clipboard_history_controller() - ->set_confirmed_operation_callback_for_test( - operation_confirmed_future_.GetRepeatingCallback()); - - // Write content to the clipboard so that the clipboard history menu can - // appear. - SetClipboardText("B"); - SetClipboardText("A"); - - // Create a textfield for the clipboard history controller to recognize as a - // paste target. - textfield_widget_ = CreateFramelessTestWidget(); - textfield_widget_->SetBounds(gfx::Rect(100, 100, 100, 100)); - textfield_ = textfield_widget_->SetContentsView( - std::make_unique<views::Textfield>()); - - // Set the textfield as the text input client so that its caret position can - // be queried. - IMEBridge::Get() - ->GetInputContextHandler() - ->GetInputMethod() - ->SetFocusedTextInputClient(textfield_); - } - - void SetClipboardText(const std::string& text) { - ui::ScopedClipboardWriter(ui::ClipboardBuffer::kCopyPaste) - .WriteText(base::UTF8ToUTF16(text)); - - // Clipboard history will post a task to process clipboard data in order to - // debounce multiple clipboard writes occurring in sequence. Here we give - // clipboard history the chance to run its posted tasks before proceeding. - EXPECT_TRUE(operation_confirmed_future_.Take()); - } - - ui::KeyEvent CreateControlVEvent(int extra_flags = ui::EF_NONE) { - return ui::KeyEvent(ui::EventType::kKeyPressed, ui::VKEY_V, - ui::EF_CONTROL_DOWN | extra_flags); - } - - base::test::ScopedFeatureList feature_list_; - TestingProfile profile_; - FakeSuggestionHandler suggestion_handler_; - AssistiveSuggester assistive_suggester_; - base::test::TestFuture<bool> operation_confirmed_future_; - std::unique_ptr<views::Widget> textfield_widget_; - raw_ptr<views::Textfield> textfield_; - base::HistogramTester histogram_tester_; -}; - -TEST_F(AssistiveSuggesterControlVLongpressTest, - ClipboardHistoryTriggeredOnControlVLongpress) { - assistive_suggester_.OnFocus(5, empty_context); - EXPECT_EQ(assistive_suggester_.OnKeyEvent(CreateControlVEvent()), - AssistiveSuggesterKeyResult::kNotHandledSuppressAutoRepeat); - assistive_suggester_.OnSurroundingTextChanged(u"A", gfx::Range(1)); - task_environment()->FastForwardBy(base::Seconds(1)); - - auto* const controller = Shell::Get()->clipboard_history_controller(); - EXPECT_TRUE(controller->IsMenuShowing()); - // Precise anchoring logic may change as time goes on, so this test only - // assumes that the clipboard history menu should be left-aligned with the - // input field's caret. - EXPECT_EQ(controller->GetMenuBoundsInScreenForTest().x(), - textfield_->GetCaretBounds().x()); - histogram_tester_.ExpectUniqueSample( - "Ash.ClipboardHistory.ContextMenu.ShowMenu", - crosapi::mojom::ClipboardHistoryControllerShowSource::kControlVLongpress, - 1); -} - -TEST_F(AssistiveSuggesterControlVLongpressTest, - ControlVLongpressPasteSuccessRecorded) { - assistive_suggester_.OnFocus(5, empty_context); - EXPECT_EQ(assistive_suggester_.OnKeyEvent(CreateControlVEvent()), - AssistiveSuggesterKeyResult::kNotHandledSuppressAutoRepeat); - assistive_suggester_.OnSurroundingTextChanged(u"A", gfx::Range(1)); - task_environment()->FastForwardBy(base::Seconds(1)); - - EXPECT_TRUE(Shell::Get()->clipboard_history_controller()->IsMenuShowing()); - - // Paste an item from the clipboard history menu. - GetEventGenerator()->PressAndReleaseKey(ui::KeyboardCode::VKEY_DOWN); - GetEventGenerator()->PressAndReleaseKey(ui::KeyboardCode::VKEY_RETURN); - histogram_tester_.ExpectTotalCount("InputMethod.Assistive.Success", 1); - histogram_tester_.ExpectUniqueSample("InputMethod.Assistive.Success", - AssistiveType::kLongpressControlV, 1); -} - -TEST_F(AssistiveSuggesterControlVLongpressTest, - ClipboardHistoryDismissedNoSuccessRecorded) { - assistive_suggester_.OnFocus(5, empty_context); - EXPECT_EQ(assistive_suggester_.OnKeyEvent(CreateControlVEvent()), - AssistiveSuggesterKeyResult::kNotHandledSuppressAutoRepeat); - assistive_suggester_.OnSurroundingTextChanged(u"A", gfx::Range(1)); - task_environment()->FastForwardBy(base::Seconds(1)); - - EXPECT_TRUE(Shell::Get()->clipboard_history_controller()->IsMenuShowing()); - - // Dismiss the clipboard history menu without pasting. - GetEventGenerator()->PressAndReleaseKey(ui::KeyboardCode::VKEY_ESCAPE); - GetEventGenerator()->PressAndReleaseKey(ui::KeyboardCode::VKEY_RETURN); - histogram_tester_.ExpectTotalCount("InputMethod.Assistive.Success", 0); -} - -TEST_F(AssistiveSuggesterControlVLongpressTest, - ClipboardHistoryNotTriggeredIfShiftDown) { - assistive_suggester_.OnFocus(5, empty_context); - EXPECT_EQ(assistive_suggester_.OnKeyEvent( - CreateControlVEvent(/*extra_flags=*/ui::EF_SHIFT_DOWN)), - AssistiveSuggesterKeyResult::kNotHandled); - assistive_suggester_.OnSurroundingTextChanged(u"A", gfx::Range(1)); - task_environment()->FastForwardBy(base::Seconds(1)); - - EXPECT_FALSE(Shell::Get()->clipboard_history_controller()->IsMenuShowing()); -} - -TEST_F(AssistiveSuggesterControlVLongpressTest, - ClipboardHistoryNotTriggeredIfNoContextForControlVLongpress) { - EXPECT_EQ(assistive_suggester_.OnKeyEvent(CreateControlVEvent()), - AssistiveSuggesterKeyResult::kNotHandled); - assistive_suggester_.OnSurroundingTextChanged(u"A", gfx::Range(1)); - task_environment()->FastForwardBy(base::Seconds(1)); - - EXPECT_FALSE(Shell::Get()->clipboard_history_controller()->IsMenuShowing()); -} - -TEST_F(AssistiveSuggesterControlVLongpressTest, - ClipboardHistoryNotTriggeredIfControlVLongpressInterrupted) { - EXPECT_EQ(assistive_suggester_.OnKeyEvent(CreateControlVEvent()), - AssistiveSuggesterKeyResult::kNotHandled); - assistive_suggester_.OnSurroundingTextChanged(u"A", gfx::Range(1)); - task_environment()->FastForwardBy( - base::Milliseconds(100)); // Not long enough to trigger longpress. - - EXPECT_EQ(assistive_suggester_.OnKeyEvent(ui::KeyEvent( - ui::EventType::kKeyReleased, ui::VKEY_V, ui::EF_CONTROL_DOWN)), - AssistiveSuggesterKeyResult::kNotHandled); - EXPECT_FALSE(Shell::Get()->clipboard_history_controller()->IsMenuShowing()); -} - -TEST_F(AssistiveSuggesterControlVLongpressTest, - RepeatedControlVNotPropagatedIfControlVLongpressEnabled) { - assistive_suggester_.OnFocus(5, empty_context); - EXPECT_EQ(assistive_suggester_.OnKeyEvent(CreateControlVEvent()), - AssistiveSuggesterKeyResult::kNotHandledSuppressAutoRepeat); - assistive_suggester_.OnSurroundingTextChanged(u"A", gfx::Range(1)); - - EXPECT_EQ(assistive_suggester_.OnKeyEvent( - CreateControlVEvent(/*extra_flags=*/ui::EF_IS_REPEAT)), - AssistiveSuggesterKeyResult::kHandled); -} } // namespace ash::input_method
diff --git a/chrome/browser/ash/login/osauth/BUILD.gn b/chrome/browser/ash/login/osauth/BUILD.gn index f44fd8c..8fe4f40 100644 --- a/chrome/browser/ash/login/osauth/BUILD.gn +++ b/chrome/browser/ash/login/osauth/BUILD.gn
@@ -23,8 +23,6 @@ "profile_prefs_auth_policy_connector_factory.h", "recovery_factor_hsm_pubkey_migration.cc", "recovery_factor_hsm_pubkey_migration.h", - "recovery_id_migration.cc", - "recovery_id_migration.h", ] public_deps = [ @@ -76,10 +74,7 @@ source_set("unit_tests") { testonly = true - sources = [ - "auth_factor_migrator_unittest.cc", - "recovery_id_migration_unittest.cc", - ] + sources = [ "auth_factor_migrator_unittest.cc" ] deps = [ ":osauth",
diff --git a/chrome/browser/ash/login/osauth/auth_factor_migration.h b/chrome/browser/ash/login/osauth/auth_factor_migration.h index 677810c..6ddc9a2 100644 --- a/chrome/browser/ash/login/osauth/auth_factor_migration.h +++ b/chrome/browser/ash/login/osauth/auth_factor_migration.h
@@ -16,8 +16,7 @@ public: enum class MigrationName { kRecoveryFactorHsmPubkeyMigration, - kKnowledgeFactorHashInfoMigration, - kRecoveryIdMigration, + kKnowledgeFactorHashInfoMigration }; AuthFactorMigration() = default; virtual ~AuthFactorMigration() = default;
diff --git a/chrome/browser/ash/login/osauth/auth_factor_migrator.cc b/chrome/browser/ash/login/osauth/auth_factor_migrator.cc index 139af44..2ea489cb 100644 --- a/chrome/browser/ash/login/osauth/auth_factor_migrator.cc +++ b/chrome/browser/ash/login/osauth/auth_factor_migrator.cc
@@ -7,15 +7,11 @@ #include <memory> #include <utility> -#include "base/functional/bind.h" #include "base/metrics/histogram_functions.h" #include "base/strings/strcat.h" #include "chrome/browser/ash/login/osauth/auth_factor_migration.h" #include "chrome/browser/ash/login/osauth/knowledge_factor_hash_info_migration.h" #include "chrome/browser/ash/login/osauth/recovery_factor_hsm_pubkey_migration.h" -#include "chrome/browser/ash/login/osauth/recovery_id_migration.h" -#include "chromeos/ash/components/cryptohome/auth_factor.h" -#include "chromeos/ash/components/dbus/userdataauth/userdataauth_client.h" #include "chromeos/ash/components/login/auth/public/authentication_error.h" #include "chromeos/ash/components/login/auth/public/user_context.h" @@ -37,8 +33,6 @@ return "RecoveryFactorHsmPubkeyMigration"; case AuthFactorMigration::MigrationName::kKnowledgeFactorHashInfoMigration: return "KnowledgeFactorHashInfoMigration"; - case AuthFactorMigration::MigrationName::kRecoveryIdMigration: - return "RecoveryIdMigration"; } } @@ -74,8 +68,6 @@ AuthFactorMigrator::GetMigrationsList(UserDataAuthClient* user_data_auth) { auto result = std::vector<std::unique_ptr<AuthFactorMigration>>(); result.emplace_back( - std::make_unique<RecoveryIdMigration>(user_data_auth)); - result.emplace_back( std::make_unique<RecoveryFactorHsmPubkeyMigration>(user_data_auth)); result.emplace_back( std::make_unique<KnowledgeFactorHashInfoMigration>(user_data_auth));
diff --git a/chrome/browser/ash/login/osauth/recovery_id_migration.cc b/chrome/browser/ash/login/osauth/recovery_id_migration.cc deleted file mode 100644 index 6820f012..0000000 --- a/chrome/browser/ash/login/osauth/recovery_id_migration.cc +++ /dev/null
@@ -1,65 +0,0 @@ -// Copyright 2025 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ash/login/osauth/recovery_id_migration.h" - -#include <memory> -#include <optional> -#include <utility> - -#include "chromeos/ash/components/cryptohome/auth_factor.h" -#include "chromeos/ash/components/cryptohome/cryptohome_util.h" -#include "chromeos/ash/components/dbus/userdataauth/userdataauth_client.h" -#include "chromeos/ash/components/login/auth/public/authentication_error.h" -#include "chromeos/ash/components/login/auth/public/user_context.h" - -namespace ash { - -RecoveryIdMigration::RecoveryIdMigration(UserDataAuthClient* user_data_auth) - : user_data_auth_(user_data_auth) {} -RecoveryIdMigration::~RecoveryIdMigration() = default; - -void RecoveryIdMigration::Run(std::unique_ptr<UserContext> context, - AuthOperationCallback callback) { - auto* recovery = context->GetAuthFactorsConfiguration().FindFactorByType( - cryptohome::AuthFactorType::kRecovery); - - if (!context->GenerateFreshRecoveryId() || !recovery) { - was_skipped_ = true; - std::move(callback).Run(std::move(context), std::nullopt); - return; - } - - user_data_auth::GenerateFreshRecoveryIdRequest req; - *req.mutable_account_id() = - cryptohome::CreateAccountIdentifierFromAccountId(context->GetAccountId()); - user_data_auth_->GenerateFreshRecoveryId( - req, base::BindOnce(&RecoveryIdMigration::OnFreshRecoveryIdGenerated, - weak_factory_.GetWeakPtr(), std::move(context), - std::move(callback))); -} - -void RecoveryIdMigration::OnFreshRecoveryIdGenerated( - std::unique_ptr<UserContext> context, - AuthOperationCallback callback, - std::optional<user_data_auth::GenerateFreshRecoveryIdReply> reply) { - context->SetGenerateFreshRecoveryId(false); - // We don't check for an error here, as failing to generate a fresh recovery - // ID is not a fatal error. The rest of the migrations can proceed. - if (!reply.has_value() || - reply->error() != user_data_auth::CRYPTOHOME_ERROR_NOT_SET) { - LOG(ERROR) << "Failed to generate fresh recovery ID"; - } - std::move(callback).Run(std::move(context), std::nullopt); -} - -bool RecoveryIdMigration::WasSkipped() { - return was_skipped_; -} - -AuthFactorMigration::MigrationName RecoveryIdMigration::GetName() { - return MigrationName::kRecoveryIdMigration; -} - -} // namespace ash \ No newline at end of file
diff --git a/chrome/browser/ash/login/osauth/recovery_id_migration.h b/chrome/browser/ash/login/osauth/recovery_id_migration.h deleted file mode 100644 index 101cf128..0000000 --- a/chrome/browser/ash/login/osauth/recovery_id_migration.h +++ /dev/null
@@ -1,49 +0,0 @@ -// Copyright 2025 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_ASH_LOGIN_OSAUTH_RECOVERY_ID_MIGRATION_H_ -#define CHROME_BROWSER_ASH_LOGIN_OSAUTH_RECOVERY_ID_MIGRATION_H_ - -#include <memory> - -#include "base/memory/raw_ptr.h" -#include "base/memory/weak_ptr.h" -#include "chrome/browser/ash/login/osauth/auth_factor_migration.h" -#include "chromeos/ash/components/dbus/userdataauth/userdataauth_client.h" -#include "chromeos/ash/components/login/auth/public/auth_callbacks.h" - -namespace ash { - -class UserContext; - -// This class encapsulates the logic for generating a fresh recovery id if one -// is needed. -class RecoveryIdMigration : public AuthFactorMigration { - public: - explicit RecoveryIdMigration(UserDataAuthClient* user_data_auth); - ~RecoveryIdMigration() override; - - RecoveryIdMigration(const RecoveryIdMigration&) = delete; - RecoveryIdMigration& operator=(const RecoveryIdMigration&) = delete; - - // Checks if a fresh recovery id is needed and generates one. - void Run(std::unique_ptr<UserContext> context, - AuthOperationCallback callback) override; - bool WasSkipped() override; - MigrationName GetName() override; - - private: - void OnFreshRecoveryIdGenerated( - std::unique_ptr<UserContext> context, - AuthOperationCallback callback, - std::optional<user_data_auth::GenerateFreshRecoveryIdReply> reply); - - bool was_skipped_ = false; - raw_ptr<UserDataAuthClient> user_data_auth_; - base::WeakPtrFactory<RecoveryIdMigration> weak_factory_{this}; -}; - -} // namespace ash - -#endif // CHROME_BROWSER_ASH_LOGIN_OSAUTH_RECOVERY_ID_MIGRATION_H_ \ No newline at end of file
diff --git a/chrome/browser/ash/login/osauth/recovery_id_migration_unittest.cc b/chrome/browser/ash/login/osauth/recovery_id_migration_unittest.cc deleted file mode 100644 index d4e802d..0000000 --- a/chrome/browser/ash/login/osauth/recovery_id_migration_unittest.cc +++ /dev/null
@@ -1,125 +0,0 @@ -// Copyright 2025 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ash/login/osauth/recovery_id_migration.h" - -#include <memory> -#include <optional> - -#include "base/test/task_environment.h" -#include "base/test/test_future.h" -#include "chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h" -#include "chromeos/ash/components/login/auth/public/user_context.h" -#include "google_apis/gaia/gaia_id.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace ash { -namespace { - -using AuthOperationTestFuture = - base::test::TestFuture<std::unique_ptr<UserContext>, - std::optional<AuthenticationError>>; - -} // namespace - -class RecoveryIdMigrationTest : public testing::Test { - public: - RecoveryIdMigrationTest() = default; - ~RecoveryIdMigrationTest() override = default; - - void SetUp() override { - UserDataAuthClient::InitializeFake(); - migrator_ = - std::make_unique<RecoveryIdMigration>(FakeUserDataAuthClient::Get()); - } - - void TearDown() override { - migrator_.reset(); - UserDataAuthClient::Shutdown(); - } - - protected: - std::unique_ptr<UserContext> CreateContext( - bool generate_fresh_recovery_id, - bool has_recovery_factor) { - auto context = std::make_unique<UserContext>(); - context->SetAccountId(test_account_id_); - context->SetGenerateFreshRecoveryId(generate_fresh_recovery_id); - if (has_recovery_factor) { - cryptohome::AuthFactorRef ref(cryptohome::AuthFactorType::kRecovery, - cryptohome::KeyLabel("recovery")); - cryptohome::AuthFactor factor(ref, /*common_metadata=*/{}); - AuthFactorsConfiguration config({std::move(factor)}, /*supported_factors=*/{}); - context->SetAuthFactorsConfiguration(std::move(config)); - } else { - context->SetAuthFactorsConfiguration(AuthFactorsConfiguration{}); - } - return context; - } - - const AccountId test_account_id_ = - AccountId::FromUserEmailGaiaId("test@test.com", GaiaId("12345")); - std::unique_ptr<RecoveryIdMigration> migrator_; - base::test::SingleThreadTaskEnvironment task_environment_; -}; - -TEST_F(RecoveryIdMigrationTest, SkippedNoRecoveryFactor) { - AuthOperationTestFuture future; - migrator_->Run(CreateContext(/*generate_fresh_recovery_id=*/true, - /*has_recovery_factor=*/false), - future.GetCallback()); - EXPECT_EQ(future.Get<1>(), std::nullopt); - EXPECT_TRUE(migrator_->WasSkipped()); - EXPECT_FALSE( - FakeUserDataAuthClient::Get() - ->WasCalled< - FakeUserDataAuthClient::Operation::kGenerateFreshRecoveryId>()); -} - -TEST_F(RecoveryIdMigrationTest, SkippedNoGenerateFlag) { - AuthOperationTestFuture future; - migrator_->Run(CreateContext(/*generate_fresh_recovery_id=*/false, - /*has_recovery_factor=*/true), - future.GetCallback()); - EXPECT_EQ(future.Get<1>(), std::nullopt); - EXPECT_TRUE(migrator_->WasSkipped()); - EXPECT_FALSE( - FakeUserDataAuthClient::Get() - ->WasCalled< - FakeUserDataAuthClient::Operation::kGenerateFreshRecoveryId>()); -} - -TEST_F(RecoveryIdMigrationTest, Success) { - AuthOperationTestFuture future; - migrator_->Run(CreateContext(/*generate_fresh_recovery_id=*/true, - /*has_recovery_factor=*/true), - future.GetCallback()); - EXPECT_EQ(future.Get<1>(), std::nullopt); - EXPECT_FALSE(migrator_->WasSkipped()); - EXPECT_TRUE( - FakeUserDataAuthClient::Get() - ->WasCalled< - FakeUserDataAuthClient::Operation::kGenerateFreshRecoveryId>()); - EXPECT_FALSE(future.Get<0>()->GenerateFreshRecoveryId()); -} - -TEST_F(RecoveryIdMigrationTest, FailureIsIgnored) { - FakeUserDataAuthClient::Get()->SetNextOperationError( - FakeUserDataAuthClient::Operation::kGenerateFreshRecoveryId, - cryptohome::ErrorWrapper::CreateFromErrorCodeOnly( - user_data_auth::CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND)); - AuthOperationTestFuture future; - migrator_->Run(CreateContext(/*generate_fresh_recovery_id=*/true, - /*has_recovery_factor=*/true), - future.GetCallback()); - EXPECT_EQ(future.Get<1>(), std::nullopt); - EXPECT_FALSE(migrator_->WasSkipped()); - EXPECT_TRUE( - FakeUserDataAuthClient::Get() - ->WasCalled< - FakeUserDataAuthClient::Operation::kGenerateFreshRecoveryId>()); - EXPECT_FALSE(future.Get<0>()->GenerateFreshRecoveryId()); -} - -} // namespace ash \ No newline at end of file
diff --git a/chrome/browser/ash/login/screens/osauth/cryptohome_recovery_screen.cc b/chrome/browser/ash/login/screens/osauth/cryptohome_recovery_screen.cc index ffb24e4d..486d233 100644 --- a/chrome/browser/ash/login/screens/osauth/cryptohome_recovery_screen.cc +++ b/chrome/browser/ash/login/screens/osauth/cryptohome_recovery_screen.cc
@@ -184,11 +184,10 @@ } // The user just authenticated with recovery factor and therefore we want to - // rotate the recovery id after the user directory is mounted. - user_context->SetGenerateFreshRecoveryId(true); + // rotate the recovery id. auth_factor_editor_.RotateRecoveryFactor( std::move(user_context), - /*ensure_fresh_recovery_id=*/false, + /*ensure_fresh_recovery_id=*/true, base::BindOnce(&CryptohomeRecoveryScreen::OnRotateRecoveryFactor, weak_ptr_factory_.GetWeakPtr())); }
diff --git a/chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.cc b/chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.cc index e006337..7cb30c81 100644 --- a/chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.cc +++ b/chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.cc
@@ -181,7 +181,6 @@ #include "chrome/browser/task_manager/task_manager_interface.h" #include "chrome/browser/tracing/chrome_tracing_delegate.h" #include "chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.h" -#include "chrome/browser/ui/ash/assistant/assistant_state_client.h" #include "chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client.h" #include "chrome/browser/ui/ash/session/session_controller_client_impl.h" #include "chrome/browser/ui/webui/ash/emoji/emoji_ui.h" @@ -979,13 +978,6 @@ // Has to be initialized before |assistant_delegate_|; image_downloader_ = std::make_unique<ImageDownloaderImpl>(); - // Requires UserManager. - assistant_state_client_ = std::make_unique<AssistantStateClient>(); - - // Assistant has to be initialized before - // ChromeBrowserMainExtraPartsAsh::session_controller_client_ to avoid race of - // SessionChanged event and assistant_client initialization. It must come - // after AssistantStateClient. assistant_delegate_ = std::make_unique<AssistantBrowserDelegateImpl>(); quick_pair_delegate_ = @@ -1595,8 +1587,6 @@ // correctly remove the observer. assistant_delegate_.reset(); - assistant_state_client_.reset(); - if (pre_profile_init_called_) { Shell::Get()->RemovePreTargetHandler(MagnificationManager::Get()); }
diff --git a/chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.h b/chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.h index db9bcda..bacfbb28 100644 --- a/chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.h +++ b/chrome/browser/ash/main_parts/chrome_browser_main_parts_ash.h
@@ -19,7 +19,6 @@ class AmbientClientImpl; class AssistantBrowserDelegateImpl; -class AssistantStateClient; class ChromeKeyboardControllerClient; class ImageDownloaderImpl; class LobsterClientFactoryImpl; @@ -217,8 +216,6 @@ std::unique_ptr<ImageDownloaderImpl> image_downloader_; - std::unique_ptr<AssistantStateClient> assistant_state_client_; - std::unique_ptr<AssistantBrowserDelegateImpl> assistant_delegate_; std::unique_ptr<LowDiskNotification> low_disk_notification_;
diff --git a/chrome/browser/banners/android/java/src/org/chromium/chrome/browser/banners/AmbientBadgeManagerTest.java b/chrome/browser/banners/android/java/src/org/chromium/chrome/browser/banners/AmbientBadgeManagerTest.java index 7a054fe..0021bcc 100644 --- a/chrome/browser/banners/android/java/src/org/chromium/chrome/browser/banners/AmbientBadgeManagerTest.java +++ b/chrome/browser/banners/android/java/src/org/chromium/chrome/browser/banners/AmbientBadgeManagerTest.java
@@ -210,7 +210,7 @@ } private void assertAppBannerPipelineStatus(int expectedValue) { - Tab tab = mTabbedActivityTestRule.getActivity().getActivityTab(); + Tab tab = mTabbedActivityTestRule.getActivityTab(); ThreadUtils.runOnUiThreadBlocking( () -> { Assert.assertEquals( @@ -222,7 +222,7 @@ private void navigateToUrlAndWaitForBannerManager( ChromeActivityTestRule<? extends ChromeActivity> rule, String url) throws Exception { - Tab tab = rule.getActivity().getActivityTab(); + Tab tab = rule.getActivityTab(); new TabLoadObserver(tab).fullyLoadUrl(url); waitForBannerManager(tab); } @@ -232,8 +232,7 @@ CriteriaHelper.pollUiThread( () -> { AppBannerManager manager = - getAppBannerManager( - rule.getActivity().getActivityTab().getWebContents()); + getAppBannerManager(rule.getActivityTab().getWebContents()); Criteria.checkThat(mDetailsDelegate.mNumRetrieved, Matchers.is(numExpected)); Criteria.checkThat(manager.isRunningForTesting(), Matchers.is(false)); }); @@ -378,7 +377,7 @@ // The appinstalled event should fire (and cause the title to change). new TabTitleObserver( - mTabbedActivityTestRule.getActivity().getActivityTab(), + mTabbedActivityTestRule.getActivityTab(), "Got appinstalled: listener, attr") .waitForTitleUpdate(3); @@ -406,7 +405,7 @@ // The appinstalled event should fire (and cause the title to change). new TabTitleObserver( - mCustomTabActivityTestRule.getActivity().getActivityTab(), + mCustomTabActivityTestRule.getActivityTab(), "Got appinstalled: listener, attr") .waitForTitleUpdate(3); @@ -455,7 +454,7 @@ // Visit a site that is a PWA. The ambient badge should show. String webBannerUrl = WebappTestPage.getTestUrl(mTestServer); - Tab tab = mTabbedActivityTestRule.getActivity().getActivityTab(); + Tab tab = mTabbedActivityTestRule.getActivityTab(); new TabLoadObserver(tab).fullyLoadUrl(webBannerUrl); waitUntilAmbientBadgePromptAppears(mTabbedActivityTestRule.getActivityTestRule()); @@ -578,7 +577,7 @@ assertAppBannerPipelineStatus(AppBannerManagerState.PENDING_PROMPT_NOT_CANCELED); - Tab tab = mTabbedActivityTestRule.getActivity().getActivityTab(); + Tab tab = mTabbedActivityTestRule.getActivityTab(); // Blocked by segmentation result. waitForBadgeStatus(tab, AmbientBadgeState.SEGMENTATION_BLOCK);
diff --git a/chrome/browser/banners/android/java/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java b/chrome/browser/banners/android/java/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java index 64e6757..363d146 100644 --- a/chrome/browser/banners/android/java/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java +++ b/chrome/browser/banners/android/java/src/org/chromium/chrome/browser/banners/AppBannerManagerTest.java
@@ -226,7 +226,7 @@ private void navigateToUrlAndWaitForBannerManager( ChromeActivityTestRule<? extends ChromeActivity> rule, String url) throws Exception { - Tab tab = rule.getActivity().getActivityTab(); + Tab tab = rule.getActivityTab(); new TabLoadObserver(tab).fullyLoadUrl(url); waitForBannerManager(tab); } @@ -236,8 +236,7 @@ CriteriaHelper.pollUiThread( () -> { AppBannerManager manager = - getAppBannerManager( - rule.getActivity().getActivityTab().getWebContents()); + getAppBannerManager(rule.getActivityTab().getWebContents()); Criteria.checkThat(mDetailsDelegate.mNumRetrieved, Matchers.is(numExpected)); Criteria.checkThat(manager.isRunningForTesting(), Matchers.is(false)); }); @@ -270,7 +269,7 @@ rule.loadUrlInNewTab(ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL); navigateToUrlAndWaitForBannerManager(rule, url); - Tab tab = rule.getActivity().getActivityTab(); + Tab tab = rule.getActivityTab(); tapAndWaitForModalBanner(tab); if (!installApp) return; @@ -330,7 +329,7 @@ waitUntilAppDetailsRetrieved(rule, 1); } - Tab tab = rule.getActivity().getActivityTab(); + Tab tab = rule.getActivityTab(); tapAndWaitForModalBanner(tab); // Explicitly dismiss the banner. We should be able to show the banner after dismissing. @@ -380,7 +379,7 @@ // The appinstalled event should fire (and cause the title to change). new TabTitleObserver( - mTabbedActivityTestRule.getActivity().getActivityTab(), + mTabbedActivityTestRule.getActivityTab(), "Got appinstalled: listener, attr") .waitForTitleUpdate(3); @@ -414,7 +413,7 @@ // The appinstalled event should fire (and cause the title to change). new TabTitleObserver( - mCustomTabActivityTestRule.getActivity().getActivityTab(), + mCustomTabActivityTestRule.getActivityTab(), "Got appinstalled: listener, attr") .waitForTitleUpdate(3); @@ -447,9 +446,7 @@ // The userChoice promise should resolve (and cause the title to change). appinstalled is // not fired for native apps - new TabTitleObserver( - mTabbedActivityTestRule.getActivity().getActivityTab(), - "Got userChoice: accepted") + new TabTitleObserver(mTabbedActivityTestRule.getActivityTab(), "Got userChoice: accepted") .waitForTitleUpdate(3); Assert.assertEquals( @@ -471,9 +468,7 @@ // The userChoice promise should resolve (and cause the title to change). appinstalled is // not fired for native apps - new TabTitleObserver( - mTabbedActivityTestRule.getActivity().getActivityTab(), - "Got userChoice: accepted") + new TabTitleObserver(mTabbedActivityTestRule.getActivityTab(), "Got userChoice: accepted") .waitForTitleUpdate(3); Assert.assertEquals( @@ -500,8 +495,7 @@ // The appinstalled event should fire (and cause the title to change). new TabTitleObserver( - mCustomTabActivityTestRule.getActivity().getActivityTab(), - "Got userChoice: accepted") + mCustomTabActivityTestRule.getActivityTab(), "Got userChoice: accepted") .waitForTitleUpdate(3); Assert.assertEquals( @@ -718,7 +712,7 @@ // The appinstalled event should fire (and cause the title to change). new TabTitleObserver( - mTabbedActivityTestRule.getActivity().getActivityTab(), + mTabbedActivityTestRule.getActivityTab(), "Got appinstalled: listener, attr") .waitForTitleUpdate(3); @@ -758,9 +752,7 @@ waitUntilBottomSheetStatus(BottomSheetController.SheetState.HIDDEN); // Ensure userChoice is resolved. - new TabTitleObserver( - mTabbedActivityTestRule.getActivity().getActivityTab(), - "Got userChoice: dismissed") + new TabTitleObserver(mTabbedActivityTestRule.getActivityTab(), "Got userChoice: dismissed") .waitForTitleUpdate(3); Assert.assertEquals( @@ -849,7 +841,7 @@ mTabbedActivityTestRule.loadUrlInNewTab(ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL); navigateToUrlAndWaitForBannerManager(mTabbedActivityTestRule.getActivityTestRule(), url); - Tab tab = mTabbedActivityTestRule.getActivity().getActivityTab(); + Tab tab = mTabbedActivityTestRule.getActivityTab(); tapAndWaitForModalBanner(tab); // Navigate and check that the dialog was dismissed.
diff --git a/chrome/browser/browser_features.h b/chrome/browser/browser_features.h index e5003ab..c56deb4 100644 --- a/chrome/browser/browser_features.h +++ b/chrome/browser/browser_features.h
@@ -60,13 +60,6 @@ BASE_DECLARE_FEATURE(kNetworkAnnotationMonitoring); BASE_DECLARE_FEATURE(kNewTabPageTriggerForPrerender2); -// This parameter is used to set a time threshold for triggering onMouseHover -// prerender. For example, if the value is 300, the New Tab Page prerender -// will start after 300ms after mouseHover duration is over 300ms. -const base::FeatureParam<int> - kNewTabPagePrerenderStartDelayOnMouseHoverByMiliSeconds{ - &features::kNewTabPageTriggerForPrerender2, - "prerender_start_delay_on_mouse_hover_ms", 300}; const base::FeatureParam<int> kNewTabPagePreconnectStartDelayOnMouseHoverByMiliSeconds{ &features::kNewTabPageTriggerForPrerender2, @@ -74,11 +67,6 @@ const base::FeatureParam<bool> kPrerenderNewTabPageOnMousePressedTrigger{ &features::kNewTabPageTriggerForPrerender2, "prerender_new_tab_page_on_mouse_pressed_trigger", true}; -// The hover trigger is not enabled as we're aware that this negatively -// affects other navigations like Omnibox search. -const base::FeatureParam<bool> kPrerenderNewTabPageOnMouseHoverTrigger{ - &features::kNewTabPageTriggerForPrerender2, - "prerender_new_tab_page_on_mouse_hover_trigger", false}; #if BUILDFLAG(IS_ANDROID) BASE_DECLARE_FEATURE(kNotificationOneTapUnsubscribe);
diff --git a/chrome/browser/chrome_browser_interface_binders_webui.cc b/chrome/browser/chrome_browser_interface_binders_webui.cc index f851d12..83df74f9 100644 --- a/chrome/browser/chrome_browser_interface_binders_webui.cc +++ b/chrome/browser/chrome_browser_interface_binders_webui.cc
@@ -108,7 +108,6 @@ #include "chrome/browser/ui/webui/metrics_reporter/metrics_reporter_service.h" #include "chrome/browser/ui/webui/new_tab_footer/new_tab_footer.mojom.h" #include "chrome/browser/ui/webui/new_tab_footer/new_tab_footer_ui.h" -#include "chrome/browser/ui/webui/new_tab_page/composebox/composebox.mojom.h" #include "chrome/browser/ui/webui/new_tab_page/composebox/variations/composebox_fieldtrial.h" #include "chrome/browser/ui/webui/new_tab_page/new_tab_page.mojom.h" #include "chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h" @@ -151,6 +150,7 @@ #include "components/search/ntp_features.h" #include "components/user_education/common/user_education_features.h" #include "ui/webui/resources/cr_components/color_change_listener/color_change_listener.mojom.h" +#include "ui/webui/resources/cr_components/composebox/composebox.mojom.h" #include "ui/webui/resources/cr_components/customize_color_scheme_mode/customize_color_scheme_mode.mojom.h" #include "ui/webui/resources/cr_components/help_bubble/custom_help_bubble.mojom.h" #include "ui/webui/resources/cr_components/history/history.mojom.h"
diff --git a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/PageInfoStoreInfoViewTest.java b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/PageInfoStoreInfoViewTest.java index 57f374bb..a739646 100644 --- a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/PageInfoStoreInfoViewTest.java +++ b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/PageInfoStoreInfoViewTest.java
@@ -100,7 +100,7 @@ // used it can cause flakiness issues for apis >= 30. private void openPageInfoFromStoreIcon(boolean fromStoreIcon, boolean dialogCheck) { ChromeActivity activity = mActivityTestRule.getActivity(); - Tab tab = activity.getActivityTab(); + Tab tab = mActivityTestRule.getActivityTab(); ThreadUtils.runOnUiThreadBlocking( () -> { new ChromePageInfo(
diff --git a/chrome/browser/controlled_frame/controlled_frame_apitest.cc b/chrome/browser/controlled_frame/controlled_frame_apitest.cc index f805e51..821ae67 100644 --- a/chrome/browser/controlled_frame/controlled_frame_apitest.cc +++ b/chrome/browser/controlled_frame/controlled_frame_apitest.cc
@@ -555,7 +555,7 @@ } } - const frame = new ControlledFrame(); + const frame = new HTMLControlledFrameElement(); const url = 'data:text/html,<body>Guest</body>'; frame.src = url; assertEq(url, frame.src); @@ -588,7 +588,7 @@ ASSERT_THAT(EvalJs(app_frame, R"( new Promise((resolve, reject) => { - const frame = new ControlledFrame(); + const frame = new HTMLControlledFrameElement(); // The back and forward methods are implemented in terms of go. Make sure // they don't call an overwritten version. frame.go = makeUnreached(); @@ -708,7 +708,7 @@ guest_view::GuestViewHistogramValue::kControlledFrame, 0); histogram_tester.ExpectBucketCount( "Blink.UseCounter.Features", - blink::mojom::WebFeature::kControlledFrameElement, 0); + blink::mojom::WebFeature::kHTMLControlledFrameElement, 0); ASSERT_TRUE(CreateControlledFrame( app_frame, embedded_https_test_server().GetURL("/index.html"))); @@ -720,7 +720,7 @@ guest_view::GuestViewHistogramValue::kControlledFrame, 1); histogram_tester.ExpectBucketCount( "Blink.UseCounter.Features", - blink::mojom::WebFeature::kControlledFrameElement, 1); + blink::mojom::WebFeature::kHTMLControlledFrameElement, 1); } class ControlledFrameWebSocketApiTest : public ControlledFrameApiTest {
diff --git a/chrome/browser/extensions/api/web_request/web_request_apitest.cc b/chrome/browser/extensions/api/web_request/web_request_apitest.cc index 70a633789..6024f3f 100644 --- a/chrome/browser/extensions/api/web_request/web_request_apitest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_apitest.cc
@@ -7878,7 +7878,6 @@ } } -#if !BUILDFLAG(IS_ANDROID) // Allows test to wait for the failure of a worker registration. class WorkerRegistrationFailureObserver : public ServiceWorkerTaskQueue::TestObserver { @@ -8070,6 +8069,4 @@ ManifestV3WebRequestApiTestWithSkipResetServiceWorkerURLLoaderFactories, testing::Bool()); -#endif // !BUILDFLAG(IS_ANDROID) - } // namespace extensions
diff --git a/chrome/browser/extensions/extension_action_runner.cc b/chrome/browser/extensions/extension_action_runner.cc index 69c0c5a..eac0bed 100644 --- a/chrome/browser/extensions/extension_action_runner.cc +++ b/chrome/browser/extensions/extension_action_runner.cc
@@ -25,6 +25,7 @@ #include "chrome/browser/extensions/permissions/site_permissions_helper.h" #include "chrome/browser/extensions/tab_helper.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/extensions/reload_page_dialog_controller.h" #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" #include "components/crx_file/id_util.h" #include "components/sessions/content/session_tab_helper.h" @@ -55,20 +56,6 @@ #include "chrome/browser/ui/extensions/extensions_dialogs.h" #endif -namespace { - -std::vector<extensions::ExtensionId> GetExtensionIds( - std::vector<const extensions::Extension*> extensions) { - std::vector<extensions::ExtensionId> extension_ids; - extension_ids.reserve(extensions.size()); - for (auto* extension : extensions) { - extension_ids.push_back(extension->id()); - } - return extension_ids; -} - -} // namespace - namespace extensions { ExtensionActionRunner::PendingScript::PendingScript( @@ -195,8 +182,7 @@ PermissionsManager::UserSiteAccess::kOnClick; })); - std::vector<ExtensionId> extension_ids = GetExtensionIds(extensions); - ShowReloadPageBubble(extension_ids); + ShowReloadPageBubble(extensions); } void ExtensionActionRunner::OnActiveTabPermissionGranted( @@ -407,7 +393,7 @@ } void ExtensionActionRunner::ShowReloadPageBubble( - const std::vector<ExtensionId>& extension_ids) { + const std::vector<const Extension*>& extensions) { // For testing, simulate the bubble being accepted by directly invoking the // callback, or rejected by skipping the callback. if (accept_bubble_for_testing_.has_value()) { @@ -420,31 +406,12 @@ return; } -#if BUILDFLAG(ENABLE_EXTENSIONS) - // TODO(emiliapaz): Consider showing the dialog as a modal if container - // doesn't exist. Currently we get the extension's icon via the action - // controller from the container, so the container must exist. - Browser* browser = chrome::FindBrowserWithTab(web_contents()); - ExtensionsContainer* const extensions_container = - browser ? browser->window()->GetExtensionsContainer() : nullptr; - if (!extensions_container) { - return; - } - - ShowReloadPageDialog( - browser, extension_ids, + gfx::NativeWindow parent = web_contents()->GetTopLevelNativeWindow(); + reload_page_dialog_controller_ = std::make_unique<ReloadPageDialogController>( + parent, browser_context_, base::BindOnce(&ExtensionActionRunner::OnReloadPageBubbleAccepted, weak_factory_.GetWeakPtr())); -#else - // TODO(crbug.com/371432155): Add the above code to desktop Android when we - // have a tab interface that works on Android. For now, just accept the - // dialog. - NOTIMPLEMENTED() << "Accepting reload page bubble"; - base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( - FROM_HERE, - base::BindOnce(&ExtensionActionRunner::OnReloadPageBubbleAccepted, - weak_factory_.GetWeakPtr())); -#endif // BUILDFLAG(ENABLE_EXTENSIONS) + reload_page_dialog_controller_->TriggerShow(extensions); } void ExtensionActionRunner::OnReloadPageBubbleAccepted() {
diff --git a/chrome/browser/extensions/extension_action_runner.h b/chrome/browser/extensions/extension_action_runner.h index cdccb51..57cec3c 100644 --- a/chrome/browser/extensions/extension_action_runner.h +++ b/chrome/browser/extensions/extension_action_runner.h
@@ -17,6 +17,7 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/scoped_observation.h" +#include "chrome/browser/ui/extensions/reload_page_dialog_controller.h" #include "content/public/browser/web_contents_observer.h" #include "extensions/browser/blocked_action_type.h" #include "extensions/browser/extension_action.h" @@ -81,12 +82,9 @@ // well. void GrantTabPermissions(const std::vector<const Extension*>& extensions); - // TODO(crbug.com/40883928): Move the reload bubble outside of - // `ExtensionActionRunner` as it is no longer tied to running an action. See - // if it can be merged with extensions dialogs utils `ShowReloadPageDialog`. - // Shows the bubble to prompt the user to refresh the page to run or not the - // action for the given `extension_ids`. - void ShowReloadPageBubble(const std::vector<ExtensionId>& extension_ids); + // TODO(crbug.com/424012380): Move to ReloadPageDialogController, as well as + // the on accepted callback. + void ShowReloadPageBubble(const std::vector<const Extension*>& extensions); // Notifies the ExtensionActionRunner that an extension has been granted // active tab permissions. This will run any pending injections for that @@ -234,7 +232,11 @@ // actions. bool ignore_active_tab_granted_ = false; - // If true, immediately accept the blocked action dialog by running the + // TODO(crbug.com/424012380): reload page dialog ownership should be moved to + // each caller. + std::unique_ptr<ReloadPageDialogController> reload_page_dialog_controller_; + + // If true, immediately accept the reload page dialog by running the // callback. std::optional<bool> accept_bubble_for_testing_;
diff --git a/chrome/browser/extensions/extension_context_menu_model_unittest.cc b/chrome/browser/extensions/extension_context_menu_model_unittest.cc index 38da14d95..d417a8b 100644 --- a/chrome/browser/extensions/extension_context_menu_model_unittest.cc +++ b/chrome/browser/extensions/extension_context_menu_model_unittest.cc
@@ -1645,7 +1645,6 @@ // Set the extension to run "on click". Since we are revoking b.com // permissions, we need to automatically accept the reload page bubble. - menu.ExecuteCommand(kOnClick, 0); ExtensionActionRunner::GetForWebContents(web_contents) ->accept_bubble_for_testing(true); PermissionsManagerWaiter waiter(permissions_manager);
diff --git a/chrome/browser/extensions/permissions/site_permissions_helper.cc b/chrome/browser/extensions/permissions/site_permissions_helper.cc index 48e059c..c57a4063 100644 --- a/chrome/browser/extensions/permissions/site_permissions_helper.cc +++ b/chrome/browser/extensions/permissions/site_permissions_helper.cc
@@ -32,16 +32,6 @@ constexpr int kRefreshRequiredActionsMask = BLOCKED_ACTION_WEB_REQUEST | BLOCKED_ACTION_SCRIPT_AT_START; -std::vector<ExtensionId> GetExtensionIds( - const std::vector<const Extension*>& extensions) { - std::vector<ExtensionId> extension_ids; - extension_ids.reserve(extensions.size()); - for (const auto* extension : extensions) { - extension_ids.push_back(extension->id()); - } - return extension_ids; -} - } // namespace SitePermissionsHelper::SitePermissionsHelper(Profile* profile) @@ -201,8 +191,7 @@ if (action_runner && reload_required) { // Show the reload bubble for all extensions, since it could be confusing to // the user why only some of them appear on the dialog. - std::vector<ExtensionId> extension_ids = GetExtensionIds(extensions); - action_runner->ShowReloadPageBubble(extension_ids); + action_runner->ShowReloadPageBubble(extensions); } }
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index d4ce7f1..adbfea5 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -738,7 +738,7 @@ "expiry_milestone": 145 }, { - "name": "autofill-enable-buy-now-pay-later-for-externally-linked-klarna", + "name": "autofill-enable-buy-now-pay-later-for-externally-linked", "owners": ["wilsonlow@google.com", "payments-autofill-team@google.com"], "expiry_milestone": 150 }, @@ -5495,6 +5495,14 @@ "expiry_milestone": 144 }, { + "name":"glic-panel-reset-size-and-location-on-open" , + "owners": [ + "perrier@chromium.org", + "//chrome/browser/glic/OWNERS" + ], + "expiry_milestone": 144 + }, + { "name":"glic-panel-reset-top-chrome-button" , "owners": [ "perrier@chromium.org", @@ -5845,6 +5853,11 @@ "expiry_milestone": 140 }, { + "name": "increment-local-surface-id-for-mainframe-same-doc-navigation", + "owners": [ "lazzzis@google.com", "acondor@google.com", "clank-performance-team@google.com", "chrome-seamless-core@google.com" ], + "expiry_milestone": 140 + }, + { "name": "infinite-tabs-freezing", "owners": [ "fdoray@chromium.org", "catan-team@chromium.org" ], "expiry_milestone": 142
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 09dae96..522a3aa 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -697,11 +697,11 @@ "When enabled, users will have the option to pay with buy now pay later on " "specific merchant webpages."; -const char kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarnaName[] = - "Enable buy now pay later for externally linked Klarna"; -const char kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarnaDescription[] = +const char kAutofillEnableBuyNowPayLaterForExternallyLinkedName[] = + "Enable buy now pay later for externally linked BNPL issuer"; +const char kAutofillEnableBuyNowPayLaterForExternallyLinkedDescription[] = "When enabled, users will have the option to pay with buy now pay later " - "with externally linked Klarna on specific merchant webpages."; + "with externally linked issuer on specific merchant webpages."; const char kAutofillEnableBuyNowPayLaterForKlarnaName[] = "Enable buy now pay later on Autofill for Klarna"; @@ -998,7 +998,9 @@ const char kBackForwardTransitionsName[] = "Back-forward visual transitions"; const char kBackForwardTransitionsDescription[] = "If enabled, adds animated gesture transitions for back/forward session " - "history navigations."; + "history navigations. NOTE: enable " + "increment-local-surface-id-for-mainframe-same-doc-navigation to enable " + "the transition on same-doc navigations."; const char kBiometricReauthForPasswordFillingName[] = "Biometric reauth for password filling"; @@ -1349,6 +1351,10 @@ "Glic Panel Reset On Session Timeout"; const char kGlicPanelResetOnSessionTimeoutDescription[] = "Enables resetting the panel position after a session timeout."; +const char kGlicPanelResetSizeAndLocationName[] = + "Glic Panel Reset Size and Location"; +const char kGlicPanelResetSizeAndLocationDescription[] = + "Enables resetting the panel size and position on every open."; const char kGlicWarmingName[] = "Glic Pre-Warming"; const char kGlicWarmingDescription[] = "Enables the pre-warming of the Glic panel's web client."; @@ -2444,6 +2450,12 @@ "Overrides the built-in software rendering list and enables " "GPU-acceleration on unsupported system configurations."; +const char kIncrementLocalSurfaceIdForMainframeSameDocNavigationName[] = + "Increments LocalSurfaceId for main-frame same-doc navigations"; +const char kIncrementLocalSurfaceIdForMainframeSameDocNavigationDescription[] = + "If enabled, every same-document navigations in the main-frame will also " + "increment the LocalSurfaceId."; + const char kIncognitoScreenshotName[] = "Incognito Screenshot"; const char kIncognitoScreenshotDescription[] = "Enables Incognito screenshots on Android. It will also make Incognito " @@ -6505,13 +6517,6 @@ "When enabled Cellular Setup and Settings UI will use the second available " "eUICC that's exposed by Hermes."; -const char kClipboardHistoryLongpressName[] = - "Hold Ctrl+V to paste an item from clipboard history"; -const char kClipboardHistoryLongpressDescription[] = - "Enables an experimental behavior change where long-pressing Ctrl+V shows " - "the clipboard history menu. If an item is selected to paste, it replaces " - "the content initially pasted by Ctrl+V."; - const char kCloudGamingDeviceName[] = "Enable cloud game search"; const char kCloudGamingDeviceDescription[] = "Enables cloud game search results in the launcher.";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 4e84df7..f63c3d21 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -452,9 +452,8 @@ extern const char kAutofillEnableBuyNowPayLaterName[]; extern const char kAutofillEnableBuyNowPayLaterDescription[]; -extern const char kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarnaName[]; -extern const char - kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarnaDescription[]; +extern const char kAutofillEnableBuyNowPayLaterForExternallyLinkedName[]; +extern const char kAutofillEnableBuyNowPayLaterForExternallyLinkedDescription[]; extern const char kAutofillEnableBuyNowPayLaterForKlarnaName[]; extern const char kAutofillEnableBuyNowPayLaterForKlarnaDescription[]; @@ -725,6 +724,8 @@ extern const char kGlicPanelSetPositionOnDragDescription[]; extern const char kGlicPanelResetOnSessionTimeoutName[]; extern const char kGlicPanelResetOnSessionTimeoutDescription[]; +extern const char kGlicPanelResetSizeAndLocationName[]; +extern const char kGlicPanelResetSizeAndLocationDescription[]; extern const char kGlicWarmingName[]; extern const char kGlicWarmingDescription[]; extern const char kGlicFreWarmingName[]; @@ -1419,6 +1420,10 @@ extern const char kIgnoreGpuBlocklistName[]; extern const char kIgnoreGpuBlocklistDescription[]; +extern const char kIncrementLocalSurfaceIdForMainframeSameDocNavigationName[]; +extern const char + kIncrementLocalSurfaceIdForMainframeSameDocNavigationDescription[]; + extern const char kIncognitoScreenshotName[]; extern const char kIncognitoScreenshotDescription[]; @@ -3764,9 +3769,6 @@ extern const char kCellularUseSecondEuiccName[]; extern const char kCellularUseSecondEuiccDescription[]; -extern const char kClipboardHistoryLongpressName[]; -extern const char kClipboardHistoryLongpressDescription[]; - extern const char kCloudGamingDeviceName[]; extern const char kCloudGamingDeviceDescription[];
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc index e328f6e..677a203 100644 --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -482,6 +482,7 @@ &sensitive_content::features::kSensitiveContentWhileSwitchingTabs, &spellcheck::kAndroidGrammarCheck, &spellcheck::kAndroidSpellcheckNativeUi, + &supervised_user::kPropagateDeviceContentFiltersToSupervisedUser, &switches::kMitigateLegacySearchEnginePromoOverlap, &sync_sessions::kOptimizeAssociateWindowsAndroid, &syncer::kWebApkBackupAndRestoreBackend, @@ -1114,7 +1115,7 @@ BASE_FEATURE(kNativePageTransitionHardwareCapture, "NativePageTransitionHardwareCapture", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE(kNavBarColorAnimation, "NavBarColorAnimation",
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java index 4392c38f..0a4af32 100644 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -528,6 +528,8 @@ public static final String PRIVACY_SANDBOX_SENTIMENT_SURVEY = "PrivacySandboxSentimentSurvey"; public static final String PRIVACY_SANDBOX_SETTINGS_4 = "PrivacySandboxSettings4"; public static final String PROCESS_RANK_POLICY_ANDROID = "ProcessRankPolicyAndroid"; + public static final String PROPAGATE_DEVICE_CONTENT_FILTERS_TO_SUPERVISED_USER = + "PropagateDeviceContentFiltersToSupervisedUser"; public static final String PUSH_MESSAGING_DISALLOW_SENDER_IDS = "PushMessagingDisallowSenderIDs"; public static final String PWA_RESTORE_UI = "PwaRestoreUi";
diff --git a/chrome/browser/glic/glic_metrics.cc b/chrome/browser/glic/glic_metrics.cc index 5da9cb0f..00381a5 100644 --- a/chrome/browser/glic/glic_metrics.cc +++ b/chrome/browser/glic/glic_metrics.cc
@@ -72,6 +72,9 @@ } return ActiveTabSharingState::kNoTabCanBeShared; } + int32_t GetNumPinnedTabs() const override { + return sharing_manager_->GetNumPinnedTabs(); + } private: raw_ptr<GlicWindowController> window_controller_; @@ -324,6 +327,9 @@ "Glic.Response.Segmentation", GetResponseSegmentation(attached, input_mode_, invocation_source_)); + base::UmaHistogramCounts100("Glic.Response.TabsPinnedForSharingCount", + delegate_->GetNumPinnedTabs()); + ukm::builders::Glic_Response(source_id_) .SetAttached(attached) .SetInvocationSource(static_cast<int64_t>(invocation_source_))
diff --git a/chrome/browser/glic/glic_metrics.h b/chrome/browser/glic/glic_metrics.h index 6b56ee8e..4cb6442 100644 --- a/chrome/browser/glic/glic_metrics.h +++ b/chrome/browser/glic/glic_metrics.h
@@ -208,6 +208,7 @@ virtual bool IsWindowAttached() const = 0; virtual content::WebContents* GetContents() = 0; virtual ActiveTabSharingState GetActiveTabSharingState() = 0; + virtual int32_t GetNumPinnedTabs() const = 0; }; GlicMetrics(Profile* profile, GlicEnabling* enabling);
diff --git a/chrome/browser/glic/glic_metrics_unittest.cc b/chrome/browser/glic/glic_metrics_unittest.cc index e65811b..a75b50b7 100644 --- a/chrome/browser/glic/glic_metrics_unittest.cc +++ b/chrome/browser/glic/glic_metrics_unittest.cc
@@ -56,6 +56,7 @@ ActiveTabSharingState GetActiveTabSharingState() override { return tab_sharing_state_; } + int32_t GetNumPinnedTabs() const override { return num_pinned_tabs_; } void SetWebContents(content::WebContents* contents) { contents_ = contents; } raw_ptr<content::WebContents> contents_; @@ -64,6 +65,7 @@ bool attached_ = false; ActiveTabSharingState tab_sharing_state_ = ActiveTabSharingState::kActiveTabIsShared; + int32_t num_pinned_tabs_ = 0; }; class MockStatusIcon : public StatusIcon {
diff --git a/chrome/browser/glic/glic_zero_state_suggestions_manager.cc b/chrome/browser/glic/glic_zero_state_suggestions_manager.cc index a77e8f8..854456b 100644 --- a/chrome/browser/glic/glic_zero_state_suggestions_manager.cc +++ b/chrome/browser/glic/glic_zero_state_suggestions_manager.cc
@@ -134,11 +134,8 @@ const std::vector<std::string>& supported_tools, glic::mojom::WebClientHandler::GetZeroStateSuggestionsAndSubscribeCallback callback) { - // Subscribe to changes in the focus tab. + // Subscribe to changes in sharing. if (is_notifying) { - if (current_zero_state_suggestions_focus_change_subscription_) { - LOG(WARNING) << "Multiple active ZeroStateSuggestion requests"; - } // If there were previous subscriptions they will be unsubscribed when the // old values are destructed on assignment. // TODO: b/433738020 - Investigate whether we should listen to a different @@ -159,12 +156,29 @@ NotifyZeroStateSuggestionsOnPinnedTabDataChanged, GetWeakPtr(), is_first_run, supported_tools)); + if (!contextual_cueing_service_) { + return; + } + + if (auto pinned_tabs = sharing_manager_->GetPinnedTabs(); + !pinned_tabs.empty()) { + contextual_cueing_service_ + ->GetContextualGlicZeroStateSuggestionsForPinnedTabs( + pinned_tabs, is_first_run, supported_tools, + /* focused_tab=*/nullptr, + mojo::WrapCallbackWithDefaultInvokeIfNotRun( + base::BindOnce(&GlicZeroStateSuggestionsManager:: + OnZeroStateSuggestionsFetched, + GetWeakPtr(), std::move(callback)), + /*returned_suggestions=*/std::vector<std::string>({}))); + return; + } + auto* active_web_contents = sharing_manager_->GetFocusedTabData().focus() ? sharing_manager_->GetFocusedTabData().focus()->GetContents() : nullptr; - - if (contextual_cueing_service_ && active_web_contents) { + if (active_web_contents) { contextual_cueing_service_ ->GetContextualGlicZeroStateSuggestionsForFocusedTab( active_web_contents, is_first_run, supported_tools, @@ -175,21 +189,6 @@ /*returned_suggestions=*/std::vector<std::string>({}))); return; } - if (contextual_cueing_service_) { - auto pinned_tabs = sharing_manager_->GetPinnedTabs(); - if (pinned_tabs.size() > 0) { - contextual_cueing_service_ - ->GetContextualGlicZeroStateSuggestionsForPinnedTabs( - pinned_tabs, is_first_run, supported_tools, - /* focused_tab=*/nullptr, - mojo::WrapCallbackWithDefaultInvokeIfNotRun( - base::BindOnce(&GlicZeroStateSuggestionsManager:: - OnZeroStateSuggestionsFetched, - GetWeakPtr(), std::move(callback)), - /*returned_suggestions=*/std::vector<std::string>({}))); - return; - } - } } else { // If is_notifying is false we need to reset the subscriptions. Reset();
diff --git a/chrome/browser/glic/host/glic.mojom b/chrome/browser/glic/host/glic.mojom index a83eead..053ade58 100644 --- a/chrome/browser/glic/host/glic.mojom +++ b/chrome/browser/glic/host/glic.mojom
@@ -1072,6 +1072,8 @@ enum HostCapability { // Glic host supports ScrollTo() with PDF documents. kScrollToPdf = 0, + // Glic host will reset panel size and location on open. + kResetSizeAndLocationOnOpen = 1, }; // A request to change the glic web client to a view suitable for tracking the
diff --git a/chrome/browser/glic/host/glic_api_browsertest.cc b/chrome/browser/glic/host/glic_api_browsertest.cc index f9c270fa..c146aec 100644 --- a/chrome/browser/glic/host/glic_api_browsertest.cc +++ b/chrome/browser/glic/host/glic_api_browsertest.cc
@@ -1852,7 +1852,8 @@ const bool enable_features = GetParam(); if (enable_features) { std::vector<base::test::FeatureRefAndParams> enabled_features = { - {features::kGlicScrollTo, {{"glic-scroll-to-pdf", "true"}}}}; + {features::kGlicScrollTo, {{"glic-scroll-to-pdf", "true"}}}, + {features::kGlicPanelResetSizeAndLocationOnOpen, {}}}; scoped_feature_list_.InitWithFeaturesAndParameters( enabled_features, /*disabled_features=*/{});
diff --git a/chrome/browser/glic/host/glic_page_handler.cc b/chrome/browser/glic/host/glic_page_handler.cc index d9da2c3..62bfbc30 100644 --- a/chrome/browser/glic/host/glic_page_handler.cc +++ b/chrome/browser/glic/host/glic_page_handler.cc
@@ -626,6 +626,11 @@ state->host_capabilities.push_back(mojom::HostCapability::kScrollToPdf); } #endif + if (base::FeatureList::IsEnabled( + features::kGlicPanelResetSizeAndLocationOnOpen)) { + state->host_capabilities.push_back( + mojom::HostCapability::kResetSizeAndLocationOnOpen); + } std::move(callback).Run(std::move(state)); }
diff --git a/chrome/browser/glic/widget/glic_window_config.cc b/chrome/browser/glic/widget/glic_window_config.cc index 419bb4be..ff62f8c 100644 --- a/chrome/browser/glic/widget/glic_window_config.cc +++ b/chrome/browser/glic/widget/glic_window_config.cc
@@ -31,6 +31,11 @@ return (base::TimeTicks::Now() - last_close_time_) > GetSessionTimeoutDelay(); } +bool GlicWindowConfig::ShouldResetSizeAndLocationOnShow() const { + return base::FeatureList::IsEnabled( + features::kGlicPanelResetSizeAndLocationOnOpen); +} + void GlicWindowConfig::SetLastOpenTime() { last_open_time_ = base::TimeTicks::Now(); }
diff --git a/chrome/browser/glic/widget/glic_window_config.h b/chrome/browser/glic/widget/glic_window_config.h index 13a3543c..a2e478e 100644 --- a/chrome/browser/glic/widget/glic_window_config.h +++ b/chrome/browser/glic/widget/glic_window_config.h
@@ -29,6 +29,9 @@ // timeout. bool ShouldResetOnNewSession() const; + // True if the panel size should reset when opening + bool ShouldResetSizeAndLocationOnShow() const; + void SetLastOpenTime(); void SetLastCloseTime();
diff --git a/chrome/browser/glic/widget/glic_window_controller_impl.cc b/chrome/browser/glic/widget/glic_window_controller_impl.cc index ceb19c6dd..6f639406 100644 --- a/chrome/browser/glic/widget/glic_window_controller_impl.cc +++ b/chrome/browser/glic/widget/glic_window_controller_impl.cc
@@ -614,6 +614,16 @@ if (window_config_.ShouldResetOnNewSession()) { previous_position_.reset(); } + if (window_config_.ShouldResetSizeAndLocationOnShow()) { + previous_position_.reset(); + gfx::Size initial_size = GlicWidget::GetInitialSize(); + // Keep the old height if it is larger than the initial size. + if (glic_size_.has_value() && + glic_size_->height() > initial_size.height()) { + initial_size.set_height((glic_size_->height())); + } + glic_size_ = initial_size; + } window_config_.SetLastOpenTime(); if (!glic_service_->GetAuthController().CheckAuthBeforeShowSync( base::BindOnce(&GlicWindowControllerImpl::ShowAfterSignIn,
diff --git a/chrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationConfigManager.java b/chrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationConfigManager.java index acb9aec4..e854120 100644 --- a/chrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationConfigManager.java +++ b/chrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationConfigManager.java
@@ -29,6 +29,7 @@ private static final Executor EXECUTOR = (Runnable r) -> PostTask.postTask(TaskTraits.USER_BLOCKING_MAY_BLOCK, r); private boolean mIsInitialized; + private @NtpBackgroundImageType int mBackgroundImageType; private @Nullable BitmapDrawable mBackgroundImageDrawable; private boolean mIsMvtToggleOn; @@ -68,8 +69,8 @@ if (mIsInitialized) return; mIsInitialized = true; - @NtpBackgroundImageType int imageType = NtpCustomizationUtils.getNtpBackgroundImageType(); - if (imageType == NtpBackgroundImageType.IMAGE_FROM_DISK) { + mBackgroundImageType = NtpCustomizationUtils.getNtpBackgroundImageType(); + if (mBackgroundImageType == NtpBackgroundImageType.IMAGE_FROM_DISK) { NtpCustomizationUtils.readNtpBackgroundImage( (bitmap) -> notifyBackgroundImageChanged(bitmap), EXECUTOR); } @@ -115,10 +116,11 @@ * @param bitmap : The NTP's background image. */ public void onBackgroundChanged(@Nullable Bitmap bitmap) { - NtpCustomizationUtils.setNtpBackgroundImageType( + mBackgroundImageType = bitmap == null ? NtpBackgroundImageType.DEFAULT - : NtpBackgroundImageType.IMAGE_FROM_DISK); + : NtpBackgroundImageType.IMAGE_FROM_DISK; + NtpCustomizationUtils.setNtpBackgroundImageType(mBackgroundImageType); notifyBackgroundImageChanged(bitmap); @@ -170,6 +172,11 @@ } } + /** Gets the NTP's background image type. */ + public @NtpBackgroundImageType int getBackgroundImageType() { + return mBackgroundImageType; + } + public void setBackgroundImageDrawableForTesting(@Nullable BitmapDrawable bitmapDrawable) { mBackgroundImageDrawable = bitmapDrawable; }
diff --git a/chrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationUtils.java b/chrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationUtils.java index 3ca87f3..258dcaa 100644 --- a/chrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationUtils.java +++ b/chrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationUtils.java
@@ -305,6 +305,24 @@ return assumeNonNull(tab.getNativePage()).supportsEdgeToEdgeOnTop(); } + /** + * Returns whether to skip a layout change from the given systemTopInset and consumeTopInset + * status. + * + * @param appliedTopPadding The value of currently applied top padding. + * @param systemTopInset The system's top inset, i.e., the height of Status bar. + * @param consumeTopInset Whether should consume the system's top inset. + */ + public static boolean shouldSkipTopInsetsChange( + int appliedTopPadding, int systemTopInset, boolean consumeTopInset) { + // We skip a layout change if the top padding doesn't need adjusting. This occurs in two + // scenarios: + // 1) Top padding was already added and should remain. + // 2) No top padding was added and none is needed now. + return ((appliedTopPadding == systemTopInset) && consumeTopInset) + || ((appliedTopPadding == 0) && !consumeTopInset); + } + public static void resetSharedPreferenceForTesting() { SharedPreferencesManager prefsManager = ChromeSharedPreferences.getInstance(); prefsManager.removeKey(ChromePreferenceKeys.NTP_CUSTOMIZATION_BACKGROUND_IMAGE_TYPE);
diff --git a/chrome/browser/ntp_customization/junit/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationConfigManagerUnitTest.java b/chrome/browser/ntp_customization/junit/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationConfigManagerUnitTest.java index 2f5bc52..171e75a 100644 --- a/chrome/browser/ntp_customization/junit/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationConfigManagerUnitTest.java +++ b/chrome/browser/ntp_customization/junit/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationConfigManagerUnitTest.java
@@ -101,11 +101,17 @@ mNtpCustomizationConfigManager.onBackgroundChanged(bitmap); verify(mListener).onBackgroundChanged(mBitmapDrawableCaptor.capture()); assertEquals(bitmap, mBitmapDrawableCaptor.getValue().getBitmap()); + assertEquals( + NtpCustomizationUtils.NtpBackgroundImageType.IMAGE_FROM_DISK, + mNtpCustomizationConfigManager.getBackgroundImageType()); clearInvocations(mListener); mNtpCustomizationConfigManager.removeListener(mListener); mNtpCustomizationConfigManager.onBackgroundChanged(null); verify(mListener, never()).onBackgroundChanged(any()); + assertEquals( + NtpCustomizationUtils.NtpBackgroundImageType.DEFAULT, + mNtpCustomizationConfigManager.getBackgroundImageType()); } @Test
diff --git a/chrome/browser/ntp_customization/junit/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationUtilsUnitTest.java b/chrome/browser/ntp_customization/junit/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationUtilsUnitTest.java index e2f9e0b..0967b62 100644 --- a/chrome/browser/ntp_customization/junit/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationUtilsUnitTest.java +++ b/chrome/browser/ntp_customization/junit/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationUtilsUnitTest.java
@@ -138,4 +138,32 @@ when(nativePage.supportsEdgeToEdgeOnTop()).thenReturn(true); assertTrue(NtpCustomizationUtils.supportsEnableEdgeToEdgeOnTop(mTab)); } + + @Test + public void testShouldSkipTopInsetChange() { + assertTrue( + NtpCustomizationUtils.shouldSkipTopInsetsChange( + /* appliedTopPadding= */ 50, + /* systemTopInset= */ 50, + /* consumeTopInset= */ true)); + assertTrue( + NtpCustomizationUtils.shouldSkipTopInsetsChange( + /* appliedTopPadding= */ 0, + /* systemTopInset= */ 50, + /* consumeTopInset= */ false)); + // Verifies do NOT skip if NTP should consume top inset while its current layout doesn't + // have a top padding. + assertFalse( + NtpCustomizationUtils.shouldSkipTopInsetsChange( + /* appliedTopPadding= */ 0, + /* systemTopInset= */ 50, + /* consumeTopInset= */ true)); + // Verifies do NOT skip if NTP shouldn't consume top inset while its current layout has a + // top padding. + assertFalse( + NtpCustomizationUtils.shouldSkipTopInsetsChange( + /* appliedTopPadding= */ 50, + /* systemTopInset= */ 50, + /* consumeTopInset= */ false)); + } }
diff --git a/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/OtrProfileId.java b/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/OtrProfileId.java index 2166120..0b72809 100644 --- a/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/OtrProfileId.java +++ b/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/OtrProfileId.java
@@ -69,7 +69,7 @@ * @throws IllegalStateException when the OTR profile belongs to the OtrProfileId is not * available. The off-the-record profile should exist when OtrProfileId will be used. */ - public static @Nullable OtrProfileId deserialize(String value) { + public static @Nullable OtrProfileId deserialize(@Nullable String value) { OtrProfileId otrProfileId = deserializeWithoutVerify(value); // The off-the-record profile should exist for the given OtrProfileId, since OtrProfileId
diff --git a/chrome/browser/resources/glic/glic_api/glic_api.ts b/chrome/browser/resources/glic/glic_api/glic_api.ts index 58030dfa..eba4d57 100644 --- a/chrome/browser/resources/glic/glic_api/glic_api.ts +++ b/chrome/browser/resources/glic/glic_api/glic_api.ts
@@ -1648,6 +1648,8 @@ export enum HostCapability { /** Glic host supports scrollTo() on PDF documents. */ SCROLL_TO_PDF = 0, + /** Glic host will reset panel size and location on open. */ + RESET_SIZE_AND_LOCATION_ON_OPEN = 1, } //
diff --git a/chrome/browser/resources/new_tab_page/BUILD.gn b/chrome/browser/resources/new_tab_page/BUILD.gn index ec9ce3b9..1237d09 100644 --- a/chrome/browser/resources/new_tab_page/BUILD.gn +++ b/chrome/browser/resources/new_tab_page/BUILD.gn
@@ -53,10 +53,10 @@ "//chrome/browser/new_tab_page/modules/v2/tab_groups:mojo_bindings_ts__generator", "//chrome/browser/ui/webui/customize_buttons:mojo_bindings_ts__generator", "//chrome/browser/ui/webui/new_tab_page:mojo_bindings_ts__generator", - "//chrome/browser/ui/webui/new_tab_page/composebox:mojo_bindings_ts__generator", "//chrome/browser/ui/webui/new_tab_page/ntp_promo:mojo_bindings_ts__generator", "//chrome/browser/ui/webui/ntp_microsoft_auth:shared_ts__generator", "//components/omnibox/composebox:mojo_bindings_ts__generator", + "//ui/webui/resources/cr_components/composebox:mojo_bindings_ts__generator", ] mojo_files = [ "$root_gen_dir/chrome/browser/new_tab_page/modules/file_suggestion/drive_suggestion.mojom-webui.ts", @@ -72,7 +72,7 @@ "$root_gen_dir/chrome/browser/ui/webui/new_tab_page/new_tab_page.mojom-webui.ts", "$root_gen_dir/chrome/browser/ui/webui/ntp_microsoft_auth/ntp_microsoft_auth_shared_ui.mojom-webui.ts", "$root_gen_dir/chrome/browser/ui/webui/customize_buttons/customize_buttons.mojom-webui.ts", - "$root_gen_dir/chrome/browser/ui/webui/new_tab_page/composebox/composebox.mojom-webui.ts", + "$root_gen_dir/ui/webui/resources/cr_components/composebox/composebox.mojom-webui.ts", "$root_gen_dir/chrome/browser/ui/webui/new_tab_page/ntp_promo/ntp_promo.mojom-webui.ts", "$root_gen_dir/components/omnibox/composebox/composebox_query.mojom-webui.ts", ] @@ -94,6 +94,7 @@ "//chrome/browser/resources/new_tab_shared:build_ts", "//third_party/lit/v3_0:build_ts", "//ui/webui/resources/cr_components/color_change_listener:build_ts", + "//ui/webui/resources/cr_components/composebox:build_ts", "//ui/webui/resources/cr_components/help_bubble:build_ts", "//ui/webui/resources/cr_components/most_visited:build_ts", "//ui/webui/resources/cr_components/page_image_service:build_ts", @@ -122,6 +123,9 @@ "chrome://resources/cr_components/most_visited/most_visited.mojom-webui.js", "chrome://resources/cr_components/page_image_service/page_image_service.mojom-webui.js", "chrome://resources/mojo/omnibox/browser/searchbox.mojom-webui.js", + "chrome://resources/cr_components/searchbox/searchbox.mojom-webui.js", + "chrome://resources/cr_components/composebox/composebox.mojom-webui.js", + "chrome://resources/cr_components/composebox/composebox_query.mojom-webui.js", "chrome://resources/js/browser_command/browser_command.mojom-webui.js", "chrome://resources/js/metrics_reporter/metrics_reporter.mojom-webui.js", "chrome://resources/mojo/mojo/public/mojom/base/string16.mojom-webui.js",
diff --git a/chrome/browser/resources/new_tab_page/app.ts b/chrome/browser/resources/new_tab_page/app.ts index d5dd1e0..7e9d1fa 100644 --- a/chrome/browser/resources/new_tab_page/app.ts +++ b/chrome/browser/resources/new_tab_page/app.ts
@@ -2,16 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import './composebox/composebox.js'; import './iframe.js'; import './logo.js'; import '/strings.m.js'; import 'chrome://new-tab-page/shared/customize_buttons/customize_buttons.js'; import 'chrome://resources/cr_components/searchbox/searchbox.js'; import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_components/composebox/composebox.js'; import type {CustomizeButtonsElement} from 'chrome://new-tab-page/shared/customize_buttons/customize_buttons.js'; import {ColorChangeUpdater} from 'chrome://resources/cr_components/color_change_listener/colors_css_updater.js'; +import type {ComposeboxElement} from 'chrome://resources/cr_components/composebox/composebox.js'; +import {ComposeboxProxyImpl} from 'chrome://resources/cr_components/composebox/composebox_proxy.js'; import {HelpBubbleMixinLit} from 'chrome://resources/cr_components/help_bubble/help_bubble_mixin_lit.js'; import type {SearchboxElement} from 'chrome://resources/cr_components/searchbox/searchbox.js'; import type {CrToastElement} from 'chrome://resources/cr_elements/cr_toast/cr_toast.js'; @@ -30,8 +32,6 @@ import {getCss} from './app.css.js'; import {getHtml} from './app.html.js'; import {BackgroundManager} from './background_manager.js'; -import type {ComposeboxElement} from './composebox/composebox.js'; -import {ComposeboxProxyImpl} from './composebox/composebox_proxy.js'; import type {CustomizeButtonsDocumentCallbackRouter, CustomizeButtonsHandlerRemote} from './customize_buttons.mojom-webui.js'; import {CustomizeChromeSection, SidePanelOpenTrigger} from './customize_buttons.mojom-webui.js'; import {CustomizeButtonsProxy} from './customize_buttons_proxy.js'; @@ -256,6 +256,11 @@ wallpaperSearchButtonEnabled_: {type: Boolean}, showWallpaperSearchButton_: {type: Boolean}, + + /** + * Whether the composebox has been opened at least once. + */ + wasComposeboxOpened_: {type: Boolean}, }; } @@ -278,6 +283,7 @@ accessor realboxCanShowSecondarySide: boolean = false; accessor realboxHadSecondarySide: boolean = false; protected accessor realboxShown_: boolean = false; + protected accessor wasComposeboxOpened_: boolean = false; protected accessor showLensUploadDialog_: boolean = false; protected accessor showComposebox_: boolean = false; protected accessor logoEnabled_: boolean = @@ -664,6 +670,12 @@ protected toggleComposebox_() { this.showComposebox_ = !this.showComposebox_; + if (!this.wasComposeboxOpened_) { + recordLoadDuration( + 'NewTabPage.Composebox.FromNTPLoadToSessionStart', + WindowProxy.getInstance().now()); + this.wasComposeboxOpened_ = true; + } } protected onComposeboxClickOutside_() {
diff --git a/chrome/browser/resources/new_tab_page/composebox/composebox.gni b/chrome/browser/resources/new_tab_page/composebox/composebox.gni deleted file mode 100644 index 5747527..0000000 --- a/chrome/browser/resources/new_tab_page/composebox/composebox.gni +++ /dev/null
@@ -1,21 +0,0 @@ -# Copyright 2025 The Chromium Authors -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -composebox_ts_files = [ - "composebox/common.ts", - "composebox/composebox.html.ts", - "composebox/composebox.ts", - "composebox/file_carousel.html.ts", - "composebox/file_carousel.ts", - "composebox/file_thumbnail.ts", - "composebox/file_thumbnail.html.ts", - "composebox/composebox_proxy.ts", - "composebox/icons.html.ts", -] - -composebox_css_files = [ - "composebox/composebox.css", - "composebox/file_carousel.css", - "composebox/file_thumbnail.css", -]
diff --git a/chrome/browser/resources/new_tab_page/lazy_load.ts b/chrome/browser/resources/new_tab_page/lazy_load.ts index ea53592..0b6c04f 100644 --- a/chrome/browser/resources/new_tab_page/lazy_load.ts +++ b/chrome/browser/resources/new_tab_page/lazy_load.ts
@@ -10,21 +10,21 @@ * elements (either not visible by default or not as performance critical). */ -import './composebox/composebox.js'; import './ntp_promo/ntp_promo_proxy.js'; import './ntp_promo/ntp_single_promo.js'; import './middle_slot_promo.js'; import './voice_search_overlay.js'; import './modules/module_descriptors.js'; import 'chrome://resources/cr_components/most_visited/most_visited.js'; +import 'chrome://resources/cr_components/composebox/composebox.js'; export {CustomizeButtonsElement} from 'chrome://new-tab-page/shared/customize_buttons/customize_buttons.js'; +export {ComposeboxFile} from 'chrome://resources/cr_components/composebox/common.js'; +export {ComposeboxElement} from 'chrome://resources/cr_components/composebox/composebox.js'; +export {ComposeboxProxyImpl} from 'chrome://resources/cr_components/composebox/composebox_proxy.js'; +export {ComposeboxFileCarouselElement} from 'chrome://resources/cr_components/composebox/file_carousel.js'; +export {ComposeboxFileThumbnailElement} from 'chrome://resources/cr_components/composebox/file_thumbnail.js'; export {PageImageServiceBrowserProxy} from 'chrome://resources/cr_components/page_image_service/browser_proxy.js'; -export {ComposeboxFile} from './composebox/common.js'; -export {ComposeboxElement} from './composebox/composebox.js'; -export {ComposeboxProxyImpl} from './composebox/composebox_proxy.js'; -export {ComposeboxFileCarouselElement} from './composebox/file_carousel.js'; -export {ComposeboxFileThumbnailElement} from './composebox/file_thumbnail.js'; export {LensErrorType, LensFormElement, LensSubmitType} from './lens_form.js'; export {LensUploadDialogAction, LensUploadDialogElement, LensUploadDialogError} from './lens_upload_dialog.js'; export {MiddleSlotPromoElement, PromoDismissAction} from './middle_slot_promo.js';
diff --git a/chrome/browser/resources/new_tab_page/new_tab_page.gni b/chrome/browser/resources/new_tab_page/new_tab_page.gni index aaf70f2b..7cd99c3 100644 --- a/chrome/browser/resources/new_tab_page/new_tab_page.gni +++ b/chrome/browser/resources/new_tab_page/new_tab_page.gni
@@ -3,7 +3,6 @@ # found in the LICENSE file. import("//ui/webui/webui_features.gni") -import("./composebox/composebox.gni") import("./modules/modules.gni") import("./ntp_promo/ntp_promo.gni") @@ -21,7 +20,7 @@ "transparency.ts", "utils.ts", "window_proxy.ts", - ] + modules_ts_files + composebox_ts_files + ntp_promo_ts_files + ] + modules_ts_files + ntp_promo_ts_files # Files holding a Polymer element definition and have an equivalent .html file. all_web_component_files = [ @@ -35,24 +34,21 @@ "voice_search_overlay.ts", ] + modules_web_component_files -all_css_files = - [ - "app.css", - "doodle_share_dialog.css", - "iframe.css", - "lens_form.css", - "lens_upload_dialog.css", - "logo.css", - "middle_slot_promo.css", - "voice_search_overlay.css", - ] + modules_css_files + composebox_css_files + ntp_promo_css_files +all_css_files = [ + "app.css", + "doodle_share_dialog.css", + "iframe.css", + "lens_form.css", + "lens_upload_dialog.css", + "logo.css", + "middle_slot_promo.css", + "voice_search_overlay.css", + ] + modules_css_files + ntp_promo_css_files if (optimize_webui) { # Transpiled Mojo JS files to be excluded from the bundle in optimized builds. mojo_js_files = [ "calendar_data.mojom-webui.js", - "composebox.mojom-webui.js", - "composebox_query.mojom-webui.js", "ntp_promo.mojom-webui.js", "customize_buttons.mojom-webui.js", "drive_suggestion.mojom-webui.js",
diff --git a/chrome/browser/resources/webui_browser/internal b/chrome/browser/resources/webui_browser/internal index 9ead2ea..54ba496 160000 --- a/chrome/browser/resources/webui_browser/internal +++ b/chrome/browser/resources/webui_browser/internal
@@ -1 +1 @@ -Subproject commit 9ead2ea7645ae98342974de132ce9c6fe7c0c626 +Subproject commit 54ba496f51ce3792b7ef8161558985b192ac078b
diff --git a/chrome/browser/supervised_user/android/javatests/src/org/chromium/chrome/browser/supervised_user/IncognitoInteractionTest.java b/chrome/browser/supervised_user/android/javatests/src/org/chromium/chrome/browser/supervised_user/IncognitoInteractionTest.java index 2dfed58..3c3c14fa5 100644 --- a/chrome/browser/supervised_user/android/javatests/src/org/chromium/chrome/browser/supervised_user/IncognitoInteractionTest.java +++ b/chrome/browser/supervised_user/android/javatests/src/org/chromium/chrome/browser/supervised_user/IncognitoInteractionTest.java
@@ -15,6 +15,8 @@ import org.chromium.base.ThreadUtils; import org.chromium.base.test.util.CallbackHelper; import org.chromium.base.test.util.CommandLineFlags; +import org.chromium.base.test.util.Features.EnableFeatures; +import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.tab.EmptyTabObserver; @@ -66,6 +68,7 @@ @Test @LargeTest + @EnableFeatures({ChromeFeatureList.PROPAGATE_DEVICE_CONTENT_FILTERS_TO_SUPERVISED_USER}) public void incognitoTabsClosedWhenBrowserContentFilteringIsEnabledWithoutAccount() throws Exception { Profile profile = mActivityTestRule.getProfile(/* incognito= */ false); @@ -92,6 +95,7 @@ @Test @LargeTest + @EnableFeatures({ChromeFeatureList.PROPAGATE_DEVICE_CONTENT_FILTERS_TO_SUPERVISED_USER}) public void incognitoTabsClosedWhenBrowserContentFilteringIsEnabledWithAccount() throws Exception { mSigninTestRule.addAccountThenSignin(TestAccounts.ACCOUNT1); @@ -119,6 +123,7 @@ @Test @LargeTest + @EnableFeatures({ChromeFeatureList.PROPAGATE_DEVICE_CONTENT_FILTERS_TO_SUPERVISED_USER}) public void incognitoTabsClosedWhenSearchContentFilteringIsEnabledWithAccount() throws Exception { mSigninTestRule.addAccountThenSignin(TestAccounts.ACCOUNT1);
diff --git a/chrome/browser/supervised_user/classify_url_navigation_throttle.cc b/chrome/browser/supervised_user/classify_url_navigation_throttle.cc index 4696e20..0f44c04f 100644 --- a/chrome/browser/supervised_user/classify_url_navigation_throttle.cc +++ b/chrome/browser/supervised_user/classify_url_navigation_throttle.cc
@@ -261,9 +261,10 @@ bool is_main_frame) const { #if BUILDFLAG(IS_ANDROID) if (supervised_user_service()->IsLocalBrowserFilteringEnabled() && - UseInterstitialForLocalSupervision()) { - return SupervisedUserInterstitial::GetHTMLContentsWithoutApprovals( - result.url, g_browser_process->GetApplicationLocale()); + base::FeatureList::IsEnabled( + kSupervisedUserInterstitialWithoutApprovals)) { + return SupervisedUserInterstitial::GetHTMLContentsWithoutApprovals(result.url, + g_browser_process->GetApplicationLocale()); } #endif Profile* profile = Profile::FromBrowserContext( @@ -377,6 +378,7 @@ NextNavigationState(ClassifyUrlThrottleStatus::kCancelDeferredNavigation); } + const char* ClassifyUrlNavigationThrottle::GetNameForLogging() { return "ClassifyUrlNavigationThrottle"; }
diff --git a/chrome/browser/tab_ui/android/java/src/org/chromium/chrome/browser/tab_ui/TabSwitcherGroupSuggestionService.java b/chrome/browser/tab_ui/android/java/src/org/chromium/chrome/browser/tab_ui/TabSwitcherGroupSuggestionService.java index 457dd38..4232dce 100644 --- a/chrome/browser/tab_ui/android/java/src/org/chromium/chrome/browser/tab_ui/TabSwitcherGroupSuggestionService.java +++ b/chrome/browser/tab_ui/android/java/src/org/chromium/chrome/browser/tab_ui/TabSwitcherGroupSuggestionService.java
@@ -209,15 +209,6 @@ cachedSuggestions.userResponseMetadataCallback; List<GroupSuggestion> groupSuggestionsList = groupSuggestions.groupSuggestions; - - // Mark all suggestions except the first one as "not shown". - for (int i = 1; i < groupSuggestionsList.size(); i++) { - GroupSuggestion groupSuggestion = groupSuggestionsList.get(i); - userResponseCallback.onResult( - new UserResponseMetadata(groupSuggestion.suggestionId, UserResponse.NOT_SHOWN)); - } - - if (groupSuggestionsList.isEmpty()) return; GroupSuggestion suggestion = groupSuggestionsList.get(0); TabModel tabModel = filter.getTabModel(); @@ -227,6 +218,8 @@ if (tabsSortedByIndex == null || !canShowSuggestion(tabIdsToIndices, tabsSortedByIndex)) { RecordUserAction.record( TabSwitcherGroupSuggestionService.USER_ACTION_PREFIX + ".Invalidated"); + userResponseCallback.onResult( + new UserResponseMetadata(suggestion.suggestionId, UserResponse.NOT_SHOWN)); return; }
diff --git a/chrome/browser/tab_ui/android/junit/src/org/chromium/chrome/browser/tab_ui/TabSwitcherGroupSuggestionServiceUnitTest.java b/chrome/browser/tab_ui/android/junit/src/org/chromium/chrome/browser/tab_ui/TabSwitcherGroupSuggestionServiceUnitTest.java index 6839ef327..ae80f78 100644 --- a/chrome/browser/tab_ui/android/junit/src/org/chromium/chrome/browser/tab_ui/TabSwitcherGroupSuggestionServiceUnitTest.java +++ b/chrome/browser/tab_ui/android/junit/src/org/chromium/chrome/browser/tab_ui/TabSwitcherGroupSuggestionServiceUnitTest.java
@@ -4,7 +4,6 @@ package org.chromium.chrome.browser.tab_ui; -import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; @@ -43,7 +42,6 @@ import org.chromium.components.visited_url_ranking.url_grouping.GroupSuggestion; import org.chromium.components.visited_url_ranking.url_grouping.GroupSuggestions; import org.chromium.components.visited_url_ranking.url_grouping.GroupSuggestionsService; -import org.chromium.components.visited_url_ranking.url_grouping.UserResponse; import org.chromium.components.visited_url_ranking.url_grouping.UserResponseMetadata; import java.util.Collections; @@ -160,11 +158,7 @@ verify(mSuggestionLifecycleObserverHandler).onShowSuggestion(shownTabIdsList); verify(mSuggestionLifecycleObserverHandler).updateSuggestionDetails(eq(10), any()); - verify(mUserResponseCallback).onResult(mUserResponseMetadataCaptor.capture()); - - UserResponseMetadata response = mUserResponseMetadataCaptor.getValue(); - assertEquals(11, response.mSuggestionId); - assertEquals(UserResponse.NOT_SHOWN, response.mUserResponse); + verify(mUserResponseCallback, never()).onResult(mUserResponseMetadataCaptor.capture()); } @Test @@ -207,6 +201,7 @@ mService.maybeShowSuggestions(); verify(mSuggestionLifecycleObserverHandler, never()).onShowSuggestion(any()); + verify(mUserResponseCallback).onResult(any()); } @Test
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 0543f3c..6b2c163 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -3798,7 +3798,6 @@ "views/extensions/dialogs/mv2_deprecation_disabled_dialog.cc", "views/extensions/dialogs/mv2_deprecation_keep_dialog.cc", "views/extensions/dialogs/mv2_deprecation_reenable_dialog.cc", - "views/extensions/dialogs/reload_page_dialog.cc", "views/extensions/dialogs/upload_extension_to_account_dialog.cc", "views/extensions/expandable_container_view.cc", "views/extensions/expandable_container_view.h", @@ -5126,6 +5125,8 @@ "extensions/extension_install_blocked_dialog.cc", "extensions/extension_multiple_uninstall_dialog.cc", "extensions/extension_uninstall_dialog_impl.cc", + "extensions/reload_page_dialog_controller.cc", + "extensions/reload_page_dialog_controller.h", "webui/extensions/extension_icon_source.cc", "webui/extensions/extension_icon_source.h", "webui/extensions/extensions_internals_source.cc",
diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuTest.java b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuTest.java index c9c8333..0a1ab5d8 100644 --- a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuTest.java +++ b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuTest.java
@@ -15,6 +15,7 @@ import android.app.Activity; import android.graphics.Canvas; import android.graphics.Rect; +import android.os.Build.VERSION_CODES; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; @@ -219,6 +220,9 @@ @Test @MediumTest + @DisableIf.Build( + sdk_is_greater_than = VERSION_CODES.VANILLA_ICE_CREAM, + message = "crbug.com/435724248") public void testShowAppMenu_AnchorTop() throws TimeoutException { AppMenuCoordinatorImpl.setHasPermanentMenuKeyForTesting(false); showMenuAndAssert(mAppMenuHandler);
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd index 2aa2121..100856a 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -4319,6 +4319,21 @@ <message name="IDS_MENU_READER_MODE_PREFS" desc="Menu item to show reader mode preferences pane, which allows users to change the appearance (font size, theme, etc.) of the page. [CHAR_LIMIT=27]"> Appearance </message> + <message name="IDS_READER_MODE_BOTTOM_SHEET_TITLE" desc="Title of the Reading Mode bottom sheet. [CHAR_LIMIT=27]"> + Reading mode + </message> + <message name="IDS_READER_MODE_BOTTOM_SHEET_CONTENT_DESCRIPTION" desc="Content description of the Reading Mode bottom sheet."> + Reading mode bottom sheet + </message> + <message name="IDS_READER_MODE_BOTTOM_SHEET_CLOSED_CONTENT_DESCRIPTION" desc="Content description of the Reading Mode bottom sheet when closed."> + Reading mode bottom sheet closed + </message> + <message name="IDS_READER_MODE_BOTTOM_SHEET_HALF_HEIGHT_CONTENT_DESCRIPTION" desc="Content description of the Reading Mode bottom sheet when opened at half height."> + Reading mode bottom sheet opened at half height + </message> + <message name="IDS_READER_MODE_BOTTOM_SHEET_FULL_HEIGHT_CONTENT_DESCRIPTION" desc="Content description of the Reading Mode bottom sheet when opened at full height."> + Reading mode bottom sheet opened at full height + </message> <message name="IDS_MENU_SETTINGS" desc="Menu item for opening browser settings. [CHAR_LIMIT=27]"> Settings </message> @@ -7097,25 +7112,6 @@ Group tabs </message> - <!-- Reader mode --> - <message name="IDS_READER_MODE_BOTTOM_SHEET_TITLE" desc="Title of the Reading Mode bottom sheet. [CHAR_LIMIT=27]"> - Reading mode - </message> - <message name="IDS_READER_MODE_BOTTOM_SHEET_CONTENT_DESCRIPTION" desc="Content description of the Reading Mode bottom sheet."> - Reading mode bottom sheet - </message> - <message name="IDS_READER_MODE_BOTTOM_SHEET_CLOSED_CONTENT_DESCRIPTION" desc="Content description of the Reading Mode bottom sheet when closed."> - Reading mode bottom sheet closed - </message> - <message name="IDS_READER_MODE_BOTTOM_SHEET_HALF_HEIGHT_CONTENT_DESCRIPTION" desc="Content description of the Reading Mode bottom sheet when opened at half height."> - Reading mode bottom sheet opened at half height - </message> - <message name="IDS_READER_MODE_BOTTOM_SHEET_FULL_HEIGHT_CONTENT_DESCRIPTION" desc="Content description of the Reading Mode bottom sheet when opened at full height."> - Reading mode bottom sheet opened at full height - </message> - <message name="IDS_READER_MODE_UNAVAILABLE_SNACKBAR_MESSAGE" desc="Snackbar message that shown when the user attempts to enter reader mode, but content extraction fails."> - Reader mode is unavailable - </message> </messages> </release> </grit>
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_READER_MODE_UNAVAILABLE_SNACKBAR_MESSAGE.png.sha1 b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_READER_MODE_UNAVAILABLE_SNACKBAR_MESSAGE.png.sha1 deleted file mode 100644 index 458ac29..0000000 --- a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_READER_MODE_UNAVAILABLE_SNACKBAR_MESSAGE.png.sha1 +++ /dev/null
@@ -1 +0,0 @@ -85686099cafed75accecfa27e22ee2b40c6c7b8f \ No newline at end of file
diff --git a/chrome/browser/ui/android/tab_model/tab_collection_tab_model_impl.cc b/chrome/browser/ui/android/tab_model/tab_collection_tab_model_impl.cc index 90968d6..f43d86a 100644 --- a/chrome/browser/ui/android/tab_model/tab_collection_tab_model_impl.cc +++ b/chrome/browser/ui/android/tab_model/tab_collection_tab_model_impl.cc
@@ -261,6 +261,15 @@ return visual_data->is_collapsed(); } +bool TabCollectionTabModelImpl::DetachedTabGroupExists( + JNIEnv* env, + const base::Token& tab_group_id) { + TabGroupId group_id = TabGroupId::FromRawToken(tab_group_id); + TabGroupTabCollection* detached_group = + tab_strip_collection_->GetDetachedTabGroup(group_id); + return detached_group != nullptr; +} + void TabCollectionTabModelImpl::CloseDetachedTabGroup( JNIEnv* env, const base::Token& tab_group_id) {
diff --git a/chrome/browser/ui/android/tab_model/tab_collection_tab_model_impl.h b/chrome/browser/ui/android/tab_model/tab_collection_tab_model_impl.h index 84b170b..6072a8d9 100644 --- a/chrome/browser/ui/android/tab_model/tab_collection_tab_model_impl.h +++ b/chrome/browser/ui/android/tab_model/tab_collection_tab_model_impl.h
@@ -105,6 +105,9 @@ jint GetTabGroupColor(JNIEnv* env, const base::Token& tab_group_id); bool GetTabGroupCollapsed(JNIEnv* env, const base::Token& tab_group_id); + // Checks if a detached tab group exists. + bool DetachedTabGroupExists(JNIEnv* env, const base::Token& tab_group_id); + // Closes a detached tab group. void CloseDetachedTabGroup(JNIEnv* env, const base::Token& tab_group_id);
diff --git a/chrome/browser/ui/android/toolbar/BUILD.gn b/chrome/browser/ui/android/toolbar/BUILD.gn index fd471fa..53b2a31 100644 --- a/chrome/browser/ui/android/toolbar/BUILD.gn +++ b/chrome/browser/ui/android/toolbar/BUILD.gn
@@ -445,6 +445,7 @@ "//chrome/browser/fullscreen/android:java", "//chrome/browser/incognito:java", "//chrome/browser/language/android:java", + "//chrome/browser/ntp_customization:java", "//chrome/browser/preferences:java", "//chrome/browser/profiles/android:java", "//chrome/browser/search_engines/android:java",
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarPositionController.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarPositionController.java index b86286b..3468a28 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarPositionController.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarPositionController.java
@@ -32,9 +32,12 @@ import org.chromium.chrome.browser.browser_controls.BrowserControlsSizer; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider.ControlsPosition; import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.ntp_customization.NtpCustomizationUtils; +import org.chromium.chrome.browser.ntp_customization.edge_to_edge.TopInsetCoordinator; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.toolbar.settings.AddressBarPreference; +import org.chromium.chrome.browser.toolbar.top.ToolbarLayout; import org.chromium.components.embedder_support.util.UrlUtilities; import org.chromium.ui.KeyboardVisibilityDelegate; import org.chromium.ui.KeyboardVisibilityDelegate.KeyboardVisibilityListener; @@ -85,6 +88,7 @@ private final ObservableSupplier<Boolean> mIsFormFieldFocusedSupplier; private final ObservableSupplier<Boolean> mIsFindInPageShowingSupplier; private final ControlContainer mControlContainer; + private final ToolbarLayout mToolbarLayout; private final BottomControlsStacker mBottomControlsStacker; private final ObservableSupplierImpl<Integer> mBrowserControlsOffsetSupplier; private final View mToolbarProgressBarContainer; @@ -93,6 +97,7 @@ private final ObservableSupplier<Integer> mKeyboardAccessoryHeightSupplier; private final ObservableSupplier<Integer> mControlContainerTranslationSupplier; private final ObservableSupplier<Integer> mControlContainerHeightSupplier; + private final ObservableSupplier<TopInsetCoordinator> mTopInsetCoordinatorSupplier; private final Handler mHandler; @LayerVisibility private int mLayerVisibility; private int mControlContainerHeight; @@ -112,6 +117,9 @@ private final Callback<Integer> mControlContainerTranslationCallback; private final Callback<Integer> mControlContainerHeightCallback; private final SharedPreferences mSharedPreferences; + private @Nullable Callback<TopInsetCoordinator> mTopInsetCoordinatorAvailableCallback; + private TopInsetCoordinator.@Nullable Observer mTopInsetCoordinatorObserver; + private int mTopInset; @ControlsPosition private int mCurrentPosition; private final int mHairlineHeight; @@ -133,11 +141,13 @@ * @param keyboardAccessoryHeightSupplier Supplier of the height of the keyboard accessory, * which stacks on top of the soft keyboard. * @param controlContainer The control container for the current context. + * @param toolbarLayout The layout for toolbar. + * @param bottomControlsStacker {@link BottomControlsStacker} used to harmonize the position of + * the bottom toolbar with other bottom-anchored UI. * @param controlContainerHeightSupplier Supplier of an override current height of the control * container. If the value is equal to LayoutParams.WRAP_CONTENT, it should be understood as * meaning that the height should no longer be overridden. - * @param bottomControlsStacker {@link BottomControlsStacker} used to harmonize the position of - * the bottom toolbar with other bottom-anchored UI. + * @param topInsetCoordinatorSupplier Supplier of the {@link TopInsetCoordinator}. */ public ToolbarPositionController( BrowserControlsSizer browserControlsSizer, @@ -150,11 +160,13 @@ ObservableSupplier<Integer> keyboardAccessoryHeightSupplier, KeyboardVisibilityDelegate keyboardVisibilityDelegate, ControlContainer controlContainer, + ToolbarLayout toolbarLayout, BottomControlsStacker bottomControlsStacker, ObservableSupplierImpl<Integer> browserControlsOffsetSupplier, View toolbarProgressBarContainer, ObservableSupplier<Integer> controlContainerTranslationSupplier, ObservableSupplier<Integer> controlContainerHeightSupplier, + ObservableSupplier<TopInsetCoordinator> topInsetCoordinatorSupplier, Handler handler, Context context) { mBrowserControlsSizer = browserControlsSizer; @@ -166,11 +178,13 @@ mKeyboardAccessoryHeightSupplier = keyboardAccessoryHeightSupplier; mKeyboardVisibilityDelegate = keyboardVisibilityDelegate; mControlContainer = controlContainer; + mToolbarLayout = toolbarLayout; mBottomControlsStacker = bottomControlsStacker; mBrowserControlsOffsetSupplier = browserControlsOffsetSupplier; mToolbarProgressBarContainer = toolbarProgressBarContainer; mControlContainerTranslationSupplier = controlContainerTranslationSupplier; mControlContainerHeightSupplier = controlContainerHeightSupplier; + mTopInsetCoordinatorSupplier = topInsetCoordinatorSupplier; mContext = context; mCurrentPosition = mBrowserControlsSizer.getControlsPosition(); @@ -296,6 +310,14 @@ mKeyboardVisibilityViewOffsetCallback); mIsFormFieldFocusedSupplier.addObserver(mFormFieldViewOffsetCallback); mControlContainerTranslationSupplier.addObserver(mControlContainerTranslationCallback); + + if (mTopInsetCoordinatorSupplier.hasValue()) { + onTopInsetCoordinatorAvailable(mTopInsetCoordinatorSupplier.get()); + } else { + mTopInsetCoordinatorAvailableCallback = this::onTopInsetCoordinatorAvailable; + mTopInsetCoordinatorSupplier.addObserver(mTopInsetCoordinatorAvailableCallback); + } + updateCurrentPosition(); mHandler = handler; } @@ -315,6 +337,16 @@ mIsFormFieldFocusedSupplier.removeObserver(mFormFieldViewOffsetCallback); mControlContainerTranslationSupplier.removeObserver(mControlContainerTranslationCallback); mControlContainerHeightSupplier.removeObserver(mControlContainerHeightCallback); + if (mTopInsetCoordinatorObserver != null) { + if (mTopInsetCoordinatorSupplier.hasValue()) { + mTopInsetCoordinatorSupplier.get().removeObserver(mTopInsetCoordinatorObserver); + } + mTopInsetCoordinatorObserver = null; + } + if (mTopInsetCoordinatorAvailableCallback != null) { + mTopInsetCoordinatorSupplier.removeObserver(mTopInsetCoordinatorAvailableCallback); + mTopInsetCoordinatorAvailableCallback = null; + } } /** @@ -619,4 +651,34 @@ RecordHistogram.recordEnumeratedHistogram( "Android.ToolbarPosition.PositionPrefChanged", sample, ControlsPosition.NONE); } + + private void onTopInsetCoordinatorAvailable(TopInsetCoordinator topInsetCoordinator) { + mTopInsetCoordinatorObserver = this::onToEdgeChange; + topInsetCoordinator.addObserver(mTopInsetCoordinatorObserver); + + if (mTopInsetCoordinatorAvailableCallback != null) { + mTopInsetCoordinatorSupplier.removeObserver(mTopInsetCoordinatorAvailableCallback); + mTopInsetCoordinatorAvailableCallback = null; + } + } + + /** + * Called when the toolbar's embedder surface layout changes between edge-to-edge and standard. + * + * @param systemTopInset The system's top inset, i.e., the height of the Status bar. It is + * always bigger than 0. + * @param consumeTopInset Determines if the toolbar should utilize this top inset, extending + * across the full height of both the status bar and itself. + */ + @VisibleForTesting + void onToEdgeChange(int systemTopInset, boolean consumeTopInset) { + // Exits early if the top padding doesn't need adjusting. + if (NtpCustomizationUtils.shouldSkipTopInsetsChange( + mTopInset, systemTopInset, consumeTopInset)) { + return; + } + + mTopInset = consumeTopInset ? systemTopInset : 0; + mToolbarLayout.onToEdgeChange(mTopInset); + } }
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarPositionControllerTest.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarPositionControllerTest.java index 323b005..74311e5 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarPositionControllerTest.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarPositionControllerTest.java
@@ -7,6 +7,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; @@ -54,10 +55,12 @@ import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider.ControlsPosition; import org.chromium.chrome.browser.browser_controls.BrowserStateBrowserControlsVisibilityDelegate; import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.ntp_customization.edge_to_edge.TopInsetCoordinator; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.toolbar.ToolbarPositionController.BottomControlsLayerWithOffset; import org.chromium.chrome.browser.toolbar.ToolbarPositionController.StateTransition; +import org.chromium.chrome.browser.toolbar.top.ToolbarLayout; import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.ui.KeyboardVisibilityDelegate; import org.chromium.ui.base.WindowAndroid; @@ -240,9 +243,11 @@ private final FrameLayout.LayoutParams mToolbarLayoutPrams = new LayoutParams(400, 80); private final FrameLayout.LayoutParams mHairlineLayoutParams = new LayoutParams(400, 5); @Mock private ControlContainer mControlContainer; + @Mock private ToolbarLayout mToolbarLayout; @Mock private View mControlContainerView; @Mock private View mProgressBarContainer; @Mock private ViewGroup mProgressBarParent; + @Mock private TopInsetCoordinator mTopInsetCoordinator; private Context mContext; private final ObservableSupplierImpl<Boolean> mIsNtpShowing = @@ -264,6 +269,8 @@ new ObservableSupplierImpl<>(0); private final ObservableSupplierImpl<Integer> mControlContainerHeightSupplier = new ObservableSupplierImpl<>(LayoutParams.WRAP_CONTENT); + private final ObservableSupplierImpl<TopInsetCoordinator> mTopInsetCoordinatorSupplier = + new ObservableSupplierImpl<>(); private HistogramWatcher mStartupExpectation; private WindowAndroid mWindowAndroid; @@ -306,6 +313,7 @@ mProgressBarLayoutParams.gravity = Gravity.CENTER; mProgressBarLayoutParams.anchorGravity = Gravity.BOTTOM; mProgressBarLayoutParams.setAnchorId(CONTROL_CONTAINER_ID); + mTopInsetCoordinatorSupplier.set(mTopInsetCoordinator); ResettersForTesting.register( ToolbarPositionController::resetCachedToolbarConfigurationForTesting); @@ -325,11 +333,13 @@ mKeyboardAccessoryHeightSupplier, mKeyboardVisibilityDelegate, mControlContainer, + mToolbarLayout, mBottomControlsStacker, mBottomToolbarOffsetSupplier, mProgressBarContainer, mControlContainerTranslationSupplier, mControlContainerHeightSupplier, + mTopInsetCoordinatorSupplier, new Handler(Looper.getMainLooper()), mContext); } @@ -891,6 +901,21 @@ @Test @EnableFeatures({ChromeFeatureList.ANDROID_BOTTOM_TOOLBAR, ChromeFeatureList.MINI_ORIGIN_BAR}) + public void testOnToEdgeChange() { + int topInset = 50; + + // Test case to apply the top inset. + mController.onToEdgeChange(topInset, /* consumeTopInset= */ true); + // Verifies that the topInset is sent to toolbar as a top padding. + verify(mToolbarLayout).onToEdgeChange(eq(topInset)); + + // Test case to remove the top inset. + mController.onToEdgeChange(topInset, /* consumeTopInset= */ false); + verify(mToolbarLayout).onToEdgeChange(eq(0)); + } + + @Test + @EnableFeatures({ChromeFeatureList.ANDROID_BOTTOM_TOOLBAR, ChromeFeatureList.MINI_ORIGIN_BAR}) public void testControlContainerHeightAdjustments() { setUserToolbarAnchorPreference(/* showToolbarOnTop= */ false); mIsFormFieldFocused.onNodeAttributeUpdated(true, false);
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarLayout.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarLayout.java index dff065e..55c09d3 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarLayout.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarLayout.java
@@ -929,4 +929,13 @@ /** Requests keyboard focus on the toolbar row. */ public abstract void requestKeyboardFocus(); + + /** + * Called when the top padding should be updated for the Toolbar layout. + * + * @param newTopPadding The new top padding to add on the toolbar layout. When system's Status + * bar is hidden, the new top padding equals the height of the Status bar, otherwise, it is + * 0. + */ + public void onToEdgeChange(int newTopPadding) {} }
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java index 2c640d84..d549183 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java
@@ -2300,6 +2300,23 @@ && getVisibility() == View.VISIBLE; } + @Override + public void onToEdgeChange(int newTopPadding) { + // The status bar hides when the newTopInset value is greater than zero. When the New Tab + // Page (NTP) transitions to an edge-to-edge display at the top, we add the original status + // bar height as the top padding to the toolbar. This ensures the toolbar stays in its + // original screen position, and the entire top area (status bar and toolbar) is rendered + // with the toolbar's color. + ViewGroup.MarginLayoutParams marginLayoutParams = + (ViewGroup.MarginLayoutParams) getLayoutParams(); + int height = + getResources().getDimensionPixelSize(R.dimen.toolbar_height_no_shadow) + + newTopPadding; + marginLayoutParams.height = height; + + setPaddingRelative(getPaddingStart(), newTopPadding, getPaddingEnd(), getPaddingBottom()); + } + private boolean hideShadowForIncognitoNtp() { return isIncognitoBranded() && UrlUtilities.isNtpUrl(getToolbarDataProvider().getCurrentGurl());
diff --git a/chrome/browser/ui/ash/assistant/BUILD.gn b/chrome/browser/ui/ash/assistant/BUILD.gn index 3f934c15..c121203 100644 --- a/chrome/browser/ui/ash/assistant/BUILD.gn +++ b/chrome/browser/ui/ash/assistant/BUILD.gn
@@ -10,17 +10,6 @@ sources = [ "assistant_browser_delegate_impl.cc", "assistant_browser_delegate_impl.h", - "assistant_setup.cc", - "assistant_setup.h", - "assistant_state_client.cc", - "assistant_state_client.h", - "device_actions.cc", - "device_actions.h", - "device_actions_delegate.h", - "device_actions_delegate_impl.cc", - "device_actions_delegate_impl.h", - "search_and_assistant_enabled_checker.cc", - "search_and_assistant_enabled_checker.h", ] public_deps = [ "//chrome/browser:browser_public_dependencies" ] @@ -30,37 +19,18 @@ "//ash/public/cpp", "//base", "//chrome/browser/apps/app_service", - "//chrome/browser/ash/app_list/arc", - "//chrome/browser/ash/arc", - "//chrome/browser/ash/arc:arc_util", - "//chrome/browser/ash/arc/session", "//chrome/browser/ash/assistant", "//chrome/browser/ash/profiles", - "//chrome/browser/lifetime:termination_notification", "//chrome/browser/profiles", "//chrome/browser/profiles:profile", - "//chrome/browser/signin", - "//chrome/browser/ui:browser_list", - "//chrome/browser/ui/webui/ash/assistant_optin", "//chrome/browser/web_applications", "//chrome/common", - "//chromeos/ash/components/assistant:buildflags", - "//chromeos/ash/components/network", - "//chromeos/ash/experiences/arc:arc_base_utils", - "//chromeos/ash/experiences/arc/mojom", - "//chromeos/ash/experiences/arc/session", "//chromeos/ash/services/assistant/public/cpp", "//chromeos/ash/services/assistant/public/proto", - "//chromeos/ash/services/bluetooth_config/public/mojom", - "//chromeos/dbus/power", - "//chromeos/dbus/power:power_manager_proto", - "//components/language/core/browser", "//components/session_manager/core", "//content/public/browser", "//content/public/common", "//mojo/public/cpp/bindings", - "//services/data_decoder/public/cpp", - "//services/network/public/cpp", ] }
diff --git a/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.cc b/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.cc index e6f498cb..f7e5de0 100644 --- a/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.cc +++ b/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.cc
@@ -8,14 +8,10 @@ #include <utility> #include "ash/constants/ash_features.h" -#include "ash/constants/ash_switches.h" #include "ash/constants/web_app_id_constants.h" -#include "ash/public/cpp/assistant/assistant_interface_binder.h" -#include "ash/public/cpp/assistant/controller/assistant_interaction_controller.h" #include "ash/public/cpp/network_config_service.h" #include "ash/public/cpp/new_window_delegate.h" #include "base/check_is_test.h" -#include "base/command_line.h" #include "base/containers/fixed_flat_set.h" #include "base/functional/bind.h" #include "base/location.h" @@ -28,12 +24,8 @@ #include "chrome/browser/apps/app_service/app_service_proxy_factory.h" #include "chrome/browser/ash/assistant/assistant_util.h" #include "chrome/browser/ash/profiles/profile_helper.h" -#include "chrome/browser/lifetime/termination_notification.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/signin/identity_manager_factory.h" -#include "chrome/browser/ui/ash/assistant/assistant_setup.h" -#include "chrome/browser/ui/ash/assistant/device_actions_delegate_impl.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/web_applications/web_app.h" @@ -42,24 +34,10 @@ #include "chrome/browser/web_applications/web_app_registrar.h" #include "chrome/common/webui_url_constants.h" #include "chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h" #include "chromeos/ash/services/assistant/public/cpp/features.h" -#include "chromeos/ash/services/assistant/public/mojom/assistant_audio_decoder.mojom.h" #include "chromeos/services/assistant/public/shared/constants.h" #include "components/session_manager/core/session_manager.h" #include "components/user_manager/user_manager.h" -#include "content/public/browser/audio_service.h" -#include "content/public/browser/browser_context.h" -#include "content/public/browser/device_service.h" -#include "content/public/browser/media_session_service.h" -#include "content/public/browser/network_service_instance.h" -#include "content/public/browser/service_process_host.h" -#include "content/public/common/content_switches.h" -#include "services/network/public/cpp/shared_url_loader_factory.h" - -#if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) -#include "chromeos/ash/services/libassistant/public/mojom/service.mojom.h" -#endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) namespace { @@ -157,56 +135,10 @@ // created. Otherwise, it will not get OnUserProfileLoaded notification. DCHECK(session_manager->sessions().empty()); session_manager->AddObserver(this); - - subscription_ = browser_shutdown::AddAppTerminatingCallback(base::BindOnce( - &AssistantBrowserDelegateImpl::OnAppTerminating, base::Unretained(this))); } AssistantBrowserDelegateImpl::~AssistantBrowserDelegateImpl() { session_manager::SessionManager::Get()->RemoveObserver(this); - if (identity_manager_) { - identity_manager_->RemoveObserver(this); - } -} - -void AssistantBrowserDelegateImpl::MaybeInit(Profile* profile) { - if (assistant::IsAssistantAllowedForProfile(profile) != - ash::assistant::AssistantAllowedState::ALLOWED) { - return; - } - - if (!profile_) { - profile_ = profile; - identity_manager_ = IdentityManagerFactory::GetForProfile(profile_); - DCHECK(identity_manager_); - identity_manager_->AddObserver(this); - } - DCHECK_EQ(profile_, profile); - - if (initialized_) { - return; - } - - initialized_ = true; - - device_actions_ = std::make_unique<DeviceActions>( - std::make_unique<DeviceActionsDelegateImpl>()); - - assistant_setup_ = std::make_unique<AssistantSetup>(); -} - -void AssistantBrowserDelegateImpl::MaybeStartAssistantOptInFlow() { - if (!initialized_) { - return; - } - - assistant_setup_->MaybeStartAssistantOptInFlow(); -} - -void AssistantBrowserDelegateImpl::OnAppTerminating() { - if (!initialized_) { - return; - } } void AssistantBrowserDelegateImpl::InitializeNewEntryPointFor( @@ -243,58 +175,34 @@ } void AssistantBrowserDelegateImpl::OnAssistantStatusChanged( - ash::assistant::AssistantStatus new_status) { - ash::AssistantState::Get()->NotifyStatusChanged(new_status); -} + ash::assistant::AssistantStatus new_status) {} void AssistantBrowserDelegateImpl::RequestAssistantVolumeControl( - mojo::PendingReceiver<ash::mojom::AssistantVolumeControl> receiver) { - ash::AssistantInterfaceBinder::GetInstance()->BindVolumeControl( - std::move(receiver)); -} + mojo::PendingReceiver<ash::mojom::AssistantVolumeControl> receiver) {} void AssistantBrowserDelegateImpl::RequestBatteryMonitor( - mojo::PendingReceiver<device::mojom::BatteryMonitor> receiver) { - content::GetDeviceService().BindBatteryMonitor(std::move(receiver)); -} + mojo::PendingReceiver<device::mojom::BatteryMonitor> receiver) {} void AssistantBrowserDelegateImpl::RequestWakeLockProvider( - mojo::PendingReceiver<device::mojom::WakeLockProvider> receiver) { - content::GetDeviceService().BindWakeLockProvider(std::move(receiver)); -} + mojo::PendingReceiver<device::mojom::WakeLockProvider> receiver) {} void AssistantBrowserDelegateImpl::RequestAudioStreamFactory( - mojo::PendingReceiver<media::mojom::AudioStreamFactory> receiver) { - content::GetAudioService().BindStreamFactory(std::move(receiver)); -} + mojo::PendingReceiver<media::mojom::AudioStreamFactory> receiver) {} void AssistantBrowserDelegateImpl::RequestAudioDecoderFactory( mojo::PendingReceiver<ash::assistant::mojom::AssistantAudioDecoderFactory> - receiver) { - content::ServiceProcessHost::Launch( - std::move(receiver), - content::ServiceProcessHost::Options() - .WithDisplayName("Assistant Audio Decoder Service") - .Pass()); -} + receiver) {} void AssistantBrowserDelegateImpl::RequestAudioFocusManager( - mojo::PendingReceiver<media_session::mojom::AudioFocusManager> receiver) { - content::GetMediaSessionService().BindAudioFocusManager(std::move(receiver)); -} + mojo::PendingReceiver<media_session::mojom::AudioFocusManager> receiver) {} void AssistantBrowserDelegateImpl::RequestMediaControllerManager( mojo::PendingReceiver<media_session::mojom::MediaControllerManager> - receiver) { - content::GetMediaSessionService().BindMediaControllerManager( - std::move(receiver)); -} + receiver) {} void AssistantBrowserDelegateImpl::RequestNetworkConfig( mojo::PendingReceiver<chromeos::network_config::mojom::CrosNetworkConfig> - receiver) { - ash::GetNetworkConfigService(std::move(receiver)); -} + receiver) {} void AssistantBrowserDelegateImpl::OpenUrl(GURL url) { // The new tab should be opened with a user activation since the user @@ -405,18 +313,6 @@ return web_app_registrar->GetAppShortName(web_app->app_id()); } -#if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) -void AssistantBrowserDelegateImpl::RequestLibassistantService( - mojo::PendingReceiver<ash::libassistant::mojom::LibassistantService> - receiver) { - content::ServiceProcessHost::Launch< - ash::libassistant::mojom::LibassistantService>( - std::move(receiver), content::ServiceProcessHost::Options() - .WithDisplayName("Libassistant Service") - .Pass()); -} -#endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) - void AssistantBrowserDelegateImpl::OverrideEntryPointIdForTesting( const std::string& test_entry_point_id) { CHECK_IS_TEST(); @@ -430,44 +326,8 @@ is_google_chrome_override_for_testing_ = true; } -void AssistantBrowserDelegateImpl::OnExtendedAccountInfoUpdated( - const AccountInfo& info) { - if (initialized_) { - return; - } - - MaybeInit(profile_); -} - -void AssistantBrowserDelegateImpl::OnUserProfileLoaded( - const AccountId& account_id) { - if (!assistant_state_observation_.IsObserving() && !initialized_ && - ash::AssistantState::Get()) { - assistant_state_observation_.Observe(ash::AssistantState::Get()); - } -} - void AssistantBrowserDelegateImpl::OnUserSessionStarted(bool is_primary_user) { if (is_primary_user) { InitializeNewEntryPointFor(GetActiveUserProfile()); } - - if (ash::features::IsOobeSkipAssistantEnabled()) { - return; - } - - // Disable the handling for browser tests to prevent the Assistant being - // enabled unexpectedly. - base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - if (is_primary_user && !ash::switches::ShouldSkipOobePostLogin() && - !command_line->HasSwitch(switches::kBrowserTest)) { - MaybeStartAssistantOptInFlow(); - } -} - -void AssistantBrowserDelegateImpl::OnAssistantFeatureAllowedChanged( - ash::assistant::AssistantAllowedState allowed_state) { - Profile* profile = ProfileManager::GetActiveUserProfile(); - - MaybeInit(profile); }
diff --git a/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.h b/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.h index cffcc92..9a7c53bd 100644 --- a/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.h +++ b/chrome/browser/ui/ash/assistant/assistant_browser_delegate_impl.h
@@ -13,26 +13,20 @@ #include "base/memory/raw_ptr.h" #include "base/scoped_observation.h" #include "base/types/expected.h" -#include "chrome/browser/ui/ash/assistant/device_actions.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app_registrar.h" -#include "chromeos/ash/components/assistant/buildflags.h" #include "chromeos/ash/services/assistant/public/cpp/assistant_browser_delegate.h" #include "components/session_manager/core/session_manager_observer.h" -#include "components/signin/public/identity_manager/identity_manager.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" -class AssistantSetup; class Profile; // Class to handle all Assistant in-browser-process functionalities. class AssistantBrowserDelegateImpl : public ash::assistant::AssistantBrowserDelegate, - public signin::IdentityManager::Observer, - public session_manager::SessionManagerObserver, - public ash::AssistantStateObserver { + public session_manager::SessionManagerObserver { public: AssistantBrowserDelegateImpl(); AssistantBrowserDelegateImpl(const AssistantBrowserDelegateImpl&) = delete; @@ -40,8 +34,6 @@ delete; ~AssistantBrowserDelegateImpl() override; - void MaybeStartAssistantOptInFlow(); - // chromeos::assistant::AssistantBrowserDelegate overrides: void OnAssistantStatusChanged( ash::assistant::AssistantStatus new_status) override; @@ -72,11 +64,6 @@ IsNewEntryPointEligibleForPrimaryProfile() override; void OpenNewEntryPoint() override; std::optional<std::string> GetNewEntryPointName() override; -#if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) - void RequestLibassistantService( - mojo::PendingReceiver<ash::libassistant::mojom::LibassistantService> - receiver) override; -#endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) void OverrideEntryPointIdForTesting(const std::string& test_entry_point_id); @@ -98,41 +85,12 @@ void OnExternalManagersSynchronized(); - void MaybeInit(Profile* profile); - // signin::IdentityManager::Observer: - // Retry to initiate Assistant service when account info has been updated. - // This is necessary if previous calls of MaybeInit() failed due to Assistant - // disallowed by account type. This can happen when the chromeos sign-in - // finished before account info fetching is finished (|hosted_domain| field - // will be empty under this case). - void OnExtendedAccountInfoUpdated(const AccountInfo& info) override; - // session_manager::SessionManagerObserver: - void OnUserProfileLoaded(const AccountId& account_id) override; void OnUserSessionStarted(bool is_primary_user) override; - - // ash::AssistantStateObserver: - void OnAssistantFeatureAllowedChanged( - ash::assistant::AssistantAllowedState allowed_state) override; - - // Called when the application is terminating - void OnAppTerminating(); - // Initializes new entry point for a passed primary profile. Note that // Assistant new entry point is eligible only for a primary profile. void InitializeNewEntryPointFor(Profile* primary_profile); - std::unique_ptr<DeviceActions> device_actions_; - std::unique_ptr<AssistantSetup> assistant_setup_; - - bool initialized_ = false; - - base::CallbackListSubscription subscription_; - - // Non-owning pointers. - raw_ptr<Profile> profile_ = nullptr; - raw_ptr<signin::IdentityManager> identity_manager_ = nullptr; - // Stores a profile for Assistant new entry point. Note that // `AssistantBrowserDelegateImpl::profile_` is only initialized when Assistant // is allowed. @@ -142,9 +100,6 @@ bool is_google_chrome_override_for_testing_ = false; - base::ScopedObservation<ash::AssistantStateBase, ash::AssistantStateObserver> - assistant_state_observation_{this}; - base::WeakPtrFactory<AssistantBrowserDelegateImpl> weak_ptr_factory_{this}; };
diff --git a/chrome/browser/ui/ash/assistant/assistant_setup.cc b/chrome/browser/ui/ash/assistant/assistant_setup.cc deleted file mode 100644 index 04a8820..0000000 --- a/chrome/browser/ui/ash/assistant/assistant_setup.cc +++ /dev/null
@@ -1,157 +0,0 @@ -// Copyright 2018 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ui/ash/assistant/assistant_setup.h" - -#include <string> -#include <utility> - -#include "ash/public/cpp/notification_utils.h" -#include "base/functional/bind.h" -#include "base/functional/callback_helpers.h" -#include "base/task/sequenced_task_runner.h" -#include "chrome/browser/ash/assistant/assistant_util.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/ui/settings_window_manager_chromeos.h" -#include "chrome/browser/ui/webui/ash/assistant_optin/assistant_optin_ui.h" -#include "chrome/common/webui_url_constants.h" -#include "chromeos/ash/components/assistant/buildflags.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_prefs.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h" -#include "chromeos/ash/services/assistant/public/proto/settings_ui.pb.h" -#include "components/prefs/pref_service.h" -#include "services/network/public/cpp/shared_url_loader_factory.h" - -using ::ash::assistant::ConsentFlowUi; - -namespace { - -PrefService* Prefs() { - return ProfileManager::GetActiveUserProfile()->GetPrefs(); -} - -} // namespace - -AssistantSetup::AssistantSetup() { - DCHECK(assistant::IsAssistantAllowedForProfile( - ProfileManager::GetActiveUserProfile()) == - ash::assistant::AssistantAllowedState::ALLOWED); - ash::AssistantState::Get()->AddObserver(this); - - search_and_assistant_enabled_checker_ = - std::make_unique<SearchAndAssistantEnabledChecker>( - ProfileManager::GetActiveUserProfile()->GetURLLoaderFactory().get(), - this); - search_and_assistant_enabled_checker_->SyncSearchAndAssistantState(); -} - -AssistantSetup::~AssistantSetup() { - ash::AssistantState::Get()->RemoveObserver(this); -} - -void AssistantSetup::StartAssistantOptInFlow( - ash::FlowType type, - StartAssistantOptInFlowCallback callback) { - ash::AssistantOptInDialog::Show(type, std::move(callback)); -} - -bool AssistantSetup::BounceOptInWindowIfActive() { - return ash::AssistantOptInDialog::BounceIfActive(); -} - -void AssistantSetup::MaybeStartAssistantOptInFlow() { - DCHECK(Prefs()); - if (!Prefs()->GetUserPrefValue( - ash::assistant::prefs::kAssistantConsentStatus)) { - base::SequencedTaskRunner::GetCurrentDefault()->PostTask( - FROM_HERE, - base::BindOnce(&AssistantSetup::StartAssistantOptInFlow, - weak_factory_.GetWeakPtr(), ash::FlowType::kConsentFlow, - base::DoNothing())); - } -} - -void AssistantSetup::OnError() { - // When there is an error, default the pref to false if the pref is not set - // yet. The pref value will be synced the next time. - if (!Prefs()->GetUserPrefValue( - ash::assistant::prefs::kAssistantDisabledByPolicy)) { - Prefs()->SetBoolean(ash::assistant::prefs::kAssistantDisabledByPolicy, - false); - } -} - -void AssistantSetup::OnSearchAndAssistantStateReceived(bool is_disabled) { - Prefs()->SetBoolean(ash::assistant::prefs::kAssistantDisabledByPolicy, - is_disabled); - if (is_disabled) { - DVLOG(1) << "Assistant is disabled by domain policy."; - Prefs()->SetBoolean(ash::assistant::prefs::kAssistantEnabled, false); - } -} - -void AssistantSetup::OnAssistantStatusChanged( - ash::assistant::AssistantStatus status) { - if (status == ash::assistant::AssistantStatus::NOT_READY) { - return; - } - - SyncSettingsState(); -} - -void AssistantSetup::SyncSettingsState() { - ash::assistant::SettingsUiSelector selector; - ash::assistant::ConsentFlowUiSelector* consent_flow_ui = - selector.mutable_consent_flow_ui_selector(); - consent_flow_ui->set_flow_id( - ash::assistant::ActivityControlSettingsUiSelector:: - ASSISTANT_SUW_ONBOARDING_ON_CHROME_OS); - ash::assistant::AssistantSettings::Get()->GetSettings( - selector.SerializeAsString(), - base::BindOnce(&AssistantSetup::OnGetSettingsResponse, - base::Unretained(this))); -} - -void AssistantSetup::OnGetSettingsResponse(const std::string& settings) { - ash::assistant::SettingsUi settings_ui; - if (!settings_ui.ParseFromString(settings)) { - return; - } - - // Sync activity control status. - if (!settings_ui.has_consent_flow_ui()) { - LOG(ERROR) << "Failed to get activity control status."; - return; - } - const auto& consent_status = settings_ui.consent_flow_ui().consent_status(); - const auto& consent_ui = settings_ui.consent_flow_ui().consent_ui(); - switch (consent_status) { - case ConsentFlowUi::ASK_FOR_CONSENT: - if (consent_ui.has_activity_control_ui() && - consent_ui.activity_control_ui().setting_zippy().size()) { - Prefs()->SetInteger(ash::assistant::prefs::kAssistantConsentStatus, - ash::assistant::prefs::ConsentStatus::kNotFound); - } else { - Prefs()->SetInteger( - ash::assistant::prefs::kAssistantConsentStatus, - ash::assistant::prefs::ConsentStatus::kActivityControlAccepted); - } - break; - case ConsentFlowUi::ERROR_ACCOUNT: - Prefs()->SetInteger(ash::assistant::prefs::kAssistantConsentStatus, - ash::assistant::prefs::ConsentStatus::kUnauthorized); - break; - case ConsentFlowUi::ALREADY_CONSENTED: - Prefs()->SetInteger( - ash::assistant::prefs::kAssistantConsentStatus, - ash::assistant::prefs::ConsentStatus::kActivityControlAccepted); - break; - case ConsentFlowUi::UNSPECIFIED: - case ConsentFlowUi::ERROR: - Prefs()->SetInteger(ash::assistant::prefs::kAssistantConsentStatus, - ash::assistant::prefs::ConsentStatus::kUnknown); - LOG(ERROR) << "Invalid activity control consent status."; - } -}
diff --git a/chrome/browser/ui/ash/assistant/assistant_setup.h b/chrome/browser/ui/ash/assistant/assistant_setup.h deleted file mode 100644 index 335de1f..0000000 --- a/chrome/browser/ui/ash/assistant/assistant_setup.h +++ /dev/null
@@ -1,57 +0,0 @@ -// Copyright 2018 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_ASH_ASSISTANT_ASSISTANT_SETUP_H_ -#define CHROME_BROWSER_UI_ASH_ASSISTANT_ASSISTANT_SETUP_H_ - -#include <memory> -#include <string> - -#include "ash/public/cpp/assistant/assistant_setup.h" -#include "ash/public/cpp/assistant/assistant_state.h" -#include "base/memory/weak_ptr.h" -#include "chrome/browser/ui/ash/assistant/search_and_assistant_enabled_checker.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h" - -// AssistantSetup is the class responsible for start Assistant OptIn flow. -class AssistantSetup : public ash::AssistantSetup, - public ash::AssistantStateObserver, - public SearchAndAssistantEnabledChecker::Delegate { - public: - AssistantSetup(); - - AssistantSetup(const AssistantSetup&) = delete; - AssistantSetup& operator=(const AssistantSetup&) = delete; - - ~AssistantSetup() override; - - // ash::AssistantSetup: - void StartAssistantOptInFlow( - ash::FlowType type, - StartAssistantOptInFlowCallback callback) override; - bool BounceOptInWindowIfActive() override; - - // If prefs::kVoiceInteractionConsentStatus is nullptr, means the - // pref is not set by user. Therefore we need to start OOBE. - void MaybeStartAssistantOptInFlow(); - - // SearchAndAssistantEnabledChecker::Delegate: - void OnError() override; - void OnSearchAndAssistantStateReceived(bool is_disabled) override; - - private: - // ash::AssistantStateObserver: - void OnAssistantStatusChanged( - ash::assistant::AssistantStatus status) override; - - void SyncSettingsState(); - void OnGetSettingsResponse(const std::string& settings); - - std::unique_ptr<SearchAndAssistantEnabledChecker> - search_and_assistant_enabled_checker_; - - base::WeakPtrFactory<AssistantSetup> weak_factory_{this}; -}; - -#endif // CHROME_BROWSER_UI_ASH_ASSISTANT_ASSISTANT_SETUP_H_
diff --git a/chrome/browser/ui/ash/assistant/assistant_state_client.cc b/chrome/browser/ui/ash/assistant/assistant_state_client.cc deleted file mode 100644 index 1909a53..0000000 --- a/chrome/browser/ui/ash/assistant/assistant_state_client.cc +++ /dev/null
@@ -1,100 +0,0 @@ -// Copyright 2019 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ui/ash/assistant/assistant_state_client.h" - -#include <memory> -#include <string> - -#include "ash/public/cpp/assistant/assistant_state.h" -#include "base/functional/bind.h" -#include "chrome/browser/ash/arc/arc_util.h" -#include "chrome/browser/ash/arc/session/arc_session_manager.h" -#include "chrome/browser/ash/assistant/assistant_util.h" -#include "chrome/browser/ash/profiles/profile_helper.h" -#include "chrome/browser/profiles/profile.h" -#include "chromeos/ash/experiences/arc/arc_util.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_prefs.h" -#include "components/language/core/browser/pref_names.h" -#include "components/prefs/pref_change_registrar.h" -#include "components/prefs/pref_service.h" - -AssistantStateClient::AssistantStateClient() { - arc::ArcSessionManager::Get()->AddObserver(this); - user_manager::UserManager::Get()->AddSessionStateObserver(this); -} - -AssistantStateClient::~AssistantStateClient() { - user_manager::UserManager::Get()->RemoveSessionStateObserver(this); - arc::ArcSessionManager::Get()->RemoveObserver(this); -} - -void AssistantStateClient::NotifyFeatureAllowed() { - DCHECK(profile_); - ash::assistant::AssistantAllowedState state = - assistant::IsAssistantAllowedForProfile(profile_); - ash::AssistantState::Get()->NotifyFeatureAllowed(state); -} - -void AssistantStateClient::NotifyLocaleChanged() { - DCHECK(profile_); - - NotifyFeatureAllowed(); - - std::string out_locale = - profile_->GetPrefs()->GetString(language::prefs::kApplicationLocale); - - ash::AssistantState::Get()->NotifyLocaleChanged(out_locale); -} - -void AssistantStateClient::ActiveUserChanged(user_manager::User* active_user) { - if (!active_user) { - return; - } - - active_user->AddProfileCreatedObserver( - base::BindOnce(&AssistantStateClient::SetProfileByUser, - weak_ptr_factory_.GetWeakPtr(), active_user)); -} - -void AssistantStateClient::OnArcPlayStoreEnabledChanged(bool enabled) { - // ARC Android instance will be enabled if user opt-in play store, or the ARC - // always start flag is set. - ash::AssistantState::Get()->NotifyArcPlayStoreEnabledChanged( - arc::ShouldArcAlwaysStart() || enabled); -} - -void AssistantStateClient::SetProfileByUser(const user_manager::User* user) { - SetProfile(ash::ProfileHelper::Get()->GetProfileByUser(user)); -} - -void AssistantStateClient::SetProfile(Profile* profile) { - if (profile_ == profile) { - return; - } - - profile_ = profile; - pref_change_registrar_.reset(); - - if (!profile_) { - return; - } - - PrefService* prefs = profile->GetPrefs(); - pref_change_registrar_ = std::make_unique<PrefChangeRegistrar>(); - pref_change_registrar_->Init(prefs); - - pref_change_registrar_->Add( - language::prefs::kApplicationLocale, - base::BindRepeating(&AssistantStateClient::NotifyLocaleChanged, - base::Unretained(this))); - - pref_change_registrar_->Add( - ash::assistant::prefs::kAssistantDisabledByPolicy, - base::BindRepeating(&AssistantStateClient::NotifyFeatureAllowed, - base::Unretained(this))); - - NotifyLocaleChanged(); - OnArcPlayStoreEnabledChanged(arc::IsArcPlayStoreEnabledForProfile(profile_)); -}
diff --git a/chrome/browser/ui/ash/assistant/assistant_state_client.h b/chrome/browser/ui/ash/assistant/assistant_state_client.h deleted file mode 100644 index fc9e4d1..0000000 --- a/chrome/browser/ui/ash/assistant/assistant_state_client.h +++ /dev/null
@@ -1,49 +0,0 @@ -// Copyright 2019 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_ASH_ASSISTANT_ASSISTANT_STATE_CLIENT_H_ -#define CHROME_BROWSER_UI_ASH_ASSISTANT_ASSISTANT_STATE_CLIENT_H_ - -#include "base/memory/raw_ptr.h" -#include "base/memory/weak_ptr.h" -#include "chrome/browser/ash/arc/session/arc_session_manager_observer.h" -#include "components/user_manager/user_manager.h" - -class PrefChangeRegistrar; - -class AssistantStateClient - : public user_manager::UserManager::UserSessionStateObserver, - public arc::ArcSessionManagerObserver { - public: - AssistantStateClient(); - - AssistantStateClient(const AssistantStateClient&) = delete; - AssistantStateClient& operator=(const AssistantStateClient&) = delete; - - ~AssistantStateClient() override; - - private: - friend class AssistantStateClientTest; - - // Notify the controller about state changes. - void NotifyFeatureAllowed(); - void NotifyLocaleChanged(); - - // user_manager::UserManager::UserSessionStateObserver: - void ActiveUserChanged(user_manager::User* active_user) override; - - // arc::ArcSessionManagerObserver: - void OnArcPlayStoreEnabledChanged(bool enabled) override; - - void SetProfileByUser(const user_manager::User* user); - void SetProfile(Profile* profile); - - std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; - - raw_ptr<Profile> profile_ = nullptr; - - base::WeakPtrFactory<AssistantStateClient> weak_ptr_factory_{this}; -}; - -#endif // CHROME_BROWSER_UI_ASH_ASSISTANT_ASSISTANT_STATE_CLIENT_H_
diff --git a/chrome/browser/ui/ash/assistant/device_actions.cc b/chrome/browser/ui/ash/assistant/device_actions.cc deleted file mode 100644 index db8e98a1..0000000 --- a/chrome/browser/ui/ash/assistant/device_actions.cc +++ /dev/null
@@ -1,261 +0,0 @@ -// Copyright 2018 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ui/ash/assistant/device_actions.h" - -#include <string> -#include <utility> -#include <vector> - -#include "ash/constants/ash_pref_names.h" -#include "ash/public/cpp/bluetooth_config_service.h" -#include "base/functional/bind.h" -#include "base/strings/stringprintf.h" -#include "base/strings/utf_string_conversions.h" -#include "chrome/browser/ash/app_list/arc/arc_app_list_prefs.h" -#include "chrome/browser/ash/app_list/arc/arc_app_utils.h" -#include "chrome/browser/ash/app_list/arc/intent.h" -#include "chrome/browser/ash/profiles/profile_helper.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/profiles/profile_manager.h" -#include "chromeos/ash/components/network/network_event_log.h" -#include "chromeos/ash/components/network/technology_state_controller.h" -#include "chromeos/ash/experiences/arc/mojom/intent_helper.mojom.h" -#include "chromeos/ash/experiences/arc/session/arc_bridge_service.h" -#include "chromeos/ash/experiences/arc/session/arc_service_manager.h" -#include "chromeos/dbus/power/power_manager_client.h" -#include "chromeos/dbus/power_manager/backlight.pb.h" -#include "components/prefs/pref_service.h" -#include "components/user_manager/user_manager.h" -#include "ui/display/types/display_constants.h" - -using ::ash::NetworkHandler; -using ::ash::NetworkTypePattern; -using ::ash::TechnologyStateController; -using ::ash::assistant::AndroidAppInfo; -using ::ash::assistant::AppStatus; - -namespace { - -constexpr char kIntentPrefix[] = "#Intent"; -constexpr char kAction[] = "action"; -constexpr char kPackage[] = "package"; -constexpr char kLaunchFlags[] = "launchFlags"; -constexpr char kEndSuffix[] = "end"; - -std::optional<std::string> GetActivity(const std::string& package_name) { - auto* prefs = ArcAppListPrefs::Get(ProfileManager::GetActiveUserProfile()); - if (!prefs) { - LOG(ERROR) << "ArcAppListPrefs is not available."; - return std::nullopt; - } - std::string app_id = prefs->GetAppIdByPackageName(package_name); - - if (!app_id.empty()) { - std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id); - return std::optional<std::string>(app_info->activity); - } - - return std::nullopt; -} - -std::string GetLaunchIntent(const AndroidAppInfo& app_info) { - auto& package_name = app_info.package_name; - if (app_info.intent.empty() || app_info.action.empty()) { - // No action or data specified. Using launch intent from ARC. - return arc::GetLaunchIntent(package_name, - GetActivity(package_name).value_or(""), - /*extra_params=*/{}); - } - return base::StringPrintf("%s;%s;%s=%s;%s=0x%x;%s=%s;%s", - app_info.intent.c_str(), kIntentPrefix, kAction, - app_info.action.c_str(), kLaunchFlags, - arc::Intent::FLAG_ACTIVITY_NEW_TASK | - arc::Intent::FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, - kPackage, package_name.c_str(), kEndSuffix); -} - -std::vector<AndroidAppInfo> GetAppsInfo() { - std::vector<AndroidAppInfo> android_apps_info; - auto* prefs = ArcAppListPrefs::Get(ProfileManager::GetActiveUserProfile()); - if (!prefs) { - LOG(ERROR) << "ArcAppListPrefs is not available."; - return android_apps_info; - } - for (const auto& app_id : prefs->GetAppIds()) { - std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id); - if (!app_info) { - continue; - } - AndroidAppInfo android_app_info; - android_app_info.package_name = app_info->package_name; - auto package = prefs->GetPackage(app_info->package_name); - if (package) { - android_app_info.version = package->package_version; - } - android_app_info.localized_app_name = app_info->name; - android_app_info.intent = app_info->intent_uri; - android_apps_info.push_back(std::move(android_app_info)); - } - return android_apps_info; -} - -void NotifyAndroidAppListRefreshed( - base::ObserverList<ash::assistant::AppListEventSubscriber>* subscribers) { - std::vector<AndroidAppInfo> android_apps_info = GetAppsInfo(); - for (auto& subscriber : *subscribers) { - subscriber.OnAndroidAppListRefreshed(android_apps_info); - } -} - -} // namespace - -DeviceActions::DeviceActions(std::unique_ptr<DeviceActionsDelegate> delegate) - : delegate_(std::move(delegate)) { - ash::GetBluetoothConfigService( - remote_cros_bluetooth_config_.BindNewPipeAndPassReceiver()); -} - -DeviceActions::~DeviceActions() = default; - -void DeviceActions::SetWifiEnabled(bool enabled) { - NET_LOG(USER) << __func__ << ":" << enabled; - NetworkHandler::Get()->technology_state_controller()->SetTechnologiesEnabled( - NetworkTypePattern::WiFi(), enabled, - ash::network_handler::ErrorCallback()); -} - -void DeviceActions::SetBluetoothEnabled(bool enabled) { - remote_cros_bluetooth_config_->SetBluetoothEnabledState(enabled); -} - -void HandleScreenBrightnessCallback( - DeviceActions::GetScreenBrightnessLevelCallback callback, - std::optional<double> level) { - if (level.has_value()) { - std::move(callback).Run(true, level.value() / 100.0); - } else { - std::move(callback).Run(false, 0.0); - } -} - -void DeviceActions::GetScreenBrightnessLevel( - DeviceActions::GetScreenBrightnessLevelCallback callback) { - chromeos::PowerManagerClient::Get()->GetScreenBrightnessPercent( - base::BindOnce(&HandleScreenBrightnessCallback, std::move(callback))); -} - -void DeviceActions::SetScreenBrightnessLevel(double level, bool gradual) { - power_manager::SetBacklightBrightnessRequest request; - request.set_percent(level * 100); - request.set_transition( - gradual - ? power_manager::SetBacklightBrightnessRequest_Transition_FAST - : power_manager::SetBacklightBrightnessRequest_Transition_INSTANT); - request.set_cause( - power_manager::SetBacklightBrightnessRequest_Cause_USER_REQUEST); - chromeos::PowerManagerClient::Get()->SetScreenBrightness(request); -} - -void DeviceActions::SetNightLightEnabled(bool enabled) { - const user_manager::User* const user = - user_manager::UserManager::Get()->GetActiveUser(); - Profile* profile = ash::ProfileHelper::Get()->GetProfileByUser(user); - DCHECK(profile); - // Simply toggle the user pref, which is being observed by ash's night - // light controller. - profile->GetPrefs()->SetBoolean(ash::prefs::kNightLightEnabled, enabled); -} - -void DeviceActions::SetSwitchAccessEnabled(bool enabled) { - const user_manager::User* const user = - user_manager::UserManager::Get()->GetActiveUser(); - Profile* profile = ash::ProfileHelper::Get()->GetProfileByUser(user); - DCHECK(profile); - profile->GetPrefs()->SetBoolean(ash::prefs::kAccessibilitySwitchAccessEnabled, - enabled); -} - -bool DeviceActions::OpenAndroidApp(const AndroidAppInfo& app_info) { - auto status = delegate_->GetAndroidAppStatus(app_info.package_name); - if (status != AppStatus::kAvailable) { - return false; - } - - auto* app = ARC_GET_INSTANCE_FOR_METHOD( - arc::ArcServiceManager::Get()->arc_bridge_service()->app(), - LaunchIntentWithWindowInfo); - if (app) { - arc::mojom::WindowInfoPtr window_info = arc::mojom::WindowInfo::New(); - window_info->display_id = display::kDefaultDisplayId; - app->LaunchIntentWithWindowInfo(GetLaunchIntent(std::move(app_info)), - std::move(window_info)); - } else { - LOG(ERROR) << "Android container is not running. Discard request for launch" - << app_info.package_name; - } - - return app != nullptr; -} - -AppStatus DeviceActions::GetAndroidAppStatus(const AndroidAppInfo& app_info) { - return delegate_->GetAndroidAppStatus(app_info.package_name); -} - -void DeviceActions::LaunchAndroidIntent(const std::string& intent) { - auto* app = ARC_GET_INSTANCE_FOR_METHOD( - arc::ArcServiceManager::Get()->arc_bridge_service()->app(), - LaunchIntentWithWindowInfo); - if (!app) { - LOG(ERROR) << "Android container is not running."; - return; - } - - arc::mojom::WindowInfoPtr window_info = arc::mojom::WindowInfo::New(); - window_info->display_id = display::kDefaultDisplayId; - app->LaunchIntentWithWindowInfo(intent, std::move(window_info)); -} - -void DeviceActions::AddAndFireAppListEventSubscriber( - ash::assistant::AppListEventSubscriber* subscriber) { - auto* prefs = ArcAppListPrefs::Get(ProfileManager::GetActiveUserProfile()); - if (prefs && prefs->package_list_initial_refreshed()) { - std::vector<AndroidAppInfo> android_apps_info = GetAppsInfo(); - subscriber->OnAndroidAppListRefreshed(android_apps_info); - } - - app_list_subscribers_.AddObserver(subscriber); - - if (prefs && !scoped_prefs_observations_.IsObservingSource(prefs)) { - scoped_prefs_observations_.AddObservation(prefs); - } -} - -void DeviceActions::RemoveAppListEventSubscriber( - ash::assistant::AppListEventSubscriber* subscriber) { - app_list_subscribers_.RemoveObserver(subscriber); -} - -std::optional<std::string> DeviceActions::GetAndroidAppLaunchIntent( - const AndroidAppInfo& app_info) { - auto status = delegate_->GetAndroidAppStatus(app_info.package_name); - if (status != AppStatus::kAvailable) { - return std::nullopt; - } - - return GetLaunchIntent(std::move(app_info)); -} - -void DeviceActions::OnPackageListInitialRefreshed() { - NotifyAndroidAppListRefreshed(&app_list_subscribers_); -} - -void DeviceActions::OnAppRegistered(const std::string& app_id, - const ArcAppListPrefs::AppInfo& app_info) { - NotifyAndroidAppListRefreshed(&app_list_subscribers_); -} - -void DeviceActions::OnAppRemoved(const std::string& id) { - NotifyAndroidAppListRefreshed(&app_list_subscribers_); -}
diff --git a/chrome/browser/ui/ash/assistant/device_actions.h b/chrome/browser/ui/ash/assistant/device_actions.h deleted file mode 100644 index 8f0f3c4..0000000 --- a/chrome/browser/ui/ash/assistant/device_actions.h +++ /dev/null
@@ -1,73 +0,0 @@ -// Copyright 2018 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_ASH_ASSISTANT_DEVICE_ACTIONS_H_ -#define CHROME_BROWSER_UI_ASH_ASSISTANT_DEVICE_ACTIONS_H_ - -#include <memory> -#include <string> -#include <vector> - -#include "ash/public/cpp/android_intent_helper.h" -#include "base/scoped_multi_source_observation.h" -#include "chrome/browser/ash/app_list/arc/arc_app_list_prefs.h" -#include "chrome/browser/ui/ash/assistant/device_actions_delegate.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h" -#include "chromeos/ash/services/assistant/public/cpp/device_actions.h" -#include "chromeos/ash/services/bluetooth_config/public/mojom/cros_bluetooth_config.mojom.h" -#include "mojo/public/cpp/bindings/pending_remote.h" -#include "mojo/public/cpp/bindings/receiver_set.h" -#include "mojo/public/cpp/bindings/remote_set.h" - -class DeviceActions : public ash::AndroidIntentHelper, - public ash::assistant::DeviceActions, - public ArcAppListPrefs::Observer { - public: - explicit DeviceActions(std::unique_ptr<DeviceActionsDelegate> delegate); - - DeviceActions(const DeviceActions&) = delete; - DeviceActions& operator=(const DeviceActions&) = delete; - - ~DeviceActions() override; - - // ash::assistant::DeviceActions overrides: - void SetWifiEnabled(bool enabled) override; - void SetBluetoothEnabled(bool enabled) override; - void GetScreenBrightnessLevel( - GetScreenBrightnessLevelCallback callback) override; - void SetScreenBrightnessLevel(double level, bool gradual) override; - void SetNightLightEnabled(bool enabled) override; - void SetSwitchAccessEnabled(bool enabled) override; - bool OpenAndroidApp(const ash::assistant::AndroidAppInfo& app_info) override; - ash::assistant::AppStatus GetAndroidAppStatus( - const ash::assistant::AndroidAppInfo& app_info) override; - void LaunchAndroidIntent(const std::string& intent) override; - void AddAndFireAppListEventSubscriber( - ash::assistant::AppListEventSubscriber* subscriber) override; - void RemoveAppListEventSubscriber( - ash::assistant::AppListEventSubscriber* subscriber) override; - - // ash::AndroidIntentHelper overrides: - std::optional<std::string> GetAndroidAppLaunchIntent( - const ash::assistant::AndroidAppInfo& app_info) override; - - private: - // ArcAppListPrefs::Observer overrides. - void OnPackageListInitialRefreshed() override; - void OnAppRegistered(const std::string& app_id, - const ArcAppListPrefs::AppInfo& app_info) override; - void OnAppRemoved(const std::string& id) override; - - std::unique_ptr<DeviceActionsDelegate> delegate_; - - base::ScopedMultiSourceObservation<ArcAppListPrefs, ArcAppListPrefs::Observer> - scoped_prefs_observations_{this}; - base::ObserverList<ash::assistant::AppListEventSubscriber> - app_list_subscribers_; - - mojo::Remote<ash::bluetooth_config::mojom::CrosBluetoothConfig> - remote_cros_bluetooth_config_; -}; - -#endif // CHROME_BROWSER_UI_ASH_ASSISTANT_DEVICE_ACTIONS_H_
diff --git a/chrome/browser/ui/ash/assistant/device_actions_delegate.h b/chrome/browser/ui/ash/assistant/device_actions_delegate.h deleted file mode 100644 index c538a71f..0000000 --- a/chrome/browser/ui/ash/assistant/device_actions_delegate.h +++ /dev/null
@@ -1,20 +0,0 @@ -// Copyright 2020 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_ASH_ASSISTANT_DEVICE_ACTIONS_DELEGATE_H_ -#define CHROME_BROWSER_UI_ASH_ASSISTANT_DEVICE_ACTIONS_DELEGATE_H_ - -#include <string> - -#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h" - -class DeviceActionsDelegate { - public: - virtual ~DeviceActionsDelegate() = default; - - virtual ash::assistant::AppStatus GetAndroidAppStatus( - const std::string& package_name) = 0; -}; - -#endif // CHROME_BROWSER_UI_ASH_ASSISTANT_DEVICE_ACTIONS_DELEGATE_H_
diff --git a/chrome/browser/ui/ash/assistant/device_actions_delegate_impl.cc b/chrome/browser/ui/ash/assistant/device_actions_delegate_impl.cc deleted file mode 100644 index d9566d16..0000000 --- a/chrome/browser/ui/ash/assistant/device_actions_delegate_impl.cc +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright 2020 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ui/ash/assistant/device_actions_delegate_impl.h" - -#include "chrome/browser/ash/app_list/arc/arc_app_list_prefs.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/profiles/profile_manager.h" - -using ::ash::assistant::AppStatus; - -DeviceActionsDelegateImpl::DeviceActionsDelegateImpl() = default; - -DeviceActionsDelegateImpl::~DeviceActionsDelegateImpl() = default; - -AppStatus DeviceActionsDelegateImpl::GetAndroidAppStatus( - const std::string& package_name) { - const auto* prefs = - ArcAppListPrefs::Get(ProfileManager::GetActiveUserProfile()); - if (!prefs) { - LOG(ERROR) << "ArcAppListPrefs is not available."; - return AppStatus::kUnknown; - } - std::string app_id = prefs->GetAppIdByPackageName(package_name); - - return app_id.empty() ? AppStatus::kUnavailable : AppStatus::kAvailable; -}
diff --git a/chrome/browser/ui/ash/assistant/device_actions_delegate_impl.h b/chrome/browser/ui/ash/assistant/device_actions_delegate_impl.h deleted file mode 100644 index f71b6c2..0000000 --- a/chrome/browser/ui/ash/assistant/device_actions_delegate_impl.h +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright 2020 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_ASH_ASSISTANT_DEVICE_ACTIONS_DELEGATE_IMPL_H_ -#define CHROME_BROWSER_UI_ASH_ASSISTANT_DEVICE_ACTIONS_DELEGATE_IMPL_H_ - -#include <string> - -#include "chrome/browser/ui/ash/assistant/device_actions_delegate.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h" - -class DeviceActionsDelegateImpl : public DeviceActionsDelegate { - public: - DeviceActionsDelegateImpl(); - - // Disallow copy and assign. - DeviceActionsDelegateImpl(const DeviceActionsDelegateImpl&) = delete; - DeviceActionsDelegateImpl& operator=(const DeviceActionsDelegateImpl&) = - delete; - - ~DeviceActionsDelegateImpl() override; - - ash::assistant::AppStatus GetAndroidAppStatus( - const std::string& package_name) override; -}; - -#endif // CHROME_BROWSER_UI_ASH_ASSISTANT_DEVICE_ACTIONS_DELEGATE_IMPL_H_
diff --git a/chrome/browser/ui/ash/assistant/search_and_assistant_enabled_checker.cc b/chrome/browser/ui/ash/assistant/search_and_assistant_enabled_checker.cc deleted file mode 100644 index 55b33a0d..0000000 --- a/chrome/browser/ui/ash/assistant/search_and_assistant_enabled_checker.cc +++ /dev/null
@@ -1,130 +0,0 @@ -// Copyright 2020 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ui/ash/assistant/search_and_assistant_enabled_checker.h" - -#include <string> -#include <utility> - -#include "base/functional/bind.h" -#include "base/functional/callback_helpers.h" -#include "base/json/json_writer.h" -#include "base/strings/string_util.h" -#include "chromeos/ash/services/assistant/public/cpp/assistant_prefs.h" -#include "chromeos/services/assistant/public/shared/constants.h" -#include "net/base/url_util.h" -#include "services/data_decoder/public/cpp/data_decoder.h" -#include "services/network/public/cpp/resource_request.h" -#include "services/network/public/cpp/shared_url_loader_factory.h" -#include "services/network/public/cpp/simple_url_loader.h" -#include "services/network/public/mojom/url_response_head.mojom.h" -#include "url/gurl.h" - -namespace { - -// String to prepend to JSON responses to prevent XSSI. See http://go/xssi. -constexpr char kJsonSafetyPrefix[] = ")]}'\n"; - -constexpr int kMaxBodySize = 1024; - -constexpr net::NetworkTrafficAnnotationTag - kSearchAndAssistantEnabledCheckerNetworkTag = - net::DefineNetworkTrafficAnnotation( - "search_and_assistant_enabled_checker", - R"( - semantics { - sender: "Search and Assistant Enabled Checker" - description: - "HTTP request used to check if Search and Assistant (SAA) " - "service has been disabled by dasher admin. When service is " - "disabled, SAA will provide offline experiences for user." - trigger: - "User logs in, switches active profile, enables SAA or " - "updates account information so that assistant is allowed. " - "Also triggered when dasher admin enables SAA service for " - "user. " - data: "User GAIA Credentials" - destination: GOOGLE_OWNED_SERVICE - } - policy { - cookies_allowed: YES - cookies_store: "user" - chrome_policy { - AssistantVoiceMatchEnabledDuringOobe { - AssistantVoiceMatchEnabledDuringOobe : false - } - } - setting: - "User can turn on/off SAA in ChromeOS Settings under the " - "Search and Assistant menu. For managed devices, dasher " - "admin can disable SAA from the Additional Services menu." - })"); - -bool HasJsonSafetyPrefix(std::string& json_body) { - return base::StartsWith(json_body, kJsonSafetyPrefix, - base::CompareCase::SENSITIVE); -} - -} // namespace - -SearchAndAssistantEnabledChecker::SearchAndAssistantEnabledChecker( - network::mojom::URLLoaderFactory* url_loader_factory, - Delegate* delegate) - : url_loader_factory_(url_loader_factory), delegate_(delegate) {} - -SearchAndAssistantEnabledChecker::~SearchAndAssistantEnabledChecker() = default; - -void SearchAndAssistantEnabledChecker::SyncSearchAndAssistantState() { - auto resource_request = std::make_unique<network::ResourceRequest>(); - resource_request->url = net::AppendOrReplaceQueryParameter( - GURL(chromeos::assistant::kServiceIdEndpoint), - chromeos::assistant::kPayloadParamName, - chromeos::assistant::kServiceIdRequestPayload); - resource_request->site_for_cookies = - net::SiteForCookies::FromUrl(resource_request->url); - url_loader_ = network::SimpleURLLoader::Create( - std::move(resource_request), kSearchAndAssistantEnabledCheckerNetworkTag); - url_loader_->DownloadToString( - url_loader_factory_, - base::BindOnce( - &SearchAndAssistantEnabledChecker::OnSimpleURLLoaderComplete, - weak_factory_.GetWeakPtr()), - kMaxBodySize); -} - -void SearchAndAssistantEnabledChecker::OnSimpleURLLoaderComplete( - std::unique_ptr<std::string> response_body) { - if (!response_body || url_loader_->NetError() != net::OK || - !url_loader_->ResponseInfo() || !url_loader_->ResponseInfo()->headers) { - LOG(ERROR) << "Network error. Failed to get response."; - delegate_->OnError(); - return; - } - - if (!HasJsonSafetyPrefix(*response_body)) { - LOG(ERROR) << "Invalid response."; - delegate_->OnError(); - return; - } - - // Strip the JsonSafetyPrefix and parse the response. - data_decoder::DataDecoder::ParseJsonIsolated( - response_body->substr(strlen(kJsonSafetyPrefix)), - base::BindOnce(&SearchAndAssistantEnabledChecker::OnJsonParsed, - weak_factory_.GetWeakPtr())); -} - -void SearchAndAssistantEnabledChecker::OnJsonParsed( - data_decoder::DataDecoder::ValueOrError response) { - if (!response.has_value() || !response->is_dict()) { - LOG(ERROR) << "JSON parsing failed: " << response.error(); - delegate_->OnError(); - return; - } - - // |result| is true if the Search and Assistant bit is disabled. - auto is_disabled = response->GetDict().FindBool("result"); - - delegate_->OnSearchAndAssistantStateReceived(is_disabled.value()); -}
diff --git a/chrome/browser/ui/ash/assistant/search_and_assistant_enabled_checker.h b/chrome/browser/ui/ash/assistant/search_and_assistant_enabled_checker.h deleted file mode 100644 index d3990fb..0000000 --- a/chrome/browser/ui/ash/assistant/search_and_assistant_enabled_checker.h +++ /dev/null
@@ -1,66 +0,0 @@ -// Copyright 2020 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_ASH_ASSISTANT_SEARCH_AND_ASSISTANT_ENABLED_CHECKER_H_ -#define CHROME_BROWSER_UI_ASH_ASSISTANT_SEARCH_AND_ASSISTANT_ENABLED_CHECKER_H_ - -#include <memory> -#include <string> - -#include "base/memory/raw_ptr.h" -#include "base/memory/scoped_refptr.h" -#include "base/memory/weak_ptr.h" -#include "services/data_decoder/public/cpp/data_decoder.h" - -namespace network { -class SimpleURLLoader; -namespace mojom { -class URLLoaderFactory; -} // namespace mojom -} // namespace network - -// SearchAndAssistantEnabledChecker is the class that send HTTP request to sync -// the Search and Assistant state. -class SearchAndAssistantEnabledChecker { - public: - // A delegate interface for the SearchAndAssistantEnabledChecker. - class Delegate { - public: - // Invoked when there is an error. - virtual void OnError() {} - - // Invoked when the Search and Assistant bit is received. - virtual void OnSearchAndAssistantStateReceived(bool is_disabled) {} - - protected: - Delegate() = default; - virtual ~Delegate() = default; - }; - - SearchAndAssistantEnabledChecker( - network::mojom::URLLoaderFactory* url_loader_factory, - Delegate* delegate); - - // Disallow copy and assign. - SearchAndAssistantEnabledChecker(const SearchAndAssistantEnabledChecker&) = - delete; - SearchAndAssistantEnabledChecker& operator=( - const SearchAndAssistantEnabledChecker&) = delete; - - ~SearchAndAssistantEnabledChecker(); - - void SyncSearchAndAssistantState(); - - private: - void OnSimpleURLLoaderComplete(std::unique_ptr<std::string> response_body); - void OnJsonParsed(data_decoder::DataDecoder::ValueOrError response); - - std::unique_ptr<network::SimpleURLLoader> url_loader_; - raw_ptr<network::mojom::URLLoaderFactory> url_loader_factory_; - const raw_ptr<Delegate> delegate_; - - base::WeakPtrFactory<SearchAndAssistantEnabledChecker> weak_factory_{this}; -}; - -#endif // CHROME_BROWSER_UI_ASH_ASSISTANT_SEARCH_AND_ASSISTANT_ENABLED_CHECKER_H_
diff --git a/chrome/browser/ui/ash/clipboard/clipboard_history_browsertest.cc b/chrome/browser/ui/ash/clipboard/clipboard_history_browsertest.cc index f95f0ad4..75ee81d7 100644 --- a/chrome/browser/ui/ash/clipboard/clipboard_history_browsertest.cc +++ b/chrome/browser/ui/ash/clipboard/clipboard_history_browsertest.cc
@@ -1858,69 +1858,3 @@ EXPECT_TRUE(second_item_delete_button->GetVisible()); EXPECT_FALSE(second_item_contents_view->clip_path().isEmpty()); } - -// Base class used to test features that only exist when the Ctrl+V longpress -// feature is enabled. -class ClipboardHistoryLongpressEnabledBrowserTest - : public ClipboardHistoryTextfieldBrowserTest { - public: - ClipboardHistoryLongpressEnabledBrowserTest() { - scoped_feature_list_.InitAndEnableFeature( - ash::features::kClipboardHistoryLongpress); - } - - private: - base::test::ScopedFeatureList scoped_feature_list_; -}; - -// Verifies that clicking the clipboard history menu's footer does nothing and -// that tab and arrow key traversal pass over the footer. -IN_PROC_BROWSER_TEST_F(ClipboardHistoryLongpressEnabledBrowserTest, - FooterNotInteractive) { - // Write some things to the clipboard. - SetClipboardText("A"); - SetClipboardText("B"); - - // Show the clipboard history menu via the Ctrl+V long-press shortcut so that - // the menu's educational footer shows. - EXPECT_TRUE(GetClipboardHistoryController()->ShowMenu( - gfx::Rect(), ui::mojom::MenuSourceType::kNone, - crosapi::mojom::ClipboardHistoryControllerShowSource:: - kControlVLongpress)); - EXPECT_TRUE(GetClipboardHistoryController()->IsMenuShowing()); - - // Verify that the menu has two clipboard history items and a third item (the - // menu footer). A fourth item (the menu header) will also be present. - const auto* menu = GetClipboardHistoryController()->context_menu_for_test(); - EXPECT_EQ(menu->GetMenuItemsCount(), 2u); - ASSERT_EQ(menu->GetModelForTest()->GetItemCount(), 4u); - - // Verify that clicking on the footer does nothing. - EXPECT_TRUE(textfield_->GetText().empty()); - const auto* footer = menu->GetMenuItemViewAtForTest( - /*index=*/3u); - GetEventGenerator()->MoveMouseTo(footer->GetBoundsInScreen().CenterPoint()); - GetEventGenerator()->ClickLeftButton(); - EXPECT_TRUE(textfield_->GetText().empty()); - - // Verify that traversing over the menu with arrow keys skips the footer. - const auto* item1 = - GetMenuItemViewForClipboardHistoryItemAtIndex(/*index=*/0u); - const auto* item2 = - GetMenuItemViewForClipboardHistoryItemAtIndex(/*index=*/1u); - PressAndRelease(ui::VKEY_DOWN); - EXPECT_TRUE(item1->IsSelected()); - PressAndRelease(ui::VKEY_DOWN); - EXPECT_TRUE(item2->IsSelected()); - PressAndRelease(ui::VKEY_DOWN); - EXPECT_TRUE(item1->IsSelected()); - - // Verify that traversing over the menu with the Tab key (two presses at a - // time for each item's main button and delete button) skips the footer. - PressAndRelease(ui::VKEY_TAB); - PressAndRelease(ui::VKEY_TAB); - EXPECT_TRUE(item2->IsSelected()); - PressAndRelease(ui::VKEY_TAB); - PressAndRelease(ui::VKEY_TAB); - EXPECT_TRUE(item1->IsSelected()); -}
diff --git a/chrome/browser/ui/ash/main_extra_parts/chrome_browser_main_extra_parts_ash.cc b/chrome/browser/ui/ash/main_extra_parts/chrome_browser_main_extra_parts_ash.cc index 8d5991b8..0d3fef5 100644 --- a/chrome/browser/ui/ash/main_extra_parts/chrome_browser_main_extra_parts_ash.cc +++ b/chrome/browser/ui/ash/main_extra_parts/chrome_browser_main_extra_parts_ash.cc
@@ -554,6 +554,9 @@ // Initialized in PreProfileInit (which may not get called in some tests). login_readahead_performer_.reset(); + if (device::GeolocationSystemPermissionManager::GetInstance()) { + device::GeolocationSystemPermissionManager::GetInstance()->Shutdown(); + } device::GeolocationSystemPermissionManager::SetInstance(nullptr); system_tray_client_.reset(); session_controller_client_.reset();
diff --git a/chrome/browser/ui/autofill/payments/chrome_payments_autofill_client.cc b/chrome/browser/ui/autofill/payments/chrome_payments_autofill_client.cc index 832fbc7..89b8f08 100644 --- a/chrome/browser/ui/autofill/payments/chrome_payments_autofill_client.cc +++ b/chrome/browser/ui/autofill/payments/chrome_payments_autofill_client.cc
@@ -1023,10 +1023,7 @@ const LegalMessageLines& legal_message_lines, CardSaveAndFillDialogCallback callback) { #if !BUILDFLAG(IS_ANDROID) - if (!save_and_fill_dialog_controller_) { - save_and_fill_dialog_controller_ = - std::make_unique<SaveAndFillDialogControllerImpl>(); - } + CHECK(save_and_fill_dialog_controller_); save_and_fill_dialog_controller_->ShowUploadDialog( std::move(legal_message_lines), base::BindOnce(&CreateAndShowSaveAndFillDialog, @@ -1038,6 +1035,20 @@ #endif // !BUILDFLAG(IS_ANDROID) } +void ChromePaymentsAutofillClient::ShowCreditCardSaveAndFillPendingDialog() { +#if !BUILDFLAG(IS_ANDROID) + if (!save_and_fill_dialog_controller_) { + save_and_fill_dialog_controller_ = + std::make_unique<SaveAndFillDialogControllerImpl>(); + } + save_and_fill_dialog_controller_->ShowPendingDialog(base::BindOnce( + &CreateAndShowSaveAndFillDialog, + save_and_fill_dialog_controller_->GetWeakPtr(), web_contents())); +#else + NOTIMPLEMENTED(); +#endif // !BUILDFLAG(IS_ANDROID) +} + SaveAndFillManager* ChromePaymentsAutofillClient::GetSaveAndFillManager() { #if BUILDFLAG(IS_ANDROID) return nullptr;
diff --git a/chrome/browser/ui/autofill/payments/chrome_payments_autofill_client.h b/chrome/browser/ui/autofill/payments/chrome_payments_autofill_client.h index aeb62cc..157f38e 100644 --- a/chrome/browser/ui/autofill/payments/chrome_payments_autofill_client.h +++ b/chrome/browser/ui/autofill/payments/chrome_payments_autofill_client.h
@@ -216,6 +216,7 @@ void ShowCreditCardUploadSaveAndFillDialog( const LegalMessageLines& legal_message_lines, CardSaveAndFillDialogCallback callback) override; + void ShowCreditCardSaveAndFillPendingDialog() override; payments::SaveAndFillManager* GetSaveAndFillManager() override; void ShowSelectBnplIssuerDialog( std::vector<BnplIssuerContext> bnpl_issuer_context,
diff --git a/chrome/browser/ui/extensions/extensions_dialogs.h b/chrome/browser/ui/extensions/extensions_dialogs.h index f99fbaa..e040099 100644 --- a/chrome/browser/ui/extensions/extensions_dialogs.h +++ b/chrome/browser/ui/extensions/extensions_dialogs.h
@@ -45,8 +45,6 @@ DECLARE_ELEMENT_IDENTIFIER_VALUE(kMv2DisabledDialogParagraphElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kMv2DisabledDialogRemoveButtonElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kMv2KeepDialogOkButtonElementId); -DECLARE_ELEMENT_IDENTIFIER_VALUE(kReloadPageDialogCancelButtonElementId); -DECLARE_ELEMENT_IDENTIFIER_VALUE(kReloadPageDialogOkButtonElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kParentBlockedDialogMessage); void ShowConstrainedDeviceChooserDialog( @@ -106,14 +104,6 @@ const std::string& extension_name, base::OnceCallback<void(bool)> done_callback); -// Shows a dialog when extensions require a refresh for their action -// to be run or blocked. When the dialog is accepted, `callback` is -// invoked. -void ShowReloadPageDialog( - Browser* browser, - const std::vector<extensions::ExtensionId>& extension_ids, - base::OnceClosure callback); - // Shows a dialog with a warning to the user that their settings have been // overridden by an extension. void ShowSettingsOverriddenDialog(
diff --git a/chrome/browser/ui/extensions/reload_page_dialog_controller.cc b/chrome/browser/ui/extensions/reload_page_dialog_controller.cc new file mode 100644 index 0000000..616fa5b --- /dev/null +++ b/chrome/browser/ui/extensions/reload_page_dialog_controller.cc
@@ -0,0 +1,166 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/extensions/reload_page_dialog_controller.h" + +#include "base/barrier_closure.h" +#include "base/feature_list.h" +#include "base/functional/bind.h" +#include "base/functional/callback_forward.h" +#include "base/functional/callback_helpers.h" +#include "base/strings/utf_string_conversions.h" +#include "chrome/browser/extensions/extension_util.h" +#include "chrome/browser/ui/extensions/extension_dialog_utils.h" +#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" +#include "chrome/grit/generated_resources.h" +#include "content/public/browser/browser_context.h" +#include "extensions/browser/extension_icon_placeholder.h" +#include "extensions/browser/image_loader.h" +#include "extensions/common/extension.h" +#include "extensions/common/extension_features.h" +#include "extensions/common/manifest_handlers/icons_handler.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/base/models/dialog_model.h" + +namespace { + +std::u16string GetTitle( + const std::vector<extensions::ReloadPageDialogController::ExtensionInfo>& + extensions_info) { + if (base::FeatureList::IsEnabled( + extensions_features::kExtensionsMenuAccessControl)) { + return l10n_util::GetStringUTF16( + IDS_EXTENSION_RELOAD_PAGE_BUBBLE_ALLOW_MULTIPLE_EXTENSIONS_TITLE); + } + + if (extensions_info.size() == 0) { + return l10n_util::GetStringUTF16( + IDS_EXTENSION_SITE_RELOAD_PAGE_BUBBLE_HEADING); + } + + if (extensions_info.size() == 1) { + std::u16string extension_name = + extensions::util::GetFixupExtensionNameForUIDisplay( + base::UTF8ToUTF16(extensions_info[0].name)); + return l10n_util::GetStringFUTF16( + IDS_EXTENSION_RELOAD_PAGE_BUBBLE_ALLOW_SINGLE_EXTENSION_TITLE, + extension_name); + } + + return l10n_util::GetStringUTF16( + IDS_EXTENSION_RELOAD_PAGE_BUBBLE_ALLOW_MULTIPLE_EXTENSIONS_TITLE); +} + +} // namespace + +namespace extensions { + +DEFINE_ELEMENT_IDENTIFIER_VALUE(kReloadPageDialogOkButtonElementId); +DEFINE_ELEMENT_IDENTIFIER_VALUE(kReloadPageDialogCancelButtonElementId); + +ReloadPageDialogController::ReloadPageDialogController( + gfx::NativeWindow parent, + content::BrowserContext* browser_context, + base::OnceClosure callback) + : parent_(parent), + browser_context_(browser_context), + on_dialog_accepted_(std::move(callback)) {} +ReloadPageDialogController::~ReloadPageDialogController() = default; + +void ReloadPageDialogController::TriggerShow( + const std::vector<const Extension*>& extensions) { + if (!base::FeatureList::IsEnabled( + extensions_features::kExtensionsMenuAccessControl)) { + for (const Extension* extension : extensions) { + ExtensionInfo extension_info; + extension_info.id = extension->id(); + extensions_info_.push_back(extension_info); + } + Show(); + return; + } + + // We need to load the icon for each extension before showing the dialog. + // Since icon loading is asynchronous, we use a BarrierClosure. It acts as + // a counter and will call this->Show() only after all icon-loading callbacks + // have completed. + int extensions_count = extensions.size(); + base::RepeatingClosure barrier_closure = base::BarrierClosure( + extensions_count, base::BindOnce(&ReloadPageDialogController::Show, + weak_ptr_factory_.GetWeakPtr())); + const int icon_size = extension_misc::EXTENSION_ICON_SMALLISH; + auto* image_loader = ImageLoader::Get(browser_context_); + + for (const Extension* extension : extensions) { + ExtensionResource icon = IconsInfo::GetIconResource( + extension, icon_size, ExtensionIconSet::Match::kBigger); + if (icon.empty()) { + gfx::Image placeholder_icon = + ExtensionIconPlaceholder::CreateImage(icon_size, extension->name()); + OnExtensionIconLoaded(extension->id(), extension->name(), barrier_closure, + placeholder_icon); + } else { + gfx::Size max_size(icon_size, icon_size); + image_loader->LoadImageAsync( + extension, icon, max_size, + base::BindOnce(&ReloadPageDialogController::OnExtensionIconLoaded, + weak_ptr_factory_.GetWeakPtr(), extension->id(), + extension->name(), barrier_closure)); + } + } +} + +void ReloadPageDialogController::Show() { + ui::DialogModel::Builder dialog_builder; + dialog_builder.SetTitle(GetTitle(extensions_info_)) + .AddOkButton(base::BindOnce(std::move(on_dialog_accepted_)), + ui::DialogModel::Button::Params() + .SetLabel(l10n_util::GetStringUTF16( + IDS_EXTENSION_RELOAD_PAGE_BUBBLE_OK_BUTTON)) + .SetId(kReloadPageDialogOkButtonElementId)) + .AddCancelButton(base::DoNothing(), + ui::DialogModel::Button::Params().SetId( + kReloadPageDialogCancelButtonElementId)); + + int extensions_count = extensions_info_.size(); + + if (base::FeatureList::IsEnabled( + extensions_features::kExtensionsMenuAccessControl)) { + if (extensions_count == 1) { + dialog_builder.SetIcon( + ui::ImageModel::FromImage(extensions_info_[0].icon)); + } else if (extensions_count > 1) { + for (auto extension_info : extensions_info_) { + dialog_builder.AddMenuItem( + ui::ImageModel::FromImage(extension_info.icon), + util::GetFixupExtensionNameForUIDisplay(extension_info.name), + base::DoNothing(), + ui::DialogModelMenuItem::Params().SetIsEnabled(false)); + } + } + } + + std::vector<ExtensionId> extension_ids; + extension_ids.reserve(extensions_info_.size()); + for (const auto& info : extensions_info_) { + extension_ids.push_back(info.id); + } + + ShowDialog(parent_, extension_ids, dialog_builder.Build()); +} + +void ReloadPageDialogController::OnExtensionIconLoaded( + const ExtensionId& extension_id, + const std::string& extension_name, + base::OnceClosure done_callback, + const gfx::Image& icon) { + ExtensionInfo extension_info; + extension_info.id = extension_id; + extension_info.name = extension_name; + extension_info.icon = icon; + extensions_info_.push_back(extension_info); + std::move(done_callback).Run(); +} + +} // namespace extensions
diff --git a/chrome/browser/ui/extensions/reload_page_dialog_controller.h b/chrome/browser/ui/extensions/reload_page_dialog_controller.h new file mode 100644 index 0000000..b7b8ade --- /dev/null +++ b/chrome/browser/ui/extensions/reload_page_dialog_controller.h
@@ -0,0 +1,78 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_EXTENSIONS_RELOAD_PAGE_DIALOG_CONTROLLER_H_ +#define CHROME_BROWSER_UI_EXTENSIONS_RELOAD_PAGE_DIALOG_CONTROLLER_H_ + +#include <vector> + +#include "base/functional/callback.h" +#include "base/functional/callback_forward.h" +#include "base/memory/weak_ptr.h" +#include "extensions/common/extension_id.h" +#include "ui/base/interaction/element_identifier.h" +#include "ui/gfx/image/image.h" +#include "ui/gfx/native_widget_types.h" + +namespace content { +class BrowserContext; +} // namespace content + +namespace extensions { + +class Extension; + +DECLARE_ELEMENT_IDENTIFIER_VALUE(kReloadPageDialogCancelButtonElementId); +DECLARE_ELEMENT_IDENTIFIER_VALUE(kReloadPageDialogOkButtonElementId); + +// A controller for a dialog that prompts the user to reload the active page so +// that a given list of extensions can run. +class ReloadPageDialogController { + public: + // Information for an extension that should be included in the dialog. + struct ExtensionInfo { + ExtensionId id; + std::string name; + gfx::Image icon; + }; + + ReloadPageDialogController(gfx::NativeWindow parent, + content::BrowserContext* browser_context, + base::OnceClosure callback); + ~ReloadPageDialogController(); + ReloadPageDialogController(const ReloadPageDialogController&) = delete; + const ReloadPageDialogController& operator=( + const ReloadPageDialogController&) = delete; + + // Starts the process of showing the dialog for the given `extensions`. + void TriggerShow(const std::vector<const Extension*>& extensions); + + private: + // Shows the reload page dialog with the extensions information gathered in + // `extensions_info_`. + void Show(); + + // Called when an extension's icon has finished loading. `done_callback` is + // used to track when all extensions icons have been loaded. + void OnExtensionIconLoaded(const ExtensionId& extension_id, + const std::string& extension_name, + base::OnceClosure done_callback, + const gfx::Image& icon); + + gfx::NativeWindow parent_; + raw_ptr<content::BrowserContext> browser_context_; + + // Information for the extensions to be displayed in the dialog. + std::vector<ExtensionInfo> extensions_info_; + + // The callback to be run when the user accepts the dialog. + // TODO(crbug.com/424012380): move callback from extension action runner. + base::OnceClosure on_dialog_accepted_; + + base::WeakPtrFactory<ReloadPageDialogController> weak_ptr_factory_{this}; +}; + +} // namespace extensions + +#endif // CHROME_BROWSER_UI_EXTENSIONS_RELOAD_PAGE_DIALOG_CONTROLLER_H_
diff --git a/chrome/browser/ui/extensions/reload_page_dialog_controller_browsertest.cc b/chrome/browser/ui/extensions/reload_page_dialog_controller_browsertest.cc new file mode 100644 index 0000000..bd0861c27 --- /dev/null +++ b/chrome/browser/ui/extensions/reload_page_dialog_controller_browsertest.cc
@@ -0,0 +1,34 @@ +// Copyright 2022 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/extensions/reload_page_dialog_controller.h" + +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_window.h" +#include "chrome/browser/ui/views/extensions/extensions_dialogs_browsertest.h" +#include "content/public/test/browser_test.h" +#include "extensions/common/extension.h" + +// TODO(crbug.com/424012380): Remove browser dependency and enable test for +// Desktop Android +class ReloadPageDialogControllerBrowserTest + : public ExtensionsDialogBrowserTest { + public: + // DialogBrowserTest: + void ShowUi(const std::string& name) override { + auto extension = InstallExtension("Extension"); + + std::unique_ptr<extensions::ReloadPageDialogController> reload_page_dialog = + std::make_unique<extensions::ReloadPageDialogController>( + browser()->window()->GetNativeWindow(), GetProfile(), + base::DoNothing()); + std::vector<const extensions::Extension*> extensions = {extension.get()}; + reload_page_dialog->TriggerShow(extensions); + } +}; + +IN_PROC_BROWSER_TEST_F(ReloadPageDialogControllerBrowserTest, InvokeUi) { + ShowAndVerifyUi(); +}
diff --git a/chrome/browser/ui/tabs/tab_utils.cc b/chrome/browser/ui/tabs/tab_utils.cc index d4097c19..40729b6 100644 --- a/chrome/browser/ui/tabs/tab_utils.cc +++ b/chrome/browser/ui/tabs/tab_utils.cc
@@ -7,6 +7,7 @@ #include <utility> #include "base/feature_list.h" +#include "chrome/browser/actor/ui/actor_ui_tab_controller_interface.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" #include "chrome/browser/media/webrtc/media_stream_capture_indicator.h" @@ -14,6 +15,7 @@ #include "chrome/browser/ui/browser_window/public/browser_window_interface.h" #include "chrome/browser/ui/recently_audible_helper.h" #include "chrome/browser/ui/tabs/alert/tab_alert.h" +#include "chrome/browser/ui/tabs/public/tab_features.h" #include "chrome/browser/ui/tabs/tab_enums.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/vr/vr_tab_helper.h" @@ -90,6 +92,13 @@ states.push_back(tabs::TabAlert::SERIAL_CONNECTED); } + if (auto* actor_controller = tab->GetTabFeatures()->actor_ui_tab_controller(); + actor_controller && actor_controller->ShouldShowActorTabIndicator()) { + // TODO(crbug.com/422538779) Create a new Alert for the Actor code instead + // of relying on the GLIC_ACCESSING alert. + states.push_back(tabs::TabAlert::GLIC_ACCESSING); + } + #if BUILDFLAG(ENABLE_GLIC) glic::GlicKeyedService* glic_service = glic::GlicKeyedService::Get( Profile::FromBrowserContext(contents->GetBrowserContext()));
diff --git a/chrome/browser/ui/views/autofill/payments/save_and_fill_dialog.cc b/chrome/browser/ui/views/autofill/payments/save_and_fill_dialog.cc index 9b9ad1c..eff62a1 100644 --- a/chrome/browser/ui/views/autofill/payments/save_and_fill_dialog.cc +++ b/chrome/browser/ui/views/autofill/payments/save_and_fill_dialog.cc
@@ -7,6 +7,7 @@ #include "chrome/browser/ui/views/autofill/payments/payments_view_util.h" #include "chrome/browser/ui/views/chrome_layout_provider.h" #include "chrome/browser/ui/views/chrome_typography.h" +#include "components/autofill/core/browser/payments/constants.h" #include "components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller.h" #include "components/autofill/core/common/credit_card_number_validation.h" #include "components/grit/components_scaled_resources.h" @@ -16,6 +17,7 @@ #include "ui/views/accessibility/view_accessibility.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/controls/textfield/textfield.h" +#include "ui/views/controls/throbber.h" namespace autofill { @@ -52,7 +54,7 @@ focus_manager_->AddFocusChangeListener(this); } - if (controller_->IsUploadSaveAndFill()) { + if (controller_->GetDialogState() == SaveAndFillDialogState::kUploadDialog) { GetBubbleFrameView()->SetTitleView( std::make_unique<TitleWithIconAfterLabelView>( GetWindowTitle(), TitleWithIconAfterLabelView::Icon::GOOGLE_PAY)); @@ -135,13 +137,37 @@ set_margins(ChromeLayoutProvider::Get()->GetDialogInsetsForContentType( views::DialogContentType::kControl, views::DialogContentType::kControl)); - AddChildView(views::Builder<views::Label>() - .SetText(controller_->GetExplanatoryMessage()) - .SetTextContext(views::style::CONTEXT_DIALOG_BODY_TEXT) - .SetTextStyle(views::style::STYLE_SECONDARY) - .SetMultiLine(true) - .SetHorizontalAlignment(gfx::ALIGN_TO_HEAD) - .Build()); + container_view_ = AddChildView(std::make_unique<views::View>()); + container_view_->SetUseDefaultFillLayout(true); + + CreateMainContentView(); + CreatePendingView(); + + if (controller_->GetDialogState() == SaveAndFillDialogState::kPendingDialog) { + ToggleThrobberVisibility(/*visible=*/true); + } else if (controller_->GetDialogState() == + SaveAndFillDialogState::kUploadDialog) { + ToggleThrobberVisibility(/*visible=*/false); + } +} + +void SaveAndFillDialog::CreateMainContentView() { + container_view_->AddChildView( + views::Builder<views::BoxLayoutView>() + .CopyAddressTo(&main_view_) + .SetOrientation(views::BoxLayout::Orientation::kVertical) + .SetBetweenChildSpacing( + ChromeLayoutProvider::Get()->GetDistanceMetric( + views::DISTANCE_RELATED_CONTROL_VERTICAL)) + .Build()); + main_view_->AddChildView( + views::Builder<views::Label>() + .SetText(controller_->GetExplanatoryMessage()) + .SetTextContext(views::style::CONTEXT_DIALOG_BODY_TEXT) + .SetTextStyle(views::style::STYLE_SECONDARY) + .SetMultiLine(true) + .SetHorizontalAlignment(gfx::ALIGN_TO_HEAD) + .Build()); card_number_data_ = CreateLabelAndTextfieldView( /*label_text=*/controller_->GetCardNumberLabel(), @@ -149,7 +175,7 @@ card_number_data_.GetInputTextField().SetTextInputType( ui::TextInputType::TEXT_INPUT_TYPE_NUMBER); card_number_data_.GetInputTextField().SetController(this); - AddChildView(std::move(card_number_data_.container)); + main_view_->AddChildView(std::move(card_number_data_.container)); expiration_date_data_ = CreateLabelAndTextfieldView( /*label_text=*/controller_->GetExpirationDateLabel(), @@ -178,7 +204,7 @@ /*error_message=*/std::u16string()); // Create the horizontal row for expiration date, cvc, and icon. - AddChildView( + main_view_->AddChildView( views::Builder<views::BoxLayoutView>() .SetOrientation(views::BoxLayout::Orientation::kHorizontal) .SetBetweenChildSpacing( @@ -197,13 +223,33 @@ /*label_text=*/controller_->GetNameOnCardLabel(), /*error_message=*/controller_->GetInvalidNameOnCardErrorMessage()); name_on_card_data_.GetInputTextField().SetController(this); - AddChildView(std::move(name_on_card_data_.container)); + main_view_->AddChildView(std::move(name_on_card_data_.container)); - if (controller_->IsUploadSaveAndFill()) { - AddChildView(CreateLegalMessageView()); + if (controller_->GetDialogState() == SaveAndFillDialogState::kUploadDialog) { + main_view_->AddChildView(CreateLegalMessageView()); } } +void SaveAndFillDialog::CreatePendingView() { + container_view_->AddChildView( + views::Builder<views::BoxLayoutView>() + .CopyAddressTo(&pending_view_) + .SetMainAxisAlignment(views::BoxLayout::MainAxisAlignment::kCenter) + .SetCrossAxisAlignment(views::BoxLayout::CrossAxisAlignment::kCenter) + .AddChild( + views::Builder<views::Throbber>( + std::make_unique<views::Throbber>(kDialogThrobberDiameter)) + .CopyAddressTo(&throbber_)) + .SetVisible(false) + .Build()); +} + +void SaveAndFillDialog::ToggleThrobberVisibility(bool visible) { + visible ? throbber_->Start() : throbber_->Stop(); + main_view_->SetVisible(!visible); + pending_view_->SetVisible(visible); +} + payments::PaymentsAutofillClient::UserProvidedCardSaveAndFillDetails SaveAndFillDialog::GetUserProvidedDataFromInput() const { payments::PaymentsAutofillClient::UserProvidedCardSaveAndFillDetails
diff --git a/chrome/browser/ui/views/autofill/payments/save_and_fill_dialog.h b/chrome/browser/ui/views/autofill/payments/save_and_fill_dialog.h index dfe69ec..432daade8 100644 --- a/chrome/browser/ui/views/autofill/payments/save_and_fill_dialog.h +++ b/chrome/browser/ui/views/autofill/payments/save_and_fill_dialog.h
@@ -9,6 +9,7 @@ #include "components/autofill/core/browser/payments/payments_autofill_client.h" #include "components/autofill/core/browser/ui/payments/save_and_fill_dialog_view.h" #include "ui/views/controls/textfield/textfield_controller.h" +#include "ui/views/controls/throbber.h" #include "ui/views/focus/focus_manager.h" #include "ui/views/window/dialog_delegate.h" @@ -54,6 +55,10 @@ // Create a view with a legal message. std::unique_ptr<views::View> CreateLegalMessageView(); + void CreateMainContentView(); + void CreatePendingView(); + void ToggleThrobberVisibility(bool visible); + base::WeakPtr<SaveAndFillDialogController> controller_; base::RepeatingCallback<void(const GURL&)> on_legal_message_link_clicked_; @@ -65,6 +70,11 @@ LabeledTextfieldWithErrorMessage cvc_data_; LabeledTextfieldWithErrorMessage expiration_date_data_; LabeledTextfieldWithErrorMessage name_on_card_data_; + + raw_ptr<views::View> container_view_ = nullptr; + raw_ptr<views::BoxLayoutView> main_view_ = nullptr; + raw_ptr<views::BoxLayoutView> pending_view_ = nullptr; + raw_ptr<views::Throbber> throbber_ = nullptr; }; } // namespace autofill
diff --git a/chrome/browser/ui/views/extensions/dialogs/reload_page_dialog.cc b/chrome/browser/ui/views/extensions/dialogs/reload_page_dialog.cc deleted file mode 100644 index 1565321..0000000 --- a/chrome/browser/ui/views/extensions/dialogs/reload_page_dialog.cc +++ /dev/null
@@ -1,99 +0,0 @@ -// Copyright 2022 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/feature_list.h" -#include "base/functional/bind.h" -#include "base/functional/callback_forward.h" -#include "base/functional/callback_helpers.h" -#include "chrome/browser/extensions/extension_util.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/extensions/extension_dialog_utils.h" -#include "chrome/browser/ui/extensions/extensions_dialogs.h" -#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" -#include "chrome/browser/ui/views/extensions/extension_view_utils.h" -#include "chrome/browser/ui/views/extensions/extensions_toolbar_container.h" -#include "chrome/grit/generated_resources.h" -#include "extensions/common/extension_features.h" -#include "ui/base/l10n/l10n_util.h" -#include "ui/base/models/dialog_model.h" - -namespace { - -std::u16string GetTitle( - const std::vector<ToolbarActionViewController*> actions) { - if (actions.size() == 0) { - return l10n_util::GetStringUTF16( - IDS_EXTENSION_SITE_RELOAD_PAGE_BUBBLE_HEADING); - } - if (actions.size() == 1) { - std::u16string extension_name = - extensions::util::GetFixupExtensionNameForUIDisplay( - actions[0]->GetActionName()); - return l10n_util::GetStringFUTF16( - IDS_EXTENSION_RELOAD_PAGE_BUBBLE_ALLOW_SINGLE_EXTENSION_TITLE, - extension_name); - } - return l10n_util::GetStringUTF16( - IDS_EXTENSION_RELOAD_PAGE_BUBBLE_ALLOW_MULTIPLE_EXTENSIONS_TITLE); -} - -} // namespace - -namespace extensions { - -DEFINE_ELEMENT_IDENTIFIER_VALUE(kReloadPageDialogOkButtonElementId); -DEFINE_ELEMENT_IDENTIFIER_VALUE(kReloadPageDialogCancelButtonElementId); - -void ShowReloadPageDialog( - Browser* browser, - const std::vector<extensions::ExtensionId>& extension_ids, - base::OnceClosure callback) { - ExtensionsToolbarContainer* const container = - GetExtensionsToolbarContainer(browser); - DCHECK(container); - std::u16string title; - - ui::DialogModel::Builder dialog_builder; - if (base::FeatureList::IsEnabled( - extensions_features::kExtensionsMenuAccessControl)) { - std::vector<ToolbarActionViewController*> actions; - for (const auto& extension_id : extension_ids) { - actions.push_back(container->GetActionForId(extension_id)); - } - - title = GetTitle(actions); - - content::WebContents* web_contents = - browser->tab_strip_model()->GetActiveWebContents(); - if (extension_ids.size() == 1) { - dialog_builder.SetIcon(GetIcon(actions[0], web_contents)); - } else if (extension_ids.size() > 1) { - for (auto* action : actions) { - std::u16string extension_name = - extensions::util::GetFixupExtensionNameForUIDisplay( - actions[0]->GetActionName()); - dialog_builder.AddMenuItem( - GetIcon(action, web_contents), extension_name, base::DoNothing(), - ui::DialogModelMenuItem::Params().SetIsEnabled(false)); - } - } - } else { - title = l10n_util::GetStringUTF16( - IDS_EXTENSION_SITE_RELOAD_PAGE_BUBBLE_HEADING); - } - - dialog_builder.SetTitle(title) - .AddOkButton(base::BindOnce(std::move(callback)), - ui::DialogModel::Button::Params() - .SetLabel(l10n_util::GetStringUTF16( - IDS_EXTENSION_RELOAD_PAGE_BUBBLE_OK_BUTTON)) - .SetId(kReloadPageDialogOkButtonElementId)) - .AddCancelButton(base::DoNothing(), - ui::DialogModel::Button::Params().SetId( - kReloadPageDialogCancelButtonElementId)); - - ShowDialog(container, extension_ids, dialog_builder.Build()); -} - -} // namespace extensions
diff --git a/chrome/browser/ui/views/extensions/dialogs/reload_page_dialog_browsertest.cc b/chrome/browser/ui/views/extensions/dialogs/reload_page_dialog_browsertest.cc deleted file mode 100644 index ab268f0c..0000000 --- a/chrome/browser/ui/views/extensions/dialogs/reload_page_dialog_browsertest.cc +++ /dev/null
@@ -1,22 +0,0 @@ -// Copyright 2022 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ui/extensions/extensions_dialogs.h" -#include "chrome/browser/ui/views/extensions/extensions_dialogs_browsertest.h" -#include "content/public/test/browser_test.h" -#include "extensions/common/extension.h" - -class ReloadPageDialogBrowserTest : public ExtensionsDialogBrowserTest { - public: - // DialogBrowserTest: - void ShowUi(const std::string& name) override { - auto extension = InstallExtension("Extension"); - extensions::ShowReloadPageDialog(browser(), {extension->id()}, - base::DoNothing()); - } -}; - -IN_PROC_BROWSER_TEST_F(ReloadPageDialogBrowserTest, InvokeUi) { - ShowAndVerifyUi(); -}
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_main_page_view_interactive_uitest.cc b/chrome/browser/ui/views/extensions/extensions_menu_main_page_view_interactive_uitest.cc index a0615a8..8736cf6f 100644 --- a/chrome/browser/ui/views/extensions/extensions_menu_main_page_view_interactive_uitest.cc +++ b/chrome/browser/ui/views/extensions/extensions_menu_main_page_view_interactive_uitest.cc
@@ -14,7 +14,7 @@ #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/browser_element_identifiers.h" #include "chrome/browser/ui/browser_tabstrip.h" -#include "chrome/browser/ui/extensions/extensions_dialogs.h" +#include "chrome/browser/ui/extensions/reload_page_dialog_controller.h" #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" #include "chrome/browser/ui/views/extensions/extensions_menu_coordinator.h" #include "chrome/browser/ui/views/extensions/extensions_menu_main_page_view.h"
diff --git a/chrome/browser/ui/views/extensions/extensions_menu_view_controller.cc b/chrome/browser/ui/views/extensions/extensions_menu_view_controller.cc index dad7227..044bc94 100644 --- a/chrome/browser/ui/views/extensions/extensions_menu_view_controller.cc +++ b/chrome/browser/ui/views/extensions/extensions_menu_view_controller.cc
@@ -443,7 +443,7 @@ auto* action_runner = extensions::ExtensionActionRunner::GetForWebContents(web_contents); if (action_runner) { - action_runner->ShowReloadPageBubble({extension_id}); + action_runner->ShowReloadPageBubble({GetExtension(browser_, extension_id)}); } }
diff --git a/chrome/browser/ui/views/location_bar/ai_mode_page_action_icon_view.cc b/chrome/browser/ui/views/location_bar/ai_mode_page_action_icon_view.cc index c7ec7185..342b2fb 100644 --- a/chrome/browser/ui/views/location_bar/ai_mode_page_action_icon_view.cc +++ b/chrome/browser/ui/views/location_bar/ai_mode_page_action_icon_view.cc
@@ -4,21 +4,30 @@ #include "chrome/browser/ui/views/location_bar/ai_mode_page_action_icon_view.h" +#include "base/check.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/search/search.h" #include "chrome/browser/ui/actions/chrome_action_id.h" #include "chrome/browser/ui/browser_element_identifiers.h" #include "chrome/browser/ui/search/omnibox_utils.h" #include "chrome/browser/ui/views/frame/browser_view.h" +#include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" #include "chrome/browser/ui/views/page_action/page_action_icon_view.h" #include "chrome/grit/branded_strings.h" #include "components/omnibox/browser/omnibox_edit_model.h" +#include "components/omnibox/browser/omnibox_view.h" #include "components/omnibox/browser/vector_icons.h" #include "components/vector_icons/vector_icons.h" +#include "content/public/browser/web_contents.h" #include "net/base/url_util.h" +#include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/events/event.h" +#include "ui/gfx/vector_icon_types.h" +#include "ui/views/bubble/bubble_dialog_delegate_view.h" +#include "ui/views/focus/focus_manager.h" #include "ui/views/interaction/element_tracker_views.h" #include "ui/views/view_class_properties.h" #include "url/gurl.h" @@ -53,24 +62,6 @@ AiModePageActionIconView::~AiModePageActionIconView() = default; -void AiModePageActionIconView::UpdateImpl() { - SetVisible(ShouldShow()); - ResetSlideAnimation(true); -} - -bool AiModePageActionIconView::ShouldShow() { - auto* web_contents = GetWebContents(); - if (!web_contents) { - return false; - } - OmniboxView* omnibox_view = search::GetOmniboxView(web_contents); - if (!omnibox_view) { - return false; - } - // Show the AIM chip ONLY IF the Omnibox is visibly focused. - return omnibox_view->model()->is_caret_visible(); -} - void AiModePageActionIconView::OnExecuting( PageActionIconView::ExecuteSource source) { GURL ai_mode_url = GURL(kAiModeBaseUrl); @@ -110,10 +101,74 @@ return omnibox::kSearchSparkIcon; } +bool AiModePageActionIconView::OnKeyPressed(const ui::KeyEvent& event) { + OmniboxView* omnibox_view = GetOmniboxView(); + CHECK(omnibox_view); + + if (omnibox_view->model()->PopupIsOpen()) { + if (views::FocusManager::IsTabTraversalKeyEvent(event)) { + // Notify the omnibox that focus is returning from the AI mode button, + // return focus to the omnibox view and then trigger the action that would + // have occurred if the omnibox view had retained focus. + omnibox_view->model()->SetFocusIsReturningFromAimButton(true); + omnibox_view->RequestViewFocus(); + omnibox_view->model()->OnTabPressed(event.IsShiftDown()); + return true; + } else if (event.key_code() == ui::VKEY_ESCAPE) { + // Return focus to the view then trigger the action that would have + // occurred if the omnibox view had retained focus. + omnibox_view->RequestViewFocus(); + omnibox_view->model()->OnEscapeKeyPressed(); + return true; + } + } + + return PageActionIconView::OnKeyPressed(event); +} + +bool AiModePageActionIconView::SkipDefaultKeyEventProcessing( + const ui::KeyEvent& event) { + // The default behavior of the tab key is to move focus to the next available + // view. If the omnibox popup is open, return true to prevent this so the + // omnibox can handle the tab key instead from `OnKeyPressed()`, above. + if (views::FocusManager::IsTabTraversalKeyEvent(event)) { + OmniboxView* omnibox_view = GetOmniboxView(); + CHECK(omnibox_view); + + if (omnibox_view->model()->PopupIsOpen()) { + return true; + } + } + + return PageActionIconView::SkipDefaultKeyEventProcessing(event); +} + void AiModePageActionIconView::ExecuteWithKeyboardSourceForTesting() { CHECK(GetVisible()); OnExecuting(EXECUTE_SOURCE_KEYBOARD); } +void AiModePageActionIconView::UpdateImpl() { + SetVisible(ShouldShow()); + ResetSlideAnimation(true); +} + +bool AiModePageActionIconView::ShouldShow() { + OmniboxView* omnibox_view = GetOmniboxView(); + if (!omnibox_view) { + return false; + } + // Show the AIM chip ONLY IF the Omnibox is visibly focused. + return omnibox_view->model()->is_caret_visible(); +} + +OmniboxView* AiModePageActionIconView::GetOmniboxView() { + auto* web_contents = GetWebContents(); + if (!web_contents) { + return nullptr; + } + return search::GetOmniboxView(web_contents); +} + BEGIN_METADATA(AiModePageActionIconView) END_METADATA
diff --git a/chrome/browser/ui/views/location_bar/ai_mode_page_action_icon_view.h b/chrome/browser/ui/views/location_bar/ai_mode_page_action_icon_view.h index 7f567b0..5d7d03af 100644 --- a/chrome/browser/ui/views/location_bar/ai_mode_page_action_icon_view.h +++ b/chrome/browser/ui/views/location_bar/ai_mode_page_action_icon_view.h
@@ -6,10 +6,24 @@ #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_AI_MODE_PAGE_ACTION_ICON_VIEW_H_ #include "base/memory/raw_ptr.h" +#include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" #include "chrome/browser/ui/views/page_action/page_action_icon_view.h" #include "ui/base/metadata/metadata_header_macros.h" class BrowserWindowInterface; +class OmniboxView; + +namespace gfx { +struct VectorIcon; +} + +namespace ui { +class KeyEvent; +} + +namespace views { +class BubbleDialogDelegate; +} class AiModePageActionIconView : public PageActionIconView { METADATA_HEADER(AiModePageActionIconView, PageActionIconView) @@ -27,6 +41,10 @@ void OnExecuting(PageActionIconView::ExecuteSource execute_source) override; const gfx::VectorIcon& GetVectorIcon() const override; + // views::View: + bool OnKeyPressed(const ui::KeyEvent& event) override; + bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override; + void ExecuteWithKeyboardSourceForTesting(); protected: @@ -35,6 +53,7 @@ private: bool ShouldShow(); + OmniboxView* GetOmniboxView(); const raw_ptr<BrowserWindowInterface> browser_; };
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index d59bc135..5e3f439c 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1107,6 +1107,10 @@ device::LocationSystemPermissionStatus new_status) { UpdateContentSettingsIcons(); } + +void LocationBarView::OnPermissionManagerShuttingDown() { + geolocation_permission_observation_.Reset(); +} #endif // BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) WebContents* LocationBarView::GetWebContentsForPageActionIconView() {
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h index d47fe124..2af0adb 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.h +++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -242,6 +242,7 @@ // GeolocationSystemPermissionManager::PermissionObserver: void OnSystemPermissionUpdated( device::LocationSystemPermissionStatus new_status) override; + void OnPermissionManagerShuttingDown() override; #endif // BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) static bool IsVirtualKeyboardVisible(views::Widget* widget);
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.cc index 40ed0e1..021a492 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.cc
@@ -17,6 +17,7 @@ #include "base/metrics/histogram_functions.h" #include "build/build_config.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/page_action/page_action_icon_type.h" #include "chrome/browser/ui/color/chrome_color_id.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" #include "chrome/browser/ui/views/omnibox/omnibox_header_view.h" @@ -24,6 +25,7 @@ #include "chrome/browser/ui/views/omnibox/omnibox_row_view.h" #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" #include "chrome/browser/ui/views/omnibox/rounded_omnibox_results_frame.h" +#include "chrome/browser/ui/views/page_action/page_action_icon_controller.h" #include "chrome/browser/ui/views/theme_copying_widget.h" #include "components/omnibox/browser/omnibox_controller.h" #include "components/omnibox/browser/omnibox_edit_model.h" @@ -298,6 +300,13 @@ UpdateAccessibleActiveDescendantForInvokingView(); } +void OmniboxPopupViewViews::RequestAimButtonFocus() { + model()->SetFocusIsGoingToAimButton(true); + location_bar_view_->page_action_icon_controller() + ->GetIconView(PageActionIconType::kAiMode) + ->RequestFocus(); +} + void OmniboxPopupViewViews::UpdatePopupAppearance() { const auto* autocomplete_controller = controller()->autocomplete_controller(); if (autocomplete_controller->result().empty() ||
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h index 203fc7b..902f5a7 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h +++ b/chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h
@@ -64,6 +64,7 @@ void InvalidateLine(size_t line) override; void OnSelectionChanged(OmniboxPopupSelection old_selection, OmniboxPopupSelection new_selection) override; + void RequestAimButtonFocus() override; void UpdatePopupAppearance() override; void ProvideButtonFocusHint(size_t line) override; void OnMatchIconUpdated(size_t match_index) override;
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc index c586051..e88a70a 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -541,6 +541,10 @@ model()->ConsumeCtrlKey(); } +void OmniboxViewViews::RequestViewFocus() { + RequestFocus(); +} + int OmniboxViewViews::GetTextWidth() const { // Returns the width necessary to display the current text, including any // necessary space for the cursor or border/margin. @@ -1457,6 +1461,14 @@ void OmniboxViewViews::OnFocus() { views::Textfield::OnFocus(); + // If focus is returning from the AIM button, there is no need for any of the + // usual bookkeeping, since the omnibox was logically considered to have + // retained focus. + if (model()->FocusIsReturningFromAimButton()) { + model()->SetFocusIsReturningFromAimButton(false); + return; + } + // TODO(tommycli): This does not seem like it should be necessary. // Investigate why it's needed and see if we can remove it. model()->ResetDisplayTexts(); @@ -1488,6 +1500,16 @@ } void OmniboxViewViews::OnBlur() { + views::Textfield::OnBlur(); + + // If focus is going to the AIM button, there is no need for any of the usual + // bookkeeping, since the omnibox will logically be considered to have + // retained focus. + if (model()->FocusIsGoingToAimButton()) { + model()->SetFocusIsGoingToAimButton(false); + return; + } + // Save the user's existing selection to restore it later. saved_selection_for_focus_change_ = GetSelectedRange(); @@ -1513,7 +1535,6 @@ RevertAll(); } - views::Textfield::OnBlur(); model()->OnWillKillFocus(); // If ZeroSuggest is active, and there is evidence that there is a text
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h index 216f878..068baa0 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h +++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -133,6 +133,7 @@ void SelectAll(bool reversed) override; void RevertAll() override; void SetFocus(bool is_user_initiated) override; + void RequestViewFocus() override; bool IsImeComposing() const override; gfx::NativeView GetRelativeWindowForPopup() const override; bool IsImeShowingPopup() const override;
diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_controller.cc b/chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_controller.cc index fa65a8e..6b8dd8a1 100644 --- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_controller.cc +++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_side_panel_controller.cc
@@ -167,10 +167,12 @@ } int ReadAnythingSidePanelController::GetPreferredDefaultWidth() { - // Use the max width allowed. - // BrowserViewLayout::CalculateContentsContainerLayout will clamp the - // value to the max allowed. - return SHRT_MAX; + // Use 50% of the current WebView width + return tab_->GetBrowserWindowInterface() + ->GetWebView() + ->GetContentsBounds() + .width() / + 2; } bool ReadAnythingSidePanelController::IsActivePageDistillable() const {
diff --git a/chrome/browser/ui/webid/identity_dialog_controller.cc b/chrome/browser/ui/webid/identity_dialog_controller.cc index f9d7debe..092f886a 100644 --- a/chrome/browser/ui/webid/identity_dialog_controller.cc +++ b/chrome/browser/ui/webid/identity_dialog_controller.cc
@@ -59,8 +59,10 @@ optimization_guide_decider_ = OptimizationGuideKeyedServiceFactory::GetForProfile(profile); } - optimization_guide_decider_->RegisterOptimizationTypes( - {optimization_guide::proto::OptimizationType::FEDCM_CLICKTHROUGH_RATE}); + if (optimization_guide_decider_) { + optimization_guide_decider_->RegisterOptimizationTypes( + {optimization_guide::proto::OptimizationType::FEDCM_CLICKTHROUGH_RATE}); + } } IdentityDialogController::~IdentityDialogController() = default;
diff --git a/chrome/browser/ui/webid/identity_dialog_controller_unittest.cc b/chrome/browser/ui/webid/identity_dialog_controller_unittest.cc index 864da7f..2f88a25d 100644 --- a/chrome/browser/ui/webid/identity_dialog_controller_unittest.cc +++ b/chrome/browser/ui/webid/identity_dialog_controller_unittest.cc
@@ -610,3 +610,42 @@ std::move(segmentation_platform_service_callback_).Run(); run_loop.Run(); } + +class IdentityDialogControllerTestWithOptimizationDisabled + : public IdentityDialogControllerTest { + public: + IdentityDialogControllerTestWithOptimizationDisabled() { + list.InitWithFeatures( + /*enabled_features=*/{segmentation_platform::features:: + kSegmentationPlatformFedCmUser}, + /*disabled_features=*/{ + optimization_guide::features::kOptimizationHints}); + } + + private: + base::test::ScopedFeatureList list; +}; + +// Tests that there is no crash if kSegmentationPlatformFedCmUser is enabled but +// kOptimizationHints is disabled. See crbug.com/435613236. +TEST_F(IdentityDialogControllerTestWithOptimizationDisabled, NoCrash) { + std::unique_ptr<IdentityDialogController> controller = + std::make_unique<IdentityDialogController>(web_contents()); + + base::MockCallback<base::OnceCallback<void(bool accepted)>> callback; + EXPECT_CALL(callback, Run(true)).WillOnce(testing::Return()); + controller->RequestIdPRegistrationPermision( + url::Origin::Create(GURL("https://idp.example")), callback.Get()); + + auto* manager = + permissions::PermissionRequestManager::FromWebContents(web_contents()); + + auto prompt_factory = + std::make_unique<permissions::MockPermissionPromptFactory>(manager); + + WaitForBubbleToBeShown(manager); + + EXPECT_TRUE(prompt_factory->is_visible()); + + Accept(manager); +}
diff --git a/chrome/browser/ui/webui/cr_components/most_visited/most_visited_handler.cc b/chrome/browser/ui/webui/cr_components/most_visited/most_visited_handler.cc index d0953e1..a5cf65f 100644 --- a/chrome/browser/ui/webui/cr_components/most_visited/most_visited_handler.cc +++ b/chrome/browser/ui/webui/cr_components/most_visited/most_visited_handler.cc
@@ -205,8 +205,7 @@ } void MostVisitedHandler::PrerenderMostVisitedTile( - most_visited::mojom::MostVisitedTilePtr tile, - bool is_hover_trigger) { + most_visited::mojom::MostVisitedTilePtr tile) { if (!base::FeatureList::IsEnabled( features::kNewTabPageTriggerForPrerender2)) { page_handler_.ReportBadMessage( @@ -215,16 +214,7 @@ return; } - if (is_hover_trigger && - !features::kPrerenderNewTabPageOnMouseHoverTrigger.Get()) { - page_handler_.ReportBadMessage( - "PrerenderMostVisitedTile by hovering is only expected to be called " - "when kPrerenderNewTabPageOnMouseHoverTrigger is true."); - return; - } - - if (!is_hover_trigger && - !features::kPrerenderNewTabPageOnMousePressedTrigger.Get()) { + if (!features::kPrerenderNewTabPageOnMousePressedTrigger.Get()) { page_handler_.ReportBadMessage( "PrerenderMostVisitedTile by pressing is only expected to be called " "when kPrerenderNewTabPageOnMousePressedTrigger is true.");
diff --git a/chrome/browser/ui/webui/cr_components/most_visited/most_visited_handler.h b/chrome/browser/ui/webui/cr_components/most_visited/most_visited_handler.h index 3113ebc..e054e43e 100644 --- a/chrome/browser/ui/webui/cr_components/most_visited/most_visited_handler.h +++ b/chrome/browser/ui/webui/cr_components/most_visited/most_visited_handler.h
@@ -63,8 +63,8 @@ const GURL& new_url, const std::string& new_title, UpdateMostVisitedTileCallback callback) override; - void PrerenderMostVisitedTile(most_visited::mojom::MostVisitedTilePtr tile, - bool is_hover_trigger) override; + void PrerenderMostVisitedTile( + most_visited::mojom::MostVisitedTilePtr tile) override; void PreconnectMostVisitedTile( most_visited::mojom::MostVisitedTilePtr tile) override; void CancelPrerender() override;
diff --git a/chrome/browser/ui/webui/new_tab_page/BUILD.gn b/chrome/browser/ui/webui/new_tab_page/BUILD.gn index 800a324..321e480 100644 --- a/chrome/browser/ui/webui/new_tab_page/BUILD.gn +++ b/chrome/browser/ui/webui/new_tab_page/BUILD.gn
@@ -11,12 +11,12 @@ webui_module_path = "/" public_deps = [ - "//chrome/browser/ui/webui/new_tab_page/composebox:mojo_bindings", "//chrome/browser/ui/webui/new_tab_page/ntp_promo:mojo_bindings", "//chrome/browser/ui/webui/ntp_microsoft_auth:shared", "//components/omnibox/browser:mojo_bindings", "//skia/public/mojom", "//ui/webui/resources/cr_components/color_change_listener:mojom", + "//ui/webui/resources/cr_components/composebox:mojo_bindings", "//ui/webui/resources/cr_components/most_visited:mojom", "//url/mojom:url_mojom_gurl", ]
diff --git a/chrome/browser/ui/webui/new_tab_page/composebox/BUILD.gn b/chrome/browser/ui/webui/new_tab_page/composebox/BUILD.gn index 173ae9f..7b5b7d13 100644 --- a/chrome/browser/ui/webui/new_tab_page/composebox/BUILD.gn +++ b/chrome/browser/ui/webui/new_tab_page/composebox/BUILD.gn
@@ -12,7 +12,6 @@ "composebox_handler.h", ] deps = [ - ":mojo_bindings", "//base", "//chrome/app:generated_resources", "//chrome/browser:browser_process", @@ -22,20 +21,12 @@ "//components/application_locale_storage", "//components/omnibox/common", "//components/omnibox/composebox", + "//components/omnibox/composebox:mojo_bindings", "//components/search", "//components/variations/service", "//content/public/browser", "//third_party/omnibox_proto", "//ui/base", - ] -} - -mojom("mojo_bindings") { - sources = [ "composebox.mojom" ] - webui_module_path = "/" - public_deps = [ - "//components/omnibox/browser:mojo_bindings", - "//components/omnibox/composebox:mojo_bindings", - "//mojo/public//mojom/base", + "//ui/webui/resources/cr_components/composebox:mojo_bindings", ] }
diff --git a/chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler.h b/chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler.h index 5577b65..9be14b53 100644 --- a/chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler.h +++ b/chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler.h
@@ -10,7 +10,6 @@ #include "base/memory/raw_ptr.h" #include "base/unguessable_token.h" -#include "chrome/browser/ui/webui/new_tab_page/composebox/composebox.mojom.h" #include "chrome/browser/ui/webui/searchbox/searchbox_handler.h" #include "components/omnibox/browser/searchbox.mojom.h" #include "components/omnibox/composebox/composebox_metrics_recorder.h" @@ -21,6 +20,7 @@ #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" #include "ui/base/window_open_disposition_utils.h" +#include "ui/webui/resources/cr_components/composebox/composebox.mojom.h" #include "url/gurl.h" class MetricsReporter;
diff --git a/chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler_unittest.cc b/chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler_unittest.cc index ecfa58d..458cb20 100644 --- a/chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler_unittest.cc +++ b/chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler_unittest.cc
@@ -20,7 +20,6 @@ #include "base/unguessable_token.h" #include "base/version_info/channel.h" #include "chrome/browser/search_engines/template_url_service_factory.h" -#include "chrome/browser/ui/webui/new_tab_page/composebox/composebox.mojom.h" #include "chrome/browser/ui/webui/new_tab_page/composebox/variations/composebox_fieldtrial.h" #include "chrome/browser/ui/webui/searchbox/searchbox_test_utils.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" @@ -40,6 +39,7 @@ #include "services/network/test/test_url_loader_factory.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/webui/resources/cr_components/composebox/composebox.mojom.h" namespace { constexpr int kImageCompressionQuality = 30; @@ -239,8 +239,7 @@ result_url = net::AppendOrReplaceQueryParameter( result_url, kQuerySubmissionTimeQueryParameter, std::nullopt); result_url = net::AppendOrReplaceQueryParameter( - result_url, kClientUploadDurationQueryParameter, - std::nullopt); + result_url, kClientUploadDurationQueryParameter, std::nullopt); return result_url; }
diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc index 44c7fa05..1c4a8ecb 100644 --- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc +++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
@@ -179,19 +179,12 @@ .spec()); source->AddInteger( - "prerenderStartTimeThreshold", - features::kNewTabPagePrerenderStartDelayOnMouseHoverByMiliSeconds.Get()); - source->AddInteger( "preconnectStartTimeThreshold", features::kNewTabPagePreconnectStartDelayOnMouseHoverByMiliSeconds.Get()); source->AddBoolean( "prerenderOnPressEnabled", base::FeatureList::IsEnabled(features::kNewTabPageTriggerForPrerender2) && features::kPrerenderNewTabPageOnMousePressedTrigger.Get()); - source->AddBoolean( - "prerenderOnHoverEnabled", - base::FeatureList::IsEnabled(features::kNewTabPageTriggerForPrerender2) && - features::kPrerenderNewTabPageOnMouseHoverTrigger.Get()); source->AddBoolean( "oneGoogleBarEnabled",
diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h index b2e30916..bb1453c 100644 --- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h +++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h
@@ -33,7 +33,6 @@ #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_observer.h" #include "chrome/browser/ui/webui/customize_buttons/customize_buttons.mojom.h" -#include "chrome/browser/ui/webui/new_tab_page/composebox/composebox.mojom.h" #include "chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler.h" #include "chrome/browser/ui/webui/new_tab_page/new_tab_page.mojom.h" #include "chrome/common/webui_url_constants.h" @@ -51,6 +50,7 @@ #include "ui/native_theme/native_theme_observer.h" #include "ui/webui/mojo_web_ui_controller.h" #include "ui/webui/resources/cr_components/color_change_listener/color_change_listener.mojom.h" +#include "ui/webui/resources/cr_components/composebox/composebox.mojom.h" #include "ui/webui/resources/cr_components/most_visited/most_visited.mojom.h" namespace base {
diff --git a/chrome/browser/ui/webui/new_tab_page_third_party/new_tab_page_third_party_ui.cc b/chrome/browser/ui/webui/new_tab_page_third_party/new_tab_page_third_party_ui.cc index d24d3f4..e95d30da 100644 --- a/chrome/browser/ui/webui/new_tab_page_third_party/new_tab_page_third_party_ui.cc +++ b/chrome/browser/ui/webui/new_tab_page_third_party/new_tab_page_third_party_ui.cc
@@ -115,19 +115,12 @@ } source->AddInteger( - "prerenderStartTimeThreshold", - features::kNewTabPagePrerenderStartDelayOnMouseHoverByMiliSeconds.Get()); - source->AddInteger( "preconnectStartTimeThreshold", features::kNewTabPagePreconnectStartDelayOnMouseHoverByMiliSeconds.Get()); source->AddBoolean( "prerenderOnPressEnabled", base::FeatureList::IsEnabled(features::kNewTabPageTriggerForPrerender2) && features::kPrerenderNewTabPageOnMousePressedTrigger.Get()); - source->AddBoolean( - "prerenderOnHoverEnabled", - base::FeatureList::IsEnabled(features::kNewTabPageTriggerForPrerender2) && - features::kPrerenderNewTabPageOnMouseHoverTrigger.Get()); // Needed by <cr-most-visited> but not used in // chrome://new-tab-page-third-party/.
diff --git a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc index ff04fb78..6f2260d 100644 --- a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc +++ b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler.cc
@@ -554,8 +554,10 @@ content::LanguageInstallStatus install_status, const std::string& error) { // Language status is profile-dependent so only send the update if the status - // is for this profile. - if (browser_context->UniqueId() != profile_->UniqueId()) { + // is for this profile. Incognito profiles download the language to the main + // profile, so we need to always send the language updates for incognito. + if (!profile_->IsIncognitoProfile() && + browser_context->UniqueId() != profile_->UniqueId()) { return; } auto voicePackInfo = read_anything::mojom::VoicePackInfo::New();
diff --git a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler_browsertest.cc b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler_browsertest.cc index 80a2d65..11586ef6 100644 --- a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler_browsertest.cc +++ b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_page_handler_browsertest.cc
@@ -1047,6 +1047,49 @@ EXPECT_EQ(kLang, info->language); }))); } + +IN_PROC_BROWSER_TEST_F(ReadAnythingUntrustedPageHandlerTest, + OnUpdateLanguageStatus_IncognitoProfile) { + const char kLang[] = "en-au"; + Profile* profile1 = GetProfile(); + Profile* profile2 = + InProcessBrowserTest::CreateIncognitoBrowser()->GetProfile(); + // Assign the incognito contents to be the contents for this handler. + web_contents_.reset(); + web_contents_ = content::WebContents::Create( + content::WebContents::CreateParams(profile2)); + test_web_ui_->set_web_contents(web_contents_.get()); + ReadAnythingSidePanelControllerGlue::CreateForWebContents( + web_contents_.get(), browser() + ->GetActiveTabInterface() + ->GetTabFeatures() + ->read_anything_side_panel_controller()); + content::TtsController::GetInstance()->SetTtsEngineDelegate( + &engine_delegate_); + handler_ = std::make_unique<TestReadAnythingUntrustedPageHandler>( + page_.BindAndGetRemote(), test_web_ui_.get()); + + content::TtsController::GetInstance()->UpdateLanguageStatus( + profile1, kLang, content::LanguageInstallStatus::NOT_INSTALLED, ""); + content::TtsController::GetInstance()->UpdateLanguageStatus( + profile2, kLang, content::LanguageInstallStatus::INSTALLED, ""); + + // Forward both statuses since this handler is for an incognito profile. + EXPECT_CALL(page_, OnGetVoicePackInfo(_)) + .Times(2) + .WillOnce(testing::WithArg<0>( + testing::Invoke([&](read_anything::mojom::VoicePackInfoPtr info) { + EXPECT_EQ(read_anything::mojom::InstallationState::kNotInstalled, + info->pack_state->get_installation_state()); + EXPECT_EQ(kLang, info->language); + }))) + .WillOnce(testing::WithArg<0>( + testing::Invoke([&](read_anything::mojom::VoicePackInfoPtr info) { + EXPECT_EQ(read_anything::mojom::InstallationState::kInstalled, + info->pack_state->get_installation_state()); + EXPECT_EQ(kLang, info->language); + }))); +} #endif // !BUILDFLAG(IS_CHROMEOS) IN_PROC_BROWSER_TEST_F(ReadAnythingUntrustedPageHandlerTest, OnTabWillDetach) {
diff --git a/chrome/browser_exposed_mojom_targets.gni b/chrome/browser_exposed_mojom_targets.gni index 702cf253..a78cea62 100644 --- a/chrome/browser_exposed_mojom_targets.gni +++ b/chrome/browser_exposed_mojom_targets.gni
@@ -42,7 +42,6 @@ "//chrome/browser/ui/webui/new_tab_footer:mojo_bindings", "//chrome/browser/ui/webui/new_tab_page_third_party:mojo_bindings", "//chrome/browser/ui/webui/new_tab_page:mojo_bindings", - "//chrome/browser/ui/webui/new_tab_page/composebox:mojo_bindings", "//chrome/browser/ui/webui/new_tab_page/ntp_promo:mojo_bindings", "//chrome/browser/ui/webui/new_tab_page/foo:mojo_bindings", "//chrome/browser/ui/webui/omnibox:mojo_bindings", @@ -334,6 +333,7 @@ "//ui/webui/resources/cr_components/history_clusters:mojo_bindings", "//ui/webui/resources/cr_components/history_embeddings:mojo_bindings", "//ui/webui/resources/cr_components/most_visited:mojom", + "//ui/webui/resources/cr_components/composebox:mojo_bindings", "//ui/webui/resources/cr_components/theme_color_picker:mojom", "//ui/webui/resources/js/browser_command:mojo_bindings", "//ui/webui/resources/js/metrics_reporter:mojo_bindings",
diff --git a/chrome/build/android-arm32.pgo.txt b/chrome/build/android-arm32.pgo.txt index 8ad823b..278797a5 100644 --- a/chrome/build/android-arm32.pgo.txt +++ b/chrome/build/android-arm32.pgo.txt
@@ -1 +1 @@ -chrome-android32-main-1754027920-28c3a306ee0ba04acf9a1a24d480a1922fbb3fdb-fa375afc264e1c5277bc811b49f9e9a9e42b510f.profdata +chrome-android32-main-1754071157-2944446f0a9ff4ccbde87fd03d64b33822176e51-aa3484f47ef5e37efdc4be5a656364e8296ccf47.profdata
diff --git a/chrome/build/android-arm64.pgo.txt b/chrome/build/android-arm64.pgo.txt index d88bd844..887955f 100644 --- a/chrome/build/android-arm64.pgo.txt +++ b/chrome/build/android-arm64.pgo.txt
@@ -1 +1 @@ -chrome-android64-main-1754063676-23f3118fc63cc39f5ea48a4e552f38425ec51c77-16c2cccb581a821b8b617c1f67f74eb5c3d794ef.profdata +chrome-android64-main-1754072730-7db2be96652abe234a1801f6da7c8dcdce5937ab-e3ff3aaadb40774b2d6f04392d2c201906e2af03.profdata
diff --git a/chrome/build/android-desktop-x64.pgo.txt b/chrome/build/android-desktop-x64.pgo.txt index 5d3fac3..830ec5fc 100644 --- a/chrome/build/android-desktop-x64.pgo.txt +++ b/chrome/build/android-desktop-x64.pgo.txt
@@ -1 +1 @@ -chrome-android-desktop-x64-main-1754049475-58bb69864c744ad906f54cb07c526c94cbb2e2d1-d12ec3e84f1c806a891ff657c4c7f3abb126f533.profdata +chrome-android-desktop-x64-main-1754071157-e2717453576711e8d796ac3a198e93d7f21bb7ee-aa3484f47ef5e37efdc4be5a656364e8296ccf47.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 4c5c0aa..99b47da 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1754063976-b1ac521f5590e9ad6f7ec58cf1f02c9a92852576-e3ed81b4aeea523d041f3d62d4ae5779ca1c9fd2.profdata +chrome-mac-arm-main-1754078389-e854a6acca5a94bc0cb857da361c778d60fe2acb-a7c69777ccf2dcb4066f222d5b2b5a7372ca0591.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index 8be470c6..8faebdc 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1754027920-edf25ec7d4bc80acee0c1a03935a71e309efa927-fa375afc264e1c5277bc811b49f9e9a9e42b510f.profdata +chrome-mac-main-1754071157-be8c253644c65d446512ebacf8d328cf581a86fe-aa3484f47ef5e37efdc4be5a656364e8296ccf47.profdata
diff --git a/chrome/build/win-arm64.pgo.txt b/chrome/build/win-arm64.pgo.txt index acc1ad5..98d72d7a 100644 --- a/chrome/build/win-arm64.pgo.txt +++ b/chrome/build/win-arm64.pgo.txt
@@ -1 +1 @@ -chrome-win-arm64-main-1754049475-1789f91c1774089db6de7b9dce628de219dc3132-d12ec3e84f1c806a891ff657c4c7f3abb126f533.profdata +chrome-win-arm64-main-1753984643-2d9b0172080dc3c51a908c33cad2e3cf9d619714-739f10b7f26e3db54704550f0cea4efc11e28c37.profdata \ No newline at end of file
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 9fecd13..36c86d64 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1754049475-8902e5ed61d545ff04c327f3c0b9dfc3709cd3e0-d12ec3e84f1c806a891ff657c4c7f3abb126f533.profdata +chrome-win32-main-1754060308-8c83c9390dbedce1c941b1b2eafda92e140dec40-8ba4d55ec5e79c5929594aa7a1de7b8d5e811ee3.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 5af867b..e89b0fb9f 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1754049475-40c492ccea415348c29a3f766718e1b31b587423-d12ec3e84f1c806a891ff657c4c7f3abb126f533.profdata +chrome-win64-main-1754060308-e604b3b9d27ea5ee56a4cc69f51381a06b8e886b-8ba4d55ec5e79c5929594aa7a1de7b8d5e811ee3.profdata
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc index 17dbead..3edbcfdb 100644 --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc
@@ -361,6 +361,7 @@ "glic-actor-ui-overlay-magic-cursor"; const char kGlicActorUiToastName[] = "glic-actor-ui-toast"; const char kGlicActorUiHandoffButtonName[] = "glic-actor-ui-handoff-button"; +const char kGlicActorUiTabIndicatorName[] = "glic-actor-ui-tab-indicator"; // Controls whether the task icon in the actor ui is enabled. const base::FeatureParam<bool> kGlicActorUiTaskIcon{ @@ -377,6 +378,9 @@ // Controls whether the handoff button in the actor ui is enabled. const base::FeatureParam<bool> kGlicActorUiHandoffButton{ &kGlicActorUi, kGlicActorUiHandoffButtonName, false}; +// Controls whether the tab indicator in the actor ui is enabled. +const base::FeatureParam<bool> kGlicActorUiTabIndicator{ + &kGlicActorUi, kGlicActorUiTabIndicatorName, true}; // Controls renderer tool observation timeout when waiting on local // (non-network) work. @@ -717,6 +721,9 @@ const base::FeatureParam<double> kGlicPanelResetOnSessionTimeoutDelayH{ &kGlicPanelResetOnSessionTimeout, "glic-panel-reset-session-timeout-delay-h", 0}; +BASE_FEATURE(kGlicPanelResetSizeAndLocationOnOpen, + "GlicPanelResetSizeAndLocationOnOpen", + base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE(kGlicRecordActorJournal, "GlicRecordActorJournal",
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h index 499490c..c1f68a05 100644 --- a/chrome/common/chrome_features.h +++ b/chrome/common/chrome_features.h
@@ -226,6 +226,8 @@ extern const base::FeatureParam<bool>(kGlicActorUiToast); COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam<bool>(kGlicActorUiHandoffButton); +COMPONENT_EXPORT(CHROME_FEATURES) +extern const base::FeatureParam<bool>(kGlicActorUiTabIndicator); COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam<base::TimeDelta>( @@ -395,6 +397,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kGlicExplicitBackgroundColor); +// Features to experiment with resetting the panel default location. COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kGlicPanelResetTopChromeButton); COMPONENT_EXPORT(CHROME_FEATURES) @@ -407,6 +410,8 @@ BASE_DECLARE_FEATURE(kGlicPanelResetOnSessionTimeout); COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam<double> kGlicPanelResetOnSessionTimeoutDelayH; +COMPONENT_EXPORT(CHROME_FEATURES) +BASE_DECLARE_FEATURE(kGlicPanelResetSizeAndLocationOnOpen); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kGlicRecordActorJournal);
diff --git a/chrome/common/extensions/api/autotest_private.idl b/chrome/common/extensions/api/autotest_private.idl index 117b99ec..dfd57ec2 100644 --- a/chrome/common/extensions/api/autotest_private.idl +++ b/chrome/common/extensions/api/autotest_private.idl
@@ -1098,48 +1098,6 @@ // |callback|: Called when the operation has completed. static void loadSmartDimComponent(VoidCallback callback); - // Enables/disables the Google Assistant. - // |callback|: Called when the operation has completed. - static void setAssistantEnabled( - boolean enabled, - long timeout_ms, - VoidCallback callback); - - // Bring up the Assistant service, and wait for the ready signal. - // |callback|: Called when the operation has completed. - static void enableAssistantAndWaitForReady( - VoidCallback callback); - - // Sends a text query via Google Assistant. - // |callback|: Called when response has been received. - static void sendAssistantTextQuery( - DOMString query, - long timeout_ms, - AssistantQueryStatusCallback callback); - - // Invokes |callback| once the current text/voice interaction is completed. - // Responds with the the query status if any valid response was caught - // before the timeout. This API should be called before sending the query. - // To use it for testing a voice query via OKG in Autotest, for example, - // you can do: - // - // // Enable hotword setting for Assistant. - // assistant_util.enable_hotword(); - // - // // Call this API with your callback function. - // chrome.autotestPrivate.waitForAssistantQueryStatus(timeout_s, - // function(status) {...}); - // - // then start Assistant via OKG and send voice query before timeout. - // - // TODO(meilinw@): disable warmer welcome to avoid an unintended early - // return of this API when launching Assistant via hotkey. - // TODO(meilinw@): update the comment above to use Tast instead after - // adding API to enable hotword in Tast. - static void waitForAssistantQueryStatus( - long timeout_s, - AssistantQueryStatusCallback callback); - // Whether the local list of installed ARC packages has been refreshed for // the first time after user login. static void isArcPackageListInitialRefreshed(
diff --git a/chrome/common/read_anything/read_anything.mojom b/chrome/common/read_anything/read_anything.mojom index c27d1a9..7002250 100644 --- a/chrome/common/read_anything/read_anything.mojom +++ b/chrome/common/read_anything/read_anything.mojom
@@ -107,6 +107,17 @@ [MinVersion=1] kSentence = 4 }; +// LINT.IfChange(DistillationStatus) +// Distillation status after a page has been opened with reading mode. Used for +// metrics logging. +enum DistillationStatus { + kFailure = 0, + kSuccess = 1, + kStillRunning = 2, + kRestarted = 3 +}; +// LINT.ThenChange(/tools/metrics/histograms/metadata/accessibility/enums.xml:ReadAnythingDistillationStatus) + // Browser-side handler for requests from untrusted WebUI page. interface UntrustedPageHandler { // Called by the renderer to load the dependency parser model used for
diff --git a/chrome/renderer/accessibility/read_anything/read_anything_app_controller.cc b/chrome/renderer/accessibility/read_anything/read_anything_app_controller.cc index cd456e6..a433cdc 100644 --- a/chrome/renderer/accessibility/read_anything/read_anything_app_controller.cc +++ b/chrome/renderer/accessibility/read_anything/read_anything_app_controller.cc
@@ -78,6 +78,11 @@ namespace { +// The amount of time after a new page has been opened in reading mode that +// reading mode waits before logging whether the distillation was successful, +// the distillation failed, or the distillation is still processing. +constexpr int kDistillationLoggingDelayMs = 5000; + constexpr char kUndeterminedLocale[] = "und"; // The number of seconds to wait before distilling after a user has stopped @@ -683,6 +688,16 @@ ExecuteJavaScript("chrome.readingMode.showLoading();"); + // After the active tree has changed, start a timer for logging distillation + // success or failures. Logging this via a timer reduces duplicate + // distillation / failures being logged. + distillationsCompleted_ = 0; + timer_.Stop(); + timer_.Start( + FROM_HERE, base::Milliseconds(kDistillationLoggingDelayMs), + base::BindOnce(&ReadAnythingAppController::RecordDistillationSuccess, + base::Unretained(this))); + // When the UI first constructs, this function may be called before tree_id // has been added to the tree list in AccessibilityEventReceived. In that // case, do not distill. @@ -692,6 +707,26 @@ } } +void ReadAnythingAppController::RecordDistillationSuccess() { + read_anything::mojom::DistillationStatus distillationStatus; + if (model_.distillation_in_progress()) { + distillationStatus = + distillationsCompleted_ > 0 + ? read_anything::mojom::DistillationStatus::kRestarted + : read_anything::mojom::DistillationStatus::kStillRunning; + } else if (!model_.content_node_ids().empty()) { + distillationStatus = read_anything::mojom::DistillationStatus::kSuccess; + } else { + distillationStatus = read_anything::mojom::DistillationStatus::kFailure; + } + + ukm::builders::Accessibility_ReadAnything_Distillation( + model_.GetUkmSourceId()) + .SetDistillationStatus(static_cast<int>(distillationStatus)) + .Record(ukm_recorder_.get()); + distillationsCompleted_ = 0; +} + void ReadAnythingAppController::RecordNumSelections() { ukm::builders::Accessibility_ReadAnything_EmptyState(model_.GetUkmSourceId()) .SetTotalNumSelections(model_.GetNumSelections()) @@ -831,6 +866,8 @@ // that call checks if the current selection is inside the currently // displayed nodes. Thus, we have to calculate the display nodes first. model_.ComputeDisplayNodeIdsForDistilledTree(); + + distillationsCompleted_++; } // If there's no distillable content on the active tree, allow child tree
diff --git a/chrome/renderer/accessibility/read_anything/read_anything_app_controller.h b/chrome/renderer/accessibility/read_anything/read_anything_app_controller.h index d30f3307..09c41b4 100644 --- a/chrome/renderer/accessibility/read_anything/read_anything_app_controller.h +++ b/chrome/renderer/accessibility/read_anything/read_anything_app_controller.h
@@ -380,6 +380,8 @@ // when the active tree changes. void RecordNumSelections(); + void RecordDistillationSuccess(); + // Given a boundary position within the current granularity, identifies the // nodes that needs to be highlighted (e.g. until the word boundary), and // returns a list containing nodes and the ranges within those nodes. The @@ -455,6 +457,12 @@ // number of seconds. std::unique_ptr<base::RetainingOneShotTimer> post_user_entry_draw_timer_; + base::OneShotTimer timer_; + + // The number of times distillation completes successfully after a page + // change. Used for logging. + int distillationsCompleted_; + // As a subclass of RenderFrameObserver, all objects of this class are stored // in data structure and should not get deallocated as long as the object is // in that structure. Once an object gets removed from the data structure,
diff --git a/chrome/renderer/controlled_frame/controlled_frame_extensions_renderer_api_provider.cc b/chrome/renderer/controlled_frame/controlled_frame_extensions_renderer_api_provider.cc index 62d9efbc..142eb93 100644 --- a/chrome/renderer/controlled_frame/controlled_frame_extensions_renderer_api_provider.cc +++ b/chrome/renderer/controlled_frame/controlled_frame_extensions_renderer_api_provider.cc
@@ -35,7 +35,7 @@ }; static constexpr RegisterSourceData kSources[] = { - {"controlledFrame", IDR_CONTROLLED_FRAME_JS}, + {"htmlControlledFrameElement", IDR_HTML_CONTROLLED_FRAME_ELEMENT_JS}, {"controlledFrameApiMethods", IDR_CONTROLLED_FRAME_API_METHODS_JS}, {"controlledFrameEvents", IDR_CONTROLLED_FRAME_EVENTS_JS}, {"controlledFrameImpl", IDR_CONTROLLED_FRAME_IMPL_JS}, @@ -72,7 +72,7 @@ // to be enabled in the same instance. This check confirms that is held. CHECK(!context->GetAvailability("chromeWebViewTag").is_available()); - context->module_system()->Require("controlledFrame"); + context->module_system()->Require("htmlControlledFrameElement"); } }
diff --git a/chrome/renderer/resources/PRESUBMIT.py b/chrome/renderer/resources/PRESUBMIT.py new file mode 100644 index 0000000..74a5a908 --- /dev/null +++ b/chrome/renderer/resources/PRESUBMIT.py
@@ -0,0 +1,28 @@ +# Copyright 2025 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +PRESUBMIT_VERSION = '2.0.0' + + +def _ImportWebDevStyle(input_api): + try: + import sys + old_sys_path = sys.path[:] + cwd = input_api.PresubmitLocalPath() + sys.path += [input_api.os_path.join(cwd, '..', '..', '..', 'tools')] + from web_dev_style import presubmit_support + finally: + sys.path = old_sys_path + return presubmit_support + + +def CheckWebDevStyle(input_api, output_api): + presubmit_support = _ImportWebDevStyle(input_api) + return presubmit_support.CheckStyle(input_api, output_api) + + +def CheckPatchFormatted(input_api, output_api): + results = input_api.canned_checks.CheckPatchFormatted(input_api, output_api, + check_js=True) + return results
diff --git a/chrome/renderer/resources/controlled_frame/controlled_frame.js b/chrome/renderer/resources/controlled_frame/html_controlled_frame_element.js similarity index 92% rename from chrome/renderer/resources/controlled_frame/controlled_frame.js rename to chrome/renderer/resources/controlled_frame/html_controlled_frame_element.js index 49b496a..e04bbf4d 100644 --- a/chrome/renderer/resources/controlled_frame/controlled_frame.js +++ b/chrome/renderer/resources/controlled_frame/html_controlled_frame_element.js
@@ -116,7 +116,7 @@ return webViewRules; } -class ControlledFrameElement extends WebViewElement { +class HTMLControlledFrameElement extends WebViewElement { static get observedAttributes() { return WebViewAttributeNames; } @@ -158,27 +158,27 @@ } } -// Forward remaining ControlledFrameElement.foo* method calls to +// Forward remaining HTMLControlledFrameElement.foo* method calls to // ChromeWebViewImpl.foo* or WebViewInternal.foo*. forwardApiMethods( - ControlledFrameElement, ControlledFrameImpl, WebViewInternal, + HTMLControlledFrameElement, ControlledFrameImpl, WebViewInternal, CONTROLLED_FRAME_API_METHODS, CONTROLLED_FRAME_PROMISE_API_METHODS); // Since |back| and |forward| are implemented in terms of |go|, we need to // keep a reference to the real |go| function, since user code may override -// ControlledFrameElement.prototype.go|. -const originalGo = ControlledFrameElement.prototype.go; +// HTMLControlledFrameElement.prototype.go|. +const originalGo = HTMLControlledFrameElement.prototype.go; // Wrap callback methods in promise handlers. Note: This disables the callback // forms. upgradeMethodsToPromises( - ControlledFrameElement, ControlledFrameImpl, WebViewInternal, + HTMLControlledFrameElement, ControlledFrameImpl, WebViewInternal, CONTROLLED_FRAME_PROMISE_API_METHODS); // Delete GuestView methods that should not be part of the Controlled Frame API. (function() { for (const methodName of CONTROLLED_FRAME_DELETED_API_METHODS) { - let clazz = ControlledFrameElement.prototype; + let clazz = HTMLControlledFrameElement.prototype; while ((methodName in clazz) && clazz.constructor.name !== 'HTMLElement') { delete clazz[methodName]; clazz = $Object.getPrototypeOf(clazz); @@ -186,4 +186,6 @@ } })(); -registerElement('ControlledFrame', ControlledFrameElement); +registerElement( + 'ControlledFrame', 'HTMLControlledFrameElement', + HTMLControlledFrameElement);
diff --git a/chrome/renderer/resources/extensions/platform_keys/key.js b/chrome/renderer/resources/extensions/platform_keys/key.js index f2f4bdd..195f106b 100644 --- a/chrome/renderer/resources/extensions/platform_keys/key.js +++ b/chrome/renderer/resources/extensions/platform_keys/key.js
@@ -13,7 +13,7 @@ __proto__: null, public: 'public', private: 'private', - secret: 'secret' + secret: 'secret', }; /**
diff --git a/chrome/renderer/resources/extensions/web_view/chrome_web_view.js b/chrome/renderer/resources/extensions/web_view/chrome_web_view.js index 8e05b7d7..9bfeba6 100644 --- a/chrome/renderer/resources/extensions/web_view/chrome_web_view.js +++ b/chrome/renderer/resources/extensions/web_view/chrome_web_view.js
@@ -179,7 +179,7 @@ utils.lookup(ChromeWebViewSchema.events, 'name', 'onShow'); const eventOptions = { supportsListeners: true, - supportsLazyListeners: false + supportsLazyListeners: false, }; // TODO(crbug.com/429599984): Move this member to the context menus // instance.
diff --git a/chrome/renderer/resources/extensions/web_view/chrome_web_view_element.js b/chrome/renderer/resources/extensions/web_view/chrome_web_view_element.js index 56946d6b..f51a3697 100644 --- a/chrome/renderer/resources/extensions/web_view/chrome_web_view_element.js +++ b/chrome/renderer/resources/extensions/web_view/chrome_web_view_element.js
@@ -37,4 +37,4 @@ // |ChromeWebViewElement.prototype.go|. const originalGo = ChromeWebViewElement.prototype.go; -registerElement('WebView', ChromeWebViewElement); +registerElement('WebView', 'WebView', ChromeWebViewElement);
diff --git a/chrome/renderer/resources/renderer_resources.grd b/chrome/renderer/resources/renderer_resources.grd index 9fa5a267..cb9bd1ed 100644 --- a/chrome/renderer/resources/renderer_resources.grd +++ b/chrome/renderer/resources/renderer_resources.grd
@@ -19,7 +19,7 @@ <!-- Custom bindings for extension APIs. --> <include name="IDR_ACTION_CUSTOM_BINDINGS_JS" file="extensions\action_custom_bindings.js" type="BINDATA" /> <include name="IDR_BROWSER_ACTION_CUSTOM_BINDINGS_JS" file="extensions\browser_action_custom_bindings.js" type="BINDATA" /> - <include name="IDR_CONTROLLED_FRAME_JS" file="controlled_frame\controlled_frame.js" type="BINDATA" /> + <include name="IDR_HTML_CONTROLLED_FRAME_ELEMENT_JS" file="controlled_frame\html_controlled_frame_element.js" type="BINDATA" /> <include name="IDR_CONTROLLED_FRAME_EVENTS_JS" file="controlled_frame\controlled_frame_events.js" type="BINDATA" /> <include name="IDR_CONTROLLED_FRAME_INTERNAL_CUSTOM_BINDINGS_JS" file="controlled_frame\controlled_frame_internal_custom_bindings.js" type="BINDATA" /> <include name="IDR_CONTROLLED_FRAME_IMPL_JS" file="controlled_frame\controlled_frame_impl.js" type="BINDATA" />
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 34f9edf1..d1198f40 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -4798,6 +4798,7 @@ "../browser/ui/extensions/extension_install_blocked_dialog_browsertest.cc", "../browser/ui/extensions/extension_multiple_uninstall_dialog_browsertest.cc", "../browser/ui/extensions/extension_uninstall_dialog_impl_browsertest.cc", + "../browser/ui/extensions/reload_page_dialog_controller_browsertest.cc", ] if (is_chromeos) { @@ -4990,7 +4991,6 @@ "../browser/ui/views/desktop_capture/desktop_media_picker_views_browsertest.cc", "../browser/ui/views/extensions/device_chooser_extension_browsertest.cc", "../browser/ui/views/extensions/dialogs/mv2_deprecation_reenable_dialog_browsertest.cc", - "../browser/ui/views/extensions/dialogs/reload_page_dialog_browsertest.cc", "../browser/ui/views/extensions/dialogs/settings_overridden_dialog_browsertest.cc", "../browser/ui/views/extensions/dialogs/upload_extension_to_account_dialog_browsertest.cc", "../browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc",
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/hub/NewTabGroupDialogFacility.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/hub/NewTabGroupDialogFacility.java index a8f19a4..cde5e37 100644 --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/hub/NewTabGroupDialogFacility.java +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/hub/NewTabGroupDialogFacility.java
@@ -24,6 +24,7 @@ import org.hamcrest.Matcher; +import org.chromium.base.ThreadUtils; import org.chromium.base.Token; import org.chromium.base.test.transit.Element; import org.chromium.base.test.transit.Facility; @@ -144,7 +145,9 @@ tabGroupIdElement, delayedElements -> { TabGroupModelFilter filter = mHostStation.tabGroupModelFilterElement.get(); - List<Tab> tabsInGroup = filter.getTabsInGroup(tabGroupIdElement.get()); + List<Tab> tabsInGroup = + ThreadUtils.runOnUiThreadBlocking( + () -> filter.getTabsInGroup(tabGroupIdElement.get())); mTabIdsToGroup = TabModelUtils.getTabIds(tabsInGroup); mTitle = TabGroupUtil.getNumberOfTabsString(mTabIdsToGroup.size()); titleInputElement = delayedElements.declareView(createTitleViewSpec());
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabThumbnailCondition.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabThumbnailCondition.java index dd1a6f2e..42993a0 100644 --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabThumbnailCondition.java +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabThumbnailCondition.java
@@ -4,6 +4,7 @@ package org.chromium.chrome.test.transit.tabmodel; +import org.chromium.base.ThreadUtils; import org.chromium.base.test.transit.ConditionStatus; import org.chromium.base.test.transit.UiThreadCondition; import org.chromium.chrome.browser.tab.Tab; @@ -41,9 +42,12 @@ @Override public String buildDescription() { + int tabIndex = + ThreadUtils.runOnUiThreadBlocking( + () -> mTabModelSelector.getModel(mTab.isOffTheRecord()).indexOf(mTab)); return (mTab.isOffTheRecord() ? "Incognito" : "Regular") + " tab " - + mTabModelSelector.getModel(mTab.isOffTheRecord()).indexOf(mTab) + + tabIndex + (mEtc1 ? " etc1" : " jpeg") + " thumbnail cached to disk"; }
diff --git a/chrome/test/data/controlled_frame/add_content_scripts.window.js b/chrome/test/data/controlled_frame/add_content_scripts.window.js index 616cca4e..fca67f1 100644 --- a/chrome/test/data/controlled_frame/add_content_scripts.window.js +++ b/chrome/test/data/controlled_frame/add_content_scripts.window.js
@@ -19,9 +19,9 @@ controlledFrame.addEventListener('loadabort', onAbort); controlledFrame.addEventListener('loadcommit', onCommit); - // ControlledFrameElement.reload() doesn't actually trigger the loadcommit - // or loadabort events. Appending a new query parameter to the URL will - // force a new navigation. + // HTMLControlledFrameElement.reload() doesn't actually trigger the + // loadcommit or loadabort events. Appending a new query parameter to the + // URL will force a new navigation. controlledFrame.src += '&reload'; }); }
diff --git a/chrome/test/data/controlled_frame/resources/mangle.js b/chrome/test/data/controlled_frame/resources/mangle.js index cd17a16..efb0f22e 100644 --- a/chrome/test/data/controlled_frame/resources/mangle.js +++ b/chrome/test/data/controlled_frame/resources/mangle.js
@@ -21,7 +21,7 @@ (function taintProperties() { var properties = [ 'AppView', - 'ControlledFrame', + 'HTMLControlledFrameElement', 'WebView', '__proto__', 'actionQueue',
diff --git a/chrome/test/data/extensions/api_test/autotest_private/test.js b/chrome/test/data/extensions/api_test/autotest_private/test.js index 4f6493e..aa80f37 100644 --- a/chrome/test/data/extensions/api_test/autotest_private/test.js +++ b/chrome/test/data/extensions/api_test/autotest_private/test.js
@@ -324,46 +324,6 @@ chrome.test.succeed(); }); }, - // The state dumped in Assistant API error message is AssistantAllowedState - // defined in ash/public/cpp/assistant/assistant_state_base.h - // 3 is DISALLOWED_BY_NONPRIMARY_USER from IsAssistantAllowedForProfile when - // running under test without setting up a primary account. - function setAssistantEnabled() { - chrome.autotestPrivate.setAssistantEnabled(true, 1000 /* timeout_ms */, - chrome.test.callbackFail( - 'Assistant not allowed - state: 3')); - }, - function sendAssistantTextQuery() { - chrome.autotestPrivate.sendAssistantTextQuery( - 'what time is it?' /* query */, - 1000 /* timeout_ms */, - chrome.test.callbackFail( - 'Assistant not allowed - state: 3')); - }, - function waitForAssistantQueryStatus() { - chrome.autotestPrivate.waitForAssistantQueryStatus(10 /* timeout_s */, - chrome.test.callbackFail( - 'Assistant not allowed - state: 3')); - }, - // This test verifies the error message when trying to set Assistant-related - // preferences without enabling Assistant service first. - function setAllowedPref() { - chrome.autotestPrivate.setAllowedPref( - 'settings.voice_interaction.hotword.enabled' /* pref_name */, - true /* value */, - chrome.test.callbackFail( - 'Unable to set the pref because Assistant has not been enabled.')); - chrome.autotestPrivate.setAllowedPref( - 'settings.voice_interaction.context.enabled' /* pref_name */, - true /* value */, - chrome.test.callbackFail( - 'Unable to set the pref because Assistant has not been enabled.')); - // Note that onboarding pref is a counter that can be set without - // enabling Assistant at the same time. - chrome.autotestPrivate.setAllowedPref( - 'ash.assistant.num_sessions_where_onboarding_shown' /* pref_name */, - 3 /* value */, chrome.test.callbackPass()); - }, // This test verifies that getArcState returns provisioned False in case ARC // is not provisioned by default. function arcNotProvisioned() {
diff --git a/chrome/test/data/webui/cr_components/cr_components_browsertest.cc b/chrome/test/data/webui/cr_components/cr_components_browsertest.cc index 6ff223e84..589f0be 100644 --- a/chrome/test/data/webui/cr_components/cr_components_browsertest.cc +++ b/chrome/test/data/webui/cr_components/cr_components_browsertest.cc
@@ -201,10 +201,8 @@ protected: CrComponentsPrerenderTest() { const std::map<std::string, std::string> params = { - {"prerender_start_delay_on_mouse_hover_ms", "0"}, {"preconnect_start_delay_on_mouse_hover_ms", "0"}, - {"prerender_new_tab_page_on_mouse_pressed_trigger", "true"}, - {"prerender_new_tab_page_on_mouse_hover_trigger", "true"}}; + {"prerender_new_tab_page_on_mouse_pressed_trigger", "true"}}; scoped_feature_list_.InitAndEnableFeatureWithParameters( features::kNewTabPageTriggerForPrerender2, params); }
diff --git a/chrome/test/data/webui/cr_components/most_visited_test.ts b/chrome/test/data/webui/cr_components/most_visited_test.ts index dfa27ba..6268d21 100644 --- a/chrome/test/data/webui/cr_components/most_visited_test.ts +++ b/chrome/test/data/webui/cr_components/most_visited_test.ts
@@ -1277,9 +1277,8 @@ await microtasksFinished(); - // Make sure both preconnect and prerender have been triggered. + // Make sure preconnect has been triggered. await handler.whenCalled('preconnectMostVisitedTile'); - await handler.whenCalled('prerenderMostVisitedTile'); }); test('onMouseDown Trigger', async () => { @@ -1298,38 +1297,4 @@ // Make sure Prerendering has been triggered. await handler.whenCalled('prerenderMostVisitedTile'); }); - - test('prerender cancelation and retrigger', async () => { - // Arrange. - await addTiles(1); - - // Act. - const tileLink = queryTiles()[0]!.querySelector('a')!; - // Prevent triggering a navigation, which would break the test. - tileLink.href = '#'; - // simulate a mousedown event. - const mouseEnterEvent = document.createEvent('MouseEvents'); - mouseEnterEvent.initEvent('mouseenter', true, true); - tileLink.dispatchEvent(mouseEnterEvent); - - // Make sure Prerendering has been triggered - await handler.whenCalled('prerenderMostVisitedTile'); - - const mouseExitEvent = document.createEvent('MouseEvents'); - mouseExitEvent.initEvent('mouseleave', true, true); - tileLink.dispatchEvent(mouseExitEvent); - - // Make sure Prerendering has been canceled. - await handler.whenCalled('cancelPrerender'); - - tileLink.dispatchEvent(mouseEnterEvent); - - // Make sure Prerendering can be re-triggered - await handler.whenCalled('prerenderMostVisitedTile'); - - tileLink.dispatchEvent(mouseExitEvent); - - // Make sure Prerendering has been canceled. - await handler.whenCalled('cancelPrerender'); - }); });
diff --git a/chrome/test/data/webui/glic/api_test.ts b/chrome/test/data/webui/glic/api_test.ts index 8d0f1a4..fae5f42f 100644 --- a/chrome/test/data/webui/glic/api_test.ts +++ b/chrome/test/data/webui/glic/api_test.ts
@@ -650,7 +650,7 @@ const frameMetadata = result.annotatedPageData.metadata.frameMetadata[0]; assertTrue(!!frameMetadata); const url: URL = new URL(frameMetadata.url); - assertEquals(url.pathname, '/glic/test.html'); + assertEquals(url.pathname, '/'); assertEquals(frameMetadata.metaTags.length, 1); const metaTag = frameMetadata.metaTags[0]; assertTrue(!!metaTag); @@ -1345,6 +1345,8 @@ switch (capability) { case HostCapability.SCROLL_TO_PDF: return 'SCROLL_TO_PDF'; + case HostCapability.RESET_SIZE_AND_LOCATION_ON_OPEN: + return 'RESET_SIZE_AND_LOCATION_ON_OPEN'; default: return 'NEW_ENUM_NOT_IMPLEMENTED'; }
diff --git a/chrome/test/data/webui/new_tab_page/BUILD.gn b/chrome/test/data/webui/new_tab_page/BUILD.gn index bedc78e7..aab8c58 100644 --- a/chrome/test/data/webui/new_tab_page/BUILD.gn +++ b/chrome/test/data/webui/new_tab_page/BUILD.gn
@@ -40,6 +40,7 @@ ts_deps = [ "//chrome/browser/resources/new_tab_page:build_ts", + "//ui/webui/resources/cr_components/composebox:build_ts", "//ui/webui/resources/cr_components/help_bubble:build_ts", "//ui/webui/resources/cr_components/history_clusters:build_ts", "//ui/webui/resources/cr_components/most_visited:build_ts",
diff --git a/chrome/test/data/webui/new_tab_page/app_test.ts b/chrome/test/data/webui/new_tab_page/app_test.ts index 096cba0..7dc6dc3a 100644 --- a/chrome/test/data/webui/new_tab_page/app_test.ts +++ b/chrome/test/data/webui/new_tab_page/app_test.ts
@@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {PageCallbackRouter as ComposeboxPageCallbackRouter, PageHandlerRemote as ComposeboxPageHandlerRemote} from 'chrome://new-tab-page/composebox.mojom-webui.js'; import type {CustomizeButtonsDocumentRemote} from 'chrome://new-tab-page/customize_buttons.mojom-webui.js'; import {CustomizeButtonsDocumentCallbackRouter, CustomizeButtonsHandlerRemote, CustomizeChromeSection, SidePanelOpenTrigger} from 'chrome://new-tab-page/customize_buttons.mojom-webui.js'; import type {Module} from 'chrome://new-tab-page/lazy_load.js'; @@ -11,6 +10,7 @@ import type {AppElement, CustomizeButtonsElement} from 'chrome://new-tab-page/new_tab_page.js'; import type {PageRemote} from 'chrome://new-tab-page/new_tab_page.mojom-webui.js'; import {NtpBackgroundImageSource, PageCallbackRouter, PageHandlerRemote} from 'chrome://new-tab-page/new_tab_page.mojom-webui.js'; +import {PageCallbackRouter as ComposeboxPageCallbackRouter, PageHandlerRemote as ComposeboxPageHandlerRemote} from 'chrome://resources/cr_components/composebox/composebox.mojom-webui.js'; import type {CrButtonElement} from 'chrome://resources/cr_elements/cr_button/cr_button.js'; import type {CrToastElement} from 'chrome://resources/cr_elements/cr_toast/cr_toast.js'; import {Command, CommandHandlerRemote} from 'chrome://resources/js/browser_command.mojom-webui.js'; @@ -1168,6 +1168,34 @@ assertStyle($$(app, '#searchbox')!, 'visibility', 'hidden'); }); test( + 'Clicking the searchbox composebox button notifies composebox handler', + async () => { + composeboxHandler.reset(); + assertEquals( + composeboxHandler.getCallCount('notifySessionStarted'), 0); + assertEquals( + 0, + metrics.count('NewTabPage.Composebox.FromNTPLoadToSessionStart')); + + + const composeButton = getComposeButton(); + assertTrue(!!composeButton); + + // Simulate entry point click. + composeButton.dispatchEvent(new CustomEvent( + 'compose-click', DEFAULT_COMPOSE_CLICK_EVENT_OPTIONS)); + await microtasksFinished(); + + // Assert. + const composebox = app.shadowRoot.querySelector('ntp-composebox'); + assertTrue(!!composebox); + assertEquals( + composeboxHandler.getCallCount('notifySessionStarted'), 1); + assertEquals( + 1, + metrics.count('NewTabPage.Composebox.FromNTPLoadToSessionStart')); + }); + test( 'Clicking the searchbox composebox button displays the composebox', async () => { composeboxHandler.reset();
diff --git a/chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts b/chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts index 0b89692..a5dd72f 100644 --- a/chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts +++ b/chrome/test/data/webui/new_tab_page/composebox/composebox_test.ts
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {PageCallbackRouter, PageHandlerRemote} from 'chrome://new-tab-page/composebox.mojom-webui.js'; -import type {PageRemote} from 'chrome://new-tab-page/composebox.mojom-webui.js'; -import {FileUploadErrorType, FileUploadStatus} from 'chrome://new-tab-page/composebox_query.mojom-webui.js'; import {ComposeboxElement, ComposeboxProxyImpl} from 'chrome://new-tab-page/lazy_load.js'; import {$$} from 'chrome://new-tab-page/new_tab_page.js'; +import {PageCallbackRouter, PageHandlerRemote} from 'chrome://resources/cr_components/composebox/composebox.mojom-webui.js'; +import type {PageRemote} from 'chrome://resources/cr_components/composebox/composebox.mojom-webui.js'; +import {FileUploadErrorType, FileUploadStatus} from 'chrome://resources/cr_components/composebox/composebox_query.mojom-webui.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {PageCallbackRouter as SearchboxPageCallbackRouter, PageHandlerRemote as SearchboxPageHandlerRemote} from 'chrome://resources/mojo/components/omnibox/browser/searchbox.mojom-webui.js'; import {assertDeepEquals, assertEquals, assertFalse, assertTrue} from 'chrome://webui-test/chai_assert.js';
diff --git a/chrome/test/data/webui/new_tab_page/composebox/file_thumbnail_test.ts b/chrome/test/data/webui/new_tab_page/composebox/file_thumbnail_test.ts index 6a55179..ff46c99 100644 --- a/chrome/test/data/webui/new_tab_page/composebox/file_thumbnail_test.ts +++ b/chrome/test/data/webui/new_tab_page/composebox/file_thumbnail_test.ts
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {FileUploadStatus} from 'chrome://new-tab-page/composebox_query.mojom-webui.js'; import {ComposeboxFileThumbnailElement} from 'chrome://new-tab-page/lazy_load.js'; +import {FileUploadStatus} from 'chrome://resources/cr_components/composebox/composebox_query.mojom-webui.js'; import {assertEquals, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {eventToPromise, microtasksFinished} from 'chrome://webui-test/test_util.js';
diff --git a/chrome/test/data/webui/new_tab_page/composebox/test_support.ts b/chrome/test/data/webui/new_tab_page/composebox/test_support.ts index ca8fed7..d4bfe19 100644 --- a/chrome/test/data/webui/new_tab_page/composebox/test_support.ts +++ b/chrome/test/data/webui/new_tab_page/composebox/test_support.ts
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {FileUploadStatus} from 'chrome://new-tab-page/composebox_query.mojom-webui.js'; import type {ComposeboxFile} from 'chrome://new-tab-page/lazy_load.js'; +import {FileUploadStatus} from 'chrome://resources/cr_components/composebox/composebox_query.mojom-webui.js'; export function createComposeboxFile( index: number, override: Partial<ComposeboxFile> = {}): ComposeboxFile {
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM index 67eb24f0..6f53a078 100644 --- a/chromeos/CHROMEOS_LKGM +++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@ -16367.0.0-1070661 \ No newline at end of file +16368.0.0-1070674 \ No newline at end of file
diff --git a/chromeos/ash/components/dbus/BUILD.gn b/chromeos/ash/components/dbus/BUILD.gn index 3cde444..c01f894e5 100644 --- a/chromeos/ash/components/dbus/BUILD.gn +++ b/chromeos/ash/components/dbus/BUILD.gn
@@ -59,6 +59,7 @@ "//chromeos/ash/components/dbus/device_management:unit_tests", "//chromeos/ash/components/dbus/dlcservice:unit_tests", "//chromeos/ash/components/dbus/easy_unlock:unit_tests", + "//chromeos/ash/components/dbus/featured:unit_tests", "//chromeos/ash/components/dbus/fwupd:test_support", "//chromeos/ash/components/dbus/gnubby:unit_tests", "//chromeos/ash/components/dbus/hermes:test_support",
diff --git a/chromeos/ash/components/dbus/featured/BUILD.gn b/chromeos/ash/components/dbus/featured/BUILD.gn new file mode 100644 index 0000000..b4b4e9b --- /dev/null +++ b/chromeos/ash/components/dbus/featured/BUILD.gn
@@ -0,0 +1,47 @@ +# 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. + +import("//third_party/protobuf/proto_library.gni") + +assert(is_chromeos) + +component("featured") { + defines = [ "IS_CHROMEOS_ASH_COMPONENTS_DBUS_FEATURED_IMPL" ] + + deps = [ + ":proto", + "//base", + "//dbus", + ] + + sources = [ + "fake_featured_client.cc", + "fake_featured_client.h", + "featured_client.cc", + "featured_client.h", + ] +} + +source_set("unit_tests") { + testonly = true + + deps = [ + ":featured", + ":proto", + "//base", + "//base/test:test_support", + "//dbus", + "//dbus:test_support", + "//testing/gmock", + "//testing/gtest", + ] + + sources = [ "featured_client_unittest.cc" ] +} + +proto_library("proto") { + sources = [ "//third_party/cros_system_api/dbus/featured/featured.proto" ] + + proto_out_dir = "chromeos/ash/components/dbus/featured" +}
diff --git a/chromeos/ash/components/dbus/featured/fake_featured_client.cc b/chromeos/ash/components/dbus/featured/fake_featured_client.cc new file mode 100644 index 0000000..6fe93cb --- /dev/null +++ b/chromeos/ash/components/dbus/featured/fake_featured_client.cc
@@ -0,0 +1,60 @@ +// 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. + +#include "chromeos/ash/components/dbus/featured/fake_featured_client.h" + +#include "base/check_op.h" +#include "base/containers/queue.h" +#include "base/functional/callback.h" +#include "chromeos/ash/components/dbus/featured/featured.pb.h" +#include "dbus/object_proxy.h" + +namespace ash::featured { + +namespace { + +// Used to track the fake instance, mirrors the instance in the base class. +FakeFeaturedClient* g_instance = nullptr; + +} // namespace + +FakeFeaturedClient::FakeFeaturedClient() { + DCHECK(!g_instance); + g_instance = this; +} + +FakeFeaturedClient::~FakeFeaturedClient() { + DCHECK_EQ(this, g_instance); + g_instance = nullptr; +} + +// static +FakeFeaturedClient* FakeFeaturedClient::Get() { + return g_instance; +} + +void FakeFeaturedClient::HandleSeedFetched( + const ::featured::SeedDetails& safe_seed, + base::OnceCallback<void(bool success)> callback) { + handle_seed_fetched_attempts_++; + + if (responses_.empty()) { + std::move(callback).Run(false); + return; + } + + bool success = responses_.front(); + if (success) { + // We only want to save the safe seed if the response (success) is valid. + latest_safe_seed_ = safe_seed; + } + responses_.pop(); + std::move(callback).Run(success); +} + +void FakeFeaturedClient::AddResponse(bool success) { + responses_.push(success); +} + +} // namespace ash::featured
diff --git a/chromeos/ash/components/dbus/featured/fake_featured_client.h b/chromeos/ash/components/dbus/featured/fake_featured_client.h new file mode 100644 index 0000000..40db5ef --- /dev/null +++ b/chromeos/ash/components/dbus/featured/fake_featured_client.h
@@ -0,0 +1,61 @@ +// 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. + +#ifndef CHROMEOS_ASH_COMPONENTS_DBUS_FEATURED_FAKE_FEATURED_CLIENT_H_ +#define CHROMEOS_ASH_COMPONENTS_DBUS_FEATURED_FAKE_FEATURED_CLIENT_H_ + +#include "base/component_export.h" +#include "base/containers/queue.h" +#include "base/functional/callback.h" +#include "base/logging.h" +#include "chromeos/ash/components/dbus/featured/featured.pb.h" +#include "chromeos/ash/components/dbus/featured/featured_client.h" + +namespace ash::featured { + +// Fake implementation of FeaturedClient. +class COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_DBUS_FEATURED) FakeFeaturedClient + : public FeaturedClient { + public: + FakeFeaturedClient(); + + FakeFeaturedClient(const FakeFeaturedClient&) = delete; + FakeFeaturedClient& operator=(const FakeFeaturedClient&) = delete; + + ~FakeFeaturedClient() override; + + // Returns the global FakeFeaturedClient instance. Returns `nullptr` if + // it is not initialized. + static FakeFeaturedClient* Get(); + + // |callback| is run with the first response in `responses_`. Call + // `AddResponse` to add a response. |callback| is invoked with false if not + // enough responses are provided. + void HandleSeedFetched( + const ::featured::SeedDetails& safe_seed, + base::OnceCallback<void(bool success)> callback) override; + + // Adds a response to call `HandleSeedFetched` with. + void AddResponse(bool success); + + // Returns the number of times `HandleSeedFetched` was called. Used for + // testing. + int handle_seed_fetched_attempts() const { + return handle_seed_fetched_attempts_; + } + + // Returns the safe seed received from HandleSeedFetched. Used for testing. + const ::featured::SeedDetails& latest_safe_seed() const { + return latest_safe_seed_; + } + + private: + base::queue<bool> responses_; + size_t handle_seed_fetched_attempts_ = 0; + ::featured::SeedDetails latest_safe_seed_; +}; + +} // namespace ash::featured + +#endif // CHROMEOS_ASH_COMPONENTS_DBUS_FEATURED_FAKE_FEATURED_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/featured/featured_client.cc b/chromeos/ash/components/dbus/featured/featured_client.cc new file mode 100644 index 0000000..ea1c966e --- /dev/null +++ b/chromeos/ash/components/dbus/featured/featured_client.cc
@@ -0,0 +1,291 @@ +// 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. + +#include "chromeos/ash/components/dbus/featured/featured_client.h" + +#include <memory> +#include <string> +#include <string_view> + +#include "base/check_is_test.h" +#include "base/files/dir_reader_posix.h" +#include "base/files/file_path.h" +#include "base/files/file_path_watcher.h" +#include "base/files/file_util.h" +#include "base/functional/callback.h" +#include "base/logging.h" +#include "base/memory/raw_ptr.h" +#include "base/metrics/field_trial.h" +#include "base/strings/escape.h" +#include "base/strings/string_split.h" +#include "base/task/thread_pool.h" +#include "chromeos/ash/components/dbus/featured/fake_featured_client.h" +#include "chromeos/ash/components/dbus/featured/featured.pb.h" +#include "dbus/bus.h" +#include "dbus/message.h" +#include "dbus/object_proxy.h" +#include "third_party/cros_system_api/constants/featured.h" +#include "third_party/cros_system_api/dbus/service_constants.h" + +namespace ash::featured { + +namespace { + +FeaturedClient* g_instance = nullptr; + +struct FileWatchOptions { + FeaturedClient::ListenForTrialCallback listen_callback; + const base::FilePath expected_dir; +}; + +void RecordEarlyBootTrialInUMA(const std::string& trial_name, + const std::string& group_name) { + base::FieldTrial* trial = + base::FieldTrialList::CreateFieldTrial(trial_name, group_name); + // This records the trial in UMA. + trial->Activate(); +} + +// Assumes |filename| is valid (that its directory name is correct). +bool RecordEarlyBootTrialInChrome( + FeaturedClient::ListenForTrialCallback listen_callback, + const base::FilePath& filename) { + base::FieldTrial::ActiveGroup active_group; + if (!FeaturedClient::ParseTrialFilename(filename, active_group)) { + return false; + } + listen_callback.Run(active_group.trial_name, active_group.group_name); + return true; +} + +void RecordEarlyBootTrialAfterChromeStartup( + const FileWatchOptions& opts, + const base::FilePathWatcher::ChangeInfo& change_info, + const base::FilePath& path, + bool error) { + if (error || path.DirName() != opts.expected_dir) { + // TODO(b/296394808): Add UMA metric if we enter this code path since it + // is not expected. + return; + } + + if (change_info.file_path_type != + base::FilePathWatcher::FilePathType::kFile || + change_info.change_type != base::FilePathWatcher::ChangeType::kCreated) { + // Only record field trial files that were just created. We do not want to + // record a field trial on any of the other change options like + // base::FilePathWatcher::ChangeType::kModified or + // base::FilePathWatcher::ChangeType::kDeleted. + return; + } + + // TODO(b/296394808): Add UMA metric if unable to record trial due to parse + // error. + RecordEarlyBootTrialInChrome(opts.listen_callback, path); +} + +void ListenForActiveEarlyBootTrials(base::FilePathWatcher* watcher, + const FileWatchOptions& opts) { + base::FilePathWatcher::WatchOptions options = { + // Watches for changes in a directory. + .type = base::FilePathWatcher::Type::kRecursive, + // Reports the path of modified files in the directory. + .report_modified_path = true}; + + watcher->WatchWithChangeInfo( + opts.expected_dir, options, + base::BindRepeating(&RecordEarlyBootTrialAfterChromeStartup, opts)); +} + +void ReadTrialsActivatedBeforeChromeStartup(const FileWatchOptions& opts) { + base::DirReaderPosix reader(opts.expected_dir.value().c_str()); + if (!reader.IsValid()) { + // TODO(b/296394808): Add UMA metric if we are unable to enumerate trials + // activated before Chrome startup. + return; + } + + while (reader.Next()) { + if (std::string(reader.name()) == "." || + std::string(reader.name()) == "..") { + continue; + } + // TODO(b/296394808): Add UMA metric if unable to record trial due to + // parse error. + RecordEarlyBootTrialInChrome(opts.listen_callback, + base::FilePath(reader.name())); + } +} + +// We need to delete the FilePathWatcher instance via a posted task since we +// call FilePathWatche::Watch() on a posted task. The documentation states the +// instance must be destroyed on the same sequence it watches from. +void DeleteWatcher(std::unique_ptr<base::FilePathWatcher> watcher) { + watcher.reset(); +} + +// Production implementation of FeaturedClient. +class FeaturedClientImpl : public FeaturedClient { + public: + FeaturedClientImpl() : watcher_(std::make_unique<base::FilePathWatcher>()) {} + + FeaturedClientImpl(const FeaturedClient&) = delete; + FeaturedClientImpl operator=(const FeaturedClient&) = delete; + + ~FeaturedClientImpl() override { + file_listener_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&DeleteWatcher, std::move(watcher_))); + } + + void Init(dbus::Bus* const bus) { + InitWithCallback(bus, base::FilePath(feature::kActiveTrialFileDirectory), + base::BindRepeating(&RecordEarlyBootTrialInUMA)); + } + + void InitForTesting(dbus::Bus* const bus, // IN-TEST + const base::FilePath& expected_dir, + ListenForTrialCallback callback) { + CHECK_IS_TEST(); + InitWithCallback(bus, expected_dir, callback); + } + + void HandleSeedFetchedResponse( + base::OnceCallback<void(bool success)> callback, + dbus::Response* response) { + if (!response || + response->GetMessageType() != dbus::Message::MESSAGE_METHOD_RETURN) { + LOG(WARNING) << "Received invalid response for HandleSeedFetched"; + std::move(callback).Run(false); + return; + } + std::move(callback).Run(true); + } + + void HandleSeedFetched( + const ::featured::SeedDetails& safe_seed, + base::OnceCallback<void(bool success)> callback) override { + dbus::MethodCall method_call(::featured::kFeaturedInterface, + "HandleSeedFetched"); + + dbus::MessageWriter writer(&method_call); + writer.AppendProtoAsArrayOfBytes(safe_seed); + + featured_service_proxy_->CallMethod( + &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, + base::BindOnce(&FeaturedClientImpl::HandleSeedFetchedResponse, + weak_ptr_factory_.GetWeakPtr(), std::move(callback))); + } + + private: + void InitWithCallback(dbus::Bus* const bus, + const base::FilePath& expected_dir, + ListenForTrialCallback callback) { + featured_service_proxy_ = + bus->GetObjectProxy(::featured::kFeaturedServiceName, + dbus::ObjectPath(::featured::kFeaturedServicePath)); + expected_dir_ = expected_dir; + listen_callback_ = callback; + FileWatchOptions opts = {.listen_callback = callback, + .expected_dir = expected_dir}; + file_listener_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&ListenForActiveEarlyBootTrials, watcher_.get(), opts)); + file_listener_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&ReadTrialsActivatedBeforeChromeStartup, opts)); + } + + // Callback used when early-boot trial files are written to `expected_dir_`. + FeaturedClient::ListenForTrialCallback listen_callback_; + + // Directory where active trial files on platform are written to. + base::FilePath expected_dir_; + + // Watches for early-boot trial files written to `expected_dir_`. + std::unique_ptr<base::FilePathWatcher> watcher_; + + raw_ptr<dbus::ObjectProxy> featured_service_proxy_ = nullptr; + + // Sequence runner that an post tasks that may block. + scoped_refptr<base::SequencedTaskRunner> file_listener_task_runner_ = + base::ThreadPool::CreateSequencedTaskRunner( + {base::MayBlock(), base::TaskPriority::BEST_EFFORT}); + + // Note: This should remain the last member so it'll be destroyed and + // invalidate its weak pointers before any other members are destroyed. + base::WeakPtrFactory<FeaturedClientImpl> weak_ptr_factory_{this}; +}; + +} // namespace + +FeaturedClient::FeaturedClient() { + DCHECK(!g_instance); + g_instance = this; +} + +FeaturedClient::~FeaturedClient() { + DCHECK_EQ(this, g_instance); + g_instance = nullptr; +} + +// static +void FeaturedClient::Initialize(dbus::Bus* bus) { + DCHECK(bus); + (new FeaturedClientImpl())->Init(bus); +} + +// static +void FeaturedClient::InitializeFake() { + new FakeFeaturedClient(); +} + +// static +void FeaturedClient::InitializeForTesting(dbus::Bus* bus, + const base::FilePath& expected_dir, + ListenForTrialCallback callback) { + DCHECK(bus); + (new FeaturedClientImpl()) + ->InitForTesting(bus, expected_dir, callback); // IN-TEST +} + +// static +void FeaturedClient::Shutdown() { + DCHECK(g_instance); + delete g_instance; +} + +// static +FeaturedClient* FeaturedClient::Get() { + return g_instance; +} + +// static +bool FeaturedClient::ParseTrialFilename( + const base::FilePath& path, + base::FieldTrial::ActiveGroup& active_group) { + std::string filename = path.BaseName().value(); + std::vector<std::string_view> components = + base::SplitStringPiece(filename, feature::kTrialGroupSeparator, + base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL); + if (components.size() != 2) { + LOG(ERROR) << "Active trial filename not of the form TrialName,GroupName: " + << filename; + return false; + } + + std::string trial_name = base::UnescapeURLComponent( + components[0], + base::UnescapeRule::SPACES | base::UnescapeRule::PATH_SEPARATORS | + base::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS); + std::string group_name = base::UnescapeURLComponent( + components[1], + base::UnescapeRule::SPACES | base::UnescapeRule::PATH_SEPARATORS | + base::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS); + active_group.trial_name = trial_name; + active_group.group_name = group_name; + + return true; +} + +} // namespace ash::featured
diff --git a/chromeos/ash/components/dbus/featured/featured_client.h b/chromeos/ash/components/dbus/featured/featured_client.h new file mode 100644 index 0000000..033aa160 --- /dev/null +++ b/chromeos/ash/components/dbus/featured/featured_client.h
@@ -0,0 +1,82 @@ +// 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. + +#ifndef CHROMEOS_ASH_COMPONENTS_DBUS_FEATURED_FEATURED_CLIENT_H_ +#define CHROMEOS_ASH_COMPONENTS_DBUS_FEATURED_FEATURED_CLIENT_H_ + +#include "base/component_export.h" +#include "base/files/file_path.h" +#include "base/functional/callback.h" +#include "base/gtest_prod_util.h" +#include "base/metrics/field_trial.h" +#include "chromeos/ash/components/dbus/featured/featured.pb.h" + +namespace dbus { +class Bus; +} + +namespace ash::featured { + +// FeaturedClient is used to: +// * communicate seed state with featured, which is used for enabling and +// managing platform specific features. +// * record early-boot trials to UMA by listening for early-boot trial files +// written by featured. +// +// Its main user is Chrome field trials. +class COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_DBUS_FEATURED) FeaturedClient { + public: + // Callback type for ListenForActiveEarlyBootTrials(), which takes in the + // trial name and group name of a field trial. + using ListenForTrialCallback = + base::RepeatingCallback<void(const std::string& trial_name, + const std::string& group_name)>; + + // Creates and initializes the global instance. |bus| must not be null. + static void Initialize(dbus::Bus* bus); + + // Creates and initializes the global instance for testing. |bus| must not be + // null. + static void InitializeForTesting(dbus::Bus* bus, + const base::FilePath& expected_dir, + ListenForTrialCallback callback); + + // Creates and initializes a fake global instance. + static void InitializeFake(); + + // Destroys the global instance. + static void Shutdown(); + + // Returns the global instance which may be null if not initialized. + static FeaturedClient* Get(); + + FeaturedClient(const FeaturedClient&) = delete; + FeaturedClient& operator=(const FeaturedClient&) = delete; + + // Asynchronously calls featured's `HandleSeedFetched`. + virtual void HandleSeedFetched( + const ::featured::SeedDetails& safe_seed, + base::OnceCallback<void(bool success)> callback) = 0; + + // Returns true if the base component of |path| is of the format + // `TrialName,GroupName`. |active_group| will contain the trial name and group + // name specified by the filename. If the return value is false, + // |active_group| will not be modified. + // + // The platform-side logic that writes these files can be found in + // feature::PlatformFeatures::RecordActiveTrial() in chromiumos. + static bool ParseTrialFilename(const base::FilePath& path, + base::FieldTrial::ActiveGroup& active_group); + + protected: + // Initialize/Shutdown should be used instead. + FeaturedClient(); + virtual ~FeaturedClient(); + + private: + friend class FeaturedClientTest; +}; +} // namespace ash::featured + +#endif // CHROMEOS_ASH_COMPONENTS_DBUS_FEATURED_FEATURED_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/featured/featured_client_unittest.cc b/chromeos/ash/components/dbus/featured/featured_client_unittest.cc new file mode 100644 index 0000000..6e8fe57 --- /dev/null +++ b/chromeos/ash/components/dbus/featured/featured_client_unittest.cc
@@ -0,0 +1,429 @@ +// 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. + +#include "chromeos/ash/components/dbus/featured/featured_client.h" + +#include <map> +#include <string> + +#include "base/barrier_closure.h" +#include "base/check_op.h" +#include "base/files/file_util.h" +#include "base/files/scoped_temp_dir.h" +#include "base/run_loop.h" +#include "base/strings/escape.h" +#include "base/test/bind.h" +#include "base/test/task_environment.h" +#include "base/threading/platform_thread.h" +#include "base/time/time.h" +#include "chromeos/ash/components/dbus/featured/fake_featured_client.h" +#include "chromeos/ash/components/dbus/featured/featured.pb.h" +#include "dbus/message.h" +#include "dbus/mock_bus.h" +#include "dbus/mock_object_proxy.h" +#include "dbus/object_path.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/cros_system_api/constants/featured.h" +#include "third_party/cros_system_api/dbus/service_constants.h" + +namespace ash::featured { + +namespace { + +using ::testing::_; +using ::testing::Invoke; +using ::testing::IsEmpty; +using ::testing::Return; + +std::string CreateEscapedFilename(const std::string& trial_name, + const std::string& group_name) { + std::string escaped_trial_name = base::EscapeAllExceptUnreserved(trial_name); + std::string escaped_group_name = base::EscapeAllExceptUnreserved(group_name); + + return base::StrCat( + {escaped_trial_name, feature::kTrialGroupSeparator, escaped_group_name}); +} + +} // namespace + +class FeaturedClientTest : public testing::Test { + public: + FeaturedClientTest() + : bus_(base::MakeRefCounted<dbus::MockBus>(dbus::Bus::Options{})), + path_(dbus::ObjectPath(::featured::kFeaturedServicePath)), + proxy_(base::MakeRefCounted<dbus::MockObjectProxy>( + bus_.get(), + ::featured::kFeaturedServiceName, + path_)) { + // Makes sure `GetObjectProxy()` is called with the correct service name and + // path. + EXPECT_CALL(*bus_.get(), + GetObjectProxy(::featured::kFeaturedServiceName, path_)) + .WillRepeatedly(Return(proxy_.get())); + + EXPECT_TRUE(dir_.CreateUniqueTempDir()); + active_trials_dir_ = dir_.GetPath().Append("active_trials"); + EXPECT_TRUE(base::CreateDirectory(active_trials_dir_)); + } + + FeaturedClientTest(const FeaturedClientTest&) = delete; + FeaturedClientTest& operator=(const FeaturedClientTest&) = delete; + + ~FeaturedClientTest() override = default; + + protected: + // Helper method to test FeaturedClient::ParseTrialFilename. Wrapping this + // logic simplifies the testing logic by allowing us to use a friend class + // instead of several FRIEND_TEST_ALL_PREFIXES. + // + // Callers must initialize FeaturedClient before calling this method. + bool ParseTrialFilename(const base::FilePath& path, + base::FieldTrial::ActiveGroup& active_group) { + return FeaturedClient::ParseTrialFilename(path, active_group); + } + + // Mock bus and proxy for simulating calls. + scoped_refptr<dbus::MockBus> bus_; + dbus::ObjectPath path_; + scoped_refptr<dbus::MockObjectProxy> proxy_; + base::ScopedTempDir dir_; + base::FilePath active_trials_dir_; + base::test::TaskEnvironment task_environment_; +}; + +TEST_F(FeaturedClientTest, InitializeSuccess) { + FeaturedClient::Initialize(bus_.get()); + + ASSERT_NE(FeaturedClient::Get(), nullptr); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +TEST_F(FeaturedClientTest, NotInitializedGet) { + ASSERT_EQ(FeaturedClient::Get(), nullptr); +} + +TEST_F(FeaturedClientTest, InitializeFakeSuccess) { + FeaturedClient::InitializeFake(); + + ASSERT_NE(FakeFeaturedClient::Get(), nullptr); + + FakeFeaturedClient::Shutdown(); + + EXPECT_EQ(FakeFeaturedClient::Get(), nullptr); +} + +TEST_F(FeaturedClientTest, NotInitializedFakeGet) { + ASSERT_EQ(FakeFeaturedClient::Get(), nullptr); +} + +TEST_F(FeaturedClientTest, HandleSeedFetched_Success) { + EXPECT_CALL(*proxy_, + DoCallMethod(_, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, _)) + .WillOnce(Invoke([](dbus::MethodCall* call, int timeout_ms, + dbus::MockObjectProxy::ResponseCallback* callback) { + std::unique_ptr<dbus::Response> response = + dbus::Response::CreateEmpty(); + std::move(*callback).Run(response.get()); + })); + + FeaturedClient::Initialize(bus_.get()); + FeaturedClient* client = FeaturedClient::Get(); + + ASSERT_NE(client, nullptr); + + ::featured::SeedDetails safe_seed; + + bool ran_callback = false; + client->HandleSeedFetched( + safe_seed, base::BindLambdaForTesting([&ran_callback](bool success) { + EXPECT_TRUE(success); + ran_callback = true; + })); + // Ensures the callback was executed. + EXPECT_TRUE(ran_callback); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +// Check that `HandleSeedFetched` runs the callback with a false success value +// if the server (platform) returns an error responses. +TEST_F(FeaturedClientTest, HandleSeedFetched_Failure_ErrorResponse) { + EXPECT_CALL(*proxy_, + DoCallMethod(_, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, _)) + .WillOnce(Invoke([](dbus::MethodCall* call, int timeout_ms, + dbus::MockObjectProxy::ResponseCallback* callback) { + // Not setting the serial causes a crash. + call->SetSerial(123); + std::unique_ptr<dbus::Response> response = + dbus::ErrorResponse::FromMethodCall(call, DBUS_ERROR_FAILED, + "test"); + std::move(*callback).Run(response.get()); + })); + + FeaturedClient::Initialize(bus_.get()); + FeaturedClient* client = FeaturedClient::Get(); + + ASSERT_NE(client, nullptr); + + ::featured::SeedDetails safe_seed; + + bool ran_callback = false; + client->HandleSeedFetched( + safe_seed, base::BindLambdaForTesting([&ran_callback](bool success) { + EXPECT_FALSE(success); + ran_callback = true; + })); + // Ensures the callback was executed. + EXPECT_TRUE(ran_callback); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +// Check that `HandleSeedFetched` runs the callback with a false success value +// if the method call is unsuccessful (response is a nullptr). +TEST_F(FeaturedClientTest, HandleSeedFetched_Failure_NullResponse) { + EXPECT_CALL(*proxy_, + DoCallMethod(_, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, _)) + .WillOnce(Invoke([](dbus::MethodCall* call, int timeout_ms, + dbus::MockObjectProxy::ResponseCallback* callback) { + std::move(*callback).Run(nullptr); + })); + + FeaturedClient::Initialize(bus_.get()); + FeaturedClient* client = FeaturedClient::Get(); + + ASSERT_NE(client, nullptr); + + ::featured::SeedDetails safe_seed; + + bool ran_callback = false; + client->HandleSeedFetched( + safe_seed, base::BindLambdaForTesting([&ran_callback](bool success) { + EXPECT_FALSE(success); + ran_callback = true; + })); + // Ensures the callback was executed. + EXPECT_TRUE(ran_callback); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +// Check that Fake runs `HandleSeedFetched` callback with a false success value +// by default (no expected responses added). +TEST_F(FeaturedClientTest, FakeHandleSeedFetched_InvokeFalseByDefault) { + FeaturedClient::InitializeFake(); + FakeFeaturedClient* client = FakeFeaturedClient::Get(); + + ASSERT_NE(client, nullptr); + + ::featured::SeedDetails safe_seed; + + bool ran_callback = false; + client->HandleSeedFetched( + safe_seed, base::BindLambdaForTesting([&ran_callback](bool success) { + EXPECT_FALSE(success); + ran_callback = true; + })); + // Ensures the callback was executed. + EXPECT_TRUE(ran_callback); + EXPECT_EQ(client->handle_seed_fetched_attempts(), 1); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FakeFeaturedClient::Get(), nullptr); +} + +// Check that Fake runs `HandleSeedFetched` callback with value added by +// `AddResponse`. +TEST_F(FeaturedClientTest, FakeHandleSeedFetched_InvokeSuccessWhenSet) { + FeaturedClient::InitializeFake(); + FakeFeaturedClient* client = FakeFeaturedClient::Get(); + + ASSERT_NE(client, nullptr); + + ::featured::SeedDetails safe_seed; + client->AddResponse(true); + + bool ran_callback = false; + client->HandleSeedFetched( + safe_seed, base::BindLambdaForTesting([&ran_callback](bool success) { + EXPECT_TRUE(success); + ran_callback = true; + })); + // Ensures the callback was executed. + EXPECT_TRUE(ran_callback); + EXPECT_EQ(client->handle_seed_fetched_attempts(), 1); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FakeFeaturedClient::Get(), nullptr); +} + +TEST_F(FeaturedClientTest, ReadTrialsActivatedBeforeChromeStartup_FilesExist) { + // Create active trial files before FeaturedClient is initialized. + EXPECT_TRUE(base::WriteFile( + active_trials_dir_.Append("test_trial_1,test_group_1"), "")); + EXPECT_TRUE(base::WriteFile( + active_trials_dir_.Append("test_trial_2,test_group_2"), "")); + + std::map<std::string, std::string> expected; + expected.insert({"test_trial_1", "test_group_1"}); + expected.insert({"test_trial_2", "test_group_2"}); + + base::RunLoop run_loop; + base::RepeatingClosure barrier_callback = + base::BarrierClosure(2, run_loop.QuitClosure()); + std::map<std::string, std::string> actual; + FeaturedClient::InitializeForTesting( + bus_.get(), active_trials_dir_, + base::BindLambdaForTesting( + [&actual, &barrier_callback](const std::string& trial_name, + const std::string& group_name) { + actual.insert({trial_name, group_name}); + barrier_callback.Run(); + })); + run_loop.Run(); + EXPECT_EQ(actual, expected); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +TEST_F(FeaturedClientTest, + ReadTrialsActivatedBeforeChromeStartup_NoFilesExist) { + std::map<std::string, std::string> actual_trials; + FeaturedClient::InitializeForTesting( + bus_.get(), active_trials_dir_, + base::BindLambdaForTesting( + [&actual_trials](const std::string& trial_name, + const std::string& group_name) { + actual_trials.insert({trial_name, group_name}); + })); + EXPECT_THAT(actual_trials, IsEmpty()); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +TEST_F(FeaturedClientTest, ParseTrialFileName_ImproperFilename_MissingGroup) { + FeaturedClient::InitializeForTesting(bus_.get(), active_trials_dir_, + base::DoNothing()); + FeaturedClient* client = FeaturedClient::Get(); + + ASSERT_NE(client, nullptr); + + base::FieldTrial::ActiveGroup active_group; + base::FilePath trial_file = active_trials_dir_.Append("test_trial"); + + EXPECT_TRUE(base::WriteFile(trial_file, "")); + EXPECT_FALSE(ParseTrialFilename(trial_file, active_group)); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +TEST_F(FeaturedClientTest, + ParseTrialFileName_ImproperFilename_MissingSeparator) { + FeaturedClient::InitializeForTesting(bus_.get(), active_trials_dir_, + base::DoNothing()); + FeaturedClient* client = FeaturedClient::Get(); + + ASSERT_NE(client, nullptr); + + base::FieldTrial::ActiveGroup active_group; + base::FilePath trial_file = active_trials_dir_.Append("test_trialtest_group"); + + EXPECT_TRUE(base::WriteFile(trial_file, "")); + EXPECT_FALSE(ParseTrialFilename(trial_file, active_group)); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +struct ParseProperFilenameTestParams { + std::string expected_trial_name; + std::string expected_group_name; +}; + +// Parameterized tests to check that properly formatted filenames with special +// characters (eg. whitespace, /, *, etc) are parsed correctly. +class FeaturedClientTrialFileTest + : public FeaturedClientTest, + public ::testing::WithParamInterface<ParseProperFilenameTestParams> {}; + +TEST_P(FeaturedClientTrialFileTest, ParseProperFilename) { + FeaturedClient::InitializeForTesting(bus_.get(), active_trials_dir_, + base::DoNothing()); + FeaturedClient* client = FeaturedClient::Get(); + ASSERT_NE(client, nullptr); + + const ParseProperFilenameTestParams test_case = GetParam(); + base::FilePath trial_file = active_trials_dir_.Append(CreateEscapedFilename( + test_case.expected_trial_name, test_case.expected_group_name)); + EXPECT_TRUE(base::WriteFile(trial_file, "")); + + base::FieldTrial::ActiveGroup active_group; + EXPECT_TRUE(ParseTrialFilename(trial_file, active_group)); + EXPECT_EQ(active_group.trial_name, test_case.expected_trial_name); + EXPECT_EQ(active_group.group_name, test_case.expected_group_name); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +INSTANTIATE_TEST_SUITE_P( + FeaturedClientTrialFileTestSuite, + FeaturedClientTrialFileTest, + testing::ValuesIn<ParseProperFilenameTestParams>({ + {"test_trial", "test_group"}, {",", "test_group"}, {"/", "test_group"}, + {"&", "test_group"}, {"!", "test_group"}, {"@", "test_group"}, + {"#", "test_group"}, {"$", "test_group"}, {"%", "test_group"}, + {"^", "test_group"}, {".", "test_group"}, {"~", "test_group"}, + {"-", "test_group"}, {"`", "test_group"}, {"(", "test_group"}, + {")", "test_group"}, {"`", "test_group"}, {"?", "test_group"}, + {"+", "test_group"}, {"=", "test_group"}, {" ", "test_group"}, + })); + +#if DCHECK_IS_ON() +using FeaturedClientDeathTest = FeaturedClientTest; +TEST_F(FeaturedClientDeathTest, InitializeFailure_NullBus) { + EXPECT_DEATH(FeaturedClient::Initialize(nullptr), ""); +} + +TEST_F(FeaturedClientDeathTest, DoubleInitialize) { + FeaturedClient::Initialize(bus_.get()); + + EXPECT_DEATH(FeaturedClient::Initialize(bus_.get()), ""); + + FeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} + +TEST_F(FeaturedClientDeathTest, DoubleInitializeFake) { + FeaturedClient::InitializeFake(); + + EXPECT_DEATH(FeaturedClient::InitializeFake(), ""); + + FakeFeaturedClient::Shutdown(); + + EXPECT_EQ(FeaturedClient::Get(), nullptr); +} +#endif // DCHECK_IS_ON() +} // namespace ash::featured
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc index 306c740..91d83b1 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc
@@ -1611,14 +1611,6 @@ ReplyOnReturn auto_reply(&reply, std::move(callback)); } -void FakeUserDataAuthClient::GenerateFreshRecoveryId( - const ::user_data_auth::GenerateFreshRecoveryIdRequest& request, - GenerateFreshRecoveryIdCallback callback) { - RememberRequest<Operation::kGenerateFreshRecoveryId>(request); - ::user_data_auth::GenerateFreshRecoveryIdReply reply; - ReplyOnReturn auto_reply(&reply, std::move(callback)); -} - void FakeUserDataAuthClient::GetAuthSessionStatus( const ::user_data_auth::GetAuthSessionStatusRequest& request, GetAuthSessionStatusCallback callback) {
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h index 600345de..149619b 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h +++ b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h
@@ -49,7 +49,6 @@ kRemove, kGetRecoverableKeyStores, kLockFactorUntilReboot, - kGenerateFreshRecoveryId, }; // The method by which a user's home directory can be encrypted. @@ -301,9 +300,6 @@ void GetAuthFactorExtendedInfo( const ::user_data_auth::GetAuthFactorExtendedInfoRequest& request, GetAuthFactorExtendedInfoCallback callback) override; - void GenerateFreshRecoveryId( - const ::user_data_auth::GenerateFreshRecoveryIdRequest& request, - GenerateFreshRecoveryIdCallback callback) override; void GetAuthSessionStatus( const ::user_data_auth::GetAuthSessionStatusRequest& request, GetAuthSessionStatusCallback callback) override; @@ -362,8 +358,6 @@ FUDAC_OPERATION_TYPES(kGetRecoverableKeyStores, GetRecoverableKeyStoresRequest); FUDAC_OPERATION_TYPES(kLockFactorUntilReboot, LockFactorUntilRebootRequest); - FUDAC_OPERATION_TYPES(kGenerateFreshRecoveryId, - GenerateFreshRecoveryIdRequest); #undef FUDAC_OPERATION_TYPES
diff --git a/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.h b/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.h index 94ae0db..fe80afb 100644 --- a/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.h +++ b/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.h
@@ -151,11 +151,6 @@ GetAuthFactorExtendedInfoCallback callback), (override)); MOCK_METHOD(void, - GenerateFreshRecoveryId, - (const ::user_data_auth::GenerateFreshRecoveryIdRequest& request, - GenerateFreshRecoveryIdCallback callback), - (override)); - MOCK_METHOD(void, RemoveAuthFactor, (const ::user_data_auth::RemoveAuthFactorRequest& request, RemoveAuthFactorCallback callback),
diff --git a/chromeos/ash/components/dbus/userdataauth/userdataauth_client.cc b/chromeos/ash/components/dbus/userdataauth/userdataauth_client.cc index 9674198..a4882a3 100644 --- a/chromeos/ash/components/dbus/userdataauth/userdataauth_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/userdataauth_client.cc
@@ -312,14 +312,6 @@ std::move(callback)); } - void GenerateFreshRecoveryId( - const ::user_data_auth::GenerateFreshRecoveryIdRequest& request, - GenerateFreshRecoveryIdCallback callback) override { - CallProtoMethod(::user_data_auth::kGenerateFreshRecoveryId, - ::user_data_auth::kUserDataAuthInterface, request, - std::move(callback)); - } - void GetAuthSessionStatus( const ::user_data_auth::GetAuthSessionStatusRequest& request, GetAuthSessionStatusCallback callback) override {
diff --git a/chromeos/ash/components/dbus/userdataauth/userdataauth_client.h b/chromeos/ash/components/dbus/userdataauth/userdataauth_client.h index ea0c833..6f25610 100644 --- a/chromeos/ash/components/dbus/userdataauth/userdataauth_client.h +++ b/chromeos/ash/components/dbus/userdataauth/userdataauth_client.h
@@ -109,8 +109,6 @@ chromeos::DBusMethodCallback<::user_data_auth::ListAuthFactorsReply>; using GetAuthFactorExtendedInfoCallback = chromeos::DBusMethodCallback< ::user_data_auth::GetAuthFactorExtendedInfoReply>; - using GenerateFreshRecoveryIdCallback = chromeos::DBusMethodCallback< - ::user_data_auth::GenerateFreshRecoveryIdReply>; // Asynchronous (biometric) AuthFactors API. using PrepareAuthFactorCallback = @@ -341,12 +339,6 @@ const ::user_data_auth::GetAuthFactorExtendedInfoRequest& request, GetAuthFactorExtendedInfoCallback callback) = 0; - // This is called to rotate the recovery ID after a user authenticates with a - // recovery factor. It should only be used once the user directory is mounted. - virtual void GenerateFreshRecoveryId( - const ::user_data_auth::GenerateFreshRecoveryIdRequest& request, - GenerateFreshRecoveryIdCallback callback) = 0; - // This is called when a user wants to get an AuthSession status. virtual void GetAuthSessionStatus( const ::user_data_auth::GetAuthSessionStatusRequest& request,
diff --git a/chromeos/ash/components/login/auth/public/user_context.cc b/chromeos/ash/components/login/auth/public/user_context.cc index d500465..b6524d8 100644 --- a/chromeos/ash/components/login/auth/public/user_context.cc +++ b/chromeos/ash/components/login/auth/public/user_context.cc
@@ -308,10 +308,6 @@ return can_lock_managed_guest_session_; } -bool UserContext::GenerateFreshRecoveryId() const { - return generate_fresh_recovery_id_; -} - bool UserContext::HasCredentials() const { return (account_id_.is_valid() && !key_.GetSecret().empty()) || !auth_code_.empty(); @@ -469,10 +465,6 @@ can_lock_managed_guest_session_ = can_lock_managed_guest_session; } -void UserContext::SetGenerateFreshRecoveryId(bool generate_fresh_recovery_id) { - generate_fresh_recovery_id_ = generate_fresh_recovery_id; -} - void UserContext::SetLoginInputMethodIdUsed( const std::string& input_method_id) { DCHECK(login_input_method_id_used_.empty());
diff --git a/chromeos/ash/components/login/auth/public/user_context.h b/chromeos/ash/components/login/auth/public/user_context.h index d1b6be5..8725724d 100644 --- a/chromeos/ash/components/login/auth/public/user_context.h +++ b/chromeos/ash/components/login/auth/public/user_context.h
@@ -177,7 +177,6 @@ const; const std::optional<SyncTrustedVaultKeys>& GetSyncTrustedVaultKeys() const; bool CanLockManagedGuestSession() const; - bool GenerateFreshRecoveryId() const; AuthSessionIntents GetAuthorizedIntents() const; void SetGaiaPassword(const GaiaPassword& password); @@ -251,7 +250,6 @@ const SyncTrustedVaultKeys& sync_trusted_vault_keys); void SetIsUnderAdvancedProtection(bool is_under_advanced_protection); void SetCanLockManagedGuestSession(bool can_lock_managed_guest_session); - void SetGenerateFreshRecoveryId(bool generate_fresh_recovery_id); void SetSessionAuthFactors(SessionAuthFactors keys); void SetAuthFactorsConfiguration(AuthFactorsConfiguration auth_factors); void ClearAuthFactorsConfiguration(); @@ -301,7 +299,6 @@ std::string reauth_proof_token_; bool is_under_advanced_protection_ = false; bool can_lock_managed_guest_session_ = false; - bool generate_fresh_recovery_id_ = false; // |login_input_method_id_used_| is non-empty if login password/code was used, // i.e. user used some input method to log in. std::string login_input_method_id_used_;
diff --git a/clank b/clank index dc223ca..6415c39 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit dc223ca45f40208adbfa36bb82127259ef6775bd +Subproject commit 6415c39dd9286521d7b37a4b63c4da46a37879e3
diff --git a/components/autofill/core/browser/data_manager/payments/payments_data_manager.cc b/components/autofill/core/browser/data_manager/payments/payments_data_manager.cc index c8341e66..2640e99 100644 --- a/components/autofill/core/browser/data_manager/payments/payments_data_manager.cc +++ b/components/autofill/core/browser/data_manager/payments/payments_data_manager.cc
@@ -2270,13 +2270,12 @@ DenseSet<PaymentInstrument::ActionRequired>(); // Sets values for `BnplIssuer::action_required` when the list is not empty - // and flag 'kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarna` is - // enabled. + // and flag 'kAutofillEnableBuyNowPayLaterForExternallyLinked` is enabled. // Note: `action_required_size()` is checked first so that the experiment // groups only contain users having nonempty`action_required` info. if (payment_instrument.action_required_size() > 0 && base::FeatureList::IsEnabled( - features::kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarna)) { + features::kAutofillEnableBuyNowPayLaterForExternallyLinked)) { for (int action_required_sync : payment_instrument.action_required()) { switch (action_required_sync) { case sync_pb::PaymentInstrument_ActionRequired_ACTION_REQUIRED_UNKNOWN:
diff --git a/components/autofill/core/browser/data_manager/payments/payments_data_manager_unittest.cc b/components/autofill/core/browser/data_manager/payments/payments_data_manager_unittest.cc index 5ea4d4d..c23406de 100644 --- a/components/autofill/core/browser/data_manager/payments/payments_data_manager_unittest.cc +++ b/components/autofill/core/browser/data_manager/payments/payments_data_manager_unittest.cc
@@ -2556,7 +2556,7 @@ } // Tests that `action_required` is not set for BNPL issuers if flag -// `AutofillEnableBuyNowPayLaterForExternallyLinkedKlarna` is disabled. +// `AutofillEnableBuyNowPayLaterForExternallyLinked` is disabled. TEST_F(PaymentsDataManagerTest, GetLinkedBnplIssuers_IssuerLinkedExternally_FlagDisabled) { base::test::ScopedFeatureList scoped_feature_list; @@ -2564,7 +2564,7 @@ /*enabled_features=*/{features::kAutofillEnableBuyNowPayLaterSyncing, features::kAutofillEnableBuyNowPayLaterForKlarna}, /*disabled_features=*/{ - features::kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarna}); + features::kAutofillEnableBuyNowPayLaterForExternallyLinked}); sync_pb::PaymentInstrument payment_instrument = test::CreatePaymentInstrumentWithLinkedBnplIssuer( /*instrument_id=*/1234L, std::string(kBnplKlarnaIssuerId), "USD", @@ -2592,14 +2592,14 @@ } // Tests that `action_required` is set for BNPL issuers if flag -// `AutofillEnableBuyNowPayLaterForExternallyLinkedKlarna` is enabled. +// `AutofillEnableBuyNowPayLaterForExternallyLinked` is enabled. TEST_F(PaymentsDataManagerTest, GetLinkedBnplIssuers_IssuerLinkedExternally) { base::test::ScopedFeatureList scoped_feature_list; scoped_feature_list.InitWithFeatures( /*enabled_features=*/ {features::kAutofillEnableBuyNowPayLaterSyncing, features::kAutofillEnableBuyNowPayLaterForKlarna, - features::kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarna}, + features::kAutofillEnableBuyNowPayLaterForExternallyLinked}, /*disabled_features=*/{}); sync_pb::PaymentInstrument payment_instrument = test::CreatePaymentInstrumentWithLinkedBnplIssuer(
diff --git a/components/autofill/core/browser/payments/amount_extraction_manager.cc b/components/autofill/core/browser/payments/amount_extraction_manager.cc index ff25abf4..4f5b265 100644 --- a/components/autofill/core/browser/payments/amount_extraction_manager.cc +++ b/components/autofill/core/browser/payments/amount_extraction_manager.cc
@@ -112,8 +112,6 @@ // Run after all other feature eligibilities are checked to only check feature // flag for eligible users. - // TODO(crbug.com/414648193): Rename amount extraction feature flag to - // remove the platform restriction. if (!eligible_features.empty() && base::FeatureList::IsEnabled( ::autofill::features::kAutofillEnableAmountExtractionDesktop)) {
diff --git a/components/autofill/core/browser/payments/payments_autofill_client.cc b/components/autofill/core/browser/payments/payments_autofill_client.cc index 48ac265..4c28749 100644 --- a/components/autofill/core/browser/payments/payments_autofill_client.cc +++ b/components/autofill/core/browser/payments/payments_autofill_client.cc
@@ -291,6 +291,8 @@ const LegalMessageLines& legal_message_lines, CardSaveAndFillDialogCallback callback) {} +void PaymentsAutofillClient::ShowCreditCardSaveAndFillPendingDialog() {} + payments::SaveAndFillManager* PaymentsAutofillClient::GetSaveAndFillManager() { return nullptr; }
diff --git a/components/autofill/core/browser/payments/payments_autofill_client.h b/components/autofill/core/browser/payments/payments_autofill_client.h index eb8e8c2..f2704e7 100644 --- a/components/autofill/core/browser/payments/payments_autofill_client.h +++ b/components/autofill/core/browser/payments/payments_autofill_client.h
@@ -640,6 +640,13 @@ const LegalMessageLines& legal_message_lines, CardSaveAndFillDialogCallback callback); + // Shows a pending state dialog with a throbber while the preflight + // response is being fetched. This pending state is a precursor to either the + // local or upload Save and Fill dialog. If the preflight call fails, the + // dialog transitions to the local version. If it succeeds, the dialog + // transitions to the server version. + virtual void ShowCreditCardSaveAndFillPendingDialog(); + // Gets the payments Save and Fill manager owned by the client. This will be // used to handle the Save and Fill dialog. virtual payments::SaveAndFillManager* GetSaveAndFillManager();
diff --git a/components/autofill/core/browser/payments/save_and_fill_manager_impl.cc b/components/autofill/core/browser/payments/save_and_fill_manager_impl.cc index 69663a5..5dec158 100644 --- a/components/autofill/core/browser/payments/save_and_fill_manager_impl.cc +++ b/components/autofill/core/browser/payments/save_and_fill_manager_impl.cc
@@ -37,6 +37,8 @@ fill_card_callback_ = std::move(fill_card_callback); if (IsCreditCardUploadEnabled()) { + payments_autofill_client()->ShowCreditCardSaveAndFillPendingDialog(); + PopulateInitialUploadDetails(); payments_autofill_client()
diff --git a/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller.h b/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller.h index e965b36e..b722348 100644 --- a/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller.h +++ b/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller.h
@@ -11,6 +11,16 @@ namespace autofill { +enum class SaveAndFillDialogState { + // Local version of the Save and Fill dialog. + kLocalDialog, + // Pending state where a throbber is shown while waiting for the preflight + // call response. + kPendingDialog, + // Upload version of the Save and Fill dialog. + kUploadDialog, +}; + // Interface that exposes controller functionality to // SaveAndFillDialogView. class SaveAndFillDialogController { @@ -37,7 +47,11 @@ size_t old_cursor_position, size_t& new_cursor_position) const = 0; #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) - virtual bool IsUploadSaveAndFill() const = 0; + + // Returns the current state of the Save and Fill dialog. This state + // can be a local card save, an upload card save, or a pending state while + // waiting for the preflight response. + virtual SaveAndFillDialogState GetDialogState() const = 0; virtual bool IsValidCreditCardNumber( std::u16string_view input_text) const = 0; virtual bool IsValidCvc(std::u16string_view input_text) const = 0;
diff --git a/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl.cc b/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl.cc index 1063f25..c7cc2993 100644 --- a/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl.cc +++ b/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl.cc
@@ -26,6 +26,7 @@ create_and_show_view_callback, payments::PaymentsAutofillClient::CardSaveAndFillDialogCallback card_save_and_fill_dialog_callback) { + dialog_state_ = SaveAndFillDialogState::kLocalDialog; dialog_view_ = std::move(create_and_show_view_callback).Run(); card_save_and_fill_dialog_callback_ = std::move(card_save_and_fill_dialog_callback); @@ -38,11 +39,19 @@ create_and_show_view_callback, payments::PaymentsAutofillClient::CardSaveAndFillDialogCallback card_save_and_fill_dialog_callback) { + dialog_state_ = SaveAndFillDialogState::kUploadDialog; + legal_message_lines_ = legal_message_lines; dialog_view_ = std::move(create_and_show_view_callback).Run(); card_save_and_fill_dialog_callback_ = std::move(card_save_and_fill_dialog_callback); - legal_message_lines_ = legal_message_lines; - is_upload_save_and_fill_ = true; + CHECK(dialog_view_); +} + +void SaveAndFillDialogControllerImpl::ShowPendingDialog( + base::OnceCallback<std::unique_ptr<SaveAndFillDialogView>()> + create_and_show_view_callback) { + dialog_state_ = SaveAndFillDialogState::kPendingDialog; + dialog_view_ = std::move(create_and_show_view_callback).Run(); CHECK(dialog_view_); } @@ -52,10 +61,16 @@ } std::u16string SaveAndFillDialogControllerImpl::GetExplanatoryMessage() const { - return l10n_util::GetStringUTF16( - IsUploadSaveAndFill() - ? IDS_AUTOFILL_SAVE_AND_FILL_DIALOG_EXPLANATION_UPLOAD - : IDS_AUTOFILL_SAVE_AND_FILL_DIALOG_EXPLANATION_LOCAL); + switch (dialog_state_) { + case SaveAndFillDialogState::kUploadDialog: + return l10n_util::GetStringUTF16( + IDS_AUTOFILL_SAVE_AND_FILL_DIALOG_EXPLANATION_UPLOAD); + case SaveAndFillDialogState::kLocalDialog: + return l10n_util::GetStringUTF16( + IDS_AUTOFILL_SAVE_AND_FILL_DIALOG_EXPLANATION_LOCAL); + case SaveAndFillDialogState::kPendingDialog: + return std::u16string(); + } } std::u16string SaveAndFillDialogControllerImpl::GetCardNumberLabel() const { @@ -151,8 +166,8 @@ } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) -bool SaveAndFillDialogControllerImpl::IsUploadSaveAndFill() const { - return is_upload_save_and_fill_; +SaveAndFillDialogState SaveAndFillDialogControllerImpl::GetDialogState() const { + return dialog_state_; } bool SaveAndFillDialogControllerImpl::IsValidCreditCardNumber(
diff --git a/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl.h b/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl.h index b362164..53d049c 100644 --- a/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl.h +++ b/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl.h
@@ -39,6 +39,10 @@ payments::PaymentsAutofillClient::CardSaveAndFillDialogCallback card_save_and_fill_dialog_callback); + void ShowPendingDialog( + base::OnceCallback<std::unique_ptr<SaveAndFillDialogView>()> + create_and_show_view_callback); + #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) std::u16string GetWindowTitle() const override; std::u16string GetExplanatoryMessage() const override; @@ -56,7 +60,7 @@ size_t old_cursor_position, size_t& new_cursor_position) const override; #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) - bool IsUploadSaveAndFill() const override; + SaveAndFillDialogState GetDialogState() const override; bool IsValidCreditCardNumber(std::u16string_view input_text) const override; bool IsValidCvc(std::u16string_view input_text) const override; bool IsValidExpirationDate( @@ -79,9 +83,10 @@ std::unique_ptr<SaveAndFillDialogView> dialog_view_; - // Determines whether the local or upload save version of the UI should be - // shown. - bool is_upload_save_and_fill_ = false; + // Determines the current state of the Save and Fill dialog. This state + // can be a local card save, an upload card save, or a pending state while + // waiting for the preflight response. + SaveAndFillDialogState dialog_state_; LegalMessageLines legal_message_lines_;
diff --git a/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl_unittest.cc b/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl_unittest.cc index 2c78b2c..8f134d9 100644 --- a/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl_unittest.cc +++ b/components/autofill/core/browser/ui/payments/save_and_fill_dialog_controller_impl_unittest.cc
@@ -20,8 +20,8 @@ SaveAndFillDialogControllerImplTest() = default; ~SaveAndFillDialogControllerImplTest() override = default; - void SetIsUploadSaveAndFill(bool is_upload) { - controller_->is_upload_save_and_fill_ = is_upload; + void SetDialogState(SaveAndFillDialogState dialog_state) { + controller_->dialog_state_ = dialog_state; } void SetUp() override { @@ -79,7 +79,7 @@ EXPECT_EQ(controller()->GetWindowTitle(), l10n_util::GetStringUTF16(IDS_AUTOFILL_SAVE_AND_FILL_DIALOG_TITLE)); - SetIsUploadSaveAndFill(false); + SetDialogState(SaveAndFillDialogState::kLocalDialog); EXPECT_EQ(controller()->GetExplanatoryMessage(), l10n_util::GetStringUTF16( IDS_AUTOFILL_SAVE_AND_FILL_DIALOG_EXPLANATION_LOCAL)); @@ -109,7 +109,7 @@ IDS_AUTOFILL_SAVE_AND_FILL_DIALOG_INVALID_CARD_NUMBER)); // Test for upload Save and Fill explanatory message. - SetIsUploadSaveAndFill(true); + SetDialogState(SaveAndFillDialogState::kUploadDialog); EXPECT_EQ(controller()->GetExplanatoryMessage(), l10n_util::GetStringUTF16( IDS_AUTOFILL_SAVE_AND_FILL_DIALOG_EXPLANATION_UPLOAD));
diff --git a/components/autofill/core/common/autofill_payments_features.cc b/components/autofill/core/common/autofill_payments_features.cc index bef49879..92364e2 100644 --- a/components/autofill/core/common/autofill_payments_features.cc +++ b/components/autofill/core/common/autofill_payments_features.cc
@@ -46,10 +46,10 @@ "AutofillEnableBuyNowPayLater", base::FEATURE_DISABLED_BY_DEFAULT); -// When enabled, buy now pay later (BNPL) for externally linked Klarna in -// Autofill will be offered. -BASE_FEATURE(kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarna, - "AutofillEnableBuyNowPayLaterForExternallyLinkedKlarna", +// When enabled, additional steps are required to autofill buy now pay later +// (BNPL) issuers that are externally linked. +BASE_FEATURE(kAutofillEnableBuyNowPayLaterForExternallyLinked, + "AutofillEnableBuyNowPayLaterForExternallyLinked", base::FEATURE_DISABLED_BY_DEFAULT); // When enabled, buy now pay later (BNPL) for Klarna in Autofill will be
diff --git a/components/autofill/core/common/autofill_payments_features.h b/components/autofill/core/common/autofill_payments_features.h index 36e6f181..ab96e0e 100644 --- a/components/autofill/core/common/autofill_payments_features.h +++ b/components/autofill/core/common/autofill_payments_features.h
@@ -28,7 +28,7 @@ COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillEnableBuyNowPayLater); COMPONENT_EXPORT(AUTOFILL) -BASE_DECLARE_FEATURE(kAutofillEnableBuyNowPayLaterForExternallyLinkedKlarna); +BASE_DECLARE_FEATURE(kAutofillEnableBuyNowPayLaterForExternallyLinked); COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillEnableBuyNowPayLaterForKlarna); COMPONENT_EXPORT(AUTOFILL)
diff --git a/components/dom_distiller/core/distiller_page.cc b/components/dom_distiller/core/distiller_page.cc index d0f1b60..ea24d4c 100644 --- a/components/dom_distiller/core/distiller_page.cc +++ b/components/dom_distiller/core/distiller_page.cc
@@ -63,25 +63,24 @@ const base::DictValue* dict_value = value.GetIfDict(); - if (dict_value->contains("title")) { - result->set_title(dict_value->Find("title")->GetString()); + if (auto* title = dict_value->FindString("title")) { + result->set_title(*title); } - if (dict_value->contains("content")) { + if (auto* content = dict_value->FindString("content")) { auto* distilled_content = new proto::DistilledContent(); - distilled_content->set_html(dict_value->Find("content")->GetString()); + distilled_content->set_html(*content); result->set_allocated_distilled_content(std::move(distilled_content)); } - if (dict_value->contains("dir")) { - result->set_text_direction(dict_value->Find("content")->GetString()); + if (auto* dir = dict_value->FindString("dir")) { + result->set_text_direction(*dir); } else { result->set_text_direction("auto"); } - if (dict_value->contains("textContent")) { + if (auto* text_content = dict_value->FindString("textContent")) { auto* statistics_info = new proto::StatisticsInfo(); - std::string text_content = dict_value->Find("textContent")->GetString(); - statistics_info->set_word_count(CountWords(text_content)); + statistics_info->set_word_count(CountWords(*text_content)); result->set_allocated_statistics_info(statistics_info); }
diff --git a/components/dom_distiller/core/distiller_page_unittest.cc b/components/dom_distiller/core/distiller_page_unittest.cc index b7b20126..2ca6350 100644 --- a/components/dom_distiller/core/distiller_page_unittest.cc +++ b/components/dom_distiller/core/distiller_page_unittest.cc
@@ -4,10 +4,16 @@ #include "components/dom_distiller/core/distiller_page.h" +#include <optional> + +#include "base/functional/callback_forward.h" #include "base/functional/callback_helpers.h" +#include "base/run_loop.h" #include "base/test/metrics/histogram_tester.h" +#include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" #include "base/values.h" +#include "components/dom_distiller/core/dom_distiller_features.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/dom_distiller_js/dom_distiller.pb.h" #include "url/gurl.h" @@ -22,19 +28,35 @@ kNoResult = 2, }; +constexpr char kReadabilityTitle[] = "title"; +constexpr char kReadabilityContent[] = "content"; +constexpr char kReadabilityDir[] = "dir"; +constexpr char kReadabilityTextContent[] = "textContent"; + // This is a minimal concrete class that inherits from DistillerPage. It // overrides the implementation of distillation to immediately call the // completion handler, simulating a success or failure result for the test. class TestDistillerPage : public DistillerPage { public: // This enum controls which distillation outcome the mock will simulate. - enum class SimulatedResult { kSuccess, kParseFailure, kNoResult }; + enum class SimulatedResult { + kSuccess, + kParseFailure, + kNoResult, + kCustomResult + }; TestDistillerPage() = default; // Configures the mock to simulate a specific result. void SetNextResult(SimulatedResult result) { simulate_result_ = result; } + // Configures the mock to simulate a specific result value. + void SetNextResultValue(std::optional<base::Value> val) { + simulate_result_ = SimulatedResult::kCustomResult; + simulate_result_val_ = std::move(val); + } + bool ShouldFetchOfflineData() override { return false; } // The overridden implementation now simulates one of three outcomes based on @@ -62,11 +84,16 @@ OnDistillationDone(url, &no_result_value); break; } + case SimulatedResult::kCustomResult: { + OnDistillationDone(url, &simulate_result_val_.value()); + break; + } } } private: SimulatedResult simulate_result_ = SimulatedResult::kSuccess; + std::optional<base::Value> simulate_result_val_ = std::nullopt; }; class DistillerPageTest : public testing::Test { @@ -119,6 +146,129 @@ DistillationParseResult::kNoResult, 1); } +// Asserts the fields exist in the DomDistillerResult. +void AssertCorrectDomDistillerResult(proto::DomDistillerResult& result, + const std::string& title, + const std::string& content, + const std::string& dir, + const int word_count) { + ASSERT_EQ(title, result.title()); + ASSERT_EQ(content, result.distilled_content().html()); + ASSERT_EQ(dir, result.text_direction()); + ASSERT_EQ(word_count, result.statistics_info().word_count()); +} + +TEST_F(DistillerPageTest, ReadabilityObjectIsExtracted) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeaturesAndParameters( + /*enabled_features=*/{{dom_distiller::kReaderModeUseReadability, + {{"use_distiller", "true"}}}}, + /*disabled_features=*/{}); + + base::Value::Dict readability_result; + const std::string title = "test_title"; + readability_result.Set(kReadabilityTitle, title); + const std::string content = "test content"; + readability_result.Set(kReadabilityContent, content); + const std::string dir = "ltr"; + readability_result.Set(kReadabilityDir, dir); + const std::string text_content = + "one two; three. four! fivefive six, seven, eight nine ten"; + readability_result.Set(kReadabilityTextContent, text_content); + TestDistillerPage distiller_page; + distiller_page.SetNextResultValue(base::Value(std::move(readability_result))); + + base::RunLoop run_loop; + DistillerPage::DistillerPageCallback cb = + base::BindOnce( + [](std::string title, std::string content, std::string dir, + int word_count, + std::unique_ptr<proto::DomDistillerResult> distilled_page, + bool distillation_successful) { + EXPECT_TRUE(distillation_successful); + AssertCorrectDomDistillerResult(*distilled_page.get(), title, + content, dir, 10); + }, + title, content, dir, 10) + .Then(run_loop.QuitClosure()); + distiller_page.DistillPage(GURL("http://example.com/success"), + dom_distiller::proto::DomDistillerOptions(), + std::move(cb)); + run_loop.Run(); + histogram_tester_.ExpectUniqueSample("DomDistiller.Distillation.Result", + DistillationParseResult::kSuccess, 1); +} + +TEST_F(DistillerPageTest, + ReadabilityObjectIsExtracted_AutoDirWhenNoneProvided) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeaturesAndParameters( + /*enabled_features=*/{{dom_distiller::kReaderModeUseReadability, + {{"use_distiller", "true"}}}}, + /*disabled_features=*/{}); + + base::Value::Dict readability_result; + const std::string title = "test_title"; + readability_result.Set(kReadabilityTitle, title); + const std::string content = "test content"; + readability_result.Set(kReadabilityContent, content); + const std::string dir = "auto"; + const std::string text_content = + "one two; three. four! fivefive six, seven, eight nine ten"; + readability_result.Set(kReadabilityTextContent, text_content); + TestDistillerPage distiller_page; + distiller_page.SetNextResultValue(base::Value(std::move(readability_result))); + + base::RunLoop run_loop; + DistillerPage::DistillerPageCallback cb = + base::BindOnce( + [](std::string title, std::string content, std::string dir, + int word_count, + std::unique_ptr<proto::DomDistillerResult> distilled_page, + bool distillation_successful) { + EXPECT_TRUE(distillation_successful); + AssertCorrectDomDistillerResult(*distilled_page.get(), title, + content, dir, 10); + }, + title, content, dir, 10) + .Then(run_loop.QuitClosure()); + distiller_page.DistillPage(GURL("http://example.com/success"), + dom_distiller::proto::DomDistillerOptions(), + std::move(cb)); + run_loop.Run(); + histogram_tester_.ExpectUniqueSample("DomDistiller.Distillation.Result", + DistillationParseResult::kSuccess, 1); +} + +TEST_F(DistillerPageTest, ReadabilityObjectIsExtracted_FailureWhenNotDict) { + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeaturesAndParameters( + /*enabled_features=*/{{dom_distiller::kReaderModeUseReadability, + {{"use_distiller", "true"}}}}, + /*disabled_features=*/{}); + + base::Value readability_result("undefined"); + TestDistillerPage distiller_page; + distiller_page.SetNextResultValue(base::Value(std::move(readability_result))); + + base::RunLoop run_loop; + DistillerPage::DistillerPageCallback cb = + base::BindOnce( + [](std::unique_ptr<proto::DomDistillerResult> distilled_page, + bool distillation_successful) { + EXPECT_FALSE(distillation_successful); + }) + .Then(run_loop.QuitClosure()); + distiller_page.DistillPage(GURL("http://example.com/success"), + dom_distiller::proto::DomDistillerOptions(), + std::move(cb)); + run_loop.Run(); + + histogram_tester_.ExpectUniqueSample("DomDistiller.Distillation.Result", + DistillationParseResult::kParseFailure, + 1); +} + } // namespace } // namespace dom_distiller
diff --git a/components/download/content/internal/download_driver_impl_unittest.cc b/components/download/content/internal/download_driver_impl_unittest.cc index b0af732..1c7d750a1 100644 --- a/components/download/content/internal/download_driver_impl_unittest.cc +++ b/components/download/content/internal/download_driver_impl_unittest.cc
@@ -253,7 +253,7 @@ TEST_F(DownloadDriverImplTest, Start_WithRangeHeader) { RequestParams request_params; request_params.url = GURL(kFakeURL); - request_params.request_headers.AddHeaderFromString("Range: bytes=5-10"); + request_params.request_headers.SetHeader("Range", "bytes=5-10"); EXPECT_CALL(mock_manager_, DownloadUrlMock(_)).RetiresOnSaturation(); driver_->Start(request_params, kFakeGuid, base::FilePath(), nullptr, TRAFFIC_ANNOTATION_FOR_TESTS); @@ -269,7 +269,7 @@ EXPECT_FALSE(HasHeader(download_url_parameters->request_headers(), net::HttpRequestHeaders::kIfRange)); - request_params.request_headers.AddHeaderFromString("Range: bytes=-10"); + request_params.request_headers.SetHeader("Range", "bytes=-10"); EXPECT_CALL(mock_manager_, DownloadUrlMock(_)).RetiresOnSaturation(); driver_->Start(request_params, kFakeGuid, base::FilePath(), nullptr, TRAFFIC_ANNOTATION_FOR_TESTS);
diff --git a/components/feature_engagement/public/feature_configurations.cc b/components/feature_engagement/public/feature_configurations.cc index c8cd86d..99deba2 100644 --- a/components/feature_engagement/public/feature_configurations.cc +++ b/components/feature_engagement/public/feature_configurations.cc
@@ -1679,18 +1679,6 @@ return config; } - if (kIPHRtlGestureNavigationFeature.name == feature->name) { - FeatureConfig config; - config.valid = true; - config.availability = Comparator(ANY, 0); - config.session_rate = Comparator(LESS_THAN, 1); - config.used = - EventConfig("rtl_gesture_iph_show", Comparator(EQUAL, 0), 365, 365); - config.trigger = - EventConfig("rtl_gesture_iph_trigger", Comparator(EQUAL, 0), 30, 365); - return config; - } - if (kIPHPageZoomFeature.name == feature->name) { FeatureConfig config; config.valid = true;
diff --git a/components/feature_engagement/public/feature_constants.cc b/components/feature_engagement/public/feature_constants.cc index abd53e4..ba65f05 100644 --- a/components/feature_engagement/public/feature_constants.cc +++ b/components/feature_engagement/public/feature_constants.cc
@@ -413,7 +413,7 @@ base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kIPHRtlGestureNavigationFeature, "IPH_RtlGestureNavigation", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE(kIPHShoppingListSaveFlowFeature, "IPH_ShoppingListSaveFlow", base::FEATURE_ENABLED_BY_DEFAULT); @@ -759,6 +759,10 @@ BASE_FEATURE(kIPHiOSDefaultBrowserOffCyclePromoFeature, "IPH_iOSDefaultBrowserOffCyclePromo", base::FEATURE_ENABLED_BY_DEFAULT); +constexpr base::FeatureParam<int> kIPHiOSDefaultBrowserOffCyclePromoCooldown{ + &kIPHiOSDefaultBrowserOffCyclePromoFeature, + /*name=*/"cooldown-days", + /*default_value=*/10 * 365}; BASE_FEATURE(kIPHiOSReminderNotificationsOverflowMenuBubbleFeature, "IPH_iOSReminderNotificationsOverflowMenuBubbleFeature", base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/components/feature_engagement/public/feature_constants.h b/components/feature_engagement/public/feature_constants.h index 714db028..c3b10ed0a 100644 --- a/components/feature_engagement/public/feature_constants.h +++ b/components/feature_engagement/public/feature_constants.h
@@ -330,7 +330,11 @@ FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHiOSLensOverlayEscapeHatchTipFeature); FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHiOSSharedTabGroupForeground); FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHiOSDefaultBrowserBannerPromoFeature); +// A feature flag to enable the Default Browser off-cycle promo and configure +// its cooldown duration, in days. FEATURE_CONSTANTS_DECLARE_FEATURE(kIPHiOSDefaultBrowserOffCyclePromoFeature); +COMPONENT_EXPORT(FEATURE_ENGAGEMENT_FEATURE_CONSTANTS) +extern const base::FeatureParam<int> kIPHiOSDefaultBrowserOffCyclePromoCooldown; FEATURE_CONSTANTS_DECLARE_FEATURE( kIPHiOSReminderNotificationsOverflowMenuBubbleFeature); FEATURE_CONSTANTS_DECLARE_FEATURE(
diff --git a/components/feature_engagement/public/ios_promo_feature_configuration.cc b/components/feature_engagement/public/ios_promo_feature_configuration.cc index ff142b5..49ce8c6 100644 --- a/components/feature_engagement/public/ios_promo_feature_configuration.cc +++ b/components/feature_engagement/public/ios_promo_feature_configuration.cc
@@ -269,6 +269,12 @@ config.valid = true; config.availability = Comparator(ANY, 0); config.session_rate = Comparator(ANY, 0); + + // This IPH showing does not affect the session count for other IPHs. + config.session_rate_impact.type = SessionRateImpact::Type::NONE; + config.blocked_by.type = BlockedBy::Type::NONE; + config.blocking.type = Blocking::Type::NONE; + config.trigger = EventConfig(feature_engagement::events::kIOSPageActionMenuIPHTrigger, Comparator(EQUAL, 0), feature_engagement::kMaxStoragePeriod, @@ -529,15 +535,13 @@ config->session_rate = Comparator(ANY, 0); config->groups.push_back(kiOSDefaultBrowserPromosGroup.name); config->storage_type = StorageType::DEVICE; + config->used = EventConfig("default_browser_off_cycle_promo_used", + Comparator(ANY, 0), 365, 365); - config->trigger = - EventConfig("default_browser_off_cycle_promo_trigger", - Comparator(EQUAL, 0), feature_engagement::kMaxStoragePeriod, - feature_engagement::kMaxStoragePeriod); - config->used = - EventConfig("default_browser_off_cycle_promo_used", - Comparator(EQUAL, 0), feature_engagement::kMaxStoragePeriod, - feature_engagement::kMaxStoragePeriod); + config->trigger = EventConfig( + "default_browser_off_cycle_promo_trigger", Comparator(EQUAL, 0), + feature_engagement::kIPHiOSDefaultBrowserOffCyclePromoCooldown.Get(), + feature_engagement::kMaxStoragePeriod); return config; }
diff --git a/components/ip_protection/common/ip_protection_proxy_delegate.cc b/components/ip_protection/common/ip_protection_proxy_delegate.cc index c454666..65c4ac71 100644 --- a/components/ip_protection/common/ip_protection_proxy_delegate.cc +++ b/components/ip_protection/common/ip_protection_proxy_delegate.cc
@@ -12,6 +12,7 @@ #include <vector> #include "base/check.h" +#include "base/containers/fixed_flat_set.h" #include "base/debug/crash_logging.h" #include "base/feature_list.h" #include "base/logging.h" @@ -257,36 +258,70 @@ std::optional<std::string> proxy_status_header_value = response_headers.GetNormalizedHeader("Proxy-Status"); - if (proxy_status_header_value) { - std::optional<net::structured_headers::List> proxy_status_list = - net::structured_headers::ParseList(*proxy_status_header_value); - if (proxy_status_list) { - for (const auto& p_member : *proxy_status_list) { - if (p_member.member_is_inner_list) { - continue; - } - for (const auto& param : p_member.params) { - if (param.first == "error" && param.second.is_token()) { - const std::string& error_val = param.second.GetString(); + if (!proxy_status_header_value) { + return net::ERR_PROXY_TUNNEL_REQUEST_FAILED; + } - // These RFC 9209 errors indicate a destination-side problem. - // For these, we should NOT fall back. - // TODO(crbug.com/435482005): The handling of "dns_error" can - // be more granular. - if (error_val == "dns_timeout" || error_val == "dns_error" || - error_val == "destination_not_found" || - error_val == "destination_unavailable" || - error_val == "destination_ip_unroutable" || - error_val == "connection_refused" || - error_val == "connection_terminated" || - error_val == "connection_timeout" || - error_val == "proxy_loop_detected") { - return net::ERR_TUNNEL_CONNECTION_FAILED; - } - } - } + std::optional<net::structured_headers::List> proxy_status_list = + net::structured_headers::ParseList(*proxy_status_header_value); + if (!proxy_status_list) { + return net::ERR_PROXY_TUNNEL_REQUEST_FAILED; + } + + net::structured_headers::List parsed_list = proxy_status_list.value(); + // For IP Protection there will only ever be one proxy server per connection, + // so there should only ever be one element in the list corresponding to that + // proxy server. Even for the connection to Proxy B, this request is not + // visible by Proxy A and thus the Proxy-Status header can't be modified by + // it. + if (parsed_list.size() != 1) { + return net::ERR_PROXY_TUNNEL_REQUEST_FAILED; + } + const net::structured_headers::ParameterizedMember& p_member = parsed_list[0]; + // `p_member` can either be a single Item or an inner list, and we expect the + // format here for this Proxy-Status header to be considered valid. + if (p_member.member_is_inner_list) { + return net::ERR_PROXY_TUNNEL_REQUEST_FAILED; + } + + bool error_is_dns_error = false; + bool rcode_is_nxdomain = false; + for (const auto& [name, item] : p_member.params) { + if (name == "error" && item.is_token()) { + static constexpr auto kDestinationErrors = + base::MakeFixedFlatSet<std::string_view>({ + "dns_timeout", + "destination_not_found", + "destination_unavailable", + "destination_ip_unroutable", + "connection_refused", + "connection_terminated", + "connection_timeout", + "proxy_loop_detected", + }); + const std::string& error_val = item.GetString(); + // These RFC 9209 errors indicate a destination-side problem. + // For these, we should NOT fall back. + if (kDestinationErrors.contains(error_val)) { + return net::ERR_TUNNEL_CONNECTION_FAILED; } + if (error_val == "dns_error") { + error_is_dns_error = true; + } + continue; } + // TODO(crbug.com/435524190): We can enforce that the value is a string + // type once all proxy B providers adhere to the spec for this. + if (name == "rcode" && (item.is_token() || item.is_string())) { + const std::string& rcode_val = item.GetString(); + if (rcode_val == "NXDOMAIN") { + rcode_is_nxdomain = true; + } + continue; + } + } + if (error_is_dns_error && rcode_is_nxdomain) { + return net::ERR_TUNNEL_CONNECTION_FAILED; } // If no specific destination error was found, we assume it's a proxy
diff --git a/components/ip_protection/common/ip_protection_proxy_delegate_unittest.cc b/components/ip_protection/common/ip_protection_proxy_delegate_unittest.cc index 2a3a891..7e98e10 100644 --- a/components/ip_protection/common/ip_protection_proxy_delegate_unittest.cc +++ b/components/ip_protection/common/ip_protection_proxy_delegate_unittest.cc
@@ -1559,7 +1559,7 @@ auto headers = base::MakeRefCounted<net::HttpResponseHeaders>( net::HttpUtil::AssembleRawHeaders( "HTTP/1.1 502 Bad Gateway\nProxy-Status: proxy; " - "error=\"dns_error\"\n")); + "error=dns_error\n")); // For non-IPP chains, the delegate should return `net::OK` to allow the // default network stack handling to process the response. @@ -1570,6 +1570,86 @@ TEST_F( IpProtectionProxyDelegateTest, + OnTunnelHeadersReceivedReturnsProxyTunnelConnectionFailedForBareDnsError) { + auto masked_domain_list_manager = CreateMdlManager({}); + auto ipp_core = + std::make_unique<MockIpProtectionCore>(&masked_domain_list_manager); + auto delegate = CreateDelegate(ipp_core.get()); + auto ip_protection_proxy_chain = MakeChain({"proxy.com"}); + auto headers = base::MakeRefCounted<net::HttpResponseHeaders>( + net::HttpUtil::AssembleRawHeaders( + "HTTP/1.1 502 Bad Gateway\nProxy-Status: proxy; " + "error=dns_error\n")); + + // We should treat dns_error without a corresponding rcode field as needing + // fallback. + EXPECT_THAT(delegate->OnTunnelHeadersReceived(ip_protection_proxy_chain, + /*chain_index=*/0, *headers), + IsError(net::ERR_PROXY_TUNNEL_REQUEST_FAILED)); +} + +TEST_F( + IpProtectionProxyDelegateTest, + OnTunnelHeadersReceivedReturnsProxyTunnelConnectionFailedForDnsServFail) { + auto masked_domain_list_manager = CreateMdlManager({}); + auto ipp_core = + std::make_unique<MockIpProtectionCore>(&masked_domain_list_manager); + auto delegate = CreateDelegate(ipp_core.get()); + auto ip_protection_proxy_chain = MakeChain({"proxy.com"}); + auto headers = base::MakeRefCounted<net::HttpResponseHeaders>( + net::HttpUtil::AssembleRawHeaders( + "HTTP/1.1 502 Bad Gateway\nProxy-Status: proxy; " + "error=dns_error;rcode=\"SERVFAIL\"\n")); + + // All rcodes except NXDOMAIN indicate server failure and should trigger + // fallback. + EXPECT_THAT(delegate->OnTunnelHeadersReceived(ip_protection_proxy_chain, + /*chain_index=*/0, *headers), + IsError(net::ERR_PROXY_TUNNEL_REQUEST_FAILED)); +} + +TEST_F(IpProtectionProxyDelegateTest, + OnTunnelHeadersReceivedReturnsTunnelConnectionFailedForDnsNxdomain) { + auto masked_domain_list_manager = CreateMdlManager({}); + auto ipp_core = + std::make_unique<MockIpProtectionCore>(&masked_domain_list_manager); + auto delegate = CreateDelegate(ipp_core.get()); + auto ip_protection_proxy_chain = MakeChain({"proxy.com"}); + auto headers = base::MakeRefCounted<net::HttpResponseHeaders>( + net::HttpUtil::AssembleRawHeaders( + "HTTP/1.1 502 Bad Gateway\nProxy-Status: proxy; " + "error=dns_error;rcode=\"NXDOMAIN\"\n")); + + // An NXDOMAIN rcode should not trigger fallback. + EXPECT_THAT(delegate->OnTunnelHeadersReceived(ip_protection_proxy_chain, + /*chain_index=*/0, *headers), + IsError(net::ERR_TUNNEL_CONNECTION_FAILED)); +} + +// TODO(crbug.com/435524190): Can remove this test once we remove the +// corresponding logic in `OnTunnelHeadersReceived()`. +TEST_F( + IpProtectionProxyDelegateTest, + OnTunnelHeadersReceivedReturnsTunnelConnectionFailedForDnsNxdomainToken) { + auto masked_domain_list_manager = CreateMdlManager({}); + auto ipp_core = + std::make_unique<MockIpProtectionCore>(&masked_domain_list_manager); + auto delegate = CreateDelegate(ipp_core.get()); + auto ip_protection_proxy_chain = MakeChain({"proxy.com"}); + auto headers = base::MakeRefCounted<net::HttpResponseHeaders>( + net::HttpUtil::AssembleRawHeaders( + "HTTP/1.1 502 Bad Gateway\nProxy-Status: proxy; " + "error=dns_error;rcode=NXDOMAIN\n")); + + // An NXDOMAIN rcode should not trigger fallback even if the value is a token + // instead of a string. + EXPECT_THAT(delegate->OnTunnelHeadersReceived(ip_protection_proxy_chain, + /*chain_index=*/0, *headers), + IsError(net::ERR_TUNNEL_CONNECTION_FAILED)); +} + +TEST_F( + IpProtectionProxyDelegateTest, OnTunnelHeadersReceivedReturnsProxyTunnelRequestFailedWithoutProxyStatusHeader) { auto masked_domain_list_manager = CreateMdlManager({}); auto ipp_core = @@ -1672,14 +1752,16 @@ INSTANTIATE_TEST_SUITE_P(All, IpProtectionProxyDelegateOnTunnelHeadersReceivedTest, testing::Values("dns_timeout", - "dns_error", "destination_not_found", "destination_unavailable", "destination_ip_unroutable", "connection_refused", "connection_terminated", "connection_timeout", - "proxy_loop_detected")); + "proxy_loop_detected"), + [](const testing::TestParamInfo<const char*>& info) { + return info.param; + }); TEST_F( IpProtectionProxyDelegateTest, @@ -1692,13 +1774,13 @@ auto headers = base::MakeRefCounted<net::HttpResponseHeaders>( net::HttpUtil::AssembleRawHeaders( "HTTP/1.1 502 Bad Gateway\n" - "Proxy-Status: PxyA; info=\"ok\", PxyB; error=dns_error\n")); + "Proxy-Status: PxyA; info=\"ok\", Invalid; error=dns_error\n")); - // As long as one of the entries indicates a destination error, we should not - // fall back. + // For IP Protection there is only ever one proxy in the path for any given + // connection, so treat multiple entities in the Proxy-Status line as invalid. EXPECT_THAT(delegate->OnTunnelHeadersReceived(ip_protection_proxy_chain, /*chain_index=*/0, *headers), - IsError(net::ERR_TUNNEL_CONNECTION_FAILED)); + IsError(net::ERR_PROXY_TUNNEL_REQUEST_FAILED)); } } // namespace ip_protection
diff --git a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/ContentId.java b/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/ContentId.java index 8815f701..edde7b0 100644 --- a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/ContentId.java +++ b/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/ContentId.java
@@ -30,7 +30,7 @@ } @Override - public boolean equals(Object o) { + public boolean equals(@Nullable Object o) { if (this == o) return true; if (!(o instanceof ContentId)) return false;
diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc index 03e96a0..beaa5ca 100644 --- a/components/omnibox/browser/omnibox_edit_model.cc +++ b/components/omnibox/browser/omnibox_edit_model.cc
@@ -65,7 +65,6 @@ #include "components/omnibox/common/omnibox_feature_configs.h" #include "components/omnibox/common/omnibox_features.h" #include "components/omnibox/common/omnibox_focus_state.h" -#include "components/prefs/pref_service.h" #include "components/search_engines/search_engine_type.h" #include "components/search_engines/template_url.h" #include "components/search_engines/template_url_prepopulate_data.h" @@ -1762,6 +1761,12 @@ popup_selection_ = new_selection; popup_view_->OnSelectionChanged(old_selection, popup_selection_); + // Special case for transferring focus to the AIM button. + if (popup_selection_.state == OmniboxPopupSelection::FOCUSED_BUTTON_AIM) { + popup_view_->RequestAimButtonFocus(); + return; + } + // This occurs when e.g., pressing escape to select the null match in // zero-input mode. if (popup_selection_.line == OmniboxPopupSelection::kNoMatch) { @@ -1826,8 +1831,7 @@ bool OmniboxEditModel::IsPopupControlPresentOnMatch( OmniboxPopupSelection selection) const { DCHECK(popup_view_); - return selection.IsControlPresentOnMatch(autocomplete_controller()->result(), - GetPrefService()); + return selection.IsControlPresentOnMatch(autocomplete_controller()->result()); } void OmniboxEditModel::TryDeletingPopupLine(size_t line) { @@ -1908,7 +1912,7 @@ int additional_message_id = 0; std::u16string additional_message; // This switch statement should be updated when new selection types are added. - static_assert(OmniboxPopupSelection::LINE_STATE_MAX_VALUE == 7); + static_assert(OmniboxPopupSelection::LINE_STATE_MAX_VALUE == 8); switch (popup_selection_.state) { case OmniboxPopupSelection::NORMAL: { int available_actions_count = 0; @@ -1917,23 +1921,21 @@ additional_message_id = IDS_ACC_OMNIBOX_TOOLBELT_NEXT_SUFFIX; } if (OmniboxPopupSelection(line, OmniboxPopupSelection::KEYWORD_MODE) - .IsControlPresentOnMatch(autocomplete_controller()->result(), - GetPrefService())) { + .IsControlPresentOnMatch(autocomplete_controller()->result())) { additional_message_id = IDS_ACC_KEYWORD_SUFFIX; available_actions_count++; } + // TODO(crbug.com/432744091): Add a message for the AIM button here. if (OmniboxPopupSelection(line, OmniboxPopupSelection::FOCUSED_BUTTON_ACTION) - .IsControlPresentOnMatch(autocomplete_controller()->result(), - GetPrefService())) { + .IsControlPresentOnMatch(autocomplete_controller()->result())) { additional_message = match.GetActionAt(0u)->GetLabelStrings().accessibility_suffix; available_actions_count++; } if (OmniboxPopupSelection(line, OmniboxPopupSelection::FOCUSED_BUTTON_THUMBS_UP) - .IsControlPresentOnMatch(autocomplete_controller()->result(), - GetPrefService())) { + .IsControlPresentOnMatch(autocomplete_controller()->result())) { // No need to set `additional_message_id`. Thumbs up and thumbs down // button are always present together; `additional_message_id` is set to // `IDS_ACC_MULTIPLE_ACTIONS_SUFFIX` further down. @@ -1941,8 +1943,7 @@ } if (OmniboxPopupSelection( line, OmniboxPopupSelection::FOCUSED_BUTTON_THUMBS_DOWN) - .IsControlPresentOnMatch(autocomplete_controller()->result(), - GetPrefService())) { + .IsControlPresentOnMatch(autocomplete_controller()->result())) { // No need to set `additional_message_id`. Thumbs up and thumbs down // button are always present together; `additional_message_id` is set to // `IDS_ACC_MULTIPLE_ACTIONS_SUFFIX` further down. @@ -1950,8 +1951,7 @@ } if (OmniboxPopupSelection( line, OmniboxPopupSelection::FOCUSED_BUTTON_REMOVE_SUGGESTION) - .IsControlPresentOnMatch(autocomplete_controller()->result(), - GetPrefService())) { + .IsControlPresentOnMatch(autocomplete_controller()->result())) { additional_message_id = IDS_ACC_REMOVE_SUGGESTION_SUFFIX; available_actions_count++; } @@ -2050,11 +2050,9 @@ // Iff the next selection (the next time the user presses tab) is the // remove suggestion button for the IPH row, also append its a11y label. auto next_selection = popup_selection_.GetNextSelection( - autocomplete_controller()->result(), GetPrefService(), + autocomplete_controller()->result(), controller_->client()->GetTemplateURLService(), - OmniboxPopupSelection::kForward, OmniboxPopupSelection::kStateOrLine, - OmniboxFieldTrial::IsHideSuggestionGroupHeadersEnabledInContext( - GetPageClassification())); + OmniboxPopupSelection::kForward, OmniboxPopupSelection::kStateOrLine); if (next_selection.line == next_line && next_selection.state == OmniboxPopupSelection::FOCUSED_BUTTON_REMOVE_SUGGESTION) { @@ -2166,6 +2164,22 @@ input_ = std::move(input); } +bool OmniboxEditModel::FocusIsGoingToAimButton() const { + return focus_is_going_to_aim_button_; +} + +void OmniboxEditModel::SetFocusIsGoingToAimButton(bool value) { + focus_is_going_to_aim_button_ = value; +} + +bool OmniboxEditModel::FocusIsReturningFromAimButton() const { + return focus_is_returning_from_aim_button_; +} + +void OmniboxEditModel::SetFocusIsReturningFromAimButton(bool value) { + focus_is_returning_from_aim_button_ = value; +} + PrefService* OmniboxEditModel::GetPrefService() { return controller_->client()->GetPrefs(); } @@ -2219,10 +2233,8 @@ // wrong suggestion when stepping backwards. const OmniboxPopupSelection old_selection = GetPopupSelection(); OmniboxPopupSelection new_selection = old_selection.GetNextSelection( - autocomplete_controller()->result(), GetPrefService(), - controller_->client()->GetTemplateURLService(), direction, step, - OmniboxFieldTrial::IsHideSuggestionGroupHeadersEnabledInContext( - GetPageClassification())); + autocomplete_controller()->result(), + controller_->client()->GetTemplateURLService(), direction, step); if (kIsDesktop) { if (old_selection.IsChangeToKeyword(new_selection)) { ClearKeyword();
diff --git a/components/omnibox/browser/omnibox_edit_model.h b/components/omnibox/browser/omnibox_edit_model.h index 6029886a..fbb560c6 100644 --- a/components/omnibox/browser/omnibox_edit_model.h +++ b/components/omnibox/browser/omnibox_edit_model.h
@@ -494,6 +494,16 @@ size_t line, omnibox::mojom::NavigationPredictor navigation_predictor); + // These sentinel values are used to prevent the omnibox view from doing the + // usual bookkeeping when it loses or gains focus. This is necessary because + // when focus is transferred to the AIM button, we want to still consider the + // omnibox view to have focus for purposes of keeping the popup open and + // tracking the `OmniboxPopupSelection`. + bool FocusIsGoingToAimButton() const; + void SetFocusIsGoingToAimButton(bool value); + bool FocusIsReturningFromAimButton() const; + void SetFocusIsReturningFromAimButton(bool value); + // This calls `OpenMatch` directly for the few remaining `OmniboxEditModel` // test cases that require explicit control over match content. For new // tests, and for non-test code, use `OpenSelection`. @@ -835,6 +845,9 @@ // if equal. GURL old_focused_url_; + bool focus_is_going_to_aim_button_ = false; + bool focus_is_returning_from_aim_button_ = false; + base::WeakPtrFactory<OmniboxEditModel> weak_factory_{this}; };
diff --git a/components/omnibox/browser/omnibox_popup_selection.cc b/components/omnibox/browser/omnibox_popup_selection.cc index 2ed0847..26a2129 100644 --- a/components/omnibox/browser/omnibox_popup_selection.cc +++ b/components/omnibox/browser/omnibox_popup_selection.cc
@@ -10,6 +10,7 @@ #include "components/omnibox/browser/actions/omnibox_action.h" #include "components/omnibox/browser/autocomplete_match.h" #include "components/omnibox/browser/autocomplete_result.h" +#include "components/omnibox/common/omnibox_features.h" #include "components/search_engines/template_url_service.h" constexpr bool kIsDesktop = !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS); @@ -30,8 +31,7 @@ } bool OmniboxPopupSelection::IsControlPresentOnMatch( - const AutocompleteResult& result, - const PrefService* pref_service) const { + const AutocompleteResult& result) const { if (line >= result.size()) { return false; } @@ -63,11 +63,9 @@ OmniboxPopupSelection OmniboxPopupSelection::GetNextSelection( const AutocompleteResult& result, - const PrefService* pref_service, TemplateURLService* template_url_service, Direction direction, - Step step, - bool force_hide_row_header) const { + Step step) const { if (result.empty()) { return *this; } @@ -82,9 +80,7 @@ // in practice it's only something like ~10 elements long, and makes the code // easy to reason about. std::vector<OmniboxPopupSelection> all_available_selections = - GetAllAvailableSelectionsSorted(result, pref_service, - template_url_service, direction, step, - force_hide_row_header); + GetAllAvailableSelectionsSorted(result, template_url_service, step); if (all_available_selections.empty()) { return *this; @@ -131,15 +127,11 @@ NOTREACHED(); } -// static std::vector<OmniboxPopupSelection> OmniboxPopupSelection::GetAllAvailableSelectionsSorted( const AutocompleteResult& result, - const PrefService* pref_service, TemplateURLService* template_url_service, - Direction direction, - Step step, - bool force_hide_row_header) { + Step step) const { // First enumerate all the accessible states based on `direction` and `step`, // as well as enabled feature flags. This doesn't mean each match will have // all of these states - just that it's possible to get there, if available. @@ -152,6 +144,7 @@ all_states.push_back(NORMAL); all_states.push_back(KEYWORD_MODE); #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) + all_states.push_back(FOCUSED_BUTTON_AIM); all_states.push_back(FOCUSED_BUTTON_ACTION); #endif all_states.push_back(FOCUSED_BUTTON_THUMBS_UP); @@ -162,15 +155,31 @@ DCHECK(std::is_sorted(all_states.begin(), all_states.end())) << "This algorithm depends on a sorted list of line states."; - // Now, for each accessible line, add all the available line states to a list. std::vector<OmniboxPopupSelection> available_selections; + const bool aim_button_enabled = + base::FeatureList::IsEnabled(omnibox::kAiModeOmniboxEntryPoint); + // Special case which puts the AIM button as the first selection in the order + // only if there's no match selected yet (current line is `kNoMatch`). + if (aim_button_enabled && step == kStateOrLine && this->line == kNoMatch) { + available_selections.push_back( + OmniboxPopupSelection(kNoMatch, FOCUSED_BUTTON_AIM, 0)); + } + // Now, for each accessible line, add all the available line states to a list. for (size_t line_number = 0; line_number < result.size(); ++line_number) { for (LineState line_state : all_states) { - if (line_state == FOCUSED_BUTTON_ACTION) { + if (line_state == FOCUSED_BUTTON_AIM) { + // Only the first line should include the AIM button in the focus order, + // and only if we're not in keyword mode. + if (aim_button_enabled && line_number == 0 && + !result.match_at(0).from_keyword) { + available_selections.push_back( + OmniboxPopupSelection(line_number, line_state)); + } + } else if (line_state == FOCUSED_BUTTON_ACTION) { constexpr size_t kMaxActionCount = 8; for (size_t i = 0; i < kMaxActionCount; i++) { OmniboxPopupSelection selection(line_number, line_state, i); - if (selection.IsControlPresentOnMatch(result, pref_service)) { + if (selection.IsControlPresentOnMatch(result)) { available_selections.push_back(selection); } else { // Break early when there are no more actions. Note, this @@ -181,7 +190,7 @@ } } else if (line_state == KEYWORD_MODE && kIsDesktop) { OmniboxPopupSelection selection(line_number, line_state); - if (selection.IsControlPresentOnMatch(result, pref_service)) { + if (selection.IsControlPresentOnMatch(result)) { if (result.match_at(line_number) .HasInstantKeyword(template_url_service)) { if (available_selections.size() > 0 && @@ -199,7 +208,7 @@ } } else { OmniboxPopupSelection selection(line_number, line_state); - if (selection.IsControlPresentOnMatch(result, pref_service)) { + if (selection.IsControlPresentOnMatch(result)) { available_selections.push_back(selection); } }
diff --git a/components/omnibox/browser/omnibox_popup_selection.h b/components/omnibox/browser/omnibox_popup_selection.h index e1bdd6d..dbb5ef1c 100644 --- a/components/omnibox/browser/omnibox_popup_selection.h +++ b/components/omnibox/browser/omnibox_popup_selection.h
@@ -6,8 +6,7 @@ #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_POPUP_SELECTION_H_ #include <stddef.h> - -#include "components/prefs/pref_service.h" +#include <vector> class AutocompleteResult; class TemplateURLService; @@ -44,6 +43,10 @@ // focused. KEYWORD_MODE, + // FOCUSED_BUTTON_AIM state means that the AIM page action button in the + // omnibox text field is focused. + FOCUSED_BUTTON_AIM, + // FOCUSED_BUTTON_ACTION state means an Action button (such as a Pedal) // is in focus. FOCUSED_BUTTON_ACTION, @@ -97,8 +100,29 @@ friend bool operator==(const OmniboxPopupSelection&, const OmniboxPopupSelection&) = default; - friend auto operator<=>(const OmniboxPopupSelection&, - const OmniboxPopupSelection&) = default; + + // Special handling is required for ordering, since `kNoMatch` can have an + // associated `FOCUSED_BUTTON_AIM` state and we need `kNoMatch` to be treated + // as the smallest value. + friend std::strong_ordering operator<=>(const OmniboxPopupSelection& a, + const OmniboxPopupSelection& b) { + // `kNoMatch` is the is always less than other values. + if (a.line == kNoMatch && b.line != kNoMatch) { + return std::strong_ordering::less; + } + if (a.line != kNoMatch && b.line == kNoMatch) { + return std::strong_ordering::greater; + } + + // If both or neither have kNoMatch, proceed with member-wise comparison. + if (auto cmp = a.line <=> b.line; cmp != 0) { + return cmp; + } + if (auto cmp = a.state <=> b.state; cmp != 0) { + return cmp; + } + return a.action_index <=> b.action_index; + } // Returns true if going to this selection from given `from` selection // results in activation of keyword state when it wasn't active before. @@ -112,27 +136,21 @@ // Returns true if the control represented by this selection's `state` is // present on the match for `line` in given `result`. - bool IsControlPresentOnMatch(const AutocompleteResult& result, - const PrefService* pref_service) const; + bool IsControlPresentOnMatch(const AutocompleteResult& result) const; // Returns the next selection after this one in given `result`. OmniboxPopupSelection GetNextSelection( const AutocompleteResult& result, - const PrefService* pref_service, TemplateURLService* template_url_service, Direction direction, - Step step, - bool force_hide_row_header = false) const; + Step step) const; private: // This is a utility function to support `GetNextSelection`. - static std::vector<OmniboxPopupSelection> GetAllAvailableSelectionsSorted( + std::vector<OmniboxPopupSelection> GetAllAvailableSelectionsSorted( const AutocompleteResult& result, - const PrefService* pref_service, TemplateURLService* template_url_service, - Direction direction, - Step step, - bool force_hide_row_header); + Step step) const; }; #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_POPUP_SELECTION_H_
diff --git a/components/omnibox/browser/omnibox_popup_selection_unittest.cc b/components/omnibox/browser/omnibox_popup_selection_unittest.cc index 5d9aea28..fccd7cd 100644 --- a/components/omnibox/browser/omnibox_popup_selection_unittest.cc +++ b/components/omnibox/browser/omnibox_popup_selection_unittest.cc
@@ -54,53 +54,49 @@ result.match_at(1u)->associated_keyword->keyword = test_keyword; OmniboxPopupSelection next = OmniboxPopupSelection(0u).GetNextSelection( - result, &pref_service, client.GetTemplateURLService(), - Direction::kForward, Step::kWholeLine); + result, client.GetTemplateURLService(), Direction::kForward, + Step::kWholeLine); EXPECT_EQ(next.line, 1u); EXPECT_EQ(next.state, LineState::KEYWORD_MODE); next = OmniboxPopupSelection(0u).GetNextSelection( - result, &pref_service, client.GetTemplateURLService(), - Direction::kForward, Step::kStateOrLine); + result, client.GetTemplateURLService(), Direction::kForward, + Step::kStateOrLine); EXPECT_EQ(next.line, 1u); EXPECT_EQ(next.state, LineState::KEYWORD_MODE); next = OmniboxPopupSelection(1u, LineState::KEYWORD_MODE) - .GetNextSelection(result, &pref_service, - client.GetTemplateURLService(), + .GetNextSelection(result, client.GetTemplateURLService(), Direction::kForward, Step::kWholeLine); EXPECT_EQ(next.line, 2u); EXPECT_EQ(next.state, LineState::NORMAL); next = OmniboxPopupSelection(1u, LineState::KEYWORD_MODE) - .GetNextSelection(result, &pref_service, - client.GetTemplateURLService(), + .GetNextSelection(result, client.GetTemplateURLService(), Direction::kForward, Step::kStateOrLine); EXPECT_EQ(next.line, 2u); EXPECT_EQ(next.state, LineState::NORMAL); next = OmniboxPopupSelection(2u).GetNextSelection( - result, &pref_service, client.GetTemplateURLService(), - Direction::kForward, Step::kWholeLine); + result, client.GetTemplateURLService(), Direction::kForward, + Step::kWholeLine); EXPECT_EQ(next.line, 0u); EXPECT_EQ(next.state, LineState::NORMAL); next = OmniboxPopupSelection(2u).GetNextSelection( - result, &pref_service, client.GetTemplateURLService(), - Direction::kForward, Step::kStateOrLine); + result, client.GetTemplateURLService(), Direction::kForward, + Step::kStateOrLine); EXPECT_EQ(next.line, 2u); EXPECT_EQ(next.state, LineState::FOCUSED_BUTTON_THUMBS_UP); next = OmniboxPopupSelection(2u, LineState::FOCUSED_BUTTON_THUMBS_UP) - .GetNextSelection(result, &pref_service, - client.GetTemplateURLService(), + .GetNextSelection(result, client.GetTemplateURLService(), Direction::kForward, Step::kStateOrLine); EXPECT_EQ(next.line, 2u); EXPECT_EQ(next.state, LineState::FOCUSED_BUTTON_THUMBS_DOWN); next = OmniboxPopupSelection(2u, LineState::FOCUSED_BUTTON_THUMBS_DOWN) - .GetNextSelection(result, &pref_service, - client.GetTemplateURLService(), + .GetNextSelection(result, client.GetTemplateURLService(), Direction::kForward, Step::kStateOrLine); EXPECT_EQ(next.line, 0u); EXPECT_EQ(next.state, LineState::NORMAL);
diff --git a/components/omnibox/browser/omnibox_popup_view.h b/components/omnibox/browser/omnibox_popup_view.h index 0ff10925..984f666 100644 --- a/components/omnibox/browser/omnibox_popup_view.h +++ b/components/omnibox/browser/omnibox_popup_view.h
@@ -50,6 +50,12 @@ virtual void OnSelectionChanged(OmniboxPopupSelection old_selection, OmniboxPopupSelection new_selection) {} + // Requests focus for the AIM button in the omnibox text field. While the AIM + // button is actually hosted in the omnibox text field, logically it's + // considered part of the popup, which handles its focus management, so this + // method is defined here. + virtual void RequestAimButtonFocus() {} + // Redraws the popup window to match any changes in the result set; this may // mean opening or closing the window. virtual void UpdatePopupAppearance() = 0;
diff --git a/components/omnibox/browser/omnibox_view.h b/components/omnibox/browser/omnibox_view.h index 443258ad..a33cfc7 100644 --- a/components/omnibox/browser/omnibox_view.h +++ b/components/omnibox/browser/omnibox_view.h
@@ -149,6 +149,11 @@ // automatically focused (like for browser startup or NTP load). virtual void SetFocus(bool is_user_initiated) = 0; + // Requests focus for the implementation of the omnibox view only, skipping + // all of the bookkeeping done by `SetFocus()`. Used to return focus to the + // omnibox from the AI mode button. + virtual void RequestViewFocus() = 0; + // Shows or hides the caret based on whether the model's is_caret_visible() is // true. virtual void ApplyCaretVisibility() = 0;
diff --git a/components/omnibox/browser/test_omnibox_view.h b/components/omnibox/browser/test_omnibox_view.h index 264c6727..2ab387ee 100644 --- a/components/omnibox/browser/test_omnibox_view.h +++ b/components/omnibox/browser/test_omnibox_view.h
@@ -44,6 +44,7 @@ void SelectAll(bool reversed) override; void UpdatePopup() override {} void SetFocus(bool is_user_initiated) override {} + void RequestViewFocus() override {} void ApplyCaretVisibility() override {} void OnTemporaryTextMaybeChanged(const std::u16string& display_text, const AutocompleteMatch& match,
diff --git a/components/optimization_guide/content/browser/page_content_proto_util.cc b/components/optimization_guide/content/browser/page_content_proto_util.cc index 62678e3..4ebcba6c 100644 --- a/components/optimization_guide/content/browser/page_content_proto_util.cc +++ b/components/optimization_guide/content/browser/page_content_proto_util.cc
@@ -621,7 +621,10 @@ optimization_guide::proto::FrameData* proto_frame_data, blink::mojom::PageMetadata& metadata, FrameTokenSet& frame_token_set) { - ConvertFrameMetadata(render_frame_info.url, mojom_frame_data, metadata); + ConvertFrameMetadata( + render_frame_info.source_origin.GetTupleOrPrecursorTupleIfOpaque() + .GetURL(), + mojom_frame_data, metadata); SecurityOriginSerializer::Serialize( render_frame_info.source_origin, proto_frame_data->mutable_security_origin());
diff --git a/components/optimization_guide/core/model_execution/performance_class.cc b/components/optimization_guide/core/model_execution/performance_class.cc index 87997b1..45e2b35c 100644 --- a/components/optimization_guide/core/model_execution/performance_class.cc +++ b/components/optimization_guide/core/model_execution/performance_class.cc
@@ -169,12 +169,6 @@ void PerformanceClassifier::Init() { CHECK_EQ(performance_class_state_, PerformanceClassState::kNotStarted); CHECK(performance_class_callbacks_.empty()); - // TODO: crbug.com/432041523 - Update integration tests to force performance - // class explicitly. - if (switches::GetOnDeviceValidationWriteToFile()) { - UpdatePerformanceClassPref(local_state_, - OnDeviceModelPerformanceClass::kVeryHigh); - } OnDeviceModelPerformanceClass override_class = GetPerformanceClassSwitch(); if (override_class != OnDeviceModelPerformanceClass::kUnknown) { UpdatePerformanceClassPref(local_state_, override_class);
diff --git a/components/optimization_guide/proto/BUILD.gn b/components/optimization_guide/proto/BUILD.gn index a85ceb3..414ad52a 100644 --- a/components/optimization_guide/proto/BUILD.gn +++ b/components/optimization_guide/proto/BUILD.gn
@@ -94,6 +94,7 @@ "features/common_quality_data.proto", "hints.proto", "loading_predictor_metadata.proto", + "model_execution.proto", "models.proto", "push_notification.proto", ]
diff --git a/components/policy/resources/templates/policy_definitions/Sharing/TabGroupSharingSettings.yaml b/components/policy/resources/templates/policy_definitions/Sharing/TabGroupSharingSettings.yaml index 4735a9d..a670fbf5 100644 --- a/components/policy/resources/templates/policy_definitions/Sharing/TabGroupSharingSettings.yaml +++ b/components/policy/resources/templates/policy_definitions/Sharing/TabGroupSharingSettings.yaml
@@ -12,9 +12,8 @@ supported_on: - android:140- - chrome.*:140- +- chrome_os:140- - ios:140- -future_on: -- chrome_os features: cloud_only: true dynamic_refresh: true
diff --git a/components/services/storage/public/mojom/storage_service.mojom b/components/services/storage/public/mojom/storage_service.mojom index 30d78744..76a45863 100644 --- a/components/services/storage/public/mojom/storage_service.mojom +++ b/components/services/storage/public/mojom/storage_service.mojom
@@ -18,16 +18,6 @@ [EnableIfNot=is_chromeos|is_linux] const sandbox.mojom.Sandbox kStorageSandbox = sandbox.mojom.Sandbox.kService; -// Enum used as a crash key to help investigate Storage process crashes on -// various platforms. -// TODO(crbug.com/396030877): Fix the bug and remove this enum. -enum StorageLifecycle { - kInitializing, - kInitializingWithUnboundStorageService, - kRecovering, - kRecoveringWithUnboundStorageService, -}; - // The main interface into the Storage Service. The browser maintains a single // global connection to this interface. [ServiceSandbox=kStorageSandbox] @@ -58,11 +48,7 @@ // directory within the user data directory. If `path` is null, the storage // will be in-memory and all data will be discarded when the client // disconnects. - // Includes a `lifecycle` param which is used as a crash key to help root - // cause a Storage process crash in LocalStorage code. - // TODO(crbug.com/396030877): Fix the bug and remove the `lifecycle` param. BindSessionStorageControl(mojo_base.mojom.FilePath? path, - StorageLifecycle lifecycle, pending_receiver<SessionStorageControl> receiver); // Binds the main control interface for Local Storage associated with the @@ -72,11 +58,7 @@ // directory within the user data directory. If `path` is null, the storage // will be in-memory and all data will be discarded when the client // disconnects. - // Includes a `lifecycle` param which is used as a crash key to help root - // cause a Storage process crash in LocalStorage code. - // TODO(crbug.com/396030877): Fix the bug and remove the `lifecycle` param. BindLocalStorageControl(mojo_base.mojom.FilePath? path, - StorageLifecycle lifecycle, pending_receiver<LocalStorageControl> receiver); // Binds a receiving endpoint for the TestApi interface defined in
diff --git a/components/services/storage/storage_service_impl.cc b/components/services/storage/storage_service_impl.cc index 926b7ce..5f2b6c1 100644 --- a/components/services/storage/storage_service_impl.cc +++ b/components/services/storage/storage_service_impl.cc
@@ -4,9 +4,8 @@ #include "components/services/storage/storage_service_impl.h" -#include "base/debug/crash_logging.h" -#include "base/debug/dump_without_crashing.h" #include "base/functional/bind.h" +#include "base/not_fatal_until.h" #include "base/task/sequenced_task_runner.h" #include "base/task/thread_pool.h" #include "build/build_config.h" @@ -79,8 +78,7 @@ mojo::PendingReceiver<mojom::StorageService> receiver, scoped_refptr<base::SequencedTaskRunner> io_task_runner) : receiver_(this, std::move(receiver)), - io_task_runner_(std::move(io_task_runner)), - creation_time_(base::Time::Now()) {} + io_task_runner_(std::move(io_task_runner)) {} StorageServiceImpl::~StorageServiceImpl() { // ShutDown storages before we destroy the service. We transfer ownership of @@ -129,30 +127,17 @@ void StorageServiceImpl::BindLocalStorageControl( const std::optional<base::FilePath>& path, - mojom::StorageLifecycle lifecycle, mojo::PendingReceiver<mojom::LocalStorageControl> receiver) { - base::TimeDelta timedelta = base::Time::Now() - creation_time_; - if (path.has_value()) { if (!path->IsAbsolute()) { // Refuse to bind LocalStorage for relative paths. return; } + // TODO(crbug.com/396030877): Remove this workaround to remove the + // pre-existing LocalStorage once the issue is resolved. auto iter = persistent_local_storage_map_.find(*path); - // The map shouldn't contain an entry for this path. We should only bind a - // LocalStorage mojom::Receiver once. If this doesn't occur, we collect - // a crash dump to help diagnose the issue and safely shut down the existing - // local storage instance. - // TODO(crbug.com/396030877): Remove this DWoC and workaround once the issue - // is resolved. if (iter != persistent_local_storage_map_.end()) { - SCOPED_CRASH_KEY_NUMBER("396030877", "local_storage_lifecycle", - static_cast<int>(lifecycle)); - SCOPED_CRASH_KEY_NUMBER("396030877", "local_storage_timedelta", - timedelta.InMilliseconds()); - base::debug::DumpWithoutCrashing(); - ShutDownAndRemoveLocalStorage(iter->second); } } @@ -171,30 +156,17 @@ void StorageServiceImpl::BindSessionStorageControl( const std::optional<base::FilePath>& path, - mojom::StorageLifecycle lifecycle, mojo::PendingReceiver<mojom::SessionStorageControl> receiver) { - base::TimeDelta timedelta = base::Time::Now() - creation_time_; - if (path.has_value()) { if (!path->IsAbsolute()) { // Refuse to bind SessionStorage for relative paths. return; } + // TODO(crbug.com/396030877): Remove this workaround to remove the + // pre-existing SessionStorage once the issue is resolved. auto iter = persistent_session_storage_map_.find(*path); - // The map shouldn't contain an entry for this path. We should only bind a - // a SessionStorage mojom::Receiver once. If this doesn't occur, we collect - // a crash dump to help diagnose the issue and safely shut down the existing - // session storage instance. - // TODO(crbug.com/396030877): Remove this DWoC and workaround once the issue - // is resolved. if (iter != persistent_session_storage_map_.end()) { - SCOPED_CRASH_KEY_NUMBER("396030877", "session_storage_lifecycle", - static_cast<int>(lifecycle)); - SCOPED_CRASH_KEY_NUMBER("396030877", "session_storage_timedelta", - timedelta.InMilliseconds()); - base::debug::DumpWithoutCrashing(); - ShutDownAndRemoveSessionStorage(iter->second); } }
diff --git a/components/services/storage/storage_service_impl.h b/components/services/storage/storage_service_impl.h index e453155..705d021 100644 --- a/components/services/storage/storage_service_impl.h +++ b/components/services/storage/storage_service_impl.h
@@ -9,12 +9,10 @@ #include <set> #include "base/containers/unique_ptr_adapters.h" -#include "base/feature_list.h" #include "base/files/file_path.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/task/sequenced_task_runner.h" -#include "base/time/time.h" #include "build/build_config.h" #include "components/services/storage/public/mojom/filesystem/directory.mojom.h" #include "components/services/storage/public/mojom/storage_service.mojom.h" @@ -26,7 +24,6 @@ class LocalStorageImpl; class SessionStorageImpl; - // Implementation of the main StorageService Mojo interface. This is the root // owner of all Storage service instance state, managing the set of active // persistent and in-memory local and session storage instances. @@ -53,11 +50,9 @@ #endif void BindLocalStorageControl( const std::optional<base::FilePath>& path, - mojom::StorageLifecycle lifecycle, mojo::PendingReceiver<mojom::LocalStorageControl> receiver) override; void BindSessionStorageControl( const std::optional<base::FilePath>& path, - mojom::StorageLifecycle lifecycle, mojo::PendingReceiver<mojom::SessionStorageControl> receiver) override; void BindTestApi(mojo::ScopedMessagePipeHandle test_api_receiver) override; @@ -80,7 +75,6 @@ const mojo::Receiver<mojom::StorageService> receiver_; const scoped_refptr<base::SequencedTaskRunner> io_task_runner_; - base::Time creation_time_; #if !BUILDFLAG(IS_ANDROID) // If bound, the service will assume it should not perform certain filesystem
diff --git a/components/services/storage/storage_service_impl_unittest.cc b/components/services/storage/storage_service_impl_unittest.cc index 2c77b17..ccce9da 100644 --- a/components/services/storage/storage_service_impl_unittest.cc +++ b/components/services/storage/storage_service_impl_unittest.cc
@@ -39,8 +39,7 @@ mojo::Remote<storage::mojom::LocalStorageControl> storage_control; const base::FilePath kTestRelativePath{FILE_PATH_LITERAL("invalid")}; remote_service()->BindLocalStorageControl( - kTestRelativePath, storage::mojom::StorageLifecycle::kInitializing, - storage_control.BindNewPipeAndPassReceiver()); + kTestRelativePath, storage_control.BindNewPipeAndPassReceiver()); // The BindLocalStorageControl request should be ignored by the service, // resulting in disconnection. @@ -56,8 +55,7 @@ mojo::Remote<storage::mojom::SessionStorageControl> storage_control; const base::FilePath kTestRelativePath{FILE_PATH_LITERAL("invalid")}; remote_service()->BindSessionStorageControl( - kTestRelativePath, storage::mojom::StorageLifecycle::kInitializing, - storage_control.BindNewPipeAndPassReceiver()); + kTestRelativePath, storage_control.BindNewPipeAndPassReceiver()); // The BindSessionStorageControl request should be ignored by the service, // resulting in disconnection.
diff --git a/components/supervised_user/core/browser/android/content_filters_observer_bridge.cc b/components/supervised_user/core/browser/android/content_filters_observer_bridge.cc index 52c2dab..b932bec 100644 --- a/components/supervised_user/core/browser/android/content_filters_observer_bridge.cc +++ b/components/supervised_user/core/browser/android/content_filters_observer_bridge.cc
@@ -22,7 +22,8 @@ // Each of the content filters have their own kill switch. This function // returns true if the feature is enabled for the given setting. bool IsFeatureEnabledForSetting(std::string_view setting_name) { - if (!UseLocalSupervision()) { + if (!base::FeatureList::IsEnabled( + kPropagateDeviceContentFiltersToSupervisedUser)) { return false; } @@ -52,7 +53,8 @@ base::RepeatingClosure on_disabled) : setting_name_(setting_name), on_enabled_(on_enabled), - on_disabled_(on_disabled) {} + on_disabled_(on_disabled) { +} ContentFiltersObserverBridge::~ContentFiltersObserverBridge() { if (bridge_) {
diff --git a/components/supervised_user/core/browser/kids_chrome_management_url_checker_client.cc b/components/supervised_user/core/browser/kids_chrome_management_url_checker_client.cc index ea416410..f2f1444 100644 --- a/components/supervised_user/core/browser/kids_chrome_management_url_checker_client.cc +++ b/components/supervised_user/core/browser/kids_chrome_management_url_checker_client.cc
@@ -75,21 +75,16 @@ "controls"; return kClassifyUrlConfigBestEffort; #elif BUILDFLAG(IS_ANDROID) - // Android enforces at the OS level that family link supervised users must - // have valid sign in credentials (and triggers a reauth if not). We can - // therefore wait for a valid access token to be available before calling - // ClassifyUrl, to avoid window conditions where the access token is not yet - // available (eg. during startup). + // Android enforces at the OS level that supervised users must have valid sign + // in credentials (and triggers a reauth if not). We can therefore wait for a + // valid access token to be available before calling ClassifyUrl, to avoid + // window conditions where the access token is not yet available (eg. during + // startup). All other users can try with their credentials if available. if (is_subject_to_parental_controls || - !ClassifyUrlWithoutCredentialsForLocalSupervision()) { + !base::FeatureList::IsEnabled(kAllowNonFamilyLinkUrlFilterMode)) { return kClassifyUrlConfigWaitUntilAccessTokenAvailable; } - - CHECK(!is_subject_to_parental_controls && - ClassifyUrlWithoutCredentialsForLocalSupervision()) - << "Mode not intended for family link users (or misconfigured " - "experiment; enable kAllowNonFamilyLinkUrlFilterMode (backs " - "ClassifyUrlWithoutCredentialsForLocalSupervision()))"; + // Other android users do not include credentials. return kClassifyUrlConfigWithoutCredentials; #else // Other platforms use default configuration, which strictly requires
diff --git a/components/supervised_user/core/common/features.cc b/components/supervised_user/core/common/features.cc index 18216bc..d1aecfbf 100644 --- a/components/supervised_user/core/common/features.cc +++ b/components/supervised_user/core/common/features.cc
@@ -10,8 +10,6 @@ #include "base/check_op.h" #include "base/feature_list.h" #include "base/metrics/field_trial_params.h" -#include "base/strings/string_util.h" -#include "base/system/sys_info.h" #include "build/android_buildflags.h" #include "build/branding_buildflags.h" #include "build/build_config.h" @@ -100,6 +98,7 @@ base::FEATURE_ENABLED_BY_DEFAULT); #endif + BASE_FEATURE(kAlignSafeSitesValueWithBrowserDefault, "AlignSafeSitesValueWithBrowserDefault", base::FEATURE_ENABLED_BY_DEFAULT); @@ -113,61 +112,18 @@ BASE_FEATURE(kPropagateDeviceContentFiltersToSupervisedUser, "PropagateDeviceContentFiltersToSupervisedUser", base::FEATURE_DISABLED_BY_DEFAULT); -BASE_FEATURE(kSupervisedUserBrowserContentFiltersKillSwitch, - "SupervisedUserBrowserContentFiltersKillSwitch", - base::FEATURE_ENABLED_BY_DEFAULT); -BASE_FEATURE(kSupervisedUserSearchContentFiltersKillSwitch, - "SupervisedUserSearchContentFiltersKillSwitch", - base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kSupervisedUserClearDeviceContentFiltersPrefsOnStartup, "SupervisedUserClearDeviceContentFiltersPrefsOnStartup", base::FEATURE_DISABLED_BY_DEFAULT); +BASE_FEATURE(kSupervisedUserBrowserContentFiltersKillSwitch, + "SupervisedUserBrowserContentFiltersKillSwitch", + base::FEATURE_ENABLED_BY_DEFAULT); +BASE_FEATURE(kSupervisedUserSearchContentFiltersKillSwitch, + "SupervisedUserSearchContentFiltersKillSwitch", + base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kSupervisedUserInterstitialWithoutApprovals, "SupervisedUserInterstitialWithoutApprovals", base::FEATURE_DISABLED_BY_DEFAULT); -BASE_FEATURE(kSupervisedUserLocalSupervisionPreview, - "SupervisedUserLocalSupervisionPreview", - base::FEATURE_ENABLED_BY_DEFAULT); - -const base::FeatureParam<std::string> - kSupervisedUserLocalSupervisionPreviewBuildVersionMajor{ - &kSupervisedUserLocalSupervisionPreview, "build_version_major", "BP41"}; - -namespace { -bool PlatformSupportsLocalSupervision() { - int32_t major, minor, bugfix; - base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); - bool supported_by_os = (major == 16 && minor >= 1) || major > 16; - - bool supported_by_build = base::StartsWith( - base::SysInfo::GetAndroidBuildID(), - kSupervisedUserLocalSupervisionPreviewBuildVersionMajor.Get(), - base::CompareCase::SENSITIVE); - - return supported_by_os || supported_by_build; -} - -bool IsLocalSupervisionEnabled() { - return PlatformSupportsLocalSupervision() && - base::FeatureList::IsEnabled(kSupervisedUserLocalSupervisionPreview); -} -} // namespace - -bool UseLocalSupervision() { - return IsLocalSupervisionEnabled() || - base::FeatureList::IsEnabled( - kPropagateDeviceContentFiltersToSupervisedUser); -} -bool UseInterstitialForLocalSupervision() { - return IsLocalSupervisionEnabled() || - base::FeatureList::IsEnabled( - kSupervisedUserInterstitialWithoutApprovals); -} -bool ClassifyUrlWithoutCredentialsForLocalSupervision() { - return IsLocalSupervisionEnabled() || - base::FeatureList::IsEnabled(kAllowNonFamilyLinkUrlFilterMode); -} - #endif } // namespace supervised_user
diff --git a/components/supervised_user/core/common/features.h b/components/supervised_user/core/common/features.h index 1add6fd..11255b1a 100644 --- a/components/supervised_user/core/common/features.h +++ b/components/supervised_user/core/common/features.h
@@ -51,55 +51,20 @@ BASE_DECLARE_FEATURE(kDecoupleSafeSitesFromMainSwitch); #if BUILDFLAG(IS_ANDROID) -// The flags below are used to control the local supervision feature on -// Android. To read them, use accessors declared below. -// -// - kPropagateDeviceContentFiltersToSupervisedUser, -// kAllowNonFamilyLinkUrlFilterMode and -// are kSupervisedUserInterstitialWithoutApprovals the three main switches for -// local supervision. They work best when enabled together. -// kPropagateDeviceContentFiltersToSupervisedUser is the main switch that -// enables the feature, kAllowNonFamilyLinkUrlFilterMode gives access to feature -// for signed out users, and kSupervisedUserInterstitialWithoutApprovals enables -// interstitial UI optimized for local supervision. -// -// - kSupervisedUserLocalSupervisionPreview is a convenience feature that -// enables all of the above features if the experimental platform supports them. -// When this feature is enabled and the platform supports local supervision, -// none of the three features are ever read. This allows offering local -// supervision as dogfood feature. Use -// kSupervisedUserLocalSupervisionPreviewBuildVersionMajor parameters to adjust -// the platform build version if needed. -// -// - kSupervisedUserBrowserContentFiltersKillSwitch and -// kSupervisedUserSearchContentFiltersKillSwitch are subswitches of -// kPropagateDeviceContentFiltersToSupervisedUser that control individual -// content filter settings. -// -// - kSupervisedUserClearDeviceContentFiltersPrefsOnStartup is a kill switch -// for clearing device content filters prefs from user store on startup. - +// Allows the URL classification mode without credentials, if the profile is not +// managed by the family link System. BASE_DECLARE_FEATURE(kAllowNonFamilyLinkUrlFilterMode); + +// Propagates the device settings about content filters to the supervised user +// content filters. BASE_DECLARE_FEATURE(kPropagateDeviceContentFiltersToSupervisedUser); +BASE_DECLARE_FEATURE(kSupervisedUserClearDeviceContentFiltersPrefsOnStartup); +// Kill switches for the respective content filters. BASE_DECLARE_FEATURE(kSupervisedUserBrowserContentFiltersKillSwitch); BASE_DECLARE_FEATURE(kSupervisedUserSearchContentFiltersKillSwitch); -BASE_DECLARE_FEATURE(kSupervisedUserClearDeviceContentFiltersPrefsOnStartup); + +// Enabled the supervised user interstitial without approvals section. BASE_DECLARE_FEATURE(kSupervisedUserInterstitialWithoutApprovals); -BASE_DECLARE_FEATURE(kSupervisedUserLocalSupervisionPreview); - -// The major version of the build that supports local supervision. -extern const base::FeatureParam<std::string> - kSupervisedUserLocalSupervisionPreviewBuildVersionMajor; - -// Returns true when the browser reads the values of content filters for -// local supervision. This is the main gate to local supervision. -bool UseLocalSupervision(); -// Indicates if supervised user interstitial should be optimized for local -// supervision, without parent information and approval features. -bool UseInterstitialForLocalSupervision(); -// Allows non-signed in users to use url classification feature of local -// supervision. -bool ClassifyUrlWithoutCredentialsForLocalSupervision(); #endif // Returns whether the V3 version of the URL filter interstitial is
diff --git a/components/user_data_importer/content/content_bookmark_parser.cc b/components/user_data_importer/content/content_bookmark_parser.cc index 1bc72a2..26558a1d 100644 --- a/components/user_data_importer/content/content_bookmark_parser.cc +++ b/components/user_data_importer/content/content_bookmark_parser.cc
@@ -17,8 +17,8 @@ namespace user_data_importer { // Declared in bookmark_parser.h. -scoped_refptr<BookmarkParser> MakeBookmarkParser() { - return base::MakeRefCounted<ContentBookmarkParser>(); +std::unique_ptr<BookmarkParser> MakeBookmarkParser() { + return std::make_unique<ContentBookmarkParser>(); } ContentBookmarkParser::ContentBookmarkParser() { @@ -93,7 +93,7 @@ html_parser_remote_->Parse( std::move(raw_html), base::BindOnce(&ContentBookmarkParser::OnParseFinished, - base::WrapRefCounted(this), std::move(callback))); + weak_ptr_factory_.GetWeakPtr(), std::move(callback))); } void ContentBookmarkParser::OnParseFinished(
diff --git a/components/user_data_importer/content/content_bookmark_parser.h b/components/user_data_importer/content/content_bookmark_parser.h index b7d14aeaf..cebc1ae 100644 --- a/components/user_data_importer/content/content_bookmark_parser.h +++ b/components/user_data_importer/content/content_bookmark_parser.h
@@ -30,6 +30,7 @@ class ContentBookmarkParser : public BookmarkParser { public: ContentBookmarkParser(); + ~ContentBookmarkParser() override; // BookmarkParser: // Reads the file contents and then launches the actual parsing on the utility @@ -45,10 +46,6 @@ parser); private: - friend class base::RefCountedThreadSafe<ContentBookmarkParser>; - - ~ContentBookmarkParser() override; - void ParseImpl(std::string raw_html, BookmarkParser::BookmarkParsingCallback callback); @@ -64,6 +61,8 @@ mojo::PendingRemote<mojom::BookmarkHtmlParser> html_parser_for_testing_; SEQUENCE_CHECKER(sequence_checker_); + + base::WeakPtrFactory<ContentBookmarkParser> weak_ptr_factory_{this}; }; } // namespace user_data_importer
diff --git a/components/user_data_importer/content/stable_portability_data_importer.cc b/components/user_data_importer/content/stable_portability_data_importer.cc index a25d0a8..3c78936 100644 --- a/components/user_data_importer/content/stable_portability_data_importer.cc +++ b/components/user_data_importer/content/stable_portability_data_importer.cc
@@ -57,7 +57,7 @@ history::HistoryService* history_service, bookmarks::BookmarkModel* bookmark_model, ReadingListModel* reading_list_model, - scoped_refptr<ContentBookmarkParser> bookmark_parser) + std::unique_ptr<ContentBookmarkParser> bookmark_parser) : history_service_(history_service), bookmark_model_(bookmark_model), reading_list_model_(reading_list_model), @@ -65,7 +65,7 @@ base::SequencedTaskRunner::GetCurrentDefault()), background_task_runner_(base::ThreadPool::CreateSequencedTaskRunner( {base::MayBlock(), base::TaskPriority::USER_VISIBLE})), - background_worker_(background_task_runner_, std::move(bookmark_parser)){ + background_worker_(background_task_runner_, std::move(bookmark_parser)) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); } @@ -253,7 +253,7 @@ } StablePortabilityDataImporter::BackgroundWorker::BackgroundWorker( - scoped_refptr<ContentBookmarkParser> bookmark_parser) + std::unique_ptr<ContentBookmarkParser> bookmark_parser) : bookmark_parser_(std::move(bookmark_parser)) {} StablePortabilityDataImporter::BackgroundWorker::~BackgroundWorker() = default;
diff --git a/components/user_data_importer/content/stable_portability_data_importer.h b/components/user_data_importer/content/stable_portability_data_importer.h index 2b54f1d..134e31e 100644 --- a/components/user_data_importer/content/stable_portability_data_importer.h +++ b/components/user_data_importer/content/stable_portability_data_importer.h
@@ -48,7 +48,7 @@ history::HistoryService* history_service, bookmarks::BookmarkModel* bookmark_model, ReadingListModel* reading_list_model, - scoped_refptr<ContentBookmarkParser> bookmark_parser); + std::unique_ptr<ContentBookmarkParser> bookmark_parser); ~StablePortabilityDataImporter(); // Attempts to import bookmarks from the given `file`. `bookmarks_callback` is @@ -107,7 +107,7 @@ class BackgroundWorker { public: explicit BackgroundWorker( - scoped_refptr<ContentBookmarkParser> bookmark_parser); + std::unique_ptr<ContentBookmarkParser> bookmark_parser); ~BackgroundWorker(); void ParseBookmarks( @@ -123,7 +123,7 @@ #endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) private: - scoped_refptr<ContentBookmarkParser> bookmark_parser_; + std::unique_ptr<ContentBookmarkParser> bookmark_parser_; }; friend class StablePortabilityDataImporterTest;
diff --git a/components/user_data_importer/content/stable_portability_data_importer_unittest.cc b/components/user_data_importer/content/stable_portability_data_importer_unittest.cc index 106ad25f..46d1da4 100644 --- a/components/user_data_importer/content/stable_portability_data_importer_unittest.cc +++ b/components/user_data_importer/content/stable_portability_data_importer_unittest.cc
@@ -125,7 +125,7 @@ void SetUp() override { bookmark_model_ = bookmarks::TestBookmarkClient::CreateModel(); - auto parser = base::MakeRefCounted<ContentBookmarkParser>(); + auto parser = std::make_unique<ContentBookmarkParser>(); parser->SetServiceForTesting(receiver_.BindNewPipeAndPassRemote()); auto storage = std::make_unique<FakeReadingListModelStorage>();
diff --git a/components/user_data_importer/ios/ios_bookmark_parser.h b/components/user_data_importer/ios/ios_bookmark_parser.h index 49ddb5646..c46d692 100644 --- a/components/user_data_importer/ios/ios_bookmark_parser.h +++ b/components/user_data_importer/ios/ios_bookmark_parser.h
@@ -21,15 +21,12 @@ class IOSBookmarkParser : public BookmarkParser { public: IOSBookmarkParser(); + ~IOSBookmarkParser() override; void Parse(const base::FilePath& file, BookmarkParser::BookmarkParsingCallback callback) override; private: - friend class base::RefCountedThreadSafe<BookmarkParser>; - - ~IOSBookmarkParser() override; - // Injects JS into the WebView to cause parsing of the currently loaded // content. void TriggerParseInJS(BookmarkParser::BookmarkParsingCallback callback);
diff --git a/components/user_data_importer/ios/ios_bookmark_parser.mm b/components/user_data_importer/ios/ios_bookmark_parser.mm index a5976c9..4fb61ef5 100644 --- a/components/user_data_importer/ios/ios_bookmark_parser.mm +++ b/components/user_data_importer/ios/ios_bookmark_parser.mm
@@ -189,8 +189,8 @@ } // namespace // Declared in bookmark_parser.h. -scoped_refptr<BookmarkParser> MakeBookmarkParser() { - return base::MakeRefCounted<IOSBookmarkParser>(); +std::unique_ptr<BookmarkParser> MakeBookmarkParser() { + return std::make_unique<IOSBookmarkParser>(); } IOSBookmarkParser::IOSBookmarkParser() {
diff --git a/components/user_data_importer/utility/bookmark_parser.h b/components/user_data_importer/utility/bookmark_parser.h index 2f0db9d..0b226d2e 100644 --- a/components/user_data_importer/utility/bookmark_parser.h +++ b/components/user_data_importer/utility/bookmark_parser.h
@@ -6,7 +6,6 @@ #define COMPONENTS_USER_DATA_IMPORTER_UTILITY_BOOKMARK_PARSER_H_ #include "base/functional/callback.h" -#include "base/memory/ref_counted.h" #include "base/types/expected.h" #include "components/favicon_base/favicon_usage_data.h" #include "components/user_data_importer/common/imported_bookmark_entry.h" @@ -19,9 +18,7 @@ namespace user_data_importer { // Interface for opening and parsing an HTML file containing bookmarks. -// RefCountedThreadSafe because one of its implementations needs to jump between -// sequences. See `ContentBookmarkParser`. -class BookmarkParser : public base::RefCountedThreadSafe<BookmarkParser> { +class BookmarkParser { public: // Result of a successful invocation of `ParseBookmarks` below. struct ParsedBookmarks { @@ -65,6 +62,8 @@ kOther }; + virtual ~BookmarkParser() = default; + using BookmarkParsingResult = base::expected<ParsedBookmarks, BookmarkParsingError>; using BookmarkParsingCallback = @@ -77,16 +76,11 @@ // Invokes `callback` with the result of parsing. virtual void Parse(const base::FilePath& bookmarks_html, BookmarkParsingCallback callback) = 0; - - protected: - friend class base::RefCountedThreadSafe<BookmarkParser>; - - virtual ~BookmarkParser() = default; }; // Returns a suitable concrete BookmarkParser instance. See implementations in // ios_bookmark_parser.mm and content_bookmark_parser.cc. -scoped_refptr<BookmarkParser> MakeBookmarkParser(); +std::unique_ptr<BookmarkParser> MakeBookmarkParser(); } // namespace user_data_importer
diff --git a/components/user_data_importer/utility/safari_data_importer.cc b/components/user_data_importer/utility/safari_data_importer.cc index bce51f8..5841120 100644 --- a/components/user_data_importer/utility/safari_data_importer.cc +++ b/components/user_data_importer/utility/safari_data_importer.cc
@@ -195,7 +195,7 @@ bookmarks::BookmarkModel* bookmark_model, ReadingListModel* reading_list_model, syncer::SyncService* sync_service, - scoped_refptr<BookmarkParser> bookmark_parser, + std::unique_ptr<BookmarkParser> bookmark_parser, std::string app_locale) : blocking_queue_(base::ThreadPool::CreateSequencedTaskRunner( {base::MayBlock(), base::TaskPriority::USER_VISIBLE})), @@ -275,7 +275,7 @@ } SafariDataImporter::BlockingWorker::BlockingWorker( - scoped_refptr<BookmarkParser> bookmark_parser) + std::unique_ptr<BookmarkParser> bookmark_parser) : bookmark_parser_(std::move(bookmark_parser)) {} SafariDataImporter::BlockingWorker::~BlockingWorker() = default;
diff --git a/components/user_data_importer/utility/safari_data_importer.h b/components/user_data_importer/utility/safari_data_importer.h index a975617b..31b3cc0 100644 --- a/components/user_data_importer/utility/safari_data_importer.h +++ b/components/user_data_importer/utility/safari_data_importer.h
@@ -63,7 +63,7 @@ bookmarks::BookmarkModel* bookmark_model, ReadingListModel* reading_list_model, syncer::SyncService* sync_service, - scoped_refptr<BookmarkParser> bookmark_parser, + std::unique_ptr<BookmarkParser> bookmark_parser, std::string app_locale); ~SafariDataImporter(); @@ -88,7 +88,7 @@ // `SafariDataImporter`. class BlockingWorker { public: - explicit BlockingWorker(scoped_refptr<BookmarkParser> bookmark_parser); + explicit BlockingWorker(std::unique_ptr<BookmarkParser> bookmark_parser); ~BlockingWorker(); // Creates the zip file Rust archive from file provided by "zip_filename". @@ -129,7 +129,7 @@ size_t history_size_threshold); // The model-layer object used to parse bookmarks from an HTML file. - scoped_refptr<BookmarkParser> bookmark_parser_; + std::unique_ptr<BookmarkParser> bookmark_parser_; // The Rust zip file archive. std::optional<rust::Box<ZipFileArchive>> zip_file_archive_;
diff --git a/components/user_data_importer/utility/safari_data_importer_unittest.cc b/components/user_data_importer/utility/safari_data_importer_unittest.cc index 38e9573..7d7303e 100644 --- a/components/user_data_importer/utility/safari_data_importer_unittest.cc +++ b/components/user_data_importer/utility/safari_data_importer_unittest.cc
@@ -151,7 +151,7 @@ #if BUILDFLAG(IS_IOS) auto parser = MakeBookmarkParser(); #else - auto parser = base::MakeRefCounted<ContentBookmarkParser>(); + auto parser = std::make_unique<ContentBookmarkParser>(); parser->SetServiceForTesting( html_parser_receiver_.BindNewPipeAndPassRemote()); #endif // BUILDFLAG(IS_IOS)
diff --git a/components/visited_url_ranking/public/url_grouping/android/java/src/org/chromium/components/visited_url_ranking/url_grouping/CachedSuggestions.java b/components/visited_url_ranking/public/url_grouping/android/java/src/org/chromium/components/visited_url_ranking/url_grouping/CachedSuggestions.java index bac35e7..f116675 100644 --- a/components/visited_url_ranking/public/url_grouping/android/java/src/org/chromium/components/visited_url_ranking/url_grouping/CachedSuggestions.java +++ b/components/visited_url_ranking/public/url_grouping/android/java/src/org/chromium/components/visited_url_ranking/url_grouping/CachedSuggestions.java
@@ -17,6 +17,8 @@ @NullMarked public class CachedSuggestions { public final @Nullable GroupSuggestions groupSuggestions; + + // This callback must be called once or destroyed before it goes out of scope. public final Callback<UserResponseMetadata> userResponseMetadataCallback; public CachedSuggestions(
diff --git a/components/visited_url_ranking/public/url_grouping/android/java/src/org/chromium/components/visited_url_ranking/url_grouping/GroupSuggestionsService.java b/components/visited_url_ranking/public/url_grouping/android/java/src/org/chromium/components/visited_url_ranking/url_grouping/GroupSuggestionsService.java index af2223e..e9750b3 100644 --- a/components/visited_url_ranking/public/url_grouping/android/java/src/org/chromium/components/visited_url_ranking/url_grouping/GroupSuggestionsService.java +++ b/components/visited_url_ranking/public/url_grouping/android/java/src/org/chromium/components/visited_url_ranking/url_grouping/GroupSuggestionsService.java
@@ -56,6 +56,9 @@ /** * Returns the cached suggestions for the given window/scope. * + * <p>If a non-null value is returned, {@link CachedSuggestions#userResponseMetadataCallback} + * must either be called once or destroyed before it goes out of scope. + * * @param windowId The ID of the window or tab model scope. * @return {@link CachedSuggestions} containing suggestions for the window, or null if none are * cached.
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc index a06557c6..78ed69c 100644 --- a/content/browser/bluetooth/web_bluetooth_service_impl.cc +++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -907,6 +907,10 @@ mojo::AssociatedRemote<blink::mojom::WebBluetoothServerClient> web_bluetooth_server_client(std::move(client)); + if (base::FeatureList::IsEnabled( + blink::features::kWebBluetoothCancelConnect)) { + pending_connection_device_ids_.insert(device_id); + } query_result.device->CreateGattConnection(base::BindOnce( &WebBluetoothServiceImpl::OnCreateGATTConnection, weak_ptr_factory_.GetWeakPtr(), device_id, @@ -918,6 +922,20 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); CHECK(back_forward_cache_feature_handle_.IsValid()); + if (base::FeatureList::IsEnabled( + blink::features::kWebBluetoothCancelConnect)) { + auto connecting_iter = pending_connection_device_ids_.find(device_id); + if (connecting_iter != pending_connection_device_ids_.end()) { + pending_connection_device_ids_.erase(connecting_iter); + const CacheQueryResult query_result = QueryCacheForDevice(device_id); + if (query_result.outcome != CacheQueryOutcome::kSuccess) { + return; + } + query_result.device->DisconnectGatt(); + return; + } + } + if (connected_devices_->IsConnectedToDeviceWithId(device_id)) { DVLOG(1) << "Disconnecting device: " << device_id.str(); connected_devices_->CloseConnectionToDeviceWithId(device_id); @@ -1919,6 +1937,11 @@ std::unique_ptr<BluetoothGattConnection> connection, std::optional<BluetoothDevice::ConnectErrorCode> error_code) { DCHECK_CURRENTLY_ON(BrowserThread::UI); + + if (base::FeatureList::IsEnabled( + blink::features::kWebBluetoothCancelConnect)) { + pending_connection_device_ids_.erase(device_id); + } if (error_code.has_value()) { std::move(callback).Run(TranslateConnectErrorAndRecord(error_code.value())); return;
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.h b/content/browser/bluetooth/web_bluetooth_service_impl.h index 176842e0..b2746bd 100644 --- a/content/browser/bluetooth/web_bluetooth_service_impl.h +++ b/content/browser/bluetooth/web_bluetooth_service_impl.h
@@ -568,6 +568,11 @@ BluetoothDelegate::FramePermissionObserver> observer_{this}; + // A set contains device ids that have GATT connection attempt ongoing. + std::unordered_set<blink::WebBluetoothDeviceId, + blink::WebBluetoothDeviceIdHash> + pending_connection_device_ids_; + base::WeakPtrFactory<WebBluetoothServiceImpl> weak_ptr_factory_{this}; };
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.cc b/content/browser/dom_storage/dom_storage_context_wrapper.cc index 123d8bef..43691002 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper.cc +++ b/content/browser/dom_storage/dom_storage_context_wrapper.cc
@@ -51,8 +51,6 @@ namespace content { -using StorageLifecycle = storage::mojom::StorageLifecycle; - namespace { void AdaptSessionStorageUsageInfo( @@ -81,18 +79,6 @@ std::move(callback).Run(result); } -StorageLifecycle GetStorageLifecycle(bool recovering, - bool storage_service_remote_was_bound) { - if (recovering) { - return storage_service_remote_was_bound - ? StorageLifecycle::kRecovering - : StorageLifecycle::kRecoveringWithUnboundStorageService; - } - return storage_service_remote_was_bound - ? StorageLifecycle::kInitializing - : StorageLifecycle::kInitializingWithUnboundStorageService; -} - } // namespace scoped_refptr<DOMStorageContextWrapper> DOMStorageContextWrapper::Create( @@ -126,13 +112,8 @@ return; } - // Binding Session or Local storage will result in the storage service getting - // bound. So, we capture this state before those calls. - StorageLifecycle lifecycle = GetStorageLifecycle( - /*recovering=*/false, partition_->IsStorageServiceRemoteValid()); - - MaybeBindSessionStorageControl(lifecycle); - MaybeBindLocalStorageControl(lifecycle); + MaybeBindSessionStorageControl(); + MaybeBindLocalStorageControl(); // Report on disk LocalStorage db size. if (partition_->GetStoragePartitionPath()) { @@ -385,12 +366,7 @@ void DOMStorageContextWrapper::OnSessionStorageDisconnected() { DCHECK(partition_); - - // Binding Session storage will result in the storage service getting bound. - // So, we capture this state before that call. - StorageLifecycle lifecycle = GetStorageLifecycle( - /*recovering=*/true, partition_->IsStorageServiceRemoteValid()); - MaybeBindSessionStorageControl(lifecycle); + MaybeBindSessionStorageControl(); // Make sure the service is aware of namespaces we asked a previous instance // to create, so it can properly service renderers trying to manipulate those @@ -403,13 +379,12 @@ partition_->ResetSessionStorageConnections(); } -void DOMStorageContextWrapper::MaybeBindSessionStorageControl( - StorageLifecycle lifecycle) { +void DOMStorageContextWrapper::MaybeBindSessionStorageControl() { if (!partition_) return; session_storage_control_.reset(); partition_->GetStorageService()->BindSessionStorageControl( - partition_->GetStoragePartitionPath(), lifecycle, + partition_->GetStoragePartitionPath(), session_storage_control_.BindNewPipeAndPassReceiver()); session_storage_control_.set_disconnect_handler( base::BindOnce(&DOMStorageContextWrapper::OnSessionStorageDisconnected, @@ -419,23 +394,17 @@ void DOMStorageContextWrapper::OnLocalStorageDisconnected() { DCHECK(partition_); - // Binding Local storage will result in the storage service getting bound. So, - // we capture this state before that call. - StorageLifecycle lifecycle = GetStorageLifecycle( - /*recovering=*/true, partition_->IsStorageServiceRemoteValid()); - MaybeBindLocalStorageControl(lifecycle); - + MaybeBindLocalStorageControl(); partition_->ResetLocalStorageConnections(); } -void DOMStorageContextWrapper::MaybeBindLocalStorageControl( - StorageLifecycle lifecycle) { +void DOMStorageContextWrapper::MaybeBindLocalStorageControl() { if (!partition_) { return; } local_storage_control_.reset(); partition_->GetStorageService()->BindLocalStorageControl( - partition_->GetStoragePartitionPath(), lifecycle, + partition_->GetStoragePartitionPath(), local_storage_control_.BindNewPipeAndPassReceiver()); local_storage_control_.set_disconnect_handler( base::BindOnce(&DOMStorageContextWrapper::OnLocalStorageDisconnected,
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.h b/content/browser/dom_storage/dom_storage_context_wrapper.h index 9e7cccf..b171cf21 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper.h +++ b/content/browser/dom_storage/dom_storage_context_wrapper.h
@@ -18,7 +18,6 @@ #include "base/threading/sequence_bound.h" #include "components/services/storage/public/mojom/local_storage_control.mojom.h" #include "components/services/storage/public/mojom/session_storage_control.mojom.h" -#include "components/services/storage/public/mojom/storage_service.mojom-forward.h" #include "components/services/storage/public/mojom/storage_usage_info.mojom.h" #include "content/browser/child_process_security_policy_impl.h" #include "content/common/content_export.h" @@ -139,9 +138,8 @@ ~DOMStorageContextWrapper() override; - void MaybeBindSessionStorageControl( - storage::mojom::StorageLifecycle lifecycle); - void MaybeBindLocalStorageControl(storage::mojom::StorageLifecycle lifecycle); + void MaybeBindSessionStorageControl(); + void MaybeBindLocalStorageControl(); scoped_refptr<SessionStorageNamespaceImpl> MaybeGetExistingNamespace( const std::string& namespace_id) const;
diff --git a/content/browser/indexed_db/instance/bucket_context.cc b/content/browser/indexed_db/instance/bucket_context.cc index dd643615..a58b1a92 100644 --- a/content/browser/indexed_db/instance/bucket_context.cc +++ b/content/browser/indexed_db/instance/bucket_context.cc
@@ -51,6 +51,7 @@ #include "base/trace_event/memory_dump_manager.h" #include "base/trace_event/memory_dump_request_args.h" #include "base/types/expected.h" +#include "build/build_config.h" #include "components/services/storage/privileged/cpp/bucket_client_info.h" #include "components/services/storage/privileged/mojom/indexed_db_client_state_checker.mojom.h" #include "components/services/storage/privileged/mojom/indexed_db_control_test.mojom.h" @@ -169,6 +170,24 @@ u"Internal error opening backing store for indexedDB.open."); } +#if !BUILDFLAG(IS_FUCHSIA) +// Logs when a path was too long for the filesystem, or when it wasn't. This is +// called twice for every call to Open() a database, once with true `is_sqlite` +// and once with false. When the longest path that would be used for a given +// backend is short enough to fit on the file system, this will be called with +// `length` of 0. Otherwise, it's called with the length of the path that was +// too long. +void LogDatabasePathOverflow(size_t length, bool is_sqlite) { + if (is_sqlite) { + base::UmaHistogramCounts1000("IndexedDB.DatabasePathOverflow.SQLite", + length); + } else { + base::UmaHistogramCounts1000("IndexedDB.DatabasePathOverflow.LevelDB", + length); + } +} +#endif // !BUILDFLAG(IS_FUCHSIA) + } // namespace // TODO(crbug.com/40253999): Move to blink when needed there. @@ -569,6 +588,38 @@ IndexedDBDataLossInfo data_loss_info; std::tie(s, error, data_loss_info) = InitBackingStoreIfNeeded(/*create_if_missing=*/true); + + // base::GetMaximumPathComponentLength() is hard-coded to return 1024 on + // Fuchsia, despite that filenames much shorter than that give "Filename too + // long (36)" errors when actual file operations are attempted on them. + // Therefore these histograms would be meaningless on Fuchsia. +#if !BUILDFLAG(IS_FUCHSIA) + // Log some metrics to determine if the hypothetical SQLite database path may + // be problematic. + if (!in_memory()) { + const base::FilePath sqlite_directory_path = + data_path_.Append(GetSqliteDbDirectory(bucket_locator())); + // IsPathTooLong() will only work if the base directory exists, so we must + // create it if it doesn't already exist (as will be the case when this + // bucket is using LevelDB, or if the data path was too long). + const bool directory_path_existed = base::PathExists(sqlite_directory_path); + bool directory_path_exists = directory_path_existed || + (!IsPathTooLong(sqlite_directory_path) && + base::CreateDirectory(sqlite_directory_path)); + base::FilePath sqlite_database_longest_path = + sqlite_directory_path.Append(DatabaseNameToFileName(name)) + .InsertBeforeExtensionASCII("-wal"); + const size_t sqlite_longest_path_length = + !directory_path_exists || IsPathTooLong(sqlite_database_longest_path) + ? sqlite_database_longest_path.value().length() + : 0; + if (!directory_path_existed) { + base::DeleteFile(sqlite_directory_path); + } + LogDatabasePathOverflow(sqlite_longest_path_length, /*is_sqlite=*/true); + } +#endif // !BUILDFLAG(IS_FUCHSIA) + if (!backing_store_) { FactoryClient(std::move(factory_client)).OnError(error); if (s.IsCorruption()) { @@ -978,11 +1029,35 @@ } if (IsPathTooLong(database_path)) { +#if !BUILDFLAG(IS_FUCHSIA) + if (!ShouldUseSqlite()) { + LogDatabasePathOverflow(database_path.value().length(), + /*is_sqlite=*/false); + } +#endif // !BUILDFLAG(IS_FUCHSIA) ReportOpenStatus(INDEXED_DB_BACKING_STORE_OPEN_ORIGIN_TOO_LONG, bucket_locator()); return {Status::IOError("File path too long"), CreateDefaultError(), IndexedDBDataLossInfo()}; } + +#if !BUILDFLAG(IS_FUCHSIA) + if (!ShouldUseSqlite()) { + // The directory path must exist for the below IsPathTooLong() to work. + bool directory_exists = base::CreateDirectory(database_path); + // This is the longest filename that LevelDB uses inside its directory. + // This is logged for purposes of comparing to + // IndexedDB.DatabasePathOverflow.SQLite. + base::FilePath leveldb_longest_path = + database_path.Append(FILE_PATH_LITERAL("MANIFEST-123456")); + const size_t leveldb_path_length = + (!directory_exists || IsPathTooLong(leveldb_longest_path)) + ? leveldb_longest_path.value().length() + : 0U; + LogDatabasePathOverflow(leveldb_path_length, /*is_sqlite=*/false); + } +#endif + if (ShouldUseSqlite() && !base::CreateDirectory(database_path)) { ReportOpenStatus(INDEXED_DB_BACKING_STORE_OPEN_FAILED_DIRECTORY, bucket_locator());
diff --git a/content/browser/indexed_db/instance/bucket_context_unittest.cc b/content/browser/indexed_db/instance/bucket_context_unittest.cc index 2eb45ac..1176429a7 100644 --- a/content/browser/indexed_db/instance/bucket_context_unittest.cc +++ b/content/browser/indexed_db/instance/bucket_context_unittest.cc
@@ -7,15 +7,20 @@ #include <memory> #include <string> +#include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/run_loop.h" #include "base/task/updateable_sequenced_task_runner.h" +#include "base/test/gmock_callback_support.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/task_environment.h" #include "base/test/test_future.h" +#include "build/build_config.h" #include "components/services/storage/privileged/mojom/indexed_db_internals_types.mojom-shared.h" #include "components/services/storage/privileged/mojom/indexed_db_internals_types.mojom.h" #include "content/browser/indexed_db/instance/fake_transaction.h" +#include "content/browser/indexed_db/mock_mojo_indexed_db_database_callbacks.h" +#include "content/browser/indexed_db/mock_mojo_indexed_db_factory_client.h" #include "storage/browser/test/mock_quota_manager_proxy.h" #include "storage/browser/test/mock_special_storage_policy.h" #include "testing/gtest/include/gtest/gtest.h" @@ -27,6 +32,14 @@ using testing::SizeIs; using ITS = storage::mojom::IdbTransactionState; +namespace { +ACTION_TEMPLATE(MoveArgPointee, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_1_VALUE_PARAMS(out)) { + *out = std::move(*::testing::get<k>(args)); +} +} // namespace + class BucketContextTest : public testing::Test { public: BucketContextTest() @@ -47,16 +60,29 @@ quota_manager_.get(), base::SingleThreadTaskRunner::GetCurrentDefault().get()); + CreateBucketContextForStorageKey( + blink::StorageKey::CreateFromStringForTesting("https://example.com")); + } + + void CreateBucketContextForStorageKey(const blink::StorageKey& key) { storage::BucketInfo bucket_info = quota_manager_->CreateBucket( - storage::BucketInitParams::ForDefaultBucket( - blink::StorageKey::CreateFromStringForTesting( - "https://example.com"))); + storage::BucketInitParams::ForDefaultBucket(key)); + if (factory_remote_.is_bound()) { + factory_remote_.FlushForTesting(); + } + + factory_remote_.reset(); bucket_context_ = std::make_unique<BucketContext>( - bucket_info, base::FilePath(), BucketContext::Delegate(), + bucket_info, temp_dir_.GetPath(), BucketContext::Delegate(), scoped_refptr<base::UpdateableSequencedTaskRunner>(), quota_manager_proxy_, /*blob_storage_context=*/mojo::NullRemote(), /*file_system_access_context=*/mojo::NullRemote()); + mojo::PendingRemote<storage::mojom::IndexedDBClientStateChecker> + checker_remote; + bucket_context_->AddReceiver(storage::BucketClientInfo{}, + std::move(checker_remote), + factory_remote_.BindNewPipeAndPassReceiver()); } void SetQuotaLeft(int64_t quota_manager_response) { @@ -71,6 +97,7 @@ scoped_refptr<storage::MockSpecialStoragePolicy> quota_policy_; scoped_refptr<storage::MockQuotaManager> quota_manager_; scoped_refptr<storage::MockQuotaManagerProxy> quota_manager_proxy_; + mojo::Remote<blink::mojom::IDBFactory> factory_remote_; std::unique_ptr<BucketContext> bucket_context_; }; @@ -338,4 +365,87 @@ } } +// See comments in bucket_context.cc for why these histograms are not logged on +// Fuchsia. +#if BUILDFLAG(IS_FUCHSIA) +#define MAYBE_DatabasePathOverflowHistogram \ + DISABLED_DatabasePathOverflowHistogram +#else +#define MAYBE_DatabasePathOverflowHistogram DatabasePathOverflowHistogram +#endif +TEST_F(BucketContextTest, MAYBE_DatabasePathOverflowHistogram) { + auto open_db = [this](std::u16string_view name) { + MockMojoFactoryClient client; + MockMojoDatabaseCallbacks database_callbacks; + mojo::AssociatedRemote<blink::mojom::IDBTransaction> transaction_remote; + factory_remote_->Open( + client.CreateInterfacePtrAndBind(), + database_callbacks.CreateInterfacePtrAndBind(), std::u16string(name), + /*version=*/0, transaction_remote.BindNewEndpointAndPassReceiver(), + /*transaction_id=*/0, /*priority=*/0); + factory_remote_.FlushForTesting(); + }; + + { + base::HistogramTester histograms; + open_db(u"db"); + histograms.ExpectUniqueSample("IndexedDB.DatabasePathOverflow.SQLite", 0, + 1); + histograms.ExpectUniqueSample("IndexedDB.DatabasePathOverflow.LevelDB", 0, + 1); + + // The LevelDB histogram is only logged when the backing store is first + // used; the SQLite one is logged for each DB. + open_db(u"other_db"); + histograms.ExpectUniqueSample("IndexedDB.DatabasePathOverflow.SQLite", 0, + 2); + histograms.ExpectUniqueSample("IndexedDB.DatabasePathOverflow.LevelDB", 0, + 1); + } + + // A really long origin causes a problem for both LevelDB and SQLite. + const int limit = base::GetMaximumPathComponentLength(temp_dir_.GetPath()); + std::string origin(limit + 1, 'x'); + const blink::StorageKey too_long_storage_key = + blink::StorageKey::CreateFromStringForTesting("http://" + origin + + ":81/"); + CreateBucketContextForStorageKey(too_long_storage_key); + { + base::HistogramTester histograms; + open_db(u"db"); + // An error was logged for both cases. + histograms.ExpectBucketCount("IndexedDB.DatabasePathOverflow.SQLite", 0, 0); + histograms.ExpectTotalCount("IndexedDB.DatabasePathOverflow.SQLite", 1); + histograms.ExpectBucketCount("IndexedDB.DatabasePathOverflow.LevelDB", 0, + 0); + histograms.ExpectTotalCount("IndexedDB.DatabasePathOverflow.LevelDB", 1); + } + + // Now try with a shorter origin, which leaves enough room for LevelDB + // files but not the SQLite database on Windows. Note that Windows is + // the only system that has a limit on the overall path length; POSIX + // only limits individual path components. + const blink::StorageKey not_too_long_storage_key = + blink::StorageKey::CreateFromStringForTesting( + "http://" + origin.substr(0, limit - 45) + ":81/"); + CreateBucketContextForStorageKey(not_too_long_storage_key); + { + base::HistogramTester histograms; + open_db(u"db"); +#if BUILDFLAG(IS_WIN) + // Error. + histograms.ExpectBucketCount("IndexedDB.DatabasePathOverflow.SQLite", 0, 0); + histograms.ExpectTotalCount("IndexedDB.DatabasePathOverflow.SQLite", 1); +#else + // Success. + histograms.ExpectUniqueSample("IndexedDB.DatabasePathOverflow.SQLite", 0, + 1); +#endif + + // Success for LevelDB. + histograms.ExpectUniqueSample("IndexedDB.DatabasePathOverflow.LevelDB", 0, + 1); + } +} + } // namespace content::indexed_db
diff --git a/content/browser/navigation_transitions/back_forward_transition_animation_manager_android_browsertest.cc b/content/browser/navigation_transitions/back_forward_transition_animation_manager_android_browsertest.cc index 199773ff..7f1f070 100644 --- a/content/browser/navigation_transitions/back_forward_transition_animation_manager_android_browsertest.cc +++ b/content/browser/navigation_transitions/back_forward_transition_animation_manager_android_browsertest.cc
@@ -376,8 +376,9 @@ public: BackForwardTransitionAnimationManagerBrowserTest() { std::vector<base::test::FeatureRefAndParams> enabled_features = { - {blink::features::kBackForwardTransitions, - {{"min-required-physical-ram-mb", "0"}}}}; + {blink::features::kBackForwardTransitions, {}}, + {blink::features::kIncrementLocalSurfaceIdForMainframeSameDocNavigation, + {}}}; scoped_feature_list_.InitWithFeaturesAndParameters( enabled_features, /*disabled_features=*/{}); @@ -4510,6 +4511,8 @@ scoped_feature_list_.Reset(); std::vector<base::test::FeatureRefAndParams> enabled_features = { {blink::features::kBackForwardTransitions, {}}, + {blink::features::kIncrementLocalSurfaceIdForMainframeSameDocNavigation, + {}}, {features::kRenderDocument, {{kRenderDocumentLevelParameterName, GetRenderDocumentLevelName(RenderDocumentLevel::kAllFrames)}}}};
diff --git a/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_browsertest.cc b/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_browsertest.cc index 1477e079..5f4a79a 100644 --- a/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_browsertest.cc +++ b/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_browsertest.cc
@@ -1806,7 +1806,9 @@ void SetUpCommandLine(base::CommandLine* command_line) override { std::vector<base::test::FeatureRefAndParams> enabled_features = { {viz::mojom::EnableVizTestApis, {}}, - {blink::features::kBackForwardTransitions, {}}}; + {blink::features::kBackForwardTransitions, {}}, + {blink::features::kIncrementLocalSurfaceIdForMainframeSameDocNavigation, + {}}}; scoped_feature_list_.InitWithFeaturesAndParameters(enabled_features, {});
diff --git a/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_cache_unittest.cc b/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_cache_unittest.cc index 92997f91..9039b5bb 100644 --- a/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_cache_unittest.cc +++ b/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_cache_unittest.cc
@@ -44,10 +44,8 @@ class NavigationEntryScreenshotCacheTest : public RenderViewHostTestHarness { public: NavigationEntryScreenshotCacheTest() { - scoped_feature_list_.InitWithFeaturesAndParameters( - {{blink::features::kBackForwardTransitions, - {{"min-required-physical-ram-mb", "0"}}}}, - {}); + scoped_feature_list_.InitWithFeatures( + {blink::features::kBackForwardTransitions}, {}); } ~NavigationEntryScreenshotCacheTest() override = default;
diff --git a/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_manager_unittest.cc b/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_manager_unittest.cc index cd9296c..1b70b34 100644 --- a/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_manager_unittest.cc +++ b/content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_manager_unittest.cc
@@ -37,8 +37,9 @@ memory_(GetParam().ram_mb) { scoped_feature_list_.InitWithFeaturesAndParameters( {{blink::features::kBackForwardTransitions, - {{"percentage-of-ram-to-use", "1"}, - {"min-required-physical-ram-mb", "0"}}}}, + { + {"percentage-of-ram-to-use", "1"}, + }}}, {}); }
diff --git a/content/browser/renderer_host/navigation_transitions/navigation_transition_config.cc b/content/browser/renderer_host/navigation_transitions/navigation_transition_config.cc index 7b977c3..1e5a097 100644 --- a/content/browser/renderer_host/navigation_transitions/navigation_transition_config.cc +++ b/content/browser/renderer_host/navigation_transitions/navigation_transition_config.cc
@@ -21,10 +21,10 @@ const base::FeatureParam<int> kMinRequiredPhysicalRamMb{ &blink::features::kBackForwardTransitions, "min-required-physical-ram-mb", - 7200}; + 0}; const base::FeatureParam<double> kPercentageOfRamToUse{ - &blink::features::kBackForwardTransitions, "percentage-of-ram-to-use", 0.5}; + &blink::features::kBackForwardTransitions, "percentage-of-ram-to-use", 2.5}; const base::FeatureParam<base::TimeDelta> kInvisibleCacheCleanupDelay{ &blink::features::kBackForwardTransitions, "invisible-cache-cleanup-delay", @@ -35,7 +35,7 @@ // processed. const base::FeatureParam<bool> kCompressScreenshotWhenQuiet{ &blink::features::kBackForwardTransitions, "compress-screenshot-when-quiet", - true}; + false}; // SendResult is an expensive operation and the start of a navigation is a busy // time. Delaying SendResult reduces chances of contention. @@ -44,7 +44,7 @@ // Navigation.GestureTransition.CacheHitOrMissReason. const base::FeatureParam<int> kScreenshotSendResultDelayMs{ &blink::features::kBackForwardTransitions, - "screenshot-send-result-delay-ms", 400}; + "screenshot-send-result-delay-ms", 0}; size_t GetMaxCacheSizeInBytes() { constexpr int kLowEndMax = 32 * 1024 * 1024; // 32MB @@ -75,14 +75,11 @@ size_t NavigationTransitionConfig::ComputeCacheSizeInBytes() { // Assume 4 bytes per pixel. This value estimates the max number of bytes of // the physical screen's uncompressed bitmap. - // Assume one pixel for unit tests that don't have or need a screen. - size_t display_size_in_bytes = 4; - if (auto* screen = display::Screen::GetScreen(); screen) { - for (const auto& display : display::Screen::GetScreen()->GetAllDisplays()) { - display_size_in_bytes = - std::max(display_size_in_bytes, - static_cast<size_t>(4 * display.GetSizeInPixel().Area64())); - } + size_t display_size_in_bytes = 0; + for (const auto& display : display::Screen::GetScreen()->GetAllDisplays()) { + display_size_in_bytes = + std::max(display_size_in_bytes, + static_cast<size_t>(4 * display.GetSizeInPixel().Area64())); } size_t memory_required_for_max_screenshots =
diff --git a/content/browser/renderer_host/render_widget_host_browsertest.cc b/content/browser/renderer_host/render_widget_host_browsertest.cc index cae4babf..d2fa600c 100644 --- a/content/browser/renderer_host/render_widget_host_browsertest.cc +++ b/content/browser/renderer_host/render_widget_host_browsertest.cc
@@ -35,7 +35,6 @@ #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_browser_test.h" -#include "content/public/test/content_browser_test_content_browser_client.h" #include "content/public/test/content_browser_test_utils.h" #include "content/public/test/test_utils.h" #include "content/shell/browser/shell.h" @@ -1191,7 +1190,6 @@ .delegated_ink_metadata.has_value()); } -#if BUILDFLAG(IS_ANDROID) namespace { class LocalSurfaceIdChangedObserver @@ -1267,21 +1265,37 @@ : public RenderWidgetHostBrowserTest, public ::testing::WithParamInterface<bool> { public: - RenderWidgetHostSameDocNavUpdatesLocalSurfaceIdTest() = default; + RenderWidgetHostSameDocNavUpdatesLocalSurfaceIdTest() { + bool increment_local_surface_id = GetParam(); + if (increment_local_surface_id) { + scoped_feature_list_.InitWithFeaturesAndParameters( + /*enabled_features=*/ + {{blink::features:: + kIncrementLocalSurfaceIdForMainframeSameDocNavigation, + {}}}, + /*disabled_features=*/{}); + } else { + scoped_feature_list_.InitWithFeaturesAndParameters( + /*enabled_features=*/ + {}, + /*disabled_features=*/{ + blink::features:: + kIncrementLocalSurfaceIdForMainframeSameDocNavigation}); + } + } void SetUpOnMainThread() override { host_resolver()->AddRule("*", "127.0.0.1"); ASSERT_TRUE(embedded_test_server()->Start()); - auto preferences = web_contents()->GetOrCreateWebPreferences(); - preferences.increment_local_surface_id_for_mainframe_same_doc_navigation = - GetParam(); - web_contents()->SetWebPreferences(preferences); } void SetUpCommandLine(base::CommandLine* command_line) override { RenderWidgetHostBrowserTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kForcePrefersNoReducedMotion); } + + private: + base::test::ScopedFeatureList scoped_feature_list_; }; // Assert that with `IncrementLocalSurfaceIdForMainframeSameDocNavigation` @@ -1289,6 +1303,10 @@ IN_PROC_BROWSER_TEST_P(RenderWidgetHostSameDocNavUpdatesLocalSurfaceIdTest, SameDocNavigationUpdatesLocalSurfaceId) { bool increment_local_surface_id = GetParam(); + ASSERT_EQ(increment_local_surface_id, + base::FeatureList::IsEnabled( + blink::features:: + kIncrementLocalSurfaceIdForMainframeSameDocNavigation)); ASSERT_TRUE(NavigateToURL(shell(), embedded_test_server()->GetURL( "/session_history/fragment.html"))); // Changes the background color when navigate to "fragment.html#a". @@ -1324,8 +1342,6 @@ RenderWidgetHostSameDocNavUpdatesLocalSurfaceIdTest, ::testing::Bool()); -#endif // BUILDFLAG(IS_ANDROID) - namespace { enum class TestConfig { kSameDoc = 0, kBFCacheEnabled, kBFCacheDisabled };
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc index cb0f75c7..f97ba71 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc
@@ -2503,10 +2503,6 @@ top_frame_origin, std::move(event_record)); } -bool StoragePartitionImpl::IsStorageServiceRemoteValid() const { - return GetStorageServiceRemoteStorage().is_bound(); -} - void StoragePartitionImpl::Clone( mojo::PendingReceiver<network::mojom::URLLoaderNetworkServiceObserver> observer) {
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h index ef22ea4..39a4f1ad 100644 --- a/content/browser/storage_partition_impl.h +++ b/content/browser/storage_partition_impl.h
@@ -400,8 +400,6 @@ return shared_storage_header_observer_.get(); } - bool IsStorageServiceRemoteValid() const; - // Can return nullptr while `this` is being destroyed. BrowserContext* browser_context() const;
diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc index 9469110..612c97e 100644 --- a/content/browser/storage_partition_impl_unittest.cc +++ b/content/browser/storage_partition_impl_unittest.cc
@@ -2314,8 +2314,7 @@ base::ScopedTempDir temp_dir; CHECK(temp_dir.CreateUniqueTempDir()); remote_service->BindLocalStorageControl( - temp_dir.GetPath(), storage::mojom::StorageLifecycle::kInitializing, - storage_control.BindNewPipeAndPassReceiver()); + temp_dir.GetPath(), storage_control.BindNewPipeAndPassReceiver()); storage_control.FlushForTesting(); } }
diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java index 3cc2e4a..634c125 100644 --- a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
@@ -1502,8 +1502,8 @@ @CalledByNative private void renderWidgetHostViewChanged() { - if (getMagnifierAnimator() != null) { - getMagnifierAnimator().handleDragStopped(); + if (getMagnifierAnimator(/* createIfNull= */ false) != null) { + getMagnifierAnimator(/* createIfNull= */ false).handleDragStopped(); } } @@ -1571,8 +1571,8 @@ case SelectionEventType.SELECTION_HANDLE_DRAG_STOPPED: showContextMenuAtTouchHandle(left, bottom); - if (getMagnifierAnimator() != null) { - getMagnifierAnimator().handleDragStopped(); + if (getMagnifierAnimator(/* createIfNull= */ false) != null) { + getMagnifierAnimator(/* createIfNull= */ false).handleDragStopped(); } mIsInHandleDragging = false; @@ -1626,8 +1626,8 @@ showContextMenuAtTouchHandle(mSelectionRect.left, mSelectionRect.bottom); } mWasPastePopupShowingOnInsertionDragStart = false; - if (getMagnifierAnimator() != null) { - getMagnifierAnimator().handleDragStopped(); + if (getMagnifierAnimator(/* createIfNull= */ false) != null) { + getMagnifierAnimator(/* createIfNull= */ false).handleDragStopped(); } mIsInHandleDragging = false; break; @@ -1693,13 +1693,13 @@ return; } - if (getMagnifierAnimator() != null) { + if (getMagnifierAnimator(/* createIfNull= */ true) != null) { final float deviceScale = getDeviceScaleFactor(); x *= deviceScale; // The selection coordinates are relative to the content viewport, but we need // coordinates relative to the containing View, so adding getContentOffsetYPix(). y = y * deviceScale + mWebContents.getRenderCoordinates().getContentOffsetYPix(); - getMagnifierAnimator().handleDragStartedOrMoved(x, y); + getMagnifierAnimator(/* createIfNull= */ true).handleDragStartedOrMoved(x, y); } } @@ -1782,8 +1782,9 @@ mMagnifierAnimator = magnifierAnimator; } - private @Nullable MagnifierAnimator getMagnifierAnimator() { + private @Nullable MagnifierAnimator getMagnifierAnimator(boolean createIfNull) { if (mMagnifierAnimator != null) return mMagnifierAnimator; + if (!createIfNull) return null; if (sDisableMagnifierForTesting || Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { return null; }
diff --git a/content/public/browser/back_forward_transition_animation_manager.cc b/content/public/browser/back_forward_transition_animation_manager.cc index 4726b5d..ea0772a5e 100644 --- a/content/public/browser/back_forward_transition_animation_manager.cc +++ b/content/public/browser/back_forward_transition_animation_manager.cc
@@ -25,7 +25,7 @@ NavigationDirection navigation_direction, ui::BackGestureEventSwipeEdge edge) { #if BUILDFLAG(IS_ANDROID) - if (!AreBackForwardTransitionsEnabled()) { + if (!base::FeatureList::IsEnabled(blink::features::kBackForwardTransitions)) { return false; }
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h index db430af..a208e40 100644 --- a/device/bluetooth/bluetooth_device.h +++ b/device/bluetooth/bluetooth_device.h
@@ -629,6 +629,10 @@ GattConnectionCallback callback, std::optional<BluetoothUUID> service_uuid = std::nullopt); + // Disconnects GATT connection on platforms that maintain a specific GATT + // connection. + virtual void DisconnectGatt() = 0; + // Set the gatt services discovery complete flag for this device. virtual void SetGattServicesDiscoveryComplete(bool complete); @@ -789,10 +793,6 @@ // be called if the subclass sets |supports_service_specific_discovery_|. virtual void UpgradeToFullDiscovery(); - // Disconnects GATT connection on platforms that maintain a specific GATT - // connection. - virtual void DisconnectGatt() = 0; - // Returns a |BluetoothGattConnection| object that represents a reference to a // GATT connection to this device. virtual std::unique_ptr<BluetoothGattConnection>
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc index 009e207..37d0f2d8 100644 --- a/extensions/browser/guest_view/web_view/web_view_guest.cc +++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -1199,7 +1199,7 @@ switches::kEnableSpatialNavigation)) { if (IsOwnedByControlledFrameEmbedder()) { page_load_metrics::MetricsWebContentsObserver::RecordFeatureUsage( - owner_rfh, blink::mojom::WebFeature::kControlledFrameElement); + owner_rfh, blink::mojom::WebFeature::kHTMLControlledFrameElement); } }
diff --git a/extensions/common/features/simple_feature_unittest.cc b/extensions/common/features/simple_feature_unittest.cc index 110731b..2e723cb 100644 --- a/extensions/common/features/simple_feature_unittest.cc +++ b/extensions/common/features/simple_feature_unittest.cc
@@ -8,6 +8,7 @@ #include <array> #include <memory> +#include <optional> #include <string> #include <vector> @@ -58,12 +59,15 @@ std::initializer_list<mojom::FeatureSessionType> feature_session_types; }; -Feature::AvailabilityResult IsAvailableInChannel(Channel channel_for_feature, - Channel channel_for_testing) { +Feature::AvailabilityResult IsAvailableInChannel( + std::optional<Channel> channel_for_feature, + Channel channel_for_testing) { ScopedCurrentChannel current_channel(channel_for_testing); SimpleFeature feature; - feature.set_channel(channel_for_feature); + if (channel_for_feature.has_value()) { + feature.set_channel(channel_for_feature.value()); + } return feature .IsAvailableToManifest( HashedExtensionId(std::string(32, 'a')), Manifest::TYPE_UNKNOWN, @@ -834,6 +838,19 @@ IsAvailableInChannel(Channel::UNKNOWN, Channel::BETA)); EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL, IsAvailableInChannel(Channel::UNKNOWN, Channel::STABLE)); + + // Verify that a feature without a channel specified is available in all + // channels. + EXPECT_EQ(Feature::IS_AVAILABLE, + IsAvailableInChannel(std::nullopt, Channel::UNKNOWN)); + EXPECT_EQ(Feature::IS_AVAILABLE, + IsAvailableInChannel(std::nullopt, Channel::CANARY)); + EXPECT_EQ(Feature::IS_AVAILABLE, + IsAvailableInChannel(std::nullopt, Channel::DEV)); + EXPECT_EQ(Feature::IS_AVAILABLE, + IsAvailableInChannel(std::nullopt, Channel::BETA)); + EXPECT_EQ(Feature::IS_AVAILABLE, + IsAvailableInChannel(std::nullopt, Channel::STABLE)); } // Tests simple feature availability across channels.
diff --git a/extensions/renderer/native_extension_bindings_system.cc b/extensions/renderer/native_extension_bindings_system.cc index 40f1682..8094c3f 100644 --- a/extensions/renderer/native_extension_bindings_system.cc +++ b/extensions/renderer/native_extension_bindings_system.cc
@@ -255,7 +255,7 @@ v8::Local<v8::Object> binding_object = bindings_system->CreateAPIInstance(name, context, &hooks); - v8::Isolate* isolate = context->GetIsolate(); + v8::Isolate* isolate = v8::Isolate::GetCurrent(); auto* bridge = cppgc::MakeGarbageCollected<APIBindingBridge>( isolate->GetCppHeap()->GetAllocationHandle(), hooks, context, binding_object, script_context->GetExtensionID(),
diff --git a/extensions/renderer/resources/guest_view/app_view/app_view_element.js b/extensions/renderer/resources/guest_view/app_view/app_view_element.js index e767f17..39165b88 100644 --- a/extensions/renderer/resources/guest_view/app_view/app_view_element.js +++ b/extensions/renderer/resources/guest_view/app_view/app_view_element.js
@@ -21,4 +21,4 @@ AppViewElement, AppViewImpl, null, ['connect'], /*promiseApiDetails=*/[]); -registerElement('AppView', AppViewElement); +registerElement('AppView', 'AppView', AppViewElement);
diff --git a/extensions/renderer/resources/guest_view/extension_options/extension_options_element.js b/extensions/renderer/resources/guest_view/extension_options/extension_options_element.js index 6dbc04d..a3821686 100644 --- a/extensions/renderer/resources/guest_view/extension_options/extension_options_element.js +++ b/extensions/renderer/resources/guest_view/extension_options/extension_options_element.js
@@ -22,4 +22,5 @@ } } -registerElement('ExtensionOptions', ExtensionOptionsElement); +registerElement( + 'ExtensionOptions', 'ExtensionOptions', ExtensionOptionsElement);
diff --git a/extensions/renderer/resources/guest_view/guest_view_container_element.js b/extensions/renderer/resources/guest_view/guest_view_container_element.js index 74ff3b4..096c5186 100644 --- a/extensions/renderer/resources/guest_view/guest_view_container_element.js +++ b/extensions/renderer/resources/guest_view/guest_view_container_element.js
@@ -56,7 +56,7 @@ // Registers the guestview as a custom element. // |containerElementType| is a GuestViewContainerElement (e.g. WebViewElement) -function registerElement(elementName, containerElementType) { +function registerElement(elementName, className, containerElementType) { GuestViewInternalNatives.AllowGuestViewElementDefinition(() => { // We set the lifecycle callbacks so that they're available during // registration. Once that's done, we'll delete them so developers cannot @@ -71,7 +71,7 @@ $CustomElementRegistry.define( window.customElements, $String.toLowerCase(elementName), containerElementType); - $Object.defineProperty(window, elementName, { + $Object.defineProperty(window, className, { value: containerElementType, });
diff --git a/extensions/renderer/resources/guest_view/web_view/extensions_web_view_element.js b/extensions/renderer/resources/guest_view/web_view/extensions_web_view_element.js index df0a06d..69a8a33e 100644 --- a/extensions/renderer/resources/guest_view/web_view/extensions_web_view_element.js +++ b/extensions/renderer/resources/guest_view/web_view/extensions_web_view_element.js
@@ -36,4 +36,4 @@ // |ExtensionsWebViewElement.prototype.go|. var originalGo = ExtensionsWebViewElement.prototype.go; -registerElement('WebView', ExtensionsWebViewElement); +registerElement('WebView', 'WebView', ExtensionsWebViewElement);
diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json index 4467db1..111336b 100644 --- a/gpu/config/gpu_driver_bug_list.json +++ b/gpu/config/gpu_driver_bug_list.json
@@ -3665,6 +3665,22 @@ "features": [ "webgl_or_caps_max_texture_size_limit_8192" ] + }, + { + "id": 457, + "cr_bugs": [40275246], + "description": "D3D12 AVC hardware encoding produces corrupted bitstream on NVidia GPUs with old drivers", + "os": { + "type": "win" + }, + "vendor_id": "0x10de", + "driver_version": { + "op": "<", + "value": "32.0.15.7602" + }, + "features": [ + "disable_d3d12_h264_encoding" + ] } ] }
diff --git a/infra/config/generated/builder-owners/chrome-browser-infra-team@google.com.txt b/infra/config/generated/builder-owners/chrome-browser-infra-team@google.com.txt index d5605673..084e4853 100644 --- a/infra/config/generated/builder-owners/chrome-browser-infra-team@google.com.txt +++ b/infra/config/generated/builder-owners/chrome-browser-infra-team@google.com.txt
@@ -1,4 +1,5 @@ ci/3pp-windows-amd64-packager +ci/android-structured-test-ids-16-x64-rel-fyi ci/linux-archive-rel ci/linux-presubmit ci/win-presubmit
diff --git a/infra/config/generated/builders/ci/ToTAndroid/targets/chromium.clang.json b/infra/config/generated/builders/ci/ToTAndroid/targets/chromium.clang.json index b278b6c..5594b20 100644 --- a/infra/config/generated/builders/ci/ToTAndroid/targets/chromium.clang.json +++ b/infra/config/generated/builders/ci/ToTAndroid/targets/chromium.clang.json
@@ -6,7 +6,7 @@ "gtest_tests": [ { "args": [ - "--test-launcher-filter-file=../../testing/buildbot/filters/android.pie_tot.base_unittests.filter", + "--test-launcher-filter-file=../../testing/buildbot/filters/android.device_10.tot.base_unittests.filter", "--gs-results-bucket=chromium-result-details", "--recover-devices" ],
diff --git a/infra/config/generated/builders/ci/android-arm64-proguard-rel/targets/chromium.android.json b/infra/config/generated/builders/ci/android-arm64-proguard-rel/targets/chromium.android.json index d68bd574..89149156 100644 --- a/infra/config/generated/builders/ci/android-arm64-proguard-rel/targets/chromium.android.json +++ b/infra/config/generated/builders/ci/android-arm64-proguard-rel/targets/chromium.android.json
@@ -1086,7 +1086,7 @@ }, { "args": [ - "--test-launcher-filter-file=../../testing/buildbot/filters/android.pie_arm64.gin_unittests.filter", + "--test-launcher-filter-file=../../testing/buildbot/filters/android.device_10.proguard_rel.gin_unittests.filter", "--gs-results-bucket=chromium-result-details", "--recover-devices" ],
diff --git a/infra/config/generated/builders/ci/android-bfcache-rel/targets/chromium.android.json b/infra/config/generated/builders/ci/android-bfcache-rel/targets/chromium.android.json index f67ee74..47cffe18 100644 --- a/infra/config/generated/builders/ci/android-bfcache-rel/targets/chromium.android.json +++ b/infra/config/generated/builders/ci/android-bfcache-rel/targets/chromium.android.json
@@ -52,7 +52,6 @@ "args": [ "--disable-features=BackForwardCache", "--avd-config=../../tools/android/avd/proto/android_28_google_apis_x86.textpb", - "--test-launcher-filter-file=../../testing/buildbot/filters/android.emulator_p.content_browsertests.filter", "--gs-results-bucket=chromium-result-details", "--recover-devices" ],
diff --git a/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/gn-args.json b/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/gn-args.json new file mode 100644 index 0000000..382c163 --- /dev/null +++ b/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/gn-args.json
@@ -0,0 +1,20 @@ +{ + "gn_args": { + "android_static_analysis": "off", + "dcheck_always_on": false, + "debuggable_apks": false, + "ffmpeg_branding": "Chrome", + "is_component_build": false, + "is_debug": false, + "proprietary_codecs": true, + "strip_debug_info": true, + "symbol_level": 1, + "system_webview_package_name": "com.google.android.webview.debug", + "system_webview_shell_package_name": "org.chromium.my_webview_shell", + "target_cpu": "x64", + "target_os": "android", + "use_reclient": false, + "use_remoteexec": true, + "use_siso": true + } +} \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/properties.json b/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/properties.json new file mode 100644 index 0000000..bd89a8d --- /dev/null +++ b/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/properties.json
@@ -0,0 +1,73 @@ +{ + "$build/chromium_tests_builder_config": { + "builder_config": { + "additional_exclusions": [ + "infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/gn-args.json" + ], + "builder_db": { + "entries": [ + { + "builder_id": { + "bucket": "ci", + "builder": "android-structured-test-ids-16-x64-rel-fyi", + "project": "chromium" + }, + "builder_spec": { + "build_gs_bucket": "chromium-android-archive", + "builder_group": "chromium.android.fyi", + "execution_mode": "COMPILE_AND_TEST", + "legacy_android_config": { + "config": "base_config" + }, + "legacy_chromium_config": { + "apply_configs": [ + "mb" + ], + "build_config": "Release", + "config": "main_builder", + "target_arch": "intel", + "target_bits": 64, + "target_platform": "android" + }, + "legacy_gclient_config": { + "apply_configs": [ + "android" + ], + "config": "chromium" + } + } + } + ] + }, + "builder_ids": [ + { + "bucket": "ci", + "builder": "android-structured-test-ids-16-x64-rel-fyi", + "project": "chromium" + } + ], + "targets_spec_directory": "src/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/targets" + } + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_monitoring": true, + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "metrics_project": "chromium-reclient-metrics", + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "chromium.android.fyi", + "recipe": "chromium" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/shadow-properties.json b/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/shadow-properties.json new file mode 100644 index 0000000..78dedff8 --- /dev/null +++ b/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/shadow-properties.json
@@ -0,0 +1,14 @@ +{ + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_monitoring": true, + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "metrics_project": "chromium-reclient-metrics", + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 + } +} \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/targets/chromium.android.fyi.json b/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/targets/chromium.android.fyi.json new file mode 100644 index 0000000..a1ce0e31 --- /dev/null +++ b/infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/targets/chromium.android.fyi.json
@@ -0,0 +1,523 @@ +{ + "android-structured-test-ids-16-x64-rel-fyi": { + "gtest_tests": [ + { + "args": [ + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "android_browsertests" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "android_browsertests", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 4 + }, + "test": "android_browsertests", + "test_id_prefix": "ninja://chrome/test:android_browsertests/" + }, + { + "args": [ + "--test-launcher-batch-limit=1", + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "android_sync_integration_tests" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "android_sync_integration_tests", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "android_sync_integration_tests", + "test_id_prefix": "ninja://chrome/test:android_sync_integration_tests/" + }, + { + "args": [ + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "android_webview_unittests" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "android_webview_unittests", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "android_webview_unittests", + "test_id_prefix": "ninja://android_webview/test:android_webview_unittests/" + }, + { + "args": [ + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "content_shell_test_apk" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "content_shell_test_apk", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 3 + }, + "test": "content_shell_test_apk", + "test_id_prefix": "ninja://content/shell/android:content_shell_test_apk/" + }, + { + "args": [ + "--use-cmd-decoder=validating", + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "gl_tests_validating" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "gl_tests_validating", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "gl_tests", + "test_id_prefix": "ninja://gpu:gl_tests/" + }, + { + "args": [ + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "gl_unittests" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "gl_unittests", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "gl_unittests", + "test_id_prefix": "ninja://ui/gl:gl_unittests/" + }, + { + "args": [ + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "mojo_test_apk" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "mojo_test_apk", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "mojo_test_apk", + "test_id_prefix": "ninja://mojo/public/java/system:mojo_test_apk/" + }, + { + "args": [ + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "ui_android_unittests" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "ui_android_unittests", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "ui_android_unittests", + "test_id_prefix": "ninja://ui/android:ui_android_unittests/" + }, + { + "args": [ + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "video_encode_accelerator_tests" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "video_encode_accelerator_tests", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "video_encode_accelerator_tests", + "test_id_prefix": "ninja://media/gpu/test:video_encode_accelerator_tests/" + }, + { + "args": [ + "--webview-process-mode=multiple", + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb", + "--gs-results-bucket=chromium-result-details", + "--recover-devices" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "args": [ + "--bucket", + "chromium-result-details", + "--test-name", + "webview_instrumentation_test_apk_multiple_process_mode" + ], + "script": "//build/android/pylib/results/presentation/test_results_presentation.py" + }, + "name": "webview_instrumentation_test_apk_multiple_process_mode", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 5 + }, + "test": "webview_instrumentation_test_apk", + "test_id_prefix": "ninja://android_webview/test:webview_instrumentation_test_apk/" + } + ], + "isolated_scripts": [ + { + "args": [ + "--emulator-debug-tags=all", + "--avd-config=../../tools/android/avd/proto/android_36_google_apis_x64.textpb" + ], + "description": "Run with android_36_google_apis_x64", + "merge": { + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "chrome_junit_tests", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "dimensions": { + "cores": "8", + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "os": "Ubuntu-22.04", + "pool": "chromium.tests.avd" + }, + "named_caches": [ + { + "name": "android_36_google_apis_x64", + "path": ".android_emulator/android_36_google_apis_x64" + } + ], + "optional_dimensions": { + "60": { + "caches": "android_36_google_apis_x64" + } + }, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "chrome_junit_tests", + "test_id_prefix": "ninja://chrome/android:chrome_junit_tests/" + } + ] + } +} \ No newline at end of file
diff --git a/infra/config/generated/builders/gn_args_locations.json b/infra/config/generated/builders/gn_args_locations.json index 17e118e..2065606 100644 --- a/infra/config/generated/builders/gn_args_locations.json +++ b/infra/config/generated/builders/gn_args_locations.json
@@ -88,7 +88,8 @@ "android-15-x64-fyi-rel": "ci/android-15-x64-fyi-rel/gn-args.json", "android-16-x64-fyi-rel": "ci/android-16-x64-fyi-rel/gn-args.json", "android-annotator-rel": "ci/android-annotator-rel/gn-args.json", - "android-cronet-asan-x86-rel": "ci/android-cronet-asan-x86-rel/gn-args.json" + "android-cronet-asan-x86-rel": "ci/android-cronet-asan-x86-rel/gn-args.json", + "android-structured-test-ids-16-x64-rel-fyi": "ci/android-structured-test-ids-16-x64-rel-fyi/gn-args.json" }, "chromium.angle": { "android-angle-chromium-arm64-builder": "ci/android-angle-chromium-arm64-builder/gn-args.json",
diff --git a/infra/config/generated/builders/try/android-bfcache-rel/targets/chromium.android.json b/infra/config/generated/builders/try/android-bfcache-rel/targets/chromium.android.json index f67ee74..47cffe18 100644 --- a/infra/config/generated/builders/try/android-bfcache-rel/targets/chromium.android.json +++ b/infra/config/generated/builders/try/android-bfcache-rel/targets/chromium.android.json
@@ -52,7 +52,6 @@ "args": [ "--disable-features=BackForwardCache", "--avd-config=../../tools/android/avd/proto/android_28_google_apis_x86.textpb", - "--test-launcher-filter-file=../../testing/buildbot/filters/android.emulator_p.content_browsertests.filter", "--gs-results-bucket=chromium-result-details", "--recover-devices" ],
diff --git a/infra/config/generated/health-specs/health-specs.json b/infra/config/generated/health-specs/health-specs.json index 4aaa6f7..3a359e6 100644 --- a/infra/config/generated/health-specs/health-specs.json +++ b/infra/config/generated/health-specs/health-specs.json
@@ -7801,6 +7801,27 @@ } ] }, + "android-structured-test-ids-16-x64-rel-fyi": { + "contact_team_email": "chrome-browser-infra-team@google.com", + "problem_specs": [ + { + "name": "Unhealthy", + "period_days": 7, + "score": 5, + "thresholds": { + "_default": "_default" + } + }, + { + "name": "Low Value", + "period_days": 90, + "score": 1, + "thresholds": { + "_default": "_default" + } + } + ] + }, "android-webview-10-x86-rel-tests": { "contact_team_email": "woa-engprod@google.com", "problem_specs": [
diff --git a/infra/config/generated/luci/cr-buildbucket.cfg b/infra/config/generated/luci/cr-buildbucket.cfg index 04723d53..f3867a67 100644 --- a/infra/config/generated/luci/cr-buildbucket.cfg +++ b/infra/config/generated/luci/cr-buildbucket.cfg
@@ -44396,6 +44396,118 @@ } } builders { + name: "android-structured-test-ids-16-x64-rel-fyi" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builderless:1" + dimensions: "cores:8" + dimensions: "cpu:x86-64" + dimensions: "free_space:standard" + dimensions: "os:Ubuntu-22.04" + dimensions: "pool:luci.chromium.ci" + dimensions: "ssd:0" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/properties.json",' + ' "shadow_properties_file": "infra/config/generated/builders/ci/android-structured-test-ids-16-x64-rel-fyi/shadow-properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "chromium.android.fyi",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium"' + '}' + priority: 35 + execution_timeout_secs: 14400 + build_numbers: YES + service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + experiments { + key: "chromium.use_per_builder_build_dir_name" + value: 100 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_ci_test_results" + test_results { + predicate { + test_id_regexp: "ninja://(chrome|content)/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_ci_test_results" + test_results { + predicate { + test_id_regexp: "(ninja://[^/]*blink_web_tests/.+)|(ninja://[^/]*_wpt_tests/.+)|(ninja://[^/]*headless_shell_wpt/.+)" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + description_html: "Run tests for checking changes to resultdb structured test id uploads.<br/>Builder owner: <a href=mailto:chrome-browser-infra-team@google.com>chrome-browser-infra-team@google.com</a>" + shadow_builder_adjustments { + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + pool: "luci.chromium.try" + dimensions: "free_space:" + dimensions: "pool:luci.chromium.try" + } + contact_team_email: "chrome-browser-infra-team@google.com" + custom_metric_definitions { + name: "/chrome/infra/browser/builds/cached_count" + predicates: "has(build.output.properties.is_cached)" + predicates: "string(build.output.properties.is_cached) == \"true\"" + } + custom_metric_definitions { + name: "/chrome/infra/browser/builds/ran_tests_retry_shard_count" + predicates: "has(build.output.properties.ran_tests_retry_shard)" + } + custom_metric_definitions { + name: "/chrome/infra/browser/builds/ran_tests_without_patch_count" + predicates: "has(build.output.properties.ran_tests_without_patch)" + } + custom_metric_definitions { + name: "/chrome/infra/browser/builds/uncached_count" + predicates: "has(build.output.properties.is_cached)" + predicates: "string(build.output.properties.is_cached) == \"false\"" + } + } + builders { name: "android-webview-10-x86-rel-tests" swarming_host: "chromium-swarm.appspot.com" dimensions: "builderless:1"
diff --git a/infra/config/generated/luci/luci-milo.cfg b/infra/config/generated/luci/luci-milo.cfg index 29ad9bdc..204ac102 100644 --- a/infra/config/generated/luci/luci-milo.cfg +++ b/infra/config/generated/luci/luci-milo.cfg
@@ -9931,6 +9931,11 @@ short_name: "16" } builders { + name: "buildbucket/luci.chromium.ci/android-structured-test-ids-16-x64-rel-fyi" + category: "emulator|x64|rel" + short_name: "16RDB" + } + builders { name: "buildbucket/luci.chromium.ci/android-10-x86-fyi-rel" category: "emulator|x86|rel" short_name: "10"
diff --git a/infra/config/generated/luci/luci-notify.cfg b/infra/config/generated/luci/luci-notify.cfg index a7265d6..85e1c8e 100644 --- a/infra/config/generated/luci/luci-notify.cfg +++ b/infra/config/generated/luci/luci-notify.cfg
@@ -4293,6 +4293,10 @@ } builders { bucket: "ci" + name: "android-structured-test-ids-16-x64-rel-fyi" + } + builders { + bucket: "ci" name: "linux-archive-rel" } builders {
diff --git a/infra/config/generated/luci/luci-scheduler.cfg b/infra/config/generated/luci/luci-scheduler.cfg index 3b05898..504c230 100644 --- a/infra/config/generated/luci/luci-scheduler.cfg +++ b/infra/config/generated/luci/luci-scheduler.cfg
@@ -3705,6 +3705,15 @@ } } job { + id: "android-structured-test-ids-16-x64-rel-fyi" + realm: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "ci" + builder: "android-structured-test-ids-16-x64-rel-fyi" + } +} +job { id: "android-webview-10-x86-rel-tests" realm: "ci" buildbucket { @@ -6484,6 +6493,7 @@ triggers: "android-rust-arm32-rel" triggers: "android-rust-arm64-dbg" triggers: "android-rust-arm64-rel" + triggers: "android-structured-test-ids-16-x64-rel-fyi" triggers: "android-webview-13-x64-hostside-rel" triggers: "android-x86-rel" triggers: "chromeos-amd64-generic-asan-rel"
diff --git a/infra/config/subprojects/chromium/ci/chromium.android.fyi.star b/infra/config/subprojects/chromium/ci/chromium.android.fyi.star index fb5fec3..e6ae0647 100644 --- a/infra/config/subprojects/chromium/ci/chromium.android.fyi.star +++ b/infra/config/subprojects/chromium/ci/chromium.android.fyi.star
@@ -1341,3 +1341,71 @@ ), contact_team_email = "cronet-team@google.com", ) + +# Temporary builder for testing changes to resultDB uploads. +ci.builder( + name = "android-structured-test-ids-16-x64-rel-fyi", + description_html = "Run tests for checking changes to resultdb structured test id uploads.", + builder_spec = builder_config.builder_spec( + gclient_config = builder_config.gclient_config( + config = "chromium", + apply_configs = [ + "android", + ], + ), + chromium_config = builder_config.chromium_config( + config = "main_builder", + apply_configs = ["mb"], + build_config = builder_config.build_config.RELEASE, + target_arch = builder_config.target_arch.INTEL, + target_bits = 64, + target_platform = builder_config.target_platform.ANDROID, + ), + android_config = builder_config.android_config( + config = "base_config", + ), + build_gs_bucket = "chromium-android-archive", + ), + gn_args = gn_args.config( + configs = [ + "android_builder", + "release_builder", + "remoteexec", + "minimal_symbols", + "x64", + "strip_debug_info", + "android_fastbuild", + "webview_trichrome", + "webview_shell", + ], + ), + targets = targets.bundle( + targets = [ + "android_specific_chromium_gtests", + "chrome_junit_tests", + ], + mixins = [ + targets.mixin( + args = [ + "--emulator-debug-tags=all", + ], + ), + "16-x64-emulator", + "emulator-8-cores", + "has_native_resultdb_integration", + "linux-jammy", + "x86-64", + ], + ), + targets_settings = targets.settings( + os_type = targets.os_type.ANDROID, + ), + console_view_entry = consoles.console_view_entry( + category = "emulator|x64|rel", + short_name = "16RDB", + ), + # Android x64 builds take longer than x86 builds to compile + # So they need longer timeouts + contact_team_email = "chrome-browser-infra-team@google.com", + execution_timeout = 4 * time.hour, +)
diff --git a/infra/config/subprojects/chromium/ci/chromium.android.star b/infra/config/subprojects/chromium/ci/chromium.android.star index 8555d3e..897055f 100644 --- a/infra/config/subprojects/chromium/ci/chromium.android.star +++ b/infra/config/subprojects/chromium/ci/chromium.android.star
@@ -1190,7 +1190,7 @@ "gin_unittests": targets.mixin( args = [ # https://crbug.com/1404782 - "--test-launcher-filter-file=../../testing/buildbot/filters/android.pie_arm64.gin_unittests.filter", + "--test-launcher-filter-file=../../testing/buildbot/filters/android.device_10.proguard_rel.gin_unittests.filter", ], ), "gl_tests_validating": targets.mixin( @@ -1258,9 +1258,6 @@ ], per_test_modifications = { "bf_cache_content_browsertests": targets.mixin( - args = [ - "--test-launcher-filter-file=../../testing/buildbot/filters/android.emulator_p.content_browsertests.filter", - ], swarming = targets.swarming( shards = 30, ),
diff --git a/infra/config/subprojects/chromium/ci/chromium.clang.star b/infra/config/subprojects/chromium/ci/chromium.clang.star index bef7f73..2e4412c5 100644 --- a/infra/config/subprojects/chromium/ci/chromium.clang.star +++ b/infra/config/subprojects/chromium/ci/chromium.clang.star
@@ -370,7 +370,7 @@ per_test_modifications = { "base_unittests": targets.mixin( args = [ - "--test-launcher-filter-file=../../testing/buildbot/filters/android.pie_tot.base_unittests.filter", + "--test-launcher-filter-file=../../testing/buildbot/filters/android.device_10.tot.base_unittests.filter", ], ), },
diff --git a/internal b/internal index 70b21a9..ac35660 160000 --- a/internal +++ b/internal
@@ -1 +1 @@ -Subproject commit 70b21a9e7529654dc682f591a19a27a5b999771a +Subproject commit ac3566084be15e2d1322eeb396e76469b50d19b0
diff --git a/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/BUILD.gn b/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/BUILD.gn index 0ba3ca5..ae4f410 100644 --- a/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/BUILD.gn +++ b/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/BUILD.gn
@@ -12,6 +12,7 @@ "instant_signin_mediator.mm", ] deps = [ + "//components/signin/public/identity_manager/objc", "//components/sync/base:features", "//components/sync/service", "//ios/chrome/browser/authentication/ui_bundled",
diff --git a/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_coordinator.mm b/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_coordinator.mm index de8e815..09f228e 100644 --- a/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_coordinator.mm +++ b/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_coordinator.mm
@@ -104,6 +104,7 @@ _mediator = [[InstantSigninMediator alloc] initWithAccessPoint:self.accessPoint authenticationService:authenticationService + identityManager:identityManager continuationProvider:_continuationProvider]; _mediator.delegate = self;
diff --git a/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_mediator.h b/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_mediator.h index 7cbc7fd..789ce21b 100644 --- a/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_mediator.h +++ b/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_mediator.h
@@ -15,6 +15,10 @@ class AuthenticationService; @class InstantSigninMediator; +namespace signin { +class IdentityManager; +} // namespace signin + namespace signin_metrics { enum class AccessPoint; } // namespace signin_metrics @@ -40,6 +44,7 @@ - (instancetype) initWithAccessPoint:(signin_metrics::AccessPoint)accessPoint authenticationService:(AuthenticationService*)authenticationService + identityManager:(signin::IdentityManager*)identityManager continuationProvider: (const ChangeProfileContinuationProvider&)continuationProvider NS_DESIGNATED_INITIALIZER;
diff --git a/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_mediator.mm b/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_mediator.mm index c1fa0b7..cd607dfe 100644 --- a/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_mediator.mm +++ b/ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_mediator.mm
@@ -5,6 +5,7 @@ #import "ios/chrome/browser/authentication/ui_bundled/signin/instant_signin/instant_signin_mediator.h" #import "base/memory/raw_ptr.h" +#import "components/signin/public/identity_manager/objc/identity_manager_observer_bridge.h" #import "ios/chrome/browser/authentication/ui_bundled/authentication_flow/authentication_flow.h" #import "ios/chrome/browser/authentication/ui_bundled/authentication_flow/authentication_flow_delegate.h" #import "ios/chrome/browser/authentication/ui_bundled/authentication_ui_util.h" @@ -17,7 +18,8 @@ using signin_metrics::PromoAction; @interface InstantSigninMediator () <AuthenticationFlowDelegate, - AuthenticationServiceObserving> + AuthenticationServiceObserving, + IdentityManagerObserverBridgeDelegate> @end @implementation InstantSigninMediator { @@ -29,11 +31,16 @@ // Observer for auth service status changes. std::unique_ptr<AuthenticationServiceObserverBridge> _authServiceObserverBridge; + // Identity manager to retrieve Chrome identities. + raw_ptr<signin::IdentityManager> _identityManager; + std::unique_ptr<signin::IdentityManagerObserverBridge> + _identityManagerObserver; } - (instancetype) initWithAccessPoint:(signin_metrics::AccessPoint)accessPoint authenticationService:(AuthenticationService*)authenticationService + identityManager:(signin::IdentityManager*)identityManager continuationProvider: (const ChangeProfileContinuationProvider&)continuationProvider { self = [super init]; @@ -41,12 +48,17 @@ CHECK(continuationProvider); CHECK(authenticationService); CHECK(authenticationService->SigninEnabled()); + CHECK(identityManager); _continuationProvider = continuationProvider; _accessPoint = accessPoint; _authenticationService = authenticationService; _authServiceObserverBridge = std::make_unique<AuthenticationServiceObserverBridge>( authenticationService, self); + _identityManager = identityManager; + _identityManagerObserver = + std::make_unique<signin::IdentityManagerObserverBridge>( + _identityManager, self); } return self; } @@ -65,6 +77,9 @@ - (void)disconnect { _authenticationService = nullptr; _authServiceObserverBridge.reset(); + _authenticationService = nil; + _identityManagerObserver.reset(); + _identityManager = nil; [_authenticationFlow interrupt]; _authenticationFlow = nil; } @@ -94,4 +109,19 @@ } } +#pragma mark - IdentityManagerObserverBridgeDelegate + +- (void)onPrimaryAccountChanged: + (const signin::PrimaryAccountChangeEvent&)event { + if (_authenticationFlow) { + // Authentication is started. The instant signin will be stopped by the + // authentication flow’s callback. + return; + } + if (_identityManager->HasPrimaryAccount(signin::ConsentLevel::kSignin)) { + // The user is signed-in, no more sign-in is needed. + [self.delegate instantSigninMediatorSigninIsImpossible:self]; + } +} + @end
diff --git a/ios/chrome/browser/authentication/ui_bundled/signin/signin_coordinator_egtest.mm b/ios/chrome/browser/authentication/ui_bundled/signin/signin_coordinator_egtest.mm index e092c886..0844c73 100644 --- a/ios/chrome/browser/authentication/ui_bundled/signin/signin_coordinator_egtest.mm +++ b/ios/chrome/browser/authentication/ui_bundled/signin/signin_coordinator_egtest.mm
@@ -1111,4 +1111,30 @@ assertWithMatcher:grey_notNil()]; } +// Tests that promo and account list disappear if the user get signed-in. +- (void)testSignInDuringIdentiyList { + FakeSystemIdentity* fakeIdentity = [FakeSystemIdentity fakeIdentity1]; + [SigninEarlGrey addFakeIdentity:fakeIdentity]; + reading_list_test_utils::OpenReadingList(); + [[EarlGrey + selectElementWithMatcher:grey_allOf(SecondarySignInButton(), + grey_sufficientlyVisible(), nil)] + performAction:grey_tap()]; + // Checks that the identity list is displayed. + [[EarlGrey selectElementWithMatcher:IdentityCellMatcherForEmail( + fakeIdentity.userEmail)] + assertWithMatcher:grey_notNil()]; + // Simulate a sign-in (in real life, it would be done in a managed profile, by + // doing an account switch to a personal profile). + [SigninEarlGrey signinWithFakeIdentity:fakeIdentity]; + // Checks that the identity list and the promo are gone. + [[EarlGrey selectElementWithMatcher:IdentityCellMatcherForEmail( + fakeIdentity.userEmail)] + assertWithMatcher:grey_nil()]; + [SigninEarlGreyUI verifySigninPromoNotVisible]; + // But the reading list is still open. + [[EarlGrey selectElementWithMatcher:grey_accessibilityID(kReadingListViewID)] + assertWithMatcher:grey_notNil()]; +} + @end
diff --git a/ios/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm b/ios/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm index 6ae2fda..a59fb3b 100644 --- a/ios/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm +++ b/ios/chrome/browser/browser_view/ui_bundled/browser_coordinator.mm
@@ -3009,12 +3009,6 @@ } } -- (void)dismissBWGFlowFromSession { - [_BWGCoordinator presentPageActionMenuIPH]; - [_BWGCoordinator stopWithCompletion:nil]; - _BWGCoordinator = nil; -} - #pragma mark - PromosManagerCommands - (void)showPromo {
diff --git a/ios/chrome/browser/bubble/ui_bundled/bubble_presenter.mm b/ios/chrome/browser/bubble/ui_bundled/bubble_presenter.mm index 1d1a6a5..02ee596 100644 --- a/ios/chrome/browser/bubble/ui_bundled/bubble_presenter.mm +++ b/ios/chrome/browser/bubble/ui_bundled/bubble_presenter.mm
@@ -1198,10 +1198,6 @@ return YES; } - if (feature.name == feature_engagement::kIPHIOSPageActionMenu.name) { - return YES; - } - return NO; }
diff --git a/ios/chrome/browser/content_suggestions/ui_bundled/cells/BUILD.gn b/ios/chrome/browser/content_suggestions/ui_bundled/cells/BUILD.gn index 3b39360..ebbd16e 100644 --- a/ios/chrome/browser/content_suggestions/ui_bundled/cells/BUILD.gn +++ b/ios/chrome/browser/content_suggestions/ui_bundled/cells/BUILD.gn
@@ -45,8 +45,8 @@ "//ios/chrome/browser/content_suggestions/ui_bundled/magic_stack:constants", "//ios/chrome/browser/content_suggestions/ui_bundled/magic_stack:magic_stack_module_content_view_delegate", "//ios/chrome/browser/favicon/ui_bundled", - "//ios/chrome/browser/ntp/ui_bundled:color", "//ios/chrome/browser/ntp/ui_bundled:constants", + "//ios/chrome/browser/ntp/ui_bundled:theme", "//ios/chrome/browser/shared/public/features", "//ios/chrome/browser/shared/ui/symbols", "//ios/chrome/browser/shared/ui/util", @@ -147,7 +147,7 @@ "//ios/chrome/browser/content_suggestions/ui_bundled/magic_stack:public", "//ios/chrome/browser/feature_engagement/model", "//ios/chrome/browser/ntp/ui_bundled", - "//ios/chrome/browser/ntp/ui_bundled:color", + "//ios/chrome/browser/ntp/ui_bundled:theme", "//ios/chrome/browser/shared/public/commands", "//ios/chrome/browser/shared/public/features", "//ios/chrome/browser/shared/ui/symbols",
diff --git a/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/BUILD.gn b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/BUILD.gn index 524407b..2fe1ce4 100644 --- a/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/BUILD.gn +++ b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/BUILD.gn
@@ -113,6 +113,8 @@ "magic_stack_context_menu_interaction_handler.mm", "magic_stack_edit_button_cell.h", "magic_stack_edit_button_cell.mm", + "magic_stack_module_background_view.h", + "magic_stack_module_background_view.mm", "magic_stack_module_collection_view_cell.h", "magic_stack_module_collection_view_cell.mm", "magic_stack_module_container.h", @@ -150,7 +152,7 @@ "//ios/chrome/browser/content_suggestions/ui_bundled/shop_card:shop_card_data", "//ios/chrome/browser/content_suggestions/ui_bundled/tab_resumption", "//ios/chrome/browser/content_suggestions/ui_bundled/tips", - "//ios/chrome/browser/ntp/ui_bundled:color", + "//ios/chrome/browser/ntp/ui_bundled:theme", "//ios/chrome/browser/push_notification/model:push_notification_client_id", "//ios/chrome/browser/push_notification/model:push_notification_settings_util_header", "//ios/chrome/browser/shared/public/features",
diff --git a/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_background_view.h b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_background_view.h new file mode 100644 index 0000000..5b82aa7 --- /dev/null +++ b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_background_view.h
@@ -0,0 +1,14 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_UI_BUNDLED_MAGIC_STACK_MAGIC_STACK_MODULE_BACKGROUND_VIEW_H_ +#define IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_UI_BUNDLED_MAGIC_STACK_MAGIC_STACK_MODULE_BACKGROUND_VIEW_H_ + +#import <UIKit/UIKit.h> + +@interface MagicStackModuleBackgroundView : UIView + +@end + +#endif // IOS_CHROME_BROWSER_CONTENT_SUGGESTIONS_UI_BUNDLED_MAGIC_STACK_MAGIC_STACK_MODULE_BACKGROUND_VIEW_H_
diff --git a/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_background_view.mm b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_background_view.mm new file mode 100644 index 0000000..d12b987d --- /dev/null +++ b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_background_view.mm
@@ -0,0 +1,94 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_background_view.h" + +#import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_color_palette.h" +#import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_image_background_trait.h" +#import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_trait.h" +#import "ios/chrome/browser/shared/public/features/features.h" +#import "ios/chrome/browser/shared/ui/util/uikit_ui_util.h" +#import "ios/chrome/common/ui/colors/semantic_color_names.h" +#import "ios/chrome/common/ui/util/constraints_ui_util.h" + +@implementation MagicStackModuleBackgroundView { + UIView* _backgroundColorView; + UIVisualEffectView* _backgroundBlurView; +} + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + if (IsNTPBackgroundCustomizationEnabled()) { + [self registerForTraitChanges: + @[ NewTabPageTrait.class, NewTabPageImageBackgroundTrait.class ] + withAction:@selector(updateBackground)]; + } + [self updateBackground]; + } + return self; +} + +- (void)setBackgroundColor:(UIColor*)color { + [super setBackgroundColor:color]; +} + +#pragma mark - Private + +- (UIVisualEffectView*)backgroundBlurView { + if (_backgroundBlurView) { + return _backgroundBlurView; + } + UIVisualEffect* blurEffect = + [UIBlurEffect effectWithStyle:UIBlurEffectStyleSystemMaterial]; + + _backgroundBlurView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; + _backgroundBlurView.translatesAutoresizingMaskIntoConstraints = NO; + return _backgroundBlurView; +} + +- (UIView*)backgroundColorView { + if (_backgroundColorView) { + return _backgroundColorView; + } + _backgroundColorView = [[UIView alloc] init]; + _backgroundColorView.translatesAutoresizingMaskIntoConstraints = NO; + return _backgroundColorView; +} + +- (void)updateBackground { + // If the background is an image, the modules use a blurred background. + BOOL hasBlurredBackground = + [self.traitCollection boolForNewTabPageImageBackgroundTrait]; + if (hasBlurredBackground) { + UIView* backgroundBlurView = [self backgroundBlurView]; + if (!backgroundBlurView.superview) { + [self addSubview:backgroundBlurView]; + AddSameConstraints(self, backgroundBlurView); + } + if (_backgroundColorView) { + [_backgroundColorView removeFromSuperview]; + _backgroundColorView = nil; + } + return; + } + + UIView* backgroundColorView = [self backgroundColorView]; + if (!backgroundColorView.superview) { + [self addSubview:backgroundColorView]; + AddSameConstraints(self, backgroundColorView); + } + if (_backgroundBlurView) { + [_backgroundBlurView removeFromSuperview]; + _backgroundBlurView = nil; + } + + NewTabPageColorPalette* colorPalette = + [self.traitCollection objectForNewTabPageTrait]; + backgroundColorView.backgroundColor = + colorPalette ? colorPalette.secondaryCellColor + : [UIColor colorNamed:kBackgroundColor]; +} + +@end
diff --git a/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_collection_view_cell.mm b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_collection_view_cell.mm index 4427c1e..d51b5cfb 100644 --- a/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_collection_view_cell.mm +++ b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_collection_view_cell.mm
@@ -8,12 +8,14 @@ #import "ios/chrome/browser/content_suggestions/ui_bundled/content_suggestions_constants.h" #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_context_menu_interaction_handler.h" #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module.h" +#import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_background_view.h" #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_container.h" #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_container_delegate.h" #import "ios/chrome/browser/shared/public/features/features.h" #import "ios/chrome/browser/shared/ui/symbols/symbols.h" #import "ios/chrome/common/ui/colors/semantic_color_names.h" #import "ios/chrome/common/ui/util/constraints_ui_util.h" + namespace { // The corner radius of this container. @@ -28,21 +30,26 @@ @end @implementation MagicStackModuleCollectionViewCell { + // Container that holds the module contents. MagicStackModuleContainer* _moduleContainer; + // Context menu interaction for cell interactions. UIContextMenuInteraction* _contextMenuInteraction; + // Background view to show the proper colored vs blur effect background. + MagicStackModuleBackgroundView* _moduleBackgroundView; } - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { - self.contentView.backgroundColor = [UIColor colorNamed:kBackgroundColor]; + _moduleBackgroundView = [[MagicStackModuleBackgroundView alloc] init]; + self.backgroundView = _moduleBackgroundView; self.layer.cornerRadius = kCornerRadius; self.clipsToBounds = YES; _moduleContainer = [[MagicStackModuleContainer alloc] initWithFrame:CGRectZero]; _moduleContainer.translatesAutoresizingMaskIntoConstraints = NO; - [self addSubview:_moduleContainer]; + [self.contentView addSubview:_moduleContainer]; AddSameConstraints(_moduleContainer, self); } return self;
diff --git a/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_container.mm b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_container.mm index d742349..90fd0a49 100644 --- a/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_container.mm +++ b/ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_container.mm
@@ -15,6 +15,7 @@ #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_constants.h" #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_context_menu_interaction_handler.h" #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module.h" +#import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_background_view.h" #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_container_delegate.h" #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_content_view_delegate.h" #import "ios/chrome/browser/content_suggestions/ui_bundled/magic_stack/magic_stack_module_contents_factory.h" @@ -83,6 +84,7 @@ ContentSuggestionsModuleType _type; BOOL _reducedBottomMargin; MagicStackContextMenuInteractionHandler* _contextMenuInteractionHandler; + MagicStackModuleBackgroundView* _backgroundView; } - (instancetype)initWithFrame:(CGRect)frame { @@ -209,12 +211,6 @@ @[ UITraitPreferredContentSizeCategory.class ]); [self registerForTraitChanges:traits withAction:@selector(updateCardSizing)]; - - if (IsNTPBackgroundCustomizationEnabled()) { - [self registerForTraitChanges:@[ NewTabPageTrait.class ] - withAction:@selector(applyBackgroundColors)]; - [self applyBackgroundColors]; - } } } return self; @@ -277,8 +273,13 @@ // intrinsic size as possible, the constraint is configured to be less than // or equal to. if (config.type == ContentSuggestionsModuleType::kMostVisited) { - if (!IsNTPBackgroundCustomizationEnabled()) { - self.backgroundColor = [UIColor colorNamed:kBackgroundColor]; + // Only create and add the background view if it isn't already in the view + // heirarchy. + if (!_backgroundView.superview) { + _backgroundView = [[MagicStackModuleBackgroundView alloc] init]; + _backgroundView.translatesAutoresizingMaskIntoConstraints = NO; + [self insertSubview:_backgroundView atIndex:0]; + AddSameConstraints(self, _backgroundView); } self.layer.cornerRadius = kCornerRadius; self.clipsToBounds = YES; @@ -361,11 +362,13 @@ } - (void)resetView { - [_placeholderImage removeFromSuperview]; - _placeholderImage = nil; - [_contentView removeFromSuperview]; - _contentView = nil; - _contextMenuInteractionHandler = nil; + [_placeholderImage removeFromSuperview]; + _placeholderImage = nil; + [_contentView removeFromSuperview]; + _contentView = nil; + _contextMenuInteractionHandler = nil; + [_backgroundView removeFromSuperview]; + _backgroundView = nil; } - (MagicStackContextMenuInteractionHandler*)contextMenuInteractionHandler { @@ -602,19 +605,4 @@ } } -#pragma mark - Private - -// Sets the background using the current color palette, or defaults if none is -// set. -- (void)applyBackgroundColors { - NewTabPageColorPalette* colorPalette = - [self.traitCollection objectForNewTabPageTrait]; - - if (colorPalette) { - self.backgroundColor = colorPalette.secondaryCellColor; - } else { - self.backgroundColor = [UIColor colorNamed:kBackgroundColor]; - } -} - @end
diff --git a/ios/chrome/browser/content_suggestions/ui_bundled/safety_check/BUILD.gn b/ios/chrome/browser/content_suggestions/ui_bundled/safety_check/BUILD.gn index fdef227..5aeab64 100644 --- a/ios/chrome/browser/content_suggestions/ui_bundled/safety_check/BUILD.gn +++ b/ios/chrome/browser/content_suggestions/ui_bundled/safety_check/BUILD.gn
@@ -37,7 +37,7 @@ "//ios/chrome/browser/content_suggestions/ui_bundled/cells", "//ios/chrome/browser/content_suggestions/ui_bundled/magic_stack:magic_stack_module_content_view_delegate", "//ios/chrome/browser/content_suggestions/ui_bundled/magic_stack:public", - "//ios/chrome/browser/ntp/ui_bundled:color", + "//ios/chrome/browser/ntp/ui_bundled:theme", "//ios/chrome/browser/passwords/model:password_checkup_utils", "//ios/chrome/browser/push_notification/model:push_notification_client_id", "//ios/chrome/browser/push_notification/model:push_notification_settings_util_header",
diff --git a/ios/chrome/browser/home_customization/coordinator/BUILD.gn b/ios/chrome/browser/home_customization/coordinator/BUILD.gn index 3d937a2..513193bf 100644 --- a/ios/chrome/browser/home_customization/coordinator/BUILD.gn +++ b/ios/chrome/browser/home_customization/coordinator/BUILD.gn
@@ -37,8 +37,8 @@ "//ios/chrome/browser/home_customization/utils", "//ios/chrome/browser/image_fetcher/model", "//ios/chrome/browser/ntp/search_engine_logo/mediator", - "//ios/chrome/browser/ntp/ui_bundled:color", "//ios/chrome/browser/ntp/ui_bundled:logo", + "//ios/chrome/browser/ntp/ui_bundled:theme", "//ios/chrome/browser/parcel_tracking:features", "//ios/chrome/browser/shared/coordinator/alert", "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
diff --git a/ios/chrome/browser/home_customization/ui/BUILD.gn b/ios/chrome/browser/home_customization/ui/BUILD.gn index b9e789b..95d5dea0 100644 --- a/ios/chrome/browser/home_customization/ui/BUILD.gn +++ b/ios/chrome/browser/home_customization/ui/BUILD.gn
@@ -57,8 +57,8 @@ "//ios/chrome/browser/home_customization/utils", "//ios/chrome/browser/ntp/search_engine_logo/mediator", "//ios/chrome/browser/ntp/search_engine_logo/ui", - "//ios/chrome/browser/ntp/ui_bundled:color", "//ios/chrome/browser/ntp/ui_bundled:logo", + "//ios/chrome/browser/ntp/ui_bundled:theme", "//ios/chrome/browser/shared/model/browser", "//ios/chrome/browser/shared/model/web_state_list", "//ios/chrome/browser/shared/public/features",
diff --git a/ios/chrome/browser/intelligence/bwg/coordinator/BUILD.gn b/ios/chrome/browser/intelligence/bwg/coordinator/BUILD.gn index 137d83d..3e65f30 100644 --- a/ios/chrome/browser/intelligence/bwg/coordinator/BUILD.gn +++ b/ios/chrome/browser/intelligence/bwg/coordinator/BUILD.gn
@@ -14,7 +14,9 @@ ] deps = [ "//base", + "//components/feature_engagement/public", "//components/prefs", + "//ios/chrome/browser/feature_engagement/model", "//ios/chrome/browser/intelligence/bwg/metrics", "//ios/chrome/browser/intelligence/bwg/model:browser_agent", "//ios/chrome/browser/intelligence/bwg/model:tab_helper", @@ -32,6 +34,7 @@ "//ios/chrome/browser/signin/model", "//ios/chrome/browser/signin/model:authentication_service", "//ios/chrome/browser/signin/model:authentication_service_factory", + "//ios/public/provider/chrome/browser/bwg:bwg_api", "//ios/web/public", ] }
diff --git a/ios/chrome/browser/intelligence/bwg/coordinator/DEPS b/ios/chrome/browser/intelligence/bwg/coordinator/DEPS index 2e4dc58..7a99107 100644 --- a/ios/chrome/browser/intelligence/bwg/coordinator/DEPS +++ b/ios/chrome/browser/intelligence/bwg/coordinator/DEPS
@@ -4,4 +4,5 @@ "+ios/chrome/browser/signin/model/identity_manager_factory.h", "+ios/chrome/browser/signin/model/authentication_service.h", "+ios/chrome/browser/signin/model/authentication_service_factory.h", + "+ios/chrome/browser/feature_engagement/model/tracker_factory.h", ]
diff --git a/ios/chrome/browser/intelligence/bwg/coordinator/bwg_coordinator.h b/ios/chrome/browser/intelligence/bwg/coordinator/bwg_coordinator.h index 36cbab9..1381eb9 100644 --- a/ios/chrome/browser/intelligence/bwg/coordinator/bwg_coordinator.h +++ b/ios/chrome/browser/intelligence/bwg/coordinator/bwg_coordinator.h
@@ -28,9 +28,6 @@ // coordinator. - (void)stopWithCompletion:(ProceduralBlock)completion; -// Presents the page action menu IPH. -- (void)presentPageActionMenuIPH; - @end #endif // IOS_CHROME_BROWSER_INTELLIGENCE_BWG_COORDINATOR_BWG_COORDINATOR_H_
diff --git a/ios/chrome/browser/intelligence/bwg/coordinator/bwg_coordinator.mm b/ios/chrome/browser/intelligence/bwg/coordinator/bwg_coordinator.mm index d0ea65ba..d330694 100644 --- a/ios/chrome/browser/intelligence/bwg/coordinator/bwg_coordinator.mm +++ b/ios/chrome/browser/intelligence/bwg/coordinator/bwg_coordinator.mm
@@ -5,7 +5,10 @@ #import "ios/chrome/browser/intelligence/bwg/coordinator/bwg_coordinator.h" #import "base/metrics/histogram_functions.h" +#import "components/feature_engagement/public/event_constants.h" +#import "components/feature_engagement/public/tracker.h" #import "components/prefs/pref_service.h" +#import "ios/chrome/browser/feature_engagement/model/tracker_factory.h" #import "ios/chrome/browser/intelligence/bwg/coordinator/bwg_mediator.h" #import "ios/chrome/browser/intelligence/bwg/coordinator/bwg_mediator_delegate.h" #import "ios/chrome/browser/intelligence/bwg/metrics/bwg_metrics.h" @@ -21,6 +24,7 @@ #import "ios/chrome/browser/shared/public/commands/help_commands.h" #import "ios/chrome/browser/signin/model/authentication_service.h" #import "ios/chrome/browser/signin/model/authentication_service_factory.h" +#import "ios/public/provider/chrome/browser/bwg/bwg_api.h" #import "ios/web/public/web_state.h" namespace { @@ -54,9 +58,6 @@ // Pref service. raw_ptr<PrefService> _prefService; - - // Promo was shown. - BOOL _wasPromoShown; } - (instancetype)initWithBaseViewController:(UIViewController*)viewController @@ -75,6 +76,11 @@ _prefService = self.profile->GetPrefs(); CHECK(_prefService); + if (_entryPoint == bwg::EntryPoint::AIHub) { + feature_engagement::TrackerFactory::GetForProfile(self.profile) + ->NotifyEvent(feature_engagement::events::kIOSPageActionMenuIPHUsed); + } + CommandDispatcher* dispatcher = self.browser->GetCommandDispatcher(); _BWGCommandsHandler = HandlerForProtocol(dispatcher, BWGCommands); _helpCommandsHandler = HandlerForProtocol(dispatcher, HelpCommands); @@ -95,6 +101,12 @@ #pragma mark - Public - (void)stopWithCompletion:(ProceduralBlock)completion { + BwgTabHelper* BWGTabHelper = [self activeWebStateBWGTabHelper]; + if (BWGTabHelper) { + BWGTabHelper->SetBwgUiShowing(false); + } + ios::provider::ResetGemini(); + [self presentPageActionMenuIPH]; _FREWrapperViewController = nil; _BWGCommandsHandler = nil; _helpCommandsHandler = nil; @@ -104,12 +116,6 @@ [super stop]; } -- (void)presentPageActionMenuIPH { - if (_wasPromoShown && _entryPoint != bwg::EntryPoint::AIHub) { - [_helpCommandsHandler - presentInProductHelpWithType:InProductHelpType::kPageActionMenu]; - } -} #pragma mark - BWGMediatorDelegate - (BOOL)maybePresentBWGFRE { @@ -143,16 +149,9 @@ BOOL shouldAnimatePresentation = BWGTabHelper ? !BWGTabHelper->GetIsBwgSessionActiveInBackground() : YES; - __weak __typeof(self) weakSelf = self; [self.baseViewController presentViewController:_FREWrapperViewController animated:shouldAnimatePresentation - completion:^{ - BWGCoordinator* strongSelf = weakSelf; - if (strongSelf) { - strongSelf->_wasPromoShown = - showPromo; - } - }]; + completion:nil]; if (BWGTabHelper) { BWGTabHelper->SetBwgUiShowing(true); @@ -171,17 +170,7 @@ } - (void)dismissBWGFlow { - __weak __typeof(self) weakSelf = self; - [self dismissPresentedViewWithCompletion:^{ - BWGCoordinator* strongSelf = weakSelf; - [strongSelf presentPageActionMenuIPH]; - [strongSelf->_BWGCommandsHandler dismissBWGFlowWithCompletion:nil]; - }]; - - BwgTabHelper* BWGTabHelper = [self activeWebStateBWGTabHelper]; - if (BWGTabHelper) { - BWGTabHelper->SetBwgUiShowing(false); - } + [_BWGCommandsHandler dismissBWGFlowWithCompletion:nil]; } #pragma mark - UISheetPresentationControllerDelegate @@ -239,4 +228,13 @@ return BwgTabHelper::FromWebState(activeWebState); } +// Attemps to present the entry point IPH the user hasn't used the AI Hub entry +// point yet. +- (void)presentPageActionMenuIPH { + if (_entryPoint != bwg::EntryPoint::AIHub) { + [_helpCommandsHandler + presentInProductHelpWithType:InProductHelpType::kPageActionMenu]; + } +} + @end
diff --git a/ios/chrome/browser/intelligence/bwg/model/bwg_service.h b/ios/chrome/browser/intelligence/bwg/model/bwg_service.h index b8746dd..dd3cae8 100644 --- a/ios/chrome/browser/intelligence/bwg/model/bwg_service.h +++ b/ios/chrome/browser/intelligence/bwg/model/bwg_service.h
@@ -7,6 +7,7 @@ #import "base/memory/raw_ptr.h" #import "components/keyed_service/core/keyed_service.h" +#import "components/signin/public/identity_manager/identity_manager.h" class AuthenticationService; namespace signin { @@ -19,13 +20,15 @@ } // A browser-context keyed service for BWG. -class BwgService : public KeyedService { +class BwgService : public KeyedService, + public signin::IdentityManager::Observer { public: BwgService(ProfileIOS* profile, AuthenticationService* auth_service, signin::IdentityManager* identity_manager, PrefService* pref_service); ~BwgService() override; + void Shutdown() override; // Returns whether the current profile is eligible for BWG. bool IsProfileEligibleForBwg(); @@ -33,6 +36,12 @@ // Whether BWG is available for a given web state. bool IsBwgAvailableForWebState(web::WebState* web_state); + // signin::IdentityManager::Observer: + void OnPrimaryAccountChanged( + const signin::PrimaryAccountChangeEvent& event) override; + void OnIdentityManagerShutdown( + signin::IdentityManager* identity_manager) override; + private: // The associated profile. raw_ptr<ProfileIOS> profile_; @@ -49,6 +58,10 @@ // Whether the user is ineligible by the Gemini Enterprise policy (not Chrome // Enterprise). bool is_disabled_by_gemini_policy_ = false; + + // Checks if the account is eligible for Gemini Enterprise and populates + // `is_disabled_by_gemini_policy_`. + void CheckGeminiEnterpriseEligibility(); }; #endif // IOS_CHROME_BROWSER_INTELLIGENCE_BWG_MODEL_BWG_SERVICE_H_
diff --git a/ios/chrome/browser/intelligence/bwg/model/bwg_service.mm b/ios/chrome/browser/intelligence/bwg/model/bwg_service.mm index ba88228..cdffb0a 100644 --- a/ios/chrome/browser/intelligence/bwg/model/bwg_service.mm +++ b/ios/chrome/browser/intelligence/bwg/model/bwg_service.mm
@@ -22,15 +22,20 @@ profile_ = profile; auth_service_ = auth_service; identity_manager_ = identity_manager; + identity_manager_->AddObserver(this); pref_service_ = pref_service; - ios::provider::CheckGeminiEligibility(auth_service_, ^(BOOL eligible) { - is_disabled_by_gemini_policy_ = !eligible; - }); + CheckGeminiEnterpriseEligibility(); } BwgService::~BwgService() = default; +void BwgService::Shutdown() { + identity_manager_->RemoveObserver(this); +} + +#pragma mark - Public + bool BwgService::IsProfileEligibleForBwg() { AccountInfo account_info = identity_manager_->FindExtendedAccountInfo( identity_manager_->GetPrimaryAccountInfo(signin::ConsentLevel::kSignin)); @@ -71,3 +76,25 @@ return is_web_state_eligible; } + +#pragma mark - signin::IdentityManager::Observer + +void BwgService::OnPrimaryAccountChanged( + const signin::PrimaryAccountChangeEvent& event) { + CheckGeminiEnterpriseEligibility(); +} + +void BwgService::OnIdentityManagerShutdown( + signin::IdentityManager* identity_manager) { + if (identity_manager_) { + identity_manager_->RemoveObserver(this); + } +} + +#pragma mark - Private + +void BwgService::CheckGeminiEnterpriseEligibility() { + ios::provider::CheckGeminiEligibility(auth_service_, ^(BOOL eligible) { + is_disabled_by_gemini_policy_ = !eligible; + }); +}
diff --git a/ios/chrome/browser/intelligence/bwg/model/bwg_service_unittest.mm b/ios/chrome/browser/intelligence/bwg/model/bwg_service_unittest.mm index 844b22f..79cb30ef 100644 --- a/ios/chrome/browser/intelligence/bwg/model/bwg_service_unittest.mm +++ b/ios/chrome/browser/intelligence/bwg/model/bwg_service_unittest.mm
@@ -43,9 +43,18 @@ pref_service_->registry()->RegisterIntegerPref( prefs::kGeminiEnabledByPolicy, 0); - identity_manager_ = identity_test_env_.identity_manager(); bwg_service_ = std::make_unique<BwgService>( - profile_.get(), auth_service_, identity_manager_, pref_service_.get()); + profile_.get(), auth_service_, identity_test_env_.identity_manager(), + pref_service_.get()); + } + + void TearDown() override { + // Shutdown the service to ensure it unregisters itself as an observer + // from IdentityManager before IdentityManager is destroyed. + if (bwg_service_) { + bwg_service_->Shutdown(); + } + PlatformTest::TearDown(); } // Signs in a user and sets their model execution capability. @@ -70,7 +79,6 @@ std::unique_ptr<TestProfileIOS> profile_; std::unique_ptr<BwgService> bwg_service_; std::unique_ptr<TestingPrefServiceSimple> pref_service_; - raw_ptr<signin::IdentityManager> identity_manager_; raw_ptr<AuthenticationService> auth_service_; base::HistogramTester histogram_tester_; @@ -115,8 +123,8 @@ // account. TEST_F(BwgServiceTest, IsProfileEligibleForBWG_IneligibleWhenSignedOut) { // The default state is signed out. - EXPECT_FALSE( - identity_manager_->HasPrimaryAccount(signin::ConsentLevel::kSignin)); + EXPECT_FALSE(identity_test_env_.identity_manager()->HasPrimaryAccount( + signin::ConsentLevel::kSignin)); EXPECT_FALSE(bwg_service_->IsProfileEligibleForBwg()); histogram_tester_.ExpectUniqueSample(kEligibilityHistogram,
diff --git a/ios/chrome/browser/intelligence/bwg/model/bwg_session_handler.mm b/ios/chrome/browser/intelligence/bwg/model/bwg_session_handler.mm index 8e0351c..d45beb4 100644 --- a/ios/chrome/browser/intelligence/bwg/model/bwg_session_handler.mm +++ b/ios/chrome/browser/intelligence/bwg/model/bwg_session_handler.mm
@@ -45,7 +45,7 @@ - (void)UIDidDisappearWithClientID:(NSString*)clientID serverID:(NSString*)serverID { - [_BWGHandler dismissBWGFlowFromSession]; + [_BWGHandler dismissBWGFlowWithCompletion:nil]; [self setSessionActive:NO clientID:clientID]; // Record session duration. if (!_sessionStartTime.is_null()) { @@ -62,15 +62,7 @@ } - (void)didTapBWGSettingsButton { - __weak BWGSessionHandler* weakSelf = self; - [_BWGHandler dismissBWGFlowWithCompletion:^{ - BWGSessionHandler* strongSelf = weakSelf; - if (!strongSelf) { - return; - } - - [strongSelf.settingsHandler showBWGSettings]; - }]; + [self.settingsHandler showBWGSettings]; } - (void)didSendQueryWithInputType:(BWGInputType)inputType
diff --git a/ios/chrome/browser/ntp/ui_bundled/BUILD.gn b/ios/chrome/browser/ntp/ui_bundled/BUILD.gn index 9b74f484..d3c5bb8 100644 --- a/ios/chrome/browser/ntp/ui_bundled/BUILD.gn +++ b/ios/chrome/browser/ntp/ui_bundled/BUILD.gn
@@ -22,13 +22,15 @@ ] } -source_set("color") { +source_set("theme") { sources = [ "new_tab_page_color_palette.h", "new_tab_page_color_palette.mm", "new_tab_page_color_palette_util.h", "new_tab_page_color_palette_util.mm", "new_tab_page_color_updating.h", + "new_tab_page_image_background_trait.h", + "new_tab_page_image_background_trait.mm", "new_tab_page_trait.h", "new_tab_page_trait.mm", "theme_utils.h", @@ -116,12 +118,12 @@ "new_tab_page_coordinator.mm", ] deps = [ - ":color", ":component_factory_protocol", ":constants", ":feature_flags", ":logo", ":ntp_internal", + ":theme", ":ui_bundled", "//base", "//components/feature_engagement/public", @@ -237,10 +239,10 @@ "new_tab_page_view_controller.mm", ] deps = [ - ":color", ":constants", ":feature_flags", ":logo", + ":theme", ":ui_bundled", "//base", "//components/feature_engagement/public", @@ -348,12 +350,12 @@ "new_tab_page_trait_unittest.mm", ] deps = [ - ":color", ":component_factory", ":coordinator", ":feature_flags", ":logo", ":ntp_internal", + ":theme", ":ui_bundled", "//base", "//base/test:test_support",
diff --git a/ios/chrome/browser/ntp/ui_bundled/new_tab_page_image_background_trait.h b/ios/chrome/browser/ntp/ui_bundled/new_tab_page_image_background_trait.h new file mode 100644 index 0000000..d50d761 --- /dev/null +++ b/ios/chrome/browser/ntp/ui_bundled/new_tab_page_image_background_trait.h
@@ -0,0 +1,40 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IOS_CHROME_BROWSER_NTP_UI_BUNDLED_NEW_TAB_PAGE_IMAGE_BACKGROUND_TRAIT_H_ +#define IOS_CHROME_BROWSER_NTP_UI_BUNDLED_NEW_TAB_PAGE_IMAGE_BACKGROUND_TRAIT_H_ + +#import "ios/chrome/browser/shared/ui/util/custom_ui_trait_accessor.h" + +// A trait definition for whether New Tab Page has an image background. +@interface NewTabPageImageBackgroundTrait : NSObject <UIObjectTraitDefinition> + +// `UIObjectTraitDefinition`'s default value must be an object, so this exposes +// a version that is a BOOL. ++ (BOOL)defaultBoolValue; + +@end + +// Extension for the `CustomUITraitAccessor` class to add +// `NewTabPageImageBackgroundTrait`-related methods. +@interface CustomUITraitAccessor (NewTabPageImageBackgroundTrait) + +// Sets the `NewTabPageImageBackgroundTrait` boolean value in a type-safe way. +- (void)setBoolForNewTabPageImageBackgroundTrait:(BOOL)boolean; + +// Gets the `NewTabPageImageBackgroundTrait` boolean value in a type-safe way. +- (BOOL)boolForNewTabPageImageBackgroundTrait; + +@end + +// Extension for the `CustomUITraitAccessor` class to add +// `NewTabPageImageBackgroundTrait`-related methods. +@interface UITraitCollection (NewTabPageImageBackgroundTrait) + +// Gets the `NewTabPageImageBackgroundTrait` boolean value in a type-safe way. +- (BOOL)boolForNewTabPageImageBackgroundTrait; + +@end + +#endif // IOS_CHROME_BROWSER_NTP_UI_BUNDLED_NEW_TAB_PAGE_IMAGE_BACKGROUND_TRAIT_H_
diff --git a/ios/chrome/browser/ntp/ui_bundled/new_tab_page_image_background_trait.mm b/ios/chrome/browser/ntp/ui_bundled/new_tab_page_image_background_trait.mm new file mode 100644 index 0000000..79d6beb --- /dev/null +++ b/ios/chrome/browser/ntp/ui_bundled/new_tab_page_image_background_trait.mm
@@ -0,0 +1,44 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_image_background_trait.h" + +#import "base/apple/foundation_util.h" + +@implementation NewTabPageImageBackgroundTrait + ++ (BOOL)defaultBoolValue { + return NO; +} + +#pragma mark - UIObjectTraitDefinition + ++ (NSNumber*)defaultValue { + return [NSNumber numberWithBool:[self defaultBoolValue]]; +} + +@end + +@implementation CustomUITraitAccessor (NewTabPageImageBackgroundTrait) + +- (void)setBoolForNewTabPageImageBackgroundTrait:(BOOL)boolean { + [self.mutableTraits setObject:[NSNumber numberWithBool:boolean] + forTrait:NewTabPageImageBackgroundTrait.class]; +} + +- (BOOL)boolForNewTabPageImageBackgroundTrait { + return [base::apple::ObjCCastStrict<NSNumber>([self.mutableTraits + objectForTrait:NewTabPageImageBackgroundTrait.class]) boolValue]; +} + +@end + +@implementation UITraitCollection (NewTabPageImageBackgroundTrait) + +- (BOOL)boolForNewTabPageImageBackgroundTrait { + return [base::apple::ObjCCastStrict<NSNumber>( + [self objectForTrait:NewTabPageImageBackgroundTrait.class]) boolValue]; +} + +@end
diff --git a/ios/chrome/browser/ntp/ui_bundled/new_tab_page_mediator.mm b/ios/chrome/browser/ntp/ui_bundled/new_tab_page_mediator.mm index 166ec86..b6f295c 100644 --- a/ios/chrome/browser/ntp/ui_bundled/new_tab_page_mediator.mm +++ b/ios/chrome/browser/ntp/ui_bundled/new_tab_page_mediator.mm
@@ -51,6 +51,7 @@ #import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_feature.h" #import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_header_constants.h" #import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_header_consumer.h" +#import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_image_background_trait.h" #import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_trait.h" #import "ios/chrome/browser/ntp/ui_bundled/new_tab_page_view_controller.h" #import "ios/chrome/browser/ntp/ui_bundled/theme_utils.h" @@ -396,6 +397,9 @@ std::optional<sync_pb::UserColorTheme> colorTheme = _backgroundCustomizationService->GetCurrentColorTheme(); + CustomUITraitAccessor* traitAccessor = [[CustomUITraitAccessor alloc] + initWithMutableTraits:self.consumer.traitOverrides]; + if (colorTheme && colorTheme->color()) { // Sets the New Tab Page trait to a color palette generated from the current // theme. @@ -403,19 +407,20 @@ skia::UIColorFromSkColor(colorTheme->color()), ProtoEnumToSchemeVariant(colorTheme->browser_color_variant())); - [[[CustomUITraitAccessor alloc] - initWithMutableTraits:self.consumer.traitOverrides] - setObjectForNewTabPageTrait:colorPalette]; + [traitAccessor setObjectForNewTabPageTrait:colorPalette]; [self.consumer setBackgroundImage:nil]; [self.headerConsumer updateLogoColor:colorPalette.tintColor]; + [traitAccessor setBoolForNewTabPageImageBackgroundTrait:NO]; return; } // Clears the color palette associated with the New Tab Page trait, // reverting to the default colors defined by the trait. - [[[CustomUITraitAccessor alloc] - initWithMutableTraits:self.consumer.traitOverrides] - setObjectForNewTabPageTrait:[NewTabPageTrait defaultValue]]; + [traitAccessor setObjectForNewTabPageTrait:[NewTabPageTrait defaultValue]]; + + [traitAccessor + setBoolForNewTabPageImageBackgroundTrait:background.has_value()]; + if (!background) { [self.consumer setBackgroundImage:nil]; [self.headerConsumer updateLogoColor:nil];
diff --git a/ios/chrome/browser/ntp/ui_bundled/new_tab_page_trait.mm b/ios/chrome/browser/ntp/ui_bundled/new_tab_page_trait.mm index a7db55a6..ec872c1 100644 --- a/ios/chrome/browser/ntp/ui_bundled/new_tab_page_trait.mm +++ b/ios/chrome/browser/ntp/ui_bundled/new_tab_page_trait.mm
@@ -20,12 +20,12 @@ @implementation CustomUITraitAccessor (NewTabPageTrait) - (void)setObjectForNewTabPageTrait:(NewTabPageColorPalette*)object { - [self.mutableTraits setObject:object forTrait:[NewTabPageTrait class]]; + [self.mutableTraits setObject:object forTrait:NewTabPageTrait.class]; } - (NewTabPageColorPalette*)objectForNewTabPageTrait { return base::apple::ObjCCastStrict<NewTabPageColorPalette>( - [self.mutableTraits objectForTrait:[NewTabPageTrait class]]); + [self.mutableTraits objectForTrait:NewTabPageTrait.class]); } @end
diff --git a/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_mediator.mm b/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_mediator.mm index d060234..fcb6a1ec 100644 --- a/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_mediator.mm +++ b/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_mediator.mm
@@ -2122,7 +2122,6 @@ actions.push_back(overflow_menu::ActionType::SetTabReminder); } - actions.push_back(overflow_menu::ActionType::Follow); actions.push_back(overflow_menu::ActionType::Bookmark); actions.push_back(overflow_menu::ActionType::ReadingList); actions.push_back(overflow_menu::ActionType::ClearBrowsingData);
diff --git a/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_orderer.mm b/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_orderer.mm index 96e06c8..bee8d1a 100644 --- a/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_orderer.mm +++ b/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_orderer.mm
@@ -608,6 +608,11 @@ // not add it to `actionsSet`. continue; } + if (*actionType == overflow_menu::ActionType::Follow) { + // Follow has been deprecated. Do not add it to `actionSet`. + // TODO(crbug.com/435685705): Clean up the enum. + continue; + } actionsSet.insert(*actionType); actionOrderData.shownActions.push_back(*actionType); @@ -635,6 +640,11 @@ // not add it to `actionsSet`. continue; } + if (*actionType == overflow_menu::ActionType::Follow) { + // Follow has been deprecated. Do not add it to `actionSet`. + // TODO(crbug.com/435685705): Clean up the enum. + continue; + } actionsSet.insert(*actionType); actionOrderData.hiddenActions.push_back(*actionType);
diff --git a/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_orderer_unittest.mm b/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_orderer_unittest.mm index 3304219..097dba3 100644 --- a/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_orderer_unittest.mm +++ b/ios/chrome/browser/popup_menu/ui_bundled/overflow_menu/overflow_menu_orderer_unittest.mm
@@ -235,7 +235,6 @@ ActionRanking SampleActions() { return { - overflow_menu::ActionType::Follow, overflow_menu::ActionType::Bookmark, overflow_menu::ActionType::ReadingList, overflow_menu::ActionType::ClearBrowsingData, @@ -859,9 +858,9 @@ base::Value::Dict() .Set("shown", base::Value::List() .Append(overflow_menu::StringNameForActionType( - overflow_menu::ActionType::Follow)) + overflow_menu::ActionType::Bookmark)) .Append(overflow_menu::StringNameForActionType( - overflow_menu::ActionType::Bookmark))) + overflow_menu::ActionType::TextZoom))) .Set("hidden", base::Value::List() .Append(overflow_menu::StringNameForActionType( @@ -883,21 +882,19 @@ [overflow_menu_orderer_ updatePageActions]; - ASSERT_EQ(group.actions.count, 6u); + ASSERT_EQ(group.actions.count, 5u); // The action order should first be shown actions, and then any new actions in // order. EXPECT_EQ(static_cast<overflow_menu::ActionType>(group.actions[0].actionType), - overflow_menu::ActionType::Follow); - EXPECT_EQ(static_cast<overflow_menu::ActionType>(group.actions[1].actionType), overflow_menu::ActionType::Bookmark); + EXPECT_EQ(static_cast<overflow_menu::ActionType>(group.actions[1].actionType), + overflow_menu::ActionType::TextZoom); EXPECT_EQ(static_cast<overflow_menu::ActionType>(group.actions[2].actionType), overflow_menu::ActionType::Translate); EXPECT_EQ(static_cast<overflow_menu::ActionType>(group.actions[3].actionType), overflow_menu::ActionType::DesktopSite); EXPECT_EQ(static_cast<overflow_menu::ActionType>(group.actions[4].actionType), overflow_menu::ActionType::FindInPage); - EXPECT_EQ(static_cast<overflow_menu::ActionType>(group.actions[5].actionType), - overflow_menu::ActionType::TextZoom); } // Tests that when there is a badged item, the overflow menu orderer doesn't @@ -2070,8 +2067,8 @@ ActionCustomizationModel* actionModel = overflow_menu_orderer_.actionCustomizationModel; - OverflowMenuAction* action4 = actionModel.shownActions[4]; - OverflowMenuAction* action5 = actionModel.shownActions[5]; + OverflowMenuAction* action4 = actionModel.shownActions[3]; + OverflowMenuAction* action5 = actionModel.shownActions[4]; action4.shown = NO; action5.shown = NO; @@ -2086,13 +2083,11 @@ 1); tester.ExpectBucketCount( - "IOS.OverflowMenu.Customization.ActionsReordered.FirstPosition", 4, 1); + "IOS.OverflowMenu.Customization.ActionsReordered.FirstPosition", 5, 1); tester.ExpectBucketCount( - "IOS.OverflowMenu.Customization.ActionsReordered.SecondPosition", 5, 1); + "IOS.OverflowMenu.Customization.ActionsReordered.SecondPosition", 6, 1); tester.ExpectBucketCount( - "IOS.OverflowMenu.Customization.ActionsReordered.ThirdPosition", 6, 1); - tester.ExpectBucketCount( - "IOS.OverflowMenu.Customization.ActionsReordered.FourthPosition", 7, 1); + "IOS.OverflowMenu.Customization.ActionsReordered.ThirdPosition", 7, 1); std::vector<base::Bucket> buckets = tester.GetAllSamples("IOS.OverflowMenu.Customization.ActionsCustomized"); @@ -2101,7 +2096,7 @@ EXPECT_FALSE(buckets[0].min & 1 << 1); EXPECT_FALSE(buckets[0].min & 1 << 2); - // Now turn action 4 (the first hidden action) back on. + // Now turn action 3 (the first hidden action) back on. actionModel = overflow_menu_orderer_.actionCustomizationModel; actionModel.hiddenActions[0].shown = YES; @@ -2111,13 +2106,11 @@ tester.ExpectBucketCount("IOS.OverflowMenu.Customization.ActionAdded", 8, 1); tester.ExpectBucketCount( - "IOS.OverflowMenu.Customization.ActionsReordered.FirstPosition", 4, 2); + "IOS.OverflowMenu.Customization.ActionsReordered.FirstPosition", 5, 2); tester.ExpectBucketCount( - "IOS.OverflowMenu.Customization.ActionsReordered.SecondPosition", 5, 2); + "IOS.OverflowMenu.Customization.ActionsReordered.SecondPosition", 6, 2); tester.ExpectBucketCount( - "IOS.OverflowMenu.Customization.ActionsReordered.ThirdPosition", 6, 2); - tester.ExpectBucketCount( - "IOS.OverflowMenu.Customization.ActionsReordered.FourthPosition", 7, 2); + "IOS.OverflowMenu.Customization.ActionsReordered.ThirdPosition", 7, 2); buckets = tester.GetAllSamples("IOS.OverflowMenu.Customization.ActionsCustomized"); @@ -2170,7 +2163,6 @@ CreatePrefs(); // Define actions with duplicates. - overflow_menu::ActionType followAction = overflow_menu::ActionType::Follow; overflow_menu::ActionType bookmarkAction = overflow_menu::ActionType::Bookmark; overflow_menu::ActionType readingListAction = @@ -2179,13 +2171,15 @@ overflow_menu::ActionType::ClearBrowsingData; overflow_menu::ActionType translateAction = overflow_menu::ActionType::Translate; + overflow_menu::ActionType textZoomAction = + overflow_menu::ActionType::TextZoom; base::Value::List shown_actions_list = base::Value::List() - .Append(overflow_menu::StringNameForActionType(followAction)) .Append(overflow_menu::StringNameForActionType(bookmarkAction)) + .Append(overflow_menu::StringNameForActionType(textZoomAction)) // Duplicate shown action. - .Append(overflow_menu::StringNameForActionType(followAction)); + .Append(overflow_menu::StringNameForActionType(bookmarkAction)); base::Value::List hidden_actions_list = base::Value::List() @@ -2194,7 +2188,7 @@ // Duplicate hidden action. .Append(overflow_menu::StringNameForActionType(readingListAction)) // Action also in shown list (should be ignored here). - .Append(overflow_menu::StringNameForActionType(bookmarkAction)) + .Append(overflow_menu::StringNameForActionType(textZoomAction)) // Unique hidden action. .Append(overflow_menu::StringNameForActionType(translateAction)); @@ -2213,10 +2207,10 @@ ASSERT_EQ(model.shownActions.count, 2u); EXPECT_EQ( static_cast<overflow_menu::ActionType>(model.shownActions[0].actionType), - followAction); + bookmarkAction); EXPECT_EQ( static_cast<overflow_menu::ActionType>(model.shownActions[1].actionType), - bookmarkAction); + textZoomAction); ASSERT_EQ(model.hiddenActions.count, 3u); EXPECT_EQ( @@ -2236,7 +2230,8 @@ CreatePrefs(); // Define some valid actions. - overflow_menu::ActionType followAction = overflow_menu::ActionType::Follow; + overflow_menu::ActionType textZoomAction = + overflow_menu::ActionType::TextZoom; overflow_menu::ActionType bookmarkAction = overflow_menu::ActionType::Bookmark; overflow_menu::ActionType readingListAction = @@ -2247,7 +2242,7 @@ base::Value::List shown_actions_list = base::Value::List() .Append("InvalidActionString1") // Invalid string. - .Append(overflow_menu::StringNameForActionType(followAction)) + .Append(overflow_menu::StringNameForActionType(textZoomAction)) .Append("AnotherInvalidString") // Another invalid string. .Append(overflow_menu::StringNameForActionType(bookmarkAction)); @@ -2273,7 +2268,7 @@ ASSERT_EQ(model.shownActions.count, 2u); EXPECT_EQ( static_cast<overflow_menu::ActionType>(model.shownActions[0].actionType), - followAction); + textZoomAction); EXPECT_EQ( static_cast<overflow_menu::ActionType>(model.shownActions[1].actionType), bookmarkAction); @@ -2329,24 +2324,26 @@ UpdatePageActionsWithUnsortedBaseActionsPreservesOrderAndAppendsNew) { CreatePrefs(); - // Define actions. Values are: Follow(4), Bookmark(5), ReadingList(6), - // Translate(8), FindInPage(10). - overflow_menu::ActionType followAction = overflow_menu::ActionType::Follow; + // Define actions. Values are: Bookmark(5), ReadingList(6), + // ClearBrowsingData(7) Translate(8), FindInPage(10). overflow_menu::ActionType bookmarkAction = overflow_menu::ActionType::Bookmark; overflow_menu::ActionType readingListAction = overflow_menu::ActionType::ReadingList; + overflow_menu::ActionType clearBrowsingData = + overflow_menu::ActionType::ClearBrowsingData; overflow_menu::ActionType translateAction = overflow_menu::ActionType::Translate; overflow_menu::ActionType findInPageAction = overflow_menu::ActionType::FindInPage; - // Set initial prefs: Shown [Bookmark, Follow], Hidden [Translate] - // Note: Bookmark (5) comes before Follow (4) in shown list. + // Set initial prefs: Shown [Clear Browsing Data, Bookmark], Hidden + // [Translate] Note: Clear Browsing Data (7) comes before Bookmark (5) in + // shown list. base::Value::List initial_shown_actions = base::Value::List() - .Append(overflow_menu::StringNameForActionType(bookmarkAction)) - .Append(overflow_menu::StringNameForActionType(followAction)); + .Append(overflow_menu::StringNameForActionType(clearBrowsingData)) + .Append(overflow_menu::StringNameForActionType(bookmarkAction)); base::Value::List initial_hidden_actions = base::Value::List().Append( overflow_menu::StringNameForActionType(translateAction)); @@ -2358,26 +2355,26 @@ InitializeOverflowMenuOrderer(NO); - // Set basePageActions from provider: [ReadingList, Bookmark, FindInPage, - // Follow, Translate] This list is not sorted by integral value (6, 5, 10, 4, - // 8). New actions here are ReadingList and FindInPage. - action_provider_.basePageActions = {readingListAction, bookmarkAction, - findInPageAction, followAction, + // Set basePageActions from provider: [ReadingList, Clear Browsing Data, + // FindInPage, Bookmark, Translate] This list is not sorted by integral value + // (6, 7, 10, 5, 8). New actions here are ReadingList and FindInPage. + action_provider_.basePageActions = {readingListAction, clearBrowsingData, + findInPageAction, bookmarkAction, translateAction}; // Accessing the model triggers an update of page actions. ActionCustomizationModel* model = overflow_menu_orderer_.actionCustomizationModel; - // Expected shown: [Bookmark, Follow (from prefs), ReadingList, FindInPage - // (new, in order from basePageActions)] + // Expected shown: [Clear Browsing Data, Bookmark (from prefs), ReadingList, + // FindInPage (new, in order from basePageActions)] ASSERT_EQ(model.shownActions.count, 4u); EXPECT_EQ( static_cast<overflow_menu::ActionType>(model.shownActions[0].actionType), - bookmarkAction); + clearBrowsingData); EXPECT_EQ( static_cast<overflow_menu::ActionType>(model.shownActions[1].actionType), - followAction); + bookmarkAction); EXPECT_EQ( static_cast<overflow_menu::ActionType>(model.shownActions[2].actionType), readingListAction);
diff --git a/ios/chrome/browser/providers/bwg/chromium_bwg.mm b/ios/chrome/browser/providers/bwg/chromium_bwg.mm index 3b8a0cd6..d9f297f 100644 --- a/ios/chrome/browser/providers/bwg/chromium_bwg.mm +++ b/ios/chrome/browser/providers/bwg/chromium_bwg.mm
@@ -32,4 +32,6 @@ void CheckGeminiEligibility(AuthenticationService* auth_service, BWGEligibilityCallback completion) {} +void ResetGemini() {} + } // namespace ios::provider
diff --git a/ios/chrome/browser/safari_data_import/coordinator/safari_data_import_import_mediator.mm b/ios/chrome/browser/safari_data_import/coordinator/safari_data_import_import_mediator.mm index 176efd2fc..1b4276e3 100644 --- a/ios/chrome/browser/safari_data_import/coordinator/safari_data_import_import_mediator.mm +++ b/ios/chrome/browser/safari_data_import/coordinator/safari_data_import_import_mediator.mm
@@ -64,8 +64,8 @@ _importClient = std::make_unique<IOSSafariDataImportClient>(); _savedPasswordsPresenter = std::move(savedPasswordsPresenter); _savedPasswordsPresenter->Init(); - scoped_refptr<user_data_importer::IOSBookmarkParser> bookmarkParser = - base::MakeRefCounted<user_data_importer::IOSBookmarkParser>(); + std::unique_ptr<user_data_importer::IOSBookmarkParser> bookmarkParser = + std::make_unique<user_data_importer::IOSBookmarkParser>(); std::string locale = GetApplicationContext()->GetApplicationLocaleStorage()->Get(); _importer = std::make_unique<user_data_importer::SafariDataImporter>(
diff --git a/ios/chrome/browser/shared/coordinator/scene/scene_controller.mm b/ios/chrome/browser/shared/coordinator/scene/scene_controller.mm index 3fe9730..10839a5 100644 --- a/ios/chrome/browser/shared/coordinator/scene/scene_controller.mm +++ b/ios/chrome/browser/shared/coordinator/scene/scene_controller.mm
@@ -2928,10 +2928,13 @@ BWGControllerForBrowser:self.mainInterface.browser delegate:self]; - UIViewController* baseViewController = self.currentInterface.viewController; - [baseViewController presentViewController:self.settingsNavigationController - animated:YES - completion:nil]; + UIViewController* presenter = self.currentInterface.viewController; + while (presenter.presentedViewController) { + presenter = presenter.presentedViewController; + } + [presenter presentViewController:self.settingsNavigationController + animated:YES + completion:nil]; } #pragma mark - SettingsNavigationControllerDelegate
diff --git a/ios/chrome/browser/shared/public/commands/bwg_commands.h b/ios/chrome/browser/shared/public/commands/bwg_commands.h index b24605d..f4ce177e 100644 --- a/ios/chrome/browser/shared/public/commands/bwg_commands.h +++ b/ios/chrome/browser/shared/public/commands/bwg_commands.h
@@ -24,9 +24,6 @@ // web state is eligible. If the page is ineligible, does nothing. - (void)showBWGPromoIfPageIsEligible; -// Dismiss BWG flow from a BWG session. -- (void)dismissBWGFlowFromSession; - @end #endif // IOS_CHROME_BROWSER_SHARED_PUBLIC_COMMANDS_BWG_COMMANDS_H_
diff --git a/ios/chrome/test/providers/bwg/test_bwg.mm b/ios/chrome/test/providers/bwg/test_bwg.mm index a9fb3d21..8a21b62 100644 --- a/ios/chrome/test/providers/bwg/test_bwg.mm +++ b/ios/chrome/test/providers/bwg/test_bwg.mm
@@ -34,4 +34,6 @@ void CheckGeminiEligibility(AuthenticationService* auth_service, BWGEligibilityCallback completion) {} +void ResetGemini() {} + } // namespace ios::provider
diff --git a/ios/public/provider/chrome/browser/bwg/bwg_api.h b/ios/public/provider/chrome/browser/bwg/bwg_api.h index 223cbe5..baa14b24 100644 --- a/ios/public/provider/chrome/browser/bwg/bwg_api.h +++ b/ios/public/provider/chrome/browser/bwg/bwg_api.h
@@ -119,6 +119,9 @@ void CheckGeminiEligibility(AuthenticationService* auth_service, BWGEligibilityCallback completion); +// Resets the Gemini instance by clearing its state. +void ResetGemini(); + } // namespace ios::provider #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BWG_BWG_API_H_
diff --git a/ios/web_view/BUILD.gn b/ios/web_view/BUILD.gn index 37f69ab..1a54cda 100644 --- a/ios/web_view/BUILD.gn +++ b/ios/web_view/BUILD.gn
@@ -128,6 +128,8 @@ "internal/autofill/cwv_credit_card_saver_internal.h", "internal/autofill/cwv_credit_card_verifier.mm", "internal/autofill/cwv_credit_card_verifier_internal.h", + "internal/autofill/cwv_password_affiliation.h", + "internal/autofill/cwv_password_affiliation.mm", "internal/autofill/ios_web_view_payments_autofill_client.h", "internal/autofill/ios_web_view_payments_autofill_client.mm", "internal/autofill/web_view_autocomplete_history_manager_factory.h", @@ -348,6 +350,7 @@ "//components/os_crypt/async/browser", "//components/password_manager/core/browser", "//components/password_manager/core/browser/affiliation:affiliation_fetching", + "//components/password_manager/core/browser/affiliation:affiliation_match_helper", "//components/password_manager/core/browser/features:password_features", "//components/password_manager/core/browser/generation:core", "//components/password_manager/core/browser/leak_detection",
diff --git a/ios/web_view/internal/autofill/cwv_autofill_data_manager.mm b/ios/web_view/internal/autofill/cwv_autofill_data_manager.mm index 4f9fdba..c7693db 100644 --- a/ios/web_view/internal/autofill/cwv_autofill_data_manager.mm +++ b/ios/web_view/internal/autofill/cwv_autofill_data_manager.mm
@@ -6,17 +6,22 @@ #import "base/functional/bind.h" #import "base/location.h" +#import "base/memory/raw_ptr.h" #import "base/notreached.h" #import "base/strings/sys_string_conversions.h" #import "base/time/time.h" +#import "components/affiliations/core/browser/affiliation_service.h" +#import "components/affiliations/core/browser/affiliation_utils.h" #import "components/autofill/core/browser/data_manager/addresses/address_data_manager.h" #import "components/autofill/core/browser/data_manager/payments/payments_data_manager.h" #import "components/autofill/core/browser/data_manager/personal_data_manager.h" #import "components/autofill/core/browser/data_manager/personal_data_manager_observer.h" +#import "components/password_manager/core/browser/affiliation/affiliated_match_helper.h" #import "components/password_manager/core/browser/password_manager_util.h" #import "components/password_manager/core/browser/password_store/password_store_change.h" #import "components/password_manager/core/browser/password_store/password_store_consumer.h" #import "components/password_manager/core/browser/password_store/password_store_interface.h" +#import "components/password_manager/core/browser/ui/passwords_grouper.h" #import "ios/web/public/thread/web_task_traits.h" #import "ios/web/public/thread/web_thread.h" #import "ios/web_view/internal/autofill/cwv_autofill_data_manager_internal.h" @@ -37,6 +42,14 @@ typedef void (^CWVFetchPasswordsCompletionHandler)( NSArray<CWVPassword*>* passwords); +namespace { +using PasswordFormList = std::vector<password_manager::PasswordForm>; +using PasswordStoreChangeMap = + std::unordered_map<std::string, + password_manager::PasswordStoreChange::Type>; +using PasswordFormListCallback = base::OnceCallback<void(PasswordFormList)>; +} // namespace + @interface CWVAutofillDataManager () // Called when WebViewPasswordStoreObserver's |OnLoginsChanged| is called. @@ -55,6 +68,19 @@ // Collects and converts autofill::CreditCards stored internally in // |_personalDataManager| to CWVCreditCards. - (NSArray<CWVCreditCard*>*)creditCards; +// Check if the password affiliation is enabled. +- (BOOL)isPasswordAffiliationEnabled; +// Matches passwords with affilation data and invokes resultCallback. +- (void)matchAffiliationsAndUpdatePasswordsWithForms: + (PasswordFormList)passwordForms + resultCallback: + (PasswordFormListCallback)completion; + +- (void)injectAffiliationAndBrandingInformationForForms: + (PasswordFormList)passwordForms + resultCallback: + (PasswordFormListCallback) + completion; @end @@ -87,18 +113,48 @@ void OnGetPasswordStoreResults( std::vector<std::unique_ptr<password_manager::PasswordForm>> results) override { - NSMutableArray<CWVPassword*>* passwords = [NSMutableArray array]; + BOOL isAffiliationsEnabled = [data_manager_ isPasswordAffiliationEnabled]; + + // Move forms to a regular vector. + PasswordFormList forms; + forms.reserve(results.size()); for (auto& form : results) { - CWVPassword* password = [[CWVPassword alloc] initWithPasswordForm:*form]; - [passwords addObject:password]; + forms.push_back(*form); } - [data_manager_ handlePasswordStoreResults:passwords]; + + if (isAffiliationsEnabled) { + auto block = base::BindOnce( + &WebViewPasswordStoreConsumer::OnAffiliatedPasswordsUpdated, + weak_ptr_factory_.GetWeakPtr()); + [data_manager_ + matchAffiliationsAndUpdatePasswordsWithForms:forms + resultCallback:std::move(block)]; + } else { + NSMutableArray<CWVPassword*>* passwords = [NSMutableArray array]; + for (auto& form : results) { + CWVPassword* password = + [[CWVPassword alloc] initWithPasswordForm:*form]; + [passwords addObject:password]; + } + [data_manager_ handlePasswordStoreResults:passwords]; + } } base::WeakPtr<password_manager::PasswordStoreConsumer> GetWeakPtr() { return weak_ptr_factory_.GetWeakPtr(); } + protected: + void OnAffiliatedPasswordsUpdated(PasswordFormList affiliated_forms) { + NSMutableArray<CWVPassword*>* passwords = [NSMutableArray array]; + for (auto& form : affiliated_forms) { + CWVPassword* password = [[CWVPassword alloc] initWithPasswordForm:form + isAffiliationEnabled:true]; + [passwords addObject:password]; + } + [data_manager_ handlePasswordStoreResults:passwords]; + } + private: __weak CWVAutofillDataManager* data_manager_; base::WeakPtrFactory<WebViewPasswordStoreConsumer> weak_ptr_factory_{this}; @@ -113,32 +169,57 @@ void OnLoginsChanged( password_manager::PasswordStoreInterface* store, const password_manager::PasswordStoreChangeList& changes) override { - NSMutableArray* added = [NSMutableArray array]; - NSMutableArray* updated = [NSMutableArray array]; - NSMutableArray* removed = [NSMutableArray array]; - for (const password_manager::PasswordStoreChange& change : changes) { - if (change.form().blocked_by_user) { - continue; + BOOL isAffiliationsEnabled = [data_manager_ isPasswordAffiliationEnabled]; + + if (isAffiliationsEnabled) { + PasswordFormList unaffiliated_forms; + unaffiliated_forms.reserve(changes.size()); + PasswordStoreChangeMap change_map; + + for (const password_manager::PasswordStoreChange& change : changes) { + if (change.form().blocked_by_user) { + continue; + } + + const password_manager::PasswordForm form = change.form(); + unaffiliated_forms.push_back(form); + change_map[form.keychain_identifier] = change.type(); } - CWVPassword* password = - [[CWVPassword alloc] initWithPasswordForm:change.form()]; - switch (change.type()) { - case password_manager::PasswordStoreChange::ADD: - [added addObject:password]; - break; - case password_manager::PasswordStoreChange::UPDATE: - [updated addObject:password]; - break; - case password_manager::PasswordStoreChange::REMOVE: - [removed addObject:password]; - break; - default: - NOTREACHED(); + + auto completion = base::BindOnce( + &WebViewPasswordStoreObserver::OnAffiliatedPasswordsUpdated, + weak_ptr_factory_.GetWeakPtr(), std::move(change_map)); + [data_manager_ + matchAffiliationsAndUpdatePasswordsWithForms:unaffiliated_forms + resultCallback:std::move(completion)]; + } else { + NSMutableArray* added = [NSMutableArray array]; + NSMutableArray* updated = [NSMutableArray array]; + NSMutableArray* removed = [NSMutableArray array]; + for (const password_manager::PasswordStoreChange& change : changes) { + if (change.form().blocked_by_user) { + continue; + } + CWVPassword* password = + [[CWVPassword alloc] initWithPasswordForm:change.form()]; + switch (change.type()) { + case password_manager::PasswordStoreChange::ADD: + [added addObject:password]; + break; + case password_manager::PasswordStoreChange::UPDATE: + [updated addObject:password]; + break; + case password_manager::PasswordStoreChange::REMOVE: + [removed addObject:password]; + break; + default: + NOTREACHED(); + } } + [data_manager_ handlePasswordStoreLoginsAdded:added + updated:updated + removed:removed]; } - [data_manager_ handlePasswordStoreLoginsAdded:added - updated:updated - removed:removed]; } void OnLoginsRetained(password_manager::PasswordStoreInterface* store, const std::vector<password_manager::PasswordForm>& @@ -146,8 +227,42 @@ // No op. } + protected: + void OnAffiliatedPasswordsUpdated(PasswordStoreChangeMap change_map, + PasswordFormList affiliated_forms) { + NSMutableArray* added = [NSMutableArray array]; + NSMutableArray* updated = [NSMutableArray array]; + NSMutableArray* removed = [NSMutableArray array]; + + for (const auto& form : affiliated_forms) { + CWVPassword* password = [[CWVPassword alloc] initWithPasswordForm:form + isAffiliationEnabled:true]; + auto it = change_map.find(form.keychain_identifier); + if (it != change_map.end()) { + switch (it->second) { + case password_manager::PasswordStoreChange::ADD: + [added addObject:password]; + break; + case password_manager::PasswordStoreChange::UPDATE: + [updated addObject:password]; + break; + case password_manager::PasswordStoreChange::REMOVE: + [removed addObject:password]; + break; + default: + NOTREACHED(); + } + } + } + + [data_manager_ handlePasswordStoreLoginsAdded:added + updated:updated + removed:removed]; + } + private: __weak CWVAutofillDataManager* data_manager_; + base::WeakPtrFactory<WebViewPasswordStoreObserver> weak_ptr_factory_{this}; }; } // namespace ios_web_view @@ -168,21 +283,33 @@ NSHashTable<id<CWVAutofillDataManagerObserver>>* _observers; password_manager::PasswordStoreInterface* _passwordStore; + raw_ptr<affiliations::AffiliationService> _affiliationsService; + std::unique_ptr<password_manager::AffiliatedMatchHelper> + _affiliatedMatchHelper; + BOOL _isPasswordAffiliationEnabled; std::unique_ptr<ios_web_view::WebViewPasswordStoreConsumer> _passwordStoreConsumer; std::unique_ptr<ios_web_view::WebViewPasswordStoreObserver> _passwordStoreObserver; } -- (instancetype)initWithPersonalDataManager: - (autofill::PersonalDataManager*)personalDataManager - passwordStore: - (password_manager::PasswordStoreInterface*) - passwordStore { +- (instancetype) + initWithPersonalDataManager: + (autofill::PersonalDataManager*)personalDataManager + passwordStore: + (password_manager::PasswordStoreInterface*)passwordStore + affiliationsService: + (affiliations::AffiliationService*)affiliationsService + isPasswordAffiliationEnabled:(BOOL)isPasswordAffiliationEnabled { self = [super init]; if (self) { _personalDataManager = personalDataManager; _passwordStore = passwordStore; + _affiliationsService = affiliationsService; + _affiliatedMatchHelper = + std::make_unique<password_manager::AffiliatedMatchHelper>( + affiliationsService); + _isPasswordAffiliationEnabled = isPasswordAffiliationEnabled; _passwordStoreObserver = std::make_unique<ios_web_view::WebViewPasswordStoreObserver>(self); _passwordStore->AddObserver(_passwordStoreObserver.get()); @@ -339,6 +466,47 @@ #pragma mark - Private Methods +- (BOOL)isPasswordAffiliationEnabled { + return _isPasswordAffiliationEnabled; +} + +- (void)injectAffiliationAndBrandingInformationForForms: + (PasswordFormList)passwordForms + resultCallback: + (PasswordFormListCallback) + completion { + _affiliatedMatchHelper->InjectAffiliationAndBrandingInformation( + passwordForms, + base::BindOnce(&password_manager::GetLoginsOrEmptyListOnFailure) + .Then(std::move(completion))); +} + +- (void)matchAffiliationsAndUpdatePasswordsWithForms: + (PasswordFormList)passwordForms + resultCallback: + (PasswordFormListCallback)completion { + // Convert forms to Facets to fetch affilation data. + std::vector<affiliations::FacetURI> facets; + facets.reserve(passwordForms.size()); + for (const auto& form : passwordForms) { + facets.emplace_back(affiliations::FacetURI::FromPotentiallyInvalidSpec( + GetFacetRepresentation(form))); + } + + __weak __typeof(self) weakSelf = self; + auto updateAffiliationsCallback = base::BindOnce( + ^(PasswordFormListCallback innerCompletion) { + [weakSelf + injectAffiliationAndBrandingInformationForForms:passwordForms + resultCallback: + std::move(innerCompletion)]; + }, + std::move(completion)); + + _affiliationsService->UpdateAffiliationsAndBranding( + facets, std::move(updateAffiliationsCallback)); +} + - (void)handlePasswordStoreLoginsAdded:(NSArray<CWVPassword*>*)added updated:(NSArray<CWVPassword*>*)updated removed:(NSArray<CWVPassword*>*)removed {
diff --git a/ios/web_view/internal/autofill/cwv_autofill_data_manager_internal.h b/ios/web_view/internal/autofill/cwv_autofill_data_manager_internal.h index d739ed7..c749002 100644 --- a/ios/web_view/internal/autofill/cwv_autofill_data_manager_internal.h +++ b/ios/web_view/internal/autofill/cwv_autofill_data_manager_internal.h
@@ -21,12 +21,18 @@ // |personalDataManager| The underlying personal data manager being wrapped. // |passwordStore| The underlying password store being wrapped. +// `affiliationsService` The service to fill in password affiliations data. +// `isPasswordAffiliationEnabled` Only fills in the affiliations if enabled. // It should outlive this instance. -- (instancetype)initWithPersonalDataManager: - (autofill::PersonalDataManager*)personalDataManager - passwordStore: - (password_manager::PasswordStoreInterface*) - passwordStore NS_DESIGNATED_INITIALIZER; +- (instancetype) + initWithPersonalDataManager: + (autofill::PersonalDataManager*)personalDataManager + passwordStore: + (password_manager::PasswordStoreInterface*)passwordStore + affiliationsService: + (affiliations::AffiliationService*)affiliationsService + isPasswordAffiliationEnabled:(BOOL)isPasswordAffiliationEnabled + NS_DESIGNATED_INITIALIZER; // This is called by the associated CWVWebViewConfiguration in order to shut // down cleanly. See `-[CWVWebViewConfiguration shutDown]` method for more info.
diff --git a/ios/web_view/internal/autofill/cwv_autofill_data_manager_unittest.mm b/ios/web_view/internal/autofill/cwv_autofill_data_manager_unittest.mm index ce258dc..4a7702c 100644 --- a/ios/web_view/internal/autofill/cwv_autofill_data_manager_unittest.mm +++ b/ios/web_view/internal/autofill/cwv_autofill_data_manager_unittest.mm
@@ -8,6 +8,9 @@ #import "base/run_loop.h" #import "base/strings/sys_string_conversions.h" #import "base/test/ios/wait_util.h" +#import "components/affiliations/core/browser/affiliation_service.h" +#import "components/affiliations/core/browser/fake_affiliation_service.h" +#import "components/affiliations/core/browser/mock_affiliation_service.h" #import "components/autofill/core/browser/data_manager/addresses/address_data_manager.h" #import "components/autofill/core/browser/data_manager/payments/payments_data_manager.h" #import "components/autofill/core/browser/data_manager/test_personal_data_manager.h" @@ -20,6 +23,7 @@ #import "ios/web_view/internal/autofill/cwv_autofill_data_manager_internal.h" #import "ios/web_view/internal/autofill/cwv_autofill_profile_internal.h" #import "ios/web_view/internal/autofill/cwv_credit_card_internal.h" +#import "ios/web_view/internal/autofill/cwv_password_affiliation.h" #import "ios/web_view/internal/passwords/cwv_password_internal.h" #import "ios/web_view/public/cwv_autofill_data_manager_observer.h" #import "ios/web_view/public/cwv_credential_provider_extension_utils.h" @@ -63,9 +67,13 @@ password_store_->Init(/*prefs=*/nullptr, /*affiliated_match_helper=*/nullptr); + affiliations::MockAffiliationService affiliationsService; + autofill_data_manager_ = [[CWVAutofillDataManager alloc] - initWithPersonalDataManager:personal_data_manager_.get() - passwordStore:password_store_.get()]; + initWithPersonalDataManager:personal_data_manager_.get() + passwordStore:password_store_.get() + affiliationsService:&affiliationsService + isPasswordAffiliationEnabled:NO]; } // Fetches profiles from |autofill_data_manager_| and returns them in
diff --git a/ios/web_view/internal/autofill/cwv_password_affiliation.h b/ios/web_view/internal/autofill/cwv_password_affiliation.h new file mode 100644 index 0000000..191a720 --- /dev/null +++ b/ios/web_view/internal/autofill/cwv_password_affiliation.h
@@ -0,0 +1,29 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IOS_WEB_VIEW_INTERNAL_AUTOFILL_CWV_PASSWORD_AFFILIATION_H_ +#define IOS_WEB_VIEW_INTERNAL_AUTOFILL_CWV_PASSWORD_AFFILIATION_H_ + +class PrefService; + +namespace user_prefs { +class PrefRegistrySyncable; +} + +namespace ios_web_view { + +inline constexpr char kCWVPasswordAffiliationEnabled[] = + "cwv.autofill.password_affiliation_enabled"; + +// Registers the CWVPasswordAffiliation preferences for this `pref_registry`. +void RegisterCWVPasswordAffiliationPrefs( + user_prefs::PrefRegistrySyncable* pref_registry); + +void SetPasswordAffiliationEnabled(PrefService* prefs, bool value); + +bool IsPasswordAffiliationEnabled(const PrefService* prefs); + +} // namespace ios_web_view + +#endif // IOS_WEB_VIEW_INTERNAL_AUTOFILL_CWV_PASSWORD_AFFILIATION_H_
diff --git a/ios/web_view/internal/autofill/cwv_password_affiliation.mm b/ios/web_view/internal/autofill/cwv_password_affiliation.mm new file mode 100644 index 0000000..5427410f --- /dev/null +++ b/ios/web_view/internal/autofill/cwv_password_affiliation.mm
@@ -0,0 +1,24 @@ +// Copyright 2025 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ios/web_view/internal/autofill/cwv_password_affiliation.h" + +#import "components/pref_registry/pref_registry_syncable.h" +#import "components/prefs/pref_service.h" +#import "components/sync/service/sync_prefs.h" + +namespace ios_web_view { +void RegisterCWVPasswordAffiliationPrefs( + user_prefs::PrefRegistrySyncable* pref_registry) { + pref_registry->RegisterBooleanPref(kCWVPasswordAffiliationEnabled, false); +} + +bool IsPasswordAffiliationEnabled(const PrefService* prefs) { + return prefs->GetBoolean(kCWVPasswordAffiliationEnabled); +} + +void SetPasswordAffiliationEnabled(PrefService* prefs, bool enabled) { + prefs->SetBoolean(kCWVPasswordAffiliationEnabled, enabled); +} +} // namespace ios_web_view
diff --git a/ios/web_view/internal/browser_state_prefs.mm b/ios/web_view/internal/browser_state_prefs.mm index f1ec7af..bf85f251 100644 --- a/ios/web_view/internal/browser_state_prefs.mm +++ b/ios/web_view/internal/browser_state_prefs.mm
@@ -20,6 +20,7 @@ #import "components/translate/core/browser/translate_prefs.h" #import "components/unified_consent/unified_consent_service.h" #import "ios/web_view/internal/autofill/cwv_autofill_prefs.h" +#import "ios/web_view/internal/autofill/cwv_password_affiliation.h" namespace ios_web_view { @@ -41,6 +42,7 @@ safe_browsing::RegisterProfilePrefs(pref_registry); unified_consent::UnifiedConsentService::RegisterPrefs(pref_registry); ios_web_view::RegisterCWVAutofillPrefs(pref_registry); + ios_web_view::RegisterCWVPasswordAffiliationPrefs(pref_registry); BrowserStateDependencyManager::GetInstance() ->RegisterBrowserStatePrefsForServices(pref_registry);
diff --git a/ios/web_view/internal/cwv_preferences.mm b/ios/web_view/internal/cwv_preferences.mm index 4eb2cab9..b38288a 100644 --- a/ios/web_view/internal/cwv_preferences.mm +++ b/ios/web_view/internal/cwv_preferences.mm
@@ -11,6 +11,7 @@ #import "components/translate/core/browser/translate_pref_names.h" #import "components/translate/core/browser/translate_prefs.h" #import "ios/web_view/internal/autofill/cwv_autofill_prefs.h" +#import "ios/web_view/internal/autofill/cwv_password_affiliation.h" #import "ios/web_view/internal/cwv_preferences_internal.h" @implementation CWVPreferences { @@ -64,6 +65,14 @@ return ios_web_view::IsAutofillAddressSyncEnabled(_prefService); } +- (void)setPasswordAffiliationEnabled:(BOOL)enabled { + ios_web_view::SetPasswordAffiliationEnabled(_prefService, enabled); +} + +- (BOOL)isPasswordAffiliationEnabled { + return ios_web_view::IsPasswordAffiliationEnabled(_prefService); +} + - (void)setPasswordAutofillEnabled:(BOOL)enabled { _prefService->SetBoolean(password_manager::prefs::kCredentialsEnableService, enabled);
diff --git a/ios/web_view/internal/cwv_preferences_unittest.mm b/ios/web_view/internal/cwv_preferences_unittest.mm index f2882a6e..5977c9e 100644 --- a/ios/web_view/internal/cwv_preferences_unittest.mm +++ b/ios/web_view/internal/cwv_preferences_unittest.mm
@@ -23,6 +23,7 @@ #import "components/translate/core/browser/translate_pref_names.h" #import "ios/web/public/test/web_task_environment.h" #import "ios/web_view/internal/autofill/cwv_autofill_prefs.h" +#import "ios/web_view/internal/autofill/cwv_password_affiliation.h" #import "ios/web_view/internal/cwv_preferences_internal.h" #import "testing/gtest/include/gtest/gtest.h" #import "testing/gtest_mac.h" @@ -56,6 +57,8 @@ pref_registry->RegisterBooleanPref( ios_web_view::kCWVAutofillAddressSyncEnabled, false); + pref_registry->RegisterBooleanPref( + ios_web_view::kCWVPasswordAffiliationEnabled, false); base::FilePath temp_dir_path; EXPECT_TRUE(base::PathService::Get(base::DIR_TEMP, &temp_dir_path)); @@ -136,6 +139,16 @@ EXPECT_TRUE(preferences.autofillAddressSyncEnabled); } +// Tests CWVPreferences `passwordAffiliationEnabled`. +TEST_F(CWVPreferencesTest, PasswordAffiliationEnabled) { + std::unique_ptr<PrefService> pref_service = CreateTestPrefService(); + CWVPreferences* preferences = + [[CWVPreferences alloc] initWithPrefService:pref_service.get()]; + EXPECT_FALSE(preferences.passwordAffiliationEnabled); + preferences.passwordAffiliationEnabled = YES; + EXPECT_TRUE(preferences.passwordAffiliationEnabled); +} + // Tests safe browsing setting. TEST_F(CWVPreferencesTest, SafeBrowsingEnabled) { std::unique_ptr<PrefService> pref_service = CreateTestPrefService();
diff --git a/ios/web_view/internal/cwv_web_view_configuration.mm b/ios/web_view/internal/cwv_web_view_configuration.mm index 6caea6cc..ffbeeee 100644 --- a/ios/web_view/internal/cwv_web_view_configuration.mm +++ b/ios/web_view/internal/cwv_web_view_configuration.mm
@@ -15,6 +15,7 @@ #import "ios/web_view/internal/affiliations/web_view_affiliation_service_factory.h" #import "ios/web_view/internal/app/application_context.h" #import "ios/web_view/internal/autofill/cwv_autofill_data_manager_internal.h" +#import "ios/web_view/internal/autofill/cwv_password_affiliation.h" #import "ios/web_view/internal/autofill/web_view_personal_data_manager_factory.h" #import "ios/web_view/internal/browser_state_keyed_service_factories.h" #import "ios/web_view/internal/cwv_global_state_internal.h" @@ -147,9 +148,18 @@ scoped_refptr<password_manager::PasswordStoreInterface> passwordStore = ios_web_view::WebViewAccountPasswordStoreFactory::GetForBrowserState( self.browserState, ServiceAccessType::EXPLICIT_ACCESS); + affiliations::AffiliationService* affiliation_service = + ios_web_view::WebViewAffiliationServiceFactory::GetForBrowserState( + ios_web_view::WebViewBrowserState::FromBrowserState( + self.browserState)); + _autofillDataManager = [[CWVAutofillDataManager alloc] - initWithPersonalDataManager:personalDataManager - passwordStore:passwordStore.get()]; + initWithPersonalDataManager:personalDataManager + passwordStore:passwordStore.get() + affiliationsService:affiliation_service + isPasswordAffiliationEnabled: + self.browserState->GetPrefs()->GetBoolean( + ios_web_view::kCWVPasswordAffiliationEnabled)]; } return _autofillDataManager; }
diff --git a/ios/web_view/internal/passwords/cwv_password.mm b/ios/web_view/internal/passwords/cwv_password.mm index 409270e3..05b7923 100644 --- a/ios/web_view/internal/passwords/cwv_password.mm +++ b/ios/web_view/internal/passwords/cwv_password.mm
@@ -5,6 +5,7 @@ #import <objc/runtime.h> #import "base/strings/sys_string_conversions.h" +#import "components/affiliations/core/browser/affiliation_utils.h" #import "components/password_manager/core/browser/password_form.h" #import "components/password_manager/core/browser/password_ui_utils.h" #import "components/password_manager/core/browser/ui/credential_ui_entry.h" @@ -17,15 +18,61 @@ - (instancetype)initWithPasswordForm: (const password_manager::PasswordForm&)passwordForm { + return [self initWithPasswordForm:passwordForm isAffiliationEnabled:false]; +} + +- (instancetype)initWithPasswordForm: + (const password_manager::PasswordForm&)passwordForm + isAffiliationEnabled:(BOOL)isAffiliationEnabled { self = [super init]; if (self) { _passwordForm = passwordForm; _title = base::SysUTF8ToNSString(password_manager::GetShownOrigin( password_manager::CredentialUIEntry(_passwordForm))); - _site = base::SysUTF8ToNSString( - password_manager::GetShownUrl( - password_manager::CredentialUIEntry(_passwordForm)) - .spec()); + + // If valid android password check the affiliation. + if (isAffiliationEnabled && + affiliations::IsValidAndroidFacetURI(_passwordForm.signon_realm)) { + std::string siteName = password_manager::GetShownOrigin( + url::Origin::Create(passwordForm.url)); + + NSString* serviceName = base::SysUTF8ToNSString(siteName); + NSString* serviceIdentifier = @""; + NSString* webRealm = + base::SysUTF8ToNSString(passwordForm.affiliated_web_realm); + url::Origin origin = + url::Origin::Create(GURL(passwordForm.affiliated_web_realm)); + std::string shownOrigin = password_manager::GetShownOrigin(origin); + + // Set serviceIdentifier: + if (webRealm.length) { + // Prefer webRealm. + serviceIdentifier = webRealm; + } else if (!serviceIdentifier.length) { + // Fallback to signon_realm. + serviceIdentifier = base::SysUTF8ToNSString(passwordForm.signon_realm); + } + + // Set serviceName: + if (!shownOrigin.empty()) { + // Prefer shownOrigin to match non Android credentials. + serviceName = base::SysUTF8ToNSString(shownOrigin); + } else if (!passwordForm.app_display_name.empty()) { + serviceName = base::SysUTF8ToNSString(passwordForm.app_display_name); + } else if (!serviceName.length) { + // Fallback to serviceIdentifier. + serviceName = serviceIdentifier; + } + + _title = serviceName; + _site = serviceIdentifier; + + } else { + _site = base::SysUTF8ToNSString( + password_manager::GetShownUrl( + password_manager::CredentialUIEntry(_passwordForm)) + .spec()); + } } return self; }
diff --git a/ios/web_view/internal/passwords/cwv_password_internal.h b/ios/web_view/internal/passwords/cwv_password_internal.h index 04db006..768a325e 100644 --- a/ios/web_view/internal/passwords/cwv_password_internal.h +++ b/ios/web_view/internal/passwords/cwv_password_internal.h
@@ -11,7 +11,15 @@ @interface CWVPassword () - (instancetype)initWithPasswordForm: - (const password_manager::PasswordForm&)passwordForm + (const password_manager::PasswordForm&)passwordForm; + +// This is a temporary initializer which can be removed once password +// affiliaitons is fully rolled out. Non affiliation related code can continue +// to use the convenience init which has isAffiliationEnabled set to NO by +// default. +- (instancetype)initWithPasswordForm: + (const password_manager::PasswordForm&)passwordForm + isAffiliationEnabled:(BOOL)isAffiliationEnabled NS_DESIGNATED_INITIALIZER; // The internal autofill credit card that is wrapped by this object.
diff --git a/ios/web_view/internal/passwords/web_view_account_password_store_factory.mm b/ios/web_view/internal/passwords/web_view_account_password_store_factory.mm index 404f88b..0f05c6a0 100644 --- a/ios/web_view/internal/passwords/web_view_account_password_store_factory.mm +++ b/ios/web_view/internal/passwords/web_view_account_password_store_factory.mm
@@ -11,7 +11,9 @@ #import "base/functional/bind.h" #import "base/functional/callback_helpers.h" #import "base/no_destructor.h" +#import "components/affiliations/core/browser/affiliation_service.h" #import "components/keyed_service/ios/browser_state_dependency_manager.h" +#import "components/password_manager/core/browser/affiliation/password_affiliation_source_adapter.h" #import "components/password_manager/core/browser/password_manager_constants.h" #import "components/password_manager/core/browser/password_manager_util.h" #import "components/password_manager/core/browser/password_store/login_database.h" @@ -19,6 +21,7 @@ #import "components/password_manager/core/browser/password_store/password_store_built_in_backend.h" #import "components/password_manager/core/browser/password_store_factory_util.h" #import "components/prefs/pref_service.h" +#import "ios/web_view/internal/affiliations/web_view_affiliation_service_factory.h" #import "ios/web_view/internal/app/application_context.h" namespace ios_web_view { @@ -72,7 +75,22 @@ browser_state->GetPrefs(), ApplicationContext::GetInstance()->GetOSCryptAsync())); - ps->Init(browser_state->GetPrefs(), /*affiliated_match_helper=*/nullptr); + affiliations::AffiliationService* affiliation_service = + WebViewAffiliationServiceFactory::GetForBrowserState( + WebViewBrowserState::FromBrowserState(context)); + std::unique_ptr<password_manager::AffiliatedMatchHelper> + affiliated_match_helper = + std::make_unique<password_manager::AffiliatedMatchHelper>( + affiliation_service); + + std::unique_ptr<password_manager::PasswordAffiliationSourceAdapter> + password_affiliation_adapter = std::make_unique< + password_manager::PasswordAffiliationSourceAdapter>(); + + ps->Init(browser_state->GetPrefs(), std::move(affiliated_match_helper)); + + password_affiliation_adapter->RegisterPasswordStore(ps.get()); + affiliation_service->RegisterSource(std::move(password_affiliation_adapter)); return ps; }
diff --git a/ios/web_view/internal/passwords/web_view_profile_password_store_factory.mm b/ios/web_view/internal/passwords/web_view_profile_password_store_factory.mm index 1a92438a..8707141 100644 --- a/ios/web_view/internal/passwords/web_view_profile_password_store_factory.mm +++ b/ios/web_view/internal/passwords/web_view_profile_password_store_factory.mm
@@ -13,12 +13,15 @@ #import "base/no_destructor.h" #import "base/task/sequenced_task_runner.h" #import "base/task/thread_pool.h" +#import "components/affiliations/core/browser/affiliation_service.h" #import "components/keyed_service/core/service_access_type.h" #import "components/keyed_service/ios/browser_state_dependency_manager.h" +#import "components/password_manager/core/browser/affiliation/password_affiliation_source_adapter.h" #import "components/password_manager/core/browser/password_store/login_database.h" #import "components/password_manager/core/browser/password_store/password_store_built_in_backend.h" #import "components/password_manager/core/browser/password_store_factory_util.h" #import "components/sync/service/sync_service.h" +#import "ios/web_view/internal/affiliations/web_view_affiliation_service_factory.h" #import "ios/web_view/internal/app/application_context.h" #import "ios/web_view/internal/web_view_browser_state.h" @@ -79,7 +82,23 @@ syncer::WipeModelUponSyncDisabledBehavior::kNever, WebViewBrowserState::FromBrowserState(context)->GetPrefs(), ApplicationContext::GetInstance()->GetOSCryptAsync())); - store->Init(/*prefs=*/nullptr, /*affiliated_match_helper=*/nullptr); + + affiliations::AffiliationService* affiliation_service = + WebViewAffiliationServiceFactory::GetForBrowserState( + WebViewBrowserState::FromBrowserState(context)); + std::unique_ptr<password_manager::AffiliatedMatchHelper> + affiliated_match_helper = + std::make_unique<password_manager::AffiliatedMatchHelper>( + affiliation_service); + + std::unique_ptr<password_manager::PasswordAffiliationSourceAdapter> + password_affiliation_adapter = std::make_unique< + password_manager::PasswordAffiliationSourceAdapter>(); + + store->Init(/*prefs=*/nullptr, std::move(affiliated_match_helper)); + + password_affiliation_adapter->RegisterPasswordStore(store.get()); + affiliation_service->RegisterSource(std::move(password_affiliation_adapter)); return store; }
diff --git a/ios/web_view/public/cwv_preferences.h b/ios/web_view/public/cwv_preferences.h index 10648a9..2f36e1df 100644 --- a/ios/web_view/public/cwv_preferences.h +++ b/ios/web_view/public/cwv_preferences.h
@@ -59,6 +59,10 @@ @property(nonatomic, assign, getter=isAutofillAddressSyncEnabled) BOOL autofillAddressSyncEnabled; +// Whether or not address sync is enabled. +@property(nonatomic, assign, getter=isPasswordAffiliationEnabled) + BOOL passwordAffiliationEnabled; + - (instancetype)init NS_UNAVAILABLE; // Resets all translation settings back to default. In particular, this will
diff --git a/ios_internal b/ios_internal index da5a5f1..1e3f300 160000 --- a/ios_internal +++ b/ios_internal
@@ -1 +1 @@ -Subproject commit da5a5f1af633b218714f6e7bd89de070769284ae +Subproject commit 1e3f30098be16da5f4dbdb581d80f7739847bc2d
diff --git a/media/gpu/windows/d3d12_video_encode_accelerator.cc b/media/gpu/windows/d3d12_video_encode_accelerator.cc index 35e11bd..9ccf389 100644 --- a/media/gpu/windows/d3d12_video_encode_accelerator.cc +++ b/media/gpu/windows/d3d12_video_encode_accelerator.cc
@@ -295,7 +295,9 @@ // We will check and log error later in the Initialize(). device_.As(&video_device_); - codecs_.push_back(D3D12_VIDEO_ENCODER_CODEC_H264); + if (!gpu_workarounds.disable_d3d12_h264_encoding) { + codecs_.push_back(D3D12_VIDEO_ENCODER_CODEC_H264); + } #if BUILDFLAG(ENABLE_HEVC_PARSER_AND_HW_DECODER) if (!gpu_workarounds.disable_d3d12_hevc_encoding) { codecs_.push_back(D3D12_VIDEO_ENCODER_CODEC_HEVC);
diff --git a/pdf/pdf_view_web_plugin.cc b/pdf/pdf_view_web_plugin.cc index a4fa29e7..81e46df 100644 --- a/pdf/pdf_view_web_plugin.cc +++ b/pdf/pdf_view_web_plugin.cc
@@ -291,6 +291,11 @@ NOTREACHED(); } +void ReleaseBuffer(std::vector<uint8_t>& buffer) { + std::vector<uint8_t> empty; + buffer.swap(empty); +} + } // namespace #if BUILDFLAG(ENABLE_PDF_INK2) @@ -1861,7 +1866,8 @@ static_cast<uint32_t>(message.FindInt("blockSize").value()); client_->PostMessage(CreateSaveDataBlockMessage( - token, SaveBlockToBuffer(request_type, offset, block_size))); + token, SaveBlockToBufferImpl(save_data_buffer_, request_type, offset, + block_size))); } void PdfViewWebPlugin::HandleGetSuggestedFileName( @@ -2204,7 +2210,8 @@ return block_size; } -PdfViewWebPlugin::SaveDataBlock PdfViewWebPlugin::SaveBlockToBuffer( +PdfViewWebPlugin::SaveDataBlock PdfViewWebPlugin::SaveBlockToBufferImpl( + std::vector<uint8_t>& buffer, pdf::mojom::SaveRequestType request_type, uint32_t offset, uint32_t block_size) { @@ -2226,24 +2233,24 @@ } if (offset == 0) { - save_data_buffer_ = engine_->GetSaveData(); + buffer = engine_->GetSaveData(); // This function does not handle files larger than INT_MAX. - if (save_data_buffer_.size() > static_cast<uint32_t>(INT_MAX)) { - ReleaseSaveBuffer(); + if (buffer.size() > static_cast<uint32_t>(INT_MAX)) { + ReleaseBuffer(buffer); } } else { - CHECK(save_data_buffer_.size()); + CHECK(buffer.size()); } - if (save_data_buffer_.size()) { - result.total_file_size = static_cast<uint32_t>(save_data_buffer_.size()); + if (buffer.size()) { + result.total_file_size = static_cast<uint32_t>(buffer.size()); block_size = VerifyParamsAndGetSaveBlockSize(result.total_file_size, offset, block_size); result.block.resize(block_size); base::span(result.block) - .copy_from(base::span(save_data_buffer_).subspan(offset, block_size)); + .copy_from(base::span(buffer).subspan(offset, block_size)); // Drop the buffer if everything is returned. if (offset + block_size == result.total_file_size) { - ReleaseSaveBuffer(); + ReleaseBuffer(buffer); } } @@ -2259,11 +2266,6 @@ pdf_host_->SaveUrlAs(GURL(url_), network::mojom::ReferrerPolicy::kDefault); } -void PdfViewWebPlugin::ReleaseSaveBuffer() { - std::vector<uint8_t> empty; - save_data_buffer_.swap(empty); -} - void PdfViewWebPlugin::SetPluginCanSave(bool can_save) { if (plugin_can_save_ == can_save) { return; @@ -2833,7 +2835,7 @@ void PdfViewWebPlugin::HandleReleaseSaveInBlockBuffers( const base::Value::Dict& /*message*/) { - ReleaseSaveBuffer(); + ReleaseBuffer(save_data_buffer_); } void PdfViewWebPlugin::HandleResetPrintPreviewModeMessage(
diff --git a/pdf/pdf_view_web_plugin.h b/pdf/pdf_view_web_plugin.h index bfa24290..a03f1f5 100644 --- a/pdf/pdf_view_web_plugin.h +++ b/pdf/pdf_view_web_plugin.h
@@ -621,25 +621,24 @@ void SaveToFile(const std::string& token); // Returns `block_size` bytes to save the PDF with `request_type`, starting - // from location `offset`. Since the caller may not know the exact file size, - // the first request (when `offset` is 0) can be called with `block_size` 0 - // and in that case, the entire file data, capped at 16MB limit is returned. - // The function also returns the total file size. - // Note that it only handles files less than INT_MAX size, and if the file is - // larger than that, it returns 0 as file size and no data. - SaveDataBlock SaveBlockToBuffer(pdf::mojom::SaveRequestType request_type, - uint32_t offset, - uint32_t block_size); + // from location `offset`. For non-original save requests, uses `buffer` to + // temporarily store save data for future calls. Since the caller may not know + // the exact file size, the first request (when `offset` is 0) can be called + // with `block_size` 0 and in that case, the entire file data, capped at 16MB + // limit is returned. The function also returns the total file size. Note that + // it only handles files less than INT_MAX size, and if the file is larger + // than that, it returns 0 as file size and no data. + SaveDataBlock SaveBlockToBufferImpl(std::vector<uint8_t>& buffer, + pdf::mojom::SaveRequestType request_type, + uint32_t offset, + uint32_t block_size); - // For a call to `SaveBlockToBuffer`, ensures `offset` and `block_size` have - // expected values and returns the effective `block_size`. + // For a call to `SaveBlockToBufferImpl()`, ensures `offset` and + // `block_size` have expected values and returns the effective `block_size`. uint32_t VerifyParamsAndGetSaveBlockSize(uint32_t total_file_size, uint32_t offset, uint32_t block_size); - // Release buffered data for saving. - void ReleaseSaveBuffer(); - // Sets whether the plugin can and should handle the save by using `pdf_host_` // to notify the browser. Prevents duplicate notifications to the browser if // the state has not changed.
diff --git a/pdf/pdfium/pdfium_page_unittest.cc b/pdf/pdfium/pdfium_page_unittest.cc index 279ee36..9c9c8dba 100644 --- a/pdf/pdfium/pdfium_page_unittest.cc +++ b/pdf/pdfium/pdfium_page_unittest.cc
@@ -425,30 +425,26 @@ const std::vector<PDFiumPage::Link>& links = GetLinks(*engine, 0); ASSERT_EQ(kExpectedLinkCount, links.size()); - UNSAFE_TODO({ - for (size_t i = 0; i < kExpectedLinkCount; ++i) { - const PDFiumPage::Link& actual_current_link = links[i]; - const ExpectedLink& expected_current_link = expected_links[i]; - EXPECT_EQ(expected_current_link.start_char_index, - actual_current_link.start_char_index); - EXPECT_EQ(expected_current_link.char_count, - actual_current_link.char_count); - size_t bounds_size = actual_current_link.bounding_rects.size(); - ASSERT_EQ(expected_current_link.bounding_rects.size(), bounds_size); - for (size_t bounds_index = 0; bounds_index < bounds_size; - ++bounds_index) { - EXPECT_EQ(expected_current_link.bounding_rects[bounds_index], - actual_current_link.bounding_rects[bounds_index]); - } - EXPECT_EQ(expected_current_link.url, actual_current_link.target.url); - if (actual_current_link.target.url.empty()) { - EXPECT_EQ(expected_current_link.page, actual_current_link.target.page); - ASSERT_TRUE(actual_current_link.target.y_in_pixels.has_value()); - EXPECT_FLOAT_EQ(expected_current_link.y_in_pixels, - actual_current_link.target.y_in_pixels.value()); - } + for (size_t i = 0; i < kExpectedLinkCount; ++i) { + const PDFiumPage::Link& actual_current_link = links[i]; + const ExpectedLink& expected_current_link = expected_links[i]; + EXPECT_EQ(expected_current_link.start_char_index, + actual_current_link.start_char_index); + EXPECT_EQ(expected_current_link.char_count, actual_current_link.char_count); + size_t bounds_size = actual_current_link.bounding_rects.size(); + ASSERT_EQ(expected_current_link.bounding_rects.size(), bounds_size); + for (size_t bounds_index = 0; bounds_index < bounds_size; ++bounds_index) { + EXPECT_EQ(expected_current_link.bounding_rects[bounds_index], + actual_current_link.bounding_rects[bounds_index]); } - }); + EXPECT_EQ(expected_current_link.url, actual_current_link.target.url); + if (actual_current_link.target.url.empty()) { + EXPECT_EQ(expected_current_link.page, actual_current_link.target.page); + ASSERT_TRUE(actual_current_link.target.y_in_pixels.has_value()); + EXPECT_FLOAT_EQ(expected_current_link.y_in_pixels, + actual_current_link.target.y_in_pixels.value()); + } + } } TEST_P(PDFiumPageLinkTest, GetLinkTarget) { @@ -912,17 +908,15 @@ page.PopulateAnnotations(); ASSERT_EQ(std::size(kExpectedHighlights), page.highlights_.size()); - UNSAFE_TODO({ - for (size_t i = 0; i < page.highlights_.size(); ++i) { - ASSERT_EQ(kExpectedHighlights[i].start_char_index, - page.highlights_[i].start_char_index); - ASSERT_EQ(kExpectedHighlights[i].char_count, - page.highlights_[i].char_count); - EXPECT_EQ(kExpectedHighlights[i].bounding_rect, - page.highlights_[i].bounding_rect); - ASSERT_EQ(kExpectedHighlights[i].color, page.highlights_[i].color); - } - }); + for (size_t i = 0; i < page.highlights_.size(); ++i) { + ASSERT_EQ(kExpectedHighlights[i].start_char_index, + page.highlights_[i].start_char_index); + ASSERT_EQ(kExpectedHighlights[i].char_count, + page.highlights_[i].char_count); + EXPECT_EQ(kExpectedHighlights[i].bounding_rect, + page.highlights_[i].bounding_rect); + ASSERT_EQ(kExpectedHighlights[i].color, page.highlights_[i].color); + } } INSTANTIATE_TEST_SUITE_P(All, PDFiumPageHighlightTest, testing::Bool()); @@ -955,15 +949,13 @@ size_t text_fields_count = page.text_fields_.size(); ASSERT_EQ(std::size(kExpectedTextFields), text_fields_count); - UNSAFE_TODO({ - for (size_t i = 0; i < text_fields_count; ++i) { - EXPECT_EQ(kExpectedTextFields[i].name, page.text_fields_[i].name); - EXPECT_EQ(kExpectedTextFields[i].value, page.text_fields_[i].value); - EXPECT_EQ(kExpectedTextFields[i].bounding_rect, - page.text_fields_[i].bounding_rect); - EXPECT_EQ(kExpectedTextFields[i].flags, page.text_fields_[i].flags); - } - }); + for (size_t i = 0; i < text_fields_count; ++i) { + EXPECT_EQ(kExpectedTextFields[i].name, page.text_fields_[i].name); + EXPECT_EQ(kExpectedTextFields[i].value, page.text_fields_[i].value); + EXPECT_EQ(kExpectedTextFields[i].bounding_rect, + page.text_fields_[i].bounding_rect); + EXPECT_EQ(kExpectedTextFields[i].flags, page.text_fields_[i].flags); + } } INSTANTIATE_TEST_SUITE_P(All, PDFiumPageTextFieldTest, testing::Bool()); @@ -1039,23 +1031,21 @@ size_t choice_fields_count = page.choice_fields_.size(); ASSERT_EQ(std::size(kExpectedChoiceFields), choice_fields_count); - UNSAFE_TODO({ - for (size_t i = 0; i < choice_fields_count; ++i) { - EXPECT_EQ(kExpectedChoiceFields[i].name, page.choice_fields_[i].name); - size_t choice_field_options_count = page.choice_fields_[i].options.size(); - ASSERT_EQ(std::size(kExpectedChoiceFields[i].options), - choice_field_options_count); - for (size_t j = 0; j < choice_field_options_count; ++j) { - EXPECT_EQ(kExpectedChoiceFields[i].options[j].name, - page.choice_fields_[i].options[j].name); - EXPECT_EQ(kExpectedChoiceFields[i].options[j].is_selected, - page.choice_fields_[i].options[j].is_selected); - } - EXPECT_EQ(kExpectedChoiceFields[i].bounding_rect, - page.choice_fields_[i].bounding_rect); - EXPECT_EQ(kExpectedChoiceFields[i].flags, page.choice_fields_[i].flags); + for (size_t i = 0; i < choice_fields_count; ++i) { + EXPECT_EQ(kExpectedChoiceFields[i].name, page.choice_fields_[i].name); + size_t choice_field_options_count = page.choice_fields_[i].options.size(); + ASSERT_EQ(std::size(kExpectedChoiceFields[i].options), + choice_field_options_count); + for (size_t j = 0; j < choice_field_options_count; ++j) { + EXPECT_EQ(kExpectedChoiceFields[i].options[j].name, + page.choice_fields_[i].options[j].name); + EXPECT_EQ(kExpectedChoiceFields[i].options[j].is_selected, + page.choice_fields_[i].options[j].is_selected); } - }); + EXPECT_EQ(kExpectedChoiceFields[i].bounding_rect, + page.choice_fields_[i].bounding_rect); + EXPECT_EQ(kExpectedChoiceFields[i].flags, page.choice_fields_[i].flags); + } } INSTANTIATE_TEST_SUITE_P(All, PDFiumPageChoiceFieldTest, testing::Bool()); @@ -1128,21 +1118,19 @@ size_t buttons_count = page.buttons_.size(); ASSERT_EQ(std::size(kExpectedButtons), buttons_count); - UNSAFE_TODO({ - for (size_t i = 0; i < buttons_count; ++i) { - EXPECT_EQ(kExpectedButtons[i].name, page.buttons_[i].name); - EXPECT_EQ(kExpectedButtons[i].value, page.buttons_[i].value); - EXPECT_EQ(kExpectedButtons[i].type, page.buttons_[i].type); - EXPECT_EQ(kExpectedButtons[i].flags, page.buttons_[i].flags); - EXPECT_EQ(kExpectedButtons[i].is_checked, page.buttons_[i].is_checked); - EXPECT_EQ(kExpectedButtons[i].control_count, - page.buttons_[i].control_count); - EXPECT_EQ(kExpectedButtons[i].control_index, - page.buttons_[i].control_index); - EXPECT_EQ(kExpectedButtons[i].bounding_rect, - page.buttons_[i].bounding_rect); - } - }); + for (size_t i = 0; i < buttons_count; ++i) { + EXPECT_EQ(kExpectedButtons[i].name, page.buttons_[i].name); + EXPECT_EQ(kExpectedButtons[i].value, page.buttons_[i].value); + EXPECT_EQ(kExpectedButtons[i].type, page.buttons_[i].type); + EXPECT_EQ(kExpectedButtons[i].flags, page.buttons_[i].flags); + EXPECT_EQ(kExpectedButtons[i].is_checked, page.buttons_[i].is_checked); + EXPECT_EQ(kExpectedButtons[i].control_count, + page.buttons_[i].control_count); + EXPECT_EQ(kExpectedButtons[i].control_index, + page.buttons_[i].control_index); + EXPECT_EQ(kExpectedButtons[i].bounding_rect, + page.buttons_[i].bounding_rect); + } } INSTANTIATE_TEST_SUITE_P(All, PDFiumPageButtonTest, testing::Bool());
diff --git a/remoting/base/protobuf_http_client.cc b/remoting/base/protobuf_http_client.cc index 3e998aa..8ee372b 100644 --- a/remoting/base/protobuf_http_client.cc +++ b/remoting/base/protobuf_http_client.cc
@@ -9,6 +9,7 @@ #include "google_apis/common/api_key_request_util.h" #include "net/base/load_flags.h" #include "net/base/net_errors.h" +#include "net/http/http_request_headers.h" #include "remoting/base/http_status.h" #include "remoting/base/oauth_token_getter.h" #include "remoting/base/protobuf_http_request_base.h" @@ -20,12 +21,6 @@ #include "third_party/protobuf/src/google/protobuf/message_lite.h" #include "url/gurl.h" -namespace { - -constexpr char kAuthorizationHeaderFormat[] = "Authorization: Bearer %s"; - -} // namespace - namespace remoting { ProtobufHttpClient::ProtobufHttpClient( @@ -127,8 +122,8 @@ resource_request->method = config.method; if (!access_token.empty()) { - resource_request->headers.AddHeaderFromString( - base::StringPrintf(kAuthorizationHeaderFormat, access_token.c_str())); + resource_request->headers.SetHeader(net::HttpRequestHeaders::kAuthorization, + "Bearer " + access_token); } else { VLOG(1) << "Attempting to execute request without access token"; }
diff --git a/services/device/geolocation/geolocation_provider_impl.cc b/services/device/geolocation/geolocation_provider_impl.cc index 588cac9c..4751b2e 100644 --- a/services/device/geolocation/geolocation_provider_impl.cc +++ b/services/device/geolocation/geolocation_provider_impl.cc
@@ -176,8 +176,8 @@ #if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) if (features::IsOsLevelGeolocationPermissionSupportEnabled() && g_geolocation_system_permission_manager) { - observers_ = g_geolocation_system_permission_manager->GetObserverList(); - observers_->AddObserver(this); + geolocation_permission_observation_.Observe( + g_geolocation_system_permission_manager); system_permission_status_ = g_geolocation_system_permission_manager->GetSystemPermission(); } else { @@ -191,11 +191,6 @@ } GeolocationProviderImpl::~GeolocationProviderImpl() { -#if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) - if (features::IsOsLevelGeolocationPermissionSupportEnabled() && observers_) { - observers_->RemoveObserver(this); - } -#endif Stop(); DCHECK(!location_provider_manager_); } @@ -492,6 +487,10 @@ system_permission_status_ = new_status; } +void GeolocationProviderImpl::OnPermissionManagerShuttingDown() { + geolocation_permission_observation_.Reset(); +} + void GeolocationProviderImpl::NotifyClientsSystemPermissionDenied() { CHECK(main_task_runner_->BelongsToCurrentThread()); auto error_result = @@ -501,7 +500,8 @@ kSystemPermissionDeniedErrorTechnical)); NotifyClients(std::move(error_result)); } -#endif + +#endif // BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) void GeolocationProviderImpl::DoStartProvidersOnGeolocationThread() { CHECK(main_task_runner_->BelongsToCurrentThread());
diff --git a/services/device/geolocation/geolocation_provider_impl.h b/services/device/geolocation/geolocation_provider_impl.h index ec5354b..1f25467 100644 --- a/services/device/geolocation/geolocation_provider_impl.h +++ b/services/device/geolocation/geolocation_provider_impl.h
@@ -26,6 +26,10 @@ #include "services/device/public/mojom/geolocation_internals.mojom.h" #include "services/device/public/mojom/geoposition.mojom.h" +#if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) +#include "base/scoped_observation.h" +#endif // BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) + namespace base { template <typename Type> struct DefaultSingletonTraits; @@ -151,6 +155,7 @@ // GeolocationSystemPermissionManager::PermissionObserver implementation. void OnSystemPermissionUpdated( LocationSystemPermissionStatus new_status) override; + void OnPermissionManagerShuttingDown() override; #endif static constexpr char kSystemPermissionDeniedErrorMessage[] = @@ -265,12 +270,10 @@ LocationSystemPermissionStatus system_permission_status_ = LocationSystemPermissionStatus::kNotDetermined; - // On CrOS, GeolocationSystemPermissionManager may be destroyed before - // GeolocationProviderImpl. Retaining `observers_` allows - // GeolocationProviderImpl to safely unregister itself during its own - // destruction. - scoped_refptr<GeolocationSystemPermissionManager::PermissionObserverList> - observers_; + base::ScopedObservation< + GeolocationSystemPermissionManager, + GeolocationSystemPermissionManager::PermissionObserver> + geolocation_permission_observation_{this}; #endif };
diff --git a/services/device/public/cpp/geolocation/geolocation_system_permission_manager.cc b/services/device/public/cpp/geolocation/geolocation_system_permission_manager.cc index ccfa2ee9..8d58235 100644 --- a/services/device/public/cpp/geolocation/geolocation_system_permission_manager.cc +++ b/services/device/public/cpp/geolocation/geolocation_system_permission_manager.cc
@@ -50,8 +50,7 @@ #if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) GeolocationSystemPermissionManager::GeolocationSystemPermissionManager( std::unique_ptr<SystemGeolocationSource> system_geolocation_source) - : system_geolocation_source_(std::move(system_geolocation_source)), - observers_(base::MakeRefCounted<PermissionObserverList>()) { + : system_geolocation_source_(std::move(system_geolocation_source)) { DCHECK(system_geolocation_source_); system_geolocation_source_->RegisterPermissionUpdateCallback( base::BindRepeating( @@ -64,12 +63,12 @@ void GeolocationSystemPermissionManager::AddObserver( PermissionObserver* observer) { - observers_->AddObserver(observer); + observers_.AddObserver(observer); } void GeolocationSystemPermissionManager::RemoveObserver( PermissionObserver* observer) { - observers_->RemoveObserver(observer); + observers_.RemoveObserver(observer); } void GeolocationSystemPermissionManager::UpdateSystemPermission( @@ -79,13 +78,9 @@ } void GeolocationSystemPermissionManager::NotifyPermissionObservers() { - observers_->Notify(FROM_HERE, &PermissionObserver::OnSystemPermissionUpdated, - GetSystemPermission()); -} - -scoped_refptr<GeolocationSystemPermissionManager::PermissionObserverList> -GeolocationSystemPermissionManager::GetObserverList() const { - return observers_; + for (auto& observer : observers_) { + observer.OnSystemPermissionUpdated(GetSystemPermission()); + } } SystemGeolocationSource& @@ -113,4 +108,12 @@ #endif } +void GeolocationSystemPermissionManager::Shutdown() { +#if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) + for (auto& observer : observers_) { + observer.OnPermissionManagerShuttingDown(); + } +#endif // BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) +} + } // namespace device
diff --git a/services/device/public/cpp/geolocation/geolocation_system_permission_manager.h b/services/device/public/cpp/geolocation/geolocation_system_permission_manager.h index 6db5bae..2bd97f5 100644 --- a/services/device/public/cpp/geolocation/geolocation_system_permission_manager.h +++ b/services/device/public/cpp/geolocation/geolocation_system_permission_manager.h
@@ -16,7 +16,7 @@ #if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) #include "base/memory/weak_ptr.h" -#include "base/observer_list_threadsafe.h" +#include "base/observer_list.h" #include "services/device/public/cpp/geolocation/system_geolocation_source.h" #endif // BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) @@ -43,16 +43,22 @@ void RequestSystemPermission(); // Opens appropriate system preferences/setting page. void OpenSystemPermissionSetting(); + // Notifies observers that the manager is about to shutdown. + void Shutdown(); #if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) class PermissionObserver : public base::CheckedObserver { public: virtual void OnSystemPermissionUpdated( LocationSystemPermissionStatus new_status) = 0; - }; - using PermissionObserverList = - base::ObserverListThreadSafe<PermissionObserver>; + // Called right before the GeolocationSystemPermissionManager shuts down. + // + // Note: Existing observers should override this function in order to + // unsubscribe from the manager. Otherwise, usage of the manager after this + // is called will cause a use-after-free bug. See crbug.com/426429657. + virtual void OnPermissionManagerShuttingDown() {} + }; explicit GeolocationSystemPermissionManager( std::unique_ptr<SystemGeolocationSource> system_geolocation_source); @@ -66,8 +72,6 @@ void AddObserver(PermissionObserver* observer); // Removes a permission observer. void RemoveObserver(PermissionObserver* observer); - // Returns the list of permission observers. - scoped_refptr<PermissionObserverList> GetObserverList() const; #if BUILDFLAG(IS_APPLE) // On macOS, the same CLLocationManager object needs to be shared across @@ -95,10 +99,7 @@ #if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) std::unique_ptr<SystemGeolocationSource> system_geolocation_source_; - // Using scoped_refptr so objects can hold a reference and ensure this list - // is not destroyed on shutdown before it had a chance to remove itself from - // the list - scoped_refptr<PermissionObserverList> observers_; + base::ObserverList<PermissionObserver> observers_; base::WeakPtrFactory<GeolocationSystemPermissionManager> weak_factory_{this}; #endif // BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED)
diff --git a/services/on_device_model/DEPS b/services/on_device_model/DEPS index 654bc958..c1de526da 100644 --- a/services/on_device_model/DEPS +++ b/services/on_device_model/DEPS
@@ -7,4 +7,5 @@ "+third_party/skia", "+components/crash/core/common/crash_key.h", "+components/optimization_guide/core/optimization_guide_features.h", + "+components/optimization_guide/proto", ]
diff --git a/services/on_device_model/android/BUILD.gn b/services/on_device_model/android/BUILD.gn index ecaf395..faee519 100644 --- a/services/on_device_model/android/BUILD.gn +++ b/services/on_device_model/android/BUILD.gn
@@ -7,8 +7,6 @@ source_set("android") { sources = [ - "backend_impl_android.cc", - "backend_impl_android.h", "backend_model_impl_android.cc", "backend_model_impl_android.h", "backend_session_impl_android.cc", @@ -20,6 +18,7 @@ deps = [ ":jni_headers", "//base", + "//components/optimization_guide/proto:optimization_guide_proto", "//mojo/public/cpp/bindings", "//services/on_device_model:backend_interfaces", "//services/on_device_model/public/cpp", @@ -29,12 +28,13 @@ source_set("unit_tests") { testonly = true - sources = [ "backend_impl_android_unittest.cc" ] + sources = [ "backend_model_impl_android_unittest.cc" ] deps = [ ":android", ":native_j_unittests_jni_headers", ":native_java_unittests_java", "//base/test:test_support", + "//components/optimization_guide/proto:optimization_guide_proto", "//services/on_device_model/public/cpp/test_support", "//testing/gmock", "//testing/gtest", @@ -52,6 +52,7 @@ deps = [ "//base:base_java", "//base:service_loader_java", + "//components/optimization_guide/proto:optimization_guide_proto_java", "//services/on_device_model/public/mojom:mojom_java", "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/jni_zero:jni_zero_java", @@ -67,6 +68,7 @@ "//base:base_java", "//base:base_java_test_support", "//base:service_loader_java", + "//components/optimization_guide/proto:optimization_guide_proto_java", "//services/on_device_model/public/mojom:mojom_java", "//third_party/jni_zero:jni_zero_java", "//third_party/junit",
diff --git a/services/on_device_model/android/backend_impl_android.cc b/services/on_device_model/android/backend_impl_android.cc deleted file mode 100644 index e0fb24a..0000000 --- a/services/on_device_model/android/backend_impl_android.cc +++ /dev/null
@@ -1,53 +0,0 @@ -// Copyright 2025 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "services/on_device_model/android/backend_impl_android.h" - -#include <memory> -#include <utility> - -#include "base/functional/callback.h" -#include "base/notimplemented.h" -#include "base/types/expected.h" -#include "services/on_device_model/android/backend_model_impl_android.h" -#include "services/on_device_model/public/cpp/service_client.h" -#include "services/on_device_model/public/mojom/on_device_model.mojom.h" - -namespace on_device_model { - -BackendImplAndroid::BackendImplAndroid() = default; - -BackendImplAndroid::~BackendImplAndroid() = default; - -base::expected<void, ServiceDisconnectReason> BackendImplAndroid::CanCreate() { - return base::ok(); -} - -Capabilities BackendImplAndroid::GetCapabilities(ModelFile model_file) { - NOTIMPLEMENTED(); - return {}; -} - -base::expected<std::unique_ptr<BackendModel>, mojom::LoadModelResult> -BackendImplAndroid::CreateWithResult(mojom::LoadModelParamsPtr params, - base::OnceClosure on_complete) { - auto model = std::make_unique<BackendModelImplAndroid>(); - // `on_complete` record metrics, so it is called after the model is created to - // include the time to create the model. - std::move(on_complete).Run(); - return base::ok(std::move(model)); -} - -void BackendImplAndroid::LoadTextSafetyModel( - mojom::TextSafetyModelParamsPtr params, - mojo::PendingReceiver<mojom::TextSafetyModel> model) { - NOTIMPLEMENTED(); -} - -mojom::DevicePerformanceInfoPtr BackendImplAndroid::GetDevicePerformanceInfo() { - NOTIMPLEMENTED(); - return nullptr; -} - -} // namespace on_device_model
diff --git a/services/on_device_model/android/backend_impl_android.h b/services/on_device_model/android/backend_impl_android.h deleted file mode 100644 index 86214b9..0000000 --- a/services/on_device_model/android/backend_impl_android.h +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2025 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef SERVICES_ON_DEVICE_MODEL_ANDROID_BACKEND_IMPL_ANDROID_H_ -#define SERVICES_ON_DEVICE_MODEL_ANDROID_BACKEND_IMPL_ANDROID_H_ - -#include "services/on_device_model/backend.h" - -namespace on_device_model { - -// Android implementation of Backend. Since the base model is not directly -// managed by Chrome, only `CreateWithResult` is implemented. -class BackendImplAndroid : public Backend { - public: - BackendImplAndroid(); - ~BackendImplAndroid() override; - - // Backend: - base::expected<void, ServiceDisconnectReason> CanCreate() override; - Capabilities GetCapabilities(ModelFile model_file) override; - base::expected<std::unique_ptr<BackendModel>, mojom::LoadModelResult> - CreateWithResult(mojom::LoadModelParamsPtr params, - base::OnceClosure on_complete) override; - void LoadTextSafetyModel( - mojom::TextSafetyModelParamsPtr params, - mojo::PendingReceiver<mojom::TextSafetyModel> model) override; - mojom::DevicePerformanceInfoPtr GetDevicePerformanceInfo() override; -}; - -} // namespace on_device_model - -#endif // SERVICES_ON_DEVICE_MODEL_ANDROID_BACKEND_IMPL_ANDROID_H_
diff --git a/services/on_device_model/android/backend_model_impl_android.cc b/services/on_device_model/android/backend_model_impl_android.cc index 8661e72..2cecb69 100644 --- a/services/on_device_model/android/backend_model_impl_android.cc +++ b/services/on_device_model/android/backend_model_impl_android.cc
@@ -11,14 +11,17 @@ namespace on_device_model { -BackendModelImplAndroid::BackendModelImplAndroid() = default; +BackendModelImplAndroid::BackendModelImplAndroid( + optimization_guide::proto::ModelExecutionFeature feature) + : feature_(feature) {} BackendModelImplAndroid::~BackendModelImplAndroid() = default; std::unique_ptr<BackendSession> BackendModelImplAndroid::CreateSession( const ScopedAdaptation* adaptation, on_device_model::mojom::SessionParamsPtr params) { - return std::make_unique<BackendSessionImplAndroid>(std::move(params)); + return std::make_unique<BackendSessionImplAndroid>(feature_, + std::move(params)); } std::unique_ptr<BackendModel::ScopedAdaptation>
diff --git a/services/on_device_model/android/backend_model_impl_android.h b/services/on_device_model/android/backend_model_impl_android.h index bff5aff..8e718e16 100644 --- a/services/on_device_model/android/backend_model_impl_android.h +++ b/services/on_device_model/android/backend_model_impl_android.h
@@ -6,14 +6,17 @@ #define SERVICES_ON_DEVICE_MODEL_ANDROID_BACKEND_MODEL_IMPL_ANDROID_H_ #include "base/memory/weak_ptr.h" +#include "components/optimization_guide/proto/model_execution.pb.h" #include "services/on_device_model/backend_model.h" namespace on_device_model { // Uses the OnDeviceModel APIs that are available on Android to create sessions. +// Each feature should create its own backend model object. class BackendModelImplAndroid : public BackendModel { public: - BackendModelImplAndroid(); + explicit BackendModelImplAndroid( + optimization_guide::proto::ModelExecutionFeature feature); ~BackendModelImplAndroid() override; // BackendModel: @@ -23,6 +26,9 @@ std::unique_ptr<ScopedAdaptation> LoadAdaptation( on_device_model::mojom::LoadAdaptationParamsPtr params) override; void UnloadAdaptation(uint32_t adaptation_id) override; + + private: + optimization_guide::proto::ModelExecutionFeature feature_; }; } // namespace on_device_model
diff --git a/services/on_device_model/android/backend_impl_android_unittest.cc b/services/on_device_model/android/backend_model_impl_android_unittest.cc similarity index 86% rename from services/on_device_model/android/backend_impl_android_unittest.cc rename to services/on_device_model/android/backend_model_impl_android_unittest.cc index 294f029a..fefd9e8 100644 --- a/services/on_device_model/android/backend_impl_android_unittest.cc +++ b/services/on_device_model/android/backend_model_impl_android_unittest.cc
@@ -2,11 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "services/on_device_model/android/backend_impl_android.h" +#include "services/on_device_model/android/backend_model_impl_android.h" #include "base/android/jni_android.h" #include "base/android/jni_string.h" #include "base/test/task_environment.h" +#include "components/optimization_guide/proto/model_execution.pb.h" #include "services/on_device_model/public/cpp/test_support/test_response_holder.h" #include "services/on_device_model/public/mojom/on_device_model.mojom.h" #include "testing/gmock/include/gmock/gmock.h" @@ -20,19 +21,20 @@ using ::testing::ElementsAre; -class BackendImplAndroidTest : public testing::Test { +constexpr optimization_guide::proto::ModelExecutionFeature kFeature = + optimization_guide::proto::ModelExecutionFeature:: + MODEL_EXECUTION_FEATURE_SCAM_DETECTION; + +class BackendModelImplAndroidTest : public testing::Test { public: - BackendImplAndroidTest() = default; - ~BackendImplAndroidTest() override = default; + BackendModelImplAndroidTest() = default; + ~BackendModelImplAndroidTest() override = default; void SetUp() override { env_ = base::android::AttachCurrentThread(); java_helper_ = Java_OnDeviceModelBridgeNativeUnitTestHelper_create(env_); - auto model_result = BackendImplAndroid().CreateWithResult( - /*params=*/nullptr, /*on_complete=*/base::DoNothing()); - ASSERT_TRUE(model_result.has_value()); - model_ = std::move(model_result.value()); + model_ = std::make_unique<BackendModelImplAndroid>(kFeature); } mojom::SessionParamsPtr MakeSessionParams(int top_k, float temperature) { @@ -52,11 +54,10 @@ base::test::TaskEnvironment task_environment_; raw_ptr<JNIEnv> env_; base::android::ScopedJavaGlobalRef<jobject> java_helper_; - BackendImplAndroid backend_; std::unique_ptr<BackendModel> model_; }; -TEST_F(BackendImplAndroidTest, GenerateWithDefaultFactory) { +TEST_F(BackendModelImplAndroidTest, GenerateWithDefaultFactory) { std::unique_ptr<BackendSession> session = model_->CreateSession( /*adaptation=*/nullptr, MakeSessionParams(/*top_k=*/3, /*temperature=*/1.0f)); @@ -68,7 +69,7 @@ EXPECT_THAT(response_holder.responses(), ElementsAre("AiCore response")); } -TEST_F(BackendImplAndroidTest, AppendAndGenerate) { +TEST_F(BackendModelImplAndroidTest, AppendAndGenerate) { Java_OnDeviceModelBridgeNativeUnitTestHelper_setMockAiCoreSessionFactory( env_, java_helper_); @@ -76,7 +77,7 @@ /*adaptation=*/nullptr, MakeSessionParams(/*top_k=*/3, /*temperature=*/1.0f)); Java_OnDeviceModelBridgeNativeUnitTestHelper_verifySessionParams( - env_, java_helper_, /*topK=*/3, /*temperature=*/1.0f); + env_, java_helper_, kFeature, /*topK=*/3, /*temperature=*/1.0f); { std::vector<ml::InputPiece> pieces; @@ -111,7 +112,7 @@ "<system>mock system input<end><user>mock user input<end><model>")); } -TEST_F(BackendImplAndroidTest, ContextIsNotClearedOnNewGenerate) { +TEST_F(BackendModelImplAndroidTest, ContextIsNotClearedOnNewGenerate) { Java_OnDeviceModelBridgeNativeUnitTestHelper_setMockAiCoreSessionFactory( env_, java_helper_); @@ -145,7 +146,7 @@ } } -TEST_F(BackendImplAndroidTest, NativeSessionDeletionIsSafe) { +TEST_F(BackendModelImplAndroidTest, NativeSessionDeletionIsSafe) { Java_OnDeviceModelBridgeNativeUnitTestHelper_setMockAiCoreSessionFactory( env_, java_helper_);
diff --git a/services/on_device_model/android/backend_session_impl_android.cc b/services/on_device_model/android/backend_session_impl_android.cc index ba869131..078483e 100644 --- a/services/on_device_model/android/backend_session_impl_android.cc +++ b/services/on_device_model/android/backend_session_impl_android.cc
@@ -27,8 +27,10 @@ namespace on_device_model { BackendSessionImplAndroid::BackendSessionImplAndroid( + optimization_guide::proto::ModelExecutionFeature feature, on_device_model::mojom::SessionParamsPtr params) - : java_session_(OnDeviceModelBridge::CreateSession(std::move(params))) {} + : java_session_( + OnDeviceModelBridge::CreateSession(feature, std::move(params))) {} BackendSessionImplAndroid::~BackendSessionImplAndroid() { JNIEnv* env = base::android::AttachCurrentThread();
diff --git a/services/on_device_model/android/backend_session_impl_android.h b/services/on_device_model/android/backend_session_impl_android.h index 8087b2f7..7434bfe7 100644 --- a/services/on_device_model/android/backend_session_impl_android.h +++ b/services/on_device_model/android/backend_session_impl_android.h
@@ -8,6 +8,7 @@ #include <string> #include "base/android/scoped_java_ref.h" +#include "components/optimization_guide/proto/model_execution.pb.h" #include "mojo/public/cpp/bindings/remote.h" #include "services/on_device_model/backend_session.h" @@ -17,7 +18,8 @@ // lifetime will be created when this object is created. class BackendSessionImplAndroid : public BackendSession { public: - explicit BackendSessionImplAndroid( + BackendSessionImplAndroid( + optimization_guide::proto::ModelExecutionFeature feature, on_device_model::mojom::SessionParamsPtr params); ~BackendSessionImplAndroid() override;
diff --git a/services/on_device_model/android/java/src/org/chromium/on_device_model/AiCoreSessionFactory.java b/services/on_device_model/android/java/src/org/chromium/on_device_model/AiCoreSessionFactory.java index 29ac3b3..8ea29a34 100644 --- a/services/on_device_model/android/java/src/org/chromium/on_device_model/AiCoreSessionFactory.java +++ b/services/on_device_model/android/java/src/org/chromium/on_device_model/AiCoreSessionFactory.java
@@ -5,6 +5,7 @@ package org.chromium.on_device_model; import org.chromium.build.annotations.NullMarked; +import org.chromium.components.optimization_guide.proto.ModelExecutionProto.ModelExecutionFeature; import org.chromium.on_device_model.mojom.SessionParams; /** @@ -13,5 +14,5 @@ */ @NullMarked public interface AiCoreSessionFactory { - AiCoreSession createSession(SessionParams params); + AiCoreSession createSession(ModelExecutionFeature feature, SessionParams params); }
diff --git a/services/on_device_model/android/java/src/org/chromium/on_device_model/OnDeviceModelBridge.java b/services/on_device_model/android/java/src/org/chromium/on_device_model/OnDeviceModelBridge.java index a599d889..f0414eb 100644 --- a/services/on_device_model/android/java/src/org/chromium/on_device_model/OnDeviceModelBridge.java +++ b/services/on_device_model/android/java/src/org/chromium/on_device_model/OnDeviceModelBridge.java
@@ -9,6 +9,7 @@ import org.chromium.base.ServiceLoaderUtil; import org.chromium.build.annotations.NullMarked; +import org.chromium.components.optimization_guide.proto.ModelExecutionProto.ModelExecutionFeature; import org.chromium.on_device_model.mojom.SessionParams; /** @@ -23,12 +24,14 @@ /** * Creates a new AiCoreSession. * + * @param feature The feature id requested this session. * @param topK The top K value for sampling. * @param temperature The temperature value for sampling. * @return The AiCoreSession instance. */ @CalledByNative - private static AiCoreSession createSession(int topK, float temperature) { + private static AiCoreSession createSession(int feature, int topK, float temperature) { + ModelExecutionFeature modelExecutionFeatureId = ModelExecutionFeature.forNumber(feature); SessionParams params = new SessionParams(); params.topK = topK; params.temperature = temperature; @@ -36,6 +39,6 @@ if (factory == null) { return new AiCoreSessionUpstreamImpl(); } - return factory.createSession(params); + return factory.createSession(modelExecutionFeatureId, params); } }
diff --git a/services/on_device_model/android/native_java_unittests/src/org/chromium/on_device_model/OnDeviceModelBridgeNativeUnitTestHelper.java b/services/on_device_model/android/native_java_unittests/src/org/chromium/on_device_model/OnDeviceModelBridgeNativeUnitTestHelper.java index 0e95acd6..d8dfaae9 100644 --- a/services/on_device_model/android/native_java_unittests/src/org/chromium/on_device_model/OnDeviceModelBridgeNativeUnitTestHelper.java +++ b/services/on_device_model/android/native_java_unittests/src/org/chromium/on_device_model/OnDeviceModelBridgeNativeUnitTestHelper.java
@@ -8,6 +8,7 @@ import org.jni_zero.CalledByNative; import org.chromium.base.ServiceLoaderUtil; +import org.chromium.components.optimization_guide.proto.ModelExecutionProto.ModelExecutionFeature; import org.chromium.on_device_model.mojom.InputPiece; import org.chromium.on_device_model.mojom.SessionParams; import org.chromium.on_device_model.mojom.Token; @@ -27,9 +28,11 @@ private boolean mCompleteAsync; private boolean mNativeDestroyed; private long mNativeBackendSession; + private final ModelExecutionFeature mFeature; private final SessionParams mParams; - public MockAiCoreSession(SessionParams params) { + public MockAiCoreSession(ModelExecutionFeature feature, SessionParams params) { + mFeature = feature; mParams = params; } @@ -91,8 +94,8 @@ public MockAiCoreSessionFactory() {} @Override - public AiCoreSession createSession(SessionParams params) { - mSession = new MockAiCoreSession(params); + public AiCoreSession createSession(ModelExecutionFeature feature, SessionParams params) { + mSession = new MockAiCoreSession(feature, params); return mSession; } } @@ -100,7 +103,9 @@ private MockAiCoreSessionFactory mMockAiCoreSessionFactory; @CalledByNative - public void verifySessionParams(int topK, float temperature) { + public void verifySessionParams(int feature, int topK, float temperature) { + ModelExecutionFeature modelExecutionFeatureId = ModelExecutionFeature.forNumber(feature); + assertEquals(modelExecutionFeatureId, mMockAiCoreSessionFactory.mSession.mFeature); SessionParams params = mMockAiCoreSessionFactory.mSession.mParams; assertEquals(topK, params.topK); assertEquals(temperature, params.temperature, 0.01f);
diff --git a/services/on_device_model/android/on_device_model_bridge.cc b/services/on_device_model/android/on_device_model_bridge.cc index bd05c60..583b656 100644 --- a/services/on_device_model/android/on_device_model_bridge.cc +++ b/services/on_device_model/android/on_device_model_bridge.cc
@@ -14,13 +14,17 @@ // static base::android::ScopedJavaLocalRef<jobject> OnDeviceModelBridge::CreateSession( + optimization_guide::proto::ModelExecutionFeature feature, on_device_model::mojom::SessionParamsPtr params) { + CHECK(feature != optimization_guide::proto::ModelExecutionFeature:: + MODEL_EXECUTION_FEATURE_UNSPECIFIED) + << "Feature is required to create a session."; CHECK(params) << "SessionParams is required to create a session."; JNIEnv* env = base::android::AttachCurrentThread(); // There isn't a generic mojo utility for converting c++ mojo struct to java, // so disassemble the struct here and reassemble it in java. // Only passing the parameters that are supported on Android. - return Java_OnDeviceModelBridge_createSession(env, params->top_k, + return Java_OnDeviceModelBridge_createSession(env, feature, params->top_k, params->temperature); }
diff --git a/services/on_device_model/android/on_device_model_bridge.h b/services/on_device_model/android/on_device_model_bridge.h index 169fc59..a37dbb9 100644 --- a/services/on_device_model/android/on_device_model_bridge.h +++ b/services/on_device_model/android/on_device_model_bridge.h
@@ -6,6 +6,7 @@ #define SERVICES_ON_DEVICE_MODEL_ANDROID_ON_DEVICE_MODEL_BRIDGE_H_ #include "base/android/scoped_java_ref.h" +#include "components/optimization_guide/proto/model_execution.pb.h" #include "services/on_device_model/public/mojom/on_device_model.mojom.h" namespace on_device_model { @@ -17,6 +18,7 @@ // Creates a new AiCoreSession instance. Caller is responsible for // creating a global ref if it needs to be stored. static base::android::ScopedJavaLocalRef<jobject> CreateSession( + optimization_guide::proto::ModelExecutionFeature feature, on_device_model::mojom::SessionParamsPtr params); };
diff --git a/services/on_device_model/on_device_model_service.cc b/services/on_device_model/on_device_model_service.cc index 3dbbd78d..27e4b4c1 100644 --- a/services/on_device_model/on_device_model_service.cc +++ b/services/on_device_model/on_device_model_service.cc
@@ -26,10 +26,6 @@ #include "services/on_device_model/public/cpp/features.h" #include "services/on_device_model/public/cpp/service_client.h" -#if BUILDFLAG(IS_ANDROID) -#include "services/on_device_model/android/backend_impl_android.h" -#endif - namespace on_device_model { namespace { @@ -475,9 +471,6 @@ } std::unique_ptr<Backend> DefaultImpl() { -#if BUILDFLAG(IS_ANDROID) - return std::make_unique<BackendImplAndroid>(); -#else if (base::FeatureList::IsEnabled(features::kUseFakeChromeML)) { return std::make_unique<ml::BackendImpl>(fake_ml::GetFakeChromeML()); } @@ -486,7 +479,6 @@ #else return std::make_unique<ml::BackendImpl>(fake_ml::GetFakeChromeML()); #endif // defined(ENABLE_ML_INTERNAL) -#endif // BUILDFLAG(IS_ANDROID) } } // namespace
diff --git a/services/webnn/webnn_graph_impl_backend_test.cc b/services/webnn/webnn_graph_impl_backend_test.cc index 092e2e5..28a72fd 100644 --- a/services/webnn/webnn_graph_impl_backend_test.cc +++ b/services/webnn/webnn_graph_impl_backend_test.cc
@@ -472,10 +472,10 @@ "BuildAndComputeGraphWithTwoTranspose", "BuildAndComputeMultipleOperatorGemm", // "BuildAndComputeReluWithOnlyConstantInput", - // "BuildAndComputeReshapeConcatAndClamp", + "BuildAndComputeReshapeConcatAndClamp", "BuildAndComputeSingleOperatorClamp", - // "BuildAndComputeSingleOperatorGruCell", - // "BuildAndComputeSingleOperatorGru", + "BuildAndComputeSingleOperatorGruCell", + "BuildAndComputeSingleOperatorGru", "BuildAndComputeSingleOperatorHardSigmoid", "BuildAndComputeSingleOperatorHardSwish", // "BuildAndComputeSingleOperatorLstmCell", @@ -494,7 +494,7 @@ "FuseStandaloneActivationIntoGemm", // "FuseStandaloneActivationIntoInstanceNormalization", "FuseStandaloneActivationIntoLayerNormalization", - // "FuseStandaloneOperationsIntoMatmul", + "FuseStandaloneOperationsIntoMatmul", // "MultipleOutputsCanNotFuseStandaloneActivation", }); if (!kSupportedTests.contains(current_test_name)) {
diff --git a/testing/buildbot/filters/BUILD.gn b/testing/buildbot/filters/BUILD.gn index 12af364..090bd25 100644 --- a/testing/buildbot/filters/BUILD.gn +++ b/testing/buildbot/filters/BUILD.gn
@@ -46,7 +46,7 @@ data = [ "//testing/buildbot/filters/android.emulator.base_unittests.filter", "//testing/buildbot/filters/android.emulator_14_15_16.base_unittests.filter", - "//testing/buildbot/filters/android.pie_tot.base_unittests.filter", + "//testing/buildbot/filters/android.device_10.tot.base_unittests.filter", "//testing/buildbot/filters/android.mte.base_unittests.filter", "//testing/buildbot/filters/android.tangorpro.base_unittests.filter", "//testing/buildbot/filters/fuchsia.lsan.base_unittests.filter", @@ -122,8 +122,6 @@ "//testing/buildbot/filters/android.emulator_15_tablet_landscape.chrome_public_test_apk.filter", "//testing/buildbot/filters/android.emulator_15_tablet.chrome_public_test_apk.filter", "//testing/buildbot/filters/android.emulator_15.chrome_public_test_apk.filter", - "//testing/buildbot/filters/android.emulator_o.chrome_public_test_apk.filter", - "//testing/buildbot/filters/android.emulator_p.chrome_public_test_apk.filter", ] } @@ -136,7 +134,6 @@ "//testing/buildbot/filters/android.emulator_13.chrome_public_unit_test_apk.filter", "//testing/buildbot/filters/android.emulator_14.chrome_public_unit_test_apk.filter", "//testing/buildbot/filters/android.emulator_15_tablet.chrome_public_unit_test_apk.filter", - "//testing/buildbot/filters/android.emulator_o.chrome_public_unit_test_apk.filter", ] } @@ -229,8 +226,6 @@ "//testing/buildbot/filters/android.emulator_15.content_browsertests.filter", "//testing/buildbot/filters/android.emulator_15_tablet.content_browsertests.filter", "//testing/buildbot/filters/android.emulator_16.content_browsertests.filter", - "//testing/buildbot/filters/android.emulator_o.content_browsertests.filter", - "//testing/buildbot/filters/android.emulator_p.content_browsertests.filter", "//testing/buildbot/filters/android.device_14.content_browsertests.filter", "//testing/buildbot/filters/android.device_14_tablet.content_browsertests.filter", "//testing/buildbot/filters/android.mte.content_browsertests.filter", @@ -289,7 +284,6 @@ "//testing/buildbot/filters/android.arm64_proguard_rel.crashpad_tests.filter", "//testing/buildbot/filters/android.emulator.crashpad_tests.filter", "//testing/buildbot/filters/android.mte.crashpad_tests.filter", - "//testing/buildbot/filters/android.pie_tot.crashpad_tests.filter", ] } @@ -332,7 +326,6 @@ testonly = true data = [ - "//testing/buildbot/filters/android.emulator_o.services_unittests.filter", "//testing/buildbot/filters/fuchsia.services_unittests.filter", "//testing/buildbot/filters/fuchsia.lsan.services_unittests.filter", "//testing/buildbot/filters/win.win_arm64.services_webnn_unittests.filter", @@ -363,7 +356,7 @@ testonly = true data = [ - "//testing/buildbot/filters/android.pie_arm64.gin_unittests.filter", + "//testing/buildbot/filters/android.device_10.proguard_rel.gin_unittests.filter", "//testing/buildbot/filters/fuchsia.lsan.gin_unittests.filter", ] } @@ -383,10 +376,7 @@ "//testing/buildbot/filters/android.emulator_10.gl_tests.filter", "//testing/buildbot/filters/android.emulator_11.gl_tests.filter", "//testing/buildbot/filters/android.emulator_12_12l_13.gl_tests.filter", - "//testing/buildbot/filters/android.emulator_o_p.gl_tests.filter", "//testing/buildbot/filters/android.moto_g_power_5g.gl_tests.filter", - "//testing/buildbot/filters/android.pie_arm64_rel.gl_tests.filter", - "//testing/buildbot/filters/android.pie_tot.gl_tests.filter", "//testing/buildbot/filters/android.samsung_a13.gl_tests.filter", "//testing/buildbot/filters/android.samsung_a23.gl_tests.filter", "//testing/buildbot/filters/linux.uhd_630.gl_tests_passthrough.filter",
diff --git a/testing/buildbot/filters/android.pie_arm64.gin_unittests.filter b/testing/buildbot/filters/android.device_10.proguard_rel.gin_unittests.filter similarity index 100% rename from testing/buildbot/filters/android.pie_arm64.gin_unittests.filter rename to testing/buildbot/filters/android.device_10.proguard_rel.gin_unittests.filter
diff --git a/testing/buildbot/filters/android.pie_tot.base_unittests.filter b/testing/buildbot/filters/android.device_10.tot.base_unittests.filter similarity index 100% rename from testing/buildbot/filters/android.pie_tot.base_unittests.filter rename to testing/buildbot/filters/android.device_10.tot.base_unittests.filter
diff --git a/testing/buildbot/filters/android.emulator_o.chrome_public_test_apk.filter b/testing/buildbot/filters/android.emulator_o.chrome_public_test_apk.filter deleted file mode 100644 index 9e47a6c4..0000000 --- a/testing/buildbot/filters/android.emulator_o.chrome_public_test_apk.filter +++ /dev/null
@@ -1,11 +0,0 @@ -# TODO(crbug.com/40277597) --org.chromium.chrome.browser.browsing_data.ClearBrowsingDataFragmentBasicTest.testRenderSearchHistoryLinkSignedOutKnownNonGoogleDSE - -# TODO(crbug.com/378392574) --org.chromium.chrome.browser.tasks.tab_management.TabGroupRowViewRenderTest.testRenderWithVariousFaviconCounts --org.chromium.chrome.browser.tasks.tab_management.TabGroupRowViewRenderTest.testRenderWithVeryLongTitle - -# TODO(crbug.com/380651229) --org.chromium.chrome.browser.ui.signin.history_sync.HistorySyncRenderTest.testHistorySyncViewWithAlternateIllustration__NightModeDisabled_Landscape --org.chromium.chrome.browser.ui.signin.history_sync.HistorySyncRenderTest.testHistorySyncViewWithAlternateIllustration__NightModeDisabled_Portrait --org.chromium.chrome.browser.ui.signin.history_sync.HistorySyncRenderTest.testHistorySyncViewWithAlternateIllustration__NightModeEnabled_Portrait \ No newline at end of file
diff --git a/testing/buildbot/filters/android.emulator_o.chrome_public_unit_test_apk.filter b/testing/buildbot/filters/android.emulator_o.chrome_public_unit_test_apk.filter deleted file mode 100644 index 73a9ddaf..0000000 --- a/testing/buildbot/filters/android.emulator_o.chrome_public_unit_test_apk.filter +++ /dev/null
@@ -1,5 +0,0 @@ -# TODO(crbug.com/40276077) --org.chromium.components.browser_ui.photo_picker.DecoderServiceHostTest.testDecodingSizes - -# TODO(crbug.com/377388268) --org.chromium.components.browser_ui.widget.CheckBoxWithDescriptionRenderTest.testCheckBoxWithDescription
diff --git a/testing/buildbot/filters/android.emulator_o.content_browsertests.filter b/testing/buildbot/filters/android.emulator_o.content_browsertests.filter deleted file mode 100644 index 64ee898..0000000 --- a/testing/buildbot/filters/android.emulator_o.content_browsertests.filter +++ /dev/null
@@ -1,6 +0,0 @@ -# crbug.com/343335591 --FormControlsBrowserTest.MultiSelect --FormControlsBrowserTest.Select - -# crbug.com/1344391 --All/SitePerProcessBrowserTest.KeyboardScrollBubblingFromOOPIF/*
diff --git a/testing/buildbot/filters/android.emulator_o.services_unittests.filter b/testing/buildbot/filters/android.emulator_o.services_unittests.filter deleted file mode 100644 index 98a5160..0000000 --- a/testing/buildbot/filters/android.emulator_o.services_unittests.filter +++ /dev/null
@@ -1,3 +0,0 @@ -# crbug.com/1264654 --PacLibraryTest.ActualPacMyIpAddress --PacLibraryTest.ActualPacMyIpAddressEx
diff --git a/testing/buildbot/filters/android.emulator_o_p.gl_tests.filter b/testing/buildbot/filters/android.emulator_o_p.gl_tests.filter deleted file mode 100644 index 4215caec..0000000 --- a/testing/buildbot/filters/android.emulator_o_p.gl_tests.filter +++ /dev/null
@@ -1,12 +0,0 @@ -# https://crbug.com/1342710 --CopyType/GLCopyTextureCHROMIUMES3Test.CopyTextureCubeMap/0 --CopyType/GLCopyTextureCHROMIUMES3Test.CopyTextureLevel/0 --CopyType/GLCopyTextureCHROMIUMES3Test.FormatCombinations* --CopyType/GLCopyTextureCHROMIUMTest.ImmutableTexture/0 --CopyType/GLCopyTextureCHROMIUMTest.ImmutableTexture/1 - -# https://crbug.com/1342713 --GLBGRAMipMapTest.GenerateMipmapsSucceeds - -# https://crbug.com/1342713: GL_BGRA_EXT is broken in Android emulator. --GLTextureImageBackingFactory*/BGRA_8888
diff --git a/testing/buildbot/filters/android.emulator_p.chrome_public_test_apk.filter b/testing/buildbot/filters/android.emulator_p.chrome_public_test_apk.filter deleted file mode 100644 index a021877..0000000 --- a/testing/buildbot/filters/android.emulator_p.chrome_public_test_apk.filter +++ /dev/null
@@ -1,48 +0,0 @@ -# crbug.com/1032118 --org.chromium.chrome.browser.notifications.StandardNotificationBuilderTest.testSetAll - -# crbug.com/1061158 --org.chromium.chrome.browser.TabsOpenedFromExternalAppTest.testLaunchWebLiteURLNoPreviews - -# crbug.com/1061173 --org.chromium.chrome.browser.customtabs.CustomTabsConnectionTest.testGetSchedulerGroup - -# crbug.com/1041822 --org.chromium.chrome.browser.offlinepages.OfflinePageAutoFetchTest.testAutoFetchTriggersOnDNSErrorWhenOffline - -# crbug.com/1061201 --org.chromium.chrome.browser.history.HistoryActivityTest.testOpenSelectedItems - -# crbug.com/1061212 --org.chromium.chrome.browser.metrics.UkmTest.testRegularPlusIncognitoCheck - -# crbug.com/1061214 --org.chromium.chrome.browser.customtabs.CustomTabActivityTest.testHiddenTabAndChangingFragmentDontWait - -# crbug.com/1058877 --org.chromium.chrome.browser.autofill.AutofillUpstreamTest.testSaveCardInfoBarContinueButton_EmptyExpDate_launchesExpDateFixFlow --org.chromium.chrome.browser.autofill.AutofillUpstreamTest.testSaveCardInfoBarContinueButton_EmptyName_launchesNameFixFlow --org.chromium.chrome.browser.autofill.AutofillUpstreamTest.testSaveCardInfoBarWithEmptyMonth --org.chromium.chrome.browser.autofill.AutofillUpstreamTest.testSaveCardInfoBarWithEmptyMonthAndYear --org.chromium.chrome.browser.autofill.AutofillUpstreamTest.testSaveCardInfoBarWithEmptyYear - -# crbug.com/1062055 --org.chromium.chrome.browser.metrics.StartupLoadingMetricsTest.testWebApkStartRecorded - -# crbug.com/1062058 --org.chromium.chrome.browser.customtabs.DetachedResourceRequestTest.testSafeBrowsingMainResourceWithSplitCache - -# crbug.com/1063971 --org.chromium.chrome.browser.media.ui.FullscreenVideoPictureInPictureControllerTest.testExitPipOnNavigation - -# crbug.com/1036545 --org.chromium.chrome.browser.suggestions.tile.TileGroupTest.testDismissTileUndo - -# crbug.com/1063975 --org.chromium.chrome.browser.feed.FeedAppLifecycleTest.testSecondWindowDoesNotTriggerForegroundOrBackground - -# crbug.com/1067673 --org.chromium.chrome.browser.ntp.cards.NewTabPageRecyclerViewTest.testDismissArticleWithContextMenu - -# crbug.com/1392774 --org.chromium.chrome.browser.display_cutout.DisplayCutoutTest.testViewportFitCover*
diff --git a/testing/buildbot/filters/android.emulator_p.content_browsertests.filter b/testing/buildbot/filters/android.emulator_p.content_browsertests.filter deleted file mode 100644 index e8bd028..0000000 --- a/testing/buildbot/filters/android.emulator_p.content_browsertests.filter +++ /dev/null
@@ -1,33 +0,0 @@ -# crbug.com/1054829 --All/TouchActionBrowserTest.PanXAtYAreaWithTimeout --All/TouchActionBrowserTest.TouchActionNone --All/TouchActionBrowserTest.TwoFingerPanXAtYAreaWithTimeout --All/TouchActionBrowserTest.BlockDoubleTapDragZoom - -# crbug.com/1056878 --BackForwardCacheBrowserTest.VideoSuspendAndResume - -# crbug.com/1096612 --All/SitePerProcessBrowserTest.DetachedIframeUnloadHandlerABCB/* - -# crbug.com/1058447 --All/SitePerProcessBrowserTest.FrameViewportOffsetTestSimple/* - -# crbug.com/1056325 --WebRtcAudioBrowserTest.EstablishAudioVideoCallAndVerifyLocalMutingWorks - -# crbug.com/1058570 --WebRtcGetUserMediaBrowserTest.ApplyConstraintsNonDevice - -# crbug.com/1065184 --RenderFrameHostImplBrowserTest.CheckIsCurrentBeforeAndAfterUnload - -# crbug.com/954217 --RenderFrameHostImplBrowserTest.VisibilityScrolledOutOfView - -# crbug.com/1047994 --WebRtcBrowserTest.CanSetupH264VideoCallOnSupportedDevice - -# crbug.com/343335591 --FormControlsBrowserTest.MultiSelect --FormControlsBrowserTest.Select
diff --git a/testing/buildbot/filters/android.pie_arm64_rel.gl_tests.filter b/testing/buildbot/filters/android.pie_arm64_rel.gl_tests.filter deleted file mode 100644 index 355db93..0000000 --- a/testing/buildbot/filters/android.pie_arm64_rel.gl_tests.filter +++ /dev/null
@@ -1,18 +0,0 @@ --TranslatorVariants/EXTBlendFuncExtendedDrawTest.ESSL1FragColor/0 --TranslatorVariants/EXTBlendFuncExtendedDrawTest.ESSL1FragColor/1 --TranslatorVariants/EXTBlendFuncExtendedDrawTest.ESSL1FragData/0 --TranslatorVariants/EXTBlendFuncExtendedDrawTest.ESSL1FragData/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3Conflicts/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3Conflicts/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3Getters/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3Getters/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3GettersArray/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3GettersArray/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindArrayAsArray/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindArrayAsArray/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindArrayWithSimpleName/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindArrayWithSimpleName/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindSimpleVarAsArrayNoBind/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindSimpleVarAsArrayNoBind/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3Var/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3Var/1
diff --git a/testing/buildbot/filters/android.pie_tot.crashpad_tests.filter b/testing/buildbot/filters/android.pie_tot.crashpad_tests.filter deleted file mode 100644 index acaa76bf..0000000 --- a/testing/buildbot/filters/android.pie_tot.crashpad_tests.filter +++ /dev/null
@@ -1,4 +0,0 @@ -# crbug.com/1384185 --StartHandlerForSelfTestSuite/StartHandlerForSelfTest.StartHandlerInChild/* - -
diff --git a/testing/buildbot/filters/android.pie_tot.gl_tests.filter b/testing/buildbot/filters/android.pie_tot.gl_tests.filter deleted file mode 100644 index d52ff99c..0000000 --- a/testing/buildbot/filters/android.pie_tot.gl_tests.filter +++ /dev/null
@@ -1,19 +0,0 @@ -# crbug.com/1034007 --TranslatorVariants/EXTBlendFuncExtendedDrawTest.ESSL1FragColor/0 --TranslatorVariants/EXTBlendFuncExtendedDrawTest.ESSL1FragColor/1 --TranslatorVariants/EXTBlendFuncExtendedDrawTest.ESSL1FragData/0 --TranslatorVariants/EXTBlendFuncExtendedDrawTest.ESSL1FragData/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3Conflicts/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3Conflicts/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3Getters/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3Getters/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3GettersArray/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ES3GettersArray/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindArrayAsArray/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindArrayAsArray/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindArrayWithSimpleName/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindArrayWithSimpleName/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindSimpleVarAsArrayNoBind/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3BindSimpleVarAsArrayNoBind/1 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3Var/0 --TranslatorVariants/EXTBlendFuncExtendedES3DrawTest.ESSL3Var/1
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 870636a..ed2a129 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -3355,6 +3355,36 @@ ] } ], + "BackForwardTransitions": [ + { + "platforms": [ + "android" + ], + "experiments": [ + { + "name": "IPH", + "params": { + "availability": "any", + "compress-screenshot-when-quiet": "true", + "event_trigger": "name:rtl_gesture_iph_trigger;comparator:==0;window:365;storage:365", + "event_used": "name:rtl_gesture_iph_show;comparator:==0;window:365;storage:365", + "min-required-physical-ram-mb": "3200", + "percentage-of-ram-to-use": "0.5", + "screenshot-send-result-delay-ms": "400", + "session_rate": "<1", + "x_trigger": "", + "x_unhandled_gesture_threshold": "2" + }, + "enable_features": [ + "BackForwardTransitions", + "IPH_RtlGestureNavigation", + "MirrorBackForwardGesturesInRTL", + "NativePageTransitionHardwareCapture" + ] + } + ] + } + ], "BackNavigationMenuIPH": [ { "platforms": [ @@ -7504,9 +7534,7 @@ { "platforms": [ "chromeos", - "linux", - "mac", - "windows" + "linux" ], "experiments": [ { @@ -23365,21 +23393,6 @@ ] } ], - "SkiaGraphitePrecompilation": [ - { - "platforms": [ - "mac" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "SkiaGraphitePrecompilation" - ] - } - ] - } - ], "SkipModerateMemoryPressureLevelMac": [ { "platforms": [
diff --git a/third_party/abseil-cpp/symbols_arm64_dbg.def b/third_party/abseil-cpp/symbols_arm64_dbg.def index db90a8ca..e05d057 100644 --- a/third_party/abseil-cpp/symbols_arm64_dbg.def +++ b/third_party/abseil-cpp/symbols_arm64_dbg.def
@@ -55,10 +55,6 @@ ??$?0$00X@?$unique_ptr@VZoneInfoSource@cctz@time_internal@absl@@U?$default_delete@VZoneInfoSource@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAA@PEAVZoneInfoSource@cctz@time_internal@absl@@@Z ??$?0$00X@?$unique_ptr@XUDynValueDeleter@flags_internal@absl@@@__Cr@std@@QEAA@$$T@Z ??$?0$00X@?$unique_ptr@XUDynValueDeleter@flags_internal@absl@@@__Cr@std@@QEAA@PEAX$$QEAUDynValueDeleter@flags_internal@absl@@@Z - ??$?0$0A@$$Z$$QEAPEAVCommandLineFlag@absl@@$$Z$S$$Z$$V$$ZPEAV01@@?$__tuple_impl@U?$__integer_sequence@_K$0A@@__Cr@std@@$$QEAPEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@U?$__integer_sequence@_K$0A@@12@U?$__tuple_types@$$QEAPEAVCommandLineFlag@absl@@@12@U?$__integer_sequence@_K$S@12@U?$__tuple_types@$$V@12@$$QEAPEAVCommandLineFlag@absl@@@Z - ??$?0$0A@$$ZAEBQEAVCommandLineFlag@absl@@$$Z$S$$Z$$V$$ZAEBQEAV01@@?$__tuple_impl@U?$__integer_sequence@_K$0A@@__Cr@std@@AEBQEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@U?$__integer_sequence@_K$0A@@12@U?$__tuple_types@AEBQEAVCommandLineFlag@absl@@@12@U?$__integer_sequence@_K$S@12@U?$__tuple_types@$$V@12@AEBQEAVCommandLineFlag@absl@@@Z - ??$?0$0A@$00$$ZAEAPEAVCommandLineFlag@absl@@AEA_N$$Z$S$$Z$$V$$ZAEAPEAV01@AEA_N@?$__tuple_impl@U?$__integer_sequence@_K$0A@$00@__Cr@std@@AEAPEAVCommandLineFlag@absl@@AEA_N@__Cr@std@@QEAA@U?$__integer_sequence@_K$0A@$00@12@U?$__tuple_types@AEAPEAVCommandLineFlag@absl@@AEA_N@12@U?$__integer_sequence@_K$S@12@U?$__tuple_types@$$V@12@AEAPEAVCommandLineFlag@absl@@AEA_N@Z - ??$?0$0A@$00$$ZPEAVCommandLineFlag@absl@@_N$$Z$S$$Z$$V$$ZAEAPEAV01@AEA_N@?$__tuple_impl@U?$__integer_sequence@_K$0A@$00@__Cr@std@@PEAVCommandLineFlag@absl@@_N@__Cr@std@@QEAA@U?$__integer_sequence@_K$0A@$00@12@U?$__tuple_types@PEAVCommandLineFlag@absl@@_N@12@U?$__integer_sequence@_K$S@12@U?$__tuple_types@$$V@12@AEAPEAVCommandLineFlag@absl@@AEA_N@Z ??$?0AEAPEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@AEAPEAPEAPEBV01234@$0A@@?$pair@PEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@PEAPEAPEBV12345@@__Cr@std@@QEAA@AEAPEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@0@Z ??$?0AEAPEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@PEAPEAPEBV01234@$0A@@?$pair@PEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@PEAPEAPEBV12345@@__Cr@std@@QEAA@AEAPEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@$$QEAPEAPEAPEBV34567@@Z ??$?0AEAPEAPEAUPrefixCrc@CrcCordState@crc_internal@absl@@AEAPEAPEAU0123@$0A@@?$pair@PEAPEAUPrefixCrc@CrcCordState@crc_internal@absl@@PEAPEAU1234@@__Cr@std@@QEAA@AEAPEAPEAUPrefixCrc@CrcCordState@crc_internal@absl@@0@Z @@ -73,6 +69,8 @@ ??$?0AEAPEAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@AEAPEAVCommandLineFlag@absl@@$0A@@__Cr@std@@QEAA@AEAPEAVCommandLineFlag@absl@@@Z ??$?0AEAPEAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@PEAVCommandLineFlag@absl@@$0A@@__Cr@std@@QEAA@AEAPEAVCommandLineFlag@absl@@@Z ??$?0AEAPEAVCommandLineFlag@absl@@AEA_N$0A@@?$tuple@PEAVCommandLineFlag@absl@@_N@__Cr@std@@QEAA@AEAPEAVCommandLineFlag@absl@@AEA_N@Z + ??$?0AEAPEAVCommandLineFlag@absl@@AEA_N@?$__tuple_impl@U?$__integer_sequence@_K$0A@$00@__Cr@std@@AEAPEAVCommandLineFlag@absl@@AEA_N@__Cr@std@@QEAA@U__forward_args@12@AEAPEAVCommandLineFlag@absl@@AEA_N@Z + ??$?0AEAPEAVCommandLineFlag@absl@@AEA_N@?$__tuple_impl@U?$__integer_sequence@_K$0A@$00@__Cr@std@@PEAVCommandLineFlag@absl@@_N@__Cr@std@@QEAA@U__forward_args@12@AEAPEAVCommandLineFlag@absl@@AEA_N@Z ??$?0AEAPEBUPrefixCrc@CrcCordState@crc_internal@absl@@PEAU0123@$0A@@?$pair@PEBUPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@@__Cr@std@@QEAA@AEAPEBUPrefixCrc@CrcCordState@crc_internal@absl@@$$QEAPEAU3456@@Z ??$?0AEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@AEBV234@@Z@@?$__temp_value@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@QEAA@AEAV?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@12@AEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@12@AEBV678@@Z@@Z ??$?0AEAV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEBU1234@AEBU1234@PEBQEBU1234@_J$0A@@__Cr@std@@V?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@AEAU1234@PEAPEAU1234@_J$0A@@12@$0A@@?$pair@V?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEBU1234@AEBU1234@PEBQEBU1234@_J$0A@@__Cr@std@@V?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@AEAU1234@PEAPEAU1234@_J$0A@@23@@__Cr@std@@QEAA@AEAV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEBU1234@AEBU1234@PEBQEBU1234@_J$0A@@12@$$QEAV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@AEAU1234@PEAPEAU1234@_J$0A@@12@@Z @@ -93,6 +91,7 @@ ??$?0AEA_KAEBV?$allocator@D@__Cr@std@@$00@?$CompressedTuple@_KV?$allocator@D@__Cr@std@@@container_internal@absl@@QEAA@AEA_KAEBV?$allocator@D@__Cr@std@@@Z ??$?0AEA_KAEBV?$allocator@D@__Cr@std@@@?$CompressedTupleImpl@V?$CompressedTuple@_KV?$allocator@D@__Cr@std@@@container_internal@absl@@U?$integer_sequence@_K$0A@$00@__Cr@std@@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@__Cr@std@@AEA_KAEBV?$allocator@D@56@@Z ??$?0AEBQEAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@AEBQEAVCommandLineFlag@absl@@$0A@@__Cr@std@@QEAA@AEBQEAVCommandLineFlag@absl@@@Z + ??$?0AEBQEAVCommandLineFlag@absl@@@?$__tuple_impl@U?$__integer_sequence@_K$0A@@__Cr@std@@AEBQEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@U__forward_args@12@AEBQEAVCommandLineFlag@absl@@@Z ??$?0AEBV?$allocator@D@__Cr@std@@@?$Storage@V?$allocator@D@__Cr@std@@$00U?$StorageTag@_KV?$allocator@D@__Cr@std@@@internal_compressed_tuple@container_internal@absl@@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@__Cr@std@@AEBV?$allocator@D@56@@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@?$Storage@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$0A@U?$StorageTag@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@_K@internal_compressed_tuple@container_internal@absl@@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@__Cr@std@@AEBV?$allocator@UPayload@status_internal@absl@@@56@@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I$00@?$CompressedTuple@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@_K@container_internal@absl@@QEAA@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$$QEAI@Z @@ -130,6 +129,7 @@ ??$?0PEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@AEBV234@@Z@PEAU0?1???R1234@QEBA?AV567@0@Z@$0A@@?$pair@PEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@AEBV345@@Z@PEAU1?1???R2345@QEBA?AV678@0@Z@@__Cr@std@@QEAA@$$QEAPEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@12@AEBV567@@Z@1@Z ??$?0PEAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@$$QEAPEAVCommandLineFlag@absl@@$0A@@__Cr@std@@QEAA@$$QEAPEAVCommandLineFlag@absl@@@Z ??$?0PEAVCommandLineFlag@absl@@$0A@@?$tuple@$$QEAPEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@$$QEAPEAVCommandLineFlag@absl@@@Z + ??$?0PEAVCommandLineFlag@absl@@@?$__tuple_impl@U?$__integer_sequence@_K$0A@@__Cr@std@@$$QEAPEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@U__forward_args@12@$$QEAPEAVCommandLineFlag@absl@@@Z ??$?0PEAW4ctrl_t@container_internal@absl@@AEAPEAX$0A@@?$pair@PEAW4ctrl_t@container_internal@absl@@PEAX@__Cr@std@@QEAA@$$QEAPEAW4ctrl_t@container_internal@absl@@AEAPEAX@Z ??$?0PEAW4ctrl_t@container_internal@absl@@AEBQEAX$0A@@?$pair@PEAW4ctrl_t@container_internal@absl@@PEAX@__Cr@std@@QEAA@$$QEAPEAW4ctrl_t@container_internal@absl@@AEBQEAX@Z ??$?0PEAW4ctrl_t@container_internal@absl@@PEAX$0A@@?$pair@PEAW4ctrl_t@container_internal@absl@@PEAX@__Cr@std@@QEAA@$$QEAPEAW4ctrl_t@container_internal@absl@@$$QEAPEAX@Z
diff --git a/third_party/abseil-cpp/symbols_x64_dbg.def b/third_party/abseil-cpp/symbols_x64_dbg.def index 9c85291d..80e31368 100644 --- a/third_party/abseil-cpp/symbols_x64_dbg.def +++ b/third_party/abseil-cpp/symbols_x64_dbg.def
@@ -55,10 +55,6 @@ ??$?0$00X@?$unique_ptr@VZoneInfoSource@cctz@time_internal@absl@@U?$default_delete@VZoneInfoSource@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QEAA@PEAVZoneInfoSource@cctz@time_internal@absl@@@Z ??$?0$00X@?$unique_ptr@XUDynValueDeleter@flags_internal@absl@@@__Cr@std@@QEAA@$$T@Z ??$?0$00X@?$unique_ptr@XUDynValueDeleter@flags_internal@absl@@@__Cr@std@@QEAA@PEAX$$QEAUDynValueDeleter@flags_internal@absl@@@Z - ??$?0$0A@$$Z$$QEAPEAVCommandLineFlag@absl@@$$Z$S$$Z$$V$$ZPEAV01@@?$__tuple_impl@U?$__integer_sequence@_K$0A@@__Cr@std@@$$QEAPEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@U?$__integer_sequence@_K$0A@@12@U?$__tuple_types@$$QEAPEAVCommandLineFlag@absl@@@12@U?$__integer_sequence@_K$S@12@U?$__tuple_types@$$V@12@$$QEAPEAVCommandLineFlag@absl@@@Z - ??$?0$0A@$$ZAEBQEAVCommandLineFlag@absl@@$$Z$S$$Z$$V$$ZAEBQEAV01@@?$__tuple_impl@U?$__integer_sequence@_K$0A@@__Cr@std@@AEBQEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@U?$__integer_sequence@_K$0A@@12@U?$__tuple_types@AEBQEAVCommandLineFlag@absl@@@12@U?$__integer_sequence@_K$S@12@U?$__tuple_types@$$V@12@AEBQEAVCommandLineFlag@absl@@@Z - ??$?0$0A@$00$$ZAEAPEAVCommandLineFlag@absl@@AEA_N$$Z$S$$Z$$V$$ZAEAPEAV01@AEA_N@?$__tuple_impl@U?$__integer_sequence@_K$0A@$00@__Cr@std@@AEAPEAVCommandLineFlag@absl@@AEA_N@__Cr@std@@QEAA@U?$__integer_sequence@_K$0A@$00@12@U?$__tuple_types@AEAPEAVCommandLineFlag@absl@@AEA_N@12@U?$__integer_sequence@_K$S@12@U?$__tuple_types@$$V@12@AEAPEAVCommandLineFlag@absl@@AEA_N@Z - ??$?0$0A@$00$$ZPEAVCommandLineFlag@absl@@_N$$Z$S$$Z$$V$$ZAEAPEAV01@AEA_N@?$__tuple_impl@U?$__integer_sequence@_K$0A@$00@__Cr@std@@PEAVCommandLineFlag@absl@@_N@__Cr@std@@QEAA@U?$__integer_sequence@_K$0A@$00@12@U?$__tuple_types@PEAVCommandLineFlag@absl@@_N@12@U?$__integer_sequence@_K$S@12@U?$__tuple_types@$$V@12@AEAPEAVCommandLineFlag@absl@@AEA_N@Z ??$?0AEAPEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@AEAPEAPEAPEBV01234@$0A@@?$pair@PEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@PEAPEAPEBV12345@@__Cr@std@@QEAA@AEAPEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@0@Z ??$?0AEAPEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@PEAPEAPEBV01234@$0A@@?$pair@PEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@PEAPEAPEBV12345@@__Cr@std@@QEAA@AEAPEAPEAPEBVImpl@time_zone@cctz@time_internal@absl@@$$QEAPEAPEAPEBV34567@@Z ??$?0AEAPEAPEAUPrefixCrc@CrcCordState@crc_internal@absl@@AEAPEAPEAU0123@$0A@@?$pair@PEAPEAUPrefixCrc@CrcCordState@crc_internal@absl@@PEAPEAU1234@@__Cr@std@@QEAA@AEAPEAPEAUPrefixCrc@CrcCordState@crc_internal@absl@@0@Z @@ -73,6 +69,8 @@ ??$?0AEAPEAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@AEAPEAVCommandLineFlag@absl@@$0A@@__Cr@std@@QEAA@AEAPEAVCommandLineFlag@absl@@@Z ??$?0AEAPEAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@PEAVCommandLineFlag@absl@@$0A@@__Cr@std@@QEAA@AEAPEAVCommandLineFlag@absl@@@Z ??$?0AEAPEAVCommandLineFlag@absl@@AEA_N$0A@@?$tuple@PEAVCommandLineFlag@absl@@_N@__Cr@std@@QEAA@AEAPEAVCommandLineFlag@absl@@AEA_N@Z + ??$?0AEAPEAVCommandLineFlag@absl@@AEA_N@?$__tuple_impl@U?$__integer_sequence@_K$0A@$00@__Cr@std@@AEAPEAVCommandLineFlag@absl@@AEA_N@__Cr@std@@QEAA@U__forward_args@12@AEAPEAVCommandLineFlag@absl@@AEA_N@Z + ??$?0AEAPEAVCommandLineFlag@absl@@AEA_N@?$__tuple_impl@U?$__integer_sequence@_K$0A@$00@__Cr@std@@PEAVCommandLineFlag@absl@@_N@__Cr@std@@QEAA@U__forward_args@12@AEAPEAVCommandLineFlag@absl@@AEA_N@Z ??$?0AEAPEBUPrefixCrc@CrcCordState@crc_internal@absl@@PEAU0123@$0A@@?$pair@PEBUPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@@__Cr@std@@QEAA@AEAPEBUPrefixCrc@CrcCordState@crc_internal@absl@@$$QEAPEAU3456@@Z ??$?0AEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@AEBV234@@Z@@?$__temp_value@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@QEAA@AEAV?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@12@AEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@12@AEBV678@@Z@@Z ??$?0AEAV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEBU1234@AEBU1234@PEBQEBU1234@_J$0A@@__Cr@std@@V?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@AEAU1234@PEAPEAU1234@_J$0A@@12@$0A@@?$pair@V?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEBU1234@AEBU1234@PEBQEBU1234@_J$0A@@__Cr@std@@V?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@AEAU1234@PEAPEAU1234@_J$0A@@23@@__Cr@std@@QEAA@AEAV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEBU1234@AEBU1234@PEBQEBU1234@_J$0A@@12@$$QEAV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PEAU1234@AEAU1234@PEAPEAU1234@_J$0A@@12@@Z @@ -93,6 +91,7 @@ ??$?0AEA_KAEBV?$allocator@D@__Cr@std@@$00@?$CompressedTuple@_KV?$allocator@D@__Cr@std@@@container_internal@absl@@QEAA@AEA_KAEBV?$allocator@D@__Cr@std@@@Z ??$?0AEA_KAEBV?$allocator@D@__Cr@std@@@?$CompressedTupleImpl@V?$CompressedTuple@_KV?$allocator@D@__Cr@std@@@container_internal@absl@@U?$integer_sequence@_K$0A@$00@__Cr@std@@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@__Cr@std@@AEA_KAEBV?$allocator@D@56@@Z ??$?0AEBQEAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@AEBQEAVCommandLineFlag@absl@@$0A@@__Cr@std@@QEAA@AEBQEAVCommandLineFlag@absl@@@Z + ??$?0AEBQEAVCommandLineFlag@absl@@@?$__tuple_impl@U?$__integer_sequence@_K$0A@@__Cr@std@@AEBQEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@U__forward_args@12@AEBQEAVCommandLineFlag@absl@@@Z ??$?0AEBV?$allocator@D@__Cr@std@@@?$Storage@V?$allocator@D@__Cr@std@@$00U?$StorageTag@_KV?$allocator@D@__Cr@std@@@internal_compressed_tuple@container_internal@absl@@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@__Cr@std@@AEBV?$allocator@D@56@@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@?$Storage@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$0A@U?$StorageTag@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@_K@internal_compressed_tuple@container_internal@absl@@$00@internal_compressed_tuple@container_internal@absl@@QEAA@Uin_place_t@__Cr@std@@AEBV?$allocator@UPayload@status_internal@absl@@@56@@Z ??$?0AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I$00@?$CompressedTuple@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@_K@container_internal@absl@@QEAA@AEBV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$$QEAI@Z @@ -130,6 +129,7 @@ ??$?0PEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@AEBV234@@Z@PEAU0?1???R1234@QEBA?AV567@0@Z@$0A@@?$pair@PEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@AEBV345@@Z@PEAU1?1???R2345@QEBA?AV678@0@Z@@__Cr@std@@QEAA@$$QEAPEAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QEBA?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@12@AEBV567@@Z@1@Z ??$?0PEAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@$$QEAPEAVCommandLineFlag@absl@@$0A@@__Cr@std@@QEAA@$$QEAPEAVCommandLineFlag@absl@@@Z ??$?0PEAVCommandLineFlag@absl@@$0A@@?$tuple@$$QEAPEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@$$QEAPEAVCommandLineFlag@absl@@@Z + ??$?0PEAVCommandLineFlag@absl@@@?$__tuple_impl@U?$__integer_sequence@_K$0A@@__Cr@std@@$$QEAPEAVCommandLineFlag@absl@@@__Cr@std@@QEAA@U__forward_args@12@$$QEAPEAVCommandLineFlag@absl@@@Z ??$?0PEAW4ctrl_t@container_internal@absl@@AEAPEAX$0A@@?$pair@PEAW4ctrl_t@container_internal@absl@@PEAX@__Cr@std@@QEAA@$$QEAPEAW4ctrl_t@container_internal@absl@@AEAPEAX@Z ??$?0PEAW4ctrl_t@container_internal@absl@@AEBQEAX$0A@@?$pair@PEAW4ctrl_t@container_internal@absl@@PEAX@__Cr@std@@QEAA@$$QEAPEAW4ctrl_t@container_internal@absl@@AEBQEAX@Z ??$?0PEAW4ctrl_t@container_internal@absl@@PEAX$0A@@?$pair@PEAW4ctrl_t@container_internal@absl@@PEAX@__Cr@std@@QEAA@$$QEAPEAW4ctrl_t@container_internal@absl@@$$QEAPEAX@Z
diff --git a/third_party/abseil-cpp/symbols_x86_dbg.def b/third_party/abseil-cpp/symbols_x86_dbg.def index 0cd01a0..11b95e8a 100644 --- a/third_party/abseil-cpp/symbols_x86_dbg.def +++ b/third_party/abseil-cpp/symbols_x86_dbg.def
@@ -55,10 +55,6 @@ ??$?0$00X@?$unique_ptr@VZoneInfoSource@cctz@time_internal@absl@@U?$default_delete@VZoneInfoSource@cctz@time_internal@absl@@@__Cr@std@@@__Cr@std@@QAE@PAVZoneInfoSource@cctz@time_internal@absl@@@Z ??$?0$00X@?$unique_ptr@XUDynValueDeleter@flags_internal@absl@@@__Cr@std@@QAE@$$T@Z ??$?0$00X@?$unique_ptr@XUDynValueDeleter@flags_internal@absl@@@__Cr@std@@QAE@PAX$$QAUDynValueDeleter@flags_internal@absl@@@Z - ??$?0$0A@$$Z$$QAPAVCommandLineFlag@absl@@$$Z$S$$Z$$V$$ZPAV01@@?$__tuple_impl@U?$__integer_sequence@I$0A@@__Cr@std@@$$QAPAVCommandLineFlag@absl@@@__Cr@std@@QAE@U?$__integer_sequence@I$0A@@12@U?$__tuple_types@$$QAPAVCommandLineFlag@absl@@@12@U?$__integer_sequence@I$S@12@U?$__tuple_types@$$V@12@$$QAPAVCommandLineFlag@absl@@@Z - ??$?0$0A@$$ZABQAVCommandLineFlag@absl@@$$Z$S$$Z$$V$$ZABQAV01@@?$__tuple_impl@U?$__integer_sequence@I$0A@@__Cr@std@@ABQAVCommandLineFlag@absl@@@__Cr@std@@QAE@U?$__integer_sequence@I$0A@@12@U?$__tuple_types@ABQAVCommandLineFlag@absl@@@12@U?$__integer_sequence@I$S@12@U?$__tuple_types@$$V@12@ABQAVCommandLineFlag@absl@@@Z - ??$?0$0A@$00$$ZAAPAVCommandLineFlag@absl@@AA_N$$Z$S$$Z$$V$$ZAAPAV01@AA_N@?$__tuple_impl@U?$__integer_sequence@I$0A@$00@__Cr@std@@AAPAVCommandLineFlag@absl@@AA_N@__Cr@std@@QAE@U?$__integer_sequence@I$0A@$00@12@U?$__tuple_types@AAPAVCommandLineFlag@absl@@AA_N@12@U?$__integer_sequence@I$S@12@U?$__tuple_types@$$V@12@AAPAVCommandLineFlag@absl@@AA_N@Z - ??$?0$0A@$00$$ZPAVCommandLineFlag@absl@@_N$$Z$S$$Z$$V$$ZAAPAV01@AA_N@?$__tuple_impl@U?$__integer_sequence@I$0A@$00@__Cr@std@@PAVCommandLineFlag@absl@@_N@__Cr@std@@QAE@U?$__integer_sequence@I$0A@$00@12@U?$__tuple_types@PAVCommandLineFlag@absl@@_N@12@U?$__integer_sequence@I$S@12@U?$__tuple_types@$$V@12@AAPAVCommandLineFlag@absl@@AA_N@Z ??$?0AAI@?$Storage@I$0A@U?$StorageTag@IV?$allocator@D@__Cr@std@@@internal_compressed_tuple@container_internal@absl@@$0A@@internal_compressed_tuple@container_internal@absl@@QAE@Uin_place_t@__Cr@std@@AAI@Z ??$?0AAIABV?$allocator@D@__Cr@std@@$00@?$CompressedTuple@IV?$allocator@D@__Cr@std@@@container_internal@absl@@QAE@AAIABV?$allocator@D@__Cr@std@@@Z ??$?0AAIABV?$allocator@D@__Cr@std@@@?$CompressedTupleImpl@V?$CompressedTuple@IV?$allocator@D@__Cr@std@@@container_internal@absl@@U?$integer_sequence@I$0A@$00@__Cr@std@@$00@internal_compressed_tuple@container_internal@absl@@QAE@Uin_place_t@__Cr@std@@AAIABV?$allocator@D@56@@Z @@ -76,6 +72,8 @@ ??$?0AAPAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@AAPAVCommandLineFlag@absl@@$0A@@__Cr@std@@QAE@AAPAVCommandLineFlag@absl@@@Z ??$?0AAPAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@PAVCommandLineFlag@absl@@$0A@@__Cr@std@@QAE@AAPAVCommandLineFlag@absl@@@Z ??$?0AAPAVCommandLineFlag@absl@@AA_N$0A@@?$tuple@PAVCommandLineFlag@absl@@_N@__Cr@std@@QAE@AAPAVCommandLineFlag@absl@@AA_N@Z + ??$?0AAPAVCommandLineFlag@absl@@AA_N@?$__tuple_impl@U?$__integer_sequence@I$0A@$00@__Cr@std@@AAPAVCommandLineFlag@absl@@AA_N@__Cr@std@@QAE@U__forward_args@12@AAPAVCommandLineFlag@absl@@AA_N@Z + ??$?0AAPAVCommandLineFlag@absl@@AA_N@?$__tuple_impl@U?$__integer_sequence@I$0A@$00@__Cr@std@@PAVCommandLineFlag@absl@@_N@__Cr@std@@QAE@U__forward_args@12@AAPAVCommandLineFlag@absl@@AA_N@Z ??$?0AAPBUPrefixCrc@CrcCordState@crc_internal@absl@@PAU0123@$0A@@?$pair@PBUPrefixCrc@CrcCordState@crc_internal@absl@@PAU1234@@__Cr@std@@QAE@AAPBUPrefixCrc@CrcCordState@crc_internal@absl@@$$QAPAU3456@@Z ??$?0AAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QBE?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@ABV234@@Z@@?$__temp_value@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@QAE@AAV?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@12@AAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QBE?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@12@ABV678@@Z@@Z ??$?0AAV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PBU1234@ABU1234@PBQBU1234@H$0A@@__Cr@std@@V?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PAU1234@AAU1234@PAPAU1234@H$0A@@12@$0A@@?$pair@V?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PBU1234@ABU1234@PBQBU1234@H$0A@@__Cr@std@@V?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PAU1234@AAU1234@PAPAU1234@H$0A@@23@@__Cr@std@@QAE@AAV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PBU1234@ABU1234@PBQBU1234@H$0A@@12@$$QAV?$__deque_iterator@UPrefixCrc@CrcCordState@crc_internal@absl@@PAU1234@AAU1234@PAPAU1234@H$0A@@12@@Z @@ -93,6 +91,7 @@ ??$?0AAY0BM@$$CBD$0A@@?$NoDestructor@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@absl@@QAE@AAY0BM@$$CBD@Z ??$?0AAY0BM@$$CBD@PlacementImpl@?$NoDestructor@V?$basic_string@DU?$char_traits@D@__Cr@std@@V?$allocator@D@23@@__Cr@std@@@absl@@QAE@AAY0BM@$$CBD@Z ??$?0ABQAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@ABQAVCommandLineFlag@absl@@$0A@@__Cr@std@@QAE@ABQAVCommandLineFlag@absl@@@Z + ??$?0ABQAVCommandLineFlag@absl@@@?$__tuple_impl@U?$__integer_sequence@I$0A@@__Cr@std@@ABQAVCommandLineFlag@absl@@@__Cr@std@@QAE@U__forward_args@12@ABQAVCommandLineFlag@absl@@@Z ??$?0ABV?$allocator@D@__Cr@std@@@?$Storage@V?$allocator@D@__Cr@std@@$00U?$StorageTag@IV?$allocator@D@__Cr@std@@@internal_compressed_tuple@container_internal@absl@@$00@internal_compressed_tuple@container_internal@absl@@QAE@Uin_place_t@__Cr@std@@ABV?$allocator@D@56@@Z ??$?0ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@@?$Storage@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$0A@U?$StorageTag@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I@internal_compressed_tuple@container_internal@absl@@$00@internal_compressed_tuple@container_internal@absl@@QAE@Uin_place_t@__Cr@std@@ABV?$allocator@UPayload@status_internal@absl@@@56@@Z ??$?0ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I$00@?$CompressedTuple@V?$allocator@UPayload@status_internal@absl@@@__Cr@std@@I@container_internal@absl@@QAE@ABV?$allocator@UPayload@status_internal@absl@@@__Cr@std@@$$QAI@Z @@ -130,6 +129,7 @@ ??$?0PAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QBE?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@ABV234@@Z@PAU0?1???R1234@QBE?AV567@0@Z@$0A@@?$pair@PAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QBE?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@ABV345@@Z@PAU1?1???R2345@QBE?AV678@0@Z@@__Cr@std@@QAE@$$QAPAUraw_view@?1???R?$ConvertToContainer@V?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@__Cr@std@@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@23@$0A@@?$Splitter@VByChar@absl@@UAllowEmpty@2@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@strings_internal@absl@@QBE?AV?$vector@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@V?$allocator@V?$basic_string_view@DU?$char_traits@D@__Cr@std@@@__Cr@std@@@23@@12@ABV567@@Z@1@Z ??$?0PAVCommandLineFlag@absl@@$0A@@?$__tuple_leaf@$0A@$$QAPAVCommandLineFlag@absl@@$0A@@__Cr@std@@QAE@$$QAPAVCommandLineFlag@absl@@@Z ??$?0PAVCommandLineFlag@absl@@$0A@@?$tuple@$$QAPAVCommandLineFlag@absl@@@__Cr@std@@QAE@$$QAPAVCommandLineFlag@absl@@@Z + ??$?0PAVCommandLineFlag@absl@@@?$__tuple_impl@U?$__integer_sequence@I$0A@@__Cr@std@@$$QAPAVCommandLineFlag@absl@@@__Cr@std@@QAE@U__forward_args@12@$$QAPAVCommandLineFlag@absl@@@Z ??$?0PAW4ctrl_t@container_internal@absl@@AAPAX$0A@@?$pair@PAW4ctrl_t@container_internal@absl@@PAX@__Cr@std@@QAE@$$QAPAW4ctrl_t@container_internal@absl@@AAPAX@Z ??$?0PAW4ctrl_t@container_internal@absl@@ABQAX$0A@@?$pair@PAW4ctrl_t@container_internal@absl@@PAX@__Cr@std@@QAE@$$QAPAW4ctrl_t@container_internal@absl@@ABQAX@Z ??$?0PAW4ctrl_t@container_internal@absl@@PAX$0A@@?$pair@PAW4ctrl_t@container_internal@absl@@PAX@__Cr@std@@QAE@$$QAPAW4ctrl_t@container_internal@absl@@$$QAPAX@Z
diff --git a/third_party/androidx/build.gradle b/third_party/androidx/build.gradle index 793f02e..e4220b5 100644 --- a/third_party/androidx/build.gradle +++ b/third_party/androidx/build.gradle
@@ -314,7 +314,7 @@ google() maven { // This URL is generated by the fetch_all_androidx.py script. - url 'https://androidx.dev/snapshots/builds/13869921/artifacts/repository' + url 'https://androidx.dev/snapshots/builds/13872876/artifacts/repository' } mavenCentral() }
diff --git a/third_party/angle b/third_party/angle index 2ef85c24..b6b2f38 160000 --- a/third_party/angle +++ b/third_party/angle
@@ -1 +1 @@ -Subproject commit 2ef85c2418f433ee6d59052bc4fa7c4ac8a8cc8e +Subproject commit b6b2f380814eadf33f215adc2e99f208c800ae47
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc index 79a785d..3fa62ef6 100644 --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc
@@ -2681,6 +2681,20 @@ "VSyncEncoding", base::FEATURE_DISABLED_BY_DEFAULT); +BASE_FEATURE(kWebBluetoothCancelConnect, + "WebBluetoothCancelConnect", +// TODO(382556910): Enable on Windows when DCHECK issue is resolved. +// TODO(40502943): Enable on Android when connect callback can be called when +// cancelled. +// GATT connect on Windows/Android will timeout after a few seconds if the +// device is unreachable, so it does not have hang issue like MacOS which +// definitely needs cancel to get from the hang state. +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + base::FEATURE_DISABLED_BY_DEFAULT); +#else + base::FEATURE_ENABLED_BY_DEFAULT); +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) + BASE_FEATURE(kWebRtcUseCaptureBeginTimestamp, "WebRtcUseCaptureBeginTimestamp", base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc index e66a1b1..545a854 100644 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -242,12 +242,6 @@ data.api_based_fingerprinting_interventions_enabled(); out->content_based_fingerprinting_protection_enabled = data.content_based_fingerprinting_protection_enabled(); - -#if BUILDFLAG(IS_ANDROID) - out->increment_local_surface_id_for_mainframe_same_doc_navigation = - data.increment_local_surface_id_for_mainframe_same_doc_navigation(); -#endif // BUILDFLAG(IS_ANDROID) - return true; }
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h index 570b58fc..7d856a0a 100644 --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h
@@ -1786,6 +1786,12 @@ // Feature flag for driving encoding with the Metronome by VSyncs. BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kVSyncEncoding); +// Feature flag for controlling whether Web Bluetooth gatt.disconnect() can be +// used to cancel an ongoing gatt.connect() and have it rejected with an ABORT +// error. This makes the behavior match +// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-disconnect. +BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kWebBluetoothCancelConnect); + // Feature flag for making use of VideoFrameMetadata::capture_begin_time // if set, instead of relating incoming media timestamps to local time in the // WebRTC track source.
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h index 39eefd4..3283422f 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -456,12 +456,6 @@ // Whether fingerprinting protection based on page content is enabled. bool content_based_fingerprinting_protection_enabled = false; -#if BUILDFLAG(IS_ANDROID) - // Whether every traversable mainframe same-doc navigation will increment the - // `viz::LocalSurfaceId` from the impl thread. - bool increment_local_surface_id_for_mainframe_same_doc_navigation = true; -#endif // BUILDFLAG(IS_ANDROID) - // We try to keep the default values the same as the default values in // chrome, except for the cases where it would require lots of extra work for // the embedder to use the same default value.
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h index 36e04a5..49b3744 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -649,12 +649,6 @@ const blink::web_pref::WebPreferences& r) { return r.long_press_link_select_text; } - - static bool increment_local_surface_id_for_mainframe_same_doc_navigation( - const blink::web_pref::WebPreferences& r) { - return r.increment_local_surface_id_for_mainframe_same_doc_navigation; - } - #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FUCHSIA)
diff --git a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom index 7bf48fb8..39ce066 100644 --- a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom +++ b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
@@ -4508,7 +4508,7 @@ kGeolocationSucceededWithoutInjectionMitigation = 5202, kSharedWorkerScriptUnderServiceWorkerControlIsBlob = 5203, kOBSOLETE_DisableThirdPartyStoragePartitioning3 = 5204, - kControlledFrameElement = 5205, + kOBSOLETE_ControlledFrameElement = 5205, kCanvas2DIsPointInPath = 5206, kCanvas2DIsPointInStroke = 5207, kCanvas2DGetImageData = 5208, @@ -4932,6 +4932,7 @@ kWebAppManifestShortNameLocalized = 5621, kWebAppManifestDescriptionLocalized = 5622, kWebAppManifestIconsLocalized = 5623, + kHTMLControlledFrameElement = 5624, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots. Also don't add extra
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom index dd6185b0..60432ee 100644 --- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom +++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -509,7 +509,4 @@ bool api_based_fingerprinting_interventions_enabled = false; bool content_based_fingerprinting_protection_enabled = false; - - [EnableIf=is_android] - bool increment_local_surface_id_for_mainframe_same_doc_navigation = true; };
diff --git a/third_party/blink/renderer/core/css/resolver/style_adjuster.cc b/third_party/blink/renderer/core/css/resolver/style_adjuster.cc index 7d5e253..0ebbd59 100644 --- a/third_party/blink/renderer/core/css/resolver/style_adjuster.cc +++ b/third_party/blink/renderer/core/css/resolver/style_adjuster.cc
@@ -701,12 +701,13 @@ } } -// g-issues.chromium.org/issues/349835587 -// https://github.com/WICG/canvas-place-element -static bool IsCanvasDrawElement(const Element* element) { +// https://github.com/WICG/html-in-canvas +// The `layoutsubtree` attribute ... causes the direct children of the <canvas> +// to have a stacking context and become a containing block for all descendants. +static bool ForceStackingAndContainingBlockForCanvasLayoutSubtree( + const Element* element) { if (RuntimeEnabledFeatures::CanvasDrawElementEnabled() && element && - element->IsInCanvasSubtree()) { - // Placed elements are always immediate children of the canvas. + element->IsCanvasOrInCanvasSubtree()) { if (const auto* canvas = DynamicTo<HTMLCanvasElement>(element->parentElement())) { return canvas->layoutSubtree(); @@ -733,10 +734,11 @@ const ComputedStyle& layout_parent_style, const Element* element, Document* document) { - bool is_canvas_draw_element = IsCanvasDrawElement(element); + bool force_canvas_child_layout_subtree_styles = + ForceStackingAndContainingBlockForCanvasLayoutSubtree(element); if ((layout_parent_style.BlockifiesChildren() && !HostIsInputFile(element)) || - is_canvas_draw_element) { + force_canvas_child_layout_subtree_styles) { builder.SetIsInBlockifyingDisplay(); if (builder.Display() != EDisplay::kContents) { builder.SetDisplay(EquivalentBlockDisplay(builder.Display())); @@ -746,11 +748,12 @@ } if (layout_parent_style.IsDisplayFlexibleOrGridBox() || layout_parent_style.IsDisplayMasonryBox() || - layout_parent_style.IsDisplayMathType() || is_canvas_draw_element) { + layout_parent_style.IsDisplayMathType() || + force_canvas_child_layout_subtree_styles) { builder.SetIsInsideDisplayIgnoringFloatingChildren(); } - if (is_canvas_draw_element) { + if (force_canvas_child_layout_subtree_styles) { builder.SetPosition(EPosition::kStatic); builder.SetContain(builder.Contain() | kContainsPaint); }
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc index 3e85f3c..7303995 100644 --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc
@@ -744,7 +744,7 @@ // If a canvas represents embedded content, its descendants are not rendered. // But they are still allowed to be focusable as long as their style allows // focus, their canvas is rendered, and its style allows focus. - if (IsInCanvasSubtree()) { + if (IsCanvasOrInCanvasSubtree()) { const ComputedStyle* style = GetComputedStyle(); if (!style || !style->IsFocusable()) { return false; @@ -3821,8 +3821,8 @@ edit_context->SetExecutionContext(context); } - if (parentElement() && parentElement()->IsInCanvasSubtree()) { - SetIsInCanvasSubtree(true); + if (parentElement() && parentElement()->IsCanvasOrInCanvasSubtree()) { + SetIsCanvasOrInCanvasSubtree(true); } if (GetDocument().StatePreservingAtomicMoveInProgress() && @@ -3959,7 +3959,7 @@ document.RemoveFromTopLayerImmediately(this); } - ClearElementFlag(ElementFlags::kIsInCanvasSubtree); + ClearElementFlag(ElementFlags::kIsCanvasOrInCanvasSubtree); if (ElementRareDataVector* data = GetElementRareData()) { data->ClearFocusgroupFlags();
diff --git a/third_party/blink/renderer/core/dom/element.h b/third_party/blink/renderer/core/dom/element.h index f698e10..f4951ea6 100644 --- a/third_party/blink/renderer/core/dom/element.h +++ b/third_party/blink/renderer/core/dom/element.h
@@ -173,7 +173,7 @@ enum class ElementFlags { kTabIndexWasSetExplicitly = 1 << 0, kStyleAffectedByEmpty = 1 << 1, - kIsInCanvasSubtree = 1 << 2, + kIsCanvasOrInCanvasSubtree = 1 << 2, kContainsFullScreenElement = 1 << 3, kIsInTopLayer = 1 << 4, kContainsPersistentVideo = 1 << 5, @@ -990,11 +990,11 @@ SetElementFlag(ElementFlags::kStyleAffectedByEmpty); } - void SetIsInCanvasSubtree(bool value) { - SetElementFlag(ElementFlags::kIsInCanvasSubtree, value); + void SetIsCanvasOrInCanvasSubtree(bool value) { + SetElementFlag(ElementFlags::kIsCanvasOrInCanvasSubtree, value); } - bool IsInCanvasSubtree() const { - return HasElementFlag(ElementFlags::kIsInCanvasSubtree); + bool IsCanvasOrInCanvasSubtree() const { + return HasElementFlag(ElementFlags::kIsCanvasOrInCanvasSubtree); } bool IsDefined() const {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc index 114cbd9..22f1a4a 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -455,17 +455,14 @@ if (!should_skip_screenshot && commit_type != kWebHistoryInertCommit && !web_frame_->GetFrame()->GetSettings()->GetPrefersReducedMotion()) { navigation_with_screenshot = true; -#if BUILDFLAG(IS_ANDROID) - if (web_frame_->View() - ->GetWebPreferences() - .increment_local_surface_id_for_mainframe_same_doc_navigation) { + if (RuntimeEnabledFeatures:: + IncrementLocalSurfaceIdForMainframeSameDocNavigationEnabled()) { frame_widget->RequestNewLocalSurfaceId(); if (RuntimeEnabledFeatures::BackForwardTransitionsEnabled()) { screenshot_destination = base::UnguessableToken::Create(); frame_widget->RequestViewportScreenshot(screenshot_destination); } } -#endif // BUILDFLAG(IS_ANDROID) frame_widget->NotifyPresentationTime(WTF::BindOnce( [](base::TimeTicks start,
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc index 38edf17..395ce4f 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
@@ -477,7 +477,7 @@ Node::InsertionNotificationRequest HTMLCanvasElement::InsertedInto( ContainerNode& node) { - SetIsInCanvasSubtree(true); + SetIsCanvasOrInCanvasSubtree(true); ColorSchemeMayHaveChanged(); return HTMLElement::InsertedInto(node); }
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element_test.cc b/third_party/blink/renderer/core/html/canvas/html_canvas_element_test.cc index 0ff67602..10c4fe8 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element_test.cc +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element_test.cc
@@ -258,6 +258,32 @@ GetDocument().IsUseCounted(WebFeature::kCanvasFallbackElementContent)); } +TEST_P(HTMLCanvasElementTest, IsCanvasOrInCanvasSubtree) { + SetBodyInnerHTML(R"HTML( + <div id=div></div> + <canvas id=canvas> + <div id=nested_div></div> + <canvas id=nested_canvas></canvas> + </canvas> + )HTML"); + auto* div = GetDocument().getElementById(AtomicString("div")); + EXPECT_FALSE(div->IsCanvasOrInCanvasSubtree()); + auto* canvas = GetDocument().getElementById(AtomicString("canvas")); + EXPECT_TRUE(canvas->IsCanvasOrInCanvasSubtree()); + auto* nested_div = GetDocument().getElementById(AtomicString("nested_div")); + EXPECT_TRUE(nested_div->IsCanvasOrInCanvasSubtree()); + auto* nested_canvas = + GetDocument().getElementById(AtomicString("nested_canvas")); + EXPECT_TRUE(nested_canvas->IsCanvasOrInCanvasSubtree()); + + // Check `IsCanvasOrInCanvasSubtree` after a dynamic change where the nested + // elements are moved out of the canvas subtree. + div->appendChild(nested_div); + EXPECT_FALSE(nested_div->IsCanvasOrInCanvasSubtree()); + div->appendChild(nested_canvas); + EXPECT_TRUE(nested_canvas->IsCanvasOrInCanvasSubtree()); +} + class HTMLCanvasElementWithTracingTest : public RenderingTest { public: HTMLCanvasElementWithTracingTest()
diff --git a/third_party/blink/renderer/core/paint/box_painter_base.cc b/third_party/blink/renderer/core/paint/box_painter_base.cc index 4bcc0483..21b8ccd4 100644 --- a/third_party/blink/renderer/core/paint/box_painter_base.cc +++ b/third_party/blink/renderer/core/paint/box_painter_base.cc
@@ -569,7 +569,7 @@ RuntimeEnabledFeatures::CompositeBGColorAnimationEnabled() && style.HasCurrentBackgroundColorAnimation() && layer.GetType() == EFillLayerType::kBackground && - !(PaintFlag::kPlacedElement & paint_flags); + !(paint_flags & PaintFlag::kPaintingCanvasDrawElement); // When background color animation is running on the compositor thread, we // need to trigger repaint even if the background is transparent to collect // artifacts in order to run the animation on the compositor.
diff --git a/third_party/blink/renderer/core/paint/paint_flags.h b/third_party/blink/renderer/core/paint/paint_flags.h index b97e21c7..f32498c2 100644 --- a/third_party/blink/renderer/core/paint/paint_flags.h +++ b/third_party/blink/renderer/core/paint/paint_flags.h
@@ -35,8 +35,8 @@ // Used to paint SVG resource subtree for masks. kPaintingSVGMask = 1 << 5, - // Used to paint CanvasRenderingContext2D.placeElement() - kPlacedElement = 1 << 6, + // Used for painting [2D or WebGL canvas context].drawElement(). + kPaintingCanvasDrawElement = 1 << 6, // Used to suppress painting of PII and other sensitive content, allowing // the result to be used in WebGL, WebGPU and non-tainting 2D Canvas.
diff --git a/third_party/blink/renderer/core/paint/paint_layer_painter.cc b/third_party/blink/renderer/core/paint/paint_layer_painter.cc index 837ad9d..6f82e6a0 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_painter.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_painter.cc
@@ -262,12 +262,17 @@ !paint_layer_.HasSelfPaintingLayerDescendant()) return kFullyPainted; - if (((paint_flags & PaintFlag::kPlacedElement) == 0) && - !IsA<HTMLCanvasElement>(object.GetNode()) && + if (((paint_flags & PaintFlag::kPaintingCanvasDrawElement) == 0) && IsA<Element>(object.GetNode()) && - To<Element>(object.GetNode())->IsInCanvasSubtree()) { - // This prevents canvas fallback content from being rendered. - return kFullyPainted; + To<Element>(object.GetNode())->IsCanvasOrInCanvasSubtree()) { + bool is_outermost_canvas = + IsA<HTMLCanvasElement>(object.GetNode()) && + (!object.GetNode()->parentElement() || + !object.GetNode()->parentElement()->IsCanvasOrInCanvasSubtree()); + if (!is_outermost_canvas) { + // This prevents canvas fallback content from being rendered. + return kFullyPainted; + } } std::optional<CheckAncestorPositionVisibilityScope>
diff --git a/third_party/blink/renderer/core/paint/video_painter.cc b/third_party/blink/renderer/core/paint/video_painter.cc index 643fc65..2ec1384 100644 --- a/third_party/blink/renderer/core/paint/video_painter.cc +++ b/third_party/blink/renderer/core/paint/video_painter.cc
@@ -31,7 +31,7 @@ layout_video_.GetDocument().GetPaintPreviewState() == Document::kPaintingPreviewSkipAcceleratedContent || (RuntimeEnabledFeatures::CanvasDrawElementEnabled() && - (paint_info.GetPaintFlags() & PaintFlag::kPlacedElement)); + (paint_info.GetPaintFlags() & PaintFlag::kPaintingCanvasDrawElement)); bool should_display_poster = layout_video_.GetDisplayMode() == LayoutVideo::kPoster || force_video_poster;
diff --git a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc index 0bb41f7..b2d2183 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc
@@ -1270,7 +1270,7 @@ // Fallback elements inside of a <canvas> are invisible, but are not ignored if (IsHiddenViaStyle() || !node || !node->parentElement() || - !node->parentElement()->IsInCanvasSubtree()) { + !node->parentElement()->IsCanvasOrInCanvasSubtree()) { return true; } } @@ -5526,7 +5526,7 @@ // If it's in a canvas but doesn't have an explicit rect, or has display: // contents set, get the bounding rect of its children. if ((GetNode()->parentElement() && - GetNode()->parentElement()->IsInCanvasSubtree()) || + GetNode()->parentElement()->IsCanvasOrInCanvasSubtree()) || (element && element->HasDisplayContentsStyle())) { Vector<gfx::RectF> rects; for (Node& child : NodeTraversal::ChildrenOf(*GetNode())) {
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc index 5aedb5a..7d4e994c 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc
@@ -443,8 +443,9 @@ } // If unrendered and in <canvas>, consider even whitespace relevant. - if (text_node.parentElement()->IsInCanvasSubtree()) + if (text_node.parentElement()->IsCanvasOrInCanvasSubtree()) { return true; + } // Must be unrendered because of CSS. Consider relevant if non-whitespace. // Allowing rendered non-whitespace to be considered relevant will allow
diff --git a/third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_server.cc b/third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_server.cc index f103d0f0..7525474 100644 --- a/third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_server.cc +++ b/third_party/blink/renderer/modules/bluetooth/bluetooth_remote_gatt_server.cc
@@ -8,6 +8,7 @@ #include "mojo/public/cpp/bindings/associated_receiver_set.h" #include "mojo/public/cpp/bindings/pending_associated_remote.h" +#include "third_party/blink/public/common/features.h" #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom-blink.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" @@ -23,6 +24,9 @@ namespace blink { +const char kConnectCancelledMessage[] = + "The GATT connect attempt was cancelled."; + BluetoothRemoteGATTServer::BluetoothRemoteGATTServer(ExecutionContext* context, BluetoothDevice* device) : // See https://bit.ly/2S0zRAS for task types. @@ -51,11 +55,17 @@ } void BluetoothRemoteGATTServer::CleanupDisconnectedDeviceAndFireEvent() { - DCHECK(connected_); + if (!base::FeatureList::IsEnabled( + blink::features::kWebBluetoothCancelConnect)) { + DCHECK(connected_); + } + bool was_connected = connected_; connected_ = false; active_algorithms_.clear(); - device_->ClearAttributeInstanceMapAndFireEvent(); - feature_handle_for_scheduler_.reset(); + if (was_connected) { + device_->ClearAttributeInstanceMapAndFireEvent(); + feature_handle_for_scheduler_.reset(); + } } void BluetoothRemoteGATTServer::DispatchDisconnected() { @@ -79,6 +89,15 @@ resolver->GetExecutionContext()->IsContextDestroyed()) return; + if (base::FeatureList::IsEnabled( + blink::features::kWebBluetoothCancelConnect)) { + if (!RemoveFromActiveAlgorithms(resolver)) { + resolver->Reject(MakeGarbageCollected<DOMException>( + DOMExceptionCode::kAbortError, kConnectCancelledMessage)); + return; + } + } + if (result == mojom::blink::WebBluetoothResult::SUCCESS) { connected_ = true; feature_handle_for_scheduler_ = @@ -107,6 +126,10 @@ return EmptyPromise(); } + if (base::FeatureList::IsEnabled( + blink::features::kWebBluetoothCancelConnect)) { + AddToActiveAlgorithms(resolver); + } mojom::blink::WebBluetoothService* service = device_->GetBluetooth()->Service(); mojo::PendingAssociatedRemote<mojom::blink::WebBluetoothServerClient> client; @@ -123,8 +146,11 @@ void BluetoothRemoteGATTServer::disconnect(ScriptState* script_state, ExceptionState& exception_state) { - if (!connected_) + if (!connected_ && (!base::FeatureList::IsEnabled( + blink::features::kWebBluetoothCancelConnect) || + active_algorithms_.empty())) { return; + } if (!device_->GetBluetooth()->IsServiceBound()) { exception_state.ThrowDOMException(
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc index 532a2a9..d9f8dde 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc
@@ -796,7 +796,7 @@ /*disable_expansion*/ true); PaintLayerPainter paint_layer_painter = PaintLayerPainter(*layer); - PaintFlags paint_flags = PaintFlag::kPlacedElement; + PaintFlags paint_flags = PaintFlag::kPaintingCanvasDrawElement; if (options && options->allowReadback()) { paint_flags |= PaintFlag::kPrivacyPreserving; }
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc index 24efe55..2bf7bef1 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -6855,7 +6855,8 @@ PaintRecordBuilder builder; PaintLayerPainter paint_layer_painter = PaintLayerPainter(*layer); - paint_layer_painter.Paint(builder.Context(), PaintFlag::kPlacedElement); + paint_layer_painter.Paint(builder.Context(), + PaintFlag::kPaintingCanvasDrawElement); PropertyTreeState tree_state = layer->GetLayoutObject() .FirstFragment()
diff --git a/third_party/blink/renderer/platform/blink_platform_unittests_bundle_data.filelist b/third_party/blink/renderer/platform/blink_platform_unittests_bundle_data.filelist index 182d2672..c01af74 100644 --- a/third_party/blink/renderer/platform/blink_platform_unittests_bundle_data.filelist +++ b/third_party/blink/renderer/platform/blink_platform_unittests_bundle_data.filelist
@@ -131,6 +131,7 @@ ../../web_tests/external/wpt/fonts/noto/NotoSansNko-regular-webfont.woff2 ../../web_tests/external/wpt/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-chws.otf ../../web_tests/external/wpt/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-3002.otf +../../web_tests/external/wpt/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-300C.otf ../../web_tests/external/wpt/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-FF1A.otf ../../web_tests/external/wpt/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-min.otf ../../web_tests/external/wpt/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt.otf
diff --git a/third_party/blink/renderer/platform/fonts/android/font_cache_android.cc b/third_party/blink/renderer/platform/fonts/android/font_cache_android.cc index 3969f25..0d56411 100644 --- a/third_party/blink/renderer/platform/fonts/android/font_cache_android.cc +++ b/third_party/blink/renderer/platform/fonts/android/font_cache_android.cc
@@ -149,16 +149,15 @@ fallback_priority_with_emoji_text = FontFallbackPriority::kEmojiText; } - AtomicString family_name = GetFamilyNameForCharacter( - fm.get(), c, font_description, generic_family_name, - fallback_priority_with_emoji_text); + const FontPlatformData* font_platform_data = + CreateFontPlatformDataForCharacter(fm.get(), c, font_description, + generic_family_name, + fallback_priority_with_emoji_text); - auto skia_fallback_is_color = [&]() { - const FontPlatformData* skia_fallback_result = GetFontPlatformData( - font_description, FontFaceCreationParams(family_name)); - if (skia_fallback_result && skia_fallback_result->Typeface()) { + auto is_color = [](const FontPlatformData* fpd) { + if (fpd && fpd->Typeface()) { return ColorTableLookup::TypefaceHasAnySupportedColorTable( - skia_fallback_result->Typeface()); + fpd->Typeface()); } return false; }; @@ -176,10 +175,10 @@ // or "Zsye", see https://unicode.org/reports/tr51/#Emoji_Script. if (RuntimeEnabledFeatures::SystemFallbackEmojiVSSupportEnabled() && IsTextPresentationEmoji(fallback_priority_with_emoji_text) && - skia_fallback_is_color()) { - family_name = GetFamilyNameForCharacter(fm.get(), c, font_description, - generic_family_name, - FontFallbackPriority::kText); + is_color(font_platform_data)) { + font_platform_data = CreateFontPlatformDataForCharacter( + fm.get(), c, font_description, generic_family_name, + FontFallbackPriority::kText); } // Return the GMS Core emoji font if FontFallbackPriority is kEmojiEmoji or @@ -195,23 +194,19 @@ if (IsEmojiPresentationEmoji(fallback_priority) && base::FeatureList::IsEnabled(features::kGMSCoreEmoji)) { - auto skia_fallback_is_noto_color_emoji = [&]() { - const FontPlatformData* skia_fallback_result = GetFontPlatformData( - font_description, FontFaceCreationParams(family_name)); - + auto is_noto_color_emoji = [](const FontPlatformData* fpd) { // Determining the PostScript name is required as Skia on Android gives // synthetic family names such as "91##fallback" to fallback fonts // determined (Compare Skia's SkFontMgr_Android::addFamily). In order to // identify if really the Emoji font was returned, compare by PostScript // name rather than by family. - SkString fallback_postscript_name; - if (skia_fallback_result && skia_fallback_result->Typeface()) { - skia_fallback_result->Typeface()->getPostScriptName( - &fallback_postscript_name); + SkString postscript_name; + if (fpd && fpd->Typeface()) { + fpd->Typeface()->getPostScriptName(&postscript_name); } - return fallback_postscript_name.equals(kNotoColorEmoji); + return postscript_name.equals(kNotoColorEmoji); }; - if (family_name.empty() || skia_fallback_is_noto_color_emoji()) { + if (!font_platform_data || is_noto_color_emoji(font_platform_data)) { const FontPlatformData* emoji_gms_core_font = GetFontPlatformData( font_description, FontFaceCreationParams(AtomicString(kNotoColorEmojiCompat))); @@ -228,11 +223,11 @@ // Remaining case, if fallback priority is not emoij or the GMS core emoji // font was not found or an OEM emoji font was not to be overridden. - if (family_name.empty()) + if (!font_platform_data) { return GetLastResortFallbackFont(font_description); + } - return FontDataFromFontPlatformData(GetFontPlatformData( - font_description, FontFaceCreationParams(family_name))); + return FontDataFromFontPlatformData(font_platform_data); } // static
diff --git a/third_party/blink/renderer/platform/fonts/font_cache.h b/third_party/blink/renderer/platform/fonts/font_cache.h index 6f676ac2..fe1b474 100644 --- a/third_party/blink/renderer/platform/fonts/font_cache.h +++ b/third_party/blink/renderer/platform/fonts/font_cache.h
@@ -326,6 +326,12 @@ const FontDescription&, const char* family_name, FontFallbackPriority); + static const FontPlatformData* CreateFontPlatformDataForCharacter( + SkFontMgr*, + UChar32, + const FontDescription&, + const char* family_name, + FontFallbackPriority); #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS)
diff --git a/third_party/blink/renderer/platform/fonts/linux/font_cache_linux.cc b/third_party/blink/renderer/platform/fonts/linux/font_cache_linux.cc index 628e357..703352d 100644 --- a/third_party/blink/renderer/platform/fonts/linux/font_cache_linux.cc +++ b/third_party/blink/renderer/platform/fonts/linux/font_cache_linux.cc
@@ -75,12 +75,14 @@ // FontCache::GetFontForCharacter which would use sandbox support to query the // underlying system for the font family. if (font_manager_) { - AtomicString family_name = GetFamilyNameForCharacter( - font_manager_.get(), c, font_description, nullptr, fallback_priority); - if (family_name.empty()) + const FontPlatformData* font_platform_data = + CreateFontPlatformDataForCharacter(font_manager_.get(), c, + font_description, nullptr, + fallback_priority); + if (!font_platform_data) { return GetLastResortFallbackFont(font_description); - return FontDataFromFontPlatformData(GetFontPlatformData( - font_description, FontFaceCreationParams(family_name))); + } + return FontDataFromFontPlatformData(font_platform_data); } if (IsEmojiPresentationEmoji(fallback_priority)) {
diff --git a/third_party/blink/renderer/platform/fonts/shaping/han_kerning.cc b/third_party/blink/renderer/platform/fonts/shaping/han_kerning.cc index 73d7ee5..de3eb58b 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/han_kerning.cc +++ b/third_party/blink/renderer/platform/fonts/shaping/han_kerning.cc
@@ -10,6 +10,7 @@ #include "third_party/blink/renderer/platform/fonts/shaping/font_features.h" #include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.h" #include "third_party/blink/renderer/platform/fonts/shaping/shape_result.h" +#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_cursor.h" #include "third_party/blink/renderer/platform/fonts/shaping/shape_result_run.h" #include "third_party/blink/renderer/platform/fonts/simple_font_data.h" #include "third_party/blink/renderer/platform/runtime_enabled_features.h" @@ -189,10 +190,30 @@ return cached_type; } const CharType type = GetCharType(text[index], font_data); - if (type != cached_type) { - char_types_[index] = type; - // TODO(crbug.com/431660829): Support when `CharType` of already shaped - // ranges is changed. + if (type == cached_type) { + return type; + } + + char_types_[index] = type; + + // The `CharType` becomes different due to font changes. If it causes + // different kerning for the next or previous characters, keep their indexes. + if (cached_type != CharType::kInvalid && + RuntimeEnabledFeatures::TextSpacingTrimFallback2Enabled()) { + if (index > segment_start_) { + const CharType prev_type = char_types_[index - 1]; + if (prev_type != CharType::kInvalid && ShouldKernLast(type, prev_type) && + !ShouldKernLast(cached_type, prev_type)) { + changed_indexes_.push_back(index - 1); + } + } + if (index + 1 < segment_end_) { + const CharType next_type = char_types_[index + 1]; + if (next_type != CharType::kInvalid && ShouldKern(next_type, type) && + !ShouldKern(next_type, cached_type)) { + changed_indexes_.push_back(index + 1); + } + } } return type; } @@ -347,6 +368,39 @@ } } +// Apply kerning to indexes where actual `CharType`s are different from +// predicted `CharType`s. Features can't be applied because shaping is already +// done. Adjust letter spacing instead. +void HanKerning::ApplyKerning(ShapeResult& result) { + DCHECK(!changed_indexes_.empty()); + DCHECK(RuntimeEnabledFeatures::TextSpacingTrimFallback2Enabled()); + + ShapeResultCursor cursor(&result); + std::sort(changed_indexes_.begin(), changed_indexes_.end()); + wtf_size_t last_index = kNotFound; + for (wtf_size_t i : changed_indexes_) { + if (i == last_index) [[unlikely]] { + continue; + } + last_index = i; + + cursor.MoveToCharacter(i); + cursor.SetUnsafeToBreakBefore(); + const TextRunLayoutUnit advance = cursor.ClusterAdvance(); + switch (char_types_[i]) { + case CharType::kOpen: + cursor.AddSpaceToLeft(advance / -2); + break; + case CharType::kClose: + cursor.AddSpaceToRight(advance / -2); + break; + default: + NOTREACHED(); + } + } + changed_indexes_.Shrink(0); +} + HanKerning::FontData::FontData(const SimpleFontData& font, const LayoutLocale& locale, bool is_horizontal) {
diff --git a/third_party/blink/renderer/platform/fonts/shaping/han_kerning.h b/third_party/blink/renderer/platform/fonts/shaping/han_kerning.h index 4f9dc04e..685bd98 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/han_kerning.h +++ b/third_party/blink/renderer/platform/fonts/shaping/han_kerning.h
@@ -18,6 +18,7 @@ namespace blink { class LayoutLocale; +class ShapeResult; class SimpleFontData; // @@ -81,6 +82,8 @@ void PrepareFallback(const String& text); + void DidShapeSegment(ShapeResult& result); + using CharType = HanKerningCharType; // Data retrieved from fonts for `HanKerning`. @@ -130,6 +133,8 @@ static bool ShouldKern(CharType type, CharType last_type); static bool ShouldKernLast(CharType type, CharType last_type); + void ApplyKerning(ShapeResult& result); + bool may_apply_; bool is_start_prev_used_ = false; bool is_end_next_used_ = false; @@ -140,6 +145,7 @@ const FontData* last_font_data_ = nullptr; Vector<CharType> char_types_; Vector<unsigned, 32> unsafe_to_break_before_; + Vector<wtf_size_t> changed_indexes_; }; inline bool HanKerning::MayApply(StringView text) { @@ -148,6 +154,12 @@ }>(); } +inline void HanKerning::DidShapeSegment(ShapeResult& result) { + if (!changed_indexes_.empty()) [[unlikely]] { + ApplyKerning(result); + } +} + } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HAN_KERNING_H_
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc index 13d5eef1..42a25e2 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc +++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
@@ -1084,6 +1084,8 @@ hb_buffer_reset(range_data->buffer.Get()); } + han_kerning.DidShapeSegment(*result); + // Set variation selector mode to the default state. HarfBuzzFace::SetVariationSelectorMode(kUseSpecifiedVariationSelector);
diff --git a/third_party/blink/renderer/platform/fonts/shaping/shape_result_cursor.cc b/third_party/blink/renderer/platform/fonts/shaping/shape_result_cursor.cc index 52b38f8..b5b8065 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/shape_result_cursor.cc +++ b/third_party/blink/renderer/platform/fonts/shaping/shape_result_cursor.cc
@@ -125,4 +125,8 @@ result_->width_ += advance_float; } +void ShapeResultCursor::SetUnsafeToBreakBefore() { + GlyphData().SetSafeToBreakBefore(SafeToBreak::kUnsafe); +} + } // namespace blink
diff --git a/third_party/blink/renderer/platform/fonts/shaping/shape_result_cursor.h b/third_party/blink/renderer/platform/fonts/shaping/shape_result_cursor.h index 6130055..4ee4935 100644 --- a/third_party/blink/renderer/platform/fonts/shaping/shape_result_cursor.h +++ b/third_party/blink/renderer/platform/fonts/shaping/shape_result_cursor.h
@@ -56,6 +56,9 @@ void AddSpaceToLeft(TextRunLayoutUnit advance); void AddSpaceToRight(TextRunLayoutUnit advance); + // Set the current glyph unsafe-to-break. + void SetUnsafeToBreakBefore(); + private: FRIEND_TEST_ALL_PREFIXES(ShapeResultCursorTest, Ltr); FRIEND_TEST_ALL_PREFIXES(ShapeResultCursorTest, Rtl);
diff --git a/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc b/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc index a909c402..bfa89b4 100644 --- a/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc +++ b/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc
@@ -89,6 +89,41 @@ typeface->getFamilyName(&skia_family_name); return ToAtomicString(skia_family_name); } + +// static +const FontPlatformData* FontCache::CreateFontPlatformDataForCharacter( + SkFontMgr* fm, + UChar32 c, + const FontDescription& font_description, + const char* family_name, + FontFallbackPriority fallback_priority) { + DCHECK(fm); + + Bcp47Vector locales = + GetBcp47LocaleForRequest(font_description, fallback_priority); + sk_sp<SkTypeface> typeface(fm->matchFamilyStyleCharacter( + family_name, font_description.SkiaFontStyle(), locales.data(), + locales.size(), c)); + if (!typeface) { + return nullptr; + } + + SkString skia_family_name; + typeface->getFamilyName(&skia_family_name); + + bool synthetic_bold = font_description.IsSyntheticBold() && + !typeface->isBold() && + font_description.SyntheticBoldAllowed(); + bool synthetic_italic = font_description.IsSyntheticItalic() && + !typeface->isItalic() && + font_description.SyntheticItalicAllowed(); + + return MakeGarbageCollected<FontPlatformData>( + std::move(typeface), skia_family_name.c_str(), + font_description.EffectiveFontSize(), synthetic_bold, synthetic_italic, + font_description.TextRendering(), ResolvedFontFeatures(), + font_description.Orientation()); +} #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || // BUILDFLAG(IS_CHROMEOS)
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 452cb97..993d50a 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -650,9 +650,6 @@ { // Used to enable Blink side of features flags for Default Nav Transition. name: "BackForwardTransitions", - status: { - "Android": "stable", - }, }, { name: "BackgroundFetch", @@ -2718,6 +2715,12 @@ base_feature: "IncomingCallNotifications", }, { + // When enabled, every traversable mainframe same-doc navigation will + // increment the `viz::LocalSurfaceId` from the impl thread. + name: "IncrementLocalSurfaceIdForMainframeSameDocNavigation", + status: {"Android": "stable"}, + }, + { name: "IndexedDbGetAllRecords", status: "experimental", }, @@ -4939,6 +4942,12 @@ name: "TextSpacingTrimFallback", status: "stable", }, + { + // crbug.com/431660829 + name: "TextSpacingTrimFallback2", + depends_on: ["TextSpacingTrimFallback"], + status: "stable", + }, // This feature is used to inform the renderer of a user bypass from the // browser process to disable third-party storage partitioning. {
diff --git a/third_party/blink/web_tests/OptimizationGuideExpectations b/third_party/blink/web_tests/OptimizationGuideExpectations index 9849e9a..279c932 100644 --- a/third_party/blink/web_tests/OptimizationGuideExpectations +++ b/third_party/blink/web_tests/OptimizationGuideExpectations
@@ -8,26 +8,18 @@ # See //third_party/blink/web_tests/TestLists/optimization_guide.filter for the # tests run in this configuration. - -### virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/ virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/add.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/arg_min_max.https.any.html?gpu [ Crash ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cast.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/clamp.https.any.html?gpu [ Crash ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/dequantizeLinear.https.any.html?gpu [ Crash ] +virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv2d.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gemm.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/leaky_relu.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/linear.https.any.html?gpu [ Crash ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_and.https.any.html?gpu [ Crash ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_not.https.any.html?gpu [ Crash ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_or.https.any.html?gpu [ Crash ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_xor.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/mul.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/qdq_subgraph.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/qdq_subgraph.https.any.serviceworker.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/qdq_subgraph.https.any.sharedworker.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/qdq_subgraph.https.any.worker.html?gpu [ Crash ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/quantizeLinear.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/relu.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softmax.https.any.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/split.https.any.html?gpu [ Crash ] @@ -35,66 +27,19 @@ virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/subgraph.https.any.serviceworker.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/subgraph.https.any.sharedworker.html?gpu [ Crash ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/subgraph.https.any.worker.html?gpu [ Crash ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/where.https.any.html?gpu [ Crash ] # These tests produce different results locally vs. a bot. -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/abs.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/averagePool2d.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/batch_normalization.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/ceil.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/concat.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv2d.https.any.html?gpu [ Failure ] +virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cast.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv_transpose2d.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cos.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cumulative_sum.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/div.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/elu.https.any.html?gpu [ Failure ] +virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/dequantizeLinear.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/erf.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/exp.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/expand.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/floor.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gather.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gatherElements.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gru.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/hard_sigmoid.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/hard_swish.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.serviceworker.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.sharedworker.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.worker.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/instance_normalization.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/layer_normalization.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/log.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/matmul.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/max.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/maxPool2d.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/min.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/neg.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pad.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pow.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/prelu.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reciprocal.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l1.https.any.html?gpu [ Failure ] +virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/quantizeLinear.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l2.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_log_sum.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_log_sum_exp.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_max.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_mean.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_min.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_product.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_sum.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_sum_square.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reshape.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reverse.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/scatterElements.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/scatterND.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sigmoid.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/slice.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softplus.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softsign.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sqrt.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sub.https.any.html?gpu [ Failure ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tan.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tanh.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/transpose.https.any.html?gpu [ Failure ] -virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/triangular.https.any.html?gpu [ Failure ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 82ca13be..7b88957 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -2861,6 +2861,31 @@ crbug.com/434980772 external/wpt/fetch/fetch-later/quota/same-origin-iframe/multiple-iframes.tentative.https.window.html [ Timeout ] crbug.com/434980772 external/wpt/fetch/fetch-later/quota/same-origin-iframe/oversized-payload.tentative.https.window.html [ Timeout ] +# Reftest image failures +crbug.com/435620307 external/wpt/css/css-anchor-position/position-visibility-initial.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-anonymous.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-use-credentials.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrer-policy-cross-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrer-policy-same-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrer-policy-cross-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrer-policy-same-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrer-policy-cross-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrer-policy-same-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrer-policy-cross-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrer-policy-same-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrer-policy-cross-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrer-policy-same-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrer-policy-cross-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrer-policy-same-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrer-policy-cross-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrer-policy-same-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrer-policy-cross-origin.sub.html [ Failure ] +crbug.com/435625756 external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrer-policy-same-origin.sub.html [ Failure ] + +crbug.com/435704771 external/wpt/navigation-api/navigation-history-entry/opaque-origin.html [ Timeout ] +crbug.com/435704771 external/wpt/navigation-api/navigation-methods/return-value/back-forward-opaque-origin.html [ Timeout ] +crbug.com/435620308 external/wpt/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html [ Timeout ] + # ====== New tests from wpt-importer added here ====== crbug.com/433297073 external/wpt/css/filter-effects/fecolormatrix-display-p3.html [ Failure ] crbug.com/433324167 external/wpt/html/canvas/element/text/2d.text.writingmode.html [ Failure ] @@ -3331,7 +3356,7 @@ [ Win10.20h2 ] external/wpt/fedcm/fedcm-store.https.html [ Timeout ] [ Win10.20h2 ] external/wpt/touch-events/single-touch-vertical-rl.html [ Timeout ] crbug.com/422822316 [ Win11-arm64 ] external/wpt/touch-events/single-touch-vertical-rl.html [ Timeout ] -crbug.com/426765414 external/wpt/touch-events/single-touch.html [ Pass Failure ] +crbug.com/426765414 external/wpt/touch-events/single-touch.html [ Failure Pass ] [ Win10.20h2 ] virtual/speculation-rules-prerender-target-hint/external/wpt/speculation-rules/prerender/no-vary-search.https.html?2-2 [ Crash ] crbug.com/417031845 [ Win10.20h2 ] virtual/view-transition-mpa-serialization/external/wpt/css/css-view-transitions/dynamic-stylesheet-animations-timing-function.html [ Pass Timeout ] crbug.com/416129743 [ Mac15-arm64 ] external/wpt/css/css-flexbox/overflow-auto-005.html [ Failure ]
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites index 22ba4b5..c0b8dc21 100644 --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -1044,7 +1044,7 @@ "args": [ "--enable-features=FedCmLightweightMode" ], - "expires": "Aug 1, 2025" + "expires": "Aug 1, 2026" }, { "prefix": "fedcm-alternative-identifiers", @@ -1064,7 +1064,7 @@ "args": [ "--enable-features=FedCmAlternativeIdentifiers" ], - "expires": "Aug 1, 2025" + "expires": "Aug 1, 2026" }, { "prefix": "fedcm-register", @@ -1085,7 +1085,7 @@ "cbiesinger@chromium.org", "goto@chromium.org" ], - "expires": "Aug 1, 2025" + "expires": "Aug 1, 2026" }, { "prefix": "fenced-frame-mparch", @@ -6027,6 +6027,6 @@ "args": [ "--enable-features=ScriptSrcHashesV1" ], - "expires": "Aug 1, 2025" + "expires": "Nov 1, 2025" } ]
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json index 5ee432f..8be680b 100644 --- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json +++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json
@@ -4346,6 +4346,13 @@ {} ] ], + "double-parent-pseudo-in-placeholder-crash.html": [ + "24945db5427d0f5e5308d439aa3669205c438a70", + [ + null, + {} + ] + ], "implicit-parent-insertion-crash.html": [ "4be1e1c8f9ed31c386c70bd8744219346ef4637e", [ @@ -6004,6 +6011,13 @@ {} ] ], + "typed-arithmetic-inside-calc-crash.html": [ + "485c9967a9794b8536f88e66594814070ebcaadd", + [ + null, + {} + ] + ], "viewport-units-scrollbars-crash.html": [ "ba433d9f025295740f63615190db9376ca733fd4", [ @@ -6458,6 +6472,13 @@ {} ] ], + "kernelUnitLength-crash.html": [ + "adb769bc060ca33c8db81c90c7b8fddc1e6ec95a", + [ + null, + {} + ] + ], "multiple-references-id-crash-001.html": [ "9ee04e1015d3c9fc04e8fab240a15d59ae92892d", [ @@ -7251,6 +7272,13 @@ {} ] ], + "insertHTML-before-comment-at-end-of-editing-host.html": [ + "57f32a367a41fc22af75dda7d3764a194417179d", + [ + null, + {} + ] + ], "insertText-at-end-of-text-in-body.html": [ "763697314be630a81fd7019e71784bd57f5beaf7", [ @@ -18636,6 +18664,15 @@ ] ] }, + "datastore": { + "015-manual.html": [ + "604c1d43709b4c1a00029d2c23646f2a13e2bc95", + [ + null, + {} + ] + ] + }, "drop": { "events-contenteditable-manual.tentative.html": [ "9e513eb836fc78cd086077bee723753adc91643e", @@ -18737,6 +18774,20 @@ {} ] ], + "events-cross-document-suite-manual.html": [ + "9428a87760421f92c3631a5b3d472966eb270990", + [ + null, + {} + ] + ], + "events-file-suite-manual.html": [ + "22a66f5e9a6876fea3ca64fdb208793806ca95bf", + [ + null, + {} + ] + ], "events-non-draggable-001-manual.html": [ "0315ccdc86aa8fcd767965064fed8482f45edb0f", [ @@ -18751,6 +18802,13 @@ {} ] ], + "events-suite-manual.html": [ + "16c6583dc82a7079efdc071686983d680c9ae387", + [ + null, + {} + ] + ], "historical-manual.html": [ "0e2147222d9435793374e37bdf1cb49796749711", [ @@ -18865,7 +18923,37 @@ ] } }, + "synthetic": { + "005-manual.html": [ + "4e0b00dab2b0c290be4785051bcde17990b3f9e8", + [ + null, + {} + ] + ], + "006-manual.html": [ + "e7d1677b14b30c26a8f5f63e612becf72502ddbe", + [ + null, + {} + ] + ] + }, "target-origin": { + "001-manual.html": [ + "ff8572e937bff4fd2761d801ef3bd648d395ba12", + [ + null, + {} + ] + ], + "002-manual.html": [ + "d7e6c83a2ad17a3f6068ba76fe8f3dadd8f0c7df", + [ + null, + {} + ] + ], "003-manual.html": [ "febc2b0da6c1e227a3ab3c18e85ac132d2cdadeb", [ @@ -18943,6 +19031,13 @@ {} ] ], + "101-manual.html": [ + "23f5cf9baf24b9dba6204105f5975bb76490dc3a", + [ + null, + {} + ] + ], "102-manual.html": [ "7fc9d58f70f14374b7be19b45f1e18ca3be74d5b", [ @@ -19085,6 +19180,13 @@ {} ] ], + "dndTransferCases-manual.html": [ + "6081b5d42c34e94df8d2123384415b4a1bc23a19", + [ + null, + {} + ] + ], "effectAllowed-manual.html": [ "61443da2c02105a14772942906fdac7a567d9607", [ @@ -19136,6 +19238,157 @@ {} ] ] + }, + "the-dragevent-interface": { + "dragevent-manual.html": [ + "e4d754e459077bbe5dcb59d0ca9ab2d92fa3bdfd", + [ + null, + {} + ] + ] + }, + "the-dropzone-attribute": { + "dropzone_attribute_data_item_file_type-manual.html": [ + "9027559dc2c457d7a736a45eb4aaf3cc3e7eeca4", + [ + null, + {} + ] + ], + "dropzone_attribute_data_item_kind_file-manual.html": [ + "7a77c12414fe8da9fce27443c3aca8f88bf43130", + [ + null, + {} + ] + ], + "dropzone_attribute_data_item_kind_string-manual.html": [ + "b8a22e613bbd2a6f099eddaf75fef4a7a50f97a7", + [ + null, + {} + ] + ], + "dropzone_attribute_data_item_string_type-manual.html": [ + "7a5dccf4e2b914be30aec73e06443e24fb97eeda", + [ + null, + {} + ] + ], + "dropzone_attribute_inputbox_element-manual.html": [ + "f80604afa29cb21849b3e4c8d7b4f831765ed715", + [ + null, + {} + ] + ], + "dropzone_attribute_inputbox_element_dbcs-manual.html": [ + "a7f8ad1aa71bd8b7b3bc2c434587518b67229df6", + [ + null, + {} + ] + ], + "dropzone_attribute_link_element-manual.html": [ + "c6e5756ad6823fa0c9ad304b25d35a9850a4648f", + [ + null, + {} + ] + ], + "dropzone_attribute_value_case_insensitive_COpy-manual.html": [ + "17ec7a36a3e6a3f926c01067a7ed098c9c22d3b1", + [ + null, + {} + ] + ], + "dropzone_attribute_value_case_insensitive_STRING-manual.html": [ + "f118ba00bcf08da66d8e6687be1a3d3a4b9da915", + [ + null, + {} + ] + ], + "dropzone_attribute_value_case_insensitive_String_-manual.html": [ + "9b84803806b3716e8358eb79b6c5a5b38f24ede3", + [ + null, + {} + ] + ], + "dropzone_attribute_value_case_insensitive_linK-manual.html": [ + "e4364db7351659e1497f68bbda64f82a4917b844", + [ + null, + {} + ] + ], + "dropzone_attribute_value_copy-manual.html": [ + "dcc7c97acd803cb5d9c7ddd241e78c1e7d3734ac", + [ + null, + {} + ] + ], + "dropzone_attribute_value_foo-manual.html": [ + "f9606f1b9f654508b1a53062e2fd0bb4a03d1485", + [ + null, + {} + ] + ], + "dropzone_attribute_value_link-manual.html": [ + "a4ba819656054b463d267383989eb3960edb5a53", + [ + null, + {} + ] + ], + "dropzone_attribute_value_move-manual.html": [ + "dfad88ba615445db8dae5adbd44f2c79f662b674", + [ + null, + {} + ] + ], + "dropzone_attribute_value_multiple_values_foo_bar_move-manual.html": [ + "3243774c9359975db507dab17f01521afcc22d11", + [ + null, + {} + ] + ], + "dropzone_attribute_value_multiple_values_foo_link-manual.html": [ + "fd9e23d03a92faf6d3fd7932ce4cef2cdac9056f", + [ + null, + {} + ] + ], + "dropzone_attribute_value_multiple_values_move_copy-manual.html": [ + "50ea9369f2f57d3d1905209a7de58ff95d0173c4", + [ + null, + {} + ] + ], + "dropzone_attribute_value_not_specified-manual.html": [ + "152c30022b0828a682211a6d5d06b056bc2b6535", + [ + null, + {} + ] + ], + "dropzone_attribute_value_unordered_unique_space_separated-manual.html": [ + "24c5b032ab995bef23496a6bded127421f4a7991", + [ + null, + {} + ] + ] } } }, @@ -20014,7 +20267,7 @@ "navigation-api": { "scroll-behavior": { "after-transition-with-history-scroll-restoration-manual.html": [ - "bc2ce230ce729dcc5cc8bfcd0100ab0aa75d22ba", + "93e7168f85ce4a993b697a70b2060cf4418cc90e", [ null, {} @@ -75752,7 +76005,7 @@ ] ], "anchor-scroll-update-005.html": [ - "9c32bda6fcc62089a58071d99936cfbffb863f56", + "299ed46421c82e7742db059d1bb9ff176d0fb65d", [ null, [ @@ -75765,7 +76018,7 @@ ] ], "anchor-scroll-update-006.html": [ - "d896d9ca53747b582b0c5de0bdb7ac899c9cd1d8", + "74596d5edfe01bdf643ed3e740843185bbf9afc3", [ null, [ @@ -76012,7 +76265,7 @@ ] ], "position-try-fallbacks-004.html": [ - "9c66d9ff0a0b52d213896d7db2dd7f6b67732b02", + "c46af7c371658a0f29fe265f653afbbd3ff23373", [ null, [ @@ -76284,6 +76537,19 @@ {} ] ], + "position-visibility-initial.html": [ + "9adf0c64d270584552c526f5961fc4d8540ea4be", + [ + null, + [ + [ + "/css/css-anchor-position/position-visibility-initial-ref.html", + "==" + ] + ], + {} + ] + ], "position-visibility-no-overflow-scroll.html": [ "f646f819cddfbf955b36eb7b7d17802a040f9bef", [ @@ -76337,7 +76603,7 @@ ] ], "position-visibility-remove-anchors-visible.html": [ - "3408642ad2b4017c140020f21c76a6055af55b67", + "0e26b51e307ff21fddad76690977b581e87b408d", [ null, [ @@ -113584,151 +113850,8 @@ {} ] ], - "content-none-details.html": [ - "6ac94c3e865aaf808fb9cdb1f11807c2e43a3e8c", - [ - null, - [ - [ - "/css/css-content/content-none-details-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-fieldset.html": [ - "4ada3b7b01d79e38abc171edf4bf7607fb856cef", - [ - null, - [ - [ - "/css/css-content/content-none-fieldset-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-input.html": [ - "5cc76ba11de411520a880aac2f582f9f9068c165", - [ - null, - [ - [ - "/css/css-content/content-none-input-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-math.html": [ - "2d5e78f678f62ee5c3ded1680875f4cefe3bc737", - [ - null, - [ - [ - "/css/css-content/content-none-math-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-option.html": [ - "5eff47776119aecfccd8efcf728eac1d0b116be3", - [ - null, - [ - [ - "/css/css-content/content-none-option-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-root-block.html": [ - "c8d15df3eafe1e9a2f8d0b4485c7538c9ccec749", - [ - null, - [ - [ - "/css/css-content/content-none-root-block-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-root-columns.html": [ - "b3fceb1c4f4d4f8bb5304430ff19b73903f58b11", - [ - null, - [ - [ - "/css/css-content/content-none-root-columns-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-root-flex.html": [ - "0b6c6cab14f078006224898e032add1022eb6ebb", - [ - null, - [ - [ - "/css/css-content/content-none-root-flex-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-root-grid.html": [ - "e97f7848acb82fe154a00776b909f87ac2f0f904", - [ - null, - [ - [ - "/css/css-content/content-none-root-grid-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-root-ruby.html": [ - "8434d9619068e5f48539ee0d942412372e31c813", - [ - null, - [ - [ - "/css/css-content/content-none-root-ruby-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-root-table.html": [ - "92e4a7730b938f1f155ef2fff5f044f3ee531e68", - [ - null, - [ - [ - "/css/css-content/content-none-root-table-ref.html", - "==" - ] - ], - {} - ] - ], "content-none-select-1.html": [ - "450dd66e216be980689be8cc56f8f2fe91d27bfa", + "73fe4b0d04f1073cd60c13c83354064442108384", [ null, [ @@ -113742,58 +113865,6 @@ } ] ], - "content-none-select-2.html": [ - "4b8f0f5c3247a383eab241a116ca48c010d19b3c", - [ - null, - [ - [ - "/css/css-content/content-none-select-2-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-span-dynamic.html": [ - "078be9928a61603987467c2a97bf5a27985a19a3", - [ - null, - [ - [ - "/css/css-content/content-none-span-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-span.html": [ - "b963869cfeed60f2423b970c707a91e3ce838b22", - [ - null, - [ - [ - "/css/css-content/content-none-span-ref.html", - "==" - ] - ], - {} - ] - ], - "content-none-table.html": [ - "723e2e41467db17fd6ad5af5ec0e9e44d0ce9a89", - [ - null, - [ - [ - "/css/css-content/content-none-table-ref.html", - "==" - ] - ], - {} - ] - ], "element-replacement-alt.html": [ "e9ee9344c268faabb238f651b1335a5b9db47351", [ @@ -119789,7 +119860,7 @@ ] ], "flex-align-baseline-column-vert-lr-rtl-wrap-reverse.html": [ - "767c129b057b75defe26f3fce7d52b2eb3f7aa68", + "318c603627415f548bc9677a24f468dff0bc2d42", [ null, [ @@ -119802,7 +119873,7 @@ ] ], "flex-align-baseline-column-vert-rl-rtl-wrap-reverse.html": [ - "9608301aa1a2c6cd444edee072d95f236583ca3d", + "937741b004435e7c9df957dff962eab284fa4078", [ null, [ @@ -130492,6 +130563,19 @@ {} ] ], + "stretched-child-in-nested-flexbox-003.html": [ + "7f8cd10da3afd7812353ac39eff15194f328058a", + [ + null, + [ + [ + "/css/reference/ref-filled-green-200px-square.html", + "==" + ] + ], + {} + ] + ], "stretching-orthogonal-flows.html": [ "acaa787faf657b76a5b213fb9203088d5d28f4c4", [ @@ -137347,6 +137431,32 @@ {} ] ], + "grid-abspos-staticpos-align-self-center-large-border-padding.html": [ + "e238346f14d786ef8ac1c55697dc41d206d4754b", + [ + null, + [ + [ + "/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-large-border-padding-ref.html", + "==" + ] + ], + {} + ] + ], + "grid-abspos-staticpos-align-self-center.html": [ + "3d0ef3348d0d25812add0c98ff69b26084e76cc8", + [ + null, + [ + [ + "/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-ref.html", + "==" + ] + ], + {} + ] + ], "grid-abspos-staticpos-align-self-end-large-border-padding.html": [ "09647be71c9c63f01703f66bf666e7315b39558f", [ @@ -143158,6 +143268,32 @@ {} ] ], + "grid-size-with-orthogonal-child-001.html": [ + "30871f380f0102adb9b52ebc400bba6ca4ed3e64", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], + "grid-size-with-orthogonal-child-002.html": [ + "3787d1690ee0560c15492612f2465840aa0f342e", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], "grid-size-with-orthogonal-child-dynamic.html": [ "d1223b9fa0c404c61eb32c44ea66b9b99f02919c", [ @@ -152877,7 +153013,7 @@ ] ], "object-fit-contain-png-001c.html": [ - "0f8195157e310cd69c05dcfd8a786972b981d2f1", + "4a3f2d7bdb5c70c432160c22a6fd1d22651908bc", [ null, [ @@ -152886,27 +153022,11 @@ "==" ] ], - { - "fuzzy": [ - [ - null, - [ - [ - 0, - 20 - ], - [ - 0, - 2000 - ] - ] - ] - ] - } + {} ] ], "object-fit-contain-png-001e.html": [ - "20a5f8ae560f4755081ae0a6e3bf6346b487626c", + "9305af6a4912acd1139e825e6c9c532bc48b18df", [ null, [ @@ -152919,7 +153039,7 @@ ] ], "object-fit-contain-png-001i.html": [ - "6605be2e1a4f79367a73128eb7e2d09f6bfc878a", + "92ce77507010de871f52886d9ff3704fb7b24946", [ null, [ @@ -152932,7 +153052,7 @@ ] ], "object-fit-contain-png-001o.html": [ - "36761156bb30da613fb9605dab69464af4552380", + "23df4364707f152c1d1253eb50381526138302bd", [ null, [ @@ -152945,7 +153065,7 @@ ] ], "object-fit-contain-png-001p.html": [ - "ac00ec44d1d7b387353e3eebc75ded6261b7f57b", + "a723276037e1abecb185aff9c22d1cfeee13573c", [ null, [ @@ -152958,7 +153078,7 @@ ] ], "object-fit-contain-png-002c.html": [ - "14834316a32efbf8f80c4612a93951e0fa792c51", + "ed24f460ff5551f9553b7c49f4795ec396d6b328", [ null, [ @@ -152967,27 +153087,11 @@ "==" ] ], - { - "fuzzy": [ - [ - null, - [ - [ - 0, - 20 - ], - [ - 0, - 2000 - ] - ] - ] - ] - } + {} ] ], "object-fit-contain-png-002e.html": [ - "6132fdc27d66fe7dc195016d30177be77318ef45", + "8427589cb99e2537255e4fb536d9e05763aad177", [ null, [ @@ -153000,7 +153104,7 @@ ] ], "object-fit-contain-png-002i.html": [ - "222ac9e7356c18c40108ffa445c91b2386d90366", + "ed1220db4aa22f103257053de8657160dcf56b86", [ null, [ @@ -153013,7 +153117,7 @@ ] ], "object-fit-contain-png-002o.html": [ - "6e0b555e57ea26a95e11584719f3e371c733320a", + "c4594287f9f2627fefe1482b2aea0cdd1ef085ff", [ null, [ @@ -153026,7 +153130,7 @@ ] ], "object-fit-contain-png-002p.html": [ - "97a150e582ab6931108c0e6844fe536e5ae50b22", + "d1c08361e0e731e6627f8e03fe5cd933eb326753", [ null, [ @@ -153455,7 +153559,7 @@ ] ], "object-fit-cover-png-001c.html": [ - "2a0071a01ce0cd423b6b03537c8f4e9cfe766ad5", + "d2a05491ebf1a541918254f10ef19023c79f02dc", [ null, [ @@ -153468,7 +153572,7 @@ ] ], "object-fit-cover-png-001e.html": [ - "1091e01b7aa8fe4e1227e8f1f01bf11231b6f232", + "159ff7280d06cd8082d6cc3c0f96d006f08be0b0", [ null, [ @@ -153481,7 +153585,7 @@ ] ], "object-fit-cover-png-001i.html": [ - "8db4683c2746c4447b1c0105abdeb35dec97370b", + "918ce0705c132b293c1669523cf06cfd13e3a8d9", [ null, [ @@ -153494,7 +153598,7 @@ ] ], "object-fit-cover-png-001o.html": [ - "8e40b532ca44869a306b4e32747c4a38385eca06", + "293f6ef332f119a8c95508d3c2ab667164f6938b", [ null, [ @@ -153507,7 +153611,7 @@ ] ], "object-fit-cover-png-001p.html": [ - "a75a977a37b131b062cc3f94651b97fa97a5b67c", + "ab74190b2562de6c55c42319f829154b85dc3002", [ null, [ @@ -153520,7 +153624,7 @@ ] ], "object-fit-cover-png-002c.html": [ - "66836651fb48eea95f704b379ce455486d792e4d", + "9ecacd14421cf641a2577356fbb93373b8064504", [ null, [ @@ -153533,7 +153637,7 @@ ] ], "object-fit-cover-png-002e.html": [ - "8dab30ccfd1da3b09f82f3f7a244c5a8c065b139", + "0c53c87a1df10e80640f0f42469861500f24a420", [ null, [ @@ -153546,7 +153650,7 @@ ] ], "object-fit-cover-png-002i.html": [ - "1866fde155d4e4be4f523d6df24f06c83e6962a2", + "81c2a1e546b0b2bcfd33ab139bbdba235f7ea949", [ null, [ @@ -153559,7 +153663,7 @@ ] ], "object-fit-cover-png-002o.html": [ - "a36ddbfce8e8bcb3f072157e1e7a196601d42b54", + "ab97054d7fc318365813866dad7f1779d6a1a34f", [ null, [ @@ -153572,7 +153676,7 @@ ] ], "object-fit-cover-png-002p.html": [ - "36222054b03d04f8c9ae1ece2f206bf366fb69be", + "6f2333a803fa83ebce982d6a05344725663f2dd9", [ null, [ @@ -153923,7 +154027,7 @@ ] ], "object-fit-fill-png-001c.html": [ - "0e2a3883fe2f05a2c89dbc0d87617aa965097330", + "200e5f471161ed81c0d0ee0a837ac4f2633738ab", [ null, [ @@ -153932,27 +154036,11 @@ "==" ] ], - { - "fuzzy": [ - [ - null, - [ - [ - 0, - 20 - ], - [ - 0, - 3200 - ] - ] - ] - ] - } + {} ] ], "object-fit-fill-png-001e.html": [ - "08aa6b23fe21f2005fbc26327d823b1a90fb48eb", + "37955a592c2a298bec03a11e15a9476eee4c5f4a", [ null, [ @@ -153965,7 +154053,7 @@ ] ], "object-fit-fill-png-001i.html": [ - "90692c30cb58edaab49c411080bd074d351c87ae", + "19ce5ba32a6f7c31dabe5c13349eac9dc76b6c45", [ null, [ @@ -153978,7 +154066,7 @@ ] ], "object-fit-fill-png-001o.html": [ - "b57528b125d33546241bd7218d92efb5bc7dfb24", + "a5dbb0d8ad205577fed407c4b91c44ee0d8d3c9e", [ null, [ @@ -153991,7 +154079,7 @@ ] ], "object-fit-fill-png-001p.html": [ - "1e30e7aef4c76ca3b25ad6ec50b7c048e008dc30", + "e081d138943e9e0e1bc86465010916a87fe83dd5", [ null, [ @@ -154004,7 +154092,7 @@ ] ], "object-fit-fill-png-002c.html": [ - "43bcced9f26c672c641bd5e1c6e48855ad1b23dc", + "d0eb7a59f86fbd450abd61562daf48edc0774c6a", [ null, [ @@ -154013,27 +154101,11 @@ "==" ] ], - { - "fuzzy": [ - [ - null, - [ - [ - 0, - 20 - ], - [ - 0, - 3200 - ] - ] - ] - ] - } + {} ] ], "object-fit-fill-png-002e.html": [ - "d5903c2004de7332521ff948344634a501dff15d", + "9e2edb7aecf44310135d227a3f3273eb61a4c73e", [ null, [ @@ -154046,7 +154118,7 @@ ] ], "object-fit-fill-png-002i.html": [ - "b5abd3d800168e6511baa6fae0a8dad4209e98de", + "3ad7a562fe9de37cb77bc26c9ae59611581bfe5e", [ null, [ @@ -154059,7 +154131,7 @@ ] ], "object-fit-fill-png-002o.html": [ - "a8904f2a4eda6b3617e26218e40e3ada559fc931", + "f12d0d2de5215786f7c4e53e9ed17ca375f0b6e8", [ null, [ @@ -154072,7 +154144,7 @@ ] ], "object-fit-fill-png-002p.html": [ - "e0b44135ec9102bf74e1a59a3b38627e100233cc", + "cccdad6c38d883dec87d273b03b7566722a5150f", [ null, [ @@ -154397,7 +154469,7 @@ ] ], "object-fit-none-png-001c.html": [ - "fe483baa96345ad682987f9a4bc222644c8c1cf2", + "358ab0795c6013bc86a51392614bf51be5c5cf4e", [ null, [ @@ -154410,7 +154482,7 @@ ] ], "object-fit-none-png-001e.html": [ - "91be966a408915dc62518561216fec88955f3496", + "a48dfacaea7a306870a0012d1c9d84ad98e7b862", [ null, [ @@ -154423,7 +154495,7 @@ ] ], "object-fit-none-png-001i.html": [ - "39d7e475c3b3c58ae853a38e832f7e494962f942", + "4b30e6ad9c194b30739bbb4ec1007c36132b20c9", [ null, [ @@ -154436,7 +154508,7 @@ ] ], "object-fit-none-png-001o.html": [ - "f1d702a5c64fdb5e88355e580b0a0900999c675a", + "c494fda47e12bc6a9f0d98577b33b9d66c0fe9df", [ null, [ @@ -154449,7 +154521,7 @@ ] ], "object-fit-none-png-001p.html": [ - "85edee908041b34d4ee1ebc5fe7190bb29a29efa", + "408872629cf503101cb5c78df228abb08c4f7d3e", [ null, [ @@ -154462,7 +154534,7 @@ ] ], "object-fit-none-png-002c.html": [ - "09bc836d024bffd1f614f97067f50ece6fdb76ed", + "ac2feadba19d505a41bfe7425331af13a93574a0", [ null, [ @@ -154475,7 +154547,7 @@ ] ], "object-fit-none-png-002e.html": [ - "ce3e07e7df5686ce8c9b5116401cc5f28b11c411", + "26f229828f8ae79c9c891298764bc077cd265895", [ null, [ @@ -154488,7 +154560,7 @@ ] ], "object-fit-none-png-002i.html": [ - "1f33b5758ac29023264fe9d7b90c540b6e895d03", + "1cf85d615d081a59269159a76a5e1e5aaebc29e2", [ null, [ @@ -154501,7 +154573,7 @@ ] ], "object-fit-none-png-002o.html": [ - "2b1083628e5157795fb26c22662c7cac5505c269", + "704fdc8723209d8cd44733a7f5e839725170013f", [ null, [ @@ -154514,7 +154586,7 @@ ] ], "object-fit-none-png-002p.html": [ - "656515ddebd05f8d99d9eebf31f7c96c6636ef0e", + "b231b41c8b63657420fd1e2309dafb9c1171ca65", [ null, [ @@ -154839,7 +154911,7 @@ ] ], "object-fit-scale-down-png-001c.html": [ - "5b8116ecbcb6e3343c0316e6d5a1f31c97afe3bd", + "da79c09f364a1ee98df0bad538cbbdd5405b0a8b", [ null, [ @@ -154852,7 +154924,7 @@ ] ], "object-fit-scale-down-png-001e.html": [ - "c2f587405fdaeaf8484c57081757059dbb77823c", + "3221baef0def0d39a4d1ea7931602d41ebd4f1a1", [ null, [ @@ -154865,7 +154937,7 @@ ] ], "object-fit-scale-down-png-001i.html": [ - "0fd12092459632a4d1b744c740d02eb6297ddac9", + "941122117f254f3a9d03b140a119e6ea2ddba3ce", [ null, [ @@ -154878,7 +154950,7 @@ ] ], "object-fit-scale-down-png-001o.html": [ - "bed477d0481ecae3d44a6a26ec193187338d639a", + "0dd14abdd26d4662ef3b995eac4f9385fcde9486", [ null, [ @@ -154891,7 +154963,7 @@ ] ], "object-fit-scale-down-png-001p.html": [ - "ff152315ff99651f4fa689c937f592f31cf881e7", + "37a3bdfbf317ff9789fecd9b9fedef2898647165", [ null, [ @@ -154904,7 +154976,7 @@ ] ], "object-fit-scale-down-png-002c.html": [ - "626f379f1c7ca6934e57e22fc3b2cd1fa0fad6bc", + "f65f9c08d35183899bb1315f8419a1b2016ae748", [ null, [ @@ -154917,7 +154989,7 @@ ] ], "object-fit-scale-down-png-002e.html": [ - "4190c5f1f38bb4dfdec3f6e04d2466df5715b7ee", + "9b470a62a283eadf4f6796a7ab48ed9b23269c84", [ null, [ @@ -154930,7 +155002,7 @@ ] ], "object-fit-scale-down-png-002i.html": [ - "dc3fcc2a41a6abc4cc91e839a65646b4348d9bcc", + "bb313d77c190bbf7cc4ec58a161df8432b853555", [ null, [ @@ -154943,7 +155015,7 @@ ] ], "object-fit-scale-down-png-002o.html": [ - "f7dcca2ecc5b90f110b69b98b739a39ac6e77f84", + "a431dc3759b32e5b95d9126e89d8eb623e691ae8", [ null, [ @@ -154956,7 +155028,7 @@ ] ], "object-fit-scale-down-png-002p.html": [ - "6d05ee0b254f9560b49a6be77c22252e0d4e03b1", + "72311728b089c05d530342356b138892357e640a", [ null, [ @@ -155281,7 +155353,7 @@ ] ], "object-position-png-001c.html": [ - "20ff1cb935c0d2ea72c06f6c79a69ad42a614ef2", + "4ecf6b1dfd85a7fafecbc2a00a6f7d8eb53f3d06", [ null, [ @@ -155294,7 +155366,7 @@ ] ], "object-position-png-001e.html": [ - "cdf35a1fc7a45e9ea86692a2ac92eb4781f9334e", + "55aab9450e76936a55aea061095a09e2e5ec89da", [ null, [ @@ -155307,7 +155379,7 @@ ] ], "object-position-png-001i.html": [ - "d3e2622b4066fdbc7db8e24b724b66cc264cec9c", + "9bc1d59ac4a45f47cdf53ed5b017e4c7846ef7f1", [ null, [ @@ -155320,7 +155392,7 @@ ] ], "object-position-png-001o.html": [ - "cdf0e0b5302a51a673ab6aecb57b642d6a358c5e", + "3a7ce9ccd405a594fe25d83fa25ed10a0507a242", [ null, [ @@ -155333,7 +155405,7 @@ ] ], "object-position-png-001p.html": [ - "8b80b9c5bf3e5cb694691b4996134d4d37aba575", + "74824ae4ec9fad5a2ead62d72f3c10d9979fd7fa", [ null, [ @@ -155346,7 +155418,7 @@ ] ], "object-position-png-002c.html": [ - "5ad030ffb601de16d0ff8f259aff8fc194a1a363", + "b5cbf2ed15a825798059a458ad9571547944d61d", [ null, [ @@ -155359,7 +155431,7 @@ ] ], "object-position-png-002e.html": [ - "749948ae4c4bd7ce12926bc016a23cbdea572963", + "e80bdcc6c0e10cf5e907edc4bad3fe91e5b44034", [ null, [ @@ -155372,7 +155444,7 @@ ] ], "object-position-png-002i.html": [ - "88b4a150013c22bf8f291a3adef48bb3734763a8", + "cbb184eacabf779069b3bb9ae14b53723d0215eb", [ null, [ @@ -155385,7 +155457,7 @@ ] ], "object-position-png-002o.html": [ - "0d507900f8293bfbd0b38f536ef830878a8cd9b0", + "b8a40602486b1d2bddda3c00945b511444cb8827", [ null, [ @@ -155398,7 +155470,7 @@ ] ], "object-position-png-002p.html": [ - "00ace782bc375135a349b3d415b7b9949513c8c2", + "dfbb067878b85663cdd3b5e401be231cc2c26043", [ null, [ @@ -175799,6 +175871,58 @@ {} ] ], + "block-ellipsis-repaint-001.html": [ + "b8ba9872f9958ae4b4ec23a669910e37fe091f6e", + [ + null, + [ + [ + "/css/css-overflow/line-clamp/reference/block-ellipsis-repaint-001-ref.html", + "==" + ] + ], + {} + ] + ], + "block-ellipsis-repaint-002.html": [ + "321d7ef093165afc6ae111ff855b603520115632", + [ + null, + [ + [ + "/css/css-overflow/line-clamp/reference/block-ellipsis-repaint-002-ref.html", + "==" + ] + ], + {} + ] + ], + "block-ellipsis-repaint-003.html": [ + "cf902c627e74af0aa675ca56c074a78c4b8aef81", + [ + null, + [ + [ + "/css/css-overflow/line-clamp/reference/block-ellipsis-repaint-003-ref.html", + "==" + ] + ], + {} + ] + ], + "block-ellipsis-repaint-004.html": [ + "23c32d409422f3c7291313cb7204e37a3d80f8ed", + [ + null, + [ + [ + "/css/css-overflow/line-clamp/reference/block-ellipsis-repaint-004-ref.html", + "==" + ] + ], + {} + ] + ], "line-clamp-001.html": [ "c8cfcb1066de1a1d5c98e147c8e47499069046be", [ @@ -254551,8 +254675,8 @@ ], "urls": { "cross-origin": { - "url-image-crossorigin-anonymous-negative.sub.html": [ - "f5066a55d2b5488110df132730c70e4be39973e2", + "url-image-cross-origin-anonymous-negative.sub.html": [ + "c0eb5d451488fd8d3ceddf31c6f21d2b1c725c7b", [ null, [ @@ -254564,8 +254688,8 @@ {} ] ], - "url-image-crossorigin-anonymous.sub.html": [ - "0a45eda33d7315d1a2e6e45bb722bd671c1b5bdb", + "url-image-cross-origin-anonymous.sub.html": [ + "83ce64f57dd349f8b438b5d387f769acadba886d", [ null, [ @@ -254577,8 +254701,8 @@ {} ] ], - "url-image-crossorigin-use-credentials-negative.sub.html": [ - "952f953d8443b6873d5348e5fee8473ac506f07b", + "url-image-cross-origin-use-credentials-negative.sub.html": [ + "73fc57dcbd4d71885a54e2ee4fa046b9f1b89032", [ null, [ @@ -254590,8 +254714,8 @@ {} ] ], - "url-image-crossorigin-use-credentials.sub.html": [ - "f592a02c4869ded268bd6e4822ae48957ddd82ff", + "url-image-cross-origin-use-credentials.sub.html": [ + "a978de931fe32986fccd0f5b7118866738004e7b", [ null, [ @@ -254606,8 +254730,8 @@ }, "referrer-policy": { "no-referrer": { - "url-image-referrerpolicy-cross-origin.sub.html": [ - "30a52a848a4fc3b696d65cad27263fbb5753a1bc", + "url-image-referrer-policy-cross-origin.sub.html": [ + "dbfd63b23e60004beac72b1cce63e96d55884caf", [ null, [ @@ -254619,8 +254743,8 @@ {} ] ], - "url-image-referrerpolicy-same-origin.sub.html": [ - "ebbff834b92fe084e779a91ad38a882d8640e098", + "url-image-referrer-policy-same-origin.sub.html": [ + "c25f059ded9bdefc9aead48c2611cfd344a19f1e", [ null, [ @@ -254634,8 +254758,8 @@ ] }, "no-referrer-when-downgrade": { - "url-image-referrerpolicy-cross-origin.sub.html": [ - "ce51df67c027ca74a8c033f78530dc7f1d1f9701", + "url-image-referrer-policy-cross-origin.sub.html": [ + "e960d92fe70e208a699849300e3475f96e884261", [ null, [ @@ -254647,8 +254771,8 @@ {} ] ], - "url-image-referrerpolicy-same-origin.sub.html": [ - "6860e7386bf65b16be804952df14d9613d742073", + "url-image-referrer-policy-same-origin.sub.html": [ + "b374f7176297cf3f3f60bcf9589c9862b047c0f0", [ null, [ @@ -254662,8 +254786,8 @@ ] }, "origin": { - "url-image-referrerpolicy-cross-origin.sub.html": [ - "14a8172d6e354693c5fd0857223e3c3601833588", + "url-image-referrer-policy-cross-origin.sub.html": [ + "5bf82ea74974afeb25ff1152048413194536c087", [ null, [ @@ -254675,8 +254799,8 @@ {} ] ], - "url-image-referrerpolicy-same-origin.sub.html": [ - "1cc6f011c12ee992c4414446fe8cb569aab49a70", + "url-image-referrer-policy-same-origin.sub.html": [ + "378c24c9e1d8547c048f4d0d98b283b57229062a", [ null, [ @@ -254690,8 +254814,8 @@ ] }, "origin-when-cross-origin": { - "url-image-referrerpolicy-cross-origin.sub.html": [ - "6285f2f0e5de1dd3e0f3a405eb226926bad660ae", + "url-image-referrer-policy-cross-origin.sub.html": [ + "600f2b17c729c895c5e1321af2a05e3f937c5bf3", [ null, [ @@ -254703,8 +254827,8 @@ {} ] ], - "url-image-referrerpolicy-same-origin.sub.html": [ - "eb4e081e94013b5ceb5cfa8e637c5074c4e69a5d", + "url-image-referrer-policy-same-origin.sub.html": [ + "469bbdcdf43c8dd1355700ab757f2b6b2e3e852e", [ null, [ @@ -254718,8 +254842,8 @@ ] }, "same-origin": { - "url-image-referrerpolicy-cross-origin.sub.html": [ - "de23eb1f0954c05d617e1e2b28e8d1ff743f6aa2", + "url-image-referrer-policy-cross-origin.sub.html": [ + "3c2280ef1f0cabd624761dab6114b9a4e35b5609", [ null, [ @@ -254731,8 +254855,8 @@ {} ] ], - "url-image-referrerpolicy-same-origin.sub.html": [ - "866affc6d9fb61d1f4e88a88355e8cb362684497", + "url-image-referrer-policy-same-origin.sub.html": [ + "62ba453f92d235d0ee8671e2538e6cf595f90f2c", [ null, [ @@ -254746,8 +254870,8 @@ ] }, "strict-origin": { - "url-image-referrerpolicy-cross-origin.sub.html": [ - "b17ac4b4ef7d39e1f700bb4c0b969fc1e7d4401a", + "url-image-referrer-policy-cross-origin.sub.html": [ + "8fbbc15cfe475bccc39253540844751df83be046", [ null, [ @@ -254759,8 +254883,8 @@ {} ] ], - "url-image-referrerpolicy-same-origin.sub.html": [ - "dadf1c58d526c1e6674d67d54a5f1e1cc65ffa42", + "url-image-referrer-policy-same-origin.sub.html": [ + "678eb9a6d466d6150667eaae3ec847668af91315", [ null, [ @@ -254774,8 +254898,8 @@ ] }, "strict-origin-when-cross-origin": { - "url-image-referrerpolicy-cross-origin.sub.html": [ - "1e66fbf659f821cbf3335dca2147e7c7a636528e", + "url-image-referrer-policy-cross-origin.sub.html": [ + "c90b28fc01effd3ef4098b3f4fc26bf63f68ea91", [ null, [ @@ -254787,8 +254911,8 @@ {} ] ], - "url-image-referrerpolicy-same-origin.sub.html": [ - "57f5351a5a1bcf8c33c3607c720fa0bac934ba0b", + "url-image-referrer-policy-same-origin.sub.html": [ + "92a328959325ac8a8576bf3b63a2aa85cbcb7001", [ null, [ @@ -254802,8 +254926,8 @@ ] }, "unsafe-url": { - "url-image-referrerpolicy-cross-origin.sub.html": [ - "dc5a3d5143598159090c35db4560389aa5b6cae3", + "url-image-referrer-policy-cross-origin.sub.html": [ + "cebe8759157ad22348d715512e322630dacbc3c6", [ null, [ @@ -254815,8 +254939,8 @@ {} ] ], - "url-image-referrerpolicy-same-origin.sub.html": [ - "7eaba535f142aeb4d00704f7096c62ba99dab4b8", + "url-image-referrer-policy-same-origin.sub.html": [ + "b7a8497df18e01b7f4af9b3911a1933cc544bf8a", [ null, [ @@ -262279,6 +262403,19 @@ } ] ], + "implicit-contain.html": [ + "03368e850f2fe6deb1b9a72f2c9f41c15255ecc3", + [ + null, + [ + [ + "/css/css-view-transitions/scoped/implicit-contain-ref.html", + "==" + ] + ], + {} + ] + ], "nested-scope.html": [ "b9cc25c3338912ae91da453c20924dd5cc90e294", [ @@ -263770,6 +263907,19 @@ ], {} ] + ], + "zoom-pseudo-image.html": [ + "3a79995dc6b256123f2bc575af1191cbce581160", + [ + null, + [ + [ + "/css/css-viewport/zoom/zoom-pseudo-image-ref.html", + "==" + ] + ], + {} + ] ] } }, @@ -325555,11 +325705,11 @@ ] }, "getRandomValues.any-expected.txt": [ - "a86fd15b3b1c0c56a368f7cadffdee406d1780fa", + "b381aa49ab7dedbbf58880914d4788496cc73f46", [] ], "getRandomValues.any.worker-expected.txt": [ - "a86fd15b3b1c0c56a368f7cadffdee406d1780fa", + "b381aa49ab7dedbbf58880914d4788496cc73f46", [] ], "import_export": { @@ -330971,42 +331121,6 @@ "OWNERS": [ "7e45685dea195172d1b10a4c12f4cf196cd7e227", [] - ], - "cookieListItem_attributes.https.any-expected.txt": [ - "4113e2b1cf92a9d65c3349bf8bcf8bfa586a2193", - [] - ], - "cookieListItem_attributes.https.any.serviceworker-expected.txt": [ - "4113e2b1cf92a9d65c3349bf8bcf8bfa586a2193", - [] - ], - "cookieStore_delete_arguments.https.any-expected.txt": [ - "15da17ac05c6ec89748e9218bf26ae4e57696bad", - [] - ], - "cookieStore_delete_arguments.https.any.serviceworker-expected.txt": [ - "c16c1930903402eef917886549bc13454526415b", - [] - ], - "cookieStore_getAll_arguments.https.any.serviceworker-expected.txt": [ - "6c68d6d8e1481c5436437129b87f4b5a620726f3", - [] - ], - "cookieStore_get_arguments.https.any.serviceworker-expected.txt": [ - "e4c971b8d653aed83aaeea9606e1095ddf35daee", - [] - ], - "cookieStore_in_detached_frame.https-expected.txt": [ - "b7d01ee3a8a66009856be060145c8633f6782001", - [] - ], - "cookieStore_set_arguments.https.any-expected.txt": [ - "fd1a9490d49258d5e7e227a24f063944d389000c", - [] - ], - "cookieStore_set_arguments.https.any.serviceworker-expected.txt": [ - "ad6cdda02b6ce10df09a3774ab7e8e38af20e001", - [] ] }, "cookies": { @@ -331408,6 +331522,42 @@ "d767a7b46811811f39c43598fb0848d828a69ec8", [] ], + "cookieListItem_attributes.https.any-expected.txt": [ + "eade0ea0dfebf002d91276de4c75b409383d68d7", + [] + ], + "cookieListItem_attributes.https.any.serviceworker-expected.txt": [ + "eade0ea0dfebf002d91276de4c75b409383d68d7", + [] + ], + "cookieStore_delete_arguments.https.any-expected.txt": [ + "15da17ac05c6ec89748e9218bf26ae4e57696bad", + [] + ], + "cookieStore_delete_arguments.https.any.serviceworker-expected.txt": [ + "c16c1930903402eef917886549bc13454526415b", + [] + ], + "cookieStore_getAll_arguments.https.any.serviceworker-expected.txt": [ + "6c68d6d8e1481c5436437129b87f4b5a620726f3", + [] + ], + "cookieStore_get_arguments.https.any.serviceworker-expected.txt": [ + "e4c971b8d653aed83aaeea9606e1095ddf35daee", + [] + ], + "cookieStore_in_detached_frame.https-expected.txt": [ + "b7d01ee3a8a66009856be060145c8633f6782001", + [] + ], + "cookieStore_set_arguments.https.any-expected.txt": [ + "fd1a9490d49258d5e7e227a24f063944d389000c", + [] + ], + "cookieStore_set_arguments.https.any.serviceworker-expected.txt": [ + "ad6cdda02b6ce10df09a3774ab7e8e38af20e001", + [] + ], "resources": { "always_changing_sw.sub.js": [ "9fdf99848fa50316e275cd6636a5755270a9bb1e", @@ -338669,6 +338819,10 @@ "a97d290bfda8e46e69f87cfa518a0739ecdf86bd", [] ], + "position-area-computed-expected.txt": [ + "53cb731a4dde3e32f320814281f46f3bedf9672f", + [] + ], "position-area-inline-container-ref.html": [ "ecf54f1a9ac2d756cb78f4d2c0690c1ac8b65916", [] @@ -338737,6 +338891,10 @@ "5a364aa7847a13e5c786708f5f97dd0dd718649d", [] ], + "position-visibility-initial-ref.html": [ + "17798173804b41258690ed22f1169a529bca42fe", + [] + ], "position-visibility-no-overflow-ref.html": [ "d6e64d0d107664532f657d8774df1aeda6e038f9", [] @@ -338864,7 +339022,11 @@ "d5cf1861c112b0ae8ec2bfb28b9aa893128ca14b", [] ] - } + }, + "try-tactic-position-area-expected.txt": [ + "8e4524aa23da7d6f48c2f8bc62ddc1cfe2230ed2", + [] + ] }, "css-animations": { "CSSAnimation-compositeOrder.tentative-expected.txt": [ @@ -344531,64 +344693,8 @@ "b6c86aa684b43c789f13ff5f97f240be5619bcb3", [] ], - "content-none-details-ref.html": [ - "ea844dc030207a6da5cdcfa9443887878c6324c8", - [] - ], - "content-none-fieldset-ref.html": [ - "49a86e7a0f7fa736618c4e1aa836b4c3feddc34c", - [] - ], - "content-none-input-ref.html": [ - "faa3ba3734c628a5db4e732d5b655f16b2cd81f3", - [] - ], - "content-none-math-ref.html": [ - "5e43f2ece4d1c7edf8a1609fe6168e933003fdff", - [] - ], - "content-none-option-ref.html": [ - "336c5bfb94bea7e6855f85a214cfcb2e99841a38", - [] - ], - "content-none-root-block-ref.html": [ - "e3c2adb4178e5d40f15a7d7967d3cb375d36723f", - [] - ], - "content-none-root-columns-ref.html": [ - "661c064ad3dfbd7ac359b77d956df1b1e439f4e1", - [] - ], - "content-none-root-flex-ref.html": [ - "b14e9f14f9376de03d562b8f12892ecdc27239dd", - [] - ], - "content-none-root-grid-ref.html": [ - "9b092c664b93ce01ccf2ec41a2a885c7148267ad", - [] - ], - "content-none-root-ruby-ref.html": [ - "cfb0ecd86622da02b8684d9ce915bb1fd20731cd", - [] - ], - "content-none-root-table-ref.html": [ - "d32fdf05256b41802f9dd2fe9ffa1feb0d4b1991", - [] - ], "content-none-select-1-ref.html": [ - "5fef3a498cd36b2ab4d89b14448ecc334c259260", - [] - ], - "content-none-select-2-ref.html": [ - "4848b57d9578ffd7478ce59d05231abd2119f900", - [] - ], - "content-none-span-ref.html": [ - "cec124a3d4574104240243f1f6e44d95fcbd333c", - [] - ], - "content-none-table-ref.html": [ - "ec5d16721067a71ffe76fd43b60826fca6d735a9", + "0c1f7184a6f3d66df4f35e747743e3a1ee3ee39c", [] ], "element-replacement-alt-ref.html": [ @@ -356534,6 +356640,14 @@ "ddb89d1fb2a3601509dbf19219b03b91c930ae84", [] ], + "grid-abspos-staticpos-align-self-center-large-border-padding-ref.html": [ + "f9b3436eebb305d7fb5274adc4b5ae5cc8f29094", + [] + ], + "grid-abspos-staticpos-align-self-center-ref.html": [ + "3f6fd20356c32abd681638f9ad63a0b8884438a7", + [] + ], "grid-abspos-staticpos-align-self-end-large-border-padding-ref.html": [ "7f2a5ad8377f9948d7640673eb76cfac3edfa3cd", [] @@ -359130,11 +359244,11 @@ [] ], "object-fit-contain-png-001-ref.html": [ - "b9f158093e76b7e9dc94648dcbaf6fbc74aed130", + "c0de70405a62b3b0bb33b99a8514c062d83d1aed", [] ], "object-fit-contain-png-002-ref.html": [ - "804bde94c1b0cb342e7e7a8a4d52cebd8b955278", + "20999a7d46f7ae75e905db55ac10cdfab32c3dbe", [] ], "object-fit-contain-svg-001-ref.html": [ @@ -359166,11 +359280,11 @@ [] ], "object-fit-cover-png-001-ref.html": [ - "96a1ec64b216a9c31e51e63401fe0892732c4755", + "11509a2a9dc456be71052431e694168af4b49d15", [] ], "object-fit-cover-png-002-ref.html": [ - "9dc589abeb6643624a45276f279155d94611788d", + "ac44c265ffc9a1d073eec31210de36f100ef4cd0", [] ], "object-fit-cover-svg-001-ref.html": [ @@ -359206,11 +359320,11 @@ [] ], "object-fit-fill-png-001-ref.html": [ - "19a03a19e47d71754d2218963378c18a0c19c088", + "d554c145a8d15f9a26b87c76ceb239af04894e70", [] ], "object-fit-fill-png-002-ref.html": [ - "b05469cf6e34d6a8934f8288f93e4c2ce957f2a8", + "c273a2d7b4b5305fc40ac792cbba838854238e86", [] ], "object-fit-fill-svg-001-ref.html": [ @@ -359238,11 +359352,11 @@ [] ], "object-fit-none-png-001-ref.html": [ - "bd25ed754e00edb04923c99f971813e09b758fa5", + "ffff406deee9441ba5e04691a70775569ce9a2cd", [] ], "object-fit-none-png-002-ref.html": [ - "8273d3b21e5b573a86cf78956afd66a7c74d4240", + "f3a0469aae468047d269556c351423e8ff5f9579", [] ], "object-fit-none-svg-001-ref.html": [ @@ -359270,11 +359384,11 @@ [] ], "object-fit-scale-down-png-001-ref.html": [ - "abf3788be2aef342b3318c4c7be8ecab65e15622", + "f0d81cc14500a7c546f9f8b042d8a57035aeaef8", [] ], "object-fit-scale-down-png-002-ref.html": [ - "3e516985f8cf0de6f5aa8fc1db62eb4acad198a6", + "2bdc7b7f66894fbdb493326eecdd3a6bfe0a9676", [] ], "object-fit-scale-down-svg-001-ref.html": [ @@ -359302,11 +359416,11 @@ [] ], "object-position-png-001-ref.html": [ - "1027cfc35ca607644225491df66616ce3f53eaab", + "93f6c877f94d28411ec5afd410ce7d9a5b0e9b97", [] ], "object-position-png-002-ref.html": [ - "bd14f9cfc5754834031a23c1170a1b60f05d49f6", + "3b5ceb7c33c86149269d08a2c64344955f5fc58d", [] ], "object-position-svg-001-ref.html": [ @@ -359825,7 +359939,7 @@ [] ], "template-object-fit-ref.html": [ - "068c74b4e41aa34cb19478e7441dda90215e5175", + "6063eb748f8614a9891c5f6abecf8acbf5816262", [] ], "template-object-fit-test.html": [ @@ -359833,11 +359947,11 @@ [] ], "template-object-position-ref.html": [ - "19661f41f6fb0b5b8fd979c1c0b2902b1d559260", + "93f358156e158f159c451cf11f31615e1ec57cda", [] ], "template-object-position-test.html": [ - "fb4b3ad3c7aeab61f44c394926735a97a8767d3c", + "b3cab1682a707e4599e8706aa572fbcd4b830c51", [] ] } @@ -363479,6 +363593,22 @@ "1e89789852b9ed51a0ae9e6ab6995ad996b8f438", [] ], + "block-ellipsis-repaint-001-ref.html": [ + "8a805980b2ed896a73dc888212bd491e83b28734", + [] + ], + "block-ellipsis-repaint-002-ref.html": [ + "b26e59787be50531d8ea4d125ba50530c798d9e1", + [] + ], + "block-ellipsis-repaint-003-ref.html": [ + "95c319f38bee0c9f1c03c80492be360968fe2657", + [] + ], + "block-ellipsis-repaint-004-ref.html": [ + "ec5756fb1c81c4bc84f93b8f39bcc0125eaf6809", + [] + ], "line-clamp-010-ref.html": [ "46ca731c5446db88ba4e5fc8a3d6b8b43c4fc056", [] @@ -379747,12 +379877,12 @@ "2c39a087e9eeb786967751acbbbda112ad590ff9", [] ], - "image-referrerpolicy.py": [ + "image-referrer-policy.py": [ "cff09165f1047eae0b7f94008d076cc3a417c282", [] ], - "image-referrerpolicy.sub.js": [ - "4fc9d46218f154736106c3294a77ce695f21ce1b", + "image-referrer-policy.sub.js": [ + "52152278d86a3d14bff8d3c9faa9bc33c98dc0d1", [] ], "relative-urls.css": [ @@ -380768,6 +380898,10 @@ "ce087d8846316fb1e4f5c0b2d1087bf73763ec0f", [] ], + "implicit-contain-ref.html": [ + "165296957bf93c5483857a5e6b8a82db754c711f", + [] + ], "nested-scope-ref.html": [ "951c0928687dcd6edb32e8e3aa7307bf3d6b3923", [] @@ -381061,6 +381195,10 @@ "zoom-precision-ref.html": [ "b24d903e5ba7479158a806506ad75057da827b70", [] + ], + "zoom-pseudo-image-ref.html": [ + "2378659761f59587d05ec73fba39ac4b12f388a0", + [] ] } }, @@ -387305,7 +387443,7 @@ [] ], "get.tentative.https-expected.txt": [ - "70beb5727e47727d8c2edb7fa20c03de930b4e78", + "ee5d9675973dedab16a4977e617f42bab5b2e60c", [] ], "support": { @@ -387884,6 +388022,10 @@ "5df4fa279363798f2f471467ed674c092c7a1749", [] ], + "large-dimension-document.sub.html": [ + "5d29f7be0bbb77e6303598aef833a810e84b6e80", + [] + ], "prefixed-animation-event-tests.js": [ "021b6bb9dfdc422d1a6c3c9c4a1a039f89a901d5", [] @@ -391843,7 +391985,7 @@ ], "fedcm": { "disconnect-iframe.html": [ - "ae97011a53535b66ae619132ae91a2d763bc1dad", + "acead8071d348183165ed454ab7c1ae6fddf15cf", [] ], "intercept_service_worker.js": [ @@ -391864,7 +392006,7 @@ ] }, "fedcm-helper.sub.js": [ - "d370ea6e374c0eb7272201452baac874771dce82", + "7330c3ef6c57748152a528a0923a88f695f655e5", [] ], "fedcm-helper.sub.js.headers": [ @@ -391876,7 +392018,7 @@ [] ], "fedcm-iframe.html": [ - "085d6128976f9852f638fd5b0c17912db13ea011", + "e814b4c15db63e79ed7e3b8c624e733044df1654", [] ], "fedcm-mock.js": [ @@ -394229,7 +394371,7 @@ [] ], "accumulated-oversized-payload.tentative.https.window-expected.txt": [ - "df0a946017563ea1cf3f55891d150d9445f71d9f", + "8ec6107e7f41f5203db0cb590a91174d6d3f8746", [] ], "cross-origin-iframe": { @@ -394239,7 +394381,7 @@ ] }, "oversized-payload.tentative.https.window-expected.txt": [ - "f37e984e156572ae95d5b0c1e2515b44344fb499", + "4f68d94f89de1a7c5824221703bef691eb809dba", [] ], "resources": { @@ -394380,8 +394522,20 @@ "fb306f99d3c8269a09109bcd4f473dd55adf52ba", [] ], + "iframer.html": [ + "ede09bc6b0ac5d41cc5d7e21c5c21ae222a79953", + [] + ], + "navigate.html": [ + "5796cb41be50d49ae635015a4f501748308b7277", + [] + ], + "openee.html": [ + "2e06a8d0328ca2cef71ea901a5383c9f9536fc78", + [] + ], "support.sub.js": [ - "09e234c5f24218f556109881f50c6551286e252f", + "157c2b400666cc4240539528f7ede306c67ab733", [] ], "target.py": [ @@ -397033,11 +397187,11 @@ [] ], "FileSystemBaseHandle-buckets.https.any-expected.txt": [ - "6c8aec561ff5ccbad971d213d862b9d61ea647f8", + "18df66719b93e9e426a15883ad890f4e665327a7", [] ], "FileSystemBaseHandle-buckets.https.any.worker-expected.txt": [ - "6c8aec561ff5ccbad971d213d862b9d61ea647f8", + "18df66719b93e9e426a15883ad890f4e665327a7", [] ], "FileSystemWritableFileStream.https.any-expected.txt": [ @@ -407344,6 +407498,316 @@ [] ] }, + "svg": { + "001.svg": [ + "055a7b278b7b943d501d68081ecafda4638592e9", + [] + ], + "002.svg": [ + "45ab566e661a6d4b12dae166c99c3abd66b4852f", + [] + ], + "003.svg": [ + "e59527938b5b2cd681d3360c9c2900a493a2702f", + [] + ], + "004.svg": [ + "000f52730c07ada24ce4981229e3859838c3617f", + [] + ], + "005.svg": [ + "9bb3bd68bb4a0ea7b6b1e51f2a671c4db53893af", + [] + ], + "006.svg": [ + "5edeba69718fb337e93285235fdcafaaa6307b2e", + [] + ], + "007.svg": [ + "7d8bcf8d4d6a57ee52220c02d9be08aba48828ce", + [] + ], + "008.svg": [ + "51065c944101fba881fb32f79c7e3c79f6c53b5c", + [] + ], + "009.svg": [ + "1996d256805747e947bcc01b7c830cbb0603adb6", + [] + ], + "010.svg": [ + "c5cce18678cc6de89336b265b271209ad5937326", + [] + ], + "011.svg": [ + "5618a89e292f235c0e397fccb7db34913c0fa6e5", + [] + ], + "012.svg": [ + "8a50f06c9786d14de338b8c77617fba5f2ab7622", + [] + ], + "013-1.xhtml": [ + "7fc593e07ef704637c61205362ccd4219617209f", + [] + ], + "013.svg": [ + "9dc0a47e5fa5d6ba0d9efb7fe75bdfc5b6e14c8d", + [] + ], + "014-1.xhtml": [ + "93d6ab7d2f22c834da0a728887df123ef280fcb8", + [] + ], + "014.svg": [ + "acee8efbf4db4550614f9868cb29296a9675fc27", + [] + ], + "015-1.xhtml": [ + "f5217a91e9de247aaeaf808eed5371f6567757b5", + [] + ], + "015.svg": [ + "de484d2b812db6d5b1172caf798a372162a2ea39", + [] + ], + "016-1.xhtml": [ + "d735cce60fa992521e5f9c5371d4a4aa06326aa1", + [] + ], + "016.svg": [ + "fe873924adbd2a8c31af4c54769b2ca7b42a4f5d", + [] + ], + "017.xhtml": [ + "598a2c6f3d31f9e048e011e1b0f698e5d03db4f3", + [] + ], + "018.xhtml": [ + "03ac442a36edbcde3b4faf72f91640c4d371ff2e", + [] + ], + "019.xhtml": [ + "9064a6049a07d3e9e50c757ffceed8d30c484e49", + [] + ], + "020.xhtml": [ + "7d96b4f12e2481775c97e75fbe629c52ffc7a18d", + [] + ], + "021.xhtml": [ + "4d82e744286be57e47ab0e03cebf7563c8d2ce18", + [] + ], + "022.xhtml": [ + "7354aeef8bb7c86f809ea490da796bc0d722a1c0", + [] + ], + "023.xhtml": [ + "65ede4bd8b4451992a389da03211b5383b58cba5", + [] + ], + "024.xhtml": [ + "5b4116c6c2dc06b51914f8c18bb4f092a9984f39", + [] + ], + "025.xhtml": [ + "86d68018fd8a1687d9972ca54ea5da14e2451fb1", + [] + ], + "026.xhtml": [ + "78699f1c6ea86c4778644ccf46274b2b59226126", + [] + ], + "027.xhtml": [ + "5dbce70ce9abff40fcec0dd7d0263e69f0c6bbab", + [] + ], + "028.xhtml": [ + "d60b518cd02e2ee70deafd8e7fa17dd9b528b36c", + [] + ], + "029.xhtml": [ + "d469841fadcd828dc355a82763e08844f3e3b25e", + [] + ], + "030-1.svg": [ + "62798a7e11df4897f42ec921e2e2173ebf698e82", + [] + ], + "030.xhtml": [ + "b20d6468150822f861a2acf7a9fb9b6e3cab4c60", + [] + ], + "031.xhtml": [ + "81c355d6c10b10847b35dfae8f74ddab21f47bb4", + [] + ], + "032.xhtml": [ + "dc5592d475e72389f839bd9ab4b25bc04ad46078", + [] + ], + "033.xhtml": [ + "7d55fec093e8960a06423d8bd1b598ca89476204", + [] + ], + "034.xhtml": [ + "5ac9dacc5cf314f5d375ca2225d662e6b16ee5ee", + [] + ], + "035.xhtml": [ + "261ae2e995b38123160eebe0f34f1751bd6149b2", + [] + ], + "036-1.svg": [ + "d16862da6409da92778bda89b20a8944ddbb4ffa", + [] + ], + "036.xhtml": [ + "cb774b3ebcb34b6a08ba77cc3fa8a903fc293695", + [] + ], + "037.xhtml": [ + "b97f99cc46e5427292905499785394129f58fab3", + [] + ], + "038.xhtml": [ + "c74b1db9ccb8d8c8798aa2758ea7d685658f9093", + [] + ], + "039-1.svg": [ + "7023ddd9389c4d6647c0ada3f16387f2599c05c7", + [] + ], + "039.xhtml": [ + "77bc7e9c9ddf7629bce8ce9c4baf56cea71149be", + [] + ], + "040.xhtml": [ + "6069563a915a6b8cc0f1a558ccd1b1fd380af4e4", + [] + ], + "041.xhtml": [ + "326bafe6395c76cbf4fc406fddefb926a7ff9ddf", + [] + ], + "042.xhtml": [ + "8226e49593343d24f187c741cfd85aab1d105140", + [] + ], + "043.xhtml": [ + "e11a4d82b2b21b1b7c14b818f90be91700df6187", + [] + ], + "044.svg": [ + "6dfcb4d6639690fd3a7eac79a2657b0449f6a5e9", + [] + ], + "045.svg": [ + "00dee4564cebd26aa050e8fc273e28a3bac28088", + [] + ], + "046.svg": [ + "20c27a75d9d7db57607be5337c53beb4ae5c98e3", + [] + ], + "047.svg": [ + "e10a5c5665d6cbaf270f43da9ce89ce3916cbbbd", + [] + ], + "048.svg": [ + "5a90f2144c0040e37dab56602a43b003eb969bd8", + [] + ], + "049.xhtml": [ + "de81c7b3137d244ae2282af58e5d52f50b8b7afa", + [] + ], + "050.xhtml": [ + "a8d73771b9fe4fe428513818697283d30495914f", + [] + ], + "051.xhtml": [ + "36a15c5491bc640d671216f70cbfe0c84182be48", + [] + ], + "052.svg": [ + "5a780cb4e923e79fcfe1d7425453097984fd3504", + [] + ], + "053.svg": [ + "6c1c4e64eb40ff1d30c847ba96e0b7a654d9bbe5", + [] + ], + "054.svg": [ + "b0daf03705d90143d5d4da9eab15651f3aeb7c27", + [] + ], + "055.svg": [ + "ee519baac8f177ba436b169bae54605642c77d3f", + [] + ], + "056.svg": [ + "088b375a6ef3bd71426b02de09d347a4c10a39fe", + [] + ], + "057.svg": [ + "165a45f3938f5649f45722ad2f70f35e9bc8bc2f", + [] + ], + "058.svg": [ + "d2bb91da8d36b1e389a51d370d1f028b8e8b434a", + [] + ], + "059-1.svg": [ + "492e9511a11b486cc35232a481a52a2117fdc6ab", + [] + ], + "059.svg": [ + "3cc7815c69f8e23473219ed86a50f6e12a564c6c", + [] + ], + "060-1.svg": [ + "3dc6689e599f34fd793a97668d12f00f5b7438bd", + [] + ], + "060.svg": [ + "fa7159abad853da744fd9b1eb9616b650f473ded", + [] + ], + "061.svg": [ + "20ed8a8360f488de9a4b8dc1b3515d0657c9a66b", + [] + ], + "062.svg": [ + "2cbf96e0ea498447fd950e5a034e8eb937cdd603", + [] + ], + "063.svg": [ + "3f570b6adb0d8bb81b16380e38ede9f99854d358", + [] + ], + "064.svg": [ + "5369de9f4470c49cdd66235428ba3e63c83e23aa", + [] + ], + "065.svg": [ + "89e158f2f9dc76a7e0f8f3420154beb162b6f6cc", + [] + ], + "066.svg": [ + "f5066ac3574030e02815b0af4310544949f50e43", + [] + ], + "067.svg": [ + "9156a0ff2ee002dbc59be84f33e9d1261f47fddc", + [] + ], + "helper-drop-selection-here-textArea.svg": [ + "783c164eb22db9487414d50761af56ea221e7767", + [] + ] + }, "target-origin": { "004-1.html": [ "94e43087434ec4d55dbff13b4bb9f56f4c9a1c54", @@ -407863,7 +408327,7 @@ ] }, "structured-cloning-error-stack-optional.sub.window-expected.txt": [ - "be47723bd88d5bc35a473ea02c009cc19ea86466", + "07cd37bfd75d757d9d46e9aa6c430897081ee72c", [] ] }, @@ -414584,6 +415048,10 @@ "6dee534d252a1cb57aeb23e1d1f5ba3b02639dde", [] ], + "script-src-event-handler.sub-expected.txt": [ + "68de27d4c299e07b66a35ae4ef010afbcf4fb871", + [] + ], "svg-image-href.tentative.sub-expected.txt": [ "ff9f8d16bec04a225aa4d029a10c227319a1d657", [] @@ -418430,6 +418898,10 @@ "6b258642c3b1a037ce33e59229d75d1a384a5f25", [] ], + "origin.tentative.idl": [ + "c2f9117133934d44f2a95cf4dc4d545afd454eef", + [] + ], "page-lifecycle.idl": [ "26de11c23d0c160f383fb2d6513b6a2ffbb1c6bd", [] @@ -419350,7 +419822,7 @@ } }, "lint.ignore": [ - "75a20041d5f3e08c58230f3583474ef3f4143af1", + "5571f01eb8ad3be8340bf382beaabbcacc3cd08e", [] ], "loading": { @@ -421894,6 +422366,10 @@ "f3767215c16f4d8bb7b0d43d0fd0e47abea4be59", [] ], + "GUM-echoCancellation-all.https-expected.txt": [ + "e5a7c53cff32093f937262d5de32a2d2491f3ff3", + [] + ], "META.yml": [ "97363cf368e945933ae134d0b3e907bf2c026e88", [] @@ -422655,7 +423131,7 @@ [] ], "opaque-origin-page.html": [ - "98e2c1b3175722ce87bc7694bc1915ceadc52920", + "ff4556ed5ce5cd17b3b28ed469a8112e46918415", [] ], "post-entries-length-to-top.html": [ @@ -422710,7 +423186,7 @@ [] ], "back-forward-opaque-origin-page.html": [ - "ec633639524aaa04917eb38505e47a59d9686e24", + "b62b573b5f2d1cd6972c8d0579e5b2a8b34af91a", [] ], "helpers.js": [ @@ -422756,6 +423232,12 @@ ] } }, + "resources": { + "helpers.mjs": [ + "2208dab3b0b875843f62721d2c07d4f0b4471d33", + [] + ] + }, "state": { "resources": { "helpers.js": [ @@ -433236,11 +433718,11 @@ [] ], "bucket-quota-indexeddb.tentative.https.any-expected.txt": [ - "135a0f85ca34b0d02d7c5c9907c0f71888eb496d", + "5daf616702afb3804673a98a418617d839e2f272", [] ], "bucket-quota-indexeddb.tentative.https.any.worker-expected.txt": [ - "135a0f85ca34b0d02d7c5c9907c0f71888eb496d", + "5daf616702afb3804673a98a418617d839e2f272", [] ], "resources": { @@ -435554,10 +436036,6 @@ "d2e90ed1cd17f82058d94caeb9e102cc3032de3f", [] ], - "Element-setAttribute-setAttributeNS-sinks.tentative-expected.txt": [ - "17237445dcee95d9dfb3eb9bad75aa9533cce752", - [] - ], "META.yml": [ "04061ac0f66a849b4dd2f71c8abef40f47240a96", [] @@ -435626,10 +436104,6 @@ "ade0e660b6a5a8e2d8482297bf7a8d915907b19a", [] ], - "get-trusted-types-compliant-attribute-value-expected.txt": [ - "629e7e7af1818cfea21db86db891cb930a1e1310", - [] - ], "idlharness.window-expected.txt": [ "9d36f476f0a42e895f5845aba7dd5098bb32ac08", [] @@ -435642,10 +436116,6 @@ "7d5c6e8fbf92b4b9cdd271ac9761c5ab4179a2cf", [] ], - "modify-attributes-in-callback-expected.txt": [ - "9a1eb057f50d3a7150b6d949d55a49625c8da8ee", - [] - ], "navigate-to-javascript-url-003-expected.txt": [ "9015f1ed55d99b43fc10881f86122ec94abd3889", [] @@ -435692,16 +436162,8 @@ "b8e0fbbcdd6f7e9f6bf2e3aa7a74198f88e63991", [] ], - "set-attributes-require-trusted-types-default-policy-expected.txt": [ - "05039edea5d5b9c9a15d0449df3493984be7d263", - [] - ], - "set-attributes-require-trusted-types-no-default-policy-expected.txt": [ - "7aac235fa3f02b7b96ea50043907bbf2cac69809", - [] - ], "set-event-handlers-content-attributes.tentative-expected.txt": [ - "d75e37783703bf028d95a28b9000ffe5651a34aa", + "530d09d58956c1087df7cb317c8773ec07f7fc4d", [] ], "should-sink-type-mismatch-violation-be-blocked-by-csp-001-expected.txt": [ @@ -436119,7 +436581,7 @@ [] ], "trusted-types-reporting-expected.txt": [ - "511e25b8778e2babda28a9a551042b33a5f6f1c2", + "e651955c270f0652260bb98e890f3c8501648d6a", [] ], "trusted-types-reporting-for-DedicatedWorker-ServiceWorkerContainer-register.https-expected.txt": [ @@ -436130,10 +436592,6 @@ "85f814b9b5f3f974bb98a7411fc0932ed8879af2", [] ], - "trusted-types-reporting-for-Element-setAttribute-expected.txt": [ - "684d75adf3435a4f056b52110d02edfe4233696f", - [] - ], "trusted-types-reporting-for-ServiceWorker-ServiceWorkerContainer-register.https-expected.txt": [ "8af05a71b6b4c111db6e535ff314d701f2709d5f", [] @@ -436155,7 +436613,7 @@ [] ], "trusted-types-svg-script-set-href-expected.txt": [ - "c498de15f64bcdae521b5d2ca6bb2c9f4a6bcde5", + "890cfe46f415508617eaced341243be1f680b4c2", [] ] }, @@ -438639,7 +439097,7 @@ [] ], "property-list.js": [ - "21f39b1fc185345f3794cb9f0f28865e10c7ceb6", + "f11f20dfaae7098af00700313ce4b1fccb8834ac", [] ], "property-types.js": [ @@ -440815,6 +441273,10 @@ "__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] + ], + "invalid-expected.txt": [ + "22e10307442b870b44d725ad8318d9d57f749c34", + [] ] }, "add_intercept": { @@ -440877,6 +441339,12 @@ [] ] }, + "remove_data_collector": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, "remove_intercept": { "__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", @@ -441613,7 +442081,7 @@ [] ], "helpers.py": [ - "9a7de51a417adb47fc6c6956df4e5b79a9767fac", + "8db6a6078e0a48482fab2d0359ab4e3cc7a44892", [] ], "html": { @@ -442375,7 +442843,7 @@ [] ], "RTCRtpTransceiver.https-expected.txt": [ - "7a07190ce98f3583d9c15b123b4ad711ac39b217", + "3661b1e2a89371e612930805b28f985b571073eb", [] ], "WEB_FEATURES.yml": [ @@ -442609,7 +443077,7 @@ [] ], "script-transform-generateKeyFrame.js": [ - "5e68ee1fb9be8133501ee3f5338f4335bd4901de", + "bf8b7535ba9e0c9292ddcb90d7efaf27d149756b", [] ], "script-transform-sendKeyFrameRequest.https-expected.txt": [ @@ -442617,7 +443085,7 @@ [] ], "script-transform-sendKeyFrameRequest.js": [ - "361d7ce0235794b8a39201b5869a38f6720c80ca", + "990b43d2e5fe1cb3e70d2e0908047c29e5004caf", [] ], "script-transform-worker.js": [ @@ -442762,10 +443230,6 @@ "f73ad23fc53014c79fb1d0aa11ece0ab1c2f8ff1", [] ], - "outbound-rtp.https-expected.txt": [ - "fb3703309450f9875522465b9fd34bda721c747a", - [] - ], "rtp-stats-creation-expected.txt": [ "aefa0ff96ef12a4d26c12d969cfde3092d8eb2d0", [] @@ -443223,11 +443687,11 @@ [] ], "storage_local_setitem_quotaexceedederr.window-expected.txt": [ - "46a5fb07eb8d22ccd92d911b64679a5d5f429da4", + "f2cce0cfe2394033bd55bc2c8c9d54f03008c171", [] ], "storage_session_setitem_quotaexceedederr.window-expected.txt": [ - "c5fe5ba652b61147ac139cf107297347df9bbbf9", + "c8301b460aa4d8c187862cbb36b467a7ecdff61f", [] ] }, @@ -495643,6 +496107,13 @@ {} ] ], + "style-src-elem-allowed-src-blocked-link.html": [ + "ce4dae7aeaaeed710cf093ba0f2efaa050f2aebf", + [ + null, + {} + ] + ], "style-src-elem-allowed-src-blocked.html": [ "c15cf0bcf64cb535de38235bf1971cd7e4e7f1d0", [ @@ -501129,7 +501600,7 @@ ] ], "anchor-getComputedStyle-002.html": [ - "753634a3f42e7d874af3f63a2c5c05fd375d9558", + "862856bdb19b91468279a53398d9e599ad0bbaef", [ null, {} @@ -501262,14 +501733,14 @@ ] ], "anchor-name-multicol-003.html": [ - "02fd1c164d65865940a1506ffe15c927d3324c05", + "d1f3c38b87c275caa3d10fa3e8cb8c47bb2b338d", [ null, {} ] ], "anchor-name-multicol-004.html": [ - "fdd1772359ff609af103adce8fe5c673e360f8cf", + "3b1f060e1b1acbc439417525ac3ea71b7962f845", [ null, {} @@ -501374,7 +501845,7 @@ ] ], "anchor-position-grid-001.html": [ - "7bd389b39d8d6642f02181e475bbc5eaa7322f2d", + "006c4b851d5a582d5fe18ee8d27a3378dfab29b4", [ null, {} @@ -501416,21 +501887,21 @@ ] ], "anchor-position-multicol-002.html": [ - "287b5521fce53ac52d67c4bbefa9644eb8496f48", + "b4a4a7a4c189ba84cb00f60c5cc94cdf1a557105", [ null, {} ] ], "anchor-position-multicol-003.html": [ - "d23779ad9bf88ee4b49f9c9bdc97d3ce47d2a509", + "f2a4b9343f311caf86647228afc7b1e7c7593815", [ null, {} ] ], "anchor-position-multicol-004.html": [ - "8f7a3dad12915ddbea9bd88077694434d0a17b48", + "0137ad53d13b6888d2bf3663226177aff07e79de", [ null, {} @@ -501465,7 +501936,7 @@ ] ], "anchor-position-multicol-fixed-001.html": [ - "b94680816e9aca235b7e499e1d902fbd95dd442e", + "062021877968296ca2c87086692a85487065673e", [ null, {} @@ -501513,6 +501984,13 @@ {} ] ], + "anchor-positioned-containing-block-resize.html": [ + "79c788b15a736d504fe9b5b241573fdddf26ad37", + [ + null, + {} + ] + ], "anchor-query-custom-property-registration.html": [ "af211a0ee5d8336dbd4b67c33a371907a5675d19", [ @@ -501984,7 +502462,7 @@ ] ], "position-visibility-computed.html": [ - "1ba494ca3322d5771d099b4ecac97813df3ffc25", + "e32280b3a14de8ff0626d3811890be81ef68242d", [ null, {} @@ -502071,7 +502549,7 @@ ] ], "position-area-computed.html": [ - "8e1800644867ef06146a4d001a0bed5fe13a7324", + "4b3fb62af8ccbb2f72125bd5fd2b4612f5283d4a", [ null, {} @@ -506324,7 +506802,7 @@ ] ], "opacity-computed.html": [ - "27d9316415f24bf8e398cc992508b0036935291c", + "5ce304cc1af7627058d165fa57082614122ca41f", [ null, {} @@ -506338,7 +506816,7 @@ ] ], "opacity-valid.html": [ - "ad65ad6df2bbbc6f4f2119441200f6bc1396d91b", + "5a36ec39ae4ccdf1c4cafec26bdbe3074ad0060f", [ null, {} @@ -519493,6 +519971,13 @@ {} ] ], + "offsetProps-002.html": [ + "9bfaeea20ea5e12440f7a5aa5fba3ac48894a900", + [ + null, + {} + ] + ], "parsing": { "column-count-computed.html": [ "702632d2dd4d306368951af65e9c32d7f2e2f554", @@ -520387,6 +520872,15 @@ } ] ], + "scroll-button-and-scroll-marker-not-in-event-path.html": [ + "019589548414949cf54c7a30523f293f40805d9a", + [ + null, + { + "testdriver": true + } + ] + ], "scroll-button-disabled-no-focus.html": [ "a88977068742f03bdd4929ff1e3f96e581d9ba2d", [ @@ -531626,7 +532120,7 @@ ] ], "text-decoration-computed.html": [ - "c0783969ab30346955c4a46190ab836acdcbab51", + "94804170b4bb20908ef5db558cf2051e80833c4f", [ null, {} @@ -537649,7 +538143,7 @@ ] ], "progress-invalid.html": [ - "f135487e1c4dd0cef9d99652c7c10a8ebe44070a", + "1d6993a895429df956965df108ae02421b980bf0", [ null, {} @@ -538025,21 +538519,21 @@ ] ], "url-request-modifiers-computed.sub.html": [ - "bc8c4ad95df7a33a64b92d240cf68d14594745b2", + "20c570a5c8e7a7e210b260d94b856f4d2043277d", [ null, {} ] ], "url-request-modifiers-invalid.sub.html": [ - "c30edfbaeaae9f3a610c5c6e12becdae85ff1ebb", + "f0e1a59053f8a27d3db382dbc5919b0a81d533b5", [ null, {} ] ], "url-request-modifiers-serialize.sub.html": [ - "cca9f2ccf9b04719e8266d56fde09fb0154fcb47", + "e60a0a268d4389d2ee715f394f05ae55a9a2bba8", [ null, {} @@ -541573,6 +542067,13 @@ {} ] ], + "getBoundingClientRect-scroll.html": [ + "4bcfe5e3de7bbc052732c8737345e5ca8acb6304", + [ + null, + {} + ] + ], "getBoundingClientRect-shy.html": [ "55349e93969af0d527da4bcb589804239164bafc", [ @@ -545456,8 +545957,8 @@ {} ] ], - "behaves-like-button.tentative.html": [ - "719ce316681d4bef8e6fd33c4fa2b7620db5c5eb", + "behaves-like-button-with-popover.tentative.html": [ + "13f6aebc431d7c89a65760aa1e084951abda8a4e", [ null, { @@ -546942,7 +547443,7 @@ ] ], "create.tentative.https.html": [ - "67630d1426b6b370609ec6ae970c6db33cb18e34", + "a6e0114e33d3fac09f12472ca8310d09dbbebd32", [ null, { @@ -548816,6 +549317,20 @@ } ] ], + "scroll-event-fired-to-element.html": [ + "3484a2ec92b2bd8faa1d5147568f13a83b8c59d9", + [ + null, + {} + ] + ], + "scroll-event-fired-to-iframe.html": [ + "2ff3de79d33fa0a676a0eda4f109b6d0e634cc9d", + [ + null, + {} + ] + ], "scrollend-event-fired-after-sequence-of-scrolls.tentative.html": [ "dab6dcc9bd8d67a514ca95daf3e1d64b10a45188", [ @@ -555952,6 +556467,15 @@ {} ] ], + "mathml-html-serializtion-on-copy.html": [ + "4440bf87d77189c1c729b020b4c2fd52e9f3b798", + [ + null, + { + "testdriver": true + } + ] + ], "merge-span-with-style-after-backspace-having-contenteditable.html": [ "651ec1c56c8ec8526ddc763d5d9fc0368371286f", [ @@ -557984,6 +558508,13 @@ {} ] ], + "text-not-observed-when-changed.html": [ + "baabf87cdcd44df14e2188d5b92b3883f63133bf", + [ + null, + {} + ] + ], "text-with-display-style.html": [ "94e89fcf7270b43634b4c651c961d539a38f59fa", [ @@ -587543,6 +588074,575 @@ "testdriver": true } ] + ], + "iframe.tentative.https.window.js": [ + "d2b532aeae4ebdb18da446b888f720b29b3b2ab8", + [ + "fetch/local-network-access/iframe.tentative.https.window.html?include=from-local", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/resources/testdriver-vendor.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/iframe.tentative.https.window.html?include=from-loopback", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/resources/testdriver-vendor.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/iframe.tentative.https.window.html?include=from-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/resources/testdriver-vendor.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/iframe.tentative.https.window.html?include=from-treat-as-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/resources/testdriver.js" + ], + [ + "script", + "/resources/testdriver-vendor.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ] + ], + "navigate.tentative.https.window.js": [ + "abdefb8cd7cf07a8a1b8a4f8ebe42cadd6f5df75", + [ + "fetch/local-network-access/navigate.tentative.https.window.html?include=from-local", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/navigate.tentative.https.window.html?include=from-loopback", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/navigate.tentative.https.window.html?include=from-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/navigate.tentative.https.window.html?include=from-treat-as-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ] + ], + "navigate.tentative.window.js": [ + "4186bad589910eee342f29ab135da79d51bde5b0", + [ + "fetch/local-network-access/navigate.tentative.window.html?include=from-local", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/navigate.tentative.window.html?include=from-loopback", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/navigate.tentative.window.html?include=from-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ], + [ + "fetch/local-network-access/navigate.tentative.window.html?include=from-treat-as-public", + { + "script_metadata": [ + [ + "script", + "/common/subset-tests-by-key.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "resources/support.sub.js" + ], + [ + "timeout", + "long" + ], + [ + "variant", + "?include=from-loopback" + ], + [ + "variant", + "?include=from-local" + ], + [ + "variant", + "?include=from-public" + ], + [ + "variant", + "?include=from-treat-as-public" + ] + ], + "timeout": "long" + } + ] ] }, "metadata": { @@ -616120,31 +617220,6 @@ {} ] ], - "origin.tentative.any.js": [ - "fbdb067873200891b00807b9dbf6f279ad940fc9", - [ - "html/browsers/origin/origin.tentative.any.html", - { - "script_metadata": [ - [ - "title", - "Origin" - ] - ] - } - ], - [ - "html/browsers/origin/origin.tentative.any.worker.html", - { - "script_metadata": [ - [ - "title", - "Origin" - ] - ] - } - ] - ], "relaxing-the-same-origin-restriction": { "document_domain.html": [ "d3af35c6d7ac50de4fd8942066875d52229634f2", @@ -616181,6 +617256,118 @@ {} ] ] + }, + "tentative": { + "api": { + "idlharness.any.js": [ + "7f76c957d7c33407fadfac5d7e3b9cf68bfac3fe", + [ + "html/browsers/origin/tentative/api/idlharness.any.html", + { + "script_metadata": [ + [ + "script", + "/resources/WebIDLParser.js" + ], + [ + "script", + "/resources/idlharness.js" + ] + ] + } + ], + [ + "html/browsers/origin/tentative/api/idlharness.any.worker.html", + { + "script_metadata": [ + [ + "script", + "/resources/WebIDLParser.js" + ], + [ + "script", + "/resources/idlharness.js" + ] + ] + } + ] + ], + "origin-comparison.any.js": [ + "e5857675227a0b24d67fe132675fc21a3060e6b7", + [ + "html/browsers/origin/tentative/api/origin-comparison.any.html", + { + "script_metadata": [ + [ + "title", + "`Origin` comparison" + ] + ] + } + ], + [ + "html/browsers/origin/tentative/api/origin-comparison.any.worker.html", + { + "script_metadata": [ + [ + "title", + "`Origin` comparison" + ] + ] + } + ] + ], + "origin-fromURL.any.js": [ + "34c2a62b96faa238e4cd1c296ce99103c2dd4406", + [ + "html/browsers/origin/tentative/api/origin-fromURL.any.html", + { + "script_metadata": [ + [ + "title", + "`Origin.fromURL()`" + ] + ] + } + ], + [ + "html/browsers/origin/tentative/api/origin-fromURL.any.worker.html", + { + "script_metadata": [ + [ + "title", + "`Origin.fromURL()`" + ] + ] + } + ] + ], + "origin.any.js": [ + "3f77dad44b1427a15446eccd2870aaa9bbc6741f", + [ + "html/browsers/origin/tentative/api/origin.any.html", + { + "script_metadata": [ + [ + "title", + "`Origin` Construction and Parsing" + ] + ] + } + ], + [ + "html/browsers/origin/tentative/api/origin.any.worker.html", + { + "script_metadata": [ + [ + "title", + "`Origin` Construction and Parsing" + ] + ] + } + ] + ] + } } }, "sandboxing": { @@ -645976,6 +647163,13 @@ {} ] ], + "patch-range.html": [ + "bf05c2b6fbd5e4ed95aa01ce68b721cb9480a674", + [ + null, + {} + ] + ], "patch-self.html": [ "e5938b69554929a91caafdfefcbef469ee0e8555", [ @@ -657428,15 +658622,15 @@ {} ] ], - "color.tentative.html": [ - "0bfb94868e4ba0baf1894f7408eee61f5c2ace9d", + "color.html": [ + "7275215a21e084f12914a686ded068bc81bdd918", [ null, {} ] ], "color.window.js": [ - "28ec9ec4d86522677b395a2321eed298d069eac1", + "37eb9b443645de68a02f8a03dda475be75708332", [ "html/semantics/forms/the-input-element/color.window.html", { @@ -681680,6 +682874,36 @@ } ] ], + "GUM-echoCancellation-all.https.html": [ + "197bb39d8858594058adc7b63adb0f08574c2589", + [ + null, + { + "testdriver": true, + "timeout": "long" + } + ] + ], + "GUM-echoCancellation-boolean.https.html": [ + "0402596e87a9fd2611586a299e202362224d707a", + [ + null, + { + "testdriver": true, + "timeout": "long" + } + ] + ], + "GUM-echoCancellation-remote-only.https.html": [ + "f9b92d703428b8df310b722ee98ef214e7485e33", + [ + null, + { + "testdriver": true, + "timeout": "long" + } + ] + ], "GUM-empty-option-param.https.html": [ "5c6b3785a3a892cbb71f50cdaed84f94ae07a1f8", [ @@ -683930,7 +685154,7 @@ ] ], "history-back-same-doc.html": [ - "885d558bb5d5350afb817c9db64be442e7155862", + "9ef2d1c746191ff1dfa0bd025d526d5a858eb5b3", [ null, {} @@ -683986,7 +685210,7 @@ ] ], "navigation-back-forward-same-doc.html": [ - "cd307a3d538e5842e1061fc9523af5ad84dd5f91", + "1faa949d4e2d50655d27e37ace2437558a360867", [ null, {} @@ -684028,14 +685252,14 @@ ] ], "navigation-navigate-replace-same-doc.html": [ - "79ade9396f393484ae5c6cb19936238cd9749a4f", + "019798dc268f94e4cacade5e5649ac6124bdd88e", [ null, {} ] ], "navigation-navigate-same-doc.html": [ - "0cf5214eae62c0259cccb6c80e3d46f4fa21f551", + "0601189449e0237b597bc0db39a0fd936284d49a", [ null, {} @@ -684148,7 +685372,7 @@ ] ], "cross-origin-traversal-redirect.html": [ - "f7bebae510009867819a72489783cfd6478c6458", + "a1cc17772d66a2ff2f01c3f5fd4f1e438128cc27", [ null, {} @@ -684458,7 +685682,7 @@ ] ], "intercept-popstate.html": [ - "f5f9d82be7f7ec737ea68bae57f7baf24a30a149", + "32a5fb1d20f910cea86ca0976d3b827145ad0626", [ null, {} @@ -684539,14 +685763,14 @@ ] ], "navigate-destination-after-detach.html": [ - "1dcb6cac4377ab79551ec51382308d6d669b5670", + "6ddb67122e2af90aee4303929a10215d2520d971", [ null, {} ] ], "navigate-destination-dynamic-index.html": [ - "535e5cfee788c4aaba7005518568079fb6eda54e", + "02e74535fdee6f2ef617721d3df8371c5117dff1", [ null, {} @@ -684653,7 +685877,7 @@ ] ], "navigate-history-back-noop.html": [ - "109106b77fcd34de072fb090081b88d6d2630775", + "11faca385dff232b097d1619d6150b6905363a62", [ null, {} @@ -684723,7 +685947,7 @@ ] ], "navigate-navigation-back-same-document-in-iframe.html": [ - "42c694e2905d73eb7ba92dc7a96c3c3152febf8e", + "fc1070785ccba9a20775a5237cf6e413851b1ed0", [ null, {} @@ -684800,56 +686024,56 @@ ] ], "navigation-back-same-document-preventDefault.html": [ - "f8e31252a42e8b5519bb1fcae456bedc7e5050bc", + "f9c68e8c3fa40fac475d02c9bffbc8dd5f17d2f7", [ null, {} ] ], "navigation-traverseTo-in-iframe-same-document-preventDefault.html": [ - "b3b57f2a1abf8e285660d8e6e902b25ae38bcf0d", + "46a8349f010eae2acec30ced31981cf5d43dd8b3", [ null, {} ] ], "navigation-traverseTo-navigates-top-and-same-doc-child-and-cross-doc-child.html": [ - "479f54213a95ccd64c8b215cd1c4fa60d94dc21f", + "d27f108ec56e1b120e6d17a8b4a751e6a083fd55", [ null, {} ] ], "navigation-traverseTo-same-document-preventDefault-multiple-windows.html": [ - "34f227a183fa8231127e090aec4fed62ded8b6a2", + "0c39e4a213bfadcee568df2f7a5ce0fe632ca39e", [ null, {} ] ], "navigation-traverseTo-top-cancels-cross-document-child.html": [ - "4ece3ca8cbc013ee92adf36910ffa293a64f1b8d", + "0b0e297b1aedafea3681db95c1561bac3b6b956a", [ null, {} ] ], "replaceState-inside-back-handler.html": [ - "29409b5e2bc3e680cf99f54abea90bcdd5bfd1b2", + "11595ce9f8ca157cbab598e0d0f9db2efed075fa", [ null, {} ] ], "same-url-replace-cross-document.html": [ - "b6bd0cdd88358ba439cada84c9160c1e70f89e65", + "f5d7988025495f078ef4bfa3a909bb8b401ad582", [ null, {} ] ], "same-url-replace-same-document.html": [ - "cc4faffe77ab732520fdf1653dd831abf0655385", + "bdffdc42d1531754985b52377ce8b88111d20d1e", [ null, {} @@ -684914,84 +686138,84 @@ ] ], "activation-history-pushState.html": [ - "bcc56136f7e2e8352f0c152442ab027e0bb3105c", + "a4f4583f5756dbbcbf54d975ff740c9af3aaf600", [ null, {} ] ], "activation-history-replaceState.html": [ - "70dc7b8eedee59e40a53155750b6ddd70e7faffa", + "fb3d55ad2d63ceb95896d08c828a2c11ebb7c40e", [ null, {} ] ], "activation-initial-about-blank.html": [ - "402093809ca653393fefaa65cfece2289bebe524", + "9a19393c2c555edefe593bed2c25972e85169140", [ null, {} ] ], "activation-push-cross-origin.html": [ - "15651bf78aac90b6d8770174eb347779f286450e", + "d59ab8372f94e8a6cf27918b2cfe1d2c8efeb738", [ null, {} ] ], "activation-push.html": [ - "99548314c4606044eaa9530c9c76848488e6a500", + "de08c532ea505f51d7c402485c84ed9878abe19e", [ null, {} ] ], "activation-reload.html": [ - "f65afc74bc1458d27f5363d01a8093d0632636cf", + "066feb212351a7ae0943fdecbdb5814a266edacf", [ null, {} ] ], "activation-replace-cross-origin.html": [ - "a835b7f4c52a29a6fcc3c79c1344ece9d919b7de", + "58045ea1522d5d6b53981ecea43ea3cc9346eee3", [ null, {} ] ], "activation-replace.html": [ - "71624fd7cece6156d023a4f21fceed288f492ada", + "0be428c7c8679f4b52150dbc69ce9b09aa6a23c4", [ null, {} ] ], "activation-same-document-then-cross-document.html": [ - "3daa4de66ee3aa069c08ae682290b52d6a519714", + "794e52031d9784fb082a27697ec1732bfdc139ae", [ null, {} ] ], "activation-traverse-not-in-entries.html": [ - "c8386615a24f6ce5f50b7a60102559efb55003ab", + "d78a34855ae7cdb2ad88c911d212365242951b7d", [ null, {} ] ], "activation-traverse-then-clobber.html": [ - "c02837624098d9e4b5bcfba5e67704ffb4c765f8", + "e15b7f335b13d9dc9d911d69c3bf031fccba8dbf", [ null, {} ] ], "activation-traverse.html": [ - "218fe8626910a888a31b080fa4f3cc77b9953d4d", + "9d13ec2ae2762d7723d1a646c1df0ade51407f29", [ null, {} @@ -685000,7 +686224,7 @@ }, "navigation-history-entry": { "after-detach.html": [ - "c4ecfec44d69eaf7183691e69a1d21dd544d8ff7", + "9c73795025bd49850079ee38aeb104e68d1c0b69", [ null, {} @@ -685035,7 +686259,7 @@ ] ], "entries-after-blank-navigation-from-cross-origin.html": [ - "d527637ed353a37b6e737ba75560c19e27da20fe", + "e17d8937ca89c6adc729f0b0d0c0876948e2b78e", [ null, {} @@ -685233,7 +686457,7 @@ }, "navigation-methods": { "back-forward-multiple-frames.html": [ - "6c30987f7598de076e5e8820d686577a8fa6b03e", + "b7e980dda3252a9e7dc403cd24869aa935e97cfc", [ null, {} @@ -685261,14 +686485,14 @@ ] ], "disambigaute-traverseTo-forward-multiple.html": [ - "92f23f0acff9e2ecc06fcba1ee54662bac12bcac", + "ecb92ed07561fc70cda522ee0e404a360b18f73f", [ null, {} ] ], "forward-to-pruned-entry.html": [ - "18b30c620d59c8ad48c8fd8524aa1a880ae98429", + "67006c6c2b1013654c4c854d806ffe264a1c2bec", [ null, {} @@ -685310,14 +686534,14 @@ ] ], "navigate-history-push-same-url-cross-document.html": [ - "2d07bdcede21ff2b75f0c2292cf454a86816ebf2", + "00020ea93d0ec621ccdd39d2e39a9c6c344b79e9", [ null, {} ] ], "navigate-history-push-same-url.html": [ - "a81215f7d46a32348486cb98acc6d1ec02afc9a3", + "59c0ac840f11a652921803e9365ecb4dd270737d", [ null, {} @@ -685466,14 +686690,14 @@ ] ], "back-already-detached.html": [ - "f9ff04f923c80b3d224a11c155f87f391ad1fe2d", + "ebaa15be91a6e216becdcf196136a8584c7d1389", [ null, {} ] ], "back-beforeunload.html": [ - "82c1f589ccf58ad495715ad3fd29e5895619bf93", + "dfb79861bedde7f2ebc4926dedf29b36766c77d4", [ null, {} @@ -685501,56 +686725,56 @@ ] ], "back-intercept-rejected.html": [ - "013ebf1e1e3df145b4e9037452e89b043c283fa7", + "cda4ea71d7b3fd202cb3fec6165412cf65959908", [ null, {} ] ], "back-intercept.html": [ - "1db2f870d8dce440720640507cd17986ff1bf4f7", + "112a712d45bd31f06323446b908b4558c2df9042", [ null, {} ] ], "back.html": [ - "5521de25b7950e09fe17683e9e9d335efe27a1bd", + "16e4db1310aa693d666ddd64cc7628468af2aa29", [ null, {} ] ], "forward-already-detached.html": [ - "4dfa74d9f9b9153f23ac36aeeafeb08316e902e4", + "8f337e2eb6ab624150b05cf38fd27aea25b48cc1", [ null, {} ] ], "forward-beforeunload.html": [ - "87fa4baa935a7f1739b44db9a4685065f6d0a47c", + "642c4510a61cd56fbb8aaf71729c43d76c732869", [ null, {} ] ], "forward-intercept-rejected.html": [ - "9d5318a260d77244972795bb6a94d94edba680a1", + "658146a15de70e0d744c930091d4fc9d88ed56f1", [ null, {} ] ], "forward-intercept.html": [ - "3c5211974541191792fb2b4d72ef7871dba70c36", + "d6ea5dcc1c83bc4b3b8752dbaa50d14490d23a88", [ null, {} ] ], "forward.html": [ - "5ba58f2c8ea19ac5f42a295b386eff2533bc79f6", + "c1ac710cea3db4d77ee10e3e5e987201fe4a9b10", [ null, {} @@ -685620,7 +686844,7 @@ ] ], "navigate-intercept-interrupted.html": [ - "7f661b80b6d494c0088d3cc02da251853e6c65fa", + "86123cc540a5c506ba12687a0ad7da0ba832af52", [ null, {} @@ -685641,14 +686865,14 @@ ] ], "navigate-interrupted-within-onnavigate.html": [ - "249a7df69c2fff137c08fd5819382bec2a42fe1e", + "a3106ddd31bbc5436374eda5d693d4a82f52b523", [ null, {} ] ], "navigate-interrupted.html": [ - "d1ade5b423da7ca19d6b8d9a11a25e92dcae7321", + "3ed522508671c803d3580b2783f019cf8ed7a7d5", [ null, {} @@ -685683,14 +686907,14 @@ ] ], "navigate-push-initial-about-blank.html": [ - "9d47c8d0b5d83bfdf1b133cff7bb93ea657ce9c8", + "3431f03d4b63605523db1d634e06a4fd3ac6cc1c", [ null, {} ] ], "navigate-push-javascript-url.html": [ - "e41e06a78dc29f2913da53505566a2670ba3441d", + "6db41bb78e1240f95bc1e1acd1758c94c4cbe60f", [ null, {} @@ -685872,7 +687096,7 @@ ] ], "traverseTo-cross-document-preventDefault.html": [ - "09c91ee647ef7ffa3a9906faa4f1c14e0e830ab7", + "b40297206cf0250dff90be38f52d054453cffa65", [ null, {} @@ -685886,42 +687110,42 @@ ] ], "traverseTo-detach-cross-document-before-navigate-event.html": [ - "ed319f6223936830c15d36a08e9c782f59bffc1b", + "1833e1aef3496d165b9413346dc71df25f73629c", [ null, {} ] ], "traverseTo-detach-cross-document.html": [ - "8784313b70546e49d37e227ec9c0f809990b77d5", + "7b9389fc92a769805965e55deac181a3d172ec85", [ null, {} ] ], "traverseTo-detach-same-document-before-navigate-event.html": [ - "592ac6f19906979ff19b7ae85f7ad9006e8a5f22", + "65dbf42464ef743d4c0b19f5377bfc2f7b06f144", [ null, {} ] ], "traverseTo-detach-same-document.html": [ - "b0308b8df8fe4c3ed975fe16b790c29a0de1891c", + "4aec1d812e1d5158b636cd65bbb3b13a37ee199d", [ null, {} ] ], "traverseTo-intercept-rejected.html": [ - "f39913e05b239156bbc55a22f644899cf0f133e5", + "b5b03b3cacade25c672dce8a740639a7aa4a9671", [ null, {} ] ], "traverseTo-intercept.html": [ - "e5baf8b1417fceb29e08d42dcf8da3975d4ceccb", + "15a54b180e2fd91346218674cd6ed2a30856dfdd", [ null, {} @@ -685935,14 +687159,14 @@ ] ], "traverseTo-repeated.html": [ - "d1754d6729749316216713cb63c3cc498c8292ad", + "d2ede8e6cf4d4efc183277183edbf2e82e17d393", [ null, {} ] ], "traverseTo.html": [ - "5270bbb411df80d4d09402398068274f98a8d6fa", + "68c309318ce301309c62f5d329fc943afb71ebb6", [ null, {} @@ -686006,14 +687230,14 @@ ] ], "traverseTo-multiple-steps.html": [ - "24cf0281845f6a8d11d782ee9c2784c285e295ef", + "6bf3752510029fe0266a64c5487bf8ba97004d3d", [ null, {} ] ], "traverseTo-navigates-multiple-iframes.html": [ - "1892ae065e2e372ff14e9049a2094812688ec3a0", + "521f34157ea6db172cd0915de37c1a6bca98d4b6", [ null, {} @@ -686036,7 +687260,7 @@ }, "ordering-and-transition": { "anchor-download-intercept-reject.html": [ - "bd7d968fb1ff4ebfc157ec64b8a23997d4bcb13c", + "726586b7a1042d243c143a497b253bfedddd8157", [ "navigation-api/ordering-and-transition/anchor-download-intercept-reject.html?currententrychange", {} @@ -686047,7 +687271,7 @@ ] ], "anchor-download-intercept.html": [ - "38478e3c9a843983da70a90a573a108c64eaa880", + "8aaee4a7094b730ff62a3aefafbb110e768b26ec", [ "navigation-api/ordering-and-transition/anchor-download-intercept.html?currententrychange", {} @@ -686072,7 +687296,7 @@ ] ], "back-same-document-intercept-reject.html": [ - "d1f15428f10adca6bef5996f7fc59e2df43bab8c", + "c2db856da8abc79684dae313ff76da3c0989ef7d", [ "navigation-api/ordering-and-transition/back-same-document-intercept-reject.html?currententrychange", {} @@ -686083,7 +687307,7 @@ ] ], "back-same-document-intercept.html": [ - "f66e1dfba8f1549c4373f24e7dab1d0f7be6d76d", + "9180ca1ca785f0eadd4b8ed22690d2818fe3bfb7", [ "navigation-api/ordering-and-transition/back-same-document-intercept.html?currententrychange", {} @@ -686094,7 +687318,7 @@ ] ], "back-same-document.html": [ - "12b6a2aee938733fbb519f7a0bdeb24def79cfdd", + "680421b9264112c44a3c3e02221710d411213cca", [ "navigation-api/ordering-and-transition/back-same-document.html?currententrychange", {} @@ -686105,7 +687329,7 @@ ] ], "currententrychange-before-popstate-intercept.html": [ - "10627c5875433a44dcf18e080239c5e520f6c939", + "b0c934f6877a51e56822108fbd22ce74f3c26d14", [ null, {} @@ -686119,7 +687343,7 @@ ] ], "intercept-async.html": [ - "4fa7c88833e0232bd743c206d0d10605c7357d1a", + "c34994a57f227ecdedcd4e99ab87d58b554774cf", [ "navigation-api/ordering-and-transition/intercept-async.html?currententrychange", {} @@ -686130,14 +687354,14 @@ ] ], "location-href-canceled.html": [ - "eef10cd1730bbb56a9dab64bfeec90ecb34b770f", + "894aa39fe06f1405389c08d255ae5445cf47d3d8", [ null, {} ] ], "location-href-double-intercept.html": [ - "cc8b95b1b4d8ee2be89d9825e394cc17e59399f1", + "73121ca595f062f2580a9eb1e4be9dc02cf55f07", [ "navigation-api/ordering-and-transition/location-href-double-intercept.html?currententrychange", {} @@ -686148,7 +687372,7 @@ ] ], "location-href-intercept-reentrant.html": [ - "8a5082148e77775629af391b4954314b4072a152", + "18f992422d08c7663b52bdc365bac662d8cb9919", [ "navigation-api/ordering-and-transition/location-href-intercept-reentrant.html?currententrychange", {} @@ -686159,7 +687383,7 @@ ] ], "location-href-intercept-reject.html": [ - "59b3d4884fb6f0f400cc40612c504169cd0b2987", + "04f2914d2aecacd28f5b9261ac71b62941d32640", [ "navigation-api/ordering-and-transition/location-href-intercept-reject.html?currententrychange", {} @@ -686170,7 +687394,7 @@ ] ], "location-href-intercept.html": [ - "75f1d3d1d0286b96e97793e7eb03534ae95f5ff0", + "2be0a1238a7b3012eb6502e67fe55d99f493f510", [ "navigation-api/ordering-and-transition/location-href-intercept.html?currententrychange", {} @@ -686188,7 +687412,7 @@ ] ], "navigate-canceled.html": [ - "2604a60e37bfc240e84df5c7bf02fda31425a303", + "1bc9dfe467ba1da115802425b91d602eff866ad9", [ null, {} @@ -686209,7 +687433,7 @@ ] ], "navigate-double-intercept.html": [ - "0598fb554e0a8d57b0dfcb0ba365058a2f83dbd5", + "92758286800c4172be0cf42e6ad34e88850975c8", [ "navigation-api/ordering-and-transition/navigate-double-intercept.html?currententrychange", {} @@ -686220,7 +687444,7 @@ ] ], "navigate-in-transition-finished.html": [ - "8b3811dd36fd5586930492e5d1d514d61453fc66", + "45aa33017c471dbeb3b4889fce4ae6c7278562ce", [ "navigation-api/ordering-and-transition/navigate-in-transition-finished.html?currententrychange", {} @@ -686231,7 +687455,7 @@ ] ], "navigate-intercept-precommitHandler-redirect.html": [ - "2f60bfd749d271808cc1f56e2e2566768c607866", + "aa703435d3445b0a06b46f7ea3c5ebc558cb5e51", [ "navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-redirect.html?currententrychange", {} @@ -686242,7 +687466,7 @@ ] ], "navigate-intercept-precommitHandler-reject.tentative.html": [ - "28dc885188015dbc364421d90173c52030ab92f0", + "80c9e85687ae4add0a548c85dd9f3d0fff800823", [ "navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-reject.tentative.html?currententrychange", {} @@ -686253,7 +687477,7 @@ ] ], "navigate-intercept-precommitHandler.html": [ - "8257e56d44e15e9a29d74c3990f8f29afd58b0d7", + "f3f525af70689ec6115bcea34904846401008da7", [ "navigation-api/ordering-and-transition/navigate-intercept-precommitHandler.html?currententrychange", {} @@ -686264,7 +687488,7 @@ ] ], "navigate-intercept-stop.html": [ - "1a7faa4e0eebc7ef490c15805086ac16de385fb1", + "8357dc82806a951a08307bbde9f200ca1ff58e1d", [ "navigation-api/ordering-and-transition/navigate-intercept-stop.html?currententrychange", {} @@ -686275,7 +687499,7 @@ ] ], "navigate-intercept.html": [ - "eec9d3ca119b82406cdd93ad4de6af93f0ef1cf2", + "ebb1a0b13af5b5e79f8e61201516d70c093093cd", [ "navigation-api/ordering-and-transition/navigate-intercept.html?currententrychange", {} @@ -686286,7 +687510,7 @@ ] ], "navigate-same-document-intercept-reentrant.html": [ - "88715fda355252a1ec299df1c00ce0277fe5fcd2", + "b9d2740b98d0fd0cab249b845af981b804d163f3", [ "navigation-api/ordering-and-transition/navigate-same-document-intercept-reentrant.html?currententrychange", {} @@ -686297,7 +687521,7 @@ ] ], "navigate-same-document-intercept-reject.html": [ - "05f295177a062bc9f471952cf8d821b7bfad3bce", + "8899a3819d9c38d948a97ddb16d5adf2941a3da0", [ "navigation-api/ordering-and-transition/navigate-same-document-intercept-reject.html?currententrychange", {} @@ -686308,7 +687532,7 @@ ] ], "navigate-same-document.html": [ - "fc506cef8bf481bee89b8cfd4f78843b95459305", + "b23d32fc09fdd11aa46235891d35d36b5247b46f", [ "navigation-api/ordering-and-transition/navigate-same-document.html?currententrychange", {} @@ -686319,14 +687543,14 @@ ] ], "reload-canceled.html": [ - "3e9e24e777112908703e45daebd87b88dd5d1e59", + "9b21c15ad86233df5f0063ef3de15b7af48fb803", [ null, {} ] ], "reload-intercept-reject.html": [ - "96833f314f464724ec32c71837c7439cb687a46a", + "4ea4cc0e398d784c80dfb9d09884384b00ce6769", [ "navigation-api/ordering-and-transition/reload-intercept-reject.html?currententrychange", {} @@ -686337,7 +687561,7 @@ ] ], "reload-intercept.html": [ - "1494136e199c508564a7449586c2f5579d9be69c", + "eb6aff961e1c678334a03a83a9d85628ef1e4960", [ "navigation-api/ordering-and-transition/reload-intercept.html?currententrychange", {} @@ -686348,7 +687572,7 @@ ] ], "reload-no-popstate.html": [ - "6c4592b67cc1417e1aa69491c41bb69cc8caba6e", + "324acb66cdbf37e6ede5fd5862e94104bdcc455b", [ null, {} @@ -686478,42 +687702,42 @@ ] ], "precommitHandler-redirect-options.html": [ - "06542d7e084f9232d8c7704090d1a184b9b6cec5", + "3c40044c8cb6c7e13d04eda0167ea75cdf9519d8", [ null, {} ] ], "precommitHandler-redirect-push-changed-to-replace.html": [ - "e268f68a88d8e0ffa6685b8067786834e9353942", + "8088f51021a08fdab8c318499ab09755b6b8fd7b", [ null, {} ] ], "precommitHandler-redirect-push.html": [ - "de75198d9754a5510adb449f5845fa5daa7ea63b", + "41b3f3df8bdd951196aa65410e6d854fd61b98d9", [ null, {} ] ], "precommitHandler-redirect-replace-changed-to-push.html": [ - "db9b178901b84fc36ec6281c54789dc1d685b94b", + "19bbbcda33f6b9d056e0a718cbcfc509eb0d911f", [ null, {} ] ], "precommitHandler-redirect-replace.html": [ - "049909fefdead4c6a72b94d2a05423523733c50f", + "2ebd385364547ab201d4201b348d0841a2d2cfb8", [ null, {} ] ], "precommitHandler-redirect-throws.html": [ - "b459271201050717bed97920dea3cb41cc772201", + "865835d5ea62882a098c571bff3b7ed6cbf90bbb", [ null, {} @@ -686534,14 +687758,14 @@ ] ], "precommitHandler-traversal-commit-new-navigation-before-commit.html": [ - "226f332e421687bf92430f9009b329e751adc7c0", + "e5955b67d7cc4606350b761bfafbc22788921e23", [ null, {} ] ], "precommitHandler-traversal-window-stop-before-commit.html": [ - "c45f8268f2a31a7440f74c8ed7336694bcfabea9", + "9dd74c2c47eaf07ea303a4555fd5aa7535d0817c", [ null, {} @@ -686555,14 +687779,14 @@ ] ], "precommitHandler-uncancelable.html": [ - "af320b4e32c920947212cc8edce1be23c7520221", + "9a63c45ad3cd689ddd64ca3fe9bde91be78ef0e2", [ null, {} ] ], "precommitHandler-window-stop-before-commit.html": [ - "857a21ed3a97dd695d553818b5d067fec6666534", + "8b8e2fe9163084465c071d9ff987e6162a76302d", [ null, {} @@ -686571,147 +687795,147 @@ }, "scroll-behavior": { "after-transition-basic.html": [ - "8ee4cc395b6722affc8ac657ee35d7cb41761b9d", + "b6e5058e8934b132ff198c3e2efb6d35203deb9f", [ null, {} ] ], "after-transition-change-history-scroll-restoration-during-promise.html": [ - "6ededdeebfaec4ccc25e58a0f81a497079ae98d1", + "6be6eddd62f2dd5900508c6767ac4283bab53d50", [ null, {} ] ], "after-transition-explicit-scroll.html": [ - "4b7d0754747821aeb61e93dd0ae657ad5cef8821", + "4f7c6787e87546552da57083f37fa66faba38bee", [ null, {} ] ], "after-transition-intercept-handler-modifies.html": [ - "baff6fe542bbf0263b27c270981978ebf468e9b2", + "c2609d611a6507c7dfeb65aad1ade97f0c4710d1", [ null, {} ] ], "after-transition-push.html": [ - "f3ee1827bc4c7aa4f4cbb4d1921e578eedcd7ff1", + "8ce5be60bb56bccecef5916c69cfe0722a97330a", [ null, {} ] ], "after-transition-reject.html": [ - "5880dbb331306b6b686477c69a33acbf7821458c", + "063c0846be8320ac5c779e4a17ec47ac71180715", [ null, {} ] ], "after-transition-reload.html": [ - "badb7e7f41714da82327ec5ebf92fa14624275e1", + "437ed692060b9deb758b6a02fdd19577290912ef", [ null, {} ] ], "after-transition-replace.html": [ - "48f153b99effe7658a4970c984fb0c90605f9d54", + "64376c9fe1fe7926bdc7bfbe7817ba194bcadd79", [ null, {} ] ], "after-transition-timing.html": [ - "88ba82102a6a280beab79f72463aa039bab62850", + "637d8c00d90ead3a300550e582c47f77797854cc", [ null, {} ] ], "manual-basic.html": [ - "e6ae29ad86ef63d2200107a4653ae98d27c4b2d0", + "5e4d6a12a72f3bd459563c6741de8c65b52475c4", [ null, {} ] ], "manual-immediate-scroll.html": [ - "bafcf6b25628cf76f456fb148b1e88d7b2dafe1c", + "d50faedd7f8903631072d95ca2d2d182554eb0b2", [ null, {} ] ], "manual-scroll-after-dispatch.html": [ - "8b4a58c7a2651b4ce792ba476aa7b9f32a3bafbb", + "268be126fac9d6f02467750b395c163410768f11", [ null, {} ] ], "manual-scroll-after-resolve.html": [ - "244c93af904ce210b776bab0d76b251984ef4f7d", + "34eec9727c9551c94381d25979293cb7c34e266f", [ null, {} ] ], "manual-scroll-fragment-does-not-exist.html": [ - "1ca582787e2e27ae63fec6170ed658b7f1453b65", + "0db3f03ee592b228b4b938841c89fd81573f5782", [ null, {} ] ], "manual-scroll-in-precommit-handler.html": [ - "3f92b5276a31c89613e2c78bf7445e9a8e7c17da", + "ec91e762b665e5deac4162bb0c4cd51c8f0fe2fd", [ null, {} ] ], "manual-scroll-push.html": [ - "3c29365178053e419c20217c1b82fdcdb268478d", + "cba40fdf27edde1ede912b82b51a7258dc79939a", [ null, {} ] ], "manual-scroll-reload.html": [ - "6dd3fd8a38f400e03166185202f1568c6f19d3ba", + "9c70d5fe81893e667b149ab08b138d74873e8130", [ null, {} ] ], "manual-scroll-repeated.html": [ - "12391460880e034da168f95bec91ed9c6de91362", + "058d7f0f9b2fcf2d6e8f76461cb4cfe561810971", [ null, {} ] ], "manual-scroll-replace.html": [ - "db580229a8627734d3bb865fc821e01a12786ae7", + "151c2ddfa9ec31cda020e3b8a5c53487c5216c73", [ null, {} ] ], "manual-scroll-resets-when-no-fragment.html": [ - "5401976f6406f757cd4706d3ee556f7fcecf5658", + "caf7bae6d2e5c3135b8c52421981ba964bca3db2", [ null, {} ] ], "scroll-after-preventDefault.html": [ - "298bebcbe987dd672f86c438c0cfac96cd992c0b", + "fe83b89cfebbb6bf114868b73ca1b86770972813", [ null, {} @@ -686725,7 +687949,7 @@ ] ], "scroll-without-intercept.html": [ - "b3958352c72776b0371a24e27fc5c270232ae55e", + "efdded2258f6b901fc968120dc95dcbb4ab422a5", [ null, {} @@ -694578,7 +695802,7 @@ ] ], "pointerevent_lostpointercapture_remove_setcapture_node.html": [ - "9127a21fcec3031cd68bcc7d594da43ea2b93e86", + "8da1b7d28c45e49f31ba55e05eac3fe6e5a01283", [ null, { @@ -714767,6 +715991,15 @@ } ] ], + "canvas-drag.html": [ + "eaed6f783af6dfd049b8aad89dae28133a07e6a1", + [ + null, + { + "testdriver": true + } + ] + ], "caret": { "empty-elements.html": [ "328188c957bd738af419d54e4cd5c741cecc827f", @@ -722295,6 +723528,15 @@ "testdriver": true } ] + ], + "video-srcObject-change.html": [ + "2d25164ba4a28f547b6be5ae068fc769f4bc0026", + [ + null, + { + "testdriver": true + } + ] ] } }, @@ -722761,6 +724003,15 @@ } ] ], + "video-src-change.html": [ + "9a37bdcce49079b6f19aa6e3566421b92d9441f5", + [ + null, + { + "testdriver": true + } + ] + ], "window-open-cross-scheduling.html": [ "1a41be6ddd2d716c4012b5524e8a30b9821ec3e3", [ @@ -739527,7 +740778,7 @@ ] ], "server-initiated.window.js": [ - "8dec3daaded618997ed43747475a3316574efc42", + "60cfef5e65fcb14da440094559ef076e57e4f55b", [ "subresource-integrity/signatures/tentative/server-initiated.window.html", { @@ -742781,13 +744032,6 @@ ] }, "shapes": { - "animatedPoints-non-animated.html": [ - "5c1758908605d71baf9fe87c9b54ccfab5c5e5cd", - [ - null, - {} - ] - ], "line-getPointAtLength.svg": [ "472a64480aee5489add7f693aa1118413a3e9b06", [ @@ -744856,7 +746100,7 @@ ] ], "script-enforcement-001.html": [ - "9548987a22d67f952cb49ad472c28f5a37a21180", + "dc2bf3131eac1bfd2e71d3a256c534f9f25b4402", [ null, {} @@ -744870,21 +746114,21 @@ ] ], "script-enforcement-002.html": [ - "ddbbc99ea6b3254dafe447af6aaef985587bd33a", + "d6799d502ecfd706bd1356a34283c1a422f75cb1", [ null, {} ] ], "script-enforcement-003.html": [ - "9ad31b795bc36e1cc4b83c63220be2d3d1e2fee9", + "5f3b31796bb77dd33c74dd795e053562dc686c7d", [ null, {} ] ], "script-enforcement-004.html": [ - "86e1020c3ad153a5fcbbbac2e3df6f65eb90e710", + "29dff3c6c40ad13a19ff6b1033df20b2cf8cb205", [ null, {} @@ -807377,7 +808621,7 @@ ] ], "RTCRtpTransceiver.https.html": [ - "943550d4b7feeb0bc69dd02de3fec722aef4565c", + "813e3fab8830cd9d0db15bfbf488856708ab68bb", [ null, { @@ -808296,7 +809540,7 @@ ] ], "script-transform-generateKeyFrame-simulcast.https.html": [ - "4174aaf24a130c0d15508a958fecb82c6ce4582b", + "1ad51c8ea34190691289b97c427b536989460443", [ null, { @@ -808306,7 +809550,7 @@ ] ], "script-transform-generateKeyFrame.https.html": [ - "348902ea36c463d47e6922eb6166b3b696518db1", + "1ee2c1a2d47c0fbd025a27000860f4626a000d28", [ null, { @@ -808316,7 +809560,7 @@ ] ], "script-transform-sendKeyFrameRequest.https.html": [ - "b67627dcf1128785d59784363f38fdacc378ac52", + "5cc5c6c2996006ae909f311087899d37e10cec21", [ null, { @@ -808699,7 +809943,7 @@ ] ], "outbound-rtp.https.html": [ - "ff87d54256026b3b6fc6da2aa9f03a579730b330", + "196e8fd003706f9d6fe89cdaa2adf17e8fc2b30e", [ null, { @@ -847068,7 +848312,7 @@ ] ], "start_nodes.py": [ - "351020af4c2d9f74a3aed55db014808af02ac622", + "c58c05e1cde86b0ecba8900cb979d6e58dae6983", [ null, {} @@ -848324,6 +849568,22 @@ ] ] }, + "remove_data_collector": { + "collector.py": [ + "50ecc311d7ba9cce6cd3dfa30093202d61ba144e", + [ + null, + {} + ] + ], + "invalid.py": [ + "aef1877669e7e2a50a297af776ab974342bc5a4a", + [ + null, + {} + ] + ] + }, "remove_intercept": { "invalid.py": [ "4b3526bfc37d8300eebc17b548040bde588ce18b",
diff --git a/third_party/blink/web_tests/external/wpt/content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked-link.html b/third_party/blink/web_tests/external/wpt/content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked-link.html new file mode 100644 index 0000000..ce4dae7 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/content-security-policy/style-src-attr-elem/style-src-elem-allowed-src-blocked-link.html
@@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> + +<head> + <meta http-equiv="Content-Security-Policy" content="style-src 'none'; style-src-elem 'self'"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + var t = async_test("Inline style should be applied"); + window.addEventListener('securitypolicyviolation', t.unreached_func("Should not have fired a spv event")); + </script> + <link rel="stylesheet" href="/content-security-policy/style-src/resources/allowed.css"> +</head> +<body> + <script> + t.step(function() { + assert_equals(document.styleSheets.length, 1); + t.done(); + }); + </script> +</body> + +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-getComputedStyle-002-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-getComputedStyle-002-expected.txt new file mode 100644 index 0000000..cda14f3f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-getComputedStyle-002-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +[FAIL] getComputedStyle() with fragmented containing block in multicolumn layout + assert_equals: expected "25px" but got "-85px" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-getComputedStyle-002.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-getComputedStyle-002.html index 753634a..862856b 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-getComputedStyle-002.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-getComputedStyle-002.html
@@ -73,9 +73,9 @@ const target = test1.querySelector('.target'); const style = getComputedStyle(target); assert_equals(style.left, '25px'); - assert_equals(style.right, '-85px'); - assert_equals(style.top, '100px'); - assert_equals(style.bottom, '100px'); + assert_equals(style.right, '25px'); + assert_equals(style.top, '175px'); + assert_equals(style.bottom, '75px'); }, 'getComputedStyle() with fragmented containing block in multicolumn layout'); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-003-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-003-expected.txt index 6ac93ee..5aec406 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-003-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-003-expected.txt
@@ -1,5 +1,7 @@ This is a testharness.js-based test. [FAIL] .target 1 - assert_equals: \n<div class="target" data-expected-width="70" data-expected-height="50"></div>\nwidth expected 70 but got 40 + assert_equals: \n<div class="target" data-expected-width="10" data-expected-height="100"></div>\nwidth expected 10 but got 40 +[FAIL] .target 2 + assert_equals: \n<div class="target" data-expected-width="10" data-expected-height="100"></div>\nwidth expected 10 but got 70 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-003.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-003.html index 02fd1c1..d1f3c38 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-003.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-003.html
@@ -53,10 +53,10 @@ <div class="anchor" style="height: 60px"></div> <div class="anchor abspos" style="top: 120px; height: 100px"></div> <div class="target" - data-expected-width=70 data-expected-height=50></div> + data-expected-width=10 data-expected-height=100></div> </div> <div class="target" - data-expected-width=70 data-expected-height=50></div> + data-expected-width=10 data-expected-height=100></div> </div> <div class="target" data-expected-width=70 data-expected-height=50></div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-004-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-004-expected.txt new file mode 100644 index 0000000..bf953d062 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-004-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +[FAIL] .target 1 + assert_equals: \n<div class="target" data-expected-width="10" data-expected-height="60"></div>\nwidth expected 10 but got 40 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-004.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-004.html index fdd17723..3b1f060e 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-004.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-name-multicol-004.html
@@ -52,7 +52,7 @@ <div class="anchor abspos" style="top: 120px; height: 100px"></div> <div class="anchor" style="height: 60px"></div> <div class="target" - data-expected-width=40 data-expected-height=50></div> + data-expected-width=10 data-expected-height=60></div> </div> <div class="target" data-expected-width=40 data-expected-height=50></div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-grid-001-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-grid-001-expected.txt new file mode 100644 index 0000000..e4a7a86 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-grid-001-expected.txt
@@ -0,0 +1,9 @@ +This is a testharness.js-based test. +[FAIL] .target 2 + assert_equals: \n<div class="target target1-r" data-offset-x="194" data-expected-height="100"></div>\noffsetLeft expected 194 but got 404 +[FAIL] .target 3 + assert_equals: \n<div class="target target1-t" data-offset-y="50" data-expected-width="100"></div>\nwidth expected 100 but got 310 +[FAIL] .target 4 + assert_equals: \n<div class="target target1-b" data-offset-y="145" data-expected-width="100"></div>\nwidth expected 100 but got 310 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-grid-001.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-grid-001.html index 7bd389b39..006c4b8 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-grid-001.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-grid-001.html
@@ -74,9 +74,9 @@ <div class="anchor1"></div> <div class="target target1-l" data-offset-x=100 data-expected-height=100></div> - <div class="target target1-r" data-offset-x=404 data-expected-height=100></div> - <div class="target target1-t" data-offset-y=-10 data-expected-width=310></div> - <div class="target target1-b" data-offset-y=85 data-expected-width=310></div> + <div class="target target1-r" data-offset-x=194 data-expected-height=100></div> + <div class="target target1-t" data-offset-y=50 data-expected-width=100></div> + <div class="target target1-b" data-offset-y=145 data-expected-width=100></div> </div> </div> </div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-002-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-002-expected.txt new file mode 100644 index 0000000..30ebfd6d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-002-expected.txt
@@ -0,0 +1,11 @@ +This is a testharness.js-based test. +[FAIL] .target 1 + assert_equals: \n<div class="target target1" data-offset-x="18" data-offset-y="135" data-expected-width="50" data-expected-height="90"></div>\nwidth expected 50 but got 160 +[FAIL] .target 2 + assert_equals: \n<div class="target target1-rb" data-offset-x="58" data-offset-y="215"></div>\noffsetLeft expected 58 but got 278 +[FAIL] .target 3 + assert_equals: \n<div class="target fixed target1" data-offset-x="26" data-offset-y="140" data-expected-width="50" data-expected-height="90"></div>\nwidth expected 50 but got 160 +[FAIL] .target 4 + assert_equals: \n<div class="target fixed target1-rb" data-offset-x="58" data-offset-y="215"></div>\noffsetLeft expected 58 but got 278 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-002.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-002.html index 287b5521..b4a4a7a 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-002.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-002.html
@@ -82,15 +82,15 @@ <!-- The containing block of querying elements is block-fragmented. --> <div class="target target1" - data-offset-x=128 data-offset-y=-35 - data-expected-width=160 data-expected-height=100></div> + data-offset-x=18 data-offset-y=135 + data-expected-width=50 data-expected-height=90></div> <div class="target target1-rb" - data-offset-x=278 data-offset-y=55></div> + data-offset-x=58 data-offset-y=215></div> <div class="target fixed target1" - data-offset-x=128 data-offset-y=-35 - data-expected-width=160 data-expected-height=100></div> + data-offset-x=26 data-offset-y=140 + data-expected-width=50 data-expected-height=90></div> <div class="target fixed target1-rb" - data-offset-x=278 data-offset-y=55></div> + data-offset-x=58 data-offset-y=215></div> </div> <!-- The containing block of querying elements is a multi-column. -->
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-003-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-003-expected.txt index 7f03f52..ad89fde 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-003-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-003-expected.txt
@@ -1,7 +1,9 @@ This is a testharness.js-based test. [FAIL] .target 1 - assert_equals: \n<div class="target" data-expected-height="50"></div>\nheight expected 50 but got 0 + assert_equals: \n<div class="target" data-expected-height="30"></div>\nheight expected 30 but got 0 [FAIL] .target 4 - assert_equals: \n<div class="target" data-expected-height="50"></div>\nheight expected 50 but got 0 + assert_equals: \n<div class="target" data-expected-height="30"></div>\nheight expected 30 but got 0 +[FAIL] .target 5 + assert_equals: \n<div class="target" data-expected-height="30"></div>\nheight expected 30 but got 50 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-003.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-003.html index d23779ad..f2a4b93 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-003.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-003.html
@@ -40,7 +40,7 @@ <div class="relpos"> <div class="spacer" style="height: 30px"></div> <div class="anchor1"></div> - <div class="target" data-expected-height=50></div> + <div class="target" data-expected-height=30></div> </div> <div class="target" data-expected-height=50></div> </div> @@ -56,9 +56,9 @@ <div class="relpos"> <div class="spacer" style="height: 10px"></div> <div class="anchor1"></div> - <div class="target" data-expected-height=50></div> + <div class="target" data-expected-height=30></div> </div> - <div class="target" data-expected-height=50></div> + <div class="target" data-expected-height=30></div> </div> <div class="target" data-expected-height=50></div> </div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-004-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-004-expected.txt new file mode 100644 index 0000000..e08023a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-004-expected.txt
@@ -0,0 +1,11 @@ +This is a testharness.js-based test. +[FAIL] .target 1 + assert_equals: \n<div class="target target1" data-offset-x="18" data-offset-y="125" data-expected-width="20" data-expected-height="90"></div>\nwidth expected 20 but got 130 +[FAIL] .target 2 + assert_equals: \n<div class="target target1-rb" data-offset-x="28" data-offset-y="205"></div>\noffsetLeft expected 28 but got 248 +[FAIL] .target 3 + assert_equals: \n<div class="target target1" data-offset-x="34" data-offset-y="285" data-expected-width="20" data-expected-height="90"></div>\nwidth expected 20 but got 130 +[FAIL] .target 4 + assert_equals: \n<div class="target target1-rb" data-offset-x="44" data-offset-y="365"></div>\noffsetLeft expected 44 but got 484 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-004.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-004.html index 8f7a3da..0137ad5 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-004.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-004.html
@@ -25,7 +25,7 @@ } .spacer { height: 10px; - background: pink; + background: silver; } .anchor1 { anchor-name: --a1; @@ -69,16 +69,16 @@ <div class="anchor1" style="width: 20px"></div> <div class="target target1" - data-offset-x=128 data-offset-y=-35 - data-expected-width=130 data-expected-height=100></div> + data-offset-x=18 data-offset-y=125 + data-expected-width=20 data-expected-height=90></div> <div class="target target1-rb" - data-offset-x=248 data-offset-y=55></div> + data-offset-x=28 data-offset-y=205></div> </div> <div class="target target1" - data-offset-x=364 data-offset-y=-75 - data-expected-width=130 data-expected-height=100></div> + data-offset-x=34 data-offset-y=285 + data-expected-width=20 data-expected-height=90></div> <div class="target target1-rb" - data-offset-x=484 data-offset-y=15></div> + data-offset-x=44 data-offset-y=365></div> </div> </body>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-fixed-001-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-fixed-001-expected.txt index 3cc5c12..9254132 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-fixed-001-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-fixed-001-expected.txt
@@ -1,5 +1,7 @@ This is a testharness.js-based test. [FAIL] .target 1 - assert_equals: \n<div class="target" data-offset-x="10" data-offset-y="20" data-expected-width="130" data-expected-height="50"></div>\nwidth expected 130 but got 40 + assert_equals: \n<div class="target" data-offset-x="20" data-offset-y="20" data-expected-width="20" data-expected-height="30"></div>\nwidth expected 20 but got 40 +[FAIL] .target 2 + assert_equals: \n<div class="target" data-offset-x="20" data-offset-y="40" data-expected-width="20" data-expected-height="30"></div>\nwidth expected 20 but got 130 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-fixed-001.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-fixed-001.html index b946808..0620218 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-fixed-001.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-position-multicol-fixed-001.html
@@ -24,7 +24,7 @@ } .spacer { height: 10px; - background: pink; + background: silver; } .anchor { anchor-name: --a1; @@ -35,6 +35,7 @@ } .fixedpos { position: fixed; + background: blue; margin-left: 0; left: 20px; top: 20px; @@ -63,12 +64,12 @@ <div class="anchor"></div> <div class="anchor fixedpos"></div> <div class="target" - data-offset-x="10" data-offset-y="20" - data-expected-width=130 data-expected-height=50></div> + data-offset-x="20" data-offset-y="20" + data-expected-width=20 data-expected-height=30></div> </div> <div class="target" - data-offset-x="20" data-offset-y="0" - data-expected-width=130 data-expected-height=50></div> + data-offset-x="20" data-offset-y="40" + data-expected-width=20 data-expected-height=30></div> </div> <div class="target" data-offset-x="20" data-offset-y="10"
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-positioned-containing-block-resize.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-positioned-containing-block-resize.html new file mode 100644 index 0000000..79c788b1 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-positioned-containing-block-resize.html
@@ -0,0 +1,57 @@ +<!DOCTYPE html> +<title>Containing block size change correctly invalidates styles with anchor functions</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#anchor-pos"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +.anchor, .anchored { + width: 100px; + height: 100px; + position: absolute; +} +.anchor { + left: 300px; + top: 200px; + anchor-name: --a; + background: blue; +} +.anchored { + position-anchor: --a; + right: anchor(left); + bottom: anchor(top); + background: green; + content:''; +} +.container { + position: relative; + width: 500px; + height: 500px; + border: 2px solid red; +} +.resize { + width: 400px; + height: 400px; +} +</style> +<div id=container class=container> + <div class=anchor></div> + <div> + <div id=anchored class=anchored></div> + </div> +</div> +<script> +test(() => { + assert_equals(anchored.offsetTop, 100); + assert_equals(anchored.offsetLeft, 200); + assert_equals(getComputedStyle(anchored).bottom, '300px'); + assert_equals(getComputedStyle(anchored).right, '200px'); +}, "Initial anchored position"); + +test(() => { + container.classList.add("resize"); + assert_equals(anchored.offsetTop, 100); + assert_equals(anchored.offsetLeft, 200); + assert_equals(getComputedStyle(anchored).bottom, '200px'); + assert_equals(getComputedStyle(anchored).right, '100px'); +}, "Anchored position after resizing the containing block"); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-scroll-update-005.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-scroll-update-005.html index 9c32bda..299ed46 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-scroll-update-005.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-scroll-update-005.html
@@ -25,6 +25,7 @@ top: anchor(top); left: 0; position-anchor: --a; + position-visibility: always; } </style> <div id="cb">
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-scroll-update-006.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-scroll-update-006.html index d896d9c..74596d5 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-scroll-update-006.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/anchor-scroll-update-006.html
@@ -25,6 +25,7 @@ top: anchor(top); left: 0; position-anchor: --a; + position-visibility: always; } </style> <div id="cb">
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/parsing/position-visibility-computed-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/parsing/position-visibility-computed-expected.txt index c613bf1..be8542ca 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/parsing/position-visibility-computed-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/parsing/position-visibility-computed-expected.txt
@@ -1,6 +1,8 @@ This is a testharness.js-based test. [FAIL] Property position-visibility value 'anchors-valid' assert_true: 'anchors-valid' is a supported value for position-visibility. expected true got false +[FAIL] Property position-visibility value 'initial' + assert_equals: expected "anchors-visible" but got "always" [FAIL] Property position-visibility value 'anchors-valid anchors-visible' assert_true: 'anchors-valid anchors-visible' is a supported value for position-visibility. expected true got false [FAIL] Property position-visibility value 'anchors-valid no-overflow'
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/parsing/position-visibility-computed.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/parsing/position-visibility-computed.html index 1ba494ca..e32280b 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/parsing/position-visibility-computed.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/parsing/position-visibility-computed.html
@@ -15,6 +15,8 @@ test_computed_value("position-visibility", "anchors-visible"); test_computed_value("position-visibility", "no-overflow"); + test_computed_value("position-visibility", "initial", "anchors-visible"); + test_computed_value("position-visibility", "anchors-valid anchors-visible"); test_computed_value("position-visibility", "anchors-valid no-overflow"); test_computed_value("position-visibility", "anchors-visible anchors-valid", "anchors-valid anchors-visible");
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-area-computed.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-area-computed.html index 8e18006..4b3fb62a 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-area-computed.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-area-computed.html
@@ -1,6 +1,6 @@ <!DOCTYPE html> <title>CSS Anchor Positioning: position-area getComputedStyle()</title> -<link rel="help" href="https://drafts.csswg.org/css-anchor-position/#position-area"> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#position-area-computed"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/computed-testcommon.js"></script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-try-fallbacks-004.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-try-fallbacks-004.html index 9c66d9f..c46af7c37 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-try-fallbacks-004.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-try-fallbacks-004.html
@@ -1,4 +1,8 @@ <!DOCTYPE html> + +<html class="reftest-wait"> + +<head> <title>Retrying fallbacks after failing with a non-existing fallback</title> <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> <link rel="help" href="https://issues.chromium.org/issues/427134601"> @@ -19,6 +23,11 @@ position-area: right; } </style> +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> +</head> + +<body> <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> <div style="position:relative; height:200px;"> <div id="container" style="overflow:hidden; width:100px; height:100px; background:red;"> @@ -34,9 +43,15 @@ </div> </div> <script> - requestAnimationFrame(()=> { - requestAnimationFrame(()=> { + waitForAtLeastOneFrame().then(() => { + waitForAtLeastOneFrame().then(() => { container.scrollTop = 50; + waitForAtLeastOneFrame().then(() => { + takeScreenshot(); + }); }); }); </script> +</body> + +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-initial-ref.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-initial-ref.html new file mode 100644 index 0000000..1779817 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-initial-ref.html
@@ -0,0 +1,22 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<style> + #scroll-container { + overflow: hidden scroll; + width: 300px; + height: 100px; + } + + #spacer { + height: 200px; + } +</style> + +<div id="scroll-container"> + <div id="spacer"></div> +</div> + +<script> + const scroller = document.getElementById('scroll-container'); + scroller.scrollTop = 100; +</script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-initial.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-initial.html new file mode 100644 index 0000000..9adf0c6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-initial.html
@@ -0,0 +1,48 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<meta name="assert" content="Position-visibility: anchors-visible should be the initial value." /> +<title>CSS Anchor Positioning Test: position-visibility: anchors-visible</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#position-visibility"> +<link rel="match" href="position-visibility-initial-ref.html"> +<style> + #scroll-container { + overflow: hidden scroll; + width: 300px; + height: 100px; + } + + #anchor { + anchor-name: --a1; + width: 100px; + height: 100px; + background: orange; + } + + #spacer { + height: 100px; + } + + #target { + position-anchor: --a1; + position-area: bottom right; + width: 100px; + height: 100px; + background: red; + position: absolute; + top: 0; + left: 0; + } +</style> + +<div id="scroll-container"> + <div id="anchor">anchor</div> + <div id="spacer"></div> + <div id="target">target</div> +</div> + +<script> + const scroller = document.getElementById('scroll-container'); + scroller.scrollTop = 100; + // #target should not be visible because #anchor is scrolled out of view. +</script> +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-remove-anchors-visible.html b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-remove-anchors-visible.html index 3408642..0e26b51e3 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-remove-anchors-visible.html +++ b/third_party/blink/web_tests/external/wpt/css/css-anchor-position/position-visibility-remove-anchors-visible.html
@@ -55,7 +55,7 @@ waitForAtLeastOneFrame().then(() => { // Remove position-visibility: anchors-visible. #target should become // visible again. - target.style.positionVisibility = 'initial'; + target.style.positionVisibility = 'always'; takeScreenshot(); }); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-computed.html b/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-computed.html index 27d9316..5ce304cc 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-computed.html +++ b/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-computed.html
@@ -19,6 +19,28 @@ test_computed_value("opacity", "-100%", "0"); test_computed_value("opacity", "50%", "0.5"); test_computed_value("opacity", "300%", "1"); +test_computed_value("opacity", "calc(-50% - 50%)", "0"); +test_computed_value("opacity", "calc(25% * 2)", "0.5"); +test_computed_value("opacity", "calc(100% + 100%)", "1"); +test_computed_value("opacity", "calc(-0.5 - 0.5)", "0"); +test_computed_value("opacity", "calc(0.25 * 2)", "0.5"); +test_computed_value("opacity", "calc(1 + 1)", "1"); +test_computed_value("opacity", "clamp(50%, 0%, 70%)", "0.5"); +test_computed_value("opacity", "clamp(50%, 80%, 70%)", "0.7"); +test_computed_value("opacity", "clamp(50%, 60%, 70%)", "0.6"); +test_computed_value("opacity", "min(50%, 0%)", "0"); +test_computed_value("opacity", "min(0%, 50%)", "0"); +test_computed_value("opacity", "max(50%, 0%)", "0.5"); +test_computed_value("opacity", "max(0%, 50%)", "0.5"); +test_computed_value("opacity", "min(-40%, 50%)", "0"); +test_computed_value("opacity", "clamp(0.5, 0, 0.7)", "0.5"); +test_computed_value("opacity", "clamp(0.5, 0.8, 0.7)", "0.7"); +test_computed_value("opacity", "clamp(0.5, 0.6, 0.7)", "0.6"); +test_computed_value("opacity", "min(0.5, 0)", "0"); +test_computed_value("opacity", "min(0, 0.5)", "0"); +test_computed_value("opacity", "max(0.5, 0)", "0.5"); +test_computed_value("opacity", "max(0, 0.5)", "0.5"); +test_computed_value("opacity", "min(-0.4, 0.5)", "0"); </script> </body>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-valid-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-valid-expected.txt index 52b2426..37db89c 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-valid-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-valid-expected.txt
@@ -1,19 +1,19 @@ This is a testharness.js-based test. [FAIL] e.style['opacity'] = "clamp(50%, 0%, 70%)" should set the property value - assert_equals: serialization should be canonical expected "calc(0.5)" but got "clamp(50%, 0%, 70%)" + assert_equals: serialization should be canonical expected "calc(50%)" but got "clamp(50%, 0%, 70%)" [FAIL] e.style['opacity'] = "clamp(50%, 80%, 70%)" should set the property value - assert_equals: serialization should be canonical expected "calc(0.7)" but got "clamp(50%, 80%, 70%)" + assert_equals: serialization should be canonical expected "calc(70%)" but got "clamp(50%, 80%, 70%)" [FAIL] e.style['opacity'] = "clamp(50%, 60%, 70%)" should set the property value - assert_equals: serialization should be canonical expected "calc(0.6)" but got "clamp(50%, 60%, 70%)" + assert_equals: serialization should be canonical expected "calc(60%)" but got "clamp(50%, 60%, 70%)" [FAIL] e.style['opacity'] = "min(50%, 0%)" should set the property value - assert_equals: serialization should be canonical expected "calc(0)" but got "min(50%, 0%)" + assert_equals: serialization should be canonical expected "calc(0%)" but got "min(50%, 0%)" [FAIL] e.style['opacity'] = "min(0%, 50%)" should set the property value - assert_equals: serialization should be canonical expected "calc(0)" but got "min(0%, 50%)" + assert_equals: serialization should be canonical expected "calc(0%)" but got "min(0%, 50%)" [FAIL] e.style['opacity'] = "max(50%, 0%)" should set the property value - assert_equals: serialization should be canonical expected "calc(0.5)" but got "max(50%, 0%)" + assert_equals: serialization should be canonical expected "calc(50%)" but got "max(50%, 0%)" [FAIL] e.style['opacity'] = "max(0%, 50%)" should set the property value - assert_equals: serialization should be canonical expected "calc(0.5)" but got "max(0%, 50%)" + assert_equals: serialization should be canonical expected "calc(50%)" but got "max(0%, 50%)" [FAIL] e.style['opacity'] = "min(-40%, 50%)" should set the property value - assert_equals: serialization should be canonical expected "calc(-0.4)" but got "min(-40%, 50%)" + assert_equals: serialization should be canonical expected "calc(-40%)" but got "min(-40%, 50%)" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-valid.html b/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-valid.html index ad65ad6d..5a36ec3 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-valid.html +++ b/third_party/blink/web_tests/external/wpt/css/css-color/parsing/opacity-valid.html
@@ -20,14 +20,28 @@ test_valid_value("opacity", "-100%", "-1"); test_valid_value("opacity", "50%", "0.5"); test_valid_value("opacity", "300%", "3"); -test_valid_value("opacity", "clamp(50%, 0%, 70%)", "calc(0.5)"); -test_valid_value("opacity", "clamp(50%, 80%, 70%)", "calc(0.7)"); -test_valid_value("opacity", "clamp(50%, 60%, 70%)", "calc(0.6)"); -test_valid_value("opacity", "min(50%, 0%)", "calc(0)"); -test_valid_value("opacity", "min(0%, 50%)", "calc(0)"); -test_valid_value("opacity", "max(50%, 0%)", "calc(0.5)"); -test_valid_value("opacity", "max(0%, 50%)", "calc(0.5)"); -test_valid_value("opacity", "min(-40%, 50%)", "calc(-0.4)"); +test_valid_value("opacity", "calc(-50% - 50%)", "calc(-100%)"); +test_valid_value("opacity", "calc(25% * 2)", "calc(50%)"); +test_valid_value("opacity", "calc(100% + 100%)", "calc(200%)"); +test_valid_value("opacity", "calc(-0.5 - 0.5)", "calc(-1)"); +test_valid_value("opacity", "calc(0.25 * 2)", "calc(0.5)"); +test_valid_value("opacity", "calc(1 + 1)", "calc(2)"); +test_valid_value("opacity", "clamp(50%, 0%, 70%)", "calc(50%)"); +test_valid_value("opacity", "clamp(50%, 80%, 70%)", "calc(70%)"); +test_valid_value("opacity", "clamp(50%, 60%, 70%)", "calc(60%)"); +test_valid_value("opacity", "min(50%, 0%)", "calc(0%)"); +test_valid_value("opacity", "min(0%, 50%)", "calc(0%)"); +test_valid_value("opacity", "max(50%, 0%)", "calc(50%)"); +test_valid_value("opacity", "max(0%, 50%)", "calc(50%)"); +test_valid_value("opacity", "min(-40%, 50%)", "calc(-40%)"); +test_valid_value("opacity", "clamp(0.5, 0, 0.7)", "calc(0.5)"); +test_valid_value("opacity", "clamp(0.5, 0.8, 0.7)", "calc(0.7)"); +test_valid_value("opacity", "clamp(0.5, 0.6, 0.7)", "calc(0.6)"); +test_valid_value("opacity", "min(0.5, 0)", "calc(0)"); +test_valid_value("opacity", "min(0, 0.5)", "calc(0)"); +test_valid_value("opacity", "max(0.5, 0)", "calc(0.5)"); +test_valid_value("opacity", "max(0, 0.5)", "calc(0.5)"); +test_valid_value("opacity", "min(-0.4, 0.5)", "calc(-0.4)"); </script> </body>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-details-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-details-ref.html deleted file mode 100644 index ea844dc0..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-details-ref.html +++ /dev/null
@@ -1,72 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on DETAILS</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - content:none; - padding:0; margin:0; border:none; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } -summary { display:none; } - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", "overflow:clip", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "details", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - elem.setAttribute("open", "true"); - let summary = document.createElement("summary"); // we need a summary child to avoid details creating an anonymous child - elem.append(summary); - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-details.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-details.html deleted file mode 100644 index 6ac94c3..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-details.html +++ /dev/null
@@ -1,78 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on DETAILS</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <meta name="assert" content="content:none should inhibit the <details> children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-details-ref.html"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - content:none; - padding:0; margin:0; border:none; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", "overflow:clip", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "details", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - elem.setAttribute("open", "true"); - let summary = document.createElement("summary"); - summary.append(document.createTextNode("FAIL")); - elem.append(summary); - elem.append(document.createTextNode("FAIL")); - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-fieldset-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-fieldset-ref.html deleted file mode 100644 index 49a86e7..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-fieldset-ref.html +++ /dev/null
@@ -1,68 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on FIELDSET</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - padding:0; margin:0; border:none; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "fieldset" - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';'; - elem.className = c; - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-fieldset.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-fieldset.html deleted file mode 100644 index 4ada3b7..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-fieldset.html +++ /dev/null
@@ -1,77 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on FIELDSET</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <meta name="assert" content="content:none should inhibit the <fieldset> children, including rendered legends, from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-fieldset-ref.html"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - content:none; - padding:0; margin:0; border:none; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "fieldset" - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';'; - elem.className = c; - elem.append(document.createTextNode("FAIL")); - let legend = document.createElement("legend"); - legend.append(document.createTextNode("FAIL")); - elem.append(legend); - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-input-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-input-ref.html deleted file mode 100644 index faa3ba3..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-input-ref.html +++ /dev/null
@@ -1,68 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on INPUT</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <style> -html,body, input { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - padding:0; margin:0; border:none; -} -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "" - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "input" - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - elem.value = "PASS"; - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-input.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-input.html deleted file mode 100644 index 5cc76ba..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-input.html +++ /dev/null
@@ -1,73 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on INPUT</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <meta name="assert" content="content:none has no effect on <input> as it has no children"> - <link rel="match" href="content-none-input-ref.html"> - <style> -html,body, input { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - content:none; - padding:0; margin:0; border:none; -} -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "" - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "input" - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - elem.value = "PASS"; - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-math-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-math-ref.html deleted file mode 100644 index 5e43f2ec..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-math-ref.html +++ /dev/null
@@ -1,68 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on MATH</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - padding:0; margin:0; border:none; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", "overflow:clip", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "math", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-math.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-math.html deleted file mode 100644 index 2d5e78f..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-math.html +++ /dev/null
@@ -1,76 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on MATH</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <meta name="assert" content="content:none should inhibit the <math> children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-math-ref.html"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - content:none; - padding:0; margin:0; border:none; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", "overflow:clip", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "math", - ]; - const classes = [ - "", "after", "before", - ]; -const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - let ms = document.createElementNS("http://www.w3.org/1998/Math/MathML", "ms"); - ms.append(document.createTextNode("FAIL")); - elem.append(ms); - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-option-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-option-ref.html deleted file mode 100644 index 336c5bf..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-option-ref.html +++ /dev/null
@@ -1,75 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on OPTION</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <style> -html,body { - color:black; background-color:white; xfont:5px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -option { - padding:0; margin:0; border:none; - font:5px/1 Ahem; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:clip", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "option", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let select = document.createElement("select"); - select.setAttribute("size", "2"); - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - select.append(elem); - let option = document.createElement("option"); - option.append(document.createTextNode("pass")); - select.append(option); - body.append(select); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-option.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-option.html deleted file mode 100644 index 5eff4777..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-option.html +++ /dev/null
@@ -1,83 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on OPTION</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <meta name="assert" content="content:none should inhibit the <option> children from having boxes."> - <link rel="match" href="content-none-option-ref.html"> - <style> -html,body { - color:black; background-color:white; xfont:5px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -option:nth-child(1) { - content:none; -} -option { - padding:0; margin:0; border:none; - font:5px/1 Ahem; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:clip", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "option", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let select = document.createElement("select"); - select.setAttribute("size", "2"); - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - elem.append(document.createTextNode("FAIL")); - select.append(elem); - let option = document.createElement("option"); - option.append(document.createTextNode("pass")); - select.append(option); - body.append(select); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-block-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-block-ref.html deleted file mode 100644 index e3c2adb..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-block-ref.html +++ /dev/null
@@ -1,17 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on a :root block</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> -<style> -html,body { - padding:0; margin:0; -} -</style> -</head> -<body><span>B</span><span>A</span></body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-block.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-block.html deleted file mode 100644 index c8d15df..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-block.html +++ /dev/null
@@ -1,25 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on a :root block</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <meta name="assert" content="content:none should inhibit the :root's children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-root-block-ref.html"> - <style> -:root { - content: none; - display: block; -} -*::after { content: 'A'; } -*::before { content: 'B'; } - - </style> -</head> -FAIL -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-columns-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-columns-ref.html deleted file mode 100644 index 661c064..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-columns-ref.html +++ /dev/null
@@ -1,22 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on a :root columns layout</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <style> -html,body { - padding:0; margin:0; -} -body { - column-width: 1px; - column-gap: 100px; -} - - </style> -</head> -<body><span>B</span> <span>A</span></body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-columns.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-columns.html deleted file mode 100644 index b3fceb1..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-columns.html +++ /dev/null
@@ -1,26 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on a :root columns layout</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <meta name="assert" content="content:none should inhibit the :root's children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-root-columns-ref.html"> - <style> -:root { - content: none; - column-width: 1px; - column-gap: 100px; -} -*::after { content: 'A'; } -*::before { content: 'B '; } - - </style> -</head> -FAIL -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-flex-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-flex-ref.html deleted file mode 100644 index b14e9f1..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-flex-ref.html +++ /dev/null
@@ -1,22 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on a :root flex</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <style> -html,body { - padding:0; margin:0; -} -body { - display: flex; - border: 1px solid; - gap: 10px; -} - </style> -</head> -<body><x>B</x><x>A</x></body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-flex.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-flex.html deleted file mode 100644 index 0b6c6cab..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-flex.html +++ /dev/null
@@ -1,27 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on a :root flex</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <meta name="assert" content="content:none should inhibit the :root's children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-root-flex-ref.html"> - <style> -:root { - content: none; - display: flex; - border: 1px solid; - gap: 10px; -} -*::after { content: 'A'; } -*::before { content: 'B'; } - - </style> -</head> -FAIL -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-grid-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-grid-ref.html deleted file mode 100644 index 9b092c6..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-grid-ref.html +++ /dev/null
@@ -1,23 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on a :root grid</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <style> -html,body { - padding:0; margin:0; -} -body { - display: grid; - border: 1px solid; - grid-template-columns: 50px 50px; - gap: 10px; -} - </style> -</head> -<body><x>B</x><x>A</x></body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-grid.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-grid.html deleted file mode 100644 index e97f784..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-grid.html +++ /dev/null
@@ -1,28 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on a :root grid</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <meta name="assert" content="content:none should inhibit the :root's children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-root-grid-ref.html"> - <style> -:root { - content: none; - display: grid; - border: 1px solid; - grid-template-columns: 50px 50px; - gap: 10px; -} -*::after { content: 'A'; } -*::before { content: 'B'; } - - </style> -</head> -FAIL -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-ruby-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-ruby-ref.html deleted file mode 100644 index cfb0ecd..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-ruby-ref.html +++ /dev/null
@@ -1,21 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on a :root ruby (blockified) box</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <style> -html,body { - padding:0; margin:0; -} -body { - border: 1px solid; - margin: 50px; -} - </style> -</head> -<body><x>B</x><x>A</x></body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-ruby.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-ruby.html deleted file mode 100644 index 8434d96..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-ruby.html +++ /dev/null
@@ -1,34 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on a :root ruby (blockified) box</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <meta name="assert" content="content:none should inhibit the :root's children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-root-ruby-ref.html"> - <style> -:root { - content: none; - display: ruby; - border: 1px solid; - margin: 50px; -} -*::after { content: 'A'; } -*::before { content: 'B'; } - - </style> -</head> -べ -<rtc> - <rt>る</rt> -</rtc> -<rbc> - <rb>FAIL</rb> - <rb>FAIL</rb> -</rbc> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-table-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-table-ref.html deleted file mode 100644 index d32fdf05..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-table-ref.html +++ /dev/null
@@ -1,22 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on a :root table</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <style> -html,body { - padding:0; margin:0; -} -body { - display: table; - border: 1px solid; - border-spacing: 10px; -} - </style> -</head> -<body><x>B</x><x>A</x></body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-table.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-table.html deleted file mode 100644 index 92e4a77..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-root-table.html +++ /dev/null
@@ -1,28 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on a :root table</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <meta name="assert" content="content:none should inhibit the :root's children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-root-table-ref.html"> - <style> -:root { - content: none; - display: table; - border: 1px solid; - border-spacing: 10px; -} -*::after { content: 'A'; } -*::before { content: 'B'; } - - </style> -</head> -<x style="display:table-cell">FAIL</x> -</html> -
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-1-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-1-ref.html index 5fef3a4..0c1f718 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-1-ref.html +++ b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-1-ref.html
@@ -14,15 +14,25 @@ html,body { color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; } -body { margin-left: 3ch; } -body > * { +body { + margin-left: 3ch; +} +* { font:10px/1 Ahem; } +.wrapper { + display: inline-block; + position: relative; + height: 2em; + width: 5em; + border: 1px solid black; + margin: 1px; + vertical-align: top; +} +.wrapper > * { padding:0; margin:0; border:none; - font:5px/1 Ahem; } ::marker { content: 'M'; } .after::after { content: 'A'; } .before::before { content: 'B'; } - </style> </head> <body> @@ -53,12 +63,16 @@ for (var p of position) { for (var c of classes) { for (var t of tags) { + let wrapper = document.createElement("div"); + wrapper.className = "wrapper"; let elem = document.createElement(t); elem.style = d + ';' + o + ';' + p + ';' elem.className = c; - let option = document.createElement("option"); // need an empty option to get same line-height + let option = document.createElement("option"); + option.append(document.createTextNode("X")); elem.append(option); - body.append(elem); + wrapper.appendChild(elem); + body.append(wrapper); } } } @@ -67,6 +81,5 @@ document.body.style.display = ''; </script> - </body> </html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-1.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-1.html index 450dd66e..73fe4b0d 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-1.html +++ b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-1.html
@@ -9,25 +9,36 @@ <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> + <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1979755"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> <meta name="flags" content="ahem"> - <meta name="assert" content="content:none should inhibit the <select> children from having boxes."> + <meta name="assert" content="content:none should not inhibit the <select> children from having boxes."> <meta name="timeout" content="long"> <link rel="match" href="content-none-select-1-ref.html"> <style> html,body { color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; } -body { margin-left: 3ch; } -body > * { +body { + margin-left: 3ch; +} +* { font:10px/1 Ahem; } +.wrapper { + display: inline-block; + position: relative; + height: 2em; + width: 5em; + border: 1px solid black; + margin: 1px; + vertical-align: top; +} +.wrapper > * { content:none; padding:0; margin:0; border:none; - font:5px/1 Ahem; } ::marker { content: 'M'; } .after::after { content: 'A'; } .before::before { content: 'B'; } - </style> </head> <body> @@ -58,16 +69,16 @@ for (var p of position) { for (var c of classes) { for (var t of tags) { + let wrapper = document.createElement("div"); + wrapper.className = "wrapper"; let elem = document.createElement(t); elem.style = d + ';' + o + ';' + p + ';' elem.className = c; let option = document.createElement("option"); - option.append(document.createTextNode("FAIL")); + option.append(document.createTextNode("X")); elem.append(option); - option = document.createElement("option"); - option.append(document.createTextNode("FAIL")); - elem.append(option); - body.append(elem); + wrapper.appendChild(elem); + body.append(wrapper); } } } @@ -76,6 +87,5 @@ document.body.style.display = ''; </script> - </body> </html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-2-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-2-ref.html deleted file mode 100644 index 4848b57..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-2-ref.html +++ /dev/null
@@ -1,70 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on SELECT size=2</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - padding:0; margin:0; border:none; - font:5px/1 Ahem; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", "overflow:clip", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "select", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - elem.setAttribute("size", "2"); - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-2.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-2.html deleted file mode 100644 index 4b8f0f5c..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-select-2.html +++ /dev/null
@@ -1,81 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on SELECT size=2</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <meta name="assert" content="content:none should inhibit the <select> children from having boxes."> - <link rel="match" href="content-none-select-2-ref.html"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - content:none; - padding:0; margin:0; border:none; - font:5px/1 Ahem; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", "overflow:clip", - ]; - const position = [ - "", "position:absolute", - ]; - const tags = [ - "select", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - elem.setAttribute("size", "2"); - let option = document.createElement("option"); - option.append(document.createTextNode("FAIL")); - elem.append(option); - option = document.createElement("option"); - option.append(document.createTextNode("FAIL")); - elem.append(option); - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-span-dynamic.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-span-dynamic.html deleted file mode 100644 index 078be9928..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-span-dynamic.html +++ /dev/null
@@ -1,81 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on SPAN with dynamically inserted children</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <meta name="assert" content="content:none should inhibit the <span> children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-span-ref.html"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - content:none; - padding:0; margin:0; border:none; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", "overflow:clip", - ]; - const position = [ - "", "position:absolute", "position:relative", - ]; - const tags = [ - "span", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c + " test"; - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; - document.body.offsetHeight; - - for (let elem of Array.from(document.querySelectorAll(".test"))) { - elem.append(document.createTextNode("FAIL")) - elem.append(document.createElement("div")); - } - - document.body.offsetHeight; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-span-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-span-ref.html deleted file mode 100644 index cec124a3..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-span-ref.html +++ /dev/null
@@ -1,68 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on SPAN</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - padding:0; margin:0; border:none; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", "overflow:clip", - ]; - const position = [ - "", "position:absolute", "position:relative", - ]; - const tags = [ - "span", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-span.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-span.html deleted file mode 100644 index b963869c..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-span.html +++ /dev/null
@@ -1,75 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on SPAN</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <meta name="assert" content="content:none should inhibit the <span> children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-span-ref.html"> - <style> -html,body { - color:black; background-color:white; font:4px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body > * { - content:none; - padding:0; margin:0; border:none; -} -::marker { content: 'M'; } -.after::after { content: 'A'; } -.before::before { content: 'B'; } - - </style> -</head> -<body> - -<script> - document.body.style.display = 'none'; - - const display = [ - "display:block", "display:inline", "display:ruby", "display:none", "display:grid", - "display:flex", "display:table", "display:list-item", "display:contents", - "columns:2", - ]; - const overflow = [ - "", "overflow:scroll", "overflow:clip", - ]; - const position = [ - "", "position:absolute", "position:relative", - ]; - const tags = [ - "span", - ]; - const classes = [ - "", "after", "before", - ]; - const body = document.body; - for (var d of display) { - for (var o of overflow) { - for (var p of position) { - for (var c of classes) { - for (var t of tags) { - let elem = document.createElement(t); - elem.style = d + ';' + o + ';' + p + ';' - elem.className = c; - elem.append(document.createTextNode("FAIL")) - elem.append(document.createElement("div")); - body.append(elem); - } - } - } - } - } - - document.body.style.display = ''; -</script> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-table-ref.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-table-ref.html deleted file mode 100644 index ec5d167..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-table-ref.html +++ /dev/null
@@ -1,49 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>Reference: content:none on various table boxes</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <style> -html,body { - color:black; background-color:white; font:10px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body * { - border:3px solid; -} -.after::after { content: 'A'; } -.before::before { content: 'B'; } -x-table { display:table } -x-thead { display:table-row-group } -x-tr { display:table-row } -x-td { display:table-cell } - </style> -</head> -<body> - -<table><thead><tr><td class="c"></td></tr></thead></table> -<table><thead><tr class="c"></tr></thead></table> -<table><thead class="c"></thead></table> -<table class="c"></thead></table> - -<table><thead><tr><td class="c"></td><td>PASS</td></tr></thead></table> -<table><thead><tr class="c"></tr><tr><td>PASS</td></tr></thead></table> -<table><thead class="c"></thead><thead><tr><td>PASS</td></tr></thead></table> - -<x-table><x-thead><x-tr><x-td class="c"></x-td></x-tr></x-thead></x-table> -<x-table><x-thead><x-tr class="c"></x-tr></x-thead></x-table> -<x-table><x-thead class="c"></x-thead></x-table> -<x-table class="c"></x-table> - -<x-table><x-thead><x-tr><x-td class="c"></x-td><x-td>PASS</x-td></x-tr></x-thead></x-table> -<x-table><x-thead><x-tr class="c"></x-tr><x-tr><x-td>PASS</x-td></x-tr></x-thead></x-table> -<x-table><x-thead class="c"></x-thead><x-thead><x-tr><x-td>PASS</x-td></x-tr></x-thead></x-table> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-table.html b/third_party/blink/web_tests/external/wpt/css/css-content/content-none-table.html deleted file mode 100644 index 723e2e41..0000000 --- a/third_party/blink/web_tests/external/wpt/css/css-content/content-none-table.html +++ /dev/null
@@ -1,54 +0,0 @@ -<!doctype html> -<!-- - Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ ---> -<html><head> - <meta charset="utf-8"> - <title>CSS Content: content:none on various table boxes</title> - <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="help" href="https://drafts.csswg.org/css-content/#valdef-content-none"> - <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1699964"> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="flags" content="ahem"> - <meta name="assert" content="content:none should inhibit table children from having boxes. Its pseudos should not be affected though."> - <link rel="match" href="content-none-table-ref.html"> - <style> -html,body { - color:black; background-color:white; font:10px/1 Ahem; padding:0; margin:0; -} -body { margin-left: 3ch; } -body * { - border:3px solid; -} -.after::after { content: 'A'; } -.before::before { content: 'B'; } -.c { content:none; } -x-table { display:table } -x-thead { display:table-row-group } -x-tr { display:table-row } -x-td { display:table-cell } - </style> -</head> -<body> - -<table><thead><tr><td class="c">FAIL<x>FAIL</x></td></tr></thead></table> -<table><thead><tr class="c"><td>FAIL<x>FAIL</x></td></tr></thead></table> -<table><thead class="c"><tr><td>FAIL<x>FAIL</x></td></tr></thead></table> -<table class="c"><thead><tr><td>FAIL<x>FAIL</x></td></tr></thead></table> - -<table><thead><tr><td class="c">FAIL<x>FAIL</x></td><td>PASS</td></tr></thead></table> -<table><thead><tr class="c"><td>FAIL<x>FAIL</x></td></tr><tr><td>PASS</td></tr></thead></table> -<table><thead class="c"><tr><td>FAIL<x>FAIL</x></td></tr></thead><thead><tr><td>PASS</td></tr></thead></table> - -<x-table><x-thead><x-tr><x-td class="c">FAIL<x>FAIL</x></x-td></x-tr></x-thead></x-table> -<x-table><x-thead><x-tr class="c"><x-td>FAIL<x>FAIL</x></x-td></x-tr></x-thead></x-table> -<x-table><x-thead class="c"><x-tr><x-td>FAIL<x>FAIL</x></x-td></x-tr></x-thead></x-table> -<x-table class="c"><x-thead><x-tr><x-td>FAIL<x>FAIL</x></x-td></x-tr></x-thead></x-table> - -<x-table><x-thead><x-tr><x-td class="c">FAIL<x>FAIL</x></x-td><x-td>PASS</x-td></x-tr></x-thead></x-table> -<x-table><x-thead><x-tr class="c"><x-td>FAIL<x>FAIL</x></x-td></x-tr><x-tr><x-td>PASS</x-td></x-tr></x-thead></x-table> -<x-table><x-thead class="c"><x-tr><x-td>FAIL<x>FAIL</x></x-td></x-tr></x-thead><x-thead><x-tr><x-td>PASS</x-td></x-tr></x-thead></x-table> - -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-flexbox/alignment/flex-align-baseline-column-vert-lr-rtl-wrap-reverse.html b/third_party/blink/web_tests/external/wpt/css/css-flexbox/alignment/flex-align-baseline-column-vert-lr-rtl-wrap-reverse.html index 767c129b..318c6036 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-flexbox/alignment/flex-align-baseline-column-vert-lr-rtl-wrap-reverse.html +++ b/third_party/blink/web_tests/external/wpt/css/css-flexbox/alignment/flex-align-baseline-column-vert-lr-rtl-wrap-reverse.html
@@ -2,7 +2,7 @@ <html> <head> <link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> -<meta name="assert" content="Baseline aligned item should be aligned towards the start of the inline axis (bottom side)." +<meta name="assert" content="Baseline aligned item should be aligned towards the start of the inline axis (bottom side)."> <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-wrap-property"> <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-by-baseline"> <style>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-flexbox/alignment/flex-align-baseline-column-vert-rl-rtl-wrap-reverse.html b/third_party/blink/web_tests/external/wpt/css/css-flexbox/alignment/flex-align-baseline-column-vert-rl-rtl-wrap-reverse.html index 9608301..937741b0 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-flexbox/alignment/flex-align-baseline-column-vert-rl-rtl-wrap-reverse.html +++ b/third_party/blink/web_tests/external/wpt/css/css-flexbox/alignment/flex-align-baseline-column-vert-rl-rtl-wrap-reverse.html
@@ -2,7 +2,7 @@ <html> <head> <link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> -<meta name="assert" content="Baseline aligned item should be aligned towards the start of the inline axis (bottom side)." +<meta name="assert" content="Baseline aligned item should be aligned towards the start of the inline axis (bottom side)."> <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-wrap-property"> <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-by-baseline"> <style>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-flexbox/stretched-child-in-nested-flexbox-003.html b/third_party/blink/web_tests/external/wpt/css/css-flexbox/stretched-child-in-nested-flexbox-003.html new file mode 100644 index 0000000..7f8cd10d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-flexbox/stretched-child-in-nested-flexbox-003.html
@@ -0,0 +1,19 @@ +<!DOCTYPE html> +<title>css-flexbox: stretching of flex item in nested flexbox</title> +<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> +<link rel="help" href="https://github.com/servo/servo/issues/38023"> +<link rel="match" href="/css/reference/ref-filled-green-200px-square.html"> +<meta name="assert" content="Due to min-height, the outer flex container is 200px tall. + It's single-line, so its flex item stretched to that size, and is considered definite. + Therefore, the percentage in the nested flex container resolves as 200px. + And thus its flex item is also stretched to be 200px tall. +"> + +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="display: flex; min-height: 200px"> + <div> + <div style="display: flex; height: 100%; background-color: red"> + <div style="width: 200px; background-color: green;"></div> + </div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-large-border-padding-ref.html b/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-large-border-padding-ref.html new file mode 100644 index 0000000..f9b3436e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-large-border-padding-ref.html
@@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> +<head> +<style> +.grid { + display: grid; + padding: 13px; + padding-top: 74px; + padding-bottom: 42px; + border: 23px solid black; + border-bottom-width: 45px; + width: 100px; + height: 500px; + background-color: blue; + background-clip: content-box; +} +.item { + width: 50px; + height: 100px; + background-color: green; + align-self: center; +} +</style> +</head> +<body> +<div class="grid"> + <div class="item"></div> +</div> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-large-border-padding.html b/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-large-border-padding.html new file mode 100644 index 0000000..e238346 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-large-border-padding.html
@@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> +<head> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos"> +<link rel="help" href="https://www.w3.org/TR/css-position-3/#staticpos-rect"> +<link rel="match" href="grid-abspos-staticpos-align-self-center-large-border-padding-ref.html"> +<meta name="assert" content="Center of the abspos child should be aligned within the center of the grid's content box."> +<style> +.grid { + display: grid; + padding: 13px; + padding-top: 74px; + padding-bottom: 42px; + border: 23px solid black; + border-bottom-width: 45px; + width: 100px; + height: 500px; + background-color: blue; + background-clip: content-box; +} +.abspos { + position: absolute; + width: 50px; + height: 100px; + background-color: green; + align-self: center; +} +</style> +</head> +<body> +<div class="grid"> + <div class="abspos"></div> +</div> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-ref.html b/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-ref.html new file mode 100644 index 0000000..3f6fd20 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center-ref.html
@@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html> +<head> +<style> +.grid { + display: grid; + border: 1px solid black; + width: 100px; + height: 100px; +} +.item { + width: 50px; + height: 50px; + background-color: green; + align-self: center; +} +</style> +</head> +<body> +<div class="grid"> + <div class="item"></div> +</div> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center.html b/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center.html new file mode 100644 index 0000000..3d0ef33 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-grid/abspos/grid-abspos-staticpos-align-self-center.html
@@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html> +<head> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos"> +<link rel="help" href="https://www.w3.org/TR/css-position-3/#staticpos-rect"> +<link rel="match" href="grid-abspos-staticpos-align-self-center-ref.html"> +<meta name="assert" content="Center of the abspos child should be aligned within the center of the grid's content box."> +<style> +.grid { + display: grid; + border: 1px solid black; + width: 100px; + height: 100px; +} +.abspos { + position: absolute; + width: 50px; + height: 50px; + background-color: green; + align-self: center; +} +</style> +</head> +<body> +<div class="grid"> + <div class="abspos"></div> +</div> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-grid/grid-items/grid-size-with-orthogonal-child-001.html b/third_party/blink/web_tests/external/wpt/css/css-grid/grid-items/grid-size-with-orthogonal-child-001.html new file mode 100644 index 0000000..30871f3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-grid/grid-items/grid-size-with-orthogonal-child-001.html
@@ -0,0 +1,34 @@ +<!DOCTYPE html> +<title>CSS Grid Layout Test: Grid container sizing with an orthogonal grid item using percentage sizes</title> +<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1977501"> +<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> +<style> +.grid { + display: inline-grid; + grid-template-rows: 100px; + background-color: green; +} + +.item { + writing-mode: vertical-rl; + inline-size: 100%; + block-size: 50%; +} + +.item > span { + display: inline-block; + inline-size: 40px; + block-size: 100px; +} +</style> + +<!-- This testcase is adapted from Testcase #1 in Bug 1977501 comment 0. --> + +<p>Test passes if there is a filled green square.</p> +<div class="grid"> + <div class="item"> + <span></span><span></span> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-grid/grid-items/grid-size-with-orthogonal-child-002.html b/third_party/blink/web_tests/external/wpt/css/css-grid/grid-items/grid-size-with-orthogonal-child-002.html new file mode 100644 index 0000000..3787d16 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-grid/grid-items/grid-size-with-orthogonal-child-002.html
@@ -0,0 +1,32 @@ +<!DOCTYPE html> +<title>CSS Grid Layout Test: Grid container sizing with an orthogonal grid item</title> +<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1453517"> +<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> +<style> +.grid { + display: inline-grid; + grid-template-rows: 100px; + background-color: green; +} + +.item { + writing-mode: vertical-lr; +} + +.item > span { + display: inline-block; + inline-size: 100px; + block-size: 50px; +} +</style> + +<!-- This testcase is adapted from Testcase #1 in Bug 1453571 comment 0. --> + +<p>Test passes if there is a filled green square.</p> +<div class="grid"> + <div class="item"> + <span></span><span></span> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-computed-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-computed-expected.txt new file mode 100644 index 0000000..eb86551 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-computed-expected.txt
@@ -0,0 +1,19 @@ +This is a testharness.js-based test. +[FAIL] Property text-decoration value 'none' + assert_equals: expected "none" but got "rgb(0, 0, 255)" +[FAIL] Property text-decoration value 'line-through' + assert_equals: expected "line-through" but got "line-through rgb(0, 0, 255)" +[FAIL] Property text-decoration value 'solid' + assert_equals: expected "none" but got "rgb(0, 0, 255)" +[FAIL] Property text-decoration value 'currentcolor' + assert_equals: expected "none" but got "rgb(0, 0, 255)" +[FAIL] Property text-decoration value 'double overline underline' + assert_equals: expected "underline overline double" but got "underline overline double rgb(0, 0, 255)" +[FAIL] Property text-decoration value 'auto' + assert_equals: expected "none" but got "rgb(0, 0, 255)" +[FAIL] Property text-decoration value 'from-font' + assert_equals: expected "from-font" but got "from-font rgb(0, 0, 255)" +[FAIL] Property text-decoration value '10px' + assert_equals: expected "10px" but got "10px rgb(0, 0, 255)" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-computed.html b/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-computed.html index c078396..94804170 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-computed.html +++ b/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-computed.html
@@ -19,12 +19,12 @@ <script> 'use strict'; const currentColor = "rgb(0, 0, 255)"; -test_computed_value("text-decoration", "none", currentColor); -test_computed_value("text-decoration", "line-through", "line-through " + currentColor); -test_computed_value("text-decoration", "solid", currentColor); -test_computed_value("text-decoration", "currentcolor", currentColor); +test_computed_value("text-decoration", "none"); +test_computed_value("text-decoration", "line-through"); +test_computed_value("text-decoration", "solid", "none"); +test_computed_value("text-decoration", "currentcolor", "none"); -test_computed_value("text-decoration", "double overline underline", "underline overline double " + currentColor); +test_computed_value("text-decoration", "double overline underline", "underline overline double"); test_computed_value("text-decoration", "underline overline line-through red", "underline overline line-through rgb(255, 0, 0)"); test_computed_value("text-decoration", "rgba(10, 20, 30, 0.4) dotted", "dotted rgba(10, 20, 30, 0.4)"); @@ -34,8 +34,8 @@ test_computed_value("text-decoration", "underline overline line-through blink red", ["underline overline line-through rgb(255, 0, 0)", "underline overline line-through blink rgb(255, 0, 0)"]); // Add text-decoration-thickness in [css-text-decor-4]. -test_computed_value("text-decoration", "auto", currentColor); -test_computed_value("text-decoration", "from-font", "from-font " + currentColor); -test_computed_value("text-decoration", "10px", "10px " + currentColor); +test_computed_value("text-decoration", "auto", "none"); +test_computed_value("text-decoration", "from-font"); +test_computed_value("text-decoration", "10px"); test_computed_value("text-decoration", "underline red from-font", "underline from-font rgb(255, 0, 0)"); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text/text-spacing-trim/text-spacing-trim-fallback-001-ref.html b/third_party/blink/web_tests/external/wpt/css/css-text/text-spacing-trim/text-spacing-trim-fallback-001-ref.html index d3f72b2e..cf508615 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-text/text-spacing-trim/text-spacing-trim-fallback-001-ref.html +++ b/third_party/blink/web_tests/external/wpt/css/css-text/text-spacing-trim/text-spacing-trim-fallback-001-ref.html
@@ -17,4 +17,7 @@ <div id="container"> <div>国<halt>。</halt>:国</div> <div>国<halt>。</halt>:国</div> + <div>国<halt>。</halt>:国</div> + <div>国。<halt>「</halt>国</div> + <div>国。<halt>「</halt>国</div> </div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text/text-spacing-trim/text-spacing-trim-fallback-001.html b/third_party/blink/web_tests/external/wpt/css/css-text/text-spacing-trim/text-spacing-trim-fallback-001.html index 1a13be3..3c31fec2 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-text/text-spacing-trim/text-spacing-trim-fallback-001.html +++ b/third_party/blink/web_tests/external/wpt/css/css-text/text-spacing-trim/text-spacing-trim-fallback-001.html
@@ -12,6 +12,10 @@ src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-3002.otf'); } @font-face { + font-family: halt-300C; + src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-300C.otf'); +} +@font-face { font-family: halt-FF1A; src: url('/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-FF1A.otf'); } @@ -23,4 +27,7 @@ <div id="container"> <div>国。:国</div> <div style="font-family: halt-FF1A, halt-3002, halt">国。:国</div> + <div style="font-family: halt-3002, halt-FF1A, halt">国。:国</div> + <div style="font-family: halt-3002, halt-300C, halt">国。「国</div> + <div style="font-family: halt-300C, halt-3002, halt">国。「国</div> </div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-anonymous-negative.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-anonymous-negative.sub.html similarity index 69% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-anonymous-negative.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-anonymous-negative.sub.html index f5066a5..c0eb5d4 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-anonymous-negative.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-anonymous-negative.sub.html
@@ -1,17 +1,17 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: crossorigin(anonymous)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-crossorigin-modifier"> +<title>Request URL Modifiers: cross-origin(anonymous)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-cross-origin-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../url-image-ref.html"> -<meta name="assert" content="A url with the request URL modifier crossorigin(anonymous) requires a response with the appropriate headers."> +<meta name="assert" content="A url with the request URL modifier cross-origin(anonymous) requires a response with the appropriate headers."> <style> .test { width: 200px; height: 200px; background-color: green; - background-image: url("http://{{hosts[][]}}:{{ports[http][1]}}/css/support/1x1-red.png" crossorigin(anonymous)); + background-image: url("http://{{hosts[][]}}:{{ports[http][1]}}/css/support/1x1-red.png" cross-origin(anonymous)); } </style> </head>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-anonymous.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-anonymous.sub.html similarity index 72% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-anonymous.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-anonymous.sub.html index 0a45eda..83ce64f 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-anonymous.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-anonymous.sub.html
@@ -1,17 +1,17 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: crossorigin(anonymous)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-crossorigin-modifier"> +<title>Request URL Modifiers: cross-origin(anonymous)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-cross-origin-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../url-image-ref.html"> -<meta name="assert" content="A url with the request URL modifier crossorigin(anonymous) requires a response with the appropriate headers."> +<meta name="assert" content="A url with the request URL modifier cross-origin(anonymous) requires a response with the appropriate headers."> <style> .test { width: 200px; height: 200px; background-color: red; - background-image: url("http://{{hosts[][]}}:{{ports[http][1]}}/css/support/1x1-green.png?pipe=header(Access-Control-Allow-Origin,*)" crossorigin(anonymous)); + background-image: url("http://{{hosts[][]}}:{{ports[http][1]}}/css/support/1x1-green.png?pipe=header(Access-Control-Allow-Origin,*)" cross-origin(anonymous)); } </style> </head>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-use-credentials-negative.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-use-credentials-negative.sub.html similarity index 67% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-use-credentials-negative.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-use-credentials-negative.sub.html index 952f953d..73fc57d 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-use-credentials-negative.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-use-credentials-negative.sub.html
@@ -1,17 +1,17 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: crossorigin(use-credentials)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-crossorigin-modifier"> +<title>Request URL Modifiers: cross-origin(use-credentials)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-cross-origin-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../url-image-ref.html"> -<meta name="assert" content="A url with the request URL modifier crossorigin(use-credentials) requires a response with the appropriate headers."> +<meta name="assert" content="A url with the request URL modifier cross-origin(use-credentials) requires a response with the appropriate headers."> <style> .test { width: 200px; height: 200px; background-color: green; - background-image: url("http://{{hosts[][]}}:{{ports[http][1]}}/css/support/1x1-green.png" crossorigin(use-credentials)); + background-image: url("http://{{hosts[][]}}:{{ports[http][1]}}/css/support/1x1-green.png" cross-origin(use-credentials)); } </style> </head>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-use-credentials.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-use-credentials.sub.html similarity index 71% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-use-credentials.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-use-credentials.sub.html index f592a02c..a978de9 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-crossorigin-use-credentials.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/cross-origin/url-image-cross-origin-use-credentials.sub.html
@@ -1,17 +1,17 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: crossorigin(use-credentials)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-crossorigin-modifier"> +<title>Request URL Modifiers: cross-origin(use-credentials)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-cross-origin-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../url-image-ref.html"> -<meta name="assert" content="A url with the request URL modifier crossorigin(use-credentials) requires a response with the appropriate headers."> +<meta name="assert" content="A url with the request URL modifier cross-origin(use-credentials) requires a response with the appropriate headers."> <style> .test { width: 200px; height: 200px; background-color: red; - background-image: url("http://{{hosts[][]}}:{{ports[http][1]}}/css/support/1x1-green.png?pipe=header(Access-Control-Allow-Origin,http://{{hosts[][]}}:{{ports[http][0]}})|header(Access-Control-Allow-Credentials,true)" crossorigin(use-credentials)); + background-image: url("http://{{hosts[][]}}:{{ports[http][1]}}/css/support/1x1-green.png?pipe=header(Access-Control-Allow-Origin,http://{{hosts[][]}}:{{ports[http][0]}})|header(Access-Control-Allow-Credentials,true)" cross-origin(use-credentials)); } </style> </head>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrerpolicy-cross-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrer-policy-cross-origin.sub.html similarity index 63% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrerpolicy-cross-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrer-policy-cross-origin.sub.html index ce51df6..e960d92 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrerpolicy-cross-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrer-policy-cross-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(no-referrer-when-downgrade)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(no-referrer-when-downgrade)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A cross origin url with the request URL modifier referrerpolicy(no-referrer-when-downgrade) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A cross origin url with the request URL modifier referrer-policy(no-referrer-when-downgrade) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`cross-origin`, referrer_policy:`no-referrer-when-downgrade`, expected_referrer:`url`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrerpolicy-same-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrer-policy-same-origin.sub.html similarity index 63% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrerpolicy-same-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrer-policy-same-origin.sub.html index 6860e73..b374f71 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrerpolicy-same-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer-when-downgrade/url-image-referrer-policy-same-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(no-referrer-when-downgrade)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(no-referrer-when-downgrade)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A same origin url with the request URL modifier referrerpolicy(no-referrer-when-downgrade) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A same origin url with the request URL modifier referrer-policy(no-referrer-when-downgrade) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`same-origin`, referrer_policy:`no-referrer-when-downgrade`, expected_referrer:`url`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrerpolicy-cross-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrer-policy-cross-origin.sub.html similarity index 65% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrerpolicy-cross-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrer-policy-cross-origin.sub.html index 30a52a8..dbfd63b2 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrerpolicy-cross-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrer-policy-cross-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(no-referrer)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(no-referrer)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A cross origin url with the request URL modifier referrerpolicy(no-referrer) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A cross origin url with the request URL modifier referrer-policy(no-referrer) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`cross-origin`, referrer_policy:`no-referrer`, expected_referrer:`none`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrerpolicy-same-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrer-policy-same-origin.sub.html similarity index 65% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrerpolicy-same-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrer-policy-same-origin.sub.html index ebbff83..c25f059 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrerpolicy-same-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/no-referrer/url-image-referrer-policy-same-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(no-referrer)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(no-referrer)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A same origin url with the request URL modifier referrerpolicy(no-referrer) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A same origin url with the request URL modifier referrer-policy(no-referrer) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`same-origin`, referrer_policy:`no-referrer`, expected_referrer:`none`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrerpolicy-cross-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrer-policy-cross-origin.sub.html similarity index 64% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrerpolicy-cross-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrer-policy-cross-origin.sub.html index 6285f2f..600f2b17c 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrerpolicy-cross-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrer-policy-cross-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(origin-when-cross-origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(origin-when-cross-origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A cross origin url with the request URL modifier referrerpolicy(origin-when-cross-origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A cross origin url with the request URL modifier referrer-policy(origin-when-cross-origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`cross-origin`, referrer_policy:`origin-when-cross-origin`, expected_referrer:`origin`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrerpolicy-same-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrer-policy-same-origin.sub.html similarity index 64% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrerpolicy-same-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrer-policy-same-origin.sub.html index eb4e081..469bbdc 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrerpolicy-same-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin-when-cross-origin/url-image-referrer-policy-same-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(origin-when-cross-origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(origin-when-cross-origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A same origin url with the request URL modifier referrerpolicy(origin-when-cross-origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A same origin url with the request URL modifier referrer-policy(origin-when-cross-origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`same-origin`, referrer_policy:`origin-when-cross-origin`, expected_referrer:`url`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrerpolicy-cross-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrer-policy-cross-origin.sub.html similarity index 66% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrerpolicy-cross-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrer-policy-cross-origin.sub.html index 14a8172..5bf82ea 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrerpolicy-cross-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrer-policy-cross-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A cross origin url with the request URL modifier referrerpolicy(origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A cross origin url with the request URL modifier referrer-policy(origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`cross-origin`, referrer_policy:`origin`, expected_referrer:`origin`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrerpolicy-same-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrer-policy-same-origin.sub.html similarity index 66% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrerpolicy-same-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrer-policy-same-origin.sub.html index 1cc6f01..378c24c 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrerpolicy-same-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/origin/url-image-referrer-policy-same-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A same origin url with the request URL modifier referrerpolicy(origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A same origin url with the request URL modifier referrer-policy(origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`same-origin`, referrer_policy:`origin`, expected_referrer:`origin`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrerpolicy-cross-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrer-policy-cross-origin.sub.html similarity index 65% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrerpolicy-cross-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrer-policy-cross-origin.sub.html index de23eb1..3c2280ef 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrerpolicy-cross-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrer-policy-cross-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(same-origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(same-origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A cross origin url with the request URL modifier referrerpolicy(same-origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A cross origin url with the request URL modifier referrer-policy(same-origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`cross-origin`, referrer_policy:`same-origin`, expected_referrer:`none`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrerpolicy-same-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrer-policy-same-origin.sub.html similarity index 65% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrerpolicy-same-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrer-policy-same-origin.sub.html index 866affc..62ba453 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrerpolicy-same-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/same-origin/url-image-referrer-policy-same-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(same-origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(same-origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A same origin url with the request URL modifier referrerpolicy(same-origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A same origin url with the request URL modifier referrer-policy(same-origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`same-origin`, referrer_policy:`same-origin`, expected_referrer:`url`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrerpolicy-cross-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrer-policy-cross-origin.sub.html similarity index 63% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrerpolicy-cross-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrer-policy-cross-origin.sub.html index 1e66fbf..c90b28f 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrerpolicy-cross-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrer-policy-cross-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(strict-origin-when-cross-origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(strict-origin-when-cross-origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A cross origin url with the request URL modifier referrerpolicy(strict-origin-when-cross-origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A cross origin url with the request URL modifier referrer-policy(strict-origin-when-cross-origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`cross-origin`, referrer_policy:`strict-origin-when-cross-origin`, expected_referrer:`origin`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrerpolicy-same-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrer-policy-same-origin.sub.html similarity index 63% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrerpolicy-same-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrer-policy-same-origin.sub.html index 57f5351..92a3289 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrerpolicy-same-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin-when-cross-origin/url-image-referrer-policy-same-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(strict-origin-when-cross-origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(strict-origin-when-cross-origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A same origin url with the request URL modifier referrerpolicy(strict-origin-when-cross-origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A same origin url with the request URL modifier referrer-policy(strict-origin-when-cross-origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`same-origin`, referrer_policy:`strict-origin-when-cross-origin`, expected_referrer:`url`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrerpolicy-cross-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrer-policy-cross-origin.sub.html similarity index 65% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrerpolicy-cross-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrer-policy-cross-origin.sub.html index b17ac4b4..8fbbc15 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrerpolicy-cross-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrer-policy-cross-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(strict-origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(strict-origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A cross origin url with the request URL modifier referrerpolicy(strict-origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A cross origin url with the request URL modifier referrer-policy(strict-origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`cross-origin`, referrer_policy:`strict-origin`, expected_referrer:`origin`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrerpolicy-same-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrer-policy-same-origin.sub.html similarity index 65% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrerpolicy-same-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrer-policy-same-origin.sub.html index dadf1c5..678eb9a6 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrerpolicy-same-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/strict-origin/url-image-referrer-policy-same-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(strict-origin)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(strict-origin)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A same origin url with the request URL modifier referrerpolicy(strict-origin) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A same origin url with the request URL modifier referrer-policy(strict-origin) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`same-origin`, referrer_policy:`strict-origin`, expected_referrer:`origin`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrerpolicy-cross-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrer-policy-cross-origin.sub.html similarity index 66% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrerpolicy-cross-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrer-policy-cross-origin.sub.html index dc5a3d51..cebe8759 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrerpolicy-cross-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrer-policy-cross-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(unsafe-url)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(unsafe-url)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A cross origin url with the request URL modifier referrerpolicy(unsafe-url) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A cross origin url with the request URL modifier referrer-policy(unsafe-url) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`cross-origin`, referrer_policy:`unsafe-url`, expected_referrer:`url`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrerpolicy-same-origin.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrer-policy-same-origin.sub.html similarity index 66% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrerpolicy-same-origin.sub.html rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrer-policy-same-origin.sub.html index 7eaba53..b7a8497d 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrerpolicy-same-origin.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/referrer-policy/unsafe-url/url-image-referrer-policy-same-origin.sub.html
@@ -1,12 +1,12 @@ <!DOCTYPE html> <html> <head> -<title>Request URL Modifiers: referrerpolicy(unsafe-url)</title> -<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrerpolicy-modifier"> +<title>Request URL Modifiers: referrer-policy(unsafe-url)</title> +<link rel="help" href="https://drafts.csswg.org/css-values-5/#typedef-request-url-modifier-referrer-policy-modifier"> <link rel="author" title="Sam Weinig" href="mailto:weinig@webkit.org"> <link rel="match" href="../../url-image-ref.html"> -<meta name="assert" content="A same origin url with the request URL modifier referrerpolicy(unsafe-url) sends the appropriate referrer header."> -<script src="../../support/image-referrerpolicy.sub.js"></script> +<meta name="assert" content="A same origin url with the request URL modifier referrer-policy(unsafe-url) sends the appropriate referrer header."> +<script src="../../support/image-referrer-policy.sub.js"></script> <script> test_image_referrer_policy({ load_type:`same-origin`, referrer_policy:`unsafe-url`, expected_referrer:`url`}); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrerpolicy.py b/third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrer-policy.py similarity index 100% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrerpolicy.py rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrer-policy.py
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrerpolicy.sub.js b/third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrer-policy.sub.js similarity index 64% rename from third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrerpolicy.sub.js rename to third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrer-policy.sub.js index 4fc9d46..52152278 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrerpolicy.sub.js +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/support/image-referrer-policy.sub.js
@@ -1,8 +1,8 @@ function make_test_url(type, policy, expected) { if (type == "cross-origin") - return `url("http://{{hosts[][]}}:{{ports[http][1]}}/css/css-values/urls/support/image-referrerpolicy.py?expected_referrer=${expected}&origin=${location.origin}/&url=${document.URL}"${policy ? ` referrerpolicy(${policy})` : ``})`; + return `url("http://{{hosts[][]}}:{{ports[http][1]}}/css/css-values/urls/support/image-referrer-policy.py?expected_referrer=${expected}&origin=${location.origin}/&url=${document.URL}"${policy ? ` referrer-policy(${policy})` : ``})`; if (type == "same-origin") - return `url("http://{{hosts[][]}}:{{ports[http][0]}}/css/css-values/urls/support/image-referrerpolicy.py?expected_referrer=${expected}&origin=${location.origin}/&url=${document.URL}"${policy ? ` referrerpolicy(${policy})` : ``})`; + return `url("http://{{hosts[][]}}:{{ports[http][0]}}/css/css-values/urls/support/image-referrer-policy.py?expected_referrer=${expected}&origin=${location.origin}/&url=${document.URL}"${policy ? ` referrer-policy(${policy})` : ``})`; throw `Unknown type: ${type}`; }
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-computed.sub-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-computed.sub-expected.txt index 3f6e89d..592f620 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-computed.sub-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-computed.sub-expected.txt
@@ -1,47 +1,47 @@ This is a testharness.js-based test. -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(anonymous))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(anonymous))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(use-credentials))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(use-credentials))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(anonymous))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(anonymous))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(use-credentials))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(use-credentials))' is a supported value for background-image. expected true got false [FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar"))' assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar"))' is a supported value for background-image. expected true got false [FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity(""))' assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity(""))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer-when-downgrade))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer-when-downgrade))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(same-origin))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(same-origin))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(origin))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(origin))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(strict-origin))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(strict-origin))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(origin-when-cross-origin))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(origin-when-cross-origin))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(strict-origin-when-cross-origin))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(strict-origin-when-cross-origin))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(unsafe-url))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(unsafe-url))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar"))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar"))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") crossorigin(anonymous))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") crossorigin(anonymous))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar"))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar"))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(anonymous) referrerpolicy(no-referrer))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(anonymous) referrerpolicy(no-referrer))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer) crossorigin(anonymous))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer) crossorigin(anonymous))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous) integrity("sha384-foobar"))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous) integrity("sha384-foobar"))' is a supported value for background-image. expected true got false -[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar") crossorigin(anonymous))' - assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar") crossorigin(anonymous))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer-when-downgrade))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer-when-downgrade))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(same-origin))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(same-origin))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(origin))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(origin))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(strict-origin))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(strict-origin))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(origin-when-cross-origin))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(origin-when-cross-origin))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(strict-origin-when-cross-origin))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(strict-origin-when-cross-origin))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(unsafe-url))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(unsafe-url))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar"))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar"))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") cross-origin(anonymous))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") cross-origin(anonymous))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer) integrity("sha384-foobar"))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer) integrity("sha384-foobar"))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(anonymous) referrer-policy(no-referrer))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(anonymous) referrer-policy(no-referrer))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer) cross-origin(anonymous))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer) cross-origin(anonymous))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer) cross-origin(anonymous))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer) cross-origin(anonymous))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer) cross-origin(anonymous) integrity("sha384-foobar"))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer) cross-origin(anonymous) integrity("sha384-foobar"))' is a supported value for background-image. expected true got false +[FAIL] Property background-image value 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer) integrity("sha384-foobar") cross-origin(anonymous))' + assert_true: 'url("http://web-platform.test:8001/css/support/1x1-green.png" referrer-policy(no-referrer) integrity("sha384-foobar") cross-origin(anonymous))' is a supported value for background-image. expected true got false Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-computed.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-computed.sub.html index bc8c4ad..20c570a5 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-computed.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-computed.sub.html
@@ -12,34 +12,34 @@ // No modifiers test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png")'); -// <crossorigin-modifier> = crossorigin(anonymous | use-credentials) -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(use-credentials))'); +// <cross-origin-modifier> = cross-origin(anonymous | use-credentials) +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(use-credentials))'); // <integrity-modifier> = integrity(<string>) test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar"))'); test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity(""))'); -// <referrerpolicy-modifier> = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url) -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer-when-downgrade))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(same-origin))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(origin))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(strict-origin))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(origin-when-cross-origin))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(strict-origin-when-cross-origin))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(unsafe-url))'); +// <referrer-policy-modifier> = referrer-policy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url) +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer-when-downgrade))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(same-origin))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(origin))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(strict-origin))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(origin-when-cross-origin))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(strict-origin-when-cross-origin))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(unsafe-url))'); // Multiple modifiers -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar"))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar"))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) referrerpolicy(no-referrer))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) referrerpolicy(no-referrer))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer) crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar") crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar"))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") cross-origin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar"))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) referrer-policy(no-referrer))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) cross-origin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) referrer-policy(no-referrer))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer) cross-origin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) cross-origin(anonymous) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_computed_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) integrity("sha384-foobar") cross-origin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))'); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-invalid.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-invalid.sub.html index c30edfb..f0e1a59 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-invalid.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-invalid.sub.html
@@ -6,15 +6,15 @@ <script src="/css/support/parsing-testcommon.js"></script> <script> -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin())'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(,))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous,))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(,anonymous))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous foobar))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) cross-origin(anonymous))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) cross-origin(use-credentials))'); -test_invalid_value('background-image', 'url(crossorigin(anonymous) "http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png")'); -test_invalid_value('background-image', '"http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous)'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin())'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(,))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous,))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(,anonymous))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous foobar))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) cross-origin(anonymous))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) cross-origin(use-credentials))'); +test_invalid_value('background-image', 'url(cross-origin(anonymous) "http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png")'); +test_invalid_value('background-image', '"http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous)'); test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity())'); test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity(,))'); @@ -27,15 +27,19 @@ test_invalid_value('background-image', 'url(integrity("sha384-foobar") "http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png")'); test_invalid_value('background-image', '"http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar")'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy())'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(,))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer,))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(,no-referrer))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer foobar))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer same-origin))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) referrerpolicy(no-referrer))'); -test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) referrerpolicy(same-origin))'); -test_invalid_value('background-image', 'url(referrerpolicy(no-referrer) "http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png")'); -test_invalid_value('background-image', '"http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer)'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy())'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(,))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer,))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(,no-referrer))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer foobar))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer same-origin))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) referrer-policy(no-referrer))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) referrer-policy(same-origin))'); +test_invalid_value('background-image', 'url(referrer-policy(no-referrer) "http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png")'); +test_invalid_value('background-image', '"http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer)'); + +// Test outdated names. +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous))'); +test_invalid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer))'); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-serialize.sub-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-serialize.sub-expected.txt index 69eb24d..ff97ac5 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-serialize.sub-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-serialize.sub-expected.txt
@@ -1,47 +1,47 @@ This is a testharness.js-based test. -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" crossorigin(anonymous))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" cross-origin(anonymous))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" crossorigin(use-credentials))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" cross-origin(use-credentials))" should set the property value assert_not_equals: property should be set got disallowed value "" [FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" integrity(\\"sha384-foobar\\"))" should set the property value assert_not_equals: property should be set got disallowed value "" [FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" integrity(\\"\\"))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(no-referrer))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(no-referrer))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(no-referrer-when-downgrade))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(no-referrer-when-downgrade))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(same-origin))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(same-origin))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(origin))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(origin))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(strict-origin))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(strict-origin))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(origin-when-cross-origin))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(origin-when-cross-origin))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(strict-origin-when-cross-origin))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(strict-origin-when-cross-origin))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(unsafe-url))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(unsafe-url))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" crossorigin(anonymous) integrity(\\"sha384-foobar\\"))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" cross-origin(anonymous) integrity(\\"sha384-foobar\\"))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" integrity(\\"sha384-foobar\\") crossorigin(anonymous))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" integrity(\\"sha384-foobar\\") cross-origin(anonymous))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" integrity(\\"sha384-foobar\\") referrerpolicy(no-referrer))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" integrity(\\"sha384-foobar\\") referrer-policy(no-referrer))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(no-referrer) integrity(\\"sha384-foobar\\"))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(no-referrer) integrity(\\"sha384-foobar\\"))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" crossorigin(anonymous) referrerpolicy(no-referrer))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" cross-origin(anonymous) referrer-policy(no-referrer))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(no-referrer) crossorigin(anonymous))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(no-referrer) cross-origin(anonymous))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" crossorigin(anonymous) integrity(\\"sha384-foobar\\") referrerpolicy(no-referrer))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" cross-origin(anonymous) integrity(\\"sha384-foobar\\") referrer-policy(no-referrer))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" integrity(\\"sha384-foobar\\") referrerpolicy(no-referrer) crossorigin(anonymous))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" integrity(\\"sha384-foobar\\") referrer-policy(no-referrer) cross-origin(anonymous))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(no-referrer) crossorigin(anonymous) integrity(\\"sha384-foobar\\"))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(no-referrer) cross-origin(anonymous) integrity(\\"sha384-foobar\\"))" should set the property value assert_not_equals: property should be set got disallowed value "" -[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrerpolicy(no-referrer) integrity(\\"sha384-foobar\\") crossorigin(anonymous))" should set the property value +[FAIL] e.style['background-image'] = "url(\\"http://web-platform.test:8001/css/support/1x1-green.png\\" referrer-policy(no-referrer) integrity(\\"sha384-foobar\\") cross-origin(anonymous))" should set the property value assert_not_equals: property should be set got disallowed value "" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-serialize.sub.html b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-serialize.sub.html index cca9f2cc..e60a0a2 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-serialize.sub.html +++ b/third_party/blink/web_tests/external/wpt/css/css-values/urls/url-request-modifiers-serialize.sub.html
@@ -10,34 +10,34 @@ // No modifiers test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png")'); -// <crossorigin-modifier> = crossorigin(anonymous | use-credentials) -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(use-credentials))'); +// <cross-origin-modifier> = cross-origin(anonymous | use-credentials) +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(use-credentials))'); // <integrity-modifier> = integrity(<string>) test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar"))'); test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity(""))'); -// <referrerpolicy-modifier> = referrerpolicy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url) -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer-when-downgrade))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(same-origin))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(origin))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(strict-origin))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(origin-when-cross-origin))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(strict-origin-when-cross-origin))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(unsafe-url))'); +// <referrer-policy-modifier> = referrer-policy(no-referrer | no-referrer-when-downgrade | same-origin | origin | strict-origin | origin-when-cross-origin | strict-origin-when-cross-origin | unsafe-url) +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer-when-downgrade))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(same-origin))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(origin))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(strict-origin))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(origin-when-cross-origin))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(strict-origin-when-cross-origin))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(unsafe-url))'); // Multiple modifiers -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar"))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar"))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) referrerpolicy(no-referrer))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) referrerpolicy(no-referrer))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer) crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))'); -test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar") crossorigin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar"))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") cross-origin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar"))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) referrer-policy(no-referrer))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) cross-origin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) referrer-policy(no-referrer))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" integrity("sha384-foobar") referrer-policy(no-referrer) cross-origin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) cross-origin(anonymous) integrity("sha384-foobar"))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))'); +test_valid_value('background-image', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" referrer-policy(no-referrer) integrity("sha384-foobar") cross-origin(anonymous))', 'url("http://{{hosts[][]}}:{{ports[http][0]}}/css/support/1x1-green.png" cross-origin(anonymous) integrity("sha384-foobar") referrer-policy(no-referrer))'); </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-viewport/zoom/zoom-pseudo-image-ref.html b/third_party/blink/web_tests/external/wpt/css/css-viewport/zoom/zoom-pseudo-image-ref.html new file mode 100644 index 0000000..2378659 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-viewport/zoom/zoom-pseudo-image-ref.html
@@ -0,0 +1,33 @@ +<!doctype html> +<meta charset=utf-8> +<style> +.icon { + width: 200px; + height: 200px; + background-color: blue; + margin-right: 5px; + display: inline-block; + vertical-align: top; +} + +.img-wrapper { + display: block; + width: 100px; + height: 100px; + background-color: purple; +} + +.zoom { + zoom: 2; +} +</style> +<div class="icon"> + <div class="img-wrapper"> + <img src="/images/green.png"> + </div> +</div> +<div class="icon zoom"> + <div class="img-wrapper"> + <img src="/images/green.png"> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-viewport/zoom/zoom-pseudo-image.html b/third_party/blink/web_tests/external/wpt/css/css-viewport/zoom/zoom-pseudo-image.html new file mode 100644 index 0000000..3a79995 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-viewport/zoom/zoom-pseudo-image.html
@@ -0,0 +1,31 @@ +<!doctype html> +<meta charset=utf-8> +<link rel="help" href="https://drafts.csswg.org/css-viewport/#zoom-property"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1979533"> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.org" title="Mozilla"> +<link rel="match" href="zoom-pseudo-image-ref.html"> +<style> +.icon { + width: 200px; + height: 200px; + background-color: blue; + margin-right: 5px; + display: inline-block; + vertical-align: top; +} + +.icon::before { + display: block; + content: url(/images/green.png); + width: 100px; + height: 100px; + background-color: purple; +} + +.zoom { + zoom: 2; +} +</style> +<div class="icon"></div> +<div class="icon zoom"></div>
diff --git a/third_party/blink/web_tests/external/wpt/css/cssom-view/getBoundingClientRect-scroll.html b/third_party/blink/web_tests/external/wpt/css/cssom-view/getBoundingClientRect-scroll.html new file mode 100644 index 0000000..4bcfe5e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/cssom-view/getBoundingClientRect-scroll.html
@@ -0,0 +1,130 @@ +<!DOCTYPE html> +<title>getBoundingClientRect for a element inside scroll container</title> +<link rel="author" title="Jo Steven Novaryo" href="mailto:steven.novaryo@gmail.com"> +<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<html> + <head> + <style> + body { + margin: 0; + } + .scroll_container { + width: 300px; + height: 300px; + overflow: scroll; + scrollbar-width: none; + } + .dummy_overflowing_box { + width: 5000px; + height: 5000px; + } + .target_box { + width: 100px; + height: 100px; + background-color: green; + } + .display_none { + display: none; + } + .display_content { + display: content; + } + .position_absolute { + position: absolute; + } + .position_fixed { + position: fixed; + } + .absolute_containing_block { + position: relative; + } + .fixed_containing_block { + will-change: transform; + } + </style> + </head> + <body> + <div class="scroll_container fixed_containing_block"> + <div class="scroll_container absolute_containing_block"> + <div id="target_scroll_container" class="scroll_container"> + <div id="target_fixed" class="target_box position_fixed"></div> + <div id="target_absolute" class="target_box position_absolute"></div> + <div id="target_none" class="target_box display_none"></div> + <div id="target_content" class="target_box display_content"> + <div id="target_static" class="target_box"></div> + </div> + <div class="dummy_overflowing_box"></div> + </div> + <div class="dummy_overflowing_box"></div> + </div> + <div class="dummy_overflowing_box"></div> + </div> + <div id="log"></div> + <script> + setup(() => { + var offset_left = 1; + var offset_top = 2; + for (scroll_container of document.getElementsByClassName('scroll_container')) { + scroll_container.scrollTo(offset_left, offset_top) + offset_left *= 4; + offset_top *= 4; + } + }); + test(function() { + var target = document.querySelector('#target_static'); + let staticRect = target.getBoundingClientRect(); + assert_equals(staticRect.left, -21, 'static positioned target left'); + assert_equals(staticRect.top, -42, 'static positioned target top'); + assert_equals(staticRect.width, 100, 'static positioned target width'); + assert_equals(staticRect.height, 100, 'static positioned target height'); + }, "getBoundingClientRect for element inside scroll container"); + + test(function() { + var target = document.querySelector('#target_absolute'); + let absoluteRect = target.getBoundingClientRect(); + assert_equals(absoluteRect.left, -5, 'absolute positioned target left'); + assert_equals(absoluteRect.top, -10, 'absolute positioned target top'); + assert_equals(absoluteRect.width, 100, 'absolute positioned target width'); + assert_equals(absoluteRect.height, 100, 'absolute positioned target height'); + }, "getBoundingClientRect for absolute element inside scroll container"); + + test(function() { + var target = document.querySelector('#target_fixed'); + let fixedRect = target.getBoundingClientRect(); + assert_equals(fixedRect.left, -1, 'fixed positioned target left'); + assert_equals(fixedRect.top, -2, 'fixed positioned target top'); + assert_equals(fixedRect.width, 100, 'fixed positioned target width'); + assert_equals(fixedRect.height, 100, 'fixed positioned target height'); + }, "getBoundingClientRect for fixed element inside scroll container"); + + test(function() { + var target = document.querySelector('#target_scroll_container'); + let staticRect = target.getBoundingClientRect(); + assert_equals(staticRect.left, -5, 'scroll container target left'); + assert_equals(staticRect.top, -10, 'scroll container target top'); + assert_equals(staticRect.width, 300, 'scroll container target width'); + assert_equals(staticRect.height, 300, 'scroll container target height'); + }, "getBoundingClientRect for a scrolled scroll container"); + + test(function() { + var target = document.querySelector('#target_none'); + let staticRect = target.getBoundingClientRect(); + assert_equals(staticRect.left, 0, 'scroll container target left'); + assert_equals(staticRect.top, 0, 'scroll container target top'); + assert_equals(staticRect.width, 0, 'scroll container target width'); + assert_equals(staticRect.height, 0, 'scroll container target height'); + }, "getBoundingClientRect for a scrolled display none box"); + + test(function() { + var target = document.querySelector('#target_content'); + let staticRect = target.getBoundingClientRect(); + assert_equals(staticRect.left, -21, 'static positioned target left'); + assert_equals(staticRect.top, -42, 'static positioned target top'); + assert_equals(staticRect.width, 100, 'static positioned target width'); + assert_equals(staticRect.height, 100, 'static positioned target height'); + }, "getBoundingClientRect for a scrolled display content box"); + </script> + </body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/css/filter-effects/crashtests/kernelUnitLength-crash.html b/third_party/blink/web_tests/external/wpt/css/filter-effects/crashtests/kernelUnitLength-crash.html new file mode 100644 index 0000000..adb769b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/filter-effects/crashtests/kernelUnitLength-crash.html
@@ -0,0 +1,12 @@ +<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><style> +div { + filter: url(#a); +} +</style> +</head><body><div> +<svg> +<filter id="a"> +<feflood x="99%"></feflood> +<fespecularlighting x="1em" kernelUnitLength="4294967295,0.34"> +<fepointlight> +</fepointlight></fespecularlighting></filter></svg></div></body></html>
diff --git a/third_party/blink/web_tests/external/wpt/dom/events/resources/large-dimension-document.sub.html b/third_party/blink/web_tests/external/wpt/dom/events/resources/large-dimension-document.sub.html new file mode 100644 index 0000000..5d29f7be --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/dom/events/resources/large-dimension-document.sub.html
@@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<body> + <div style="width: 10000px; height: 10000px;"></div> +</body>
diff --git a/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scroll-event-fired-to-element.html b/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scroll-event-fired-to-element.html new file mode 100644 index 0000000..3484a2ec --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scroll-event-fired-to-element.html
@@ -0,0 +1,100 @@ +<!doctype html> +<meta charset=utf-8> +<title>Scroll event should behave correctly for Element.offsetTop and Element.offsetLeft</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="scroll_support.js"></script> +<link rel="author" title="Jo Steven Novaryo" href="mailto:jo.steven.novaryo@huawei.com"> +<link rel="help" href="https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface"> +<link rel="help" href="https://drafts.csswg.org/cssom-view/#scrolling-events"> +<div id=log></div> +<div id="container"> +</div> +<script> + +function setupTarget() { + var container = document.getElementById("container"); + container.innerHTML = ""; + + var target = document.createElement("div"); + var overflowing_child = document.createElement("div"); + + target.style = "overflow:scroll; height: 100px; width: 100px; scrollbar-width: none"; + overflowing_child.style = "height: 200px; width: 200px;"; + target.appendChild(overflowing_child); + container.appendChild(target); + return target; +} + +promise_test(async (t) => { + var target = setupTarget(); + + assert_equals(target.scrollTop, 0); + var promiseForScrollTop = waitForEvent("scroll", t, target); + target.scrollTop = 10; + await promiseForScrollTop; + assert_equals(target.scrollTop, 10); + + assert_equals(target.scrollLeft, 0); + var promiseForScrollLeft = waitForEvent("scroll", t, target); + target.scrollLeft = 10; + await promiseForScrollLeft; + assert_equals(target.scrollLeft, 10); + +}, "scrollTop and scrollLeft should fire scroll event."); + +promise_test(async (t) => { + var target = setupTarget(); + + target.addEventListener("scroll", () => assert_unreached("Any scroll event should not be observed")); + + assert_equals(target.scrollTop, 0); + target.scrollTop = 0; + + assert_equals(target.scrollLeft, 0); + target.scrollLeft = 0; + + // Ensure all scroll event is flushed + await waitForNextFrame(); + await waitForNextFrame(); +}, "scrollTop and scrollLeft being set with the same value."); + +promise_test(async (t) => { + var target = setupTarget(); + + target.addEventListener("scroll", () => assert_unreached("Any scroll event should not be observed")); + + target.scrollTop = -100; + target.scrollLeft = -100; + + // Ensure all scroll event is flushed + await waitForNextFrame(); + await waitForNextFrame(); +}, "scrollTop and scrollLeft being set with invalid scroll offset."); + +promise_test(async (t) => { + var target = setupTarget(); + + assert_equals(target.scrollTop, 0); + var promiseForScrollTop = waitForEvent("scroll", t, target); + target.scrollTop = 1000; + await promiseForScrollTop; + assert_equals(target.scrollTop, 100); + + assert_equals(target.scrollLeft, 0); + var promiseForScrollLeft = waitForEvent("scroll", t, target); + target.scrollLeft = 1000; + await promiseForScrollLeft; + assert_equals(target.scrollLeft, 100); + + target.addEventListener("scroll", () => assert_unreached("Any scroll event should not be observed")); + + target.scrollTop = 1000; + target.scrollLeft = 1000; + + // Ensure all scroll event is flushed + await waitForNextFrame(); + await waitForNextFrame(); +}, "scrollTop and scrollLeft when scrolling above maximum offset."); + +</script>
diff --git a/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scroll-event-fired-to-iframe.html b/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scroll-event-fired-to-iframe.html new file mode 100644 index 0000000..2ff3de79 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/dom/events/scrolling/scroll-event-fired-to-iframe.html
@@ -0,0 +1,116 @@ +<!doctype html> +<meta charset=utf-8> +<title>Scroll event should behave correctly for Element.ScrollX and Element.ScrollLeft</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="scroll_support.js"></script> +<link rel="author" title="Jo Steven Novaryo" href="mailto:jo.steven.novaryo@huawei.com"> +<link rel="help" href="https://drafts.csswg.org/cssom-view/#extensions-to-the-window-interface"> +<link rel="help" href="https://drafts.csswg.org/cssom-view/#scrolling-events"> +<div id=log></div> +<div id="container"> +</div> +<script> + + +function promiseForFrameLoad(frame) { + return new Promise(async (resolve) => { + frame.addEventListener("load", () => resolve(frame), { once: true }); + }); +} + +async function promiseForSetupTargetFrame() { + const target = document.createElement("iframe"); + target.src = "../resources/large-dimension-document.sub.html"; + target.width = "200"; + target.height = "200"; + + var container = document.getElementById("container"); + container.innerHTML = ""; + container.appendChild(target); + + return promiseForFrameLoad(target); +} + +promise_test(async (t) => { + var frame = await promiseForSetupTargetFrame(); + var target = frame.contentWindow; + + assert_equals(target.scrollX, 0); + var promiseForScrollX = waitForEvent("scroll", t, target); + target.scrollTo({left: 10}); + await promiseForScrollX; + assert_equals(target.scrollX, 10); + + assert_equals(target.scrollY, 0); + var promiseForScrollY = waitForEvent("scroll", t, target); + target.scrollTo({top: 10}); + await promiseForScrollY; + assert_equals(target.scrollY, 10); + +}, "scrollX and scrollY should fire scroll event."); + +promise_test(async (t) => { + var frame = await promiseForSetupTargetFrame(); + var target = frame.contentWindow; + + target.addEventListener("scroll", () => assert_unreached("Any scroll event should not be observed")); + + assert_equals(target.scrollX, 0); + target.scrollTo({left: 0}); + + assert_equals(target.scrollY, 0); + target.scrollTo({top: 0}); + + // Ensure all scroll event is flushed + await waitForNextFrame(); + await waitForNextFrame(); +}, "scrollX and scrollY being set with the same value."); + +promise_test(async (t) => { + var frame = await promiseForSetupTargetFrame(); + var target = frame.contentWindow; + + target.addEventListener("scroll", () => assert_unreached("Any scroll event should not be observed")); + + target.scrollTo({left: -100}); + target.scrollTo({top: -100}); + + // Ensure all scroll event is flushed + await waitForNextFrame(); + await waitForNextFrame(); +}, "scrollX and scrollY being set with invalid scroll Scroll."); + +promise_test(async (t) => { + var frame = await promiseForSetupTargetFrame(); + var target = frame.contentWindow; + var frameDocEl = frame.contentDocument.documentElement; + + assert_equals(target.scrollX, 0); + var promiseForScrollX = waitForEvent("scroll", t, target); + target.scrollTo({left: frameDocEl.scrollWidth}); + await promiseForScrollX; + assert_greater_than(target.scrollX, 0); + + assert_equals(target.scrollY, 0); + var promiseForScrollY = waitForEvent("scroll", t, target); + target.scrollTo({ + top: frameDocEl.scrollHeight, + left: target.scrollX + }); + await promiseForScrollY; + assert_greater_than(target.scrollY, 0); + + target.addEventListener("scroll", () => assert_unreached("Any scroll event should not be observed")); + + target.scrollTo({ + left: target.scrollX + 10, + top: target.scrollY + 10, + }); + + // Ensure all scroll event is flushed + await waitForNextFrame(); + await waitForNextFrame(); +}, "scrollX and scrollY when scrolling above maximum Scroll."); + +</script>
diff --git a/third_party/blink/web_tests/external/wpt/editing/crashtests/insertHTML-before-comment-at-end-of-editing-host.html b/third_party/blink/web_tests/external/wpt/editing/crashtests/insertHTML-before-comment-at-end-of-editing-host.html new file mode 100644 index 0000000..57f32a3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/editing/crashtests/insertHTML-before-comment-at-end-of-editing-host.html
@@ -0,0 +1,20 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<script> +"use strict"; + +addEventListener("DOMContentLoaded", () => { + document.querySelector("dialog").showModal(); + document.getSelection().extend(document.querySelector("fieldset"), 0); + document.execCommand("insertHTML", false, "A"); +}, {once: true}); +</script> +</head> +<body> +<dialog contenteditable="true"> +<fieldset id="b"> +<!-- --> +</fieldset></dialog></body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-accounts-endpoint-rejects-redirects.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-accounts-endpoint-rejects-redirects.https.html index ae3b52a5..8e0edef 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-accounts-endpoint-rejects-redirects.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-accounts-endpoint-rejects-redirects.https.html
@@ -10,12 +10,9 @@ import {request_options_with_mediation_required, fedcm_test, select_manifest, - mark_signed_in, fedcm_get_dialog_type_promise} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - let test_options = request_options_with_mediation_required("manifest_redirect_accounts.json"); await select_manifest(t, test_options);
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-auto-reauthn-without-approved-clients.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-auto-reauthn-without-approved-clients.https.html index fb93cb63..c87cd09 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-auto-reauthn-without-approved-clients.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-auto-reauthn-without-approved-clients.https.html
@@ -9,12 +9,10 @@ <script type="module"> import {request_options_with_mediation_optional, fedcm_test, - mark_signed_in, select_manifest, fedcm_get_and_select_first_account} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); let test_options = request_options_with_mediation_optional( "manifest_with_single_account.json"); test_options.identity.providers[0].clientId = 'nomatch';
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-disconnect-errors.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-disconnect-errors.https.html index 4d5fb0a..2c3e8b760 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-disconnect-errors.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-disconnect-errors.https.html
@@ -10,8 +10,6 @@ <script type="module"> import {fedcm_test, - mark_signed_in, - set_fedcm_cookie, fedcm_get_and_select_first_account, manifest_origin, request_options_with_mediation_required, @@ -19,8 +17,6 @@ disconnect_options} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - await set_fedcm_cookie(); // Get at least one connected account that can be disconnected. const cred = await fedcm_get_and_select_first_account(t, request_options_with_mediation_required()); @@ -41,8 +37,6 @@ }, "disconnect requires 3 parameters: configURL, clientId, and accountHint"); fedcm_test(async t => { - await mark_signed_in(); - await set_fedcm_cookie(); // Get at least one connected account that can be disconnected. const cred = await fedcm_get_and_select_first_account(t, request_options_with_mediation_required()); @@ -55,8 +49,6 @@ to the config file"); fedcm_test(async t => { - await mark_signed_in(); - await set_fedcm_cookie(); // Get at least one connected account that can be disconnected. const cred = await fedcm_get_and_select_first_account(t, request_options_with_mediation_required());
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-disconnect.sub.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-disconnect.sub.https.html index a80ed48..a291202 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-disconnect.sub.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-disconnect.sub.https.html
@@ -11,7 +11,6 @@ <script type="module"> import {fedcm_test, - mark_signed_in, disconnect_options, fedcm_get_and_select_first_account, fedcm_select_account_promise, @@ -22,7 +21,6 @@ set_alt_fedcm_cookie} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(alt_manifest_origin); // Get at least one connected account that can be disconnected. const cred = await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); // The IDP implementation will accept any account hint, so this is really testing that the user @@ -48,14 +46,12 @@ }, 'Test that disconnect fails when there is no account to disconnect'); fedcm_test(async t => { - await mark_signed_in(alt_manifest_origin); const cred = await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); return IdentityCredential.disconnect(alt_disconnect_options("1234")); }, 'Test that disconnect succeeds when there is an account to disconnect'); fedcm_test(async t => { - await mark_signed_in(alt_manifest_origin); const cred = await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); await IdentityCredential.disconnect(alt_disconnect_options("1234")); @@ -65,7 +61,6 @@ }, 'Test that disconnecting the same account twice results in failure.'); fedcm_test(async t => { - await mark_signed_in(alt_manifest_origin); const cred = await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); // A connected account is guaranteed by the above, and IDP accepts any account hint, so this tests // that the user agent allows the request to go through to the IDP. @@ -73,8 +68,6 @@ }, 'Disconnect passing an incorrect ID can still succeed'); fedcm_test(async t => { - await mark_signed_in(); - await mark_signed_in(alt_manifest_origin); await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); await fedcm_get_and_select_first_account(t, request_options_with_mediation_required()); @@ -86,7 +79,6 @@ }, 'Disconnect is bound to each IDP'); fedcm_test(async t => { - await mark_signed_in(alt_manifest_origin); // Get at least one connected account that can be disconnected. await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required());
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-identity-assertion-nocors.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-identity-assertion-nocors.https.html index 79da95d50..a5e2e52 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-identity-assertion-nocors.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-identity-assertion-nocors.https.html
@@ -10,12 +10,10 @@ import {alt_request_options_with_mediation_required, fedcm_test, select_manifest, - mark_signed_in, fedcm_error_dialog_dismiss, fedcm_select_account_promise} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); let test_options = alt_request_options_with_mediation_required("manifest-token-nocors.json"); await select_manifest(t, test_options); try {
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status-unknown.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status-unknown.https.html deleted file mode 100644 index d542524..0000000 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status-unknown.https.html +++ /dev/null
@@ -1,23 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>FedCM IDP sign-in status API tests for unknown state</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/testdriver.js"></script> -<script src="/resources/testdriver-vendor.js"></script> - -<script type="module"> - import {request_options_with_mediation_required, - fedcm_test, - select_manifest, - fedcm_get_and_select_first_account} from './support/fedcm-helper.sub.js'; - - // TODO(crbug.com/1494119): move the test under fedcm-login-status. - fedcm_test(async t => { - let test_options = request_options_with_mediation_required("manifest_with_no_accounts.json"); - await select_manifest(t, test_options); - - let request = navigator.credentials.get(test_options); - return promise_rejects_dom(t, 'NetworkError', request); - }, 'Test that promise is rejected silently when accounts fetch fails in unknown state'); -</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status/confirm-idp-login.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status/confirm-idp-login.https.html index 174cdaf..c77286db 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status/confirm-idp-login.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status/confirm-idp-login.https.html
@@ -10,12 +10,9 @@ import {request_options_with_mediation_required, fedcm_test, fedcm_get_dialog_type_promise, - select_manifest, - mark_signed_in} from '../support/fedcm-helper.sub.js'; + select_manifest} from '../support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - let test_options = request_options_with_mediation_required("manifest_with_variable_accounts.json"); await select_manifest(t, test_options);
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status/login-page-broken.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status/login-page-broken.https.html index cda9ee4..06be5e4 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status/login-page-broken.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-login-status/login-page-broken.https.html
@@ -10,12 +10,9 @@ import {request_options_with_mediation_required, fedcm_test, fedcm_get_dialog_type_promise, - select_manifest, - mark_signed_in} from '../support/fedcm-helper.sub.js'; + select_manifest} from '../support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - let test_options = request_options_with_mediation_required("manifest_broken_login.json"); await select_manifest(t, test_options);
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-loginhint.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-loginhint.https.html index fe35007..1a4adbe 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-loginhint.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-loginhint.https.html
@@ -11,13 +11,10 @@ import {fedcm_test, request_options_with_login_hint, select_manifest, - mark_signed_in, fedcm_get_dialog_type_promise, fedcm_get_and_select_first_account} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - let options = request_options_with_login_hint('manifest.py', 'nomatch'); const cred = navigator.credentials.get(options); // We expect a mismatch dialog.
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-no-domainhint-matches-account.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-no-domainhint-matches-account.https.html index c2bf141..31a9e2e 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-no-domainhint-matches-account.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-no-domainhint-matches-account.https.html
@@ -11,14 +11,11 @@ import { fedcm_test, request_options_with_domain_hint, - mark_signed_in, fedcm_get_dialog_type_promise, fedcm_expect_dialog, } from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - let options = request_options_with_domain_hint('manifest.py', 'nomatch'); const cred = navigator.credentials.get(options);
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-no-login-url.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-no-login-url.https.html index 94592d2..480254c 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-no-login-url.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-no-login-url.https.html
@@ -10,12 +10,9 @@ import {request_options_with_mediation_required, fedcm_test, select_manifest, - mark_signed_in, fedcm_get_and_select_first_account} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - let test_options = request_options_with_mediation_required("manifest_no_login_url.json"); await select_manifest(t, test_options);
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-pending-disconnect.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-pending-disconnect.https.html index 1b60acc..306de02 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-pending-disconnect.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-pending-disconnect.https.html
@@ -10,15 +10,11 @@ <script type="module"> import {fedcm_test, - mark_signed_in, - set_fedcm_cookie, disconnect_options, fedcm_get_and_select_first_account, request_options_with_mediation_required} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - await set_fedcm_cookie(); // Go through the FedCM flow so that the disconnect() call is not trivial. const cred = await fedcm_get_and_select_first_account(t, request_options_with_mediation_required());
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-token-endpoint-rejects-redirects.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-token-endpoint-rejects-redirects.https.html index 8d74e06..c7a16df 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-token-endpoint-rejects-redirects.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-token-endpoint-rejects-redirects.https.html
@@ -10,13 +10,10 @@ import {request_options_with_mediation_required, fedcm_test, select_manifest, - mark_signed_in, fedcm_error_dialog_dismiss, fedcm_get_and_select_first_account} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - let test_options = request_options_with_mediation_required("manifest_redirect_token.json"); await select_manifest(t, test_options);
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-too-many-disconnect-calls.https.html b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-too-many-disconnect-calls.https.html index eb87c23..72cc26f 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/fedcm-too-many-disconnect-calls.https.html +++ b/third_party/blink/web_tests/external/wpt/fedcm/fedcm-too-many-disconnect-calls.https.html
@@ -10,16 +10,12 @@ <script type="module"> import {fedcm_test, - mark_signed_in, - set_fedcm_cookie, fedcm_get_and_select_first_account, manifest_origin, request_options_with_mediation_required, disconnect_options} from './support/fedcm-helper.sub.js'; fedcm_test(async t => { - await mark_signed_in(); - await set_fedcm_cookie(); // Get at least one connected account that can be disconnected. const cred = await fedcm_get_and_select_first_account(t, request_options_with_mediation_required()); const manifest = `${manifest_origin}/\
diff --git a/third_party/blink/web_tests/external/wpt/fedcm/support/fedcm-helper.sub.js b/third_party/blink/web_tests/external/wpt/fedcm/support/fedcm-helper.sub.js index 7330c3e..045e9fad6 100644 --- a/third_party/blink/web_tests/external/wpt/fedcm/support/fedcm-helper.sub.js +++ b/third_party/blink/web_tests/external/wpt/fedcm/support/fedcm-helper.sub.js
@@ -144,6 +144,8 @@ // Failure is not critical; it just might slow down tests. } + await mark_signed_in(); + await mark_signed_in(alt_manifest_origin); await set_fedcm_cookie(); await set_alt_fedcm_cookie(); await test_func(t);
diff --git a/third_party/blink/web_tests/external/wpt/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-300C.otf b/third_party/blink/web_tests/external/wpt/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-300C.otf new file mode 100644 index 0000000..a7fb3467 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fonts/noto/cjk/NotoSansCJKjp-Regular-subset-halt-300C.otf Binary files differ
diff --git a/third_party/blink/web_tests/external/wpt/fonts/noto/cjk/subset.sh b/third_party/blink/web_tests/external/wpt/fonts/noto/cjk/subset.sh index 899db77..5f5ebbd8 100755 --- a/third_party/blink/web_tests/external/wpt/fonts/noto/cjk/subset.sh +++ b/third_party/blink/web_tests/external/wpt/fonts/noto/cjk/subset.sh
@@ -32,6 +32,7 @@ $subsetter "$path" $range $features_chws --output-file="$output_chws$ext" $subsetter "$output_halt$ext" $subrange $features --output-file="$output_min$ext" $subsetter "$output_halt$ext" --unicodes=3002 $features --output-file="$output_halt-3002$ext" + $subsetter "$output_halt$ext" --unicodes=300C $features --output-file="$output_halt-300C$ext" $subsetter "$output_halt$ext" --unicodes=FF1A $features --output-file="$output_halt-FF1A$ext" ) done
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/datastore/015-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/datastore/015-manual.html new file mode 100644 index 0000000..604c1d4 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/datastore/015-manual.html
@@ -0,0 +1,63 @@ +<!doctype html> +<html> + <head> + <title>Using dataTransfer in new thread</title> + <style type="text/css"> +blockquote { height: 100px; width: 100px; background: orange; margin: 0; padding: 0; float: left; } +blockquote + blockquote { background: blue; } +blockquote + blockquote + blockquote { background: fuchsia; } +blockquote + div { clear: left; } + </style> + <script type="text/javascript" src="/resources/testharness.js"></script> + <script type="text/javascript" src="/resources/testharnessreport.js"></script> + <script type="text/javascript"> +setup(function () {},{explicit_done:true,explicit_timeout:true}); +window.onload = function () { + + var orange = document.getElementsByTagName('blockquote')[0], + blue = document.getElementsByTagName('blockquote')[1], + fuchsia = document.getElementsByTagName('blockquote')[2], + evtdone = {}; + + orange.ondragstart = function (e) { + e.dataTransfer.effectAllowed = 'copy'; + e.dataTransfer.setData('text','dragstart real data'); + var dataTransfer = e.dataTransfer; + setTimeout(function () { + test(function () { + assert_equals( dataTransfer.getData('text'), '', 'step 1' ); + dataTransfer.setData('text','new thread after dragstart'); + assert_equals( dataTransfer.getData('text'), '', 'step 2' ); + },'dragstart data store should be protected after new thread starts'); + },0); + }; + + fuchsia.ondragenter = fuchsia.ondragover = function (e) { + e.preventDefault(); + }; + + fuchsia.ondrop = function (e) { + e.preventDefault(); + var dataTransfer = e.dataTransfer; + setTimeout(function () { + test(function () { + assert_equals( dataTransfer.getData('text'), '', 'step 1' ); + dataTransfer.setData('text','new thread after dragstart'); + assert_equals( dataTransfer.getData('text'), '', 'step 2' ); + },'drop data store should be protected after new thread starts'); + done(); + },0); + }; + +}; + </script> + </head> + <body> + <p>Drag the orange square over the blue square then the fuchsia square, then release it.</p> + <blockquote draggable="true"></blockquote> + <blockquote></blockquote> + <blockquote></blockquote> + <div id="log"></div> + <noscript><p>Enable JavaScript and reload</p></noscript> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/events/events-cross-document-suite-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/events/events-cross-document-suite-manual.html new file mode 100644 index 0000000..9428a87 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/events/events-cross-document-suite-manual.html
@@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>drag & drop - event sequence for cross-document drag</title> +<script type="text/javascript" src="/resources/testharness.js"></script> +<script type="text/javascript" src="/resources/testharnessreport.js"></script> +<script> +var events = new Array(); +</script> + +<frameset cols="308,*" frameborder="no" border="0"> + <frame src="events-cross-document-suite-HELPER-1.html"> + <frame src="events-cross-document-suite-HELPER-2.html"> +</frameset>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/events/events-file-suite-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/events/events-file-suite-manual.html new file mode 100644 index 0000000..22a66f5 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/events/events-file-suite-manual.html
@@ -0,0 +1,176 @@ +<!DOCTYPE html> +<title>drag & drop - event sequence for file drops</title> +<script type="text/javascript" src="/resources/testharness.js"></script> +<script type="text/javascript" src="/resources/testharnessreport.js"></script> +<style type="text/css"> + /* use margins instead of padding to make sure the body begins at the top of the page */ + html, body { + margin: 0; + } + body { + padding: 116px 8px 8px; + } + body::before { + height: 108px; + width: 108px; + position: absolute; + top: 0px; + left: 0px; + content: ""; + background-color: orange; + } + #testhere div { + height: 100px; + width: 100px; + position: absolute; + top: 8px; + } + #fuchsia { + background-color: fuchsia; + left: 158px; + } + #yellow { + background-color: yellow; + left: 308px; + } + #blue { + background-color: navy; + left: 458px; + } +</style> + +<script> +setup(function () {},{explicit_done:true,explicit_timeout:true}); +window.onload = function () { + var fuchsia = document.querySelector('#fuchsia') + var yellow = document.querySelector('#yellow') + var blue = document.querySelector('#blue') + var body = document.body; + + var events = new Array + + /* Events for the fuchsia box */ + fuchsia.ondragstart = function () { events.push('pink.ondragstart'); }; + fuchsia.ondrag = function () { events.push('pink.ondrag'); }; + fuchsia.ondragenter = function () { events.push('pink.ondragenter'); }; + fuchsia.ondragover = function () { events.push('pink.ondragover'); }; + fuchsia.ondragleave = function () { events.push('pink.ondragleave'); }; + fuchsia.ondrop = function () { events.push('pink.ondrop'); return false; }; + fuchsia.ondragend = function () { events.push('pink.ondragend'); }; + fuchsia.onmousedown = function () { events.push('pink.onmousedown'); }; + fuchsia.onmouseup = function () { events.push('pink.onmouseup'); }; + + /* Events for the fuchsia box */ + yellow.ondragstart = function () { events.push('yellow.ondragstart'); }; + yellow.ondrag = function () { events.push('yellow.ondrag'); }; + yellow.ondragenter = function () { events.push('yellow.ondragenter'); return false; }; + yellow.ondragover = function () { events.push('yellow.ondragover'); return false; }; + yellow.ondragleave = function () { events.push('yellow.ondragleave'); }; + yellow.ondrop = function () { events.push('yellow.ondrop'); return false; }; + yellow.ondragend = function () { events.push('yellow.ondragend'); }; + yellow.onmousedown = function () { events.push('yellow.onmousedown'); }; + yellow.onmouseup = function () { events.push('yellow.onmouseup'); }; + + /* Events for the blue box (droppable) */ + blue.ondragstart = function () { events.push('blue.ondragstart'); }; + blue.ondrag = function () { events.push('blue.ondrag'); }; + blue.ondragenter = function () { events.push('blue.ondragenter'); return false; }; + blue.ondragover = function () { events.push('blue.ondragover'); return false; }; + blue.ondragleave = function () { events.push('blue.ondragleave'); }; + blue.ondrop = function () { events.push('blue.ondrop'); return false; }; + blue.ondragend = function () { events.push('blue.ondragend'); }; + blue.onmousedown = function () { events.push('blue.onmousedown'); }; + blue.onmouseup = function () { events.push('blue.onmouseup'); }; + + /* Events for the page body */ + body.ondragstart = function (e) { events.push( ( e.target == body ) ? 'body.ondragstart': 'bubble.ondragstart' ); }; + body.ondrag = function (e) { events.push( ( e.target == body ) ? 'body.ondrag': 'bubble.ondrag' ); }; + body.ondragenter = function (e) { events.push( ( e.target == body ) ? 'body.ondragenter': 'bubble.ondragenter' ); }; + body.ondragover = function (e) { events.push( ( e.target == body ) ? 'body.ondragover': 'bubble.ondragover' ); }; + body.ondragleave = function (e) { events.push( ( e.target == body ) ? 'body.ondragleave': 'bubble.ondragleave' ); }; + body.ondrop = function (e) { events.push( ( e.target == body ) ? 'body.ondrop': 'bubble.ondrop' ); setTimeout(finish,200); }; + body.ondragend = function (e) { events.push( ( e.target == body ) ? 'body.ondragend': 'bubble.ondragend' ); }; + body.onmousedown = function (e) { events.push( ( e.target == body ) ? 'body.onmousedown': 'bubble.onmousedown' ); }; + body.onmouseup = function (e) { events.push( ( e.target == body ) ? 'body.onmouseup': 'bubble.onmouseup' ); }; + + function finish(e) { + var i, evindex; + events = events.join('-'); + /* + Normalise; reduce repeating event sequences to only 2 occurrences. + This makes the final event sequence predictable, no matter how many times the drag->dragover sequences repeat. + Two occurrances are kept in each case to allow testing to make sure the sequence really is repeating. + */ + //spec compliant - div dragenter is not cancelled, so body dragenter fires and body becomes current target + //repeats while drag is over fuchsia or the body + events = events.replace(/(-body\.ondragover){3,}/g,'$1$1'); + //repeats while dragging over yellow + events = events.replace(/(-yellow\.ondragover-bubble\.ondragover){3,}/g,'$1$1'); + //repeats while dragging over blue + events = events.replace(/(-blue\.ondragover-bubble\.ondragover){3,}/g,'$1$1'); + //non-spec-compliant repeats while dragging over fuchsia + events = events.replace(/(-pink\.ondragover-bubble\.ondragover){3,}/g,'$1$1'); + events = events.split(/-/g); + + test(function () { + assert_array_equals(events, + + [/* 1 */ 'body.ondragenter', //mouse moves over body, which does not cancel event + /* 2 */ 'body.ondragenter', //so it fires again and sets body as current target + + /* 3 */ 'body.ondragover', //start repeating over body + /* 4 */ 'body.ondragover', //...twice to make sure it actually repeats + + /* 5 */ 'pink.ondragenter', //mouse moves over pink - not cancelled + /* 6 */ 'bubble.ondragenter', + + /* 7 */ 'body.ondragover', //so body becomes current target, but since it was already the target, dragenter does not need to fire again + /* 8 */ 'body.ondragover', //...twice to make sure it actually repeats + + /* 9 */ 'yellow.ondragenter', //mouse moves over yellow + /* 10 */ 'bubble.ondragenter', + /* 11 */ 'body.ondragleave', + + /* 12 */ 'yellow.ondragover', //start repeating (over yellow) + /* 13 */ 'bubble.ondragover', + /* 14 */ 'yellow.ondragover', //...twice to make sure it actually repeats + /* 15 */ 'bubble.ondragover', //end repeating + + /* 16 */ 'body.ondragenter', //mouse moves over body, not cancelled + /* 17 */ 'body.ondragenter', //so it fires again and sets body as current target + /* 18 */ 'yellow.ondragleave', + /* 19 */ 'bubble.ondragleave', + + /* 20 */ 'body.ondragover', //start repeating (over body) + /* 21 */ 'body.ondragover', //...twice to make sure it actually repeats + + /* 22 */ 'blue.ondragenter', //mouse moves over blue + /* 23 */ 'bubble.ondragenter', + /* 24 */ 'body.ondragleave', + + /* 25 */ 'blue.ondragover', //start repeating (over blue) + /* 26 */ 'bubble.ondragover', + /* 27 */ 'blue.ondragover', //...twice to make sure it actually repeats + /* 28 */ 'bubble.ondragover', + + /* 29 */ 'blue.ondrop', //release + /* 30 */ 'bubble.ondrop'] + + ); + }, 'Overall sequence'); + + done(); + } +}; +</script> + +<div id="testhere"> +<div id='fuchsia'></div> +<div id='yellow'></div> +<div id='blue'></div> +</div> + +<p>If you have already clicked on this page, reload it.</p> +<p>Use your pointing device to slowly drag a file from your system's file manager, over the orange square (ensure that this is the first part of the page that you drag the file over, not an otherwise blank part of the page), then the pink square, then the yellow square, then the blue square, and release it over the blue square (make sure the mouse remains over each square for at least 1 second, and over the gaps between squares for at least 1 second). If a prompt appears, accept it. Fail if no new text appears below.</p> + +<div id="log"></div>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/events/events-suite-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/events/events-suite-manual.html new file mode 100644 index 0000000..16c6583 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/events/events-suite-manual.html
@@ -0,0 +1,371 @@ +<!DOCTYPE html> +<title>drag & drop - event sequence for draggable elements</title> +<script type="text/javascript" src="/resources/testharness.js"></script> +<script type="text/javascript" src="/resources/testharnessreport.js"></script> +<style type="text/css"> + /* use margins instead of padding to make sure the body begins at the top of the page */ + html, body { + margin: 0; + } + body { + padding: 116px 8px 8px; + } + #testhere div { + height: 100px; + width: 100px; + position: absolute; + top: 8px; + } + #orange { + background-color: orange; + left: 8px; + } + #fuchsia { + background-color: fuchsia; + left: 158px; + } + #yellow { + background-color: yellow; + left: 308px; + } + #blue { + background-color: navy; + left: 458px; + } +</style> + +<script> +setup(function () {},{explicit_done:true,explicit_timeout:true}); +window.onload = function () { + var orange = document.querySelector('#orange') + var fuchsia = document.querySelector('#fuchsia') + var yellow = document.querySelector('#yellow') + var blue = document.querySelector('#blue') + var body = document.body; + + var events = new Array + + orange.ondragstart = function (e) { + events.push('orange.ondragstart'); + e.dataTransfer.effectAllowed = 'copy'; + e.dataTransfer.setData('Text', 'foo'); + }; + orange.ondrag = function () { events.push('orange.ondrag'); }; + orange.ondragenter = function () { events.push('orange.ondragenter'); }; + orange.ondragover = function () { events.push('orange.ondragover'); }; + orange.ondragleave = function () { events.push('orange.ondragleave'); }; + orange.ondrop = function () { events.push('orange.ondrop'); return false; }; + orange.ondragend = function () { events.push('orange.ondragend'); }; + orange.onmousedown = function () { events.push('orange.onmousedown'); }; + orange.onmouseup = function () { events.push('orange.onmouseup'); }; + + /* Events for the fuchsia box */ + fuchsia.ondragstart = function () { events.push('pink.ondragstart'); }; + fuchsia.ondrag = function () { events.push('pink.ondrag'); }; + fuchsia.ondragenter = function () { events.push('pink.ondragenter'); }; + fuchsia.ondragover = function () { events.push('pink.ondragover'); }; + fuchsia.ondragleave = function () { events.push('pink.ondragleave'); }; + fuchsia.ondrop = function () { events.push('pink.ondrop'); return false; }; + fuchsia.ondragend = function () { events.push('pink.ondragend'); }; + fuchsia.onmousedown = function () { events.push('pink.onmousedown'); }; + fuchsia.onmouseup = function () { events.push('pink.onmouseup'); }; + + /* Events for the fuchsia box */ + yellow.ondragstart = function () { events.push('yellow.ondragstart'); }; + yellow.ondrag = function () { events.push('yellow.ondrag'); }; + yellow.ondragenter = function () { events.push('yellow.ondragenter'); return false; }; + yellow.ondragover = function () { events.push('yellow.ondragover'); return false; }; + yellow.ondragleave = function () { events.push('yellow.ondragleave'); }; + yellow.ondrop = function () { events.push('yellow.ondrop'); return false; }; + yellow.ondragend = function () { events.push('yellow.ondragend'); }; + yellow.onmousedown = function () { events.push('yellow.onmousedown'); }; + yellow.onmouseup = function () { events.push('yellow.onmouseup'); }; + + /* Events for the blue box (droppable) */ + blue.ondragstart = function () { events.push('blue.ondragstart'); }; + blue.ondrag = function () { events.push('blue.ondrag'); }; + blue.ondragenter = function () { events.push('blue.ondragenter'); return false; }; + blue.ondragover = function () { events.push('blue.ondragover'); return false; }; + blue.ondragleave = function () { events.push('blue.ondragleave'); }; + blue.ondrop = function () { events.push('blue.ondrop'); return false; }; + blue.ondragend = function () { events.push('blue.ondragend'); }; + blue.onmousedown = function () { events.push('blue.onmousedown'); }; + blue.onmouseup = function () { events.push('blue.onmouseup'); }; + + /* Events for the page body */ + body.ondragstart = function (e) { events.push( ( e.target == body ) ? 'body.ondragstart': 'bubble.ondragstart' ); }; + body.ondrag = function (e) { events.push( ( e.target == body ) ? 'body.ondrag': 'bubble.ondrag' ); }; + body.ondragenter = function (e) { events.push( ( e.target == body ) ? 'body.ondragenter': 'bubble.ondragenter' ); }; + body.ondragover = function (e) { events.push( ( e.target == body ) ? 'body.ondragover': 'bubble.ondragover' ); }; + body.ondragleave = function (e) { events.push( ( e.target == body ) ? 'body.ondragleave': 'bubble.ondragleave' ); }; + body.ondrop = function (e) { events.push( ( e.target == body ) ? 'body.ondrop': 'bubble.ondrop' ); }; + body.ondragend = function (e) { events.push( ( e.target == body ) ? 'body.ondragend': 'bubble.ondragend' ); setTimeout(finish,100); }; + body.onmousedown = function (e) { events.push( ( e.target == body ) ? 'body.onmousedown': 'bubble.onmousedown' ); }; + body.onmouseup = function (e) { events.push( ( e.target == body ) ? 'body.onmouseup': 'bubble.onmouseup' ); }; + + function finish(e) { + var i, evindex; + events = events.join('-'); + /* + Normalise; reduce repeating event sequences to only 2 occurrences. + This makes the final event sequence predictable, no matter how many times the drag->dragover sequences repeat. + Two occurrances are kept in each case to allow testing to make sure the sequence really is repeating. + */ + //spec compliant - div dragenter is not cancelled, so body dragenter fires and body becomes current target + //repeats while drag is over orange or fuchsia or the body + events = events.replace(/(-orange\.ondrag-bubble\.ondrag-body\.ondragover){3,}/g,'$1$1'); + //repeats while dragging over yellow + events = events.replace(/(-orange\.ondrag-bubble\.ondrag-yellow\.ondragover-bubble\.ondragover){3,}/g,'$1$1'); + //repeats while dragging over blue + events = events.replace(/(-orange\.ondrag-bubble\.ondrag-blue\.ondragover-bubble\.ondragover){3,}/g,'$1$1'); + //non-spec-compliant repeats while dragging over orange + events = events.replace(/(-orange\.ondrag-bubble\.ondrag-orange\.ondragover-bubble\.ondragover){3,}/g,'$1$1'); + //non-spec-compliant repeats while dragging over fuchsia + events = events.replace(/(-orange\.ondrag-bubble\.ondrag-pink\.ondragover-bubble\.ondragover){3,}/g,'$1$1'); + events = events.split(/-/g); + + test(function () { + assert_array_equals(events, + + [/* 1 */ 'orange.onmousedown', //mouse down + /* 2 */ 'bubble.onmousedown', + + /* 3 */ 'orange.ondragstart', //dragging begins + /* 4 */ 'bubble.ondragstart', + + /* 5 */ 'orange.ondrag', //mouse is over orange + /* 6 */ 'bubble.ondrag', + /* 7 */ 'orange.ondragenter', //not cancelled + /* 8 */ 'bubble.ondragenter', + /* 9 */ 'body.ondragenter', //so body becomes current target, and the event fires there as well + /* 10 */ 'body.ondragover', + + /* 11 */ 'orange.ondrag', //start repeating (some over orange, some over body) + /* 12 */ 'bubble.ondrag', + /* 13 */ 'body.ondragover', + /* 14 */ 'orange.ondrag', //...twice to make sure it actually repeats + /* 15 */ 'bubble.ondrag', + /* 16 */ 'body.ondragover', //end repeating + + /* 17 */ 'orange.ondrag', //mouse moves over pink + /* 18 */ 'bubble.ondrag', + /* 19 */ 'pink.ondragenter', //not cancelled + /* 20 */ 'bubble.ondragenter', + /* 21 */ 'body.ondragover', //so body becomes current target, but since it was already the target, dragenter does not need to fire again + + /* 22 */ 'orange.ondrag', //start repeating (some over pink, some over body) + /* 23 */ 'bubble.ondrag', + /* 24 */ 'body.ondragover', + /* 25 */ 'orange.ondrag', //...twice to make sure it actually repeats + /* 26 */ 'bubble.ondrag', + /* 27 */ 'body.ondragover', //end repeating + + /* 28 */ 'orange.ondrag', //mouse moves over yellow + /* 29 */ 'bubble.ondrag', + /* 30 */ 'yellow.ondragenter', + /* 31 */ 'bubble.ondragenter', + /* 32 */ 'body.ondragleave', + /* 33 */ 'yellow.ondragover', + /* 34 */ 'bubble.ondragover', + + /* 35 */ 'orange.ondrag', //start repeating (over yellow) + /* 36 */ 'bubble.ondrag', + /* 37 */ 'yellow.ondragover', + /* 38 */ 'bubble.ondragover', + /* 39 */ 'orange.ondrag', //...twice to make sure it actually repeats + /* 40 */ 'bubble.ondrag', + /* 41 */ 'yellow.ondragover', + /* 42 */ 'bubble.ondragover', //end repeating + + /* 43 */ 'orange.ondrag', //mouse moves over body + /* 44 */ 'bubble.ondrag', + /* 45 */ 'body.ondragenter', //not cancelled + /* 46 */ 'body.ondragenter', //so it fires again and sets body as current target + /* 47 */ 'yellow.ondragleave', + /* 48 */ 'bubble.ondragleave', + /* 49 */ 'body.ondragover', + + /* 50 */ 'orange.ondrag', //start repeating (over body) + /* 51 */ 'bubble.ondrag', + /* 52 */ 'body.ondragover', + /* 53 */ 'orange.ondrag', //...twice to make sure it actually repeats + /* 54 */ 'bubble.ondrag', + /* 55 */ 'body.ondragover', //end repeating + + /* 56 */ 'orange.ondrag', //mouse moves over blue + /* 57 */ 'bubble.ondrag', + /* 58 */ 'blue.ondragenter', + /* 59 */ 'bubble.ondragenter', + /* 60 */ 'body.ondragleave', + /* 61 */ 'blue.ondragover', + /* 62 */ 'bubble.ondragover', + + /* 63 */ 'orange.ondrag', //start repeating (over blue) + /* 64 */ 'bubble.ondrag', + /* 65 */ 'blue.ondragover', + /* 66 */ 'bubble.ondragover', + /* 67 */ 'orange.ondrag', //...twice to make sure it actually repeats + /* 68 */ 'bubble.ondrag', + /* 69 */ 'blue.ondragover', + /* 70 */ 'bubble.ondragover', //end repeating + + /* 71 */ 'blue.ondrop', //release + /* 72 */ 'bubble.ondrop', + /* 73 */ 'orange.ondragend', + /* 74 */ 'bubble.ondragend'] + + ); + }, 'Overall sequence'); + + /* ondragstart */ + test(function () { assert_true( events.indexOf('orange.ondragstart') != -1 ); }, "orange.ondragstart should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'orange.ondragstart') return e; }).length, 1); }, "orange.ondragstart should fire 1 time"); + test(function () { assert_equals( events[2], 'orange.ondragstart' ); }, "orange.ondragstart should be event handler #3"); + test(function () { assert_equals( events.indexOf('pink.ondragstart'), -1 ); }, "pink.ondragstart should not fire"); + test(function () { assert_equals( events.indexOf('yellow.ondragstart'), -1 ); }, "yellow.ondragstart should not fire"); + test(function () { assert_equals( events.indexOf('blue.ondragstart'), -1 ); }, "blue.ondragstart should not fire"); + test(function () { assert_equals( events.indexOf('body.ondragstart'), -1 ); }, "ondragstart should not fire at the body"); + test(function () { assert_true( events.indexOf('bubble.ondragstart') != -1 ); }, "ondragstart should bubble to body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'bubble.ondragstart') return e; }).length, 1); }, "ondragstart should only bubble to body 1 time"); + test(function () { assert_equals( events[3], 'bubble.ondragstart' ); }, "ondragstart should bubble to body as event handler #4"); + + /* ondrag */ + test(function () { assert_true( events.indexOf('orange.ondrag') != -1 ); }, "orange.ondrag should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'orange.ondrag') return e; }).length, 15); }, "orange.ondrag should fire 15 times"); + for( var i = 0, evindex = [4,10,13,16,21,24,27,34,38,42,49,52,55,62,66]; i < evindex.length; i++ ) { + test(function () { assert_equals( events[evindex[i]], 'orange.ondrag' ); }, "orange.ondrag should be event handler #"+(evindex[i]+1)); + } + test(function () { assert_equals( events.indexOf('pink.ondrag'), -1 ); }, "pink.ondrag should not fire"); + test(function () { assert_equals( events.indexOf('yellow.ondrag'), -1 ); }, "yellow.ondrag should not fire"); + test(function () { assert_equals( events.indexOf('blue.ondrag'), -1 ); }, "blue.ondrag should not fire"); + test(function () { assert_equals( events.indexOf('body.ondrag'), -1 ); }, "ondrag should not fire at the body"); + test(function () { assert_true( events.indexOf('bubble.ondrag') != -1 ); }, "ondrag should bubble to body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'bubble.ondrag') return e; }).length, 15); }, "ondrag should bubble to body 15 times"); + for( var i = 0, evindex = [5,11,14,17,22,25,28,35,39,43,50,53,56,63,67]; i < evindex.length; i++ ) { + test(function () { assert_equals( events[evindex[i]], 'bubble.ondrag' ); }, "ondrag should bubble to body as event handler #"+(evindex[i]+1)); + } + + /* ondragenter */ + test(function () { assert_true( events.indexOf('orange.ondragenter') != -1 ); }, "orange.ondragenter should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'orange.ondragenter') return e; }).length, 1); }, "orange.ondragenter should fire 1 time"); + test(function () { assert_equals( events[6], 'orange.ondragenter' ); }, "orange.ondragenter should be event handler #7"); + test(function () { assert_true( events.indexOf('pink.ondragenter') != -1 ); }, "pink.ondragenter should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'pink.ondragenter') return e; }).length, 1); }, "pink.ondragenter should fire 1 time"); + test(function () { assert_equals( events[18], 'pink.ondragenter' ); }, "pink.ondragenter should be event handler #19"); + test(function () { assert_true( events.indexOf('yellow.ondragenter') != -1 ); }, "yellow.ondragenter should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'yellow.ondragenter') return e; }).length, 1); }, "yellow.ondragenter should fire 1 time"); + test(function () { assert_equals( events[29], 'yellow.ondragenter' ); }, "yellow.ondragenter should be event handler #30"); + test(function () { assert_true( events.indexOf('blue.ondragenter') != -1 ); }, "blue.ondragenter should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'blue.ondragenter') return e; }).length, 1); }, "blue.ondragenter should fire 1 time"); + test(function () { assert_equals( events[57], 'blue.ondragenter' ); }, "blue.ondragenter should be event handler #58"); + test(function () { assert_true( events.indexOf('body.ondragenter') != -1 ); }, "ondragenter should fire at body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'body.ondragenter') return e; }).length, 3); }, "ondragenter should fire at body 2 times"); + for( var i = 0, evindex = [8,44,45]; i < evindex.length; i++ ) { + test(function () { assert_equals( events[evindex[i]], 'body.ondragenter' ); }, "ondragenter should fire at body as event handler #"+(evindex[i]+1)); + } + test(function () { assert_true( events.indexOf('bubble.ondragenter') != -1 ); }, "ondragenter should bubble to body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'bubble.ondragenter') return e; }).length, 4); }, "ondragenter should bubble to body 4 times"); + for( var i = 0, evindex = [7,19,30,58]; i < evindex.length; i++ ) { + test(function () { assert_equals( events[evindex[i]], 'bubble.ondragenter' ); }, "ondragenter should bubble to body as event handler #"+(evindex[i]+1)); + } + + /* ondragover */ + test(function () { assert_equals( events.indexOf('orange.ondragover'), -1 ); }, "orange.ondragover should not fire"); + test(function () { assert_equals( events.indexOf('pink.ondragover'), -1 ); }, "pink.ondragover should not fire"); + test(function () { assert_true( events.indexOf('yellow.ondragover') != -1 ); }, "yellow.ondragover should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'yellow.ondragover') return e; }).length, 3); }, "yellow.ondragover should fire 3 times"); + for( var i = 0, evindex = [32,36,40]; i < evindex.length; i++ ) { + test(function () { assert_equals( events[evindex[i]], 'yellow.ondragover' ); }, "yellow.ondragover should be event handler #"+(evindex[i]+1)); + } + test(function () { assert_true( events.indexOf('blue.ondragover') != -1 ); }, "blue.ondragover should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'blue.ondragover') return e; }).length, 3); }, "blue.ondragover should fire 9 times"); + for( var i = 0, evindex = [60,64,68]; i < evindex.length; i++ ) { + test(function () { assert_equals( events[evindex[i]], 'blue.ondragover' ); }, "blue.ondragover should be event handler #"+(evindex[i]+1)); + } + test(function () { assert_true( events.indexOf('body.ondragover') != -1 ); }, "ondragover should fire at body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'body.ondragover') return e; }).length, 9); }, "ondragover should fire at body 2 times"); + for( var i = 0, evindex = [9,12,15,20,23,26,48,51,54]; i < evindex.length; i++ ) { + test(function () { assert_equals( events[evindex[i]], 'body.ondragover' ); }, "ondragover should fire at body as event handler #"+(evindex[i]+1)); + } + test(function () { assert_true( events.indexOf('bubble.ondragover') != -1 ); }, "ondragover should bubble to body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'bubble.ondragover') return e; }).length, 6); }, "ondragover should bubble to body 6 times"); + for( var i = 0, evindex = [33,37,41,61,65,69]; i < evindex.length; i++ ) { + test(function () { assert_equals( events[evindex[i]], 'bubble.ondragover' ); }, "ondragover should bubble to body as event handler #"+(evindex[i]+1)); + } + + /* ondragleave */ + test(function () { assert_equals( events.indexOf('orange.ondragleave'), -1 ); }, "orange.ondragleave should not fire"); + test(function () { assert_equals( events.indexOf('pink.ondragleave'), -1 ); }, "pink.ondragleave should not fire"); + test(function () { assert_true( events.indexOf('yellow.ondragleave') != -1 ); }, "yellow.ondragleave should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'yellow.ondragleave') return e; }).length, 1); }, "yellow.ondragleave should fire 1 time"); + test(function () { assert_equals( events[46], 'yellow.ondragleave' ); }, "yellow.ondragleave should be event handler #47"); + test(function () { assert_equals( events.indexOf('blue.ondragleave'), -1 ); }, "blue.ondragleave should not fire"); + test(function () { assert_true( events.indexOf('body.ondragleave') != -1 ); }, "ondragleave should fire at body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'body.ondragleave') return e; }).length, 2); }, "ondragleave should fire at body 2 times"); + for( var i = 0, evindex = [31,59]; i < evindex.length; i++ ) { + test(function () { assert_equals( events[evindex[i]], 'body.ondragleave' ); }, "ondragleave should fire at body as event handler #"+(evindex[i]+1)); + } + test(function () { assert_true( events.indexOf('bubble.ondragleave') != -1 ); }, "ondragleave should bubble to body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'bubble.ondragleave') return e; }).length, 1); }, "ondragleave should bubble to body 1 time"); + test(function () { assert_equals( events[47], 'bubble.ondragleave' ); }, "ondragleave should bubble to body as event handler #48"); + + /* ondrop */ + test(function () { assert_equals( events.indexOf('orange.ondrop'), -1 ); }, "orange.ondrop should not fire"); + test(function () { assert_equals( events.indexOf('pink.ondrop'), -1 ); }, "pink.ondrop should not fire"); + test(function () { assert_equals( events.indexOf('yellow.ondrop'), -1 ); }, "yellow.ondrop should not fire"); + test(function () { assert_true( events.indexOf('blue.ondrop') != -1 ); }, "blue.ondrop should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'blue.ondrop') return e; }).length, 1); }, "blue.ondrop should fire 1 time"); + test(function () { assert_equals( events[70], 'blue.ondrop' ); }, "blue.ondrop should be event handler #71"); + test(function () { assert_equals( events.indexOf('body.ondrop'), -1 ); }, "ondrop should not fire at body"); + test(function () { assert_true( events.indexOf('bubble.ondrop') != -1 ); }, "ondrop should bubble to body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'bubble.ondrop') return e; }).length, 1); }, "ondrop should bubble to body 1 time"); + test(function () { assert_equals( events[71], 'bubble.ondrop' ); }, "ondrop should bubble to body as event handler #72"); + + /* ondragend */ + test(function () { assert_true( events.indexOf('orange.ondragend') != -1 ); }, "orange.ondragend should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'orange.ondragend') return e; }).length, 1); }, "orange.ondragend should fire 1 time"); + test(function () { assert_equals( events[72], 'orange.ondragend' ); }, "orange.ondragend should be event handler #73"); + test(function () { assert_equals( events.indexOf('pink.ondragend'), -1 ); }, "pink.ondragend should not fire"); + test(function () { assert_equals( events.indexOf('yellow.ondragend'), -1 ); }, "yellow.ondragend should not fire"); + test(function () { assert_equals( events.indexOf('blue.ondragend'), -1 ); }, "blue.ondragend should not fire"); + test(function () { assert_equals( events.indexOf('body.ondragend'), -1 ); }, "ondragend should not fire at body"); + test(function () { assert_true( events.indexOf('bubble.ondragend') != -1 ); }, "ondragend should bubble to body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'bubble.ondragend') return e; }).length, 1); }, "ondragend should bubble to body 1 time"); + test(function () { assert_equals( events[73], 'bubble.ondragend' ); }, "ondragend should bubble to body as event handler #74"); + + /* onmousedown */ + test(function () { assert_true( events.indexOf('orange.onmousedown') != -1 ); }, "orange.onmousedown should fire"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'orange.onmousedown') return e; }).length, 1); }, "orange.onmousedown should fire 1 time"); + test(function () { assert_equals( events[0], 'orange.onmousedown' ); }, "orange.onmousedown should be event handler #1"); + test(function () { assert_equals( events.indexOf('pink.onmousedown'), -1 ); }, "pink.onmousedown should not fire"); + test(function () { assert_equals( events.indexOf('yellow.onmousedown'), -1 ); }, "yellow.onmousedown should not fire"); + test(function () { assert_equals( events.indexOf('blue.onmousedown'), -1 ); }, "blue.onmousedown should not fire"); + test(function () { assert_equals( events.indexOf('body.onmousedown'), -1 ); }, "onmousedown should not fire at body"); + test(function () { assert_true( events.indexOf('bubble.onmousedown') != -1 ); }, "onmousedown should bubble to body"); + test(function () { assert_equals( events.filter(function (e) { if (e == 'bubble.onmousedown') return e; }).length, 1); }, "onmousedown should bubble to body 1 time"); + test(function () { assert_equals( events[1], 'bubble.onmousedown' ); }, "onmousedown should bubble to body as event handler #1"); + + /* onmouseup */ + test(function () { assert_equals( events.indexOf('orange.onmouseup'), -1 ); }, "orange.onmouseup should not fire"); + test(function () { assert_equals( events.indexOf('pink.onmouseup'), -1 ); }, "pink.onmouseup should not fire"); + test(function () { assert_equals( events.indexOf('yellow.onmouseup'), -1 ); }, "yellow.onmouseup should not fire"); + test(function () { assert_equals( events.indexOf('blue.onmouseup'), -1 ); }, "blue.onmouseup should not fire"); + test(function () { assert_equals( events.indexOf('body.onmouseup'), -1 ); }, "onmouseup should not fire at body"); + test(function () { assert_equals( events.indexOf('bubble.onmouseup'), -1 ); }, "onmouseup should not bubble to body"); + + done(); + } +}; +</script> + +<div id="testhere"> +<div draggable='true' id='orange'></div> +<div id='fuchsia'></div> +<div id='yellow'></div> +<div id='blue'></div> +</div> + +<p>If you have already clicked on this page, reload it.</p> +<p>Use your pointing device to slowly drag the orange square over the pink square then the yellow square, then the blue square, and release it over the blue square (make sure the mouse remains over each square for at least 1 second, and over the gaps between squares for at least 1 second). Fail if no new text appears below.</p> + +<div id="log"></div>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/001.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/001.svg new file mode 100644 index 0000000..055a7b27 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/001.svg
@@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from text element to textArea</title> +<text x="10" y="30" font-size="20">Select part of this text and drag selection to</text> +<text x="10" y="60" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="90" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="110" width="480" height="380" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="110" width="480" height="380" stroke="black" stroke-width="1" fill="none"/> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/002.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/002.svg new file mode 100644 index 0000000..45ab566 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/002.svg
@@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from editable text element to textArea</title> +<text x="10" y="30" editable="simple" font-size="20">Select part of this text and drag selection to</text> +<text x="10" y="60" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="90" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="110" width="480" height="380" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="110" width="480" height="380" stroke="black" stroke-width="1" fill="none"/> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/003.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/003.svg new file mode 100644 index 0000000..e59527938 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/003.svg
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from tspan elements to textArea</title> +<text x="10" y="30" font-size="20"> + <tspan>Select part</tspan> + <tspan>of this text</tspan> + <tspan>and drag selection to</tspan> +</text> +<text x="10" y="60" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="90" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="110" width="480" height="380" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="110" width="480" height="380" stroke="black" stroke-width="1" fill="none"/> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/004.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/004.svg new file mode 100644 index 0000000..000f5273 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/004.svg
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from tref element to textArea</title> +<defs> + <text id="text">Select me</text> +</defs> +<text x="10" y="30" font-size="20" fill="navy"><tref xlink:href="#text"/></text> +<text x="10" y="60" font-size="20">Select text above and drag selection to</text> +<text x="10" y="90" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="120" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="130" width="480" height="360" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="130" width="480" height="360" stroke="black" stroke-width="1" fill="none"/> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/005.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/005.svg new file mode 100644 index 0000000..9bb3bd68 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/005.svg
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from textArea to textArea</title> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select part of this text and drag selection to the box below. +Content of selection should be copied once it's dropped in the box.</textArea> +<textArea x="10" y="110" width="480" height="380" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="110" width="480" height="380" stroke="black" stroke-width="1" fill="none"/> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/006.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/006.svg new file mode 100644 index 0000000..5edeba6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/006.svg
@@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from text element to editable text element</title> +<text x="10" y="30" font-size="20">Select part of this text and drag selection to</text> +<text x="10" y="60" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="90" font-size="20">copies once it's dropped in the box.</text> +<text x="10" y="200" font-size="50" editable="simple"> </text> +<rect x="10" y="160" width="480" height="50" stroke="black" stroke-width="1" fill="none"/> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/007.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/007.svg new file mode 100644 index 0000000..7d8bcf8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/007.svg
@@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection between editable text elements</title> +<text x="10" y="30" font-size="20" editable="simple">Select part of this text and drag selection to</text> +<text x="10" y="60" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="90" font-size="20">copies once it's dropped in the box.</text> +<text x="10" y="200" font-size="50" editable="simple"> </text> +<rect x="10" y="160" width="480" height="50" stroke="black" stroke-width="1" fill="none"/> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/008.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/008.svg new file mode 100644 index 0000000..51065c9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/008.svg
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from tspan element to editable text element</title> +<text x="10" y="30" font-size="20"> + <tspan>Select part</tspan> + <tspan>of this text</tspan> + <tspan>and drag selection to</tspan> +</text> +<text x="10" y="60" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="90" font-size="20">copies once it's dropped in the box.</text> +<text x="10" y="200" font-size="50" editable="simple"> </text> +<rect x="10" y="160" width="480" height="50" stroke="black" stroke-width="1" fill="none"/> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/009.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/009.svg new file mode 100644 index 0000000..1996d25 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/009.svg
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from tref element to editable text element</title> +<defs> + <text id="text">Select me</text> +</defs> +<text x="10" y="30" font-size="20" fill="navy"><tref xlink:href="#text"/></text> +<text x="10" y="60" font-size="20">Select text above and drag selection to</text> +<text x="10" y="90" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="120" font-size="20">copies once it's dropped in the box.</text> +<text x="10" y="200" font-size="50" editable="simple"> </text> +<rect x="10" y="160" width="480" height="50" stroke="black" stroke-width="1" fill="none"/> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/010.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/010.svg new file mode 100644 index 0000000..c5cce18 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/010.svg
@@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from textArea to editable text element</title> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select part of this text and drag selection to the box below. +Content of selection should be copied once it's dropped in the box.</textArea> +<text x="10" y="200" font-size="50" editable="simple"> </text> +<rect x="10" y="160" width="480" height="50" stroke="black" stroke-width="1" fill="none"/> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/011.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/011.svg new file mode 100644 index 0000000..5618a89e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/011.svg
@@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from textpath to textArea</title> +<defs> + <path id="path" d="M 10 40 C 10 20 480 20 480 40"/> +</defs> +<text fill="navy"> + <textPath xlink:href="#path">Some selectable text rendered along curved text path</textPath> +</text> +<text x="10" y="60" font-size="20">Select part of text above and drag selection to</text> +<text x="10" y="90" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="120" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="130" width="480" height="360" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="130" width="480" height="360" stroke="black" stroke-width="1" fill="none"/> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/012.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/012.svg new file mode 100644 index 0000000..8a50f06c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/012.svg
@@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from editable textpath to textArea</title> +<defs> + <path id="path" d="M 10 40 C 10 20 480 20 480 40"/> +</defs> +<text fill="navy" editable="simple"> + <textPath xlink:href="#path">Some selectable text rendered along curved text path</textPath> +</text> +<text x="10" y="60" font-size="20">Select part of text above and drag selection to</text> +<text x="10" y="90" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="120" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="130" width="480" height="360" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="130" width="480" height="360" stroke="black" stroke-width="1" fill="none"/> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/013-1.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/013-1.xhtml new file mode 100644 index 0000000..7fc593e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/013-1.xhtml
@@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Drag and drop from SVG: helper file</title> +<style type="text/css"> +textarea + {width:400px; + height:300px; + padding:10px;} +</style> +</head> +<body> +<p><textarea placeholder="Drop selection here"/></p> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/013.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/013.svg new file mode 100644 index 0000000..9dc0a47e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/013.svg
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from text element to XHTML textarea in foreignObject</title> +<text x="10" y="30" font-size="20">Select part of this text and drag selection to</text> +<text x="10" y="60" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="90" font-size="20">copies once it's dropped in the box.</text> +<switch> + <foreignObject x="10" y="120" width="480" height="380" requiredExtensions="http://www.w3.org/1999/xhtml" xlink:href="013-1.xhtml"/> + <text x="10" y="150" font-size="20">Skip the test (foreignObject is not supported).</text> +</switch> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/014-1.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/014-1.xhtml new file mode 100644 index 0000000..93d6ab7d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/014-1.xhtml
@@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Drag and drop from SVG: helper file</title> +<style type="text/css"> +div[contenteditable] + {width:300px; + height:100px; + margin-top:20px; + padding:10px; + color:white; + background-color:navy;} +</style> +</head> +<body> +<div contenteditable="true"/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/014.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/014.svg new file mode 100644 index 0000000..acee8efb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/014.svg
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from textArea to contenteditable element in foreignObject</title> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select part of this text and drag selection to the box below. +Content of selection should be copied once it's dropped in the box.</textArea> +<switch> + <foreignObject x="10" y="120" width="480" height="380" requiredExtensions="http://www.w3.org/1999/xhtml" xlink:href="014-1.xhtml"/> + <text x="10" y="150" font-size="20">Skip the test (foreignObject is not supported).</text> +</switch> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/015-1.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/015-1.xhtml new file mode 100644 index 0000000..f5217a9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/015-1.xhtml
@@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Drag and drop from SVG: helper file</title> +</head> +<body> +<input placeholder="Drop selection here"/> +</body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/015.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/015.svg new file mode 100644 index 0000000..de484d2 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/015.svg
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from textArea to XHTML input in foreignObject</title> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select part of this text and drag selection to the box below. +Content of selection should be copied once it's dropped in the box.</textArea> +<switch> + <foreignObject x="10" y="120" width="480" height="380" requiredExtensions="http://www.w3.org/1999/xhtml" xlink:href="015-1.xhtml"/> + <text x="10" y="150" font-size="20">Skip the test (foreignObject is not supported).</text> +</switch> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/016-1.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/016-1.xhtml new file mode 100644 index 0000000..d735cce6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/016-1.xhtml
@@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Drag and drop from SVG: helper file</title> +<style type="text/css"> +div[ondragenter] + {width:300px; + height:100px; + margin-top:20px; + padding:10px; + color:white; + background-color:navy;} +</style> +</head> +<body> +<div + ondragenter="event.preventDefault();event.dataTransfer.effectAllowed = 'copy'" + ondragover="return false" + ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/plain')))" +/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/016.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/016.svg new file mode 100644 index 0000000..fe873924 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/016.svg
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG text selection from textArea to foreignObject</title> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select part of this text and drag selection to the box below. +Content of selection should be copied once it's dropped in the box.</textArea> +<switch> + <foreignObject x="10" y="120" width="480" height="380" requiredExtensions="http://www.w3.org/1999/xhtml" xlink:href="016-1.xhtml"/> + <text x="10" y="150" font-size="20">Skip the test (foreignObject is not supported).</text> +</switch> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/017.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/017.xhtml new file mode 100644 index 0000000..598a2c6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/017.xhtml
@@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection to SVG textArea</title> +</head> +<body onload="window.getSelection().selectAllChildren(document.querySelector('p'))"> +<p>Drag me</p> +<p>Drag selection above to the box below. Copy of selection should end up in the box once you drop it there.</p> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="300px" viewBox="0 0 500 300"> +<textArea x="10" y="10" width="480" height="280" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="10" width="480" height="280" stroke="black" stroke-width="1" fill="none"/> +</svg> +</body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/018.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/018.xhtml new file mode 100644 index 0000000..03ac442 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/018.xhtml
@@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from XHTML text input to SVG textArea</title> +</head> +<body onload="document.querySelector('input').select()"> +<p><input value="Drag me"/></p> +<p>Drag selection above to the blue box. Copy of selection should end up in the blue box once you drop it there.</p> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="300px" viewBox="0 0 500 300"> +<textArea x="10" y="10" width="480" height="280" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="10" width="480" height="280" stroke="black" stroke-width="1" fill="none"/> +</svg> +</body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/019.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/019.xhtml new file mode 100644 index 0000000..9064a604 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/019.xhtml
@@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from XHTML textarea to SVG textArea</title> +<style type="text/css"> +textarea + {height:1.5em; + width:7em;} +</style> +</head> +<body onload="var t = document.querySelector('textarea');t.select();t.setSelectionRange(0,7)"> +<p><textarea>Drag me</textarea></p> +<p>Drag selection above to the blue box. Copy of selection should end up in the blue box once you drop it there.</p> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="300px" viewBox="0 0 500 300"> +<textArea x="10" y="10" width="480" height="280" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="10" width="480" height="280" stroke="black" stroke-width="1" fill="none"/> +</svg> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/020.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/020.xhtml new file mode 100644 index 0000000..7d96b4f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/020.xhtml
@@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging multiline selection from XHTML textarea to SVG textArea</title> +<style type="text/css"> +textarea + {width:300px; + height:100px;} +</style> +</head> +<body onload="var t = document.querySelector('textarea');t.select();t.setSelectionRange(25,56)"> +<p> +<textarea> +Here is textarea +with selection that +spans two lines. +Drag selected text to the blue box. +Copy of selection should end up in the blue box once you drop it there. +</textarea> +</p> +<p>Drag selection above to the textarea below. Copy of selection should end up in the textarea once you drop it there.</p> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="300px" viewBox="0 0 500 300"> +<textArea x="10" y="10" width="480" height="280" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="10" width="480" height="280" stroke="black" stroke-width="1" fill="none"/> +</svg> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/021.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/021.xhtml new file mode 100644 index 0000000..4d82e74 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/021.xhtml
@@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from SVG text element to XHTML element</title> +<style type="text/css"> +div[ondragenter] + {width:300px; + height:100px; + margin-top:20px; + padding:10px; + color:white; + background-color:navy;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="50px" viewBox="0 0 200 50"> +<text x="10" y="45" font-size="30" fill="navy">Select me</text> +</svg> +<p>Select the text above and drag selection to the blue box. Copy of selection should end up in the blue box once you drop it there.</p> +<div + ondragenter="event.preventDefault()" + ondragover="return false" + ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/plain')))" +/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/022.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/022.xhtml new file mode 100644 index 0000000..7354aeef --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/022.xhtml
@@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from SVG editable text element to XHTML element</title> +<style type="text/css"> +div[ondragenter] + {width:300px; + height:100px; + margin-top:20px; + padding:10px; + color:white; + background-color:navy;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="50px" viewBox="0 0 200 50"> +<text x="10" y="45" font-size="30" fill="navy" editable="simple">Select me</text> +</svg> +<p>Select the text above and drag selection to the blue box. Copy of selection should end up in the blue box once you drop it there.</p> +<div + ondragenter="event.preventDefault()" + ondragover="return false" + ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/plain')))" +/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/023.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/023.xhtml new file mode 100644 index 0000000..65ede4b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/023.xhtml
@@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from SVG textArea to XHTML element</title> +<style type="text/css"> +div[ondragenter] + {width:300px; + height:100px; + margin-top:20px; + padding:10px; + color:white; + background-color:navy;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500px" height="100px" viewBox="0 0 500 100"> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select part of this text and drag selection to the box below. +Content of selection should be copied once it's dropped in the box.</textArea> +</svg> +<div + ondragenter="event.preventDefault()" + ondragover="return false" + ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/plain')))" +/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/024.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/024.xhtml new file mode 100644 index 0000000..5b4116c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/024.xhtml
@@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from SVG text element to contenteditable element</title> +<style type="text/css"> +div[contenteditable] + {width:300px; + height:100px; + margin-top:20px; + padding:10px; + color:white; + background-color:navy;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="50px" viewBox="0 0 200 50"> +<text x="10" y="45" font-size="30" fill="navy">Select me</text> +</svg> +<p>Select the text above and drag selection to the blue box. Copy of selection should end up in the blue box once you drop it there.</p> +<div contenteditable="true"/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/025.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/025.xhtml new file mode 100644 index 0000000..86d68018 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/025.xhtml
@@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from SVG editable text element to contenteditable element</title> +<style type="text/css"> +div[contenteditable] + {width:300px; + height:100px; + margin-top:20px; + padding:10px; + color:white; + background-color:navy;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="200px" height="50px" viewBox="0 0 200 50"> +<text x="10" y="45" font-size="30" fill="navy" editable="simple">Select me</text> +</svg> +<p>Select the text above and drag selection to the blue box. Copy of selection should end up in the blue box once you drop it there.</p> +<div contenteditable="true"/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/026.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/026.xhtml new file mode 100644 index 0000000..78699f1c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/026.xhtml
@@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from SVG textArea to contenteditable element</title> +<style type="text/css"> +div[contenteditable] + {width:300px; + height:100px; + margin-top:20px; + padding:10px; + color:white; + background-color:navy;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500px" height="100px" viewBox="0 0 500 100"> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select part of this text and drag selection to the box below. +Content of selection should be copied once it's dropped in the box.</textArea> +</svg> +<div contenteditable="true"/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/027.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/027.xhtml new file mode 100644 index 0000000..5dbce70c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/027.xhtml
@@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from SVG text element to XHTML textarea</title> +<style type="text/css"> +textarea + {width:300px; + height:100px; + margin-top:20px; + padding:10px;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="50px" viewBox="0 0 200 50"> +<text x="10" y="45" font-size="30" fill="navy">Select me</text> +</svg> +<p>Select the text above and drag selection to the textarea. Copy of selection should end up in the textarea once you drop it there.</p> +<p><textarea placeholder="Drop selection here"/></p> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/028.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/028.xhtml new file mode 100644 index 0000000..d60b518c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/028.xhtml
@@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from SVG editable text element to XHTML textarea</title> +<style type="text/css"> +textarea + {width:300px; + height:100px; + margin-top:20px; + padding:10px;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="200px" height="50px" viewBox="0 0 200 50"> +<text x="10" y="45" font-size="30" fill="navy" editable="simple">Select me</text> +</svg> +<p>Select the text above and drag selection to the textarea. Copy of selection should end up in the textarea once you drop it there.</p> +<p><textarea placeholder="Drop selection here"/></p> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/029.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/029.xhtml new file mode 100644 index 0000000..d469841 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/029.xhtml
@@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging selection from SVG textArea to XHTML textarea</title> +<style type="text/css"> +textarea + {width:300px; + height:100px; + margin-top:20px; + padding:10px;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500px" height="100px" viewBox="0 0 500 100"> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select part of this text and drag selection to the box below. +Content of selection should be copied once it's dropped in the box.</textArea> +</svg> +<p>Select the text above and drag selection to the textarea. Copy of selection should end up in the textarea once you drop it there.</p> +<p><textarea placeholder="Drop selection here"/></p> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/030-1.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/030-1.svg new file mode 100644 index 0000000..62798a7 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/030-1.svg
@@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100px" height="100px" viewBox="0 0 100 100"> +<circle cx="50" cy="50" r="50" fill="green"/> +</svg> +
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/030.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/030.xhtml new file mode 100644 index 0000000..b20d6468 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/030.xhtml
@@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>SVG image drag and drop</title> +<style type="text/css"> +div[ondragenter] + {width:105px; + min-height:105px; + text-align:center; + margin-top:20px; + padding:10px; + border:solid thin navy;} +p:first-child + {padding-left:12px;} +</style> +<script type="application/ecmascript"> +function addImage(event) + {var c = document.createElement('img'); + c.setAttribute('src',event.dataTransfer.getData('text/uri-list')); + document.querySelector('div').appendChild(c);} +</script> +</head> +<body> +<p><img src="030-1.svg" alt="SVG circle" ondragstart="event.dataTransfer.effectAllowed = 'copy'"/></p> +<p>Drag circle above to the box below. It should be copied to the box once you drop it there.</p> +<div + ondragenter="event.preventDefault()" + ondragover="return false" + ondrop="addImage(event)" +/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/031.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/031.xhtml new file mode 100644 index 0000000..81c355d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/031.xhtml
@@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>SVG dataURL image drag and drop</title> +<style type="text/css"> +div[ondragenter] + {width:105px; + min-height:105px; + text-align:center; + margin-top:20px; + padding:10px; + border:solid thin navy;} +p:first-child + {padding-left:12px;} +</style> +<script type="application/ecmascript"> +function addImage(event) + {var c = document.createElement('img'); + c.setAttribute('src',event.dataTransfer.getData('text/uri-list')); + document.querySelector('div').appendChild(c);} +</script> +</head> +<body> +<p><img src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22100px%22%20height%3D%22100px%22%20viewBox%3D%220%200%20100%20100%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22green%22/%3E%3C/svg%3E" alt="SVG circle" ondragstart="event.dataTransfer.effectAllowed = 'copy'"/></p> +<p>Drag circle above to the box below. It should be copied to the box once you drop it there.</p> +<div + ondragenter="event.preventDefault()" + ondragover="return false" + ondrop="addImage(event)" +/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/032.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/032.xhtml new file mode 100644 index 0000000..dc5592d4 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/032.xhtml
@@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Cross fragment drag and drop of SVG text selection from text element to textArea</title> +<style type="text/css"> +textarea + {width:300px; + height:100px;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="50px" viewBox="0 0 200 50"> +<text x="10" y="45" font-size="30" fill="navy">Select me</text> +</svg> +<p>Drag selection above to the textarea below. Copy of selection should end up in the textarea once you drop it there.</p> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="300px" viewBox="0 0 500 300"> +<textArea x="10" y="10" width="480" height="280" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="10" width="480" height="280" stroke="black" stroke-width="1" fill="none"/> +</svg> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/033.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/033.xhtml new file mode 100644 index 0000000..7d55fec0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/033.xhtml
@@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Cross fragment drag and drop of SVG text selection from editable text element to textArea</title> +<style type="text/css"> +textarea + {width:300px; + height:100px;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="50px" viewBox="0 0 200 50"> +<text x="10" y="45" font-size="30" fill="navy" editable="simple">Select me</text> +</svg> +<p>Drag selection above to the textarea below. Copy of selection should end up in the textarea once you drop it there.</p> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="300px" viewBox="0 0 500 300"> +<textArea x="10" y="10" width="480" height="280" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="10" width="480" height="280" stroke="black" stroke-width="1" fill="none"/> +</svg> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/034.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/034.xhtml new file mode 100644 index 0000000..5ac9dac --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/034.xhtml
@@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Cross fragment drag and drop of SVG text selection from textArea to editable text element</title> +<style type="text/css"> +textarea + {width:300px; + height:100px;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500px" height="100px" viewBox="0 0 500 100"> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select me.</textArea> +</svg> +<p>Drag selection above to the textarea below. Copy of selection should end up in the textarea once you drop it there.</p> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="300px" viewBox="0 0 500 300"> +<textArea x="10" y="10" width="480" height="280" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="10" width="480" height="280" stroke="black" stroke-width="1" fill="none"/> +</svg> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/035.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/035.xhtml new file mode 100644 index 0000000..261ae2e9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/035.xhtml
@@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Cross fragment drag and drop between SVG textAreas</title> +<style type="text/css"> +textarea + {width:300px; + height:100px;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500px" height="100px" viewBox="0 0 500 100"> +<textArea x="10" y="10" width="480" height="90" font-size="20">Select me.</textArea> +</svg> +<p>Drag selection above to the textarea below. Copy of selection should end up in the textarea once you drop it there.</p> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400px" height="50px" viewBox="0 0 400 50"> +<text x="10" y="40" font-size="50" editable="simple"> </text> +<rect x="10" y="0" width="380" height="50" stroke="black" stroke-width="1" fill="none"/> +</svg> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/036-1.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/036-1.svg new file mode 100644 index 0000000..d16862d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/036-1.svg
@@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="50px" viewBox="0 0 200 50"> +<text x="10" y="45" font-size="30" fill="navy">Select me</text> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/036.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/036.xhtml new file mode 100644 index 0000000..cb774b3e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/036.xhtml
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging text selection between different SVG images</title> +</head> +<body> +<p><object type="image/svg+xml" data="036-1.svg">SVG Image</object></p> +<p>Drag selection above to the box below. Copy of selection should end up in the box once you drop it there.</p> +<p><object type="image/svg+xml" data="helper-drop-selection-here-textArea.svg">SVG Image</object></p> +</body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/037.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/037.xhtml new file mode 100644 index 0000000..b97f99c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/037.xhtml
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging text selection from dataURL image to another SVG image</title> +</head> +<body> +<object type="image/svg+xml" data="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22200px%22%20height%3D%2250px%22%20viewBox%3D%220%200%20200%2050%22%3E%3Ctext%20x%3D%2210%22%20y%3D%2245%22%20font-size%3D%2230%22%20fill%3D%22navy%22%3ESelect%20me%3C/text%3E%3C/svg%3E">SVG Image</object> +<p>Drag selection above to the box below. Copy of selection should end up in the box once you drop it there.</p> +<p><object type="image/svg+xml" data="helper-drop-selection-here-textArea.svg">SVG Image</object></p> +</body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/038.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/038.xhtml new file mode 100644 index 0000000..c74b1db --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/038.xhtml
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging text selection between different SVG dataURL images</title> +</head> +<body> +<p><object type="image/svg+xml" data="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22200px%22%20height%3D%2250px%22%20viewBox%3D%220%200%20200%2050%22%3E%3Ctext%20x%3D%2210%22%20y%3D%2245%22%20font-size%3D%2230%22%20fill%3D%22navy%22%3ESelect%20me%3C/text%3E%3C/svg%3E">SVG Image</object></p> +<p>Drag selection above to the box below. Copy of selection should end up in the box once you drop it there.</p> +<p><object type="image/svg+xml" data="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.2%22%20width%3D%22500px%22%20height%3D%22300px%22%20viewBox%3D%220%200%20500%20300%22%3E%3CtextArea%20x%3D%2210%22%20y%3D%2210%22%20width%3D%22480%22%20height%3D%22280%22%20font-size%3D%2220%22%20editable%3D%22simple%22%20pointer-events%3D%22boundingBox%22%3EDrop%20selection%20here%3C/textArea%3E%3Crect%20x%3D%2210%22%20y%3D%2210%22%20width%3D%22480%22%20height%3D%22280%22%20stroke%3D%22black%22%20stroke-width%3D%221%22%20fill%3D%22none%22/%3E%3C/svg%3E">SVG Image</object></p> +</body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/039-1.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/039-1.svg new file mode 100644 index 0000000..7023ddd --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/039-1.svg
@@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="250px" height="50px" viewBox="0 0 250 50"> +<textArea x="10" y="10" width="200" height="50" font-size="20">Select me.</textArea> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/039.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/039.xhtml new file mode 100644 index 0000000..77bc7e9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/039.xhtml
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging textArea selection between different SVG images</title> +</head> +<body> +<p><object type="image/svg+xml" data="039-1.svg">SVG Image</object></p> +<p>Drag selection above to the box below. Copy of selection should end up in the box once you drop it there.</p> +<p><object type="image/svg+xml" data="helper-drop-selection-here-textArea.svg">SVG Image</object></p> +</body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/040.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/040.xhtml new file mode 100644 index 0000000..6069563 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/040.xhtml
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging textArea selection from dataURL image to another SVG image</title> +</head> +<body> +<p><object type="image/svg+xml" data="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22250px%22%20height%3D%2250px%22%20viewBox%3D%220%200%20250%2050%22%3E%3CtextArea%20x%3D%2210%22%20y%3D%2210%22%20width%3D%22200%22%20height%3D%2250%22%20font-size%3D%2220%22%3ESelect%20me.%3C/textArea%3E%3C/svg%3E">SVG Image</object></p> +<p>Drag selection above to the box below. Copy of selection should end up in the box once you drop it there.</p> +<p><object type="image/svg+xml" data="helper-drop-selection-here-textArea.svg">SVG Image</object></p> +</body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/041.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/041.xhtml new file mode 100644 index 0000000..326bafe --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/041.xhtml
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Dragging textArea selection between different SVG dataURL images</title> +</head> +<body> +<p><object type="image/svg+xml" data="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22250px%22%20height%3D%2250px%22%20viewBox%3D%220%200%20250%2050%22%3E%3CtextArea%20x%3D%2210%22%20y%3D%2210%22%20width%3D%22200%22%20height%3D%2250%22%20font-size%3D%2220%22%3ESelect%20me.%3C/textArea%3E%3C/svg%3E">SVG Image</object></p> +<p>Drag selection above to the box below. Copy of selection should end up in the box once you drop it there.</p> +<p><object type="image/svg+xml" data="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.2%22%20width%3D%22500px%22%20height%3D%22300px%22%20viewBox%3D%220%200%20500%20300%22%3E%3CtextArea%20x%3D%2210%22%20y%3D%2210%22%20width%3D%22480%22%20height%3D%22280%22%20font-size%3D%2220%22%20editable%3D%22simple%22%20pointer-events%3D%22boundingBox%22%3EDrop%20selection%20here%3C/textArea%3E%3Crect%20x%3D%2210%22%20y%3D%2210%22%20width%3D%22480%22%20height%3D%22280%22%20stroke%3D%22black%22%20stroke-width%3D%221%22%20fill%3D%22none%22/%3E%3C/svg%3E">SVG Image</object></p> +</body> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/042.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/042.xhtml new file mode 100644 index 0000000..8226e495 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/042.xhtml
@@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Drag and drop from downsized SVG image</title> +<style type="text/css"> +object + {width:100px; + height:30px;} +textarea + {width:300px; + height:100px; + margin-top:20px; + padding:10px;} +</style> +</head> +<body> +<p><object type="image/svg+xml" data="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22200px%22%20height%3D%2250px%22%20viewBox%3D%220%200%20200%2050%22%3E%3Ctext%20x%3D%2210%22%20y%3D%2245%22%20font-size%3D%2230%22%20fill%3D%22navy%22%3ESelect%20me%3C/text%3E%3C/svg%3E">SVG Image</object></p> +<p>Select the text above and drag selection to the textarea. Copy of selection should end up in the textarea once you drop it there.</p> +<p><textarea placeholder="Drop selection here"/></p> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/043.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/043.xhtml new file mode 100644 index 0000000..e11a4d82 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/043.xhtml
@@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Drag and drop from enlarged SVG image</title> +<style type="text/css"> +object + {width:300px; + height:75px;} +textarea + {width:300px; + height:100px; + margin-top:20px; + padding:10px;} +</style> +</head> +<body> +<p><object type="image/svg+xml" data="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22200px%22%20height%3D%2250px%22%20viewBox%3D%220%200%20200%2050%22%3E%3Ctext%20x%3D%2210%22%20y%3D%2245%22%20font-size%3D%2230%22%20fill%3D%22navy%22%3ESelect%20me%3C/text%3E%3C/svg%3E">SVG Image</object></p> +<p>Select the text above and drag selection to the textarea. Copy of selection should end up in the textarea once you drop it there.</p> +<p><textarea placeholder="Drop selection here"/></p> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/044.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/044.svg new file mode 100644 index 0000000..6dfcb4d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/044.svg
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of RTL SVG text selection from text element to textArea</title> +<text x="10" y="30" font-size="20" fill="navy">‮FAIL|SSAP‬</text> +<text x="10" y="60" font-size="20">Select text above and drag selection to</text> +<text x="10" y="90" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="120" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="130" width="480" height="360" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="130" width="480" height="360" stroke="black" stroke-width="1" fill="none"/> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/045.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/045.svg new file mode 100644 index 0000000..00dee45 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/045.svg
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of BiDi SVG text selection from text element to textArea</title> +<text x="10" y="30" font-size="20" fill="navy">PASS|LIAF ‮FAIL|SSAP‬ PASS|LIAF</text> +<text x="10" y="60" font-size="20">Select text above and drag selection to</text> +<text x="10" y="90" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="120" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="130" width="480" height="360" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="130" width="480" height="360" stroke="black" stroke-width="1" fill="none"/> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/046.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/046.svg new file mode 100644 index 0000000..20c27a7 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/046.svg
@@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of BiDi SVG text selection from tspan elements to textArea</title> +<text x="10" y="30" font-size="20" fill="navy"> + <tspan>PASS|LIAF</tspan> + <tspan>‮FAIL|SSAP‬</tspan> + <tspan>PASS|LIAF</tspan> +</text> +<text x="10" y="60" font-size="20">Select text above and drag selection to</text> +<text x="10" y="90" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="120" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="130" width="480" height="360" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="130" width="480" height="360" stroke="black" stroke-width="1" fill="none"/> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/047.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/047.svg new file mode 100644 index 0000000..e10a5c56 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/047.svg
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of RTL SVG text selection from tref element to textArea</title> +<defs> + <text id="text">‮FAIL|SSAP‬</text> +</defs> +<text x="10" y="30" font-size="20" fill="navy"><tref xlink:href="#text"/></text> +<text x="10" y="60" font-size="20">Select text above and drag selection to</text> +<text x="10" y="90" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="120" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="130" width="480" height="360" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="130" width="480" height="360" stroke="black" stroke-width="1" fill="none"/> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/048.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/048.svg new file mode 100644 index 0000000..5a90f214 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/048.svg
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of BiDi SVG text selection from tref element to textArea</title> +<defs> + <text id="text">PASS|LIAF ‮FAIL|SSAP‬ PASS|LIAF</text> +</defs> +<text x="10" y="30" font-size="20" fill="navy"><tref xlink:href="#text"/></text> +<text x="10" y="60" font-size="20">Select text above and drag selection to</text> +<text x="10" y="90" font-size="20">the box below. Content of selection should be</text> +<text x="10" y="120" font-size="20">copies once it's dropped in the box.</text> +<textArea x="10" y="130" width="480" height="360" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="130" width="480" height="360" stroke="black" stroke-width="1" fill="none"/> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/049.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/049.xhtml new file mode 100644 index 0000000..de81c7b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/049.xhtml
@@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Selecting text in SVG text element inside draggable container</title> +</head> +<body> +<div draggable="true"> + <svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="200px" height="50px" viewBox="0 0 200 50"> + <text x="10" y="45" font-size="30" fill="navy" editable="simple">Select me</text> + </svg> +</div> +<p>You should be able to select text above</p> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/050.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/050.xhtml new file mode 100644 index 0000000..a8d7377 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/050.xhtml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Selecting text in SVG textArea element inside draggable container</title> +</head> +<body> +<div draggable="true"> + <svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="100px" viewBox="0 0 500 100"> + <textArea x="10" y="10" width="480" height="90" font-size="20" editable="simple">You should be able to select this text</textArea> + </svg> +</div> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/051.xhtml b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/051.xhtml new file mode 100644 index 0000000..36a15c54 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/051.xhtml
@@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Drag and drop of link from SVG fragment to XHTML</title> +<style type="text/css"> +div + {width:300px; + height:100px; + margin-top:20px; + padding:10px; + color:white; + background-color:navy;} +</style> +</head> +<body> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="200px" height="50px" viewBox="0 0 200 50"> + <a xlink:href="data:text/plain,PASS"> + <text x="10" y="45" font-size="30" fill="navy">Drag me</text> + </a> +</svg> +<p>Drag link to the blue box. You should see word PASS once you drop it there.</p> +<div dropzone="copy string:text/uri-list" ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/uri-list').substring(16)))"/> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/052.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/052.svg new file mode 100644 index 0000000..5a780cb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/052.svg
@@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of text link inside SVG</title> +<a xlink:href="data:text/plain,PASS"> + <text x="10" y="50" font-size="30" fill="navy">Drag me</text> +</a> +<textArea x="10" y="70" width="480" height="170" font-size="30">Drag link above and drop it in the gray box below. You should see word PASS once you drop it.</textArea> +<rect x="10" y="300" width="480" height="190" fill="gray"/> +<script type="application/ecmascript"> +var a = document.querySelector('a'), rect = document.querySelector('rect'), text = document.querySelector('textArea'); +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'} +,false); +rect.addEventListener('dragenter', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('dragover', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('drop', +function (event) + {text.firstChild.nodeValue = event.dataTransfer.getData('text/uri-list').substring(16,20)} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/053.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/053.svg new file mode 100644 index 0000000..6c1c4e6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/053.svg
@@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of circle link inside SVG</title> +<a xlink:href="data:text/plain,PASS"> + <circle cx="50" cy="50" r="50" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="30">Drag green circle above and drop it in the gray box below. Gray box should turn green once you drop it.</textArea> +<rect x="10" y="300" width="480" height="190" fill="gray"/> +<script type="application/ecmascript"> +var a = document.querySelector('a'), rect = document.querySelector('rect'); +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'} +,false); +rect.addEventListener('dragenter', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('dragover', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('drop', +function (event) + {if(event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,PASS') + {rect.setAttribute('fill','green');} + } +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/054.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/054.svg new file mode 100644 index 0000000..b0daf03 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/054.svg
@@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of animated circle link inside SVG</title> +<a xlink:href="data:text/plain,PASS"> + <circle cx="50" cy="50" r="10" fill="green"> + <animate attributeName="r" to="50" dur="10s" begin="0s" fill="freeze"/> + </circle> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="30"> +Drag green circle above and drop it in the gray box below. +Size of feedback image should match size of circle +and gray box should turn green.</textArea> +<rect x="10" y="300" width="480" height="190" fill="gray"/> +<script type="application/ecmascript"> +var a = document.querySelector('a'), rect = document.querySelector('rect'); +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'} +,false); +rect.addEventListener('dragenter', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('dragover', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('drop', +function (event) + {if(event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,PASS') + {rect.setAttribute('fill','green');} + } +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/055.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/055.svg new file mode 100644 index 0000000..ee519ba --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/055.svg
@@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Selection and drag and drop of link inside SVG</title> +<a xlink:href="data:text/plain,PASS"> + <rect x="10" y="10" width="80" height="80" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="30">Select part of this text. Once text is selected drag green square above and drop it in the gray box below. Gray box should turn green.</textArea> +<rect x="10" y="300" width="480" height="190" fill="gray"/> +<script type="application/ecmascript"> +var a = document.querySelector('a'), rect = document.querySelector('svg > rect'); +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'} +,false); +rect.addEventListener('dragenter', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('dragover', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('drop', +function (event) + {if(event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,PASS') + {rect.setAttribute('fill','green');} + } +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/056.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/056.svg new file mode 100644 index 0000000..088b375a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/056.svg
@@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>dataTransfer.setData/getData during SVG link drag and drop</title> +<a xlink:href="data:text/plain,PASS"> + <polygon points="0,0 100,0 0,100" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="15">Drag green triangle above and drop it in the gray box below. Gray box should turn green.</textArea> +<rect x="10" y="300" width="480" height="190" fill="gray"/> +<script type="application/ecmascript"> +<![CDATA[ +var dataTypes = ['text/uri-list', 'text/plain', 'application/xml', 'application/xhtml+xml', 'application/mathml+xml', 'image/svg+xml', 'text/html', 'text/x-example'], +data = ['data:text/plain,PASS', 'PASS', '<result>PASS</result>', '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Data store item</title></head><body><p>PASS</p></body></html>', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>1</mn></math>', '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100px" height="50px" viewBox="0 0 100 50"><text x="0" y="40" font-size="40" fill="green">PASS</text></svg>', '<!DOCTYPE html><html><head><title>Data store item</title></head><body><p>PASS</p></body></html>', 'PASS'], +a = document.querySelector('a'), rect = document.querySelector('rect'), text = document.querySelector('textArea'), result = true; +a.addEventListener('dragstart', + function (event) + {event.dataTransfer.effectAllowed = 'copy'; + for(var i = 0; i != dataTypes.length; i++) + {event.dataTransfer.setData(dataTypes[i], data[i]);} + if(event.dataTransfer.items.length < dataTypes.length) + {say('items.length (dragstart) : FAIL');} + },false); +a.addEventListener('drag', + function (event) + {for(var i = 0; i != dataTypes.length; i++) + {event.dataTransfer.setData(dataTypes[i], 'FAIL'); + if(event.dataTransfer.getData(dataTypes[i])) + {say('getData(' + dataTypes[i] + ') : FAIL (data store should not be readable during drag)')} + } + if(event.dataTransfer.items.length < dataTypes.length) + {say('items.length (dragover) : FAIL')} + },false); +rect.addEventListener('dragenter', + function (event) + {event.preventDefault(); + for(var i = 0; i != dataTypes.length; i++) + {event.dataTransfer.setData(dataTypes[i], 'FAIL'); + if(event.dataTransfer.getData(dataTypes[i])) + {say('getData(' + dataTypes[i] + ') : FAIL (data store should not be readable during dragenter)')} + } + if(event.dataTransfer.items.length < dataTypes.length) + {say('items.length (dragenter) : FAIL')} + },false); +rect.addEventListener('dragover', + function (event) + {event.preventDefault(); + for(var i = 0; i != dataTypes.length; i++) + {event.dataTransfer.setData(dataTypes[i], 'FAIL'); + if(event.dataTransfer.getData(dataTypes[i])) + {say('getData(' + dataTypes[i] + ') : FAIL (data store should not be readable during dragover)')} + } + if(event.dataTransfer.items.length < dataTypes.length) + {say('items.length (dragover) : FAIL');} + },false); +rect.addEventListener('drop', + function (event) + {if(event.dataTransfer.items.length < dataTypes.length) + {say('items.length (drop) : FAIL');} + for(var i = 0; i != dataTypes.length; i++) + {if(event.dataTransfer.getData(dataTypes[i]) != data[i]) + {say('getData(' + dataTypes[i] + ') : FAIL');} + } + rect.setAttribute('fill',result?'green':'red'); + },false); +function say(it) + {text.appendChild(document.createTextNode(it + '.')); + result = false;} +]]> +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/057.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/057.svg new file mode 100644 index 0000000..165a45f3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/057.svg
@@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>dataTransfer.items during SVG link drag and drop</title> +<a xlink:href="data:text/plain,PASS"> + <polygon points="0,0 100,0 100,100" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="15">Drag green triangle above and drop it in the gray box below. Gray box should turn green.</textArea> +<rect x="10" y="300" width="480" height="190" fill="gray"/> +<script type="application/ecmascript"> +<![CDATA[ +var dataTypes = ['text/uri-list', 'text/plain', 'application/xml', 'application/xhtml+xml', 'application/mathml+xml', 'image/svg+xml', 'text/html', 'text/x-example'], +data = ['data:text/plain,PASS', 'PASS', '<result>PASS</result>', '<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Data store item</title></head><body><p>PASS</p></body></html>', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>1</mn></math>', '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100px" height="50px" viewBox="0 0 100 50"><text x="0" y="40" font-size="40" fill="green">PASS</text></svg>', '<!DOCTYPE html><html><head><title>Data store item</title></head><body><p>PASS</p></body></html>', 'PASS'], +a = document.querySelector('a'), rect = document.querySelector('rect'), text = document.querySelector('textArea'), e = 0, result = true; +a.addEventListener('dragstart', + function (event) + {event.dataTransfer.effectAllowed = 'copy'; + for(var i = 0; i != dataTypes.length; i++) + {event.dataTransfer.setData(dataTypes[i], data[i]);} + for(var i = event.dataTransfer.items.length; i != 0; i--) + {if(dataTypes.indexOf(event.dataTransfer.items[i-1].type) == -1) + {delete event.dataTransfer.items[i-1]} + } + if(event.dataTransfer.items.length != dataTypes.length) + {say('items.length (ondragstart) : FAIL (items.length should be' + dataTypes.length + ')')} + for(var i = 0; i != event.dataTransfer.items.length; i++) + {if(event.dataTransfer.items[i].kind != 'string') + {say('Item kind (ondragstart): FAIL (items[' + i + '].kind should be string)')} + if(event.dataTransfer.items[i].type != dataTypes[i]) + {say('Item type (ondragstart): FAIL (items[' + i + '].type should be' + dataTypes[i] + ')')} + event.dataTransfer.items[i].getAsString( + function () + {if(arguments[0] != data[e++]) + {say('getAsString : FAIL (items[' + i + '].getAsString should pass' + data[e] + ')')} + } + ); + } + },false); +a.addEventListener('drag', + function (event) + {event.dataTransfer.items.clear(); + if(event.dataTransfer.items.length != dataTypes.length) + {say('items.length (ondrag) : FAIL (items.length should be' + dataTypes.length + ')')} + for(var i = 0; i != event.dataTransfer.items.length; i++) + {if(event.dataTransfer.items[i].kind != 'string') + {say('Item kind (ondrag): FAIL (items[' + i + '].kind should be string)')} + if(event.dataTransfer.items[i].type != dataTypes[i]) + {say('Item type (ondrag): FAIL (items[' + i + '].type should be' + dataTypes[i] + ')')} + event.dataTransfer.items[i].getAsString( + function () + {if(arguments[0]) + {say('getAsString : FAIL (items[' + i + '].getAsString should not reveal data to drag event handler)')} + } + ); + } + },false); +rect.addEventListener('dragenter', + function (event) + {event.preventDefault(); + event.dataTransfer.items.clear(); + if(event.dataTransfer.items.length != dataTypes.length) + {say('items.length (ondragenter) : FAIL (items.length should be' + dataTypes.length + ')')} + for(var i = 0; i != event.dataTransfer.items.length; i++) + {delete event.dataTransfer.items[i]; + if(event.dataTransfer.items[i].kind != 'string') + {say('Item kind (ondragenter): FAIL (items[' + i + '].kind should be string)')} + if(event.dataTransfer.items[i].type != dataTypes[i]) + {say('Item type (ondragenter): FAIL (items[' + i + '].type should be' + dataTypes[i] + ')')} + event.dataTransfer.items[i].getAsString( + function () + {if(arguments[0]) + {say('getAsString : FAIL (items[' + i + '].getAsString should not reveal data to drag event handler)')} + } + ); + } + },false); +rect.addEventListener('dragover', + function (event) + {event.preventDefault(); + event.dataTransfer.items.clear(); + if(event.dataTransfer.items.length != dataTypes.length) + {say('items.length (ondragover) : FAIL (items.length should be' + dataTypes.length + ')')} + for(var i = 0; i != event.dataTransfer.items.length; i++) + {if(event.dataTransfer.items[i].kind != 'string') + {say('Item kind (ondragover): FAIL (items[' + i + '].kind should be string)')} + if(event.dataTransfer.items[i].type != dataTypes[i]) + {say('Item type (ondragover): FAIL (items[' + i + '].type should be' + dataTypes[i] + ')')} + event.dataTransfer.items[i].getAsString( + function () + {if(arguments[0]) + {say('getAsString : FAIL (items[' + i + '].getAsString should not reveal data to dragover event handler)')} + } + ); + } + },false); +rect.addEventListener('drop', + function (event) + {e = 0; + event.dataTransfer.items.clear(); + if(event.dataTransfer.items.length != dataTypes.length) + {say('items.length (ondrop) : FAIL (items.length should be' + dataTypes.length + ')')} + for(var i = 0; i != event.dataTransfer.items.length; i++) + {delete event.dataTransfer.items[i]; + if(event.dataTransfer.items[i].kind != 'string') + {say('Item kind (ondrop): FAIL (items[' + i + '].kind should be string)')} + if(event.dataTransfer.items[i].type != dataTypes[i]) + {say('Item type (ondrop): FAIL (items[' + i + '].type should be' + dataTypes[i] + ')')} + event.dataTransfer.items[i].getAsString( + function () + {if(arguments[0] != data[e++]) + {say('getAsString : FAIL (items[' + i + '].getAsString should pass' + data[e] + ')')} + } + ); + } + rect.setAttribute('fill',result?'green':'red'); + },false); +function say(it) + {text.appendChild(document.createTextNode(it + '.')); + result = false;} +]]> +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/058.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/058.svg new file mode 100644 index 0000000..d2bb91d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/058.svg
@@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>SVG link drag and drop: allowed effects 'copy','move','link' and 'none'</title> +<a xlink:href="data:text/plain,1"> + <circle cx="50" cy="50" r="40" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="30">You should be able to drag green circle and drop it onto any of the boxes below. Choosen box should turn green once circle is dropped on it.</textArea> +<rect x="10" y="300" width="100" height="100" fill="silver"/> +<rect x="120" y="300" width="100" height="100" fill="gray"/> +<rect x="230" y="300" width="100" height="100" fill="gray"/> +<rect x="340" y="300" width="100" height="100" fill="black"/> +<script type="application/ecmascript"> +var a = document.querySelector('a'), rect = document.querySelectorAll('rect'), +effects = ['copy','move','link','all'], e = 0; +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = effects[e]} +,false); +for(var i = 0; i != rect.length; i++) + {rect[i].addEventListener('dragenter', + function (event) + {event.preventDefault(); + event.dataTransfer.effectAllowed = effects[e];} + ,false); + rect[i].addEventListener('dragover', + function (event) + {event.preventDefault()} + ,false); + rect[i].addEventListener('drop', + function (event) + {if(event.dataTransfer.dropEffect == effects[e] && event.dataTransfer.effectAllowed == effects[e] && i != 3) + {event.target.setAttribute('fill','green');} + e = (e+1)%3;} + ,false);} +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/059-1.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/059-1.svg new file mode 100644 index 0000000..492e951 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/059-1.svg
@@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>SVG link drag and drop: helper file</title> +<textArea x="10" y="10" width="480" height="200" font-size="30">Drop circle onto gray box below. Box should turn green once circle is dropped.</textArea> +<rect x="10" y="220" width="480" height="270" fill="gray"/> +<script type="application/ecmascript"> +var rect = document.querySelector('rect'); +rect.addEventListener('dragenter', +function (event) + {event.preventDefault();} +,false); +rect.addEventListener('dragover', +function (event) + {event.preventDefault();} +,false); +rect.addEventListener('drop', +function (event) + {rect.setAttribute('fill',(event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'green':'red');} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/059.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/059.svg new file mode 100644 index 0000000..3cc7815 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/059.svg
@@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>SVG link cross page drag and drop</title> +<a xlink:href="data:text/plain,1"> + <circle cx="50" cy="50" r="40" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="30">Drag circle above. You should be redirected to the new page and be able to drop it there.</textArea> +<script type="application/ecmascript"> +document.querySelector('a').addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'; + window.location = '059-1.svg'} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/060-1.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/060-1.svg new file mode 100644 index 0000000..3dc6689e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/060-1.svg
@@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>SVG link drag and drop: helper file</title> +<textArea x="10" y="10" width="480" height="200" font-size="30">Drag circle over arrow below but don't drop it yet. You should be returned back to start page.</textArea> +<polygon points="10,400 100,300 100,350 480,350 480,450 100,450 100,500 10,400" fill="navy"/> +<script type="application/ecmascript"> +document.querySelector('polygon').addEventListener('dragenter', +function (event) + {window.location = '060.svg'} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/060.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/060.svg new file mode 100644 index 0000000..fa7159a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/060.svg
@@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>SVG link drag and drop and history navigation roundtrip</title> +<a xlink:href="data:text/plain,1"> + <circle cx="50" cy="50" r="40" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="30">Drag circle above. You will be redirected to new page. When you return back drop circle on itself. You should see word PASS once you drop it.</textArea> +<script type="application/ecmascript"> +var a = document.querySelector('a'); +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'; + window.location = '060-1.svg'} +,false); +a.addEventListener('dragenter', +function (event) + {event.preventDefault();} +,false); +a.addEventListener('dragover', +function (event) + {event.preventDefault();} +,false); +a.addEventListener('drop', +function (event) + {document.querySelector('textArea').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL';} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/061.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/061.svg new file mode 100644 index 0000000..20ed8a8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/061.svg
@@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>SVG link drag and drop roundtrip</title> +<a xlink:href="data:text/plain,1"> + <circle cx="50" cy="50" r="40" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="30">Drag circle outside browser window and then drag it back and drop on itself. You should see word PASS once you drop it.</textArea> +<script type="application/ecmascript"> +var a = document.querySelector('a'); +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy';} +,false); +a.addEventListener('dragenter', +function (event) + {event.preventDefault();} +,false); +a.addEventListener('dragover', +function (event) + {event.preventDefault();} +,false); +a.addEventListener('drop', +function (event) + {document.querySelector('textArea').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL';} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/062.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/062.svg new file mode 100644 index 0000000..2cbf96e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/062.svg
@@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Setting drag image during drag and drop of SVG link</title> +<a xlink:href="data:text/plain,1"> + <circle cx="60" cy="60" r="50" fill="gray"/> +</a> +<textArea x="10" y="200" width="480" height="200" font-size="30">Try to drag circle. Drag feedback should look like green rectangle.</textArea> +<rect x="300" y="10" width="100" height="100" fill="green"/> +<script type="application/ecmascript"> +var a = document.querySelector('a'), rect = document.querySelector('rect'); +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'; + event.dataTransfer.setDragImage(document.querySelector('rect'), 50, 50);} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/063.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/063.svg new file mode 100644 index 0000000..3f570b6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/063.svg
@@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Adding element to datastore while dragging SVG links</title> +<a xlink:href="data:text/plain,1"> + <rect x="10" y="10" width="100" height="100" fill="green"/> +</a> +<a xlink:href="data:text/plain,2"> + <rect x="300" y="10" width="100" height="100" fill="teal"/> +</a> +<textArea x="10" y="200" width="480" height="200" font-size="30">Try to drag one of boxes above. Drag feedback should include both boxes.</textArea> +<script type="application/ecmascript"> +var a = document.querySelectorAll('a'); +a[0].addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'; + event.dataTransfer.addElement(document.querySelectorAll('rect')[1]);} +,false); +a[1].addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'; + event.dataTransfer.addElement(document.querySelectorAll('rect')[0]);} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/064.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/064.svg new file mode 100644 index 0000000..5369de9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/064.svg
@@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of overlapping SVG links</title> +<a xlink:href="data:text/plain,1"> + <rect x="10" y="10" width="100" height="100" fill="silver"/> +</a> +<a xlink:href="data:text/plain,2"> + <rect x="10" y="10" width="100" height="100" fill="gray"/> +</a> + <rect x="160" y="10" width="100" height="100" fill="green"/> + <rect x="310" y="10" width="100" height="100" fill="maroon"/> +<textArea x="10" y="200" width="480" height="200" font-size="30">Try to drag gray boxe above. Drag feedback should be green, not red.</textArea> +<script type="application/ecmascript"> +var a = document.querySelectorAll('a'); +a[0].addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'; + event.dataTransfer.setDragImage(document.querySelectorAll('rect')[3], 50, 50);} +,false); +a[1].addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'; + event.dataTransfer.setDragImage(document.querySelectorAll('rect')[2], 50, 50);} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/065.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/065.svg new file mode 100644 index 0000000..89e158f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/065.svg
@@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Reload during SVG link drag and drop roundtrip</title> +<a xlink:href="data:text/plain,1"> + <circle cx="50" cy="50" r="40" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="30">Drag circle around page and then drag it back and drop on itself. You should see word PASS once you drop it.</textArea> +<script type="application/ecmascript"> +var a = document.querySelector('a'); +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'; + window.location.reload()} +,false); +a.addEventListener('dragenter', +function (event) + {event.preventDefault();} +,false); +a.addEventListener('dragover', +function (event) + {event.preventDefault();} +,false); +a.addEventListener('drop', +function (event) + {document.querySelector('textArea').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL';} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/066.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/066.svg new file mode 100644 index 0000000..f5066ac --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/066.svg
@@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Removing dragged element during drag and drop of SVG link</title> +<a xlink:href="data:text/plain,1"> + <circle cx="50" cy="50" r="50" fill="green"/> +</a> +<textArea x="10" y="100" width="480" height="200" font-size="30">Drag green circle above and drop it in the gray box below. Gray box should turn green once you drop it.</textArea> +<rect x="10" y="300" width="480" height="190" fill="gray"/> +<script type="application/ecmascript"> +var a = document.querySelector('a'), rect = document.querySelector('rect'); +a.addEventListener('dragstart', +function (event) + {event.dataTransfer.effectAllowed = 'copy'; + document.documentElement.removeChild(a);} +,false); +rect.addEventListener('dragenter', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('dragover', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('drop', +function (event) + {if(event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1') + {rect.setAttribute('fill','green');} + } +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/067.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/067.svg new file mode 100644 index 0000000..9156a0f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/067.svg
@@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="500px" height="500px" viewBox="0 0 500 500"> +<title>Drag and drop of SVG links</title> +<a xlink:href="data:text/plain,olive"> + <circle cx="50" cy="50" r="50" fill="olive"/> +</a> +<a xlink:href="data:text/plain,green"> + <circle cx="200" cy="50" r="50" fill="green"/> +</a> +<a xlink:href="data:text/plain,teal"> + <circle cx="350" cy="50" r="50" fill="teal"/> +</a> +<textArea x="10" y="120" width="480" height="200" font-size="30">Drag one of green circles above and drop it in the gray box below. Gray box should turn green.</textArea> +<rect x="10" y="300" width="480" height="190" fill="gray"/> +<script type="application/ecmascript"> +var a = document.querySelectorAll('a'), rect = document.querySelector('rect'); +for(var i = 0; i != a.length; i++) + {a[i].addEventListener('dragstart', + function (event) + {event.dataTransfer.effectAllowed = 'copy';} + ,false);} +rect.addEventListener('dragenter', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('dragover', +function (event) + {event.preventDefault()} +,false); +rect.addEventListener('drop', +function (event) + {rect.setAttribute('fill',event.dataTransfer.getData('text/uri-list').substr(16).replace(/\r\n$/,''));} +,false); +</script> +</svg>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/helper-drop-selection-here-textArea.svg b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/helper-drop-selection-here-textArea.svg new file mode 100644 index 0000000..783c164 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/svg/helper-drop-selection-here-textArea.svg
@@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="500px" height="300px" viewBox="0 0 500 300"> +<textArea x="10" y="10" width="480" height="280" font-size="20" editable="simple" pointer-events="boundingBox">Drop selection here</textArea> +<rect x="10" y="10" width="480" height="280" stroke="black" stroke-width="1" fill="none"/> +</svg> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/synthetic/005-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/synthetic/005-manual.html new file mode 100644 index 0000000..4e0b00d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/synthetic/005-manual.html
@@ -0,0 +1,340 @@ +<!doctype html> +<html> + <head> + <title>Synthetic events with real data store must inherit protection status from real events</title> + <style type="text/css"> +blockquote { height: 100px; width: 100px; background: orange; margin: 0; padding: 0; float: left; } +blockquote + blockquote { background: blue; } +blockquote + blockquote + blockquote { background: fuchsia; } +blockquote + div { clear: left; } + </style> + <script type="text/javascript" src="/resources/testharness.js"></script> + <script type="text/javascript" src="/resources/testharnessreport.js"></script> + <script type="text/javascript"> +setup(function () {},{explicit_done:true,explicit_timeout:true}); +window.onload = function () { + + var orange = document.getElementsByTagName('blockquote')[0], + blue = document.getElementsByTagName('blockquote')[1], + fuchsia = document.getElementsByTagName('blockquote')[2], + evtdone = {}; + + orange.ondragstart = function (e) { + evtdone[e.type] = true; + e.dataTransfer.effectAllowed = 'copy'; + + var t = async_test(e.type+' should share its data with the synthetic event'); + blue.ondragstart = function (e) { + t.step(function() { + assert_equals( e.dataTransfer.getData('text'), 'dragstart real data', 'step 1' ); + e.dataTransfer.setData('text','dragstart-dragstart synthetic data'); + assert_equals( e.dataTransfer.getData('text'), 'dragstart-dragstart synthetic data', 'step 2' ); + }); + }; + t.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:e.dataTransfer}); + e.dataTransfer.setData('text','dragstart real data'); //changing in between steps, just to make sure it uses the underlying data store, not a temporary clone + blue.dispatchEvent(evt); + }); + t.done(); + + test(function() { + assert_equals( e.dataTransfer.getData('text'), 'dragstart-dragstart synthetic data' ); + }, e.type+' should see the data from the synthetic event' ); + + var t2 = async_test(e.type+' should share its protection status with the synthetic event'); + blue.ondrag = function (e) { + t2.step(function() { + e.dataTransfer.setData('text','dragstart-drag synthetic data'); + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag synthetic data' ); + }); + }; + t2.step(function() { + var evt = new DragEvent('drag', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t2.done(); + + var t3 = async_test(e.type+' should share its protection status with the nested synthetic event'); + blue.ondrag = function (e) { + blue.ondragend = function (e) { + t3.step(function() { + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag synthetic data', 'step1' ); + e.dataTransfer.setData('text','dragstart-drag-dragend synthetic data'); + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag-dragend synthetic data', 'step2' ); + }); + }; + t3.step(function() { + var evt = new DragEvent('dragend', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + }; + t3.step(function() { + var evt = new DragEvent('drag', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t3.done(); + + test(function() { + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag-dragend synthetic data' ); + }, e.type+' should see the data from the nested synthetic event' ); + }; + + blue.ondragenter = blue.ondragover = function (e) { + e.preventDefault(); + }; + orange.ondrag = blue.ondragleave = function (e) { + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + var evtype = e.type; + + var t = async_test(e.type+' should share its data with the synthetic event'); + blue.ondragstart = function (e) { + t.step(function() { + assert_true( e.dataTransfer.items.length > 0, 'items.length' ); + }); + }; + t.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t.done(); + + var t2 = async_test(e.type+' should share its protection status with the synthetic event'); + blue.ondragstart = function (e) { + t2.step(function() { + assert_equals( e.dataTransfer.getData('text'), '', 'step 1' ); + e.dataTransfer.setData('text',evtype+'-dragstart synthetic data'); + assert_equals( e.dataTransfer.getData('text'), '', 'step 2' ); + }); + }; + t2.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t2.done(); + + test(function() { + assert_equals( e.dataTransfer.getData('text'), '' ); + }, e.type+' protection status should not be modified by the synthetic event' ); + + var t3 = async_test(e.type+' should share its protection status with the nested synthetic event'); + blue.ondragstart = function (e) { + var div = document.createElement('div'); + div.ondragstart = function (e) { + t3.step(function() { + assert_equals( e.dataTransfer.getData('text'), '', 'step1' ); + e.dataTransfer.setData('text',evtype+'dragstart-dragstart synthetic data'); + assert_equals( e.dataTransfer.getData('text'), '', 'step2' ); + }); + }; + t3.step(function() { + var evt = new DragEvent('dragend', {dataTransfer:e.dataTransfer}); + div.dispatchEvent(evt); + }); + }; + t3.step(function() { + var evt = new DragEvent('drag', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t3.done(); + }; + + fuchsia.ondragenter = fuchsia.ondragover = function (e) { + e.preventDefault(); + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + var evtype = e.type; + + var t = async_test(e.type+' should share its data with the synthetic event'); + blue.ondragstart = function (e) { + t.step(function() { + assert_true( e.dataTransfer.items.length > 0, 'items.length' ); + }); + }; + t.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t.done(); + + var t2 = async_test(e.type+' should share its protection status with the synthetic event'); + blue.ondragstart = function (e) { + t2.step(function() { + assert_equals( e.dataTransfer.getData('text'), '', 'step 1' ); + e.dataTransfer.setData('text',evtype+'-dragstart synthetic data'); + assert_equals( e.dataTransfer.getData('text'), '', 'step 2' ); + }); + }; + t2.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t2.done(); + + test(function() { + assert_equals( e.dataTransfer.getData('text'), '' ); + }, e.type+' protection status should not be modified by the synthetic event' ); + + var t3 = async_test(e.type+' should share its protection status with the nested synthetic event'); + blue.ondragstart = function (e) { + var div = document.createElement('div'); + div.ondragstart = function (e) { + t3.step(function() { + assert_equals( e.dataTransfer.getData('text'), '', 'step1' ); + e.dataTransfer.setData('text',evtype+'dragstart-dragstart synthetic data'); + assert_equals( e.dataTransfer.getData('text'), '', 'step2' ); + }); + }; + t3.step(function() { + var evt = new DragEvent('dragend', {dataTransfer:e.dataTransfer}); + div.dispatchEvent(evt); + }); + }; + t3.step(function() { + var evt = new DragEvent('drag', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t3.done(); + }; + + fuchsia.ondrop = function (e) { + e.preventDefault(); + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + var evtype = e.type; + + var t = async_test(e.type+' should share its data with the synthetic event'); + blue.ondragstart = function (e) { + t.step(function() { + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag-dragend synthetic data' ); + }); + }; + t.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t.done(); + + var t2 = async_test(e.type+' should share its protection status with the synthetic event'); + blue.ondragstart = function (e) { + t2.step(function() { + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag-dragend synthetic data', 'step 1' ); + e.dataTransfer.setData('text',evtype+'-dragstart synthetic data'); + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag-dragend synthetic data', 'step 2' ); + }); + }; + t2.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t2.done(); + + test(function() { + e.dataTransfer.setData('text','drop synthetic data'); + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag-dragend synthetic data' ); + }, e.type+' protection status should not be modified by the synthetic event' ); + + var t3 = async_test(e.type+' should share its protection status with the nested synthetic event'); + blue.ondragstart = function (e) { + var div = document.createElement('div'); + div.ondragstart = function (e) { + t3.step(function() { + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag-dragend synthetic data', 'step 1' ); + e.dataTransfer.setData('text',evtype+'dragstart-dragstart synthetic data'); + assert_equals( e.dataTransfer.getData('text'), 'dragstart-drag-dragend synthetic data', 'step 2' ); + }); + }; + t3.step(function() { + var evt = new DragEvent('dragend', {dataTransfer:e.dataTransfer}); + div.dispatchEvent(evt); + }); + }; + t3.step(function() { + var evt = new DragEvent('drag', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t3.done(); + }; + + orange.ondragend = function (e) { + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + var evtype = e.type; + + var t = async_test(e.type+' should share its data with the synthetic event'); + blue.ondragstart = function (e) { + t.step(function() { + assert_true( e.dataTransfer.items.length > 0, 'items.length' ); + }); + }; + t.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t.done(); + + var t2 = async_test(e.type+' should share its protection status with the synthetic event'); + blue.ondragstart = function (e) { + t2.step(function() { + assert_equals( e.dataTransfer.getData('text'), '', 'step 1' ); + e.dataTransfer.setData('text',evtype+'-dragstart synthetic data'); + assert_equals( e.dataTransfer.getData('text'), '', 'step 2' ); + }); + }; + t2.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t2.done(); + + test(function() { + assert_equals( e.dataTransfer.getData('text'), '' ); + }, e.type+' protection status should not be modified by the synthetic event' ); + + var t3 = async_test(e.type+' should share its protection status with the nested synthetic event'); + blue.ondragstart = function (e) { + var div = document.createElement('div'); + div.ondragstart = function (e) { + t3.step(function() { + assert_equals( e.dataTransfer.getData('text'), '', 'step1' ); + e.dataTransfer.setData('text',evtype+'dragstart-dragstart synthetic data'); + assert_equals( e.dataTransfer.getData('text'), '', 'step2' ); + }); + }; + t3.step(function() { + var evt = new DragEvent('dragend', {dataTransfer:e.dataTransfer}); + div.dispatchEvent(evt); + }); + }; + t3.step(function() { + var evt = new DragEvent('drag', {dataTransfer:e.dataTransfer}); + blue.dispatchEvent(evt); + }); + t3.done(); + + test(function() { + var failtxt = '- Reload and try again'; + assert_true( evtdone.dragstart, 'dragstart event was not tested'+failtxt ); + assert_true( evtdone.drag, 'drag event was not tested'+failtxt ); + assert_true( evtdone.dragenter, 'dragenter event was not tested'+failtxt ); + assert_true( evtdone.dragleave, 'dragleave event was not tested'+failtxt ); + assert_true( evtdone.dragover, 'dragover event was not tested'+failtxt ); + assert_true( evtdone.drop, 'drop event was not tested'+failtxt ); + assert_true( evtdone.dragend, 'dragend event was not tested'+failtxt ); + }, 'all event types must now have been tested' ); + done(); + }; + +}; + </script> + </head> + <body> + <p>Drag the orange square over the blue square then the fuchsia square, then release it.</p> + <blockquote draggable="true"></blockquote> + <blockquote></blockquote> + <blockquote></blockquote> + <div id="log"></div> + <noscript><p>Enable JavaScript and reload</p></noscript> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/synthetic/006-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/synthetic/006-manual.html new file mode 100644 index 0000000..e7d1677 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/synthetic/006-manual.html
@@ -0,0 +1,79 @@ +<!doctype html> +<html> + <head> + <title>Synthetic events using real dataTransfer in new thread</title> + <style type="text/css"> +blockquote { height: 100px; width: 100px; background: orange; margin: 0; padding: 0; float: left; } +blockquote + blockquote { background: blue; } +blockquote + blockquote + blockquote { background: fuchsia; } +blockquote + div { clear: left; } + </style> + <script type="text/javascript" src="/resources/testharness.js"></script> + <script type="text/javascript" src="/resources/testharnessreport.js"></script> + <script type="text/javascript"> +setup(function () {},{explicit_done:true,explicit_timeout:true}); +window.onload = function () { + + var orange = document.getElementsByTagName('blockquote')[0], + blue = document.getElementsByTagName('blockquote')[1], + fuchsia = document.getElementsByTagName('blockquote')[2], + evtdone = {}; + + orange.ondragstart = function (e) { + e.dataTransfer.effectAllowed = 'copy'; + e.dataTransfer.setData('text','dragstart real data'); + var dataTransfer = e.dataTransfer; + setTimeout(function () { + var t = async_test('new thread should see data store in protected mode after dragstart'); + blue.ondragstart = function (e) { + t.step(function() { + assert_equals( e.dataTransfer.getData('text'), '', 'step 1' ); + e.dataTransfer.setData('text','new thread after dragstart'); + assert_equals( e.dataTransfer.getData('text'), '', 'step 2' ); + }); + }; + t.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:dataTransfer}); + blue.dispatchEvent(evt); + }); + t.done(); + },0); + }; + + fuchsia.ondragenter = fuchsia.ondragover = function (e) { + e.preventDefault(); + }; + + fuchsia.ondrop = function (e) { + e.preventDefault(); + var dataTransfer = e.dataTransfer; + setTimeout(function () { + var t = async_test('new thread should see data store in protected mode after drop'); + blue.ondragstart = function (e) { + t.step(function() { + assert_equals( e.dataTransfer.getData('text'), '', 'step 1' ); + e.dataTransfer.setData('text','new thread after dragstart'); + assert_equals( e.dataTransfer.getData('text'), '', 'step 2' ); + }); + }; + t.step(function() { + var evt = new DragEvent('dragstart', {dataTransfer:dataTransfer}); + blue.dispatchEvent(evt); + }); + t.done(); + done(); + },0); + }; + +}; + </script> + </head> + <body> + <p>Drag the orange square over the blue square then the fuchsia square, then release it.</p> + <blockquote draggable="true"></blockquote> + <blockquote></blockquote> + <blockquote></blockquote> + <div id="log"></div> + <noscript><p>Enable JavaScript and reload</p></noscript> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/target-origin/001-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/target-origin/001-manual.html new file mode 100644 index 0000000..ff8572e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/target-origin/001-manual.html
@@ -0,0 +1,111 @@ +<!doctype html> +<html> + <head> + <title>allowTargetOrigin syntax</title> + <style type="text/css"> +blockquote { height: 100px; width: 100px; background: orange; margin: 0; padding: 0; } + </style> + <script type="text/javascript" src="/resources/testharness.js"></script> + <script type="text/javascript" src="/resources/testharnessreport.js"></script> + <script type="text/javascript"> +setup(function () {},{explicit_done:true}); +window.onload = function () { + document.getElementsByTagName('blockquote')[0].ondragstart = function (e) { + test(function() { + assert_true( !!e.dataTransfer.allowTargetOrigin ); + }, 'allowTargetOrigin should be supported' ); + test(function() { + assert_throws_js( TypeError, function () { e.dataTransfer.allowTargetOrigin(); } ); + }, 'no parameter should throw TypeError' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin(''); } ); + }, 'empty string should be an invalid URL' ); + test(function() { + e.dataTransfer.allowTargetOrigin('*'); + }, '* should be a valid URL' ); + test(function() { + e.dataTransfer.allowTargetOrigin('/'); + }, '/ should be a valid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('/foo'); } ); + }, '/foo should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('foo'); } ); + }, 'foo should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('//foo'); } ); + }, '//foo should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('http://'); } ); + }, 'http:// should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('http://*'); } ); + }, 'http://* should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('http://foo*'); } ); + }, 'http://foo* should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('http://foo.*'); } ); + }, 'http://foo.* should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('http://*.foo'); } ); + }, 'http://*.foo should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('http://foo:bar'); } ); + }, 'http://foo:bar should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('http://foo:bar@'); } ); + }, 'http://foo:bar@ should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('file:'); } ); + }, 'file: should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('file://'); } ); + }, 'file:// should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('data:'); } ); + }, 'data: should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('data:text/html'); } ); + }, 'data:text/html should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('file://localhost/'); } ); + }, 'file://localhost/ should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('file:///'); } ); + }, 'file:/// should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('data:text/html,'); } ); + }, 'data:text/html, should be an invalid URL' ); + test(function() { + assert_throws_dom( 'SYNTAX_ERR', function () { e.dataTransfer.allowTargetOrigin('javascript:'); } ); + }, 'javascript: should be an invalid URL' ); + test(function() { + e.dataTransfer.allowTargetOrigin('http://foo'); + }, 'http://foo should be a valid URL' ); + test(function() { + e.dataTransfer.allowTargetOrigin('http://foo.bar'); + }, 'http://foo.bar should be a valid URL' ); + test(function() { + e.dataTransfer.allowTargetOrigin('http://foo/bar'); + }, 'http://foo/bar should be a valid URL' ); + test(function() { + e.dataTransfer.allowTargetOrigin('http://foo:123'); + }, 'http://foo:123 should be a valid URL' ); + test(function() { + e.dataTransfer.allowTargetOrigin('http://foo:bar@baz'); + }, 'http://foo:bar@baz should be a valid URL' ); + test(function() { + e.dataTransfer.allowTargetOrigin('http://foo:bar@baz:123/qux'); + }, 'http://foo:bar@baz:123/qux should be a valid URL' ); + done(); + }; +}; + </script> + </head> + <body> + <blockquote draggable="true"></blockquote> + <div id="log">Drag the orange square above until the drag placeholder appears, then release it.</div> + <noscript><p>Enable JavaScript and reload</p></noscript> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/target-origin/002-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/target-origin/002-manual.html new file mode 100644 index 0000000..d7e6c83a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/target-origin/002-manual.html
@@ -0,0 +1,87 @@ +<!doctype html> +<html> + <head> + <title>allowTargetOrigin events</title> + <style type="text/css"> +blockquote { height: 100px; width: 100px; background: orange; margin: 0; padding: 0; float: left; } +blockquote + blockquote { background: blue; } +blockquote + blockquote + blockquote { background: fuchsia; } +blockquote + div { clear: left; } + </style> + <script type="text/javascript" src="/resources/testharness.js"></script> + <script type="text/javascript" src="/resources/testharnessreport.js"></script> + <script type="text/javascript"> +setup(function () {},{explicit_done:true}); +window.onload = function () { + var orange = document.getElementsByTagName('blockquote')[0], + blue = document.getElementsByTagName('blockquote')[1], + fuchsia = document.getElementsByTagName('blockquote')[2], + evtdone = {}; + orange.ondragstart = function (e) { + e.dataTransfer.effectAllowed = 'copy'; + e.dataTransfer.setData('text','dummy text'); + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + test(function() { + assert_true( !!e.dataTransfer.allowTargetOrigin ); + }, 'allowTargetOrigin should exist in '+e.type ); + test(function() { + e.dataTransfer.allowTargetOrigin('*'); + }, 'allowTargetOrigin should work in '+e.type ); + }; + blue.ondragenter = blue.ondragover = function (e) { + e.preventDefault(); + }; + orange.ondrag = blue.ondragleave = function (e) { + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + test(function() { + assert_true( !!e.dataTransfer.allowTargetOrigin ); + }, 'allowTargetOrigin should exist in '+e.type ); + test(function() { + assert_throws_dom( 'SECURITY_ERR', function () { e.dataTransfer.allowTargetOrigin('*'); } ); + }, 'allowTargetOrigin should throw a SECURITY_ERR in '+e.type ); + }; + fuchsia.ondragenter = fuchsia.ondragover = fuchsia.ondrop = function (e) { + e.preventDefault(); + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + test(function() { + assert_true( !!e.dataTransfer.allowTargetOrigin ); + }, 'allowTargetOrigin should exist in '+e.type ); + test(function() { + assert_throws_dom( 'SECURITY_ERR', function () { e.dataTransfer.allowTargetOrigin('*'); } ); + }, 'allowTargetOrigin should throw a SECURITY_ERR in '+e.type ); + }; + orange.ondragend = function (e) { + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + test(function() { + assert_true( !!e.dataTransfer.allowTargetOrigin ); + }, 'allowTargetOrigin should exist in '+e.type ); + test(function() { + assert_throws_dom( 'SECURITY_ERR', function () { e.dataTransfer.allowTargetOrigin('*'); } ); + }, 'allowTargetOrigin should throw a SECURITY_ERR in '+e.type ); + test(function() { + var failtxt = '- Reload and try again'; + assert_true( evtdone.dragstart, 'dragstart event was not tested'+failtxt ); + assert_true( evtdone.drag, 'drag event was not tested'+failtxt ); + assert_true( evtdone.dragenter, 'dragenter event was not tested'+failtxt ); + assert_true( evtdone.dragleave, 'dragleave event was not tested'+failtxt ); + assert_true( evtdone.dragover, 'dragover event was not tested'+failtxt ); + assert_true( evtdone.drop, 'drop event was not tested'+failtxt ); + assert_true( evtdone.dragend, 'dragend event was not tested'+failtxt ); + }, 'all event types must now have been tested' ); + done(); + }; +}; + </script> + </head> + <body> + <blockquote draggable="true"></blockquote> + <blockquote></blockquote> + <blockquote></blockquote> + <div id="log">Drag the orange square over the blue square then the fuchsia square, then release it.</div> + <noscript><p>Enable JavaScript and reload</p></noscript> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/target-origin/101-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/target-origin/101-manual.html new file mode 100644 index 0000000..23f5cf9b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/target-origin/101-manual.html
@@ -0,0 +1,124 @@ +<!doctype html> +<html> + <head> + <title>.origin for all events</title> + <style type="text/css"> +blockquote { height: 100px; width: 100px; background: orange; margin: 0; padding: 0; float: left; } +blockquote + blockquote { background: blue; } +blockquote + blockquote + blockquote { background: fuchsia; } +blockquote + div { clear: left; } + </style> + <script type="text/javascript" src="../resources/crossorigin.sub.js"></script> + <script type="text/javascript" src="/resources/testharness.js"></script> + <script type="text/javascript" src="/resources/testharnessreport.js"></script> + <script type="text/javascript"> +setup(function () {},{explicit_done:true}); +window.onload = function () { + var origin = 'http://'+httpHostMain; + if( location.href.indexOf(origin+'/') ) { + done(); + document.body.innerHTML = 'This must be tested on '+origin+'/'; + return; + } + var orange = document.getElementsByTagName('blockquote')[0], + blue = document.getElementsByTagName('blockquote')[1], + fuchsia = document.getElementsByTagName('blockquote')[2], + evtdone = {}; + orange.ondragstart = function (e) { + e.dataTransfer.effectAllowed = 'copy'; + e.dataTransfer.setData('text','dummy text'); + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + test(function() { + assert_equals( e.dataTransfer.origin, origin ); + }, '.origin should exist in '+e.type ); + test(function () { + //WebIDL and ECMAScript 5 - a readonly property has a getter but not a setter + //ES5 makes [[Put]] fail but not throw + var failed = false, oldorigin = e.dataTransfer.origin; + try { + e.dataTransfer.origin = 'http://example.com'; + } catch(e) { + failed = e; + } + assert_equals(e.dataTransfer.origin,oldorigin); + assert_false(failed,'an error was thrown'); + }, '.origin must be read-only in '+e.type); + }; + blue.ondragenter = blue.ondragover = function (e) { + e.preventDefault(); + }; + orange.ondrag = blue.ondragleave = function (e) { + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + test(function() { + assert_equals( e.dataTransfer.origin, origin ); + }, '.origin should exist in '+e.type ); + test(function () { + var failed = false, oldorigin = e.dataTransfer.origin; + try { + e.dataTransfer.origin = 'http://example.com'; + } catch(e) { + failed = e; + } + assert_equals(e.dataTransfer.origin,oldorigin); + assert_false(failed,'an error was thrown'); + }, '.origin must be read-only in '+e.type); + }; + fuchsia.ondragenter = fuchsia.ondragover = fuchsia.ondrop = function (e) { + e.preventDefault(); + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + test(function() { + assert_equals( e.dataTransfer.origin, origin ); + }, '.origin should exist in '+e.type ); + test(function () { + var failed = false, oldorigin = e.dataTransfer.origin; + try { + e.dataTransfer.origin = 'http://example.com'; + } catch(e) { + failed = e; + } + assert_equals(e.dataTransfer.origin,oldorigin); + assert_false(failed,'an error was thrown'); + }, '.origin must be read-only in '+e.type); + }; + orange.ondragend = function (e) { + if( evtdone[e.type] ) { return; } + evtdone[e.type] = true; + test(function() { + assert_equals( e.dataTransfer.origin, origin ); + }, '.origin should exist in '+e.type ); + test(function () { + var failed = false, oldorigin = e.dataTransfer.origin; + try { + e.dataTransfer.origin = 'http://example.com'; + } catch(e) { + failed = e; + } + assert_equals(e.dataTransfer.origin,oldorigin); + assert_false(failed,'an error was thrown'); + }, '.origin must be read-only in '+e.type); + test(function() { + var failtxt = '- Reload and try again'; + assert_true( evtdone.dragstart, 'dragstart event was not tested'+failtxt ); + assert_true( evtdone.drag, 'drag event was not tested'+failtxt ); + assert_true( evtdone.dragenter, 'dragenter event was not tested'+failtxt ); + assert_true( evtdone.dragleave, 'dragleave event was not tested'+failtxt ); + assert_true( evtdone.dragover, 'dragover event was not tested'+failtxt ); + assert_true( evtdone.drop, 'drop event was not tested'+failtxt ); + assert_true( evtdone.dragend, 'dragend event was not tested'+failtxt ); + }, 'all event types must now have been tested' ); + done(); + }; +}; + </script> + </head> + <body> + <blockquote draggable="true"></blockquote> + <blockquote></blockquote> + <blockquote></blockquote> + <div id="log">Drag the orange square over the blue square then the fuchsia square, then release it.</div> + <noscript><p>Enable JavaScript and reload</p></noscript> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-datatransfer-interface/dndTransferCases-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-datatransfer-interface/dndTransferCases-manual.html new file mode 100644 index 0000000..6081b5d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-datatransfer-interface/dndTransferCases-manual.html
@@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_data_item_kind_string</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='author' title='Domenic Denicola' href='mailto:d@domenic.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-datatransfer-interface'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #drag { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='drag' draggable>blue text</div> + <div id='drop' dropzone='copy string:text/plain'></div> + <div id='log'> </div> + + <script> + var drag; + setup(function() { + drag = document.querySelector('#drag'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drag, 'dragstart', function(event) { + test(function() { + assert_equals(event.dataTransfer.effectAllowed, 'uninitialized'); + }, 'effectAllowed should be "uninitialized"'); + + test(function() { + assert_equals(event.dataTransfer.types.constructor, Array, 'should be an array'); + assert_true(Object.isFrozen(event.dataTransfer.types), 'should be frozen'); + }, 'types should be a frozen array'); + + test(function() { + assert_false('contains' in event.dataTransfer.types); + assert_false('item' in event.dataTransfer.types); + }, 'types should not have any of the historical methods'); + + test(function() { + assert_equals(event.dataTransfer.types, event.dataTransfer.types); + }, 'types should return the same object from multiple reads (assuming no changes)'); + + test(function() { + var before = event.dataTransfer.types; + event.dataTransfer.clearData(); + assert_not_equals(event.dataTransfer.types, before); + }, 'types should return a different object after changes'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dragevent-interface/dragevent-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dragevent-interface/dragevent-manual.html new file mode 100644 index 0000000..e4d754e4 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dragevent-interface/dragevent-manual.html
@@ -0,0 +1,95 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: DragEvent</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#dndevents'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #drag { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='drag' draggable>blue text</div> + <div id='drop' dropzone='copy string:text/plain'></div> + <div id='log'> </div> + + <script> + var drag, element; + var Events = ['ondragstart', 'ondrag', 'ondragover', 'ondragenter', 'ondragleave', 'ondrop', 'ondragend']; + + setup(function() { + drag = document.querySelector('#drag'); + element = document.createElement('div'); + }, {explicit_done: true, explicit_timeout: true}); + + for(var i=0; i< Events.length; i++) { + test(function() { + assert_true(Events[i] in document, 'Check ' + Events[i] + ' in document'); + }, 'Check ' + Events[i] + ' in document'); + } + + test(function() { + assert_inherits(element, 'ondragstart', 'Check if have ondragstart attribute'); + }, 'Check if have ondragstart attribute'); + + test(function() { + assert_inherits(element, 'ondrag', 'Check if have ondrag attribute'); + }, 'Check if have ondrag attribute'); + + test(function() { + assert_inherits(element, 'ondragenter', 'Check if have ondragenter attribute'); + }, 'Check if have ondragenter attribute'); + + test(function() { + assert_inherits(element, 'ondragleave', 'Check if have dragleave attribute'); + }, 'Check if have dragleave attribute'); + + test(function() { + assert_inherits(element, 'ondragover', 'Check if have dragover attribute'); + }, 'Check if have dragover attribute'); + + test(function() { + assert_inherits(element, 'ondrop', 'Check if have ondrop attribute'); + }, 'Check if have ondrop attribute'); + + test(function() { + assert_inherits(element, 'ondragend', 'Check if have ondragend attribute'); + }, 'Check if have ondragend attribute'); + + on_event(drag, 'dragstart', function(event) { + test(function() { + assert_equals(event.type, 'dragstart', 'Check if the dragstart event captured'); + }, 'Check if the dragstart event captured'); + }); + + on_event(drag, 'dragenter', function(event) { + test(function() { + assert_equals(event.type, 'dragenter', 'Check if the dragenter event captured'); + }, 'Check if the dragenter event captured'); + }); + + on_event(drag, 'dragend', function(event) { + test(function() { + assert_equals(event.type, 'dragend', 'Check if the dragend event captured'); + }, 'Check if the dragend event captured'); + done(); + }); + + + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_file_type-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_file_type-manual.html new file mode 100644 index 0000000..9027559d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_file_type-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_data_item_file_type</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 160px; + height: 160px; + padding: 20px; + color: white; + } + img { + margin: 20px auto; + } + </style> + </head> + + <body> + <img src='/images/blue.png' alt='blue image' /> + <div>Save the blue image (image/png) above to your desktop, drag the image from desktop to the blue text to rectangular box in browser.</div> + <div id='drop' dropzone='copy file:image/png'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + var item = event.dataTransfer.items[0]; + test(function() { + assert_equals(item.type, 'image/png', 'data item type is "image/png"'); + }, 'data item type is "image/png"'); + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_file-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_file-manual.html new file mode 100644 index 0000000..7a77c12 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_file-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_data_item_kind_file</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 160px; + height: 160px; + padding: 20px; + color: white; + } + img { + margin: 20px auto; + } + </style> + </head> + + <body> + <img src='/images/blue.png' alt='blue image' /> + <div>Save the blue image (image/png) above to your desktop, drag the image from desktop to the blue text to rectangular box in browser.</div> + <div id='drop' dropzone='copy file:image/png'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + var item = event.dataTransfer.items[0]; + test(function() { + assert_equals(item.kind, 'file', 'data item kind is file'); + }, 'data item kind is file'); + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_string-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_string-manual.html new file mode 100644 index 0000000..b8a22e6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_kind_string-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_data_item_kind_string</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='copy string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + var item = event.dataTransfer.items[0]; + test(function() { + assert_equals(item.kind, 'string', 'data item kind is string'); + }, 'data item kind is string'); + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_string_type-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_string_type-manual.html new file mode 100644 index 0000000..7a5dccf --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_data_item_string_type-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_data_item_string_type</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='copy string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + var item = event.dataTransfer.items[0]; + test(function() { + assert_equals(item.type, 'text/plain', 'data item type is "text/plain"'); + }, 'data item type is "text/plain"'); + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element-manual.html new file mode 100644 index 0000000..f80604a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element-manual.html
@@ -0,0 +1,51 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_inputbox_element</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + input { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select all the inputbox text then drag to rectangular box.</div> + <input draggable='true' type='text' value='hello world'></input> + <div id='drop' dropzone='move string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'move', 'dropzone content attribute value is "move"'); + }, 'dropzone content attribute value is "move"'); + + test(function() { + var item = event.dataTransfer.items[0]; + assert_equals(event.dataTransfer.getData(item.type), 'hello world', 'The dropped string value is the inputbox text you selected.'); + }, 'The dropped string value is the inputbox text you selected.'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element_dbcs-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element_dbcs-manual.html new file mode 100644 index 0000000..a7f8ad1a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_inputbox_element_dbcs-manual.html
@@ -0,0 +1,46 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_inputbox_element_dbcs</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + input { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select all the inputbox DBCS (Double Byte Character Set) text then drag to rectangular box.</div> + <input draggable='true' type='text' value='您好,互联网。'></input> + <div id='drop' dropzone='move string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + var item = item = event.dataTransfer.items[0]; + assert_equals(event.dataTransfer.getData(item.type), '您好,互联网。', 'The dropped string value is the inputbox text you selected.'); + }, 'The dropped string value is the inputbox text you selected.'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_link_element-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_link_element-manual.html new file mode 100644 index 0000000..c6e5756 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_link_element-manual.html
@@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_element_link</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + div { margin: 20px 0px;} + </style> + </head> + + <body> + <div>Select and drag the all the text of link below to rectangular box.</div> + <a href="http://w3.org" title="World Wide Web Consortium">w3.org</a> + <div id='drop' dropzone='link string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is "link"'); + }, 'dropzone content attribute value is "link"'); + + test(function() { + var item = item = event.dataTransfer.items[0]; + assert_equals(event.dataTransfer.getData(item.type), 'w3.org', 'The dropped link value is "w3.org"'); + }, 'The dropped link value is "w3.org"'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_COpy-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_COpy-manual.html new file mode 100644 index 0000000..17ec7a36 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_COpy-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_case_insensitive_COpy</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='COpy string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is case insensitive_COpy'); + }, 'dropzone content attribute value is case insensitive_COpy'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_STRING-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_STRING-manual.html new file mode 100644 index 0000000..f118ba00 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_STRING-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_case_insensitive_STRING</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='copy STRING:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is case insensitive_STRING'); + }, 'dropzone content attribute value is case insensitive_STRING'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_String_-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_String_-manual.html new file mode 100644 index 0000000..9b848038 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_String_-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_case_insensitive_String</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='link String:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is case insensitive_String'); + }, 'dropzone content attribute value is case insensitive_String'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_linK-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_linK-manual.html new file mode 100644 index 0000000..e4364db --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_case_insensitive_linK-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_case_insensitive_linK</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='liNK string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is case insensitive_linK'); + }, 'dropzone content attribute value is case insensitive_linK'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_copy-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_copy-manual.html new file mode 100644 index 0000000..dcc7c97 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_copy-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_copy</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='copy string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is "copy"'); + }, 'dropzone content attribute value is "copy"'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_foo-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_foo-manual.html new file mode 100644 index 0000000..f9606f1b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_foo-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_foo</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='foo string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is "copy" if it\'s not one of three feedback values (copy, move, and link) specified'); + }, 'dropzone content attribute value is "copy" if it\'s not one of three feedback values (copy, move, and link) specified'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_link-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_link-manual.html new file mode 100644 index 0000000..a4ba8196 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_link-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_link</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='link string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is "link"'); + }, 'dropzone content attribute value is "link"'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_move-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_move-manual.html new file mode 100644 index 0000000..dfad88b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_move-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_move</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='move string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'move', 'dropzone content attribute value is "move"'); + }, 'dropzone content attribute value is "move"'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_bar_move-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_bar_move-manual.html new file mode 100644 index 0000000..3243774 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_bar_move-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_multiple_values_foo_bar_move</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='foo bar move string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'move', 'dropzone content attribute value is the first matched value of "foo bar move"'); + }, 'dropzone content attribute value is the first matched value of "foo bar move"'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_link-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_link-manual.html new file mode 100644 index 0000000..fd9e23d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_foo_link-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_multiple_values_foo_link</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='foo link string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'link', 'dropzone content attribute value is the first matched value of "foo link"'); + }, 'dropzone content attribute value is the first matched value of "foo link"'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_move_copy-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_move_copy-manual.html new file mode 100644 index 0000000..50ea9369 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_multiple_values_move_copy-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_multiple_values_move_copy</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='move copy string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'move', 'dropzone content attribute value is the first matched value of "move copy"'); + }, 'dropzone content attribute value is the first matched value of "move copy"'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_not_specified-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_not_specified-manual.html new file mode 100644 index 0000000..152c300 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_not_specified-manual.html
@@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_not_specified</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='string:text/plain'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'copy', 'dropzone content attribute value is "copy" if it\'s not specified'); + }, 'dropzone content attribute value is "copy" if it\'s not specified'); + + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_unordered_unique_space_separated-manual.html b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_unordered_unique_space_separated-manual.html new file mode 100644 index 0000000..24c5b03 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/editing/dnd/the-dropzone-attribute/dropzone_attribute_value_unordered_unique_space_separated-manual.html
@@ -0,0 +1,53 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset='utf-8'> + <title>HTML Test: dropzone_attribute_value_unordered_unique_space_separated</title> + <link rel='author' title='Intel' href='http://www.intel.com'> + <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'> + <script src='/resources/testharness.js'></script> + <script src='/resources/testharnessreport.js'></script> + <style> + #drop { + border: 2px solid black; + width: 100px; + height: 100px; + padding: 20px; + } + #select { + color: blue; + margin: 20px auto; + } + </style> + </head> + + <body> + <div>Select and drag the blue text to rectangular box.</div> + <div id='select' draggable>blue text</div> + <div id='drop' dropzone='string:text/plain copy'></div> + <div id='log'> </div> + + <script> + var drop; + setup(function() { + drop = document.querySelector('#drop'); + }, {explicit_done: true, explicit_timeout: true}); + + on_event(drop, 'drop', function(event) { + + test(function() { + assert_equals(event.dataTransfer.dropEffect, 'copy', 'unordered_unique_space_separated "string:text/plain copy", drop effect is copy'); + }, 'dropzone content attribute value is unordered_unique_space_separated "string:text/plain copy", drop effect is copy'); + test(function() { + item = event.dataTransfer.items[0]; + assert_equals(item.kind, 'string', 'unordered_unique_space_separated "string:text/plain copy", data item kind is string'); + }, 'dropzone content attribute value is unordered_unique_space_separated "string:text/plain copy", data item kind is string'); + test(function() { + item = event.dataTransfer.items[0]; + assert_equals(item.type, 'text/plain', 'dropzone content attribute value is unordered_unique_space_separated "string:text/plain copy", data item type is "text/plain"'); + }, 'dropzone content attribute value is unordered_unique_space_separated "string:text/plain copy", data item type is "text/plain"'); + done(); + }); + </script> + </body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color-expected.txt b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color-expected.txt new file mode 100644 index 0000000..2942a87 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color-expected.txt
@@ -0,0 +1,27 @@ +This is a testharness.js-based test. +[FAIL] Valid simple color: 4 characters long + assert_equals: expected "#ffffff" but got "#000000" +[FAIL] Valid color: leading space + assert_equals: expected "#ffffff" but got "#000000" +[FAIL] Valid color: trailing space + assert_equals: expected "#ffffff" but got "#000000" +[FAIL] Valid color: leading+trailing spaces + assert_equals: expected "#ffffff" but got "#000000" +[FAIL] Valid color: keyword crimson + assert_equals: expected "#dc143c" but got "#000000" +[FAIL] Valid color: keyword bisque + assert_equals: expected "#ffe4c4" but got "#000000" +[FAIL] Valid color: rgb(1,1,1) + assert_equals: expected "#010101" but got "#000000" +[FAIL] Valid color: rgb(1,1,1,1) + assert_equals: expected "#010101" but got "#000000" +[FAIL] Valid color: hsl(150deg 100 53.5) + assert_equals: expected "#12ff88" but got "#000000" +[FAIL] Valid color: color(display-p3 .5 0 0) + assert_equals: expected "#8c0000" but got "#000000" +[FAIL] Valid color: color(display-p3 1 0 0) + assert_equals: expected "#ff0000" but got "#000000" +[FAIL] System colors are parsed + assert_not_equals: got disallowed value "#000000" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.html b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.html new file mode 100644 index 0000000..7275215 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.html
@@ -0,0 +1,55 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>Form input type=color (HTML compatible)</title> +<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/states-of-the-type-attribute.html#color-state-(type=color)"> +<link rel="help" href="https://drafts.csswg.org/css-color/#parse-color"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<script> + var colors = [ + {value: "", expected: "#000000", testname: "Empty value should return #000000"}, + {expected: "#000000", testname: "Missing value should return #000000"}, + {value: "#ffffff", expected: "#ffffff", testname: "Valid simple color: should return #ffffff"}, + {value: "#FFFFFF", expected: "#ffffff", testname: "Valid simple color (containing LATIN CAPITAL LETTERS): should return #ffffff (converted to ASCII lowercase)"}, + {value: "#0F0F0F", expected: "#0f0f0f", testname: "Zero-padding"}, + {value: "#fff", expected: "#ffffff", testname: "Valid simple color: 4 characters long"}, + {value: "#fffffff", expected: "#000000", testname: "Invalid simple color: 8 characters long"}, + {value: "fffffff", expected: "#000000", testname: "Invalid simple color: no starting # sign"}, + {value: "#gggggg", expected: "#000000", testname: "Invalid simple color: non ASCII hex digits"}, + {value: "foobar", expected: "#000000", testname: "Invalid simple color: foobar"}, + {value: "#ffffff\u0000", expected: "#000000", testname: "Invalid color: trailing Null (U+0000)"}, + {value: "#ffffff;", expected: "#000000", testname: "Invalid color: trailing ;"}, + {value: " #ffffff", expected: "#ffffff", testname: "Valid color: leading space"}, + {value: "#ffffff ", expected: "#ffffff", testname: "Valid color: trailing space"}, + {value: " #ffffff ", expected: "#ffffff", testname: "Valid color: leading+trailing spaces"}, + {value: "crimson", expected: "#dc143c", testname: "Valid color: keyword crimson"}, + {value: "bisque", expected: "#ffe4c4", testname: "Valid color: keyword bisque"}, + {value: "currentColor", expected: "#000000", testname: "Valid color: currentColor"}, + {value: "transparent", expected: "#000000", testname: "Invalid color: keyword transparent"}, + {value: "inherit", expected: "#000000", testname: "Invalid color: keyword inherit"}, + {value: "rgb(1,1,1)", expected: "#010101", testname: "Valid color: rgb(1,1,1)"}, + {value: "rgb(1,1,1,1)", expected: "#010101", testname: "Valid color: rgb(1,1,1,1)"}, + {value: "#FFFFF\u1F4A9", expected: "#000000", testname: "Invalid color: PILE OF POO (U+1F4A9)"}, + {value: "hsl(150deg 100 53.5)", expected: "#12ff88", testname: "Valid color: hsl(150deg 100 53.5)"}, + {value: "color(display-p3 .5 0 0)", expected: "#8c0000", testname: "Valid color: color(display-p3 .5 0 0)"}, + {value: "color(display-p3 1 0 0)", expected: "#ff0000", testname: "Valid color: color(display-p3 1 0 0)"}, + ]; + for (var i = 0; i < colors.length; i++) { + var w = colors[i]; + test(function() { + var input = document.createElement("input"); + input.type = "color"; + input.value = w.value; + assert_equals(input.value, w.expected); + }, w.testname); + } + test(() => { + const input = document.createElement("input"); + input.type = "color"; + assert_equals(input.value, "#000000"); + input.value = "ActiveBorder"; + assert_not_equals(input.value, "#000000"); + }, "System colors are parsed"); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.tentative.html b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.tentative.html deleted file mode 100644 index 0bfb948..0000000 --- a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.tentative.html +++ /dev/null
@@ -1,46 +0,0 @@ -<!DOCTYPE html> -<!-- This test can be removed once all browsers support the alpha and colorspace attributes. --> -<meta charset=utf-8> -<title>Form input type=color</title> -<link rel="author" title="Denis Ah-Kang" href="mailto:denis@w3.org"> -<link rel=help href="https://html.spec.whatwg.org/multipage/multipage/common-microsyntaxes.html#colors"> -<link rel=help href="https://html.spec.whatwg.org/multipage/multipage/states-of-the-type-attribute.html#color-state-(type=color)"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<div id="log"></div> -<script> - var colors = [ - {value: "", expected: "#000000", testname: "Empty value should return #000000"}, - {expected: "#000000", testname: "Missing value should return #000000"}, - {value: "#ffffff", expected: "#ffffff", testname: "Valid simple color: should return #ffffff"}, - {value: "#FFFFFF", expected: "#ffffff", testname: "Valid simple color (containing LATIN CAPITAL LETTERS): should return #ffffff (converted to ASCII lowercase)"}, - {value: "#0F0F0F", expected: "#0f0f0f", testname: "Zero-padding"}, - {value: "#fff", expected: "#000000", testname: "Invalid simple color: not 7 characters long"}, - {value: "fffffff", expected: "#000000", testname: "Invalid simple color: no starting # sign"}, - {value: "#gggggg", expected: "#000000", testname: "Invalid simple color: non ASCII hex digits"}, - {value: "foobar", expected: "#000000", testname: "Invalid simple color: foobar"}, - {value: "#ffffff\u0000", expected: "#000000", testname: "Invalid color: trailing Null (U+0000)"}, - {value: "#ffffff;", expected: "#000000", testname: "Invalid color: trailing ;"}, - {value: " #ffffff", expected: "#000000", testname: "Invalid color: leading space"}, - {value: "#ffffff ", expected: "#000000", testname: "Invalid color: trailing space"}, - {value: " #ffffff ", expected: "#000000", testname: "Invalid color: leading+trailing spaces"}, - {value: "crimson", expected: "#000000", testname: "Invalid color: keyword crimson"}, - {value: "bisque", expected: "#000000", testname: "Invalid color: keyword bisque"}, - {value: "currentColor", expected: "#000000", testname: "Invalid color: keyword currentColor"}, - {value: "transparent", expected: "#000000", testname: "Invalid color: keyword transparent"}, - {value: "ActiveBorder", expected: "#000000", testname: "Invalid color: keyword ActiveBorder"}, - {value: "inherit", expected: "#000000", testname: "Invalid color: keyword inherit"}, - {value: "rgb(1,1,1)", expected: "#000000", testname: "Invalid color: rgb(1,1,1)"}, - {value: "rgb(1,1,1,1)", expected: "#000000", testname: "Invalid color: rgb(1,1,1,1)"}, - {value: "#FFFFF\u1F4A9", expected: "#000000", testname: "Invalid color: PILE OF POO (U+1F4A9)"} - ]; - for (var i = 0; i < colors.length; i++) { - var w = colors[i]; - test(function() { - var input = document.createElement("input"); - input.type = "color"; - input.value = w.value; - assert_equals(input.value, w.expected); - }, w.testname); - } -</script>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.window-expected.txt b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.window-expected.txt index ca5a73f..8a99d22ea 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.window-expected.txt +++ b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.window-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 180 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 179 FAIL, 0 TIMEOUT, 0 NOTRUN. [FAIL] Testing the empty string with color space 'limited-srgb' and without alpha (value) Colors do not match.\nActual: #000000\nExpected: color(srgb 0 0 0).\nError: assert_array_approx_equals: Numeric parameters are approximately equal. lengths differ, expected 3 got 0 [FAIL] Testing the empty string with color space 'limited-srgb' and with alpha (setAttribute("value")) @@ -356,8 +356,6 @@ Colors do not match.\nActual: #000000\nExpected: color(display-p3 0 0 0).\nError: assert_array_approx_equals: Numeric parameters are approximately equal. lengths differ, expected 3 got 0 [FAIL] Testing '#FFFFFὊ9' with color space 'display-p3' and with alpha (value) Colors do not match.\nActual: #000000\nExpected: color(srgb 0 0 0).\nError: assert_array_approx_equals: Numeric parameters are approximately equal. lengths differ, expected 3 got 0 -[FAIL] System colors are parsed - assert_not_equals: got disallowed value "#000000" [FAIL] Display P3 colors can be out-of-bounds assert_equals: expected "color(display-p3 3 0 0.2 / 0.6)" but got "#000000" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.window.js b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.window.js index 28ec9ec..37eb9b4 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.window.js +++ b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/color.window.js
@@ -239,14 +239,6 @@ test(() => { const input = document.createElement("input"); input.type = "color"; - assert_equals(input.value, "#000000"); - input.value = "ActiveBorder"; - assert_not_equals(input.value, "#000000"); -}, "System colors are parsed"); - -test(() => { - const input = document.createElement("input"); - input.type = "color"; input.alpha = true; input.colorSpace = "display-p3"; input.value = "color(display-p3 3 none .2 / .6)";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/history-back-same-doc.html b/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/history-back-same-doc.html index 885d558..9ef2d1c 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/history-back-same-doc.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/history-back-same-doc.html
@@ -1,14 +1,16 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#foo"); assert_equals(navigation.entries().length, start_length + 1);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-back-forward-same-doc.html b/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-back-forward-same-doc.html index cd307a3..1faa949d 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-back-forward-same-doc.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-back-forward-same-doc.html
@@ -1,14 +1,16 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#foo").committed; assert_equals(navigation.entries().length, start_length + 1);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-same-doc.html b/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-same-doc.html index 79ade939..019798d 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-same-doc.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-same-doc.html
@@ -1,13 +1,15 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let oncurrententrychange_called = false; let original_entry = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-same-doc.html b/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-same-doc.html index 0cf5214..06011894 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-same-doc.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-same-doc.html
@@ -1,13 +1,15 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let oncurrententrychange_called = false; navigation.oncurrententrychange = t.step_func(e => {
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-origin-traversal-redirect.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-origin-traversal-redirect.html index f7bebae5..a1cc177 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-origin-traversal-redirect.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-origin-traversal-redirect.html
@@ -4,7 +4,9 @@ <script src="/resources/testharnessreport.js"></script> <script src="/common/utils.js"></script> <script src=/common/get-host-info.sub.js></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let i = document.createElement("iframe"); i.src = "resources/cross-origin-redirect-on-second-visit.py?key=" + token() + "&remote_origin=" + get_host_info().HTTP_REMOTE_ORIGIN; @@ -12,7 +14,7 @@ // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let original_iframe_url = i.contentWindow.location.href;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-popstate.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-popstate.html index f5f9d82..32a5fb1 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-popstate.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-popstate.html
@@ -1,11 +1,13 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); history.replaceState({ state: "foo"}, "", "#replace"); let onpopstate_fired = false;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-destination-after-detach.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-destination-after-detach.html index 1dcb6ca..6ddb671 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-destination-after-detach.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-destination-after-detach.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let destination_key = i.contentWindow.navigation.currentEntry.key; let destination_id = i.contentWindow.navigation.currentEntry.id;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-destination-dynamic-index.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-destination-dynamic-index.html index 535e5cf..02e7453 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-destination-dynamic-index.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-destination-dynamic-index.html
@@ -2,13 +2,15 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="../navigation-methods/return-value/resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#1").finished; let back_destination;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-noop.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-noop.html index 109106b..11faca38 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-noop.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-noop.html
@@ -2,7 +2,9 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; @@ -10,7 +12,7 @@ // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await i.contentWindow.navigation.navigate("#").finished; assert_equals(i.contentWindow.navigation.entries().length, 2);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html index 42c694e2..fc10707 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-same-document-in-iframe.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let target_key = i.contentWindow.navigation.currentEntry.key; let target_id = i.contentWindow.navigation.currentEntry.id;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-back-same-document-preventDefault-expected.txt b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-back-same-document-preventDefault-expected.txt new file mode 100644 index 0000000..066db64 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-back-same-document-preventDefault-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +[FAIL] navigation.back() same-document preventDefault + navigateerror_called is not defined +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-back-same-document-preventDefault.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-back-same-document-preventDefault.html index f8e3125..f9c68e8 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-back-same-document-preventDefault.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-back-same-document-preventDefault.html
@@ -2,14 +2,16 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="../navigation-methods/return-value/resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#").finished; assert_equals(navigation.entries().length, start_length + 1);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-in-iframe-same-document-preventDefault.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-in-iframe-same-document-preventDefault.html index b3b57f2a..46a8349 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-in-iframe-same-document-preventDefault.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-in-iframe-same-document-preventDefault.html
@@ -3,14 +3,16 @@ <script src="/resources/testharnessreport.js"></script> <script src="../navigation-methods/return-value/resources/helpers.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); // Navigate the iframe, then the top window, so that when the iframe goes back // to its initial entry, the top window navigates as well.
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-navigates-top-and-same-doc-child-and-cross-doc-child.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-navigates-top-and-same-doc-child-and-cross-doc-child.html index 479f542..d27f108 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-navigates-top-and-same-doc-child-and-cross-doc-child.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-navigates-top-and-same-doc-child-and-cross-doc-child.html
@@ -3,14 +3,16 @@ <script src="/resources/testharnessreport.js"></script> <iframe id="i1" src="/common/blank.html"></iframe> <iframe id="i2" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#").finished; await i1.contentWindow.navigation.navigate("#").finished; i2.contentWindow.navigation.navigate("?");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-same-document-preventDefault-multiple-windows.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-same-document-preventDefault-multiple-windows.html index 34f227a..0c39e4a 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-same-document-preventDefault-multiple-windows.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-same-document-preventDefault-multiple-windows.html
@@ -3,14 +3,16 @@ <script src="/resources/testharnessreport.js"></script> <script src="../navigation-methods/return-value/resources/helpers.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#").finished; await i.contentWindow.navigation.navigate("#").finished; assert_equals(navigation.entries().length, start_length + 1);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-top-cancels-cross-document-child.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-top-cancels-cross-document-child.html index 4ece3ca8..0b0e297 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-top-cancels-cross-document-child.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/navigation-traverseTo-top-cancels-cross-document-child.html
@@ -3,14 +3,16 @@ <script src="/resources/testharnessreport.js"></script> <script src="../navigation-methods/return-value/resources/helpers.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#").finished; i.contentWindow.navigation.navigate("?"); await new Promise(resolve => i.onload = () => t.step_timeout(resolve, 0));
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/replaceState-inside-back-handler.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/replaceState-inside-back-handler.html index 29409b5..11595ce 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/replaceState-inside-back-handler.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/replaceState-inside-back-handler.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="../navigation-methods/return-value/resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#push").finished; navigation.onnavigate = () => history.replaceState(null, "", "#");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/same-url-replace-cross-document.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/same-url-replace-cross-document.html index b6bd0cd..f5d7988 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/same-url-replace-cross-document.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/same-url-replace-cross-document.html
@@ -3,14 +3,16 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that we are definitely testing the // same URL as the cause of the rejections. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(navigation.entries().length, start_length); navigation.onnavigate = t.step_func(e => {
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/same-url-replace-same-document.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/same-url-replace-same-document.html index cc4faff..bdffdc4 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/same-url-replace-same-document.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigate-event/same-url-replace-same-document.html
@@ -3,14 +3,16 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that we are definitely testing the // same URL as the cause of the rejections. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(navigation.entries().length, start_length); await navigation.navigate("#").finished; assert_equals(navigation.entries().length, start_length + 1);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-history-pushState.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-history-pushState.html index bcc56136..a4f4583 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-history-pushState.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-history-pushState.html
@@ -1,11 +1,13 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(navigation.activation.entry, navigation.currentEntry); let activationEntry = navigation.activation.entry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-history-replaceState.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-history-replaceState.html index 70dc7b8..fb3d55a 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-history-replaceState.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-history-replaceState.html
@@ -1,11 +1,13 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(navigation.activation.entry, navigation.currentEntry); let activationEntry = navigation.activation.entry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-initial-about-blank.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-initial-about-blank.html index 4020938..9a19393c 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-initial-about-blank.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-initial-about-blank.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.activation, null);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-push-cross-origin.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-push-cross-origin.html index 15651bf7..d59ab83 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-push-cross-origin.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-push-cross-origin.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/common/get-host-info.sub.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let i = document.createElement("iframe"); i.src = get_host_info().HTTP_ORIGIN_WITH_DIFFERENT_PORT + "/common/blank.html";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-push.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-push.html index 9954831..de08c532 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-push.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-push.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); i.contentWindow.navigation.navigate("/common/blank.html?a"); await new Promise(resolve => i.onload = () => t.step_timeout(resolve, 0));
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-reload.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-reload.html index f65afc7..066feb2 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-reload.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-reload.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); i.contentWindow.navigation.reload(); await new Promise(resolve => i.onload = () => t.step_timeout(resolve, 0));
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-replace-cross-origin.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-replace-cross-origin.html index a835b7f..58045ea 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-replace-cross-origin.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-replace-cross-origin.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/common/get-host-info.sub.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let i = document.createElement("iframe"); i.src = get_host_info().HTTP_ORIGIN_WITH_DIFFERENT_PORT + "/common/blank.html";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-replace.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-replace.html index 71624fd..0be428c7 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-replace.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-replace.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let before_key = i.contentWindow.navigation.currentEntry.key; let before_id = i.contentWindow.navigation.currentEntry.id;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-same-document-then-cross-document.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-same-document-then-cross-document.html index 3daa4de..794e5203 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-same-document-then-cross-document.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-same-document-then-cross-document.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await i.contentWindow.navigation.navigate("/common/blank.html#fragment").finished; assert_equals(i.contentWindow.navigation.entries().length, 2);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse-not-in-entries.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse-not-in-entries.html index c838661..d78a3485 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse-not-in-entries.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse-not-in-entries.html
@@ -3,11 +3,13 @@ <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> <script src="/common/get-host-info.sub.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); i.contentWindow.location = get_host_info().HTTP_ORIGIN_WITH_DIFFERENT_PORT + "/common/blank.html"; await new Promise(resolve => i.onload = () => t.step_timeout(resolve, 0));
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse-then-clobber.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse-then-clobber.html index c0283762..e15b7f3 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse-then-clobber.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse-then-clobber.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); i.contentWindow.navigation.navigate("/common/blank.html?a"); await new Promise(resolve => i.onload = () => t.step_timeout(resolve, 0));
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse.html index 218fe86..9d13ec2a 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-activation/activation-traverse.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); i.contentWindow.navigation.navigate("/common/blank.html?a"); await new Promise(resolve => i.onload = () => t.step_timeout(resolve, 0));
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/after-detach.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/after-detach.html index c4ecfec4..9c73795 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/after-detach.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/after-detach.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let i_navigation = i.contentWindow.navigation;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/entries-after-blank-navigation-from-cross-origin.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/entries-after-blank-navigation-from-cross-origin.html index d527637..e17d8937 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/entries-after-blank-navigation-from-cross-origin.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/entries-after-blank-navigation-from-cross-origin.html
@@ -3,9 +3,11 @@ <script src="/resources/testharnessreport.js"></script> <script src="/common/get-host-info.sub.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let i = document.createElement("iframe"); i.src = get_host_info().HTTP_ORIGIN_WITH_DIFFERENT_PORT + "/common/blank.html";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/resources/opaque-origin-page.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/resources/opaque-origin-page.html index 98e2c1b..ff4556ed 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/resources/opaque-origin-page.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/resources/opaque-origin-page.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <!-- Put this page in a sandbox to give it an opaque origin --> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); location.hash = "#1"; await new Promise(resolve => window.onhashchange = resolve);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/back-forward-multiple-frames.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/back-forward-multiple-frames.html index 6c30987..b7e980d 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/back-forward-multiple-frames.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/back-forward-multiple-frames.html
@@ -2,13 +2,15 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); // Step 1 assert_equals(navigation.entries().length, start_length, "step 1 outer entries() length"); assert_equals(i.contentWindow.navigation.entries().length, 1, "step 1 iframe entries() length");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/disambigaute-traverseTo-forward-multiple.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/disambigaute-traverseTo-forward-multiple.html index 92f23f0a..ecb92ed 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/disambigaute-traverseTo-forward-multiple.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/disambigaute-traverseTo-forward-multiple.html
@@ -2,13 +2,15 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(navigation.entries().length, start_length); assert_equals(i.contentWindow.navigation.entries().length, 1); let initial_key = navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/forward-to-pruned-entry.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/forward-to-pruned-entry.html index 18b30c6..67006c6 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/forward-to-pruned-entry.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/forward-to-pruned-entry.html
@@ -1,13 +1,15 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#foo").finished; assert_equals(navigation.entries().length, start_length+1); await navigation.back().finished;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-history-push-same-url-cross-document.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-history-push-same-url-cross-document.html index 2d07bdce..00020ea 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-history-push-same-url-cross-document.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-history-push-same-url-cross-document.html
@@ -3,11 +3,13 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation due to onload not having completed. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); i.contentWindow.navigation.onnavigatesuccess = t.unreached_func("onnavigatesuccess should not be called");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-history-push-same-url.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-history-push-same-url.html index a81215f..59c0ac8 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-history-push-same-url.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-history-push-same-url.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation due to onload not having completed. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(navigation.entries().length, start_length);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-already-detached.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-already-detached.html index f9ff04f..ebaa15b 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-already-detached.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-already-detached.html
@@ -5,11 +5,13 @@ <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); let key = i.contentWindow.navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-beforeunload.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-beforeunload.html index 82c1f589..dfb7986 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-beforeunload.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-beforeunload.html
@@ -5,11 +5,13 @@ <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); let key = i.contentWindow.navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept-rejected.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept-rejected.html index 013ebf1..cda4ea7 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept-rejected.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept-rejected.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); location.href = "#1";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept.html index 1db2f87..112a712 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); location.href = "#1";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back.html index 5521de2..16e4db1 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); location.href = "#1";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-already-detached.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-already-detached.html index 4dfa74d..8f337e2 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-already-detached.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-already-detached.html
@@ -5,11 +5,13 @@ <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); let key = i.contentWindow.navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-beforeunload.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-beforeunload.html index 87fa4baa9..642c451 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-beforeunload.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-beforeunload.html
@@ -5,11 +5,13 @@ <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); let key = i.contentWindow.navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept-rejected.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept-rejected.html index 9d5318a..658146a1 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept-rejected.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept-rejected.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); location.href = "#1"; await navigation.back().committed;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept.html index 3c52119..d6ea5dc 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); location.href = "#1";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward.html index 5ba58f2c..c1ac710 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); location.href = "#1"; await navigation.back().committed;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-interrupted.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-interrupted.html index 7f661b80..86123cc5 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-interrupted.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-interrupted.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); navigation.addEventListener("navigate", e => e.intercept());
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate.html index 249a7df..a3106dd 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let result2; navigation.onnavigate = t.step_func(e => {
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-interrupted.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-interrupted.html index d1ade5b..3ed5225 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-interrupted.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-interrupted.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const result1 = navigation.navigate("#1"); const result2 = navigation.navigate("#2");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank.html index 9d47c8d..3431f03 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank.html
@@ -5,11 +5,13 @@ <body> <iframe id="i"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that we are definitely testing the initial // about:blank-ness as the cause of the rejections. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); i.contentWindow.navigation.onnavigate = t.unreached_func("onnavigate should not be called"); i.contentWindow.navigation.onnavigatesuccess = t.unreached_func("onnavigatesuccess should not be called");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-push-javascript-url.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-push-javascript-url.html index e41e06a..6db41bb7 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-push-javascript-url.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-push-javascript-url.html
@@ -3,11 +3,13 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that we are definitely testing the // javascript: URL as the cause of the rejections. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); navigation.onnavigate = t.unreached_func("onnavigate should not be called"); navigation.onnavigatesuccess = t.unreached_func("onnavigatesuccess should not be called");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/resources/back-forward-opaque-origin-page.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/resources/back-forward-opaque-origin-page.html index ec63363..b62b573 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/resources/back-forward-opaque-origin-page.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/resources/back-forward-opaque-origin-page.html
@@ -3,11 +3,13 @@ <script src="helpers.js"></script> <!-- Put this page in a sandbox to give it an opaque origin --> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); navigation.onnavigate = t.unreached_func("onnavigate should not be called"); navigation.onnavigatesuccess = t.unreached_func("onnavigatesuccess should not be called");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-cross-document-preventDefault.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-cross-document-preventDefault.html index 09c91ee6..b402972 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-cross-document-preventDefault.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-cross-document-preventDefault.html
@@ -5,11 +5,13 @@ <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); let key = i.contentWindow.navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document-before-navigate-event.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document-before-navigate-event.html index ed319f62..1833e1a 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document-before-navigate-event.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document-before-navigate-event.html
@@ -5,11 +5,13 @@ <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); let key = i.contentWindow.navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document.html index 8784313..7b9389f 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document.html
@@ -5,11 +5,13 @@ <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); let key = i.contentWindow.navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document-before-navigate-event.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document-before-navigate-event.html index 592ac6f..65dbf42 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document-before-navigate-event.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document-before-navigate-event.html
@@ -5,11 +5,13 @@ <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); let key = i.contentWindow.navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document.html index b0308b8..4aec1d8 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document.html
@@ -5,11 +5,13 @@ <iframe id="i" src="/common/blank.html"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(i.contentWindow.navigation.entries().length, 1); let key = i.contentWindow.navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept-rejected.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept-rejected.html index f39913e0..b5b03b3 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept-rejected.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept-rejected.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const key0 = navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept.html index e5baf8b..15a54b1 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const key0 = navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-repeated.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-repeated.html index d1754d6..d2ede8e 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-repeated.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-repeated.html
@@ -3,11 +3,13 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const key = navigation.currentEntry.key; const entry = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo.html index 5270bbb..68c3093 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo.html
@@ -3,13 +3,15 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/helpers.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const key0 = navigation.currentEntry.key;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-multiple-steps.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-multiple-steps.html index 24cf028..6bf3752 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-multiple-steps.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-multiple-steps.html
@@ -1,13 +1,15 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(navigation.entries().length, start_length); let key0 = navigation.currentEntry.key; await navigation.navigate("#1").committed;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-navigates-multiple-iframes.html b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-navigates-multiple-iframes.html index 1892ae06..521f341 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-navigates-multiple-iframes.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-navigates-multiple-iframes.html
@@ -4,12 +4,14 @@ <body> <iframe id="i1" src="/common/blank.html"></iframe> <iframe id="i2" src="resources/slow-no-store.py"></iframe> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); i1.src = "/common/blank.html?navigated"; await new Promise(resolve => i1.onload = resolve);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept-reject.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept-reject.html index bd7d968f..726586b7 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept-reject.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept-reject.html
@@ -6,11 +6,13 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry; const expectedError = new Error("boo");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept.html index 38478e3c..8aaee4a7 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept-reject.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept-reject.html index d1f15428..c2db856 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept-reject.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept-reject.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#1").finished; const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept.html index f66e1df..9180ca1c 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#1").finished; const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document.html index 12b6a2ae..680421b 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#1").finished; const recorder = new Recorder({
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-intercept.html index 10627c5..b0c934f 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-intercept.html
@@ -1,12 +1,14 @@ <!doctype html> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { let start_length = navigation.entries().length; // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#foo").committed; assert_equals(navigation.entries().length, start_length + 1);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/intercept-async.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/intercept-async.html index 4fa7c88..c34994a 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/intercept-async.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/intercept-async.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-canceled.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-canceled.html index eef10cd..894aa39 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-canceled.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-canceled.html
@@ -4,11 +4,12 @@ <script type="module"> import { Recorder } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const recorder = new Recorder({ finalExpectedEvent: "promise microtask"
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-intercept.html index cc8b95b..73121ca 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-intercept.html
@@ -6,10 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const fromStart = navigation.currentEntry; let fromHash1;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html index 8a50821..18f9924 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry; let firstNavigate = true;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reject.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reject.html index 59b3d488..04f2914 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reject.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reject.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry; const expectedError = new Error("boo");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept.html index 75f1d3d..2be0a12 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-canceled.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-canceled.html index 2604a60..1bc9dfe 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-canceled.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-canceled.html
@@ -4,11 +4,12 @@ <script type="module"> import { Recorder } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const recorder = new Recorder({ finalExpectedEvent: "finished rejected"
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-intercept.html index 0598fb55..9275828 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-intercept.html
@@ -6,10 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const fromStart = navigation.currentEntry; let fromHash1;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-in-transition-finished.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-in-transition-finished.html index 8b3811d..45aa330 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-in-transition-finished.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-in-transition-finished.html
@@ -6,10 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const fromStart = navigation.currentEntry; let fromHash1;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-redirect.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-redirect.html index 2f60bfd..aa70343 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-redirect.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-redirect.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-reject.tentative.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-reject.tentative.html index 28dc8851..80c9e856 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-reject.tentative.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler-reject.tentative.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler.html index 8257e56..f3f525af 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-precommitHandler.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-stop.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-stop.html index 1a7faa4..8357dc82 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-stop.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-stop.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept.html index eec9d3c..ebb1a0b 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reentrant.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reentrant.html index 88715fd..b9d2740b 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reentrant.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reentrant.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry; let firstNavigate = true;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reject.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reject.html index 05f2951..8899a38 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reject.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reject.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry; const expectedError = new Error("boo");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document.html index fc506ce..b23d32f 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const recorder = new Recorder({ skipCurrentChange: !hasVariant("currententrychange"),
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-canceled.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-canceled.html index 3e9e24e..9b21c15ad 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-canceled.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-canceled.html
@@ -4,11 +4,12 @@ <script type="module"> import { Recorder } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const recorder = new Recorder({ finalExpectedEvent: "finished rejected"
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept-reject.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept-reject.html index 96833f3..4ea4cc0e 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept-reject.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept-reject.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry; const expectedError = new Error("boo");
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept.html index 1494136e..eb6aff9 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept.html
@@ -6,11 +6,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-no-popstate.html b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-no-popstate.html index 6c4592b6..324acb66 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-no-popstate.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-no-popstate.html
@@ -4,11 +4,12 @@ <script type="module"> import { Recorder, hasVariant } from "./resources/helpers.mjs"; +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); const from = navigation.currentEntry;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-options.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-options.html index 06542d7..3c40044c 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-options.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-options.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let start_length = navigation.entries().length; let start_hash = location.hash;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-push-changed-to-replace.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-push-changed-to-replace.html index e268f68a..8088f510 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-push-changed-to-replace.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-push-changed-to-replace.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let start_length = navigation.entries().length; let start_hash = location.hash;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-push.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-push.html index de75198..41b3f3d 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-push.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-push.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let start_length = navigation.entries().length; let start_hash = location.hash;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-replace-changed-to-push.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-replace-changed-to-push.html index db9b1789..19bbbcd 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-replace-changed-to-push.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-replace-changed-to-push.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let start_length = navigation.entries().length; let start_hash = location.hash;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-replace.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-replace.html index 049909fe..2ebd385 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-replace.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-replace.html
@@ -2,11 +2,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let start_length = navigation.entries().length; let start_hash = location.hash;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-throws.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-throws.html index b459271..865835d 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-throws.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-redirect-throws.html
@@ -2,7 +2,8 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; promise_test(async t => { let precommit_controller; @@ -86,7 +87,7 @@ promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#forward").finished;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-traversal-commit-new-navigation-before-commit.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-traversal-commit-new-navigation-before-commit.html index 226f332..e5955b6 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-traversal-commit-new-navigation-before-commit.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-traversal-commit-new-navigation-before-commit.html
@@ -3,11 +3,13 @@ <script src="/resources/testharnessreport.js"></script> <script src="../navigation-methods/return-value/resources/helpers.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#1").finished;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-traversal-window-stop-before-commit.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-traversal-window-stop-before-commit.html index c45f826..9dd74c2 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-traversal-window-stop-before-commit.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-traversal-window-stop-before-commit.html
@@ -3,11 +3,13 @@ <script src="/resources/testharnessreport.js"></script> <script src="../navigation-methods/return-value/resources/helpers.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event because window.stop() hangs the test harness // if called before the load event. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let start_length = navigation.entries().length; let start_index = navigation.currentEntry.index;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-uncancelable.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-uncancelable.html index af320b4..9a63c45 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-uncancelable.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-uncancelable.html
@@ -3,11 +3,13 @@ <script src="/resources/testharnessreport.js"></script> <iframe id="i" src="/common/blank.html"></iframe> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await i.contentWindow.navigation.navigate("#1").finished;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-window-stop-before-commit.html b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-window-stop-before-commit.html index 857a21e..8b8e2fe 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-window-stop-before-commit.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/precommit-handler/precommitHandler-window-stop-before-commit.html
@@ -3,11 +3,13 @@ <script src="/resources/testharnessreport.js"></script> <script src="../navigation-methods/return-value/resources/helpers.js"></script> <body> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event because window.stop() hangs the test harness // if called before the load event. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); navigation.onnavigate = e => { e.intercept({ precommitHandler: async () => {} });
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/resources/helpers.mjs b/third_party/blink/web_tests/external/wpt/navigation-api/resources/helpers.mjs new file mode 100644 index 0000000..2208dab --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/navigation-api/resources/helpers.mjs
@@ -0,0 +1,10 @@ +export async function ensureWindowLoadEventFired(t) { + return new Promise(resolve => { + const callback = () => t.step_timeout(resolve, 0); + if (document.readyState === 'complete') { + callback(); + } else { + window.onload = callback; + } + }); +}
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-basic.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-basic.html index 8ee4cc3..b6e5058 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-basic.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-basic.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-change-history-scroll-restoration-during-promise.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-change-history-scroll-restoration-during-promise.html index 6ededde..6be6edd 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-change-history-scroll-restoration-during-promise.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-change-history-scroll-restoration-during-promise.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); history.scrollRestoration = "manual";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-explicit-scroll.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-explicit-scroll.html index 4b7d075..4f7c678 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-explicit-scroll.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-explicit-scroll.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-intercept-handler-modifies.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-intercept-handler-modifies.html index baff6fe..c2609d6 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-intercept-handler-modifies.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-intercept-handler-modifies.html
@@ -3,11 +3,13 @@ <script src="/resources/testharnessreport.js"></script> <body> <div id="main" style="height: 1000px; width: 1000px;"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); window.scrollTo(0, 100); assert_equals(window.scrollY, 100);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-push.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-push.html index f3ee182..8ce5be60 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-push.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-push.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); let intercept_resolve;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-reject.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-reject.html index 5880dbb3..063c084 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-reject.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-reject.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-reload.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-reload.html index badb7e7f..437ed69 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-reload.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-reload.html
@@ -5,11 +5,13 @@ <div id="buffer" style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> <div style="height: 1000px; width: 1000px;"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; // Scroll down 10px from #frag
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-replace.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-replace.html index 48f153b..64376c9 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-replace.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-replace.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); let intercept_resolve;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-timing.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-timing.html index 88ba821..637d8c0 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-timing.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-timing.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-with-history-scroll-restoration-manual.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-with-history-scroll-restoration-manual.html index bc2ce23..93e7168 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-with-history-scroll-restoration-manual.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/after-transition-with-history-scroll-restoration-manual.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); history.scrollRestoration = "manual";
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-basic.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-basic.html index e6ae29a..5e4d6a1 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-basic.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-basic.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-immediate-scroll.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-immediate-scroll.html index bafcf6b..d50faedd 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-immediate-scroll.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-immediate-scroll.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-after-dispatch.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-after-dispatch.html index 8b4a58c7..268be12 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-after-dispatch.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-after-dispatch.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-after-resolve.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-after-resolve.html index 244c93a..34eec97 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-after-resolve.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-after-resolve.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-fragment-does-not-exist.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-fragment-does-not-exist.html index 1ca5827..0db3f03e 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-fragment-does-not-exist.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-fragment-does-not-exist.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-in-precommit-handler.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-in-precommit-handler.html index 3f92b52..ec91e76 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-in-precommit-handler.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-in-precommit-handler.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-push.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-push.html index 3c29365..cba40fdf 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-push.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-push.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); let intercept_resolve;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-reload.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-reload.html index 6dd3fd8..9c70d5f 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-reload.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-reload.html
@@ -5,11 +5,13 @@ <div id="buffer" style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> <div style="height: 1000px; width: 1000px;"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; // Scroll down 10px from #frag
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-repeated.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-repeated.html index 1239146..058d7f0 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-repeated.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-repeated.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-replace.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-replace.html index db58022..151c2dd 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-replace.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-replace.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); assert_equals(window.scrollY, 0); let intercept_resolve;
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-resets-when-no-fragment.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-resets-when-no-fragment.html index 5401976..caf7bae 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-resets-when-no-fragment.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/manual-scroll-resets-when-no-fragment.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); let start_url = location.href; await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0);
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/scroll-after-preventDefault.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/scroll-after-preventDefault.html index 298bebcb..fe83b89 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/scroll-after-preventDefault.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/scroll-after-preventDefault.html
@@ -5,11 +5,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); navigation.addEventListener("navigate", t.step_func(e => { e.intercept();
diff --git a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/scroll-without-intercept.html b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/scroll-without-intercept.html index b3958352..efdded2 100644 --- a/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/scroll-without-intercept.html +++ b/third_party/blink/web_tests/external/wpt/navigation-api/scroll-behavior/scroll-without-intercept.html
@@ -4,11 +4,13 @@ <body> <div style="height: 1000px; width: 1000px;"></div> <div id="frag"></div> -<script> +<script type="module"> +import { ensureWindowLoadEventFired } from "../resources/helpers.mjs"; + promise_test(async t => { // Wait for after the load event so that the navigation doesn't get converted // into a replace navigation. - await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0)); + await ensureWindowLoadEventFired(t); navigation.addEventListener("navigate", t.step_func(e => { assert_throws_dom("InvalidStateError", () => e.scroll());
diff --git a/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html b/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html index 9127a21..8da1b7d 100644 --- a/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html +++ b/third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_lostpointercapture_remove_setcapture_node.html
@@ -1,7 +1,7 @@ <!doctype html> <html> <head> - <title>Lostpointercapture removing new capture element prevents the new capture</title> + <title>Lostpointercapture fires on document when target is removed</title> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" type="text/css" href="pointerevent_styles.css"> <script src="/resources/testharness.js"></script> @@ -12,30 +12,46 @@ <script src="pointerevent_support.js"></script> </head> <body> + <h1>Pointer Events - lostpointercapture removes new capture element</h1> <input type="button" id="button" value="Set Capture"><br> <div id="target0"></div> <div id="target1"></div> <script type='text/javascript'> - "use strict"; - - let target0 = document.getElementById('target0'); - let target1 = document.getElementById('target1'); - let captureButton = document.getElementById('button'); - let targets = [target0, target1, captureButton]; - const LOG_EVENT_TYPES = ['pointerover', 'pointerenter', 'pointerdown', 'pointerup', 'pointerout', 'pointerleave', 'gotpointercapture', 'lostpointercapture']; - + var target0 = document.getElementById('target0'); + var target1 = document.getElementById('target1'); + var captureButton = document.getElementById('button'); + var targets = [target0, target1, captureButton]; + const LOG_EVENT_TYPES = ['pointerover', 'pointerenter', 'pointerdown', 'pointermove', 'pointerup', 'pointercancel', 'pointerout', 'pointerleave', 'gotpointercapture', 'lostpointercapture']; promise_test(async (test) => { captureButton.focus(); - let events = []; - let logEvent = event => events.push(`${event.type}@${event.target.id}`); - + var events = []; + var lastLogMessage = ""; + let logEvent = (event) => { + let logMessage = `${event.type}@${event.target.id || event.target.tagName || 'document'}`; + // Only log a particular event once to avoid coalescing differences. + if (logMessage == lastLogMessage) + return; + lastLogMessage = logMessage; + events.push(logMessage); + }; + document.addEventListener('lostpointercapture', logEvent); for (const target of targets) { for (const eventType of LOG_EVENT_TYPES) { target.addEventListener(eventType, logEvent); } } + const nextSibling = target1.nextSibling; + test.add_cleanup(() => { + document.removeEventListener('lostpointercapture', logEvent); + for (const target of targets) { + for (const eventType of LOG_EVENT_TYPES) { + target.removeEventListener(eventType, logEvent); + } + } + nextSibling.parentNode.insertBefore(target1, nextSibling); + }); - let finishPromise = getEvent('pointerup', captureButton, test); + let finishPromise = getEvent('pointerup', window, test); getEvent('pointerdown', captureButton, test).then((event) => { target0.setPointerCapture(event.pointerId); @@ -53,21 +69,11 @@ }); // Inject mouse inputs. - // - // TODO(crbug.com/40942362): Ideally the action sequence below needs to dispatch - // only single a pointermove event between the pointerdown/up pair. Blink needs - // an additional pointermove to end the test without a timeout because of a - // complicated bug. To make sure the new pointermove does not get coalesced - // with the first pointermove, we added a pair of chorded down/up events (which - // becomes poitermoves) and removed pointermove logging to maintain Blink's test - // coverage without violating the test's goal. const actions = new test_driver.Actions(); - actions + actions_promise = actions .pointerMove(0, 0, {origin: captureButton}) .pointerDown() .pointerMove(10, 0, {origin: captureButton}) - .pointerDown({button: actions.ButtonType.MIDDLE}) - .pointerUp({button: actions.ButtonType.MIDDLE}) .pointerUp() .send(); @@ -75,12 +81,13 @@ assert_equals(events.join(", "), [ // Pointer down on button - "pointerover@button", "pointerenter@button", "pointerdown@button", + "pointerover@button", "pointerenter@button", "pointermove@button", "pointerdown@button", // Captured by target0 - "pointerout@button", "pointerleave@button", "pointerover@target0", "pointerenter@target0", "gotpointercapture@target0", + "pointerout@button", "pointerleave@button", "pointerover@target0", "pointerenter@target0", "gotpointercapture@target0", "pointermove@target0", // Captured by target1, losing capture on target0 which removes target1. "lostpointercapture@target0", "pointerout@target0", "pointerleave@target0", // Uncaptured pointer re-enters button and is lifted. + // However, this is not a real pointer move, so, `pointermove` shouldn't be fired. "pointerover@button", "pointerenter@button", "pointerup@button" ].join(", ")); }, "setPointerCapture target removed by lostpointercapture");
diff --git a/third_party/blink/web_tests/external/wpt/selection/canvas-drag.html b/third_party/blink/web_tests/external/wpt/selection/canvas-drag.html new file mode 100644 index 0000000..eaed6f78 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/selection/canvas-drag.html
@@ -0,0 +1,34 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Dragging on a text-selectable canvas should not select it</title> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.com" title="Mozilla"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1969829"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<style> + canvas { + outline: 2px solid hotpink; + background-color: green; + width: 200px; + height: 200px; + } +</style> +Dragging across the green square should not select it.<br> +<canvas></canvas> +<script> +promise_test(async function() { + let canvas = document.querySelector("canvas"); + let rect = canvas.getBoundingClientRect(); + await new test_driver.Actions() + .pointerMove(rect.left + 2, rect.top + 2) + .pointerDown() + .pointerMove(rect.right - 2, rect.top + 2) + .pointerUp() + .send(); + assert_true(getSelection().isCollapsed, "Dragging a canvas shouldn't generate a non-collapsed selection"); +}); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/svg/shapes/animatedPoints-non-animated-expected.txt b/third_party/blink/web_tests/external/wpt/svg/shapes/animatedPoints-non-animated-expected.txt deleted file mode 100644 index 3884c60..0000000 --- a/third_party/blink/web_tests/external/wpt/svg/shapes/animatedPoints-non-animated-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -This is a testharness.js-based test. -[FAIL] animatedPoints represents non-animated value - assert_equals: expected 20 but got 170 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/svg/shapes/animatedPoints-non-animated.html b/third_party/blink/web_tests/external/wpt/svg/shapes/animatedPoints-non-animated.html deleted file mode 100644 index 5c17589..0000000 --- a/third_party/blink/web_tests/external/wpt/svg/shapes/animatedPoints-non-animated.html +++ /dev/null
@@ -1,51 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<meta charset="utf-8"> -<title>animatedPoints non-animated</title> -<link rel="help" href="https://svgwg.org/svg2-draft/shapes.html#InterfaceSVGAnimatedPoints"> -<meta name="assert" content="animatedPoints represents the current non-animated value"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<svg xmlns="http://www.w3.org/2000/svg" - xmlns:h="http://www.w3.org/1999/xhtml" - width="200" height="200"> - <polyline fill="none" stroke="blue" stroke-width="5" - points="20,30 50,70" id="stripe"> - <set id="anim" attributeType="XML" attributeName="points" fill="freeze" - to="170,150 130,120" begin="indefinite" onbegin="measure()"/> - </polyline> -</svg> -<script> - -'use strict'; - -var measure; - -async_test(t => { - - measure = t.step_func(() => { - const stripe = document.getElementById('stripe'); - const animatedPoints = stripe.animatedPoints; - assert_equals(animatedPoints.numberOfItems, 2); - assert_equals(animatedPoints.getItem(0).x, 20); - assert_equals(animatedPoints.getItem(0).y, 30); - assert_equals(animatedPoints.getItem(1).x, 50); - assert_equals(animatedPoints.getItem(1).y, 70); - t.done(); - }); - - const anim = document.getElementById('anim'); - if (anim.beginElement) { - anim.beginElement(); - } else { - // SMIL not supported. - requestAnimationFrame(measure); - } -}, 'animatedPoints represents non-animated value'); - -</script> -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-001-expected.txt b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-001-expected.txt deleted file mode 100644 index 0ecfbd06..0000000 --- a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-001-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -This is a testharness.js-based test. -[FAIL] Setting script source via Element.moveBefore() drops trustworthiness. - promise_test: Unhandled rejection with value: object "HierarchyRequestError: Failed to execute 'moveBefore' on 'Element': State-preserving atomic move cannot be performed on nodes participating in an invalid hierarchy." -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-001.html b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-001.html index 9548987..dc2bf313 100644 --- a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-001.html +++ b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-001.html
@@ -248,7 +248,13 @@ promise_test(async t => { await no_script_message_for(_ => { let script = create_html_script_with_trusted_source_text(";"); - script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + let text = document.createTextNode(LOG_RUN_MESSAGE); + // Per https://dom.spec.whatwg.org/#move, step 1, moveBefore requires + // the two nodes to have the same shadow-including root. + let root = document.createElement("div"); + root.appendChild(script); + root.appendChild(text); + script.moveBefore(text, script.firstChild); container.appendChild(script); }); }, "Setting script source via Element.moveBefore() drops trustworthiness.");
diff --git a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-002-expected.txt b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-002-expected.txt deleted file mode 100644 index b8e0fbb..0000000 --- a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-002-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -This is a testharness.js-based test. -[FAIL] Default policy's calls when setting script source via Element.moveBefore(). - promise_test: Unhandled rejection with value: object "HierarchyRequestError: Failed to execute 'moveBefore' on 'Element': State-preserving atomic move cannot be performed on nodes participating in an invalid hierarchy." -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-002.html b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-002.html index ddbbc99..d6799d5 100644 --- a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-002.html +++ b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-002.html
@@ -296,7 +296,13 @@ let messages = await script_messages_for(_ => { let script = create_html_script_with_trusted_source_text(";"); window.log_message("SET"); - script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + // Per https://dom.spec.whatwg.org/#move, step 1, moveBefore requires + // the two nodes to have the same shadow-including root. + let text = document.createTextNode(LOG_RUN_MESSAGE); + let root = document.createElement("div"); + root.appendChild(text); + root.appendChild(script); + script.moveBefore(text, script.firstChild); window.log_message("APPEND"); container.appendChild(script); });
diff --git a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-003-expected.txt b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-003-expected.txt deleted file mode 100644 index 16728ce2..0000000 --- a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-003-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -This is a testharness.js-based test. -[FAIL] Setting script source via ElementmoveBefore() drops trustworthiness. - promise_test: Unhandled rejection with value: object "HierarchyRequestError: Failed to execute 'moveBefore' on 'Element': State-preserving atomic move cannot be performed on nodes participating in an invalid hierarchy." -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-003.html b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-003.html index 9ad31b7..5f3b317 100644 --- a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-003.html +++ b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-003.html
@@ -275,10 +275,16 @@ promise_test(async t => { await no_script_message_for(_ => { let script = create_svg_script_with_trusted_source_text(";"); - script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + // Per https://dom.spec.whatwg.org/#move, step 1, moveBefore requires + // the two nodes to have the same shadow-including root. + let text = document.createTextNode(LOG_RUN_MESSAGE); + let root = document.createElement("div"); + root.appendChild(text); + root.appendChild(script); + script.moveBefore(text, script.firstChild); container.appendChild(script); }); - }, "Setting script source via ElementmoveBefore() drops trustworthiness."); + }, "Setting script source via Element.moveBefore() drops trustworthiness."); promise_test(async t => { await promise_rejects_js(t, TypeError, script_messages_for(_ => {
diff --git a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-004-expected.txt b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-004-expected.txt deleted file mode 100644 index b8e0fbb..0000000 --- a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-004-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -This is a testharness.js-based test. -[FAIL] Default policy's calls when setting script source via Element.moveBefore(). - promise_test: Unhandled rejection with value: object "HierarchyRequestError: Failed to execute 'moveBefore' on 'Element': State-preserving atomic move cannot be performed on nodes participating in an invalid hierarchy." -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-004.html b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-004.html index 86e1020c..29dff3c 100644 --- a/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-004.html +++ b/third_party/blink/web_tests/external/wpt/trusted-types/script-enforcement-004.html
@@ -330,7 +330,13 @@ let messages = await script_messages_for(_ => { let script = create_svg_script_with_trusted_source_text(";"); window.log_message("SET"); - script.moveBefore(document.createTextNode(LOG_RUN_MESSAGE), script.firstChild); + // Per https://dom.spec.whatwg.org/#move, step 1, moveBefore requires + // the two nodes to have the same shadow-including root. + let text = document.createTextNode(LOG_RUN_MESSAGE); + let root = document.createElement("div"); + root.appendChild(text); + root.appendChild(script); + script.moveBefore(text, script.firstChild); window.log_message("APPEND"); container.appendChild(script); });
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/browsing_context/locate_nodes/start_nodes.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/browsing_context/locate_nodes/start_nodes.py index 351020af..c58c05e 100644 --- a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/browsing_context/locate_nodes/start_nodes.py +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/browsing_context/locate_nodes/start_nodes.py
@@ -276,3 +276,72 @@ ] recursive_compare(expected, result["nodes"]) + + +@pytest.mark.parametrize("type,value,expected", [ + ("css", "circle", [{ + "type": "node", + "sharedId": any_string, + "value": { + "childNodeCount": 0, + "localName": "circle", + "namespaceURI": "http://www.w3.org/2000/svg", + "nodeType": 1, + } + }]), + ("xpath", ".//*[name()='circle']", [{ + "type": "node", + "sharedId": any_string, + "value": { + "childNodeCount": 0, + "localName": "circle", + "namespaceURI": "http://www.w3.org/2000/svg", + "nodeType": 1, + } + }]), + ("innerText", "foo", [{ + "type": "node", + "sharedId": any_string, + "value": { + "childNodeCount": 1, + "localName": "p", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + } + }]), + ("accessibility", {"role": "banner", "name": "bar"}, [{ + "type": "node", + "sharedId": any_string, + "value": { + "childNodeCount": 1, + "localName": "p", + "namespaceURI": "http://www.w3.org/1999/xhtml", + "nodeType": 1, + } + }]), +]) +@pytest.mark.asyncio +async def test_locate_with_svg_context_node(bidi_session, inline, top_context, type, value, expected): + url = inline(""" + <svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> + <circle aria-label="circle" cx="5" cy="5" r="5" /> + <p role="banner" aria-label="bar">foo</p> + </svg> + """) + await bidi_session.browsing_context.navigate( + context=top_context["context"], url=url, wait="complete" + ) + + context_node = await bidi_session.script.evaluate( + expression="document.querySelector('svg')", + target=ContextTarget(top_context["context"]), + await_promise=True, + ) + + result = await bidi_session.browsing_context.locate_nodes( + context=top_context["context"], + locator={ "type": type, "value": value }, + start_nodes=[context_node] + ) + + recursive_compare(expected, result["nodes"])
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/network/remove_data_collector/__init__.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/network/remove_data_collector/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/network/remove_data_collector/__init__.py
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/network/remove_data_collector/collector.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/network/remove_data_collector/collector.py new file mode 100644 index 0000000..50ecc31 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/network/remove_data_collector/collector.py
@@ -0,0 +1,13 @@ +import pytest +import webdriver.bidi.error as error + +pytestmark = pytest.mark.asyncio + + +async def test_return_value(bidi_session, add_intercept): + collector = await bidi_session.network.add_data_collector( + data_types=["response"], max_encoded_data_size=1000 + ) + + result = await bidi_session.network.remove_data_collector(collector=collector) + assert result == {}
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/network/remove_data_collector/invalid.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/network/remove_data_collector/invalid.py new file mode 100644 index 0000000..aef18776 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/bidi/network/remove_data_collector/invalid.py
@@ -0,0 +1,26 @@ +import pytest +import webdriver.bidi.error as error + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize("value", [None, False, 42, {}, []]) +async def test_params_collector_invalid_type(bidi_session, value): + with pytest.raises(error.InvalidArgumentException): + await bidi_session.network.remove_data_collector(collector=value) + + +async def test_params_collector_invalid_value(bidi_session): + with pytest.raises(error.NoSuchNetworkCollectorException): + await bidi_session.network.remove_data_collector(collector="does not exist") + + +async def test_params_collector_removed_collector(bidi_session): + collector = await bidi_session.network.add_data_collector( + data_types=["response"], max_encoded_data_size=1000 + ) + + await bidi_session.network.remove_data_collector(collector=collector) + + with pytest.raises(error.NoSuchNetworkCollectorException): + await bidi_session.network.remove_data_collector(collector=collector)
diff --git a/third_party/blink/web_tests/external/wpt/webdriver/tests/support/helpers.py b/third_party/blink/web_tests/external/wpt/webdriver/tests/support/helpers.py index 9a7de51a4..8db6a6078e 100644 --- a/third_party/blink/web_tests/external/wpt/webdriver/tests/support/helpers.py +++ b/third_party/blink/web_tests/external/wpt/webdriver/tests/support/helpers.py
@@ -12,9 +12,12 @@ def ignore_exceptions(f): - def inner(*args, **kwargs): + def inner(session, *args, **kwargs): + # Do not try to clean up already ended session. + if session.session_id is None: + return try: - return f(*args, **kwargs) + return f(session, *args, **kwargs) except webdriver.error.WebDriverException as e: print("Ignored exception %s" % e, file=sys.stderr) inner.__name__ = f.__name__ @@ -80,10 +83,6 @@ session.window_handle = current_window - # Do not try to clean up already ended session. - if session.session_id is None: - return - _restore_timeouts(session) _ensure_valid_window(session) _dismiss_user_prompts(session)
diff --git a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame-simulcast.https.html b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame-simulcast.https.html index 4174aaf2..1ad51c8e 100644 --- a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame-simulcast.https.html +++ b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame-simulcast.https.html
@@ -29,7 +29,7 @@ const receiverPc = new RTCPeerConnection(); // This will only work if first rid is 0 exchangeIceCandidates(senderPc, receiverPc); - const stream = await navigator.mediaDevices.getUserMedia({video: true}); + const stream = await navigator.mediaDevices.getUserMedia({video: { width: 1280 } }); const {sender} = senderPc.addTransceiver(stream.getTracks()[0], {sendEncodings: [{rid: '0'}, {rid: '1'}, {rid: '2'}]}); sender.transform = transform; await doOfferToSendSimulcastAndAnswer(senderPc, receiverPc, ['0', '1', '2']); @@ -58,7 +58,7 @@ const receiverPc = new RTCPeerConnection(); // This will only work if first rid is 0 exchangeIceCandidates(senderPc, receiverPc); - const stream = await navigator.mediaDevices.getUserMedia({video: true}); + const stream = await navigator.mediaDevices.getUserMedia({video: { width: 1280 } }); const {sender} = senderPc.addTransceiver(stream.getTracks()[0], {sendEncodings: [{rid: '0'}, {rid: '1'}, {rid: '2'}]}); sender.transform = transform; await doOfferToSendSimulcastAndAnswer(senderPc, receiverPc, ['0', '1', '2']); @@ -91,7 +91,7 @@ const receiverPc = new RTCPeerConnection(); // This will only work if first rid is 0 exchangeIceCandidates(senderPc, receiverPc); - const stream = await navigator.mediaDevices.getUserMedia({video: true}); + const stream = await navigator.mediaDevices.getUserMedia({video: { width: 1280 } }); const {sender} = senderPc.addTransceiver(stream.getTracks()[0], {sendEncodings: [{rid: '0'}, {rid: '1'}, {rid: '2'}]}); sender.transform = transform; await doOfferToSendSimulcastAndAnswer(senderPc, receiverPc, ['0', '1', '2']);
diff --git a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame.https.html b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame.https.html index 348902ea..1ee2c1a2 100644 --- a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame.https.html +++ b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame.https.html
@@ -20,6 +20,7 @@ <script> const generateKeyFrame = (port, opts) => postMethod(port, 'generateKeyFrame', opts); +const generateKeyFrameDoesNotThrow = (port, opts) => postMethod(port, 'generateKeyFrameDoesNotThrow', opts); const waitForFrame = port => postMethod(port, 'waitForFrame'); promise_test(async (test) => { @@ -119,10 +120,9 @@ const senderTransform = sender.transform; sender.transform = null; - message = await generateKeyFrame(senderTransform.port); - assert_equals(message.result, 'failure'); - assert_equals(message.value, 'InvalidStateError', `Message: ${message.message}`); -}, 'generateKeyFrame throws for unset transforms'); + message = await generateKeyFrameDoesNotThrow(senderTransform.port); + assert_equals(message.result, 'success'); +}, 'generateKeyFrame does not throw for unset transforms'); promise_test(async (test) => { const {sender, receiver} = await createConnectionWithTransform(test, 'script-transform-generateKeyFrame.js', {video: true}); @@ -171,9 +171,8 @@ await receiverPc.setLocalDescription(); await senderPc.setRemoteDescription(receiverPc.localDescription); - message = await generateKeyFrame(sender.transform.port); - assert_equals(message.result, 'failure'); - assert_equals(message.value, 'InvalidStateError', `Message: ${message.message}`); + message = await generateKeyFrameDoesNotThrow(sender.transform.port); + assert_equals(message.result, 'success'); senderPc.getTransceivers()[0].direction = 'sendonly'; await senderPc.setLocalDescription(); @@ -183,7 +182,7 @@ message = await generateKeyFrame(sender.transform.port); assert_equals(message.result, 'success'); -}, 'generateKeyFrame rejects when the sender is negotiated inactive, and resumes succeeding when negotiated back to active'); +}, 'generateKeyFrame does not reject when the sender is negotiated inactive, and resumes succeeding when negotiated back to active'); promise_test(async (test) => { const {sender, receiver, senderPc, receiverPc} = await createConnectionWithTransform(test, 'script-transform-generateKeyFrame.js', {video: true}); @@ -195,10 +194,9 @@ senderPc.getTransceivers()[0].stop(); - message = await generateKeyFrame(sender.transform.port); - assert_equals(message.result, 'failure'); - assert_equals(message.value, 'InvalidStateError', `Message: ${message.message}`); -}, 'generateKeyFrame rejects when the sender is stopped, even without negotiation'); + message = await generateKeyFrameDoesNotThrow(sender.transform.port); + assert_equals(message.result, 'success'); +}, 'generateKeyFrame does not reject when the sender is stopped, even without negotiation'); promise_test(async (test) => { const {sender, receiver, senderPc, receiverPc} = await createConnectionWithTransform(test, 'script-transform-generateKeyFrame.js', {video: true}); @@ -210,10 +208,9 @@ await senderPc.getTransceivers()[0].sender.replaceTrack(null); - message = await generateKeyFrame(sender.transform.port); - assert_equals(message.result, 'failure'); - assert_equals(message.value, 'InvalidStateError', `Message: ${message.message}`); -}, 'generateKeyFrame rejects with a null track'); + message = await generateKeyFrameDoesNotThrow(sender.transform.port); + assert_equals(message.result, 'success'); +}, 'generateKeyFrame does not reject with a null track'); // TODO: It would be nice to be able to test that pending generateKeyFrame // promises are _rejected_ when the transform is unset, or the sender stops
diff --git a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame.js b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame.js index 5e68ee1..bf8b753 100644 --- a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame.js +++ b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-generateKeyFrame.js
@@ -8,6 +8,8 @@ // Maybe refactor to have transaction ids? if (method == 'generateKeyFrame') { generateKeyFrame(rid); + } else if (method == 'generateKeyFrameDoesNotThrow') { + generateKeyFrameDoesNothThrow(rid); } else if (method == 'waitForFrame') { waitForFrame(); } @@ -23,6 +25,12 @@ }); } + async function resolveInMs(timeout) { + return new Promise((resolve) => { + setTimeout(resolve, timeout); + }); + } + async function generateKeyFrame(rid) { try { const timestamp = await Promise.race([transformer.generateKeyFrame(rid), rejectInMs(8000)]); @@ -33,6 +41,16 @@ } } + + async function generateKeyFrameDoesNothThrow(rid) { + try { + const timestamp = await Promise.race([transformer.generateKeyFrame(rid), resolveInMs(50)]); + transformer.options.port.postMessage({result: 'success', value: timestamp, count: keyFrameCount}); + } catch (e) { + transformer.options.port.postMessage({result: 'failure', value: `${e.name}`, message: `${e.message}`}); + } + } + async function waitForFrame() { try { await Promise.race([new Promise(r => gotFrameCallback = r), rejectInMs(8000)]);
diff --git a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https.html b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https.html index b67627dc..5cc5c6c 100644 --- a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https.html +++ b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https.html
@@ -17,6 +17,7 @@ <script> const sendKeyFrameRequest = (port, opts) => postMethod(port, 'sendKeyFrameRequest', opts); +const sendKeyFrameRequestDoesNotThrow = (port, opts) => postMethod(port, 'sendKeyFrameRequestDoesNotThrow', opts); const waitForFrame = port => postMethod(port, 'waitForFrame'); promise_test(async (test) => { @@ -61,8 +62,8 @@ // to stop working. This may change. receiver.transform = null; - assert_equals(await sendKeyFrameRequest(receiverTransform.port), 'failure: InvalidStateError'); -}, 'sendKeyFrameRequest throws for unset transforms'); + assert_equals(await sendKeyFrameRequestDoesNotThrow(receiverTransform.port), 'success'); +}, 'sendKeyFrameRequest does not throw for unset transforms'); promise_test(async (test) => { const {sender, receiver, senderPc, receiverPc} = await createConnectionWithTransform(test, 'script-transform-sendKeyFrameRequest.js', {video: true}); @@ -95,8 +96,8 @@ receiverPc.getTransceivers()[0].stop(); - assert_equals(await sendKeyFrameRequest(receiver.transform.port), 'success'); -}, 'sendKeyFrameRequest does not rejects when the receiver is stopped'); + assert_equals(await sendKeyFrameRequestDoesNotThrow(receiver.transform.port), 'success'); +}, 'sendKeyFrameRequest does not reject when the receiver is stopped'); // Testing that sendKeyFrameRequest actually results in the sending of keyframe // requests is effectively impossible, because there is no API to expose the
diff --git a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.js b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.js index 361d7ce..990b43d2 100644 --- a/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.js +++ b/third_party/blink/web_tests/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.js
@@ -6,6 +6,8 @@ const {method} = event.data; if (method == 'sendKeyFrameRequest') { sendKeyFrameRequest(); + } else if (method == 'sendKeyFrameRequestDoesNotThrow') { + sendKeyFrameRequestDoesNotThrow(); } else if (method == 'waitForFrame') { waitForFrame(); } @@ -21,6 +23,12 @@ }); } + async function resolveInMs(timeout) { + return new Promise((resolve) => { + setTimeout(resolve, timeout); + }); + } + async function sendKeyFrameRequest() { try { await Promise.race([transformer.sendKeyFrameRequest(), rejectInMs(8000)]);; @@ -31,6 +39,16 @@ } } + async function sendKeyFrameRequestDoesNotThrow() { + try { + await Promise.race([transformer.sendKeyFrameRequest(), resolveInMs(50)]);; + transformer.options.port.postMessage('success'); + } catch (e) { + // TODO: This does not work if we send e.name, why? + transformer.options.port.postMessage(`failure: ${e.name}`); + } + } + async function waitForFrame() { try { await Promise.race([new Promise(r => gotFrameCallback = r), rejectInMs(8000)]);
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/abs.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/abs.https.any_gpu-expected.txt index 115c6b25..37f7567 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/abs.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/abs.https.any_gpu-expected.txt
@@ -1,18 +1,4 @@ This is a testharness.js-based test. -[FAIL] abs float16 positive 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test abs float16 actual 0 should be close enough to expected 49.84375 by ULP distance: expected a number less than or equal to 0 but got 21051 -[FAIL] abs float16 negative 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test abs float16 actual 0 should be close enough to expected 91.0625 by ULP distance: expected a number less than or equal to 0 but got 21937 -[FAIL] abs float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test abs float16 actual 512 should be close enough to expected 49.84375 by ULP distance: expected a number less than or equal to 0 but got 3525 -[FAIL] abs float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test abs float16 actual 0 should be close enough to expected 49.84375 by ULP distance: expected a number less than or equal to 0 but got 21051 -[FAIL] abs float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test abs float16 actual 0 should be close enough to expected 49.84375 by ULP distance: expected a number less than or equal to 0 but got 21051 -[FAIL] abs float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test abs float16 actual 0 should be close enough to expected 49.84375 by ULP distance: expected a number less than or equal to 0 but got 21051 -[FAIL] abs float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test abs float16 actual 0 should be close enough to expected 49.84375 by ULP distance: expected a number less than or equal to 0 but got 21051 [FAIL] abs int8 4D tensor promise_test: Unhandled rejection with value: object "TypeError: Unsupported data type, input 'input' data type int8 must be one of [float32,float16,int32]." [FAIL] abs int64 4D tensor
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/averagePool2d.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/averagePool2d.https.any_gpu-expected.txt index 91336e2..e865937 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/averagePool2d.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/averagePool2d.https.any_gpu-expected.txt
@@ -9,43 +9,15 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float32 actual 50.03894805908203 should be close enough to expected 21.206613540649414 by ULP distance: expected a number less than or equal to 11n but got 10387645n [FAIL] averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float32 actual 50.03894805908203 should be close enough to expected 21.206613540649414 by ULP distance: expected a number less than or equal to 11n but got 10387645n -[FAIL] averagePool2d float16 4D constant tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 47.28125 by ULP distance: expected a number less than or equal to 27 but got 20969 -[FAIL] averagePool2d float16 4D tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 47.28125 by ULP distance: expected a number less than or equal to 27 but got 20969 -[FAIL] averagePool2d float16 4D tensor all negative default options - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected -49.25 by ULP distance: expected a number less than or equal to 27 but got 53800 -[FAIL] averagePool2d float16 4D tensor options.windowDimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 43.46875 by ULP distance: expected a number less than or equal to 11 but got 20847 -[FAIL] global averagePool2d float16 4D tensor all positive options.windowDimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 47.28125 by ULP distance: expected a number less than or equal to 27 but got 20969 -[FAIL] averagePool2d float16 4D tensor options.padding - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 52.4375 by ULP distance: expected a number less than or equal to 27 but got 21134 -[FAIL] averagePool2d float16 4D tensor options.strides - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 43.46875 by ULP distance: expected a number less than or equal to 11 but got 20847 [FAIL] averagePool2d float16 4D tensor options.dilations promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': Pool2d in tflite doesn't support dilations." -[FAIL] averagePool2d float16 4D tensor options.layout=nchw - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 47.28125 by ULP distance: expected a number less than or equal to 27 but got 20969 -[FAIL] averagePool2d float16 4D tensor options.layout=nhwc - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 47.28125 by ULP distance: expected a number less than or equal to 27 but got 20969 -[FAIL] global averagePool2d float16 4D tensor options.layout=nhwc and options.windowDimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 47.28125 by ULP distance: expected a number less than or equal to 27 but got 20969 -[FAIL] averagePool2d float16 4D tensor options.roundingType=floor - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 54.1875 by ULP distance: expected a number less than or equal to 11 but got 21190 [FAIL] averagePool2d float16 4D tensor options.roundingType=ceil - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 54.1875 by ULP distance: expected a number less than or equal to 11 but got 21190 + assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 50.03125 should be close enough to expected 21.203125 by ULP distance: expected a number less than or equal to 11 but got 1268 [FAIL] averagePool2d float16 4D tensor options.roundingType=ceil and no padding - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 51.1875 by ULP distance: expected a number less than or equal to 11 but got 21094 -[FAIL] averagePool2d float16 4D tensor options.layout=nhwc and options.roundingType=floor - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 54.1875 by ULP distance: expected a number less than or equal to 11 but got 21190 + assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 50.625 should be close enough to expected 40.28125 by ULP distance: expected a number less than or equal to 11 but got 331 [FAIL] averagePool2d float16 4D tensor options.layout=nhwc and options.roundingType=ceil - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 54.1875 by ULP distance: expected a number less than or equal to 11 but got 21190 + assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 50.03125 should be close enough to expected 21.203125 by ULP distance: expected a number less than or equal to 11 but got 1268 [FAIL] averagePool2d float16 4D tensor options.outputSizes ignores options.roundingType=floor - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 54.1875 by ULP distance: expected a number less than or equal to 11 but got 21190 -[FAIL] averagePool2d float16 4D tensor options.outputSizes ignores options.roundingType=ceil - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 54.1875 by ULP distance: expected a number less than or equal to 11 but got 21190 -[FAIL] averagePool2d float16 4D tensor options.dilations with options.strides - assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 0 should be close enough to expected 42.9375 by ULP distance: expected a number less than or equal to 11 but got 20830 + assert_less_than_equal: assert_array_approx_equals_ulp: test averagePool2d float16 actual 50.03125 should be close enough to expected 21.203125 by ULP distance: expected a number less than or equal to 11 but got 1268 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/batch_normalization.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/batch_normalization.https.any_gpu-expected.txt index f446892e..a2f029a 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/batch_normalization.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/batch_normalization.https.any_gpu-expected.txt
@@ -1,29 +1,7 @@ This is a testharness.js-based test. [FAIL] batchNormalization float32 2D constant tensors default options assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float32 actual -4.312742233276367 should be close enough to expected -6.995829105377197 by ULP distance: expected a number less than or equal to 6n but got 5626841n -[FAIL] batchNormalization float16 1D tensor options.axis=0 - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual 0 should be close enough to expected -4.3125 by ULP distance: expected a number less than or equal to 6 but got 50256 -[FAIL] batchNormalization float16 2D tensor (mean and variance are non-constant) default options - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual 0 should be close enough to expected -4.3125 by ULP distance: expected a number less than or equal to 6 but got 50256 [FAIL] batchNormalization float16 2D constant tensors default options - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual 0 should be close enough to expected -4.3125 by ULP distance: expected a number less than or equal to 6 but got 50256 -[FAIL] batchNormalization float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual 0 should be close enough to expected -4.3125 by ULP distance: expected a number less than or equal to 6 but got 50256 -[FAIL] batchNormalization float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual 0.0078125 should be close enough to expected -12.6328125 by ULP distance: expected a number less than or equal to 6 but got 43601 -[FAIL] batchNormalization float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual -2 should be close enough to expected -16.84375 by ULP distance: expected a number less than or equal to 6 but got 3126 -[FAIL] batchNormalization float16 4D NCHW tensor options.axis=1 - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual -2 should be close enough to expected -16.84375 by ULP distance: expected a number less than or equal to 6 but got 3126 -[FAIL] batchNormalization float16 4D NHWC tensor options.axis=3 - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual -2 should be close enough to expected -16.84375 by ULP distance: expected a number less than or equal to 6 but got 3126 -[FAIL] batchNormalization float16 4D NCHW tensor options.scale - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual -512 should be close enough to expected -1103 by ULP distance: expected a number less than or equal to 6 but got 1103 -[FAIL] batchNormalization float16 4D NCHW tensor options.bias - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual 512 should be close enough to expected 47.34375 by ULP distance: expected a number less than or equal to 6 but got 3605 -[FAIL] batchNormalization float16 4D NCHW tensor options.epsilon - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual -2 should be close enough to expected -16.84375 by ULP distance: expected a number less than or equal to 6 but got 3126 -[FAIL] batchNormalization float16 4D NHWC tensor all options - assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual -512 should be close enough to expected -1039 by ULP distance: expected a number less than or equal to 6 but got 1039 + assert_less_than_equal: assert_array_approx_equals_ulp: test batchNormalization float16 actual -4.3125 should be close enough to expected -6.99609375 by ULP distance: expected a number less than or equal to 6 but got 687 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cast.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cast.https.any_gpu-expected.txt new file mode 100644 index 0000000..ad71a68 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cast.https.any_gpu-expected.txt
@@ -0,0 +1,17 @@ +This is a testharness.js-based test. +[FAIL] cast float32 1D tensor to int32 + assert_less_than_equal: assert_array_approx_equals_ulp: test cast int32 actual 73 should be close enough to expected 72 by ULP distance: expected a number less than or equal to 0 but got 1 +[FAIL] cast float32 2D tensor to int32 + assert_less_than_equal: assert_array_approx_equals_ulp: test cast int32 actual 73 should be close enough to expected 72 by ULP distance: expected a number less than or equal to 0 but got 1 +[FAIL] cast float32 3D tensor to int32 + assert_less_than_equal: assert_array_approx_equals_ulp: test cast int32 actual 73 should be close enough to expected 72 by ULP distance: expected a number less than or equal to 0 but got 1 +[FAIL] cast float32 4D tensor to int32 + assert_less_than_equal: assert_array_approx_equals_ulp: test cast int32 actual 73 should be close enough to expected 72 by ULP distance: expected a number less than or equal to 0 but got 1 +[FAIL] cast float32 4D tensor to uint32 + assert_less_than_equal: assert_array_approx_equals_ulp: test cast uint32 actual 73 should be close enough to expected 72 by ULP distance: expected a number less than or equal to 0 but got 1 +[FAIL] cast float32 4D tensor to int8 + assert_less_than_equal: assert_array_approx_equals_ulp: test cast int8 actual 73 should be close enough to expected 72 by ULP distance: expected a number less than or equal to 0 but got 1 +[FAIL] cast float32 4D tensor to uint8 + assert_less_than_equal: assert_array_approx_equals_ulp: test cast uint8 actual 73 should be close enough to expected 72 by ULP distance: expected a number less than or equal to 0 but got 1 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/ceil.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/ceil.https.any_gpu-expected.txt deleted file mode 100644 index b5fb009d..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/ceil.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] ceil float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test ceil float16 actual 0 should be close enough to expected 68 by ULP distance: expected a number less than or equal to 0 but got 21568 -[FAIL] ceil float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test ceil float16 actual 0 should be close enough to expected 68 by ULP distance: expected a number less than or equal to 0 but got 21568 -[FAIL] ceil float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test ceil float16 actual 0 should be close enough to expected 68 by ULP distance: expected a number less than or equal to 0 but got 21568 -[FAIL] ceil float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test ceil float16 actual 0 should be close enough to expected 68 by ULP distance: expected a number less than or equal to 0 but got 21568 -[FAIL] ceil float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test ceil float16 actual 0 should be close enough to expected 68 by ULP distance: expected a number less than or equal to 0 but got 21568 -[FAIL] ceil float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test ceil float16 actual 0 should be close enough to expected 68 by ULP distance: expected a number less than or equal to 0 but got 21568 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/concat.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/concat.https.any_gpu-expected.txt deleted file mode 100644 index c8ce95a..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/concat.https.any_gpu-expected.txt +++ /dev/null
@@ -1,37 +0,0 @@ -This is a testharness.js-based test. -[FAIL] concat two float16 1D tensors of same shape along axis 0 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat three float16 1D tensors of different 1st dimension along axis 0 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat four float16 1D tensors of same 1st dimension along axis 0 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat four float16 1D tensors of different 1st dimension along axis 0 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat two float16 2D tensors of same shape along axis 0 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat two float16 2D tensors of same others dimensions except different 1st dimension along axis 0 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat four float16 2D tensors of same shape along axis 0 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat two float16 2D tensors of same others dimensions except different 2nd dimension along axis 1 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat three float16 2D tensors of same shape along axis 1 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat four float16 2D tensors of same others dimensions except different 2nd dimension along axis 1 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat two float16 3D tensors of same others dimensions except different 1st dimension along axis 0 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat four float16 3D tensors of same others dimensions except different 2nd dimension along axis 1 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat three float16 3D tensors of same shape along axis 2 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat two float16 4D tensors of same others dimensions except different 1st dimension along axis 0 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat three float16 4D tensors of same shape along axis 1 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat three float16 4D tensors of same others dimensions except different 3rd dimension along axis 2 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -[FAIL] concat four float16 4D tensors of same others dimensions except different 4th dimension along axis 3 - assert_less_than_equal: assert_array_approx_equals_ulp: test concat float16 actual -2 should be close enough to expected -0.39453125 by ULP distance: expected a number less than or equal to 0 but got 2480 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv2d.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv2d.https.any_gpu-expected.txt index 5be99e5c..d2490db 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv2d.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv2d.https.any_gpu-expected.txt
@@ -1,43 +1,3 @@ This is a testharness.js-based test. -[FAIL] conv2d float16 4D both input and filter non-constant tensors default options - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual 0 should be close enough to expected 1.5322265625 by ULP distance: expected a number less than or equal to 18 but got 15905 -[FAIL] conv2d float16 4D both input and filter constant tensors default options - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual 0.0078125 should be close enough to expected 1.5322265625 by ULP distance: expected a number less than or equal to 18 but got 7713 -[FAIL] conv2d float16 4D input and filter tensors default options - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual 512 should be close enough to expected 1.5322265625 by ULP distance: expected a number less than or equal to 18 but got 8671 -[FAIL] conv2d float16 4D input and filter tensors options.padding - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual 512 should be close enough to expected 1.0390625 by ULP distance: expected a number less than or equal to 18 but got 9176 -[FAIL] conv2d float16 4D input and filter tensors options.strides - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual 512 should be close enough to expected 1.5322265625 by ULP distance: expected a number less than or equal to 18 but got 8671 -[FAIL] conv2d float16 4D input and filter tensors options.dilations - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -512 should be close enough to expected 1.3603515625 by ULP distance: expected a number less than or equal to 18 but got 41615 -[FAIL] depthwise conv2d float16 4D input and filter tensors options.groups= input_channels - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual 2 should be close enough to expected 1.1806640625 by ULP distance: expected a number less than or equal to 8 but got 839 -[FAIL] conv2d float16 4D input and filter tensors options.inputLayout='nchw' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors options.inputLayout='nhwc' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors options.filterLayout='oihw' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors options.filterLayout='hwio' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors options.filterLayout='ohwi' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors options.filterLayout='ihwo' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='oihw' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='hwio' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ohwi' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ihwo' - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -2 should be close enough to expected 0.884765625 by ULP distance: expected a number less than or equal to 8 but got 34028 -[FAIL] conv2d float16 4D input and filter tensors 1D options.bias - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -512 should be close enough to expected 1.6982421875 by ULP distance: expected a number less than or equal to 8 but got 41269 -[FAIL] conv2d float16 4D input and filter tensors all options - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual -512 should be close enough to expected 0.6591796875 by ULP distance: expected a number less than or equal to 8 but got 42682 -[FAIL] conv2d float16 4D input and filter tensors, both negative input tensor and options.bias - assert_less_than_equal: assert_array_approx_equals_ulp: test conv2d float16 actual 0 should be close enough to expected -0.8271484375 by ULP distance: expected a number less than or equal to 8 but got 15006 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv_transpose2d.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv_transpose2d.https.any_gpu-expected.txt index 4e9b0031..ffe69c22 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv_transpose2d.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/conv_transpose2d.https.any_gpu-expected.txt
@@ -13,43 +13,11 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float32 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 18n but got 1065353216n [FAIL] convTranspose2d same output size different padding (padding=2, outputPadding=2)) assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float32 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 18n but got 1065353216n -[FAIL] convTranspose2d float16 4D both input and filter non-constant tensors default options - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual 0 should be close enough to expected 0.1934814453125 by ULP distance: expected a number less than or equal to 8 but got 12849 -[FAIL] convTranspose2d float16 4D both input and filter constant tensors default options - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual 0.0078125 should be close enough to expected 0.1934814453125 by ULP distance: expected a number less than or equal to 8 but got 4657 -[FAIL] convTranspose2d float16 4D input and filter tensors default options - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -2 should be close enough to expected 0.1934814453125 by ULP distance: expected a number less than or equal to 8 but got 36303 [FAIL] convTranspose2d float16 4D input and filter tensors options.padding assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual 0 should be close enough to expected 0.27880859375 by ULP distance: expected a number less than or equal to 8 but got 13430 [FAIL] convTranspose2d float16 input tensors options.padding is the same upper padding - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual 2 should be close enough to expected 0.5 by ULP distance: expected a number less than or equal to 18 but got 2048 -[FAIL] convTranspose2d float16 4D input and filter tensors options.strides - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 + assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual 1 should be close enough to expected 0.5 by ULP distance: expected a number less than or equal to 18 but got 1024 [FAIL] convTranspose2d float16 4D input and filter tensors options.dilations promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': convTranspose2d doesn't support dilations and groups." -[FAIL] convTranspose2d float16 4D input and filter tensors options.outputPadding - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.outputSizes - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.inputLayout=nchw - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.inputLayout=nhwc - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.filterLayout=iohw - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.filterLayout=hwoi - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.filterLayout=ohwi - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=iohw - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=hwoi - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=ohwi - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -0.0078125 should be close enough to expected 0.04827880859375 by ULP distance: expected a number less than or equal to 18 but got 30162 -[FAIL] convTranspose2d float16 4D input and filter tensors options.bias - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual -512 should be close enough to expected 0.52001953125 by ULP distance: expected a number less than or equal to 18 but got 42967 -[FAIL] convTranspose2d float16 4D input and filter tensors, both negative input tensor and options.bias - assert_less_than_equal: assert_array_approx_equals_ulp: test convTranspose2d float16 actual 0 should be close enough to expected -0.91259765625 by ULP distance: expected a number less than or equal to 18 but got 15181 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cos.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cos.https.any_gpu-expected.txt deleted file mode 100644 index bc83823..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cos.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] cos float16 0D scalar - assert_array_approx_equals: test cos float16 property 0, expected -0.73876953125 +/- 0.001953125, expected -0.73876953125 but got 0 -[FAIL] cos float16 1D constant tensor - assert_array_approx_equals: test cos float16 property 0, expected -0.73876953125 +/- 0.001953125, expected -0.73876953125 but got 0.0078125 -[FAIL] cos float16 1D tensor - assert_array_approx_equals: test cos float16 property 0, expected -0.73876953125 +/- 0.001953125, expected -0.73876953125 but got 0 -[FAIL] cos float16 2D tensor - assert_array_approx_equals: test cos float16 property 0, expected -0.73876953125 +/- 0.001953125, expected -0.73876953125 but got 0 -[FAIL] cos float16 3D tensor - assert_array_approx_equals: test cos float16 property 0, expected -0.73876953125 +/- 0.001953125, expected -0.73876953125 but got 0 -[FAIL] cos float16 4D tensor - assert_array_approx_equals: test cos float16 property 0, expected -0.73876953125 +/- 0.001953125, expected -0.73876953125 but got 0 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cumulative_sum.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cumulative_sum.https.any_gpu-expected.txt index a6e5a35..5496e5d 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cumulative_sum.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/cumulative_sum.https.any_gpu-expected.txt
@@ -3,11 +3,9 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test cumulativeSum float32 actual 60.42374038696289 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 3n but got 1114747369n [FAIL] cumulativeSum with float32 input and set reversed to true. assert_less_than_equal: assert_array_approx_equals_ulp: test cumulativeSum float32 actual 60.42374038696289 should be close enough to expected -61.1454659 by ULP distance: expected a number less than or equal to 3n but got 2229683934n -[FAIL] cumulativeSum with float16 input and default options. - assert_less_than_equal: assert_array_approx_equals_ulp: test cumulativeSum float16 actual 0 should be close enough to expected 60.4375 by ULP distance: expected a number less than or equal to 3 but got 21390 [FAIL] cumulativeSum with float16 input and set exclusive to true. - assert_less_than_equal: assert_array_approx_equals_ulp: test cumulativeSum float16 actual NaN should be close enough to expected 60.4375 by ULP distance: expected a number less than or equal to 3 but got 44018 + assert_less_than_equal: assert_array_approx_equals_ulp: test cumulativeSum float16 actual 60.4375 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 3 but got 21390 [FAIL] cumulativeSum with float16 input and set reversed to true. - assert_less_than_equal: assert_array_approx_equals_ulp: test cumulativeSum float16 actual 0 should be close enough to expected -61.15625 by ULP distance: expected a number less than or equal to 3 but got 54181 + assert_less_than_equal: assert_array_approx_equals_ulp: test cumulativeSum float16 actual 60.4375 should be close enough to expected -61.15625 by ULP distance: expected a number less than or equal to 3 but got 32791 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/dequantizeLinear.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/dequantizeLinear.https.any_gpu-expected.txt new file mode 100644 index 0000000..a67bda4 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/dequantizeLinear.https.any_gpu-expected.txt
@@ -0,0 +1,55 @@ +This is a testharness.js-based test. +[FAIL] dequantizeLinear int8 0D tensor with float32 0D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual 134.5 should be close enough to expected 134.43296813964844 by ULP distance: expected a number less than or equal to 1n but got 4393n +[FAIL] dequantizeLinear int8 0D constant tensor with float32 0D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual 134.375 should be close enough to expected 134.43296813964844 by ULP distance: expected a number less than or equal to 1n but got 3799n +[FAIL] dequantizeLinear uint8 1D constant tensor with float32 1D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual -1084 should be close enough to expected -1083.798828125 by ULP distance: expected a number less than or equal to 1n but got 1648n +[FAIL] dequantizeLinear uint8 1D constant tensor with negative float32 1D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual -1084 should be close enough to expected -1083.798828125 by ULP distance: expected a number less than or equal to 1n but got 1648n +[FAIL] dequantizeLinear uint8 1D constant tensor with float32 1D scale, implicit block_size = 2 + promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': DequantizeLinear can't support block-wise." +[FAIL] dequantizeLinear int8 4D constant tensor broadcasting float32 4D scale and int8 4D zeroPoint + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual -38.09375 should be close enough to expected -38.08934783935547 by ULP distance: expected a number less than or equal to 1n but got 1154n +[FAIL] dequantizeLinear int8 2D constant tensor with float32 2D scale, block_size = [3, 2] + promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': DequantizeLinear can't support block-wise." +[FAIL] dequantizeLinear uint4 1D tensor of even size with float32 1D scale + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] dequantizeLinear uint4 1D tensor of odd size with float32 1D scale + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] dequantizeLinear uint4 4D constant tensor with broadcasting float32 4D scale and uint4 4D zeroPoint + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] dequantizeLinear uint4 3D input with float32 3D scale, block_size = [1, 1, 2] + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] dequantizeLinear int4 1D tensor of even size with float32 1D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual -8.9609375 should be close enough to expected -8.962198257446289 by ULP distance: expected a number less than or equal to 1n but got 1322n +[FAIL] dequantizeLinear int4 1D tensor of odd size with float32 1D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual 2.240234375 should be close enough to expected 2.2405495643615723 by ULP distance: expected a number less than or equal to 1n but got 1322n +[FAIL] per-tensor dequantizeLinear for int4 4D constant with float32 4D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual -2.240234375 should be close enough to expected -2.2405495643615723 by ULP distance: expected a number less than or equal to 1n but got 1322n +[FAIL] dequantizeLinear int32 1D tensor with float32 1D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float32 actual -22400 should be close enough to expected -22405.495643615723 by ULP distance: expected a number less than or equal to 1n but got 2814n +[FAIL] quantizeLinear then dequantizeLinear with different float32 scale and int8 zeroPoint + assert_less_than_equal: assert_array_approx_equals_ulp: test quantizeLinear dequantizeLinear float32 actual -35.84375 should be close enough to expected -35.848793029785156 by ULP distance: expected a number less than or equal to 1n but got 1322n +[FAIL] dequantizeLinear uint8 1D constant tensor with float16 1D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float16 actual -972 should be close enough to expected -29.125 by ULP distance: expected a number less than or equal to 1 but got 5200 +[FAIL] dequantizeLinear uint8 1D constant tensor with negative float16 1D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float16 actual -972 should be close enough to expected -29.125 by ULP distance: expected a number less than or equal to 1 but got 5200 +[FAIL] dequantizeLinear uint8 1D constant tensor with float16 1D scale, implicit block_size = 2 + promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': DequantizeLinear can't support block-wise." +[FAIL] dequantizeLinear int8 2D constant tensor with float16 2D scale, block_size = [3, 2] + promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': DequantizeLinear can't support block-wise." +[FAIL] dequantizeLinear uint4 1D tensor of even size with float16 1D scale + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] dequantizeLinear uint4 1D tensor of odd size with float16 1D scale + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] dequantizeLinear uint4 4D constant tensor with broadcasting float16 4D scale and uint4 4D zeroPoint + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] dequantizeLinear uint4 3D input with float16 3D scale, block_size = [1, 1, 2] + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] dequantizeLinear int32 1D tensor with float16 1D scale + assert_less_than_equal: assert_array_approx_equals_ulp: test dequantizeLinear float16 actual Infinity should be close enough to expected 18336 by ULP distance: expected a number less than or equal to 1 but got 1926 +[FAIL] quantizeLinear then dequantizeLinear with different float16 scale and int8 zeroPoint + assert_less_than_equal: assert_array_approx_equals_ulp: test quantizeLinear dequantizeLinear float16 actual 14.5625 should be close enough to expected 3.640625 by ULP distance: expected a number less than or equal to 1 but got 2048 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/div.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/div.https.any_gpu-expected.txt deleted file mode 100644 index 28d6b4b..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/div.https.any_gpu-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -[FAIL] div float16 1D constant tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test div float16 actual -512 should be close enough to expected -0.63623046875 by ULP distance: expected a number less than or equal to 2 but got 9961 -[FAIL] div float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test div float16 actual 0 should be close enough to expected -0.63623046875 by ULP distance: expected a number less than or equal to 2 but got 47383 -[FAIL] div float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test div float16 actual 0 should be close enough to expected -0.63623046875 by ULP distance: expected a number less than or equal to 2 but got 47383 -[FAIL] div float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test div float16 actual 0 should be close enough to expected -0.63623046875 by ULP distance: expected a number less than or equal to 2 but got 47383 -[FAIL] div float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test div float16 actual 0 should be close enough to expected -0.63623046875 by ULP distance: expected a number less than or equal to 2 but got 47383 -[FAIL] div float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test div float16 actual 0 should be close enough to expected -0.69189453125 by ULP distance: expected a number less than or equal to 2 but got 47497 -[FAIL] div float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test div float16 actual 0 should be close enough to expected 0.62109375 by ULP distance: expected a number less than or equal to 2 but got 14584 -[FAIL] div float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test div float16 actual 0 should be close enough to expected 0.80517578125 by ULP distance: expected a number less than or equal to 2 but got 14961 -[FAIL] div float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test div float16 actual 0 should be close enough to expected -0.69189453125 by ULP distance: expected a number less than or equal to 2 but got 47497 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/elu.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/elu.https.any_gpu-expected.txt deleted file mode 100644 index a03e6a2..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/elu.https.any_gpu-expected.txt +++ /dev/null
@@ -1,25 +0,0 @@ -This is a testharness.js-based test. -[FAIL] elu float32 4D tensor positive options.alpha - promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': Setting a custom alpha is not supported in tflite schema." -[FAIL] elu float32 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': Setting a custom alpha is not supported in tflite schema." -[FAIL] elu float16 positive 0D scalar default options - assert_less_than_equal: assert_array_approx_equals_ulp: test elu float16 actual 0 should be close enough to expected 4.72265625 by ULP distance: expected a number less than or equal to 18 but got 17593 -[FAIL] elu float16 negative 0D scalar default options - assert_less_than_equal: assert_array_approx_equals_ulp: test elu float16 actual 0 should be close enough to expected -0.97900390625 by ULP distance: expected a number less than or equal to 18 but got 48085 -[FAIL] elu float16 1D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test elu float16 actual 0.0078125 should be close enough to expected 4.72265625 by ULP distance: expected a number less than or equal to 18 but got 9401 -[FAIL] elu float16 1D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test elu float16 actual 0 should be close enough to expected 4.72265625 by ULP distance: expected a number less than or equal to 18 but got 17593 -[FAIL] elu float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test elu float16 actual 0 should be close enough to expected 4.72265625 by ULP distance: expected a number less than or equal to 18 but got 17593 -[FAIL] elu float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test elu float16 actual 0 should be close enough to expected 4.72265625 by ULP distance: expected a number less than or equal to 18 but got 17593 -[FAIL] elu float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test elu float16 actual 0 should be close enough to expected 4.72265625 by ULP distance: expected a number less than or equal to 18 but got 17593 -[FAIL] elu float16 4D tensor positive options.alpha - promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': Setting a custom alpha is not supported in tflite schema." -[FAIL] elu float16 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': Setting a custom alpha is not supported in tflite schema." -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/equal.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/equal.https.any_gpu-expected.txt index 2b6ca0c..161043b 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/equal.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/equal.https.any_gpu-expected.txt
@@ -1,27 +1,7 @@ This is a testharness.js-based test. [FAIL] equal float32 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'equal' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] equal float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] equal float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] equal float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] equal float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] equal float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 [FAIL] equal float16 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'equal' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] equal float16 broadcast 0D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] equal float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] equal float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] equal float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] equal float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test equal uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/erf.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/erf.https.any_gpu-expected.txt index a0aba91..a9fa371 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/erf.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/erf.https.any_gpu-expected.txt
@@ -1,15 +1,5 @@ This is a testharness.js-based test. [FAIL] erf float16 0D scalar - assert_array_approx_equals: test erf float16 property 0, expected -0.004909515380859375 +/- 0.001953125, expected -0.004909515380859375 but got 0 -[FAIL] erf float16 1D constant tensor - assert_array_approx_equals: test erf float16 property 0, expected -0.5947265625 +/- 0.001953125, expected -0.5947265625 but got 0 -[FAIL] erf float16 1D tensor - assert_array_approx_equals: test erf float16 property 0, expected -0.5947265625 +/- 0.001953125, expected -0.5947265625 but got 0 -[FAIL] erf float16 2D tensor - assert_array_approx_equals: test erf float16 property 0, expected -0.5947265625 +/- 0.001953125, expected -0.5947265625 but got 0 -[FAIL] erf float16 3D tensor - assert_array_approx_equals: test erf float16 property 0, expected -0.5947265625 +/- 0.001953125, expected -0.5947265625 but got 0 -[FAIL] erf float16 4D tensor - assert_array_approx_equals: test erf float16 property 0, expected -0.5947265625 +/- 0.001953125, expected -0.5947265625 but got 0 + assert_array_approx_equals: test erf float16 property 0, expected -0.004909515380859375 +/- 0.001953125, expected -0.004909515380859375 but got -0.001953125 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/exp.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/exp.https.any_gpu-expected.txt index ce1e3d1..2f0ef7d 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/exp.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/exp.https.any_gpu-expected.txt
@@ -1,15 +1,11 @@ This is a testharness.js-based test. -[FAIL] exp float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 0 should be close enough to expected 1.408203125 by ULP distance: expected a number less than or equal to 1 but got 15778 -[FAIL] exp float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 2 should be close enough to expected 1.408203125 by ULP distance: expected a number less than or equal to 1 but got 606 [FAIL] exp float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 0 should be close enough to expected 1.408203125 by ULP distance: expected a number less than or equal to 1 but got 15778 + assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 0.03656005859375 should be close enough to expected 0.0364990234375 by ULP distance: expected a number less than or equal to 1 but got 2 [FAIL] exp float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 0 should be close enough to expected 1.408203125 by ULP distance: expected a number less than or equal to 1 but got 15778 + assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 0.03656005859375 should be close enough to expected 0.0364990234375 by ULP distance: expected a number less than or equal to 1 but got 2 [FAIL] exp float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 0 should be close enough to expected 1.408203125 by ULP distance: expected a number less than or equal to 1 but got 15778 + assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 0.03656005859375 should be close enough to expected 0.0364990234375 by ULP distance: expected a number less than or equal to 1 but got 2 [FAIL] exp float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 0 should be close enough to expected 1.408203125 by ULP distance: expected a number less than or equal to 1 but got 15778 + assert_less_than_equal: assert_array_approx_equals_ulp: test exp float16 actual 0.03656005859375 should be close enough to expected 0.0364990234375 by ULP distance: expected a number less than or equal to 1 but got 2 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/expand.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/expand.https.any_gpu-expected.txt deleted file mode 100644 index 1fa4f79..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/expand.https.any_gpu-expected.txt +++ /dev/null
@@ -1,47 +0,0 @@ -This is a testharness.js-based test. -[FAIL] expand float16 0D scalar to 1D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 0D scalar to 2D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 0D scalar to 3D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 0D scalar to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 0D scalar to 5D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 1D constant tensor to 1D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual -2 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 1654 -[FAIL] expand float16 1D tensor to 1D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 1D tensor to 2D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 1D tensor to 3D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 1D tensor to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 1D tensor to 5D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 2D tensor to 2D (1st dimension) - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual -Infinity should be close enough to expected 10.8984375 by ULP distance: expected a number less than or equal to 0 but got 45709 -[FAIL] expand float16 2D tensor to 2D (2nd dimension) - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual Infinity should be close enough to expected 4.96484375 by ULP distance: expected a number less than or equal to 0 but got 14089 -[FAIL] expand float16 2D tensor to 2D (all dimensions) - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 2D tensor to 3D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual Infinity should be close enough to expected 4.96484375 by ULP distance: expected a number less than or equal to 0 but got 14089 -[FAIL] expand float16 2D tensor to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual -Infinity should be close enough to expected 10.8984375 by ULP distance: expected a number less than or equal to 0 but got 45709 -[FAIL] expand float16 2D tensor to 5D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual 0 should be close enough to expected -6.4609375 by ULP distance: expected a number less than or equal to 0 but got 18038 -[FAIL] expand float16 3D tensor to 3D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual -Infinity should be close enough to expected 21.6875 by ULP distance: expected a number less than or equal to 0 but got 44692 -[FAIL] expand float16 3D tensor to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual -Infinity should be close enough to expected 21.6875 by ULP distance: expected a number less than or equal to 0 but got 44692 -[FAIL] expand float16 3D tensor to 5D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual -Infinity should be close enough to expected 21.6875 by ULP distance: expected a number less than or equal to 0 but got 44692 -[FAIL] expand float16 4D tensor to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual -Infinity should be close enough to expected 12.796875 by ULP distance: expected a number less than or equal to 0 but got 45466 -[FAIL] expand float16 4D tensor to 5D - assert_less_than_equal: assert_array_approx_equals_ulp: test expand float16 actual -Infinity should be close enough to expected 12.796875 by ULP distance: expected a number less than or equal to 0 but got 45466 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/floor.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/floor.https.any_gpu-expected.txt deleted file mode 100644 index c059f47..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/floor.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] floor float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test floor float16 actual 0 should be close enough to expected 89 by ULP distance: expected a number less than or equal to 0 but got 21904 -[FAIL] floor float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test floor float16 actual 0 should be close enough to expected 89 by ULP distance: expected a number less than or equal to 0 but got 21904 -[FAIL] floor float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test floor float16 actual 0 should be close enough to expected 89 by ULP distance: expected a number less than or equal to 0 but got 21904 -[FAIL] floor float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test floor float16 actual 0 should be close enough to expected 89 by ULP distance: expected a number less than or equal to 0 but got 21904 -[FAIL] floor float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test floor float16 actual 0 should be close enough to expected 89 by ULP distance: expected a number less than or equal to 0 but got 21904 -[FAIL] floor float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test floor float16 actual 0 should be close enough to expected 89 by ULP distance: expected a number less than or equal to 0 but got 21904 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gather.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gather.https.any_gpu-expected.txt index 60f07773..d2490db 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gather.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gather.https.any_gpu-expected.txt
@@ -1,41 +1,3 @@ This is a testharness.js-based test. -[FAIL] gather float32 2D tensor and int32 0D negative indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float32 actual 0 should be close enough to expected -66.05901336669922 by ULP distance: expected a number less than or equal to 0n but got 1115954743n -[FAIL] gather float32 2D tensor and int32 0D out-of-bound positive indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float32 actual 0 should be close enough to expected 90.2870101928711 by ULP distance: expected a number less than or equal to 0n but got 1119130355n -[FAIL] gather float32 2D tensor and int32 0D out-of-bound negative indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float32 actual 0 should be close enough to expected -66.05901336669922 by ULP distance: expected a number less than or equal to 0n but got 1115954743n -[FAIL] gather float16 1D tensor and uint32 0D scalar indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual Infinity should be close enough to expected 89.0625 by ULP distance: expected a number less than or equal to 0 but got 9839 -[FAIL] gather float16 1D tensor and int64 0D scalar indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual Infinity should be close enough to expected 89.0625 by ULP distance: expected a number less than or equal to 0 but got 9839 -[FAIL] gather float16 1D tensor and int32 0D scalar indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual Infinity should be close enough to expected 89.0625 by ULP distance: expected a number less than or equal to 0 but got 9839 -[FAIL] gather float16 1D tensor and int32 2D indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual 0 should be close enough to expected 44.90625 by ULP distance: expected a number less than or equal to 0 but got 20893 -[FAIL] gather float16 1D tensor and int32 3D indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual 0 should be close enough to expected -19.6875 by ULP distance: expected a number less than or equal to 0 but got 52460 -[FAIL] gather float16 1D tensor and int32 4D indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual 0 should be close enough to expected -37.6875 by ULP distance: expected a number less than or equal to 0 but got 53430 -[FAIL] gather float16 2D tensor and 0D scalar indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual 0 should be close enough to expected 25.765625 by ULP distance: expected a number less than or equal to 0 but got 20081 -[FAIL] gather float16 2D tensor and 2D indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual -Infinity should be close enough to expected 51.8125 by ULP distance: expected a number less than or equal to 0 but got 43398 -[FAIL] gather float16 2D tensor and 3D indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual 0 should be close enough to expected 10.828125 by ULP distance: expected a number less than or equal to 0 but got 18794 -[FAIL] gather float16 2D tensor and 4D indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual 0 should be close enough to expected 90.3125 by ULP distance: expected a number less than or equal to 0 but got 21925 -[FAIL] gather float16 3D tensor and 2D indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual 0 should be close enough to expected 10.828125 by ULP distance: expected a number less than or equal to 0 but got 18794 -[FAIL] gather float16 4D tensor and 2D indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual -Infinity should be close enough to expected -66.0625 by ULP distance: expected a number less than or equal to 0 but got 10207 -[FAIL] gather float16 3D tensor and 2D indices options.axis=2 - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual -Infinity should be close enough to expected -66.0625 by ULP distance: expected a number less than or equal to 0 but got 10207 -[FAIL] gather float16 4D tensor and 2D indices explict options.axis=0 - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual -Infinity should be close enough to expected -66.0625 by ULP distance: expected a number less than or equal to 0 but got 10207 -[FAIL] gather float16 5D tensor and 0D scalar indices options.axis=4 - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual -512 should be close enough to expected -68.9375 by ULP distance: expected a number less than or equal to 0 but got 2993 -[FAIL] gather float16 2D tensor and int32 0D negative indices default options - assert_less_than_equal: assert_array_approx_equals_ulp: test gather float16 actual 0 should be close enough to expected -66.0625 by ULP distance: expected a number less than or equal to 0 but got 54305 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gatherElements.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gatherElements.https.any_gpu-expected.txt deleted file mode 100644 index fee73c9d..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gatherElements.https.any_gpu-expected.txt +++ /dev/null
@@ -1,13 +0,0 @@ -This is a testharness.js-based test. -[FAIL] gatherElements float16 2D input and uint32 indices options.axis=1 - assert_less_than_equal: assert_array_approx_equals_ulp: test gatherElements float16 actual -Infinity should be close enough to expected -68.9375 by ULP distance: expected a number less than or equal to 0 but got 10161 -[FAIL] gatherElements float16 2D input and int32 indices options.axis=1 - assert_less_than_equal: assert_array_approx_equals_ulp: test gatherElements float16 actual -Infinity should be close enough to expected -68.9375 by ULP distance: expected a number less than or equal to 0 but got 10161 -[FAIL] gatherElements float16 2D input and int32 indices options.axis=0 - assert_less_than_equal: assert_array_approx_equals_ulp: test gatherElements float16 actual Infinity should be close enough to expected -26.15625 by ULP distance: expected a number less than or equal to 0 but got 21130 -[FAIL] gatherElements float16 3D input and int32 indices options.axis=0 - assert_less_than_equal: assert_array_approx_equals_ulp: test gatherElements float16 actual 0 should be close enough to expected 89.0625 by ULP distance: expected a number less than or equal to 0 but got 21905 -[FAIL] gatherElements float16 3D input and int32 negative indices - assert_less_than_equal: assert_array_approx_equals_ulp: test gatherElements float16 actual 0 should be close enough to expected 89.0625 by ULP distance: expected a number less than or equal to 0 but got 21905 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gatherND.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gatherND.https.any_gpu-expected.txt index c12bf13e..39c26b6e 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gatherND.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gatherND.https.any_gpu-expected.txt
@@ -3,9 +3,5 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test gatherND float32 actual -66.05901336669922 should be close enough to expected 90.2870101928711 by ULP distance: expected a number less than or equal to 0n but got 2235085098n [FAIL] gatherND float16 3D input and 2D indices assert_less_than_equal: assert_array_approx_equals_ulp: test gatherND float16 actual -66.0625 should be close enough to expected 90.3125 by ULP distance: expected a number less than or equal to 0 but got 32380 -[FAIL] gatherND float16 4D input and 1D uint32 indices - assert_less_than_equal: assert_array_approx_equals_ulp: test gatherND float16 actual 0 should be close enough to expected 51.8125 by ULP distance: expected a number less than or equal to 0 but got 21114 -[FAIL] gatherND float16 4D input and 1D int64 indices - assert_less_than_equal: assert_array_approx_equals_ulp: test gatherND float16 actual 0 should be close enough to expected 51.8125 by ULP distance: expected a number less than or equal to 0 but got 21114 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gelu.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gelu.https.any_gpu-expected.txt deleted file mode 100644 index 4254bab..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gelu.https.any_gpu-expected.txt +++ /dev/null
@@ -1,13 +0,0 @@ -This is a testharness.js-based test. -[FAIL] gelu float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test gelu float16 actual 0 should be close enough to expected -0.021636962890625 by ULP distance: expected a number less than or equal to 18 but got 42378 -[FAIL] gelu float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test gelu float16 actual 0 should be close enough to expected 0.71142578125 by ULP distance: expected a number less than or equal to 18 but got 14769 -[FAIL] gelu float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test gelu float16 actual 0 should be close enough to expected 0.71142578125 by ULP distance: expected a number less than or equal to 18 but got 14769 -[FAIL] gelu float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test gelu float16 actual 0 should be close enough to expected 0.71142578125 by ULP distance: expected a number less than or equal to 18 but got 14769 -[FAIL] gelu float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test gelu float16 actual 0 should be close enough to expected 0.71142578125 by ULP distance: expected a number less than or equal to 18 but got 14769 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/greater.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/greater.https.any_gpu-expected.txt index 08c08d0..a0c14dc 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/greater.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/greater.https.any_gpu-expected.txt
@@ -1,27 +1,7 @@ This is a testharness.js-based test. [FAIL] greater float32 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'greater' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] greater float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greater float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greater float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greater float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greater float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 [FAIL] greater float16 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'greater' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] greater float16 broadcast 0D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greater float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greater float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greater float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greater float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greater uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/greater_or_equal.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/greater_or_equal.https.any_gpu-expected.txt index 3765e2d..89a23ab 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/greater_or_equal.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/greater_or_equal.https.any_gpu-expected.txt
@@ -1,27 +1,7 @@ This is a testharness.js-based test. [FAIL] greaterOrEqual float32 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'greaterOrEqual' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] greaterOrEqual float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greaterOrEqual float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greaterOrEqual float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greaterOrEqual float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greaterOrEqual float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 [FAIL] greaterOrEqual float16 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'greaterOrEqual' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] greaterOrEqual float16 broadcast 0D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greaterOrEqual float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greaterOrEqual float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greaterOrEqual float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] greaterOrEqual float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test greaterOrEqual uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gru.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gru.https.any_gpu-expected.txt index 0e4e7b061..fd09b6b 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gru.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gru.https.any_gpu-expected.txt
@@ -5,20 +5,6 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test gru float32 actual -0.375 should be close enough to expected -0.28068751096725464 by ULP distance: expected a number less than or equal to 6n but got 3164602n [FAIL] gru float32 tensors steps=2 with all options assert_less_than_equal: assert_array_approx_equals_ulp: test gru float32 actual -0.25 should be close enough to expected -0.24974998831748962 by ULP distance: expected a number less than or equal to 6n but got 16778n -[FAIL] gru float16 tensors steps=1 with options.bias, options.recurrentBias and options.activations=['relu', 'relu'] - assert_less_than_equal: assert_array_approx_equals_ulp: test gru float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 6 but got 46080 -[FAIL] gru float16 tensors steps=1 with options.bias, options.recurrentBias and options.activations=['relu', 'relu'] and resetAfter=true - assert_less_than_equal: assert_array_approx_equals_ulp: test gru float16 actual 0 should be close enough to expected -0.375 by ULP distance: expected a number less than or equal to 6 but got 46592 -[FAIL] gru float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu'] and explicit options.direction='forward' - assert_less_than_equal: assert_array_approx_equals_ulp: test gru float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 6 but got 46080 -[FAIL] gru float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu'] and explicit options.layout='zrn' - assert_less_than_equal: assert_array_approx_equals_ulp: test gru float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 6 but got 46080 -[FAIL] gru float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu'] and options.layout='rzn' - assert_less_than_equal: assert_array_approx_equals_ulp: test gru float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 6 but got 46080 -[FAIL] gru float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu'] and options.initialHiddenState - assert_less_than_equal: assert_array_approx_equals_ulp: test gru float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 6 but got 46080 -[FAIL] gru float16 tensors steps=1 all options - assert_less_than_equal: assert_array_approx_equals_ulp: test gru float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 6 but got 46080 [FAIL] gru float16 tensors steps=2 with options.bias, options.recurrentBias, options.direction='backward', options.activations=['relu', 'relu'] and options.returnSequence=true assert_less_than_equal: assert_array_approx_equals_ulp: test gru float16 actual -4.7578125 should be close enough to expected -18.59375 by ULP distance: expected a number less than or equal to 6 but got 2020 [FAIL] gru float16 tensors steps=2 with options.bias, options.recurrentBias, options.direction='both' and options.returnSequence=true
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gru_cell.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gru_cell.https.any_gpu-expected.txt index 6932c23..d2490db 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gru_cell.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gru_cell.https.any_gpu-expected.txt
@@ -1,11 +1,3 @@ This is a testharness.js-based test. -[FAIL] gruCell float16 tensors with options.bias, options.recurrentBias and options.activations=['relu', 'relu'] - assert_less_than_equal: assert_array_approx_equals_ulp: test gruCell float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 3 but got 46080 -[FAIL] gruCell float16 tensors with options.bias, options.recurrentBias, options.activations=['relu', 'relu'] and explicit options.layout='zrn' - assert_less_than_equal: assert_array_approx_equals_ulp: test gruCell float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 3 but got 46080 -[FAIL] gruCell float16 tensors with options.bias, options.recurrentBias, options.activations=['relu', 'relu'] and and options.layout='rzn' - assert_less_than_equal: assert_array_approx_equals_ulp: test gruCell float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 3 but got 46080 -[FAIL] gruCell float16 tensors with all options - assert_less_than_equal: assert_array_approx_equals_ulp: test gruCell float16 actual 0 should be close enough to expected -0.25 by ULP distance: expected a number less than or equal to 3 but got 46080 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/hard_sigmoid.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/hard_sigmoid.https.any_gpu-expected.txt deleted file mode 100644 index 08f2049..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/hard_sigmoid.https.any_gpu-expected.txt +++ /dev/null
@@ -1,25 +0,0 @@ -This is a testharness.js-based test. -[FAIL] hardSigmoid float16 positive 0D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.5 should be close enough to expected 0.51171875 by ULP distance: expected a number less than or equal to 2 but got 24 -[FAIL] hardSigmoid float16 positive 1D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.5 should be close enough to expected 0.51171875 by ULP distance: expected a number less than or equal to 2 but got 24 -[FAIL] hardSigmoid float16 positive 1D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.5 should be close enough to expected 0.51171875 by ULP distance: expected a number less than or equal to 2 but got 24 -[FAIL] hardSigmoid float16 positive 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.5 should be close enough to expected 0.51171875 by ULP distance: expected a number less than or equal to 2 but got 24 -[FAIL] hardSigmoid float16 positive 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.5 should be close enough to expected 0.51171875 by ULP distance: expected a number less than or equal to 2 but got 24 -[FAIL] hardSigmoid float16 positive 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.5 should be close enough to expected 0.51171875 by ULP distance: expected a number less than or equal to 2 but got 24 -[FAIL] hardSigmoid float16 positive 4D tensor specified positive options.alpha default options.beta - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.50048828125 should be close enough to expected 0.54638671875 by ULP distance: expected a number less than or equal to 2 but got 94 -[FAIL] hardSigmoid float16 negative 4D tensor specified negative options.alpha default options.beta - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.50048828125 should be close enough to expected 0.54638671875 by ULP distance: expected a number less than or equal to 2 but got 94 -[FAIL] hardSigmoid float16 positive 4D tensor specified positive options.beta default options.alpha - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.436279296875 should be close enough to expected 0.447998046875 by ULP distance: expected a number less than or equal to 2 but got 48 -[FAIL] hardSigmoid float16 positive 4D tensor specified all options (positive options.alpha and positive options.beta) - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.4365234375 should be close enough to expected 0.482666015625 by ULP distance: expected a number less than or equal to 2 but got 189 -[FAIL] hardSigmoid float16 negative 4D tensor specified all options (negative options.alpha and positive options.beta) - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSigmoid float16 actual 0.4365234375 should be close enough to expected 0.482666015625 by ULP distance: expected a number less than or equal to 2 but got 189 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/hard_swish.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/hard_swish.https.any_gpu-expected.txt deleted file mode 100644 index 537c778..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/hard_swish.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] hardSwish float16 0D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSwish float16 actual 0 should be close enough to expected 0.45703125 by ULP distance: expected a number less than or equal to 4 but got 14160 -[FAIL] hardSwish float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSwish float16 actual 0 should be close enough to expected 0.45703125 by ULP distance: expected a number less than or equal to 4 but got 14160 -[FAIL] hardSwish float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSwish float16 actual 0 should be close enough to expected 0.45703125 by ULP distance: expected a number less than or equal to 4 but got 14160 -[FAIL] hardSwish float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSwish float16 actual 0 should be close enough to expected 0.45703125 by ULP distance: expected a number less than or equal to 4 but got 14160 -[FAIL] hardSwish float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSwish float16 actual 0 should be close enough to expected 0.45703125 by ULP distance: expected a number less than or equal to 4 but got 14160 -[FAIL] hardSwish float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test hardSwish float16 actual 0 should be close enough to expected 0.45703125 by ULP distance: expected a number less than or equal to 4 but got 14160 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.serviceworker_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.serviceworker_gpu-expected.txt index 20338bd3..a5ebd50 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.serviceworker_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.serviceworker_gpu-expected.txt
@@ -9,17 +9,5 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test identity float32 actual 0.37744140625 should be close enough to expected 0.377551406621933 by ULP distance: expected a number less than or equal to 0n but got 3691n [FAIL] identity float32 4D tensor assert_less_than_equal: assert_array_approx_equals_ulp: test identity float32 actual 0.37744140625 should be close enough to expected 0.377551406621933 by ULP distance: expected a number less than or equal to 0n but got 3691n -[FAIL] identity float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 0 should be close enough to expected -4.2734375 by ULP distance: expected a number less than or equal to 0 but got 50246 -[FAIL] identity float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.sharedworker_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.sharedworker_gpu-expected.txt index 20338bd3..a5ebd50 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.sharedworker_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.sharedworker_gpu-expected.txt
@@ -9,17 +9,5 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test identity float32 actual 0.37744140625 should be close enough to expected 0.377551406621933 by ULP distance: expected a number less than or equal to 0n but got 3691n [FAIL] identity float32 4D tensor assert_less_than_equal: assert_array_approx_equals_ulp: test identity float32 actual 0.37744140625 should be close enough to expected 0.377551406621933 by ULP distance: expected a number less than or equal to 0n but got 3691n -[FAIL] identity float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 0 should be close enough to expected -4.2734375 by ULP distance: expected a number less than or equal to 0 but got 50246 -[FAIL] identity float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.worker_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.worker_gpu-expected.txt index 20338bd3..a5ebd50 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.worker_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any.worker_gpu-expected.txt
@@ -9,17 +9,5 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test identity float32 actual 0.37744140625 should be close enough to expected 0.377551406621933 by ULP distance: expected a number less than or equal to 0n but got 3691n [FAIL] identity float32 4D tensor assert_less_than_equal: assert_array_approx_equals_ulp: test identity float32 actual 0.37744140625 should be close enough to expected 0.377551406621933 by ULP distance: expected a number less than or equal to 0n but got 3691n -[FAIL] identity float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 0 should be close enough to expected -4.2734375 by ULP distance: expected a number less than or equal to 0 but got 50246 -[FAIL] identity float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any_gpu-expected.txt index 20338bd3..a5ebd50 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/identity.https.any_gpu-expected.txt
@@ -9,17 +9,5 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test identity float32 actual 0.37744140625 should be close enough to expected 0.377551406621933 by ULP distance: expected a number less than or equal to 0n but got 3691n [FAIL] identity float32 4D tensor assert_less_than_equal: assert_array_approx_equals_ulp: test identity float32 actual 0.37744140625 should be close enough to expected 0.377551406621933 by ULP distance: expected a number less than or equal to 0n but got 3691n -[FAIL] identity float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 0 should be close enough to expected -4.2734375 by ULP distance: expected a number less than or equal to 0 but got 50246 -[FAIL] identity float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 -[FAIL] identity float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test identity float16 actual 2 should be close enough to expected 0.37744140625 by ULP distance: expected a number less than or equal to 0 but got 2550 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/instance_normalization.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/instance_normalization.https.any_gpu-expected.txt deleted file mode 100644 index 0d3408f..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/instance_normalization.https.any_gpu-expected.txt +++ /dev/null
@@ -1,17 +0,0 @@ -This is a testharness.js-based test. -[FAIL] instanceNormalization float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test instanceNormalization float16 actual 0 should be close enough to expected -1.099609375 by ULP distance: expected a number less than or equal to 8400 but got 48230 -[FAIL] instanceNormalization float16 4D tensor options.scale - assert_less_than_equal: assert_array_approx_equals_ulp: test instanceNormalization float16 actual NaN should be close enough to expected 103.8125 by ULP distance: expected a number less than or equal to 8400 but got 42883 -[FAIL] instanceNormalization float16 4D tensor options.bias - assert_less_than_equal: assert_array_approx_equals_ulp: test instanceNormalization float16 actual NaN should be close enough to expected -34.15625 by ULP distance: expected a number less than or equal to 8400 but got 11707 -[FAIL] instanceNormalization float16 4D tensor options.epsilon - assert_less_than_equal: assert_array_approx_equals_ulp: test instanceNormalization float16 actual 0 should be close enough to expected -1.099609375 by ULP distance: expected a number less than or equal to 8400 but got 48230 -[FAIL] instanceNormalization float16 4D tensor explicit options.layout='nchw' - assert_less_than_equal: assert_array_approx_equals_ulp: test instanceNormalization float16 actual 0 should be close enough to expected -1.099609375 by ULP distance: expected a number less than or equal to 8400 but got 48230 -[FAIL] instanceNormalization float16 4D tensor options.layout='nhwc' - assert_less_than_equal: assert_array_approx_equals_ulp: test instanceNormalization float16 actual 0 should be close enough to expected -1.099609375 by ULP distance: expected a number less than or equal to 8400 but got 48230 -[FAIL] instanceNormalization float16 4D tensor all options - assert_less_than_equal: assert_array_approx_equals_ulp: test instanceNormalization float16 actual NaN should be close enough to expected 70.75 by ULP distance: expected a number less than or equal to 8400 but got 43412 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/layer_normalization.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/layer_normalization.https.any_gpu-expected.txt index 80368bd..d2490db 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/layer_normalization.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/layer_normalization.https.any_gpu-expected.txt
@@ -1,23 +1,3 @@ This is a testharness.js-based test. -[FAIL] layerNormalization float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual 0 should be close enough to expected -1.0224609375 by ULP distance: expected a number less than or equal to 14 but got 48151 -[FAIL] layerNormalization float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual 0 should be close enough to expected -1.4052734375 by ULP distance: expected a number less than or equal to 14 but got 48543 -[FAIL] layerNormalization float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual 0 should be close enough to expected -1.4052734375 by ULP distance: expected a number less than or equal to 14 but got 48543 -[FAIL] layerNormalization float16 4D tensor options.scale - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual NaN should be close enough to expected 5.37109375 by ULP distance: expected a number less than or equal to 14 but got 47265 -[FAIL] layerNormalization float16 4D tensor options.bias - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual NaN should be close enough to expected 6.45703125 by ULP distance: expected a number less than or equal to 14 but got 46987 -[FAIL] layerNormalization float16 4D tensor options.axes=[2] - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual 0 should be close enough to expected -0.60107421875 by ULP distance: expected a number less than or equal to 14 but got 47311 -[FAIL] layerNormalization float16 4D tensor options.epsilon - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual 0 should be close enough to expected -1.4052734375 by ULP distance: expected a number less than or equal to 14 but got 48543 -[FAIL] layerNormalization float16 4D tensor options.scale and options.axes=[0, 2] - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual NaN should be close enough to expected -3.37109375 by ULP distance: expected a number less than or equal to 14 but got 15170 -[FAIL] layerNormalization float16 4D tensor options.bias and options.axes=[3, 1, 2] - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual NaN should be close enough to expected -1.544921875 by ULP distance: expected a number less than or equal to 14 but got 16338 -[FAIL] layerNormalization float16 4D tensor all options - assert_less_than_equal: assert_array_approx_equals_ulp: test layerNormalization float16 actual NaN should be close enough to expected -15.484375 by ULP distance: expected a number less than or equal to 14 but got 12866 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lesser.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lesser.https.any_gpu-expected.txt index af23dfce..47a8d2d 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lesser.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lesser.https.any_gpu-expected.txt
@@ -1,27 +1,7 @@ This is a testharness.js-based test. [FAIL] lesser float32 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'lesser' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] lesser float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesser float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesser float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesser float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesser float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 [FAIL] lesser float16 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'lesser' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] lesser float16 broadcast 0D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesser float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesser float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesser float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesser float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesser uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lesser_or_equal.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lesser_or_equal.https.any_gpu-expected.txt index 657380e..7eee30b 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lesser_or_equal.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lesser_or_equal.https.any_gpu-expected.txt
@@ -1,25 +1,7 @@ This is a testharness.js-based test. [FAIL] lesserOrEqual float32 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'lesserOrEqual' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] lesserOrEqual float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test lesserOrEqual uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesserOrEqual float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test lesserOrEqual uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesserOrEqual float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test lesserOrEqual uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesserOrEqual float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test lesserOrEqual uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 [FAIL] lesserOrEqual float16 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'lesserOrEqual' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] lesserOrEqual float16 broadcast 0D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesserOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesserOrEqual float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesserOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesserOrEqual float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesserOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesserOrEqual float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesserOrEqual uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] lesserOrEqual float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test lesserOrEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/log.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/log.https.any_gpu-expected.txt deleted file mode 100644 index e6eff29d..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/log.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] log float16 positive 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test log float16 actual 0 should be close enough to expected 4.15625 by ULP distance: expected a number less than or equal to 8 but got 17448 -[FAIL] log float16 positive 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test log float16 actual 0 should be close enough to expected 4.15625 by ULP distance: expected a number less than or equal to 8 but got 17448 -[FAIL] log float16 positive 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test log float16 actual 0 should be close enough to expected 4.15625 by ULP distance: expected a number less than or equal to 8 but got 17448 -[FAIL] log float16 positive 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test log float16 actual 0 should be close enough to expected 4.15625 by ULP distance: expected a number less than or equal to 8 but got 17448 -[FAIL] log float16 positive 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test log float16 actual 0 should be close enough to expected 4.15625 by ULP distance: expected a number less than or equal to 8 but got 17448 -[FAIL] log float16 positive 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test log float16 actual 0 should be close enough to expected 4.15625 by ULP distance: expected a number less than or equal to 8 but got 17448 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_and.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_and.https.any_gpu-expected.txt new file mode 100644 index 0000000..738cd2d --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_and.https.any_gpu-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +[FAIL] logicalAnd uint8 5D tensors + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'logicalAnd' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_or.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_or.https.any_gpu-expected.txt new file mode 100644 index 0000000..8501d44 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_or.https.any_gpu-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +[FAIL] logicalOr uint8 5D tensors + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'logicalOr' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_xor.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_xor.https.any_gpu-expected.txt new file mode 100644 index 0000000..e8584d4 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/logical_xor.https.any_gpu-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +[FAIL] logicalXor uint8 5D tensors + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'logicalXor' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lstm.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lstm.https.any_gpu-expected.txt index c68ae01..1e7207b 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lstm.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lstm.https.any_gpu-expected.txt
@@ -3,28 +3,6 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float32 actual 1 should be close enough to expected 10.469000816345215 by ULP distance: expected a number less than or equal to 3n but got 27754759n [FAIL] lstm float32 tensors steps=2 with bidirections assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float32 actual 0.3696063756942749 should be close enough to expected 0.5764073133468628 by ULP distance: expected a number less than or equal to 3n but got 5657186n -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias and options.activations=['relu', 'relu', 'relu'] - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and options.peepholeWeight - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and options.initialHiddenState - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and options.initialCellState - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and explicit options.returnSequence=false - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and options.returnSequence=true - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and explicit options.direction='forward' - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and explicit options.layout='iofg' - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and options.layout='ifgo' - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 -[FAIL] lstm float16 tensors steps=1 with all options - assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 10 but got 15360 [FAIL] lstm float16 tensors steps=2 with all options assert_less_than_equal: assert_array_approx_equals_ulp: test lstm float16 actual 1 should be close enough to expected 10.46875 by ULP distance: expected a number less than or equal to 10 but got 3388 [FAIL] lstm float16 tensors steps=2 with bidirections
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lstm_cell.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lstm_cell.https.any_gpu-expected.txt index 885dbd2..0c4702a 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lstm_cell.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/lstm_cell.https.any_gpu-expected.txt
@@ -9,15 +9,5 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test lstmCell float32 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 1n but got 1065353216n [FAIL] lstmCell float32 tensors with all options assert_less_than_equal: assert_array_approx_equals_ulp: test lstmCell float32 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 1n but got 1065353216n -[FAIL] lstmCell float16 tensors with options.bias, options.recurrentBias and options.activations=['relu', 'relu', 'relu'] - assert_less_than_equal: assert_array_approx_equals_ulp: test lstmCell float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 1 but got 15360 -[FAIL] lstmCell float16 tensors with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and options.peepholeWeight - assert_less_than_equal: assert_array_approx_equals_ulp: test lstmCell float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 1 but got 15360 -[FAIL] lstmCell float16 tensors with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and explicit options.layout='iofg' - assert_less_than_equal: assert_array_approx_equals_ulp: test lstmCell float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 1 but got 15360 -[FAIL] lstmCell float16 tensors with options.bias, options.recurrentBias, options.activations=['relu', 'relu', 'relu'] and options.layout='ifgo' - assert_less_than_equal: assert_array_approx_equals_ulp: test lstmCell float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 1 but got 15360 -[FAIL] lstmCell float16 tensors with all options - assert_less_than_equal: assert_array_approx_equals_ulp: test lstmCell float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 1 but got 15360 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/matmul.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/matmul.https.any_gpu-expected.txt index b354a14..d21e214 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/matmul.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/matmul.https.any_gpu-expected.txt
@@ -7,21 +7,13 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float32 actual 0 should be close enough to expected 3733.946533203125 by ULP distance: expected a number less than or equal to 8n but got 1164533541n [FAIL] matmul float32 4D and 3D tensors assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float32 actual 0 should be close enough to expected 7885.7978515625 by ULP distance: expected a number less than or equal to 8n but got 1173778018n -[FAIL] matmul float16 2D and 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 3340 by ULP distance: expected a number less than or equal to 8 but got 27270 -[FAIL] matmul float16 3D and 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 11008 by ULP distance: expected a number less than or equal to 8 but got 29024 -[FAIL] matmul float16 4D and 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 11008 by ULP distance: expected a number less than or equal to 8 but got 29024 [FAIL] matmul float16 3D and 3D (broadcast) tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 15016 by ULP distance: expected a number less than or equal to 8 but got 29525 + assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 13552 by ULP distance: expected a number less than or equal to 8 but got 29342 [FAIL] matmul float16 3D and 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 15016 by ULP distance: expected a number less than or equal to 8 but got 29525 + assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 13552 by ULP distance: expected a number less than or equal to 8 but got 29342 [FAIL] matmul float16 4D and 4D (broadcast) tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 13352 by ULP distance: expected a number less than or equal to 8 but got 29317 + assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 3734 by ULP distance: expected a number less than or equal to 8 but got 27467 [FAIL] matmul float16 4D and 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 11432 by ULP distance: expected a number less than or equal to 8 but got 29077 -[FAIL] matmul float16 5D and 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual Infinity should be close enough to expected 13352 by ULP distance: expected a number less than or equal to 8 but got 2427 + assert_less_than_equal: assert_array_approx_equals_ulp: test matmul float16 actual 0 should be close enough to expected 7888 by ULP distance: expected a number less than or equal to 8 but got 28596 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/max.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/max.https.any_gpu-expected.txt deleted file mode 100644 index 2ba647e..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/max.https.any_gpu-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -[FAIL] max float16 1D constant tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test max float16 actual -512 should be close enough to expected 17.734375 by ULP distance: expected a number less than or equal to 0 but got 37777 -[FAIL] max float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test max float16 actual 0 should be close enough to expected 17.734375 by ULP distance: expected a number less than or equal to 0 but got 19567 -[FAIL] max float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test max float16 actual 0 should be close enough to expected 17.734375 by ULP distance: expected a number less than or equal to 0 but got 19567 -[FAIL] max float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test max float16 actual 0 should be close enough to expected 17.734375 by ULP distance: expected a number less than or equal to 0 but got 19567 -[FAIL] max float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test max float16 actual 0 should be close enough to expected 17.734375 by ULP distance: expected a number less than or equal to 0 but got 19567 -[FAIL] max float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test max float16 actual 0 should be close enough to expected 48.25 by ULP distance: expected a number less than or equal to 0 but got 21000 -[FAIL] max float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test max float16 actual 0 should be close enough to expected 49.53125 by ULP distance: expected a number less than or equal to 0 but got 21041 -[FAIL] max float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test max float16 actual 0 should be close enough to expected 39.3125 by ULP distance: expected a number less than or equal to 0 but got 20714 -[FAIL] max float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test max float16 actual 0 should be close enough to expected 48.25 by ULP distance: expected a number less than or equal to 0 but got 21000 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/maxPool2d.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/maxPool2d.https.any_gpu-expected.txt index 2b46aa3..70669416 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/maxPool2d.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/maxPool2d.https.any_gpu-expected.txt
@@ -5,31 +5,11 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float32 actual 99.28312683105469 should be close enough to expected -39.03501892089844 by ULP distance: expected a number less than or equal to 0n but got 2229449938n [FAIL] maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float32 actual 99.28312683105469 should be close enough to expected -39.03501892089844 by ULP distance: expected a number less than or equal to 0n but got 2229449938n -[FAIL] maxPool2d float16 4D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual -0.0078125 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 18891 -[FAIL] maxPool2d float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 -[FAIL] maxPool2d float16 4D tensor options.windowDimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 -[FAIL] maxPool2d float16 4D tensor options.padding - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 -[FAIL] maxPool2d float16 4D tensor options.strides - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 [FAIL] maxPool2d float16 4D tensor options.dilations promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': Pool2d in tflite doesn't support dilations." -[FAIL] maxPool2d float16 4D tensor options.layout=nchw - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 -[FAIL] maxPool2d float16 4D tensor options.layout=nhwc - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 -[FAIL] maxPool2d float16 4D tensor options.roundingType=floor - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 [FAIL] maxPool2d float16 4D tensor options.roundingType=ceil - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 + assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 99.3125 should be close enough to expected -39.03125 by ULP distance: expected a number less than or equal to 0 but got 31404 [FAIL] maxPool2d float16 4D tensor options.outputSizes ignores options.roundingType=floor - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 -[FAIL] maxPool2d float16 4D tensor options.outputSizes ignores options.roundingType=ceil - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 99.3125 by ULP distance: expected a number less than or equal to 0 but got 22069 -[FAIL] maxPool2d float16 4D tensor options.dilations with options.strides - assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 0 should be close enough to expected 60.90625 by ULP distance: expected a number less than or equal to 0 but got 21405 + assert_less_than_equal: assert_array_approx_equals_ulp: test maxPool2d float16 actual 99.3125 should be close enough to expected -39.03125 by ULP distance: expected a number less than or equal to 0 but got 31404 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/min.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/min.https.any_gpu-expected.txt deleted file mode 100644 index ca7a7bd..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/min.https.any_gpu-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -[FAIL] min float16 1D constant tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test min float16 actual 512 should be close enough to expected -40.09375 by ULP distance: expected a number less than or equal to 0 but got 28931 -[FAIL] min float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test min float16 actual 0 should be close enough to expected -40.09375 by ULP distance: expected a number less than or equal to 0 but got 53507 -[FAIL] min float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test min float16 actual 0 should be close enough to expected -40.09375 by ULP distance: expected a number less than or equal to 0 but got 53507 -[FAIL] min float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test min float16 actual 0 should be close enough to expected -40.09375 by ULP distance: expected a number less than or equal to 0 but got 53507 -[FAIL] min float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test min float16 actual 0 should be close enough to expected -40.09375 by ULP distance: expected a number less than or equal to 0 but got 53507 -[FAIL] min float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test min float16 actual 0 should be close enough to expected -36.0625 by ULP distance: expected a number less than or equal to 0 but got 53378 -[FAIL] min float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test min float16 actual 0 should be close enough to expected -36.0625 by ULP distance: expected a number less than or equal to 0 but got 53378 -[FAIL] min float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test min float16 actual 0 should be close enough to expected -36.0625 by ULP distance: expected a number less than or equal to 0 but got 53378 -[FAIL] min float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test min float16 actual 0 should be close enough to expected -36.0625 by ULP distance: expected a number less than or equal to 0 but got 53378 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/neg.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/neg.https.any_gpu-expected.txt index 734d510..6c537a8 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/neg.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/neg.https.any_gpu-expected.txt
@@ -1,18 +1,4 @@ This is a testharness.js-based test. -[FAIL] neg float16 positive 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test neg float16 actual 0 should be close enough to expected -94.25 by ULP distance: expected a number less than or equal to 0 but got 54756 -[FAIL] neg float16 negative 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test neg float16 actual 0 should be close enough to expected 58.34375 by ULP distance: expected a number less than or equal to 0 but got 21323 -[FAIL] neg float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test neg float16 actual 512 should be close enough to expected 58.34375 by ULP distance: expected a number less than or equal to 0 but got 3253 -[FAIL] neg float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test neg float16 actual 0 should be close enough to expected 58.34375 by ULP distance: expected a number less than or equal to 0 but got 21323 -[FAIL] neg float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test neg float16 actual 0 should be close enough to expected 58.34375 by ULP distance: expected a number less than or equal to 0 but got 21323 -[FAIL] neg float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test neg float16 actual 0 should be close enough to expected 58.34375 by ULP distance: expected a number less than or equal to 0 but got 21323 -[FAIL] neg float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test neg float16 actual 0 should be close enough to expected 58.34375 by ULP distance: expected a number less than or equal to 0 but got 21323 [FAIL] neg int8 4D tensor promise_test: Unhandled rejection with value: object "TypeError: Unsupported data type, input 'input' data type int8 must be one of [float32,float16,int32,int64]." Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/not_equal.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/not_equal.https.any_gpu-expected.txt index c1cbf84..03ce36b 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/not_equal.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/not_equal.https.any_gpu-expected.txt
@@ -1,27 +1,7 @@ This is a testharness.js-based test. [FAIL] notEqual float32 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'notEqual' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] notEqual float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] notEqual float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] notEqual float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] notEqual float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] notEqual float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 [FAIL] notEqual float16 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'notEqual' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." -[FAIL] notEqual float16 broadcast 0D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] notEqual float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] notEqual float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] notEqual float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 -[FAIL] notEqual float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test notEqual uint8 actual 1 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 1 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pad.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pad.https.any_gpu-expected.txt index 617e4bc..3d23177 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pad.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pad.https.any_gpu-expected.txt
@@ -3,23 +3,9 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test pad float32 actual 0 should be close enough to expected 22.76361846923828 by ULP distance: expected a number less than or equal to 0n but got 1102453732n [FAIL] pad float32 4D tensor options.mode='edge' promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': The edge padding mode is not supported in tflite schema." -[FAIL] pad float16 1D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test pad float16 actual 0 should be close enough to expected 22.765625 by ULP distance: expected a number less than or equal to 0 but got 19889 -[FAIL] pad float16 1D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test pad float16 actual -Infinity should be close enough to expected 22.765625 by ULP distance: expected a number less than or equal to 0 but got 44623 -[FAIL] pad float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test pad float16 actual -Infinity should be close enough to expected 22.765625 by ULP distance: expected a number less than or equal to 0 but got 44623 [FAIL] pad float16 3D tensor default options assert_less_than_equal: assert_array_approx_equals_ulp: test pad float16 actual 0 should be close enough to expected 22.765625 by ULP distance: expected a number less than or equal to 0 but got 19889 -[FAIL] pad float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test pad float16 actual 0 should be close enough to expected 22.765625 by ULP distance: expected a number less than or equal to 0 but got 19889 -[FAIL] pad float16 2D tensor explicit options.mode='constant' - assert_less_than_equal: assert_array_approx_equals_ulp: test pad float16 actual -Infinity should be close enough to expected 22.765625 by ULP distance: expected a number less than or equal to 0 but got 44623 -[FAIL] pad float16 2D tensor options.value default constant mode - assert_less_than_equal: assert_array_approx_equals_ulp: test pad float16 actual -Infinity should be close enough to expected 22.765625 by ULP distance: expected a number less than or equal to 0 but got 44623 [FAIL] pad float16 4D tensor options.mode='edge' promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': The edge padding mode is not supported in tflite schema." -[FAIL] pad float16 4D tensor options.mode='reflection' - assert_less_than_equal: assert_array_approx_equals_ulp: test pad float16 actual 0 should be close enough to expected 68.75 by ULP distance: expected a number less than or equal to 0 but got 21580 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pow.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pow.https.any_gpu-expected.txt index 4ceaf3c..ae3dbd2 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pow.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/pow.https.any_gpu-expected.txt
@@ -17,25 +17,23 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test pow float32 actual NaN should be close enough to expected 998220038144 by ULP distance: expected a number less than or equal to 32n but got 743937395n [FAIL] pow float32 4D base tensor and broadcastable 3D integer exponent tensor assert_less_than_equal: assert_array_approx_equals_ulp: test pow float32 actual NaN should be close enough to expected -999109.625 by ULP distance: expected a number less than or equal to 32n but got 3375623258n -[FAIL] pow float16 constant 1D base tensor and 1D integer exponent tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual -2 should be close enough to expected 17.84375 by ULP distance: expected a number less than or equal to 2 but got 29578 [FAIL] pow float16 1D base tensor and 1D integer exponent tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 0 should be close enough to expected 17.84375 by ULP distance: expected a number less than or equal to 2 but got 19574 + assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual NaN should be close enough to expected -0.0002512931823730469 by ULP distance: expected a number less than or equal to 2 but got 29154 [FAIL] pow float16 2D base tensor and 2D integer exponent tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 0 should be close enough to expected 17.84375 by ULP distance: expected a number less than or equal to 2 but got 19574 + assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual NaN should be close enough to expected -0.0002512931823730469 by ULP distance: expected a number less than or equal to 2 but got 29154 [FAIL] pow float16 3D base tensor and 3D integer exponent tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 0 should be close enough to expected 17.84375 by ULP distance: expected a number less than or equal to 2 but got 19574 + assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual NaN should be close enough to expected -0.0002512931823730469 by ULP distance: expected a number less than or equal to 2 but got 29154 [FAIL] pow float16 4D base tensor and 4D integer exponent tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 0 should be close enough to expected 17.84375 by ULP distance: expected a number less than or equal to 2 but got 19574 + assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual NaN should be close enough to expected -0.0002512931823730469 by ULP distance: expected a number less than or equal to 2 but got 29154 [FAIL] pow float16 5D base tensor and 5D integer exponent tensor promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'pow' on 'MLGraphBuilder': Unsupported rank 5 for argument a (must be at most 4)." [FAIL] pow (square) float16 4D base tensor and broadcastable 0D integer exponent scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 0 should be close enough to expected 318.5 by ULP distance: expected a number less than or equal to 2 but got 23802 + assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual NaN should be close enough to expected 0.0039825439453125 by ULP distance: expected a number less than or equal to 2 but got 57836 [FAIL] pow (sqrt) float16 4D positive base tensor and broadcastable 0D integer exponent scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 0 should be close enough to expected 1.19140625 by ULP distance: expected a number less than or equal to 2 but got 15556 + assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 4.3046875 should be close enough to expected 1.568359375 by ULP distance: expected a number less than or equal to 2 but got 1544 [FAIL] pow float16 4D base tensor and broadcastable 2D integer exponent tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 0 should be close enough to expected 5680 by ULP distance: expected a number less than or equal to 2 but got 28044 + assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 5668 should be close enough to expected 5680 by ULP distance: expected a number less than or equal to 2 but got 3 [FAIL] pow float16 4D base tensor and broadcastable 3D integer exponent tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual 0 should be close enough to expected 0.0560302734375 by ULP distance: expected a number less than or equal to 2 but got 11052 + assert_less_than_equal: assert_array_approx_equals_ulp: test pow float16 actual NaN should be close enough to expected -15.84375 by ULP distance: expected a number less than or equal to 2 but got 12820 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/prelu.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/prelu.https.any_gpu-expected.txt index 21ba2e53..45c7a67 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/prelu.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/prelu.https.any_gpu-expected.txt
@@ -5,30 +5,10 @@ promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': The input and slope should have the same last dimension." [FAIL] prelu float32 broadcast 4D x 4D slope promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': The input and slope should have the same last dimension." -[FAIL] prelu float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual 0 should be close enough to expected -5.3671875 by ULP distance: expected a number less than or equal to 1 but got 17758 -[FAIL] prelu float16 1D constant tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual -15232 should be close enough to expected -23.8125 by ULP distance: expected a number less than or equal to 1 but got 9596 -[FAIL] prelu float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual -15232 should be close enough to expected -23.8125 by ULP distance: expected a number less than or equal to 1 but got 9596 -[FAIL] prelu float16 1D non-constant slope - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual -0.0003886222839355469 should be close enough to expected -23.8125 by ULP distance: expected a number less than or equal to 1 but got 16278 -[FAIL] prelu float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual -15232 should be close enough to expected -23.8125 by ULP distance: expected a number less than or equal to 1 but got 9596 -[FAIL] prelu float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual -15232 should be close enough to expected -23.8125 by ULP distance: expected a number less than or equal to 1 but got 9596 -[FAIL] prelu float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual -15232 should be close enough to expected -23.8125 by ULP distance: expected a number less than or equal to 1 but got 9596 [FAIL] prelu float16 5D tensors promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'prelu' on 'MLGraphBuilder': Unsupported rank 5 for argument input (must be at most 4)." -[FAIL] prelu float16 broadcast 4D x 1D slope - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual 2 should be close enough to expected -12.9296875 by ULP distance: expected a number less than or equal to 1 but got 35447 [FAIL] prelu float16 broadcast 4D x 1D slope of shape [1] promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': The input and slope should have the same last dimension." -[FAIL] prelu float16 broadcast 4D x 2D slope - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual -7948 should be close enough to expected -12.421875 by ULP distance: expected a number less than or equal to 1 but got 9613 -[FAIL] prelu float16 broadcast 4D x 3D slope - assert_less_than_equal: assert_array_approx_equals_ulp: test prelu float16 actual 2 should be close enough to expected -12.9296875 by ULP distance: expected a number less than or equal to 1 but got 35447 [FAIL] prelu float16 broadcast 4D x 4D slope promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': The input and slope should have the same last dimension." [FAIL] prelu int64 2D constant tensors
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/quantizeLinear.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/quantizeLinear.https.any_gpu-expected.txt new file mode 100644 index 0000000..ebe40897 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/quantizeLinear.https.any_gpu-expected.txt
@@ -0,0 +1,39 @@ +This is a testharness.js-based test. +[FAIL] quantizeLinear float32 3D input with implicit block_size = [1, 2, 1]. + promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': QuantizeLinear can't support block-wise." +[FAIL] quantizeLinear float32 tensor with int4 zeroPoint which has odd size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'quantizeLinear' on 'MLGraphBuilder': Unsupported data type int4 for argument zeroPoint, must be one of [int32, int8, uint8]." +[FAIL] quantizeLinear float32 tensor with int4 zeroPoint which has even size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'quantizeLinear' on 'MLGraphBuilder': Unsupported data type int4 for argument zeroPoint, must be one of [int32, int8, uint8]." +[FAIL] quantizeLinear float32 2D tensor with int4 zeroPoint which has even size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'quantizeLinear' on 'MLGraphBuilder': Unsupported data type int4 for argument zeroPoint, must be one of [int32, int8, uint8]." +[FAIL] quantizeLinear float32 2D tensor with int4 zeroPoint with block_size = [3, 2] + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'quantizeLinear' on 'MLGraphBuilder': Unsupported data type int4 for argument zeroPoint, must be one of [int32, int8, uint8]." +[FAIL] quantizeLinear float32 tensor with uint4 zeroPoint which has odd size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] quantizeLinear float32 tensor with uint4 zeroPoint which has even size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] quantizeLinear float32 1D tensor with uint4 zeroPoint with block_size = 3 + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] quantizeLinear float32 tensor with int32 zeroPoint + assert_less_than_equal: assert_array_approx_equals_ulp: test quantizeLinear int32 actual 12352 should be close enough to expected 12345 by ULP distance: expected a number less than or equal to 1 but got 7 +[FAIL] quantizeLinear float16 3D input with implicit block_size = [1, 2, 1]. + promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': QuantizeLinear can't support block-wise." +[FAIL] quantizeLinear float16 tensor with int4 zeroPoint which has odd size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'quantizeLinear' on 'MLGraphBuilder': Unsupported data type int4 for argument zeroPoint, must be one of [int32, int8, uint8]." +[FAIL] quantizeLinear float16 tensor with int4 zeroPoint which has even size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'quantizeLinear' on 'MLGraphBuilder': Unsupported data type int4 for argument zeroPoint, must be one of [int32, int8, uint8]." +[FAIL] quantizeLinear float16 2D tensor with int4 zeroPoint which has even size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'quantizeLinear' on 'MLGraphBuilder': Unsupported data type int4 for argument zeroPoint, must be one of [int32, int8, uint8]." +[FAIL] quantizeLinear float16 2D tensor with int4 zeroPoint with block_size = [3, 2] + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'quantizeLinear' on 'MLGraphBuilder': Unsupported data type int4 for argument zeroPoint, must be one of [int32, int8, uint8]." +[FAIL] quantizeLinear float16 tensor with uint4 zeroPoint which has odd size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] quantizeLinear float16 tensor with uint4 zeroPoint which has even size + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] quantizeLinear float16 1D tensor with uint4 zeroPoint with block_size = 3 + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': Unsupported data type uint4 for constant, must be one of [float32, float16, int32, uint32, int64, uint64, int8, uint8, int4]." +[FAIL] quantizeLinear float16 tensor with int32 zeroPoint + assert_less_than_equal: assert_array_approx_equals_ulp: test quantizeLinear int32 actual 12352 should be close enough to expected 12347 by ULP distance: expected a number less than or equal to 1 but got 5 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reciprocal.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reciprocal.https.any_gpu-expected.txt deleted file mode 100644 index 71963f9..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reciprocal.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reciprocal float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test reciprocal float16 actual 0 should be close enough to expected -0.10675048828125 by ULP distance: expected a number less than or equal to 2 but got 44757 -[FAIL] reciprocal float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test reciprocal float16 actual 2 should be close enough to expected -0.9892578125 by ULP distance: expected a number less than or equal to 2 but got 31722 -[FAIL] reciprocal float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test reciprocal float16 actual 0.0078125 should be close enough to expected -0.9892578125 by ULP distance: expected a number less than or equal to 2 but got 39914 -[FAIL] reciprocal float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test reciprocal float16 actual 0.0078125 should be close enough to expected -0.9892578125 by ULP distance: expected a number less than or equal to 2 but got 39914 -[FAIL] reciprocal float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test reciprocal float16 actual 0.0078125 should be close enough to expected -0.9892578125 by ULP distance: expected a number less than or equal to 2 but got 39914 -[FAIL] reciprocal float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test reciprocal float16 actual 0.0078125 should be close enough to expected -0.9892578125 by ULP distance: expected a number less than or equal to 2 but got 39914 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l1.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l1.https.any_gpu-expected.txt index 1836483..6546a27 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l1.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l1.https.any_gpu-expected.txt
@@ -1,42 +1,4 @@ This is a testharness.js-based test. -[FAIL] reduceL1 float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 2 should be close enough to expected 5.5078125 by ULP distance: expected a number less than or equal to 1 but got 1410 -[FAIL] reduceL1 float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 2 should be close enough to expected 5.5078125 by ULP distance: expected a number less than or equal to 1 but got 1410 -[FAIL] reduceL1 float16 1D constant tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 7099 -[FAIL] reduceL1 float16 1D tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 25669 -[FAIL] reduceL1 float16 1D tensor all negative default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1215 by ULP distance: expected a number less than or equal to 24 but got 25791 -[FAIL] reduceL1 float16 1D tensor all positive integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 993 by ULP distance: expected a number less than or equal to 24 but got 25538 -[FAIL] reduceL1 float16 1D tensor all negative integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1344 by ULP distance: expected a number less than or equal to 24 but got 25920 -[FAIL] reduceL1 float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 25669 -[FAIL] reduceL1 float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 25669 -[FAIL] reduceL1 float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 25669 -[FAIL] reduceL1 float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual -0.0078125 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 15291 -[FAIL] reduceL1 float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 142 by ULP distance: expected a number less than or equal to 4 but got 22640 -[FAIL] reduceL1 float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 258.5 by ULP distance: expected a number less than or equal to 4 but got 23562 -[FAIL] reduceL1 float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 25669 -[FAIL] reduceL1 float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 25669 -[FAIL] reduceL1 float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 25669 -[FAIL] reduceL1 float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 1093 by ULP distance: expected a number less than or equal to 24 but got 25669 -[FAIL] reduceL1 float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 108.4375 by ULP distance: expected a number less than or equal to 6 but got 22215 -[FAIL] reduceL1 float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL1 float16 actual 0 should be close enough to expected 108.4375 by ULP distance: expected a number less than or equal to 6 but got 22215 [FAIL] reduceL1 uint32 4D tensor options.axes with options.keepDimensions=false promise_test: Unhandled rejection with value: object "TypeError: Unsupported data type, input 'input' data type uint32 must be one of [float32,float16,int32]." Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l2.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l2.https.any_gpu-expected.txt index 153b3d48..0d6a8e4b 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l2.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_l2.https.any_gpu-expected.txt
@@ -1,41 +1,29 @@ This is a testharness.js-based test. -[FAIL] reduceL2 float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 4.859375 by ULP distance: expected a number less than or equal to 4 but got 15140 -[FAIL] reduceL2 float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 4.859375 by ULP distance: expected a number less than or equal to 4 but got 15140 [FAIL] reduceL2 float16 1D constant tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 [FAIL] reduceL2 float16 1D tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 [FAIL] reduceL2 float16 1D tensor all negative default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 292.5 by ULP distance: expected a number less than or equal to 50 but got 23698 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 292.5 by ULP distance: expected a number less than or equal to 50 but got 8046 [FAIL] reduceL2 float16 1D tensor all positive integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 274.5 by ULP distance: expected a number less than or equal to 50 but got 23626 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 274.5 by ULP distance: expected a number less than or equal to 50 but got 8118 [FAIL] reduceL2 float16 1D tensor all negative integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 300.5 by ULP distance: expected a number less than or equal to 50 but got 23730 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 300.5 by ULP distance: expected a number less than or equal to 50 but got 8014 [FAIL] reduceL2 float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 [FAIL] reduceL2 float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 [FAIL] reduceL2 float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 [FAIL] reduceL2 float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 -[FAIL] reduceL2 float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 122.375 by ULP distance: expected a number less than or equal to 10 but got 22438 -[FAIL] reduceL2 float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 114.4375 by ULP distance: expected a number less than or equal to 10 but got 22311 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 [FAIL] reduceL2 float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 [FAIL] reduceL2 float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 [FAIL] reduceL2 float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 [FAIL] reduceL2 float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 23616 -[FAIL] reduceL2 float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 138.625 by ULP distance: expected a number less than or equal to 14 but got 22613 -[FAIL] reduceL2 float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual 0 should be close enough to expected 138.625 by ULP distance: expected a number less than or equal to 14 but got 22613 + assert_less_than_equal: assert_array_approx_equals_ulp: test reduceL2 float16 actual Infinity should be close enough to expected 272 by ULP distance: expected a number less than or equal to 50 but got 8128 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_log_sum.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_log_sum.https.any_gpu-expected.txt deleted file mode 100644 index aa36a87..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_log_sum.https.any_gpu-expected.txt +++ /dev/null
@@ -1,37 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reduceLogSum float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 512 should be close enough to expected 4.16796875 by ULP distance: expected a number less than or equal to 19 but got 7125 -[FAIL] reduceLogSum float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 512 should be close enough to expected 4.16796875 by ULP distance: expected a number less than or equal to 19 but got 7125 -[FAIL] reduceLogSum float16 1D constant tensor all non-negative default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 512 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 6390 -[FAIL] reduceLogSum float16 1D tensor all non-negative default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 18186 -[FAIL] reduceLogSum float16 1D tensor all non-negative integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 7.0625 by ULP distance: expected a number less than or equal to 42 but got 18192 -[FAIL] reduceLogSum float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 18186 -[FAIL] reduceLogSum float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 18186 -[FAIL] reduceLogSum float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 18186 -[FAIL] reduceLogSum float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 512 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 6390 -[FAIL] reduceLogSum float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 5.59375 by ULP distance: expected a number less than or equal to 22 but got 17816 -[FAIL] reduceLogSum float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 5.41015625 by ULP distance: expected a number less than or equal to 22 but got 17769 -[FAIL] reduceLogSum float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 18186 -[FAIL] reduceLogSum float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 18186 -[FAIL] reduceLogSum float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 18186 -[FAIL] reduceLogSum float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 7.0390625 by ULP distance: expected a number less than or equal to 42 but got 18186 -[FAIL] reduceLogSum float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 5.7265625 by ULP distance: expected a number less than or equal to 24 but got 17850 -[FAIL] reduceLogSum float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSum float16 actual 0 should be close enough to expected 5.7265625 by ULP distance: expected a number less than or equal to 24 but got 17850 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_log_sum_exp.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_log_sum_exp.https.any_gpu-expected.txt deleted file mode 100644 index a19cf48..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_log_sum_exp.https.any_gpu-expected.txt +++ /dev/null
@@ -1,41 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reduceLogSumExp float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 0.79736328125 by ULP distance: expected a number less than or equal to 20 but got 14945 -[FAIL] reduceLogSumExp float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 0.79736328125 by ULP distance: expected a number less than or equal to 20 but got 14945 -[FAIL] reduceLogSumExp float16 1D constant tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 512 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 5838 -[FAIL] reduceLogSumExp float16 1D tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 18738 -[FAIL] reduceLogSumExp float16 1D tensor all negative default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual -2 should be close enough to expected 1.1669921875 by ULP distance: expected a number less than or equal to 66 but got 33621 -[FAIL] reduceLogSumExp float16 1D tensor all positive integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 9.609375 by ULP distance: expected a number less than or equal to 66 but got 18638 -[FAIL] reduceLogSumExp float16 1D tensor all negative integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 0.7001953125 by ULP distance: expected a number less than or equal to 66 but got 14746 -[FAIL] reduceLogSumExp float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 18738 -[FAIL] reduceLogSumExp float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 18738 -[FAIL] reduceLogSumExp float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 18738 -[FAIL] reduceLogSumExp float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 512 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 5838 -[FAIL] reduceLogSumExp float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 8.5546875 by ULP distance: expected a number less than or equal to 26 but got 18503 -[FAIL] reduceLogSumExp float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 4.671875 by ULP distance: expected a number less than or equal to 26 but got 17580 -[FAIL] reduceLogSumExp float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 18738 -[FAIL] reduceLogSumExp float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 18738 -[FAIL] reduceLogSumExp float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 18738 -[FAIL] reduceLogSumExp float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 10.390625 by ULP distance: expected a number less than or equal to 66 but got 18738 -[FAIL] reduceLogSumExp float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 8.5703125 by ULP distance: expected a number less than or equal to 30 but got 18505 -[FAIL] reduceLogSumExp float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceLogSumExp float16 actual 0 should be close enough to expected 8.5703125 by ULP distance: expected a number less than or equal to 30 but got 18505 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_max.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_max.https.any_gpu-expected.txt deleted file mode 100644 index a74d469a..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_max.https.any_gpu-expected.txt +++ /dev/null
@@ -1,35 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reduceMax float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual -0.0078125 should be close enough to expected 32.15625 by ULP distance: expected a number less than or equal to 0 but got 20475 -[FAIL] reduceMax float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual -0.0078125 should be close enough to expected 32.15625 by ULP distance: expected a number less than or equal to 0 but got 20475 -[FAIL] reduceMax float16 1D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 10692 -[FAIL] reduceMax float16 1D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 22076 -[FAIL] reduceMax float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 22076 -[FAIL] reduceMax float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 22076 -[FAIL] reduceMax float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 22076 -[FAIL] reduceMax float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 10692 -[FAIL] reduceMax float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 90.4375 by ULP distance: expected a number less than or equal to 0 but got 21927 -[FAIL] reduceMax float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 62.5 by ULP distance: expected a number less than or equal to 0 but got 21456 -[FAIL] reduceMax float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 22076 -[FAIL] reduceMax float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 22076 -[FAIL] reduceMax float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 22076 -[FAIL] reduceMax float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 99.75 by ULP distance: expected a number less than or equal to 0 but got 22076 -[FAIL] reduceMax float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 90.4375 by ULP distance: expected a number less than or equal to 0 but got 21927 -[FAIL] reduceMax float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMax float16 actual 0 should be close enough to expected 90.4375 by ULP distance: expected a number less than or equal to 0 but got 21927 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_mean.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_mean.https.any_gpu-expected.txt deleted file mode 100644 index 3556ae40..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_mean.https.any_gpu-expected.txt +++ /dev/null
@@ -1,41 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reduceMean float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual -2 should be close enough to expected 95.875 by ULP distance: expected a number less than or equal to 3 but got 27138 -[FAIL] reduceMean float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual -2 should be close enough to expected 95.875 by ULP distance: expected a number less than or equal to 3 but got 27138 -[FAIL] reduceMean float16 1D constant tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 2 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 4362 -[FAIL] reduceMean float16 1D tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 20746 -[FAIL] reduceMean float16 1D tensor all negative default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected -34.75 by ULP distance: expected a number less than or equal to 26 but got 53336 -[FAIL] reduceMean float16 1D tensor all positive integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 48.40625 by ULP distance: expected a number less than or equal to 26 but got 21005 -[FAIL] reduceMean float16 1D tensor all negative integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected -47.53125 by ULP distance: expected a number less than or equal to 26 but got 53745 -[FAIL] reduceMean float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 20746 -[FAIL] reduceMean float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 20746 -[FAIL] reduceMean float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 20746 -[FAIL] reduceMean float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 2 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 4362 -[FAIL] reduceMean float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 45.46875 by ULP distance: expected a number less than or equal to 6 but got 20911 -[FAIL] reduceMean float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 54.84375 by ULP distance: expected a number less than or equal to 6 but got 21211 -[FAIL] reduceMean float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 20746 -[FAIL] reduceMean float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 20746 -[FAIL] reduceMean float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 20746 -[FAIL] reduceMean float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 40.3125 by ULP distance: expected a number less than or equal to 26 but got 20746 -[FAIL] reduceMean float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 52.28125 by ULP distance: expected a number less than or equal to 8 but got 21129 -[FAIL] reduceMean float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMean float16 actual 0 should be close enough to expected 52.28125 by ULP distance: expected a number less than or equal to 8 but got 21129 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_min.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_min.https.any_gpu-expected.txt deleted file mode 100644 index eef1b14b..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_min.https.any_gpu-expected.txt +++ /dev/null
@@ -1,35 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reduceMin float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -58.75 by ULP distance: expected a number less than or equal to 0 but got 54104 -[FAIL] reduceMin float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -58.75 by ULP distance: expected a number less than or equal to 0 but got 54104 -[FAIL] reduceMin float16 1D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual -512 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 2689 -[FAIL] reduceMin float16 1D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual -512 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 2689 -[FAIL] reduceMin float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -58.75 by ULP distance: expected a number less than or equal to 0 but got 54104 -[FAIL] reduceMin float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -[FAIL] reduceMin float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceMin float16 actual 0 should be close enough to expected -87.9375 by ULP distance: expected a number less than or equal to 0 but got 54655 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_product.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_product.https.any_gpu-expected.txt deleted file mode 100644 index df96cc0..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_product.https.any_gpu-expected.txt +++ /dev/null
@@ -1,35 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reduceProduct float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -68.75 by ULP distance: expected a number less than or equal to 1 but got 21580 -[FAIL] reduceProduct float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -68.75 by ULP distance: expected a number less than or equal to 1 but got 21580 -[FAIL] reduceProduct float16 1D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual -2 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 4098 -[FAIL] reduceProduct float16 1D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 45054 -[FAIL] reduceProduct float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 45054 -[FAIL] reduceProduct float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 45054 -[FAIL] reduceProduct float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 45054 -[FAIL] reduceProduct float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual -2 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 4098 -[FAIL] reduceProduct float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -0.3759765625 by ULP distance: expected a number less than or equal to 4 but got 46596 -[FAIL] reduceProduct float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected 1.2744140625 by ULP distance: expected a number less than or equal to 4 but got 15641 -[FAIL] reduceProduct float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 45054 -[FAIL] reduceProduct float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 45054 -[FAIL] reduceProduct float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 45054 -[FAIL] reduceProduct float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected -0.1248779296875 by ULP distance: expected a number less than or equal to 24 but got 45054 -[FAIL] reduceProduct float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected 1.666015625 by ULP distance: expected a number less than or equal to 6 but got 16042 -[FAIL] reduceProduct float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceProduct float16 actual 0 should be close enough to expected 1.666015625 by ULP distance: expected a number less than or equal to 6 but got 16042 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_sum.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_sum.https.any_gpu-expected.txt deleted file mode 100644 index 7fb63de..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_sum.https.any_gpu-expected.txt +++ /dev/null
@@ -1,41 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reduceSum float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 2 should be close enough to expected 69.625 by ULP distance: expected a number less than or equal to 1 but got 5210 -[FAIL] reduceSum float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 2 should be close enough to expected 69.625 by ULP distance: expected a number less than or equal to 1 but got 5210 -[FAIL] reduceSum float16 1D constant tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 2 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 9506 -[FAIL] reduceSum float16 1D tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 25890 -[FAIL] reduceSum float16 1D tensor all negative default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected -1164 by ULP distance: expected a number less than or equal to 24 but got 58508 -[FAIL] reduceSum float16 1D tensor all positive integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 1307 by ULP distance: expected a number less than or equal to 24 but got 25883 -[FAIL] reduceSum float16 1D tensor all negative integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected -1216 by ULP distance: expected a number less than or equal to 24 but got 58560 -[FAIL] reduceSum float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 25890 -[FAIL] reduceSum float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 25890 -[FAIL] reduceSum float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 25890 -[FAIL] reduceSum float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 2 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 9506 -[FAIL] reduceSum float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 210.5 by ULP distance: expected a number less than or equal to 4 but got 23188 -[FAIL] reduceSum float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 179.625 by ULP distance: expected a number less than or equal to 4 but got 22941 -[FAIL] reduceSum float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 25890 -[FAIL] reduceSum float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 25890 -[FAIL] reduceSum float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 25890 -[FAIL] reduceSum float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 1314 by ULP distance: expected a number less than or equal to 24 but got 25890 -[FAIL] reduceSum float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 355.25 by ULP distance: expected a number less than or equal to 6 but got 23949 -[FAIL] reduceSum float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSum float16 actual 0 should be close enough to expected 355.25 by ULP distance: expected a number less than or equal to 6 but got 23949 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_sum_square.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_sum_square.https.any_gpu-expected.txt deleted file mode 100644 index 714906b..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reduce_sum_square.https.any_gpu-expected.txt +++ /dev/null
@@ -1,43 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reduceSumSquare float16 0D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual -0.0078125 should be close enough to expected 2762 by ULP distance: expected a number less than or equal to 2 but got 13979 -[FAIL] reduceSumSquare float16 0D constant tensor empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual -0.0078125 should be close enough to expected 2762 by ULP distance: expected a number less than or equal to 2 but got 13979 -[FAIL] reduceSumSquare float16 1D constant tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 0.0078125 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 12193 -[FAIL] reduceSumSquare float16 1D tensor all positive default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 4001 -[FAIL] reduceSumSquare float16 1D tensor all negative default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual -512 should be close enough to expected 28.015625 by ULP distance: expected a number less than or equal to 48 but got 37119 -[FAIL] reduceSumSquare float16 1D tensor all positive integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 0 should be close enough to expected 453 by ULP distance: expected a number less than or equal to 48 but got 24340 -[FAIL] reduceSumSquare float16 1D tensor all negative integers default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 0 should be close enough to expected 627 by ULP distance: expected a number less than or equal to 48 but got 24806 -[FAIL] reduceSumSquare float16 1D tensor with empty axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 0 should be close enough to expected 4 by ULP distance: expected a number less than or equal to 2 but got 15360 -[FAIL] reduceSumSquare float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 4001 -[FAIL] reduceSumSquare float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 4001 -[FAIL] reduceSumSquare float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 4001 -[FAIL] reduceSumSquare float16 5D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 0.0078125 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 12193 -[FAIL] reduceSumSquare float16 3D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual -0.0078125 should be close enough to expected 4.94140625 by ULP distance: expected a number less than or equal to 8 but got 23311 -[FAIL] reduceSumSquare float16 4D tensor options.axes - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual -0.0078125 should be close enough to expected 3.72265625 by ULP distance: expected a number less than or equal to 8 but got 23694 -[FAIL] reduceSumSquare float16 3D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 4001 -[FAIL] reduceSumSquare float16 3D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 4001 -[FAIL] reduceSumSquare float16 4D tensor options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 4001 -[FAIL] reduceSumSquare float16 4D tensor options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 30.515625 by ULP distance: expected a number less than or equal to 48 but got 4001 -[FAIL] reduceSumSquare float16 4D tensor options.axes with options.keepDimensions=false - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 8.828125 by ULP distance: expected a number less than or equal to 12 but got 2154 -[FAIL] reduceSumSquare float16 4D tensor options.axes with options.keepDimensions=true - assert_less_than_equal: assert_array_approx_equals_ulp: test reduceSumSquare float16 actual 2 should be close enough to expected 8.828125 by ULP distance: expected a number less than or equal to 12 but got 2154 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reshape.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reshape.https.any_gpu-expected.txt deleted file mode 100644 index f3e23f0..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reshape.https.any_gpu-expected.txt +++ /dev/null
@@ -1,50 +0,0 @@ -This is a testharness.js-based test. -Found 23 FAIL, 0 TIMEOUT, 0 NOTRUN. -[FAIL] reshape float16 tensor to a new shape (reorder all dimensions) - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape float16 tensor to a new shape (4D to 4D) - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape float16 tensor to 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (squeeze) float16 2D tensor by eliminating one dimension - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (squeeze) float16 3D tensor by eliminating one dimension - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (squeeze) float16 3D tensor by eliminating two dimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (squeeze) float16 4D tensor by eliminating two dimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (squeeze) float16 4D tensor by eliminating all dimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -33.8125 by ULP distance: expected a number less than or equal to 0 but got 53306 -[FAIL] reshape (squeeze) float16 2D tensor by eliminating 1st dimension - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (squeeze) float16 3D tensor by eliminating 2nd and 3rd dimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (squeeze) float16 4D tensor by eliminating 1st and 4th dimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (unsqueeze) float16 0D tensor to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -33.8125 by ULP distance: expected a number less than or equal to 0 but got 53306 -[FAIL] reshape (unsqueeze) float16 1D tensor by adding one dimension - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (unsqueeze) float16 1D tensor by adding two dimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (unsqueeze) float16 1D tensor by adding 2nd and 3rd dimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (unsqueeze) float16 2D tensor by adding one dimension - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (unsqueeze) float16 2D tensor by adding two dimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (unsqueeze) float16 2D tensor by adding 1st dimension - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (unsqueeze) float16 2D tensor by adding 1st and 4th dimensions - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (flatten) float16 3D tensor to 2D - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (flatten) float16 4D to 2D - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (flatten) float16 4D to 2D exclusive 1st dimension - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -[FAIL] reshape (flatten) float16 4D to 2D exclusive 4th dimension - assert_less_than_equal: assert_array_approx_equals_ulp: test reshape float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reverse.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reverse.https.any_gpu-expected.txt deleted file mode 100644 index 96fbf24..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/reverse.https.any_gpu-expected.txt +++ /dev/null
@@ -1,11 +0,0 @@ -This is a testharness.js-based test. -[FAIL] reverse float16 2D input with default options - assert_less_than_equal: assert_array_approx_equals_ulp: test reverse float16 actual 0 should be close enough to expected -64.4375 by ULP distance: expected a number less than or equal to 0 but got 54279 -[FAIL] reverse float16 3D input options.axes=[1, 2] - assert_less_than_equal: assert_array_approx_equals_ulp: test reverse float16 actual 0 should be close enough to expected -91.875 by ULP distance: expected a number less than or equal to 0 but got 54718 -[FAIL] reverse float16 4D input options.axes=[3, 1] - assert_less_than_equal: assert_array_approx_equals_ulp: test reverse float16 actual 0 should be close enough to expected -91.875 by ULP distance: expected a number less than or equal to 0 but got 54718 -[FAIL] reverse float16 4D input options.axes=[] - assert_less_than_equal: assert_array_approx_equals_ulp: test reverse float16 actual 0 should be close enough to expected -30.0625 by ULP distance: expected a number less than or equal to 0 but got 53124 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/scatterElements.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/scatterElements.https.any_gpu-expected.txt index 61c6ee44..21098ad2 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/scatterElements.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/scatterElements.https.any_gpu-expected.txt
@@ -5,11 +5,7 @@ promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': scatterElements only supports constant indices." [FAIL] scatterElements float16 tensors along axis 0 promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': scatterElements only supports constant indices." -[FAIL] scatterElements float16 tensors along axis 0 and constant indices - assert_less_than_equal: assert_array_approx_equals_ulp: test scatterElements float16 actual 0 should be close enough to expected 2 by ULP distance: expected a number less than or equal to 0 but got 16384 [FAIL] scatterElements float16 tensors along axis 1 promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': scatterElements only supports constant indices." -[FAIL] scatterElements float16 tensors along axis 1 and constant indices - assert_less_than_equal: assert_array_approx_equals_ulp: test scatterElements float16 actual 2.00390625 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1026 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/scatterND.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/scatterND.https.any_gpu-expected.txt deleted file mode 100644 index 1ab9edeb..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/scatterND.https.any_gpu-expected.txt +++ /dev/null
@@ -1,7 +0,0 @@ -This is a testharness.js-based test. -[FAIL] scatterND 1D float16 tensors (Insert individual elements in a tensor by index) - assert_less_than_equal: assert_array_approx_equals_ulp: test scatterND float16 actual 2.00390625 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 1026 -[FAIL] scatterND 3D float16 tensors (Insert entire slices of a higher rank tensor) - assert_less_than_equal: assert_array_approx_equals_ulp: test scatterND float16 actual 2052 should be close enough to expected 5 by ULP distance: expected a number less than or equal to 0 but got 8962 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sigmoid.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sigmoid.https.any_gpu-expected.txt deleted file mode 100644 index f87a249..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sigmoid.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] sigmoid float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sigmoid float16 actual 512 should be close enough to expected 0.406982421875 by ULP distance: expected a number less than or equal to 10 but got 10621 -[FAIL] sigmoid float16 0D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sigmoid float16 actual 0 should be close enough to expected 0.406982421875 by ULP distance: expected a number less than or equal to 10 but got 13955 -[FAIL] sigmoid float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sigmoid float16 actual 0 should be close enough to expected 0.406982421875 by ULP distance: expected a number less than or equal to 10 but got 13955 -[FAIL] sigmoid float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sigmoid float16 actual 0 should be close enough to expected 0.406982421875 by ULP distance: expected a number less than or equal to 10 but got 13955 -[FAIL] sigmoid float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sigmoid float16 actual 0 should be close enough to expected 0.406982421875 by ULP distance: expected a number less than or equal to 10 but got 13955 -[FAIL] sigmoid float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sigmoid float16 actual 0 should be close enough to expected 0.406982421875 by ULP distance: expected a number less than or equal to 10 but got 13955 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sign.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sign.https.any_gpu-expected.txt index 208f524..651b808 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sign.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sign.https.any_gpu-expected.txt
@@ -1,6 +1,4 @@ This is a testharness.js-based test. -[FAIL] sign float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sign float16 actual 0 should be close enough to expected -1 by ULP distance: expected a number less than or equal to 0 but got 48128 [FAIL] sign int64 3D tensor promise_test: Unhandled rejection with value: object "TypeError: Unsupported data type, input 'input' data type int64 must be one of [float32,float16,int32]." [FAIL] sign int8 4D tensor
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sin.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sin.https.any_gpu-expected.txt deleted file mode 100644 index f950821..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sin.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] sin float16 0D scalar - assert_array_approx_equals: test sin float16 property 0, expected -0.935546875 +/- 0.001953125, expected -0.935546875 but got 0 -[FAIL] sin float16 1D constant tensor - assert_array_approx_equals: test sin float16 property 0, expected -0.935546875 +/- 0.001953125, expected -0.935546875 but got -0 -[FAIL] sin float16 1D tensor - assert_array_approx_equals: test sin float16 property 0, expected -0.935546875 +/- 0.001953125, expected -0.935546875 but got 0 -[FAIL] sin float16 2D tensor - assert_array_approx_equals: test sin float16 property 0, expected -0.935546875 +/- 0.001953125, expected -0.935546875 but got 0 -[FAIL] sin float16 3D tensor - assert_array_approx_equals: test sin float16 property 0, expected -0.935546875 +/- 0.001953125, expected -0.935546875 but got 0 -[FAIL] sin float16 4D tensor - assert_array_approx_equals: test sin float16 property 0, expected -0.935546875 +/- 0.001953125, expected -0.935546875 but got 0 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/slice.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/slice.https.any_gpu-expected.txt index ad4f418..20a755b 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/slice.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/slice.https.any_gpu-expected.txt
@@ -3,19 +3,5 @@ assert_less_than_equal: assert_array_approx_equals_ulp: test slice float32 actual 0 should be close enough to expected 0.5424534678459167 by ULP distance: expected a number less than or equal to 0n but got 1057676859n [FAIL] slice float16 1D constant tensor assert_less_than_equal: assert_array_approx_equals_ulp: test slice float16 actual 0 should be close enough to expected 0.54248046875 by ULP distance: expected a number less than or equal to 0 but got 14423 -[FAIL] slice float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test slice float16 actual 0 should be close enough to expected 0.54248046875 by ULP distance: expected a number less than or equal to 0 but got 14423 -[FAIL] slice float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test slice float16 actual 0 should be close enough to expected 28.328125 by ULP distance: expected a number less than or equal to 0 but got 20245 -[FAIL] slice float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test slice float16 actual 0 should be close enough to expected 57.4375 by ULP distance: expected a number less than or equal to 0 but got 21294 -[FAIL] slice float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test slice float16 actual 0 should be close enough to expected -27.3125 by ULP distance: expected a number less than or equal to 0 but got 52948 -[FAIL] slice float16 2D tensor with strides - assert_less_than_equal: assert_array_approx_equals_ulp: test slice float16 actual 0 should be close enough to expected -68.1875 by ULP distance: expected a number less than or equal to 0 but got 54339 -[FAIL] slice float16 3D tensor with strides - assert_less_than_equal: assert_array_approx_equals_ulp: test slice float16 actual 0 should be close enough to expected 97.9375 by ULP distance: expected a number less than or equal to 0 but got 22047 -[FAIL] slice float16 4D tensor with strides - assert_less_than_equal: assert_array_approx_equals_ulp: test slice float16 actual 0 should be close enough to expected 79.8125 by ULP distance: expected a number less than or equal to 0 but got 21757 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softplus.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softplus.https.any_gpu-expected.txt deleted file mode 100644 index 1d100a0a..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softplus.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] softplus float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softplus float16 actual 0.0078125 should be close enough to expected 5.62890625 by ULP distance: expected a number less than or equal to 18 but got 9633 -[FAIL] softplus float16 0D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softplus float16 actual 0 should be close enough to expected 5.62890625 by ULP distance: expected a number less than or equal to 18 but got 14943 -[FAIL] softplus float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softplus float16 actual 0 should be close enough to expected 5.62890625 by ULP distance: expected a number less than or equal to 18 but got 17825 -[FAIL] softplus float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softplus float16 actual 0 should be close enough to expected 5.62890625 by ULP distance: expected a number less than or equal to 18 but got 17825 -[FAIL] softplus float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softplus float16 actual 0 should be close enough to expected 5.62890625 by ULP distance: expected a number less than or equal to 18 but got 17825 -[FAIL] softplus float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softplus float16 actual 0 should be close enough to expected 5.62890625 by ULP distance: expected a number less than or equal to 18 but got 17825 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softsign.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softsign.https.any_gpu-expected.txt index 1407781..e7d6809 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softsign.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/softsign.https.any_gpu-expected.txt
@@ -2,20 +2,6 @@ [FAIL] softsign positive float32 1D constant tensor assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float32 actual 0.3117741644382477 should be close enough to expected 0.8030999898910522 by ULP distance: expected a number less than or equal to 3n but got 11400985n [FAIL] softsign positive float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float16 actual 0 should be close enough to expected 0.61279296875 by ULP distance: expected a number less than or equal to 3 but got 14567 -[FAIL] softsign positive float16 0D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float16 actual 0 should be close enough to expected 0.61279296875 by ULP distance: expected a number less than or equal to 3 but got 14567 -[FAIL] softsign negative float16 0D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float16 actual 0 should be close enough to expected -0.72216796875 by ULP distance: expected a number less than or equal to 3 but got 47559 -[FAIL] softsign positive float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float16 actual -0.0078125 should be close enough to expected 0.61279296875 by ULP distance: expected a number less than or equal to 3 but got 26393 -[FAIL] softsign negative float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float16 actual 0 should be close enough to expected -0.72216796875 by ULP distance: expected a number less than or equal to 3 but got 47559 -[FAIL] softsign float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float16 actual 0 should be close enough to expected -0.89306640625 by ULP distance: expected a number less than or equal to 3 but got 47909 -[FAIL] softsign float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float16 actual 0 should be close enough to expected -0.89306640625 by ULP distance: expected a number less than or equal to 3 but got 47909 -[FAIL] softsign float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float16 actual 0 should be close enough to expected -0.89306640625 by ULP distance: expected a number less than or equal to 3 but got 47909 + assert_less_than_equal: assert_array_approx_equals_ulp: test softsign float16 actual 0.311767578125 should be close enough to expected 0.80322265625 by ULP distance: expected a number less than or equal to 3 but got 1392 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sqrt.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sqrt.https.any_gpu-expected.txt deleted file mode 100644 index 0125b668..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sqrt.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] sqrt float16 0D scalar - assert_less_than_equal: assert_array_approx_equals_ulp: test sqrt float16 actual 0 should be close enough to expected 2 by ULP distance: expected a number less than or equal to 1 but got 16384 -[FAIL] sqrt float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sqrt float16 actual 512 should be close enough to expected 2.693359375 by ULP distance: expected a number less than or equal to 1 but got 7837 -[FAIL] sqrt float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sqrt float16 actual 0 should be close enough to expected 2.693359375 by ULP distance: expected a number less than or equal to 1 but got 16739 -[FAIL] sqrt float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sqrt float16 actual 0 should be close enough to expected 2.693359375 by ULP distance: expected a number less than or equal to 1 but got 16739 -[FAIL] sqrt float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sqrt float16 actual 0 should be close enough to expected 2.693359375 by ULP distance: expected a number less than or equal to 1 but got 16739 -[FAIL] sqrt float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test sqrt float16 actual 0 should be close enough to expected 2.693359375 by ULP distance: expected a number less than or equal to 1 but got 16739 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sub.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sub.https.any_gpu-expected.txt index ac2f1528..86c408de 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sub.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/sub.https.any_gpu-expected.txt
@@ -1,22 +1,4 @@ This is a testharness.js-based test. -[FAIL] sub float16 1D constant tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test sub float16 actual 512 should be close enough to expected 122.6875 by ULP distance: expected a number less than or equal to 1 but got 2133 -[FAIL] sub float16 1D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test sub float16 actual 0 should be close enough to expected 122.6875 by ULP distance: expected a number less than or equal to 1 but got 22443 -[FAIL] sub float16 2D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test sub float16 actual 0 should be close enough to expected 122.6875 by ULP distance: expected a number less than or equal to 1 but got 22443 -[FAIL] sub float16 3D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test sub float16 actual 0 should be close enough to expected 122.6875 by ULP distance: expected a number less than or equal to 1 but got 22443 -[FAIL] sub float16 4D tensors - assert_less_than_equal: assert_array_approx_equals_ulp: test sub float16 actual 0 should be close enough to expected 122.6875 by ULP distance: expected a number less than or equal to 1 but got 22443 -[FAIL] sub float16 broadcast 1D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test sub float16 actual 0 should be close enough to expected -170.625 by ULP distance: expected a number less than or equal to 1 but got 55637 -[FAIL] sub float16 broadcast 2D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test sub float16 actual 0 should be close enough to expected 62.8125 by ULP distance: expected a number less than or equal to 1 but got 21466 -[FAIL] sub float16 broadcast 3D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test sub float16 actual 0 should be close enough to expected 81.9375 by ULP distance: expected a number less than or equal to 1 but got 21791 -[FAIL] sub float16 broadcast 4D to 4D - assert_less_than_equal: assert_array_approx_equals_ulp: test sub float16 actual 0 should be close enough to expected -170.625 by ULP distance: expected a number less than or equal to 1 but got 55637 [FAIL] sub int8 4D tensors promise_test: Unhandled rejection with value: object "TypeError: Unsupported data type, input 'a' data type int8 must be one of [float32,float16,int32,int64]." [FAIL] sub uint8 4D tensors
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tan.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tan.https.any_gpu-expected.txt deleted file mode 100644 index 6e405257..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tan.https.any_gpu-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -This is a testharness.js-based test. -[FAIL] tan float16 0D scalar - assert_array_approx_equals: test tan float16 property 0, expected -0.87646484375 +/- 0.001953125, expected -0.87646484375 but got 0 -[FAIL] tan float16 1D constant tensor - assert_array_approx_equals: test tan float16 property 0, expected -0.87646484375 +/- 0.001953125, expected -0.87646484375 but got 512 -[FAIL] tan float16 1D tensor - assert_array_approx_equals: test tan float16 property 0, expected -0.87646484375 +/- 0.001953125, expected -0.87646484375 but got 0 -[FAIL] tan float16 2D tensor - assert_array_approx_equals: test tan float16 property 0, expected -0.87646484375 +/- 0.001953125, expected -0.87646484375 but got 0 -[FAIL] tan float16 3D tensor - assert_array_approx_equals: test tan float16 property 0, expected -0.87646484375 +/- 0.001953125, expected -0.87646484375 but got 0 -[FAIL] tan float16 4D tensor - assert_array_approx_equals: test tan float16 property 0, expected -0.87646484375 +/- 0.001953125, expected -0.87646484375 but got 0 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tanh.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tanh.https.any_gpu-expected.txt deleted file mode 100644 index c4c7b1d0..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tanh.https.any_gpu-expected.txt +++ /dev/null
@@ -1,13 +0,0 @@ -This is a testharness.js-based test. -[FAIL] tanh float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test tanh float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 16 but got 15360 -[FAIL] tanh float16 1D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test tanh float16 actual 0.0078125 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 16 but got 7168 -[FAIL] tanh float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test tanh float16 actual 0.0078125 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 16 but got 7168 -[FAIL] tanh float16 3D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test tanh float16 actual 0.0078125 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 16 but got 7168 -[FAIL] tanh float16 4D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test tanh float16 actual 0.0078125 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 16 but got 7168 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any.serviceworker_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any.serviceworker_gpu-expected.txt deleted file mode 100644 index d2490db..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any.serviceworker_gpu-expected.txt +++ /dev/null
@@ -1,3 +0,0 @@ -This is a testharness.js-based test. -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any.sharedworker_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any.sharedworker_gpu-expected.txt deleted file mode 100644 index d2490db..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any.sharedworker_gpu-expected.txt +++ /dev/null
@@ -1,3 +0,0 @@ -This is a testharness.js-based test. -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any.worker_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any.worker_gpu-expected.txt deleted file mode 100644 index d2490db..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any.worker_gpu-expected.txt +++ /dev/null
@@ -1,3 +0,0 @@ -This is a testharness.js-based test. -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any_gpu-expected.txt deleted file mode 100644 index d2490db..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tensor.https.any_gpu-expected.txt +++ /dev/null
@@ -1,3 +0,0 @@ -This is a testharness.js-based test. -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tile.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tile.https.any_gpu-expected.txt index d1059cf2..453f3d9 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tile.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/tile.https.any_gpu-expected.txt
@@ -1,8 +1,4 @@ This is a testharness.js-based test. -[FAIL] tile float16 1D constant tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test tile float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 15360 -[FAIL] tile float16 2D tensor - assert_less_than_equal: assert_array_approx_equals_ulp: test tile float16 actual 0 should be close enough to expected 1 by ULP distance: expected a number less than or equal to 0 but got 15360 [FAIL] tile uint32 2D tensor promise_test: Unhandled rejection with value: object "TypeError: Unsupported data type, input 'input' data type uint32 must be one of [float32,float16,int32,int64,uint8]." Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/transpose.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/transpose.https.any_gpu-expected.txt deleted file mode 100644 index 4447b6d..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/transpose.https.any_gpu-expected.txt +++ /dev/null
@@ -1,11 +0,0 @@ -This is a testharness.js-based test. -[FAIL] transpose float16 1D constant tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test transpose float16 actual -2 should be close enough to expected -45.6875 by ULP distance: expected a number less than or equal to 0 but got 4534 -[FAIL] transpose float16 1D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test transpose float16 actual Infinity should be close enough to expected -45.6875 by ULP distance: expected a number less than or equal to 0 but got 21942 -[FAIL] transpose float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test transpose float16 actual 0 should be close enough to expected -45.6875 by ULP distance: expected a number less than or equal to 0 but got 53686 -[FAIL] transpose float16 1D tensor options.permutation - assert_less_than_equal: assert_array_approx_equals_ulp: test transpose float16 actual Infinity should be close enough to expected -45.6875 by ULP distance: expected a number less than or equal to 0 but got 21942 -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/triangular.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/triangular.https.any_gpu-expected.txt index 515c9b9d..0c18402 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/triangular.https.any_gpu-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/triangular.https.any_gpu-expected.txt
@@ -2,34 +2,6 @@ [FAIL] triangular float32 2D tensor default options assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float32 actual 24.678754806518555 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0n but got 1103457815n [FAIL] triangular float16 2D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 3D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 4D tensor default options - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 4D tensor explict options.upper=true - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 4D tensor options.upper=false - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 4D tensor explict options.diagonal=0 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 4D tensor options.diagonal=1 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual NaN should be close enough to expected -86.1875 by ULP distance: expected a number less than or equal to 0 but got 10845 -[FAIL] triangular float16 4D tensor options.diagonal=-1 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 4D tensor fully zero options.diagonal=3 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual NaN should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 65472 -[FAIL] triangular float16 4D tensor fully copied options.diagonal=-2 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 4D tensor options.upper=true options.diagonal=1 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual NaN should be close enough to expected -86.1875 by ULP distance: expected a number less than or equal to 0 but got 10845 -[FAIL] triangular float16 4D tensor options.upper=false options.diagonal=1 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 4D tensor options.upper=false options.diagonal=-1 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual NaN should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 65472 -[FAIL] triangular float16 4D tensor fully copied options.upper=false options.diagonal=3 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 0 should be close enough to expected 84.9375 by ULP distance: expected a number less than or equal to 0 but got 21839 -[FAIL] triangular float16 4D tensor fully zero options.upper=false options.diagonal=-2 - assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual NaN should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 65472 + assert_less_than_equal: assert_array_approx_equals_ulp: test triangular float16 actual 24.671875 should be close enough to expected 0 by ULP distance: expected a number less than or equal to 0 but got 20011 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/where.https.any_gpu-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/where.https.any_gpu-expected.txt new file mode 100644 index 0000000..b7c18cde --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/where.https.any_gpu-expected.txt
@@ -0,0 +1,11 @@ +This is a testharness.js-based test. +[FAIL] where float32 4D tensors only broadcast condition 1D to 4D + assert_less_than_equal: assert_array_approx_equals_ulp: test where float32 actual -1.5351932048797607 should be close enough to expected -39.82423782348633 by ULP distance: expected a number less than or equal to 0n but got 39504591n +[FAIL] where float32 4D tensors only broadcast condition 2D to 4D + assert_less_than_equal: assert_array_approx_equals_ulp: test where float32 actual -83.77035522460938 should be close enough to expected -21.683168411254883 by ULP distance: expected a number less than or equal to 0n but got 16388939n +[FAIL] where float16 4D tensors only broadcast condition 1D to 4D + assert_less_than_equal: assert_array_approx_equals_ulp: test where float16 actual -1.53515625 should be close enough to expected -39.8125 by ULP distance: expected a number less than or equal to 0 but got 4822 +[FAIL] where float16 4D tensors only broadcast condition 2D to 4D + assert_less_than_equal: assert_array_approx_equals_ulp: test where float16 actual -83.75 should be close enough to expected -21.6875 by ULP distance: expected a number less than or equal to 0 but got 2000 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/mac-mac14-arm64/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac14-arm64/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https-expected.txt index 5c59f2c0..e90ecba0 100644 --- a/third_party/blink/web_tests/platform/mac-mac14-arm64/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https-expected.txt +++ b/third_party/blink/web_tests/platform/mac-mac14-arm64/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https-expected.txt
@@ -1,7 +1,9 @@ This is a testharness.js-based test. +[FAIL] sendKeyFrameRequest does not throw for unset transforms + assert_equals: expected "success" but got "failure: InvalidStateError" [FAIL] sendKeyFrameRequest does not reject when the receiver is negotiated inactive, and resumes succeeding when negotiated back to active assert_equals: expected "success" but got "failure: InvalidStateError" -[FAIL] sendKeyFrameRequest does not rejects when the receiver is stopped +[FAIL] sendKeyFrameRequest does not reject when the receiver is stopped assert_equals: expected "success" but got "failure: InvalidStateError" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/win/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https-expected.txt b/third_party/blink/web_tests/platform/win/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https-expected.txt index 5c59f2c0..e90ecba0 100644 --- a/third_party/blink/web_tests/platform/win/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https-expected.txt +++ b/third_party/blink/web_tests/platform/win/external/wpt/webrtc-encoded-transform/script-transform-sendKeyFrameRequest.https-expected.txt
@@ -1,7 +1,9 @@ This is a testharness.js-based test. +[FAIL] sendKeyFrameRequest does not throw for unset transforms + assert_equals: expected "success" but got "failure: InvalidStateError" [FAIL] sendKeyFrameRequest does not reject when the receiver is negotiated inactive, and resumes succeeding when negotiated back to active assert_equals: expected "success" but got "failure: InvalidStateError" -[FAIL] sendKeyFrameRequest does not rejects when the receiver is stopped +[FAIL] sendKeyFrameRequest does not reject when the receiver is stopped assert_equals: expected "success" but got "failure: InvalidStateError" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/wpt_internal/controlled-frame/controlledframe-undefined.https.window.js b/third_party/blink/web_tests/wpt_internal/controlled-frame/controlledframe-undefined.https.window.js index 5adb23b..f5cc21e 100644 --- a/third_party/blink/web_tests/wpt_internal/controlled-frame/controlledframe-undefined.https.window.js +++ b/third_party/blink/web_tests/wpt_internal/controlled-frame/controlledframe-undefined.https.window.js
@@ -6,9 +6,9 @@ 'Isolated Web App'; test(() => { - assert_true(typeof ControlledFrame === 'undefined'); + assert_true(typeof HTMLControlledFrameElement === 'undefined'); // 'WebView' is not defined when 'ControlledFrame' is defined, but 'WebView' // is defined for some non-web contexts. We test it here out of caution to // ensure the element isn't accidentally exposed. - assert_true(typeof WebView == 'undefined'); + assert_true(typeof WebView === 'undefined'); }, test_desc);
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-masonry/column-auto-repeat-auto-028-ref.html b/third_party/blink/web_tests/wpt_internal/css/css-masonry/column-auto-repeat-auto-028-ref.html new file mode 100644 index 0000000..1f19133 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/css-masonry/column-auto-repeat-auto-028-ref.html
@@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<style> +.masonry { + display: grid; + background: gray; + item-tolerance: 0; + grid-template-columns: auto; + width: auto; + height: auto; +} + +.masonry > div { + width: 100%; + height: 100px; +} +</style> +<div class="masonry"> + <div style="background: lightskyblue;"></div> + <div style="background: lightcoral;"></div> + <div style="background: lightgreen;"></div> +</div> +</html>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-masonry/column-auto-repeat-auto-028.html b/third_party/blink/web_tests/wpt_internal/css/css-masonry/column-auto-repeat-auto-028.html new file mode 100644 index 0000000..135f761 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/css-masonry/column-auto-repeat-auto-028.html
@@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html> +<title>Auto repeat tracks with auto track sizes and % sized children with auto sized container</title> +<link rel="help" href="https://drafts.csswg.org/css-grid-3"> +<link rel="match" href="column-auto-repeat-auto-028-ref.html"> +<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com"> +<style> +.masonry { + display: masonry; + background: gray; + item-tolerance: 0; + grid-template-columns: repeat(auto-fill, auto); + width: auto; + height: auto; +} + +.masonry > div { + width: 100%; + height: 100px; +} +</style> +<div class="masonry"> + <div style="background: lightskyblue;"></div> + <div style="background: lightcoral;"></div> + <div style="background: lightgreen;"></div> +</div> +</html>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-masonry/row-auto-repeat-auto-028.html b/third_party/blink/web_tests/wpt_internal/css/css-masonry/row-auto-repeat-auto-028.html new file mode 100644 index 0000000..e230e72 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/css-masonry/row-auto-repeat-auto-028.html
@@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> +<title>Auto repeat tracks with auto track sizes and % sized children with auto sized container</title> +<link rel="help" href="https://drafts.csswg.org/css-grid-3"> +<!-- No content is produced because there is nothing to size the rows +or items against in the block axis. --> +<link rel="match" href="../reference/blank.html"> +<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com"> +<style> +.masonry { + display: masonry; + background: gray; + item-tolerance: 0; + masonry-direction: row; + grid-template-rows: repeat(auto-fill, auto); + width: auto; + height: auto; +} + +.masonry > div { + height: 100%; + width: 100px; +} +</style> +<div class="masonry"> + <div style="background: lightskyblue;"></div> + <div style="background: lightcoral;"></div> + <div style="background: lightgreen;"></div> +</div> +</html>
diff --git a/third_party/blink/web_tests/wpt_internal/css/reference/blank.html b/third_party/blink/web_tests/wpt_internal/css/reference/blank.html new file mode 100644 index 0000000..f2fab5a --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/reference/blank.html
@@ -0,0 +1,3 @@ +<!doctype html> +<title>CSS Test Reference</title> +<!-- Intentionally blank -->
diff --git a/third_party/blink/web_tests/wpt_internal/html/canvas/drawElement/nested-canvas-not-rendered-ref.html b/third_party/blink/web_tests/wpt_internal/html/canvas/drawElement/nested-canvas-not-rendered-ref.html new file mode 100644 index 0000000..77e9829 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/html/canvas/drawElement/nested-canvas-not-rendered-ref.html
@@ -0,0 +1,2 @@ +<!DOCTYPE html> +<canvas style="width: 100px; height: 100px; background: green;"></canvas>
diff --git a/third_party/blink/web_tests/wpt_internal/html/canvas/drawElement/nested-canvas-not-rendered.html b/third_party/blink/web_tests/wpt_internal/html/canvas/drawElement/nested-canvas-not-rendered.html new file mode 100644 index 0000000..618ec19 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/html/canvas/drawElement/nested-canvas-not-rendered.html
@@ -0,0 +1,9 @@ +<!DOCTYPE html> +<title>Canvas.drawElement: nested canvases should not render</title> +<link rel="help" href="https://github.com/WICG/html-in-canvas"> +<link rel="match" href="nested-canvas-not-rendered-ref.html"> +<canvas layoutsubtree="true" style="width: 100px; height: 100px; background: green;"> + <!-- Neither of the nested canvases should render. --> + <canvas style="width: 60px; height: 50px; background: red;"></canvas> + <canvas layoutsubtree="true" style="width: 50px; height: 60px; background: red;"></canvas> +</canvas>
diff --git a/third_party/compiler-rt/src b/third_party/compiler-rt/src index a0b0e48..50e4340 160000 --- a/third_party/compiler-rt/src +++ b/third_party/compiler-rt/src
@@ -1 +1 @@ -Subproject commit a0b0e482f99c0b79b1c5330bd017157d9f23e700 +Subproject commit 50e43403df8d49d03776b12025f63c925ccadd77
diff --git a/third_party/devtools-frontend/src b/third_party/devtools-frontend/src index c0f6211..e9ce822 160000 --- a/third_party/devtools-frontend/src +++ b/third_party/devtools-frontend/src
@@ -1 +1 @@ -Subproject commit c0f621140e1c433cf5a0f9b2009dba08a42edb32 +Subproject commit e9ce822a5399d3177aea5756cd24d9c7ecec2c2c
diff --git a/third_party/libc++/src b/third_party/libc++/src index 1ce2525..adbb4a5 160000 --- a/third_party/libc++/src +++ b/third_party/libc++/src
@@ -1 +1 @@ -Subproject commit 1ce2525ae355a30a61bacd896916c3416d1827b1 +Subproject commit adbb4a5210ae2a8a4e27fa6199221156c02a9b1a
diff --git a/third_party/lit/v3_0/BUILD.gn b/third_party/lit/v3_0/BUILD.gn index e98f1a1..500e16f2 100644 --- a/third_party/lit/v3_0/BUILD.gn +++ b/third_party/lit/v3_0/BUILD.gn
@@ -116,6 +116,7 @@ "//content/browser/resources/service_worker:build_ts", "//content/browser/resources/traces_internals:build_ts", "//ios/chrome/app/resources/profile_internals:build_ts", + "//ui/webui/resources/cr_components/composebox:build_ts", "//ui/webui/resources/cr_components/cr_shortcut_input:build_ts", "//ui/webui/resources/cr_components/customize_color_scheme_mode:build_ts", "//ui/webui/resources/cr_components/help_bubble:build_ts",
diff --git a/third_party/metrics_proto/README.chromium b/third_party/metrics_proto/README.chromium index 67e355bc..fb732533 100644 --- a/third_party/metrics_proto/README.chromium +++ b/third_party/metrics_proto/README.chromium
@@ -1,8 +1,8 @@ Name: Metrics Protos Short Name: metrics_proto URL: This is the canonical public repository -Version: 780607329 -Date: 2025-07-08 +Version: 788932306 +Date: 2025-07-30 License: BSD-3-Clause License File: LICENSE Shipped: yes
diff --git a/third_party/metrics_proto/omnibox_event.proto b/third_party/metrics_proto/omnibox_event.proto index 014a4f39..61962cfb 100644 --- a/third_party/metrics_proto/omnibox_event.proto +++ b/third_party/metrics_proto/omnibox_event.proto
@@ -222,6 +222,10 @@ // Low End devices. JUMP_START = 30; + // The new tab page in which this omnibox interaction started with the user + // having focus in the composebox. + NTP_COMPOSEBOX = 31; + // When adding new classifications, please update the `OmniboxPageContext` // variants listed in chromium's // tools/metrics/histograms/metadata/omnibox/histograms.xml and also
diff --git a/third_party/metrics_proto/private_metrics/private_metrics.proto b/third_party/metrics_proto/private_metrics/private_metrics.proto index 60174d39..db1925f 100644 --- a/third_party/metrics_proto/private_metrics/private_metrics.proto +++ b/third_party/metrics_proto/private_metrics/private_metrics.proto
@@ -11,23 +11,60 @@ import "dwa/deidentified_web_analytics.proto"; +// A header included with each uploaded encrypted report in “associated data”, +// documenting how the report is encrypted and how the report may be used. +// Next tag: 3 +message PrivateMetricReportHeader { + // The COSE "kid" property (RFC 9052) of the asymmetric key used to encrypt + // the report. This is used to determine which decryption key is needed to + // decrypt the report. + optional bytes key_id = 1; + + // The epoch the report is associated with. Reports may only be processed with + // other reports from the same epoch. + optional fixed64 epoch_id = 2; +} + // A report containing encrypted private metrics data. Private metrics leverage // Trusted Execution Environments (TEEs) to enable secure and private collection // of essential metrics, facilitating safer releases and a better understanding // of user experience without compromising privacy. This proto will be stored // in Sawmill post upload to the UMA frontend, and will be subsequently // processed up by the k-anonymity pipeline in a trusted execution environment. -// Next tag: 2 +// Next tag: 5 message EncryptedPrivateMetricReport { // HPKE-encrypted and proto-serialized report, with associated data. // Associated data is the unencrypted non-sensitive header portion in // HPKE encryption. For `encrypted_report`, the associated data includes // information how the report was encrypted, the ID of the key used to encrypt // the report, and the ID of the epoch for which the report was generated. - // TODO(b/425689566): We will perform server-side validation to check that the - // associated_data is of type `BlobHeader`, and that all fields contained are - // included in the `BlobHeader` protocol buffer. optional bytes encrypted_report = 1; + + // The PrivateMetricReportHeader protocol buffer `report_header` in a + // serialized form. This string is cryptographically bound to the + // `encrypted_report` field as its associated data and must be provided as a + // parameter as-is for the `encrypted_report` to be decrypted. This field must + // be provided in addition to `report_header` field due to protocol buffer + // serialization not being deterministic. See: + // go/proto-serialization-not-canonical + optional string serialized_report_header = 2; + + // The PrivateMetricReportHeader protocol buffer provided as a non-serialized + // form. This field is provided to be prevent `serialized_report_header` from + // including arbitrary data. Server-side validation is performed to ensure + // that the fields and values provided in `serialized_report_header` are + // equivalent to those included in the `report_header` field. + optional PrivateMetricReportHeader report_header = 3; + + // The type of report. This is used to determine the Sawmill location to store + // the report post upload. + // Next tag: 2 + enum ReportType { + REPORT_TYPE_INVALID = 0; + DWA = 1; + } + + optional ReportType report_type = 4; } // A report containing unencrypted private metrics data. The unencrypted report
diff --git a/third_party/nearby/README.chromium b/third_party/nearby/README.chromium index 6240b89f..b51c119 100644 --- a/third_party/nearby/README.chromium +++ b/third_party/nearby/README.chromium
@@ -1,7 +1,7 @@ Name: Nearby Connections Library Short Name: Nearby URL: https://github.com/google/nearby -Version: fcd3cb0fc319b2a0269479e1f7e306e57337ea11 +Version: c55262ad13aba122cfa32bda67c17ef0a887a0a8 License: Apache-2.0 License File: LICENSE Security Critical: yes
diff --git a/third_party/nearby/src b/third_party/nearby/src index fcd3cb0f..c55262a 160000 --- a/third_party/nearby/src +++ b/third_party/nearby/src
@@ -1 +1 @@ -Subproject commit fcd3cb0fc319b2a0269479e1f7e306e57337ea11 +Subproject commit c55262ad13aba122cfa32bda67c17ef0a887a0a8
diff --git a/third_party/perfetto b/third_party/perfetto index d248102..0c893ed 160000 --- a/third_party/perfetto +++ b/third_party/perfetto
@@ -1 +1 @@ -Subproject commit d248102abcfb167da566d0ca45d2fa32652aa31c +Subproject commit 0c893ed6bf6b42e3fee58daf3380d301c72550ed
diff --git a/third_party/polymer/v3_0/BUILD.gn b/third_party/polymer/v3_0/BUILD.gn index 52acbf8..d57a35c4 100644 --- a/third_party/polymer/v3_0/BUILD.gn +++ b/third_party/polymer/v3_0/BUILD.gn
@@ -150,6 +150,7 @@ "//chrome/test/data/webui/settings:build_ts", "//chrome/test/data/webui/side_panel:build_ts", "//chrome/test/data/webui/support_tool:build_ts", + "//ui/webui/resources/cr_components/composebox:build_ts", "//ui/webui/resources/cr_components/customize_themes:build_ts", "//ui/webui/resources/cr_components/help_bubble:build_ts", "//ui/webui/resources/cr_components/searchbox:build_ts",
diff --git a/third_party/rust/cxx/chromium_integration/run_cxxbridge.py b/third_party/rust/cxx/chromium_integration/run_cxxbridge.py index 247870b..23e0ea7 100755 --- a/third_party/rust/cxx/chromium_integration/run_cxxbridge.py +++ b/third_party/rust/cxx/chromium_integration/run_cxxbridge.py
@@ -5,10 +5,13 @@ # found in the LICENSE file. import argparse +import io import os +import platform import subprocess import sys + # Set up path to load action_helpers.py which enables us to do # atomic output that's maximally compatible with ninja. sys.path.append( @@ -17,6 +20,68 @@ import action_helpers +# TODO(https://crbug.com/435437947): Deduplicate the following pieces which +# also appear in `//build/rust/run_build_script.py`: +# * `--rust-prefix` and `--target` args +# * `rustc_name` (note that `build/rust/rustc_wrapper.py` gets `--rustc` with +# the full path so it doesn't need to worry about the `.exe` suffix; maybe +# this aspect can also be unified somehow) +# * `host_triple` +# * Parts of `get_cfg_args` below duplicate some parts of +# `set_cargo_cfg_target_env_variables` from `run_build_script.py` + + +def rustc_name(): + if platform.system() == 'Windows': + return "rustc.exe" + else: + return "rustc" + + +def host_triple(rustc_path): + """ Works out the host rustc target. """ + args = [rustc_path, "-vV"] + known_vars = {} + output = subprocess.check_output(args).decode('utf-8') + for line in output.splitlines(): + m = RUSTC_VERSION_LINE.match(line.rstrip()) + if m: + known_vars[m.group(1)] = m.group(2) + return known_vars["host"] + + +def get_cfg_args(rust_prefix, target): + """ Returns `--cfg=target_arch=...` etc. based on output from rustc. """ + + rustc_path = os.path.join(rust_prefix, rustc_name()) + if target is None: + target = host_triple(rustc_path) + + # TODO(lukasza): Check if command-line flags other `--target` may affect the + # output of `--print-cfg`. If so, then consider also passing extra `args` + # (derived from `rustflags` maybe?). + args = [rustc_path, "--print=cfg", f"--target={target}"] + + # TODO(https://crbug.com/435437947): Ideally `rustc --print=cfg + # --target=...` would only be invoked **once** per build (not once per + # `run_cxxbridge.py` and once per `run_build_script.py`). + result = [] + output = subprocess.check_output(args).decode('utf-8') + for line in output.splitlines(): + line = line.strip() + + # TODO(https://crbug.com/435437947): To unblock https://crrev.com/c/6797874 + # we don't have to handle `unix` or `windows` or `debug_assertions`, but we + # should figure out how to do it in the long-term. The problem is that in + # the _absence_ of `unix` we need to set `unix=false` (and the same for all + # the other _known_ [= hardcoded?] no-`=` conditions). + if "=" not in line: continue + + result.append(f"--cfg={line}") + + return result + + def run(exe, args, output, is_header): cmdargs = [os.path.abspath(exe)] cmdargs.extend(args) @@ -38,11 +103,14 @@ parser.add_argument("--exe", help="Path to cxxbridge", required=True), parser.add_argument("--cc", help="output cc file", required=True) parser.add_argument("--header", help="output h file", required=True) + parser.add_argument('--target', help='rust target triple') + parser.add_argument('--rust-prefix', required=True, help='rust path prefix') parser.add_argument('args', metavar='args', nargs='+', help="Args to pass through") args = parser.parse_args() + args.args += get_cfg_args(args.rust_prefix, args.target) v = run(args.exe, args.args, args.cc, False) if v != 0: return v
diff --git a/third_party/rust/cxx/chromium_integration/rust_cxx.gni b/third_party/rust/cxx/chromium_integration/rust_cxx.gni index 4813e26..e0f716e 100644 --- a/third_party/rust/cxx/chromium_integration/rust_cxx.gni +++ b/third_party/rust/cxx/chromium_integration/rust_cxx.gni
@@ -125,6 +125,10 @@ output_h, "--cc", output_cc, + "--rust-prefix", + rebase_path("${rust_sysroot}/bin", root_build_dir), + "--target", + rust_abi_target, "{{source}}", "--", ]
diff --git a/third_party/skia b/third_party/skia index 49e39cd..af6d6eb 160000 --- a/third_party/skia +++ b/third_party/skia
@@ -1 +1 @@ -Subproject commit 49e39cd3cf1847f5e0464b4652735d6f0091f93d +Subproject commit af6d6eb383a6c8610d54bd3b0d8f69abf1020e34
diff --git a/third_party/tflite/README.chromium b/third_party/tflite/README.chromium index 1eb7547f..657501c6 100644 --- a/third_party/tflite/README.chromium +++ b/third_party/tflite/README.chromium
@@ -1,8 +1,8 @@ Name: TensorFlow Lite Short Name: tflite URL: https://github.com/tensorflow/tensorflow -Version: b5e11e3b029d533246345f0f22efb950c9c1e50b -Date: 2025-07-30 +Version: e979aba360252470603b339cc22c9f3b380fcc69 +Date: 2025-08-01 License: Caffe, Apache-2.0 License File: LICENSE Security Critical: Yes
diff --git a/third_party/tflite/src b/third_party/tflite/src index b5e11e3..e979aba3 160000 --- a/third_party/tflite/src +++ b/third_party/tflite/src
@@ -1 +1 @@ -Subproject commit b5e11e3b029d533246345f0f22efb950c9c1e50b +Subproject commit e979aba360252470603b339cc22c9f3b380fcc69
diff --git a/third_party/vulkan-deps b/third_party/vulkan-deps index 5755777..f62e36e 160000 --- a/third_party/vulkan-deps +++ b/third_party/vulkan-deps
@@ -1 +1 @@ -Subproject commit 5755777e263c93928218fef6d1a0c3f6750efbf3 +Subproject commit f62e36eef4788eb7a1b20ddb1814f7feeac79a76
diff --git a/third_party/vulkan-validation-layers/src b/third_party/vulkan-validation-layers/src index f113d73..71bacdd 160000 --- a/third_party/vulkan-validation-layers/src +++ b/third_party/vulkan-validation-layers/src
@@ -1 +1 @@ -Subproject commit f113d73531fb6b82f6cb3aebc0e7c0915b3f611e +Subproject commit 71bacddea636c10f1f9f01a163d8f3809620b5e3
diff --git a/third_party/wpt_tools/README.chromium b/third_party/wpt_tools/README.chromium index c47a051..f0c57c3 100644 --- a/third_party/wpt_tools/README.chromium +++ b/third_party/wpt_tools/README.chromium
@@ -2,7 +2,7 @@ Short Name: wpt URL: https://github.com/web-platform-tests/wpt/ Version: N/A -Revision: 8074c2b53ba903862d75234c53b70ffbf2285ca5 +Revision: 274305f54b764b53060fe959cbf1628b29a635ee Update Mechanism: Autoroll License: BSD-3-Clause Security Critical: no
diff --git a/third_party/wpt_tools/wpt/tools/webdriver/webdriver/bidi/modules/network.py b/third_party/wpt_tools/wpt/tools/webdriver/webdriver/bidi/modules/network.py index 0339d96..92db7228 100644 --- a/third_party/wpt_tools/wpt/tools/webdriver/webdriver/bidi/modules/network.py +++ b/third_party/wpt_tools/wpt/tools/webdriver/webdriver/bidi/modules/network.py
@@ -278,6 +278,11 @@ return result["collector"] @command + def remove_data_collector(self, collector: str) -> Mapping[str, Any]: + params: MutableMapping[str, Any] = {"collector": collector} + return params + + @command def set_cache_behavior( self, cache_behavior: CacheBehavior,
diff --git a/third_party/xnnpack/BUILD.gn b/third_party/xnnpack/BUILD.gn index d880e88..bbbfaf0 100644 --- a/third_party/xnnpack/BUILD.gn +++ b/third_party/xnnpack/BUILD.gn
@@ -1151,6 +1151,10 @@ ":f32-vtanh_arm64", ":f32-vunary_arm64", ":operators_arm64", + ":pf16-gemm_arch=armv8.2-a+sve+sve2", + ":pf32-gemm_arch=armv8.2-a+sve+sve2", + ":pqs8-f32-qc8w-igemm_arch=armv8.2-a+sve+sve2", + ":pqs8-qc8w-gemm_arch=armv8.2-a+sve+sve2", ":qb4-packw_arch=armv8.2-a+dotprod", ":qd8-f16-qb4w-gemm_arch=armv8.2-a+dotprod+fp16", ":qd8-f16-qb4w-gemm_arch=armv8.2-a+fp16", @@ -1184,8 +1188,10 @@ ":qp8-f32-qb4w-gemm_arch=armv8.2-a+i8mm+fp16", ":qp8-f32-qc4w-gemm_arch=armv8.2-a+dotprod", ":qp8-f32-qc4w-gemm_arch=armv8.2-a+i8mm+fp16", + ":qp8-f32-qc4w-gemm_arch=armv8.2-a+sve+sve2", ":qp8-f32-qc8w-gemm_arch=armv8.2-a+dotprod", ":qp8-f32-qc8w-gemm_arch=armv8.2-a+i8mm+fp16", + ":qp8-f32-qc8w-gemm_arch=armv8.2-a+sve+sve2", ":qs8-dwconv_arm64", ":qs8-f16-vcvt_arch=armv8.2-a+fp16", ":qs8-f32-vcvt_arm64", @@ -1245,15 +1251,18 @@ ":u8-rdminmax_arm64", ":u8-rminmax_arm64", ":u8-vclamp_arm64", + ":x16-pack-lh_arch=armv8.2-a+sve+sve2", ":x16-packw_arm64", ":x16-transposec_arm64", ":x16-x32-packw_arm64", ":x24-transposec_arm64", + ":x32-pack-lh_arch=armv8.2-a+sve+sve2", ":x32-packw_arm64", ":x32-transposec_arm64", ":x32-unpool_arm64", ":x64-transposec_arm64", ":x8-lut_arm64", + ":x8-pack-lh_arch=armv8.2-a+sve+sve2", ":x8-packq_arm64", ":x8-packw_arm64", ":x8-transposec_arm64", @@ -1359,6 +1368,10 @@ ":f32-vtanh_arm64_standalone", ":f32-vunary_arm64_standalone", ":operators_arm64_standalone", + ":pf16-gemm_arch=armv8.2-a+sve+sve2_standalone", + ":pf32-gemm_arch=armv8.2-a+sve+sve2_standalone", + ":pqs8-f32-qc8w-igemm_arch=armv8.2-a+sve+sve2_standalone", + ":pqs8-qc8w-gemm_arch=armv8.2-a+sve+sve2_standalone", ":qb4-packw_arch=armv8.2-a+dotprod_standalone", ":qd8-f16-qb4w-gemm_arch=armv8.2-a+dotprod+fp16_standalone", ":qd8-f16-qb4w-gemm_arch=armv8.2-a+fp16_standalone", @@ -1392,8 +1405,10 @@ ":qp8-f32-qb4w-gemm_arch=armv8.2-a+i8mm+fp16_standalone", ":qp8-f32-qc4w-gemm_arch=armv8.2-a+dotprod_standalone", ":qp8-f32-qc4w-gemm_arch=armv8.2-a+i8mm+fp16_standalone", + ":qp8-f32-qc4w-gemm_arch=armv8.2-a+sve+sve2_standalone", ":qp8-f32-qc8w-gemm_arch=armv8.2-a+dotprod_standalone", ":qp8-f32-qc8w-gemm_arch=armv8.2-a+i8mm+fp16_standalone", + ":qp8-f32-qc8w-gemm_arch=armv8.2-a+sve+sve2_standalone", ":qs8-dwconv_arm64_standalone", ":qs8-f16-vcvt_arch=armv8.2-a+fp16_standalone", ":qs8-f32-vcvt_arm64_standalone", @@ -1453,15 +1468,18 @@ ":u8-rdminmax_arm64_standalone", ":u8-rminmax_arm64_standalone", ":u8-vclamp_arm64_standalone", + ":x16-pack-lh_arch=armv8.2-a+sve+sve2_standalone", ":x16-packw_arm64_standalone", ":x16-transposec_arm64_standalone", ":x16-x32-packw_arm64_standalone", ":x24-transposec_arm64_standalone", + ":x32-pack-lh_arch=armv8.2-a+sve+sve2_standalone", ":x32-packw_arm64_standalone", ":x32-transposec_arm64_standalone", ":x32-unpool_arm64_standalone", ":x64-transposec_arm64_standalone", ":x8-lut_arm64_standalone", + ":x8-pack-lh_arch=armv8.2-a+sve+sve2_standalone", ":x8-packq_arm64_standalone", ":x8-packw_arm64_standalone", ":x8-transposec_arm64_standalone", @@ -38542,6 +38560,224 @@ } } + source_set("pf16-gemm_arch=armv8.2-a+sve+sve2") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/pf16-gemm/pf16-gemm-1x32c2-minmax-neonsme2.c", + "src/src/pf16-gemm/pf16-gemm-32x32c2-minmax-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool", + ] + + public_configs = [ ":xnnpack_public_config" ] + } + + # This is a target that cannot depend on //base. + if (build_with_internal_optimization_guide) { + source_set("pf16-gemm_arch=armv8.2-a+sve+sve2_standalone") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/pf16-gemm/pf16-gemm-1x32c2-minmax-neonsme2.c", + "src/src/pf16-gemm/pf16-gemm-32x32c2-minmax-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool:pthreadpool_standalone", + ] + + public_configs = [ ":xnnpack_public_config" ] + + if (!(is_android && use_order_profiling)) { + assert_no_deps = [ "//base" ] + } + } + } + + source_set("pf32-gemm_arch=armv8.2-a+sve+sve2") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/pf32-gemm/pf32-gemm-1x32-minmax-neonsme2.c", + "src/src/pf32-gemm/pf32-gemm-32x32-minmax-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool", + ] + + public_configs = [ ":xnnpack_public_config" ] + } + + # This is a target that cannot depend on //base. + if (build_with_internal_optimization_guide) { + source_set("pf32-gemm_arch=armv8.2-a+sve+sve2_standalone") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/pf32-gemm/pf32-gemm-1x32-minmax-neonsme2.c", + "src/src/pf32-gemm/pf32-gemm-32x32-minmax-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool:pthreadpool_standalone", + ] + + public_configs = [ ":xnnpack_public_config" ] + + if (!(is_android && use_order_profiling)) { + assert_no_deps = [ "//base" ] + } + } + } + + source_set("pqs8-f32-qc8w-igemm_arch=armv8.2-a+sve+sve2") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/pqs8-f32-qc8w-igemm/pqs8-f32-qc8w-igemm-32x32c4-minmax-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool", + ] + + public_configs = [ ":xnnpack_public_config" ] + } + + # This is a target that cannot depend on //base. + if (build_with_internal_optimization_guide) { + source_set("pqs8-f32-qc8w-igemm_arch=armv8.2-a+sve+sve2_standalone") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/pqs8-f32-qc8w-igemm/pqs8-f32-qc8w-igemm-32x32c4-minmax-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool:pthreadpool_standalone", + ] + + public_configs = [ ":xnnpack_public_config" ] + + if (!(is_android && use_order_profiling)) { + assert_no_deps = [ "//base" ] + } + } + } + + source_set("pqs8-qc8w-gemm_arch=armv8.2-a+sve+sve2") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/pqs8-qc8w-gemm/pqs8-qc8w-gemm-1x32c4-minmax-neonsme2.c", + "src/src/pqs8-qc8w-gemm/pqs8-qc8w-gemm-32x32c4-minmax-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool", + ] + + public_configs = [ ":xnnpack_public_config" ] + } + + # This is a target that cannot depend on //base. + if (build_with_internal_optimization_guide) { + source_set("pqs8-qc8w-gemm_arch=armv8.2-a+sve+sve2_standalone") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/pqs8-qc8w-gemm/pqs8-qc8w-gemm-1x32c4-minmax-neonsme2.c", + "src/src/pqs8-qc8w-gemm/pqs8-qc8w-gemm-32x32c4-minmax-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool:pthreadpool_standalone", + ] + + public_configs = [ ":xnnpack_public_config" ] + + if (!(is_android && use_order_profiling)) { + assert_no_deps = [ "//base" ] + } + } + } + source_set("qb4-packw_arch=armv8.2-a+dotprod") { cflags = [ "-march=armv8.2-a+dotprod" ] @@ -40413,6 +40649,61 @@ } } + source_set("qp8-f32-qc4w-gemm_arch=armv8.2-a+sve+sve2") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/qp8-f32-qc4w-gemm/qp8-f32-qc4w-gemm-minmax-16x64c4-neonsme2.c", + "src/src/qp8-f32-qc4w-gemm/qp8-f32-qc4w-gemm-minmax-1x64c4-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool", + ] + + public_configs = [ ":xnnpack_public_config" ] + } + + # This is a target that cannot depend on //base. + if (build_with_internal_optimization_guide) { + source_set("qp8-f32-qc4w-gemm_arch=armv8.2-a+sve+sve2_standalone") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/qp8-f32-qc4w-gemm/qp8-f32-qc4w-gemm-minmax-16x64c4-neonsme2.c", + "src/src/qp8-f32-qc4w-gemm/qp8-f32-qc4w-gemm-minmax-1x64c4-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool:pthreadpool_standalone", + ] + + public_configs = [ ":xnnpack_public_config" ] + + if (!(is_android && use_order_profiling)) { + assert_no_deps = [ "//base" ] + } + } + } + source_set("qp8-f32-qc8w-gemm_arch=armv8.2-a+dotprod") { cflags = [ "-march=armv8.2-a+dotprod" ] @@ -40523,6 +40814,61 @@ } } + source_set("qp8-f32-qc8w-gemm_arch=armv8.2-a+sve+sve2") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/qp8-f32-qc8w-gemm/qp8-f32-qc8w-gemm-minmax-16x64c4-neonsme2.c", + "src/src/qp8-f32-qc8w-gemm/qp8-f32-qc8w-gemm-minmax-1x64c4-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool", + ] + + public_configs = [ ":xnnpack_public_config" ] + } + + # This is a target that cannot depend on //base. + if (build_with_internal_optimization_guide) { + source_set("qp8-f32-qc8w-gemm_arch=armv8.2-a+sve+sve2_standalone") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/qp8-f32-qc8w-gemm/qp8-f32-qc8w-gemm-minmax-16x64c4-neonsme2.c", + "src/src/qp8-f32-qc8w-gemm/qp8-f32-qc8w-gemm-minmax-1x64c4-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool:pthreadpool_standalone", + ] + + public_configs = [ ":xnnpack_public_config" ] + + if (!(is_android && use_order_profiling)) { + assert_no_deps = [ "//base" ] + } + } + } + source_set("qs8-dwconv_arm64") { cflags = [] @@ -44016,6 +44362,59 @@ } } + source_set("x16-pack-lh_arch=armv8.2-a+sve+sve2") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/x16-pack-lh/x16-packlh-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool", + ] + + public_configs = [ ":xnnpack_public_config" ] + } + + # This is a target that cannot depend on //base. + if (build_with_internal_optimization_guide) { + source_set("x16-pack-lh_arch=armv8.2-a+sve+sve2_standalone") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/x16-pack-lh/x16-packlh-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool:pthreadpool_standalone", + ] + + public_configs = [ ":xnnpack_public_config" ] + + if (!(is_android && use_order_profiling)) { + assert_no_deps = [ "//base" ] + } + } + } + source_set("x16-packw_arm64") { cflags = [] @@ -44238,6 +44637,59 @@ } } + source_set("x32-pack-lh_arch=armv8.2-a+sve+sve2") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/x32-pack-lh/x32-packlh-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool", + ] + + public_configs = [ ":xnnpack_public_config" ] + } + + # This is a target that cannot depend on //base. + if (build_with_internal_optimization_guide) { + source_set("x32-pack-lh_arch=armv8.2-a+sve+sve2_standalone") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/x32-pack-lh/x32-packlh-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool:pthreadpool_standalone", + ] + + public_configs = [ ":xnnpack_public_config" ] + + if (!(is_android && use_order_profiling)) { + assert_no_deps = [ "//base" ] + } + } + } + source_set("x32-packw_arm64") { cflags = [] @@ -44535,6 +44987,61 @@ } } + source_set("x8-pack-lh_arch=armv8.2-a+sve+sve2") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/x8-pack-lh/x8-packlh-igemm-neonsme2.c", + "src/src/x8-pack-lh/x8-packlh-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool", + ] + + public_configs = [ ":xnnpack_public_config" ] + } + + # This is a target that cannot depend on //base. + if (build_with_internal_optimization_guide) { + source_set("x8-pack-lh_arch=armv8.2-a+sve+sve2_standalone") { + cflags = [ "-march=armv8.2-a+sve+sve2" ] + + sources = [ + "src/include/xnnpack.h", + "src/src/x8-pack-lh/x8-packlh-igemm-neonsme2.c", + "src/src/x8-pack-lh/x8-packlh-neonsme2.c", + ] + + configs -= [ "//build/config/compiler:chromium_code" ] + configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ "//build/config/sanitizers:cfi_icall_generalize_pointers" ] + configs += [ ":xnnpack_private_config" ] + + deps = [ + "//third_party/cpuinfo", + "//third_party/fp16", + "//third_party/fxdiv", + "//third_party/pthreadpool:pthreadpool_standalone", + ] + + public_configs = [ ":xnnpack_public_config" ] + + if (!(is_android && use_order_profiling)) { + assert_no_deps = [ "//base" ] + } + } + } + source_set("x8-packq_arm64") { cflags = []
diff --git a/third_party/xnnpack/README.chromium b/third_party/xnnpack/README.chromium index d22d0888..5bceddc 100644 --- a/third_party/xnnpack/README.chromium +++ b/third_party/xnnpack/README.chromium
@@ -1,8 +1,8 @@ Name: XNNPACK Short Name: xnnpack URL: https://github.com/google/xnnpack -Version: da77f69692eb5f7080ed7033032befe9a5c4f0b5 -Date: 2025-07-30 +Version: ae40b1a2d93d5c516bc7657c6c3eea1470f917ae +Date: 2025-08-01 License: BSD-3-Clause License File: src/LICENSE Security Critical: Yes
diff --git a/third_party/xnnpack/build_identifier.c b/third_party/xnnpack/build_identifier.c index 95015d7c..040073e 100644 --- a/third_party/xnnpack/build_identifier.c +++ b/third_party/xnnpack/build_identifier.c
@@ -978,10 +978,10 @@ #include <string.h> static const uint8_t xnn_build_identifier[] = { - 164, 28, 221, 40, 116, 132, 142, 116, - 137, 42, 176, 23, 45, 177, 226, 165, - 206, 226, 94, 0, 210, 35, 163, 189, - 192, 69, 203, 253, 23, 15, 14, 65 + 255, 126, 13, 183, 208, 110, 72, 58, + 81, 159, 78, 210, 161, 179, 217, 162, + 102, 34, 144, 66, 4, 33, 255, 84, + 129, 52, 69, 198, 151, 230, 177, 227 }; size_t xnn_experimental_get_build_identifier_size() {
diff --git a/third_party/xnnpack/src b/third_party/xnnpack/src index da77f69..ae40b1a 160000 --- a/third_party/xnnpack/src +++ b/third_party/xnnpack/src
@@ -1 +1 @@ -Subproject commit da77f69692eb5f7080ed7033032befe9a5c4f0b5 +Subproject commit ae40b1a2d93d5c516bc7657c6c3eea1470f917ae
diff --git a/tools/json_schema_compiler/feature_compiler_test.py b/tools/json_schema_compiler/feature_compiler_test.py index 73434fe..b44f7ab 100755 --- a/tools/json_schema_compiler/feature_compiler_test.py +++ b/tools/json_schema_compiler/feature_compiler_test.py
@@ -90,6 +90,13 @@ }) self._hasError(f, 'Illegal value: "all"') + def testInvalidChannel(self): + f = self._parseFeature({ + 'contexts': ['privileged_extension'], + 'channel': 'invalid_channel' + }) + self._hasError(f, 'Illegal value: "invalid_channel"') + def testUnknownKeyError(self): f = self._parseFeature({ 'contexts': ['privileged_extension'],
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 9cebc3a..989530f 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -10031,6 +10031,8 @@ <int value="-1498582719" label="ColorProviderRedirectionForThemeProvider:enabled"/> <int value="-1498334893" label="ExperimentalVRFeatures:enabled"/> + <int value="-1498297966" + label="AutofillEnableBuyNowPayLaterForExternallyLinked:enabled"/> <int value="-1497450774" label="TreatUnsafeDownloadsAsActive:disabled"/> <int value="-1497338981" label="disable-accelerated-overflow-scroll"/> <int value="-1496664643" label="WebSerialAPI:disabled"/> @@ -10333,6 +10335,8 @@ <int value="-1398026794" label="TabSearchPositionSetting:enabled"/> <int value="-1397764922" label="ProtectedTabsAndroid:disabled"/> <int value="-1397387245" label="CompactBubbleLauncher:disabled"/> + <int value="-1397171925" + label="AutofillEnableBuyNowPayLaterForExternallyLinked:disabled"/> <int value="-1396974542" label="UserMediaScreenCapturing:enabled"/> <int value="-1396906019" label="EarlyExitOnNoopClassOrStyleChange:disabled"/> <int value="-1396595854" @@ -17069,6 +17073,7 @@ <int value="1089014363" label="ArcAttestation:disabled"/> <int value="1089106835" label="ContextMenuPopupStyle:enabled"/> <int value="1089913432" label="VirtualDesksGestures:disabled"/> + <int value="1090167437" label="GlicPanelResetSizeAndLocationOnOpen:enabled"/> <int value="1090324500" label="EcheLauncher:enabled"/> <int value="1090377940" label="enable-quic-https"/> <int value="1090442943" label="SemanticColorDebugOverride:enabled"/> @@ -17639,6 +17644,7 @@ <int value="1287947083" label="WebAssemblyCodeProtectionPku:enabled"/> <int value="1288155322" label="SendTabToSelfIOSPushNotifications:disabled"/> <int value="1288612648" label="PluginVmFullscreen:enabled"/> + <int value="1289314736" label="GlicPanelResetSizeAndLocationOnOpen:disabled"/> <int value="1289433604" label="RecoverFromNeverSaveAndroid:enabled"/> <int value="1289495171" label="AssistantBetterOnboarding:disabled"/> <int value="1289647989" label="PasswordChangeAccountStoreUsers:enabled"/>
diff --git a/tools/metrics/histograms/metadata/accessibility/enums.xml b/tools/metrics/histograms/metadata/accessibility/enums.xml index 18687520..4d36029 100644 --- a/tools/metrics/histograms/metadata/accessibility/enums.xml +++ b/tools/metrics/histograms/metadata/accessibility/enums.xml
@@ -2109,6 +2109,17 @@ <!-- LINT.ThenChange(//chrome/common/read_anything/read_anything.mojom:Colors) --> +<!-- LINT.IfChange(ReadAnythingDistillationStatus) --> + +<enum name="ReadAnythingDistillationStatus"> + <int value="0" label="Failed"/> + <int value="1" label="Success"/> + <int value="2" label="Still running"/> + <int value="3" label="Restarted"/> +</enum> + +<!-- LINT.ThenChange(//chrome/common/read_anything/read_anything.mojom:DistillationStatus) --> + <!-- LINT.IfChange(ReadAnythingEmptyState) --> <enum name="ReadAnythingEmptyState">
diff --git a/tools/metrics/histograms/metadata/blink/enums.xml b/tools/metrics/histograms/metadata/blink/enums.xml index 1db8045..edff272 100644 --- a/tools/metrics/histograms/metadata/blink/enums.xml +++ b/tools/metrics/histograms/metadata/blink/enums.xml
@@ -5804,7 +5804,7 @@ <int value="5202" label="GeolocationSucceededWithoutInjectionMitigation"/> <int value="5203" label="SharedWorkerScriptUnderServiceWorkerControlIsBlob"/> <int value="5204" label="OBSOLETE_DisableThirdPartyStoragePartitioning3"/> - <int value="5205" label="ControlledFrameElement"/> + <int value="5205" label="OBSOLETE_ControlledFrameElement"/> <int value="5206" label="Canvas2DIsPointInPath"/> <int value="5207" label="Canvas2DIsPointInStroke"/> <int value="5208" label="Canvas2DGetImageData"/> @@ -6255,6 +6255,7 @@ <int value="5621" label="WebAppManifestShortNameLocalized"/> <int value="5622" label="WebAppManifestDescriptionLocalized"/> <int value="5623" label="WebAppManifestIconsLocalized"/> + <int value="5624" label="HTMLControlledFrameElement"/> </enum> <!-- LINT.ThenChange(//third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom:WebFeature) -->
diff --git a/tools/metrics/histograms/metadata/glic/histograms.xml b/tools/metrics/histograms/metadata/glic/histograms.xml index 745297d..bd2bd4b 100644 --- a/tools/metrics/histograms/metadata/glic/histograms.xml +++ b/tools/metrics/histograms/metadata/glic/histograms.xml
@@ -848,6 +848,17 @@ </summary> </histogram> +<histogram name="Glic.Response.TabsPinnedForSharingCount" units="tabs" + expires_after="2026-03-15"> + <owner>wry@chromium.org</owner> + <owner>carlosk@chromium.org</owner> + <owner>mcrouse@chromium.org</owner> + <summary> + Recorded after a turn. Records the number of tabs pinned for sharing at that + time. + </summary> +</histogram> + <histogram name="Glic.Response.TurnDuration.{Mode}" units="ms" expires_after="2026-01-15"> <owner>dtapuska@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/storage/histograms.xml b/tools/metrics/histograms/metadata/storage/histograms.xml index 1fc7e39..3dc166c 100644 --- a/tools/metrics/histograms/metadata/storage/histograms.xml +++ b/tools/metrics/histograms/metadata/storage/histograms.xml
@@ -351,6 +351,42 @@ </summary> </histogram> +<histogram name="IndexedDB.DatabasePathOverflow.LevelDB" units="characters" + expires_after="2026-01-24"> + <owner>fergal@chromium.org</owner> + <owner>evanstade@microsoft.com</owner> + <owner>chrome-owp-storage@google.com</owner> + <summary> + Logged each time the LevelDB backing store is opened or created. Since there + is only one backing store for all IDB databases, this is logged less + frequently than its SQLite counterpart. + + 0 is emitted if the paths that would be used for the engine named in the + histogram have no problem fitting within the platform's maximum + path/component length contraints. A positive value is emitted when an + absolute path of that length didn't pass the maximum path/component length + check. + </summary> +</histogram> + +<histogram name="IndexedDB.DatabasePathOverflow.SQLite" units="characters" + expires_after="2026-01-24"> + <owner>fergal@chromium.org</owner> + <owner>evanstade@microsoft.com</owner> + <owner>chrome-owp-storage@google.com</owner> + <summary> + Logged once for every call to indexedDB.open(), regardless of the database + engine in use by the backend. IOW, it's logged once each time a SQLite DB + would hypothetically be opened or created. + + 0 is emitted if the paths that would be used for the engine named in the + histogram have no problem fitting within the platform's maximum + path/component length contraints. A positive value is emitted when an + absolute path of that length didn't pass the maximum path/component length + check. + </summary> +</histogram> + <histogram name="IndexedDB.GetUnacquirableLocksLongTimes" units="ms" expires_after="2026-07-01"> <owner>estade@chromium.org</owner>
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index 2da71a6..29a8205 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml
@@ -406,6 +406,20 @@ </metric> </event> +<event name="Accessibility.ReadAnything.Distillation"> + <owner>lwinston@google.com</owner> + <owner>kristislee@google.com</owner> + <summary> + Records a distillation success / failure after a new page has been opened + with reading mode. + </summary> + <metric name="DistillationStatus" enum="ReadAnythingDistillationStatus"> + <summary> + The status of the distillation + </summary> + </metric> +</event> + <event name="Accessibility.ReadAnything.EmptyState"> <owner>abigailbklein@google.com</owner> <summary>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 005689bb..e546436 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -5,8 +5,8 @@ "full_remote_path": "perfetto-luci-artifacts/361808c959b026d558c9948602ea38bf25d8981e/linux-arm64/trace_processor_shell" }, "win": { - "hash": "89e617c5bcf0ba7ce1c7177238dd6ce99d784d1d", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/8a4b37d094ba5fce2f2ad87d04078ed9b8b54127/trace_processor_shell.exe" + "hash": "93f70f772d6116a9dec131d0eeb64ad5c458c7dd", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/d248102abcfb167da566d0ca45d2fa32652aa31c/trace_processor_shell.exe" }, "linux_arm": { "hash": "ab1a0d9236a63649044414663b6ace711253648f", @@ -21,8 +21,8 @@ "full_remote_path": "perfetto-luci-artifacts/v51.2/mac-arm64/trace_processor_shell" }, "linux": { - "hash": "b59410be89b9bd3cb962093b4f8c8a7ccbf2f93e", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/4c0ba925d3304ab862e4e866d9b1ad6b451cc82f/trace_processor_shell" + "hash": "00f038d4e51ed795e68ef8f711064e94e93f93f2", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/a76ca4da074739a6ff05fdffad5120753a5c9fa0/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/tools/traffic_annotation/summary/annotations.xml b/tools/traffic_annotation/summary/annotations.xml index 161d371..a7e8ef99 100644 --- a/tools/traffic_annotation/summary/annotations.xml +++ b/tools/traffic_annotation/summary/annotations.xml
@@ -323,7 +323,6 @@ <item id="cryptohome_recovery_fetch_epoch" added_in_milestone="108" content_hash_code="06e195ad" os_list="chromeos" file_path="chromeos/ash/components/login/auth/recovery/cryptohome_recovery_service_client.cc" /> <item id="cryptohome_recovery_fetch_recovery_response" added_in_milestone="108" content_hash_code="01b13324" os_list="chromeos" file_path="chromeos/ash/components/login/auth/recovery/cryptohome_recovery_service_client.cc" /> <item id="app_preload_service" added_in_milestone="108" content_hash_code="04eb27cd" os_list="chromeos" file_path="chrome/browser/apps/app_preload_service/app_preload_almanac_endpoint.cc" /> - <item id="search_and_assistant_enabled_checker" added_in_milestone="106" content_hash_code="003a5b64" os_list="chromeos" file_path="chrome/browser/ui/ash/assistant/search_and_assistant_enabled_checker.cc" /> <item id="user_image_downloader" added_in_milestone="108" content_hash_code="07c2217f" os_list="chromeos" file_path="chrome/browser/ash/login/users/avatar/user_image_loader.cc" /> <item id="supervised_user_favicon_request" added_in_milestone="108" content_hash_code="06636c2a" os_list="chromeos" file_path="chrome/browser/supervised_user/chromeos/supervised_user_favicon_request_handler.cc" /> <item id="nearby_share_update_device" added_in_milestone="108" type="partial" second_id="oauth2_api_call_flow" content_hash_code="01d34a5a" os_list="chromeos" semantics_fields="1,2,3,4,5" policy_fields="3,4" file_path="chrome/browser/nearby_sharing/client/nearby_share_client_impl.cc" />
diff --git a/tools/traffic_annotation/summary/grouping.xml b/tools/traffic_annotation/summary/grouping.xml index e4b36b73..b181609c 100644 --- a/tools/traffic_annotation/summary/grouping.xml +++ b/tools/traffic_annotation/summary/grouping.xml
@@ -78,7 +78,6 @@ <annotation id="wallpaper_google_photos_albums"/> <annotation id="wallpaper_google_photos_enabled"/> <annotation id="wallpaper_google_photos_photos"/> - <annotation id="search_and_assistant_enabled_checker"/> <annotation id="wallpaper_online_downloader"/> </sender> <sender name="ChromeOS Recovery">
diff --git a/tools/typescript/path_mappings.py b/tools/typescript/path_mappings.py index a0a2bda..f12674f 100644 --- a/tools/typescript/path_mappings.py +++ b/tools/typescript/path_mappings.py
@@ -35,6 +35,7 @@ "cr_components/most_visited", "cr_components/page_image_service", "cr_components/searchbox", + "cr_components/composebox", "cr_components/settings_prefs", "cr_components/theme_color_picker", ]
diff --git a/tools/web_dev_style/eslint.config.mjs b/tools/web_dev_style/eslint.config.mjs index 73951a9..8e7a8c9 100644 --- a/tools/web_dev_style/eslint.config.mjs +++ b/tools/web_dev_style/eslint.config.mjs
@@ -44,7 +44,7 @@ }, { languageOptions: { - ecmaVersion: 2020, + ecmaVersion: 'latest', sourceType: 'module', },
diff --git a/ui/android/ui_android_features.cc b/ui/android/ui_android_features.cc index 335ce20..6469d9e 100644 --- a/ui/android/ui_android_features.cc +++ b/ui/android/ui_android_features.cc
@@ -39,7 +39,7 @@ BASE_FEATURE(kMirrorBackForwardGesturesInRTL, "MirrorBackForwardGesturesInRTL", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE(kReportBottomOverscrolls, "ReportBottomOverscrolls",
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn index b127b90a..20361d4 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn
@@ -215,6 +215,7 @@ "ui_base_exports.cc", "ui_base_paths.cc", "ui_base_paths.h", + "ui_base_switches.cc", "ui_base_switches.h", "ui_base_switches_util.cc", "ui_base_switches_util.h", @@ -269,6 +270,7 @@ "win/hwnd_metrics.h", "win/hwnd_subclass.cc", "win/hwnd_subclass.h", + "win/internal_constants.cc", "win/internal_constants.h", "win/lock_state.cc", "win/lock_state.h", @@ -346,6 +348,7 @@ "cocoa/user_interface_item_command_handler.h", "cocoa/views_hostable.h", "cocoa/window_size_constants.h", + "cocoa/window_size_constants.mm", "dragdrop/os_exchange_data_provider_builder_mac.h", "dragdrop/os_exchange_data_provider_builder_mac.mm", "dragdrop/os_exchange_data_provider_mac.h", @@ -1367,7 +1370,10 @@ # This source set defines linux wm role names and must not have any external # dependencies and be kept as minimal as possible. source_set("wm_role_names") { - sources = [ "wm_role_names_linux.h" ] + sources = [ + "wm_role_names_linux.cc", + "wm_role_names_linux.h", + ] } }
diff --git a/ui/base/accelerators/media_keys_util.cc b/ui/base/accelerators/media_keys_util.cc index cb6e883..cacb972 100644 --- a/ui/base/accelerators/media_keys_util.cc +++ b/ui/base/accelerators/media_keys_util.cc
@@ -8,6 +8,8 @@ namespace ui { +const char kMediaHardwareKeyActionHistogramName[] = "Media.HardwareKeyPressed"; + void RecordMediaHardwareKeyAction(ui::MediaHardwareKeyAction action) { UMA_HISTOGRAM_ENUMERATION(kMediaHardwareKeyActionHistogramName, action); }
diff --git a/ui/base/accelerators/media_keys_util.h b/ui/base/accelerators/media_keys_util.h index 06922b80..1a03eb5f 100644 --- a/ui/base/accelerators/media_keys_util.h +++ b/ui/base/accelerators/media_keys_util.h
@@ -24,8 +24,8 @@ }; // The name of the histogram that records |MediaHardwareKeyAction|. -inline constexpr char kMediaHardwareKeyActionHistogramName[] = - "Media.HardwareKeyPressed"; +COMPONENT_EXPORT(UI_BASE) +extern const char kMediaHardwareKeyActionHistogramName[]; // Records a media hardware key action to the // |kMediaHardwareKeyActionHistogramName| histogram.
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h index 4b5fc9f..ff4676b 100644 --- a/ui/base/clipboard/clipboard.h +++ b/ui/base/clipboard/clipboard.h
@@ -457,11 +457,6 @@ virtual void WriteData(const ClipboardFormatType& format, base::span<const uint8_t> data) = 0; - // Prevent data from being written to the clipboard history and cloud. - virtual void WriteClipboardHistory() = 0; - virtual void WriteUploadCloudClipboard() = 0; - virtual void WriteConfidentialDataForPassword() = 0; - void DispatchPortableRepresentation(const ObjectMapParams& params); void DispatchPortableRepresentation(const RawData& data);
diff --git a/ui/base/clipboard/clipboard_android.cc b/ui/base/clipboard/clipboard_android.cc index c8eb6ed..7b430fd 100644 --- a/ui/base/clipboard/clipboard_android.cc +++ b/ui/base/clipboard/clipboard_android.cc
@@ -814,14 +814,6 @@ std::string(reinterpret_cast<const char*>(data.data()), data.size())); } -void ClipboardAndroid::WriteClipboardHistory() { - // TODO(crbug.com/40945200): Add support for this. -} - -void ClipboardAndroid::WriteUploadCloudClipboard() { - // TODO(crbug.com/40945200): Add support for this. -} - void ClipboardAndroid::WriteConfidentialDataForPassword() { // Set the password data that is marked as IS_SENSITIVE. GetClipboardMap().MarkPasswordData();
diff --git a/ui/base/clipboard/clipboard_android.h b/ui/base/clipboard/clipboard_android.h index 6a394195..b87f7ae 100644 --- a/ui/base/clipboard/clipboard_android.h +++ b/ui/base/clipboard/clipboard_android.h
@@ -128,9 +128,8 @@ void WriteBitmap(const SkBitmap& bitmap) override; void WriteData(const ClipboardFormatType& format, base::span<const uint8_t> data) override; - void WriteClipboardHistory() override; - void WriteUploadCloudClipboard() override; - void WriteConfidentialDataForPassword() override; + + void WriteConfidentialDataForPassword(); }; } // namespace ui
diff --git a/ui/base/clipboard/clipboard_ios.h b/ui/base/clipboard/clipboard_ios.h index c447c27..9158d3cf3 100644 --- a/ui/base/clipboard/clipboard_ios.h +++ b/ui/base/clipboard/clipboard_ios.h
@@ -96,9 +96,6 @@ void WriteBitmap(const SkBitmap& bitmap) override; void WriteData(const ClipboardFormatType& format, base::span<const uint8_t> data) override; - void WriteClipboardHistory() override; - void WriteUploadCloudClipboard() override; - void WriteConfidentialDataForPassword() override; std::vector<uint8_t> ReadPngInternal(ClipboardBuffer buffer, UIPasteboard* pasteboard) const;
diff --git a/ui/base/clipboard/clipboard_ios.mm b/ui/base/clipboard/clipboard_ios.mm index 5a4ce81..15f3135 100644 --- a/ui/base/clipboard/clipboard_ios.mm +++ b/ui/base/clipboard/clipboard_ios.mm
@@ -468,18 +468,6 @@ [GetPasteboard() addItems:@[ data_item ]]; } -void ClipboardIOS::WriteClipboardHistory() { - // TODO(crbug.com/40945200): Add support for this. -} - -void ClipboardIOS::WriteUploadCloudClipboard() { - // TODO(crbug.com/40945200): Add support for this. -} - -void ClipboardIOS::WriteConfidentialDataForPassword() { - // TODO(crbug.com/40945200): Add support for this. -} - std::vector<uint8_t> ClipboardIOS::ReadPngInternal( ClipboardBuffer buffer, UIPasteboard* pasteboard) const {
diff --git a/ui/base/clipboard/clipboard_mac.h b/ui/base/clipboard/clipboard_mac.h index b3d9c75..88267f5 100644 --- a/ui/base/clipboard/clipboard_mac.h +++ b/ui/base/clipboard/clipboard_mac.h
@@ -112,9 +112,6 @@ void WriteBitmap(const SkBitmap& bitmap) override; void WriteData(const ClipboardFormatType& format, base::span<const uint8_t> data) override; - void WriteClipboardHistory() override; - void WriteUploadCloudClipboard() override; - void WriteConfidentialDataForPassword() override; void WriteBitmapInternal(const SkBitmap& bitmap, NSPasteboard* pasteboard); void ReadPngInternal(ClipboardBuffer buffer,
diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm index e2a9a63..968fa44 100644 --- a/ui/base/clipboard/clipboard_mac.mm +++ b/ui/base/clipboard/clipboard_mac.mm
@@ -52,6 +52,14 @@ #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" #include "url/gurl.h" +@interface NSPasteboard (SPI) +// Sets the pasteboard to expire at the specified date. Tested to exist and work +// from macOS 12+. This must be called immediately after clearing the pasteboard +// or else it will not work and will log an error. This is used by WebKit; see +// https://github.com/WebKit/WebKit/commit/978bbafb7a3ab151703ba7e9694b78e2d63c3fe1 +- (BOOL)_setExpirationDate:(NSDate*)date; +@end + namespace ui { namespace { @@ -487,11 +495,35 @@ DCHECK(CalledOnValidThread()); DCHECK_EQ(buffer, ClipboardBuffer::kCopyPaste); + NSPasteboardContentsOptions pasteboard_options = 0; if (privacy_types & Clipboard::PrivacyTypes::kNoCloudClipboard) { - WriteUploadCloudClipboard(); + pasteboard_options |= NSPasteboardContentsCurrentHostOnly; + } + [pasteboard prepareForNewContentsWithOptions:pasteboard_options]; + + if (privacy_types & Clipboard::PrivacyTypes::kNoLocalClipboardHistory) { + // One way to not add the pasteboard to the history is to give it an + // expiration. For data that has "no history" specified, give it a + // restricted lifetime so that the user has time to take action with it. + // + // WebKit uses this mechanism to implement privacy for data copied from + // their ephemeral sessions. They use a lifetime of 8 minutes, derived from + // their private browser lock time. The use of 5 minutes here is arbitrary, + // but inspired by the rough lifetime that they chose. + // + // Note that another possible approach is also SPI; in macOS 26+ there + // exists a method -[NSPasteboard _setShouldExcludeFromHistory:] which is + // more explicitly an "exclude from history" method than the "set an + // expiration" method used here. However, it is not available on all macOS + // releases that Chromium supports. When Chromium requires macOS 26+, it + // might be worthwhile looking into whether that is a better choice. + [GetPasteboard() + _setExpirationDate:[NSDate dateWithTimeIntervalSinceNow:5 * 60]]; } - [pasteboard declareTypes:@[] owner:nil]; + if (privacy_types & Clipboard::PrivacyTypes::kNoDisplay) { + [GetPasteboard() setData:nil forType:kUTTypeConfidentialData]; + } DispatchPlatformRepresentations(std::move(platform_representations)); for (const auto& object : objects) { @@ -505,9 +537,7 @@ [pasteboard setString:base::SysUTF8ToNSString(data_src->GetURL()->spec()) forType:kUTTypeChromiumSourceUrl]; } - if (privacy_types & Clipboard::PrivacyTypes::kNoDisplay) { - WriteConfidentialDataForPassword(); - } + // If not actively monitoring, notify immediately. Otherwise, when monitoring, // the change to the pasteboard's `changeCount` will be detected by // `CheckClipboardForChanges` (called by `clipboard_polling_timer_`), @@ -568,22 +598,6 @@ forType:format.ToNSString()]; } -void ClipboardMac::WriteClipboardHistory() { - // TODO(crbug.com/40945200): Add support for this. -} - -void ClipboardMac::WriteUploadCloudClipboard() { - // Make the pasteboard content current host only. - [GetPasteboard() - prepareForNewContentsWithOptions:NSPasteboardContentsCurrentHostOnly]; -} - -void ClipboardMac::WriteConfidentialDataForPassword() { - DCHECK(CalledOnValidThread()); - - [GetPasteboard() setData:nil forType:kUTTypeConfidentialData]; -} - // Write an extra flavor that signifies WebKit was the last to modify the // pasteboard. This flavor has no data. void ClipboardMac::WriteWebSmartPaste() {
diff --git a/ui/base/clipboard/clipboard_non_backed.cc b/ui/base/clipboard/clipboard_non_backed.cc index c759176..af13f21 100644 --- a/ui/base/clipboard/clipboard_non_backed.cc +++ b/ui/base/clipboard/clipboard_non_backed.cc
@@ -963,18 +963,6 @@ ClipboardDataBuilder::WriteData(format, data); } -void ClipboardNonBacked::WriteClipboardHistory() { - // TODO(crbug.com/40945200): Add support for this. -} - -void ClipboardNonBacked::WriteUploadCloudClipboard() { - // TODO(crbug.com/40945200): Add support for this. -} - -void ClipboardNonBacked::WriteConfidentialDataForPassword() { - // TODO(crbug.com/40945200): Add support for this. -} - const ClipboardInternal& ClipboardNonBacked::GetInternalClipboard( ClipboardBuffer buffer) const { return *internal_clipboards_.at(buffer);
diff --git a/ui/base/clipboard/clipboard_non_backed.h b/ui/base/clipboard/clipboard_non_backed.h index 1ff1cd8..88c66ad 100644 --- a/ui/base/clipboard/clipboard_non_backed.h +++ b/ui/base/clipboard/clipboard_non_backed.h
@@ -145,9 +145,6 @@ void WriteBitmap(const SkBitmap& bitmap) override; void WriteData(const ClipboardFormatType& format, base::span<const uint8_t> data) override; - void WriteClipboardHistory() override; - void WriteUploadCloudClipboard() override; - void WriteConfidentialDataForPassword() override; const ClipboardInternal& GetInternalClipboard(ClipboardBuffer buffer) const; ClipboardInternal& GetInternalClipboard(ClipboardBuffer buffer);
diff --git a/ui/base/clipboard/clipboard_ozone.cc b/ui/base/clipboard/clipboard_ozone.cc index 793f214b..02841e3 100644 --- a/ui/base/clipboard/clipboard_ozone.cc +++ b/ui/base/clipboard/clipboard_ozone.cc
@@ -744,18 +744,6 @@ async_clipboard_ozone_->InsertData(std::move(owned_data), {format.GetName()}); } -void ClipboardOzone::WriteClipboardHistory() { - // TODO(crbug.com/40945200): Add support for this. -} - -void ClipboardOzone::WriteUploadCloudClipboard() { - // TODO(crbug.com/40945200): Add support for this. -} - -void ClipboardOzone::WriteConfidentialDataForPassword() { - // TODO(crbug.com/40945200): Add support for this. -} - void ClipboardOzone::AddSourceToClipboard( const ClipboardBuffer buffer, std::unique_ptr<DataTransferEndpoint> data_src) {
diff --git a/ui/base/clipboard/clipboard_ozone.h b/ui/base/clipboard/clipboard_ozone.h index b9dca595..294ed60d 100644 --- a/ui/base/clipboard/clipboard_ozone.h +++ b/ui/base/clipboard/clipboard_ozone.h
@@ -99,9 +99,6 @@ void WriteBitmap(const SkBitmap& bitmap) override; void WriteData(const ClipboardFormatType& format, base::span<const uint8_t> data) override; - void WriteClipboardHistory() override; - void WriteUploadCloudClipboard() override; - void WriteConfidentialDataForPassword() override; // Used to put a source URL in the clipboard on other Ozone platforms. void AddSourceToClipboard(const ClipboardBuffer buffer,
diff --git a/ui/base/clipboard/clipboard_win.h b/ui/base/clipboard/clipboard_win.h index b29ebd2..d335f130 100644 --- a/ui/base/clipboard/clipboard_win.h +++ b/ui/base/clipboard/clipboard_win.h
@@ -111,9 +111,11 @@ void WriteBitmap(const SkBitmap& bitmap) override; void WriteData(const ClipboardFormatType& format, base::span<const uint8_t> data) override; - void WriteClipboardHistory() override; - void WriteUploadCloudClipboard() override; - void WriteConfidentialDataForPassword() override; + + void WriteClipboardHistory(); + void WriteUploadCloudClipboard(); + void WriteConfidentialDataForPassword(); + std::vector<uint8_t> ReadPngInternal(ClipboardBuffer buffer) const; SkBitmap ReadBitmapInternal(ClipboardBuffer buffer) const;
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc index 4aa6a6c..0b457d0 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/ui/base/clipboard/scoped_clipboard_writer.cc
@@ -186,6 +186,8 @@ void ScopedClipboardWriter::MarkAsConfidential() { privacy_types_ |= Clipboard::PrivacyTypes::kNoDisplay; + privacy_types_ |= Clipboard::PrivacyTypes::kNoLocalClipboardHistory; + privacy_types_ |= Clipboard::PrivacyTypes::kNoCloudClipboard; } void ScopedClipboardWriter::MarkAsOffTheRecord() {
diff --git a/ui/base/clipboard/test/test_clipboard.cc b/ui/base/clipboard/test/test_clipboard.cc index d65d32c..9de8abe4 100644 --- a/ui/base/clipboard/test/test_clipboard.cc +++ b/ui/base/clipboard/test/test_clipboard.cc
@@ -398,18 +398,6 @@ ClipboardMonitor::GetInstance()->NotifyClipboardDataChanged(); } -void TestClipboard::WriteClipboardHistory() { - // TODO(crbug.com/40945200): Add support for this. -} - -void TestClipboard::WriteUploadCloudClipboard() { - // TODO(crbug.com/40945200): Add support for this. -} - -void TestClipboard::WriteConfidentialDataForPassword() { - // TODO(crbug.com/40945200): Add support for this. -} - TestClipboard::DataStore::DataStore() = default; TestClipboard::DataStore::DataStore(const DataStore& other) {
diff --git a/ui/base/clipboard/test/test_clipboard.h b/ui/base/clipboard/test/test_clipboard.h index bf669b7..b87e6c1 100644 --- a/ui/base/clipboard/test/test_clipboard.h +++ b/ui/base/clipboard/test/test_clipboard.h
@@ -112,9 +112,6 @@ void WriteBitmap(const SkBitmap& bitmap) override; void WriteData(const ClipboardFormatType& format, base::span<const uint8_t> data) override; - void WriteClipboardHistory() override; - void WriteUploadCloudClipboard() override; - void WriteConfidentialDataForPassword() override; private: struct DataStore {
diff --git a/ui/base/cocoa/window_size_constants.h b/ui/base/cocoa/window_size_constants.h index 2be7d46..c521b15 100644 --- a/ui/base/cocoa/window_size_constants.h +++ b/ui/base/cocoa/window_size_constants.h
@@ -5,12 +5,14 @@ #ifndef UI_BASE_COCOA_WINDOW_SIZE_CONSTANTS_H_ #define UI_BASE_COCOA_WINDOW_SIZE_CONSTANTS_H_ +#include "base/component_export.h" + #import <Foundation/Foundation.h> namespace ui { // It is not valid to make a zero-sized window. Use this constant instead. -inline constexpr NSRect kWindowSizeDeterminedLater = {{0, 0}, {1, 1}}; +COMPONENT_EXPORT(UI_BASE) extern const NSRect kWindowSizeDeterminedLater; } // namespace ui
diff --git a/ui/base/cocoa/window_size_constants.mm b/ui/base/cocoa/window_size_constants.mm new file mode 100644 index 0000000..49606b173 --- /dev/null +++ b/ui/base/cocoa/window_size_constants.mm
@@ -0,0 +1,11 @@ +// Copyright 2012 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/cocoa/window_size_constants.h" + +namespace ui { + +const NSRect kWindowSizeDeterminedLater = { {0, 0}, {1, 1} }; + +} // namespace ui
diff --git a/ui/base/ime/BUILD.gn b/ui/base/ime/BUILD.gn index 63e2515f..d24d946 100644 --- a/ui/base/ime/BUILD.gn +++ b/ui/base/ime/BUILD.gn
@@ -60,6 +60,7 @@ component("ime") { output_name = "ui_base_ime" sources = [ + "constants.cc", "constants.h", "events.cc", "events.h",
diff --git a/ui/base/ime/ash/extension_ime_util.cc b/ui/base/ime/ash/extension_ime_util.cc index 82e15f0..4ee5aec8 100644 --- a/ui/base/ime/ash/extension_ime_util.cc +++ b/ui/base/ime/ash/extension_ime_util.cc
@@ -29,6 +29,33 @@ namespace extension_ime_util { +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) +const char kXkbExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; +const char kM17nExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; +const char kHangulExtensionId[] = "bdgdidmhaijohebebipajioienkglgfo"; +const char kMozcExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; +const char kT13nExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; +const char kChinesePinyinExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; +const char kChineseZhuyinExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; +const char kChineseCangjieExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; +#else +const char kXkbExtensionId[] = "fgoepimhcoialccpbmpnnblemnepkkao"; +const char kM17nExtensionId[] = "jhffeifommiaekmbkkjlpmilogcfdohp"; +const char kHangulExtensionId[] = "bdgdidmhaijohebebipajioienkglgfo"; +const char kMozcExtensionId[] = "bbaiamgfapehflhememkfglaehiobjnk"; +const char kT13nExtensionId[] = "gjaehgfemfahhmlgpdfknkhdnemmolop"; +const char kChinesePinyinExtensionId[] = "cpgalbafkoofkjmaeonnfijgpfennjjn"; +const char kChineseZhuyinExtensionId[] = "ekbifjdfhkmdeeajnolmgdlmkllopefi"; +const char kChineseCangjieExtensionId[] = "aeebooiibjahgpgmhkeocbeekccfknbj"; +#endif + +const char kBrailleImeExtensionId[] = "jddehjeebkoimngcbdkaahpobgicbffp"; +const char kBrailleImeExtensionPath[] = "chromeos/accessibility/braille_ime"; +const char kBrailleImeEngineId[] = + "_comp_ime_jddehjeebkoimngcbdkaahpobgicbffpbraille"; + +const char kArcImeLanguage[] = "_arc_ime_language_"; + std::string GetInputMethodID(const std::string& extension_id, const std::string& engine_id) { DCHECK(!extension_id.empty());
diff --git a/ui/base/ime/ash/extension_ime_util.h b/ui/base/ime/ash/extension_ime_util.h index 905a96f..ff46ce50 100644 --- a/ui/base/ime/ash/extension_ime_util.h +++ b/ui/base/ime/ash/extension_ime_util.h
@@ -9,48 +9,34 @@ #include "base/auto_reset.h" #include "base/component_export.h" -#include "build/branding_buildflags.h" + +namespace ash { // Extension IME related utilities. -namespace ash::extension_ime_util { +namespace extension_ime_util { -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) -inline constexpr char kXkbExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; -inline constexpr char kM17nExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; -inline constexpr char kHangulExtensionId[] = "bdgdidmhaijohebebipajioienkglgfo"; -inline constexpr char kMozcExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; -inline constexpr char kT13nExtensionId[] = "jkghodnilhceideoidjikpgommlajknk"; -inline constexpr char kChinesePinyinExtensionId[] = - "jkghodnilhceideoidjikpgommlajknk"; -inline constexpr char kChineseZhuyinExtensionId[] = - "jkghodnilhceideoidjikpgommlajknk"; -inline constexpr char kChineseCangjieExtensionId[] = - "jkghodnilhceideoidjikpgommlajknk"; -#else -inline constexpr char kXkbExtensionId[] = "fgoepimhcoialccpbmpnnblemnepkkao"; -inline constexpr char kM17nExtensionId[] = "jhffeifommiaekmbkkjlpmilogcfdohp"; -inline constexpr char kHangulExtensionId[] = "bdgdidmhaijohebebipajioienkglgfo"; -inline constexpr char kMozcExtensionId[] = "bbaiamgfapehflhememkfglaehiobjnk"; -inline constexpr char kT13nExtensionId[] = "gjaehgfemfahhmlgpdfknkhdnemmolop"; -inline constexpr char kChinesePinyinExtensionId[] = - "cpgalbafkoofkjmaeonnfijgpfennjjn"; -inline constexpr char kChineseZhuyinExtensionId[] = - "ekbifjdfhkmdeeajnolmgdlmkllopefi"; -inline constexpr char kChineseCangjieExtensionId[] = - "aeebooiibjahgpgmhkeocbeekccfknbj"; -#endif +COMPONENT_EXPORT(UI_BASE_IME_ASH) extern const char kXkbExtensionId[]; +COMPONENT_EXPORT(UI_BASE_IME_ASH) extern const char kM17nExtensionId[]; +COMPONENT_EXPORT(UI_BASE_IME_ASH) extern const char kHangulExtensionId[]; +COMPONENT_EXPORT(UI_BASE_IME_ASH) extern const char kMozcExtensionId[]; +COMPONENT_EXPORT(UI_BASE_IME_ASH) extern const char kT13nExtensionId[]; +COMPONENT_EXPORT(UI_BASE_IME_ASH) +extern const char kChinesePinyinExtensionId[]; +COMPONENT_EXPORT(UI_BASE_IME_ASH) +extern const char kChineseZhuyinExtensionId[]; +COMPONENT_EXPORT(UI_BASE_IME_ASH) +extern const char kChineseCangjieExtensionId[]; // Extension id, path (relative to |chrome::DIR_RESOURCES|) and IME engine // id for the builtin-in Braille IME extension. -inline constexpr char kBrailleImeExtensionId[] = - "jddehjeebkoimngcbdkaahpobgicbffp"; -inline constexpr char kBrailleImeExtensionPath[] = - "chromeos/accessibility/braille_ime"; -inline constexpr char kBrailleImeEngineId[] = - "_comp_ime_jddehjeebkoimngcbdkaahpobgicbffpbraille"; +COMPONENT_EXPORT(UI_BASE_IME_ASH) +extern const char kBrailleImeExtensionId[]; +COMPONENT_EXPORT(UI_BASE_IME_ASH) +extern const char kBrailleImeExtensionPath[]; +COMPONENT_EXPORT(UI_BASE_IME_ASH) extern const char kBrailleImeEngineId[]; // The fake language name used for ARC IMEs. -inline constexpr char kArcImeLanguage[] = "_arc_ime_language_"; +COMPONENT_EXPORT(UI_BASE_IME_ASH) extern const char kArcImeLanguage[]; // Returns InputMethodID for |engine_id| in |extension_id| of extension IME. // This function does not check |extension_id| is installed extension IME nor @@ -116,6 +102,7 @@ bool COMPONENT_EXPORT(UI_BASE_IME_ASH) IsCros1pKorean(const std::string& input_method_id); -} // namespace ash::extension_ime_util +} // namespace extension_ime_util +} // namespace ash #endif // UI_BASE_IME_ASH_EXTENSION_IME_UTIL_H_
diff --git a/ui/base/ime/constants.cc b/ui/base/ime/constants.cc new file mode 100644 index 0000000..7f64355 --- /dev/null +++ b/ui/base/ime/constants.cc
@@ -0,0 +1,23 @@ +// Copyright 2018 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/ime/constants.h" + +namespace ui { + +// Here, we define attributes of ui::Event::Properties objects +// kPropertyFromVK +const char kPropertyFromVK[] = "from_vk"; + +// Properties of the kPropertyFromVK attribute + +// kFromVKIsMirroring is the index of the isMirrorring property on the +// kPropertyFromVK attribute. This is non-zero if mirroring and zero if not +// mirroring +const size_t kPropertyFromVKIsMirroringIndex = 0; +// kFromVKSize is the size of the kPropertyFromVK attribute +// It is equal to the number of kPropertyFromVK +const size_t kPropertyFromVKSize = 1; + +} // namespace ui
diff --git a/ui/base/ime/constants.h b/ui/base/ime/constants.h index 184d276e..83416ff 100644 --- a/ui/base/ime/constants.h +++ b/ui/base/ime/constants.h
@@ -12,21 +12,16 @@ // The name of the property that is attach to the key event and indicates // whether it was from the virtual keyboard. -// // This is used where the key event is simulated by the virtual keyboard // (e.g. IME extension API) as well as the input field implementation (e.g. // Textfield). -inline constexpr char kPropertyFromVK[] = "from_vk"; +COMPONENT_EXPORT(UI_BASE_IME) extern const char kPropertyFromVK[]; -// Properties of the kPropertyFromVK attribute - -// kFromVKIsMirroring is the index of the isMirroring property on the -// kPropertyFromVK attribute. This is non-zero if mirroring and zero if not -// mirroring. -inline constexpr size_t kPropertyFromVKIsMirroringIndex = 0; -// kFromVKSize is the size of the kPropertyFromVK attribute -// It is equal to the number of kPropertyFromVK -inline constexpr size_t kPropertyFromVKSize = 1; +// kPropertyFromVKIsMirroringIndex is an index into kPropertyFromVK +// and is used when the key event occurs when mirroring is detected. +COMPONENT_EXPORT(UI_BASE_IME) +extern const size_t kPropertyFromVKIsMirroringIndex; +COMPONENT_EXPORT(UI_BASE_IME) extern const size_t kPropertyFromVKSize; } // namespace ui
diff --git a/ui/base/interaction/interactive_test_internal.cc b/ui/base/interaction/interactive_test_internal.cc index 2f6b01d..1e85867 100644 --- a/ui/base/interaction/interactive_test_internal.cc +++ b/ui/base/interaction/interactive_test_internal.cc
@@ -29,6 +29,9 @@ DEFINE_ELEMENT_IDENTIFIER_VALUE(kInteractiveTestPivotElementId); DEFINE_CUSTOM_ELEMENT_EVENT_TYPE(kInteractiveTestPivotEventType); +const char kInteractiveTestFailedMessagePrefix[] = "Interactive test failed "; +const char kNoCheckDescriptionSpecified[] = "[no description specified]"; + StateObserverElement::StateObserverElement(ElementIdentifier id, ElementContext context) : TestElementBase(id, context) {}
diff --git a/ui/base/interaction/interactive_test_internal.h b/ui/base/interaction/interactive_test_internal.h index 9d8bba2..21d3c283 100644 --- a/ui/base/interaction/interactive_test_internal.h +++ b/ui/base/interaction/interactive_test_internal.h
@@ -55,10 +55,8 @@ DECLARE_ELEMENT_IDENTIFIER_VALUE(kInteractiveTestPivotElementId); DECLARE_CUSTOM_ELEMENT_EVENT_TYPE(kInteractiveTestPivotEventType); -inline constexpr char kInteractiveTestFailedMessagePrefix[] = - "Interactive test failed "; -inline constexpr char kNoCheckDescriptionSpecified[] = - "[no description specified]"; +extern const char kInteractiveTestFailedMessagePrefix[]; +extern const char kNoCheckDescriptionSpecified[]; class StateObserverElement;
diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc index 6ec0566..5d621a2c 100644 --- a/ui/base/ui_base_features.cc +++ b/ui/base/ui_base_features.cc
@@ -42,6 +42,16 @@ // Field trial param name for `kApplyNativeOcclusionToCompositor`. const base::FeatureParam<std::string> kApplyNativeOcclusionToCompositorType{ &kApplyNativeOcclusionToCompositor, "type", /*default=*/""}; + +// When the WindowTreeHost is occluded or hidden, resources are released and +// the compositor is hidden. See WindowTreeHost for specifics on what this +// does. +const char kApplyNativeOcclusionToCompositorTypeRelease[] = "release"; +// When the WindowTreeHost is occluded the frame rate is throttled. +const char kApplyNativeOcclusionToCompositorTypeThrottle[] = "throttle"; +// Release when hidden, throttle when occluded. +const char kApplyNativeOcclusionToCompositorTypeThrottleAndRelease[] = + "throttle_and_release"; #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_CHROMEOS) @@ -329,6 +339,21 @@ "ResamplingScrollEventsExperimentalPrediction", base::FEATURE_DISABLED_BY_DEFAULT); +const char kPredictorNameLsq[] = "lsq"; +const char kPredictorNameKalman[] = "kalman"; +const char kPredictorNameLinearFirst[] = "linear_first"; +const char kPredictorNameLinearSecond[] = "linear_second"; +const char kPredictorNameLinearResampling[] = "linear_resampling"; +const char kPredictorNameEmpty[] = "empty"; + +const char kFilterNameEmpty[] = "empty_filter"; +const char kFilterNameOneEuro[] = "one_euro_filter"; + +const char kPredictionTypeFramesBased[] = "frames"; +const char kPredictionTypeDefaultFramesVariation1[] = "0.25"; +const char kPredictionTypeDefaultFramesVariation2[] = "0.375"; +const char kPredictionTypeDefaultFramesVariation3[] = "0.5"; + BASE_FEATURE(kSwipeToMoveCursor, "SwipeToMoveCursor", base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/ui/base/ui_base_features.h b/ui/base/ui_base_features.h index 348bb31..c50aece 100644 --- a/ui/base/ui_base_features.h +++ b/ui/base/ui_base_features.h
@@ -49,19 +49,12 @@ COMPONENT_EXPORT(UI_BASE_FEATURES) extern const base::FeatureParam<std::string> kApplyNativeOcclusionToCompositorType; - -// When the WindowTreeHost is occluded or hidden, resources are released and -// the compositor is hidden. See WindowTreeHost for specifics on what this -// does. -inline constexpr char kApplyNativeOcclusionToCompositorTypeRelease[] = - "release"; -// When the WindowTreeHost is occluded the frame rate is throttled. -inline constexpr char kApplyNativeOcclusionToCompositorTypeThrottle[] = - "throttle"; -// Release when hidden, throttle when occluded. -inline constexpr char - kApplyNativeOcclusionToCompositorTypeThrottleAndRelease[] = - "throttle_and_release"; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kApplyNativeOcclusionToCompositorTypeRelease[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kApplyNativeOcclusionToCompositorTypeThrottle[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kApplyNativeOcclusionToCompositorTypeThrottleAndRelease[]; #endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(IS_CHROMEOS) @@ -151,12 +144,15 @@ // The type of predictor to use for the resampling events. These values are // used as the 'predictor' feature param for // |blink::features::kResamplingScrollEvents|. -inline constexpr char kPredictorNameLsq[] = "lsq"; -inline constexpr char kPredictorNameKalman[] = "kalman"; -inline constexpr char kPredictorNameLinearFirst[] = "linear_first"; -inline constexpr char kPredictorNameLinearSecond[] = "linear_second"; -inline constexpr char kPredictorNameLinearResampling[] = "linear_resampling"; -inline constexpr char kPredictorNameEmpty[] = "empty"; +COMPONENT_EXPORT(UI_BASE_FEATURES) extern const char kPredictorNameLsq[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) extern const char kPredictorNameKalman[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kPredictorNameLinearFirst[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kPredictorNameLinearSecond[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kPredictorNameLinearResampling[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) extern const char kPredictorNameEmpty[]; // Enables resampling of scroll events using an experimental latency of +3.3ms // instead of the original -5ms. @@ -165,15 +161,19 @@ // Uses a ratio of the vsync refresh rate. The timing/ratio can be changed on // the command line through a `latency` param. -inline constexpr char kPredictionTypeFramesBased[] = "frames"; -inline constexpr char kPredictionTypeDefaultFramesVariation1[] = "0.25"; -inline constexpr char kPredictionTypeDefaultFramesVariation2[] = "0.375"; -inline constexpr char kPredictionTypeDefaultFramesVariation3[] = "0.5"; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kPredictionTypeFramesBased[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kPredictionTypeDefaultFramesVariation1[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kPredictionTypeDefaultFramesVariation2[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) +extern const char kPredictionTypeDefaultFramesVariation3[]; // The type of filter to use for filtering events. These values are used as the // 'filter' feature param for |blink::features::kFilteringScrollPrediction|. -inline constexpr char kFilterNameEmpty[] = "empty_filter"; -inline constexpr char kFilterNameOneEuro[] = "one_euro_filter"; +COMPONENT_EXPORT(UI_BASE_FEATURES) extern const char kFilterNameEmpty[]; +COMPONENT_EXPORT(UI_BASE_FEATURES) extern const char kFilterNameOneEuro[]; // Android only feature, for swipe to move cursor. COMPONENT_EXPORT(UI_BASE_FEATURES) BASE_DECLARE_FEATURE(kSwipeToMoveCursor);
diff --git a/ui/base/ui_base_switches.cc b/ui/base/ui_base_switches.cc new file mode 100644 index 0000000..e7ffbbf --- /dev/null +++ b/ui/base/ui_base_switches.cc
@@ -0,0 +1,107 @@ +// Copyright 2012 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/ui_base_switches.h" + +#include "build/build_config.h" + +namespace switches { + +#if BUILDFLAG(IS_ANDROID) +// Disable overscroll edge effects like those found in Android views. +const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect"; + +// Disable the pull-to-refresh effect when vertically overscrolling content. +const char kDisablePullToRefreshEffect[] = "disable-pull-to-refresh-effect"; +#endif + +#if BUILDFLAG(IS_MAC) +// Disable animations for showing and hiding modal dialogs. +const char kDisableModalAnimations[] = "disable-modal-animations"; + +// Show borders around CALayers corresponding to overlays and partial damage. +const char kShowMacOverlayBorders[] = "show-mac-overlay-borders"; +#endif + +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +// Specifies system font family name. Improves determenism when rendering +// pages in headless mode. +const char kSystemFontFamily[] = "system-font-family"; +#endif + +#if BUILDFLAG(IS_LINUX) +// Specify the toolkit used to construct the Linux GUI. +const char kUiToolkitFlag[] = "ui-toolkit"; +// Specify the GTK version to be loaded. +const char kGtkVersionFlag[] = "gtk-version"; +// Specify the QT version to be loaded. +const char kQtVersionFlag[] = "qt-version"; +// Disables GTK IME integration. +const char kDisableGtkIme[] = "disable-gtk-ime"; +#endif + +// Disable re-use of non-exact resources to fulfill ResourcePool requests. +// Intended only for use in layout or pixel tests to reduce noise. +const char kDisallowNonExactResourceReuse[] = + "disallow-non-exact-resource-reuse"; + +// Treats DRM virtual connector as external to enable display mode change in VM. +const char kDRMVirtualConnectorIsExternal[] = + "drm-virtual-connector-is-external"; + +// Forces the caption style for WebVTT captions. +const char kForceCaptionStyle[] = "force-caption-style"; + +// Forces dark mode in UI for platforms that support it. +const char kForceDarkMode[] = "force-dark-mode"; + +// Forces high-contrast mode in native UI drawing, regardless of system +// settings. Note that this has limited effect on Windows: only Aura colors will +// be switched to high contrast, not other system colors. +const char kForceHighContrast[] = "force-high-contrast"; + +// The language file that we want to try to open. Of the form +// language[-country] where language is the 2 letter code from ISO-639. +// On Linux, this flag does not work; use the LC_*/LANG environment variables +// instead. +const char kLang[] = "lang"; + +// Transform localized strings to be longer, with beginning and end markers to +// make truncation visually apparent. +const char kMangleLocalizedStrings[] = "mangle-localized-strings"; + +// Visualize overdraw by color-coding elements based on if they have other +// elements drawn underneath. This is good for showing where the UI might be +// doing more rendering work than necessary. The colors are hinting at the +// amount of overdraw on your screen for each pixel, as follows: +// +// True color: No overdraw. +// Blue: Overdrawn once. +// Green: Overdrawn twice. +// Pink: Overdrawn three times. +// Red: Overdrawn four or more times. +const char kShowOverdrawFeedback[] = "show-overdraw-feedback"; + +// Re-draw everything multiple times to simulate a much slower machine. +// Give a slow down factor to cause renderer to take that many times longer to +// complete, such as --slow-down-compositing-scale-factor=2. +const char kSlowDownCompositingScaleFactor[] = + "slow-down-compositing-scale-factor"; + +// Tint composited color. +const char kTintCompositedContent[] = "tint-composited-content"; + +// Controls touch-optimized UI layout for top chrome. +const char kTopChromeTouchUi[] = "top-chrome-touch-ui"; +const char kTopChromeTouchUiAuto[] = "auto"; +const char kTopChromeTouchUiDisabled[] = "disabled"; +const char kTopChromeTouchUiEnabled[] = "enabled"; + +// Disable partial swap which is needed for some OpenGL drivers / emulators. +const char kUIDisablePartialSwap[] = "ui-disable-partial-swap"; + +// Enables the ozone x11 clipboard for linux-chromeos. +const char kUseSystemClipboard[] = "use-system-clipboard"; + +} // namespace switches
diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h index 6502c786..581965d 100644 --- a/ui/base/ui_base_switches.h +++ b/ui/base/ui_base_switches.h
@@ -13,103 +13,46 @@ namespace switches { #if BUILDFLAG(IS_ANDROID) -// Disable overscroll edge effects like those found in Android views. -inline constexpr char kDisableOverscrollEdgeEffect[] = - "disable-overscroll-edge-effect"; - -// Disable the pull-to-refresh effect when vertically overscrolling content. -inline constexpr char kDisablePullToRefreshEffect[] = - "disable-pull-to-refresh-effect"; +COMPONENT_EXPORT(UI_BASE) extern const char kDisableOverscrollEdgeEffect[]; +COMPONENT_EXPORT(UI_BASE) extern const char kDisablePullToRefreshEffect[]; #endif #if BUILDFLAG(IS_MAC) -// Disable animations for showing and hiding modal dialogs. -inline constexpr char kDisableModalAnimations[] = "disable-modal-animations"; - -// Show borders around CALayers corresponding to overlays and partial damage. -inline constexpr char kShowMacOverlayBorders[] = "show-mac-overlay-borders"; +COMPONENT_EXPORT(UI_BASE) extern const char kDisableModalAnimations[]; +COMPONENT_EXPORT(UI_BASE) extern const char kShowMacOverlayBorders[]; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -// Specifies system font family name. Improves determinism when rendering pages -// in headless mode. -inline constexpr char kSystemFontFamily[] = "system-font-family"; +COMPONENT_EXPORT(UI_BASE) extern const char kSystemFontFamily[]; #endif #if BUILDFLAG(IS_LINUX) -// Specify the toolkit used to construct the Linux GUI. -inline constexpr char kUiToolkitFlag[] = "ui-toolkit"; -// Specify the GTK version to be loaded. -inline constexpr char kGtkVersionFlag[] = "gtk-version"; -// Specify the QT version to be loaded. -inline constexpr char kQtVersionFlag[] = "qt-version"; -// Disables GTK IME integration. -inline constexpr char kDisableGtkIme[] = "disable-gtk-ime"; +COMPONENT_EXPORT(UI_BASE) extern const char kUiToolkitFlag[]; +COMPONENT_EXPORT(UI_BASE) extern const char kGtkVersionFlag[]; +COMPONENT_EXPORT(UI_BASE) extern const char kQtVersionFlag[]; +COMPONENT_EXPORT(UI_BASE) extern const char kDisableGtkIme[]; #endif -// Treats DRM virtual connector as external to enable display mode change in VM. -inline constexpr char kDRMVirtualConnectorIsExternal[] = - "drm-virtual-connector-is-external"; - -// Forces the caption style for WebVTT captions. -inline constexpr char kForceCaptionStyle[] = "force-caption-style"; - -// Forces dark mode in UI for platforms that support it. -inline constexpr char kForceDarkMode[] = "force-dark-mode"; - -// Forces high-contrast mode in native UI drawing, regardless of system -// settings. Note that this has limited effect on Windows: only Aura colors will -// be switched to high contrast, not other system colors. -inline constexpr char kForceHighContrast[] = "force-high-contrast"; - -// The language file that we want to try to open. Of the form -// language[-country] where language is the 2 letter code from ISO-639. -// On Linux, this flag does not work; use the LC_*/LANG environment variables -// instead. -inline constexpr char kLang[] = "lang"; - -// Visualize overdraw by color-coding elements based on if they have other -// elements drawn underneath. This is good for showing where the UI might be -// doing more rendering work than necessary. The colors are hinting at the -// amount of overdraw on your screen for each pixel, as follows: -// -// True color: No overdraw. -// Blue: Overdrawn once. -// Green: Overdrawn twice. -// Pink: Overdrawn three times. -// Red: Overdrawn four or more times. -inline constexpr char kShowOverdrawFeedback[] = "show-overdraw-feedback"; - -// Re-draw everything multiple times to simulate a much slower machine. -// Give a slow down factor to cause renderer to take that many times longer to -// complete, such as --slow-down-compositing-scale-factor=2. -inline constexpr char kSlowDownCompositingScaleFactor[] = - "slow-down-compositing-scale-factor"; - -// Tint composited color. -inline constexpr char kTintCompositedContent[] = "tint-composited-content"; - -// Controls touch-optimized UI layout for top chrome. -inline constexpr char kTopChromeTouchUi[] = "top-chrome-touch-ui"; -inline constexpr char kTopChromeTouchUiAuto[] = "auto"; -inline constexpr char kTopChromeTouchUiDisabled[] = "disabled"; -inline constexpr char kTopChromeTouchUiEnabled[] = "enabled"; - -// Disable partial swap which is needed for some OpenGL drivers / emulators. -inline constexpr char kUIDisablePartialSwap[] = "ui-disable-partial-swap"; - -// Enables the ozone x11 clipboard for linux-chromeos. -inline constexpr char kUseSystemClipboard[] = "use-system-clipboard"; +COMPONENT_EXPORT(UI_BASE) extern const char kDisableTouchDragDrop[]; +COMPONENT_EXPORT(UI_BASE) extern const char kDRMVirtualConnectorIsExternal[]; +COMPONENT_EXPORT(UI_BASE) extern const char kEnableTouchDragDrop[]; +COMPONENT_EXPORT(UI_BASE) extern const char kForceCaptionStyle[]; +COMPONENT_EXPORT(UI_BASE) extern const char kForceDarkMode[]; +COMPONENT_EXPORT(UI_BASE) extern const char kForceHighContrast[]; +COMPONENT_EXPORT(UI_BASE) extern const char kLang[]; +COMPONENT_EXPORT(UI_BASE) extern const char kShowOverdrawFeedback[]; +COMPONENT_EXPORT(UI_BASE) extern const char kSlowDownCompositingScaleFactor[]; +COMPONENT_EXPORT(UI_BASE) extern const char kTintCompositedContent[]; +COMPONENT_EXPORT(UI_BASE) extern const char kTopChromeTouchUi[]; +COMPONENT_EXPORT(UI_BASE) extern const char kTopChromeTouchUiAuto[]; +COMPONENT_EXPORT(UI_BASE) extern const char kTopChromeTouchUiDisabled[]; +COMPONENT_EXPORT(UI_BASE) extern const char kTopChromeTouchUiEnabled[]; +COMPONENT_EXPORT(UI_BASE) extern const char kUIDisablePartialSwap[]; +COMPONENT_EXPORT(UI_BASE) extern const char kUseSystemClipboard[]; // Test related. -// Disable re-use of non-exact resources to fulfill ResourcePool requests. -// Intended only for use in layout or pixel tests to reduce noise. -inline constexpr char kDisallowNonExactResourceReuse[] = - "disallow-non-exact-resource-reuse"; - -// Transform localized strings to be longer, with beginning and end markers to -// make truncation visually apparent. -inline constexpr char kMangleLocalizedStrings[] = "mangle-localized-strings"; +COMPONENT_EXPORT(UI_BASE) extern const char kDisallowNonExactResourceReuse[]; +COMPONENT_EXPORT(UI_BASE) extern const char kMangleLocalizedStrings[]; } // namespace switches
diff --git a/ui/base/win/internal_constants.cc b/ui/base/win/internal_constants.cc new file mode 100644 index 0000000..eece3947 --- /dev/null +++ b/ui/base/win/internal_constants.cc
@@ -0,0 +1,17 @@ +// Copyright 2014 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/win/internal_constants.h" + +namespace ui { + +const wchar_t kIgnoreTouchMouseActivateForWindow[] = + L"Chrome.IgnoreMouseActivate"; + +const wchar_t kLegacyRenderWidgetHostHwnd[] = L"Chrome_RenderWidgetHostHWND"; + +const wchar_t kWindowTranslucent[] = L"Chrome.WindowTranslucent"; + +} // namespace ui +
diff --git a/ui/base/win/internal_constants.h b/ui/base/win/internal_constants.h index 3b57ebe..fb5bb04f 100644 --- a/ui/base/win/internal_constants.h +++ b/ui/base/win/internal_constants.h
@@ -11,19 +11,20 @@ // This window property if set on the window does not activate the window for a // touch based WM_MOUSEACTIVATE message. -inline constexpr wchar_t kIgnoreTouchMouseActivateForWindow[] = - L"Chrome.IgnoreMouseActivate"; +COMPONENT_EXPORT(UI_BASE) +extern const wchar_t kIgnoreTouchMouseActivateForWindow[]; // This class name is assigned to legacy windows created for screen readers that // expect each web content container to be in its own HWNDs. -inline constexpr wchar_t kLegacyRenderWidgetHostHwnd[] = - L"Chrome_RenderWidgetHostHWND"; +COMPONENT_EXPORT(UI_BASE) extern const wchar_t kLegacyRenderWidgetHostHwnd[]; // This property is put on an HWND so the compositor output knows to treat it // as transparent and draw to it using WS_EX_LAYERED (if using the software // compositor). -inline constexpr wchar_t kWindowTranslucent[] = L"Chrome.WindowTranslucent"; +COMPONENT_EXPORT(UI_BASE) extern const wchar_t kWindowTranslucent[]; } // namespace ui #endif // UI_BASE_WIN_INTERNAL_CONSTANTS_H_ + +
diff --git a/ui/base/wm_role_names_linux.cc b/ui/base/wm_role_names_linux.cc new file mode 100644 index 0000000..72bde377 --- /dev/null +++ b/ui/base/wm_role_names_linux.cc
@@ -0,0 +1,11 @@ +// Copyright 2020 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/base/wm_role_names_linux.h" + +namespace ui { + +const char kStatusIconWmRoleName[] = "status-icon"; + +} // namespace ui
diff --git a/ui/base/wm_role_names_linux.h b/ui/base/wm_role_names_linux.h index f2e7717..3b861103 100644 --- a/ui/base/wm_role_names_linux.h +++ b/ui/base/wm_role_names_linux.h
@@ -9,7 +9,7 @@ // Return the status-icon wm_role_name. Only used to construct status-icon // windows for x11. -inline constexpr char kStatusIconWmRoleName[] = "status-icon"; +extern const char kStatusIconWmRoleName[]; } // namespace ui
diff --git a/ui/base/x/selection_owner.cc b/ui/base/x/selection_owner.cc index 42f85897..7ae2ba1b 100644 --- a/ui/base/x/selection_owner.cc +++ b/ui/base/x/selection_owner.cc
@@ -18,21 +18,25 @@ namespace ui { +const char kIncr[] = "INCR"; +const char kSaveTargets[] = "SAVE_TARGETS"; +const char kTargets[] = "TARGETS"; + namespace { -constexpr char kAtomPair[] = "ATOM_PAIR"; -constexpr char kMultiple[] = "MULTIPLE"; -constexpr char kTimestamp[] = "TIMESTAMP"; +const char kAtomPair[] = "ATOM_PAIR"; +const char kMultiple[] = "MULTIPLE"; +const char kTimestamp[] = "TIMESTAMP"; // The period of |incremental_transfer_abort_timer_|. Arbitrary but must be <= // than kIncrementalTransferTimeoutMs. -constexpr int kSelectionOwnerTimerPeriodMs = 1000; +const int KSelectionOwnerTimerPeriodMs = 1000; // The amount of time to wait for the selection requestor to process the data // sent by the selection owner before aborting an incremental data transfer. -constexpr int kIncrementalTransferTimeoutMs = 10000; +const int kIncrementalTransferTimeoutMs = 10000; -static_assert(kSelectionOwnerTimerPeriodMs <= kIncrementalTransferTimeoutMs, +static_assert(KSelectionOwnerTimerPeriodMs <= kIncrementalTransferTimeoutMs, "timer period must be <= transfer timeout"); size_t GetMaxIncrementalTransferSize() { @@ -246,7 +250,7 @@ // the data transfer. if (!incremental_transfer_abort_timer_.IsRunning()) { incremental_transfer_abort_timer_.Start( - FROM_HERE, base::Milliseconds(kSelectionOwnerTimerPeriodMs), this, + FROM_HERE, base::Milliseconds(KSelectionOwnerTimerPeriodMs), this, &SelectionOwner::AbortStaleIncrementalTransfers); } } else {
diff --git a/ui/base/x/selection_owner.h b/ui/base/x/selection_owner.h index c952269..a4859f8 100644 --- a/ui/base/x/selection_owner.h +++ b/ui/base/x/selection_owner.h
@@ -24,9 +24,9 @@ namespace ui { -inline constexpr char kIncr[] = "INCR"; -inline constexpr char kSaveTargets[] = "SAVE_TARGETS"; -inline constexpr char kTargets[] = "TARGETS"; +COMPONENT_EXPORT(UI_BASE_X) extern const char kIncr[]; +COMPONENT_EXPORT(UI_BASE_X) extern const char kSaveTargets[]; +COMPONENT_EXPORT(UI_BASE_X) extern const char kTargets[]; // Owns a specific X11 selection on an X window. //
diff --git a/ui/base/x/x11_drag_drop_client.cc b/ui/base/x/x11_drag_drop_client.cc index ef2a3efc..f1c4300 100644 --- a/ui/base/x/x11_drag_drop_client.cc +++ b/ui/base/x/x11_drag_drop_client.cc
@@ -33,6 +33,19 @@ namespace ui { +// Window property on the source window and message used by the XDS protocol. +// This atom name intentionally includes the XDS protocol version (0). +// After the source sends the XdndDrop message, this property stores the +// (path-less) name of the file to be saved, and has the type text/plain, with +// an optional charset attribute. +// When receiving an XdndDrop event, the target needs to check for the +// XdndDirectSave property on the source window. The target then modifies the +// XdndDirectSave on the source window, and sends an XdndDirectSave message to +// the source. +// After the target sends the XdndDirectSave message, this property stores an +// URL indicating the location where the source should save the file. +const char kXdndDirectSave0[] = "XdndDirectSave0"; + namespace { using mojom::DragOperation; @@ -53,47 +66,47 @@ constexpr int kMaxXdndVersion = 5; // Window property that tells other applications the window understands XDND. -constexpr char kXdndAware[] = "XdndAware"; +const char kXdndAware[] = "XdndAware"; // Window property that holds the supported drag and drop data types. // This property is set on the XDND source window when the drag and drop data // can be converted to more than 3 types. -constexpr char kXdndTypeList[] = "XdndTypeList"; +const char kXdndTypeList[] = "XdndTypeList"; // These actions have the same meaning as in the W3C Drag and Drop spec. -constexpr char kXdndActionCopy[] = "XdndActionCopy"; -constexpr char kXdndActionMove[] = "XdndActionMove"; -constexpr char kXdndActionLink[] = "XdndActionLink"; +const char kXdndActionCopy[] = "XdndActionCopy"; +const char kXdndActionMove[] = "XdndActionMove"; +const char kXdndActionLink[] = "XdndActionLink"; // Triggers the XDS protocol. -constexpr char kXdndActionDirectSave[] = "XdndActionDirectSave"; +const char kXdndActionDirectSave[] = "XdndActionDirectSave"; // Window property that contains the possible actions that will be presented to // the user when the drag and drop action is kXdndActionAsk. -constexpr char kXdndActionList[] = "XdndActionList"; +const char kXdndActionList[] = "XdndActionList"; // Window property pointing to a proxy window to receive XDND target messages. // The XDND source must check the proxy window must for the XdndAware property, // and must send all XDND messages to the proxy instead of the target. However, // the target field in the messages must still represent the original target // window (the window pointed to by the cursor). -constexpr char kXdndProxy[] = "XdndProxy"; +const char kXdndProxy[] = "XdndProxy"; // Message sent from an XDND source to the target when the user confirms the // drag and drop operation. -constexpr char kXdndDrop[] = "XdndDrop"; +const char kXdndDrop[] = "XdndDrop"; // Message sent from an XDND source to the target to start the XDND protocol. // The target must wait for an XDndPosition event before querying the data. -constexpr char kXdndEnter[] = "XdndEnter"; +const char kXdndEnter[] = "XdndEnter"; // Message sent from an XDND target to the source in response to an XdndDrop. // The message must be sent whether the target acceepts the drop or not. -constexpr char kXdndFinished[] = "XdndFinished"; +const char kXdndFinished[] = "XdndFinished"; // Message sent from an XDND source to the target when the user cancels the drag // and drop operation. -constexpr char kXdndLeave[] = "XdndLeave"; +const char kXdndLeave[] = "XdndLeave"; // Message sent by the XDND source when the cursor position changes. // The source will also send an XdndPosition event right after the XdndEnter @@ -103,12 +116,12 @@ // information. // After the target optionally acquires selection information, it must tell the // source if it can accept the drop via an XdndStatus message. -constexpr char kXdndPosition[] = "XdndPosition"; +const char kXdndPosition[] = "XdndPosition"; // Message sent by the XDND target in response to an XdndPosition message. // The message informs the source if the target will accept the drop, and what // action will be taken if the drop is accepted. -constexpr char kXdndStatus[] = "XdndStatus"; +const char kXdndStatus[] = "XdndStatus"; std::map<x11::Window, XDragDropClient*>& GetLiveClientMap() { static base::NoDestructor<std::map<x11::Window, XDragDropClient*>> map;
diff --git a/ui/base/x/x11_drag_drop_client.h b/ui/base/x/x11_drag_drop_client.h index 2959ba2..f9379a2 100644 --- a/ui/base/x/x11_drag_drop_client.h +++ b/ui/base/x/x11_drag_drop_client.h
@@ -22,18 +22,7 @@ class OSExchangeData; class XOSExchangeDataProvider; -// Window property on the source window and message used by the XDS protocol. -// This atom name intentionally includes the XDS protocol version (0). -// After the source sends the XdndDrop message, this property stores the -// (path-less) name of the file to be saved, and has the type text/plain, with -// an optional charset attribute. -// When receiving an XdndDrop event, the target needs to check for the -// XdndDirectSave property on the source window. The target then modifies the -// XdndDirectSave on the source window, and sends an XdndDirectSave message to -// the source. -// After the target sends the XdndDirectSave message, this property stores an -// URL indicating the location where the source should save the file. -inline constexpr char kXdndDirectSave0[] = "XdndDirectSave0"; +extern const char kXdndDirectSave0[]; // Converts the current set of X masks into the set of ui::EventFlags. COMPONENT_EXPORT(UI_BASE_X) int XGetMaskAsEventFlags();
diff --git a/ui/resources/ui_lottie_resources.grd b/ui/resources/ui_lottie_resources.grd index 0d54445..bbfd8f8 100644 --- a/ui/resources/ui_lottie_resources.grd +++ b/ui/resources/ui_lottie_resources.grd
@@ -13,6 +13,7 @@ <structure type="lottie" name="IDR_AURA_CURSOR_ALIAS_LOTTIE" file="vector/common/pointers/alias.json" compress="gzip" /> <structure type="lottie" name="IDR_AURA_CURSOR_CELL_LOTTIE" file="vector/common/pointers/cell.json" compress="gzip" /> <structure type="lottie" name="IDR_AURA_CURSOR_COPY_LOTTIE" file="vector/common/pointers/copy.json" compress="gzip" /> + <structure type="lottie" name="IDR_AURA_CURSOR_NO_DROP_LOTTIE" file="vector/common/pointers/nodrop.json" compress="gzip" /> <structure type="lottie" name="IDR_AURA_CURSOR_IBEAM_LOTTIE" file="vector/common/pointers/xterm.json" compress="gzip" /> <structure type="lottie" name="IDR_AURA_CURSOR_THROBBER_LOTTIE" file="vector/common/pointers/throbber.json" compress="gzip" /> </if>
diff --git a/ui/resources/vector/common/pointers/nodrop.json b/ui/resources/vector/common/pointers/nodrop.json new file mode 100644 index 0000000..1180e1a8 --- /dev/null +++ b/ui/resources/vector/common/pointers/nodrop.json
@@ -0,0 +1 @@ +{"v":"5.9.3","fr":60,"ip":0,"op":1,"w":25,"h":25,"nm":"38","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"31 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[12.5,12.5,0],"ix":2,"l":2},"a":{"a":0,"k":[12.5,12.5,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":25,"nm":"Drop Shadow","np":8,"mn":"ADBE Drop Shadow","ix":1,"en":1,"ef":[{"ty":2,"nm":"Shadow Color","mn":"ADBE Drop Shadow-0001","ix":1,"v":{"a":0,"k":[0,0,0,1],"ix":1}},{"ty":0,"nm":"Opacity","mn":"ADBE Drop Shadow-0002","ix":2,"v":{"a":0,"k":51,"ix":2}},{"ty":0,"nm":"Direction","mn":"ADBE Drop Shadow-0003","ix":3,"v":{"a":0,"k":171,"ix":3}},{"ty":0,"nm":"Distance","mn":"ADBE Drop Shadow-0004","ix":4,"v":{"a":0,"k":1,"ix":4}},{"ty":0,"nm":"Softness","mn":"ADBE Drop Shadow-0005","ix":5,"v":{"a":0,"k":1,"ix":5}},{"ty":7,"nm":"Shadow Only","mn":"ADBE Drop Shadow-0006","ix":6,"v":{"a":0,"k":0,"ix":6}}]},{"ty":25,"nm":"Drop Shadow 2","np":8,"mn":"ADBE Drop Shadow","ix":2,"en":1,"ef":[{"ty":2,"nm":"Shadow Color","mn":"ADBE Drop Shadow-0001","ix":1,"v":{"a":0,"k":[0,0,0,1],"ix":1}},{"ty":0,"nm":"Opacity","mn":"ADBE Drop Shadow-0002","ix":2,"v":{"a":0,"k":51,"ix":2}},{"ty":0,"nm":"Direction","mn":"ADBE Drop Shadow-0003","ix":3,"v":{"a":0,"k":171,"ix":3}},{"ty":0,"nm":"Distance","mn":"ADBE Drop Shadow-0004","ix":4,"v":{"a":0,"k":0,"ix":4}},{"ty":0,"nm":"Softness","mn":"ADBE Drop Shadow-0005","ix":5,"v":{"a":0,"k":1,"ix":5}},{"ty":7,"nm":"Shadow Only","mn":"ADBE Drop Shadow-0006","ix":6,"v":{"a":0,"k":0,"ix":6}}]}],"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.246,1.247],[1.371,-1.027]],"o":[[1.028,-1.371],[-1.247,-1.247],[0,0]],"v":[[2.803,2.096],[2.475,-2.475],[-2.096,-2.803]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[-1.371,1.028],[0,0],[-1.247,-1.247]],"o":[[0,0],[-1.028,1.371],[1.247,1.246]],"v":[[2.096,2.803],[-2.803,-2.096],[-2.475,2.475]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[1.757,-1.758],[1.757,1.757],[-1.758,1.757],[-1.758,-1.758]],"o":[[-1.758,1.757],[-1.758,-1.758],[1.757,-1.758],[1.757,1.757]],"v":[[3.182,3.182],[-3.182,3.182],[-3.182,-3.182],[3.182,-3.182]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.699189126492,0.246693179011,0.256115943193,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[17.403,7.283],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 6","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.577,0.577],[0.751,-0.106],[0,0]],"o":[[-0.577,-0.577],[0,0],[0.106,-0.751]],"v":[[1.768,-1.768],[-0.351,-2.473],[2.473,0.351]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-0.578,-0.577],[-0.751,0.106]],"o":[[-0.106,0.751],[0.577,0.578],[0,0]],"v":[[-2.473,-0.351],[-1.768,1.768],[0.352,2.473]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[-2.148,2.148],[-2.148,-2.148],[2.148,-2.148],[2.148,2.148]],"o":[[2.148,-2.148],[2.148,2.148],[-2.148,2.148],[-2.148,-2.148]],"v":[[-3.889,-3.889],[3.889,-3.889],[3.889,3.889],[-3.889,3.889]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.999998867512,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[17.404,7.283],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":4,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0.599,-0.373],[0,0],[0,0],[-0.363,-0.484],[0,0],[-0.214,-0.28],[0,0],[0,0],[0,0],[-1.178,-1.419],[0,0],[-0.373,0],[0,0],[-0.021,0.022],[-0.298,0.55],[-1.048,4.087],[0,0],[0,0],[0.479,0.123],[0,0],[0,0],[0.125,-0.285],[0,0],[0.066,-0.288],[0.021,-0.084],[0.007,-0.027],[0.011,-0.027],[0.01,-0.022],[0.015,-0.024],[0.067,-0.052],[0.252,0.127],[0.008,0.024],[0,0],[0,0],[0.662,0],[0,0],[0.074,-0.597],[0,0],[0,0],[0.006,-0.035],[0.005,-0.017],[0.03,-0.057],[0.092,-0.068],[0.068,-0.014],[0.064,0.025],[0.016,0.028],[0.005,0.017],[0.002,0.009],[0.001,0.006],[0.001,0.006],[0.001,0.047],[0.001,0.22],[-0.001,0.587],[0,0],[0.623,0],[0,0],[0.073,-0.6],[0,0],[0.012,-0.409],[0,0],[0.003,-0.028],[0.007,-0.031],[0.03,-0.059],[0.106,-0.074],[0.118,-0.003],[0.068,0.045],[0.01,0.022],[0.004,0.015],[0.001,0.01],[0.001,0.012],[0.001,0.03],[0.001,0.27],[-0.005,0.709],[0,0],[0.625,0],[0,0],[0,-0.662]],"o":[[0,0],[-0.494,-0.522],[0,0],[0,0],[-0.466,0.355],[0,0],[0.211,0.28],[0,0],[0,0],[0,0],[0.939,2.307],[0,0],[0.254,0.242],[0,0],[0.016,-0.014],[0.128,-0.135],[0.594,-1.102],[0,0],[0,0],[0.053,-0.491],[0,0],[0,0],[-0.318,-0.047],[0,0],[-0.081,0.361],[-0.033,0.144],[-0.01,0.041],[-0.002,0.009],[-0.002,0.007],[-0.005,0.01],[-0.01,0.015],[-0.065,0.05],[-0.19,-0.095],[-0.027,-0.083],[0,0],[0,-0.663],[0,0],[-0.612,0],[0,0],[0,0],[0,0.008],[-0.001,0.008],[-0.001,0.008],[-0.012,0.024],[-0.047,0.031],[-0.076,0.004],[-0.137,-0.065],[-0.024,-0.041],[-0.012,-0.034],[-0.002,-0.013],[-0.001,-0.013],[-0.002,-0.032],[-0.001,-0.108],[0,-0.444],[0,0],[-0.06,-0.608],[0,0],[-0.614,0],[0,0],[-0.009,0.437],[0,0],[-0.002,0.033],[-0.001,0.01],[-0.001,0.007],[-0.01,0.021],[-0.062,0.043],[-0.12,0.002],[-0.116,-0.077],[-0.018,-0.036],[-0.009,-0.03],[-0.004,-0.023],[-0.002,-0.026],[-0.004,-0.12],[-0.001,-0.544],[0,0],[-0.058,-0.611],[0,0],[-0.662,0],[0,0]],"v":[[-4.809,-0.954],[-6.807,-3.062],[-8.688,-3.305],[-8.805,-3.224],[-9.376,-2.787],[-9.576,-1.237],[-8.396,0.334],[-7.757,1.177],[-7.122,1.996],[-7.079,2.051],[-7.051,2.116],[-4.15,7.256],[-4.046,7.365],[-3.07,7.742],[6.089,7.742],[6.146,7.691],[6.794,6.726],[9.309,-0.599],[9.87,-3.188],[9.885,-3.294],[9.143,-4.368],[9.038,-4.389],[8.574,-4.458],[7.827,-4.045],[7.786,-3.916],[7.553,-2.883],[7.471,-2.533],[7.445,-2.429],[7.424,-2.366],[7.404,-2.319],[7.374,-2.265],[7.26,-2.142],[6.73,-2.091],[6.479,-2.382],[6.454,-2.539],[6.454,-4.823],[5.255,-6.023],[4.71,-6.023],[3.516,-4.966],[3.507,-4.845],[3.48,-3.876],[3.473,-3.794],[3.464,-3.755],[3.421,-3.639],[3.275,-3.466],[3.044,-3.372],[2.762,-3.416],[2.546,-3.615],[2.503,-3.708],[2.486,-3.78],[2.48,-3.809],[2.477,-3.838],[2.473,-3.97],[2.471,-4.478],[2.473,-6.13],[2.467,-6.253],[1.273,-7.336],[0.516,-7.336],[-0.68,-6.274],[-0.689,-6.152],[-0.721,-4.84],[-0.758,-3.868],[-0.766,-3.774],[-0.777,-3.706],[-0.82,-3.588],[-0.982,-3.399],[-1.255,-3.31],[-1.544,-3.393],[-1.717,-3.594],[-1.749,-3.676],[-1.764,-3.742],[-1.77,-3.798],[-1.773,-3.884],[-1.779,-4.493],[-1.771,-6.529],[-1.777,-6.653],[-2.973,-7.742],[-3.609,-7.742],[-4.809,-6.542]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.999998867512,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[12.153,14.234],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.382,-0.651],[-0.626,0],[0,0],[-0.215,-0.989],[-0.481,0],[0,0],[-0.141,-1.079],[-0.474,-0.07],[0,0],[0,0],[0.105,-0.983],[0,0],[0,0],[0,0],[0,0],[0.651,-1.205],[0.207,-0.217],[0.076,-0.052],[0.031,-0.016],[0.013,-0.005],[0.006,-0.002],[0.003,-0.001],[0,0],[0,0],[0,0],[0,0],[0,0],[0.459,0.491],[0,0],[0.952,2.329],[0.41,0.543],[0,0],[-0.918,0.7],[0,0],[0,0],[-0.824,-0.869],[0,0],[0,0],[-1.215,0]],"o":[[0.81,0],[0.402,-0.421],[0,0],[1.055,0],[0.363,-0.262],[0,0],[1.117,0],[0.354,-0.273],[0,0],[0,0],[0.957,0.248],[0,0],[0,0],[0,0],[0,0],[-1.06,4.136],[-0.325,0.604],[-0.104,0.109],[-0.038,0.026],[-0.016,0.008],[-0.007,0.003],[-0.003,0.001],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.656,0],[0,0],[-1.254,-1.51],[-0.405,-0.518],[0,0],[-0.682,-0.907],[0,0],[0,0],[0.998,-0.622],[0,0],[0,0],[0,-1.215],[0,0]],"v":[[-2.938,-8.742],[-1.041,-7.652],[0.551,-8.336],[1.308,-8.336],[3.457,-6.605],[4.745,-7.023],[5.29,-7.023],[7.468,-5.111],[8.755,-5.447],[9.221,-5.378],[9.43,-5.336],[10.916,-3.188],[10.881,-2.977],[10.322,-0.387],[10.32,-0.377],[10.318,-0.368],[7.708,7.2],[6.906,8.381],[6.635,8.617],[6.532,8.68],[6.488,8.7],[6.468,8.708],[6.459,8.711],[6.455,8.713],[6.453,8.714],[6.451,8.715],[6.371,8.742],[-3.034,8.742],[-4.793,7.995],[-4.883,7.895],[-7.917,2.557],[-9.16,0.937],[-10.339,-0.637],[-9.948,-3.583],[-9.375,-4.019],[-9.18,-4.154],[-6.045,-3.75],[-5.773,-3.463],[-5.773,-6.542],[-3.574,-8.742]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[12.118,14.234],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 5","np":2,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120,"st":0,"ct":1,"bm":0}],"markers":[]} \ No newline at end of file
diff --git a/ui/webui/resources/BUILD.gn b/ui/webui/resources/BUILD.gn index 1c56d2a..51d850a 100644 --- a/ui/webui/resources/BUILD.gn +++ b/ui/webui/resources/BUILD.gn
@@ -87,6 +87,7 @@ if (!is_android) { public_deps += [ + "cr_components/composebox:build_grdp", "cr_components/history:build_grdp", "cr_components/history_clusters:build_grdp", "cr_components/history_embeddings:build_grdp", @@ -98,6 +99,7 @@ "$target_gen_dir/cr_components/history_clusters/resources.grdp", "$target_gen_dir/cr_components/history_embeddings/resources.grdp", "$target_gen_dir/cr_components/searchbox/resources.grdp", + "$target_gen_dir/cr_components/composebox/resources.grdp", "$target_gen_dir/cr_components/searchbox/icons/resources.grdp", ]
diff --git a/ui/webui/resources/cr_components/composebox/BUILD.gn b/ui/webui/resources/cr_components/composebox/BUILD.gn new file mode 100644 index 0000000..b364845c --- /dev/null +++ b/ui/webui/resources/cr_components/composebox/BUILD.gn
@@ -0,0 +1,63 @@ +# Copyright 2025 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//mojo/public/tools/bindings/mojom.gni") +import("//ui/webui/resources/tools/build_webui.gni") + +assert(!is_android && !is_ios) + +mojom("mojo_bindings") { + sources = [ "composebox.mojom" ] + webui_module_path = "/" + + public_deps = [ + "//components/omnibox/composebox:mojo_bindings", + "//components/omnibox/browser:mojo_bindings", + "//mojo/public//mojom/base", + ] +} + +build_webui("build") { + grd_prefix = "cr_components_composebox" + ts_files = [ + "common.ts", + "composebox.html.ts", + "composebox.ts", + "file_carousel.html.ts", + "file_carousel.ts", + "file_thumbnail.ts", + "file_thumbnail.html.ts", + "composebox_proxy.ts", + "icons.html.ts", + ] + css_files = [ + "composebox.css", + "file_carousel.css", + "file_thumbnail.css", + ] + + mojo_files_deps = [ + ":mojo_bindings_ts__generator", + "//components/omnibox/browser:mojo_bindings_ts__generator", + "//components/omnibox/composebox:mojo_bindings_ts__generator", + ] + mojo_files = [ + "$root_gen_dir/components/omnibox/composebox/composebox_query.mojom-webui.ts", + "$root_gen_dir/ui/webui/resources/cr_components/composebox/composebox.mojom-webui.ts", + ] + + ts_out_dir = "$root_gen_dir/ui/webui/resources/tsc/cr_components/composebox" + ts_composite = true + ts_definitions = [ "//tools/typescript/definitions/metrics_private.d.ts" ] + ts_deps = [ + "//third_party/lit/v3_0:build_ts", + "//third_party/polymer/v3_0:library", + "//ui/webui/resources/cr_elements:build_ts", + "//ui/webui/resources/js:build_ts", + "//ui/webui/resources/mojo:build_ts", + ] + webui_context_type = "relative" + generate_grdp = true + grd_resource_path_prefix = rebase_path(".", "//ui/webui/resources") +}
diff --git a/chrome/browser/resources/new_tab_page/composebox/OWNERS b/ui/webui/resources/cr_components/composebox/OWNERS similarity index 100% rename from chrome/browser/resources/new_tab_page/composebox/OWNERS rename to ui/webui/resources/cr_components/composebox/OWNERS
diff --git a/chrome/browser/resources/new_tab_page/composebox/common.ts b/ui/webui/resources/cr_components/composebox/common.ts similarity index 60% rename from chrome/browser/resources/new_tab_page/composebox/common.ts rename to ui/webui/resources/cr_components/composebox/common.ts index 453d7e6c..eb8487a 100644 --- a/chrome/browser/resources/new_tab_page/composebox/common.ts +++ b/ui/webui/resources/cr_components/composebox/common.ts
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import type {UnguessableToken} from 'chrome://resources/mojo/mojo/public/mojom/base/unguessable_token.mojom-webui.js'; +import type {UnguessableToken} from '//resources/mojo/mojo/public/mojom/base/unguessable_token.mojom-webui.js'; -import type {FileUploadStatus} from '../composebox_query.mojom-webui.js'; +import type {FileUploadStatus} from './composebox_query.mojom-webui.js'; export interface ComposeboxFile { uuid: UnguessableToken;
diff --git a/chrome/browser/resources/new_tab_page/composebox/composebox.css b/ui/webui/resources/cr_components/composebox/composebox.css similarity index 100% rename from chrome/browser/resources/new_tab_page/composebox/composebox.css rename to ui/webui/resources/cr_components/composebox/composebox.css
diff --git a/chrome/browser/resources/new_tab_page/composebox/composebox.html.ts b/ui/webui/resources/cr_components/composebox/composebox.html.ts similarity index 97% rename from chrome/browser/resources/new_tab_page/composebox/composebox.html.ts rename to ui/webui/resources/cr_components/composebox/composebox.html.ts index ba136d9..2ef7cb1 100644 --- a/chrome/browser/resources/new_tab_page/composebox/composebox.html.ts +++ b/ui/webui/resources/cr_components/composebox/composebox.html.ts
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'chrome://resources/cr_elements/cr_icons.css.js'; +import '//resources/cr_elements/cr_icons.css.js'; import {html} from '//resources/lit/v3_0/lit.rollup.js';
diff --git a/chrome/browser/ui/webui/new_tab_page/composebox/composebox.mojom b/ui/webui/resources/cr_components/composebox/composebox.mojom similarity index 100% rename from chrome/browser/ui/webui/new_tab_page/composebox/composebox.mojom rename to ui/webui/resources/cr_components/composebox/composebox.mojom
diff --git a/chrome/browser/resources/new_tab_page/composebox/composebox.ts b/ui/webui/resources/cr_components/composebox/composebox.ts similarity index 93% rename from chrome/browser/resources/new_tab_page/composebox/composebox.ts rename to ui/webui/resources/cr_components/composebox/composebox.ts index 2c0a1f6b..7c1fbbb 100644 --- a/chrome/browser/resources/new_tab_page/composebox/composebox.ts +++ b/ui/webui/resources/cr_components/composebox/composebox.ts
@@ -5,28 +5,25 @@ import './icons.html.js'; import '//resources/cr_elements/cr_icon_button/cr_icon_button.js'; +import {getInstance as getAnnouncerInstance} from '//resources/cr_elements/cr_a11y_announcer/cr_a11y_announcer.js'; import type {CrIconButtonElement} from '//resources/cr_elements/cr_icon_button/cr_icon_button.js'; +import {I18nMixinLit} from '//resources/cr_elements/i18n_mixin_lit.js'; import {assert} from '//resources/js/assert.js'; +import {EventTracker} from '//resources/js/event_tracker.js'; import {loadTimeData} from '//resources/js/load_time_data.js'; +import {stringToMojoString16} from '//resources/js/mojo_type_util.js'; import type {PropertyValues} from '//resources/lit/v3_0/lit.rollup.js'; import {CrLitElement} from '//resources/lit/v3_0/lit.rollup.js'; +import type {AutocompleteResult, PageCallbackRouter as SearchboxPageCallbackRouter, PageHandlerRemote as SearchboxPageHandlerRemote} from '//resources/mojo/components/omnibox/browser/searchbox.mojom-webui.js'; import type {BigBuffer} from '//resources/mojo/mojo/public/mojom/base/big_buffer.mojom-webui.js'; import type {UnguessableToken} from '//resources/mojo/mojo/public/mojom/base/unguessable_token.mojom-webui.js'; -import {getInstance as getAnnouncerInstance} from 'chrome://resources/cr_elements/cr_a11y_announcer/cr_a11y_announcer.js'; -import {I18nMixinLit} from 'chrome://resources/cr_elements/i18n_mixin_lit.js'; -import {EventTracker} from 'chrome://resources/js/event_tracker.js'; -import {stringToMojoString16} from 'chrome://resources/js/mojo_type_util.js'; -import type {AutocompleteResult, PageCallbackRouter as SearchboxPageCallbackRouter, PageHandlerRemote as SearchboxPageHandlerRemote} from 'chrome://resources/mojo/components/omnibox/browser/searchbox.mojom-webui.js'; - -import type {PageCallbackRouter, PageHandlerRemote} from '../composebox.mojom-webui.js'; -import {FileUploadErrorType, FileUploadStatus} from '../composebox_query.mojom-webui.js'; -import {recordLoadDuration} from '../metrics_utils.js'; -import {WindowProxy} from '../window_proxy.js'; import type {ComposeboxFile} from './common.js'; import {getCss} from './composebox.css.js'; import {getHtml} from './composebox.html.js'; +import type {PageCallbackRouter, PageHandlerRemote} from './composebox.mojom-webui.js'; import {ComposeboxProxyImpl} from './composebox_proxy.js'; +import {FileUploadErrorType, FileUploadStatus} from './composebox_query.mojom-webui.js'; import type {ComposeboxFileCarouselElement} from './file_carousel.js'; export interface ComposeboxElement { @@ -150,9 +147,6 @@ ComposeboxProxyImpl.getInstance().searchboxCallbackRouter; this.searchboxHandler_ = ComposeboxProxyImpl.getInstance().searchboxHandler; this.pageHandler_.notifySessionStarted(); - recordLoadDuration( - 'NewTabPage.Composebox.FromNTPLoadToSessionStart', - WindowProxy.getInstance().now()); } override connectedCallback() {
diff --git a/chrome/browser/resources/new_tab_page/composebox/composebox_proxy.ts b/ui/webui/resources/cr_components/composebox/composebox_proxy.ts similarity index 97% rename from chrome/browser/resources/new_tab_page/composebox/composebox_proxy.ts rename to ui/webui/resources/cr_components/composebox/composebox_proxy.ts index 52987d0..c38f9ef74 100644 --- a/chrome/browser/resources/new_tab_page/composebox/composebox_proxy.ts +++ b/ui/webui/resources/cr_components/composebox/composebox_proxy.ts
@@ -3,7 +3,7 @@ // found in the LICENSE file. import {PageCallbackRouter as SearchboxPageCallbackRouter, PageHandlerRemote as SearchboxPageHandlerRemote} from '//resources/mojo/components/omnibox/browser/searchbox.mojom-webui.js'; -import {PageCallbackRouter, PageHandlerFactory, PageHandlerRemote} from '../composebox.mojom-webui.js'; +import {PageCallbackRouter, PageHandlerFactory, PageHandlerRemote} from './composebox.mojom-webui.js'; export interface ComposeboxProxy { handler: PageHandlerRemote;
diff --git a/chrome/browser/resources/new_tab_page/composebox/file_carousel.css b/ui/webui/resources/cr_components/composebox/file_carousel.css similarity index 100% rename from chrome/browser/resources/new_tab_page/composebox/file_carousel.css rename to ui/webui/resources/cr_components/composebox/file_carousel.css
diff --git a/chrome/browser/resources/new_tab_page/composebox/file_carousel.html.ts b/ui/webui/resources/cr_components/composebox/file_carousel.html.ts similarity index 100% rename from chrome/browser/resources/new_tab_page/composebox/file_carousel.html.ts rename to ui/webui/resources/cr_components/composebox/file_carousel.html.ts
diff --git a/chrome/browser/resources/new_tab_page/composebox/file_carousel.ts b/ui/webui/resources/cr_components/composebox/file_carousel.ts similarity index 100% rename from chrome/browser/resources/new_tab_page/composebox/file_carousel.ts rename to ui/webui/resources/cr_components/composebox/file_carousel.ts
diff --git a/chrome/browser/resources/new_tab_page/composebox/file_thumbnail.css b/ui/webui/resources/cr_components/composebox/file_thumbnail.css similarity index 100% rename from chrome/browser/resources/new_tab_page/composebox/file_thumbnail.css rename to ui/webui/resources/cr_components/composebox/file_thumbnail.css
diff --git a/chrome/browser/resources/new_tab_page/composebox/file_thumbnail.html.ts b/ui/webui/resources/cr_components/composebox/file_thumbnail.html.ts similarity index 96% rename from chrome/browser/resources/new_tab_page/composebox/file_thumbnail.html.ts rename to ui/webui/resources/cr_components/composebox/file_thumbnail.html.ts index b5a8c2c..50aea14 100644 --- a/chrome/browser/resources/new_tab_page/composebox/file_thumbnail.html.ts +++ b/ui/webui/resources/cr_components/composebox/file_thumbnail.html.ts
@@ -4,8 +4,7 @@ import {html} from '//resources/lit/v3_0/lit.rollup.js'; -import {FileUploadStatus} from '../composebox_query.mojom-webui.js'; - +import {FileUploadStatus} from './composebox_query.mojom-webui.js'; import type {ComposeboxFileThumbnailElement} from './file_thumbnail.js'; export function getHtml(this: ComposeboxFileThumbnailElement) {
diff --git a/chrome/browser/resources/new_tab_page/composebox/file_thumbnail.ts b/ui/webui/resources/cr_components/composebox/file_thumbnail.ts similarity index 91% rename from chrome/browser/resources/new_tab_page/composebox/file_thumbnail.ts rename to ui/webui/resources/cr_components/composebox/file_thumbnail.ts index e9f74f7..e1782c6 100644 --- a/chrome/browser/resources/new_tab_page/composebox/file_thumbnail.ts +++ b/ui/webui/resources/cr_components/composebox/file_thumbnail.ts
@@ -4,12 +4,11 @@ import '//resources/cr_elements/cr_icon_button/cr_icon_button.js'; import '//resources/cr_elements/icons.html.js'; +import {loadTimeData} from '//resources/js/load_time_data.js'; import {CrLitElement} from '//resources/lit/v3_0/lit.rollup.js'; -import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; - -import {FileUploadStatus} from '../composebox_query.mojom-webui.js'; import type {ComposeboxFile} from './common.js'; +import {FileUploadStatus} from './composebox_query.mojom-webui.js'; import {getCss} from './file_thumbnail.css.js'; import {getHtml} from './file_thumbnail.html.js';
diff --git a/chrome/browser/resources/new_tab_page/composebox/icons.html.ts b/ui/webui/resources/cr_components/composebox/icons.html.ts similarity index 100% rename from chrome/browser/resources/new_tab_page/composebox/icons.html.ts rename to ui/webui/resources/cr_components/composebox/icons.html.ts
diff --git a/ui/webui/resources/cr_components/most_visited/most_visited.mojom b/ui/webui/resources/cr_components/most_visited/most_visited.mojom index 5d1c333..227645a 100644 --- a/ui/webui/resources/cr_components/most_visited/most_visited.mojom +++ b/ui/webui/resources/cr_components/most_visited/most_visited.mojom
@@ -65,7 +65,7 @@ url.mojom.Url new_url, string new_title) => (bool success); // Prerenders |tile|. - PrerenderMostVisitedTile(MostVisitedTile tile, bool is_hover_trigger); + PrerenderMostVisitedTile(MostVisitedTile tile); // Preconnects |tile|. Preresolve/preconnects the origin; a socket created // by this call will be reused, if possible, for a subsequent attempt to // prerender or navigate to this url.
diff --git a/ui/webui/resources/cr_components/most_visited/most_visited.ts b/ui/webui/resources/cr_components/most_visited/most_visited.ts index 4291fc34..74cb8fa 100644 --- a/ui/webui/resources/cr_components/most_visited/most_visited.ts +++ b/ui/webui/resources/cr_components/most_visited/most_visited.ts
@@ -838,18 +838,9 @@ const item = this.tiles_[this.getCurrentTargetIndex_(e)]; assert(item); - if (loadTimeData.getBoolean('prerenderOnHoverEnabled') && - loadTimeData.getInteger('prerenderStartTimeThreshold') >= 0) { - this.prerenderTimer_ = setTimeout(() => { - this.pageHandler_.prerenderMostVisitedTile(item, true); - }, loadTimeData.getInteger('prerenderStartTimeThreshold')); - } - // Preconnect is intended to be run on mouse hover when prerender is - // enabled, so it is allowed regardless of prerenderOnHoverEnabled or - // prerenderOnPressEnabled. - if ((loadTimeData.getBoolean('prerenderOnHoverEnabled') || - loadTimeData.getBoolean('prerenderOnPressEnabled')) && + // enabled. + if (loadTimeData.getBoolean('prerenderOnPressEnabled') && loadTimeData.getInteger('preconnectStartTimeThreshold') >= 0) { this.preconnectTimer_ = setTimeout(() => { this.pageHandler_.preconnectMostVisitedTile(item); @@ -865,7 +856,7 @@ if (loadTimeData.getBoolean('prerenderOnPressEnabled')) { const item = this.tiles_[this.getCurrentTargetIndex_(e)]; assert(item); - this.pageHandler_.prerenderMostVisitedTile(item, false); + this.pageHandler_.prerenderMostVisitedTile(item); } } @@ -883,8 +874,7 @@ clearTimeout(this.preconnectTimer_); } - if (loadTimeData.getBoolean('prerenderOnHoverEnabled') || - loadTimeData.getBoolean('prerenderOnPressEnabled')) { + if (loadTimeData.getBoolean('prerenderOnPressEnabled')) { this.pageHandler_.cancelPrerender(); } }
diff --git a/ui/wm/core/cursor_util.cc b/ui/wm/core/cursor_util.cc index c6c05a0..01123885 100644 --- a/ui/wm/core/cursor_util.cc +++ b/ui/wm/core/cursor_util.cc
@@ -341,10 +341,10 @@ {12, 12}, {12, 12}, /*is_animated=*/true}}, - {{CursorType::kNoDrop, IDR_AURA_CURSOR_NO_DROP, {9, 9}, {18, 18}}}, + {{CursorType::kNoDrop, IDR_AURA_CURSOR_NO_DROP_LOTTIE, {8, 7}, {8, 7}}}, {{CursorType::kCopy, IDR_AURA_CURSOR_COPY_LOTTIE, {8, 7}, {8, 7}}}, /*CursorType::kNone*/ {}, - {{CursorType::kNotAllowed, IDR_AURA_CURSOR_NO_DROP, {9, 9}, {18, 18}}}, + {{CursorType::kNotAllowed, IDR_AURA_CURSOR_NO_DROP_LOTTIE, {8, 7}, {8, 7}}}, {{CursorType::kZoomIn, IDR_AURA_CURSOR_ZOOM_IN, {10, 10}, {20, 20}}}, {{CursorType::kZoomOut, IDR_AURA_CURSOR_ZOOM_OUT, {10, 10}, {20, 20}}}, {{CursorType::kGrab, IDR_AURA_CURSOR_GRAB, {8, 5}, {16, 10}}}, @@ -472,13 +472,10 @@ {12, 12}, {12, 12}, /*is_animated=*/true}}, - {{CursorType::kNoDrop, IDR_AURA_CURSOR_BIG_NO_DROP, {10, 10}, {20, 20}}}, + {{CursorType::kNoDrop, IDR_AURA_CURSOR_NO_DROP_LOTTIE, {8, 7}, {8, 7}}}, {{CursorType::kCopy, IDR_AURA_CURSOR_COPY_LOTTIE, {8, 7}, {8, 7}}}, /*CursorType::kNone*/ {}, - {{CursorType::kNotAllowed, - IDR_AURA_CURSOR_BIG_NO_DROP, - {10, 10}, - {20, 20}}}, + {{CursorType::kNotAllowed, IDR_AURA_CURSOR_NO_DROP_LOTTIE, {8, 7}, {8, 7}}}, {{CursorType::kZoomIn, IDR_AURA_CURSOR_BIG_ZOOM_IN, {25, 26}, {50, 52}}}, {{CursorType::kZoomOut, IDR_AURA_CURSOR_BIG_ZOOM_OUT, {26, 26}, {52, 52}}}, {{CursorType::kGrab, IDR_AURA_CURSOR_BIG_GRAB, {21, 11}, {42, 22}}},
diff --git a/ui/wm/core/cursor_util_unittest.cc b/ui/wm/core/cursor_util_unittest.cc index 0a00a0a..a2e8f2d9c 100644 --- a/ui/wm/core/cursor_util_unittest.cc +++ b/ui/wm/core/cursor_util_unittest.cc
@@ -196,7 +196,7 @@ // The no drop cursor has red in it, check it's still there: // Most of the cursor should be colored, but the red part shouldn't be // re-colored. - {SK_ColorBLUE, SK_ColorGREEN, SkColorSetRGB(173, 8, 8), + {SK_ColorBLUE, SK_ColorGREEN, SkColorSetRGB(181, 70, 72), CursorType::kNoDrop}, // Similarly, the copy cursor has green in it. {SK_ColorBLUE, SK_ColorRED, SkColorSetRGB(57, 149, 88),
diff --git a/v8 b/v8 index eda6309a..4b9a2f4 160000 --- a/v8 +++ b/v8
@@ -1 +1 @@ -Subproject commit eda6309abc2088b5d77b91470c3d971bdc5d962b +Subproject commit 4b9a2f41d761531d56ae2c58b7e5f8daa4cf7a5c