diff --git a/DEPS b/DEPS index 95fb473..5d3366a 100644 --- a/DEPS +++ b/DEPS
@@ -290,19 +290,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': '9be020a68863ae27c87b490e778991a4402d4b05', + 'src_internal_revision': 'dca7124471d9e1cd831baf19f06f8a2cacfb1b93', # 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': 'f041aa580d1154a58eb9124fe9f087b4ca11250b', + 'skia_revision': 'b0a25d7651bba1dce595e32c5946af1a42692e07', # 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': '3e93887a44e2eb0e05a80af6c9192c1542b94524', + 'v8_revision': 'c8b2dbf389f00190338351d9ce989f84e73fc7a0', # 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': 'ca893fdfe95b5244e4d0e773b009dc781980158d', + 'angle_revision': '56e9bfff2ec83b56a1a80c24ae0cbbac535c7432', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -362,7 +362,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling CrossBench # and whatever else without interference from each other. - 'crossbench_revision': 'dbd6b227436aba167bcaa53157d5aabd063178cc', + 'crossbench_revision': '77e83bc30e0f45c6bc3f4018c5999ba7deffe3c6', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -378,7 +378,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': 'da55423600c76cb379edcdd34837d29162e6867f', + 'devtools_frontend_revision': 'b724879a877b1d6d7162d419c42b4116612be837', # 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. @@ -402,7 +402,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'dawn_revision': 'cda86a85a50b6f85e750661624d1124bb1ff7157', + 'dawn_revision': '370ee80a113203da63f74c7591fefe9ca11f70cc', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -1563,7 +1563,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - '9575ec20acd995d287a76f267d7061b873a945b5', + 'ab8337c1d26c83a5aba7c077cf2ea5cfef94b8a5', 'condition': 'checkout_android and checkout_src_internal', }, @@ -1717,7 +1717,7 @@ 'packages': [ { 'package': 'chromium/third_party/androidx', - 'version': 'R4_xK2W3ql3CpliF97siZrtL1thdeO9goKOOCRjZ51oC', + 'version': 'wX5EnG9kBELAKhe-Am3XeFZgh6l3H2oYrndg3RYtxUcC', }, ], 'condition': 'checkout_android and non_git_source', @@ -1810,7 +1810,7 @@ 'packages': [ { 'package': 'chromium/third_party/android_build_tools/lint', - 'version': 'RevkTwhOQRk-oOzI4BBk3FYEeVAlBijeTqjNPrGsi_8C', + 'version': 'eWRdzGzH7yQ87tWs3ziVgS5K-hEL5sDdOZgIR2pSduoC', }, ], 'condition': 'checkout_android and non_git_source', @@ -1821,7 +1821,7 @@ 'packages': [ { 'package': 'chromium/third_party/android_build_tools/manifest_merger', - 'version': 'v0s5-TwZ9OxfzbqU5ULhQ7vufSuKIIld6Z7TK8artzoC', + 'version': 'QmC9cZkulirpeFoG7WaWIGRovPGsS8sMpycIswB1CwkC', }, ], 'condition': 'checkout_android and non_git_source', @@ -2296,7 +2296,7 @@ 'packages': [ { 'package': 'chromium/third_party/kotlin_stdlib', - 'version': 'Ly_nOcmB3VyAmA3kTKonDTj_hmJ8y1ij5aTcLYpERbYC', + 'version': 'WLQWx0tEKXoFb4sUHvEBIdL5AUzDW0bUkyFYMclPZlQC', }, ], 'condition': 'checkout_android and non_git_source', @@ -2593,7 +2593,7 @@ Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'), 'src/third_party/perfetto': - Var('chromium_git') + '/external/github.com/google/perfetto.git' + '@' + '6766ffc9858ca6409ab50a01fde339c125f564d3', + Var('chromium_git') + '/external/github.com/google/perfetto.git' + '@' + 'd6a79b5507ad97595894fd00c78f8e08159c9d41', 'src/base/tracing/test/data': { 'bucket': 'perfetto', @@ -2912,11 +2912,11 @@ 'dep_type': 'cipd', }, - 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@25f573ec719a61720d4e14e9d5f40bb8b92543e0', - 'src/third_party/glslang/src': '{chromium_git}/external/github.com/KhronosGroup/glslang@e9d166cd3bdb4d3c89c6c89c7d9f196a0c9e4ffb', + 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@d3f4b5f78306c8d353c0e51a88359c77b10359c0', + 'src/third_party/glslang/src': '{chromium_git}/external/github.com/KhronosGroup/glslang@95e6e51a2430185af06a92049395144a6f63a8e1', '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@04b76709bf40a7ce8df3382060ef3620f19de566', - 'src/third_party/spirv-tools/src': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Tools@604c3e75a41b3605ac86bdf5bc26987bd9f9589f', + 'src/third_party/spirv-tools/src': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Tools@40eb301f320e1d85ce3bc12798022149eae3eee3', 'src/third_party/vulkan-headers/src': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Headers@10739e8e00a7b6f74d22dd0a547f1406ff1f5eb9', 'src/third_party/vulkan-loader/src': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Loader@342da33fdec78d269657194c9082835d647d2e68', 'src/third_party/vulkan-tools/src': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Tools@e3fc64396755191b3c51e5c57d0454872e7fa487',
diff --git a/ash/webui/settings/public/constants/setting.mojom b/ash/webui/settings/public/constants/setting.mojom index 85f20bb5..314666f 100644 --- a/ash/webui/settings/public/constants/setting.mojom +++ b/ash/webui/settings/public/constants/setting.mojom
@@ -153,6 +153,8 @@ kLowBatterySound = 444, kBatterySaver = 445, kTouchpadSimulateRightClick = 446, + kOptimizedCharging = 447, + kChargeLimit = 448, // Personalization section. kOpenWallpaper = 500,
diff --git a/build/android/pylib/local/device/local_device_gtest_run.py b/build/android/pylib/local/device/local_device_gtest_run.py index 1e85197..a902ddd 100644 --- a/build/android/pylib/local/device/local_device_gtest_run.py +++ b/build/android/pylib/local/device/local_device_gtest_run.py
@@ -342,7 +342,7 @@ except device_errors.DeviceUnreachableError as e: exception_recorder.register(e) logging.exception('gtest shard device unreachable.') - except Exception: + except Exception as e: exception_recorder.register( test_exception.StartInstrumentationError(e)) device.ForceStop(self._package)
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListHighlighter.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListHighlighter.java index d2612de..bc44a2f5 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListHighlighter.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListHighlighter.java
@@ -62,8 +62,6 @@ } private boolean isHighLighted(PropertyModel model) { - return model.containsKey(TAB_ID) - && model.containsKey(IS_HIGHLIGHTED) - && model.get(IS_HIGHLIGHTED); + return model.containsKey(TAB_ID) && model.containsKeyEqualTo(IS_HIGHLIGHTED, true); } }
diff --git a/chrome/android/java/res/xml/manage_sync_preferences.xml b/chrome/android/java/res/xml/manage_sync_preferences.xml index fa32df6..901e81bc 100644 --- a/chrome/android/java/res/xml/manage_sync_preferences.xml +++ b/chrome/android/java/res/xml/manage_sync_preferences.xml
@@ -34,6 +34,11 @@ android:persistent="false"/> <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference + android:key="sync_extensions" + android:title="@string/sync_extensions" + android:persistent="false"/> + + <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference android:key="sync_payments_integration" android:title="@string/sync_payments_integration" android:persistent="false"/>
diff --git a/chrome/android/java/res/xml/unified_account_settings_preferences.xml b/chrome/android/java/res/xml/unified_account_settings_preferences.xml index f27b855..2f9f5ff 100644 --- a/chrome/android/java/res/xml/unified_account_settings_preferences.xml +++ b/chrome/android/java/res/xml/unified_account_settings_preferences.xml
@@ -43,6 +43,11 @@ android:persistent="false"/> <org.chromium.components.browser_ui.settings.ChromeSwitchPreference + android:key="account_section_extensions_toggle" + android:title="@string/account_section_extensions_toggle" + android:persistent="false"/> + + <org.chromium.components.browser_ui.settings.ChromeSwitchPreference android:key="account_section_reading_list_toggle" android:title="@string/account_section_reading_list_toggle" android:persistent="false"/>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java index 02dd498..39baa8e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
@@ -38,7 +38,7 @@ import org.chromium.chrome.browser.toolbar.top.ToolbarLayout; import org.chromium.chrome.browser.ui.edge_to_edge.EdgeToEdgeController; import org.chromium.components.browser_ui.desktop_windowing.DesktopWindowStateManager; -import org.chromium.components.browser_ui.styles.ChromeColors; +import org.chromium.components.browser_ui.styles.SemanticColorUtils; import org.chromium.components.browser_ui.widget.scrim.ScrimManager; import org.chromium.components.browser_ui.widget.scrim.ScrimProperties; import org.chromium.ui.base.LocalizationUtils; @@ -887,9 +887,12 @@ scrimImage( R.id.drag_handlebar, - ChromeColors.getDragHandleBarColor(getContext()), + SemanticColorUtils.getDragHandlebarColor(getContext()), scrimFraction); - scrimImage(R.id.toolbar_hairline, R.color.divider_line_bg_color_baseline, scrimFraction); + scrimImage( + R.id.toolbar_hairline, + SemanticColorUtils.getDividerLineBgColor(getContext()), + scrimFraction); } private void scrimImage(int viewId, int colorId, float scrimFraction) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/TabGroupContextMenuCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/TabGroupContextMenuCoordinator.java index fd2256f..9ff7d73e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/TabGroupContextMenuCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/TabGroupContextMenuCoordinator.java
@@ -447,8 +447,7 @@ private int getMenuItemIndex(ModelList itemList, int menuItemId) { for (int i = 0; i < itemList.size(); i++) { PropertyModel model = itemList.get(i).model; - if (model.containsKey(ListMenuItemProperties.MENU_ITEM_ID) - && model.get(ListMenuItemProperties.MENU_ITEM_ID) == menuItemId) { + if (model.containsKeyEqualTo(ListMenuItemProperties.MENU_ITEM_ID, menuItemId)) { return i; } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java index 1945d0a..0932566 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
@@ -599,6 +599,10 @@ developerGroup.add(createListItem(Item.INSPECT_ELEMENT)); groupedItems.add(developerGroup); } + + ModelList modelList = mParams.getMenuModelBridge().populateModelList(); + if (!modelList.isEmpty()) groupedItems.add(modelList); + return groupedItems; }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuCoordinator.java index 47c6c3a..8ad92572 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuCoordinator.java
@@ -522,8 +522,9 @@ itemList.add(new ListItem(ListItemType.DIVIDER, new PropertyModel())); } - // Add the items in the group - itemList.addAll(group); + // Add the items in the group. We must check for emptiness first, because addAll asserts + // that its parameter contains at least one item. + if (!group.isEmpty()) itemList.addAll(group); } for (ListItem item : itemList) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategy.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategy.java index 2ca4f8f..2de33c1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategy.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/partialcustomtab/PartialCustomTabBottomSheetStrategy.java
@@ -57,7 +57,7 @@ import org.chromium.chrome.browser.lifecycle.ConfigurationChangedObserver; import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; import org.chromium.chrome.browser.tab.Tab; -import org.chromium.components.browser_ui.styles.ChromeColors; +import org.chromium.components.browser_ui.styles.SemanticColorUtils; import org.chromium.components.browser_ui.widget.TouchEventObserver; import org.chromium.components.browser_ui.widget.TouchEventProvider; import org.chromium.ui.accessibility.AccessibilityState; @@ -431,7 +431,7 @@ ImageView handle = mActivity.findViewById(R.id.drag_handle); if (Color.alpha(scrimColor) != 0) { - @ColorInt int handleColor = ChromeColors.getDragHandleBarColor(mActivity); + @ColorInt int handleColor = SemanticColorUtils.getDragHandlebarColor(mActivity); handle.setColorFilter(ColorUtils.overlayColor(handleColor, scrimColor)); } else { handle.clearColorFilter();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java index ee69f234..2ae6152 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettings.java
@@ -58,6 +58,7 @@ import org.chromium.chrome.browser.sync.ui.PassphraseCreationDialogFragment; import org.chromium.chrome.browser.sync.ui.PassphraseDialogFragment; import org.chromium.chrome.browser.sync.ui.PassphraseTypeDialogFragment; +import org.chromium.chrome.browser.ui.extensions.ExtensionsBuildflags; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.browser.ui.signin.GoogleActivityController; import org.chromium.chrome.browser.ui.signin.SignOutCoordinator; @@ -125,6 +126,7 @@ @VisibleForTesting public static final String PREF_SYNC_EVERYTHING = "sync_everything"; @VisibleForTesting public static final String PREF_SYNC_AUTOFILL = "sync_autofill"; @VisibleForTesting public static final String PREF_SYNC_BOOKMARKS = "sync_bookmarks"; + @VisibleForTesting public static final String PREF_SYNC_EXTENSIONS = "sync_extensions"; @VisibleForTesting public static final String PREF_SYNC_PAYMENTS_INTEGRATION = "sync_payments_integration"; @@ -155,6 +157,10 @@ "account_section_bookmarks_toggle"; @VisibleForTesting + public static final String PREF_ACCOUNT_SECTION_EXTENSIONS_TOGGLE = + "account_section_extensions_toggle"; + + @VisibleForTesting public static final String PREF_ACCOUNT_SECTION_READING_LIST_TOGGLE = "account_section_reading_list_toggle"; @@ -488,6 +494,14 @@ UserSelectableType.BOOKMARKS, findPreference(PREF_ACCOUNT_SECTION_BOOKMARKS_TOGGLE)); + if (shouldShowExtensionsItem()) { + mSyncTypeSwitchPreferencesMap.put( + UserSelectableType.EXTENSIONS, + findPreference(PREF_ACCOUNT_SECTION_EXTENSIONS_TOGGLE)); + } else { + findPreference(PREF_ACCOUNT_SECTION_EXTENSIONS_TOGGLE).setVisible(false); + } + // HISTORY and TABS are bundled in the same switch in the new settings panel. ChromeSwitchPreference historyAndTabsToggle = (ChromeSwitchPreference) findPreference(PREF_ACCOUNT_SECTION_HISTORY_TOGGLE); @@ -629,6 +643,12 @@ UserSelectableType.AUTOFILL, findPreference(PREF_SYNC_AUTOFILL)); mSyncTypeCheckBoxPreferencesMap.put( UserSelectableType.BOOKMARKS, findPreference(PREF_SYNC_BOOKMARKS)); + if (shouldShowExtensionsItem()) { + mSyncTypeCheckBoxPreferencesMap.put( + UserSelectableType.EXTENSIONS, findPreference(PREF_SYNC_EXTENSIONS)); + } else { + findPreference(PREF_SYNC_EXTENSIONS).setVisible(false); + } mSyncTypeCheckBoxPreferencesMap.put( UserSelectableType.HISTORY, findPreference(PREF_SYNC_HISTORY)); mSyncTypeCheckBoxPreferencesMap.put( @@ -1246,4 +1266,11 @@ public @AnimationType int getAnimationType() { return AnimationType.PROPERTY; } + + /** Returns whether the extensions sync item should be shown. */ + private boolean shouldShowExtensionsItem() { + return ExtensionsBuildflags.ENABLE_DESKTOP_ANDROID_EXTENSIONS + && !ChromeFeatureList.isEnabled( + ChromeFeatureList.BLOCK_INSTALLING_EXTENSIONS_ON_DESKTOP_ANDROID); + } }
diff --git a/chrome/android/javatests/BUILD.gn b/chrome/android/javatests/BUILD.gn index d15c288..d7b32797 100644 --- a/chrome/android/javatests/BUILD.gn +++ b/chrome/android/javatests/BUILD.gn
@@ -1247,6 +1247,7 @@ deps = [ ":chrome_test_java_helper", + "//chrome/browser/ui/android/extensions:java", "//chrome/browser/user_education:java", ] }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/NavigateTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/NavigateTest.java index b8d33ff0..90b6569 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/NavigateTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/NavigateTest.java
@@ -27,6 +27,7 @@ import org.junit.runner.RunWith; import org.chromium.base.ApiCompatibilityUtils; +import org.chromium.base.ApkInfo; import org.chromium.base.ContextUtils; import org.chromium.base.FakeTimeTestRule; import org.chromium.base.ThreadUtils; @@ -71,7 +72,9 @@ import org.chromium.url.Origin; import java.net.URL; +import java.util.HashMap; import java.util.Locale; +import java.util.Map; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; @@ -252,23 +255,11 @@ @CommandLineFlags.Add({"enable-features=UserAgentClientHint"}) // TODO(crbug.com/40612550) Remove switch when UA-CH-* launched. public void testRequestDesktopSiteClientHints() throws Exception { - String url1 = - mTestServer.getURL( - "/set-header?Accept-CH: sec-ch-ua-arch,sec-ch-ua-platform,sec-ch-ua-model"); - String url2 = - mTestServer.getURL( - "/echoheader?sec-ch-ua-arch&sec-ch-ua-mobile&sec-ch-ua-model&sec-ch-ua-platform"); - final Tab tab = mActivityTestRule.getActivity().getActivityTab(); - - navigateAndObserve(url1); - ChromeTabUtils.waitForTabPageLoaded(tab, url1); - - navigateAndObserve(url2); - ThreadUtils.runOnUiThreadBlocking( - () -> - TabUtils.switchUserAgent( - tab, /* switchToDesktop= */ true, UseDesktopUserAgentCaller.OTHER)); - ChromeTabUtils.waitForTabPageLoaded(tab, url2); + final Tab tab = + navigateUrlToEchoClientHintHeaders( + "/set-header?Accept-CH: sec-ch-ua-arch,sec-ch-ua-platform,sec-ch-ua-model", + "/echoheader?sec-ch-ua-arch&sec-ch-ua-mobile&sec-ch-ua-model&sec-ch-ua-platform", + /* overrideUserAgent= */ true); String content = JavaScriptUtils.executeJavaScriptAndWaitForResult( tab.getWebContents(), "document.body.textContent"); @@ -279,6 +270,78 @@ content); } + /** Test 'Request Desktop Site' option properly affects UA client hints */ + @Test + @MediumTest + @Feature({"Navigation"}) + @CommandLineFlags.Add({"enable-features=UserAgentClientHint"}) + @Restriction(DeviceFormFactor.DESKTOP) + // TODO(crbug.com/40612550) Remove switch when UA-CH-* launched. + public void testRequestDesktopSiteClientHintsForDesktopAndroidFormFactor() throws Exception { + Map<String, String> clientHints = new HashMap<>(); + String packageVersionName = ApkInfo.getPackageVersionName(); + String[] versionNameParts = packageVersionName.split("\\."); + Assert.assertTrue(versionNameParts.length > 0); + String packageMajorVersionName = versionNameParts[0]; + clientHints.put("sec-ch-ua-arch", "\\\"x86\\\""); + clientHints.put("sec-ch-ua-platform", "\\\"Linux\\\""); + clientHints.put("sec-ch-ua-platform-version", "\\\"\\\""); + clientHints.put("sec-ch-ua-model", "\\\"\\\""); + clientHints.put("sec-ch-ua-mobile", "?0"); + clientHints.put("sec-ch-ua-bitness", "\\\"64\\\""); + clientHints.put("sec-ch-ua-wow64", "?0"); + clientHints.put("sec-ch-ua-form-factors", "\\\"Desktop\\\""); + clientHints.put("sec-ch-ua-full-version", "\\\"" + packageVersionName + "\\\""); + + // Testing one at a time since navigateAndObserve fails for long URLs (truncates) + for (String header : clientHints.keySet()) { + String response = "\"" + clientHints.get(header) + "\""; + final Tab tab = + navigateUrlToEchoClientHintHeaders( + "/set-header?Accept-CH: " + header, + "/echoheader?" + header, + /* overrideUserAgent= */ false); + String content = + JavaScriptUtils.executeJavaScriptAndWaitForResult( + tab.getWebContents(), "document.body.textContent"); + Assert.assertEquals("Proper headers for echoString: " + header, response, content); + } + + String userAgentString = + JavaScriptUtils.executeJavaScriptAndWaitForResult( + mActivityTestRule.getWebContents(), "window.navigator.userAgent"); + Assert.assertEquals( + "Proper user agent: ", + String.format( + "\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)" + + " Chrome/%s.0.0.0 Safari/537.36\"", + packageMajorVersionName), + userAgentString); + } + + private Tab navigateUrlToEchoClientHintHeaders( + String setHeaderString, String echoHeaderString, boolean overrideUserAgent) + throws Exception { + String url1 = mTestServer.getURL(setHeaderString); + String url2 = mTestServer.getURL(echoHeaderString); + final Tab tab = mActivityTestRule.getActivity().getActivityTab(); + + navigateAndObserve(url1); + ChromeTabUtils.waitForTabPageLoaded(tab, url1); + + navigateAndObserve(url2); + if (overrideUserAgent) { + ThreadUtils.runOnUiThreadBlocking( + () -> + TabUtils.switchUserAgent( + tab, + /* switchToDesktop= */ true, + UseDesktopUserAgentCaller.OTHER)); + } + ChromeTabUtils.waitForTabPageLoaded(tab, url2); + return tab; + } + /** Test 'Request Desktop Site' option properly affects UA client hints with Critical-CH */ @Test @MediumTest
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulatorTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulatorTest.java index 34730119..dc7a23bc 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulatorTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulatorTest.java
@@ -11,6 +11,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.when; +import static org.chromium.ui.listmenu.ListItemType.CONTEXT_MENU_ITEM; import static org.chromium.ui.listmenu.ListMenuItemProperties.ENABLED; import static org.chromium.ui.listmenu.ListMenuItemProperties.MENU_ITEM_ID; import static org.chromium.ui.listmenu.ListMenuItemProperties.TITLE; @@ -58,7 +59,9 @@ import org.chromium.components.search_engines.TemplateUrlService; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.test.NativeLibraryTestUtils; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.listmenu.MenuModelBridge; +import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.mojom.MenuSourceType; @@ -105,6 +108,7 @@ DownloadUtils.setIsDownloadRestrictedByPolicyForTesting(false); NativeLibraryTestUtils.loadNativeLibraryNoBrowserProcess(); ExternalAuthUtils.setInstanceForTesting(mExternalAuthUtils); + when(mMenuModelBridge.populateModelList()).thenReturn(new ModelList()); GURL pageUrl = new GURL(PAGE_URL); when(mItemDelegate.getPageUrl()).thenReturn(pageUrl); @@ -232,31 +236,34 @@ checkMenuOptions(/* disabled= */ new ArrayList<>(), groups); } + private ContextMenuParams getHttpLinkParams() { + return new ContextMenuParams( + 0, + mMenuModelBridge, + 0, + new GURL(PAGE_URL), + new GURL(LINK_URL), + LINK_TEXT, + GURL.emptyGURL(), + GURL.emptyGURL(), + "", + null, + false, + 0, + 0, + MenuSourceType.TOUCH, + false, + /* openedFromInterestFor= */ false, + /* interestForNodeID= */ 0, + /* additionalNavigationParams= */ null); + } + @Test @SmallTest @UiThreadTest public void testHttpLink() { FirstRunStatus.setFirstRunFlowComplete(false); - ContextMenuParams params = - new ContextMenuParams( - 0, - mMenuModelBridge, - 0, - new GURL(PAGE_URL), - new GURL(LINK_URL), - LINK_TEXT, - GURL.emptyGURL(), - GURL.emptyGURL(), - "", - null, - false, - 0, - 0, - MenuSourceType.TOUCH, - false, - /* openedFromInterestFor= */ false, - /* interestForNodeID= */ 0, - /* additionalNavigationParams= */ null); + ContextMenuParams params = getHttpLinkParams(); int[] expected = {R.id.contextmenu_copy_link_address, R.id.contextmenu_copy_link_text}; @@ -1809,4 +1816,26 @@ ChromeContextMenuPopulator.ContextMenuMode.NETWORK_BOUND_TAB, params, false, false); checkMenuOptions(expected); } + + @Test + @SmallTest + @UiThreadTest + public void testIncludeMenuModelBridgeItems() { + ModelList modelListFromBridge = new ModelList(); + modelListFromBridge.add( + new ListItem( + CONTEXT_MENU_ITEM, + new PropertyModel.Builder(ListMenuItemProperties.ALL_KEYS) + .with(TITLE, "Test title") + .build())); + when(mMenuModelBridge.populateModelList()).thenReturn(modelListFromBridge); + ContextMenuParams params = getHttpLinkParams(); + initializePopulator(ChromeContextMenuPopulator.ContextMenuMode.NORMAL, params); + List<ModelList> result = mPopulator.buildContextMenu(); + assertEquals(2, result.size()); + assertEquals( + "Expected the group of extension-injected items to be the last group", + modelListFromBridge, + result.get(result.size() - 1)); + } }
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 ddd3bf66..b7c111f 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
@@ -105,6 +105,7 @@ import org.chromium.ui.base.DeviceInput; import org.chromium.ui.base.UiAndroidFeatures; import org.chromium.ui.listmenu.MenuModelBridge; +import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.mojom.MenuSourceType; import org.chromium.url.GURL; @@ -223,6 +224,7 @@ setupLensChipDelegate(); DownloadUtils.setIsDownloadRestrictedByPolicyForTesting(false); DataProtectionBridgeJni.setInstanceForTesting(mDataProtectionBridgeMock); + when(mMenuModelBridge.populateModelList()).thenReturn(new MVCListAdapter.ModelList()); } @After
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 14b4dd6..4549147 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
@@ -24,7 +24,6 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -42,9 +41,10 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabClosureParams; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; -import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; +import org.chromium.chrome.test.transit.AutoResetCtaTransitTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.FullscreenTestUtils; import org.chromium.chrome.test.util.MenuUtils; import org.chromium.content_public.browser.test.util.TouchCommon; @@ -55,19 +55,18 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @Batch(Batch.PER_CLASS) public class FindTest { - @ClassRule - public static final ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - private static final String FILEPATH = "/chrome/test/data/android/find/test.html"; @Rule - public final BlankCTATabInitialStateRule mInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, false); + public final AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.fastAutoResetCtaActivityRule(); + + private WebPageStation mPage; @Before public void setUp() throws Exception { - sActivityTestRule.waitForActivityNativeInitializationComplete(); + mActivityTestRule.waitForActivityNativeInitializationComplete(); + mPage = mActivityTestRule.startOnBlankPage(); waitForFindInPageVisibility(false); } @@ -76,7 +75,7 @@ public void tearDown() { ThreadUtils.runOnUiThreadBlocking( () -> { - sActivityTestRule + mActivityTestRule .getActivity() .getTabModelSelector() .getModel(true) @@ -90,7 +89,7 @@ /** Returns the FindResults text. */ private String waitForFindResults(String expectedResult) { final TextView findResults = - (TextView) sActivityTestRule.getActivity().findViewById(R.id.find_status); + (TextView) mActivityTestRule.getActivity().findViewById(R.id.find_status); Assert.assertNotNull(expectedResult); Assert.assertNotNull(findResults); CriteriaHelper.pollUiThread( @@ -101,11 +100,11 @@ /** Find in page by invoking the 'find in page' menu item. */ private void findInPageFromMenu() { CriteriaHelper.pollUiThread( - sActivityTestRule.getActivity().findViewById(R.id.menu_button_wrapper)::isShown); + mActivityTestRule.getActivity().findViewById(R.id.menu_button_wrapper)::isShown); MenuUtils.invokeCustomMenuActionSync( InstrumentationRegistry.getInstrumentation(), - sActivityTestRule.getActivity(), + mActivityTestRule.getActivity(), R.id.find_in_page_id); waitForFindInPageVisibility(true); @@ -116,7 +115,7 @@ () -> { FindToolbar findToolbar = (FindToolbar) - sActivityTestRule.getActivity().findViewById(R.id.find_toolbar); + mActivityTestRule.getActivity().findViewById(R.id.find_toolbar); if (visible) { Criteria.checkThat(findToolbar, Matchers.notNullValue()); Criteria.checkThat(findToolbar.isShown(), Matchers.is(true)); @@ -150,7 +149,7 @@ } private void loadTestAndVerifyFindInPage(String query, String expectedResult) { - sActivityTestRule.loadUrl(sActivityTestRule.getTestServer().getURL(FILEPATH)); + mActivityTestRule.loadUrl(mActivityTestRule.getTestServer().getURL(FILEPATH)); String findResults = findStringInPage(query, expectedResult); Assert.assertTrue( "Expected: " @@ -158,20 +157,20 @@ + " Got: " + findResults + " for: " - + sActivityTestRule.getTestServer().getURL(FILEPATH), + + mActivityTestRule.getTestServer().getURL(FILEPATH), findResults.contains(expectedResult)); } private FindToolbar getFindToolbar() { final FindToolbar findToolbar = - (FindToolbar) sActivityTestRule.getActivity().findViewById(R.id.find_toolbar); + (FindToolbar) mActivityTestRule.getActivity().findViewById(R.id.find_toolbar); Assert.assertNotNull("FindToolbar not found", findToolbar); return findToolbar; } private EditText getFindQueryText() { final EditText findQueryText = - (EditText) sActivityTestRule.getActivity().findViewById(R.id.find_query); + (EditText) mActivityTestRule.getActivity().findViewById(R.id.find_query); Assert.assertNotNull("FindQueryText not found", findQueryText); return findQueryText; } @@ -226,11 +225,11 @@ loadTestAndVerifyFindInPage(query, "1/7"); // TODO(jaydeepmehta): Verify number of results and match against boxes drawn. TouchCommon.singleClickView( - sActivityTestRule.getActivity().findViewById(R.id.find_next_button)); + mActivityTestRule.getActivity().findViewById(R.id.find_next_button)); waitForFindResults("2/7"); for (int i = 2; i <= 7; i++) { TouchCommon.singleClickView( - sActivityTestRule.getActivity().findViewById(R.id.find_next_button)); + mActivityTestRule.getActivity().findViewById(R.id.find_next_button)); } waitForFindResults("1/7"); } @@ -244,10 +243,10 @@ loadTestAndVerifyFindInPage(query, "1/7"); // TODO(jaydeepmehta): Verify number of results and match against boxes drawn. TouchCommon.singleClickView( - sActivityTestRule.getActivity().findViewById(R.id.find_next_button)); + mActivityTestRule.getActivity().findViewById(R.id.find_next_button)); waitForFindResults("2/7"); TouchCommon.singleClickView( - sActivityTestRule.getActivity().findViewById(R.id.find_prev_button)); + mActivityTestRule.getActivity().findViewById(R.id.find_prev_button)); waitForFindResults("1/7"); } @@ -258,13 +257,13 @@ public void testFullscreen() { loadTestAndVerifyFindInPage("pitts", "1/7"); - Tab tab = sActivityTestRule.getActivity().getActivityTab(); + Tab tab = mActivityTestRule.getActivity().getActivityTab(); FullscreenTestUtils.togglePersistentFullscreenAndAssert( - tab, true, sActivityTestRule.getActivity()); + tab, true, mActivityTestRule.getActivity()); waitForFindInPageVisibility(false); FullscreenTestUtils.togglePersistentFullscreenAndAssert( - tab, false, sActivityTestRule.getActivity()); + tab, false, mActivityTestRule.getActivity()); waitForFindInPageVisibility(false); } @@ -272,7 +271,7 @@ @MediumTest @Feature({"FindInPage"}) public void testResultsBarInitiallyVisible() { - sActivityTestRule.loadUrl(sActivityTestRule.getTestServer().getURL(FILEPATH)); + mActivityTestRule.loadUrl(mActivityTestRule.getTestServer().getURL(FILEPATH)); findInPageFromMenu(); final FindToolbar findToolbar = getFindToolbar(); final View resultBar = findToolbar.getFindResultBar(); @@ -284,7 +283,7 @@ @MediumTest @Feature({"FindInPage"}) public void testResultsBarVisibleAfterTypingText() { - sActivityTestRule.loadUrl(sActivityTestRule.getTestServer().getURL(FILEPATH)); + mActivityTestRule.loadUrl(mActivityTestRule.getTestServer().getURL(FILEPATH)); findInPageFromMenu(); final FindToolbar findToolbar = getFindToolbar(); final View resultBar = findToolbar.getFindResultBar(); @@ -306,7 +305,7 @@ @MediumTest @Feature({"FindInPage"}) public void testFindDismissOnEmptyString() { - sActivityTestRule.loadUrl(sActivityTestRule.getTestServer().getURL(FILEPATH)); + mActivityTestRule.loadUrl(mActivityTestRule.getTestServer().getURL(FILEPATH)); findInPageFromMenu(); final FindToolbar findToolbar = getFindToolbar(); @@ -332,7 +331,7 @@ @SmallTest @Feature({"FindInPage"}) public void testFindDismissOnEscape() { - sActivityTestRule.loadUrl(sActivityTestRule.getTestServer().getURL(FILEPATH)); + mActivityTestRule.loadUrl(mActivityTestRule.getTestServer().getURL(FILEPATH)); findInPageFromMenu(); final FindToolbar findToolbar = getFindToolbar(); @@ -354,7 +353,7 @@ @SmallTest @Feature({"FindInPage"}) public void testFindDismissOnEscapeWithModifiers() { - sActivityTestRule.loadUrl(sActivityTestRule.getTestServer().getURL(FILEPATH)); + mActivityTestRule.loadUrl(mActivityTestRule.getTestServer().getURL(FILEPATH)); findInPageFromMenu(); final FindToolbar findToolbar = getFindToolbar(); @@ -378,14 +377,14 @@ @Feature({"FindInPage"}) public void testFindNextPreviousIncognitoTab() { String query = "pitts"; - sActivityTestRule.newIncognitoTabFromMenu(); + mActivityTestRule.newIncognitoTabFromMenu(); loadTestAndVerifyFindInPage(query, "1/7"); // TODO(jaydeepmehta): Verify number of results and match against boxes drawn. TouchCommon.singleClickView( - sActivityTestRule.getActivity().findViewById(R.id.find_next_button)); + mActivityTestRule.getActivity().findViewById(R.id.find_next_button)); waitForFindResults("2/7"); TouchCommon.singleClickView( - sActivityTestRule.getActivity().findViewById(R.id.find_prev_button)); + mActivityTestRule.getActivity().findViewById(R.id.find_prev_button)); waitForFindResults("1/7"); } @@ -394,10 +393,10 @@ @MediumTest @Feature({"FindInPage"}) public void testFipTextNotRestoredIncognitoTab() throws InterruptedException { - sActivityTestRule.newIncognitoTabFromMenu(); + mActivityTestRule.newIncognitoTabFromMenu(); loadTestAndVerifyFindInPage("pitts", "1/7"); // close the fip - final View v = sActivityTestRule.getActivity().findViewById(R.id.close_find_button); + final View v = mActivityTestRule.getActivity().findViewById(R.id.close_find_button); TouchCommon.singleClickView(v); waitForFindInPageVisibility(false); @@ -415,7 +414,7 @@ @SmallTest @Feature({"FindInPage"}) public void testPastedTextStylingRemoved() throws Throwable { - sActivityTestRule.loadUrl(sActivityTestRule.getTestServer().getURL(FILEPATH)); + mActivityTestRule.loadUrl(mActivityTestRule.getTestServer().getURL(FILEPATH)); findInPageFromMenu(); final FindToolbar findToolbar = getFindToolbar(); @@ -457,7 +456,7 @@ @MediumTest @Feature({"FindInPage"}) public void testBackKeyDoesNotDismissFindWhenImeIsPresent() { - sActivityTestRule.loadUrl(sActivityTestRule.getTestServer().getURL(FILEPATH)); + mActivityTestRule.loadUrl(mActivityTestRule.getTestServer().getURL(FILEPATH)); findInPageFromMenu(); final TextView findQueryText = getFindQueryText(); KeyUtils.singleKeyEventView( @@ -484,7 +483,7 @@ waitForIME(true); // Hide IME by clicking next button from find tool bar. TouchCommon.singleClickView( - sActivityTestRule.getActivity().findViewById(R.id.find_next_button)); + mActivityTestRule.getActivity().findViewById(R.id.find_next_button)); waitForIME(false); Espresso.pressBack(); waitForFindInPageVisibility(false); @@ -495,10 +494,10 @@ CriteriaHelper.pollUiThread( () -> { Criteria.checkThat( - sActivityTestRule + mActivityTestRule .getKeyboardDelegate() .isKeyboardShowing( - sActivityTestRule.getActivity(), getFindQueryText()), + mActivityTestRule.getActivity(), getFindQueryText()), Matchers.is(imePresent)); }); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/homepage/HomepagePolicyIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/homepage/HomepagePolicyIntegrationTest.java index 2bf219e..bebb342c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/homepage/HomepagePolicyIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/homepage/HomepagePolicyIntegrationTest.java
@@ -4,22 +4,20 @@ package org.chromium.chrome.browser.homepage; +import static org.junit.Assert.assertEquals; + import android.content.Intent; import android.view.View; import androidx.test.filters.MediumTest; -import androidx.test.platform.app.InstrumentationRegistry; import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; -import org.junit.rules.RuleChain; import org.junit.runner.RunWith; -import org.chromium.base.ActivityState; -import org.chromium.base.ApplicationStatus; import org.chromium.base.ThreadUtils; import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.test.util.CommandLineFlags; @@ -34,12 +32,14 @@ import org.chromium.chrome.browser.homepage.settings.HomepageSettings; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; -import org.chromium.chrome.browser.settings.SettingsActivityTestRule; import org.chromium.chrome.browser.tabmodel.TabClosureParams; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.toolbar.ToolbarManager; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.ntp.RegularNewTabPageStation; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.chrome.test.util.browser.TabLoadObserver; import org.chromium.components.policy.test.annotations.Policies; @@ -64,17 +64,12 @@ private EmbeddedTestServer mTestServer; - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); - public SettingsActivityTestRule<HomepageSettings> mSettingsActivityTestRule = - new SettingsActivityTestRule<>(HomepageSettings.class); - - // SettingsActivity has to be finished before the outer CTA can be finished or trying to finish - // CTA won't work. @Rule - public final RuleChain mRuleChain = - RuleChain.outerRule(mActivityTestRule).around(mSettingsActivityTestRule); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public HomepageTestRule mHomepageTestRule = new HomepageTestRule(); + private RegularNewTabPageStation mPage; @Before public void setUp() { @@ -82,11 +77,9 @@ // Use shared preference manager, not to change the order object created in tests. mHomepageTestRule.useCustomizedHomepageForTest(GOOGLE_HTML); - mActivityTestRule.startMainActivityFromLauncher(); + mPage = mActivityTestRule.startFromLauncherAtNtp(); - mTestServer = - EmbeddedTestServer.createAndStartServer( - InstrumentationRegistry.getInstrumentation().getContext()); + mTestServer = mActivityTestRule.getTestServer(); } @Test @@ -106,26 +99,58 @@ ChromeSharedPreferences.getInstance() .readString(ChromePreferenceKeys.HOMEPAGE_LOCATION_POLICY_GURL, ""); GURL homepageGurl = GURL.deserialize(homepageGurlSerialized); - Assert.assertEquals( + assertEquals( "URL stored in shared preference should be the same as policy setting", TEST_URL, homepageGurl.getSpec()); // METRICS_HOMEPAGE_LOCATION_TYPE is recorded once in deferred start up tasks. - Assert.assertEquals( + assertEquals( "Settings.Homepage.LocationType should record POLICY_OTHER once.", 1, RecordHistogram.getHistogramValueCountForTesting( METRICS_HOMEPAGE_LOCATION_TYPE, HomepageLocationType.POLICY_OTHER)); // Start the page again. This time, the homepage should be set to what policy is. - destroyAndRestartActivity(); + ChromeTabbedActivity activity = mActivityTestRule.getActivity(); - Assert.assertEquals( + // Create an intent to launch a new ChromeTabbedActivity. + Intent intent = new Intent(); + intent.setClass(activity, ChromeTabbedActivity.class); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + + // Close all tabs so the new activity will create another initial tab with current homepage. + ThreadUtils.runOnUiThreadBlocking( + () -> { + TabClosureParams params = + TabClosureParams.closeAllTabs().uponExit(false).build(); + TabModelSelector selector = activity.getTabModelSelector(); + selector.getModel(false) + .getTabRemover() + .closeTabs(params, /* allowDialog= */ false); + selector.getModel(true) + .getTabRemover() + .closeTabs(params, /* allowDialog= */ false); + }); + + mActivityTestRule.finishActivity(); + + // Start a new ChromeActivity. + WebPageStation pageAfterRecreate = + mActivityTestRule + .startWithIntentTo(intent) + .arriveAt( + WebPageStation.newBuilder() + .withEntryPoint() + .withExpectedUrlSubstring(TEST_URL) + .build()); + + String urlAfterRecreate = ChromeTabUtils.getUrlStringOnUiThread(pageAfterRecreate.getTab()); + assertEquals("Start up page is not homepage", getHomepageUrlOnUiThread(), urlAfterRecreate); + assertEquals( "Start up homepage should be the same as the policy setting", TEST_URL, - ChromeTabUtils.getUrlStringOnUiThread( - mActivityTestRule.getActivity().getActivityTab())); + urlAfterRecreate); } @DisabledTest(message = "crbug.com/415374799") @@ -173,52 +198,13 @@ TouchCommon.singleClickView(homeButton); }); - Assert.assertEquals( + assertEquals( "After clicking HomeButton, URL should be back to Homepage", TEST_URL, ChromeTabUtils.getUrlStringOnUiThread( mActivityTestRule.getActivity().getActivityTab())); } - private void destroyAndRestartActivity() { - ChromeTabbedActivity activity = mActivityTestRule.getActivity(); - - // Create an intent to launch a new ChromeTabbedActivity. - Intent intent = new Intent(); - intent.setClass(activity, ChromeTabbedActivity.class); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - - // Close all tabs so the new activity will create another initial tab with current homepage. - ThreadUtils.runOnUiThreadBlocking( - () -> { - TabClosureParams params = - TabClosureParams.closeAllTabs().uponExit(false).build(); - TabModelSelector selector = activity.getTabModelSelector(); - selector.getModel(false) - .getTabRemover() - .closeTabs(params, /* allowDialog= */ false); - selector.getModel(true) - .getTabRemover() - .closeTabs(params, /* allowDialog= */ false); - }); - - activity.finish(); - CriteriaHelper.pollUiThread( - () -> { - Criteria.checkThat( - ApplicationStatus.getStateForActivity(activity), - Matchers.is(ActivityState.DESTROYED)); - }); - - // Start a new ChromeActivity. - mActivityTestRule.startActivityCompletely(intent); - Assert.assertEquals( - "Start up page is not homepage", - getHomepageUrlOnUiThread(), - ChromeTabUtils.getUrlStringOnUiThread( - mActivityTestRule.getActivity().getActivityTab())); - } - private String getHomepageUrlOnUiThread() { return ThreadUtils.runOnUiThreadBlocking( () -> HomepageManager.getInstance().getHomepageGurl().getSpec());
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/identity_disc/IdentityDiscControllerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/identity_disc/IdentityDiscControllerTest.java index 57fd447..6791481 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/identity_disc/IdentityDiscControllerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/identity_disc/IdentityDiscControllerTest.java
@@ -72,14 +72,15 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.toolbar.optional_button.ButtonDataProvider; import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.ntp.RegularNewTabPageStation; import org.chromium.chrome.test.util.ActivityTestUtils; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.chrome.test.util.NewTabPageTestUtils; import org.chromium.chrome.test.util.browser.signin.SigninTestRule; -import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.components.feature_engagement.Tracker; import org.chromium.components.prefs.PrefService; import org.chromium.components.signin.base.AccountInfo; @@ -104,8 +105,8 @@ private static final String NAME = "Email Emailson"; private static final String FULL_NAME = NAME + ".full"; - private final ChromeTabbedActivityTestRule mActivityTestRule = - new ChromeTabbedActivityTestRule(); + private final FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private final SigninTestRule mSigninTestRule = new SigninTestRule(); @@ -124,6 +125,7 @@ .setBugComponent(ChromeRenderTestRule.Component.SERVICES_SIGN_IN) .build(); + private RegularNewTabPageStation mPage; private Tab mTab; @Mock private IdentityServicesProvider mIdentityServicesProviderMock; @@ -152,8 +154,8 @@ @Before public void setUp() { - mActivityTestRule.startMainActivityWithURL(UrlConstants.NTP_URL); - mTab = mActivityTestRule.getActivity().getActivityTab(); + mPage = mActivityTestRule.startOnNtp(); + mTab = mPage.getTab(); NewTabPageTestUtils.waitForNtpLoaded(mTab); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java index 642bef6..3239ea0 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarContainerTest.java
@@ -18,7 +18,6 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -43,9 +42,10 @@ import org.chromium.chrome.browser.tabmodel.TabClosureParams; import org.chromium.chrome.browser.ui.messages.infobar.SimpleConfirmInfoBarBuilder; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; -import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; +import org.chromium.chrome.test.transit.AutoResetCtaTransitTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.InfoBarTestAnimationListener; import org.chromium.chrome.test.util.InfoBarUtil; import org.chromium.components.infobars.InfoBar; @@ -61,18 +61,15 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @Batch(Batch.PER_CLASS) public class InfoBarContainerTest { - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public BlankCTATabInitialStateRule mInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, true); + public AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.autoResetCtaActivityRule(); // URL takes longer to load for batch tests where the activity is reused across rests private static final long EXTENDED_LOAD_TIMEOUT = 10L; private static final String MESSAGE_TEXT = "Ding dong. Woof. Translate french? Bears!"; - private static final EmbeddedTestServer sTestServer = sActivityTestRule.getTestServer(); + private EmbeddedTestServer mTestServer; + private WebPageStation mPage; private static final class TestListener implements SimpleConfirmInfoBarBuilder.Listener { public final CallbackHelper dismissedCallback = new CallbackHelper(); @@ -104,8 +101,12 @@ @Before public void setUp() throws Exception { + mPage = mActivityTestRule.startOnBlankPage(); + + mTestServer = mActivityTestRule.getTestServer(); + // Register for animation notifications - InfoBarContainer container = sActivityTestRule.getInfoBarContainer(); + InfoBarContainer container = mActivityTestRule.getInfoBarContainer(); mListener = new InfoBarTestAnimationListener(); ThreadUtils.runOnUiThreadBlocking(() -> container.addAnimationListener(mListener)); } @@ -113,20 +114,20 @@ @After public void tearDown() { // Unregister animation notifications - InfoBarContainer container = sActivityTestRule.getInfoBarContainer(); + InfoBarContainer container = mActivityTestRule.getInfoBarContainer(); if (container != null) { ThreadUtils.runOnUiThreadBlocking( () -> { container.removeAnimationListener(mListener); InfoBarContainer.removeInfoBarContainerForTesting( - sActivityTestRule.getActivity().getActivityTab()); + mActivityTestRule.getActivity().getActivityTab()); }); } } // Adds an infobar to the currrent tab. Blocks until the infobar has been added. private TestListener addInfoBarToCurrentTab(final boolean expires) throws TimeoutException { - List<InfoBar> infoBars = sActivityTestRule.getInfoBars(); + List<InfoBar> infoBars = mActivityTestRule.getInfoBars(); int previousCount = infoBars.size(); final TestListener testListener = new TestListener(); @@ -134,7 +135,7 @@ TaskTraits.UI_DEFAULT, () -> { SimpleConfirmInfoBarBuilder.create( - sActivityTestRule.getActivity().getActivityTab().getWebContents(), + mActivityTestRule.getActivity().getActivityTab().getWebContents(), testListener, InfoBarIdentifier.TEST_INFOBAR, null, @@ -186,10 +187,10 @@ TestListener infobarListener = addInfoBarToCurrentTab(true); // Now navigate, it should expire. - sActivityTestRule.loadUrl( - sTestServer.getURL("/chrome/test/data/android/google.html"), EXTENDED_LOAD_TIMEOUT); + mActivityTestRule.loadUrl( + mTestServer.getURL("/chrome/test/data/android/google.html"), EXTENDED_LOAD_TIMEOUT); mListener.removeInfoBarAnimationFinished("InfoBar not removed."); - Assert.assertTrue(sActivityTestRule.getInfoBars().isEmpty()); + Assert.assertTrue(mActivityTestRule.getInfoBars().isEmpty()); Assert.assertEquals(0, infobarListener.dismissedCallback.getCallCount()); Assert.assertEquals(0, infobarListener.primaryButtonCallback.getCallCount()); Assert.assertEquals(0, infobarListener.secondaryButtonCallback.getCallCount()); @@ -198,8 +199,8 @@ TestListener persistentListener = addInfoBarToCurrentTab(false); // Navigate, it should still be there. - sActivityTestRule.loadUrl(sTestServer.getURL("/chrome/test/data/android/about.html")); - List<InfoBar> infoBars = sActivityTestRule.getInfoBars(); + mActivityTestRule.loadUrl(mTestServer.getURL("/chrome/test/data/android/about.html")); + List<InfoBar> infoBars = mActivityTestRule.getInfoBars(); Assert.assertEquals(1, infoBars.size()); TextView message = (TextView) infoBars.get(0).getView().findViewById(R.id.infobar_message); Assert.assertEquals(MESSAGE_TEXT, message.getText().toString()); @@ -258,10 +259,10 @@ @DisableIf.Device(DeviceFormFactor.ONLY_TABLET) // crbug.com/387250786 public void testQuickAddOneAndDismiss() throws Exception { final TestListener infobarListener = addInfoBarToCurrentTab(false); - Assert.assertEquals(1, sActivityTestRule.getInfoBars().size()); - final InfoBar infoBar = sActivityTestRule.getInfoBars().get(0); + Assert.assertEquals(1, mActivityTestRule.getInfoBars().size()); + final InfoBar infoBar = mActivityTestRule.getInfoBars().get(0); dismissInfoBar(infoBar, infobarListener); - Assert.assertTrue(sActivityTestRule.getInfoBars().isEmpty()); + Assert.assertTrue(mActivityTestRule.getInfoBars().isEmpty()); } /** @@ -272,23 +273,23 @@ @MediumTest @Feature({"Browser"}) public void testCloseTabOnAdd() throws Exception { - sActivityTestRule.loadUrl(sTestServer.getURL("/chrome/test/data/android/google.html")); + mActivityTestRule.loadUrl(mTestServer.getURL("/chrome/test/data/android/google.html")); final TestListener infobarListener = addInfoBarToCurrentTab(false); - Assert.assertEquals(1, sActivityTestRule.getInfoBars().size()); - final InfoBar infoBar = sActivityTestRule.getInfoBars().get(0); + Assert.assertEquals(1, mActivityTestRule.getInfoBars().size()); + final InfoBar infoBar = mActivityTestRule.getInfoBars().get(0); ThreadUtils.runOnUiThreadBlocking( () -> { Assert.assertEquals(0, infobarListener.dismissedCallback.getCallCount()); infoBar.onCloseButtonClicked(); - sActivityTestRule + mActivityTestRule .getActivity() .getCurrentTabModel() .getTabRemover() .closeTabs( TabClosureParams.closeTab( - sActivityTestRule + mActivityTestRule .getActivity() .getActivityTab()) .allowUndo(false) @@ -310,15 +311,15 @@ @Feature({"Browser"}) @DisableIf.Device(DeviceFormFactor.ONLY_TABLET) // https://crbug.com/40300011 public void testCloseButton() throws Exception { - sActivityTestRule.loadUrl( - sTestServer.getURL("/chrome/test/data/android/click_listener.html")); + mActivityTestRule.loadUrl( + mTestServer.getURL("/chrome/test/data/android/click_listener.html")); TestListener infobarListener = addInfoBarToCurrentTab(false); // Now press the close button. Assert.assertEquals(0, infobarListener.dismissedCallback.getCallCount()); Assert.assertTrue( "Close button wasn't found", - InfoBarUtil.clickCloseButton(sActivityTestRule.getInfoBars().get(0))); + InfoBarUtil.clickCloseButton(mActivityTestRule.getInfoBars().get(0))); mListener.removeInfoBarAnimationFinished("Infobar not removed."); infobarListener.dismissedCallback.waitForCallback(0, 1); Assert.assertEquals(0, infobarListener.primaryButtonCallback.getCallCount()); @@ -328,7 +329,7 @@ Assert.assertTrue( "The page recieved the click.", !Boolean.parseBoolean( - sActivityTestRule.runJavaScriptCodeInCurrentTab("wasClicked"))); + mActivityTestRule.runJavaScriptCodeInCurrentTab("wasClicked"))); } /** @@ -342,8 +343,8 @@ @DisableFeatures(ChromeFeatureList.FLOATING_SNACKBAR) public void testAddAndDismissSurfaceFlingerOverlays() throws Exception { final ViewGroup decorView = - (ViewGroup) sActivityTestRule.getActivity().getWindow().getDecorView(); - final InfoBarContainer infoBarContainer = sActivityTestRule.getInfoBarContainer(); + (ViewGroup) mActivityTestRule.getActivity().getWindow().getDecorView(); + final InfoBarContainer infoBarContainer = mActivityTestRule.getInfoBarContainer(); final InfoBarContainerView infoBarContainerView = infoBarContainer.getContainerViewForTesting(); @@ -370,8 +371,8 @@ // First add an infobar. TestListener infobarListener = addInfoBarToCurrentTab(false); - Assert.assertEquals(1, sActivityTestRule.getInfoBars().size()); - final InfoBar infoBar = sActivityTestRule.getInfoBars().get(0); + Assert.assertEquals(1, mActivityTestRule.getInfoBars().size()); + final InfoBar infoBar = mActivityTestRule.getInfoBars().get(0); // A layout must occur to recalculate the transparent region. CriteriaHelper.pollUiThread( @@ -450,11 +451,11 @@ @Feature({"Browser"}) public void testSyncWithBrowserControl() throws Exception { addInfoBarToCurrentTab(false); - Assert.assertEquals(1, sActivityTestRule.getInfoBars().size()); - final InfoBar infoBar = sActivityTestRule.getInfoBars().get(0); + Assert.assertEquals(1, mActivityTestRule.getInfoBars().size()); + final InfoBar infoBar = mActivityTestRule.getInfoBars().get(0); Assert.assertEquals(0, infoBar.getView().getTranslationY(), /* delta= */ 0.1); - InfoBarContainer infoBarContainer = sActivityTestRule.getInfoBarContainer(); + InfoBarContainer infoBarContainer = mActivityTestRule.getInfoBarContainer(); ThreadUtils.runOnUiThreadBlocking( () -> { infoBarContainer
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/input/InputOnVizTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/input/InputOnVizTest.java index 5f805a1..1be25f2 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/input/InputOnVizTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/input/InputOnVizTest.java
@@ -29,8 +29,10 @@ import org.chromium.base.test.util.UserActionTester; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.pagecontroller.utils.UiAutomatorUtils; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.browser.TabLoadObserver; import org.chromium.content_public.browser.GestureListenerManager; import org.chromium.content_public.browser.GestureStateListener; @@ -43,11 +45,12 @@ @EnableFeatures({"InputOnViz"}) @MinAndroidSdkLevel(Build.VERSION_CODES.VANILLA_ICE_CREAM) public class InputOnVizTest { - private final String mLongHtmlTestPage = + private final String mLongHtmlTestPageUri = UrlUtils.encodeHtmlDataUri("<html><body style='height:100000px;'></body></html>"); @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private GestureStateListener mGestureListener; private View.OnTouchListener mViewOnTouchListener; @@ -56,10 +59,11 @@ public int mScrollOffsetY; private boolean mScrolling; + private WebPageStation mPage; @Before public void setUp() { - mActivityTestRule.startMainActivityWithURL(mLongHtmlTestPage); + mPage = mActivityTestRule.startOnUrl(mLongHtmlTestPageUri); mGestureListener = new GestureStateListener() { @Override @@ -137,7 +141,7 @@ public void handlesOverscrollsWithInputVizard() throws Exception { TabLoadObserver observer = new TabLoadObserver(mActivityTestRule.getActivity().getActivityTab()); - observer.fullyLoadUrl(mLongHtmlTestPage); + observer.fullyLoadUrl(mLongHtmlTestPageUri); UserActionTester userActionTester = new UserActionTester(); HistogramWatcher histograms =
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java index 596b36c..a4fe46c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/input/SelectPopupOtherContentViewTest.java
@@ -23,7 +23,9 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.components.embedder_support.view.ContentView; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.test.util.DOMUtils; @@ -35,7 +37,8 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class SelectPopupOtherContentViewTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private static final String SELECT_URL = UrlUtils.encodeHtmlDataUri( @@ -69,10 +72,10 @@ @DisabledTest(message = "Flaky, crbug.com/407059641") public void testPopupNotClosedByOtherContentView() throws Exception, Throwable { // Load the test page. - mActivityTestRule.startMainActivityWithURL(SELECT_URL); + WebPageStation page = mActivityTestRule.startOnUrl(SELECT_URL); // Once clicked, the popup should show up. - DOMUtils.clickNode(mActivityTestRule.getWebContents(), "select"); + DOMUtils.clickNode(page.webContentsElement.get(), "select"); CriteriaHelper.pollInstrumentationThread( this::isSelectPopupVisibleOnUiThread, "The select popup did not show up on click.");
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/interstitials/LookalikeInterstitialTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/interstitials/LookalikeInterstitialTest.java index ab5941f1..4b00731a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/interstitials/LookalikeInterstitialTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/interstitials/LookalikeInterstitialTest.java
@@ -4,7 +4,6 @@ package org.chromium.chrome.browser.interstitials; -import androidx.test.core.app.ApplicationProvider; import androidx.test.filters.MediumTest; import org.junit.Assert; @@ -21,7 +20,9 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.ntp.RegularNewTabPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.chrome.test.util.browser.TabTitleObserver; import org.chromium.content_public.common.ContentSwitches; @@ -46,20 +47,21 @@ private EmbeddedTestServer mServer; @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); + + private RegularNewTabPageStation mPage; @Before public void setUp() { - mActivityTestRule.startMainActivityFromLauncher(); - mServer = - EmbeddedTestServer.createAndStartServer( - ApplicationProvider.getApplicationContext()); + mPage = mActivityTestRule.startFromLauncherAtNtp(); + mServer = mActivityTestRule.getTestServer(); } @Test @Ignore("crbug/941488") public void testBasicInterstitialShown() throws Exception { - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mPage.getTab(); ChromeTabUtils.loadUrlOnUiThread( tab, mServer.getURLWithHostName(
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 ee85b63..d397365f 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
@@ -18,7 +18,6 @@ import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -36,9 +35,10 @@ import org.chromium.chrome.browser.tabmodel.TabClosureParams; import org.chromium.chrome.browser.tasks.tab_management.TabUiTestHelper; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; -import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; +import org.chromium.chrome.test.transit.AutoResetCtaTransitTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.components.javascript_dialogs.JavascriptAppModalDialog; import org.chromium.content_public.browser.GestureStateListener; import org.chromium.content_public.browser.test.util.TestCallbackHelperContainer; @@ -56,13 +56,9 @@ public class JavascriptAppModalDialogTest { public static final String JAVASCRIPT_DIALOG_BATCH_NAME = "javascript_dialog"; - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public BlankCTATabInitialStateRule mBlankCTATabInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, true); + public AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.autoResetCtaActivityRule(); private static final String EMPTY_PAGE = UrlUtils.encodeHtmlDataUri( @@ -73,10 +69,11 @@ + "<head><script>window.onbeforeunload=function() {" + "return 'Are you sure?';" + "};</script></head></html>"); + private WebPageStation mPage; @Before public void setUp() { - sActivityTestRule.loadUrl(EMPTY_PAGE); + mPage = mActivityTestRule.startOnWebPage(EMPTY_PAGE); } /** Verifies beforeunload dialogs are shown and they block/allow navigation as appropriate. */ @@ -84,7 +81,7 @@ @MediumTest @Feature({"Browser", "Main"}) public void testBeforeUnloadDialog() throws TimeoutException, ExecutionException { - sActivityTestRule.loadUrl(BEFORE_UNLOAD_URL); + mActivityTestRule.loadUrl(BEFORE_UNLOAD_URL); // JavaScript onbeforeunload dialogs require a user gesture. tapViewAndWait(); executeJavaScriptAndWaitForDialog("history.back();"); @@ -96,7 +93,7 @@ Assert.assertEquals( BEFORE_UNLOAD_URL, - sActivityTestRule + mActivityTestRule .getActivity() .getCurrentWebContents() .getLastCommittedUrl() @@ -114,7 +111,7 @@ onPageLoaded.waitForCallback(callCount); Assert.assertEquals( EMPTY_PAGE, - sActivityTestRule + mActivityTestRule .getActivity() .getCurrentWebContents() .getLastCommittedUrl() @@ -132,9 +129,9 @@ @DisabledTest(message = "https://crbug.com/1237639") @Feature({"Browser", "Main"}) public void testBeforeUnloadDialogWithNoHistory() throws TimeoutException, ExecutionException { - ChromeTabbedActivity activity = sActivityTestRule.getActivity(); + ChromeTabbedActivity activity = mActivityTestRule.getActivity(); TabUiTestHelper.verifyTabModelTabCount(activity, 1, 0); - sActivityTestRule.loadUrlInNewTab(BEFORE_UNLOAD_URL); + mActivityTestRule.loadUrlInNewTab(BEFORE_UNLOAD_URL); TabUiTestHelper.verifyTabModelTabCount(activity, 2, 0); // JavaScript onbeforeunload dialogs require a user gesture. tapViewAndWait(); @@ -159,7 +156,7 @@ @MediumTest @Feature({"Browser", "Main"}) public void testBeforeUnloadOnReloadDialog() throws TimeoutException, ExecutionException { - sActivityTestRule.loadUrl(BEFORE_UNLOAD_URL); + mActivityTestRule.loadUrl(BEFORE_UNLOAD_URL); // JavaScript onbeforeunload dialogs require a user gesture. tapViewAndWait(); executeJavaScriptAndWaitForDialog("window.location.reload();"); @@ -181,7 +178,7 @@ @Feature({"Browser", "Main"}) @DisabledTest(message = "https://crbug.com/1299944") public void testDisableRepeatedDialogs() throws TimeoutException, ExecutionException { - sActivityTestRule.loadUrl(BEFORE_UNLOAD_URL); + mActivityTestRule.loadUrl(BEFORE_UNLOAD_URL); // JavaScript onbeforeunload dialogs require a user gesture. tapViewAndWait(); executeJavaScriptAndWaitForDialog("history.back();"); @@ -192,7 +189,7 @@ onViewWaiting(withText(R.string.cancel)).perform(click()); Assert.assertEquals( BEFORE_UNLOAD_URL, - sActivityTestRule + mActivityTestRule .getActivity() .getCurrentWebContents() .getLastCommittedUrl() @@ -210,7 +207,7 @@ onViewWaiting(withText(R.string.cancel)).perform(click()); Assert.assertEquals( BEFORE_UNLOAD_URL, - sActivityTestRule + mActivityTestRule .getActivity() .getCurrentWebContents() .getLastCommittedUrl() @@ -218,7 +215,7 @@ // Try showing a dialog again and verify it is not shown. resultHelper.evaluateJavaScriptForTests( - sActivityTestRule.getWebContents(), "history.back();"); + mActivityTestRule.getWebContents(), "history.back();"); jsDialog = getCurrentDialog(); Assert.assertNull("Dialog should not be showing.", jsDialog); } @@ -231,14 +228,14 @@ @MediumTest @Feature({"Browser", "Main"}) public void testDialogDismissedAfterClosingTab() throws TimeoutException { - sActivityTestRule.loadUrl(BEFORE_UNLOAD_URL); + mActivityTestRule.loadUrl(BEFORE_UNLOAD_URL); // JavaScript onbeforeunload dialogs require a user gesture. tapViewAndWait(); executeJavaScriptAndWaitForDialog("history.back();"); ThreadUtils.runOnUiThreadBlocking( () -> { - ChromeTabbedActivity activity = sActivityTestRule.getActivity(); + ChromeTabbedActivity activity = mActivityTestRule.getActivity(); activity.getCurrentTabModel() .getTabRemover() .closeTabs( @@ -258,10 +255,10 @@ int callCount = tapGestureStateListener.getCallCount(); ThreadUtils.runOnUiThreadBlocking( () -> { - WebContentsUtils.getGestureListenerManager(sActivityTestRule.getWebContents()) + WebContentsUtils.getGestureListenerManager(mActivityTestRule.getWebContents()) .addListener(tapGestureStateListener); }); - TouchCommon.singleClickView(sActivityTestRule.getActivity().getActivityTab().getView()); + TouchCommon.singleClickView(mActivityTestRule.getActivity().getActivityTab().getView()); tapGestureStateListener.waitForTap(callCount); } @@ -280,7 +277,7 @@ private OnEvaluateJavaScriptResultHelper executeJavaScriptAndWaitForDialog( final OnEvaluateJavaScriptResultHelper helper, String script) { helper.evaluateJavaScriptForTests( - sActivityTestRule.getActivity().getCurrentWebContents(), script); + mActivityTestRule.getActivity().getCurrentWebContents(), script); assertJavascriptAppModalDialogShownState(true); return helper; } @@ -329,6 +326,6 @@ } private TestCallbackHelperContainer getActiveTabTestCallbackHelperContainer() { - return new TestCallbackHelperContainer(sActivityTestRule.getWebContents()); + return new TestCallbackHelperContainer(mActivityTestRule.getWebContents()); } }
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 8c750a5..6f8d28410 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
@@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -44,9 +43,10 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.tabmodel.TabClosureParams; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; -import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; +import org.chromium.chrome.test.transit.AutoResetCtaTransitTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.components.javascript_dialogs.JavascriptTabModalDialog; import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.content_public.browser.test.util.TestCallbackHelperContainer.OnEvaluateJavaScriptResultHelper; @@ -63,13 +63,9 @@ @Batch(JavascriptAppModalDialogTest.JAVASCRIPT_DIALOG_BATCH_NAME) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class JavascriptTabModalDialogTest { - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public BlankCTATabInitialStateRule mBlankCTATabInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, true); + public AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.autoResetCtaActivityRule(); private static final String EMPTY_PAGE = UrlUtils.encodeHtmlDataUri( @@ -79,12 +75,13 @@ "<html><title>Modal Dialog Test</title><p>Testcase. Other" + " tab.</p></title></html>"); + private WebPageStation mPage; private ChromeTabbedActivity mActivity; @Before public void setUp() { - sActivityTestRule.loadUrl(EMPTY_PAGE); - mActivity = sActivityTestRule.getActivity(); + mPage = mActivityTestRule.startOnWebPage(EMPTY_PAGE); + mActivity = mPage.getActivity(); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/latency_injection/StartupLatencyInjectorTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/latency_injection/StartupLatencyInjectorTest.java index 70dcb1c..8fae833f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/latency_injection/StartupLatencyInjectorTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/latency_injection/StartupLatencyInjectorTest.java
@@ -17,7 +17,8 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; import org.chromium.chrome.test.util.ChromeApplicationTestUtils; @RunWith(ChromeJUnit4ClassRunner.class) @@ -26,8 +27,8 @@ @DoNotBatch(reason = "Tests require cold browser start.") public class StartupLatencyInjectorTest { @Rule - public ChromeTabbedActivityTestRule mTabbedActivityTestRule = - new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mTabbedActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private static final String HISTOGRAM_TOTAL_WAIT_TIME = "Startup.Android.MainIconLaunchTotalWaitTime"; @@ -40,7 +41,7 @@ .expectAnyRecordTimes(HISTOGRAM_TOTAL_WAIT_TIME, 2) .build(); ChromeFeatureList.sClankStartupLatencyInjectionAmountMs.setForTesting(100); - mTabbedActivityTestRule.startMainActivityFromLauncher(); + mTabbedActivityTestRule.startFromLauncherAtNtp(); mTabbedActivityTestRule.waitForActivityNativeInitializationComplete(); ChromeApplicationTestUtils.fireHomeScreenIntent(mTabbedActivityTestRule.getActivity()); mTabbedActivityTestRule.resumeMainActivityFromLauncher();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/locale/LocaleManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/locale/LocaleManagerTest.java index a5a037d..e24e789 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/locale/LocaleManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/locale/LocaleManagerTest.java
@@ -9,8 +9,8 @@ import org.junit.After; import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.ClassRule; +import org.junit.Before; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -23,7 +23,9 @@ import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.ReusedCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.components.policy.test.annotations.Policies; import java.util.concurrent.ExecutionException; @@ -33,21 +35,22 @@ @Batch(Batch.PER_CLASS) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class LocaleManagerTest { - public static @ClassRule ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); + @Rule + public ReusedCtaTransitTestRule<WebPageStation> mActivityTestRule = + ChromeTransitTestRules.blankPageStartReusedActivityRule(); - @BeforeClass - public static void setUpClass() throws ExecutionException { + @Before + public void setUp() throws ExecutionException { // Launch any activity as an Activity ref is required to attempt to show the activity. - sActivityTestRule.startMainActivityOnBlankPage(); - sActivityTestRule.waitForActivityNativeInitializationComplete(); - sActivityTestRule.waitForDeferredStartup(); + mActivityTestRule.start(); + mActivityTestRule.waitForActivityNativeInitializationComplete(); + mActivityTestRule.getActivityTestRule().waitForDeferredStartup(); } @After public void tearDown() { ThreadUtils.runOnUiThreadBlocking( - sActivityTestRule.getActivity().getSnackbarManager()::dismissAllSnackbars); + mActivityTestRule.getActivity().getSnackbarManager()::dismissAllSnackbars); } @Policies.Add({@Policies.Item(key = "DefaultSearchProviderEnabled", string = "false")}) @@ -72,7 +75,7 @@ () -> LocaleManager.getInstance() .showSearchEnginePromoIfNeeded( - sActivityTestRule.getActivity(), + mActivityTestRule.getActivity(), result -> { Assert.assertTrue(result); searchEnginesFinalizedCallback.notifyCalled(); @@ -88,7 +91,7 @@ () -> { LocaleManager localeManager = LocaleManager.getInstance(); SnackbarManager snackbarManager = - sActivityTestRule.getActivity().getSnackbarManager(); + mActivityTestRule.getActivity().getSnackbarManager(); localeManager.setSnackbarManager(snackbarManager); localeManager.showSnackbarForDeviceSearchEngineUpdate(); @@ -108,7 +111,7 @@ () -> { LocaleManager localeManager = LocaleManager.getInstance(); SnackbarManager snackbarManager = - sActivityTestRule.getActivity().getSnackbarManager(); + mActivityTestRule.getActivity().getSnackbarManager(); // Simulate the case when snackbar manager is not set. localeManager.setSnackbarManager(null); localeManager.showSnackbarForDeviceSearchEngineUpdate();
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 ceb07a3..75deb56 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
@@ -4,7 +4,6 @@ package org.chromium.chrome.browser.login; -import androidx.test.core.app.ApplicationProvider; import androidx.test.filters.MediumTest; import androidx.test.platform.app.InstrumentationRegistry; @@ -28,7 +27,9 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabLaunchType; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.content_public.common.ContentUrlConstants; import org.chromium.net.test.EmbeddedTestServer; @@ -40,19 +41,19 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class ChromeHttpAuthHandlerTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public CustomTabActivityTestRule mCustomTabActivityTestRule = new CustomTabActivityTestRule(); private EmbeddedTestServer mTestServer; + private WebPageStation mPage; @Before public void setUp() throws Exception { - mActivityTestRule.startMainActivityOnBlankPage(); - mTestServer = - EmbeddedTestServer.createAndStartServer( - ApplicationProvider.getApplicationContext()); + mPage = mActivityTestRule.startOnBlankPage(); + mTestServer = mActivityTestRule.getTestServer(); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/messages/MessageTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/messages/MessageTest.java index 675a46a..2296966 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/messages/MessageTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/messages/MessageTest.java
@@ -12,10 +12,8 @@ import androidx.test.filters.SmallTest; -import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -28,8 +26,10 @@ import org.chromium.chrome.browser.ChromeTabbedActivity; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.components.messages.MessageBannerProperties; import org.chromium.components.messages.MessageDispatcher; import org.chromium.components.messages.MessageDispatcherProvider; @@ -44,29 +44,25 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @Batch(Batch.PER_CLASS) public class MessageTest { - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); + @Rule + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public FakeTimeTestRule mFakeTimeTestRule = new FakeTimeTestRule(); + private WebPageStation mPage; private ChromeTabbedActivity mActivity; private MessageDispatcher mMessageDispatcher; @Before public void setUp() { - sActivityTestRule.startMainActivityOnBlankPage(); - mActivity = sActivityTestRule.getActivity(); + mPage = mActivityTestRule.startOnBlankPage(); + mActivity = mPage.getActivity(); mMessageDispatcher = ThreadUtils.runOnUiThreadBlocking( () -> MessageDispatcherProvider.from(mActivity.getWindowAndroid())); } - @After - public void tearDown() { - MessagesTestHelper.enableTapProtectionDuration(-1); - } - /** * Test that message is not clickable within tap protection period and becomes clickable once it * ends.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenterTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenterTest.java index 60110f45..69e1cfa0 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenterTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenterTest.java
@@ -37,7 +37,6 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -58,9 +57,10 @@ import org.chromium.chrome.browser.tab.EmptyTabObserver; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; -import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; +import org.chromium.chrome.test.transit.AutoResetCtaTransitTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.chrome.test.util.OmniboxTestUtils; import org.chromium.components.browser_ui.modaldialog.ModalDialogTestUtils; @@ -100,14 +100,11 @@ } } - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public BlankCTATabInitialStateRule mBlankCTATabInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, true); + public AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.autoResetCtaActivityRule(); + private WebPageStation mPage; private ChromeTabbedActivity mActivity; private ModalDialogManager mManager; private ChromeTabModalPresenter mTabModalPresenter; @@ -117,7 +114,8 @@ @Before public void setUp() { - mActivity = sActivityTestRule.getActivity(); + mPage = mActivityTestRule.startOnBlankPage(); + mActivity = mPage.getActivity(); mOmnibox = new OmniboxTestUtils(mActivity); mManager = ThreadUtils.runOnUiThreadBlocking(mActivity::getModalDialogManager); mTestObserver = new TestObserver(); @@ -327,7 +325,7 @@ PropertyModel dialog1 = createDialog(mActivity, mManager, "1", null); PropertyModel dialog2 = createDialog(mActivity, mManager, "2", null); PropertyModel dialog3 = createDialog(mActivity, mManager, "3", null); - sActivityTestRule.loadUrlInNewTab("about:blank"); + mActivityTestRule.loadUrlInNewTab("about:blank"); // Initially there are no dialogs in the pending list. Browser controls are not restricted. checkPendingSize(mManager, ModalDialogType.APP, 0); @@ -382,7 +380,7 @@ PropertyModel dialog2 = createDialog(mActivity, mManager, "2", null); // Open a new tab and make sure that the current tab is at index 0. - sActivityTestRule.loadUrlInNewTab("about:blank"); + mActivityTestRule.loadUrlInNewTab("about:blank"); ChromeTabUtils.switchTabInCurrentTabModel(mActivity, 0); // Initially there are no dialogs in the pending list. Browser controls are not restricted. @@ -517,7 +515,7 @@ int callCount = mTestObserver.onDialogDismissedCallback.getCallCount(); // Open a new tab and make sure that the current tab is at index 0. - sActivityTestRule.loadUrlInNewTab("about:blank"); + mActivityTestRule.loadUrlInNewTab("about:blank"); ChromeTabUtils.switchTabInCurrentTabModel(mActivity, 0); // Show a tab modal dialog and then switch tab. @@ -557,7 +555,7 @@ EmbeddedTestServer server = EmbeddedTestServer.createAndStartServer( ApplicationProvider.getApplicationContext()); - sActivityTestRule.loadUrl(server.getURL("/chrome/test/data/android/simple.html")); + mActivityTestRule.loadUrl(server.getURL("/chrome/test/data/android/simple.html")); mTestObserver.onDialogDismissedCallback.waitForCallback(callCount); mExpectedDismissalCause = null;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/multiwindow/MultiWindowIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/multiwindow/MultiWindowIntegrationTest.java index 787a996..db10c24 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/multiwindow/MultiWindowIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/multiwindow/MultiWindowIntegrationTest.java
@@ -9,7 +9,6 @@ import static org.chromium.chrome.browser.multiwindow.MultiWindowTestHelper.waitForSecondChromeTabbedActivity; import static org.chromium.chrome.browser.multiwindow.MultiWindowTestHelper.waitForTabs; -import androidx.test.core.app.ApplicationProvider; import androidx.test.filters.MediumTest; import androidx.test.platform.app.InstrumentationRegistry; @@ -35,8 +34,10 @@ import org.chromium.chrome.browser.layouts.LayoutType; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.MenuUtils; import org.chromium.net.test.EmbeddedTestServer; @@ -46,16 +47,16 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class MultiWindowIntegrationTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private EmbeddedTestServer mTestServer; + private WebPageStation mPage; @Before public void setUp() throws InterruptedException { - mTestServer = - EmbeddedTestServer.createAndStartServer( - ApplicationProvider.getApplicationContext()); - mActivityTestRule.startMainActivityOnBlankPage(); + mTestServer = mActivityTestRule.getTestServer(); + mPage = mActivityTestRule.startOnBlankPage(); } @Test
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/multiwindow/MultiWindowUtilsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/multiwindow/MultiWindowUtilsTest.java index 43eb28d..6bd3b316 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/multiwindow/MultiWindowUtilsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/multiwindow/MultiWindowUtilsTest.java
@@ -40,8 +40,10 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.test.AutomotiveContextWrapperTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import java.util.concurrent.TimeoutException; @@ -50,17 +52,19 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class MultiWindowUtilsTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public AutomotiveContextWrapperTestRule mAutomotiveContextWrapperTestRule = new AutomotiveContextWrapperTestRule(); @Mock private MultiWindowUtils mMultiWindowUtils; + private WebPageStation mPage; @Before public void setUp() throws InterruptedException { - mActivityTestRule.startMainActivityOnBlankPage(); + mPage = mActivityTestRule.startOnBlankPage(); mMultiWindowUtils = Mockito.spy(MultiWindowUtils.getInstance()); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelperTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelperTest.java index 8e9538b..dd313a94 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelperTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelperTest.java
@@ -31,9 +31,10 @@ import org.chromium.chrome.browser.ui.appmenu.AppMenuTestSupport; import org.chromium.chrome.browser.ui.appmenu.TestAppMenuObserver; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; -import org.chromium.components.embedder_support.util.UrlConstants; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.ntp.RegularNewTabPageStation; import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.test.util.DeviceRestriction; @@ -44,13 +45,15 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable_update_menu_item"}) public class UpdateMenuItemHelperTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private static final String TEST_MARKET_URL = "https://play.google.com/store/apps/details?id=com.android.chrome"; private static final long MS_TIMEOUT = 2000; private static final long MS_INTERVAL = 500; + private RegularNewTabPageStation mNtp; /** Reports versions that we want back to OmahaClient. */ private static class MockVersionNumberGetter extends VersionNumberGetter { @@ -130,7 +133,7 @@ MarketURLGetter.setInstanceForTests(mMockMarketURLGetter); // Start up main. - mActivityTestRule.startMainActivityWithURL(UrlConstants.NTP_URL); + mNtp = mActivityTestRule.startOnNtp(); mMenuObserver = new TestAppMenuObserver(); mActivityTestRule.getAppMenuCoordinator().getAppMenuHandler().addObserver(mMenuObserver);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/paint_preview/StartupPaintPreviewHelperTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/paint_preview/StartupPaintPreviewHelperTest.java index 3226323b..aa823484 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/paint_preview/StartupPaintPreviewHelperTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/paint_preview/StartupPaintPreviewHelperTest.java
@@ -25,7 +25,9 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabClosureParams; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import java.util.concurrent.ExecutionException; @@ -37,7 +39,8 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class StartupPaintPreviewHelperTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private static final String TEST_URL = "/chrome/test/data/android/about.html"; @@ -48,9 +51,8 @@ @Test @MediumTest public void testCaptureOnBackgrounded() throws ExecutionException { - mActivityTestRule.startMainActivityWithURL( - mActivityTestRule.getTestServer().getURL(TEST_URL)); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + WebPageStation page = mActivityTestRule.startOnTestServerUrl(TEST_URL); + Tab tab = page.getTab(); CriteriaHelper.pollUiThread( () -> PaintPreviewTabServiceFactory.getServiceInstance() @@ -96,13 +98,12 @@ @MediumTest @DisabledTest(message = "Pending revival. See crbug.com/333779543.") public void testDisplayOnStartup() throws ExecutionException { - mActivityTestRule.startMainActivityWithURL( - mActivityTestRule.getTestServer().getURL(TEST_URL)); - final ChromeTabbedActivity activity = mActivityTestRule.getActivity(); + WebPageStation page = mActivityTestRule.startOnTestServerUrl(TEST_URL); + ChromeTabbedActivity activity = page.getActivity(); CriteriaHelper.pollUiThread( () -> activity.getTabModelSelector().isTabStateInitialized(), "Tab state never initialized."); - final Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = page.getTab(); CriteriaHelper.pollUiThread( () -> PaintPreviewTabServiceFactory.getServiceInstance() @@ -128,7 +129,7 @@ ThreadUtils.runOnUiThreadBlocking(activity::finish); CriteriaHelper.pollUiThread(activity::isDestroyed, "Activity didn't get destroyed."); - mActivityTestRule.startMainActivityFromLauncher(); + mActivityTestRule.getActivityTestRule().startMainActivityFromLauncher(); final ChromeTabbedActivity newActivity = mActivityTestRule.getActivity(); CriteriaHelper.pollUiThread( () -> newActivity.getTabModelSelector().isTabStateInitialized(),
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/policy/CombinedPolicyProviderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/policy/CombinedPolicyProviderTest.java index d9a5bcb0..5cd2872f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/policy/CombinedPolicyProviderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/policy/CombinedPolicyProviderTest.java
@@ -18,7 +18,9 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.tabmodel.TabModel; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.components.policy.CombinedPolicyProvider; import org.chromium.components.policy.PolicyProvider; @@ -27,13 +29,15 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class CombinedPolicyProviderTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private static final String DATA_URI = "data:text/plain;charset=utf-8;base64,dGVzdA=="; + private WebPageStation mPage; @Before public void setUp() throws InterruptedException { - mActivityTestRule.startMainActivityOnBlankPage(); + mPage = mActivityTestRule.startOnBlankPage(); } /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/policy/PolicyAuditorBridgeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/policy/PolicyAuditorBridgeTest.java index 2dbaa11d..a193b2c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/policy/PolicyAuditorBridgeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/policy/PolicyAuditorBridgeTest.java
@@ -21,8 +21,9 @@ import org.chromium.chrome.browser.policy.PolicyAuditor.AuditEvent; import org.chromium.chrome.browser.tab.Tab; 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.chrome.test.transit.page.WebPageStation; import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.content_public.browser.GlobalRenderFrameHostId; import org.chromium.content_public.browser.LifecycleState; @@ -68,11 +69,8 @@ private static final FakePolicyAuditor sFakePolicyAuditor = new FakePolicyAuditor(); @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); - - @Rule - public final BlankCTATabInitialStateRule mInitialStateRule = - new BlankCTATabInitialStateRule(mActivityTestRule, false); + public final AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.fastAutoResetCtaActivityRule(); @BeforeClass public static void setUpClass() { @@ -87,7 +85,7 @@ @Test @SmallTest public void testSuccessfulNavigation() { - mActivityTestRule.loadUrl(UrlConstants.VERSION_URL); + mActivityTestRule.startOnWebPage(UrlConstants.VERSION_URL); FakePolicyAuditor fakePolicyAuditor = sFakePolicyAuditor; Assert.assertEquals(1, fakePolicyAuditor.getEntriesSize()); @@ -99,12 +97,14 @@ @Test @SmallTest public void testUnsuccessfulNavigation() throws Exception { + WebPageStation page = mActivityTestRule.startOnBlankPage(); + String invalidUrl = "https://invalid/"; // Can't use the activity test rule to navigate to invalid urls, the rule has an assert that // fails the testcase upon unsuccessful navigations. So, use the tab directly to navigate to // the invalid url. - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = page.getTab(); final CallbackHelper loadFinishCallback = new CallbackHelper(); WebContentsObserver observer = new WebContentsObserver() {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/previewtab/PreviewTabTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/previewtab/PreviewTabTest.java index 8a2816d..3d7645e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/previewtab/PreviewTabTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/previewtab/PreviewTabTest.java
@@ -30,14 +30,15 @@ import org.chromium.chrome.browser.tabbed_mode.TabbedRootUiCoordinator; import org.chromium.chrome.browser.tabmodel.IncognitoTabHostUtils; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.browser.contextmenu.ContextMenuUtils; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController.SheetState; import org.chromium.components.browser_ui.bottomsheet.BottomSheetTestSupport; import org.chromium.content_public.browser.test.util.DOMUtils; -import org.chromium.net.test.EmbeddedTestServerRule; import org.chromium.url.GURL; import java.util.concurrent.TimeoutException; @@ -50,9 +51,8 @@ @Restriction(Restriction.RESTRICTION_TYPE_NON_LOW_END_DEVICE) public class PreviewTabTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); - - @Rule public EmbeddedTestServerRule mTestServer = new EmbeddedTestServerRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); /** Needed to ensure the First Run Flow is disabled automatically during setUp, etc. */ @Rule public DisableFirstRun mDisableFirstRunFlowRule = new DisableFirstRun(); @@ -67,6 +67,7 @@ private EphemeralTabCoordinator mEphemeralTabCoordinator; private BottomSheetTestSupport mSheetTestSupport; private TestEphemeralTabObserver mEphemeralTabObserver; + private WebPageStation mPage; private static class TestEphemeralTabObserver implements EphemeralTabObserver { public final CallbackHelper onToolbarCreatedCallback = new CallbackHelper(); @@ -91,7 +92,7 @@ @Before public void setUp() { - mActivityTestRule.startMainActivityWithURL(mTestServer.getServer().getURL(BASE_PAGE)); + mPage = mActivityTestRule.startOnTestServerUrl(BASE_PAGE); ThreadUtils.runOnUiThreadBlocking( () -> { TabbedRootUiCoordinator tabbedRootUiCoordinator = @@ -175,7 +176,7 @@ mEphemeralTabCoordinator.isOpened()); mActivityTestRule.loadUrlInNewTab( - mTestServer.getServer().getURL(BASE_PAGE), /* incognito= */ true); + mActivityTestRule.getTestServer().getURL(BASE_PAGE), /* incognito= */ true); mActivityTestRule.getActivity().getTabModelSelector().selectModel(true); ChromeActivity activity = mActivityTestRule.getActivity(); Tab tab = activity.getActivityTab(); @@ -212,7 +213,7 @@ ThreadUtils.runOnUiThreadBlocking( () -> mEphemeralTabCoordinator.requestOpenSheet( - new GURL(mTestServer.getServer().getURL(PREVIEW_TAB)), + new GURL(mActivityTestRule.getTestServer().getURL(PREVIEW_TAB)), "PreviewTab", mActivityTestRule.getProfile(false))); endAnimations(); @@ -236,7 +237,7 @@ ThreadUtils.runOnUiThreadBlocking( () -> mEphemeralTabCoordinator.requestOpenSheetWithFullPageUrl( - new GURL(mTestServer.getServer().getURL(PREVIEW_TAB)), + new GURL(mActivityTestRule.getTestServer().getURL(PREVIEW_TAB)), null, "PreviewTab", mActivityTestRule.getProfile(false)));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/printing/PrintingControllerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/printing/PrintingControllerTest.java index 4db02c9..895dd4a6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/printing/PrintingControllerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/printing/PrintingControllerTest.java
@@ -41,8 +41,9 @@ import org.chromium.chrome.browser.tabmodel.TabModelUtils; import org.chromium.chrome.browser.tasks.tab_management.TabUiTestHelper; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; -import org.chromium.net.test.EmbeddedTestServer; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.printing.PrintDocumentAdapterWrapper.LayoutResultCallbackWrapper; import org.chromium.printing.PrintDocumentAdapterWrapper.WriteResultCallbackWrapper; import org.chromium.printing.PrintManagerDelegate; @@ -64,8 +65,8 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class PrintingControllerTest { @Rule - public final ChromeTabbedActivityTestRule mActivityTestRule = - new ChromeTabbedActivityTestRule(); + public final FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private static final String TEMP_FILE_NAME = "temp_print"; private static final String TEMP_FILE_EXTENSION = ".pdf"; @@ -158,9 +159,8 @@ @LargeTest @Feature({"Printing"}) public void testNormalPrintingFlow() throws Throwable { - mActivityTestRule.startMainActivityWithURL(URL); - final Tab currentTab = mActivityTestRule.getActivity().getActivityTab(); - testNormalPrintingFlowHelper(currentTab); + WebPageStation page = mActivityTestRule.startOnUrl(URL); + testNormalPrintingFlowHelper(page.getTab()); } /** Test a basic printing flow on pdf page. */ @@ -169,10 +169,9 @@ @Feature({"Printing"}) @MinAndroidSdkLevel(VERSION_CODES.VANILLA_ICE_CREAM) public void testNormalPrintingFlow_PDF() throws Throwable { - EmbeddedTestServer testServer = mActivityTestRule.getTestServer(); - final String url = testServer.getURL("/pdf/test/data/hello_world2.pdf"); - mActivityTestRule.startMainActivityWithURL(url); - final Tab currentTab = mActivityTestRule.getActivity().getActivityTab(); + WebPageStation page = + mActivityTestRule.startOnTestServerUrl("/pdf/test/data/hello_world2.pdf"); + Tab currentTab = page.getTab(); // Wait for PDF page to load. CriteriaHelper.pollUiThread( () -> { @@ -196,8 +195,8 @@ @MediumTest @Feature({"Printing"}) public void testPrintCloseWindowBeforeStart() { - mActivityTestRule.startMainActivityWithURL(URL); - final Tab currentTab = mActivityTestRule.getActivity().getActivityTab(); + WebPageStation page = mActivityTestRule.startOnUrl(URL); + Tab currentTab = page.getTab(); final PrintingControllerImpl printingController = createControllerOnUiThread(); final PrintManagerDelegate mockPrintManagerDelegate = mockPrintManagerDelegate(() -> Assert.fail("Shouldn't start a printing job.")); @@ -229,8 +228,8 @@ @LargeTest @Feature({"Printing"}) public void testPrintCloseWindowBeforeOnWrite() throws Throwable { - mActivityTestRule.startMainActivityWithURL(URL); - final Tab currentTab = mActivityTestRule.getActivity().getActivityTab(); + WebPageStation page = mActivityTestRule.startOnUrl(URL); + Tab currentTab = page.getTab(); final PrintingControllerImpl printingController = createControllerOnUiThread(); startControllerOnUiThread(printingController, currentTab); @@ -304,10 +303,10 @@ @MediumTest @Feature({"Printing"}) public void testCancelPrintBeforeWriteResultCallbacks() throws Throwable { - mActivityTestRule.startMainActivityWithURL(URL); + WebPageStation page = mActivityTestRule.startOnUrl(URL); + Tab currentTab = page.getTab(); final WaitForOnWriteHelper onWriteHelper = new WaitForOnWriteHelper(); - final Tab currentTab = mActivityTestRule.getActivity().getActivityTab(); final PrintingControllerImpl printingController = ThreadUtils.runOnUiThreadBlocking( () -> new PrintingControllerImplPdfWritingDone(onWriteHelper)); @@ -364,7 +363,7 @@ @SmallTest @Feature({"Printing"}) public void testPdfWritingDoneCalledWithoutInitailizePrintingTask() { - mActivityTestRule.startMainActivityWithURL(URL); + mActivityTestRule.startOnUrl(URL); final PrintingControllerImpl controller = createControllerOnUiThread(); // Calling pdfWritingDone() with |pageCount| = 0 before onWrite() was called. It shouldn't @@ -376,8 +375,8 @@ @SmallTest @Feature({"Printing"}) public void testTabPrinterCanPrintHiddenTab() { - mActivityTestRule.startMainActivityWithURL(URL); - ChromeTabbedActivity cta = mActivityTestRule.getActivity(); + WebPageStation page = mActivityTestRule.startOnUrl(URL); + ChromeTabbedActivity cta = page.getActivity(); // ensure two tabs are open. TabUiTestHelper.createTabs(cta, false, 2);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/ChromeTrackingProtectionDelegateTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/ChromeTrackingProtectionDelegateTest.java index e1f9d49..d16e9b96 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/ChromeTrackingProtectionDelegateTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/ChromeTrackingProtectionDelegateTest.java
@@ -12,7 +12,6 @@ import androidx.test.filters.MediumTest; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -27,8 +26,8 @@ import org.chromium.chrome.browser.preferences.Pref; 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.privacy_sandbox.TrackingProtectionDelegate; import org.chromium.components.user_prefs.UserPrefs; @@ -36,13 +35,9 @@ @RunWith(ChromeJUnit4ClassRunner.class) @Batch(Batch.PER_CLASS) public class ChromeTrackingProtectionDelegateTest { - @ClassRule - public static final ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public final BlankCTATabInitialStateRule mInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, false); + public final AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.fastAutoResetCtaActivityRule(); private TrackingProtectionDelegate mDelegate;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSurveyControllerIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSurveyControllerIntegrationTest.java index 91ac3db..83e6722 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSurveyControllerIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSurveyControllerIntegrationTest.java
@@ -32,7 +32,9 @@ import org.chromium.chrome.browser.ui.hats.TestSurveyUtils; import org.chromium.chrome.test.AutomotiveContextWrapperTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.ntp.RegularNewTabPageStation; import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.components.messages.DismissReason; import org.chromium.components.messages.MessageBannerProperties; @@ -41,7 +43,6 @@ import org.chromium.components.messages.MessageIdentifier; import org.chromium.components.messages.MessageStateHandler; import org.chromium.components.messages.MessagesTestHelper; -import org.chromium.net.test.EmbeddedTestServer; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.test.util.DeviceRestriction; @@ -54,11 +55,8 @@ @Restriction(DeviceRestriction.RESTRICTION_TYPE_NON_AUTO) public class PrivacySandboxSurveyControllerIntegrationTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); - - @Rule - public ChromeTabbedActivityTestRule mChromeTabbedActivityTestRule = - new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public AutomotiveContextWrapperTestRule mAutomotiveRule = @@ -70,9 +68,7 @@ private MessageDispatcher mMessageDispatcher; private PropertyModel mSurveyMessage; - private String mTestPage; - private EmbeddedTestServer mTestServer; - private static final String TEST_PAGE = "/chrome/test/data/android/google.html"; + private RegularNewTabPageStation mNtp; public static ViewAction repeatedlyUntil( final ViewAction action, final Matcher<View> condition, final int maxAttempts) { @@ -108,7 +104,7 @@ @Before public void setup() { PrivacySandboxSurveyController.setEnableForTesting(); - mActivityTestRule.startMainActivityWithURL(UrlConstants.NTP_URL); + mNtp = mActivityTestRule.startOnNtp(); // Explicitly remove the `DISABLE_FIRST_RUN_EXPERIENCE` (set via `TestSurveyComponentRule`) // commandline switch which prevents us from receiving a valid prompt type via
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/read_later/ReadLaterContextMenuTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/read_later/ReadLaterContextMenuTest.java index 9c65c4d..3e4a1dc6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/read_later/ReadLaterContextMenuTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/read_later/ReadLaterContextMenuTest.java
@@ -51,13 +51,15 @@ import org.chromium.chrome.browser.offlinepages.RequestCoordinatorBridgeJni; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.browser.contextmenu.ContextMenuUtils; import org.chromium.components.feature_engagement.FeatureConstants; import org.chromium.components.feature_engagement.Tracker; import org.chromium.components.feature_engagement.TriggerDetails; -import org.chromium.net.test.EmbeddedTestServerRule; +import org.chromium.net.test.EmbeddedTestServer; import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.test.util.ViewUtils; @@ -67,9 +69,9 @@ @Batch(Batch.PER_CLASS) public class ReadLaterContextMenuTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); - @Rule public EmbeddedTestServerRule mTestServer = new EmbeddedTestServerRule(); @Rule public MockitoRule mMockitoRule = MockitoJUnit.rule(); @Mock private Tracker mTracker; @Mock RequestCoordinatorBridge.Natives mRequestCoordinatorBridgeJniMock; @@ -80,8 +82,13 @@ "/chrome/test/data/android/contextmenu/test_link.html"; private static final String CONTEXT_MENU_LINK_DOM_ID = "testLink"; + private EmbeddedTestServer mTestServer; + private WebPageStation mPage; + @Before public void setUp() { + mTestServer = mActivityTestRule.getTestServer(); + // Pretend the feature engagement feature is already initialized. Otherwise // UserEducationHelper#requestShowIph() calls get dropped during test. doAnswer( @@ -94,7 +101,7 @@ TrackerFactory.setTrackerForTests(mTracker); when(mTracker.shouldTriggerHelpUiWithSnooze(any())) .thenReturn(new TriggerDetails(false, false)); - mActivityTestRule.startMainActivityOnBlankPage(); + mPage = mActivityTestRule.startOnBlankPage(); RequestCoordinatorBridgeJni.setInstanceForTesting(mRequestCoordinatorBridgeJniMock); } @@ -110,7 +117,7 @@ FeatureConstants.READ_LATER_APP_MENU_BOOKMARK_THIS_PAGE_FEATURE)) .thenReturn(new TriggerDetails(true, false)); - mActivityTestRule.loadUrlInNewTab(mTestServer.getServer().getURL(CONTEXT_MENU_TEST_URL)); + mActivityTestRule.loadUrlInNewTab(mTestServer.getURL(CONTEXT_MENU_TEST_URL)); ChromeActivity activity = mActivityTestRule.getActivity(); Tab tab = activity.getActivityTab(); @@ -129,7 +136,7 @@ @MediumTest @Restriction({DeviceFormFactor.PHONE}) public void testContextMenuAddToOfflinePage() throws Throwable { - String url = mTestServer.getServer().getURL(CONTEXT_MENU_TEST_URL); + String url = mTestServer.getURL(CONTEXT_MENU_TEST_URL); mActivityTestRule.loadUrlInNewTab(url); ChromeActivity activity = mActivityTestRule.getActivity(); Tab tab = activity.getActivityTab(); @@ -139,7 +146,7 @@ tab, CONTEXT_MENU_LINK_DOM_ID, R.id.contextmenu_read_later); - String linkUrl = mTestServer.getServer().getURL(CONTEXT_MENU_LINK_URL); + String linkUrl = mTestServer.getURL(CONTEXT_MENU_LINK_URL); verify(mRequestCoordinatorBridgeJniMock, timeout(CriteriaHelper.DEFAULT_MAX_TIME_TO_POLL)) .savePageLater(any(), any(), eq(linkUrl), any(), any(), any(), anyBoolean()); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/reengagement/ReengagementNotificationControllerIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/reengagement/ReengagementNotificationControllerIntegrationTest.java index b2e5ad11..8d5f9af 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/reengagement/ReengagementNotificationControllerIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/reengagement/ReengagementNotificationControllerIntegrationTest.java
@@ -52,8 +52,10 @@ import org.chromium.chrome.browser.tabmodel.TabModelSelectorObserver; import org.chromium.chrome.browser.util.DefaultBrowserInfo; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.components.embedder_support.util.UrlUtilities; import org.chromium.components.feature_engagement.EventConstants; @@ -69,8 +71,8 @@ // as expected with test values public class ReengagementNotificationControllerIntegrationTest { @Rule - public ChromeTabbedActivityTestRule mTabbedActivityTestRule = - new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mTabbedActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public CustomTabActivityTestRule mCustomTabActivityTestRule = new CustomTabActivityTestRule(); @@ -213,7 +215,7 @@ @Test @SmallTest public void testEngagementTracked() { - mTabbedActivityTestRule.startMainActivityFromLauncher(); + mTabbedActivityTestRule.startFromLauncherAtNtp(); verify(mTracker, times(1)).notifyEvent(EventConstants.STARTED_FROM_MAIN_INTENT); } @@ -232,14 +234,14 @@ @DisableFeatures(ChromeFeatureList.REENGAGEMENT_NOTIFICATION) @DisabledTest(message = "crbug.com/1112519 - Disabled while safety guard is in place.") public void testEngagementTrackedWhenDisabled() { - mTabbedActivityTestRule.startMainActivityFromLauncher(); + mTabbedActivityTestRule.startFromLauncherAtNtp(); verify(mTracker, times(1)).notifyEvent(EventConstants.STARTED_FROM_MAIN_INTENT); } @Test @SmallTest public void testEngagementNotTrackedDueToIntentOpeningTab() { - mTabbedActivityTestRule.startMainActivityWithURL( + mTabbedActivityTestRule.startOnUrl( UrlUtils.encodeHtmlDataUri("<html><head></head><body>foo</body></html>")); verify(mTracker, never()).notifyEvent(EventConstants.STARTED_FROM_MAIN_INTENT); } @@ -272,9 +274,8 @@ @Test @MediumTest public void testReengagementActivity() throws Exception { - mTabbedActivityTestRule.startMainActivityOnBlankPage(); - int initialTabCount = - mTabbedActivityTestRule.getActivity().getTabModelSelector().getTotalTabCount(); + WebPageStation blankPage = mTabbedActivityTestRule.startOnBlankPage(); + int initialTabCount = blankPage.getTabModelSelector().getTotalTabCount(); final CallbackHelper tabAddedCallback = new CallbackHelper(); TabModelSelectorObserver selectorObserver =
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/screenshot_monitor/ScreenshotTabObserverTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/screenshot_monitor/ScreenshotTabObserverTest.java index c1fa3ef..37adc59a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/screenshot_monitor/ScreenshotTabObserverTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/screenshot_monitor/ScreenshotTabObserverTest.java
@@ -7,7 +7,6 @@ import androidx.test.filters.MediumTest; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -24,8 +23,9 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabClosureParams; 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.chrome.test.transit.page.WebPageStation; import java.util.List; import java.util.concurrent.TimeoutException; @@ -35,26 +35,24 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) // TODO(crbug.com/344675714): Failing when batched, batch this again. public class ScreenshotTabObserverTest { - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public BlankCTATabInitialStateRule mInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, false); + public AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.fastAutoResetCtaActivityRule(); + private WebPageStation mPage; private Tab mTab; private ScreenshotTabObserver mObserver; @Before public void setUp() throws Exception { - mTab = sActivityTestRule.getActivity().getActivityTab(); + mPage = mActivityTestRule.startOnBlankPage(); + mTab = mPage.getTab(); ThreadUtils.runOnUiThreadBlocking( (Runnable) () -> mObserver = ScreenshotTabObserver.from(mTab)); } private void closeCurrentTab() { - sActivityTestRule + mActivityTestRule .getActivity() .getCurrentTabModel() .getTabRemover()
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/searchwidget/SearchActivityTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/searchwidget/SearchActivityTest.java index 6b87cda..1df815d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/searchwidget/SearchActivityTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/searchwidget/SearchActivityTest.java
@@ -71,8 +71,9 @@ import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityExtras.ResolutionType; import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityExtras.SearchType; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; import org.chromium.chrome.test.util.ActivityTestUtils; import org.chromium.chrome.test.util.OmniboxTestUtils; import org.chromium.components.browser_ui.edge_to_edge.EdgeToEdgeSystemBarColorHelper; @@ -177,8 +178,8 @@ } } - public @Rule ChromeTabbedActivityTestRule mActivityTestRule = - new ChromeTabbedActivityTestRule(); + public @Rule FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); // Needed for CT connection cleanup. public @Rule CustomTabActivityTestRule mCustomTabActivityTestRule = new CustomTabActivityTestRule(); @@ -482,7 +483,7 @@ @Test @MediumTest public void testLaunchIncognitoSearchActivity() { - mActivityTestRule.startMainActivityOnBlankPage(); + mActivityTestRule.startOnBlankPage(); SearchActivity searchActivity = ActivityTestUtils.waitForActivity( InstrumentationRegistry.getInstrumentation(), @@ -524,7 +525,7 @@ @Test @SmallTest public void statusAndNavigationBarColor_incognito() { - mActivityTestRule.startMainActivityOnBlankPage(); + mActivityTestRule.startOnBlankPage(); SearchActivity searchActivity = ActivityTestUtils.waitForActivity( InstrumentationRegistry.getInstrumentation(), @@ -631,6 +632,6 @@ Criteria.checkThat(tab, Matchers.notNullValue()); Criteria.checkThat(tab.getUrl().getSpec(), Matchers.is(expectedUrl)); }); - mActivityTestRule.setActivity(cta); + mActivityTestRule.getActivityTestRule().setActivity(cta); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/segmentation_platform/ContextualPageActionControllerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/segmentation_platform/ContextualPageActionControllerTest.java index d98cd0ca..9d31cf1 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/segmentation_platform/ContextualPageActionControllerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/segmentation_platform/ContextualPageActionControllerTest.java
@@ -21,8 +21,9 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarButtonVariant; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; -import org.chromium.net.test.EmbeddedTestServer; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.ui.base.DeviceFormFactor; @RunWith(ChromeJUnit4ClassRunner.class) @@ -38,15 +39,14 @@ private static final String TEST_PAGE = "/chrome/test/data/dom_distiller/simple_article.html"; @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); - private EmbeddedTestServer mTestServer; private String mReaderModePageUrl; @Before public void setUp() throws Exception { - mTestServer = mActivityTestRule.getTestServer(); - mReaderModePageUrl = mTestServer.getURL(TEST_PAGE); + mReaderModePageUrl = mActivityTestRule.getTestServer().getURL(TEST_PAGE); } @Test @@ -61,7 +61,7 @@ CONTEXTUAL_PAGE_ACTION_DEFAULT_MODEL_HISTOGRAM, /* value= kSuccess*/ 0); // Load a blank page, model should execute for every page load. - mActivityTestRule.startMainActivityOnBlankPage(); + mActivityTestRule.startOnBlankPage(); histogram.pollInstrumentationThreadUntilSatisfied(); } @@ -71,7 +71,7 @@ @Restriction(DeviceFormFactor.PHONE) // Reader mode is only available on phones. public void testContextualPageModelExecution_OnReaderModePage() { LibraryLoader.getInstance().ensureInitialized(); - mActivityTestRule.startMainActivityFromLauncher(); + WebPageStation page = mActivityTestRule.startOnBlankPage(); var histograms = HistogramWatcher.newBuilder() @@ -84,7 +84,7 @@ .allowExtraRecordsForHistogramsAbove() .build(); - mActivityTestRule.loadUrl(mReaderModePageUrl); + page = page.loadWebPageProgrammatically(mReaderModePageUrl); histograms.pollInstrumentationThreadUntilSatisfied(); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/shape_detection/ShapeDetectionTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/shape_detection/ShapeDetectionTest.java index 04b0d88..85313d8 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/shape_detection/ShapeDetectionTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/shape_detection/ShapeDetectionTest.java
@@ -4,7 +4,6 @@ package org.chromium.chrome.browser.shape_detection; -import androidx.test.core.app.ApplicationProvider; import org.junit.Assert; import org.junit.Before; @@ -19,7 +18,9 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.chrome.test.util.browser.TabTitleObserver; import org.chromium.net.test.EmbeddedTestServer; @@ -36,11 +37,19 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class ShapeDetectionTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private static final String BARCODE_TEST_EXPECTED_TAB_TITLE = "https://chromium.org"; private static final String TEXT_TEST_EXPECTED_TAB_TITLE = "The quick brown fox jumped over the lazy dog. Helvetica Neue 36."; + private WebPageStation mPage; + + /** We need to allow a looser policy due to the Google Play Services internals. */ + @Before + public void setUp() throws Exception { + mPage = mActivityTestRule.startOnBlankPage(); + } /** Verifies that QR codes are detected correctly. */ @Test @@ -49,10 +58,8 @@ @Feature({"ShapeDetection"}) @Restriction(GmsCoreVersionRestriction.RESTRICTION_TYPE_VERSION_GE_20W02) public void testBarcodeDetection() throws TimeoutException { - EmbeddedTestServer testServer = - EmbeddedTestServer.createAndStartServer( - ApplicationProvider.getApplicationContext()); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + EmbeddedTestServer testServer = mActivityTestRule.getTestServer(); + Tab tab = mPage.getTab(); TabTitleObserver titleObserver = new TabTitleObserver(tab, BARCODE_TEST_EXPECTED_TAB_TITLE); mActivityTestRule.loadUrl( testServer.getURL("/chrome/test/data/android/barcode_detection.html")); @@ -67,20 +74,12 @@ @Feature({"ShapeDetection"}) @Restriction(GmsCoreVersionRestriction.RESTRICTION_TYPE_VERSION_GE_20W02) public void testTextDetection() throws TimeoutException { - EmbeddedTestServer testServer = - EmbeddedTestServer.createAndStartServer( - ApplicationProvider.getApplicationContext()); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + EmbeddedTestServer testServer = mActivityTestRule.getTestServer(); + Tab tab = mPage.getTab(); TabTitleObserver titleObserver = new TabTitleObserver(tab, TEXT_TEST_EXPECTED_TAB_TITLE); mActivityTestRule.loadUrl( testServer.getURL("/chrome/test/data/android/text_detection.html")); titleObserver.waitForTitleUpdate(10); Assert.assertEquals(TEXT_TEST_EXPECTED_TAB_TITLE, ChromeTabUtils.getTitleOnUiThread(tab)); } - - /** We need to allow a looser policy due to the Google Play Services internals. */ - @Before - public void setUp() throws Exception { - mActivityTestRule.startMainActivityOnBlankPage(); - } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/sms/WebOTPServiceInfoBarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/sms/WebOTPServiceInfoBarTest.java index 79e92fc..6581e54 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/sms/WebOTPServiceInfoBarTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/sms/WebOTPServiceInfoBarTest.java
@@ -11,7 +11,6 @@ import org.junit.Assert; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -28,8 +27,9 @@ import org.chromium.chrome.browser.infobar.InfoBarContainer; import org.chromium.chrome.browser.tab.Tab; 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.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.InfoBarUtil; import org.chromium.components.browser_ui.sms.WebOTPServiceInfoBar; import org.chromium.components.browser_ui.sms.WebOTPServiceUma; @@ -41,22 +41,21 @@ @Batch(Batch.PER_CLASS) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class WebOTPServiceInfoBarTest { - @ClassRule - public static final ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public final BlankCTATabInitialStateRule mInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, false); + public final AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.fastAutoResetCtaActivityRule(); - private ChromeActivity mActivity; private static final String INFOBAR_HISTOGRAM = "Blink.Sms.Receive.Infobar"; private static final String TIME_CANCEL_ON_KEYBOARD_DISMISSAL_HISTOGRAM = "Blink.Sms.Receive.TimeCancelOnKeyboardDismissal"; + private WebPageStation mPage; + private ChromeActivity mActivity; + @Before public void setUp() throws Exception { - mActivity = sActivityTestRule.getActivity(); + mPage = mActivityTestRule.startOnBlankPage(); + mActivity = mPage.getActivity(); } private WebOTPServiceInfoBar createInfoBar() { @@ -152,7 +151,7 @@ RecordHistogram.getHistogramValueCountForTesting( TIME_CANCEL_ON_KEYBOARD_DISMISSAL_HISTOGRAM, 0); KeyboardVisibilityDelegate keyboardVisibilityDelegate = - sActivityTestRule.getKeyboardDelegate(); + mActivityTestRule.getKeyboardDelegate(); EditText editText = new EditText(mActivity); ThreadUtils.runOnUiThreadBlocking( @@ -203,7 +202,7 @@ RecordHistogram.getHistogramValueCountForTesting( TIME_CANCEL_ON_KEYBOARD_DISMISSAL_HISTOGRAM, 0); KeyboardVisibilityDelegate keyboardVisibilityDelegate = - sActivityTestRule.getKeyboardDelegate(); + mActivityTestRule.getKeyboardDelegate(); EditText editText = new EditText(mActivity); ThreadUtils.runOnUiThreadBlocking(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ssl/CaptivePortalTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ssl/CaptivePortalTest.java index 01d4f07..16f40b9 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/ssl/CaptivePortalTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ssl/CaptivePortalTest.java
@@ -21,10 +21,11 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.ntp.RegularNewTabPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.chrome.test.util.browser.TabTitleObserver; -import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.components.security_interstitials.CaptivePortalHelper; import org.chromium.net.test.EmbeddedTestServer; import org.chromium.net.test.ServerCertificate; @@ -43,6 +44,7 @@ private static final String CAPTIVE_PORTAL_INTERSTITIAL_TITLE_PREFIX = "Connect to"; private static final String SSL_INTERSTITIAL_TITLE = "Privacy error"; private static final int INTERSTITIAL_TITLE_UPDATE_TIMEOUT_SECONDS = 5; + private RegularNewTabPageStation mNtp; // UMA events copied from ssl_error_handler.h. @IntDef({ @@ -82,13 +84,14 @@ } @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private EmbeddedTestServer mServer; @Before public void setUp() { - mActivityTestRule.startMainActivityWithURL(UrlConstants.NTP_URL); + mNtp = mActivityTestRule.startOnNtp(); mServer = EmbeddedTestServer.createAndStartHTTPSServer( ApplicationProvider.getApplicationContext(),
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorTest.java index b7e886d..292da6e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorTest.java
@@ -41,8 +41,10 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabbed_mode.TabbedRootUiCoordinator; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.NewTabPageTestUtils; import org.chromium.chrome.test.util.RecentTabsPageTestUtils; import org.chromium.components.embedder_support.util.UrlConstants; @@ -59,17 +61,19 @@ public class StatusIndicatorTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private StatusIndicatorCoordinator mStatusIndicatorCoordinator; private StatusIndicatorSceneLayer mStatusIndicatorSceneLayer; private View mControlContainer; private BrowserControlsStateProvider mBrowserControlsStateProvider; + private WebPageStation mPage; @Before public void setUp() throws InterruptedException { TabbedRootUiCoordinator.setDisableTopControlsAnimationsForTesting(true); - mActivityTestRule.startMainActivityOnBlankPage(); + mPage = mActivityTestRule.startOnBlankPage(); mStatusIndicatorCoordinator = ((TabbedRootUiCoordinator) mActivityTestRule.getActivity().getRootUiCoordinatorForTesting())
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/storage/BlobUrlStoreTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/storage/BlobUrlStoreTest.java index 18b322d..be2fe1b5 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/storage/BlobUrlStoreTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/storage/BlobUrlStoreTest.java
@@ -4,11 +4,12 @@ package org.chromium.chrome.browser.storage; +import static org.junit.Assert.assertTrue; + import android.content.Context; import androidx.test.filters.SmallTest; -import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; @@ -17,10 +18,11 @@ import org.chromium.base.ContextUtils; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.chrome.browser.flags.ChromeSwitches; -import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.TestContentProvider; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import java.io.File; @@ -31,7 +33,8 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class BlobUrlStoreTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public TemporaryFolder mFolder = new TemporaryFolder(); @@ -58,10 +61,15 @@ writer.close(); TestContentProvider.resetResourceRequestCounts(context); TestContentProvider.setDataFilePath(context, mFolder.getRoot().getPath()); - mActivityTestRule.startMainActivityWithURL( - TestContentProvider.createContentUrl("blob.html")); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); - Assert.assertEquals("A blob", ChromeTabUtils.getTitleOnUiThread(tab)); - Assert.assertTrue(ChromeTabUtils.getUrlStringOnUiThread(tab).startsWith("blob:null/")); + WebPageStation page = + mActivityTestRule + .startOnUrlTo(TestContentProvider.createContentUrl("blob.html")) + .arriveAt( + WebPageStation.newBuilder() + .withEntryPoint() + .withExpectedTitle("A blob") + .withExpectedUrlSubstring("blob:null/") + .build()); + assertTrue(ChromeTabUtils.getUrlStringOnUiThread(page.getTab()).startsWith("blob:null/")); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/survey/ChromeStartupSurveyIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/survey/ChromeStartupSurveyIntegrationTest.java index 2f8af75..9e35c21 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/survey/ChromeStartupSurveyIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/survey/ChromeStartupSurveyIntegrationTest.java
@@ -20,7 +20,9 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.ui.hats.TestSurveyUtils; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.components.messages.DismissReason; import org.chromium.components.messages.MessageBannerProperties; import org.chromium.components.messages.MessageDispatcher; @@ -45,7 +47,8 @@ @Batch(Batch.PER_CLASS) public class ChromeStartupSurveyIntegrationTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public TestSurveyUtils.TestSurveyComponentRule mTestSurveyComponentRule = @@ -53,12 +56,13 @@ private MessageDispatcher mMessageDispatcher; private PropertyModel mSurveyMessage; + private WebPageStation mPage; @Before public void setup() { ChromeSurveyController.setEnableForTesting(); ChromeSurveyController.forceIsUMAEnabledForTesting(true); - mActivityTestRule.startMainActivityOnBlankPage(); + mPage = mActivityTestRule.startOnBlankPage(); waitForSurveyMessagePresented(); } @@ -87,7 +91,7 @@ } private void waitForSurveyMessagePresented() { - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mPage.getTab(); CriteriaHelper.pollUiThread(() -> !tab.isLoading() && tab.isUserInteractable()); ThreadUtils.runOnUiThreadBlocking(
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettingsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettingsTest.java index 1eec4e82..da5460d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettingsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/sync/settings/ManageSyncSettingsTest.java
@@ -7,6 +7,7 @@ import static androidx.test.espresso.Espresso.onView; import static androidx.test.espresso.action.ViewActions.click; import static androidx.test.espresso.action.ViewActions.pressKey; +import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist; import static androidx.test.espresso.assertion.ViewAssertions.matches; import static androidx.test.espresso.matcher.RootMatchers.isDialog; import static androidx.test.espresso.matcher.ViewMatchers.hasDescendant; @@ -86,6 +87,7 @@ import org.chromium.chrome.browser.sync.SyncTestRule; import org.chromium.chrome.browser.sync.ui.PassphraseCreationDialogFragment; import org.chromium.chrome.browser.sync.ui.PassphraseDialogFragment; +import org.chromium.chrome.browser.ui.extensions.ExtensionsBuildflags; import org.chromium.chrome.browser.ui.signin.GoogleActivityController; import org.chromium.chrome.browser.ui.signin.history_sync.HistorySyncHelper; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; @@ -127,6 +129,9 @@ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @DoNotBatch(reason = "TODO(crbug.com/40743432): SyncTestRule doesn't support batching.") +// Hide the extensions item because most tests are for mobile Android where extensions aren't +// supported. This prevents having to maintain two sets of screenshots for render tests. +@EnableFeatures({ChromeFeatureList.BLOCK_INSTALLING_EXTENSIONS_ON_DESKTOP_ANDROID}) public class ManageSyncSettingsTest { private static final int RENDER_TEST_REVISION = 7; @@ -142,6 +147,10 @@ entry( UserSelectableType.BOOKMARKS, ManageSyncSettings.PREF_ACCOUNT_SECTION_BOOKMARKS_TOGGLE), + // NOTE: EXTENSIONS are only available in the desktop Android build. + entry( + UserSelectableType.EXTENSIONS, + ManageSyncSettings.PREF_ACCOUNT_SECTION_EXTENSIONS_TOGGLE), entry( UserSelectableType.PAYMENTS, ManageSyncSettings.PREF_ACCOUNT_SECTION_PAYMENTS_TOGGLE), @@ -214,6 +223,10 @@ mUiDataTypes = new HashMap<>(); mUiDataTypes.put(UserSelectableType.AUTOFILL, ManageSyncSettings.PREF_SYNC_AUTOFILL); mUiDataTypes.put(UserSelectableType.BOOKMARKS, ManageSyncSettings.PREF_SYNC_BOOKMARKS); + if (shouldShowExtensionsItem()) { + mUiDataTypes.put( + UserSelectableType.EXTENSIONS, ManageSyncSettings.PREF_SYNC_EXTENSIONS); + } mUiDataTypes.put( UserSelectableType.PAYMENTS, ManageSyncSettings.PREF_SYNC_PAYMENTS_INTEGRATION); mUiDataTypes.put(UserSelectableType.HISTORY, ManageSyncSettings.PREF_SYNC_HISTORY); @@ -245,7 +258,10 @@ @Test @LargeTest - @DisableFeatures({ChromeFeatureList.LINKED_SERVICES_SETTING}) + @DisableFeatures({ + ChromeFeatureList.LINKED_SERVICES_SETTING, + ChromeFeatureList.BLOCK_INSTALLING_EXTENSIONS_ON_DESKTOP_ANDROID + }) public void testAccountSettingsView() { // The types that should be default-enabled in transport mode depend on various flags. Set<String> expectedEnabledTypes = @@ -257,7 +273,9 @@ ManageSyncSettings.PREF_ACCOUNT_SECTION_BOOKMARKS_TOGGLE, ManageSyncSettings.PREF_ACCOUNT_SECTION_READING_LIST_TOGGLE, ManageSyncSettings.PREF_ACCOUNT_SECTION_ADDRESSES_TOGGLE)); - + if (shouldShowExtensionsItem()) { + expectedEnabledTypes.add(ManageSyncSettings.PREF_ACCOUNT_SECTION_EXTENSIONS_TOGGLE); + } mSyncTestRule.setUpAccountAndSignInForTesting(); ManageSyncSettings fragment = startManageSyncPreferences(); @@ -276,6 +294,12 @@ scrollToAndVerifyPresence(R.string.account_section_bookmarks_toggle); + if (shouldShowExtensionsItem()) { + scrollToAndVerifyPresence(R.string.account_section_extensions_toggle); + } else { + onView(withText(R.string.account_section_extensions_toggle)).check(doesNotExist()); + } + scrollToAndVerifyPresence(R.string.account_section_reading_list_toggle); scrollToAndVerifyPresence(R.string.account_section_addresses_toggle); @@ -1497,6 +1521,11 @@ if (accountUiDataType.getKey() == UserSelectableType.TABS) { continue; } + // EXTENSIONS are only available in the desktop Android build. + if (accountUiDataType.getKey() == UserSelectableType.EXTENSIONS + && !shouldShowExtensionsItem()) { + continue; + } Integer selectedType = accountUiDataType.getKey(); String prefId = accountUiDataType.getValue(); dataTypes.put(selectedType, (ChromeSwitchPreference) fragment.findPreference(prefId)); @@ -1556,4 +1585,11 @@ .perform(RecyclerViewActions.scrollTo(hasDescendant(withText(textId)))); onView(withText(textId)).check(matches(isDisplayed())); } + + /** Returns whether the extensions sync item should be shown. */ + private boolean shouldShowExtensionsItem() { + return ExtensionsBuildflags.ENABLE_DESKTOP_ANDROID_EXTENSIONS + && !ChromeFeatureList.isEnabled( + ChromeFeatureList.BLOCK_INSTALLING_EXTENSIONS_ON_DESKTOP_ANDROID); + } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/KeyboardFocusRowManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/KeyboardFocusRowManagerTest.java index a3dccd2..edab9a6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/KeyboardFocusRowManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/KeyboardFocusRowManagerTest.java
@@ -19,7 +19,6 @@ import org.junit.Before; import org.junit.BeforeClass; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -39,7 +38,9 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.tab.TabObscuringHandler; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.ReusedCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.ui.accessibility.KeyboardFocusRow; import org.chromium.ui.base.DeviceFormFactor; @@ -56,12 +57,13 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class KeyboardFocusRowManagerTest { - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); + @Rule + public ReusedCtaTransitTestRule<WebPageStation> mActivityTestRule = + ChromeTransitTestRules.blankPageStartReusedActivityRule(); @Rule public MockitoRule mockito = MockitoJUnit.rule(); // todo delete if not needed + private WebPageStation mPage; private ChromeTabbedActivity mActivity; private KeyboardFocusRowManager mKeyboardFocusRowManager; private TabbedRootUiCoordinator mTabbedRootUiCoordinator; @@ -69,15 +71,14 @@ @BeforeClass public static void setUpClass() { TabbedRootUiCoordinator.setDisableTopControlsAnimationsForTesting(true); - sActivityTestRule.startMainActivityOnBlankPage(); } @Before public void setUp() { - mActivity = sActivityTestRule.getActivity(); + mPage = mActivityTestRule.start(); + mActivity = mPage.getActivity(); mTabbedRootUiCoordinator = - (TabbedRootUiCoordinator) - sActivityTestRule.getActivity().getRootUiCoordinatorForTesting(); + (TabbedRootUiCoordinator) mActivity.getRootUiCoordinatorForTesting(); mKeyboardFocusRowManager = mTabbedRootUiCoordinator.getKeyboardFocusRowManagerForTesting(); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/TabbedNavigationBarColorControllerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/TabbedNavigationBarColorControllerTest.java index f5acd4a..8f383962 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/TabbedNavigationBarColorControllerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/TabbedNavigationBarColorControllerTest.java
@@ -57,8 +57,10 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.ui.edge_to_edge.EdgeToEdgeUtils; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.components.browser_ui.edge_to_edge.EdgeToEdgeSystemBarColorHelper; import org.chromium.components.browser_ui.edge_to_edge.WindowSystemBarColorHelper; @@ -67,7 +69,6 @@ import org.chromium.components.browser_ui.widget.scrim.ScrimProperties; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.test.util.DOMUtils; -import org.chromium.net.test.EmbeddedTestServerRule; import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.test.util.DeviceRestriction; @@ -82,13 +83,13 @@ @SuppressLint("NewApi") public class TabbedNavigationBarColorControllerTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); - - @Rule public EmbeddedTestServerRule mTestServerRule = new EmbeddedTestServerRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private static final int ANIMATION_CHECK_INTERVAL_MS = 100; private static final int ANIMATION_MAX_TIMEOUT_MS = 2000; + private WebPageStation mPage; private Window mWindow; private @ColorInt int mRegularNavigationColor; private @ColorInt int mDarkNavigationColor; @@ -98,7 +99,7 @@ @Before public void setUp() throws InterruptedException { - mActivityTestRule.startMainActivityOnBlankPage(); + mPage = mActivityTestRule.startOnBlankPage(); mWindow = mActivityTestRule.getActivity().getWindow(); Context context = mActivityTestRule.getActivity(); mRegularNavigationColor = SemanticColorUtils.getBottomSystemNavColor(context); @@ -189,7 +190,9 @@ mWindow.getNavigationBarColor()); String url = - mTestServerRule.getServer().getURL("/content/test/data/media/video-player.html"); + mActivityTestRule + .getTestServer() + .getURL("/content/test/data/media/video-player.html"); mActivityTestRule.loadUrl(url); ChromeTabbedActivity activity = mActivityTestRule.getActivity(); FullscreenToggleObserver observer = new FullscreenToggleObserver();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinatorTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinatorTest.java index 9234b9f..aeb7fe6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinatorTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinatorTest.java
@@ -50,7 +50,9 @@ import org.chromium.chrome.browser.tasks.tab_management.TabUiTestHelper; import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.transit.testhtmls.NavigatePageStations; import org.chromium.components.search_engines.SearchEngineChoiceService; import org.chromium.net.test.EmbeddedTestServer; @@ -64,10 +66,12 @@ @Rule public ChromeBrowserTestRule mBrowserTestRule = new ChromeBrowserTestRule(); @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public MockitoRule mockito = MockitoJUnit.rule(); + private WebPageStation mPage; private TabbedRootUiCoordinator mTabbedRootUiCoordinator; @Mock private PrivacySandboxBridgeJni mPrivacySandboxBridgeJni; @@ -85,10 +89,9 @@ BookmarkBarUtils.setFeatureVisibleForTesting(true); TabbedRootUiCoordinator.setDisableTopControlsAnimationsForTesting(true); - mActivityTestRule.startMainActivityOnBlankPage(); + mPage = mActivityTestRule.startOnBlankPage(); mTabbedRootUiCoordinator = - (TabbedRootUiCoordinator) - mActivityTestRule.getActivity().getRootUiCoordinatorForTesting(); + (TabbedRootUiCoordinator) mPage.getActivity().getRootUiCoordinatorForTesting(); } // TODO(crbug.com/40112282): Enable for tablets once we support them.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/undo_tab_close_snackbar/UndoBarControllerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/undo_tab_close_snackbar/UndoBarControllerTest.java index 6c6375e3..1ec2466 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/undo_tab_close_snackbar/UndoBarControllerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/undo_tab_close_snackbar/UndoBarControllerTest.java
@@ -14,7 +14,6 @@ import androidx.test.platform.app.InstrumentationRegistry; import org.junit.Before; -import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -35,9 +34,10 @@ import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.browser.util.ChromeAccessibilityUtil; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; -import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; +import org.chromium.chrome.test.transit.AutoResetCtaTransitTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.ui.base.DeviceFormFactor; @@ -53,33 +53,26 @@ // in breakage when trying to reset the test environment back to the original state between tests. @DisableFeatures(ChromeFeatureList.DRAW_KEY_NATIVE_EDGE_TO_EDGE) public class UndoBarControllerTest { - @ClassRule - public static ChromeTabbedActivityTestRule sActivityTestRule = - new ChromeTabbedActivityTestRule(); - @Rule - public BlankCTATabInitialStateRule mBlankCTATabInitialStateRule = - new BlankCTATabInitialStateRule(sActivityTestRule, true); + public AutoResetCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.autoResetCtaActivityRule(); + private WebPageStation mPage; private SnackbarManager mSnackbarManager; private TabModel mTabModel; private TabGroupModelFilter mTabGroupModelFilter; @Before public void setUp() throws Exception { - mSnackbarManager = sActivityTestRule.getActivity().getSnackbarManager(); + mPage = mActivityTestRule.startOnBlankPage(); + mSnackbarManager = mPage.getActivity().getSnackbarManager(); ThreadUtils.runOnUiThreadBlocking( () -> { mSnackbarManager.dismissAllSnackbars(); }); - mTabGroupModelFilter = - sActivityTestRule - .getActivity() - .getTabModelSelector() - .getTabGroupModelFilterProvider() - .getTabGroupModelFilter(false); - mTabModel = mTabGroupModelFilter.getTabModel(); + mTabGroupModelFilter = mPage.getTabGroupModelFilter(); + mTabModel = mPage.getTabModel(); } @Test @@ -89,7 +82,7 @@ assertEquals(1, mTabModel.getCount()); ChromeTabUtils.closeAllTabs( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); Snackbar currentSnackbar = getCurrentSnackbar(); assertSnackbarTextEqualsAllowingTruncation("Closed about:blank"); @@ -109,7 +102,7 @@ assertEquals(1, mTabModel.getCount()); ChromeTabUtils.closeAllTabs( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); Snackbar currentSnackbar = getCurrentSnackbar(); assertSnackbarTextEqualsAllowingTruncation("Closed about:blank"); @@ -126,13 +119,13 @@ @SmallTest public void testCloseAll_MultipleTabs_Undo() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); assertNull(getCurrentSnackbar()); assertEquals(2, mTabModel.getCount()); ChromeTabUtils.closeAllTabs( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); Snackbar currentSnackbar = getCurrentSnackbar(); assertSnackbarTextEqualsAllowingTruncation("2 tabs closed"); @@ -149,13 +142,13 @@ @SmallTest public void testCloseAll_MultipleTabs_Dismiss() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); assertNull(getCurrentSnackbar()); assertEquals(2, mTabModel.getCount()); ChromeTabUtils.closeAllTabs( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); Snackbar currentSnackbar = getCurrentSnackbar(); assertSnackbarTextEqualsAllowingTruncation("2 tabs closed"); @@ -172,7 +165,7 @@ @SmallTest public void testCloseTabGroup_Undo() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ThreadUtils.runOnUiThreadBlocking( () -> { mTabGroupModelFilter.mergeListOfTabsToGroup( @@ -217,15 +210,14 @@ @SmallTest public void testCloseTabGroup_EmptyTitle_Undo() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ThreadUtils.runOnUiThreadBlocking( () -> { mTabGroupModelFilter.mergeListOfTabsToGroup( List.of(mTabModel.getTabAt(0), mTabModel.getTabAt(1)), mTabModel.getTabAt(0), /* notify= */ false); - mTabGroupModelFilter.setTabGroupTitle( - mTabModel.getTabAt(0).getRootId(), ""); + mTabGroupModelFilter.setTabGroupTitle(mTabModel.getTabAt(0).getRootId(), ""); }); assertNull(getCurrentSnackbar()); @@ -262,7 +254,7 @@ @SmallTest public void testDeleteTabGroup_Undo() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ThreadUtils.runOnUiThreadBlocking( () -> { mTabGroupModelFilter.mergeListOfTabsToGroup( @@ -299,9 +291,9 @@ @SmallTest public void testDeleteTabGroup_WithOtherTab_Undo() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ThreadUtils.runOnUiThreadBlocking( () -> { mTabGroupModelFilter.createSingleTabGroup(mTabModel.getTabAt(0)); @@ -338,9 +330,9 @@ @SmallTest public void testCloseTabGroup_WithOtherTabs_Undo() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ThreadUtils.runOnUiThreadBlocking( () -> { mTabGroupModelFilter.createSingleTabGroup(mTabModel.getTabAt(0)); @@ -379,9 +371,9 @@ @SmallTest public void testPartialDeleteTabGroup_Undo() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ThreadUtils.runOnUiThreadBlocking( () -> { mTabGroupModelFilter.mergeListOfTabsToGroup( @@ -421,7 +413,7 @@ @SmallTest public void testDeleteTabGroups_Undo() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ThreadUtils.runOnUiThreadBlocking( () -> { mTabGroupModelFilter.createSingleTabGroup(mTabModel.getTabAt(0)); @@ -456,7 +448,7 @@ @SmallTest public void testCloseTabGroups_Undo() throws Exception { ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); ThreadUtils.runOnUiThreadBlocking( () -> { mTabGroupModelFilter.createSingleTabGroup(mTabModel.getTabAt(0)); @@ -491,7 +483,7 @@ @Test @SmallTest public void testThrottleUndo() throws Exception { - ChromeTabbedActivity cta = sActivityTestRule.getActivity(); + ChromeTabbedActivity cta = mActivityTestRule.getActivity(); UndoBarController undoBarController = cta.getUndoBarControllerForTesting(); ChromeTabUtils.newTabFromMenu(InstrumentationRegistry.getInstrumentation(), cta); ChromeTabUtils.newTabFromMenu(InstrumentationRegistry.getInstrumentation(), cta); @@ -534,7 +526,7 @@ @Test @SmallTest public void testThrottleUndo_CommitSubset() throws Exception { - ChromeTabbedActivity cta = sActivityTestRule.getActivity(); + ChromeTabbedActivity cta = mActivityTestRule.getActivity(); UndoBarController undoBarController = cta.getUndoBarControllerForTesting(); ChromeTabUtils.newTabFromMenu(InstrumentationRegistry.getInstrumentation(), cta); ChromeTabUtils.newTabFromMenu(InstrumentationRegistry.getInstrumentation(), cta); @@ -581,7 +573,7 @@ @Test @SmallTest public void testThrottleUndo_CommitAll() throws Exception { - ChromeTabbedActivity cta = sActivityTestRule.getActivity(); + ChromeTabbedActivity cta = mActivityTestRule.getActivity(); UndoBarController undoBarController = cta.getUndoBarControllerForTesting(); ChromeTabUtils.newTabFromMenu(InstrumentationRegistry.getInstrumentation(), cta); ChromeTabUtils.newTabFromMenu(InstrumentationRegistry.getInstrumentation(), cta); @@ -620,7 +612,7 @@ @Test @SmallTest public void testThrottleUndo_UndoNotViaSnackbar() throws Exception { - ChromeTabbedActivity cta = sActivityTestRule.getActivity(); + ChromeTabbedActivity cta = mActivityTestRule.getActivity(); UndoBarController undoBarController = cta.getUndoBarControllerForTesting(); ChromeTabUtils.newTabFromMenu(InstrumentationRegistry.getInstrumentation(), cta); ChromeTabUtils.newTabFromMenu(InstrumentationRegistry.getInstrumentation(), cta); @@ -667,13 +659,13 @@ ThreadUtils.runOnUiThreadBlocking( () -> ChromeAccessibilityUtil.get().setAccessibilityEnabledForTesting(true)); ChromeTabUtils.newTabFromMenu( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); assertNull("Snack bar should be null initially", getCurrentSnackbar()); assertEquals(2, mTabModel.getCount()); ChromeTabUtils.closeCurrentTab( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); assertNull( "Undo snack bar should not be showing in accessibility mode", getCurrentSnackbar()); @@ -690,7 +682,7 @@ assertEquals("Tab Model should contain 1 tab", 1, mTabModel.getCount()); ChromeTabUtils.closeAllTabs( - InstrumentationRegistry.getInstrumentation(), sActivityTestRule.getActivity()); + InstrumentationRegistry.getInstrumentation(), mActivityTestRule.getActivity()); Snackbar currentSnackbar = getCurrentSnackbar(); assertSnackbarTextEqualsAllowingTruncation("Closed about:blank"); @@ -704,7 +696,7 @@ ThreadUtils.runOnUiThreadBlocking( () -> mSnackbarManager.onClick( - sActivityTestRule + mActivityTestRule .getActivity() .findViewById(R.id.snackbar_button))); } @@ -739,7 +731,7 @@ } private String getSnackbarText() { - return ((TextView) sActivityTestRule.getActivity().findViewById(R.id.snackbar_message)) + return ((TextView) mActivityTestRule.getActivity().findViewById(R.id.snackbar_message)) .getText() .toString(); }
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 3c87db0..138d98e 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
@@ -45,8 +45,10 @@ import org.chromium.chrome.browser.tab.TabSelectionType; import org.chromium.chrome.browser.tab.TabTestUtils; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.chrome.test.util.MenuUtils; import org.chromium.components.safe_browsing.SafeBrowsingApiBridge; @@ -81,7 +83,8 @@ @Rule public final MockitoRule mMockitoRule = MockitoJUnit.rule(); @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); @Rule public CustomTabActivityTestRule mCustomTabActivityTestRule = new CustomTabActivityTestRule(); @@ -91,6 +94,7 @@ @Mock private SuspensionTracker mSuspensionTracker; private ChromeTabbedActivity mActivity; + private WebPageStation mPage; private PageViewObserver mPageViewObserver; private PageViewObserver mPageViewObserver2; private TokenTracker mTokenTracker; @@ -118,9 +122,9 @@ mStartingUrl = mTestServer.getURLWithHostName(STARTING_FQDN, "/defaultresponse"); mDifferentUrl = mTestServer.getURLWithHostName(DIFFERENT_FQDN, "/defaultresponse"); - mActivityTestRule.startMainActivityOnBlankPage(); - mActivity = mActivityTestRule.getActivity(); - mTab = mActivity.getActivityTab(); + mPage = mActivityTestRule.startOnBlankPage(); + mActivity = mPage.getActivity(); + mTab = mPage.getTab(); ThreadUtils.runOnUiThreadBlocking( () -> { mPageViewObserver =
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/video/FullscreenVideoTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/video/FullscreenVideoTest.java index 5bd4442..0d290280 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/video/FullscreenVideoTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/video/FullscreenVideoTest.java
@@ -27,13 +27,14 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.FullscreenTestUtils; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.test.util.DOMUtils; import org.chromium.content_public.browser.test.util.TestTouchUtils; import org.chromium.media.MediaSwitches; -import org.chromium.net.test.EmbeddedTestServerRule; import java.util.concurrent.TimeoutException; @@ -46,16 +47,16 @@ @Batch(Batch.PER_CLASS) public class FullscreenVideoTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); - - @Rule public EmbeddedTestServerRule mTestServerRule = new EmbeddedTestServerRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); private ChromeActivity mActivity; + private WebPageStation mPage; @Before public void setUp() throws InterruptedException { - mActivityTestRule.startMainActivityOnBlankPage(); - mActivity = mActivityTestRule.getActivity(); + mPage = mActivityTestRule.startOnBlankPage(); + mActivity = mPage.getActivity(); } /** @@ -89,7 +90,9 @@ @MediumTest public void testFullscreenDimensions() throws TimeoutException { String url = - mTestServerRule.getServer().getURL("/content/test/data/media/video-player.html"); + mActivityTestRule + .getTestServer() + .getURL("/content/test/data/media/video-player.html"); String video = "video"; Rect expectedSize = new Rect(0, 0, 320, 180); @@ -120,8 +123,8 @@ private String launchOnFullscreenMode() { String url = - mTestServerRule - .getServer() + mActivityTestRule + .getTestServer() .getURL("/chrome/test/data/android/media/video-fullscreen.html"); mActivityTestRule.loadUrl(url); final Tab tab = mActivity.getActivityTab();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/video/VideoTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/video/VideoTest.java index 4c86caa..fe3b03f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/video/VideoTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/video/VideoTest.java
@@ -4,7 +4,6 @@ package org.chromium.chrome.browser.video; -import androidx.test.core.app.ApplicationProvider; import androidx.test.filters.LargeTest; import org.junit.Assert; @@ -18,11 +17,12 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.transit.ChromeTransitTestRules; +import org.chromium.chrome.test.transit.FreshCtaTransitTestRule; +import org.chromium.chrome.test.transit.page.WebPageStation; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.chrome.test.util.browser.TabTitleObserver; import org.chromium.content_public.browser.test.util.DOMUtils; -import org.chromium.net.test.EmbeddedTestServer; import java.util.concurrent.TimeoutException; @@ -31,19 +31,26 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class VideoTest { @Rule - public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); + public FreshCtaTransitTestRule mActivityTestRule = + ChromeTransitTestRules.freshChromeTabbedActivityRule(); + + private WebPageStation mPage; + + @Before + public void setUp() throws InterruptedException { + mPage = mActivityTestRule.startOnBlankPage(); + } @Test @Feature({"Media", "Media-Video", "Main"}) @LargeTest public void testLoadMediaUrl() throws TimeoutException { - EmbeddedTestServer testServer = - EmbeddedTestServer.createAndStartServer( - ApplicationProvider.getApplicationContext()); - Tab tab = mActivityTestRule.getActivity().getActivityTab(); + Tab tab = mPage.getTab(); TabTitleObserver titleObserver = new TabTitleObserver(tab, "ready_to_play"); mActivityTestRule.loadUrl( - testServer.getURL("/chrome/test/data/android/media/video-play.html")); + mActivityTestRule + .getTestServer() + .getURL("/chrome/test/data/android/media/video-play.html")); titleObserver.waitForTitleUpdate(5); Assert.assertEquals("ready_to_play", ChromeTabUtils.getTitleOnUiThread(tab)); titleObserver = new TabTitleObserver(tab, "ended"); @@ -53,9 +60,4 @@ titleObserver.waitForTitleUpdate(15); Assert.assertEquals("ended", ChromeTabUtils.getTitleOnUiThread(tab)); } - - @Before - public void setUp() throws InterruptedException { - mActivityTestRule.startMainActivityOnBlankPage(); - } }
diff --git a/chrome/app/os_settings_search_tag_strings.grdp b/chrome/app/os_settings_search_tag_strings.grdp index d7ad089..3013429 100644 --- a/chrome/app/os_settings_search_tag_strings.grdp +++ b/chrome/app/os_settings_search_tag_strings.grdp
@@ -649,6 +649,12 @@ <message name="IDS_OS_SETTINGS_TAG_POWER_ADAPTIVE_CHARGING" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to enable adaptive charging."> Adaptive charging </message> + <message name="IDS_OS_SETTINGS_TAG_POWER_OPTIMIZED_CHARGING" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to enable optimized charging." translateable="false"> + Optimized charging + </message> + <message name="IDS_OS_SETTINGS_TAG_POWER_CHARGE_LIMIT" desc="Text for search result item which, when clicked, navigates the user to power settings, with an option to enable a charge limit." translateable="false"> + Charge limit + </message> <message name="IDS_OS_SETTINGS_TAG_TOUCHPAD" desc="Text for search result item which, when clicked, navigates the user to touchpad settings. Alternate phrase for: 'Trackpad'"> Touchpad </message>
diff --git a/chrome/app/os_settings_strings.grdp b/chrome/app/os_settings_strings.grdp index 50f237b..32cbc1f 100644 --- a/chrome/app/os_settings_strings.grdp +++ b/chrome/app/os_settings_strings.grdp
@@ -5932,6 +5932,15 @@ <message name="IDS_SETTINGS_POWER_ADAPTIVE_CHARGING_SUBTEXT" desc="In Device Settings > Power, description of the behavior of the adaptive charging feature."> Extends battery life by keeping your battery around 80%. Battery will fully charge before you typically disconnect from power. </message> + <message name="IDS_SETTINGS_POWER_OPTIMIZED_CHARGING_LABEL" desc="In Device Settings > Power, the title of the settings row of the optimized charging feature." translateable="false"> + Optimized charging + </message> + <message name="IDS_SETTINGS_POWER_OPTIMIZED_CHARGING_MODE_CHANGE_LABEL" desc="In Device Settings > Power, the text of the optimized charging change mode button, which creates a dialog that allows the user to pick between adaptive charging and a charge limit." translateable="false"> + Change + </message> + <message name="IDS_SETTINGS_POWER_BATTERY_CHARGE_LIMIT_LABEL" desc="In Device Settings > Power > Optimized Charging > Change, the title of the battery charge limit feature, which explicitly limits the battery charging to 80%." translateable="false"> + Charge limit + </message> <message name="IDS_SETTINGS_POWER_IDLE_DISPLAY_OFF_SLEEP" desc="In Device Settings > Power, menu item for idle behavior that turns the screen off and later puts the device to sleep. String must be short enough to fit in a drop-down menu."> Sleep </message>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 566d5db..1ed73fc5 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -7940,12 +7940,6 @@ flag_descriptions::kSupportToolScreenshotDescription, kOsDesktop, FEATURE_VALUE_TYPE(features::kSupportToolScreenshot)}, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) - {"wasm-tts-component-updater-enabled", - flag_descriptions::kWasmTtsComponentUpdaterEnabledName, - flag_descriptions::kWasmTtsComponentUpdaterEnabledDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kWasmTtsComponentUpdaterEnabled)}, -#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) #endif // !BUILDFLAG(IS_ANDROID) {"enable-auto-disable-accessibility", @@ -10630,12 +10624,6 @@ STRING_VALUE_TYPE(ash::switches::kSealKey, "")}, #endif -#if BUILDFLAG(ENABLE_HLS_DEMUXER) - {"enable-builtin-hls", flag_descriptions::kEnableBuiltinHlsName, - flag_descriptions::kEnableBuiltinHlsDescription, kOsAll, - FEATURE_VALUE_TYPE(media::kBuiltInHlsPlayer)}, -#endif - #if !BUILDFLAG(IS_CHROMEOS) {"profiles-reordering", flag_descriptions::kProfilesReorderingName, flag_descriptions::kProfilesReorderingDescription, kOsDesktop,
diff --git a/chrome/browser/android/content/content_utils.cc b/chrome/browser/android/content/content_utils.cc index 7a81977..6319a5e8 100644 --- a/chrome/browser/android/content/content_utils.cc +++ b/chrome/browser/android/content/content_utils.cc
@@ -21,6 +21,8 @@ jboolean j_override_in_new_tabs) { constexpr char kLinuxInfoStr[] = "X11; Linux x86_64"; + // Note: Any updates to desktop overrides here should also be applied to + // DESKTOP form factor defaults in embedder_support::GetUserAgentMetadata. const blink::UserAgentMetadata metadata = embedder_support::GetUserAgentMetadata();
diff --git a/chrome/browser/chromeos/extensions/smart_card_provider_private/smart_card_provider_private_api.cc b/chrome/browser/chromeos/extensions/smart_card_provider_private/smart_card_provider_private_api.cc index 0a4d7c35..14d555de0 100644 --- a/chrome/browser/chromeos/extensions/smart_card_provider_private/smart_card_provider_private_api.cc +++ b/chrome/browser/chromeos/extensions/smart_card_provider_private/smart_card_provider_private_api.cc
@@ -4,9 +4,7 @@ #include "chrome/browser/chromeos/extensions/smart_card_provider_private/smart_card_provider_private_api.h" -#include <queue> -#include <variant> - +#include "base/containers/circular_deque.h" #include "base/functional/bind.h" #include "base/no_destructor.h" #include "base/notreached.h" @@ -21,6 +19,8 @@ #include "mojo/public/cpp/bindings/pending_associated_remote.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/device/public/mojom/smart_card.mojom.h" +#include "third_party/abseil-cpp/absl/container/flat_hash_map.h" +#include "third_party/abseil-cpp/absl/container/flat_hash_set.h" namespace scard_api = extensions::api::smart_card_provider_private; @@ -339,15 +339,15 @@ // This queue contains requests from device::mojom::SmartCardContext or // device::mojom::SmartCardConnection for this context that have arrived // while it was waiting for the result of a previous request. - std::queue<base::OnceClosure> task_queue; + base::circular_deque<base::OnceClosure> task_queue; // All device::mojom::SmartCardConnection receivers created on this context. - std::set<mojo::ReceiverId> connection_receiver_ids; + absl::flat_hash_set<mojo::ReceiverId> connection_receiver_ids; // Maps a valid PC/SC Handle to whether it has an active transaction. Ie, // transactions begun by the browser and that, therefore, the browser should // also end. - std::map<Handle, bool> handles_map; + absl::flat_hash_map<Handle, bool> handles_map; }; // static @@ -531,7 +531,7 @@ void SmartCardProviderPrivateAPI::RunOrQueueRequest(ContextId scard_context, base::OnceClosure request) { if (IsContextBusy(scard_context)) { - GetContextData(scard_context).task_queue.push(std::move(request)); + GetContextData(scard_context).task_queue.push_back(std::move(request)); return; } @@ -970,7 +970,7 @@ } auto task = std::move(context_data.task_queue.front()); - context_data.task_queue.pop(); + context_data.task_queue.pop_front(); std::move(task).Run(); } @@ -1103,8 +1103,8 @@ const std::string provider_extension_id = GetListenerExtensionId(*event); if (provider_extension_id.empty()) { - ResultPtr error(std::in_place); - error->set_error(SmartCardError::kNoService); + using Result = typename ResultPtr::element_type; + ResultPtr error = Result::NewError(SmartCardError::kNoService); std::move(callback).Run(std::move(error)); return; }
diff --git a/chrome/browser/custom_handlers/chrome_protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/chrome_protocol_handler_registry_unittest.cc index 966e2e0..a72a5c1 100644 --- a/chrome/browser/custom_handlers/chrome_protocol_handler_registry_unittest.cc +++ b/chrome/browser/custom_handlers/chrome_protocol_handler_registry_unittest.cc
@@ -69,20 +69,3 @@ blink::ProtocolHandlerSecurityLevel::kExtensionFeatures)); } #endif // BUILDFLAG(ENABLE_EXTENSIONS) - -// Isolated Web Apps test -#if !BUILDFLAG(IS_ANDROID) -TEST_F(ChromeProtocolHandlerRegistryTest, IsolatedWebApps) { - GURL isolated_web_apps_handler_url( - "isolated-app://aerugqztij5biqquuk3mfwpsaibuegaqcitgfchwuosuofdjabzqaaic/" - "test.html"); - - EXPECT_FALSE(ProtocolHandlerCanRegisterProtocol( - "news", isolated_web_apps_handler_url, - blink::ProtocolHandlerSecurityLevel::kStrict)); - - EXPECT_TRUE(ProtocolHandlerCanRegisterProtocol( - "news", isolated_web_apps_handler_url, - blink::ProtocolHandlerSecurityLevel::kSameOrigin)); -} -#endif // !BUILDFLAG(IS_ANDROID)
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc index cb48f1f..72022451 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
@@ -9,6 +9,7 @@ #include <vector> #include "base/scoped_observation.h" +#include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/test/gmock_expected_support.h" #include "base/time/time.h" @@ -47,13 +48,6 @@ namespace { -std::string EncodeUrl(const std::string& not_encoded) { - url::RawCanonOutputT<char> encoded; - url::EncodeURIComponent(not_encoded, &encoded); - - return {encoded.data(), encoded.length()}; -} - class ProtocolHandlerChangeWaiter : public ProtocolHandlerRegistry::Observer { public: explicit ProtocolHandlerChangeWaiter(ProtocolHandlerRegistry* registry) { @@ -131,8 +125,7 @@ ASSERT_TRUE(registry->IsHandledProtocol(protocol)); } - void RemoveProtocolHandler(const std::string& protocol, - const GURL& url) { + void RemoveProtocolHandler(const std::string& protocol, const GURL& url) { ProtocolHandler handler = ProtocolHandler::CreateProtocolHandler(protocol, url); ProtocolHandlerRegistry* registry = @@ -378,7 +371,7 @@ web_app::IsolatedWebAppBrowserTestHarness; IN_PROC_BROWSER_TEST_F(ChromeRegisterProtocolHandlerIsolatedWebAppsTest, - Basic) { + NotAllowedFromIWA) { std::unique_ptr<web_app::ScopedBundledIsolatedWebApp> app = web_app::IsolatedWebAppBuilder(web_app::ManifestBuilder()).BuildBundle(); ASSERT_OK_AND_ASSIGN(web_app::IsolatedWebAppUrlInfo url_info, @@ -388,91 +381,23 @@ content::WebContents* web_contents = browser->tab_strip_model()->GetActiveWebContents(); - permissions::PermissionRequestManager::FromWebContents(web_contents) - ->set_auto_response_for_test( - permissions::PermissionRequestManager::ACCEPT_ALL); + GURL protocol_url = + url_info.origin().GetURL().Resolve("/index.html?params=%s"); + static constexpr std::string_view kRegisterProtocolScript = R"( + navigator.registerProtocolHandler("web+meow", "%s"); + )"; + ASSERT_THAT(EvalJs(web_contents, base::StringPrintf(kRegisterProtocolScript, + protocol_url.spec())) + .error, + testing::HasSubstr("Isolated Web Apps do not support " + "registering/unregistering protocol")); - GURL app_url = url_info.origin().GetURL(); - - struct TestCase { - std::string scheme; - std::string url; - bool result; - }; - - std::vector<TestCase> test_cases = { - // non-custom scheme, relative URL (same origin) - {"geo", "/protocol_handler=", true}, - // non-custom scheme, full URL (same origin) - {"geo", app_url.spec() + "protocol_handler=", true}, - // non-custom scheme, IWA URL (cross origin) - {"geo", - "isolated-app://" - "aerugqztij5biqquuk3mfwpsaibuegaqcitgfchwuosuofdjabzqaaic/" - "protocol_handler=", - false}, - // non-custom scheme, HTTPS URL (cross origin) - {"geo", "https://www.google.com/search?q=", false}, - // - // custom scheme (web+), relative URL (same origin) - {"web+foo", "/protocol_handler=", true}, - // custom scheme (web+), full URL (same origin) - {"web+foo", app_url.spec() + "protocol_handler=", true}, - // custom scheme (web+), IWA URL (cross origin) - {"web+foo", - "isolated-app://" - "aerugqztij5biqquuk3mfwpsaibuegaqcitgfchwuosuofdjabzqaaic/" - "protocol_handler=", - false}, - // custom scheme (web+), HTTPS URL (cross origin) - {"web+foo", "https://www.google.com/search?q=", false}, - // - // custom scheme (ext+), relative URL (same origin) - {"ext+foo", "/protocol_handler=", false}, - // custom scheme (ext+), full URL (same origin) - {"ext+foo", app_url.spec() + "protocol_handler=", false}, - // custom scheme (ext+), IWA URL (cross origin) - {"ext+foo", - "isolated-app://" - "aerugqztij5biqquuk3mfwpsaibuegaqcitgfchwuosuofdjabzqaaic/" - "protocol_handler=", - false}, - // custom scheme (ext+), HTTPS URL (cross origin) - {"ext+foo3", "https://www.google.com/search?q=", false}, - }; - - ProtocolHandlerRegistry* registry = - ProtocolHandlerRegistryFactory::GetForBrowserContext(profile()); - - for (const auto& test_case : test_cases) { - auto js = content::JsReplace("navigator.registerProtocolHandler($1, $2);", - test_case.scheme, test_case.url + "%s"); - SCOPED_TRACE(testing::Message() - << "Registering protocol handler w/ " << js); - registry->ClearUserDefinedHandlers(base::Time(), base::Time::Max()); - ProtocolHandlerChangeWaiter waiter(registry); - - auto result = content::ExecJs(web_contents->GetPrimaryMainFrame(), js); - EXPECT_EQ(result, test_case.result); - - if (result) { - // Wait for the registration to complete and test the handler. - waiter.Wait(); - - EXPECT_TRUE(ui_test_utils::NavigateToURL( - this->browser(), GURL(test_case.scheme + ":test"))); - - std::string expected_url_string = - test_case.url + EncodeUrl(test_case.scheme + ":test"); - GURL expected_url(expected_url_string); - // If `expected_url_string` is a relative URL, it will be resolved with - // `app_url` as the base URL. If `expected_url_string` is an absolute URL, - // it'll be returned as is. - expected_url = app_url.Resolve(expected_url_string); - EXPECT_EQ(expected_url, this->browser() - ->tab_strip_model() - ->GetActiveWebContents() - ->GetLastCommittedURL()); - } - } + static constexpr std::string_view kUnegisterProtocolScript = R"( + navigator.unregisterProtocolHandler("web+meow", "%s"); + )"; + ASSERT_THAT(EvalJs(web_contents, base::StringPrintf(kUnegisterProtocolScript, + protocol_url.spec())) + .error, + testing::HasSubstr("Isolated Web Apps do not support " + "registering/unregistering protocol")); }
diff --git a/chrome/browser/download/internal/android/java/res/layout/download_manager_generic_item.xml b/chrome/browser/download/internal/android/java/res/layout/download_manager_generic_item.xml index 3178a19..cfca8a2 100644 --- a/chrome/browser/download/internal/android/java/res/layout/download_manager_generic_item.xml +++ b/chrome/browser/download/internal/android/java/res/layout/download_manager_generic_item.xml
@@ -14,7 +14,7 @@ android:minHeight="64dp" android:clickable="true" android:focusable="true" - android:background="@macro/default_bg_color" + android:background="@drawable/list_item_rounded_background_selector" app:columnCount="3" app:rowCount="2">
diff --git a/chrome/browser/download/internal/android/java/res/layout/download_manager_in_progress_item.xml b/chrome/browser/download/internal/android/java/res/layout/download_manager_in_progress_item.xml index 37971e9..8d01144 100644 --- a/chrome/browser/download/internal/android/java/res/layout/download_manager_in_progress_item.xml +++ b/chrome/browser/download/internal/android/java/res/layout/download_manager_in_progress_item.xml
@@ -13,7 +13,7 @@ android:minHeight="64dp" android:clickable="true" android:focusable="true" - android:background="@macro/default_bg_color" + android:background="@drawable/list_item_rounded_background_selector" app:columnCount="3" app:rowCount="2">
diff --git a/chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle_unittest.cc b/chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle_browsertest.cc similarity index 85% rename from chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle_unittest.cc rename to chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle_browsertest.cc index 076e0377..1863a68 100644 --- a/chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle_unittest.cc +++ b/chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle_browsertest.cc
@@ -4,25 +4,33 @@ #include "chrome/browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle.h" +#include <memory> + #include "base/base64.h" #include "base/base64url.h" #include "base/json/json_writer.h" +#include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/profile_management/profile_management_features.h" #include "chrome/browser/enterprise/signin/mock_oidc_authentication_signin_interceptor.h" #include "chrome/browser/enterprise/signin/oidc_authentication_signin_interceptor_factory.h" #include "chrome/browser/enterprise/signin/oidc_metrics_utils.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/test/base/browser_with_test_window_test.h" -#include "chrome/test/base/testing_profile_manager.h" +#include "chrome/test/base/in_process_browser_test.h" +#include "chrome/test/base/ui_test_utils.h" #include "components/ukm/test_ukm_recorder.h" #include "content/public/browser/web_contents.h" +#include "content/public/test/browser_test.h" #include "content/public/test/mock_navigation_handle.h" #include "content/public/test/mock_navigation_throttle_registry.h" +#include "content/public/test/test_renderer_host.h" +#include "net/dns/mock_host_resolver.h" #include "net/http/http_response_headers.h" #include "net/http/http_util.h" #include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h" @@ -140,6 +148,17 @@ net::HttpUtil::AssembleRawHeaders(raw_response_headers)); } +// Return the child of `parent`. +content::RenderFrameHost* GetChild(content::RenderFrameHost& parent) { + content::RenderFrameHost* child_rfh = nullptr; + parent.ForEachRenderFrameHost([&](content::RenderFrameHost* rfh) { + if (&parent == rfh->GetParent()) { + child_rfh = rfh; + } + }); + return child_rfh; +} + } // namespace namespace profile_management { @@ -164,7 +183,7 @@ } class OidcAuthResponseCaptureNavigationThrottleTest - : public BrowserWithTestWindowTest, + : public InProcessBrowserTest, public testing::WithParamInterface<std::tuple<bool, bool, bool>> { public: explicit OidcAuthResponseCaptureNavigationThrottleTest( @@ -195,12 +214,16 @@ ~OidcAuthResponseCaptureNavigationThrottleTest() override = default; - void SetUp() override { - BrowserWithTestWindowTest::SetUp(); + void SetUpOnMainThread() override { + InProcessBrowserTest::SetUpOnMainThread(); + + in_process_data_decoder_ = + std::make_unique<data_decoder::test::InProcessDataDecoder>(); + test_ukm_recorder_ = std::make_unique<ukm::TestAutoSetUkmRecorder>(); OidcAuthenticationSigninInterceptorFactory::GetInstance() ->SetTestingFactory( - profile(), + browser()->profile(), base::BindRepeating( [](Profile* profile, content::BrowserContext* context) -> std::unique_ptr<KeyedService> { @@ -209,17 +232,17 @@ profile, std::make_unique<DiceWebSigninInterceptorDelegate>()); }, - profile())); + browser()->profile())); - // Create the first tab so that web_contents() exists. - AddTab(browser(), GURL(url::kAboutBlankURL)); + host_resolver()->AddRule("*", "127.0.0.1"); + embedded_test_server()->ServeFilesFromSourceDirectory("content/test/data"); + ASSERT_TRUE(embedded_test_server()->Start()); } - void TearDown() override { BrowserWithTestWindowTest::TearDown(); } - MockOidcAuthenticationSigninInterceptor* GetMockOidcInterceptor() { return static_cast<MockOidcAuthenticationSigninInterceptor*>( - OidcAuthenticationSigninInterceptorFactory::GetForProfile(profile())); + OidcAuthenticationSigninInterceptorFactory::GetForProfile( + browser()->profile())); } void ValidateOidcTokens(ProfileManagementOidcTokens tokens, @@ -242,6 +265,8 @@ MockOidcAuthenticationSigninInterceptor* oidc_interceptor, const std::string& redirection_url, NavigationThrottle::ThrottleAction expected_throttle_action) { + base::RunLoop run_loop; + content::MockNavigationHandle navigation_handle( GURL(kOidcEntraReprocessUrl), main_frame()); @@ -257,8 +282,7 @@ auto* throttle = registry.throttles().back().get(); if (expected_throttle_action == NavigationThrottle::DEFER) { - throttle->set_resume_callback_for_testing( - task_environment()->QuitClosure()); + throttle->set_resume_callback_for_testing(run_loop.QuitClosure()); } SetupRedirectionForHandle( @@ -269,7 +293,7 @@ throttle->WillRedirectRequest().action()); if (expected_throttle_action == NavigationThrottle::DEFER) { - task_environment()->RunUntilQuit(); + run_loop.Run(); } } @@ -326,6 +350,7 @@ void TestInterceptionForUrl(bool add_oidc_state, bool should_log_ukm, std::string source_url) { + base::RunLoop run_loop; std::string auth_token = BuildTokenFromDict( base::Value::Dict() .Set(kUserPrincipleNameClaimName, kExampleUserPrincipleName) @@ -369,11 +394,10 @@ EXPECT_EQ(NavigationThrottle::PROCEED, throttle->WillRedirectRequest().action()); } else { - throttle->set_resume_callback_for_testing( - task_environment()->QuitClosure()); + throttle->set_resume_callback_for_testing(run_loop.QuitClosure()); EXPECT_EQ(NavigationThrottle::DEFER, throttle->WillRedirectRequest().action()); - task_environment()->RunUntilQuit(); + run_loop.Run(); } if (should_log_ukm) { @@ -384,6 +408,8 @@ } void TestHeaderInterceptionForUrl(std::string source_url) { + base::RunLoop run_loop; + content::MockNavigationHandle navigation_handle(GURL(source_url), main_frame()); navigation_handle.set_response_headers(BuildExampleResponseHeader()); @@ -401,11 +427,10 @@ ASSERT_EQ(1u, registry.throttles().size()); auto* throttle = registry.throttles().back().get(); - throttle->set_resume_callback_for_testing( - task_environment()->QuitClosure()); + throttle->set_resume_callback_for_testing(run_loop.QuitClosure()); EXPECT_EQ(NavigationThrottle::DEFER, throttle->WillProcessResponse().action()); - task_environment()->RunUntilQuit(); + run_loop.Run(); } void ExpectHeadersInvalid(scoped_refptr<net::HttpResponseHeaders> headers) { @@ -450,12 +475,12 @@ void ExpectNoUkmLogged() const { EXPECT_TRUE( - test_ukm_recorder_.GetEntriesByName(kProfileEnrollmentUkm).empty()); + test_ukm_recorder_->GetEntriesByName(kProfileEnrollmentUkm).empty()); } void ExpectUkmLogged(uint64_t navigation_id) const { const auto& entries = - test_ukm_recorder_.GetEntriesByName(kProfileEnrollmentUkm); + test_ukm_recorder_->GetEntriesByName(kProfileEnrollmentUkm); ASSERT_EQ(entries.size(), 1U); const auto& entry = entries[0]; ukm::TestAutoSetUkmRecorder::ExpectEntryMetric( @@ -482,15 +507,17 @@ bool enable_process_response() { return std::get<2>(GetParam()); } protected: - data_decoder::test::InProcessDataDecoder in_process_data_decoder_; + std::unique_ptr<data_decoder::test::InProcessDataDecoder> + in_process_data_decoder_; base::HistogramTester histogram_tester_; - ukm::TestAutoSetUkmRecorder test_ukm_recorder_; + std::unique_ptr<ukm::TestAutoSetUkmRecorder> test_ukm_recorder_; private: base::test::ScopedFeatureList scoped_feature_list_; }; -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, SuccessfulInterception) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + SuccessfulInterception) { TestInterceptionForUrl(/*add_oidc_state=*/false, /*should_log_ukm=*/false, /*source_url=*/kOidcEntraReprocessUrl); @@ -498,15 +525,15 @@ OidcInterceptionFunnelStep::kSuccessfulInfoParsed, std::nullopt); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, - SuccessfulHeaderInterception) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + SuccessfulHeaderInterception) { TestHeaderInterceptionForUrl(kHeaderInterceptionTestUrl); CheckFunnelAndResultHistogram( OidcInterceptionFunnelStep::kSuccessfulInfoParsed, std::nullopt); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, - HeaderInterceptionInvalidUrl) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + HeaderInterceptionInvalidUrl) { content::MockNavigationHandle navigation_handle( GURL("https://invalidurl/register"), main_frame()); navigation_handle.set_response_headers(BuildExampleResponseHeader()); @@ -535,34 +562,34 @@ 0); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, - HeaderInterceptionMissingHeader) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + HeaderInterceptionMissingHeader) { ExpectHeadersInvalid(nullptr); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, - HeaderInterceptionMissingIss) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + HeaderInterceptionMissingIss) { ExpectHeadersInvalid(BuildExampleResponseHeader( /*issuer=*/std::string())); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, - HeaderInterceptionMissingSub) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + HeaderInterceptionMissingSub) { ExpectHeadersInvalid(BuildExampleResponseHeader( /*issuer=*/kExampleIdIssuer, /*subject_id=*/std::string())); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, - HeaderInterceptionMissingCode) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + HeaderInterceptionMissingCode) { ExpectHeadersInvalid(BuildExampleResponseHeader( /*issuer=*/kExampleIdIssuer, /*subject_id=*/kExampleIdSubject, /*encoded_user_info=*/std::string())); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, - SuccessfulInterceptionWithState) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + SuccessfulInterceptionWithState) { TestInterceptionForUrl(/*add_oidc_state=*/true, /*should_log_ukm=*/false, /*source_url=*/kOidcEntraReprocessUrl); @@ -571,7 +598,8 @@ ExpectNoUkmLogged(); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, MsftKmsiThrottling) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + MsftKmsiThrottling) { TestInterceptionForUrl(/*add_oidc_state=*/false, /*should_log_ukm=*/false, /*source_url=*/kOidcEntraKmsiUrl); @@ -579,7 +607,8 @@ OidcInterceptionFunnelStep::kSuccessfulInfoParsed, std::nullopt); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, MsftGuidThrottling) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + MsftGuidThrottling) { TestInterceptionForUrl( /*add_oidc_state=*/false, /*should_log_ukm=*/false, @@ -589,7 +618,8 @@ OidcInterceptionFunnelStep::kSuccessfulInfoParsed, std::nullopt); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, McasThrottling) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + McasThrottling) { TestInterceptionForUrl( /*add_oidc_state=*/false, /*should_log_ukm=*/false, /*source_url=*/ @@ -598,7 +628,8 @@ OidcInterceptionFunnelStep::kSuccessfulInfoParsed, std::nullopt); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, MissingAuthToken) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + MissingAuthToken) { std::string id_token = BuildTokenFromDict( base::Value::Dict() .Set(kUserPrincipleNameClaimName, kExampleUserPrincipleName) @@ -606,7 +637,8 @@ .Set(kIssuerClaimName, kExampleIdIssuer)); std::string redirection_url = BuildOidcResponseUrl( - /*oidc_auth_token=*/std::string(), id_token, /*state=*/std::string()); + /*oidc_auth_token=*/std::string(), id_token, + /*oidc_state=*/std::string()); auto* oidc_interceptor = GetMockOidcInterceptor(); RunThrottleAndExpectNoOidcInterception(oidc_interceptor, redirection_url, @@ -616,14 +648,16 @@ OidcInterceptionResult::kInvalidUrlOrTokens); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, MissingIdToken) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + MissingIdToken) { std::string auth_token = BuildTokenFromDict( base::Value::Dict() .Set(kUserPrincipleNameClaimName, kExampleUserPrincipleName) .Set(kSubjectClaimName, kExampleAuthSubject)); - std::string redirection_url = BuildOidcResponseUrl( - auth_token, /*oidc_id_token=*/std::string(), /*state=*/std::string()); + std::string redirection_url = + BuildOidcResponseUrl(auth_token, /*oidc_id_token=*/std::string(), + /*oidc_state=*/std::string()); auto* oidc_interceptor = GetMockOidcInterceptor(); RunThrottleAndExpectNoOidcInterception(oidc_interceptor, redirection_url, @@ -633,7 +667,8 @@ OidcInterceptionResult::kInvalidUrlOrTokens); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, MissingIdTokenSubClaim) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + MissingIdTokenSubClaim) { std::string auth_token = BuildTokenFromDict(base::Value::Dict().Set( kUserPrincipleNameClaimName, kExampleUserPrincipleName)); std::string id_token = BuildTokenFromDict( @@ -652,7 +687,8 @@ OidcInterceptionResult::kInvalidUrlOrTokens); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, MissingIdTokenIssClaim) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + MissingIdTokenIssClaim) { std::string auth_token = BuildTokenFromDict(base::Value::Dict().Set( kUserPrincipleNameClaimName, kExampleUserPrincipleName)); std::string id_token = BuildTokenFromDict( @@ -671,7 +707,8 @@ OidcInterceptionResult::kInvalidUrlOrTokens); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, EmptyIdJson) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + EmptyIdJson) { std::string auth_token = BuildTokenFromDict( base::Value::Dict().Set(kSubjectClaimName, kExampleAuthSubject)); std::string id_token = BuildTokenFromDict(base::Value::Dict()); @@ -687,8 +724,8 @@ OidcInterceptionResult::kInvalidUrlOrTokens); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, - WrongNumberOfJwtSections) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + WrongNumberOfJwtSections) { std::string auth_token = BuildTokenFromDict( base::Value::Dict() .Set(kUserPrincipleNameClaimName, kExampleUserPrincipleName) @@ -714,7 +751,8 @@ OidcInterceptionResult::kInvalidUrlOrTokens); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, DecodeFailure) { +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + DecodeFailure) { // The payload section of this token is not encoded. std::string malformed_id_token = base::StringPrintf( kTokenTemplate, kDummyHeader, @@ -742,22 +780,33 @@ OidcInterceptionResult::kInvalidUrlOrTokens); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, NoServiceForGuestMode) { - TestNoServiceForInvalidProfile(profile_manager()->CreateGuestProfile()); +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + NoServiceForGuestMode) { + Browser* guest_browser = CreateGuestBrowser(); + ASSERT_NE(guest_browser, nullptr); + TestNoServiceForInvalidProfile(guest_browser->GetProfile()); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, NoServiceForIncognito) { - TestNoServiceForInvalidProfile(profile()->GetOffTheRecordProfile( +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + NoServiceForIncognito) { + TestNoServiceForInvalidProfile(browser()->profile()->GetOffTheRecordProfile( Profile::OTRProfileID::CreateUniqueForTesting(), /*create_if_needed=*/true)); } -TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, NotInMainFrame) { - content::RenderFrameHost* subframe = - content::RenderFrameHostTester::For(main_frame()) - ->AppendChild("subframe"); +IN_PROC_BROWSER_TEST_P(OidcAuthResponseCaptureNavigationThrottleTest, + NotInMainFrame) { + GURL test_url(embedded_test_server()->GetURL( + "/frame_tree/page_with_iframe_in_div.html")); + + EXPECT_TRUE(ui_test_utils::NavigateToURL(browser(), test_url)); + ASSERT_TRUE(main_frame()->IsRenderFrameLive()) << "Main frame is not live!"; + + content::RenderFrameHost* child = GetChild(*main_frame()); + ASSERT_TRUE(child); + content::MockNavigationHandle navigation_handle(GURL(kOidcEntraReprocessUrl), - subframe); + child); content::MockNavigationThrottleRegistry registry( &navigation_handle, @@ -786,8 +835,8 @@ // Test case for when the source URL of OIDC authentication is not considered // to be valid. We should only consider interception if Generic OIDC flag is // enabled. -TEST_P(OidcAuthNavigationThrottleGenericOidcTest, - SuccessfulInterceptionWithState_invalidSourceUrl) { +IN_PROC_BROWSER_TEST_P(OidcAuthNavigationThrottleGenericOidcTest, + SuccessfulInterceptionWithState_invalidSourceUrl) { TestInterceptionForUrl( /*add_oidc_state=*/true, /*should_log_ukm=*/!enable_generic_oidc(), @@ -799,7 +848,10 @@ } } -TEST_P(OidcAuthNavigationThrottleGenericOidcTest, MissingRedirectionChain) { +IN_PROC_BROWSER_TEST_P(OidcAuthNavigationThrottleGenericOidcTest, + MissingRedirectionChain) { + base::RunLoop run_loop; + std::string auth_token = BuildTokenFromDict( base::Value::Dict() .Set(kUserPrincipleNameClaimName, kExampleUserPrincipleName) @@ -834,11 +886,10 @@ auto* throttle = registry.throttles().back().get(); if (enable_generic_oidc()) { - throttle->set_resume_callback_for_testing( - task_environment()->QuitClosure()); + throttle->set_resume_callback_for_testing(run_loop.QuitClosure()); EXPECT_EQ(NavigationThrottle::DEFER, throttle->WillRedirectRequest().action()); - task_environment()->RunUntilQuit(); + run_loop.Run(); } else { EXPECT_EQ(NavigationThrottle::PROCEED, throttle->WillRedirectRequest().action()); @@ -862,7 +913,8 @@ ~OidcAuthNavigationThrottleFeatureDisabledTest() override = default; }; -TEST_P(OidcAuthNavigationThrottleFeatureDisabledTest, NoThrottleCreation) { +IN_PROC_BROWSER_TEST_P(OidcAuthNavigationThrottleFeatureDisabledTest, + NoThrottleCreation) { content::MockNavigationHandle msft_navigation_handle( GURL(kOidcEntraReprocessUrl), main_frame()); content::MockNavigationThrottleRegistry msft_registry( @@ -888,7 +940,8 @@ ExpectNoUkmLogged(); } -TEST_P(OidcAuthNavigationThrottleFeatureDisabledTest, NoInterceptorCreation) { +IN_PROC_BROWSER_TEST_P(OidcAuthNavigationThrottleFeatureDisabledTest, + NoInterceptorCreation) { ASSERT_EQ(nullptr, GetMockOidcInterceptor()); } @@ -911,8 +964,8 @@ // Direction navigation should not trigger OIDC enrollment regardless of // whether ProcessResponse is enabled -TEST_P(OidcAuthNavigationThrottleProcessResponseTest, - NoInterceptionForDirectNavigation) { +IN_PROC_BROWSER_TEST_P(OidcAuthNavigationThrottleProcessResponseTest, + NoInterceptionForDirectNavigation) { std::string direct_navigate_url = BuildStandardResponseUrl(/*oidc_state=*/std::string()); @@ -941,7 +994,10 @@ } } -TEST_P(OidcAuthNavigationThrottleProcessResponseTest, ProcessResponse) { +IN_PROC_BROWSER_TEST_P(OidcAuthNavigationThrottleProcessResponseTest, + ProcessResponse) { + base::RunLoop run_loop; + std::string auth_token = BuildTokenFromDict( base::Value::Dict() .Set(kUserPrincipleNameClaimName, kExampleUserPrincipleName) @@ -977,8 +1033,7 @@ auto* throttle = registry.throttles().back().get(); if (enable_process_response()) { - throttle->set_resume_callback_for_testing( - task_environment()->QuitClosure()); + throttle->set_resume_callback_for_testing(run_loop.QuitClosure()); SetupRedirectionForHandle( navigation_handle, @@ -987,7 +1042,7 @@ EXPECT_EQ(NavigationThrottle::DEFER, throttle->WillProcessResponse().action()); - task_environment()->RunUntilQuit(); + run_loop.Run(); CheckFunnelAndResultHistogram( OidcInterceptionFunnelStep::kSuccessfulInfoParsed, std::nullopt); } else { @@ -1021,7 +1076,8 @@ } }; -TEST_P(OidcAuthNavigationThrottleUrlMatchingTest, MsftThrottleUrlMatching) { +IN_PROC_BROWSER_TEST_P(OidcAuthNavigationThrottleUrlMatchingTest, + MsftThrottleUrlMatching) { TestUrlMatching("https://login.microsoftonline.com/some-tenant-id/reprocess"); TestUrlMatching("https://login.microsoftonline.com/common/reprocess"); TestUrlMatching("https://login.microsoftonline.com/some-tenant-id/login"); @@ -1036,14 +1092,16 @@ TestUrlMatching("https://login.microsoftonline.com/common/somethingelse"); } -TEST_P(OidcAuthNavigationThrottleUrlMatchingTest, AdditionalHostMatching) { +IN_PROC_BROWSER_TEST_P(OidcAuthNavigationThrottleUrlMatchingTest, + AdditionalHostMatching) { TestUrlMatching("https://add-host1.com/some-tenant-id/reprocess"); TestUrlMatching("https://add-host2.com/common/reprocess"); TestUrlMatching("https://add-host3.com/common/reprocess"); TestUrlMatching("http://add-host3.com/common/reprocess"); } -TEST_P(OidcAuthNavigationThrottleUrlMatchingTest, MsftThrottleUrlNotMatching) { +IN_PROC_BROWSER_TEST_P(OidcAuthNavigationThrottleUrlMatchingTest, + MsftThrottleUrlNotMatching) { TestUrlMatching("https://mismatchhost.microsoftonline.com/common/reprocess", /*expect_matched=*/false); TestUrlMatching("https://add-host1.ca/common/reprocess",
diff --git a/chrome/browser/extensions/web_accessible_resources_browsertest.cc b/chrome/browser/extensions/web_accessible_resources_browsertest.cc index c84274ac..972b4f8 100644 --- a/chrome/browser/extensions/web_accessible_resources_browsertest.cc +++ b/chrome/browser/extensions/web_accessible_resources_browsertest.cc
@@ -595,6 +595,70 @@ } #if !BUILDFLAG(IS_ANDROID) + +// TODO(crbug.com/425708956): Enable this test for desktop Android. +class WebAccessibleResourcesServiceWorkerBrowserTest + : public WebAccessibleResourcesBrowserTest { + public: + WebAccessibleResourcesServiceWorkerBrowserTest() { + UseHttpsTestServer(); + + // Add any host names used by tests from this class to the test server's SSL + // config since tests will navigate there. + net::EmbeddedTestServer::ServerCertificateConfig cert_config; + cert_config.dns_names = {"example.com"}; + embedded_test_server()->SetSSLConfig(cert_config); + } + + ~WebAccessibleResourcesServiceWorkerBrowserTest() override = default; + WebAccessibleResourcesServiceWorkerBrowserTest( + const WebAccessibleResourcesServiceWorkerBrowserTest&) = delete; + WebAccessibleResourcesServiceWorkerBrowserTest& operator=( + const WebAccessibleResourcesServiceWorkerBrowserTest&) = delete; + + protected: + void RegisterServiceWorker(const std::string& host_name, + const std::string& worker_path, + const std::optional<std::string>& scope) { + GURL url = embedded_test_server()->GetURL( + host_name, "/service_worker/create_service_worker.html"); + EXPECT_TRUE(NavigateToURL(url)); + std::string script = content::JsReplace("register($1, $2);", worker_path, + scope ? *scope : std::string()); + EXPECT_EQ("DONE", EvalJs(GetActiveWebContents(), script)); + } +}; + +// Test that DNR redirects to the extension's web accessible resource work when +// the page has a service worker. Unlike the WebAccessibleResourcesBrowserTest +// version, the service worker causes a renderer level redirect check for the +// web accessible resource. +// Regression test for crbug.com/375395102. +IN_PROC_BROWSER_TEST_F(WebAccessibleResourcesServiceWorkerBrowserTest, + DNRRedirect) { + // Register a service worker and navigate to a page it controls. + RegisterServiceWorker("example.com", "fetch_event_pass_through.js", + std::nullopt); + EXPECT_TRUE(NavigateToURL(embedded_test_server()->GetURL( + "example.com", "/service_worker/fetch_from_page.html"))); + + const Extension* extension = LoadExtension(test_data_dir_.AppendASCII( + "web_accessible_resources/dnr/redirect_with_initiator")); + ASSERT_TRUE(extension); + + // Fetch the english page. It should be redirected to the extension's web + // accessible resource. Note: we "lose" the service worker if we attempt to + // navigate to the page instead, so a fetch is used here. + auto result = + EvalJs(GetActiveWebContents(), "fetch_from_page('/english_page.html');"); + + std::string expected_content = + "// Redirect with initiator's web accessible resource!"; + EXPECT_TRUE(result.ExtractString().find(expected_content) != + std::string::npos) + << expected_content << " not found in " << result.ExtractString(); +} + // TODO(crbug.com/390687767): Port to desktop Android. Currently the redirect // doesn't happen.
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 88bd319..1ba37bb 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -2859,11 +2859,6 @@ "expiry_milestone": 140 }, { - "name": "enable-builtin-hls", - "owners": ["tmathmeyer@chromium.org", "videostack-eng@google.com"], - "expiry_milestone": 136 - }, - { "name": "enable-canvas-noise", "owners": [ "tov@chromium.org", @@ -10169,15 +10164,6 @@ "expiry_milestone": 130 }, { - "name": "wasm-tts-component-updater-enabled", - "owners": [ - "xiangxiao@google.com", - "lwinston@google.com", - "//ui/accessibility/OWNERS" - ], - "expiry_milestone": 145 - }, - { "name": "wayland-linux-drm-syncobj", "owners": [ "orko@igalia.com",
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index f934253d..5404445 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -6060,14 +6060,6 @@ "Add an option to the translate bubble menu to open language settings."; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -const char kWasmTtsComponentUpdaterEnabledName[] = - "Enable Wasm TTS Extension Component"; -const char kWasmTtsComponentUpdaterEnabledDescription[] = - "Enable updating the wasm TTS extension resource files through the " - "Component Updater."; -#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) - const char kWebAuthenticationPermitEnterpriseAttestationName[] = "Web Authentication Enterprise Attestation"; const char kWebAuthenticationPermitEnterpriseAttestationDescription[] = @@ -8653,12 +8645,6 @@ "Enables profile management triggered by generic OIDC authentications."; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -#if BUILDFLAG(ENABLE_HLS_DEMUXER) -const char kEnableBuiltinHlsName[] = "Builtin HLS player"; -const char kEnableBuiltinHlsDescription[] = - "Enables chrome's builtin HLS player instead of Android's MediaPlayer"; -#endif // BUILDFLAG(ENABLE_HLS_DEMUXER) - #if !BUILDFLAG(IS_CHROMEOS) const char kProfilesReorderingName[] = "Profiles Reordering"; const char kProfilesReorderingDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index c7fe964..de11dfe 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -3532,11 +3532,6 @@ extern const char kTranslateOpenSettingsDescription[]; #endif -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) -extern const char kWasmTtsComponentUpdaterEnabledName[]; -extern const char kWasmTtsComponentUpdaterEnabledDescription[]; -#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) - extern const char kWebAuthenticationPermitEnterpriseAttestationName[]; extern const char kWebAuthenticationPermitEnterpriseAttestationDescription[]; @@ -5079,11 +5074,6 @@ extern const char kEnableGenericOidcAuthProfileManagementDescription[]; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) -#if BUILDFLAG(ENABLE_HLS_DEMUXER) -extern const char kEnableBuiltinHlsName[]; -extern const char kEnableBuiltinHlsDescription[]; -#endif // BUILDFLAG(ENABLE_HLS_DEMUXER) - #if !BUILDFLAG(IS_CHROMEOS) extern const char kProfilesReorderingName[]; extern const char kProfilesReorderingDescription[];
diff --git a/chrome/browser/glic/host/glic_api_browsertest.cc b/chrome/browser/glic/host/glic_api_browsertest.cc index 1a6e63b..d84a502 100644 --- a/chrome/browser/glic/host/glic_api_browsertest.cc +++ b/chrome/browser/glic/host/glic_api_browsertest.cc
@@ -892,33 +892,23 @@ RunTestSequence(OpenGlicWindow(GlicWindowMode::kDetached, GlicInstrumentMode::kHostAndContents)); ExecuteJsTest(); - ASSERT_TRUE(base::test::RunUntil([&]() { - return window_controller().GetGlicWidget()->widget_delegate()->CanResize(); - })); + RunTestSequence(WaitForCanResizeEnabled(/*enabled=*/true)); } -// This test is flaky on Mac (crbug.com/414584725). -#if BUILDFLAG(IS_MAC) -#define MAYBE_testDisableDragResize DISABLED_testDisableDragResize -#else -#define MAYBE_testDisableDragResize testDisableDragResize -#endif -IN_PROC_BROWSER_TEST_F(GlicApiTest, MAYBE_testDisableDragResize) { +IN_PROC_BROWSER_TEST_F(GlicApiTest, testDisableDragResize) { // Check the default resize setting here. RunTestSequence(OpenGlicWindow(GlicWindowMode::kDetached, GlicInstrumentMode::kHostAndContents), - ExpectUserCanResize(true)); + WaitForCanResizeEnabled(/*enabled=*/true)); ExecuteJsTest(); - ASSERT_TRUE(base::test::RunUntil([&]() { - return !window_controller().GetGlicWidget()->widget_delegate()->CanResize(); - })); + RunTestSequence(WaitForCanResizeEnabled(/*enabled=*/false)); } IN_PROC_BROWSER_TEST_F(GlicApiTest, testInitiallyNotResizable) { RunTestSequence(OpenGlicWindow(GlicWindowMode::kDetached, GlicInstrumentMode::kHostAndContents)); ExecuteJsTest(); - RunTestSequence(InAnyContext(ExpectUserCanResize(false))); + RunTestSequence(WaitForCanResizeEnabled(/*enabled=*/false)); } IN_PROC_BROWSER_TEST_F(GlicApiTestWithOneTabAndContextualCueing,
diff --git a/chrome/browser/glic/test_support/interactive_glic_test.h b/chrome/browser/glic/test_support/interactive_glic_test.h index b84004a3..a8b91aa 100644 --- a/chrome/browser/glic/test_support/interactive_glic_test.h +++ b/chrome/browser/glic/test_support/interactive_glic_test.h
@@ -364,17 +364,6 @@ expected_size, "CheckWidgetMinimumSize"); } - auto ExpectUserCanResize(bool expect_resize) { - return Api::CheckResult( - [this]() { - return window_controller() - .GetGlicWidget() - ->widget_delegate() - ->CanResize(); - }, - expect_resize, "ExpectUserCanResize"); - } - auto CheckTabCount(int expected_count) { return Api::CheckResult( [this] { return browser()->tab_strip_model()->GetTabCount(); }, @@ -405,6 +394,15 @@ Api::WaitForState(glic::test::internal::kDelayState, true)); } + auto WaitForCanResizeEnabled(bool enabled) { + return Api::Steps( + Api::ObserveState(internal::kGlicWindowControllerResizeState, + std::ref(window_controller())), + Api::Log("WaitForCanResize: ", enabled ? "true" : "false"), + Api::WaitForState(internal::kGlicWindowControllerResizeState, enabled), + Api::StopObservingState(internal::kGlicWindowControllerResizeState)); + } + content::RenderFrameHost* FindGlicGuestMainFrame() { for (GlicPageHandler* handler : host().GetPageHandlersForTesting()) { if (handler->GetGuestMainFrame()) {
diff --git a/chrome/browser/glic/test_support/interactive_test_util.cc b/chrome/browser/glic/test_support/interactive_test_util.cc index 3fad30f..36b0b9f 100644 --- a/chrome/browser/glic/test_support/interactive_test_util.cc +++ b/chrome/browser/glic/test_support/interactive_test_util.cc
@@ -6,9 +6,11 @@ #include "base/scoped_observation_traits.h" #include "chrome/browser/glic/fre/glic_fre_controller.h" +#include "chrome/browser/glic/widget/glic_widget.h" #include "chrome/browser/glic/widget/glic_window_controller.h" #include "ui/base/interaction/element_identifier.h" #include "ui/base/interaction/polling_state_observer.h" +#include "ui/views/widget/widget_delegate.h" namespace glic::test { @@ -32,6 +34,19 @@ DEFINE_STATE_IDENTIFIER_VALUE(GlicWindowControllerStateObserver, kGlicWindowControllerState); +GlicWindowContorllerResizeObserver::GlicWindowContorllerResizeObserver( + GlicWindowController& controller) + : PollingStateObserver([&controller]() { + return controller.GetGlicWidget() + ? controller.GetGlicWidget()->widget_delegate()->CanResize() + : false; + }) {} +GlicWindowContorllerResizeObserver::~GlicWindowContorllerResizeObserver() = + default; + +DEFINE_STATE_IDENTIFIER_VALUE(GlicWindowContorllerResizeObserver, + kGlicWindowControllerResizeState); + GlicAppStateObserver::GlicAppStateObserver(Host* host) : ObservationStateObserver(host) { WebUiStateChanged(host->GetPrimaryWebUiState());
diff --git a/chrome/browser/glic/test_support/interactive_test_util.h b/chrome/browser/glic/test_support/interactive_test_util.h index a595879d..3e4bec7 100644 --- a/chrome/browser/glic/test_support/interactive_test_util.h +++ b/chrome/browser/glic/test_support/interactive_test_util.h
@@ -56,6 +56,17 @@ DECLARE_STATE_IDENTIFIER_VALUE(GlicWindowControllerStateObserver, kGlicWindowControllerState); +// Observes `controller` for changes to animation state. +class GlicWindowContorllerResizeObserver + : public ui::test::PollingStateObserver<bool> { + public: + explicit GlicWindowContorllerResizeObserver(GlicWindowController& controller); + ~GlicWindowContorllerResizeObserver() override; +}; + +DECLARE_STATE_IDENTIFIER_VALUE(GlicWindowContorllerResizeObserver, + kGlicWindowControllerResizeState); + // Observers the glic app internal state. class GlicAppStateObserver : public ui::test::
diff --git a/chrome/browser/glic/test_support/mock_glic_window_controller.h b/chrome/browser/glic/test_support/mock_glic_window_controller.h index 065f8bc5..a51db6f 100644 --- a/chrome/browser/glic/test_support/mock_glic_window_controller.h +++ b/chrome/browser/glic/test_support/mock_glic_window_controller.h
@@ -35,6 +35,7 @@ (const gfx::Size&, base::TimeDelta, base::OnceClosure), (override)); MOCK_METHOD(void, EnableDragResize, (bool), (override)); + MOCK_METHOD(void, MaybeSetWidgetCanResize, (), (override)); MOCK_METHOD(gfx::Size, GetSize, (), (override)); MOCK_METHOD(void, SetDraggableAreas,
diff --git a/chrome/browser/glic/widget/glic_widget.cc b/chrome/browser/glic/widget/glic_widget.cc index 9413ec5..fb28c6f 100644 --- a/chrome/browser/glic/widget/glic_widget.cc +++ b/chrome/browser/glic/widget/glic_widget.cc
@@ -49,12 +49,10 @@ int frame_thickness = ui::GetResizableFrameThicknessFromMonitorInDIP( MonitorFromRect(&bounds_rect, MONITOR_DEFAULTTONEAREST), /*has_caption=*/false); - // On Windows, the presence of a frame means that we need to adjust both the - // width and height of the widget by 2*frame thickness, and center the content - // horizontally. - outsets.set_left(frame_thickness); - outsets.set_right(frame_thickness); - outsets.set_bottom(2 * frame_thickness); + // On Windows, the presence of a frame means that we need to adjust the left, + // right and bottom by frame thickness. + outsets.set_left_right(frame_thickness, frame_thickness); + outsets.set_bottom(frame_thickness); #endif return outsets; }
diff --git a/chrome/browser/glic/widget/glic_window_animator.cc b/chrome/browser/glic/widget/glic_window_animator.cc index 6545851..ad5df16f 100644 --- a/chrome/browser/glic/widget/glic_window_animator.cc +++ b/chrome/browser/glic/widget/glic_window_animator.cc
@@ -81,6 +81,10 @@ } } +bool GlicWindowAnimator::IsAnimating() const { + return window_resize_animation_ != nullptr; +} + void GlicWindowAnimator::ResetLastTargetSize() { last_target_size_ = gfx::Size(); } @@ -98,6 +102,7 @@ void GlicWindowAnimator::ResizeFinished() { // Destroy window_resize_animation_. window_resize_animation_.reset(); + window_controller_->MaybeSetWidgetCanResize(); } } // namespace glic
diff --git a/chrome/browser/glic/widget/glic_window_animator.h b/chrome/browser/glic/widget/glic_window_animator.h index e76ac33c..3e2786bf 100644 --- a/chrome/browser/glic/widget/glic_window_animator.h +++ b/chrome/browser/glic/widget/glic_window_animator.h
@@ -57,6 +57,8 @@ // If there's a saved target size, start the resize animation for it. void MaybeAnimateToTargetSize(); + bool IsAnimating() const; + private: // Sets target bounds for the widget (must exist) and creates a // GlicWindowResizeAnimation instance to begin a new animation. If a bounds
diff --git a/chrome/browser/glic/widget/glic_window_controller.h b/chrome/browser/glic/widget/glic_window_controller.h index 3233e2d..d5c1740 100644 --- a/chrome/browser/glic/widget/glic_window_controller.h +++ b/chrome/browser/glic/widget/glic_window_controller.h
@@ -109,6 +109,11 @@ // if the widget doesn't exist or the feature flag is disabled. virtual void EnableDragResize(bool enabled) = 0; + // Update the resize state of the widget if it is needed and safe to do so. + // On Windows make sure that the client area size remains the same even if + // the widget size changes because the widget is resizable. + virtual void MaybeSetWidgetCanResize() = 0; + // Returns the current size of the glic window. virtual gfx::Size GetSize() = 0;
diff --git a/chrome/browser/glic/widget/glic_window_controller_impl.cc b/chrome/browser/glic/widget/glic_window_controller_impl.cc index 0a18067..e8e0ec8 100644 --- a/chrome/browser/glic/widget/glic_window_controller_impl.cc +++ b/chrome/browser/glic/widget/glic_window_controller_impl.cc
@@ -391,7 +391,7 @@ } if (GetGlicWidget()) { - glic_size_ = GetGlicWidget()->GetSize(); + glic_size_ = GetGlicWidget()->GetClientAreaBoundsInScreen().size(); SaveWidgetPosition(/*user_modified=*/true); } @@ -985,11 +985,46 @@ SetGlicWindowToFloatingMode(!enabled); } - GetGlicWidget()->widget_delegate()->SetCanResize(enabled); + MaybeSetWidgetCanResize(); GetGlicView()->UpdateBackgroundColor(); glic_window_animator_->MaybeAnimateToTargetSize(); } +void GlicWindowControllerImpl::MaybeSetWidgetCanResize() { + if (!GetGlicWidget()) { + return; + } + if (GetGlicWidget()->widget_delegate()->CanResize() == user_resizable_ || + glic_window_animator_->IsAnimating()) { + // If the resize state is already correct or the widget is animating do not + // update the resize state. + return; + } + +#if BUILDFLAG(IS_WIN) + // On Windows when resize is enabled there is an invisible border added + // around the client area. We need to make the widget larger or smaller to + // keep the visible client area the same size. + gfx::Rect previous_client_bounds = + GetGlicWidget()->GetClientAreaBoundsInScreen(); +#endif // BUILDFLAG(IS_WIN) + + // Update resize state on widget delegate. + GetGlicWidget()->widget_delegate()->SetCanResize(user_resizable_); + +#if BUILDFLAG(IS_WIN) + if (user_resizable_) { + // Resizable so the widget area is larger than the client area. + gfx::Rect new_widget_bounds = + GetGlicWidget()->VisibleToWidgetBounds(previous_client_bounds); + GetGlicWidget()->SetBoundsConstrained(new_widget_bounds); + } else { + // Not resizable so the client and widget areas are the same. + GetGlicWidget()->SetBoundsConstrained(previous_client_bounds); + } +#endif // BUILDFLAG(IS_WIN) +} + gfx::Size GlicWindowControllerImpl::GetSize() { if (!GetGlicWidget()) { return gfx::Size();
diff --git a/chrome/browser/glic/widget/glic_window_controller_impl.h b/chrome/browser/glic/widget/glic_window_controller_impl.h index 05f07468..8fdbafa9 100644 --- a/chrome/browser/glic/widget/glic_window_controller_impl.h +++ b/chrome/browser/glic/widget/glic_window_controller_impl.h
@@ -85,6 +85,7 @@ base::TimeDelta duration, base::OnceClosure callback) override; void EnableDragResize(bool enabled) override; + void MaybeSetWidgetCanResize() override; gfx::Size GetSize() override; void SetDraggableAreas( const std::vector<gfx::Rect>& draggable_areas) override;
diff --git a/chrome/browser/glic/widget/glic_window_resize_animation_interactive_uitest.cc b/chrome/browser/glic/widget/glic_window_resize_animation_interactive_uitest.cc index e94c057..99d1eaa 100644 --- a/chrome/browser/glic/widget/glic_window_resize_animation_interactive_uitest.cc +++ b/chrome/browser/glic/widget/glic_window_resize_animation_interactive_uitest.cc
@@ -52,7 +52,8 @@ public: void SetUpOnMainThread() override { test::InteractiveGlicTest::SetUpOnMainThread(); - RunTestSequence(OpenGlicWindow(GlicWindowMode::kDetached)); + RunTestSequence(OpenGlicWindow(GlicWindowMode::kDetached), + WaitForCanResizeEnabled(/*enabled=*/true)); } void ExpectRectBetween(const gfx::Rect& current_rect,
diff --git a/chrome/browser/media/android/desktop_media_picker_android.cc b/chrome/browser/media/android/desktop_media_picker_android.cc index 9140cd3..d2869328 100644 --- a/chrome/browser/media/android/desktop_media_picker_android.cc +++ b/chrome/browser/media/android/desktop_media_picker_android.cc
@@ -30,7 +30,7 @@ } void DesktopMediaPickerAndroid::NotifyDialogResult( - const content::DesktopMediaID& source) { + DoneCallbackArgumentType source) { auto callback = std::move(callback_); DesktopMediaPickerManager::Get()->OnHideDialog(); @@ -41,7 +41,7 @@ // Notify the |callback_| asynchronously because it may need to destroy // DesktopMediaPicker. content::GetUIThreadTaskRunner({})->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), source)); + FROM_HERE, base::BindOnce(std::move(callback), std::move(source))); } // static
diff --git a/chrome/browser/media/android/desktop_media_picker_android.h b/chrome/browser/media/android/desktop_media_picker_android.h index 6491599..79b39ef 100644 --- a/chrome/browser/media/android/desktop_media_picker_android.h +++ b/chrome/browser/media/android/desktop_media_picker_android.h
@@ -21,7 +21,7 @@ DesktopMediaPickerAndroid& operator=(DesktopMediaPickerAndroid&&) = delete; ~DesktopMediaPickerAndroid() override; - void NotifyDialogResult(const content::DesktopMediaID& source); + void NotifyDialogResult(DoneCallbackArgumentType source); // DesktopMediaPicker: void Show(const DesktopMediaPicker::Params& params,
diff --git a/chrome/browser/media/android/media_capture_picker_dialog_bridge.cc b/chrome/browser/media/android/media_capture_picker_dialog_bridge.cc index 1219125..f30cbf6 100644 --- a/chrome/browser/media/android/media_capture_picker_dialog_bridge.cc +++ b/chrome/browser/media/android/media_capture_picker_dialog_bridge.cc
@@ -10,6 +10,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" +#include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h" // Must come after all headers that specialize FromJniType() / ToJniType(). #include "chrome/android/chrome_jni_headers/MediaCapturePickerDialogBridge_jni.h" @@ -33,7 +34,7 @@ content::WebContents* web_contents, const std::u16string& app_name, bool request_audio, - MediaCapturePickerDialogCallback callback) { + DesktopMediaPicker::DoneCallback callback) { CHECK(web_contents); CHECK(callback_.is_null()); callback_ = std::move(callback); @@ -73,5 +74,6 @@ } void MediaCapturePickerDialogBridge::OnCancel(JNIEnv* env) { - std::move(callback_).Run({}); + std::move(callback_).Run(base::unexpected( + blink::mojom::MediaStreamRequestResult::PERMISSION_DENIED_BY_USER)); }
diff --git a/chrome/browser/media/android/media_capture_picker_dialog_bridge.h b/chrome/browser/media/android/media_capture_picker_dialog_bridge.h index 4f0df251..e184493 100644 --- a/chrome/browser/media/android/media_capture_picker_dialog_bridge.h +++ b/chrome/browser/media/android/media_capture_picker_dialog_bridge.h
@@ -10,6 +10,7 @@ #include "base/android/jni_string.h" #include "base/android/scoped_java_ref.h" #include "base/functional/callback.h" +#include "chrome/browser/media/webrtc/desktop_media_picker.h" #include "content/public/browser/desktop_media_id.h" namespace content { @@ -18,11 +19,6 @@ class MediaCapturePickerDialogBridge { public: - // Callback for when media to capture is picked. The `DesktopMediaID` will - // be null if nothing was picked. - using MediaCapturePickerDialogCallback = - base::OnceCallback<void(const content::DesktopMediaID&)>; - MediaCapturePickerDialogBridge(); MediaCapturePickerDialogBridge(const MediaCapturePickerDialogBridge&) = delete; @@ -38,7 +34,7 @@ void Show(content::WebContents* web_contents, const std::u16string& app_name, bool request_audio, - MediaCapturePickerDialogCallback callback); + DesktopMediaPicker::DoneCallback callback); // Called from Java via JNI when the dialog resolves. void OnPickTab(JNIEnv* env, @@ -55,7 +51,7 @@ void OnCancel(JNIEnv* env); private: - MediaCapturePickerDialogCallback callback_; + DesktopMediaPicker::DoneCallback callback_; // The corresponding java object. base::android::ScopedJavaGlobalRef<jobject> java_object_;
diff --git a/chrome/browser/platform_experience/installer/BUILD.gn b/chrome/browser/platform_experience/installer/BUILD.gn index c189d93..9eee139 100644 --- a/chrome/browser/platform_experience/installer/BUILD.gn +++ b/chrome/browser/platform_experience/installer/BUILD.gn
@@ -17,20 +17,3 @@ "//chrome/install_static:install_static_util", ] } - -source_set("unit_tests") { - testonly = true - sources = [ "installer_win_unittest.cc" ] - - deps = [ - ":installer_win", - "//base", - "//base/test:test_support", - "//chrome/common:constants", - "//chrome/install_static/test:test_support", - "//chrome/installer/util:constants", - "//chrome/updater/app/server/win:updater_legacy_idl", - "//testing/gmock", - "//testing/gtest", - ] -}
diff --git a/chrome/browser/platform_experience/installer/installer_win.cc b/chrome/browser/platform_experience/installer/installer_win.cc index dec74fa..4254948 100644 --- a/chrome/browser/platform_experience/installer/installer_win.cc +++ b/chrome/browser/platform_experience/installer/installer_win.cc
@@ -19,9 +19,6 @@ namespace { -platform_experience::InstallerLauncherDelegate* - g_installer_delegate_for_testing = nullptr; - // Switch used to install platform_experience_helper constexpr char kPlatformExperienceHelperForceInstallSwitch[] = "force-install"; // Directory under which platform_experience_helper is installed @@ -82,57 +79,26 @@ "Windows.PlatformExperienceHelper.InstallerLaunchStatus.User", status); } -class DefaultInstallerLauncherDelegate - : public platform_experience::InstallerLauncherDelegate { - public: - DefaultInstallerLauncherDelegate() = default; - ~DefaultInstallerLauncherDelegate() override = default; - - Microsoft::WRL::ComPtr<IAppCommandWeb> GetUpdaterAppCommand( - const std::wstring& command_name) override { - return ::GetUpdaterAppCommand(command_name).value_or(nullptr); - } - - base::Process LaunchProcess(const base::CommandLine& cmd_line, - const base::LaunchOptions& options) override { - return base::LaunchProcess(cmd_line, options); - } -}; - -platform_experience::InstallerLauncherDelegate* GetDelegate() { - if (g_installer_delegate_for_testing) { - return g_installer_delegate_for_testing; - } - static DefaultInstallerLauncherDelegate default_delegate; - return &default_delegate; -} - } // namespace namespace platform_experience { -void SetInstallerLauncherDelegateForTesting( // IN-TEST - InstallerLauncherDelegate* delegate) { - g_installer_delegate_for_testing = delegate; -} - void MaybeInstallPlatformExperienceHelper() { if (PlatformExperienceHelperMightBeInstalled()) { return; } - InstallerLauncherDelegate* delegate = GetDelegate(); - if (install_static::IsSystemInstall()) { - auto command = delegate->GetUpdaterAppCommand(installer::kCmdInstallPEH); - if (!command) { + auto command = GetUpdaterAppCommand(installer::kCmdInstallPEH); + if (!command.has_value()) { ReportSystemInstallerLaunchStatus( SystemInstallerLaunchStatus::kAppCommandNotFound); return; } const VARIANT& var = base::win::ScopedVariant::kEmptyVariant; - if (FAILED(command->execute(var, var, var, var, var, var, var, var, var))) { + if (FAILED( + (*command)->execute(var, var, var, var, var, var, var, var, var))) { ReportSystemInstallerLaunchStatus( SystemInstallerLaunchStatus::kAppCommandExecutionFailed); } else { @@ -152,7 +118,7 @@ launch_options.feedback_cursor_off = true; launch_options.force_breakaway_from_job_ = true; ::SetLastError(ERROR_SUCCESS); - base::Process process = delegate->LaunchProcess(install_cmd, launch_options); + base::Process process = base::LaunchProcess(install_cmd, launch_options); UserInstallerLaunchStatus status = UserInstallerLaunchStatus::kSuccess; if (!process.IsValid()) { switch (::GetLastError()) {
diff --git a/chrome/browser/platform_experience/installer/installer_win.h b/chrome/browser/platform_experience/installer/installer_win.h index 5920cf1c..512514b 100644 --- a/chrome/browser/platform_experience/installer/installer_win.h +++ b/chrome/browser/platform_experience/installer/installer_win.h
@@ -5,35 +5,8 @@ #ifndef CHROME_BROWSER_PLATFORM_EXPERIENCE_INSTALLER_INSTALLER_WIN_H_ #define CHROME_BROWSER_PLATFORM_EXPERIENCE_INSTALLER_INSTALLER_WIN_H_ -#include <wrl/client.h> - -#include "base/process/process.h" - -struct IAppCommandWeb; - -namespace base { -class CommandLine; -struct LaunchOptions; -} // namespace base - namespace platform_experience { -// Delegate for controlling how the Platform Experience Helper installer is -// launched. -class InstallerLauncherDelegate { - public: - virtual ~InstallerLauncherDelegate() = default; - - virtual Microsoft::WRL::ComPtr<IAppCommandWeb> GetUpdaterAppCommand( - const std::wstring& command_name) = 0; - - virtual base::Process LaunchProcess(const base::CommandLine& cmd_line, - const base::LaunchOptions& options) = 0; -}; - -void SetInstallerLauncherDelegateForTesting( - InstallerLauncherDelegate* delegate); - // Starts the installation of the PEH, if it hasn't already been installed yet. // This function might block. void MaybeInstallPlatformExperienceHelper();
diff --git a/chrome/browser/platform_experience/installer/installer_win_unittest.cc b/chrome/browser/platform_experience/installer/installer_win_unittest.cc deleted file mode 100644 index 0a5abef5..0000000 --- a/chrome/browser/platform_experience/installer/installer_win_unittest.cc +++ /dev/null
@@ -1,274 +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/platform_experience/installer/installer_win.h" - -#include <shobjidl.h> - -#include <wrl/client.h> -#include <wrl/implements.h> - -#include "base/command_line.h" -#include "base/files/file_path.h" -#include "base/files/file_util.h" -#include "base/path_service.h" -#include "base/process/process.h" -#include "base/test/metrics/histogram_tester.h" -#include "base/test/scoped_path_override.h" -#include "base/test/task_environment.h" -#include "base/win/scoped_variant.h" -#include "chrome/common/chrome_paths.h" -#include "chrome/install_static/test/scoped_install_details.h" -#include "chrome/installer/util/util_constants.h" -#include "chrome/updater/app/server/win/updater_legacy_idl.h" -#include "testing/gmock/include/gmock/gmock.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace platform_experience { - -namespace { - -// Mock implementation of IAppCommandWeb for testing system-level installs. -class MockAppCommand - : public Microsoft::WRL::RuntimeClass< - Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, - IAppCommandWeb> { - public: - // IDispatch methods. - MOCK_METHOD(HRESULT, GetTypeInfoCount, (UINT * pctinfo), (override)); - MOCK_METHOD(HRESULT, - GetTypeInfo, - (UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo), - (override)); - MOCK_METHOD(HRESULT, - GetIDsOfNames, - (REFIID riid, - LPOLESTR* rgszNames, - UINT cNames, - LCID lcid, - DISPID* rgDispId), - (override)); - MOCK_METHOD(HRESULT, - Invoke, - (DISPID dispIdMember, - REFIID riid, - LCID lcid, - WORD wFlags, - DISPPARAMS* pDispParams, - VARIANT* pVarResult, - EXCEPINFO* pExcepInfo, - UINT* puArgErr), - (override)); - - // IAppCommandWeb methods. - MOCK_METHOD(HRESULT, get_status, (UINT*), (override)); - MOCK_METHOD(HRESULT, get_exitCode, (DWORD*), (override)); - MOCK_METHOD(HRESULT, get_output, (BSTR*), (override)); - - MOCK_METHOD(HRESULT, - execute, - (VARIANT, - VARIANT, - VARIANT, - VARIANT, - VARIANT, - VARIANT, - VARIANT, - VARIANT, - VARIANT), - (override)); -}; - -// Mock implementation of the InstallerLauncherDelegate to intercept external -// calls. -class MockInstallerLauncherDelegate : public InstallerLauncherDelegate { - public: - MOCK_METHOD(Microsoft::WRL::ComPtr<IAppCommandWeb>, - GetUpdaterAppCommand, - (const std::wstring& command_name), - (override)); - MOCK_METHOD(base::Process, - LaunchProcess, - (const base::CommandLine& cmd_line, - const base::LaunchOptions& options), - (override)); -}; - -} // namespace - -class PlatformExperienceInstallerWinTest : public testing::Test { - protected: - // Simulates that the Platform Experience Helper is already installed by - // creating its executable in the expected location. - void CreateFakeHelperExecutable(bool is_system_install) { - const int path_key = is_system_install - ? static_cast<int>(base::DIR_EXE) - : static_cast<int>(chrome::DIR_USER_DATA); - base::FilePath peh_dir = base::PathService::CheckedGet(path_key).Append( - L"PlatformExperienceHelper"); - ASSERT_TRUE(base::CreateDirectory(peh_dir)); - base::FilePath peh_exe_path = - peh_dir.Append(L"platform_experience_helper.exe"); - ASSERT_TRUE(base::WriteFile(peh_exe_path, "")); - } - - void SetUp() override { - platform_experience::SetInstallerLauncherDelegateForTesting( - &mock_delegate_); - } - - void TearDown() override { - platform_experience::SetInstallerLauncherDelegateForTesting(nullptr); - } - - // A helper to run the main function under test with mocks and system-level - // install settings. - void RunMaybeInstallForSystem(bool is_system_install) { - install_static::ScopedInstallDetails scoped_install_details( - is_system_install); - MaybeInstallPlatformExperienceHelper(); - } - - base::test::TaskEnvironment task_environment_; - base::HistogramTester histogram_tester_; - testing::StrictMock<MockInstallerLauncherDelegate> mock_delegate_; - - private: - // These members override the respective paths with temporary directories - // for the duration of the test. - base::ScopedPathOverride user_data_dir_override_{chrome::DIR_USER_DATA}; - base::ScopedPathOverride exe_dir_override_{base::DIR_EXE}; - base::ScopedPathOverride module_dir_override_{base::DIR_MODULE}; -}; - -// Test that no installation is attempted if the helper already exists. -TEST_F(PlatformExperienceInstallerWinTest, - HelperAlreadyInstalled_NoActionTaken) { - CreateFakeHelperExecutable(/*is_system_install=*/false); - // No expectations on mock_delegate_ are set. If any of its methods are - // called, the StrictMock will fail the test. - RunMaybeInstallForSystem(/*is_system_install=*/false); - - // No histograms should be recorded. - histogram_tester_.ExpectTotalCount( - "Windows.PlatformExperienceHelper.InstallerLaunchStatus.User", 0); - histogram_tester_.ExpectTotalCount( - "Windows.PlatformExperienceHelper.InstallerLaunchStatus.System", 0); -} - -// Test system install case where the AppCommand cannot be found. -TEST_F(PlatformExperienceInstallerWinTest, SystemInstall_AppCommandNotFound) { - EXPECT_CALL(mock_delegate_, - GetUpdaterAppCommand(std::wstring(installer::kCmdInstallPEH))) - .WillOnce(testing::Return(nullptr)); - - RunMaybeInstallForSystem(/*is_system_install=*/true); - - histogram_tester_.ExpectUniqueSample( - "Windows.PlatformExperienceHelper.InstallerLaunchStatus.System", - /*SystemInstallerLaunchStatus::kAppCommandNotFound*/ 1, 1); -} - -// Test system install case where executing the AppCommand fails. -TEST_F(PlatformExperienceInstallerWinTest, SystemInstall_AppCommandExecFails) { - auto mock_app_command = Microsoft::WRL::Make<MockAppCommand>(); - EXPECT_CALL( - *mock_app_command.Get(), - execute(testing::_, testing::_, testing::_, testing::_, testing::_, - testing::_, testing::_, testing::_, testing::_)) - .WillOnce(testing::Return(E_FAIL)); - - EXPECT_CALL(mock_delegate_, - GetUpdaterAppCommand(std::wstring(installer::kCmdInstallPEH))) - .WillOnce(testing::Return(mock_app_command)); - - RunMaybeInstallForSystem(/*is_system_install=*/true); - - histogram_tester_.ExpectUniqueSample( - "Windows.PlatformExperienceHelper.InstallerLaunchStatus.System", - /*SystemInstallerLaunchStatus::kAppCommandExecutionFailed*/ 2, 1); -} - -// Test the successful system install case. -TEST_F(PlatformExperienceInstallerWinTest, SystemInstall_Success) { - auto mock_app_command = Microsoft::WRL::Make<MockAppCommand>(); - EXPECT_CALL( - *mock_app_command.Get(), - execute(testing::_, testing::_, testing::_, testing::_, testing::_, - testing::_, testing::_, testing::_, testing::_)) - .WillOnce(testing::Return(S_OK)); - - EXPECT_CALL(mock_delegate_, - GetUpdaterAppCommand(std::wstring(installer::kCmdInstallPEH))) - .WillOnce(testing::Return(mock_app_command)); - - RunMaybeInstallForSystem(/*is_system_install=*/true); - - histogram_tester_.ExpectUniqueSample( - "Windows.PlatformExperienceHelper.InstallerLaunchStatus.System", - /*SystemInstallerLaunchStatus::kSuccess*/ 0, 1); -} - -// Test the successful user-level install case. -TEST_F(PlatformExperienceInstallerWinTest, UserInstall_LaunchSuccess) { - EXPECT_CALL(mock_delegate_, LaunchProcess(testing::_, testing::_)) - .WillOnce(testing::Return(base::Process::Current())); - - RunMaybeInstallForSystem(/*is_system_install=*/false); - - histogram_tester_.ExpectUniqueSample( - "Windows.PlatformExperienceHelper.InstallerLaunchStatus.User", - /*UserInstallerLaunchStatus::kSuccess*/ 0, 1); -} - -// Test user install failure due to ERROR_FILE_NOT_FOUND. -TEST_F(PlatformExperienceInstallerWinTest, - UserInstall_LaunchFails_FileNotFound) { - EXPECT_CALL(mock_delegate_, LaunchProcess(testing::_, testing::_)) - .WillOnce(testing::Invoke([](const auto&, const auto&) { - ::SetLastError(ERROR_FILE_NOT_FOUND); - return base::Process(); // Return invalid process - })); - - RunMaybeInstallForSystem(/*is_system_install=*/false); - - histogram_tester_.ExpectUniqueSample( - "Windows.PlatformExperienceHelper.InstallerLaunchStatus.User", - /*UserInstallerLaunchStatus::kFileNotFound*/ 1, 1); -} - -// Test user install failure due to ERROR_ACCESS_DENIED. -TEST_F(PlatformExperienceInstallerWinTest, - UserInstall_LaunchFails_AccessDenied) { - EXPECT_CALL(mock_delegate_, LaunchProcess(testing::_, testing::_)) - .WillOnce(testing::Invoke([](const auto&, const auto&) { - ::SetLastError(ERROR_ACCESS_DENIED); - return base::Process(); // Return invalid process - })); - - RunMaybeInstallForSystem(/*is_system_install=*/false); - - histogram_tester_.ExpectUniqueSample( - "Windows.PlatformExperienceHelper.InstallerLaunchStatus.User", - /*UserInstallerLaunchStatus::kAccessDenied*/ 2, 1); -} - -// Test user install failure due to an error other than file not found or -// access denied. -TEST_F(PlatformExperienceInstallerWinTest, - UserInstall_LaunchFails_OtherFailure) { - EXPECT_CALL(mock_delegate_, LaunchProcess(testing::_, testing::_)) - .WillOnce(testing::Invoke([](const auto&, const auto&) { - ::SetLastError(ERROR_INVALID_FUNCTION); // An arbitrary error - return base::Process(); // Return invalid process - })); - - RunMaybeInstallForSystem(/*is_system_install=*/false); - - histogram_tester_.ExpectUniqueSample( - "Windows.PlatformExperienceHelper.InstallerLaunchStatus.User", - /*UserInstallerLaunchStatus::kOtherFailure*/ 3, 1); -} - -} // namespace platform_experience
diff --git a/chrome/browser/recent_tabs/internal/android/java/res/layout/restore_tabs_detail_screen_sheet.xml b/chrome/browser/recent_tabs/internal/android/java/res/layout/restore_tabs_detail_screen_sheet.xml index 843a9d1..499aae438 100644 --- a/chrome/browser/recent_tabs/internal/android/java/res/layout/restore_tabs_detail_screen_sheet.xml +++ b/chrome/browser/recent_tabs/internal/android/java/res/layout/restore_tabs_detail_screen_sheet.xml
@@ -60,7 +60,7 @@ android:id="@+id/restore_tabs_bottom_toolbar_divider" android:layout_width="match_parent" android:layout_height="1dp" - android:background="@color/divider_line_bg_color_baseline"/> + android:background="@drawable/divider_line_bg"/> <LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent"
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc b/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc index 6c9da660..83c0873 100644 --- a/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc +++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc
@@ -132,6 +132,13 @@ return; } + bool success = MaybeLoad(); + if (success) { + web_contents()->Focus(); + } +} + +bool TabLifecycleUnitSource::TabLifecycleUnit::MaybeLoad() { if (is_discarded_) { // Transition to the active state. is_discarded_ = false; @@ -151,10 +158,12 @@ // it explicitly from here. if (web_contents()->WasDiscarded() && !base::FeatureList::IsEnabled(features::kWebContentsDiscard)) { - bool loaded = Load(); - DCHECK(loaded); + CHECK(Load()); + return true; } } + + return false; } void TabLifecycleUnitSource::TabLifecycleUnit::SetRecentlyAudible( @@ -210,7 +219,6 @@ // session restore is handled by LifecycleManager. web_contents()->GetController().SetNeedsReload(); web_contents()->GetController().LoadIfNecessary(); - web_contents()->Focus(); return true; } @@ -272,9 +280,12 @@ if (web_contents()->GetVisibility() == content::Visibility::VISIBLE) decision_details->AddReason(DecisionFailureReason::LIVE_STATE_VISIBLE); #else - // Do not discard the tab if it is currently active in its window. - if (tab_strip_model_->GetActiveWebContents() == web_contents()) + // Do not discard the tab if it is currently active in its window, or if it is + // in the same split as the currently active tab. + if (base::Contains(tab_strip_model_->GetVisibleTabs(), web_contents(), + &tabs::TabInterface::GetContents)) { decision_details->AddReason(DecisionFailureReason::LIVE_STATE_VISIBLE); + } #endif // BUILDFLAG(IS_CHROMEOS) // Do not discard tabs in which the user has entered text in a form.
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit.h b/chrome/browser/resource_coordinator/tab_lifecycle_unit.h index 40a0ea8e..e8c64af 100644 --- a/chrome/browser/resource_coordinator/tab_lifecycle_unit.h +++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit.h
@@ -63,7 +63,8 @@ // content is displayed). void SetWebContents(content::WebContents* web_contents); - // Invoked when the tab gains or loses focus. + // Invoked when the tab gains or loses focus. This will attempt to load the + // tab if it was discarded, and focus it if that load was successful. void SetFocused(bool focused); // Sets the "recently audible" state of this tab. A tab is "recently audible" @@ -103,6 +104,10 @@ return wall_time_when_hidden_; } + // Attempt to load the tab if it is discarded. Returns whether the load was + // successful. This doesn't focus the loaded tab. + bool MaybeLoad(); + protected: friend class TabManagerTest;
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit_source.cc b/chrome/browser/resource_coordinator/tab_lifecycle_unit_source.cc index ad9d80e3..46802963 100644 --- a/chrome/browser/resource_coordinator/tab_lifecycle_unit_source.cc +++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit_source.cc
@@ -29,6 +29,7 @@ #include "components/performance_manager/public/performance_manager.h" #include "components/prefs/pref_change_registrar.h" #include "components/prefs/pref_service.h" +#include "components/tabs/public/split_tab_data.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" @@ -203,11 +204,12 @@ // restore this to DCHECK(!focused_web_contents || focused_lifecycle_unit); // else case will be handled by following OnTabInserted(). if (!focused_web_contents || focused_lifecycle_unit) - UpdateFocusedTabTo(focused_lifecycle_unit); + UpdateFocusedTabTo(focused_lifecycle_unit, focused_tab_strip_model); } void TabLifecycleUnitSource::UpdateFocusedTabTo( - TabLifecycleUnit* new_focused_lifecycle_unit) { + TabLifecycleUnit* new_focused_lifecycle_unit, + TabStripModel* tab_strip_model) { if (new_focused_lifecycle_unit == focused_lifecycle_unit_) { return; } @@ -216,6 +218,18 @@ } if (new_focused_lifecycle_unit) { new_focused_lifecycle_unit->SetFocused(true); + + // Load other tabs in the same split as this tab. + if (tabs::TabInterface* tab = tabs::TabInterface::GetFromContents( + new_focused_lifecycle_unit->GetWebContents()); + tab->IsSplit()) { + for (auto other_tab : + tab_strip_model->GetSplitData(tab->GetSplit().value())->ListTabs()) { + if (other_tab != tab) { + GetTabLifecycleUnit(other_tab->GetContents())->MaybeLoad(); + } + } + } } focused_lifecycle_unit_ = new_focused_lifecycle_unit; } @@ -238,7 +252,7 @@ lifecycle_unit = holder->lifecycle_unit(); lifecycle_unit_observations_.AddObservation(lifecycle_unit); if (GetFocusedTabStripModel() == tab_strip_model && foreground) { - UpdateFocusedTabTo(lifecycle_unit); + UpdateFocusedTabTo(lifecycle_unit, tab_strip_model); } // Add a self-owned observers to record metrics and trace events. @@ -252,7 +266,7 @@ TabLifecycleUnit* lifecycle_unit = GetTabLifecycleUnit(contents); DCHECK(lifecycle_unit); if (focused_lifecycle_unit_ == lifecycle_unit) - UpdateFocusedTabTo(nullptr); + UpdateFocusedTabTo(nullptr, nullptr); lifecycle_unit->SetTabStripModel(nullptr); }
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h b/chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h index f67b35c..6a8b75c8 100644 --- a/chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h +++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h
@@ -96,7 +96,8 @@ // TabInsertedAt() calls this directly instead of UpdateFocusedTab() because // the active WebContents of a TabStripModel isn't updated when // TabInsertedAt() is called. - void UpdateFocusedTabTo(TabLifecycleUnit* new_focused_lifecycle_unit); + void UpdateFocusedTabTo(TabLifecycleUnit* new_focused_lifecycle_unit, + TabStripModel* tab_strip_model); // Methods called by OnTabStripModelChanged() void OnTabInserted(TabStripModel* tab_strip_model,
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc b/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc index a245d10..0837753 100644 --- a/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc +++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc
@@ -26,6 +26,7 @@ #include "chrome/browser/resource_coordinator/time.h" #include "chrome/browser/resource_coordinator/utils.h" #include "chrome/browser/ui/recently_audible_helper.h" +#include "chrome/browser/ui/tabs/split_tab_metrics.h" #include "chrome/browser/ui/tabs/tab_model.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h" @@ -37,6 +38,7 @@ #include "components/performance_manager/test_support/graph_impl.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/testing_pref_service.h" +#include "components/tabs/public/split_tab_visual_data.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/web_contents.h" #include "content/public/test/mock_web_contents_observer.h" @@ -389,6 +391,98 @@ .GetPendingEntry()); } + void DiscardAndActivateSplitTest(LifecycleUnitDiscardReason reason) { + LifecycleUnit* first_lifecycle_unit = nullptr; + LifecycleUnit* second_lifecycle_unit = nullptr; + CreateTwoTabs(true /* focus_tab_strip */, &first_lifecycle_unit, + &second_lifecycle_unit); + + content::WebContents* initial_first_web_contents = + tab_strip_model_->GetWebContentsAt(0); + content::WebContents* initial_second_web_contents = + tab_strip_model_->GetWebContentsAt(1); + + // Combine the first and second tabs into a split tab. + tab_strip_model_->AddToNewSplit( + {0}, split_tabs::SplitTabVisualData(), + split_tabs::SplitTabCreatedSource::kToolbarButton); + + // Add a third foreground tab to the focused tab strip. + task_environment()->FastForwardBy(kShortDelay); + LifecycleUnit* third_lifecycle_unit = nullptr; + EXPECT_CALL(source_observer_, OnLifecycleUnitCreated(_)) + .WillOnce(::testing::Invoke([&](LifecycleUnit* lifecycle_unit) { + third_lifecycle_unit = lifecycle_unit; + })); + std::unique_ptr<content::WebContents> third_web_contents = + CreateAndNavigateWebContents(); + content::WebContents* raw_third_web_contents = third_web_contents.get(); + tab_strip_model_->AppendWebContents(std::move(third_web_contents), true); + ::testing::Mock::VerifyAndClear(&source_observer_); + EXPECT_TRUE(source_->GetTabLifecycleUnitExternal(raw_third_web_contents)); + + // Advance time so tabs are urgent discardable. + task_environment()->AdvanceClock(kBackgroundUrgentProtectionTime); + + // Discard both tabs in the split. + EXPECT_EQ(LifecycleUnitState::ACTIVE, first_lifecycle_unit->GetState()); + EXPECT_CALL(tab_observer_, + MockOnLifecycleUnitStateChanged( + first_lifecycle_unit, ::mojom::LifecycleUnitState::ACTIVE, + _, ::mojom::LifecycleUnitState::DISCARDED, reason)); + first_lifecycle_unit->Discard(reason); + ::testing::Mock::VerifyAndClear(&tab_observer_); + + EXPECT_NE(initial_first_web_contents, + tab_strip_model_->GetWebContentsAt(0)); + EXPECT_FALSE(tab_strip_model_->GetWebContentsAt(0) + ->GetController() + .GetPendingEntry()); + + EXPECT_EQ(LifecycleUnitState::ACTIVE, second_lifecycle_unit->GetState()); + EXPECT_CALL(tab_observer_, + MockOnLifecycleUnitStateChanged( + second_lifecycle_unit, ::mojom::LifecycleUnitState::ACTIVE, + _, ::mojom::LifecycleUnitState::DISCARDED, reason)); + second_lifecycle_unit->Discard(reason); + ::testing::Mock::VerifyAndClear(&tab_observer_); + + EXPECT_NE(initial_second_web_contents, + tab_strip_model_->GetWebContentsAt(1)); + EXPECT_FALSE(tab_strip_model_->GetWebContentsAt(1) + ->GetController() + .GetPendingEntry()); + + // Focus the first tab in the split. Expect both tabs' states to be ACTIVE. + EXPECT_CALL( + tab_observer_, + MockOnLifecycleUnitStateChanged( + first_lifecycle_unit, ::mojom::LifecycleUnitState::DISCARDED, _, + ::mojom::LifecycleUnitState::ACTIVE, reason)); + EXPECT_CALL( + tab_observer_, + MockOnLifecycleUnitStateChanged( + second_lifecycle_unit, ::mojom::LifecycleUnitState::DISCARDED, _, + ::mojom::LifecycleUnitState::ACTIVE, reason)); + tab_strip_model_->ActivateTabAt( + 0, TabStripUserGestureDetails( + TabStripUserGestureDetails::GestureType::kOther)); + ::testing::Mock::VerifyAndClear(&tab_observer_); + EXPECT_EQ(LifecycleUnitState::ACTIVE, first_lifecycle_unit->GetState()); + EXPECT_EQ(LifecycleUnitState::ACTIVE, second_lifecycle_unit->GetState()); + EXPECT_TRUE(tab_strip_model_->GetWebContentsAt(0) + ->GetController() + .GetPendingEntry()); + EXPECT_TRUE(tab_strip_model_->GetWebContentsAt(1) + ->GetController() + .GetPendingEntry()); + + // Expect notifications when tabs are closed. + CloseTabsAndExpectNotifications( + tab_strip_model_.get(), + {first_lifecycle_unit, second_lifecycle_unit, third_lifecycle_unit}); + } + void DiscardAndExplicitlyReloadTest(LifecycleUnitDiscardReason reason) { LifecycleUnit* background_lifecycle_unit = nullptr; LifecycleUnit* foreground_lifecycle_unit = nullptr; @@ -680,6 +774,14 @@ DiscardAndActivateTest(LifecycleUnitDiscardReason::EXTERNAL); } +TEST_F(TabLifecycleUnitSourceTest, DiscardAndActivateSplit_Urgent) { + DiscardAndActivateSplitTest(LifecycleUnitDiscardReason::URGENT); +} + +TEST_F(TabLifecycleUnitSourceTest, DiscardAndActivateSplit_External) { + DiscardAndActivateSplitTest(LifecycleUnitDiscardReason::EXTERNAL); +} + TEST_F(TabLifecycleUnitSourceTest, DiscardAndExplicitlyReload_Urgent) { DiscardAndExplicitlyReloadTest(LifecycleUnitDiscardReason::URGENT); }
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc b/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc index 84e3ec0..5fb1b7a09 100644 --- a/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc +++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
@@ -32,6 +32,7 @@ #include "chrome/browser/resource_coordinator/utils.h" #include "chrome/browser/tab_contents/form_interaction_tab_helper.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/tabs/split_tab_metrics.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h" #include "chrome/browser/ui/tabs/test_util.h" @@ -260,6 +261,54 @@ ExpectCanDiscardTrueAllReasons(&tab_lifecycle_unit); } +TEST_F(TabLifecycleUnitTest, SetFocusedSplit) { + TabLifecycleUnit tab_lifecycle_unit(GetTabLifecycleUnitSource(), + web_contents_, tab_strip_model_.get()); + + // Create a new web contents that will be combined to a split tab with the + // webcontents at index 0. + content::WebContents* split_inactive_contents = + AddNewHiddenWebContentsToTabStrip(); + auto* tester = content::WebContentsTester::For(split_inactive_contents); + tester->SetLastActiveTimeTicks(NowTicks()); + tester->SetLastActiveTime(Now()); + auto navigation = content::NavigationSimulator::CreateBrowserInitiated( + GURL("https://www.example.com"), split_inactive_contents); + navigation->SetKeepLoading(true); + navigation->Commit(); + TabLifecycleUnit tab_lifecycle_unit_inactive(GetTabLifecycleUnitSource(), + split_inactive_contents, + tab_strip_model_.get()); + tab_strip_model_->ActivateTabAt(0); + tab_strip_model_->AddToNewSplit( + {tab_strip_model_->GetIndexOfWebContents(split_inactive_contents)}, + split_tabs::SplitTabVisualData(), + split_tabs::SplitTabCreatedSource::kToolbarButton); + + // Reactivate the original active tab, so that the split is in the background. + tab_strip_model_->ActivateTabAt(2); + + EXPECT_EQ(NowTicks(), tab_lifecycle_unit_inactive.GetLastFocusedTimeTicks()); + EXPECT_EQ(Now(), tab_lifecycle_unit_inactive.GetLastFocusedTime()); + // Advance time enough that the tab is urgent discardable. + test_tick_clock_.Advance(kBackgroundUrgentProtectionTime); + test_clock_.Advance(kBackgroundUrgentProtectionTime); + ExpectCanDiscardTrueAllReasons(&tab_lifecycle_unit_inactive); + + tab_lifecycle_unit.SetFocused(true); + tab_strip_model_->ActivateTabAt(0); + split_inactive_contents->WasShown(); + ExpectCanDiscardFalseAllReasons(&tab_lifecycle_unit_inactive, + DecisionFailureReason::LIVE_STATE_VISIBLE); + + tab_lifecycle_unit.SetFocused(false); + tab_strip_model_->ActivateTabAt(2); + split_inactive_contents->WasHidden(); + // Advance time enough that the tab is urgent discardable. + test_tick_clock_.Advance(kBackgroundUrgentProtectionTime); + ExpectCanDiscardTrueAllReasons(&tab_lifecycle_unit_inactive); +} + TEST_F(TabLifecycleUnitTest, AutoDiscardable) { base::WeakPtr<PageNode> page_node = PerformanceManager::GetPrimaryPageNodeForWebContents(web_contents_);
diff --git a/chrome/browser/resources/ash/settings/device_page/power.html b/chrome/browser/resources/ash/settings/device_page/power.html index e076e372..e7da0b7 100644 --- a/chrome/browser/resources/ash/settings/device_page/power.html +++ b/chrome/browser/resources/ash/settings/device_page/power.html
@@ -39,6 +39,35 @@ </div> </div> +<!-- optimizedCharging --> +<template is="dom-if" if="[[!optimizedChargingHidden_]]" restamp> + <div id="optimizedChargingSettingsRow" + class$="[[getClassForRow_(batteryStatus_.present, 'optimizedCharging')]]"> + <div class="flex layout horizontal center"> + <div class="flex settings-box-text"> + <div id="optimizedChargingLabel"> + $i18n{powerOptimizedChargingLabel} + </div> + <div id="optimizedChargingSublabel" class="cr-secondary-text sub-label"> + <span class="sub-label-text">[[optimizedChargingSublabel_]]</span> + </div> + </div> + </div> + <cr-button id="optimizedChargingChangeButton" + deep-link-focus-id$="[[Setting.kAdaptiveCharging]] + [[Setting.kChargeLimit]]"> + $i18n{powerOptimizedChargingChangeLabel} + </cr-button> + <div class="separator"></div> + <settings-toggle-v2 id="optimizedChargingToggle" + on-change="onOptimizedChargingToggleChange_" + deep-link-focus-id$="[[Setting.kOptimizedCharging]]"> + </settings-toggle-v2> + </div> +</template> + + +<!-- batterySaver --> <settings-toggle-button id="batterySaverToggle" class$="[[getClassForRow_(batteryStatus_.present, 'batterySaver')]]" hidden$="[[batterySaverHidden_]]" @@ -50,20 +79,22 @@ deep-link-focus-id$="[[Setting.kBatterySaver]]"> </settings-toggle-button> -<template is="dom-if" if="[[batteryChargeLimitAvailable_]]" restamp></template> +<!-- adaptiveCharging --> +<template is="dom-if" if="[[!batteryChargeLimitAvailable_]]" restamp> + <settings-toggle-button id="adaptiveChargingToggle" + class$="[[getClassForRow_(batteryStatus_.present, 'adaptiveCharging')]]" + hidden$="[[!adaptiveChargingSupported_]]" + pref="[[adaptiveChargingPref_]]" + label="$i18n{powerAdaptiveChargingLabel}" + sub-label="$i18n{powerAdaptiveChargingSubtext}" + learn-more-url="$i18n{powerAdaptiveChargingLearnMoreUrl}" + on-settings-boolean-control-change="onAdaptiveChargingToggleChange_" + deep-link-focus-id$="[[Setting.kAdaptiveCharging]]" + no-set-pref> + </settings-toggle-button> +</template> -<settings-toggle-button id="adaptiveChargingToggle" - class$="[[getClassForRow_(batteryStatus_.present, 'adaptiveCharging')]]" - hidden$="[[!adaptiveChargingSupported_]]" - pref="[[adaptiveChargingPref_]]" - label="$i18n{powerAdaptiveChargingLabel}" - sub-label="$i18n{powerAdaptiveChargingSubtext}" - learn-more-url="$i18n{powerAdaptiveChargingLearnMoreUrl}" - on-settings-boolean-control-change="onAdaptiveChargingToggleChange_" - deep-link-focus-id$="[[Setting.kAdaptiveCharging]]" - no-set-pref> -</settings-toggle-button> - +<!-- idle --> <template is="dom-if" if="[[!batteryStatus_.present]]" restamp> <div class$="[[getClassForRow_(batteryStatus_.present, 'idle')]]"> <div id="powerIdleLabel" class="flex" aria-label="true"> @@ -91,6 +122,7 @@ </div> </template> +<!-- acIdle --> <template is="dom-if" if="[[batteryStatus_.present]]" restamp> <div id="acIdleSettingBox" class$="[[getClassForRow_(batteryStatus_.present, 'acIdle')]]">
diff --git a/chrome/browser/resources/ash/settings/device_page/power.ts b/chrome/browser/resources/ash/settings/device_page/power.ts index ab979d0..69af1612 100644 --- a/chrome/browser/resources/ash/settings/device_page/power.ts +++ b/chrome/browser/resources/ash/settings/device_page/power.ts
@@ -21,10 +21,12 @@ import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {assertExists} from '../assert_extras.js'; import {DeepLinkingMixin} from '../common/deep_linking_mixin.js'; import {isBatteryChargeLimitAvailable} from '../common/load_time_booleans.js'; import {RouteObserverMixin} from '../common/route_observer_mixin.js'; import type {SettingsToggleButtonElement} from '../controls/settings_toggle_button.js'; +import type {SettingsToggleV2Element} from '../controls/v2/settings_toggle_v2.js'; import {recordSettingChange} from '../metrics_recorder.js'; import {Setting} from '../mojom-webui/setting.mojom-webui.js'; import type {Route} from '../router.js'; @@ -42,7 +44,6 @@ export interface SettingsPowerElement { $: { - adaptiveChargingToggle: SettingsToggleButtonElement, batterySaverToggle: SettingsToggleButtonElement, lidClosedToggle: SettingsToggleButtonElement, powerSource: HTMLSelectElement, @@ -187,6 +188,18 @@ computed: 'computeBatterySaverHidden_(batteryStatus_, batterySaverFeatureEnabled_)', }, + + optimizedChargingSublabel_: { + type: String, + computed: + 'computeOptimizedChargingSublabel_(adaptiveChargingPref_.value, false)', + }, + + optimizedChargingHidden_: { + type: Boolean, + computed: + 'computeOptimizedChargingHidden_(adaptiveChargingSupported_, batteryChargeLimitAvailable_)', + }, }; } @@ -198,6 +211,8 @@ Setting.kPowerIdleBehaviorWhileOnBattery, Setting.kAdaptiveCharging, Setting.kBatterySaver, + Setting.kOptimizedCharging, + Setting.kChargeLimit, ]); private acIdleManaged_: boolean; @@ -206,6 +221,8 @@ private adaptiveChargingManaged_: boolean; private adaptiveChargingPref_: chrome.settingsPrivate.PrefObject<boolean>; private readonly batteryChargeLimitAvailable_: boolean; + private optimizedChargingSublabel_: string; + private optimizedChargingHidden_: boolean; private batteryIdleManaged_: boolean; private batteryIdleOptions_: IdleOption[]; private batterySaverHidden_: boolean; @@ -313,6 +330,26 @@ return !featureEnabled || !batteryStatus.present; } + private computeOptimizedChargingSublabel_( + adaptiveChargingEnabled: boolean, chargeLimitEnabled: boolean): string { + if (adaptiveChargingEnabled) { + return this.i18n('powerAdaptiveChargingLabel'); + } + if (chargeLimitEnabled) { + return this.i18n('powerBatteryChargeLimitLabel'); + } + // Return empty string if no policy is selected. + return ''; + } + + private computeOptimizedChargingHidden_( + adaptiveChargingSupported: boolean, + batteryChargeLimitAvailable: boolean): boolean { + // Hidden if adaptive charging is not supported, or if the feature flag is + // not enabled. + return !adaptiveChargingSupported || !batteryChargeLimitAvailable; + } + private onPowerSourceChange_(): void { this.browserProxy_.setPowerSource(this.$.powerSource.value); } @@ -351,11 +388,26 @@ } private onAdaptiveChargingToggleChange_(): void { - const enabled = this.$.adaptiveChargingToggle.checked; + const adaptiveChargingToggle = + this.shadowRoot!.querySelector<SettingsToggleV2Element>( + '#adaptiveChargingToggle'); + assertExists(adaptiveChargingToggle); + const enabled = adaptiveChargingToggle.checked; this.browserProxy_.setAdaptiveCharging(enabled); recordSettingChange(Setting.kAdaptiveCharging, {boolValue: enabled}); } + private onOptimizedChargingToggleChange_(): void { + const enabled = + this.shadowRoot! + .querySelector<SettingsToggleV2Element>('#optimizedChargingToggle') + ?.checked ?? + false; + // TODO(mwoj): Retrieve pref (adaptive charging or battery charge limit) and + // use the browser proxy to set the appropriate one. + recordSettingChange(Setting.kOptimizedCharging, {boolValue: enabled}); + } + /** * @param sources External power sources. * @param selectedId The ID of the currently used power source. @@ -510,25 +562,31 @@ const classes = ['cr-row']; switch (element) { - case 'batterySaver': + case 'optimizedCharging': if (!batteryPresent) { classes.push('first'); } break; + case 'batterySaver': + if (!batteryPresent && this.optimizedChargingHidden_) { + classes.push('first'); + } + break; case 'adaptiveCharging': - if (!batteryPresent && this.batterySaverHidden_) { + if (!batteryPresent && this.optimizedChargingHidden_ && + this.batterySaverHidden_) { classes.push('first'); } break; case 'idle': - if (!batteryPresent && this.batterySaverHidden_ && - !this.adaptiveChargingSupported_) { + if (!batteryPresent && this.optimizedChargingHidden_ && + this.batterySaverHidden_ && !this.adaptiveChargingSupported_) { classes.push('first'); } break; case 'acIdle': - if (!batteryPresent && this.batterySaverHidden_ && - !this.adaptiveChargingSupported_) { + if (!batteryPresent && this.optimizedChargingHidden_ && + this.batterySaverHidden_ && !this.adaptiveChargingSupported_) { classes.push('first'); } classes.push('dropdown-row');
diff --git a/chrome/browser/resources/extensions_zero_state_promo/zero_state_promo_app.css b/chrome/browser/resources/extensions_zero_state_promo/zero_state_promo_app.css index ffe6cdc4..c7dee1dfd 100644 --- a/chrome/browser/resources/extensions_zero_state_promo/zero_state_promo_app.css +++ b/chrome/browser/resources/extensions_zero_state_promo/zero_state_promo_app.css
@@ -16,7 +16,6 @@ --zero-state-promo-background-color: var(--color-button-foreground); --zero-state-promo-foreground-color: var(--color-button-background); --container-gap: 8px; - --top-container-padding: 20px; border-radius: 12px; display: flex; @@ -41,7 +40,7 @@ font-weight: 500; line-height: 24px; margin: 0px; - width: calc(100% - var(--top-container-padding) * 2); + width: 260px; } #dismissButton { @@ -76,7 +75,7 @@ font-size: 14px; line-height: 20px; padding-top: 4px; - width: calc(100% - var(--top-container-padding) * 2); + width: 267px; } #anchorContainer a {
diff --git a/chrome/browser/resources/on_device_internals/tools.css b/chrome/browser/resources/on_device_internals/tools.css index ecc92d6..6258680 100644 --- a/chrome/browser/resources/on_device_internals/tools.css +++ b/chrome/browser/resources/on_device_internals/tools.css
@@ -111,7 +111,7 @@ } #modelInput { - max-width: 400px; + max-width: 600px; } cr-collapse {
diff --git a/chrome/browser/resources/on_device_internals/tools.html.ts b/chrome/browser/resources/on_device_internals/tools.html.ts index 3f3840b..607cb73 100644 --- a/chrome/browser/resources/on_device_internals/tools.html.ts +++ b/chrome/browser/resources/on_device_internals/tools.html.ts
@@ -12,15 +12,20 @@ <div class="performance-class"> Device performance class: <strong>${this.performanceClassText_}</strong> </div> + <cr-input id="modelInput" label="Model directory" placeholder="/tmp/model" ?disabled="${this.isLoading_()}" - .value="${this.defaultModelPath_}" error-message="${this.error_}" ?invalid="${this.error_.length}" autofocus> <cr-button slot="suffix" ?disabled="${this.isLoading_()}" @click="${this.onLoadClick_}"> Load </cr-button> + <cr-button slot="suffix" ?disabled="${this.isLoading_()}" + @click="${this.onLoadDefaultClick_}"> + Load Default + </cr-button> </cr-input> + <div class="model-options"> <select id="performanceHintSelect" class="md-select" value="${this.performanceHint_}" @change="${this.onPerformanceHintChange_}">
diff --git a/chrome/browser/resources/on_device_internals/tools.ts b/chrome/browser/resources/on_device_internals/tools.ts index 63bd60f..55786c3 100644 --- a/chrome/browser/resources/on_device_internals/tools.ts +++ b/chrome/browser/resources/on_device_internals/tools.ts
@@ -109,7 +109,6 @@ static override get properties() { return { - defaultModelPath_: {type: String}, modelPath_: {type: String}, error_: {type: String}, imageError_: {type: String}, @@ -139,7 +138,6 @@ protected accessor currentResponse_: Response|null = null; protected accessor error_: string = ''; protected accessor imageError_: string = ''; - protected accessor defaultModelPath_: string = ''; private loadModelDuration_: number = -1; private accessor loadModelStart_: number = 0; private accessor modelPath_: string = ''; @@ -162,7 +160,6 @@ override firstUpdated() { this.getPerformanceClass_(); - this.getDefaultModelPath_(); this.$.temperatureInput.inputElement.step = '0.1'; this.$.imageInput.addEventListener( 'change', this.onImageChange_.bind(this)); @@ -188,14 +185,6 @@ .performanceInfo.performanceClass); } - private async getDefaultModelPath_() { - const defaultModelPath = await this.proxy_.handler.getDefaultModelPath(); - if (defaultModelPath.modelPath === null) { - return; - } - this.defaultModelPath_ = filePathToString(defaultModelPath.modelPath); - } - private onModelOrErrorChanged_() { if (this.model_ !== null) { this.loadModelDuration_ = new Date().getTime() - this.loadModelStart_; @@ -205,7 +194,24 @@ } protected onLoadClick_() { - this.onModelSelected_(); + const modelPathString = this.$.modelInput.value; + // <if expr="is_win"> + // Windows file paths are std::wstring, so use Array<Number>. + const processedPath = Array.from(modelPathString, (c) => c.charCodeAt(0)); + // </if> + // <if expr="not is_win"> + const processedPath = modelPathString; + // </if> + this.onModelSelected_({path: processedPath}); + } + + protected async onLoadDefaultClick_() { + const defaultModelPath = await this.proxy_.handler.getDefaultModelPath(); + if (defaultModelPath.modelPath === null) { + this.error_ = 'Unable to get default model path.'; + return; + } + this.onModelSelected_(defaultModelPath.modelPath); } protected onAddImageClick_() { @@ -262,7 +268,7 @@ } - private async onModelSelected_() { + private async onModelSelected_(modelPath: FilePath) { this.error_ = ''; if (this.model_) { this.model_.$.close(); @@ -277,18 +283,9 @@ this.loadModelStart_ = new Date().getTime(); const performanceHint = ModelPerformanceHint[( this.performanceHint_ as keyof typeof ModelPerformanceHint)]; - const modelPath = this.$.modelInput.value; - // <if expr="is_win"> - // Windows file paths are std::wstring, so use Array<Number>. - const processedPath = Array.from(modelPath, (c) => c.charCodeAt(0)); - // </if> - // <if expr="not is_win"> - const processedPath = modelPath; - // </if> const newModel = new OnDeviceModelRemote(); const {result, capabilities} = await this.proxy_.handler.loadModel( - {path: processedPath}, performanceHint, - newModel.$.bindNewPipeAndPassReceiver()); + modelPath, performanceHint, newModel.$.bindNewPipeAndPassReceiver()); if (result !== LoadModelResult.kSuccess) { this.error_ = 'Unable to load model. Specify a correct and absolute path.'; @@ -299,7 +296,7 @@ this.onServiceCrashed_(); }); this.startNewSession_(); - this.modelPath_ = modelPath; + this.modelPath_ = filePathToString(modelPath); this.loadedPerformanceHint_ = performanceHint; } }
diff --git a/chrome/browser/resources/side_panel/read_anything/app.ts b/chrome/browser/resources/side_panel/read_anything/app.ts index 86ef61d6..9b0b52ee 100644 --- a/chrome/browser/resources/side_panel/read_anything/app.ts +++ b/chrome/browser/resources/side_panel/read_anything/app.ts
@@ -675,7 +675,7 @@ } protected updateLinks_() { - if (!this.shadowRoot) { + if (!this.shadowRoot || !this.hasContent_) { return; } @@ -697,7 +697,8 @@ } protected updateImages_() { - if (!this.shadowRoot || !chrome.readingMode.imagesFeatureEnabled) { + if (!this.shadowRoot || !chrome.readingMode.imagesFeatureEnabled || + !this.hasContent_) { return; }
diff --git a/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.cc b/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.cc index d9fc88b..1eae517 100644 --- a/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.cc +++ b/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.h" +#include "base/notimplemented.h" #include "components/safe_browsing/core/common/proto/csd.pb.h" namespace safe_browsing { @@ -13,4 +14,31 @@ return false; } +bool ClientSideDetectionIntelligentScanDelegateAndroid:: + IsOnDeviceModelAvailable(bool log_failed_eligibility_reason) { + return false; +} + +void ClientSideDetectionIntelligentScanDelegateAndroid::InquireOnDeviceModel( + std::string rendered_texts, + InquireOnDeviceModelDoneCallback callback) { + NOTIMPLEMENTED(); + return; +} + +void ClientSideDetectionIntelligentScanDelegateAndroid::ResetOnDeviceSession( + bool inquiry_complete) { + return; +} + +void ClientSideDetectionIntelligentScanDelegateAndroid:: + StartListeningToOnDeviceModelUpdate() { + return; +} + +void ClientSideDetectionIntelligentScanDelegateAndroid:: + StopListeningToOnDeviceModelUpdate() { + return; +} + } // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.h b/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.h index 116aabc..9275f1a 100644 --- a/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.h +++ b/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.h
@@ -25,6 +25,12 @@ // IntelligentScanDelegate implementation. bool ShouldRequestIntelligentScan(ClientPhishingRequest* verdict) override; + bool IsOnDeviceModelAvailable(bool log_failed_eligibility_reason) override; + void InquireOnDeviceModel(std::string rendered_texts, + InquireOnDeviceModelDoneCallback callback) override; + void ResetOnDeviceSession(bool inquiry_complete) override; + void StartListeningToOnDeviceModelUpdate() override; + void StopListeningToOnDeviceModelUpdate() override; }; } // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android_unittest.cc b/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android_unittest.cc index bcbee73..14bac9a 100644 --- a/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android_unittest.cc +++ b/chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android_unittest.cc
@@ -22,4 +22,13 @@ EXPECT_FALSE(delegate.ShouldRequestIntelligentScan(&verdict)); } +TEST_F(ClientSideDetectionIntelligentScanDelegateAndroidTest, + IsOnDeviceModelAvailable) { + ClientSideDetectionIntelligentScanDelegateAndroid delegate; + EXPECT_FALSE(delegate.IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + EXPECT_FALSE(delegate.IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/false)); +} + } // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc index f2b9b65..3d09ceda 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -273,6 +273,14 @@ ShouldRequestIntelligentScan, (ClientPhishingRequest*), (override)); + MOCK_METHOD(bool, IsOnDeviceModelAvailable, (bool), (override)); + MOCK_METHOD(void, StartListeningToOnDeviceModelUpdate, (), (override)); + MOCK_METHOD(void, StopListeningToOnDeviceModelUpdate, (), (override)); + MOCK_METHOD(void, + InquireOnDeviceModel, + (std::string, InquireOnDeviceModelDoneCallback), + (override)); + MOCK_METHOD(void, ResetOnDeviceSession, (bool), (override)); }; } // namespace
diff --git a/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.cc b/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.cc index 6f5dfe8..ba287f6 100644 --- a/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.cc +++ b/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.cc
@@ -4,16 +4,77 @@ #include "chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.h" +#include "base/containers/fixed_flat_set.h" +#include "base/metrics/histogram_functions.h" +#include "chrome/browser/optimization_guide/optimization_guide_keyed_service.h" +#include "components/optimization_guide/core/optimization_guide_features.h" #include "components/prefs/pref_service.h" #include "components/safe_browsing/core/common/features.h" #include "components/safe_browsing/core/common/proto/csd.pb.h" #include "components/safe_browsing/core/common/safe_browsing_prefs.h" +#include "content/public/browser/browser_thread.h" + +namespace { +using ScamDetectionRequest = optimization_guide::proto::ScamDetectionRequest; +using ScamDetectionResponse = optimization_guide::proto::ScamDetectionResponse; + +// Currently, the following errors, which are used when a model may have been +// installed but not yet loaded, are treated as waitable. +static constexpr auto kWaitableReasons = + base::MakeFixedFlatSet<optimization_guide::OnDeviceModelEligibilityReason>({ + optimization_guide::OnDeviceModelEligibilityReason:: + kConfigNotAvailableForFeature, + optimization_guide::OnDeviceModelEligibilityReason::kModelToBeInstalled, + optimization_guide::OnDeviceModelEligibilityReason:: + kSafetyModelNotAvailable, + optimization_guide::OnDeviceModelEligibilityReason:: + kLanguageDetectionModelNotAvailable, + }); + +void LogOnDeviceModelDownloadSuccess(bool success) { + base::UmaHistogramBoolean("SBClientPhishing.OnDeviceModelDownloadSuccess", + success); +} + +void LogOnDeviceModelSessionAliveOnNewRequest(bool is_alive) { + base::UmaHistogramBoolean( + "SBClientPhishing.OnDeviceModelSessionAliveOnNewRequest", is_alive); +} + +void LogOnDeviceModelSessionCreationSuccess(bool success) { + base::UmaHistogramBoolean( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", success); +} + +void LogOnDeviceModelExecutionSuccessAndTime( + bool success, + base::TimeTicks session_execution_start_time) { + base::UmaHistogramBoolean("SBClientPhishing.OnDeviceModelExecutionSuccess", + success); + base::UmaHistogramMediumTimes( + "SBClientPhishing.OnDeviceModelExecutionDuration", + base::TimeTicks::Now() - session_execution_start_time); +} + +void LogOnDeviceModelExecutionParse(bool success) { + base::UmaHistogramBoolean( + "SBClientPhishing.OnDeviceModelResponseParseSuccess", success); +} + +void LogOnDeviceModelCallbackStateOnSuccessfulResponse(bool is_alive) { + base::UmaHistogramBoolean( + "SBClientPhishing.OnDeviceModelSuccessfulResponseCallbackAlive", + is_alive); +} +} // namespace namespace safe_browsing { ClientSideDetectionIntelligentScanDelegateDesktop:: - ClientSideDetectionIntelligentScanDelegateDesktop(PrefService& pref) - : pref_(pref) {} + ClientSideDetectionIntelligentScanDelegateDesktop( + PrefService& pref, + OptimizationGuideKeyedService* opt_guide) + : pref_(pref), opt_guide_(opt_guide) {} ClientSideDetectionIntelligentScanDelegateDesktop:: ~ClientSideDetectionIntelligentScanDelegateDesktop() = default; @@ -39,4 +100,210 @@ return is_keyboard_lock_requested || is_intelligent_scan_requested; } +bool ClientSideDetectionIntelligentScanDelegateDesktop:: + IsOnDeviceModelAvailable(bool log_failed_eligibility_reason) { + if (log_failed_eligibility_reason && !on_device_model_available_) { + LogOnDeviceModelEligibilityReason(); + } + return on_device_model_available_; +} + +void ClientSideDetectionIntelligentScanDelegateDesktop::InquireOnDeviceModel( + std::string rendered_texts, + InquireOnDeviceModelDoneCallback callback) { + // We have checked the model availability prior to calling this function, but + // we want to check one last time before creating a session. + if (!IsOnDeviceModelAvailable(/*log_failed_eligibility_reason=*/false)) { + std::move(callback).Run(std::nullopt); + return; + } + + // Close off the previous session if session's model execution from a previous + // call into InquireOnDeviceModel is still happening. + if (session_) { + LogOnDeviceModelSessionAliveOnNewRequest(true); + session_.reset(); + } else { + LogOnDeviceModelSessionAliveOnNewRequest(false); + } + + base::TimeTicks session_creation_start_time = base::TimeTicks::Now(); + + session_ = GetModelExecutorSession(); + + if (!session_) { + LogOnDeviceModelSessionCreationSuccess(false); + std::move(callback).Run(std::nullopt); + return; + } + + base::UmaHistogramMediumTimes( + "SBClientPhishing.OnDeviceModelSessionCreationTime", + base::TimeTicks::Now() - session_creation_start_time); + LogOnDeviceModelSessionCreationSuccess(true); + + ScamDetectionRequest request; + request.set_rendered_text(rendered_texts); + + inquire_on_device_model_callback_ = std::move(callback); + session_execution_start_time_ = base::TimeTicks::Now(); + session_->ExecuteModel( + *std::make_unique<ScamDetectionRequest>(request), + base::BindRepeating(&ClientSideDetectionIntelligentScanDelegateDesktop:: + ModelExecutionCallback, + weak_factory_.GetWeakPtr())); +} + +void ClientSideDetectionIntelligentScanDelegateDesktop::ModelExecutionCallback( + optimization_guide::OptimizationGuideModelStreamingExecutionResult result) { + if (!result.response.has_value()) { + LogOnDeviceModelExecutionSuccessAndTime(/*success=*/false, + session_execution_start_time_); + if (inquire_on_device_model_callback_) { + std::move(inquire_on_device_model_callback_).Run(std::nullopt); + } + return; + } + + // This is a non-error response, but it's not completed, yet so we wait till + // it's complete. We will not respond to the callback yet because of this. + if (!result.response->is_complete) { + return; + } + + LogOnDeviceModelExecutionSuccessAndTime(/*success=*/true, + session_execution_start_time_); + + auto scam_detection_response = optimization_guide::ParsedAnyMetadata< + optimization_guide::proto::ScamDetectionResponse>( + result.response->response); + + if (!scam_detection_response) { + LogOnDeviceModelExecutionParse(false); + if (inquire_on_device_model_callback_) { + std::move(inquire_on_device_model_callback_).Run(std::nullopt); + } + return; + } + + LogOnDeviceModelExecutionParse(true); + + ResetOnDeviceSession(/*inquiry_complete=*/true); + + LogOnDeviceModelCallbackStateOnSuccessfulResponse( + !!inquire_on_device_model_callback_); + if (inquire_on_device_model_callback_) { + ClientSideDetectionHost::IntelligentScanDelegate::IntelligentScanResult + intelligent_scan_result; + intelligent_scan_result.brand = scam_detection_response->brand(); + intelligent_scan_result.intent = scam_detection_response->intent(); + std::move(inquire_on_device_model_callback_).Run(intelligent_scan_result); + } +} + +void ClientSideDetectionIntelligentScanDelegateDesktop::ResetOnDeviceSession( + bool inquiry_complete) { + // Because of the use of DeleteSoon below, we can't guarantee that session_ + // is still available when the callback is invoked. + if (session_) { + // Reset session immediately so that future inference is not affected by the + // old context. + // TODO(crbug.com/380928557): Call session_.reset() directly once + // crbug.com/384774788 is fixed. + content::GetUIThreadTaskRunner({})->DeleteSoon(FROM_HERE, + std::move(session_)); + if (!inquiry_complete) { + LogOnDeviceModelSessionAliveOnNewRequest(true); + } + } +} + +void ClientSideDetectionIntelligentScanDelegateDesktop:: + StartListeningToOnDeviceModelUpdate() { + if (observing_on_device_model_availability_) { + return; + } + + auto session = GetModelExecutorSession(); + + if (session) { + NotifyOnDeviceModelAvailable(); + } else { + observing_on_device_model_availability_ = true; + on_device_fetch_time_ = base::TimeTicks::Now(); + opt_guide_->AddOnDeviceModelAvailabilityChangeObserver( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, this); + } +} + +void ClientSideDetectionIntelligentScanDelegateDesktop:: + StopListeningToOnDeviceModelUpdate() { + on_device_model_available_ = false; + if (session_) { + session_.reset(); + } + if (!observing_on_device_model_availability_) { + return; + } + + observing_on_device_model_availability_ = false; + opt_guide_->RemoveOnDeviceModelAvailabilityChangeObserver( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, this); +} + +void ClientSideDetectionIntelligentScanDelegateDesktop::Shutdown() { + StopListeningToOnDeviceModelUpdate(); +} + +void ClientSideDetectionIntelligentScanDelegateDesktop:: + OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey feature, + optimization_guide::OnDeviceModelEligibilityReason reason) { + if (!observing_on_device_model_availability_ || + feature != optimization_guide::ModelBasedCapabilityKey::kScamDetection) { + return; + } + + if (kWaitableReasons.contains(reason)) { + return; + } + + if (reason == optimization_guide::OnDeviceModelEligibilityReason::kSuccess) { + base::UmaHistogramLongTimes("SBClientPhishing.OnDeviceModelFetchTime", + base::TimeTicks::Now() - on_device_fetch_time_); + NotifyOnDeviceModelAvailable(); + } else { + LogOnDeviceModelDownloadSuccess(false); + } +} + +void ClientSideDetectionIntelligentScanDelegateDesktop:: + NotifyOnDeviceModelAvailable() { + LogOnDeviceModelDownloadSuccess(true); + on_device_model_available_ = true; +} + +void ClientSideDetectionIntelligentScanDelegateDesktop:: + LogOnDeviceModelEligibilityReason() { + optimization_guide::OnDeviceModelEligibilityReason eligibility = + opt_guide_->GetOnDeviceModelEligibility( + optimization_guide::ModelBasedCapabilityKey::kScamDetection); + base::UmaHistogramEnumeration( + "SBClientPhishing.OnDeviceModelEligibilityReasonAtInquiryFailure", + eligibility); +} + +std::unique_ptr<optimization_guide::OptimizationGuideModelExecutor::Session> +ClientSideDetectionIntelligentScanDelegateDesktop::GetModelExecutorSession() { + using ::optimization_guide::SessionConfigParams; + SessionConfigParams config_params = SessionConfigParams{ + .execution_mode = SessionConfigParams::ExecutionMode::kOnDeviceOnly, + .logging_mode = SessionConfigParams::LoggingMode::kDefault, + }; + + return opt_guide_->StartSession( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + config_params); +} + } // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.h b/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.h index 3a509bd..39a681a 100644 --- a/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.h +++ b/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.h
@@ -5,9 +5,13 @@ #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_INTELLIGENT_SCAN_DELEGATE_DESKTOP_H_ #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_INTELLIGENT_SCAN_DELEGATE_DESKTOP_H_ +#include "base/memory/weak_ptr.h" +#include "components/optimization_guide/core/model_execution/feature_keys.h" +#include "components/optimization_guide/core/optimization_guide_model_executor.h" #include "components/safe_browsing/content/browser/client_side_detection_host.h" class PrefService; +class OptimizationGuideKeyedService; namespace safe_browsing { @@ -16,9 +20,12 @@ // observing updates, and executing the model. // TODO(crbug.com/424104358): Move remaining functions into this class. class ClientSideDetectionIntelligentScanDelegateDesktop - : public ClientSideDetectionHost::IntelligentScanDelegate { + : public ClientSideDetectionHost::IntelligentScanDelegate, + public optimization_guide::OnDeviceModelAvailabilityObserver { public: - explicit ClientSideDetectionIntelligentScanDelegateDesktop(PrefService& pref); + ClientSideDetectionIntelligentScanDelegateDesktop( + PrefService& pref, + OptimizationGuideKeyedService* opt_guide); ~ClientSideDetectionIntelligentScanDelegateDesktop() override; ClientSideDetectionIntelligentScanDelegateDesktop( @@ -28,9 +35,52 @@ // IntelligentScanDelegate implementation. bool ShouldRequestIntelligentScan(ClientPhishingRequest* verdict) override; + bool IsOnDeviceModelAvailable(bool log_failed_eligibility_reason) override; + void InquireOnDeviceModel(std::string rendered_texts, + InquireOnDeviceModelDoneCallback callback) override; + void ResetOnDeviceSession(bool inquiry_complete) override; + void StartListeningToOnDeviceModelUpdate() override; + void StopListeningToOnDeviceModelUpdate() override; + + // KeyedService implementation. + void Shutdown() override; private: + // optimization_guide::OnDeviceModelAvailabilityObserver + void OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey feature, + optimization_guide::OnDeviceModelEligibilityReason reason) override; + + void NotifyOnDeviceModelAvailable(); + + void LogOnDeviceModelEligibilityReason(); + + std::unique_ptr<optimization_guide::OptimizationGuideModelExecutor::Session> + GetModelExecutorSession(); + + void ModelExecutionCallback( + optimization_guide::OptimizationGuideModelStreamingExecutionResult + result); + + // It is set to true when the on-device model is not readily available, but + // it's expected to be ready soon. See `kWaitableReasons` for more details. + bool observing_on_device_model_availability_ = false; + // This is used to check before fetching the session when the correct trigger + // is called to generate the on-device model LLM. + bool on_device_model_available_ = false; + base::TimeTicks on_device_fetch_time_; + + base::TimeTicks session_execution_start_time_; + // The underlying session provided by optimization guide component. + std::unique_ptr<optimization_guide::OptimizationGuideModelExecutor::Session> + session_; + InquireOnDeviceModelDoneCallback inquire_on_device_model_callback_; + const raw_ref<PrefService> pref_; + const raw_ptr<OptimizationGuideKeyedService> opt_guide_; + + base::WeakPtrFactory<ClientSideDetectionIntelligentScanDelegateDesktop> + weak_factory_{this}; }; } // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop_unittest.cc index 61e575d..7dffc74 100644 --- a/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop_unittest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop_unittest.cc
@@ -4,14 +4,34 @@ #include "chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.h" +#include "base/run_loop.h" +#include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" +#include "base/test/test_future.h" +#include "chrome/browser/optimization_guide/mock_optimization_guide_keyed_service.h" +#include "components/optimization_guide/core/mock_optimization_guide_model_executor.h" +#include "components/optimization_guide/core/optimization_guide_proto_util.h" +#include "components/safe_browsing/content/browser/client_side_detection_host.h" #include "components/safe_browsing/core/common/features.h" #include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/sync_preferences/testing_pref_service_syncable.h" +#include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" +using ::optimization_guide::AnyWrapProto; +using ::optimization_guide::MockSession; +using ::optimization_guide::OptimizationGuideModelExecutionError; +using ::optimization_guide::OptimizationGuideModelStreamingExecutionResult; +using ::optimization_guide::proto::ScamDetectionResponse; +using ::testing::_; +using ::testing::Invoke; +using ::testing::NiceMock; + namespace safe_browsing { +using IntelligentScanResult = + ClientSideDetectionHost::IntelligentScanDelegate::IntelligentScanResult; + class ClientSideDetectionIntelligentScanDelegateDesktopTest : public testing::Test { public: @@ -22,69 +42,674 @@ {}); RegisterProfilePrefs(pref_service_.registry()); SetEnhancedProtectionPrefForTests(&pref_service_, true); + + delegate_ = + std::make_unique<ClientSideDetectionIntelligentScanDelegateDesktop>( + pref_service_, &mock_opt_guide_); } protected: + void EnableOnDeviceModel() { + optimization_guide::OnDeviceModelAvailabilityObserver* + availability_observer = nullptr; + base::RunLoop run_loop_for_add_observer; + EXPECT_CALL(mock_opt_guide_, + AddOnDeviceModelAvailabilityChangeObserver(_, _)) + .WillOnce( + Invoke([&](optimization_guide::ModelBasedCapabilityKey feature, + optimization_guide::OnDeviceModelAvailabilityObserver* + observer) { + availability_observer = observer; + run_loop_for_add_observer.Quit(); + })); + + delegate_->StartListeningToOnDeviceModelUpdate(); + + run_loop_for_add_observer.Run(); + CHECK(availability_observer); + + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason::kSuccess); + + ASSERT_TRUE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + } + + void EnableOnDeviceModelWithSession() { + EnableOnDeviceModel(); + EXPECT_CALL(mock_opt_guide_, StartSession(_, _)) + .WillOnce(testing::Invoke( + [&](optimization_guide::ModelBasedCapabilityKey feature, + const std::optional<optimization_guide::SessionConfigParams>& + config_params) { + return std::make_unique<NiceMock<MockSession>>(&session_); + })); + } + + optimization_guide::StreamingResponse CreateScamDetectionResponse( + const std::string& brand, + const std::string& intent, + bool is_complete) { + ScamDetectionResponse response; + response.set_brand(brand); + response.set_intent(intent); + return optimization_guide::StreamingResponse{ + .response = AnyWrapProto(response), .is_complete = is_complete}; + } + + content::BrowserTaskEnvironment task_environment_; sync_preferences::TestingPrefServiceSyncable pref_service_; + NiceMock<MockOptimizationGuideKeyedService> mock_opt_guide_; + testing::NiceMock<MockSession> session_; + std::unique_ptr<ClientSideDetectionIntelligentScanDelegateDesktop> delegate_; + base::HistogramTester histogram_tester_; base::test::ScopedFeatureList feature_list_; }; TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, ShouldRequestIntelligentScan_KeyboardLockRequested) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::KEYBOARD_LOCK_REQUESTED); - EXPECT_TRUE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_TRUE(delegate_->ShouldRequestIntelligentScan(&verdict)); } TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, ShouldRequestIntelligentScan_IntelligentScanRequested) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::FORCE_REQUEST); verdict.mutable_llama_forced_trigger_info()->set_intelligent_scan(true); - EXPECT_TRUE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_TRUE(delegate_->ShouldRequestIntelligentScan(&verdict)); } TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, ShouldNotRequestIntelligentScan_PointerLockRequested) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::POINTER_LOCK_REQUESTED); - EXPECT_FALSE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_FALSE(delegate_->ShouldRequestIntelligentScan(&verdict)); } TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, ShouldNotRequestIntelligentScan_EnhancedProtectionDisabled) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); SetEnhancedProtectionPrefForTests(&pref_service_, false); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::KEYBOARD_LOCK_REQUESTED); - EXPECT_FALSE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_FALSE(delegate_->ShouldRequestIntelligentScan(&verdict)); } TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, ShouldNotRequestIntelligentScan_EmptyLlamaForcedTriggerInfo) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); SetEnhancedProtectionPrefForTests(&pref_service_, false); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::FORCE_REQUEST); - EXPECT_FALSE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_FALSE(delegate_->ShouldRequestIntelligentScan(&verdict)); } TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, ShouldNotRequestIntelligentScan_IntelligentScanDisabled) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::FORCE_REQUEST); verdict.mutable_llama_forced_trigger_info()->set_intelligent_scan(false); - EXPECT_FALSE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_FALSE(delegate_->ShouldRequestIntelligentScan(&verdict)); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestOnDeviceModelFetchSuccessCall) { + EXPECT_FALSE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + + optimization_guide::OnDeviceModelAvailabilityObserver* availability_observer = + nullptr; + base::RunLoop run_loop_for_add_observer; + EXPECT_CALL(mock_opt_guide_, AddOnDeviceModelAvailabilityChangeObserver(_, _)) + .WillOnce(Invoke( + [&](optimization_guide::ModelBasedCapabilityKey feature, + optimization_guide::OnDeviceModelAvailabilityObserver* observer) { + availability_observer = observer; + run_loop_for_add_observer.Quit(); + })); + + delegate_->StartListeningToOnDeviceModelUpdate(); + + run_loop_for_add_observer.Run(); + CHECK(availability_observer); + + // Now that the delegate is observing, send `kConfigNotAvailableForFeature` + // first to the observer, which will not stop the observing. We will then test + // for all the possible waitable reasons, which should also not stop + // observing. + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason:: + kConfigNotAvailableForFeature); + + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason::kModelToBeInstalled); + + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason:: + kSafetyModelNotAvailable); + + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason:: + kLanguageDetectionModelNotAvailable); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelDownloadSuccess", true, 0); + + EXPECT_FALSE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + + // And then send `kSuccess` to the observer, which will log the histogram. + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason::kSuccess); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelDownloadSuccess", true, 1); + histogram_tester_.ExpectTotalCount("SBClientPhishing.OnDeviceModelFetchTime", + 1); + + EXPECT_TRUE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestOnDeviceModelFetchSuccessImmediateSessionCreation) { + EXPECT_FALSE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + + testing::NiceMock<MockSession> session; + EXPECT_CALL(mock_opt_guide_, StartSession(_, _)) + .WillOnce(testing::Invoke( + [&](optimization_guide::ModelBasedCapabilityKey feature, + const std::optional<optimization_guide::SessionConfigParams>& + config_params) { + return std::make_unique<NiceMock<MockSession>>(&session); + })); + // No need to add the observer because the session is created immediately. + EXPECT_CALL(mock_opt_guide_, AddOnDeviceModelAvailabilityChangeObserver(_, _)) + .Times(0); + + delegate_->StartListeningToOnDeviceModelUpdate(); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelDownloadSuccess", true, 1); + EXPECT_TRUE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestOnDeviceModelFetchFailureCall) { + EXPECT_FALSE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + + optimization_guide::OnDeviceModelAvailabilityObserver* availability_observer = + nullptr; + base::RunLoop run_loop_for_add_observer; + EXPECT_CALL(mock_opt_guide_, AddOnDeviceModelAvailabilityChangeObserver(_, _)) + .WillOnce(testing::Invoke( + [&](optimization_guide::ModelBasedCapabilityKey feature, + optimization_guide::OnDeviceModelAvailabilityObserver* observer) { + availability_observer = observer; + run_loop_for_add_observer.Quit(); + })); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelDownloadSuccess", false, 0); + + delegate_->StartListeningToOnDeviceModelUpdate(); + + // Now that the delegate is observing, send `kTooManyRecentCrashes` + // to the observer, which is not a waitable reason. + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason:: + kTooManyRecentCrashes); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelDownloadSuccess", false, 1); + + EXPECT_FALSE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestModelEligibilityReasonCheckAtFailedInquiry) { + // The below function is called by the delegate when calling + // IsOnDeviceModelAvailable but the on device model is not available yet. + EXPECT_CALL(mock_opt_guide_, GetOnDeviceModelEligibility(_)) + .WillOnce([&](optimization_guide::ModelBasedCapabilityKey feature) { + return optimization_guide::OnDeviceModelEligibilityReason:: + kModelToBeInstalled; + }); + + // We will start listening to the on device model when we call + // StartListeningToOnDeviceModelUpdate, so we expect the call below. + optimization_guide::OnDeviceModelAvailabilityObserver* availability_observer = + nullptr; + base::RunLoop run_loop_for_add_observer; + EXPECT_CALL(mock_opt_guide_, AddOnDeviceModelAvailabilityChangeObserver(_, _)) + .WillOnce(testing::Invoke( + [&](optimization_guide::ModelBasedCapabilityKey feature, + optimization_guide::OnDeviceModelAvailabilityObserver* observer) { + availability_observer = observer; + run_loop_for_add_observer.Quit(); + })); + + delegate_->StartListeningToOnDeviceModelUpdate(); + + run_loop_for_add_observer.Run(); + CHECK(availability_observer); + + // Now that the delegate is observing, send `kConfigNotAvailableForFeature` + // first to the observer, which will not stop the observing. However, for the + // purpose of this test, we will never fulfill the request to notify the + // service class that the model installation is successful. + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason:: + kConfigNotAvailableForFeature); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelDownloadSuccess", true, 0); + + EXPECT_FALSE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + + // We expect the histogram value for + // SBClientPhishing.OnDeviceModelEligibilityReasonAtInquiryFailure to be + // kModelTobeInstalled as we set the EXPECT_CALL above when calling for + // function GetOnDeviceModelEligibility within the optimization guide service, + // which is called in the service delegate. + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelEligibilityReasonAtInquiryFailure", + optimization_guide::OnDeviceModelEligibilityReason::kModelToBeInstalled, + 1); + + EXPECT_FALSE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/false)); + + // The histogram is not logged again because + // log_failed_eligibility_reason is set to false. + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelEligibilityReasonAtInquiryFailure", + optimization_guide::OnDeviceModelEligibilityReason::kModelToBeInstalled, + 1); + + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason::kSuccess); + + EXPECT_TRUE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + + // The histogram is not logged again because + // it is only logged when the model is not available. + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelEligibilityReasonAtInquiryFailure", + optimization_guide::OnDeviceModelEligibilityReason::kModelToBeInstalled, + 1); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + ModelFetchStopListeningBeforeSuccess) { + optimization_guide::OnDeviceModelAvailabilityObserver* availability_observer = + nullptr; + base::RunLoop run_loop_for_add_observer; + EXPECT_CALL(mock_opt_guide_, AddOnDeviceModelAvailabilityChangeObserver(_, _)) + .WillOnce(Invoke( + [&](optimization_guide::ModelBasedCapabilityKey feature, + optimization_guide::OnDeviceModelAvailabilityObserver* observer) { + availability_observer = observer; + run_loop_for_add_observer.Quit(); + })); + + delegate_->StartListeningToOnDeviceModelUpdate(); + + run_loop_for_add_observer.Run(); + CHECK(availability_observer); + + delegate_->StopListeningToOnDeviceModelUpdate(); + + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason::kSuccess); + + // The delegate should not be available because we stopped listening to the + // model update before the model was available. + EXPECT_FALSE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + ModelFetchStopListeningAfterSuccess) { + optimization_guide::OnDeviceModelAvailabilityObserver* availability_observer = + nullptr; + base::RunLoop run_loop_for_add_observer; + EXPECT_CALL(mock_opt_guide_, AddOnDeviceModelAvailabilityChangeObserver(_, _)) + .WillOnce(Invoke( + [&](optimization_guide::ModelBasedCapabilityKey feature, + optimization_guide::OnDeviceModelAvailabilityObserver* observer) { + availability_observer = observer; + run_loop_for_add_observer.Quit(); + })); + + delegate_->StartListeningToOnDeviceModelUpdate(); + + run_loop_for_add_observer.Run(); + CHECK(availability_observer); + + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason::kSuccess); + + EXPECT_TRUE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + + delegate_->StopListeningToOnDeviceModelUpdate(); + + EXPECT_FALSE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); + + // Start listening again should work. + base::RunLoop run_loop_for_add_observer2; + EXPECT_CALL(mock_opt_guide_, AddOnDeviceModelAvailabilityChangeObserver(_, _)) + .WillOnce(Invoke( + [&](optimization_guide::ModelBasedCapabilityKey feature, + optimization_guide::OnDeviceModelAvailabilityObserver* observer) { + availability_observer = observer; + run_loop_for_add_observer2.Quit(); + })); + delegate_->StartListeningToOnDeviceModelUpdate(); + + run_loop_for_add_observer2.Run(); + CHECK(availability_observer); + + availability_observer->OnDeviceModelAvailabilityChanged( + optimization_guide::ModelBasedCapabilityKey::kScamDetection, + optimization_guide::OnDeviceModelEligibilityReason::kSuccess); + + EXPECT_TRUE(delegate_->IsOnDeviceModelAvailable( + /*log_failed_eligibility_reason=*/true)); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestSessionCreationFailure) { + EnableOnDeviceModel(); + + EXPECT_CALL(mock_opt_guide_, StartSession(_, _)) + .WillOnce( + [&](optimization_guide::ModelBasedCapabilityKey feature, + const std::optional<optimization_guide::SessionConfigParams>& + config_params) { return nullptr; }); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future; + delegate_->InquireOnDeviceModel("", future.GetCallback()); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", false, 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelSessionCreationTime", 0); + + EXPECT_FALSE(future.Get().has_value()); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestSessionCreationSuccess) { + EnableOnDeviceModelWithSession(); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future; + delegate_->InquireOnDeviceModel("", future.GetCallback()); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", true, 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelSessionCreationTime", 1); + histogram_tester_.ExpectBucketCount( + "SBClientPhishing.OnDeviceModelSessionAliveOnNewRequest", false, 1); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestSessionCreationSuccessWithAPreviousAliveSession) { + EnableOnDeviceModelWithSession(); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future; + delegate_->InquireOnDeviceModel("", future.GetCallback()); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", true, 1); + + // We will expect a second time, but since the InquireOnDeviceModel function + // wasn't finished and the future callback wasn't completed, we will remove + // the "old" session and recreate a new one. + EXPECT_CALL(mock_opt_guide_, StartSession(_, _)) + .WillOnce(testing::Invoke( + [&](optimization_guide::ModelBasedCapabilityKey feature, + const std::optional<optimization_guide::SessionConfigParams>& + config_params) { + return std::make_unique<NiceMock<MockSession>>(&session_); + })); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future2; + delegate_->InquireOnDeviceModel("", future2.GetCallback()); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", true, 2); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelSessionCreationTime", 2); + histogram_tester_.ExpectBucketCount( + "SBClientPhishing.OnDeviceModelSessionAliveOnNewRequest", false, 1); + histogram_tester_.ExpectBucketCount( + "SBClientPhishing.OnDeviceModelSessionAliveOnNewRequest", true, 1); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestSessionExecutionFailure) { + EnableOnDeviceModelWithSession(); + + EXPECT_CALL(session_, ExecuteModel(_, _)) + .WillOnce(testing::WithArg<1>(testing::Invoke( + [&](optimization_guide:: + OptimizationGuideModelExecutionResultStreamingCallback + callback) { + callback.Run(OptimizationGuideModelStreamingExecutionResult( + base::unexpected( + OptimizationGuideModelExecutionError:: + FromModelExecutionError( + OptimizationGuideModelExecutionError:: + ModelExecutionError::kGenericFailure)), + /*provided_by_on_device=*/true, nullptr)); + }))); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future; + delegate_->InquireOnDeviceModel("", future.GetCallback()); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", true, 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelSessionCreationTime", 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelExecutionDuration", 1); + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelExecutionSuccess", false, 1); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestSessionExecutionSuccessButNotComplete) { + EnableOnDeviceModelWithSession(); + + EXPECT_CALL(session_, ExecuteModel(_, _)) + .WillOnce(testing::WithArg<1>(testing::Invoke( + [&](optimization_guide:: + OptimizationGuideModelExecutionResultStreamingCallback + callback) { + callback.Run(OptimizationGuideModelStreamingExecutionResult( + base::ok(CreateScamDetectionResponse("Google", "Search Engine", + /*is_complete=*/false)), + /*provided_by_on_device=*/false)); + }))); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future; + delegate_->InquireOnDeviceModel("", future.GetCallback()); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", true, 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelSessionCreationTime", 1); + + // Because the execution result isn't complete yet, we do not intend on + // tracking the duration or success since we're still waiting. For the purpose + // of the test, we do not complete the execution result to make sure that + // they're not logged. + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelExecutionDuration", 0); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelExecutionSuccess", 0); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestSessionExecutionSuccessButFailedParsing) { + EnableOnDeviceModelWithSession(); + + optimization_guide::proto::DefaultResponse default_response; + optimization_guide::StreamingResponse default_streaming_response{ + .response = AnyWrapProto(default_response), .is_complete = true}; + + EXPECT_CALL(session_, ExecuteModel(_, _)) + .WillOnce(testing::WithArg<1>(testing::Invoke( + [&](optimization_guide:: + OptimizationGuideModelExecutionResultStreamingCallback + callback) { + callback.Run(OptimizationGuideModelStreamingExecutionResult( + base::ok(default_streaming_response), + /*provided_by_on_device=*/true)); + }))); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future; + delegate_->InquireOnDeviceModel("", future.GetCallback()); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", true, 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelSessionCreationTime", 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelExecutionDuration", 1); + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelExecutionSuccess", true, 1); + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelResponseParseSuccess", false, 1); + + EXPECT_FALSE(future.Get().has_value()); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestSessionExecutionAndResponseParseSuccess) { + EnableOnDeviceModelWithSession(); + + EXPECT_CALL(session_, ExecuteModel(_, _)) + .WillOnce(testing::WithArg<1>(testing::Invoke( + [&](optimization_guide:: + OptimizationGuideModelExecutionResultStreamingCallback + callback) { + callback.Run(OptimizationGuideModelStreamingExecutionResult( + base::ok(CreateScamDetectionResponse("Google", "Search Engine", + /*is_complete=*/true)), + /*provided_by_on_device=*/false)); + }))); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future; + delegate_->InquireOnDeviceModel("", future.GetCallback()); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", true, 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelSessionCreationTime", 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelExecutionDuration", 1); + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelExecutionSuccess", true, 1); + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelResponseParseSuccess", true, 1); + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSuccessfulResponseCallbackAlive", true, 1); + + EXPECT_TRUE(future.Get().has_value()); + EXPECT_EQ(future.Get()->brand, "Google"); + EXPECT_EQ(future.Get()->intent, "Search Engine"); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + TestExecutionSuccessButCallbackIsNotAlive) { + EnableOnDeviceModelWithSession(); + + EXPECT_CALL(session_, ExecuteModel(_, _)) + .WillOnce(testing::WithArg<1>(testing::Invoke( + [&](optimization_guide:: + OptimizationGuideModelExecutionResultStreamingCallback + callback) { + callback.Run(OptimizationGuideModelStreamingExecutionResult( + base::ok(CreateScamDetectionResponse("Google", "Search Engine", + /*is_complete=*/true)), + /*provided_by_on_device=*/false)); + }))); + + // Create an empty callback. + ClientSideDetectionHost::IntelligentScanDelegate:: + InquireOnDeviceModelDoneCallback host_callback; + delegate_->InquireOnDeviceModel("", std::move(host_callback)); + + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSessionCreationSuccess", true, 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelSessionCreationTime", 1); + histogram_tester_.ExpectTotalCount( + "SBClientPhishing.OnDeviceModelExecutionDuration", 1); + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelExecutionSuccess", true, 1); + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelResponseParseSuccess", true, 1); + histogram_tester_.ExpectUniqueSample( + "SBClientPhishing.OnDeviceModelSuccessfulResponseCallbackAlive", false, + 1); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + ResetOnDeviceSession) { + EnableOnDeviceModelWithSession(); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future; + delegate_->InquireOnDeviceModel("", future.GetCallback()); + + histogram_tester_.ExpectBucketCount( + "SBClientPhishing.OnDeviceModelSessionAliveOnNewRequest", true, 0); + + delegate_->ResetOnDeviceSession(/*inquiry_complete=*/false); + + histogram_tester_.ExpectBucketCount( + "SBClientPhishing.OnDeviceModelSessionAliveOnNewRequest", true, 1); +} + +TEST_F(ClientSideDetectionIntelligentScanDelegateDesktopTest, + ResetOnDeviceSession_HistogramNotLoggedIfInquiryComplete) { + EnableOnDeviceModelWithSession(); + + base::test::TestFuture<std::optional<IntelligentScanResult>> future; + delegate_->InquireOnDeviceModel("", future.GetCallback()); + + delegate_->ResetOnDeviceSession(/*inquiry_complete=*/true); + + histogram_tester_.ExpectBucketCount( + "SBClientPhishing.OnDeviceModelSessionAliveOnNewRequest", true, 0); } class @@ -104,26 +729,24 @@ TEST_F( ClientSideDetectionIntelligentScanDelegateDesktopTestBrandAndIntentDisabled, ShouldNotRequestIntelligentScan_KeyboardLockRequested) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::KEYBOARD_LOCK_REQUESTED); // Disabled because kClientSideDetectionBrandAndIntentForScamDetection // is disabled. - EXPECT_FALSE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_FALSE(delegate_->ShouldRequestIntelligentScan(&verdict)); } TEST_F( ClientSideDetectionIntelligentScanDelegateDesktopTestBrandAndIntentDisabled, ShouldRequestIntelligentScan_IntelligentScanRequested) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::FORCE_REQUEST); verdict.mutable_llama_forced_trigger_info()->set_intelligent_scan(true); // kClientSideDetectionBrandAndIntentForScamDetection shouldn't affect // intelligent scan requests. - EXPECT_TRUE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_TRUE(delegate_->ShouldRequestIntelligentScan(&verdict)); } class @@ -143,26 +766,24 @@ TEST_F( ClientSideDetectionIntelligentScanDelegateDesktopTestLlamaForcedTriggerInfoDisabled, ShouldRequestIntelligentScan_KeyboardLockRequested) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::KEYBOARD_LOCK_REQUESTED); // kClientSideDetectionLlamaForcedTriggerInfoForScamDetection shouldn't affect // keyboard lock requests. - EXPECT_TRUE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_TRUE(delegate_->ShouldRequestIntelligentScan(&verdict)); } TEST_F( ClientSideDetectionIntelligentScanDelegateDesktopTestLlamaForcedTriggerInfoDisabled, ShouldNotRequestIntelligentScan_IntelligentScanRequested) { - ClientSideDetectionIntelligentScanDelegateDesktop delegate(pref_service_); ClientPhishingRequest verdict; verdict.set_client_side_detection_type( ClientSideDetectionType::FORCE_REQUEST); verdict.mutable_llama_forced_trigger_info()->set_intelligent_scan(true); // Disabled because kClientSideDetectionLlamaForcedTriggerInfoForScamDetection // is disabled. - EXPECT_FALSE(delegate.ShouldRequestIntelligentScan(&verdict)); + EXPECT_FALSE(delegate_->ShouldRequestIntelligentScan(&verdict)); } } // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_factory.cc b/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_factory.cc index 8e26480c..13066874 100644 --- a/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_factory.cc +++ b/chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_factory.cc
@@ -11,6 +11,8 @@ #if BUILDFLAG(IS_ANDROID) #include "chrome/browser/safe_browsing/android/client_side_detection_intelligent_scan_delegate_android.h" #else +#include "chrome/browser/optimization_guide/optimization_guide_keyed_service.h" +#include "chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h" #include "chrome/browser/safe_browsing/client_side_detection_intelligent_scan_delegate_desktop.h" #endif @@ -40,7 +42,11 @@ .WithRegular(ProfileSelection::kOriginalOnly) .WithGuest(ProfileSelection::kNone) .WithAshInternals(ProfileSelection::kOriginalOnly) - .Build()) {} + .Build()) { +#if !BUILDFLAG(IS_ANDROID) + DependsOn(OptimizationGuideKeyedServiceFactory::GetInstance()); +#endif +} std::unique_ptr<KeyedService> ClientSideDetectionIntelligentScanDelegateFactory:: @@ -50,8 +56,14 @@ return std::make_unique<ClientSideDetectionIntelligentScanDelegateAndroid>(); #else Profile* profile = Profile::FromBrowserContext(context); + auto* opt_guide = OptimizationGuideKeyedServiceFactory::GetForProfile( + Profile::FromBrowserContext(context)); + + if (!opt_guide) { + return nullptr; + } return std::make_unique<ClientSideDetectionIntelligentScanDelegateDesktop>( - *profile->GetPrefs()); + *profile->GetPrefs(), opt_guide); #endif }
diff --git a/chrome/browser/ssl/https_upgrades_interceptor.cc b/chrome/browser/ssl/https_upgrades_interceptor.cc index 990c0b63..ee0f775 100644 --- a/chrome/browser/ssl/https_upgrades_interceptor.cc +++ b/chrome/browser/ssl/https_upgrades_interceptor.cc
@@ -119,7 +119,7 @@ ? net::RedirectInfo::FirstPartyURLPolicy::UPDATE_URL_ON_REDIRECT : net::RedirectInfo::FirstPartyURLPolicy::NEVER_CHANGE_URL, request.referrer_policy, request.referrer.spec(), - net::HTTP_TEMPORARY_REDIRECT, new_url, + request.request_initiator, net::HTTP_TEMPORARY_REDIRECT, new_url, /*referrer_policy_header=*/std::nullopt, /*insecure_scheme_was_upgraded=*/false); return redirect_info;
diff --git a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.cc b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.cc index bb9490b1..5e2de10 100644 --- a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.cc +++ b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.cc
@@ -6,6 +6,7 @@ #include <variant> +#include "base/check_deref.h" #include "base/containers/to_vector.h" #include "base/feature_list.h" #include "base/metrics/histogram_functions.h" @@ -46,16 +47,38 @@ return field.IsFocusable() && SanitizedFieldIsEmpty(field.value()); } -bool IsTriggeredOnFieldWithGroup(const FormStructure* form_field, - const FormFieldData& field, - FieldTypeGroup field_type_group) { - if (!form_field) { - return false; - } +// The form is considered correctly filled if all autofilled fields were not +// edited by user afterwards. +bool IsFillingCorrect(const FormStructure& form) { + return !std::ranges::any_of(form.fields(), [](const auto& field) { + return field->previously_autofilled(); + }); +} - const autofill::AutofillField* autofill_field = - form_field->GetFieldById(field.global_id()); - return autofill_field && autofill_field->Type().group() == field_type_group; +// The form is considered perfectly filled if all non-empty fields are +// autofilled without further edits. +bool IsFillingPerfect(const FormStructure& form) { + return std::ranges::all_of(form.fields(), [](const auto& field) { + return field->value().empty() || field->is_autofilled(); + }); +} + +// Checks if the credit card form is already filled with values. The form is +// considered to be filled if the credit card number field is non-empty. The +// expiration date fields are not checked because they might have arbitrary +// placeholders. +bool IsFormPrefilled(const FormStructure& form) { + return std::ranges::any_of(form.fields(), + [](const std::unique_ptr<AutofillField>& field) { + return field->Type().GetStorableType() == + FieldType::CREDIT_CARD_NUMBER && + !SanitizedFieldIsEmpty(field->value()); + }); +} + +bool HasAnyAutofilledFields(const FormStructure& form) { + return std::ranges::any_of( + form.fields(), [](const auto& field) { return field->is_autofilled(); }); } } // namespace @@ -78,9 +101,7 @@ TouchToFillDelegateAndroidImpl::TouchToFillDelegateAndroidImpl( BrowserAutofillManager* manager) - : manager_(manager) { - DCHECK(manager); -} + : manager_(CHECK_DEREF(manager)) {} TouchToFillDelegateAndroidImpl::~TouchToFillDelegateAndroidImpl() { // Invalidate pointers to avoid post hide callbacks. @@ -246,28 +267,15 @@ } } - if (dry_run.outcome != TriggerOutcome::kUnsupportedFieldType) { - if (IsTriggeredOnFieldWithGroup( - manager_->FindCachedFormById(form.global_id()), field, - FieldTypeGroup::kIban)) { - base::UmaHistogramEnumeration(kUmaTouchToFillIbanTriggerOutcome, - dry_run.outcome); - } else if (IsTriggeredOnFieldWithGroup( - manager_->FindCachedFormById(form.global_id()), field, - FieldTypeGroup::kLoyaltyCard)) { - base::UmaHistogramEnumeration(kUmaTouchToFillLoyaltyCardTriggerOutcome, - dry_run.outcome); - } else { - base::UmaHistogramEnumeration(kUmaTouchToFillCreditCardTriggerOutcome, - dry_run.outcome); - } - } + LogTriggerOutcomeMetrics(form.global_id(), field.global_id(), + dry_run.outcome); LOG_AF(manager_->client().GetCurrentLogManager()) << LoggingScope::kTouchToFill << LogMessage::kTouchToFill << "dry run after parsing for form " << form.global_id() << " and field " << field.global_id() << " was " << (dry_run.outcome == TriggerOutcome::kShown ? "" : "un") << "successful (" << base::to_underlying(dry_run.outcome) << ")"; + if (dry_run.outcome != TriggerOutcome::kShown) { return false; } @@ -310,10 +318,6 @@ ttf_payment_method_state_ = TouchToFillState::kShouldShow; } -AutofillManager* TouchToFillDelegateAndroidImpl::GetManager() { - return manager_; -} - bool TouchToFillDelegateAndroidImpl::ShouldShowScanCreditCard() { if (!manager_->client() .GetPaymentsAutofillClient() @@ -404,6 +408,28 @@ } } +void TouchToFillDelegateAndroidImpl::LogTriggerOutcomeMetrics( + const FormGlobalId& form_id, + const FieldGlobalId& field_id, + TriggerOutcome outcome) { + if (outcome == TriggerOutcome::kUnsupportedFieldType) { + return; + } + const FormStructure* form = manager_->FindCachedFormById(form_id); + const AutofillField* field = form ? form->GetFieldById(field_id) : nullptr; + FieldTypeGroup group = + field ? field->Type().group() : FieldTypeGroup::kNoGroup; + if (group == FieldTypeGroup::kIban) { + base::UmaHistogramEnumeration(kUmaTouchToFillIbanTriggerOutcome, outcome); + } else if (group == FieldTypeGroup::kLoyaltyCard) { + base::UmaHistogramEnumeration(kUmaTouchToFillLoyaltyCardTriggerOutcome, + outcome); + } else { + base::UmaHistogramEnumeration(kUmaTouchToFillCreditCardTriggerOutcome, + outcome); + } +} + void TouchToFillDelegateAndroidImpl::LogMetricsAfterSubmission( const FormStructure& submitted_form) { // Log whether autofill was used after dismissing the touch to fill (without @@ -425,36 +451,6 @@ } } -bool TouchToFillDelegateAndroidImpl::HasAnyAutofilledFields( - const FormStructure& submitted_form) const { - return std::ranges::any_of( - submitted_form, [](const auto& field) { return field->is_autofilled(); }); -} - -bool TouchToFillDelegateAndroidImpl::IsFillingPerfect( - const FormStructure& submitted_form) const { - return std::ranges::all_of(submitted_form, [](const auto& field) { - return field->value().empty() || field->is_autofilled(); - }); -} - -bool TouchToFillDelegateAndroidImpl::IsFillingCorrect( - const FormStructure& submitted_form) const { - return !std::ranges::any_of(submitted_form, [](const auto& field) { - return field->previously_autofilled(); - }); -} - -bool TouchToFillDelegateAndroidImpl::IsFormPrefilled( - const FormStructure& form) { - return std::ranges::any_of(form.fields(), - [](const std::unique_ptr<AutofillField>& field) { - return field->Type().GetStorableType() == - FieldType::CREDIT_CARD_NUMBER && - !SanitizedFieldIsEmpty(field->value()); - }); -} - base::WeakPtr<TouchToFillDelegateAndroidImpl> TouchToFillDelegateAndroidImpl::GetWeakPtr() { return weak_ptr_factory_.GetWeakPtr();
diff --git a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.h b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.h index 5ade3a0..ccfc131 100644 --- a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.h +++ b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_delegate_android_impl.h
@@ -8,7 +8,7 @@ #include <variant> #include <vector> -#include "base/memory/raw_ptr.h" +#include "base/memory/raw_ref.h" #include "base/memory/weak_ptr.h" #include "components/autofill/core/browser/data_model/payments/credit_card.h" #include "components/autofill/core/browser/data_model/payments/iban.h" @@ -125,7 +125,6 @@ void Reset() override; // TouchToFillDelegate: - AutofillManager* GetManager() override; bool ShouldShowScanCreditCard() override; void ScanCreditCard() override; void OnCreditCardScanned(const CreditCard& card) override; @@ -187,34 +186,20 @@ // an error reason if TTF should not be triggered. DryRunResult DryRunForLoyaltyCard(); - bool HasAnyAutofilledFields(const FormStructure& submitted_form) const; - - // The form is considered perfectly filled if all non-empty fields are - // autofilled without further edits. - bool IsFillingPerfect(const FormStructure& submitted_form) const; - - // The form is considered correctly filled if all autofilled fields were not - // edited by user afterwards. - bool IsFillingCorrect(const FormStructure& submitted_form) const; - - // Checks if the credit card form is already filled with values. The form is - // considered to be filled if the credit card number field is non-empty. The - // expiration date fields are not checked because they might have arbitrary - // placeholders. - // TODO(crbug.com/40227496): FormData is used here to ensure that we check the - // most recent form values. FormStructure knows only about the initial values. - bool IsFormPrefilled(const FormStructure& form); - // Creates a list of booleans which denotes if credit cards are acceptable by - // the merchant. The list will be the same size as `credit_cards`, and the - // indices will match (the acceptability of credit_cards[i] == + // the merchant. The returned list has the same size as `credit_cards`, and + // the indices match (the acceptability of credit_cards[i] == // card_acceptability[i]). std::vector<bool> GetCardAcceptabilities( base::span<const CreditCard> credit_cards); + void LogTriggerOutcomeMetrics(const FormGlobalId& form_id, + const FieldGlobalId& field_id, + TriggerOutcome outcome); + TouchToFillState ttf_payment_method_state_ = TouchToFillState::kShouldShow; - const raw_ptr<BrowserAutofillManager> manager_; + const raw_ref<BrowserAutofillManager> manager_; FormData query_form_; FormFieldData query_field_; bool dismissed_by_user_ = false;
diff --git a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_payment_method_controller_unittest.cc b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_payment_method_controller_unittest.cc index 5f8bdfe1..8de16cf 100644 --- a/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_payment_method_controller_unittest.cc +++ b/chrome/browser/touch_to_fill/autofill/android/touch_to_fill_payment_method_controller_unittest.cc
@@ -65,7 +65,6 @@ explicit MockTouchToFillDelegateAndroidImpl( TestBrowserAutofillManager* autofill_manager) : TouchToFillDelegateAndroidImpl(autofill_manager) { - ON_CALL(*this, GetManager).WillByDefault(Return(autofill_manager)); ON_CALL(*this, ShouldShowScanCreditCard).WillByDefault(Return(true)); } ~MockTouchToFillDelegateAndroidImpl() override = default; @@ -79,7 +78,6 @@ IntendsToShowTouchToFill, (FormGlobalId, FieldGlobalId), (override)); - MOCK_METHOD(TestBrowserAutofillManager*, GetManager, (), (override)); MOCK_METHOD(bool, ShouldShowScanCreditCard, (), (override)); MOCK_METHOD(void, ScanCreditCard, (), (override)); MOCK_METHOD(void, OnCreditCardScanned, (const CreditCard& card), (override));
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 3fc8596..8a83ea07 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -4958,6 +4958,7 @@ "//services/device/public/cpp:device_features", "//services/media_session/public/mojom", "//services/screen_ai/buildflags", + "//ui/base:ozone_buildflags", "//ui/base/dragdrop:types", "//ui/gfx/geometry", "//ui/lottie",
diff --git a/chrome/browser/ui/android/edge_to_edge/java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeUtils.java b/chrome/browser/ui/android/edge_to_edge/java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeUtils.java index 30ad5a26..f59ad94a 100644 --- a/chrome/browser/ui/android/edge_to_edge/java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeUtils.java +++ b/chrome/browser/ui/android/edge_to_edge/java/src/org/chromium/chrome/browser/ui/edge_to_edge/EdgeToEdgeUtils.java
@@ -251,7 +251,7 @@ return false; } - if (BuildInfo.getInstance().isAutomotive || BuildInfo.getInstance().isDesktop) { + if (BuildInfo.getInstance().isAutomotive) { return false; }
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd index 8ef123d..76414995 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -2602,6 +2602,9 @@ <message name="IDS_SYNC_BOOKMARKS" desc="Title for preference which enables sync'ing of bookmarks. [CHAR_LIMIT=32]"> Bookmarks </message> + <message name="IDS_SYNC_EXTENSIONS" desc="Title for preference which enables sync'ing of Chrome browser extensions. [CHAR_LIMIT=32]"> + Extensions + </message> <message name="IDS_SYNC_HISTORY" desc="Title for preference which enables sync'ing of history data. [CHAR_LIMIT=32]"> History </message> @@ -2641,6 +2644,9 @@ <message name="IDS_ACCOUNT_SECTION_BOOKMARKS_TOGGLE" desc="Bookmarks, one of the data types that we allow syncing. Shown on next to the toggle that controls whether bookmarks should be saved in the Google Account and synced across devices."> Bookmarks </message> + <message name="IDS_ACCOUNT_SECTION_EXTENSIONS_TOGGLE" desc="Chrome browser extensions, one of the data types that we allow syncing. Shown on next to the toggle that controls whether extensions should be saved in the Google Account and synced across devices."> + Extensions + </message> <message name="IDS_ACCOUNT_SECTION_READING_LIST_TOGGLE" desc="Reading List, one of the data types that we allow syncing. Shown on next to the toggle that controls whether reading list should be saved in the Google Account and synced across devices."> Reading list </message>
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCOUNT_SECTION_EXTENSIONS_TOGGLE.png.sha1 b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCOUNT_SECTION_EXTENSIONS_TOGGLE.png.sha1 new file mode 100644 index 0000000..7e315f4 --- /dev/null +++ b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_ACCOUNT_SECTION_EXTENSIONS_TOGGLE.png.sha1
@@ -0,0 +1 @@ +d78b7d1171c629b4aa8a718572f88dd823b49754 \ No newline at end of file
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_SYNC_EXTENSIONS.png.sha1 b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_SYNC_EXTENSIONS.png.sha1 new file mode 100644 index 0000000..7e315f4 --- /dev/null +++ b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_SYNC_EXTENSIONS.png.sha1
@@ -0,0 +1 @@ +d78b7d1171c629b4aa8a718572f88dd823b49754 \ No newline at end of file
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 9b13df3..f79df46f 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc
@@ -2693,12 +2693,6 @@ blink::ProtocolHandlerSecurityLevel Browser::GetProtocolHandlerSecurityLevel( content::RenderFrameHost* requesting_frame) { - // WARNING: This must match the logic of - // ChromeContentRendererClient::GetProtocolHandlerSecurityLevel(). - if (requesting_frame->GetLastCommittedOrigin().scheme() == - chrome::kIsolatedAppScheme) { - return blink::ProtocolHandlerSecurityLevel::kSameOrigin; - } content::BrowserContext* context = requesting_frame->GetBrowserContext(); extensions::ProcessMap* process_map = extensions::ProcessMap::Get(context); const Extension* owner_extension =
diff --git a/chrome/browser/ui/browser_window/internal/browser_window_features.cc b/chrome/browser/ui/browser_window/internal/browser_window_features.cc index 7851ddc..0f229e61 100644 --- a/chrome/browser/ui/browser_window/internal/browser_window_features.cc +++ b/chrome/browser/ui/browser_window/internal/browser_window_features.cc
@@ -59,6 +59,7 @@ #include "chrome/browser/ui/views/download/bubble/download_toolbar_ui_controller.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/frame/tab_strip_region_view.h" +#include "chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.h" #include "chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_bubble_coordinator.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" #include "chrome/browser/ui/views/media_router/cast_browser_controller.h" @@ -338,6 +339,9 @@ profile_menu_coordinator_ = std::make_unique<ProfileMenuCoordinator>(browser); + incognito_clear_browsing_data_dialog_coordinator_ = + std::make_unique<IncognitoClearBrowsingDataDialogCoordinator>(browser); + if (browser->is_type_normal() || browser->is_type_app()) { toast_service_ = std::make_unique<ToastService>(browser); }
diff --git a/chrome/browser/ui/browser_window/public/browser_window_features.h b/chrome/browser/ui/browser_window/public/browser_window_features.h index 439f407..978ceec 100644 --- a/chrome/browser/ui/browser_window/public/browser_window_features.h +++ b/chrome/browser/ui/browser_window/public/browser_window_features.h
@@ -32,6 +32,7 @@ class ExclusiveAccessManager; class FindBarController; class HistorySidePanelCoordinator; +class IncognitoClearBrowsingDataDialogCoordinator; class LocationBarModel; class MemorySaverOptInIPHController; class ProfileMenuCoordinator; @@ -302,6 +303,11 @@ return profile_menu_coordinator_.get(); } + IncognitoClearBrowsingDataDialogCoordinator* + incognito_clear_browsing_data_dialog_coordinator() { + return incognito_clear_browsing_data_dialog_coordinator_.get(); + } + // Get the FindBarController for this browser window, creating it if it does // not yet exist. FindBarController* GetFindBarController(); @@ -430,6 +436,9 @@ std::unique_ptr<ProfileMenuCoordinator> profile_menu_coordinator_; + std::unique_ptr<IncognitoClearBrowsingDataDialogCoordinator> + incognito_clear_browsing_data_dialog_coordinator_; + // This is an experimental API that interacts with the TabStripModel. std::unique_ptr<TabStripServiceRegister> tab_strip_service_;
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc index 13242faa..1d196ac 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.cc +++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -1046,6 +1046,14 @@ return nullptr; } +std::vector<tabs::TabInterface*> TabStripModel::GetVisibleTabs() const { + tabs::TabInterface* active_tab = GetActiveTab(); + if (active_tab->IsSplit()) { + return GetSplitData(active_tab->GetSplit().value())->ListTabs(); + } + return {active_tab}; +} + WebContents* TabStripModel::GetWebContentsAt(int index) const { if (ContainsIndex(index)) { return GetTabAtIndex(index)->GetContents();
diff --git a/chrome/browser/ui/tabs/tab_strip_model.h b/chrome/browser/ui/tabs/tab_strip_model.h index 3bedf40..2351566 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.h +++ b/chrome/browser/ui/tabs/tab_strip_model.h
@@ -422,6 +422,10 @@ // Returns the currently active Tab, or NULL if there is none. tabs::TabInterface* GetActiveTab() const; + // Returns the currently active tab or if it is a split tab, all the tabs in + // that split. Doesn't take into account occlusion. + std::vector<tabs::TabInterface*> GetVisibleTabs() const; + // Returns the WebContents at the specified index, or NULL if there is // none. content::WebContents* GetWebContentsAt(int index) const;
diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc index 5273834..0158a16 100644 --- a/chrome/browser/ui/ui_features.cc +++ b/chrome/browser/ui/ui_features.cc
@@ -133,6 +133,17 @@ MiniToolbarActiveConfiguration::Hide, &kMiniToolbarActiveConfigurationOptions); +// When enabled along with SideBySide flag, split tabs will be restored on +// startup. +BASE_FEATURE(kSideBySideSessionRestore, + "SideBySideSessionRestore", + base::FEATURE_DISABLED_BY_DEFAULT); + +bool IsRestoringSplitViewEnabled() { + return base::FeatureList::IsEnabled(features::kSideBySide) && + base::FeatureList::IsEnabled(features::kSideBySideSessionRestore); +} + BASE_FEATURE(kSideBySideLinkMenuNewBadge, "SideBySideLinkMenuNewBadge", base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/chrome/browser/ui/ui_features.h b/chrome/browser/ui/ui_features.h index 6894933..f2f5c8b 100644 --- a/chrome/browser/ui/ui_features.h +++ b/chrome/browser/ui/ui_features.h
@@ -159,6 +159,10 @@ BASE_DECLARE_FEATURE_PARAM(MiniToolbarActiveConfiguration, kSideBySideMiniToolbarActiveConfiguration); +BASE_DECLARE_FEATURE(kSideBySideSessionRestore); + +bool IsRestoringSplitViewEnabled(); + BASE_DECLARE_FEATURE(kSideBySideLinkMenuNewBadge); bool IsNtpFooterEnabledWithoutSideBySide();
diff --git a/chrome/browser/ui/views/commerce/product_specifications_button_browsertest.cc b/chrome/browser/ui/views/commerce/product_specifications_button_browsertest.cc index 2354fe7..c35de80 100644 --- a/chrome/browser/ui/views/commerce/product_specifications_button_browsertest.cc +++ b/chrome/browser/ui/views/commerce/product_specifications_button_browsertest.cc
@@ -198,8 +198,16 @@ ->IsShowing()); } +// TODO(crbug.com/413297654): Test is flaky on Windows. +#if BUILDFLAG(IS_WIN) +#define MAYBE_ShowNotBlockedByCurrentPageEligibility \ + DISABLED_ShowNotBlockedByCurrentPageEligibility +#else +#define MAYBE_ShowNotBlockedByCurrentPageEligibility \ + ShowNotBlockedByCurrentPageEligibility +#endif IN_PROC_BROWSER_TEST_F(ProductSpecificationsButtonBrowserTest, - ShowNotBlockedByCurrentPageEligibility) { + MAYBE_ShowNotBlockedByCurrentPageEligibility) { EXPECT_CALL(*controller(), ShouldExecuteEntryPointShow()).Times(0); ShowButton(); @@ -305,8 +313,14 @@ "Commerce.Compare.ProactiveChipClicked")); } +// TODO(crbug.com/413297654): Test is flaky on Windows. +#if BUILDFLAG(IS_WIN) +#define MAYBE_NotifyShowEntryPoint DISABLED_NotifyShowEntryPoint +#else +#define MAYBE_NotifyShowEntryPoint NotifyShowEntryPoint +#endif IN_PROC_BROWSER_TEST_F(ProductSpecificationsButtonBrowserTest, - NotifyShowEntryPoint) { + MAYBE_NotifyShowEntryPoint) { product_specifications_button()->ShowEntryPointWithTitle(u"title"); ASSERT_TRUE(product_specifications_button()
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index ad3d0ed8..53b85313 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -3667,14 +3667,16 @@ void BrowserView::PreHandleDragUpdate(const content::DropData& drop_data, const gfx::PointF& point) { - if (multi_contents_view_) { + if (multi_contents_view_ && + multi_contents_view_->is_drag_and_drop_enabled()) { multi_contents_view_->drop_target_controller().OnWebContentsDragUpdate( drop_data, point, IsInSplitView()); } } void BrowserView::PreHandleDragExit() { - if (multi_contents_view_) { + if (multi_contents_view_ && + multi_contents_view_->is_drag_and_drop_enabled()) { multi_contents_view_->drop_target_controller().OnWebContentsDragExit(); } } @@ -6052,12 +6054,16 @@ } void BrowserView::ShowIncognitoClearBrowsingDataDialog() { - IncognitoClearBrowsingDataDialogCoordinator::GetOrCreateForBrowser(browser()) + browser() + ->GetFeatures() + .incognito_clear_browsing_data_dialog_coordinator() ->Show(IncognitoClearBrowsingDataDialogInterface::Type::kDefaultBubble); } void BrowserView::ShowIncognitoHistoryDisclaimerDialog() { - IncognitoClearBrowsingDataDialogCoordinator::GetOrCreateForBrowser(browser()) + browser() + ->GetFeatures() + .incognito_clear_browsing_data_dialog_coordinator() ->Show(IncognitoClearBrowsingDataDialogInterface::Type:: kHistoryDisclaimerBubble); }
diff --git a/chrome/browser/ui/views/frame/multi_contents_view.cc b/chrome/browser/ui/views/frame/multi_contents_view.cc index 9a32f1b..59182e9 100644 --- a/chrome/browser/ui/views/frame/multi_contents_view.cc +++ b/chrome/browser/ui/views/frame/multi_contents_view.cc
@@ -23,8 +23,10 @@ #include "chrome/browser/ui/views/frame/top_container_background.h" #include "content/public/browser/web_contents.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/base/ozone_buildflags.h" #include "ui/events/types/event_type.h" #include "ui/gfx/scoped_canvas.h" +#include "ui/ozone/public/ozone_platform.h" #include "ui/views/view_class_properties.h" DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(MultiContentsView, @@ -43,6 +45,14 @@ gfx::Insets(kSplitViewContentInset).set_top(0).set_right(0)), end_contents_view_inset_( gfx::Insets(kSplitViewContentInset).set_top(0).set_left(0)) { +#if BUILDFLAG(IS_OZONE) + if (!ui::OzonePlatform::GetInstance() + ->GetPlatformProperties() + .supports_split_view_drag_and_drop) { + is_drag_and_drop_enabled_ = false; + } +#endif + SetLayoutManager(std::make_unique<views::DelegatingLayoutManager>(this)); contents_container_views_.push_back( AddChildView(std::make_unique<ContentsContainerView>(browser_view_))); @@ -71,15 +81,19 @@ SetProperty(views::kElementIdentifierKey, kMultiContentsViewElementId); - drop_target_view_ = - AddChildView(std::make_unique<MultiContentsDropTargetView>(*delegate_)); - drop_target_controller_ = - std::make_unique<MultiContentsViewDropTargetController>( - *drop_target_view_); + if (is_drag_and_drop_enabled()) { + drop_target_view_ = + AddChildView(std::make_unique<MultiContentsDropTargetView>(*delegate_)); + drop_target_controller_ = + std::make_unique<MultiContentsViewDropTargetController>( + *drop_target_view_); + } } MultiContentsView::~MultiContentsView() { - drop_target_controller_.reset(); + if (drop_target_controller_) { + drop_target_controller_.reset(); + } drop_target_view_ = nullptr; resize_area_ = nullptr; RemoveAllChildViews(); @@ -241,7 +255,7 @@ gfx::Rect end_rect(resize_rect.top_right(), gfx::Size(widths.end_width, available_space.height())); - if (drop_target_view_->side().has_value()) { + if (is_drag_and_drop_enabled() && drop_target_view_->side().has_value()) { switch (drop_target_view_->side().value()) { case MultiContentsDropTargetView::DropSide::START: // If the drop target view will show at the start, shift everything @@ -273,9 +287,11 @@ contents_container_views_[1]->GetVisible(), end_rect); - layouts.child_layouts.emplace_back(drop_target_view_.get(), - drop_target_view_->GetVisible(), - drop_target_rect); + if (is_drag_and_drop_enabled()) { + layouts.child_layouts.emplace_back(drop_target_view_.get(), + drop_target_view_->GetVisible(), + drop_target_rect); + } layouts.host_size = gfx::Size(width, height); return layouts; @@ -294,7 +310,8 @@ available_space.width() - widths.start_width - widths.resize_width; } else { CHECK(!contents_container_views_[1]->GetVisible()); - widths.drop_target_width = drop_target_view_->GetPreferredWidth(); + widths.drop_target_width = + is_drag_and_drop_enabled() ? drop_target_view_->GetPreferredWidth() : 0; // TODO(crbug.com/394369035): Drop targets currently don't scale with // browser size. Consider adding a min width value.
diff --git a/chrome/browser/ui/views/frame/multi_contents_view.h b/chrome/browser/ui/views/frame/multi_contents_view.h index e9ce0c6..b0853b1 100644 --- a/chrome/browser/ui/views/frame/multi_contents_view.h +++ b/chrome/browser/ui/views/frame/multi_contents_view.h
@@ -118,6 +118,8 @@ gfx::Insets& end_contents_view_inset() { return end_contents_view_inset_; } + bool is_drag_and_drop_enabled() const { return is_drag_and_drop_enabled_; } + void set_min_contents_width_for_testing(int width) { min_contents_width_for_testing_ = std::make_optional(width); } @@ -201,6 +203,11 @@ bool show_inactive_scrim_ = false; + // This is needed because drag and drop is broken on Wayland. Once that is + // resolved, this variable should be deleted. + // TODO(crbug.com/425715421): Fix drag and drop on Wayland. + bool is_drag_and_drop_enabled_ = true; + std::optional<int> min_contents_width_for_testing_ = std::nullopt; };
diff --git a/chrome/browser/ui/views/frame/multi_contents_view_browsertest.cc b/chrome/browser/ui/views/frame/multi_contents_view_browsertest.cc index bb86b13..4ce908b 100644 --- a/chrome/browser/ui/views/frame/multi_contents_view_browsertest.cc +++ b/chrome/browser/ui/views/frame/multi_contents_view_browsertest.cc
@@ -19,7 +19,9 @@ #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/dragdrop/os_exchange_data_provider.h" #include "ui/base/interaction/element_tracker.h" +#include "ui/base/ozone_buildflags.h" #include "ui/compositor/layer_tree_owner.h" +#include "ui/ozone/public/ozone_platform.h" #include "ui/views/interaction/element_tracker_views.h" #include "ui/views/view_utils.h" #include "url/gurl.h" @@ -54,6 +56,15 @@ IN_PROC_BROWSER_TEST_F(MultiContentsViewBrowserTest, HandleDropTargetViewLinkDrop_EndDropTarget) { +// TODO(crbug.com/425715421): Fix drag and drop on Wayland. +#if BUILDFLAG(IS_OZONE) + if (!ui::OzonePlatform::GetInstance() + ->GetPlatformProperties() + .supports_split_view_drag_and_drop) { + return; + } +#endif + ui::OSExchangeData data; const GURL kDropUrl("http://www.chromium.org/"); data.SetURL(kDropUrl, u"Chromium"); @@ -81,6 +92,14 @@ IN_PROC_BROWSER_TEST_F(MultiContentsViewBrowserTest, HandleDropTargetViewLinkDrop_StartDropTarget) { + // TODO(crbug.com/425715421): Fix drag and drop on Wayland. +#if BUILDFLAG(IS_OZONE) + if (!ui::OzonePlatform::GetInstance() + ->GetPlatformProperties() + .supports_split_view_drag_and_drop) { + return; + } +#endif ui::OSExchangeData data; const GURL kDropUrl("http://www.chromium.org/"); data.SetURL(kDropUrl, u"Chromium");
diff --git a/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_browsertest.cc b/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_browsertest.cc index e001441..14561d9 100644 --- a/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_browsertest.cc +++ b/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_browsertest.cc
@@ -10,6 +10,8 @@ #include "base/test/metrics/histogram_tester.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.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/test/test_browser_dialog.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/frame/toolbar_button_provider.h" @@ -48,8 +50,8 @@ } IncognitoClearBrowsingDataDialogCoordinator* GetCoordinator() { - return IncognitoClearBrowsingDataDialogCoordinator::GetOrCreateForBrowser( - incognito_browser_); + return incognito_browser_->GetFeatures() + .incognito_clear_browsing_data_dialog_coordinator(); } private: @@ -155,8 +157,8 @@ std::u16string current_tab_title; ui_test_utils::GetCurrentTabTitle(incognito_browser, ¤t_tab_title); EXPECT_EQ(u"about:blank", current_tab_title); - auto* coordinator = IncognitoClearBrowsingDataDialogCoordinator::FromBrowser( - incognito_browser); + auto* coordinator = incognito_browser->GetFeatures() + .incognito_clear_browsing_data_dialog_coordinator(); ASSERT_TRUE(coordinator->IsShowing()); }
diff --git a/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc b/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc index 1cf20c62..2f5553f3 100644 --- a/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc +++ b/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc
@@ -4,6 +4,12 @@ #include "chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.h" +#include <memory> +#include <utility> + +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_window/public/browser_window_interface.h" +#include "chrome/browser/ui/user_education/browser_user_education_interface.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/frame/toolbar_button_provider.h" #include "chrome/browser/ui/views/incognito_clear_browsing_data_dialog.h" @@ -22,13 +28,13 @@ void IncognitoClearBrowsingDataDialogCoordinator::Show( IncognitoClearBrowsingDataDialogInterface::Type type) { - auto* avatar_toolbar_button = - BrowserView::GetBrowserViewForBrowser(&GetBrowser()) - ->toolbar_button_provider() - ->GetAvatarToolbarButton(); + Browser* const browser = browser_->GetBrowserForMigrationOnly(); + auto* avatar_toolbar_button = BrowserView::GetBrowserViewForBrowser(browser) + ->toolbar_button_provider() + ->GetAvatarToolbarButton(); auto bubble = std::make_unique<IncognitoClearBrowsingDataDialog>( - avatar_toolbar_button, GetBrowser().profile(), type); + avatar_toolbar_button, profile_, type); DCHECK_EQ(nullptr, bubble_tracker_.view()); bubble_tracker_.SetView(bubble.get()); @@ -49,7 +55,7 @@ } IncognitoClearBrowsingDataDialogCoordinator:: - IncognitoClearBrowsingDataDialogCoordinator(Browser* browser) - : BrowserUserData<IncognitoClearBrowsingDataDialogCoordinator>(*browser) {} - -BROWSER_USER_DATA_KEY_IMPL(IncognitoClearBrowsingDataDialogCoordinator); + IncognitoClearBrowsingDataDialogCoordinator(BrowserWindowInterface* browser) + : browser_(browser), + profile_(browser->GetProfile()), + user_education_(browser->GetUserEducationInterface()) {}
diff --git a/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.h b/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.h index 48db468..78792d0 100644 --- a/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.h +++ b/chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.h
@@ -5,19 +5,26 @@ #ifndef CHROME_BROWSER_UI_VIEWS_INCOGNITO_CLEAR_BROWSING_DATA_DIALOG_COORDINATOR_H_ #define CHROME_BROWSER_UI_VIEWS_INCOGNITO_CLEAR_BROWSING_DATA_DIALOG_COORDINATOR_H_ -#include "chrome/browser/ui/browser_user_data.h" +#include "base/memory/raw_ptr.h" #include "chrome/browser/ui/incognito_clear_browsing_data_dialog_interface.h" -#include "chrome/browser/ui/tabs/tab_strip_model_observer.h" #include "ui/views/view_tracker.h" +class BrowserUserEducationInterface; +class BrowserWindowInterface; class IncognitoClearBrowsingDataDialog; +class Profile; // Handles the lifetime and showing/hidden state of the clear data dialog. Owned // by the associated incognito browser. -class IncognitoClearBrowsingDataDialogCoordinator - : public BrowserUserData<IncognitoClearBrowsingDataDialogCoordinator> { +class IncognitoClearBrowsingDataDialogCoordinator { public: - ~IncognitoClearBrowsingDataDialogCoordinator() override; + explicit IncognitoClearBrowsingDataDialogCoordinator( + BrowserWindowInterface* browser); + IncognitoClearBrowsingDataDialogCoordinator( + const IncognitoClearBrowsingDataDialogCoordinator&) = delete; + IncognitoClearBrowsingDataDialogCoordinator& operator=( + const IncognitoClearBrowsingDataDialogCoordinator&) = delete; + ~IncognitoClearBrowsingDataDialogCoordinator(); // Shows the bubble for this browser anchored to the avatar toolbar button. void Show(IncognitoClearBrowsingDataDialogInterface::Type type); @@ -29,13 +36,11 @@ GetIncognitoClearBrowsingDataDialogForTesting(); private: - friend class BrowserUserData<IncognitoClearBrowsingDataDialogCoordinator>; - - explicit IncognitoClearBrowsingDataDialogCoordinator(Browser* browser); - views::ViewTracker bubble_tracker_; - BROWSER_USER_DATA_KEY_DECL(); + const raw_ptr<BrowserWindowInterface> browser_; + const raw_ptr<Profile> profile_; + const raw_ptr<BrowserUserEducationInterface> user_education_; }; #endif // CHROME_BROWSER_UI_VIEWS_INCOGNITO_CLEAR_BROWSING_DATA_DIALOG_COORDINATOR_H_
diff --git a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller.cc b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller.cc index ab5578a4..6b116a5a 100644 --- a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller.cc +++ b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller.cc
@@ -18,13 +18,13 @@ namespace { int GetLabelForStatus(CookieControlsState controls_state, - CookieBlocking3pcdStatus blocking_status) { + CookieBlocking3pcdStatus blocking_status, + bool from_page_reload) { switch (controls_state) { case CookieControlsState::kActiveTp: - // TODO(crbug.com/376283777): Use - // IDS_TRACKING_PROTECTIONS_PAGE_ACTION_PROTECTIONS_RESUMED_LABEL when - // animating in. - return IDS_TRACKING_PROTECTIONS_PAGE_ACTION_PROTECTIONS_ENABLED_LABEL; + return from_page_reload + ? IDS_TRACKING_PROTECTIONS_PAGE_ACTION_PROTECTIONS_RESUMED_LABEL + : IDS_TRACKING_PROTECTIONS_PAGE_ACTION_PROTECTIONS_ENABLED_LABEL; case CookieControlsState::kPausedTp: return IDS_TRACKING_PROTECTIONS_PAGE_ACTION_PROTECTIONS_PAUSED_LABEL; case CookieControlsState::kAllowed3pc: @@ -47,8 +47,6 @@ // TODO(crbug.com/376283777): This class needs further work to achieve full // parity with the legacy page action, including: // - Update icon visibility to always show if there's a bubble showing. -// - Support animations for specific cookie settings and for indication when a -// page is reloaded with new cookie settings. // - Add IPH handling logic. // - Implement the logic for executing the page action. // - Add metrics reporting. @@ -66,34 +64,17 @@ CookieControlsState controls_state, CookieBlocking3pcdStatus blocking_status, bool should_highlight) { - UpdatePageActionIcon(CookieControlsIconStatus{ + icon_status_ = CookieControlsIconStatus{ .icon_visible = icon_visible, .controls_state = controls_state, .blocking_status = blocking_status, .should_highlight = should_highlight, - }); -} + }; + UpdatePageActionIcon(/*from_page_reload=*/false); -void CookieControlsPageActionController::UpdatePageActionIcon( - const CookieControlsIconStatus& icon_status) { - if (!icon_status.icon_visible) { - page_action_controller_->HideSuggestionChip(kActionShowCookieControls); - page_action_controller_->Hide(kActionShowCookieControls); - return; - } - - const std::u16string& label = l10n_util::GetStringUTF16(GetLabelForStatus( - icon_status.controls_state, icon_status.blocking_status)); - page_action_controller_->OverrideImage( - kActionShowCookieControls, ui::ImageModel::FromVectorIcon(GetVectorIcon( - icon_status.controls_state))); - page_action_controller_->OverrideTooltip(kActionShowCookieControls, label); - page_action_controller_->OverrideText(kActionShowCookieControls, label); - page_action_controller_->Show(kActionShowCookieControls); - - if (icon_status.controls_state == CookieControlsState::kBlocked3pc && - icon_status.should_highlight) { - if (icon_status.blocking_status != CookieBlocking3pcdStatus::kNotIn3pcd) { + if (icon_status_.controls_state == CookieControlsState::kBlocked3pc && + icon_status_.should_highlight) { + if (icon_status_.blocking_status != CookieBlocking3pcdStatus::kNotIn3pcd) { page_action_controller_->OverrideText( kActionShowCookieControls, l10n_util::GetStringUTF16( @@ -106,3 +87,35 @@ }); } } + +void CookieControlsPageActionController:: + OnFinishedPageReloadWithChangedSettings() { + if (icon_status_.icon_visible) { + if (base::FeatureList::IsEnabled(privacy_sandbox::kActUserBypassUx)) { + UpdatePageActionIcon(/*from_page_reload=*/true); + // Animate the label to provide a visual confirmation to the user that + // their protection status on the site has changed. + page_action_controller_->ShowSuggestionChip(kActionShowCookieControls, + {.should_animate = true}); + } + } +} + +void CookieControlsPageActionController::UpdatePageActionIcon( + bool from_page_reload) { + if (!icon_status_.icon_visible) { + page_action_controller_->HideSuggestionChip(kActionShowCookieControls); + page_action_controller_->Hide(kActionShowCookieControls); + return; + } + + const std::u16string& label = l10n_util::GetStringUTF16( + GetLabelForStatus(icon_status_.controls_state, + icon_status_.blocking_status, from_page_reload)); + page_action_controller_->OverrideImage( + kActionShowCookieControls, ui::ImageModel::FromVectorIcon(GetVectorIcon( + icon_status_.controls_state))); + page_action_controller_->OverrideTooltip(kActionShowCookieControls, label); + page_action_controller_->OverrideText(kActionShowCookieControls, label); + page_action_controller_->Show(kActionShowCookieControls); +}
diff --git a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller.h b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller.h index 4a60a7eb..3b6e3bd 100644 --- a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller.h +++ b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller.h
@@ -36,6 +36,7 @@ CookieControlsState controls_state, CookieBlocking3pcdStatus blocking_status, bool should_highlight) override; + void OnFinishedPageReloadWithChangedSettings() override; private: // Encapsulates values provided by `OnCookieControlsIconStatusChanged`. @@ -46,8 +47,9 @@ bool should_highlight; }; - void UpdatePageActionIcon(const CookieControlsIconStatus& icon_status); + void UpdatePageActionIcon(bool from_page_reload); const raw_ref<page_actions::PageActionController> page_action_controller_; + CookieControlsIconStatus icon_status_; }; #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_COOKIE_CONTROLS_COOKIE_CONTROLS_PAGE_ACTION_CONTROLLER_H_
diff --git a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller_unittest.cc b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller_unittest.cc index 44e25d64..5a39236 100644 --- a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller_unittest.cc +++ b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_page_action_controller_unittest.cc
@@ -14,6 +14,7 @@ #include "chrome/grit/generated_resources.h" #include "components/content_settings/core/common/cookie_blocking_3pcd_status.h" #include "components/content_settings/core/common/cookie_controls_state.h" +#include "components/privacy_sandbox/privacy_sandbox_features.h" #include "components/strings/grit/privacy_sandbox_strings.h" #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -23,6 +24,7 @@ namespace { using testing::_; +using testing::Return; std::u16string AllowedLabel() { return l10n_util::GetStringUTF16( @@ -34,6 +36,21 @@ IDS_TRACKING_PROTECTION_PAGE_ACTION_SITE_NOT_WORKING_LABEL); } +std::u16string TrackingProtectionPausedLabel() { + return l10n_util::GetStringUTF16( + IDS_TRACKING_PROTECTIONS_PAGE_ACTION_PROTECTIONS_PAUSED_LABEL); +} + +std::u16string TrackingProtectionResumedLabel() { + return l10n_util::GetStringUTF16( + IDS_TRACKING_PROTECTIONS_PAGE_ACTION_PROTECTIONS_RESUMED_LABEL); +} + +std::u16string TrackingProtectionEnabledLabel() { + return l10n_util::GetStringUTF16( + IDS_TRACKING_PROTECTIONS_PAGE_ACTION_PROTECTIONS_ENABLED_LABEL); +} + class FakePageActionController : public page_actions::MockPageActionController { public: FakePageActionController() = default; @@ -61,9 +78,13 @@ public testing::WithParamInterface<CookieBlocking3pcdStatus> { public: CookieControlsPageActionControllerTest() { - scoped_feature_list_.InitAndEnableFeatureWithParameters( - features::kPageActionsMigration, - {{features::kPageActionsMigrationCookieControls.name, "true"}}); + scoped_feature_list_.InitWithFeaturesAndParameters( + { + {features::kPageActionsMigration, + {{features::kPageActionsMigrationCookieControls.name, "true"}}}, + {privacy_sandbox::kActUserBypassUx, {}}, + }, + {}); cookie_controls_page_action_controller_ = std::make_unique<CookieControlsPageActionController>( @@ -194,4 +215,70 @@ /*should_highlight=*/false); } +TEST_P(CookieControlsPageActionControllerTest, + IconAnimatesOnPageReloadWithChanged3pcSettings) { + // Set initial state without highlighting. + EXPECT_CALL(page_action_controller(), Show(kActionShowCookieControls)); + EXPECT_CALL(page_action_controller(), ShowSuggestionChip(_, _)).Times(0); + controller().OnCookieControlsIconStatusChanged( + /*icon_visible=*/true, CookieControlsState::kBlocked3pc, GetParam(), + /*should_highlight=*/false); + testing::Mock::VerifyAndClearExpectations(&page_action_controller()); + + // Force the icon to animate and set the label again upon reload. + EXPECT_CALL(page_action_controller(), + ShowSuggestionChip(kActionShowCookieControls, _)); + EXPECT_CALL(page_action_controller(), + OverrideTooltip(kActionShowCookieControls, BlockedLabel())); + controller().OnFinishedPageReloadWithChangedSettings(); + + // The label for the chip should be the "Blocked" label. + EXPECT_EQ(page_action_controller().last_text(), BlockedLabel()); +} + +TEST_P(CookieControlsPageActionControllerTest, + IconAnimatesOnPageReloadWithChangedTpSettings) { + // Default state when tracking protections are active. + EXPECT_CALL(page_action_controller(), Show(kActionShowCookieControls)); + EXPECT_CALL(page_action_controller(), ShowSuggestionChip(_, _)).Times(0); + EXPECT_CALL(page_action_controller(), + OverrideTooltip(kActionShowCookieControls, + TrackingProtectionEnabledLabel())); + controller().OnCookieControlsIconStatusChanged( + /*icon_visible=*/true, CookieControlsState::kActiveTp, GetParam(), + /*should_highlight=*/false); + // The icon is visible, but not animating, and has the correct tooltip. + testing::Mock::VerifyAndClearExpectations(&page_action_controller()); + + // When tracking protections are paused, the label is shown and updated. + controller().OnCookieControlsIconStatusChanged( + /*icon_visible=*/true, CookieControlsState::kPausedTp, GetParam(), + /*should_highlight=*/false); + EXPECT_CALL(page_action_controller(), Show(kActionShowCookieControls)); + EXPECT_CALL(page_action_controller(), + ShowSuggestionChip(kActionShowCookieControls, _)); + EXPECT_CALL(page_action_controller(), + OverrideTooltip(kActionShowCookieControls, + TrackingProtectionPausedLabel())); + controller().OnFinishedPageReloadWithChangedSettings(); + EXPECT_EQ(page_action_controller().last_text(), + TrackingProtectionPausedLabel()); + testing::Mock::VerifyAndClearExpectations(&page_action_controller()); + + // When tracking protections are resumed, the label is shown and updated. + controller().OnCookieControlsIconStatusChanged( + /*icon_visible=*/true, CookieControlsState::kActiveTp, GetParam(), + /*should_highlight=*/false); + + EXPECT_CALL(page_action_controller(), Show(kActionShowCookieControls)); + EXPECT_CALL(page_action_controller(), + ShowSuggestionChip(kActionShowCookieControls, _)); + EXPECT_CALL(page_action_controller(), + OverrideTooltip(kActionShowCookieControls, + TrackingProtectionResumedLabel())); + controller().OnFinishedPageReloadWithChangedSettings(); + EXPECT_EQ(page_action_controller().last_text(), + TrackingProtectionResumedLabel()); +} + } // namespace
diff --git a/chrome/browser/ui/views/location_bar/lens_overlay_homework_page_action_icon_view.cc b/chrome/browser/ui/views/location_bar/lens_overlay_homework_page_action_icon_view.cc index 4efef73..ea7b7da 100644 --- a/chrome/browser/ui/views/location_bar/lens_overlay_homework_page_action_icon_view.cc +++ b/chrome/browser/ui/views/location_bar/lens_overlay_homework_page_action_icon_view.cc
@@ -14,13 +14,11 @@ #include "chrome/browser/ui/lens/lens_search_controller.h" #include "chrome/browser/ui/views/frame/browser_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/browser/user_education/user_education_service.h" #include "chrome/grit/branded_strings.h" #include "components/lens/lens_features.h" #include "components/lens/lens_metrics.h" -#include "components/omnibox/browser/omnibox_prefs.h" #include "components/vector_icons/vector_icons.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" @@ -92,11 +90,6 @@ } #endif // BUILDFLAG(ENABLE_GLIC) - if (!browser_->GetProfile()->GetPrefs()->GetBoolean( - omnibox::kShowGoogleLensShortcut)) { - return false; - } - // Hide the homework chip if the broader lens feature is disabled. const auto* controller = browser_->GetFeatures().lens_overlay_entry_point_controller();
diff --git a/chrome/browser/ui/views/location_bar/lens_overlay_homework_page_action_icon_view_interactive_uitest.cc b/chrome/browser/ui/views/location_bar/lens_overlay_homework_page_action_icon_view_interactive_uitest.cc index fca32038..6ca3250f 100644 --- a/chrome/browser/ui/views/location_bar/lens_overlay_homework_page_action_icon_view_interactive_uitest.cc +++ b/chrome/browser/ui/views/location_bar/lens_overlay_homework_page_action_icon_view_interactive_uitest.cc
@@ -23,7 +23,6 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "components/lens/lens_features.h" -#include "components/omnibox/browser/omnibox_prefs.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" #include "ui/events/test/test_event.h" @@ -222,56 +221,4 @@ MatchesRegex("ep=crmntob&re=df&s=4&st=\\d+&lm=.+")); } -IN_PROC_BROWSER_TEST_F(LensOverlayHomeworkPageActionIconViewTest, - DoesNotShowWhenSettingDisabled) { - // Disable the setting. - browser()->profile()->GetPrefs()->SetBoolean(omnibox::kShowGoogleLensShortcut, - false); - const GURL url = embedded_test_server()->GetURL(kDocumentWithNamedElement); - // Navigate to a matching page. - ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), GURL(url))); - - LensOverlayHomeworkPageActionIconView* icon_view = - lens_overlay_homework_icon_view(); - views::FocusManager* focus_manager = icon_view->GetFocusManager(); - focus_manager->ClearFocus(); - EXPECT_FALSE(focus_manager->GetFocusedView()); - EXPECT_FALSE(icon_view->GetVisible()); - - // Focus in the location bar should not show the icon. - location_bar_view()->FocusLocation(false); - ViewVisibilityWaiter(icon_view, false).Wait(); - - EXPECT_TRUE(focus_manager->GetFocusedView()); - EXPECT_FALSE(icon_view->GetVisible()); -} - -IN_PROC_BROWSER_TEST_F(LensOverlayHomeworkPageActionIconViewTest, - RespectsShowShortcutPreference) { - // Ensure the shortcut pref starts enabled. - browser()->profile()->GetPrefs()->SetBoolean(omnibox::kShowGoogleLensShortcut, - true); - - const GURL url = embedded_test_server()->GetURL(kDocumentWithNamedElement); - // Navigate to a matching page. - ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), GURL(url))); - - views::View* icon_view = lens_overlay_homework_icon_view(); - views::FocusManager* focus_manager = icon_view->GetFocusManager(); - focus_manager->ClearFocus(); - EXPECT_FALSE(focus_manager->GetFocusedView()); - EXPECT_TRUE(icon_view->GetVisible()); - - // Disable the preference, the entrypoint should immediately disappear. - browser()->profile()->GetPrefs()->SetBoolean(omnibox::kShowGoogleLensShortcut, - false); - EXPECT_FALSE(icon_view->GetVisible()); - - // Re-enable the preference, the entrypoint should immediately become - // visible. - browser()->profile()->GetPrefs()->SetBoolean(omnibox::kShowGoogleLensShortcut, - true); - EXPECT_TRUE(icon_view->GetVisible()); -} - } // namespace
diff --git a/chrome/browser/ui/views/tabs/tab_search_container_browsertest.cc b/chrome/browser/ui/views/tabs/tab_search_container_browsertest.cc index 56e8cf1..74f651c0 100644 --- a/chrome/browser/ui/views/tabs/tab_search_container_browsertest.cc +++ b/chrome/browser/ui/views/tabs/tab_search_container_browsertest.cc
@@ -251,7 +251,13 @@ ->IsShowing()); } -IN_PROC_BROWSER_TEST_F(TabSearchContainerBrowserTest, DelaysHide) { +// TODO(crbug.com/413441658): Flaky on Windows 10 builds. +#if BUILDFLAG(IS_WIN) +#define MAYBE_DelaysHide DISABLED_DelaysHide +#else +#define MAYBE_DelaysHide DelaysHide +#endif +IN_PROC_BROWSER_TEST_F(TabSearchContainerBrowserTest, MAYBE_DelaysHide) { ASSERT_FALSE(tab_search_container()->animation_session_for_testing()); tab_search_container()->ShowTabOrganization(
diff --git a/chrome/browser/ui/webui/ash/settings/pages/power/power_section.cc b/chrome/browser/ui/webui/ash/settings/pages/power/power_section.cc index c26731f..7fa064a 100644 --- a/chrome/browser/ui/webui/ash/settings/pages/power/power_section.cc +++ b/chrome/browser/ui/webui/ash/settings/pages/power/power_section.cc
@@ -97,6 +97,24 @@ return tags; } +base::span<const SearchConcept> GetPowerWithOptimizedChargingSearchConcepts() { + static constexpr auto tags = std::to_array<SearchConcept>({ + {IDS_OS_SETTINGS_TAG_POWER_OPTIMIZED_CHARGING, + mojom::kPowerSubpagePath, + mojom::SearchResultIcon::kPower, + mojom::SearchResultDefaultRank::kMedium, + mojom::SearchResultType::kSetting, + {.setting = mojom::Setting::kOptimizedCharging}}, + {IDS_OS_SETTINGS_TAG_POWER_CHARGE_LIMIT, + mojom::kPowerSubpagePath, + mojom::SearchResultIcon::kPower, + mojom::SearchResultDefaultRank::kMedium, + mojom::SearchResultType::kSetting, + {.setting = mojom::Setting::kChargeLimit}}, + }); + return tags; +} + base::span<const SearchConcept> GetPowerWithBatterySaverModeSearchConcepts() { static constexpr auto tags = std::to_array<SearchConcept>({ {IDS_OS_SETTINGS_TAG_POWER_BATTERY_SAVER, @@ -155,6 +173,12 @@ IDS_SETTINGS_POWER_ADAPTIVE_CHARGING_LABEL}, {"powerAdaptiveChargingSubtext", IDS_SETTINGS_POWER_ADAPTIVE_CHARGING_SUBTEXT}, + {"powerOptimizedChargingLabel", + IDS_SETTINGS_POWER_OPTIMIZED_CHARGING_LABEL}, + {"powerOptimizedChargingChangeLabel", + IDS_SETTINGS_POWER_OPTIMIZED_CHARGING_MODE_CHANGE_LABEL}, + {"powerBatteryChargeLimitLabel", + IDS_SETTINGS_POWER_BATTERY_CHARGE_LIMIT_LABEL}, {"powerIdleDisplayOff", IDS_SETTINGS_POWER_IDLE_DISPLAY_OFF}, {"powerIdleDisplayOffSleep", IDS_SETTINGS_POWER_IDLE_DISPLAY_OFF_SLEEP}, {"powerIdleDisplayOn", IDS_SETTINGS_POWER_IDLE_DISPLAY_ON}, @@ -238,6 +262,8 @@ mojom::Setting::kSleepWhenLaptopLidClosed, mojom::Setting::kAdaptiveCharging, mojom::Setting::kBatterySaver, + mojom::Setting::kOptimizedCharging, + mojom::Setting::kChargeLimit, }; RegisterNestedSettingBulk(mojom::Subpage::kPower, kPowerSettings, generator); } @@ -260,6 +286,12 @@ ->adaptive_charging_controller() ->IsAdaptiveChargingSupported()) { updater.AddSearchTags(GetPowerWithAdaptiveChargingSearchConcepts()); + + // Assume that Adaptive Charging must be enabled and supported for + // charge limit to be supported. + if (ash::features::IsBatteryChargeLimitAvailable()) { + updater.AddSearchTags(GetPowerWithOptimizedChargingSearchConcepts()); + } } const auto* battery_saver_controller =
diff --git a/chrome/browser/ui/webui/extensions/extensions_internals_source.cc b/chrome/browser/ui/webui/extensions/extensions_internals_source.cc index a801180..bb89eef 100644 --- a/chrome/browser/ui/webui/extensions/extensions_internals_source.cc +++ b/chrome/browser/ui/webui/extensions/extensions_internals_source.cc
@@ -91,6 +91,27 @@ NOTREACHED(); } +const char* RegistryStatusToString( + extensions::ExtensionRegistry::IncludeFlag status) { + switch (status) { + case extensions::ExtensionRegistry::NONE: + return "NONE"; + case extensions::ExtensionRegistry::ENABLED: + return "ENABLED"; + case extensions::ExtensionRegistry::DISABLED: + return "DISABLED"; + case extensions::ExtensionRegistry::TERMINATED: + return "TERMINATED"; + case extensions::ExtensionRegistry::BLOCKLISTED: + return "BLOCKLISTED"; + case extensions::ExtensionRegistry::BLOCKED: + return "BLOCKED"; + case extensions::ExtensionRegistry::EVERYTHING: + return "EVERYTHING"; + } + NOTREACHED(); +} + base::Value::List CreationFlagsToList(int creation_flags) { base::Value::List flags_value; if (creation_flags == extensions::Extension::NO_FLAGS) { @@ -403,6 +424,7 @@ "service_worker_keepalives"; constexpr std::string_view kTimeoutTypeKey = "timeout_type"; constexpr std::string_view kTypeKey = "type"; +constexpr std::string_view kRegistryStatus = "registry_status"; base::Value::Dict FormatBackgroundPageKeepaliveData( extensions::ProcessManager* process_manager, @@ -595,35 +617,54 @@ std::string ExtensionsInternalsSource::WriteToString() const { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - const auto extensions = extensions::ExtensionRegistry::Get(profile_) - ->GenerateInstalledExtensionsSet(); + using ExtensionStatusMap = + std::map<extensions::ExtensionRegistry::IncludeFlag, + extensions::ExtensionSet>; + const extensions::ExtensionRegistry* registry = + extensions::ExtensionRegistry::Get(profile_); + // We fetch each status separately so that we can annotate them below when + // building the extension_data. + const auto extension_statuses = {extensions::ExtensionRegistry::ENABLED, + extensions::ExtensionRegistry::DISABLED, + extensions::ExtensionRegistry::TERMINATED, + extensions::ExtensionRegistry::BLOCKLISTED, + extensions::ExtensionRegistry::BLOCKED}; + ExtensionStatusMap status_map; + for (const auto status : extension_statuses) { + status_map.emplace(status, + registry->GenerateInstalledExtensionsSet(status)); + } extensions::ProcessManager* process_manager = extensions::ProcessManager::Get(profile_); extensions::ExtensionPrefs* prefs = extensions::ExtensionPrefs::Get(profile_); base::Value::List data; - for (const auto& extension : extensions) { - base::Value::Dict extension_data; - extension_data.Set(kInternalsIdKey, extension->id()); - extension_data.Set(kInternalsGuidKey, extension->guid()); - extension_data.Set(kInternalsCreationFlagsKey, - CreationFlagsToList(extension->creation_flags())); - extension_data.Set( - kInternalsDisableReasonsKey, - DisableReasonsToList(prefs->GetDisableReasons(extension->id()))); - extension_data.Set( - kBackgroundPageKeepalivesKey, - FormatBackgroundPageKeepaliveData(process_manager, extension.get())); - extension_data.Set( - kServiceWorkerKeepalivesKey, - FormatServiceWorkerKeepaliveData(*process_manager, extension->id())); - extension_data.Set(kLocationKey, LocationToString(extension->location())); - extension_data.Set(kManifestVersionKey, extension->manifest_version()); - extension_data.Set(kInternalsNameKey, extension->name()); - extension_data.Set(kPathKey, extension->path().LossyDisplayName()); - extension_data.Set(kTypeKey, TypeToString(extension->GetType())); - extension_data.Set(kInternalsVersionKey, extension->GetVersionForDisplay()); - extension_data.Set(kPermissionsKey, FormatPermissionsData(*extension)); - data.Append(std::move(extension_data)); + for (const auto& [status, extensions] : status_map) { + for (const auto& extension : extensions) { + base::Value::Dict extension_data; + extension_data.Set(kInternalsIdKey, extension->id()); + extension_data.Set(kInternalsGuidKey, extension->guid()); + extension_data.Set(kInternalsCreationFlagsKey, + CreationFlagsToList(extension->creation_flags())); + extension_data.Set( + kInternalsDisableReasonsKey, + DisableReasonsToList(prefs->GetDisableReasons(extension->id()))); + extension_data.Set( + kBackgroundPageKeepalivesKey, + FormatBackgroundPageKeepaliveData(process_manager, extension.get())); + extension_data.Set( + kServiceWorkerKeepalivesKey, + FormatServiceWorkerKeepaliveData(*process_manager, extension->id())); + extension_data.Set(kLocationKey, LocationToString(extension->location())); + extension_data.Set(kManifestVersionKey, extension->manifest_version()); + extension_data.Set(kInternalsNameKey, extension->name()); + extension_data.Set(kPathKey, extension->path().LossyDisplayName()); + extension_data.Set(kTypeKey, TypeToString(extension->GetType())); + extension_data.Set(kRegistryStatus, RegistryStatusToString(status)); + extension_data.Set(kInternalsVersionKey, + extension->GetVersionForDisplay()); + extension_data.Set(kPermissionsKey, FormatPermissionsData(*extension)); + data.Append(std::move(extension_data)); + } } // Aggregate and add the data for the registered event listeners.
diff --git a/chrome/browser/ui/webui/extensions/extensions_internals_unittest.cc b/chrome/browser/ui/webui/extensions/extensions_internals_unittest.cc index fa6fa7e..d5c6426 100644 --- a/chrome/browser/ui/webui/extensions/extensions_internals_unittest.cc +++ b/chrome/browser/ui/webui/extensions/extensions_internals_unittest.cc
@@ -10,6 +10,8 @@ #include "chrome/browser/extensions/permissions/scripting_permissions_modifier.h" #include "chrome/browser/ui/webui/extensions/extensions_internals_source.h" #include "chrome/test/base/testing_profile.h" +#include "extensions/browser/blocklist_extension_prefs.h" +#include "extensions/browser/blocklist_state.h" #include "extensions/browser/event_router.h" #include "extensions/browser/event_router_factory.h" #include "extensions/browser/extension_prefs.h" @@ -73,6 +75,8 @@ testing::Pointee(std::string("EXTERNAL_PREF"))); EXPECT_THAT(extension_json.FindString("guid"), testing::Pointee(extension->guid())); + EXPECT_THAT(extension_json.FindString("registry_status"), + testing::Pointee(std::string("ENABLED"))); } // Test that active and optional permissions show up correctly in the JSON @@ -235,3 +239,70 @@ .GetString(), "https://example.com/*"); } + +// Test that extensions in different ExtensionSets in the extension registry are +// marked correctly as such. +TEST_F(ExtensionsInternalsUnitTest, RegistryExtensionStatus) { + InitializeEmptyExtensionService(); + extensions::EventRouterFactory::GetInstance()->SetTestingFactory( + profile(), base::BindRepeating(&BuildEventRouter)); + + scoped_refptr<const extensions::Extension> enabled_extension = + extensions::ExtensionBuilder("enabled").Build(); + registrar()->AddExtension(enabled_extension.get()); + + scoped_refptr<const extensions::Extension> disabled_extension = + extensions::ExtensionBuilder("disabled").Build(); + registrar()->AddExtension(disabled_extension.get()); + registrar()->DisableExtension( + disabled_extension->id(), + {extensions::disable_reason::DISABLE_USER_ACTION}); + + scoped_refptr<const extensions::Extension> terminated_extension = + extensions::ExtensionBuilder("terminated").Build(); + registrar()->AddExtension(terminated_extension.get()); + registrar()->TerminateExtension(terminated_extension->id()); + + scoped_refptr<const extensions::Extension> blocklisted_extension = + extensions::ExtensionBuilder("blocklisted").Build(); + registrar()->AddExtension(blocklisted_extension.get()); + registrar()->BlocklistExtensionForTest(blocklisted_extension->id()); + + ExtensionsInternalsSource source(profile()); + auto extensions_list = base::JSONReader::Read(source.WriteToString()); + ASSERT_TRUE(extensions_list) << "Failed to parse extensions internals json."; + for (const auto& info : extensions_list->GetList()) { + const base::Value::Dict& extension_json = info.GetDict(); + const std::string* registry_status = + extension_json.FindString("registry_status"); + ASSERT_TRUE(registry_status); + const std::string* extension_id = extension_json.FindString("id"); + ASSERT_TRUE(extension_id); + if (*extension_id == enabled_extension->id()) { + EXPECT_EQ("ENABLED", *registry_status); + } else if (*extension_id == disabled_extension->id()) { + EXPECT_EQ("DISABLED", *registry_status); + } else if (*extension_id == terminated_extension->id()) { + EXPECT_EQ("TERMINATED", *registry_status); + } else if (*extension_id == blocklisted_extension->id()) { + EXPECT_EQ("BLOCKLISTED", *registry_status); + } else { + ADD_FAILURE() << "Unexpected extension found in regsitry"; + } + } + + // There's no easy way to put a single extension into the BLOCKED state, so + // instead we just block them all to check that. We do have to unblocklist + // the blocklisted extension first though, as that takes priority otherwise. + extensions::blocklist_prefs::SetSafeBrowsingExtensionBlocklistState( + blocklisted_extension->id(), + extensions::BitMapBlocklistState::NOT_BLOCKLISTED, + extensions::ExtensionPrefs::Get(profile())); + registrar()->OnBlocklistStateRemoved(blocklisted_extension->id()); + registrar()->BlockAllExtensions(); + extensions_list = base::JSONReader::Read(source.WriteToString()); + ASSERT_TRUE(extensions_list) << "Failed to parse extensions internals json."; + for (const auto& info : extensions_list->GetList()) { + EXPECT_EQ("BLOCKED", *info.GetDict().FindString("registry_status")); + } +}
diff --git a/chrome/browser/web_applications/commands/install_app_from_verified_manifest_command.cc b/chrome/browser/web_applications/commands/install_app_from_verified_manifest_command.cc index 375adb6..2788177b 100644 --- a/chrome/browser/web_applications/commands/install_app_from_verified_manifest_command.cc +++ b/chrome/browser/web_applications/commands/install_app_from_verified_manifest_command.cc
@@ -200,7 +200,7 @@ *manifest, *data_retriever_.get(), /*background_installation=*/true, install_source_, web_contents_lock_->shared_web_contents().GetWeakPtr(), - icon_url_modifications, + icon_url_modifications, GetMutableDebugValue(), base::BindOnce(&InstallAppFromVerifiedManifestCommand:: OnInstallInfoParsedFromManifest, weak_ptr_factory_.GetWeakPtr()),
diff --git a/chrome/browser/web_applications/commands/web_install_from_url_command.cc b/chrome/browser/web_applications/commands/web_install_from_url_command.cc index 991a7d4..ee60983e 100644 --- a/chrome/browser/web_applications/commands/web_install_from_url_command.cc +++ b/chrome/browser/web_applications/commands/web_install_from_url_command.cc
@@ -13,6 +13,7 @@ #include "chrome/browser/web_applications/commands/command_metrics.h" #include "chrome/browser/web_applications/commands/web_app_command.h" #include "chrome/browser/web_applications/install_bounce_metric.h" +#include "chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.h" #include "chrome/browser/web_applications/locks/shared_web_contents_lock.h" #include "chrome/browser/web_applications/locks/shared_web_contents_with_app_lock.h" #include "chrome/browser/web_applications/locks/web_app_lock_manager.h" @@ -164,15 +165,8 @@ return; } - web_app_info_ = std::make_unique<WebAppInstallInfo>(opt_manifest->id, - opt_manifest->start_url); CHECK(opt_manifest->start_url.is_valid()); CHECK(opt_manifest->id.is_valid()); - UpdateWebAppInfoFromManifest(*opt_manifest, web_app_info_.get()); - GetMutableDebugValue().Set("manifest_id", - web_app_info_->manifest_id().spec()); - GetMutableDebugValue().Set("start_url", web_app_info_->start_url().spec()); - GetMutableDebugValue().Set("name", web_app_info_->title); // If navigator.install was invoked with only an `install_url` (1 parameter // version), the manifest must have a developer-specified, or "custom", id. @@ -181,22 +175,6 @@ return; } - // If navigator.install was invoked with both `install_url` and `manifest_id` - // (2 param version), the given `manifest_id` must match the computed id of - // the manifest we just fetched. - if (manifest_id_.has_value() && - manifest_id_ != web_app_info_->manifest_id()) { - Abort(webapps::InstallResultCode::kManifestIdMismatch); - return; - } - - icons_from_manifest_ = GetValidIconUrlsToDownload(*web_app_info_); - for (const IconUrlWithSize& icon_with_size : icons_from_manifest_) { - GetMutableDebugValue() - .EnsureList("icon_urls_from_manifest") - ->Append(icon_with_size.ToString()); - } - opt_manifest_ = std::move(opt_manifest); if (opt_manifest_->icons.empty()) { Abort(webapps::InstallResultCode::kNotInstallable); @@ -208,41 +186,40 @@ std::make_unique<SharedWebContentsWithAppLock>(); command_manager()->lock_manager().UpgradeAndAcquireLock( std::move(web_contents_lock_), *shared_web_contents_with_app_lock_, - {GenerateAppIdFromManifestId(web_app_info_->manifest_id())}, - base::BindOnce(&WebInstallFromUrlCommand::GetIcons, - weak_ptr_factory_.GetWeakPtr())); + {GenerateAppIdFromManifestId(opt_manifest_->id)}, + base::BindOnce( + &WebInstallFromUrlCommand::CreateWebAppInstallInfoFromManifest, + weak_ptr_factory_.GetWeakPtr())); } -void WebInstallFromUrlCommand::GetIcons() { +void WebInstallFromUrlCommand::CreateWebAppInstallInfoFromManifest() { CHECK(shared_web_contents_with_app_lock_->IsGranted()); - data_retriever_->GetIcons( - shared_web_contents(), icons_from_manifest_, - /*skip_page_favicons*/ true, - /*fail_all_if_any_fail=*/false, - base::BindOnce(&WebInstallFromUrlCommand::OnIconsRetrievedShowDialog, - weak_ptr_factory_.GetWeakPtr())); + manifest_to_install_info_job_ = + ManifestToWebAppInstallInfoJob::CreateAndStart( + *opt_manifest_, *data_retriever_.get(), + /*background_installation=*/true, kInstallSource, + shared_web_contents_with_app_lock_->shared_web_contents() + .GetWeakPtr(), + [](IconUrlSizeSet& icon_url_size_set) {}, GetMutableDebugValue(), + base::BindOnce( + &WebInstallFromUrlCommand::OnWebAppInstallInfoCreatedShowDialog, + weak_ptr_factory_.GetWeakPtr())); } -void WebInstallFromUrlCommand::OnIconsRetrievedShowDialog( - IconsDownloadedResult result, - IconsMap icons_map, - DownloadedIconsHttpResults icons_http_results) { - base::Value::Dict* icons_downloaded = - GetMutableDebugValue().EnsureDict("icons_retrieved"); - for (const auto& [url, bitmap_vector] : icons_map) { - base::Value::List* sizes = icons_downloaded->EnsureList(url.spec()); - for (const SkBitmap& bitmap : bitmap_vector) { - sizes->Append(bitmap.width()); - } - } +void WebInstallFromUrlCommand::OnWebAppInstallInfoCreatedShowDialog( + std::unique_ptr<WebAppInstallInfo> install_info) { + CHECK(install_info); + web_app_info_ = std::move(install_info); - CHECK(web_app_info_); - PopulateProductIcons(web_app_info_.get(), &icons_map); - PopulateOtherIcons(web_app_info_.get(), icons_map); - RecordDownloadedIconsResultAndHttpStatusCodes(result, icons_http_results); - install_error_log_entry_.LogDownloadedIconsErrors( - *web_app_info_, result, icons_map, icons_http_results); + // If navigator.install was invoked with both `install_url` and `manifest_id` + // (2 param version), the given `manifest_id` must match the computed id of + // the manifest we just fetched. + if (manifest_id_.has_value() && + manifest_id_ != web_app_info_->manifest_id()) { + Abort(webapps::InstallResultCode::kManifestIdMismatch); + return; + } // TODO(crbug.com/415825168): Support detailed install dialog for background // installs. For now, pass `nullptr` to the screenshot_fetcher which will
diff --git a/chrome/browser/web_applications/commands/web_install_from_url_command.h b/chrome/browser/web_applications/commands/web_install_from_url_command.h index 83b9c50..576b5fb 100644 --- a/chrome/browser/web_applications/commands/web_install_from_url_command.h +++ b/chrome/browser/web_applications/commands/web_install_from_url_command.h
@@ -11,6 +11,7 @@ #include "base/functional/callback_forward.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/web_applications/commands/web_app_command.h" +#include "chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.h" #include "chrome/browser/web_applications/locks/shared_web_contents_lock.h" #include "chrome/browser/web_applications/web_app_install_params.h" #include "chrome/browser/web_applications/web_app_logging.h" @@ -88,11 +89,9 @@ void OnDidPerformInstallableCheck(blink::mojom::ManifestPtr opt_manifest, bool valid_manifest_for_web_app, webapps::InstallableStatusCode error_code); - void GetIcons(); - void OnIconsRetrievedShowDialog( - IconsDownloadedResult result, - IconsMap icons_map, - DownloadedIconsHttpResults icons_http_results); + void CreateWebAppInstallInfoFromManifest(); + void OnWebAppInstallInfoCreatedShowDialog( + std::unique_ptr<WebAppInstallInfo> install_info); void OnInstallDialogCompleted( bool user_accepted, std::unique_ptr<WebAppInstallInfo> web_app_info); @@ -119,6 +118,7 @@ std::unique_ptr<webapps::WebAppUrlLoader> url_loader_; std::unique_ptr<WebAppDataRetriever> data_retriever_; std::unique_ptr<WebAppInstallInfo> web_app_info_; + std::unique_ptr<ManifestToWebAppInstallInfoJob> manifest_to_install_info_job_; IconUrlSizeSet icons_from_manifest_; webapps::InstallResultCode install_result_code_; blink::mojom::ManifestPtr opt_manifest_;
diff --git a/chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.cc b/chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.cc index 747ef56..c8678df 100644 --- a/chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.cc +++ b/chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.h" +#include <functional> #include <memory> #include <string> #include <utility> @@ -34,6 +35,7 @@ #include "third_party/blink/public/mojom/manifest/manifest.mojom-data-view.h" #include "third_party/blink/public/mojom/manifest/manifest.mojom-forward.h" #include "third_party/blink/public/mojom/manifest/manifest.mojom.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/geometry/size.h" #include "url/gurl.h" @@ -377,11 +379,12 @@ webapps::WebappInstallSource install_source, base::WeakPtr<content::WebContents> web_contents, base::FunctionRef<void(IconUrlSizeSet&)> icon_url_modifications, + base::Value::Dict& debug_data, WebAppInstallInfoCreationCallback creation_callback, WebAppInstallInfoConstructOptions options) { auto job = base::WrapUnique(new ManifestToWebAppInstallInfoJob( manifest, data_retriever, background_installation, install_source, - std::move(creation_callback), options)); + debug_data, std::move(creation_callback), options)); job->Start(web_contents, icon_url_modifications); return job; } @@ -391,13 +394,30 @@ WebAppDataRetriever& data_retriever, bool background_installation, webapps::WebappInstallSource install_source, + base::Value::Dict& debug_data, WebAppInstallInfoCreationCallback creation_callback, WebAppInstallInfoConstructOptions options) : manifest_(manifest.Clone()), data_retriever_(data_retriever), install_error_log_entry_(background_installation, install_source), + debug_data_(debug_data), creation_callback_(std::move(creation_callback)), - options_(options) {} + options_(options) { + // These are the pre-requisites for constructing a WebAppInstallInfo from a + // valid manifest id and start url. + CHECK(manifest_->id.is_valid()); + CHECK(!manifest_->id.has_ref()); + CHECK(manifest_->start_url.is_valid()); + + debug_data_->Set("manifest_id", manifest_->id.spec()); + debug_data_->Set("start_url", manifest_->start_url.spec()); + if (manifest_->name && !manifest_->name->empty()) { + debug_data_->Set("manifest_name", *manifest_->name); + } + if (manifest_->short_name && !manifest_->short_name->empty()) { + debug_data_->Set("manifest_short_name", *manifest_->short_name); + } +} void ManifestToWebAppInstallInfoJob::Start( base::WeakPtr<content::WebContents> web_contents, @@ -412,11 +432,6 @@ return; } - // These are the pre-requisites for constructing a WebAppInstallInfo from a - // valid manifest id and start url. - CHECK(manifest_->id.is_valid()); - CHECK(!manifest_->id.has_ref()); - CHECK(manifest_->start_url.is_valid()); install_info_ = std::make_unique<WebAppInstallInfo>(manifest_->id, manifest_->start_url); @@ -429,6 +444,10 @@ IconUrlSizeSet icon_urls_to_download = GetValidIconUrlsToDownload(*install_info_.get()); icon_url_modifications(icon_urls_to_download); + for (const IconUrlWithSize& icon_with_size : icon_urls_to_download) { + debug_data_->EnsureList("icon_urls_from_manifest") + ->Append(icon_with_size.ToString()); + } // This needs to be async to prevent re-entry issues on the caller and to // ensure that the outcome of this task is always async, as GetIcons() is @@ -565,6 +584,15 @@ IconsDownloadedResult result, IconsMap icons_map, DownloadedIconsHttpResults icons_http_results) { + base::Value::Dict* icons_downloaded = + debug_data_->EnsureDict("icons_created"); + for (const auto& [url, bitmap_vector] : icons_map) { + base::Value::List* sizes = icons_downloaded->EnsureList(url.spec()); + for (const SkBitmap& bitmap : bitmap_vector) { + sizes->Append(bitmap.width()); + } + } + PopulateProductIcons(install_info_.get(), &icons_map); PopulateOtherIcons(install_info_.get(), icons_map); RecordDownloadedIconsResultAndHttpStatusCodes(result, icons_http_results);
diff --git a/chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.h b/chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.h index 7d128d85..e4d4740 100644 --- a/chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.h +++ b/chrome/browser/web_applications/jobs/manifest_to_web_app_install_info_job.h
@@ -58,6 +58,7 @@ webapps::WebappInstallSource install_source, base::WeakPtr<content::WebContents> web_contents, base::FunctionRef<void(IconUrlSizeSet&)> icon_url_modifications, + base::Value::Dict& debug_data, WebAppInstallInfoCreationCallback creation_callback, WebAppInstallInfoConstructOptions options = WebAppInstallInfoConstructOptions{}); @@ -68,6 +69,7 @@ WebAppDataRetriever& data_retriever, bool background_installation, webapps::WebappInstallSource install_source, + base::Value::Dict& debug_data, WebAppInstallInfoCreationCallback creation_callback, WebAppInstallInfoConstructOptions options); @@ -84,6 +86,7 @@ blink::mojom::ManifestPtr manifest_; base::raw_ref<WebAppDataRetriever> data_retriever_; InstallErrorLogEntry install_error_log_entry_; + base::raw_ref<base::Value::Dict> debug_data_; WebAppInstallInfoCreationCallback creation_callback_; WebAppInstallInfoConstructOptions options_;
diff --git a/chrome/build/android-arm32.pgo.txt b/chrome/build/android-arm32.pgo.txt index 8007d587c..3aa86c7 100644 --- a/chrome/build/android-arm32.pgo.txt +++ b/chrome/build/android-arm32.pgo.txt
@@ -1 +1 @@ -chrome-android32-main-1750960776-8634f3350f7380b436f1b2055a06795b353b3aed-dfd27a58fdc94e0cae1479014107b01c13a12c13.profdata +chrome-android32-main-1750982352-39c280c216b58b23a73216216fd9fa1eac7efcad-698802b85c9d77cea69f367c0deac3d1a21de498.profdata
diff --git a/chrome/build/android-arm64.pgo.txt b/chrome/build/android-arm64.pgo.txt index f520a8e9..ece2647 100644 --- a/chrome/build/android-arm64.pgo.txt +++ b/chrome/build/android-arm64.pgo.txt
@@ -1 +1 @@ -chrome-android64-main-1750954222-50e373469ffa40485e41522e8b647eb05c52e201-a8b695df1aa93fff35abb88ac2a843eaf3b4db7d.profdata +chrome-android64-main-1750969481-612aa1c86754142eecf5a313a630637d4702a6f3-591cdf5a849136f8b4e2df0b8a4debb19fc28751.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 21da14e8..3962a76 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1750960776-223e0ff8818f049c5a4029a614674d62e945b46c-dfd27a58fdc94e0cae1479014107b01c13a12c13.profdata +chrome-mac-arm-main-1750982352-f1381fba882cca25f27c6b6b8415b990ce1db256-698802b85c9d77cea69f367c0deac3d1a21de498.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 8af6afe..33a8d07d 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1750928394-15763736a67a6dd8d17a2b4a38ebc8774845ad52-35f3c6ecf90a85cd6c39b42331dcee096c119c14.profdata +chrome-win32-main-1750949726-65d3b21de953e8b5dd114780adfc2b6695d406a4-a1142eeb809abe9eb620010957f995fc27d87fd7.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 2f71ed1..43de9a0 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1750917553-43bc0a77abb30b617efe594b3270bba82fbeb975-4e9dc3ea1c21fb61f060e3d317e344cb98c29643.profdata +chrome-win64-main-1750949726-12bf8004521b81a883340b2d16de1733afb5f939-a1142eeb809abe9eb620010957f995fc27d87fd7.profdata
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc index 06290ae..17b46a5 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc
@@ -201,6 +201,8 @@ schemes->extension_schemes.push_back(extensions::kExtensionScheme); #endif + schemes->isolated_app_schemes.push_back(chrome::kIsolatedAppScheme); + #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) schemes->savable_schemes.push_back(extensions::kExtensionScheme); #endif
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc index c48acc2..859452a0 100644 --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc
@@ -329,6 +329,11 @@ // Controls whether the actor component of Glic is enabled. BASE_FEATURE(kGlicActor, "GlicActor", base::FEATURE_ENABLED_BY_DEFAULT); +// Controls whether the actor ui state manager is enabled. +BASE_FEATURE(kGlicActorUiStateManager, + "GlicActorUiStateManager", + base::FEATURE_ENABLED_BY_DEFAULT); + // Controls renderer tool observation timeout when waiting on local // (non-network) work. const base::FeatureParam<base::TimeDelta> kGlicActorPageStabilityLocalTimeout{
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h index b178fd7..309b05f 100644 --- a/chrome/common/chrome_features.h +++ b/chrome/common/chrome_features.h
@@ -191,6 +191,7 @@ COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kGeoLanguage); COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kGlicActor); +COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kGlicActorUiStateManager); COMPONENT_EXPORT(CHROME_FEATURES) extern const base::FeatureParam<base::TimeDelta>( kGlicActorPageStabilityLocalTimeout);
diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/extensions/api/_api_features.json index df9774e..1cb0aaa 100644 --- a/chrome/common/extensions/api/_api_features.json +++ b/chrome/common/extensions/api/_api_features.json
@@ -109,7 +109,7 @@ "chrome://settings/*" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }], "autotestPrivate": { "dependencies": ["permission:autotestPrivate"], @@ -124,7 +124,7 @@ "chrome://read-later.top-chrome/*" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "bookmarks": [{ "dependencies": ["permission:bookmarks"], @@ -748,7 +748,7 @@ "dependencies": ["manifest:omnibox"], "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "pageAction": { "dependencies": ["manifest:page_action"],
diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/common/extensions/api/_permission_features.json index 874b785c..374984aa 100644 --- a/chrome/common/extensions/api/_permission_features.json +++ b/chrome/common/extensions/api/_permission_features.json
@@ -15,13 +15,13 @@ "channel": "stable", "extension_types": ["extension", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "accessibilityFeatures.read": [{ "channel": "stable", "extension_types": ["extension", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "extension_types": ["legacy_packaged_app"], @@ -65,7 +65,7 @@ "extension_types": ["extension", "platform_app"], "location": "component", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "autotestPrivate": { "channel": "stable", @@ -91,7 +91,7 @@ "extension_types": ["extension", "legacy_packaged_app", "platform_app"], "location": "component", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "browsingData": { "channel": "stable", @@ -179,7 +179,7 @@ "extension_types": ["extension", "legacy_packaged_app", "platform_app"], "location": "component", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "commands.accessibility": { "channel": "stable", @@ -193,7 +193,7 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "contextMenus": { "channel": "stable", @@ -220,13 +220,13 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "AE27D69DBE571F4B1694F05C89B710C646792231" // Published ADT. ] @@ -257,7 +257,7 @@ "channel": "stable", "extension_types": ["extension", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "documentScan": { "channel": "stable", @@ -268,7 +268,7 @@ "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "downloads.open": { "channel": "stable", @@ -374,7 +374,7 @@ "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist" : [ "86D63D90308742AA65B8B29AE2D39FED2D6DC310", // https://crbug.com/882461 SecureConnect "031E5E4A54C39E4F46E11CE643584E9187915908", // https://crbug.com/882461 SecureConnect @@ -406,14 +406,14 @@ "channel": "stable", "command_line_switch": "extension-actor-api", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "experimentalAiData": { "extension_types": ["extension"], "channel": "stable", "command_line_switch": "extension-ai-data-collection", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "favicon": { "channel": "stable", @@ -517,7 +517,7 @@ "extension_types": ["extension", "platform_app"], "location": "component", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", @@ -721,7 +721,7 @@ "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "1BFB3A47AA4A1E1C4714D919217602685CDD0FA7", // http://crbug.com/574600 "DD87C93131FF8D3DE4E483DC1EB298D73C7223A6", // http://crbug.com/1328114 @@ -733,13 +733,13 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "dev", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }], "notifications": [{ // The chrome.notifications functionality listed in notifications.idl is @@ -775,20 +775,20 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "passwordsPrivate": { "channel": "trunk", "extension_types": ["extension", "platform_app"], "location": "component", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "pdfViewerPrivate": { "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "CBCC42ABED43A4B58FE3810E62AFFA010EB0349F" // PDF Viewer ] @@ -849,7 +849,7 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "extension_types": ["platform_app"], @@ -859,7 +859,7 @@ "channel": "stable", "extension_types": ["extension", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ // TODO(ntang): Remove these 2 hashes when the app is no longer active. "A291B26E088FA6BA53FFD72F0916F06EBA7C585A", // http://crbug.com/329088 @@ -888,13 +888,13 @@ ], "location": "component", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "safeBrowsingPrivate": { "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "B281B98DDD6A379EF50D59BB1135419536C1C353", // Report site to Safe Browsing Extension, crbug.com/932161 "FD15C63ABA854733FDCBC1D4D34A71E963A12ABD", // Chrome Reporting Extension @@ -910,20 +910,20 @@ "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "sessions": { "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "settingsPrivate": [{ "channel": "trunk", "extension_types": ["extension", "platform_app"], "location": "component", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { // TODO(devlin): Remove these entries. Unfortunately, this causes a bit of @@ -932,7 +932,7 @@ "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "63ED55E43214C211F82122ED56407FF1A807F2A3", // Media Router Dev "226CF815E39A363090A1E547D53063472B8279FA" // Media Router Release @@ -960,7 +960,7 @@ "extension_types": ["extension"], "min_manifest_version": 3, // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "smartCardProviderPrivate": { "channel": "stable", @@ -1003,14 +1003,14 @@ "extension_types": ["extension", "legacy_packaged_app", "platform_app"], "location": "component", // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "tabGroups": { "channel": "stable", "extension_types": ["extension"], "min_manifest_version": 3, // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "tabs": [ { @@ -1031,7 +1031,7 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "terminalPrivate": { "channel": "stable", @@ -1086,13 +1086,13 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "webrtcAudioPrivate": { "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ // Hangouts test extension "80B9DC58E5210749F052F5B4DB239C50CF72AEB6", @@ -1106,7 +1106,7 @@ "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ // Hangouts test extension "80B9DC58E5210749F052F5B4DB239C50CF72AEB6",
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index b28d093..e5cde87 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -429,6 +429,8 @@ extensions_renderer_client->RenderThreadStarted(); WebSecurityPolicy::RegisterURLSchemeAsExtension( WebString::FromASCII(extensions::kExtensionScheme)); + WebSecurityPolicy::RegisterURLSchemeAsIsolatedApp( + WebString::FromASCII(chrome::kIsolatedAppScheme)); WebSecurityPolicy::RegisterURLSchemeAsCodeCacheWithHashing( WebString::FromASCII(extensions::kExtensionScheme)); #endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE) @@ -1226,9 +1228,6 @@ blink::ProtocolHandlerSecurityLevel ChromeContentRendererClient::GetProtocolHandlerSecurityLevel( const url::Origin& origin) { - if (origin.scheme() == chrome::kIsolatedAppScheme) { - return blink::ProtocolHandlerSecurityLevel::kSameOrigin; - } #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) return extensions::ExtensionsRendererClient::Get() ->GetProtocolHandlerSecurityLevel(); @@ -1585,8 +1584,10 @@ #endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE) } -bool ChromeContentRendererClient::IsSafeRedirectTarget(const GURL& upstream_url, - const GURL& target_url) { +bool ChromeContentRendererClient::IsSafeRedirectTarget( + const GURL& upstream_url, + const GURL& target_url, + const std::optional<url::Origin>& request_initiator) { #if BUILDFLAG(ENABLE_EXTENSIONS_CORE) if (target_url.SchemeIs(extensions::kExtensionScheme)) { const extensions::Extension* extension = @@ -1595,10 +1596,8 @@ if (!extension) { return false; } - // TODO(solomonkinard): Use initiator_origin and add tests. if (extensions::WebAccessibleResourcesInfo::IsResourceWebAccessibleRedirect( - extension, target_url, /*initiator_origin=*/std::nullopt, - upstream_url)) { + extension, target_url, request_initiator, upstream_url)) { return true; } return extension->guid() == upstream_url.host();
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h index d0980b2..ea0553c 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h
@@ -221,7 +221,10 @@ blink::URLLoaderThrottleProviderType provider_type) override; blink::WebFrame* FindFrame(blink::WebLocalFrame* relative_to_frame, const std::string& name) override; - bool IsSafeRedirectTarget(const GURL& from_url, const GURL& to_url) override; + bool IsSafeRedirectTarget( + const GURL& from_url, + const GURL& to_url, + const std::optional<url::Origin>& request_initiator) override; void DidSetUserAgent(const std::string& user_agent) override; void AppendContentSecurityPolicy( const blink::WebURL& url,
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 2732274..37dff34 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -3820,8 +3820,10 @@ } if (is_win || is_mac || is_linux) { - sources += - [ "../browser/supervised_user/kids_profile_interactive_uitest.cc" ] + sources += [ + "../browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle_browsertest.cc", + "../browser/supervised_user/kids_profile_interactive_uitest.cc", + ] } if (is_win || is_mac || is_linux || is_chromeos) { @@ -7416,7 +7418,6 @@ deps += [ "//chrome/browser/platform_experience:unit_tests", - "//chrome/browser/platform_experience/installer:unit_tests", "//chrome/browser/win/installer_downloader:unit_tests", ] } @@ -9929,7 +9930,6 @@ "../browser/enterprise/connectors/device_trust/attestation/browser/profile_attester_unittest.cc", "../browser/enterprise/connectors/device_trust/browser/signing_key_policy_observer.cc", "../browser/enterprise/core/dependency_factory_impl_unittest.cc", - "../browser/enterprise/profile_management/oidc_auth_response_capture_navigation_throttle_unittest.cc", "../browser/enterprise/profile_management/profile_management_navigation_throttle_unittest.cc", "../browser/enterprise/profile_management/saml_response_parser_unittest.cc", "../browser/enterprise/remote_commands/rotate_attestation_credential_job_unittest.cc",
diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn index 000aaa52c..4b3c8437 100644 --- a/chrome/test/android/BUILD.gn +++ b/chrome/test/android/BUILD.gn
@@ -334,6 +334,7 @@ "//components/browsing_data/core:java", "//components/collaboration/public:core_java", "//components/embedder_support/android:util_java", + "//components/infobars/android:java", "//components/messages/android:java", "//components/messages/android/internal:java", "//components/messages/android/test:test_support_java",
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/BaseCtaTransitTestRule.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/BaseCtaTransitTestRule.java index 42781ea9..e3ff44b 100644 --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/BaseCtaTransitTestRule.java +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/BaseCtaTransitTestRule.java
@@ -12,18 +12,21 @@ import org.chromium.base.test.transit.TripBuilder; import org.chromium.build.annotations.NullMarked; import org.chromium.chrome.browser.ChromeTabbedActivity; +import org.chromium.chrome.browser.infobar.InfoBarContainer; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabLaunchType; import org.chromium.chrome.browser.ui.appmenu.AppMenuCoordinator; import org.chromium.chrome.test.ChromeTabbedActivityTestRule; import org.chromium.chrome.test.util.ChromeApplicationTestUtils; +import org.chromium.components.infobars.InfoBar; import org.chromium.content_public.browser.WebContents; import org.chromium.net.test.EmbeddedTestServer; import org.chromium.net.test.EmbeddedTestServerRule; import org.chromium.ui.KeyboardVisibilityDelegate; import org.chromium.url.GURL; +import java.util.List; import java.util.concurrent.TimeoutException; /** Base class for integration tests that start {@link ChromeTabbedActivity}. */ @@ -158,7 +161,12 @@ mActivityTestRule.waitForActivityCompletelyLoaded(); } - // TODO(crbug.com/406324209): Support recreate() in Public Transit. + // TODO(crbug.com/406324209): Support finishActivity() in Public Transit. + public void finishActivity() { + mActivityTestRule.finishActivity(); + } + + // TODO(crbug.com/406324209): Support recreateActivity() in Public Transit. public void recreateActivity() { mActivityTestRule.recreateActivity(); } @@ -198,4 +206,14 @@ } }); } + + // TODO(crbug.com/406324209): Cleanup infobars or support them in Public Transit. + public List<InfoBar> getInfoBars() { + return mActivityTestRule.getInfoBars(); + } + + // TODO(crbug.com/406324209): Cleanup infobars or support them in Public Transit. + public InfoBarContainer getInfoBarContainer() { + return mActivityTestRule.getInfoBarContainer(); + } }
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/ChromeTabbedActivityEntryPoints.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/ChromeTabbedActivityEntryPoints.java index ff6ad6c5..a0723402 100644 --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/ChromeTabbedActivityEntryPoints.java +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/ChromeTabbedActivityEntryPoints.java
@@ -37,12 +37,7 @@ /** Start the ChromeTabbedActivity in a web page at the given |url|. */ public static WebPageStation startOnUrl(ChromeTabbedActivityTestRule ctaTestRule, String url) { - disableFirstRunFlow(); - - EntryPointSentinelStation sentinel = new EntryPointSentinelStation(); - sentinel.setAsEntryPoint(); - - return sentinel.runTo(() -> ctaTestRule.startMainActivityWithURL(url)) + return startOnUrlTo(ctaTestRule, url) .arriveAt( WebPageStation.newBuilder() .withEntryPoint() @@ -50,6 +45,17 @@ .build()); } + /** Start the ChromeTabbedActivity with the given |url|. */ + @CheckReturnValue + public static TripBuilder startOnUrlTo(ChromeTabbedActivityTestRule ctaTestRule, String url) { + disableFirstRunFlow(); + + EntryPointSentinelStation sentinel = new EntryPointSentinelStation(); + sentinel.setAsEntryPoint(); + + return sentinel.runTo(() -> ctaTestRule.startMainActivityWithURL(url)); + } + /** Start the ChromeTabbedActivity in an NTP as if it was started from the launcher. */ public static RegularNewTabPageStation startFromLauncherAtNtp( ChromeTabbedActivityTestRule ctaTestRule) {
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/FreshCtaTransitTestRule.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/FreshCtaTransitTestRule.java index 50822a8..619d179 100644 --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/FreshCtaTransitTestRule.java +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/transit/FreshCtaTransitTestRule.java
@@ -51,7 +51,7 @@ } /** - * Start the test in a web page served by the test server. + * Start the test with a url that leads to a web page. * * @param url the URL of the page to load * @return the active entry {@link PageStation} @@ -61,6 +61,17 @@ } /** + * Start the test with a url. + * + * @param url the URL of the page to load + * @return a {@link TripBuilder} to complete the transition. + */ + @CheckReturnValue + public TripBuilder startOnUrlTo(String url) { + return ChromeTabbedActivityEntryPoints.startOnUrlTo(mActivityTestRule, url); + } + + /** * Start the test in a web page served by the test server. * * @param relativeUrl the relative URL of the page to serve and load
diff --git a/chrome/test/data/extensions/web_accessible_resources/dnr/redirect_with_initiator/manifest.json b/chrome/test/data/extensions/web_accessible_resources/dnr/redirect_with_initiator/manifest.json new file mode 100644 index 0000000..8f82463 --- /dev/null +++ b/chrome/test/data/extensions/web_accessible_resources/dnr/redirect_with_initiator/manifest.json
@@ -0,0 +1,22 @@ +{ + "name": "DNR redirect extension to WAR with an initiator condition", + "version": "0.1", + "manifest_version": 3, + "permissions": ["declarativeNetRequest"], + "host_permissions": ["<all_urls>"], + "web_accessible_resources": [ + { + "resources": ["war.js"], + "matches": ["<all_urls>"] + } + ], + "declarative_net_request": { + "rule_resources": [ + { + "id": "ruleset_1", + "path": "rules_1.json", + "enabled": true + } + ] + } +}
diff --git a/chrome/test/data/extensions/web_accessible_resources/dnr/redirect_with_initiator/rules_1.json b/chrome/test/data/extensions/web_accessible_resources/dnr/redirect_with_initiator/rules_1.json new file mode 100644 index 0000000..7b1ca53 --- /dev/null +++ b/chrome/test/data/extensions/web_accessible_resources/dnr/redirect_with_initiator/rules_1.json
@@ -0,0 +1,17 @@ +[ + { + "action": { + "redirect": { + "extensionPath": "/war.js" + }, + "type": "redirect" + }, + "condition": { + "regexFilter": ".*/english_page.html", + "initiatorDomains": [ + "example.com" + ] + }, + "id": 1 + } +]
diff --git a/chrome/test/data/extensions/web_accessible_resources/dnr/redirect_with_initiator/war.js b/chrome/test/data/extensions/web_accessible_resources/dnr/redirect_with_initiator/war.js new file mode 100644 index 0000000..3fa69242f --- /dev/null +++ b/chrome/test/data/extensions/web_accessible_resources/dnr/redirect_with_initiator/war.js
@@ -0,0 +1,5 @@ +// 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. + +// Redirect with initiator's web accessible resource!
diff --git a/chrome/test/data/webui/chromeos/settings/device_page/power_test.ts b/chrome/test/data/webui/chromeos/settings/device_page/power_test.ts index 78299ba5..2284680 100644 --- a/chrome/test/data/webui/chromeos/settings/device_page/power_test.ts +++ b/chrome/test/data/webui/chromeos/settings/device_page/power_test.ts
@@ -5,8 +5,9 @@ import 'chrome://os-settings/lazy_load.js'; import type {SettingsPowerElement} from 'chrome://os-settings/lazy_load.js'; -import type {PowerSource, SettingsToggleButtonElement} from 'chrome://os-settings/os_settings.js'; +import type {BatteryStatus, PowerSource, SettingsToggleButtonElement, SettingsToggleV2Element} from 'chrome://os-settings/os_settings.js'; import {DevicePageBrowserProxyImpl, IdleBehavior, LidClosedBehavior, Router, routes, settingMojom} from 'chrome://os-settings/os_settings.js'; +import type {CrButtonElement} from 'chrome://resources/ash/common/cr_elements/cr_button/cr_button.js'; import {webUIListenerCallback} from 'chrome://resources/js/cr.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; @@ -120,6 +121,7 @@ // Adaptive charging setting should be shown. loadTimeData.overrideValues({ isAdaptiveChargingSupported: true, + isBatteryChargeLimitAvailable: false, }); browserProxy = new TestDevicePageBrowserProxy(); @@ -593,4 +595,220 @@ assertFalse(isVisible(lidClosedToggle)); }); }); + + suite('Optimized Charging', () => { + function queryOptimizedChargingRow(): HTMLElement|null { + return powerSubpage.shadowRoot!.querySelector<HTMLElement>( + '#optimizedChargingSettingsRow'); + } + + function queryOptimizedChargingChangeButton(): CrButtonElement|null { + return powerSubpage.shadowRoot!.querySelector<CrButtonElement>( + '#optimizedChargingChangeButton'); + } + + function queryOptimizedChargingToggle(): SettingsToggleV2Element|null { + return powerSubpage.shadowRoot!.querySelector<SettingsToggleV2Element>( + '#optimizedChargingToggle'); + } + + function queryOptimizedChargingSublabelSpan(): HTMLElement|null { + return powerSubpage.shadowRoot!.querySelector<HTMLElement>( + '#optimizedChargingSublabel .sub-label-text'); + } + + async function initTestState( + batteryStatus: BatteryStatus|undefined, + featureEnabled: boolean): Promise<void> { + loadTimeData.overrideValues({ + isBatteryChargeLimitAvailable: featureEnabled, + }); + // Re-initialize the subpage with the new loadTimeData. + await initSubpage(); + + webUIListenerCallback('battery-status-changed', batteryStatus); + await flushTasks(); + } + + setup(async () => { + // Simulate battery presence for relevant tests. + const batteryStatus: BatteryStatus = { + present: true, + charging: false, + calculating: false, + percent: 50, + statusText: '5 hours left', + }; + webUIListenerCallback('battery-status-changed', batteryStatus); + await flushTasks(); + }); + + test( + 'Optimized Charging has correct sublabel for enabled adaptive charging', + async () => { + // Setup test with adaptive charging being supported. + loadTimeData.overrideValues({ + isAdaptiveChargingEnabled: true, + isBatteryChargeLimitAvailable: true, + }); + await initSubpage(); + + // Case 1: Adaptive Charging is enabled. + sendPowerManagementSettings({ + adaptiveCharging: true, + }); + + const sublabelSpan = queryOptimizedChargingSublabelSpan(); + assertTrue(!!sublabelSpan); + + assertEquals( + powerSubpage.i18n('powerAdaptiveChargingLabel'), + sublabelSpan.textContent!.trim()); + }); + + test( + 'Optimized Charging has correct sublabel for disabled adaptive charging', + async () => { + // Setup test with adaptive charging being supported. + loadTimeData.overrideValues({ + isAdaptiveChargingEnabled: true, + isBatteryChargeLimitAvailable: true, + }); + await initSubpage(); + + // Case 2: Adaptive Charging is not enabled. + sendPowerManagementSettings({ + adaptiveCharging: false, + }); + + const sublabelSpan = queryOptimizedChargingSublabelSpan(); + assertTrue(!!sublabelSpan); + + assertEquals('', sublabelSpan.textContent!.trim()); + }); + + test( + 'Optimized Charging is visible with undefined battery status, and feature enabled.', + async () => { + // Case 1: batteryStatus is undefined + await initTestState(undefined, /*featureEnabled=*/ true); + assertTrue(isVisible(queryOptimizedChargingRow())); + }); + + test( + 'Optimized Charging is hidden with undefined battery status, and feature disabled.', + async () => { + await initTestState(undefined, /*featureEnabled=*/ false); + assertFalse(isVisible(queryOptimizedChargingRow())); + }); + + test( + 'Optimized Charging is visible with a battery present, and feature enabled.', + async () => { + // Case 2: batteryStatus.present = true + const mockBatteryStatus: BatteryStatus = { + present: true, + charging: false, + calculating: false, + percent: 50, + statusText: 'stub', + }; + + await initTestState(mockBatteryStatus, /*featureEnabled=*/ true); + assertTrue(isVisible(queryOptimizedChargingRow())); + }); + + test( + 'Optimized Charging is hidden with a battery present, and feature disabled.', + async () => { + // Case 2: batteryStatus.present = true + const mockBatteryStatus: BatteryStatus = { + present: true, + charging: false, + calculating: false, + percent: 50, + statusText: 'stub', + }; + + await initTestState(mockBatteryStatus, /*featureEnabled=*/ false); + assertFalse(isVisible(queryOptimizedChargingRow())); + }); + + test( + 'Optimized Charging is visible without a battery present, and feature enabled.', + async () => { + // Case 3: batteryStatus.present = false + // (This can happen when there is no battery, and a low power adapter + // is plugged in, and it is discharging). + const mockBatteryStatus: BatteryStatus = { + present: false, + charging: false, + calculating: false, + percent: 50, + statusText: 'stub', + }; + + await initTestState(mockBatteryStatus, /*featureEnabled=*/ true); + assertTrue(isVisible(queryOptimizedChargingRow())); + }); + + test( + 'Optimized Charging is hidden without a battery present, and feature disabled.', + async () => { + // Case 3: batteryStatus.present = false + const mockBatteryStatus = { + present: false, + charging: false, + calculating: false, + percent: 50, + statusText: 'stub', + }; + + await initTestState(mockBatteryStatus, /*featureEnabled=*/ false); + assertFalse(isVisible(queryOptimizedChargingRow())); + }); + + test('Optimized charging is deep-linkable.', async () => { + loadTimeData.overrideValues({ + isAdaptiveChargingEnabled: true, + isBatteryChargeLimitAvailable: true, + }); + await initSubpage(); + + await deepLinkToSetting(settingMojom.Setting.kOptimizedCharging); + const optimizedChargingToggle = queryOptimizedChargingToggle(); + assertTrue(!!optimizedChargingToggle); + await assertElementIsDeepLinked(optimizedChargingToggle); + }); + + test('Charge limit is deep-linkable.', async () => { + loadTimeData.overrideValues({ + isAdaptiveChargingEnabled: true, + isBatteryChargeLimitAvailable: true, + }); + await initSubpage(); + + await deepLinkToSetting(settingMojom.Setting.kChargeLimit); + const optimizedChargingChangeButton = + queryOptimizedChargingChangeButton(); + assertTrue(!!optimizedChargingChangeButton); + await assertElementIsDeepLinked(optimizedChargingChangeButton); + }); + + test( + 'Adaptive charging is deep-linkable in optimized charging row.', + async () => { + loadTimeData.overrideValues({ + isAdaptiveChargingEnabled: true, + isBatteryChargeLimitAvailable: true, + }); + await initSubpage(); + + await deepLinkToSetting(settingMojom.Setting.kAdaptiveCharging); + const optimizedChargingChangeButton = + queryOptimizedChargingChangeButton(); + assertTrue(!!optimizedChargingChangeButton); + await assertElementIsDeepLinked(optimizedChargingChangeButton); + }); + }); });
diff --git a/clank b/clank index 9575ec2..ab8337c1 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit 9575ec20acd995d287a76f267d7061b873a945b5 +Subproject commit ab8337c1d26c83a5aba7c077cf2ea5cfef94b8a5
diff --git a/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc b/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc index 5b24b8a..2fbe234 100644 --- a/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc +++ b/components/autofill/core/browser/foundations/browser_autofill_manager_unittest.cc
@@ -854,7 +854,6 @@ static std::unique_ptr<MockTouchToFillDelegate> Create( BrowserAutofillManager* manager) { auto delegate = std::make_unique<NiceMock<MockTouchToFillDelegate>>(); - ON_CALL(*delegate, GetManager()).WillByDefault(Return(manager)); ON_CALL(*delegate, IsShowingTouchToFill()).WillByDefault(Return(false)); return delegate; } @@ -864,7 +863,6 @@ MockTouchToFillDelegate& operator=(const MockTouchToFillDelegate&) = delete; ~MockTouchToFillDelegate() override = default; - MOCK_METHOD(BrowserAutofillManager*, GetManager, (), (override)); MOCK_METHOD(bool, IntendsToShowTouchToFill, (FormGlobalId, FieldGlobalId),
diff --git a/components/autofill/core/browser/integrators/touch_to_fill/touch_to_fill_delegate.h b/components/autofill/core/browser/integrators/touch_to_fill/touch_to_fill_delegate.h index c684621..40e3b17 100644 --- a/components/autofill/core/browser/integrators/touch_to_fill/touch_to_fill_delegate.h +++ b/components/autofill/core/browser/integrators/touch_to_fill/touch_to_fill_delegate.h
@@ -16,7 +16,6 @@ namespace autofill { -class AutofillManager; class FormStructure; // An interface for interaction with the bottom sheet UI controller, which is @@ -26,8 +25,6 @@ public: virtual ~TouchToFillDelegate() = default; - virtual AutofillManager* GetManager() = 0; - virtual bool IntendsToShowTouchToFill(FormGlobalId form_id, FieldGlobalId field_id) = 0;
diff --git a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogViewBinder.java b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogViewBinder.java index 6cd54bf..b4e6ea6 100644 --- a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogViewBinder.java +++ b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogViewBinder.java
@@ -239,7 +239,6 @@ * and default buttons are present, and we should tolerate some above assertions. */ private static boolean canChangeCustomViewOrButtons(PropertyModel model) { - return model.containsKey(ModalDialogProperties.CHANGE_CUSTOM_VIEW_OR_BUTTONS) - && model.get(ModalDialogProperties.CHANGE_CUSTOM_VIEW_OR_BUTTONS); + return model.containsKeyEqualTo(ModalDialogProperties.CHANGE_CUSTOM_VIEW_OR_BUTTONS, true); } }
diff --git a/components/browser_ui/styles/android/java/res/color-night/drag_handlebar_color_list.xml b/components/browser_ui/styles/android/java/res/color-night/drag_handlebar_color_list.xml index 126a8e8..ed3feb3 100644 --- a/components/browser_ui/styles/android/java/res/color-night/drag_handlebar_color_list.xml +++ b/components/browser_ui/styles/android/java/res/color-night/drag_handlebar_color_list.xml
@@ -5,8 +5,6 @@ found in the LICENSE file. --> -<!-- LINT.IfChange --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="?attr/colorOutlineVariant"/> -</selector> -<!-- LINT.ThenChange(//ui/android/java/res/values-night/colors.xml:drag_handlebar_color_baseline) --> \ No newline at end of file +</selector> \ No newline at end of file
diff --git a/components/browser_ui/styles/android/java/res/color/drag_handlebar_color_list.xml b/components/browser_ui/styles/android/java/res/color/drag_handlebar_color_list.xml index 1d728900..260b35e 100644 --- a/components/browser_ui/styles/android/java/res/color/drag_handlebar_color_list.xml +++ b/components/browser_ui/styles/android/java/res/color/drag_handlebar_color_list.xml
@@ -5,8 +5,6 @@ found in the LICENSE file. --> -<!-- LINT.IfChange --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="?attr/colorSurfaceContainerHighest"/> -</selector> -<!-- LINT.ThenChange(//ui/android/java/res/values/semantic_colors_adaptive.xml:drag_handlebar_color_baseline) --> \ No newline at end of file +</selector> \ No newline at end of file
diff --git a/components/browser_ui/styles/android/java/src/org/chromium/components/browser_ui/styles/ChromeColors.java b/components/browser_ui/styles/android/java/src/org/chromium/components/browser_ui/styles/ChromeColors.java index b0e98c1..ed2926e6 100644 --- a/components/browser_ui/styles/android/java/src/org/chromium/components/browser_ui/styles/ChromeColors.java +++ b/components/browser_ui/styles/android/java/src/org/chromium/components/browser_ui/styles/ChromeColors.java
@@ -174,18 +174,6 @@ return elevationOverlayProvider.compositeOverlayWithThemeSurfaceColorIfNeeded(elevation); } - /** - * Returns the drag handlebar color. - * - * @param context The {@link Context} used to retrieve attrs, colors, and dimens. - * @return the {@link ColorInt} for the drag handle bar. - * @deprecated Use {@link SemanticColorUtils#getDragHandlebarColor(Context)} - */ - @Deprecated - public static @ColorInt int getDragHandleBarColor(Context context) { - return SemanticColorUtils.getDragHandlebarColor(context); - } - /** {@return The {@link ColorInt} keyboard focus ring color} */ public static @ColorInt int getKeyboardFocusRingColor(Context context, boolean isIncognito) { return isIncognito
diff --git a/components/browser_ui/widget/android/BUILD.gn b/components/browser_ui/widget/android/BUILD.gn index 28defbf..b351cc3 100644 --- a/components/browser_ui/widget/android/BUILD.gn +++ b/components/browser_ui/widget/android/BUILD.gn
@@ -251,6 +251,7 @@ "java/res/drawable/ic_settings_gear_24dp.xml", "java/res/drawable/incognito_card_bg.xml", "java/res/drawable/list_item_icon_modern_bg.xml", + "java/res/drawable/list_item_rounded_background_selector.xml", "java/res/drawable/menu_bg_tinted.xml", "java/res/drawable/menu_bg_tinted_on_dark_bg.xml", "java/res/drawable/modern_toolbar_tablet_text_box_background.xml",
diff --git a/components/browser_ui/widget/android/java/res/drawable/list_item_rounded_background_selector.xml b/components/browser_ui/widget/android/java/res/drawable/list_item_rounded_background_selector.xml new file mode 100644 index 0000000..c3797ae8 --- /dev/null +++ b/components/browser_ui/widget/android/java/res/drawable/list_item_rounded_background_selector.xml
@@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +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. +--> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- Shared base background --> + <item> + <shape android:shape="rectangle"> + <solid android:color="@macro/default_bg_color"/> + </shape> + </item> + + <item> + <selector> + <item android:state_hovered="true"> + <shape android:shape="rectangle"> + <solid android:color="@color/color_on_surface_with_alpha_8"/> + <corners android:radius="@dimen/default_rounded_corner_radius"/> + </shape> + </item> + </selector> + </item> +</layer-list> \ No newline at end of file
diff --git a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/contextmenu/ContextMenuParams.java b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/contextmenu/ContextMenuParams.java index 5a0dff20c..12a57bf 100644 --- a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/contextmenu/ContextMenuParams.java +++ b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/contextmenu/ContextMenuParams.java
@@ -51,6 +51,7 @@ private final int mInterestForNodeID; private final @Nullable AdditionalNavigationParams mAdditionalNavigationParams; + private final MenuModelBridge mMenuModelBridge; @CalledByNative private long getNativePointer() { @@ -191,6 +192,11 @@ return mAdditionalNavigationParams; } + /** Returns the {@link MenuModelBridge} associated with this context menu. */ + public MenuModelBridge getMenuModelBridge() { + return mMenuModelBridge; + } + @VisibleForTesting public ContextMenuParams( long nativePtr, @@ -212,6 +218,7 @@ int interestForNodeID, @Nullable AdditionalNavigationParams additionalNavigationParams) { mNativePtr = nativePtr; + mMenuModelBridge = menuModelBridge; mPageUrl = pageUrl; mLinkUrl = linkUrl; mLinkText = linkText;
diff --git a/components/embedder_support/user_agent_utils.cc b/components/embedder_support/user_agent_utils.cc index 98104fa..2b5ce78 100644 --- a/components/embedder_support/user_agent_utils.cc +++ b/components/embedder_support/user_agent_utils.cc
@@ -47,7 +47,7 @@ #include "base/mac/mac_util.h" #endif -#if BUILDFLAG(IS_IOS) +#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_ANDROID) #include "ui/base/device_form_factor.h" #endif @@ -333,7 +333,14 @@ } std::string GetUnifiedPlatform() { +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) + // This constant is only used on Android (desktop) and Linux. + constexpr char kUnifiedPlatformLinuxX64[] = "X11; Linux x86_64"; +#endif #if BUILDFLAG(IS_ANDROID) + if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_DESKTOP) { + return kUnifiedPlatformLinuxX64; + } return "Linux; Android 10; K"; #elif BUILDFLAG(IS_CHROMEOS) return "X11; CrOS x86_64 14541.0.0"; @@ -344,7 +351,7 @@ #elif BUILDFLAG(IS_FUCHSIA) return "Fuchsia"; #elif BUILDFLAG(IS_LINUX) - return "X11; Linux x86_64"; + return kUnifiedPlatformLinuxX64; #elif BUILDFLAG(IS_IOS) if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET) { return "iPad; CPU iPad OS 14_0 like Mac OS X"; @@ -586,7 +593,55 @@ output_version_type); } +bool GetMobileBitForUAMetadata() { + // The mobile bit for UA-CH is true if the platform is iOS, or if it's + // Android and not a desktop form factor, AND the kUseMobileUserAgent switch + // is present. +#if BUILDFLAG(IS_ANDROID) + if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_DESKTOP) { + return false; + } +#endif + +#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) + return base::CommandLine::ForCurrentProcess()->HasSwitch(kUseMobileUserAgent); +#else + return false; +#endif +} + +std::string GetPlatformVersion() { +#if BUILDFLAG(IS_LINUX) + // TODO(crbug.com/40245146): Remove this Blink feature + if (base::FeatureList::IsEnabled( + blink::features::kReduceUserAgentDataLinuxPlatformVersion)) { + return std::string(); + } +#endif + +#if BUILDFLAG(IS_ANDROID) + if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_DESKTOP) { + return std::string(); + } +#endif + +#if BUILDFLAG(IS_WIN) + return GetWindowsPlatformVersion(); +#else + + int32_t major, minor, bugfix = 0; + base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); + return base::StringPrintf("%d.%d.%d", major, minor, bugfix); +#endif +} + std::string GetPlatformForUAMetadata() { +#if BUILDFLAG(IS_ANDROID) + if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_DESKTOP) { + return "Linux"; + } +#endif + #if BUILDFLAG(IS_MAC) // TODO(crbug.com/40704421): This can be removed/re-refactored once we use // "macOS" by default @@ -616,11 +671,7 @@ // Low entropy client hints. metadata.brand_version_list = GetUserAgentBrandMajorVersionListInternal(std::nullopt); - metadata.mobile = false; -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) - metadata.mobile = - base::CommandLine::ForCurrentProcess()->HasSwitch(kUseMobileUserAgent); -#endif + metadata.mobile = GetMobileBitForUAMetadata(); metadata.platform = GetPlatformForUAMetadata(); // For users providing a valid user-agent override via the command line: @@ -649,24 +700,7 @@ metadata.form_factors = GetFormFactorsClientHint(metadata, metadata.mobile); metadata.bitness = GetCpuBitness(); metadata.wow64 = IsWoW64(); - -#if BUILDFLAG(IS_WIN) - metadata.platform_version = GetWindowsPlatformVersion(); -#else - int32_t major, minor, bugfix = 0; - base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); - metadata.platform_version = - base::StringPrintf("%d.%d.%d", major, minor, bugfix); -#endif - -#if BUILDFLAG(IS_LINUX) - // TODO(crbug.com/40245146): Remove this Blink feature - if (base::FeatureList::IsEnabled( - blink::features::kReduceUserAgentDataLinuxPlatformVersion)) { - metadata.platform_version = std::string(); - } -#endif - + metadata.platform_version = GetPlatformVersion(); return metadata; } @@ -746,6 +780,9 @@ #elif BUILDFLAG(IS_IOS) return "arm"; #elif BUILDFLAG(IS_ANDROID) + if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_DESKTOP) { + return "x86"; + } return std::string(); #elif BUILDFLAG(IS_POSIX) std::string cpu_info = BuildCpuInfo(); @@ -782,6 +819,9 @@ #elif BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FUCHSIA) return "64"; #elif BUILDFLAG(IS_ANDROID) + if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_DESKTOP) { + return "64"; + } return std::string(); #elif BUILDFLAG(IS_POSIX) return base::Contains(BuildCpuInfo(), "64") ? "64" : "32"; @@ -849,15 +889,20 @@ } std::string BuildModelInfo() { - std::string model; #if BUILDFLAG(IS_ANDROID) + // Model information is not exposed on Android desktop. + if (ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_DESKTOP) { + return std::string(); + } + // Only send the model information if on the release build of Android, // matching user agent behaviour. if (base::SysInfo::GetAndroidBuildCodename() == "REL") { - model = base::SysInfo::HardwareModelName(); + return base::SysInfo::HardwareModelName(); } #endif - return model; + + return std::string(); } #if BUILDFLAG(IS_ANDROID)
diff --git a/components/navigation_interception/intercept_navigation_delegate.cc b/components/navigation_interception/intercept_navigation_delegate.cc index 4ecedcb..5eac5f0 100644 --- a/components/navigation_interception/intercept_navigation_delegate.cc +++ b/components/navigation_interception/intercept_navigation_delegate.cc
@@ -84,7 +84,8 @@ net::RedirectInfo::ComputeRedirectInfo( request_.method, request_.url, request_.site_for_cookies, first_party_url_policy, request_.referrer_policy, - request_.referrer.spec(), response_code, *url, std::nullopt, + request_.referrer.spec(), request_.request_initiator, response_code, + *url, std::nullopt, /*insecure_scheme_was_upgraded=*/false, /*copy_fragment=*/false), std::move(response_head));
diff --git a/components/optimization_guide/proto/features/actions_data.proto b/components/optimization_guide/proto/features/actions_data.proto index 75d69ed..408753d 100644 --- a/components/optimization_guide/proto/features/actions_data.proto +++ b/components/optimization_guide/proto/features/actions_data.proto
@@ -241,9 +241,15 @@ message YieldToUserAction { } +// Attempts to log in to the website. +// Next ID: 2 +message AttemptLoginAction { + int32 tab_id = 1 [features = { field_presence: EXPLICIT }]; +} + // All of the actions that can be taken. // Only one of these is allowed per action. -// Next ID: 18 +// Next ID: 19 message Action { oneof action { ClickAction click = 1; @@ -279,6 +285,8 @@ ActivateWindowAction activate_window = 16; YieldToUserAction yield_to_user = 17; + + AttemptLoginAction attempt_login = 18; } }
diff --git a/components/optimization_guide/proto/features/bling_prototyping.proto b/components/optimization_guide/proto/features/bling_prototyping.proto index d743dd39..d617f2c3a 100644 --- a/components/optimization_guide/proto/features/bling_prototyping.proto +++ b/components/optimization_guide/proto/features/bling_prototyping.proto
@@ -51,8 +51,6 @@ MODEL_ENUM_EVERGREEN_GEMINI_V2 = 1; - MODEL_ENUM_SUP_GEMINI_V2 = 2; - MODEL_ENUM_EVERGREEN_GEMINI_V2_MULTI_MODAL = 3; MODEL_ENUM_EVERGREEN_GEMINI_V2_MULTI_MODAL_MPP = 4; @@ -62,6 +60,8 @@ MODEL_ENUM_EVERGREEN_GEMINI_NANO_V2_MULTI_MODAL = 6; MODEL_ENUM_EVERGREEN_GEMINI_V3_XS = 7; + + reserved 2; } reserved 1;
diff --git a/components/optimization_guide/proto/features/model_prototyping.proto b/components/optimization_guide/proto/features/model_prototyping.proto index cef2b810..aa52558 100644 --- a/components/optimization_guide/proto/features/model_prototyping.proto +++ b/components/optimization_guide/proto/features/model_prototyping.proto
@@ -92,8 +92,6 @@ MODEL_ENUM_EVERGREEN_GEMINI_V2 = 1; - MODEL_ENUM_SUP_GEMINI_V2 = 2; - MODEL_ENUM_EVERGREEN_GEMINI_V2_MULTI_MODAL = 3; MODEL_ENUM_EVERGREEN_GEMINI_V2_MULTI_MODAL_MPP = 4; @@ -103,6 +101,8 @@ MODEL_ENUM_EVERGREEN_GEMINI_NANO_V2_MULTI_MODAL = 6; MODEL_ENUM_EVERGREEN_GEMINI_V3_XS = 7; + + reserved 2; } } }
diff --git a/components/safe_browsing/content/browser/client_side_detection_host.h b/components/safe_browsing/content/browser/client_side_detection_host.h index c03f6ac..bc3ee5f 100644 --- a/components/safe_browsing/content/browser/client_side_detection_host.h +++ b/components/safe_browsing/content/browser/client_side_detection_host.h
@@ -104,12 +104,43 @@ // object is responsible for all interactions with the on-device model. class IntelligentScanDelegate : public KeyedService { public: + // Represents the result of an intelligent scan. + struct IntelligentScanResult { + std::string brand; + std::string intent; + }; + using InquireOnDeviceModelDoneCallback = + base::OnceCallback<void(std::optional<IntelligentScanResult>)>; + ~IntelligentScanDelegate() override = default; // Determines if an intelligent scan should be requested based on the // verdict. virtual bool ShouldRequestIntelligentScan( ClientPhishingRequest* verdict) = 0; + // Returns |on_device_model_available_| which indicates the availability of + // on-device model session creation. Also logs failed eligibility reason + // histograms if |log_failed_eligibility_reason| is true. + virtual bool IsOnDeviceModelAvailable( + bool log_failed_eligibility_reason) = 0; + // Gets the intelligent scan result from the on-device model. The callback + // will return an empty optional if the on-device model is not available. + virtual void InquireOnDeviceModel( + std::string rendered_texts, + InquireOnDeviceModelDoneCallback callback) = 0; + // Resets the session that's created by the on-device model. Does nothing if + // there is no session. |inquiry_complete| indicates whether the inquiry is + // complete. + virtual void ResetOnDeviceSession(bool inquiry_complete) = 0; + // Starts listening to the on-device model update through OptimizationGuide. + // A check will be made in the delegate to confirm that it's not listening + // for availability before subscribing. This will be called when the user + // preferences change and the user is subscribed to Enhanced Safe Browsing. + virtual void StartListeningToOnDeviceModelUpdate() = 0; + // Stops listening to the on-device model update through OptimizationGuide. + // A check is handled in the delegate if the user is already stopped + // listening for on-device model updates. + virtual void StopListeningToOnDeviceModelUpdate() = 0; }; // The caller keeps ownership of the tab object and is responsible for
diff --git a/components/safe_browsing/content/browser/client_side_detection_service.cc b/components/safe_browsing/content/browser/client_side_detection_service.cc index de710e9..f09a2f1 100644 --- a/components/safe_browsing/content/browser/client_side_detection_service.cc +++ b/components/safe_browsing/content/browser/client_side_detection_service.cc
@@ -156,6 +156,7 @@ void ClientSideDetectionService::Shutdown() { url_loader_factory_.reset(); + // TODO(crbug.com/424104358): Call intelligent scan delegate instead. delegate_->StopListeningToOnDeviceModelUpdate(); delegate_.reset(); enabled_ = false; @@ -188,6 +189,7 @@ kClientSideDetectionBrandAndIntentForScamDetection) || base::FeatureList::IsEnabled( kClientSideDetectionLlamaForcedTriggerInfoForScamDetection)) { + // TODO(crbug.com/424104358): Call intelligent scan delegate instead. delegate_->StartListeningToOnDeviceModelUpdate(); } } else { @@ -216,6 +218,7 @@ } void ClientSideDetectionService::UnsubscribeToModelSubscription() { + // TODO(crbug.com/424104358): Call intelligent scan delegate instead. delegate_->StopListeningToOnDeviceModelUpdate(); on_device_model_available_ = false; // We will check for the model object below because we also call this function
diff --git a/components/saved_tab_groups/internal/android/tab_group_sync_service_android_unittest.cc b/components/saved_tab_groups/internal/android/tab_group_sync_service_android_unittest.cc index 8c7cbbb..cec69d5f 100644 --- a/components/saved_tab_groups/internal/android/tab_group_sync_service_android_unittest.cc +++ b/components/saved_tab_groups/internal/android/tab_group_sync_service_android_unittest.cc
@@ -13,8 +13,8 @@ #include "base/test/task_environment.h" #include "components/saved_tab_groups/public/android/tab_group_sync_conversions_bridge.h" #include "components/saved_tab_groups/public/android/tab_group_sync_conversions_utils.h" -#include "components/saved_tab_groups/public/versioning_message_controller.h" #include "components/saved_tab_groups/test_support/mock_tab_group_sync_service.h" +#include "components/saved_tab_groups/test_support/mock_versioning_message_controller.h" #include "components/saved_tab_groups/test_support/saved_tab_group_test_utils.h" #include "components/sync/test/test_matchers.h" #include "components/tab_groups/tab_group_visual_data.h" @@ -52,21 +52,6 @@ static_cast<int>(arg.position()) == position; } -class MockVersioningMessageController : public VersioningMessageController { - public: - MockVersioningMessageController() = default; - ~MockVersioningMessageController() override = default; - - MOCK_METHOD(bool, IsInitialized, (), (override)); - MOCK_METHOD(bool, ShouldShowMessageUi, (MessageType), (override)); - MOCK_METHOD(void, - ShouldShowMessageUiAsync, - (MessageType, base::OnceCallback<void(bool)>), - (override)); - MOCK_METHOD(void, OnMessageUiShown, (MessageType), (override)); - MOCK_METHOD(void, OnMessageUiDismissed, (MessageType), (override)); -}; - } // namespace class TabGroupSyncServiceAndroidTest : public testing::Test {
diff --git a/components/saved_tab_groups/public/android/java/src/org/chromium/components/tab_group_sync/VersioningMessageController.java b/components/saved_tab_groups/public/android/java/src/org/chromium/components/tab_group_sync/VersioningMessageController.java index ad10906..743d6ce 100644 --- a/components/saved_tab_groups/public/android/java/src/org/chromium/components/tab_group_sync/VersioningMessageController.java +++ b/components/saved_tab_groups/public/android/java/src/org/chromium/components/tab_group_sync/VersioningMessageController.java
@@ -25,8 +25,8 @@ /** * Invoke this method to query if the given message UI should be shown. This should not be - * called if the VersioningMessageController is not initialized. See comments on MessageType for - * when the UI should inform this class about display / dismissed events. + * called if the TabGroupSyncService is not initialized. See comments on MessageType for when + * the UI should inform this class about display / dismissed events. * * @param messageType The {@link MessageType} to query. * @return Whether or not the message UI should be shown. @@ -35,8 +35,8 @@ /** * Same as ShouldShowMessageUi but waits on the initialization before calling the callback. If - * the VersioningMessageController is already initialized, then the callback is called - * synchronously. See comments on MessageType for when the UI should inform this class about + * the TabGroupSyncService is already initialized, then the callback is called synchronously. + * See comments on MessageType for when the UI should inform this class about * display / dismissed events. * * @param messageType The {@link MessageType} to query.
diff --git a/components/saved_tab_groups/public/versioning_message_controller.h b/components/saved_tab_groups/public/versioning_message_controller.h index f1bc604..f44987f0 100644 --- a/components/saved_tab_groups/public/versioning_message_controller.h +++ b/components/saved_tab_groups/public/versioning_message_controller.h
@@ -44,14 +44,14 @@ virtual bool IsInitialized() = 0; // Invoke this method to query if the given message UI should be shown. This - // should not be called if the VersioningMessageController is not initialized. + // should not be called if the TabGroupSyncService is not initialized. // See comments on MessageType for when the UI should inform this class about // display / dismissed events. virtual bool ShouldShowMessageUi(MessageType message_type) = 0; // Same as ShouldShowMessageUi but waits on the initialization before calling - // the callback. If the VersioningMessageController is already initialized, - // then the callback is called synchronously. + // the callback. If the TabGroupSyncService is already initialized, then the + // callback is called synchronously. // See comments on MessageType for when the UI should inform this class about // display / dismissed events. virtual void ShouldShowMessageUiAsync(
diff --git a/components/saved_tab_groups/test_support/BUILD.gn b/components/saved_tab_groups/test_support/BUILD.gn index 68b4529..63b96aa 100644 --- a/components/saved_tab_groups/test_support/BUILD.gn +++ b/components/saved_tab_groups/test_support/BUILD.gn
@@ -25,6 +25,8 @@ "mock_tab_group_sync_delegate.h", "mock_tab_group_sync_service.cc", "mock_tab_group_sync_service.h", + "mock_versioning_message_controller.cc", + "mock_versioning_message_controller.h", "saved_tab_group_test_utils.cc", "saved_tab_group_test_utils.h", ]
diff --git a/components/saved_tab_groups/test_support/mock_versioning_message_controller.cc b/components/saved_tab_groups/test_support/mock_versioning_message_controller.cc new file mode 100644 index 0000000..a6cd4feb --- /dev/null +++ b/components/saved_tab_groups/test_support/mock_versioning_message_controller.cc
@@ -0,0 +1,12 @@ +// 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 "components/saved_tab_groups/test_support/mock_versioning_message_controller.h" + +namespace tab_groups { + +MockVersioningMessageController::MockVersioningMessageController() = default; +MockVersioningMessageController::~MockVersioningMessageController() = default; + +} // namespace tab_groups
diff --git a/components/saved_tab_groups/test_support/mock_versioning_message_controller.h b/components/saved_tab_groups/test_support/mock_versioning_message_controller.h new file mode 100644 index 0000000..13be273 --- /dev/null +++ b/components/saved_tab_groups/test_support/mock_versioning_message_controller.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 COMPONENTS_SAVED_TAB_GROUPS_TEST_SUPPORT_MOCK_VERSIONING_MESSAGE_CONTROLLER_H_ +#define COMPONENTS_SAVED_TAB_GROUPS_TEST_SUPPORT_MOCK_VERSIONING_MESSAGE_CONTROLLER_H_ + +#include "base/functional/callback.h" +#include "components/saved_tab_groups/public/versioning_message_controller.h" +#include "testing/gmock/include/gmock/gmock.h" + +namespace tab_groups { + +class MockVersioningMessageController : public VersioningMessageController { + public: + MockVersioningMessageController(); + ~MockVersioningMessageController() override; + + MOCK_METHOD(bool, IsInitialized, (), (override)); + MOCK_METHOD(bool, ShouldShowMessageUi, (MessageType), (override)); + MOCK_METHOD(void, + ShouldShowMessageUiAsync, + (MessageType, base::OnceCallback<void(bool)>), + (override)); + MOCK_METHOD(void, OnMessageUiShown, (MessageType), (override)); + MOCK_METHOD(void, OnMessageUiDismissed, (MessageType), (override)); +}; + +} // namespace tab_groups + +#endif // COMPONENTS_SAVED_TAB_GROUPS_TEST_SUPPORT_MOCK_VERSIONING_MESSAGE_CONTROLLER_H_
diff --git a/content/browser/bad_message.cc b/content/browser/bad_message.cc index 50c5b5bd..32c1e06 100644 --- a/content/browser/bad_message.cc +++ b/content/browser/bad_message.cc
@@ -11,7 +11,6 @@ #include "base/metrics/histogram_functions.h" #include "base/strings/string_number_conversions.h" #include "base/trace_event/trace_event.h" -#include "content/public/browser/browser_message_filter.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h"
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc index 1e163fa9..fdafcbb 100644 --- a/content/browser/browser_child_process_host_impl.cc +++ b/content/browser/browser_child_process_host_impl.cc
@@ -76,10 +76,6 @@ #include "content/public/common/profiling_utils.h" #endif -#if BUILDFLAG(CONTENT_ENABLE_LEGACY_IPC) -#include "content/public/browser/browser_message_filter.h" -#endif - namespace content { namespace {
diff --git a/content/browser/devtools/devtools_url_loader_interceptor.cc b/content/browser/devtools/devtools_url_loader_interceptor.cc index f243e7ee..6845e6a 100644 --- a/content/browser/devtools/devtools_url_loader_interceptor.cc +++ b/content/browser/devtools/devtools_url_loader_interceptor.cc
@@ -1341,7 +1341,8 @@ net::RedirectInfo::ComputeRedirectInfo( request.method, request.url, request.site_for_cookies, first_party_url_policy, request.referrer_policy, - request.referrer.spec(), headers.response_code(), redirect_url, + request.referrer.spec(), request.request_initiator, + headers.response_code(), redirect_url, net::RedirectUtil::GetReferrerPolicyHeader(&headers), false /* insecure_scheme_was_upgraded */, true /* copy_fragment */));
diff --git a/content/browser/media/midi_host.h b/content/browser/media/midi_host.h index 6d0d614..dec9f15 100644 --- a/content/browser/media/midi_host.h +++ b/content/browser/media/midi_host.h
@@ -17,7 +17,6 @@ #include "base/thread_annotations.h" #include "base/tuple.h" #include "content/common/content_export.h" -#include "content/public/browser/browser_message_filter.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "media/midi/midi_manager.h"
diff --git a/content/browser/navigation_browsertest.cc b/content/browser/navigation_browsertest.cc index c200ab5..fe791d0 100644 --- a/content/browser/navigation_browsertest.cc +++ b/content/browser/navigation_browsertest.cc
@@ -50,7 +50,6 @@ #include "content/common/navigation_client.mojom-forward.h" #include "content/common/navigation_client.mojom.h" #include "content/public/browser/browser_context.h" -#include "content/public/browser/browser_message_filter.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_url_handler.h"
diff --git a/content/browser/renderer_host/agent_scheduling_group_host.cc b/content/browser/renderer_host/agent_scheduling_group_host.cc index a68ac83..b74bf58 100644 --- a/content/browser/renderer_host/agent_scheduling_group_host.cc +++ b/content/browser/renderer_host/agent_scheduling_group_host.cc
@@ -27,10 +27,6 @@ #include "third_party/blink/public/mojom/shared_storage/shared_storage_worklet_service.mojom.h" #include "third_party/blink/public/mojom/worker/worklet_global_scope_creation_params.mojom.h" -#if BUILDFLAG(CONTENT_ENABLE_LEGACY_IPC) -#include "content/public/browser/browser_message_filter.h" -#endif - namespace content { namespace {
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index f58f409..a1a3453 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -284,10 +284,6 @@ #include "content/public/common/profiling_utils.h" #endif -#if BUILDFLAG(CONTENT_ENABLE_LEGACY_IPC) -#include "content/public/browser/browser_message_filter.h" -#endif - // VLOG additional statements in Fuchsia release builds. #if BUILDFLAG(IS_FUCHSIA) #define MAYBEVLOG VLOG
diff --git a/content/browser/service_host/utility_process_sandbox_browsertest.cc b/content/browser/service_host/utility_process_sandbox_browsertest.cc index 48e3d78..4cd6afd 100644 --- a/content/browser/service_host/utility_process_sandbox_browsertest.cc +++ b/content/browser/service_host/utility_process_sandbox_browsertest.cc
@@ -19,7 +19,6 @@ #include "content/public/test/content_browser_test.h" #include "content/public/test/test_service.mojom.h" #include "content/test/sandbox_status.test-mojom.h" -#include "media/gpu/buildflags.h" #include "mojo/public/cpp/bindings/remote.h" #include "sandbox/policy/linux/sandbox_linux.h" #include "sandbox/policy/mojom/sandbox.mojom.h" @@ -30,6 +29,11 @@ #include "chromeos/ash/components/assistant/buildflags.h" #endif // BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#include "media/gpu/buildflags.h" +#include "media/media_buildflags.h" +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + using sandbox::mojom::Sandbox; using sandbox::policy::SandboxLinux; @@ -117,10 +121,14 @@ } case Sandbox::kAudio: -#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) case Sandbox::kHardwareVideoDecoding: +#endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) +#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) case Sandbox::kHardwareVideoEncoding: -#endif +#endif // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS) case Sandbox::kIme: case Sandbox::kTts: @@ -165,7 +173,8 @@ }; IN_PROC_BROWSER_TEST_P(UtilityProcessSandboxBrowserTest, VerifySandboxType) { -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#if BUILDFLAG(IS_LINUX) && (BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) || \ + BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)) if (GetParam() == Sandbox::kHardwareVideoDecoding) { // TODO(b/195769334): On Linux, this test fails with // Sandbox::kHardwareVideoDecoding because the pre-sandbox hook needs Ozone @@ -182,7 +191,8 @@ // need to remove the Ozone dependency and re-enable this test. GTEST_SKIP(); } -#endif +#endif // BUILDFLAG(IS_LINUX) && (BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) || + // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)) RunUtilityProcess(); }
diff --git a/content/browser/service_host/utility_sandbox_delegate.cc b/content/browser/service_host/utility_sandbox_delegate.cc index 68063b1..ff9941f 100644 --- a/content/browser/service_host/utility_sandbox_delegate.cc +++ b/content/browser/service_host/utility_sandbox_delegate.cc
@@ -28,6 +28,11 @@ #include "chromeos/ash/components/assistant/buildflags.h" #endif // BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#include "media/gpu/buildflags.h" +#include "media/media_buildflags.h" +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + #if BUILDFLAG(IS_MAC) #include "base/mac/process_requirement.h" #endif // BUILDFLAG(IS_MAC) @@ -74,10 +79,14 @@ #if BUILDFLAG(IS_FUCHSIA) sandbox_type_ == sandbox::mojom::Sandbox::kVideoCapture || #endif -#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || +#endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) +#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoEncoding || -#endif +#endif // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS) sandbox_type_ == sandbox::mojom::Sandbox::kIme || sandbox_type_ == sandbox::mojom::Sandbox::kTts ||
diff --git a/content/browser/web_package/signed_exchange_utils.cc b/content/browser/web_package/signed_exchange_utils.cc index 4b7d75e..356cd5a 100644 --- a/content/browser/web_package/signed_exchange_utils.cc +++ b/content/browser/web_package/signed_exchange_utils.cc
@@ -208,8 +208,8 @@ outer_request.update_first_party_url_on_redirect ? net::RedirectInfo::FirstPartyURLPolicy::UPDATE_URL_ON_REDIRECT : net::RedirectInfo::FirstPartyURLPolicy::NEVER_CHANGE_URL, - outer_request.referrer_policy, outer_request.referrer.spec(), 303, - new_url, + outer_request.referrer_policy, outer_request.referrer.spec(), + outer_request.request_initiator, 303, new_url, net::RedirectUtil::GetReferrerPolicyHeader(outer_response.headers.get()), false /* insecure_scheme_was_upgraded */, true /* copy_fragment */, is_fallback_redirect);
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn index f0a6a88..88b9691 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn
@@ -27,7 +27,7 @@ "ALLOW_CRITICAL_MEMORY_PRESSURE_HANDLING_IN_FOREGROUND=$allow_critical_memory_pressure_handling_in_foreground", "MBI_MODE_PER_RENDER_PROCESS_HOST=$_mbi_mode_per_render_process_host", "MBI_MODE_PER_SITE_INSTANCE=$_mbi_mode_per_site_instance", - "CONTENT_ENABLE_LEGACY_IPC=$content_enable_legacy_ipc", + "CONTENT_ENABLE_LEGACY_IPC=0", ] }
diff --git a/content/common/features.gni b/content/common/features.gni index 2146d5d..aec3b1c 100644 --- a/content/common/features.gni +++ b/content/common/features.gni
@@ -17,7 +17,4 @@ # Whether or not MBI mode (Multiple Blink Isolates) should be enabled, # depending on the build argument. mbi_mode = is_linux || is_chromeos || is_mac || is_win || is_android - - # We allow legacy IPC to be enabled for Pepper usage. - content_enable_legacy_ipc = false }
diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc index ce9644d..225e017 100644 --- a/content/common/url_schemes.cc +++ b/content/common/url_schemes.cc
@@ -81,6 +81,10 @@ for (auto& scheme : schemes.extension_schemes) blink::CommonSchemeRegistry::RegisterURLSchemeAsExtension(scheme.c_str()); + for (auto& scheme : schemes.isolated_app_schemes) { + blink::CommonSchemeRegistry::RegisterURLSchemeAsIsolatedApp(scheme.c_str()); + } + schemes.no_access_schemes.push_back(kChromeErrorScheme); for (auto& scheme : schemes.no_access_schemes) url::AddNoAccessScheme(scheme.c_str());
diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn index a1bdbce..98777a0 100644 --- a/content/public/browser/BUILD.gn +++ b/content/public/browser/BUILD.gn
@@ -549,13 +549,6 @@ [ "//third_party/webrtc/modules/desktop_capture:pipewire_config" ] } - if (content_enable_legacy_ipc) { - sources += [ - "browser_message_filter.cc", - "browser_message_filter.h", - ] - } - public_deps = [ "//base", "//build:chromecast_buildflags",
diff --git a/content/public/browser/browser_message_filter.cc b/content/public/browser/browser_message_filter.cc deleted file mode 100644 index b30fad12..0000000 --- a/content/public/browser/browser_message_filter.cc +++ /dev/null
@@ -1,190 +0,0 @@ -// 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 "content/public/browser/browser_message_filter.h" - -#include "base/check_op.h" -#include "base/command_line.h" -#include "base/compiler_specific.h" -#include "base/debug/dump_without_crashing.h" -#include "base/functional/bind.h" -#include "base/functional/callback_helpers.h" -#include "base/notreached.h" -#include "base/process/process_handle.h" -#include "base/task/sequenced_task_runner.h" -#include "base/task/task_runner.h" -#include "build/build_config.h" -#include "content/browser/browser_child_process_host_impl.h" -#include "content/browser/child_process_launcher.h" -#include "content/public/browser/browser_thread.h" -#include "content/public/common/content_switches.h" -#include "content/public/common/result_codes.h" -#include "ipc/ipc_sync_message.h" -#include "ipc/message_filter.h" - -using content::BrowserMessageFilter; - -namespace content { - -class BrowserMessageFilter::Internal : public IPC::MessageFilter { - public: - explicit Internal(BrowserMessageFilter* filter) : filter_(filter) {} - - Internal(const Internal&) = delete; - Internal& operator=(const Internal&) = delete; - - private: - ~Internal() override {} - - // IPC::MessageFilter implementation: - void OnFilterAdded(IPC::Channel* channel) override { - filter_->sender_ = channel; - filter_->OnFilterAdded(channel); - } - - void OnFilterRemoved() override { - for (auto& callback : filter_->filter_removed_callbacks_) - std::move(callback).Run(); - filter_->filter_removed_callbacks_.clear(); - filter_->OnFilterRemoved(); - } - - void OnChannelClosing() override { - filter_->sender_ = nullptr; - filter_->OnChannelClosing(); - } - - void OnChannelError() override { filter_->OnChannelError(); } - - void OnChannelConnected(int32_t peer_pid) override { - filter_->peer_process_ = base::Process::OpenWithExtraPrivileges(peer_pid); - filter_->OnChannelConnected(peer_pid); - } - - bool OnMessageReceived(const IPC::Message& message) override { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - - BrowserThread::ID thread = BrowserThread::IO; - filter_->OverrideThreadForMessage(message, &thread); - - scoped_refptr<base::SequencedTaskRunner> destination; - if (thread == BrowserThread::UI) { - destination = GetUIThreadTaskRunner({}); - } else { - DCHECK_EQ(thread, BrowserThread::IO); - - destination = filter_->OverrideTaskRunnerForMessage(message); - - // Neither override kicked in, dispatch the message immediately from the - // IO thread. - if (!destination) - return DispatchMessage(message); - } - - DCHECK(destination); - destination->PostTask( - FROM_HERE, - base::BindOnce(base::IgnoreResult(&Internal::DispatchMessage), this, - message)); - return true; - } - - bool GetSupportedMessageClasses( - std::vector<uint32_t>* supported_message_classes) const override { - supported_message_classes->assign( - filter_->message_classes_to_filter().begin(), - filter_->message_classes_to_filter().end()); - return true; - } - - // Dispatches a message to the derived class. - bool DispatchMessage(const IPC::Message& message) { - bool rv = filter_->OnMessageReceived(message); - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO) || rv) << - "Must handle messages that were dispatched to another thread!"; - return rv; - } - - scoped_refptr<BrowserMessageFilter> filter_; -}; - -BrowserMessageFilter::BrowserMessageFilter(uint32_t message_class_to_filter) - : message_classes_to_filter_(1, message_class_to_filter) {} - -BrowserMessageFilter::BrowserMessageFilter( - const uint32_t* message_classes_to_filter, - size_t num_message_classes_to_filter) - : message_classes_to_filter_(message_classes_to_filter, - UNSAFE_TODO(message_classes_to_filter + - num_message_classes_to_filter)) { - DCHECK(num_message_classes_to_filter); -} - -base::ProcessHandle BrowserMessageFilter::PeerHandle() { - return peer_process_.Handle(); -} - -void BrowserMessageFilter::OnDestruct() const { - delete this; -} - -bool BrowserMessageFilter::Send(IPC::Message* message) { - std::unique_ptr<IPC::Message> msg(message); - - // We don't support sending synchronous messages from the browser. If we - // really needed it, we can make this class derive from SyncMessageFilter - // but it seems better to not allow sending synchronous messages from the - // browser, since it might allow a corrupt/malicious renderer to hang us. - DCHECK(!msg->is_sync()) - << "Can't send sync message through BrowserMessageFilter!"; - - if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { - GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce(base::IgnoreResult(&BrowserMessageFilter::Send), this, - msg.release())); - return true; - } - - if (sender_) - return sender_->Send(msg.release()); - - return false; -} - -scoped_refptr<base::SequencedTaskRunner> -BrowserMessageFilter::OverrideTaskRunnerForMessage( - const IPC::Message& message) { - return nullptr; -} - -void BrowserMessageFilter::ShutdownForBadMessage() { - base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(switches::kDisableKillAfterBadIPC)) - return; - - if (base::Process::Current().Handle() == peer_process_.Handle()) { - // Just crash in single process. Matches RenderProcessHostImpl behavior. - NOTREACHED(); - } - - ChildProcessLauncher::TerminateProcess( - peer_process_, content::RESULT_CODE_KILLED_BAD_MESSAGE); - - // Report a crash, since none will be generated by the killed renderer. - base::debug::DumpWithoutCrashing(); -} - -BrowserMessageFilter::~BrowserMessageFilter() { -} - -IPC::MessageFilter* BrowserMessageFilter::GetFilter() { - // We create this on demand so that if a filter is used in a unit test but - // never attached to a channel, we don't leak Internal and this; - DCHECK(!internal_) << "Should only be called once."; - internal_ = new Internal(this); - return internal_; -} - -} // namespace content
diff --git a/content/public/browser/browser_message_filter.h b/content/public/browser/browser_message_filter.h deleted file mode 100644 index ba7684d..0000000 --- a/content/public/browser/browser_message_filter.h +++ /dev/null
@@ -1,149 +0,0 @@ -// 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. - -#ifndef CONTENT_PUBLIC_BROWSER_BROWSER_MESSAGE_FILTER_H_ -#define CONTENT_PUBLIC_BROWSER_BROWSER_MESSAGE_FILTER_H_ - -#include <stddef.h> -#include <stdint.h> -#include <utility> - -#include "base/memory/raw_ptr.h" -#include "base/memory/ref_counted.h" -#include "base/process/process.h" -#include "base/task/sequenced_task_runner.h" -#include "build/build_config.h" -#include "content/common/content_export.h" -#include "content/public/browser/browser_thread.h" -#include "ipc/ipc_channel_proxy.h" - -#if BUILDFLAG(IS_WIN) -#include "base/synchronization/lock.h" -#endif - -namespace IPC { -class MessageFilter; -} - -namespace content { -struct BrowserMessageFilterTraits; - -// Base class for message filters in the browser process. You can receive and -// send messages on any thread. -// -// BrowserMessageFilters are ref-counted, and a reference to them is held by the -// IPC ChannelProxy for which they have been installed, so do not rely on the -// destructor being called on a specific sequence unless you specify otherwise -// in OnDestruct(). -class CONTENT_EXPORT BrowserMessageFilter - : public base::RefCountedThreadSafe< - BrowserMessageFilter, BrowserMessageFilterTraits>, - public IPC::Sender { - public: - explicit BrowserMessageFilter(uint32_t message_class_to_filter); - BrowserMessageFilter(const uint32_t* message_classes_to_filter, - size_t num_message_classes_to_filter); - - // These match the corresponding IPC::MessageFilter methods and are always - // called on the IO thread. - virtual void OnFilterAdded(IPC::Channel* channel) {} - virtual void OnFilterRemoved() {} - virtual void OnChannelClosing() {} - virtual void OnChannelError() {} - virtual void OnChannelConnected(int32_t peer_pid) {} - - // Called when the message filter is about to be deleted. This gives - // derived classes the option of controlling which thread they're deleted - // on etc. - virtual void OnDestruct() const; - - // IPC::Sender implementation. Can be called on any thread. Can't send sync - // messages (since we don't want to block the browser on any other process). - bool Send(IPC::Message* message) override; - - // If you want the given message to be dispatched to your OnMessageReceived on - // a different thread, there are two options, either - // OverrideThreadForMessage or OverrideTaskRunnerForMessage. - // If neither is overriden, the message will be dispatched on the IO thread. - - // If you want the message to be dispatched on a particular well-known - // browser thread, change |thread| to the id of the target thread - virtual void OverrideThreadForMessage( - const IPC::Message& message, - BrowserThread::ID* thread) {} - - // If you want the message to be dispatched via the SequencedWorkerPool, - // return a non-null task runner which will target tasks accordingly. - // Note: To target the UI thread, please use OverrideThreadForMessage - // since that has extra checks to avoid deadlocks. - virtual scoped_refptr<base::SequencedTaskRunner> OverrideTaskRunnerForMessage( - const IPC::Message& message); - - // Override this to receive messages. - // Your function will normally be called on the IO thread. However, if your - // OverrideXForMessage modifies the thread used to dispatch the message, - // your function will be called on the requested thread. - virtual bool OnMessageReceived(const IPC::Message& message) = 0; - - // Can be called on any thread, after OnChannelConnected is called. - base::ProcessHandle PeerHandle(); - - // Can be called on any thread, after OnChannelConnected is called. - base::ProcessId peer_pid() const { return peer_process_.Pid(); } - - void set_peer_process_for_testing(base::Process peer_process) { - peer_process_ = std::move(peer_process); - } - - // Called by bad_message.h helpers if a message couldn't be deserialized. This - // kills the renderer. Can be called on any thread. This doesn't log the - // error details to UMA, so use the bad_message.h for your module instead. - virtual void ShutdownForBadMessage(); - - const std::vector<uint32_t>& message_classes_to_filter() const { - return message_classes_to_filter_; - } - - protected: - ~BrowserMessageFilter() override; - - private: - friend class base::RefCountedThreadSafe<BrowserMessageFilter, - BrowserMessageFilterTraits>; - - class Internal; - friend class AgentSchedulingGroupHost; - friend class BrowserChildProcessHostImpl; - friend class BrowserPpapiHost; - friend class RenderProcessHostImpl; - - // These are private because the only classes that need access to them are - // made friends above. These are only guaranteed to be valid to call on - // creation. After that this class could outlive the filter. - IPC::MessageFilter* GetFilter(); - - // This implements IPC::MessageFilter so that we can hide that from child - // classes. Internal keeps a reference to this class, which is why there's a - // weak pointer back. This class could outlive Internal based on what the - // child class does in its OnDestruct method. - raw_ptr<Internal, AcrossTasksDanglingUntriaged> internal_ = nullptr; - - raw_ptr<IPC::Sender> sender_ = nullptr; - base::Process peer_process_; - - std::vector<uint32_t> message_classes_to_filter_; - - // Callbacks to be called in OnFilterRemoved(). - std::vector<base::OnceClosure> filter_removed_callbacks_; -}; - -struct BrowserMessageFilterTraits { - static void Destruct(const BrowserMessageFilter* filter) { - filter->OnDestruct(); - } -}; - -} // namespace content - -#endif // CONTENT_PUBLIC_BROWSER_BROWSER_MESSAGE_FILTER_H_
diff --git a/content/public/common/content_client.h b/content/public/common/content_client.h index cf71655..317cd48 100644 --- a/content/public/common/content_client.h +++ b/content/public/common/content_client.h
@@ -146,6 +146,8 @@ // described in the Custom Handler specification. // https://html.spec.whatwg.org/multipage/system-state.html#normalize-protocol-handler-parameters std::vector<std::pair<std::string, std::string>> predefined_handler_schemes; + // Registers a URL scheme as an Isolated Web App scheme. + std::vector<std::string> isolated_app_schemes; #if BUILDFLAG(IS_ANDROID) // Normally, non-standard schemes canonicalize to opaque origins. However, // Android WebView requires non-standard schemes to still be preserved.
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc index 05087b20..a87fd36 100644 --- a/content/public/renderer/content_renderer_client.cc +++ b/content/public/renderer/content_renderer_client.cc
@@ -295,8 +295,10 @@ return nullptr; } -bool ContentRendererClient::IsSafeRedirectTarget(const GURL& from_url, - const GURL& to_url) { +bool ContentRendererClient::IsSafeRedirectTarget( + const GURL& from_url, + const GURL& to_url, + const std::optional<url::Origin>& request_initiator) { return true; }
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h index 6d5859d..ef58cfe 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h
@@ -429,8 +429,12 @@ virtual blink::WebFrame* FindFrame(blink::WebLocalFrame* relative_to_frame, const std::string& name); - // Returns true only if it's safe to redirect `from_url` to `to_url`. - virtual bool IsSafeRedirectTarget(const GURL& from_url, const GURL& to_url); + // Returns true only if it's safe to redirect `from_url` to `to_url`. May also + // check `request_initiator` depending on `to_url`. + virtual bool IsSafeRedirectTarget( + const GURL& from_url, + const GURL& to_url, + const std::optional<url::Origin>& request_initiator); // The user agent string is given from the browser process. This is called at // most once.
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc index e54e804..e81aa09 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -355,12 +355,14 @@ return render_thread->GetUserAgentMetadata(); } -bool RendererBlinkPlatformImpl::IsRedirectSafe(const GURL& from_url, - const GURL& to_url) { +bool RendererBlinkPlatformImpl::IsRedirectSafe( + const GURL& from_url, + const GURL& to_url, + const std::optional<url::Origin>& request_initiator) { return IsSafeRedirectTarget(from_url, to_url) && (!GetContentClient()->renderer() || // null in unit tests. - GetContentClient()->renderer()->IsSafeRedirectTarget(from_url, - to_url)); + GetContentClient()->renderer()->IsSafeRedirectTarget( + from_url, to_url, request_initiator)); } void RendererBlinkPlatformImpl::AppendVariationsThrottles(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h index b4fc08d..c2c2b53 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h
@@ -90,7 +90,10 @@ uint64_t salt) override; blink::WebString UserAgent() override; blink::UserAgentMetadata UserAgentMetadata() override; - bool IsRedirectSafe(const GURL& from_url, const GURL& to_url) override; + bool IsRedirectSafe( + const GURL& from_url, + const GURL& to_url, + const std::optional<url::Origin>& request_initiator) override; void AppendVariationsThrottles( const url::Origin& top_origin, std::vector<std::unique_ptr<blink::URLLoaderThrottle>>* throttles)
diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc index c1c42c5..1a5d697c2 100644 --- a/content/utility/utility_main.cc +++ b/content/utility/utility_main.cc
@@ -29,7 +29,6 @@ #include "content/public/common/main_function_params.h" #include "content/public/utility/content_utility_client.h" #include "content/utility/utility_thread_impl.h" -#include "media/gpu/buildflags.h" #include "printing/buildflags/buildflags.h" #include "sandbox/policy/mojom/sandbox.mojom.h" #include "sandbox/policy/sandbox.h" @@ -46,6 +45,8 @@ #include "content/common/gpu_pre_sandbox_hook_linux.h" #include "content/public/common/content_descriptor_keys.h" #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" +#include "media/gpu/buildflags.h" +#include "media/media_buildflags.h" #include "sandbox/policy/linux/sandbox_linux.h" #include "services/audio/audio_sandbox_hook_linux.h" #include "services/network/network_sandbox_hook_linux.h" @@ -53,7 +54,6 @@ #if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) #include "gpu/config/gpu_info_collector.h" -#include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h" // gn check is not smart enough to realize that this include is guarded behind // some BUILDFLAG()s and the BUILD.gn dependencies correctly account for that. @@ -66,6 +66,10 @@ #endif // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) +#include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" +#endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) + #if BUILDFLAG(ENABLE_PRINTING) #include "printing/sandbox/print_backend_sandbox_hook_linux.h" #endif @@ -150,7 +154,8 @@ } bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox sandbox_type) { -#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) || \ + BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) const bool obtain_gpu_info = sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding || sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoEncoding; @@ -162,7 +167,8 @@ gpu::CollectBasicGraphicsInfo(&gpu_info); return angle::IsAMD(gpu_info.active_gpu().vendor_id); } -#endif +#endif // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) || + // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) return false; } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -261,6 +267,8 @@ CHECK(on_device_model::OnDeviceModelService::PreSandboxInit()); } +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + #if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) && BUILDFLAG(USE_VAAPI) // Regardless of the sandbox status, the VaapiWrapper needs to be initialized // for decoder utility processes on devices that use VA-API. @@ -270,15 +278,12 @@ } #endif // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) && BUILDFLAG(USE_VAAPI) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Thread type delegate of the process should be registered before first // thread type change in ChildProcess constructor. It also needs to be // registered before the process has multiple threads, which may race with // application of the sandbox. SandboxedProcessThreadTypeHandler::Create(); -#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict // Seccomp-BPF policy. @@ -334,16 +339,20 @@ #endif break; #endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); break; +#endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) +#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) case sandbox::mojom::Sandbox::kHardwareVideoEncoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoEncodingPreSandboxHook); break; -#endif +#endif // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS) case sandbox::mojom::Sandbox::kIme: pre_sandbox_hook = base::BindOnce(&ash::ime::ImePreSandboxHook);
diff --git a/extensions/BUILD.gn b/extensions/BUILD.gn index 586fd74..33e27d1 100644 --- a/extensions/BUILD.gn +++ b/extensions/BUILD.gn
@@ -10,6 +10,7 @@ import("//ui/base/ui_features.gni") assert(enable_extensions_core) +assert(!is_fuchsia) # If enable_extensions is true then enable_guest_view must also be true. assert(!enable_extensions || enable_guest_view)
diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_api_unittest.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api_unittest.cc index 0b9256cf..238ae47 100644 --- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_api_unittest.cc +++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api_unittest.cc
@@ -35,14 +35,7 @@ // Tests bluetoothSocket.create() and bluetoothSocket.close(). // Regression test for https://crbug.com/831651. -// TODO(crbug.com/40198321): Port //device/bluetooth to Fuchsia to enable -// bluetooth extensions. -#if BUILDFLAG(IS_FUCHSIA) -#define MAYBE_CreateThenClose DISABLED_CreateThenClose -#else -#define MAYBE_CreateThenClose CreateThenClose -#endif -TEST_F(BluetoothSocketApiUnittest, MAYBE_CreateThenClose) { +TEST_F(BluetoothSocketApiUnittest, CreateThenClose) { scoped_refptr<const Extension> extension_with_socket_permitted = ExtensionBuilder() .SetManifest(
diff --git a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc index 8f02078..e9a9f23 100644 --- a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc +++ b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc
@@ -122,7 +122,8 @@ ? net::RedirectInfo::FirstPartyURLPolicy::UPDATE_URL_ON_REDIRECT : net::RedirectInfo::FirstPartyURLPolicy::NEVER_CHANGE_URL, original_request.referrer_policy, original_request.referrer.spec(), - response_code, new_url, referrer_policy_header, + original_request.request_initiator, response_code, new_url, + referrer_policy_header, /*insecure_scheme_was_upgraded=*/false, /*copy_fragment=*/false, /*is_signed_exchange_fallback_redirect=*/false); } @@ -690,11 +691,14 @@ kInternalRedirectStatusCode, redirect_url_.spec().c_str()); // Cross-origin requests need to modify the Origin header to 'null'. Since - // CorsURLLoader sets |request_initiator| to the Origin request header in - // NetworkService, we need to modify |request_initiator| here to craft the + // CorsURLLoader sets `request_initiator` to the Origin request header in + // NetworkService, we need to modify `request_initiator` here to craft the // Origin header indirectly. // Following checks implement the step 10 of "4.4. HTTP-redirect fetch", // https://fetch.spec.whatwg.org/#http-redirect-fetch + // Note: The original initiator is still recorded in `redirect_info`. This is + // intentional as it may be used inside the renderer to check if a redirect to + // an extension's Web Accessible Resource is safe. if (request_.request_initiator && (!url::IsSameOriginWith(redirect_url_, request_.url) && !request_.request_initiator->IsSameOriginWith(request_.url))) {
diff --git a/extensions/browser/extension_protocols.cc b/extensions/browser/extension_protocols.cc index bd5ffdfe..fcc50044 100644 --- a/extensions/browser/extension_protocols.cc +++ b/extensions/browser/extension_protocols.cc
@@ -444,11 +444,9 @@ // On Fuchsia, some resources are served from read-only filesystems which // don't manage creation timestamps. Cache-control headers should still // be generated for those resources. -#if !BUILDFLAG(IS_FUCHSIA) if (last_modified_time.is_null()) { return; } -#endif // !BUILDFLAG(IS_FUCHSIA) // Hash the time and make an etag to avoid exposing the exact // user installation time of the extension.
diff --git a/extensions/common/api/_api_features.json b/extensions/common/api/_api_features.json index cf291965..5c19a1d 100644 --- a/extensions/common/api/_api_features.json +++ b/extensions/common/api/_api_features.json
@@ -20,7 +20,7 @@ "extension_types": ["platform_app"], "noparent": true, // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "component_extensions_auto_granted": false, @@ -28,7 +28,7 @@ "extension_types": ["extension"], "noparent": true, // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice "3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal @@ -41,7 +41,7 @@ "extension_types": ["platform_app"], "noparent": true, // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "contexts": ["privileged_extension"], @@ -49,7 +49,7 @@ "noparent": true, "component_extensions_auto_granted": false, // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "B9EF10DDFEA11EF77873CC5009809E5037FC4C7A", // Google input tools "06BE211D5F014BAB34BC22D9DDA09C63A81D828E", // Official xkb extension @@ -62,7 +62,7 @@ "channel": "stable", "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "app.currentWindowInternal.setShape": { "dependencies": ["permission:app.window.shape"], @@ -83,7 +83,7 @@ "channel": "stable", "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "audio": { "dependencies": ["permission:audio"], @@ -94,19 +94,19 @@ "dependencies": ["manifest:automation"], "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "automation": { "dependencies": ["manifest:automation"], "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "bluetooth": [{ "dependencies": ["manifest:bluetooth"], "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "contexts": ["webui"], @@ -115,7 +115,7 @@ "chrome://os-settings/*" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }], "bluetoothLowEnergy": { "dependencies": ["manifest:bluetooth"], @@ -137,7 +137,7 @@ "dependencies": ["manifest:bluetooth"], "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "cecPrivate": { "dependencies": ["permission:cecPrivate"], @@ -218,7 +218,7 @@ "chrome://os-feedback/*" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] } ], "feedbackPrivate.openFeedback": { @@ -256,7 +256,7 @@ "channel": "stable", "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "internal": true, "channel": "stable", @@ -278,7 +278,7 @@ "chrome://lock-reauth/*" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "internal": true, "channel": "stable", @@ -289,7 +289,7 @@ "chrome-untrusted://boca-app/*" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { // This feature is used by the Controlled Frame API and is specifically // enabled by //chrome. @@ -303,7 +303,7 @@ // true. "requires_delegated_availability_check": true, // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] } ], "hid": { @@ -494,7 +494,7 @@ "dependencies": ["manifest:mime_types_handler"], "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "mojoPrivate": { "contexts": ["privileged_extension"], @@ -715,7 +715,7 @@ "dependencies": ["manifest:sockets"], "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] },{ "channel": "stable", "contexts": ["webui_untrusted"], @@ -723,13 +723,13 @@ "chrome-untrusted://terminal/*" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }], "sockets.tcpServer": [{ "dependencies": ["manifest:sockets"], "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] },{ "channel": "stable", "contexts": ["webui_untrusted"], @@ -737,13 +737,13 @@ "chrome-untrusted://terminal/*" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }], "sockets.udp": [{ "dependencies": ["manifest:sockets"], "contexts": ["privileged_extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] },{ "channel": "stable", "contexts": ["webui_untrusted"], @@ -751,7 +751,7 @@ "chrome-untrusted://terminal/*" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }], "storage": { "dependencies": ["permission:storage"],
diff --git a/extensions/common/api/_permission_features.json b/extensions/common/api/_permission_features.json index c65250d..27a374b 100644 --- a/extensions/common/api/_permission_features.json +++ b/extensions/common/api/_permission_features.json
@@ -61,7 +61,7 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "app.window.ime": { "channel": "stable", @@ -77,7 +77,7 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "audio": [ { @@ -98,13 +98,13 @@ "channel": "dev", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "8C3741E3AF0B93B6E8E0DDD499BB0B74839EA578", "E703483CEF33DEC18B4B6DD84B5C776FB9182BDB", @@ -217,7 +217,7 @@ "extension_types": ["extension", "legacy_packaged_app"], "max_manifest_version": 2, // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "diagnostics": [ { @@ -239,13 +239,13 @@ "channel": "dev", "extension_types": ["extension", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "extension_types": ["extension", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "7AE714FFD394E073F0294CFA134C9F91DB5FBAA4", // CCD Development "C7DA3A55C2355F994D3FDDAD120B426A0DF63843", // CCD Testing @@ -266,7 +266,7 @@ "channel": "stable", "extension_types": ["extension", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "7910EAFDAF64B947E1CB31B333A9BD14CA556B6C", // Feedback UI. "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/293683 @@ -288,12 +288,12 @@ "extension_types": ["platform_app"], "default_parent": true, // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] },{ "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice "3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal @@ -330,13 +330,13 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "extension_types": ["extension"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": [ "D7CD4B3956B1F6E970E4AFCBCD4094B1EF4D07B9", // http://crbug.com/710541 "D4EFCCC0CC612380762758BB96C7997224BD6395", // http://crbug.com/710541 @@ -445,7 +445,7 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "mac", "win", "linux", "fuchsia"], + "platforms": ["chromeos", "mac", "win", "linux"], "allowlist": [ "0DE0F05680A4A056BCEC864ED8DDA84296F82B40", // http://crbug.com/434651 "1C93BD3CF875F4A73C0B2A163BB8FBDA8B8B3D80", // http://crbug.com/293683 @@ -490,7 +490,7 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "mac", "win", "linux", "fuchsia"], + "platforms": ["chromeos", "mac", "win", "linux"], "allowlist": [ // DO NOT ADD ANY MORE ENTRIES HERE. // networkingPrivate is being migrated to networking.onc. @@ -570,7 +570,7 @@ "channel": "stable", "extension_types": ["extension", "platform_app" ], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, // Note: runtime is not actually a permission, but some systems check these // values to verify restrictions. @@ -582,13 +582,13 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "socket": { "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "storage": [ { @@ -676,13 +676,13 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "extension_types": ["hosted_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": ["B44D08FD98F1523ED5837D78D0A606EA9D6206E5"] // Web Store } ], @@ -691,13 +691,13 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "stable", "extension_types": ["hosted_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"], + "platforms": ["chromeos", "linux", "mac", "win"], "allowlist": ["B44D08FD98F1523ED5837D78D0A606EA9D6206E5"] // Web Store } ], @@ -725,7 +725,7 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, { "channel": "dev", @@ -811,7 +811,7 @@ "channel": "stable", "extension_types": ["platform_app"], // "desktop_android" is not supported. - "platforms": ["chromeos", "fuchsia", "linux", "mac", "win"] + "platforms": ["chromeos", "linux", "mac", "win"] }, "webRequest": [ {
diff --git a/extensions/common/command.cc b/extensions/common/command.cc index 3ff554f5..064b1b79 100644 --- a/extensions/common/command.cc +++ b/extensions/common/command.cc
@@ -119,10 +119,6 @@ return ui::kKeybindingPlatformChromeOs; #elif BUILDFLAG(IS_LINUX) return ui::kKeybindingPlatformLinux; -#elif BUILDFLAG(IS_FUCHSIA) - // TODO(crbug.com/40220501): Change this once we decide what string should be - // used for Fuchsia. - return ui::kKeybindingPlatformLinux; #elif BUILDFLAG(IS_DESKTOP_ANDROID) // For now, we use linux keybindings on desktop android. // TODO(https://crbug.com/356905053): Should this be ChromeOS keybindings?
diff --git a/extensions/common/command_unittest.cc b/extensions/common/command_unittest.cc index 4cde92e8..0b98e32f 100644 --- a/extensions/common/command_unittest.cc +++ b/extensions/common/command_unittest.cc
@@ -247,11 +247,6 @@ #elif BUILDFLAG(IS_LINUX) ui::Accelerator accelerator(ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN); -#elif BUILDFLAG(IS_FUCHSIA) - // TODO(crbug.com/40220501): Change this once we decide on a unique platform - // key for Fuchsia. - ui::Accelerator accelerator(ui::VKEY_L, - ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN); #else ui::Accelerator accelerator(ui::VKEY_D, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN);
diff --git a/extensions/common/features/feature.cc b/extensions/common/features/feature.cc index 94d22fa..1cc3a144 100644 --- a/extensions/common/features/feature.cc +++ b/extensions/common/features/feature.cc
@@ -28,8 +28,6 @@ return MACOSX_PLATFORM; #elif BUILDFLAG(IS_WIN) return WIN_PLATFORM; -#elif BUILDFLAG(IS_FUCHSIA) - return FUCHSIA_PLATFORM; #elif BUILDFLAG(ENABLE_DESKTOP_ANDROID_EXTENSIONS) return DESKTOP_ANDROID_PLATFORM; #else
diff --git a/extensions/common/features/feature.h b/extensions/common/features/feature.h index ff2e39d3..2508f2e 100644 --- a/extensions/common/features/feature.h +++ b/extensions/common/features/feature.h
@@ -41,7 +41,6 @@ LINUX_PLATFORM, MACOSX_PLATFORM, WIN_PLATFORM, - FUCHSIA_PLATFORM, DESKTOP_ANDROID_PLATFORM, };
diff --git a/extensions/common/features/feature_provider_unittest.cc b/extensions/common/features/feature_provider_unittest.cc index 13214cd..ef47703 100644 --- a/extensions/common/features/feature_provider_unittest.cc +++ b/extensions/common/features/feature_provider_unittest.cc
@@ -127,10 +127,8 @@ // A permission only available to allowlisted extensions returns availability // NOT_FOUND_IN_ALLOWLIST. - // TODO(crbug.com/40198321): Port //device/bluetooth to Fuchsia to - // enable bluetooth extensions. // bluetoothPrivate is unsupported in desktop-android build. -#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_DESKTOP_ANDROID) +#if BUILDFLAG(ENABLE_EXTENSIONS) feature = provider->GetFeature("bluetoothPrivate"); ASSERT_TRUE(feature); EXPECT_EQ(Feature::NOT_FOUND_IN_ALLOWLIST, @@ -139,7 +137,7 @@ mojom::ContextType::kUnspecified, GURL(), kUnspecifiedContextId, TestContextData()) .result()); -#endif // !BUILDFLAG(IS_FUCHSIA) +#endif // A permission that isn't part of the manifest returns NOT_PRESENT. feature = provider->GetFeature("unlimitedStorage");
diff --git a/extensions/renderer/bindings/api_binding_util.cc b/extensions/renderer/bindings/api_binding_util.cc index d7247fb..a3212966 100644 --- a/extensions/renderer/bindings/api_binding_util.cc +++ b/extensions/renderer/bindings/api_binding_util.cc
@@ -135,8 +135,6 @@ return "mac"; #elif BUILDFLAG(IS_WIN) return "win"; -#elif BUILDFLAG(IS_FUCHSIA) - return "fuchsia"; #elif BUILDFLAG(IS_DESKTOP_ANDROID) return "desktop_android"; #else
diff --git a/extensions/shell/browser/shell_speech_recognition_manager_delegate.cc b/extensions/shell/browser/shell_speech_recognition_manager_delegate.cc index 89819e13..f2e62901 100644 --- a/extensions/shell/browser/shell_speech_recognition_manager_delegate.cc +++ b/extensions/shell/browser/shell_speech_recognition_manager_delegate.cc
@@ -28,10 +28,10 @@ ~ShellSpeechRecognitionManagerDelegate() { } -#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_ANDROID) void ShellSpeechRecognitionManagerDelegate::BindSpeechRecognitionContext( mojo::PendingReceiver<media::mojom::SpeechRecognitionContext> receiver) {} -#endif // !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_ANDROID) +#endif // !BUILDFLAG(IS_ANDROID) void ShellSpeechRecognitionManagerDelegate::OnRecognitionStart(int session_id) { }
diff --git a/extensions/shell/browser/shell_speech_recognition_manager_delegate.h b/extensions/shell/browser/shell_speech_recognition_manager_delegate.h index 842c188..9b146c3 100644 --- a/extensions/shell/browser/shell_speech_recognition_manager_delegate.h +++ b/extensions/shell/browser/shell_speech_recognition_manager_delegate.h
@@ -24,12 +24,12 @@ ~ShellSpeechRecognitionManagerDelegate() override; -#if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_ANDROID) // It is empty in this delegate. void BindSpeechRecognitionContext( mojo::PendingReceiver<media::mojom::SpeechRecognitionContext> receiver) override; -#endif // !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_ANDROID) +#endif // !BUILDFLAG(IS_ANDROID) private: // SpeechRecognitionEventListener methods.
diff --git a/headless/BUILD.gn b/headless/BUILD.gn index 7261c3a8..fdb3ad3 100644 --- a/headless/BUILD.gn +++ b/headless/BUILD.gn
@@ -709,6 +709,7 @@ "//components/embedder_support:user_agent", "//components/headless/select_file_dialog", "//components/headless/test", + "//components/headless/test:meta_info", "//components/infobars/content", "//components/infobars/core", "//components/policy/core/browser",
diff --git a/headless/test/data/protocol/sanity/create-target-secondary-screen.js b/headless/test/data/protocol/sanity/create-target-secondary-screen.js index ce68a62..120e959d 100644 --- a/headless/test/data/protocol/sanity/create-target-secondary-screen.js +++ b/headless/test/data/protocol/sanity/create-target-secondary-screen.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={label='#1'}{label='#2'} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank( 'Tests Target.createTarget() on a secodnary screen.');
diff --git a/headless/test/data/protocol/sanity/create-target-window-state.js b/headless/test/data/protocol/sanity/create-target-window-state.js index 090a6a4..1e75cb58 100644 --- a/headless/test/data/protocol/sanity/create-target-window-state.js +++ b/headless/test/data/protocol/sanity/create-target-window-state.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={1600x1200} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank( `Tests Target.createTarget() window state handling.`);
diff --git a/headless/test/data/protocol/sanity/get-dom-counters-for-leak-detection.js b/headless/test/data/protocol/sanity/get-dom-counters-for-leak-detection.js index 5222a4e..ed68811d 100644 --- a/headless/test/data/protocol/sanity/get-dom-counters-for-leak-detection.js +++ b/headless/test/data/protocol/sanity/get-dom-counters-for-leak-detection.js
@@ -1,6 +1,9 @@ // 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. +// +// META: --js-flags=--expose-gc +// (async function(testRunner) { const {dp} = await testRunner.startBlank( 'Tests getDOMCountersForLeakDetection output.');
diff --git a/headless/test/data/protocol/sanity/move-window-between-screens.js b/headless/test/data/protocol/sanity/move-window-between-screens.js index 7a43140..241d061f 100644 --- a/headless/test/data/protocol/sanity/move-window-between-screens.js +++ b/headless/test/data/protocol/sanity/move-window-between-screens.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={label='#1'}{label='#2'}{0,600 label='#3'}{label='#4'} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank( 'Tests window moving between multiple screens.');
diff --git a/headless/test/data/protocol/sanity/multiple-screen-details.js b/headless/test/data/protocol/sanity/multiple-screen-details.js index 2a1b62dd..677c10d8 100644 --- a/headless/test/data/protocol/sanity/multiple-screen-details.js +++ b/headless/test/data/protocol/sanity/multiple-screen-details.js
@@ -1,6 +1,9 @@ // 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. +// +// META: --screen-info={label='#1'}{600x800 label='#2'} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank(`Tests multiple screen configuration.`);
diff --git a/headless/test/data/protocol/sanity/request-fullscreen-on-secondary-screen.js b/headless/test/data/protocol/sanity/request-fullscreen-on-secondary-screen.js index b8cd2b1..3bcf5c6 100644 --- a/headless/test/data/protocol/sanity/request-fullscreen-on-secondary-screen.js +++ b/headless/test/data/protocol/sanity/request-fullscreen-on-secondary-screen.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={label='1st screen'}{600x800 label='2nd screen'} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank( 'Tests request fullscreen on a secondary screen.');
diff --git a/headless/test/data/protocol/sanity/request-fullscreen.js b/headless/test/data/protocol/sanity/request-fullscreen.js index d20b818..552a87b3e 100644 --- a/headless/test/data/protocol/sanity/request-fullscreen.js +++ b/headless/test/data/protocol/sanity/request-fullscreen.js
@@ -1,6 +1,10 @@ // 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. +// +// META: --screen-info={800x600} +// META: --window-size=400,200 +// (async function(testRunner) { const html = ` <html>
diff --git a/headless/test/data/protocol/sanity/screen-details-multiple-screens.js b/headless/test/data/protocol/sanity/screen-details-multiple-screens.js index 62836e94..cca0ccc 100644 --- a/headless/test/data/protocol/sanity/screen-details-multiple-screens.js +++ b/headless/test/data/protocol/sanity/screen-details-multiple-screens.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={label='1st screen'}{600x800 label='2nd screen'} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank( 'Tests multiple screens details origin and size.');
diff --git a/headless/test/data/protocol/sanity/screen-details-pixel-ratio-and-color-depth.js b/headless/test/data/protocol/sanity/screen-details-pixel-ratio-and-color-depth.js index 48577e8c..bba84c9 100644 --- a/headless/test/data/protocol/sanity/screen-details-pixel-ratio-and-color-depth.js +++ b/headless/test/data/protocol/sanity/screen-details-pixel-ratio-and-color-depth.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={label='Screen' devicePixelRatio=3.0 colorDepth=32} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank( 'Tests screen details pixel ratio and color depth.');
diff --git a/headless/test/data/protocol/sanity/screen-orientation-lock-natural-landscape.js b/headless/test/data/protocol/sanity/screen-orientation-lock-natural-landscape.js index c0c99dd..d7aa1e4 100644 --- a/headless/test/data/protocol/sanity/screen-orientation-lock-natural-landscape.js +++ b/headless/test/data/protocol/sanity/screen-orientation-lock-natural-landscape.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={800x600} +// (async function(testRunner) { const html = `<!doctype html> <html>
diff --git a/headless/test/data/protocol/sanity/screen-orientation-lock-natural-portrait.js b/headless/test/data/protocol/sanity/screen-orientation-lock-natural-portrait.js index 3307837..7cb1235 100644 --- a/headless/test/data/protocol/sanity/screen-orientation-lock-natural-portrait.js +++ b/headless/test/data/protocol/sanity/screen-orientation-lock-natural-portrait.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={600x800} +// (async function(testRunner) { const html = `<!doctype html> <html>
diff --git a/headless/test/data/protocol/sanity/screen-rotation-angle.js b/headless/test/data/protocol/sanity/screen-rotation-angle.js index 83372c52..0f941fc 100644 --- a/headless/test/data/protocol/sanity/screen-rotation-angle.js +++ b/headless/test/data/protocol/sanity/screen-rotation-angle.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={rotation=180} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank('Tests screen rotation angle.');
diff --git a/headless/test/data/protocol/sanity/screen-rotation-secondary-screen.js b/headless/test/data/protocol/sanity/screen-rotation-secondary-screen.js index cfdca887..98751f3 100644 --- a/headless/test/data/protocol/sanity/screen-rotation-secondary-screen.js +++ b/headless/test/data/protocol/sanity/screen-rotation-secondary-screen.js
@@ -2,7 +2,9 @@ // 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. - +// +// META: --screen-info={label='1st screen'}{600x800 label='2nd screen'} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank( 'Tests screen rotation on a secondary screen.');
diff --git a/headless/test/data/protocol/sanity/screen-scale-factor.js b/headless/test/data/protocol/sanity/screen-scale-factor.js index be1e0cbc..d68d367 100644 --- a/headless/test/data/protocol/sanity/screen-scale-factor.js +++ b/headless/test/data/protocol/sanity/screen-scale-factor.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={devicePixelRatio=3.0} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank('Tests screen scale factor.');
diff --git a/headless/test/data/protocol/sanity/screen-size-orientation.js b/headless/test/data/protocol/sanity/screen-size-orientation.js index 69afce4..622f647 100644 --- a/headless/test/data/protocol/sanity/screen-size-orientation.js +++ b/headless/test/data/protocol/sanity/screen-size-orientation.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={600x800} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank('Tests screen size orientation.');
diff --git a/headless/test/data/protocol/sanity/screen-work-area.js b/headless/test/data/protocol/sanity/screen-work-area.js index 0a61007..fe97240 100644 --- a/headless/test/data/protocol/sanity/screen-work-area.js +++ b/headless/test/data/protocol/sanity/screen-work-area.js
@@ -1,7 +1,10 @@ // 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. - +// +// META: --screen-info={workAreaLeft=100 workAreaRight=100 \ +// META: workAreaTop=100 workAreaBottom=100} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank('Tests screen work area.');
diff --git a/headless/test/data/protocol/sanity/window-open-on-secondary-screen.js b/headless/test/data/protocol/sanity/window-open-on-secondary-screen.js index b0561349..4c85cc3 100644 --- a/headless/test/data/protocol/sanity/window-open-on-secondary-screen.js +++ b/headless/test/data/protocol/sanity/window-open-on-secondary-screen.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={label='1st screen'}{label='2nd screen'} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank('Tests window open on a secondary screen.');
diff --git a/headless/test/data/protocol/sanity/window-open-popup-placement.js b/headless/test/data/protocol/sanity/window-open-popup-placement.js index 96e8f645..82130cd 100644 --- a/headless/test/data/protocol/sanity/window-open-popup-placement.js +++ b/headless/test/data/protocol/sanity/window-open-popup-placement.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={1600x1200} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank('Tests popup window open placement.');
diff --git a/headless/test/data/protocol/sanity/window-screen-avail.js b/headless/test/data/protocol/sanity/window-screen-avail.js index bd44f08a..75aa3ea1 100644 --- a/headless/test/data/protocol/sanity/window-screen-avail.js +++ b/headless/test/data/protocol/sanity/window-screen-avail.js
@@ -1,7 +1,10 @@ // 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. - +// +// META: --screen-info={800x600 \ +// META: workAreaLeft=10 workAreaRight=90 workAreaTop=20 workAreaBottom=80} +// (async function(testRunner) { const {dp} = await testRunner.startBlank('Tests window.screen.avail* APIs.');
diff --git a/headless/test/data/protocol/sanity/window-size-switch-handling.js b/headless/test/data/protocol/sanity/window-size-switch-handling.js index bc9d2b0..8179460 100644 --- a/headless/test/data/protocol/sanity/window-size-switch-handling.js +++ b/headless/test/data/protocol/sanity/window-size-switch-handling.js
@@ -1,7 +1,10 @@ // 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. - +// +// META: --screen-info={1600x1200} +// META: --window-size=700,500 +// (async function(testRunner) { const {dp} = await testRunner.startBlank('Tests --window-size switch handling.');
diff --git a/headless/test/data/protocol/sanity/window-size-switch-larger-than-screen.js b/headless/test/data/protocol/sanity/window-size-switch-larger-than-screen.js index 751e612a..3f83b6b 100644 --- a/headless/test/data/protocol/sanity/window-size-switch-larger-than-screen.js +++ b/headless/test/data/protocol/sanity/window-size-switch-larger-than-screen.js
@@ -1,7 +1,10 @@ // 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. - +// +// META: --screen-info={800x600} +// META: --window-size=1600,1200 +// (async function(testRunner) { const {dp} = await testRunner.startBlank('Tests --window-size larger than screen.');
diff --git a/headless/test/data/protocol/sanity/window-state-transitions.js b/headless/test/data/protocol/sanity/window-state-transitions.js index c506913..432e577 100644 --- a/headless/test/data/protocol/sanity/window-state-transitions.js +++ b/headless/test/data/protocol/sanity/window-state-transitions.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={1600x1200} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank('Tests window state transitions.');
diff --git a/headless/test/data/protocol/sanity/window-zoom-on-secondary-screen.js b/headless/test/data/protocol/sanity/window-zoom-on-secondary-screen.js index 3bf237e..0512a130 100644 --- a/headless/test/data/protocol/sanity/window-zoom-on-secondary-screen.js +++ b/headless/test/data/protocol/sanity/window-zoom-on-secondary-screen.js
@@ -1,7 +1,9 @@ // 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. - +// +// META: --screen-info={1600x1200}{1200x1600} +// (async function(testRunner) { const {session, dp} = await testRunner.startBlank('Tests window zoom on a secondary screen.');
diff --git a/headless/test/data/protocol/sanity/window-zoom-size-matches-work-area.js b/headless/test/data/protocol/sanity/window-zoom-size-matches-work-area.js index 6faec33..4b536fa 100644 --- a/headless/test/data/protocol/sanity/window-zoom-size-matches-work-area.js +++ b/headless/test/data/protocol/sanity/window-zoom-size-matches-work-area.js
@@ -1,7 +1,10 @@ // 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. - +// +// META: --screen-info={800x600 \ +// META: workAreaLeft=10 workAreaRight=90 workAreaTop=20 workAreaBottom=80} +// (async function(testRunner) { const {dp} = await testRunner.startBlank( 'Tests maximized/fullscreen window matches workarea.');
diff --git a/headless/test/headless_compositor_browsertest.cc b/headless/test/headless_compositor_browsertest.cc index 81cf9469..3c43384 100644 --- a/headless/test/headless_compositor_browsertest.cc +++ b/headless/test/headless_compositor_browsertest.cc
@@ -51,20 +51,13 @@ // TODO(crbug.com/40656275): Suite is flaky on TSan Linux. #if BUILDFLAG(IS_MAC) || ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ defined(THREAD_SANITIZER)) -#define HEADLESS_COMPOSITOR_TEST(TEST_NAME, SCRIPT_NAME) \ - IN_PROC_BROWSER_TEST_F(HeadlessCompositorBrowserTest, \ - DISABLED_##TEST_NAME) { \ - test_folder_ = "/protocol/"; \ - script_name_ = SCRIPT_NAME; \ - RunTest(); \ - } +#define HEADLESS_COMPOSITOR_TEST(TEST_NAME, SCRIPT_NAME) \ + HEADLESS_PROTOCOL_TEST_F(HeadlessCompositorBrowserTest, \ + DISABLED_##TEST_NAME, SCRIPT_NAME) #else #define HEADLESS_COMPOSITOR_TEST(TEST_NAME, SCRIPT_NAME) \ - IN_PROC_BROWSER_TEST_F(HeadlessCompositorBrowserTest, TEST_NAME) { \ - test_folder_ = "/protocol/"; \ - script_name_ = SCRIPT_NAME; \ - RunTest(); \ - } + HEADLESS_PROTOCOL_TEST_F(HeadlessCompositorBrowserTest, TEST_NAME, \ + SCRIPT_NAME) #endif HEADLESS_COMPOSITOR_TEST(CompositorBasicRaf,
diff --git a/headless/test/headless_protocol_browsertest.cc b/headless/test/headless_protocol_browsertest.cc index 7663f4a..ab138b5 100644 --- a/headless/test/headless_protocol_browsertest.cc +++ b/headless/test/headless_protocol_browsertest.cc
@@ -26,7 +26,6 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/common/permissions/permission_utils.h" -#include "third_party/blink/public/common/switches.h" namespace headless { @@ -38,28 +37,8 @@ } // namespace switches namespace { - -static const base::FilePath kTestsDirectory( +static const base::FilePath kTestsScriptRoot( FILE_PATH_LITERAL("headless/test/data/protocol")); - -// This is a very simple command line switches parser intended to process '--' -// separated switches with or without values. It will not process nested command -// line switches specifications like --js-flags=--expose-gc. Use with caution! -void AppendCommandLineExtras(base::CommandLine* command_line, - std::string_view extras) { - std::vector<std::string> switches = base::SplitStringUsingSubstr( - extras, "--", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); - - for (const auto& a_switch : switches) { - if (size_t pos = a_switch.find('=', 1); pos != std::string::npos) { - command_line->AppendSwitchASCII(a_switch.substr(0, pos), - a_switch.substr(pos + 1)); - } else { - command_line->AppendSwitch(a_switch); - } - } -} - } // namespace HeadlessProtocolBrowserTest::HeadlessProtocolBrowserTest() { @@ -70,17 +49,39 @@ HeadlessProtocolBrowserTest::~HeadlessProtocolBrowserTest() = default; +void HeadlessProtocolBrowserTest::SetUp() { + LoadTestMetaInfo(); + HeadlessDevTooledBrowserTest::SetUp(); +} + void HeadlessProtocolBrowserTest::SetUpCommandLine( base::CommandLine* command_line) { command_line->AppendSwitchASCII(::network::switches::kHostResolverRules, "MAP *.test 127.0.0.1"); HeadlessDevTooledBrowserTest::SetUpCommandLine(command_line); + + test_meta_info_.AppendToCommandLine(*command_line); } base::Value::Dict HeadlessProtocolBrowserTest::GetPageUrlExtraParams() { return base::Value::Dict(); } +void HeadlessProtocolBrowserTest::LoadTestMetaInfo() { + base::FilePath src_dir; + CHECK(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &src_dir)); + base::FilePath test_path = + src_dir.Append(kTestsScriptRoot).AppendASCII(GetScriptName()); + std::string script_body; + CHECK(base::ReadFileToString(test_path, &script_body)) + << "test_path=" << test_path; + + auto test_meta_info = TestMetaInfo::FromString(script_body); + CHECK(test_meta_info.has_value()) << test_meta_info.error(); + + test_meta_info_ = test_meta_info.value(); +} + void HeadlessProtocolBrowserTest::RunDevTooledTest() { scoped_refptr<content::DevToolsAgentHost> agent_host = content::DevToolsAgentHost::GetOrCreateFor( @@ -121,21 +122,11 @@ const base::Value::Dict& params) { ASSERT_THAT(params, DictHasValue("method", "Page.loadEventFired")); - base::ScopedAllowBlockingForTesting allow_blocking; - base::FilePath src_dir; - CHECK(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &src_dir)); - base::FilePath test_path = - src_dir.Append(kTestsDirectory).AppendASCII(script_name_); - std::string script; - if (!base::ReadFileToString(test_path, &script)) { - ADD_FAILURE() << "Unable to read test at " << test_path; - FinishTest(); - return; - } + std::string script_name = GetScriptName(); GURL test_url = embedded_test_server()->GetURL("harness.test", - "/protocol/" + script_name_); + "/protocol/" + script_name); GURL target_url = - embedded_test_server()->GetURL("127.0.0.1", "/protocol/" + script_name_); + embedded_test_server()->GetURL("127.0.0.1", "/protocol/" + script_name); base::Value::Dict test_params; test_params.Set("test", test_url.spec()); @@ -177,9 +168,10 @@ base::FilePath src_dir; CHECK(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &src_dir)); + std::string script_name = GetScriptName(); base::FilePath expectation_path = - src_dir.Append(kTestsDirectory) - .AppendASCII(script_name_.substr(0, script_name_.length() - 3) + + src_dir.Append(kTestsScriptRoot) + .AppendASCII(script_name.substr(0, script_name.length() - 3) + "-expected.txt"); if (base::CommandLine::ForCurrentProcess()->HasSwitch( @@ -225,24 +217,6 @@ FinishAsynchronousTest(); } -#define HEADLESS_PROTOCOL_TEST_CLASS(CLASS_NAME, TEST_NAME, SCRIPT_NAME) \ - IN_PROC_BROWSER_TEST_F(CLASS_NAME, TEST_NAME) { \ - test_folder_ = "/protocol/"; \ - script_name_ = SCRIPT_NAME; \ - RunTest(); \ - } - -#define HEADLESS_PROTOCOL_TEST(TEST_NAME, SCRIPT_NAME) \ - HEADLESS_PROTOCOL_TEST_CLASS(HeadlessProtocolBrowserTest, TEST_NAME, \ - SCRIPT_NAME) - -#define HEADLESS_PROTOCOL_TEST_P(CLASS_NAME, TEST_NAME, SCRIPT_NAME) \ - IN_PROC_BROWSER_TEST_P(CLASS_NAME, TEST_NAME) { \ - test_folder_ = "/protocol/"; \ - script_name_ = SCRIPT_NAME; \ - RunTest(); \ - } - // Headless-specific tests HEADLESS_PROTOCOL_TEST(VirtualTimeBasics, "emulation/virtual-time-basics.js") HEADLESS_PROTOCOL_TEST(VirtualTimeInterrupt, @@ -456,9 +430,9 @@ } }; -HEADLESS_PROTOCOL_TEST_CLASS(HeadlessProtocolBrowserTestWithKnownPermission, - KnownPermissionTypes, - "sanity/known-permission-types.js") +HEADLESS_PROTOCOL_TEST_F(HeadlessProtocolBrowserTestWithKnownPermission, + KnownPermissionTypes, + "sanity/known-permission-types.js") class HeadlessProtocolBrowserTestWithProxy : public HeadlessProtocolBrowserTest { @@ -493,10 +467,11 @@ net::EmbeddedTestServer proxy_server_; }; -HEADLESS_PROTOCOL_TEST_CLASS(HeadlessProtocolBrowserTestWithProxy, - BrowserSetProxyConfig, - "sanity/browser-set-proxy-config.js") +HEADLESS_PROTOCOL_TEST_F(HeadlessProtocolBrowserTestWithProxy, + BrowserSetProxyConfig, + "sanity/browser-set-proxy-config.js") +// TODO(kvitekp): Move to headless/test/headless_devtooled_browsertest.cc class HeadlessAllowedVideoCodecsTest : public HeadlessDevTooledBrowserTest, public testing::WithParamInterface< @@ -575,14 +550,14 @@ bool ShouldBlockNewWebContents() const { return GetParam(); } }; -INSTANTIATE_TEST_SUITE_P(/* no prefix */, - PopupWindowOpenTest, - ::testing::Bool()); - HEADLESS_PROTOCOL_TEST_P(PopupWindowOpenTest, Open, "sanity/popup-window-open.js") +INSTANTIATE_TEST_SUITE_P(/* no prefix */, + PopupWindowOpenTest_Open, + ::testing::Bool()); + class HeadlessProtocolBrowserTestWithoutSiteIsolation : public HeadlessProtocolBrowserTest { public: @@ -592,54 +567,35 @@ bool ShouldEnableSitePerProcess() override { return false; } }; -HEADLESS_PROTOCOL_TEST_CLASS( +HEADLESS_PROTOCOL_TEST_F( HeadlessProtocolBrowserTestWithoutSiteIsolation, VirtualTimeLocalStorageDetachedFrame, "emulation/virtual-time-local-storage-detached-frame.js") -class HeadlessProtocolBrowserTestWithDataPath +class HeadlessProtocolBrowserTestWithFileInputDirectoryUpload : public HeadlessProtocolBrowserTest { protected: + static constexpr char kFileInputDirectoryUpload[] = + "sanity/resources/file-input-directory-upload"; + base::Value::Dict GetPageUrlExtraParams() override { base::FilePath src_dir; CHECK(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &src_dir)); base::FilePath path = - src_dir.Append(kTestsDirectory).AppendASCII(data_path_); + src_dir.Append(kTestsScriptRoot).AppendASCII(kFileInputDirectoryUpload); base::Value::Dict dict; dict.Set("data_path", path.AsUTF8Unsafe()); return dict; } - - std::string data_path_; }; -#define HEADLESS_PROTOCOL_TEST_WITH_DATA_PATH(TEST_NAME, SCRIPT_NAME, PATH) \ - IN_PROC_BROWSER_TEST_F(HeadlessProtocolBrowserTestWithDataPath, TEST_NAME) { \ - test_folder_ = "/protocol/"; \ - script_name_ = SCRIPT_NAME; \ - data_path_ = PATH; \ - RunTest(); \ - } +HEADLESS_PROTOCOL_TEST_F( + HeadlessProtocolBrowserTestWithFileInputDirectoryUpload, + Upload, + "sanity/file-input-directory-upload.js") -// TODO(crbug.com/40883155) Re-enable after resolving flaky failures. -HEADLESS_PROTOCOL_TEST_WITH_DATA_PATH( - FileInputDirectoryUpload, - "sanity/file-input-directory-upload.js", - "sanity/resources/file-input-directory-upload") - -class HeadlessProtocolBrowserTestWithExposeGC - : public HeadlessProtocolBrowserTest { - public: - void SetUpCommandLine(base::CommandLine* command_line) override { - HeadlessProtocolBrowserTest::SetUpCommandLine(command_line); - command_line->AppendSwitchASCII(blink::switches::kJavaScriptFlags, - "--expose-gc"); - } -}; - -HEADLESS_PROTOCOL_TEST_CLASS(HeadlessProtocolBrowserTestWithExposeGC, - GetDOMCountersForLeakDetection, - "sanity/get-dom-counters-for-leak-detection.js") +HEADLESS_PROTOCOL_TEST(GetDOMCountersForLeakDetection, + "sanity/get-dom-counters-for-leak-detection.js") class HeadlessProtocolBrowserTestSitePerProcess : public HeadlessProtocolBrowserTest, @@ -654,14 +610,15 @@ } }; -INSTANTIATE_TEST_SUITE_P(/* no prefix */, - HeadlessProtocolBrowserTestSitePerProcess, - ::testing::Bool()); - HEADLESS_PROTOCOL_TEST_P(HeadlessProtocolBrowserTestSitePerProcess, SitePerProcess, "sanity/site-per-process.js") +INSTANTIATE_TEST_SUITE_P( + /* no prefix */, + HeadlessProtocolBrowserTestSitePerProcess_SitePerProcess, + ::testing::Bool()); + HEADLESS_PROTOCOL_TEST(DataURIIframe, "sanity/data-uri-iframe.js") // The test brlow requires beginFrameControl which is currently not supported @@ -674,144 +631,68 @@ HEADLESS_PROTOCOL_TEST(MAYBE_IOCommandAfterInput, "input/io-command-after-input.js") -#define HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( \ - TEST_NAME, SCRIPT_NAME, COMMAND_LINE_EXTRAS) \ - \ - class HeadlessProtocolBrowserTestWithCommandLineExtras_##TEST_NAME \ - : public HeadlessProtocolBrowserTest { \ - public: \ - void SetUpCommandLine(base::CommandLine* command_line) override { \ - HeadlessProtocolBrowserTest::SetUpCommandLine(command_line); \ - AppendCommandLineExtras(command_line, COMMAND_LINE_EXTRAS); \ - } \ - }; \ - \ - IN_PROC_BROWSER_TEST_F( \ - HeadlessProtocolBrowserTestWithCommandLineExtras_##TEST_NAME, \ - TEST_NAME) { \ - test_folder_ = "/protocol/"; \ - script_name_ = SCRIPT_NAME; \ - RunTest(); \ - } +HEADLESS_PROTOCOL_TEST(ScreenScaleFactor, "sanity/screen-scale-factor.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - ScreenScaleFactor, - "sanity/screen-scale-factor.js", - "--screen-info={devicePixelRatio=3.0}") +HEADLESS_PROTOCOL_TEST(ScreenWorkArea, "sanity/screen-work-area.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - ScreenWorkArea, - "sanity/screen-work-area.js", - "--screen-info={ workAreaLeft=100 workAreaRight=100" - " workAreaTop=100 workAreaBottom=100 }") +HEADLESS_PROTOCOL_TEST(ScreenSizeOrientation, + "sanity/screen-size-orientation.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - ScreenSizeOrientation, - "sanity/screen-size-orientation.js", - "--screen-info={600x800}") +HEADLESS_PROTOCOL_TEST(ScreenRotationAngle, "sanity/screen-rotation-angle.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - ScreenRotationAngle, - "sanity/screen-rotation-angle.js", - "--screen-info={rotation=180}") +HEADLESS_PROTOCOL_TEST(ScreenOrientationLockNaturalLandscape, + "sanity/screen-orientation-lock-natural-landscape.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - ScreenOrientationLockNaturalLandscape, - "sanity/screen-orientation-lock-natural-landscape.js", - "--screen-info={800x600}") +HEADLESS_PROTOCOL_TEST(ScreenOrientationLockNaturalPortrait, + "sanity/screen-orientation-lock-natural-portrait.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - ScreenOrientationLockNaturalPortrait, - "sanity/screen-orientation-lock-natural-portrait.js", - "--screen-info={600x800}") +HEADLESS_PROTOCOL_TEST(ScreenDetailsMultipleScreens, + "sanity/screen-details-multiple-screens.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - ScreenDetailsMultipleScreens, - "sanity/screen-details-multiple-screens.js", - "--screen-info={ label='1st screen' }{ 600x800 label='2nd screen' }") +HEADLESS_PROTOCOL_TEST(ScreenDetailsPixelRatioAndColorDepth, + "sanity/screen-details-pixel-ratio-and-color-depth.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - ScreenDetailsPixelRatioAndColorDepth, - "sanity/screen-details-pixel-ratio-and-color-depth.js", - "--screen-info={ label='Screen' devicePixelRatio=3.0 colorDepth=32 }") +HEADLESS_PROTOCOL_TEST(RequestFullscreen, "sanity/request-fullscreen.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - RequestFullscreen, - "sanity/request-fullscreen.js", - "--screen-info={ 800x600 } --window-size=400,200") +HEADLESS_PROTOCOL_TEST(WindowOpenOnSecondaryScreen, + "sanity/window-open-on-secondary-screen.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - WindowOpenOnSecondaryScreen, - "sanity/window-open-on-secondary-screen.js", - "--screen-info={ label='1st screen' }{ label='2nd screen' }") +HEADLESS_PROTOCOL_TEST(RequestFullscreenOnSecondaryScreen, + "sanity/request-fullscreen-on-secondary-screen.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - RequestFullscreenOnSecondaryScreen, - "sanity/request-fullscreen-on-secondary-screen.js", - "--screen-info={ label='1st screen' }{ 600x800 label='2nd screen' }") +HEADLESS_PROTOCOL_TEST(ScreenRotationSecondaryScreen, + "sanity/screen-rotation-secondary-screen.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - ScreenRotationSecondaryScreen, - "sanity/screen-rotation-secondary-screen.js", - "--screen-info={ label='1st screen' }{ 600x800 label='2nd screen' }") +HEADLESS_PROTOCOL_TEST(MoveWindowBetweenScreens, + "sanity/move-window-between-screens.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - MoveWindowBetweenScreens, - "sanity/move-window-between-screens.js", - "--screen-info={label='#1'}{label='#2'}{0,600 label='#3'}{label='#4'}") +HEADLESS_PROTOCOL_TEST(CreateTargetSecondaryScreen, + "sanity/create-target-secondary-screen.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - CreateTargetSecondaryScreen, - "sanity/create-target-secondary-screen.js", - "--screen-info={label='#1'}{label='#2'}") +HEADLESS_PROTOCOL_TEST(CreateTargetWindowState, + "sanity/create-target-window-state.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - CreateTargetWindowState, - "sanity/create-target-window-state.js", - "--screen-info={1600x1200}") +HEADLESS_PROTOCOL_TEST(MultipleScreenDetails, + "sanity/multiple-screen-details.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - MultipleScreenDetails, - "sanity/multiple-screen-details.js", - "--screen-info={label='#1'}{600x800 label='#2'}") +HEADLESS_PROTOCOL_TEST(WindowOpenPopupPlacement, + "sanity/window-open-popup-placement.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - WindowOpenPopupPlacement, - "sanity/window-open-popup-placement.js", - "--screen-info={1600x1200}") +HEADLESS_PROTOCOL_TEST(WindowSizeSwitchHandling, + "sanity/window-size-switch-handling.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - WindowSizeSwitchHandling, - "sanity/window-size-switch-handling.js", - "--screen-info={1600x1200} --window-size=700,500") +HEADLESS_PROTOCOL_TEST(WindowSizeSwitchLargerThanScreen, + "sanity/window-size-switch-larger-than-screen.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - WindowSizeSwitchLargerThanScreen, - "sanity/window-size-switch-larger-than-screen.js", - "--screen-info={800x600} --window-size=1600,1200") +HEADLESS_PROTOCOL_TEST(WindowScreenAvail, "sanity/window-screen-avail.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - WindowScreenAvail, - "sanity/window-screen-avail.js", - "--screen-info={800x600" - " workAreaLeft=10 workAreaRight=90" - " workAreaTop=20 workAreaBottom=80}") +HEADLESS_PROTOCOL_TEST(WindowStateTransitions, + "sanity/window-state-transitions.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - WindowStateTransitions, - "sanity/window-state-transitions.js", - "--screen-info={1600x1200}") +HEADLESS_PROTOCOL_TEST(WindowZoomOnSecondaryScreen, + "sanity/window-zoom-on-secondary-screen.js") -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - WindowZoomOnSecondaryScreen, - "sanity/window-zoom-on-secondary-screen.js", - "--screen-info={1600x1200}{1200x1600}") - -HEADLESS_PROTOCOL_TEST_WITH_COMMAND_LINE_EXTRAS( - WindowZoomSizeMatchesWorkArea, - "sanity/window-zoom-size-matches-work-area.js", - "--screen-info={800x600 " - " workAreaLeft=10 workAreaRight=90" - " workAreaTop=20 workAreaBottom=80}") +HEADLESS_PROTOCOL_TEST(WindowZoomSizeMatchesWorkArea, + "sanity/window-zoom-size-matches-work-area.js") } // namespace headless
diff --git a/headless/test/headless_protocol_browsertest.h b/headless/test/headless_protocol_browsertest.h index cd05c600..ba1ec545 100644 --- a/headless/test/headless_protocol_browsertest.h +++ b/headless/test/headless_protocol_browsertest.h
@@ -11,6 +11,7 @@ #include "base/command_line.h" #include "base/values.h" +#include "components/headless/test/test_meta_info.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/test/browser_test.h" #include "headless/test/headless_browser_test.h" @@ -24,10 +25,16 @@ ~HeadlessProtocolBrowserTest() override; protected: - void SetUpCommandLine(base::CommandLine* command_line) override; + // Implement this to provide the relative script name; + virtual std::string GetScriptName() = 0; + // Implement this for tests that need to pass extra parameters to + // JavaScript test body. virtual base::Value::Dict GetPageUrlExtraParams(); + void SetUp() override; + void SetUpCommandLine(base::CommandLine* command_line) override; + private: // HeadlessWebContentsObserver implementation. void RunDevTooledTest() override; @@ -41,11 +48,39 @@ void FinishTest(); protected: + void LoadTestMetaInfo(); + + TestMetaInfo test_meta_info_; bool test_finished_ = false; - std::string test_folder_; - std::string script_name_; }; +#define HEADLESS_PROTOCOL_TEST(TEST_NAME, SCRIPT_NAME) \ + HEADLESS_PROTOCOL_TEST_F(HeadlessProtocolBrowserTest, TEST_NAME, SCRIPT_NAME) + +#define HEADLESS_PROTOCOL_TEST_F(FIXTURE_NAME, TEST_NAME, SCRIPT_NAME) \ + class FIXTURE_NAME##_##TEST_NAME : public FIXTURE_NAME { \ + public: \ + std::string GetScriptName() override { \ + return SCRIPT_NAME; \ + } \ + }; \ + \ + IN_PROC_BROWSER_TEST_F(FIXTURE_NAME##_##TEST_NAME, TEST_NAME) { \ + RunTest(); \ + } + +#define HEADLESS_PROTOCOL_TEST_P(FIXTURE_NAME, TEST_NAME, SCRIPT_NAME) \ + class FIXTURE_NAME##_##TEST_NAME : public FIXTURE_NAME { \ + public: \ + std::string GetScriptName() override { \ + return SCRIPT_NAME; \ + } \ + }; \ + \ + IN_PROC_BROWSER_TEST_P(FIXTURE_NAME##_##TEST_NAME, TEST_NAME) { \ + RunTest(); \ + } + } // namespace headless #endif // HEADLESS_TEST_HEADLESS_PROTOCOL_BROWSERTEST_H_
diff --git a/infra/config/generated/builders/ci/ios-blink-rel-fyi/properties.json b/infra/config/generated/builders/ci/ios-blink-rel-fyi/properties.json index 700cdef..cbff58c5 100644 --- a/infra/config/generated/builders/ci/ios-blink-rel-fyi/properties.json +++ b/infra/config/generated/builders/ci/ios-blink-rel-fyi/properties.json
@@ -71,5 +71,5 @@ }, "builder_group": "chromium.fyi", "recipe": "chromium", - "xcode_build_version": "17a5241e" + "xcode_build_version": "17a5241o" } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-blink-rel-fyi/targets/chromium.fyi.json b/infra/config/generated/builders/ci/ios-blink-rel-fyi/targets/chromium.fyi.json index 8530a77..9b0251f3 100644 --- a/infra/config/generated/builders/ci/ios-blink-rel-fyi/targets/chromium.fyi.json +++ b/infra/config/generated/builders/ci/ios-blink-rel-fyi/targets/chromium.fyi.json
@@ -9,17 +9,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "absl_hardening_tests iPhone 15 18.4", + "name": "absl_hardening_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -38,11 +38,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -50,24 +50,24 @@ }, "test": "absl_hardening_tests", "test_id_prefix": "ninja://third_party/abseil-cpp:absl_hardening_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "angle_unittests iPhone 15 18.4", + "name": "angle_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -86,11 +86,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -99,7 +99,7 @@ "test": "angle_unittests", "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/", "use_isolated_scripts_api": true, - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -108,17 +108,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "base_unittests iPhone 15 18.4", + "name": "base_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -137,11 +137,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -149,24 +149,24 @@ }, "test": "base_unittests", "test_id_prefix": "ninja://base:base_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "blink_common_unittests iPhone 15 18.4", + "name": "blink_common_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -185,11 +185,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -197,24 +197,24 @@ }, "test": "blink_common_unittests", "test_id_prefix": "ninja://third_party/blink/common:blink_common_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "blink_fuzzer_unittests iPhone 15 18.4", + "name": "blink_fuzzer_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -233,11 +233,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -245,24 +245,24 @@ }, "test": "blink_fuzzer_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_fuzzer_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "blink_heap_unittests iPhone 15 18.4", + "name": "blink_heap_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -281,11 +281,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -293,7 +293,7 @@ }, "test": "blink_heap_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/platform/heap:blink_heap_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -303,17 +303,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "blink_platform_unittests iPhone 15 18.4", + "name": "blink_platform_unittests iPhone 15 26.0", "precommit_args": [ "--gerrit-issue=${patch_issue}", "--gerrit-patchset=${patch_set}", @@ -337,11 +337,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -349,24 +349,24 @@ }, "test": "blink_platform_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "boringssl_crypto_tests iPhone 15 18.4", + "name": "boringssl_crypto_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -385,11 +385,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -397,24 +397,24 @@ }, "test": "boringssl_crypto_tests", "test_id_prefix": "ninja://third_party/boringssl:boringssl_crypto_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "boringssl_ssl_tests iPhone 15 18.4", + "name": "boringssl_ssl_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -433,11 +433,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -445,24 +445,24 @@ }, "test": "boringssl_ssl_tests", "test_id_prefix": "ninja://third_party/boringssl:boringssl_ssl_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "capture_unittests iPhone 15 18.4", + "name": "capture_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -481,11 +481,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -493,24 +493,24 @@ }, "test": "capture_unittests", "test_id_prefix": "ninja://media/capture:capture_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "cast_unittests iPhone 15 18.4", + "name": "cast_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -529,11 +529,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -541,7 +541,7 @@ }, "test": "cast_unittests", "test_id_prefix": "ninja://media/cast:cast_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -551,17 +551,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "cc_unittests iPhone 15 18.4", + "name": "cc_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -580,11 +580,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -592,7 +592,7 @@ }, "test": "cc_unittests", "test_id_prefix": "ninja://cc:cc_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -601,17 +601,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "components_browsertests iPhone 15 18.4", + "name": "components_browsertests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -630,11 +630,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -642,7 +642,7 @@ }, "test": "components_browsertests", "test_id_prefix": "ninja://components:components_browsertests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -651,17 +651,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "components_unittests iPhone 15 18.4", + "name": "components_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -680,11 +680,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -692,7 +692,7 @@ }, "test": "components_unittests", "test_id_prefix": "ninja://components:components_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -701,17 +701,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "compositor_unittests iPhone 15 18.4", + "name": "compositor_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -730,11 +730,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -742,7 +742,7 @@ }, "test": "compositor_unittests", "test_id_prefix": "ninja://ui/compositor:compositor_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -751,17 +751,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "content_browsertests iPhone 15 18.4", + "name": "content_browsertests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -780,11 +780,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -793,7 +793,7 @@ }, "test": "content_browsertests", "test_id_prefix": "ninja://content/test:content_browsertests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -802,17 +802,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "content_unittests iPhone 15 18.4", + "name": "content_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -831,11 +831,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -843,24 +843,24 @@ }, "test": "content_unittests", "test_id_prefix": "ninja://content/test:content_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "crashpad_tests iPhone 15 18.4", + "name": "crashpad_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -879,11 +879,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -891,24 +891,24 @@ }, "test": "crashpad_tests", "test_id_prefix": "ninja://third_party/crashpad/crashpad:crashpad_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "crypto_unittests iPhone 15 18.4", + "name": "crypto_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -927,11 +927,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -939,24 +939,24 @@ }, "test": "crypto_unittests", "test_id_prefix": "ninja://crypto:crypto_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "device_unittests iPhone 15 18.4", + "name": "device_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -975,11 +975,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -987,24 +987,24 @@ }, "test": "device_unittests", "test_id_prefix": "ninja://device:device_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "display_unittests iPhone 15 18.4", + "name": "display_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1023,11 +1023,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1035,24 +1035,24 @@ }, "test": "display_unittests", "test_id_prefix": "ninja://ui/display:display_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "env_chromium_unittests iPhone 15 18.4", + "name": "env_chromium_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1071,11 +1071,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1083,24 +1083,24 @@ }, "test": "env_chromium_unittests", "test_id_prefix": "ninja://third_party/leveldatabase:env_chromium_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "events_unittests iPhone 15 18.4", + "name": "events_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1119,11 +1119,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1131,24 +1131,24 @@ }, "test": "events_unittests", "test_id_prefix": "ninja://ui/events:events_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gcm_unit_tests iPhone 15 18.4", + "name": "gcm_unit_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1167,11 +1167,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1179,7 +1179,7 @@ }, "test": "gcm_unit_tests", "test_id_prefix": "ninja://google_apis/gcm:gcm_unit_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1188,17 +1188,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gfx_unittests iPhone 15 18.4", + "name": "gfx_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1217,11 +1217,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1229,24 +1229,24 @@ }, "test": "gfx_unittests", "test_id_prefix": "ninja://ui/gfx:gfx_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gin_unittests iPhone 15 18.4", + "name": "gin_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1265,11 +1265,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1277,24 +1277,24 @@ }, "test": "gin_unittests", "test_id_prefix": "ninja://gin:gin_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gl_unittests iPhone 15 18.4", + "name": "gl_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1313,11 +1313,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1325,24 +1325,24 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "google_apis_unittests iPhone 15 18.4", + "name": "google_apis_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1361,11 +1361,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1373,7 +1373,7 @@ }, "test": "google_apis_unittests", "test_id_prefix": "ninja://google_apis:google_apis_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1382,17 +1382,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gpu_unittests iPhone 15 18.4", + "name": "gpu_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1411,11 +1411,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1423,24 +1423,24 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gwp_asan_unittests iPhone 15 18.4", + "name": "gwp_asan_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1459,11 +1459,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1471,24 +1471,24 @@ }, "test": "gwp_asan_unittests", "test_id_prefix": "ninja://components/gwp_asan:gwp_asan_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "latency_unittests iPhone 15 18.4", + "name": "latency_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1507,11 +1507,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1519,24 +1519,24 @@ }, "test": "latency_unittests", "test_id_prefix": "ninja://ui/latency:latency_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "leveldb_unittests iPhone 15 18.4", + "name": "leveldb_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1555,11 +1555,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1567,24 +1567,24 @@ }, "test": "leveldb_unittests", "test_id_prefix": "ninja://third_party/leveldatabase:leveldb_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "libjingle_xmpp_unittests iPhone 15 18.4", + "name": "libjingle_xmpp_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1603,11 +1603,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1615,24 +1615,24 @@ }, "test": "libjingle_xmpp_unittests", "test_id_prefix": "ninja://third_party/libjingle_xmpp:libjingle_xmpp_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "liburlpattern_unittests iPhone 15 18.4", + "name": "liburlpattern_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1651,11 +1651,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1663,7 +1663,7 @@ }, "test": "liburlpattern_unittests", "test_id_prefix": "ninja://third_party/liburlpattern:liburlpattern_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1672,17 +1672,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "media_unittests iPhone 15 18.4", + "name": "media_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1701,11 +1701,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1713,7 +1713,7 @@ }, "test": "media_unittests", "test_id_prefix": "ninja://media:media_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1726,17 +1726,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "media_unittests_skia_graphite_dawn iPhone 15 18.4", + "name": "media_unittests_skia_graphite_dawn iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1755,11 +1755,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1767,7 +1767,7 @@ }, "test": "media_unittests", "test_id_prefix": "ninja://media:media_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1780,17 +1780,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "media_unittests_skia_graphite_metal iPhone 15 18.4", + "name": "media_unittests_skia_graphite_metal iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1809,11 +1809,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1821,24 +1821,24 @@ }, "test": "media_unittests", "test_id_prefix": "ninja://media:media_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "midi_unittests iPhone 15 18.4", + "name": "midi_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1857,11 +1857,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1869,7 +1869,7 @@ }, "test": "midi_unittests", "test_id_prefix": "ninja://media/midi:midi_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1878,17 +1878,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "mojo_unittests iPhone 15 18.4", + "name": "mojo_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1907,11 +1907,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1919,24 +1919,24 @@ }, "test": "mojo_unittests", "test_id_prefix": "ninja://mojo:mojo_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "native_theme_unittests iPhone 15 18.4", + "name": "native_theme_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1955,11 +1955,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1967,24 +1967,24 @@ }, "test": "native_theme_unittests", "test_id_prefix": "ninja://ui/native_theme:native_theme_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "net_unittests iPhone 15 18.4", + "name": "net_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2003,11 +2003,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2015,24 +2015,24 @@ }, "test": "net_unittests", "test_id_prefix": "ninja://net:net_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "perfetto_unittests iPhone 15 18.4", + "name": "perfetto_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2051,11 +2051,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2063,24 +2063,24 @@ }, "test": "perfetto_unittests", "test_id_prefix": "ninja://third_party/perfetto:perfetto_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "printing_unittests iPhone 15 18.4", + "name": "printing_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2099,11 +2099,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2111,24 +2111,24 @@ }, "test": "printing_unittests", "test_id_prefix": "ninja://printing:printing_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "sandbox_unittests iPhone 15 18.4", + "name": "sandbox_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2147,11 +2147,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2159,7 +2159,7 @@ }, "test": "sandbox_unittests", "test_id_prefix": "ninja://sandbox:sandbox_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -2167,17 +2167,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "services_unittests iPhone 15 18.4", + "name": "services_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2196,11 +2196,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2208,24 +2208,24 @@ }, "test": "services_unittests", "test_id_prefix": "ninja://services:services_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "shell_dialogs_unittests iPhone 15 18.4", + "name": "shell_dialogs_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2244,11 +2244,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2256,24 +2256,24 @@ }, "test": "shell_dialogs_unittests", "test_id_prefix": "ninja://ui/shell_dialogs:shell_dialogs_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "skia_unittests iPhone 15 18.4", + "name": "skia_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2292,11 +2292,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2304,24 +2304,24 @@ }, "test": "skia_unittests", "test_id_prefix": "ninja://skia:skia_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "sql_unittests iPhone 15 18.4", + "name": "sql_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2340,11 +2340,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2352,24 +2352,24 @@ }, "test": "sql_unittests", "test_id_prefix": "ninja://sql:sql_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "storage_unittests iPhone 15 18.4", + "name": "storage_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2388,11 +2388,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2400,7 +2400,7 @@ }, "test": "storage_unittests", "test_id_prefix": "ninja://storage:storage_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -2408,17 +2408,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "ui_base_unittests iPhone 15 18.4", + "name": "ui_base_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2437,11 +2437,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2449,24 +2449,24 @@ }, "test": "ui_base_unittests", "test_id_prefix": "ninja://ui/base:ui_base_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "ui_touch_selection_unittests iPhone 15 18.4", + "name": "ui_touch_selection_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2485,11 +2485,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2497,24 +2497,24 @@ }, "test": "ui_touch_selection_unittests", "test_id_prefix": "ninja://ui/touch_selection:ui_touch_selection_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "ui_unittests iPhone 15 18.4", + "name": "ui_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2533,11 +2533,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2545,24 +2545,24 @@ }, "test": "ui_unittests", "test_id_prefix": "ninja://ui/tests:ui_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "url_unittests iPhone 15 18.4", + "name": "url_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2581,11 +2581,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2593,7 +2593,7 @@ }, "test": "url_unittests", "test_id_prefix": "ninja://url:url_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -2603,17 +2603,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "viz_unittests iPhone 15 18.4", + "name": "viz_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2632,11 +2632,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2644,24 +2644,24 @@ }, "test": "viz_unittests", "test_id_prefix": "ninja://components/viz:viz_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "wtf_unittests iPhone 15 18.4", + "name": "wtf_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2680,11 +2680,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2692,24 +2692,24 @@ }, "test": "wtf_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/platform/wtf:wtf_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "zlib_unittests iPhone 15 18.4", + "name": "zlib_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2728,11 +2728,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2740,7 +2740,7 @@ }, "test": "zlib_unittests", "test_id_prefix": "ninja://third_party/zlib:zlib_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" } ] }
diff --git a/infra/config/generated/builders/ci/ios18-sdk-simulator/properties.json b/infra/config/generated/builders/ci/ios18-sdk-simulator/properties.json index 72d17f1..a66c95daf 100644 --- a/infra/config/generated/builders/ci/ios18-sdk-simulator/properties.json +++ b/infra/config/generated/builders/ci/ios18-sdk-simulator/properties.json
@@ -70,5 +70,5 @@ }, "builder_group": "chromium.fyi", "recipe": "chromium", - "xcode_build_version": "17a5241e" + "xcode_build_version": "17a5241o" } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios18-sdk-simulator/targets/chromium.fyi.json b/infra/config/generated/builders/ci/ios18-sdk-simulator/targets/chromium.fyi.json index c03b57e..1f47045 100644 --- a/infra/config/generated/builders/ci/ios18-sdk-simulator/targets/chromium.fyi.json +++ b/infra/config/generated/builders/ci/ios18-sdk-simulator/targets/chromium.fyi.json
@@ -13,7 +13,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -42,7 +42,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -61,7 +61,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -90,7 +90,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -109,7 +109,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -138,7 +138,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -157,7 +157,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -186,7 +186,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -205,7 +205,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -234,7 +234,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -253,7 +253,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -282,7 +282,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -301,7 +301,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -330,7 +330,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -349,7 +349,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -378,7 +378,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -397,7 +397,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -426,7 +426,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -445,7 +445,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -474,7 +474,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -493,7 +493,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -522,7 +522,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -541,7 +541,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -570,7 +570,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -589,7 +589,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -618,7 +618,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -637,7 +637,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -666,7 +666,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -685,7 +685,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -714,7 +714,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -733,7 +733,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -762,7 +762,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -781,7 +781,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -810,7 +810,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -829,7 +829,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -858,7 +858,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -877,7 +877,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -906,7 +906,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -925,7 +925,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -954,7 +954,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -973,7 +973,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1002,7 +1002,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1024,7 +1024,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1053,7 +1053,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1075,7 +1075,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1104,7 +1104,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1123,7 +1123,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1152,7 +1152,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1171,7 +1171,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1200,7 +1200,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1219,7 +1219,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1248,7 +1248,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1267,7 +1267,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1296,7 +1296,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1315,7 +1315,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1344,7 +1344,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1364,7 +1364,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1393,7 +1393,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1413,7 +1413,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1442,7 +1442,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1461,7 +1461,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1490,7 +1490,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1510,7 +1510,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1539,7 +1539,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1559,7 +1559,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1588,7 +1588,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1607,7 +1607,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1636,7 +1636,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1655,7 +1655,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1684,7 +1684,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1703,7 +1703,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1732,7 +1732,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1751,7 +1751,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1780,7 +1780,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1799,7 +1799,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1828,7 +1828,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1847,7 +1847,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1876,7 +1876,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1895,7 +1895,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1924,7 +1924,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1943,7 +1943,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1972,7 +1972,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1991,7 +1991,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2020,7 +2020,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2039,7 +2039,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2068,7 +2068,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2087,7 +2087,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2116,7 +2116,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2135,7 +2135,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2164,7 +2164,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2183,7 +2183,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2212,7 +2212,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2231,7 +2231,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2260,7 +2260,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2279,7 +2279,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2308,7 +2308,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2327,7 +2327,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2356,7 +2356,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2375,7 +2375,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2404,7 +2404,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2423,7 +2423,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2452,7 +2452,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2471,7 +2471,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2500,7 +2500,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2519,7 +2519,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2548,7 +2548,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2567,7 +2567,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2596,7 +2596,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ],
diff --git a/infra/config/generated/builders/ci/ios26-beta-simulator/targets/chromium.fyi.json b/infra/config/generated/builders/ci/ios26-beta-simulator/targets/chromium.fyi.json index 59127e2..229c10c 100644 --- a/infra/config/generated/builders/ci/ios26-beta-simulator/targets/chromium.fyi.json +++ b/infra/config/generated/builders/ci/ios26-beta-simulator/targets/chromium.fyi.json
@@ -13,7 +13,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -42,7 +42,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -61,7 +61,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -90,7 +90,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -109,7 +109,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -138,7 +138,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -157,7 +157,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -186,7 +186,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -205,7 +205,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -234,7 +234,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -253,7 +253,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -282,7 +282,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -301,7 +301,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -330,7 +330,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -349,7 +349,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -378,7 +378,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -397,7 +397,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -426,7 +426,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -445,7 +445,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -474,7 +474,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -493,7 +493,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -522,7 +522,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -541,7 +541,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -570,7 +570,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -589,7 +589,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -618,7 +618,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -637,7 +637,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -666,7 +666,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -685,7 +685,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -714,7 +714,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -733,7 +733,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -762,7 +762,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -781,7 +781,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -810,7 +810,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -829,7 +829,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -858,7 +858,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -877,7 +877,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -906,7 +906,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -925,7 +925,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -954,7 +954,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -973,7 +973,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1002,7 +1002,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1024,7 +1024,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1053,7 +1053,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1076,7 +1076,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1105,7 +1105,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1130,7 +1130,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1159,7 +1159,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1184,7 +1184,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1213,7 +1213,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1238,7 +1238,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1267,7 +1267,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1292,7 +1292,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1321,7 +1321,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1344,7 +1344,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1373,7 +1373,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1396,7 +1396,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1425,7 +1425,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1448,7 +1448,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1477,7 +1477,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1499,7 +1499,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1528,7 +1528,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1552,7 +1552,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1581,7 +1581,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1606,7 +1606,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1635,7 +1635,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1655,7 +1655,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1684,7 +1684,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1703,7 +1703,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1732,7 +1732,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1751,7 +1751,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1780,7 +1780,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1802,7 +1802,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1831,7 +1831,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1854,7 +1854,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1883,7 +1883,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1903,7 +1903,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1932,7 +1932,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1951,7 +1951,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1980,7 +1980,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2000,7 +2000,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2029,7 +2029,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2049,7 +2049,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2078,7 +2078,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2097,7 +2097,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2126,7 +2126,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2146,7 +2146,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2175,7 +2175,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2195,7 +2195,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2224,7 +2224,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2243,7 +2243,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2272,7 +2272,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2291,7 +2291,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2320,7 +2320,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2339,7 +2339,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2368,7 +2368,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2387,7 +2387,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2416,7 +2416,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2438,7 +2438,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2467,7 +2467,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2489,7 +2489,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2518,7 +2518,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2537,7 +2537,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2566,7 +2566,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2585,7 +2585,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2614,7 +2614,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2633,7 +2633,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2662,7 +2662,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2681,7 +2681,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2710,7 +2710,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2729,7 +2729,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2758,7 +2758,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2777,7 +2777,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2806,7 +2806,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2825,7 +2825,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2854,7 +2854,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2873,7 +2873,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2902,7 +2902,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2921,7 +2921,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2950,7 +2950,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2969,7 +2969,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2998,7 +2998,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3017,7 +3017,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3046,7 +3046,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3065,7 +3065,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3094,7 +3094,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3113,7 +3113,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3142,7 +3142,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3161,7 +3161,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3190,7 +3190,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3209,7 +3209,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3238,7 +3238,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3257,7 +3257,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3286,7 +3286,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3305,7 +3305,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3334,7 +3334,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3353,7 +3353,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3382,7 +3382,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3401,7 +3401,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3430,7 +3430,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3449,7 +3449,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3478,7 +3478,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3497,7 +3497,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3526,7 +3526,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3545,7 +3545,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3574,7 +3574,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3593,7 +3593,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3622,7 +3622,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ],
diff --git a/infra/config/generated/builders/ci/ios26-sdk-simulator/properties.json b/infra/config/generated/builders/ci/ios26-sdk-simulator/properties.json index 3dd0caa..968b4c1 100644 --- a/infra/config/generated/builders/ci/ios26-sdk-simulator/properties.json +++ b/infra/config/generated/builders/ci/ios26-sdk-simulator/properties.json
@@ -70,5 +70,5 @@ }, "builder_group": "chromium.fyi", "recipe": "chromium", - "xcode_build_version": "17a5241e" + "xcode_build_version": "17a5241o" } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios26-sdk-simulator/targets/chromium.fyi.json b/infra/config/generated/builders/ci/ios26-sdk-simulator/targets/chromium.fyi.json index 6460a45..b9f79a7e 100644 --- a/infra/config/generated/builders/ci/ios26-sdk-simulator/targets/chromium.fyi.json +++ b/infra/config/generated/builders/ci/ios26-sdk-simulator/targets/chromium.fyi.json
@@ -14,7 +14,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -43,7 +43,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -64,7 +64,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -93,7 +93,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -116,7 +116,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -145,7 +145,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -168,7 +168,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -197,7 +197,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -220,7 +220,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -249,7 +249,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -272,7 +272,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -301,7 +301,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -322,7 +322,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -351,7 +351,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -372,7 +372,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -401,7 +401,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -424,7 +424,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -453,7 +453,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -476,7 +476,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -505,7 +505,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -526,7 +526,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -555,7 +555,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -576,7 +576,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -605,7 +605,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -625,7 +625,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -654,7 +654,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -673,7 +673,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -702,7 +702,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -721,7 +721,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -750,7 +750,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -770,7 +770,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -799,7 +799,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -819,7 +819,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -848,7 +848,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -867,7 +867,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -896,7 +896,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -915,7 +915,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -944,7 +944,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -963,7 +963,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -992,7 +992,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ],
diff --git a/infra/config/generated/builders/try/ios-blink-rel-fyi/properties.json b/infra/config/generated/builders/try/ios-blink-rel-fyi/properties.json index 6701b78..5daaf16 100644 --- a/infra/config/generated/builders/try/ios-blink-rel-fyi/properties.json +++ b/infra/config/generated/builders/try/ios-blink-rel-fyi/properties.json
@@ -64,5 +64,5 @@ }, "builder_group": "tryserver.chromium.mac", "recipe": "chromium_trybot", - "xcode_build_version": "17a5241e" + "xcode_build_version": "17a5241o" } \ No newline at end of file
diff --git a/infra/config/generated/builders/try/ios-blink-rel-fyi/targets/chromium.fyi.json b/infra/config/generated/builders/try/ios-blink-rel-fyi/targets/chromium.fyi.json index 8530a77..9b0251f3 100644 --- a/infra/config/generated/builders/try/ios-blink-rel-fyi/targets/chromium.fyi.json +++ b/infra/config/generated/builders/try/ios-blink-rel-fyi/targets/chromium.fyi.json
@@ -9,17 +9,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "absl_hardening_tests iPhone 15 18.4", + "name": "absl_hardening_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -38,11 +38,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -50,24 +50,24 @@ }, "test": "absl_hardening_tests", "test_id_prefix": "ninja://third_party/abseil-cpp:absl_hardening_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "angle_unittests iPhone 15 18.4", + "name": "angle_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -86,11 +86,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -99,7 +99,7 @@ "test": "angle_unittests", "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/", "use_isolated_scripts_api": true, - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -108,17 +108,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "base_unittests iPhone 15 18.4", + "name": "base_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -137,11 +137,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -149,24 +149,24 @@ }, "test": "base_unittests", "test_id_prefix": "ninja://base:base_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "blink_common_unittests iPhone 15 18.4", + "name": "blink_common_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -185,11 +185,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -197,24 +197,24 @@ }, "test": "blink_common_unittests", "test_id_prefix": "ninja://third_party/blink/common:blink_common_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "blink_fuzzer_unittests iPhone 15 18.4", + "name": "blink_fuzzer_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -233,11 +233,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -245,24 +245,24 @@ }, "test": "blink_fuzzer_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_fuzzer_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "blink_heap_unittests iPhone 15 18.4", + "name": "blink_heap_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -281,11 +281,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -293,7 +293,7 @@ }, "test": "blink_heap_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/platform/heap:blink_heap_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -303,17 +303,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "blink_platform_unittests iPhone 15 18.4", + "name": "blink_platform_unittests iPhone 15 26.0", "precommit_args": [ "--gerrit-issue=${patch_issue}", "--gerrit-patchset=${patch_set}", @@ -337,11 +337,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -349,24 +349,24 @@ }, "test": "blink_platform_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "boringssl_crypto_tests iPhone 15 18.4", + "name": "boringssl_crypto_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -385,11 +385,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -397,24 +397,24 @@ }, "test": "boringssl_crypto_tests", "test_id_prefix": "ninja://third_party/boringssl:boringssl_crypto_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "boringssl_ssl_tests iPhone 15 18.4", + "name": "boringssl_ssl_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -433,11 +433,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -445,24 +445,24 @@ }, "test": "boringssl_ssl_tests", "test_id_prefix": "ninja://third_party/boringssl:boringssl_ssl_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "capture_unittests iPhone 15 18.4", + "name": "capture_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -481,11 +481,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -493,24 +493,24 @@ }, "test": "capture_unittests", "test_id_prefix": "ninja://media/capture:capture_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "cast_unittests iPhone 15 18.4", + "name": "cast_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -529,11 +529,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -541,7 +541,7 @@ }, "test": "cast_unittests", "test_id_prefix": "ninja://media/cast:cast_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -551,17 +551,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "cc_unittests iPhone 15 18.4", + "name": "cc_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -580,11 +580,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -592,7 +592,7 @@ }, "test": "cc_unittests", "test_id_prefix": "ninja://cc:cc_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -601,17 +601,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "components_browsertests iPhone 15 18.4", + "name": "components_browsertests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -630,11 +630,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -642,7 +642,7 @@ }, "test": "components_browsertests", "test_id_prefix": "ninja://components:components_browsertests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -651,17 +651,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "components_unittests iPhone 15 18.4", + "name": "components_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -680,11 +680,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -692,7 +692,7 @@ }, "test": "components_unittests", "test_id_prefix": "ninja://components:components_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -701,17 +701,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "compositor_unittests iPhone 15 18.4", + "name": "compositor_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -730,11 +730,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -742,7 +742,7 @@ }, "test": "compositor_unittests", "test_id_prefix": "ninja://ui/compositor:compositor_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -751,17 +751,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "content_browsertests iPhone 15 18.4", + "name": "content_browsertests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -780,11 +780,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -793,7 +793,7 @@ }, "test": "content_browsertests", "test_id_prefix": "ninja://content/test:content_browsertests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -802,17 +802,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "content_unittests iPhone 15 18.4", + "name": "content_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -831,11 +831,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -843,24 +843,24 @@ }, "test": "content_unittests", "test_id_prefix": "ninja://content/test:content_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "crashpad_tests iPhone 15 18.4", + "name": "crashpad_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -879,11 +879,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -891,24 +891,24 @@ }, "test": "crashpad_tests", "test_id_prefix": "ninja://third_party/crashpad/crashpad:crashpad_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "crypto_unittests iPhone 15 18.4", + "name": "crypto_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -927,11 +927,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -939,24 +939,24 @@ }, "test": "crypto_unittests", "test_id_prefix": "ninja://crypto:crypto_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "device_unittests iPhone 15 18.4", + "name": "device_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -975,11 +975,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -987,24 +987,24 @@ }, "test": "device_unittests", "test_id_prefix": "ninja://device:device_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "display_unittests iPhone 15 18.4", + "name": "display_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1023,11 +1023,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1035,24 +1035,24 @@ }, "test": "display_unittests", "test_id_prefix": "ninja://ui/display:display_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "env_chromium_unittests iPhone 15 18.4", + "name": "env_chromium_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1071,11 +1071,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1083,24 +1083,24 @@ }, "test": "env_chromium_unittests", "test_id_prefix": "ninja://third_party/leveldatabase:env_chromium_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "events_unittests iPhone 15 18.4", + "name": "events_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1119,11 +1119,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1131,24 +1131,24 @@ }, "test": "events_unittests", "test_id_prefix": "ninja://ui/events:events_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gcm_unit_tests iPhone 15 18.4", + "name": "gcm_unit_tests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1167,11 +1167,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1179,7 +1179,7 @@ }, "test": "gcm_unit_tests", "test_id_prefix": "ninja://google_apis/gcm:gcm_unit_tests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1188,17 +1188,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gfx_unittests iPhone 15 18.4", + "name": "gfx_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1217,11 +1217,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1229,24 +1229,24 @@ }, "test": "gfx_unittests", "test_id_prefix": "ninja://ui/gfx:gfx_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gin_unittests iPhone 15 18.4", + "name": "gin_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1265,11 +1265,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1277,24 +1277,24 @@ }, "test": "gin_unittests", "test_id_prefix": "ninja://gin:gin_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gl_unittests iPhone 15 18.4", + "name": "gl_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1313,11 +1313,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1325,24 +1325,24 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "google_apis_unittests iPhone 15 18.4", + "name": "google_apis_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1361,11 +1361,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1373,7 +1373,7 @@ }, "test": "google_apis_unittests", "test_id_prefix": "ninja://google_apis:google_apis_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1382,17 +1382,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gpu_unittests iPhone 15 18.4", + "name": "gpu_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1411,11 +1411,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1423,24 +1423,24 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "gwp_asan_unittests iPhone 15 18.4", + "name": "gwp_asan_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1459,11 +1459,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1471,24 +1471,24 @@ }, "test": "gwp_asan_unittests", "test_id_prefix": "ninja://components/gwp_asan:gwp_asan_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "latency_unittests iPhone 15 18.4", + "name": "latency_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1507,11 +1507,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1519,24 +1519,24 @@ }, "test": "latency_unittests", "test_id_prefix": "ninja://ui/latency:latency_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "leveldb_unittests iPhone 15 18.4", + "name": "leveldb_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1555,11 +1555,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1567,24 +1567,24 @@ }, "test": "leveldb_unittests", "test_id_prefix": "ninja://third_party/leveldatabase:leveldb_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "libjingle_xmpp_unittests iPhone 15 18.4", + "name": "libjingle_xmpp_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1603,11 +1603,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1615,24 +1615,24 @@ }, "test": "libjingle_xmpp_unittests", "test_id_prefix": "ninja://third_party/libjingle_xmpp:libjingle_xmpp_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "liburlpattern_unittests iPhone 15 18.4", + "name": "liburlpattern_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1651,11 +1651,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1663,7 +1663,7 @@ }, "test": "liburlpattern_unittests", "test_id_prefix": "ninja://third_party/liburlpattern:liburlpattern_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1672,17 +1672,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "media_unittests iPhone 15 18.4", + "name": "media_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1701,11 +1701,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1713,7 +1713,7 @@ }, "test": "media_unittests", "test_id_prefix": "ninja://media:media_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1726,17 +1726,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "media_unittests_skia_graphite_dawn iPhone 15 18.4", + "name": "media_unittests_skia_graphite_dawn iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1755,11 +1755,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1767,7 +1767,7 @@ }, "test": "media_unittests", "test_id_prefix": "ninja://media:media_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1780,17 +1780,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "media_unittests_skia_graphite_metal iPhone 15 18.4", + "name": "media_unittests_skia_graphite_metal iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1809,11 +1809,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1821,24 +1821,24 @@ }, "test": "media_unittests", "test_id_prefix": "ninja://media:media_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "midi_unittests iPhone 15 18.4", + "name": "midi_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1857,11 +1857,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1869,7 +1869,7 @@ }, "test": "midi_unittests", "test_id_prefix": "ninja://media/midi:midi_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -1878,17 +1878,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "mojo_unittests iPhone 15 18.4", + "name": "mojo_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1907,11 +1907,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1919,24 +1919,24 @@ }, "test": "mojo_unittests", "test_id_prefix": "ninja://mojo:mojo_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "native_theme_unittests iPhone 15 18.4", + "name": "native_theme_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -1955,11 +1955,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1967,24 +1967,24 @@ }, "test": "native_theme_unittests", "test_id_prefix": "ninja://ui/native_theme:native_theme_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "net_unittests iPhone 15 18.4", + "name": "net_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2003,11 +2003,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2015,24 +2015,24 @@ }, "test": "net_unittests", "test_id_prefix": "ninja://net:net_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "perfetto_unittests iPhone 15 18.4", + "name": "perfetto_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2051,11 +2051,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2063,24 +2063,24 @@ }, "test": "perfetto_unittests", "test_id_prefix": "ninja://third_party/perfetto:perfetto_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "printing_unittests iPhone 15 18.4", + "name": "printing_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2099,11 +2099,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2111,24 +2111,24 @@ }, "test": "printing_unittests", "test_id_prefix": "ninja://printing:printing_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "sandbox_unittests iPhone 15 18.4", + "name": "sandbox_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2147,11 +2147,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2159,7 +2159,7 @@ }, "test": "sandbox_unittests", "test_id_prefix": "ninja://sandbox:sandbox_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -2167,17 +2167,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "services_unittests iPhone 15 18.4", + "name": "services_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2196,11 +2196,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2208,24 +2208,24 @@ }, "test": "services_unittests", "test_id_prefix": "ninja://services:services_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "shell_dialogs_unittests iPhone 15 18.4", + "name": "shell_dialogs_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2244,11 +2244,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2256,24 +2256,24 @@ }, "test": "shell_dialogs_unittests", "test_id_prefix": "ninja://ui/shell_dialogs:shell_dialogs_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "skia_unittests iPhone 15 18.4", + "name": "skia_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2292,11 +2292,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2304,24 +2304,24 @@ }, "test": "skia_unittests", "test_id_prefix": "ninja://skia:skia_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "sql_unittests iPhone 15 18.4", + "name": "sql_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2340,11 +2340,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2352,24 +2352,24 @@ }, "test": "sql_unittests", "test_id_prefix": "ninja://sql:sql_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "storage_unittests iPhone 15 18.4", + "name": "storage_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2388,11 +2388,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2400,7 +2400,7 @@ }, "test": "storage_unittests", "test_id_prefix": "ninja://storage:storage_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -2408,17 +2408,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "ui_base_unittests iPhone 15 18.4", + "name": "ui_base_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2437,11 +2437,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2449,24 +2449,24 @@ }, "test": "ui_base_unittests", "test_id_prefix": "ninja://ui/base:ui_base_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "ui_touch_selection_unittests iPhone 15 18.4", + "name": "ui_touch_selection_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2485,11 +2485,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2497,24 +2497,24 @@ }, "test": "ui_touch_selection_unittests", "test_id_prefix": "ninja://ui/touch_selection:ui_touch_selection_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "ui_unittests iPhone 15 18.4", + "name": "ui_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2533,11 +2533,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2545,24 +2545,24 @@ }, "test": "ui_unittests", "test_id_prefix": "ninja://ui/tests:ui_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "url_unittests iPhone 15 18.4", + "name": "url_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2581,11 +2581,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2593,7 +2593,7 @@ }, "test": "url_unittests", "test_id_prefix": "ninja://url:url_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ @@ -2603,17 +2603,17 @@ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "viz_unittests iPhone 15 18.4", + "name": "viz_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2632,11 +2632,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2644,24 +2644,24 @@ }, "test": "viz_unittests", "test_id_prefix": "ninja://components/viz:viz_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "wtf_unittests iPhone 15 18.4", + "name": "wtf_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2680,11 +2680,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2692,24 +2692,24 @@ }, "test": "wtf_unittests", "test_id_prefix": "ninja://third_party/blink/renderer/platform/wtf:wtf_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" }, { "args": [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "zlib_unittests iPhone 15 18.4", + "name": "zlib_unittests iPhone 15 26.0", "resultdb": { "enable": true, "has_native_resultdb_integration": true @@ -2728,11 +2728,11 @@ }, "named_caches": [ { - "name": "runtime_ios_18_4", - "path": "Runtime-ios-18.4" + "name": "runtime_ios_26_0", + "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2740,7 +2740,7 @@ }, "test": "zlib_unittests", "test_id_prefix": "ninja://third_party/zlib:zlib_unittests/", - "variant_id": "iPhone 15 18.4" + "variant_id": "iPhone 15 26.0" } ] }
diff --git a/infra/config/generated/builders/try/ios18-sdk-simulator/properties.json b/infra/config/generated/builders/try/ios18-sdk-simulator/properties.json index 5b35183c..d960981a 100644 --- a/infra/config/generated/builders/try/ios18-sdk-simulator/properties.json +++ b/infra/config/generated/builders/try/ios18-sdk-simulator/properties.json
@@ -63,5 +63,5 @@ }, "builder_group": "tryserver.chromium.mac", "recipe": "chromium_trybot", - "xcode_build_version": "17a5241e" + "xcode_build_version": "17a5241o" } \ No newline at end of file
diff --git a/infra/config/generated/builders/try/ios18-sdk-simulator/targets/chromium.fyi.json b/infra/config/generated/builders/try/ios18-sdk-simulator/targets/chromium.fyi.json index c03b57e..1f47045 100644 --- a/infra/config/generated/builders/try/ios18-sdk-simulator/targets/chromium.fyi.json +++ b/infra/config/generated/builders/try/ios18-sdk-simulator/targets/chromium.fyi.json
@@ -13,7 +13,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -42,7 +42,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -61,7 +61,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -90,7 +90,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -109,7 +109,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -138,7 +138,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -157,7 +157,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -186,7 +186,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -205,7 +205,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -234,7 +234,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -253,7 +253,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -282,7 +282,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -301,7 +301,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -330,7 +330,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -349,7 +349,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -378,7 +378,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -397,7 +397,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -426,7 +426,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -445,7 +445,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -474,7 +474,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -493,7 +493,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -522,7 +522,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -541,7 +541,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -570,7 +570,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -589,7 +589,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -618,7 +618,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -637,7 +637,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -666,7 +666,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -685,7 +685,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -714,7 +714,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -733,7 +733,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -762,7 +762,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -781,7 +781,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -810,7 +810,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -829,7 +829,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -858,7 +858,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -877,7 +877,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -906,7 +906,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -925,7 +925,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -954,7 +954,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -973,7 +973,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1002,7 +1002,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1024,7 +1024,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1053,7 +1053,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1075,7 +1075,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1104,7 +1104,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1123,7 +1123,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1152,7 +1152,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1171,7 +1171,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1200,7 +1200,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1219,7 +1219,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1248,7 +1248,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1267,7 +1267,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1296,7 +1296,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1315,7 +1315,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1344,7 +1344,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1364,7 +1364,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1393,7 +1393,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1413,7 +1413,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1442,7 +1442,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1461,7 +1461,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1490,7 +1490,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1510,7 +1510,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1539,7 +1539,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1559,7 +1559,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1588,7 +1588,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1607,7 +1607,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1636,7 +1636,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1655,7 +1655,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1684,7 +1684,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1703,7 +1703,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1732,7 +1732,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1751,7 +1751,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1780,7 +1780,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1799,7 +1799,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1828,7 +1828,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1847,7 +1847,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1876,7 +1876,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1895,7 +1895,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1924,7 +1924,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1943,7 +1943,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1972,7 +1972,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1991,7 +1991,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2020,7 +2020,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2039,7 +2039,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2068,7 +2068,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2087,7 +2087,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2116,7 +2116,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2135,7 +2135,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2164,7 +2164,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2183,7 +2183,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2212,7 +2212,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2231,7 +2231,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2260,7 +2260,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2279,7 +2279,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2308,7 +2308,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2327,7 +2327,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2356,7 +2356,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2375,7 +2375,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2404,7 +2404,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2423,7 +2423,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2452,7 +2452,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2471,7 +2471,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2500,7 +2500,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2519,7 +2519,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2548,7 +2548,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2567,7 +2567,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2596,7 +2596,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ],
diff --git a/infra/config/generated/builders/try/ios26-beta-simulator/targets/chromium.fyi.json b/infra/config/generated/builders/try/ios26-beta-simulator/targets/chromium.fyi.json index 59127e2..229c10c 100644 --- a/infra/config/generated/builders/try/ios26-beta-simulator/targets/chromium.fyi.json +++ b/infra/config/generated/builders/try/ios26-beta-simulator/targets/chromium.fyi.json
@@ -13,7 +13,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -42,7 +42,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -61,7 +61,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -90,7 +90,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -109,7 +109,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -138,7 +138,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -157,7 +157,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -186,7 +186,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -205,7 +205,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -234,7 +234,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -253,7 +253,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -282,7 +282,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -301,7 +301,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -330,7 +330,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -349,7 +349,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -378,7 +378,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -397,7 +397,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -426,7 +426,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -445,7 +445,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -474,7 +474,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -493,7 +493,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -522,7 +522,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -541,7 +541,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -570,7 +570,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -589,7 +589,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -618,7 +618,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -637,7 +637,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -666,7 +666,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -685,7 +685,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -714,7 +714,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -733,7 +733,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -762,7 +762,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -781,7 +781,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -810,7 +810,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -829,7 +829,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -858,7 +858,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -877,7 +877,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -906,7 +906,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -925,7 +925,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -954,7 +954,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -973,7 +973,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1002,7 +1002,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1024,7 +1024,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1053,7 +1053,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1076,7 +1076,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1105,7 +1105,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1130,7 +1130,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1159,7 +1159,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1184,7 +1184,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1213,7 +1213,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1238,7 +1238,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1267,7 +1267,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1292,7 +1292,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1321,7 +1321,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1344,7 +1344,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1373,7 +1373,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1396,7 +1396,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1425,7 +1425,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1448,7 +1448,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1477,7 +1477,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1499,7 +1499,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1528,7 +1528,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1552,7 +1552,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1581,7 +1581,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1606,7 +1606,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1635,7 +1635,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1655,7 +1655,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1684,7 +1684,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1703,7 +1703,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1732,7 +1732,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1751,7 +1751,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1780,7 +1780,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1802,7 +1802,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1831,7 +1831,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1854,7 +1854,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1883,7 +1883,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1903,7 +1903,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1932,7 +1932,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -1951,7 +1951,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -1980,7 +1980,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2000,7 +2000,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2029,7 +2029,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2049,7 +2049,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2078,7 +2078,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2097,7 +2097,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2126,7 +2126,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2146,7 +2146,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2175,7 +2175,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2195,7 +2195,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2224,7 +2224,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2243,7 +2243,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2272,7 +2272,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2291,7 +2291,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2320,7 +2320,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2339,7 +2339,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2368,7 +2368,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2387,7 +2387,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2416,7 +2416,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2438,7 +2438,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2467,7 +2467,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2489,7 +2489,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2518,7 +2518,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2537,7 +2537,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2566,7 +2566,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2585,7 +2585,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2614,7 +2614,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2633,7 +2633,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2662,7 +2662,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2681,7 +2681,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2710,7 +2710,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2729,7 +2729,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2758,7 +2758,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2777,7 +2777,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2806,7 +2806,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2825,7 +2825,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2854,7 +2854,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2873,7 +2873,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2902,7 +2902,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2921,7 +2921,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2950,7 +2950,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -2969,7 +2969,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -2998,7 +2998,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3017,7 +3017,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3046,7 +3046,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3065,7 +3065,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3094,7 +3094,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3113,7 +3113,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3142,7 +3142,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3161,7 +3161,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3190,7 +3190,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3209,7 +3209,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3238,7 +3238,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3257,7 +3257,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3286,7 +3286,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3305,7 +3305,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3334,7 +3334,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3353,7 +3353,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3382,7 +3382,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3401,7 +3401,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3430,7 +3430,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3449,7 +3449,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3478,7 +3478,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3497,7 +3497,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3526,7 +3526,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3545,7 +3545,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3574,7 +3574,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -3593,7 +3593,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -3622,7 +3622,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ],
diff --git a/infra/config/generated/builders/try/ios26-sdk-simulator/properties.json b/infra/config/generated/builders/try/ios26-sdk-simulator/properties.json index 57c0e66..b72815f 100644 --- a/infra/config/generated/builders/try/ios26-sdk-simulator/properties.json +++ b/infra/config/generated/builders/try/ios26-sdk-simulator/properties.json
@@ -63,5 +63,5 @@ }, "builder_group": "tryserver.chromium.mac", "recipe": "chromium_trybot", - "xcode_build_version": "17a5241e" + "xcode_build_version": "17a5241o" } \ No newline at end of file
diff --git a/infra/config/generated/builders/try/ios26-sdk-simulator/targets/chromium.fyi.json b/infra/config/generated/builders/try/ios26-sdk-simulator/targets/chromium.fyi.json index 6460a45..b9f79a7e 100644 --- a/infra/config/generated/builders/try/ios26-sdk-simulator/targets/chromium.fyi.json +++ b/infra/config/generated/builders/try/ios26-sdk-simulator/targets/chromium.fyi.json
@@ -14,7 +14,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -43,7 +43,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -64,7 +64,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -93,7 +93,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -116,7 +116,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -145,7 +145,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -168,7 +168,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -197,7 +197,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -220,7 +220,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -249,7 +249,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -272,7 +272,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -301,7 +301,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -322,7 +322,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -351,7 +351,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -372,7 +372,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -401,7 +401,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -424,7 +424,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -453,7 +453,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -476,7 +476,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -505,7 +505,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -526,7 +526,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -555,7 +555,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -576,7 +576,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -605,7 +605,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -625,7 +625,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -654,7 +654,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -673,7 +673,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -702,7 +702,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -721,7 +721,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -750,7 +750,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -770,7 +770,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -799,7 +799,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -819,7 +819,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -848,7 +848,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -867,7 +867,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -896,7 +896,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -915,7 +915,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -944,7 +944,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ], @@ -963,7 +963,7 @@ "--out-dir", "${ISOLATED_OUTDIR}", "--xcode-build-version", - "17a5241e", + "17a5241o", "--xctest" ], "merge": { @@ -992,7 +992,7 @@ "path": "Runtime-ios-26.0" }, { - "name": "xcode_ios_17a5241e", + "name": "xcode_ios_17a5241o", "path": "Xcode.app" } ],
diff --git a/infra/config/generated/luci/cr-buildbucket.cfg b/infra/config/generated/luci/cr-buildbucket.cfg index 5c79c758..209c319e 100644 --- a/infra/config/generated/luci/cr-buildbucket.cfg +++ b/infra/config/generated/luci/cr-buildbucket.cfg
@@ -48578,8 +48578,8 @@ priority: 35 execution_timeout_secs: 10800 caches { - name: "xcode_ios_17a5241e" - path: "xcode_ios_17a5241e.app" + name: "xcode_ios_17a5241o" + path: "xcode_ios_17a5241o.app" } build_numbers: YES service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" @@ -50082,8 +50082,8 @@ priority: 35 execution_timeout_secs: 36000 caches { - name: "xcode_ios_17a5241e" - path: "xcode_ios_17a5241e.app" + name: "xcode_ios_17a5241o" + path: "xcode_ios_17a5241o.app" } build_numbers: YES service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" @@ -50308,8 +50308,8 @@ priority: 35 execution_timeout_secs: 36000 caches { - name: "xcode_ios_17a5241e" - path: "xcode_ios_17a5241e.app" + name: "xcode_ios_17a5241o" + path: "xcode_ios_17a5241o.app" } build_numbers: YES service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" @@ -98883,8 +98883,8 @@ seconds: 120 } caches { - name: "xcode_ios_17a5241e" - path: "xcode_ios_17a5241e.app" + name: "xcode_ios_17a5241o" + path: "xcode_ios_17a5241o.app" } build_numbers: YES service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" @@ -100362,8 +100362,8 @@ seconds: 120 } caches { - name: "xcode_ios_17a5241e" - path: "xcode_ios_17a5241e.app" + name: "xcode_ios_17a5241o" + path: "xcode_ios_17a5241o.app" } build_numbers: YES service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" @@ -100586,8 +100586,8 @@ seconds: 120 } caches { - name: "xcode_ios_17a5241e" - path: "xcode_ios_17a5241e.app" + name: "xcode_ios_17a5241o" + path: "xcode_ios_17a5241o.app" } build_numbers: YES service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com"
diff --git a/infra/config/generated/testing/mixins.pyl b/infra/config/generated/testing/mixins.pyl index 80f369c..2a0bb57 100644 --- a/infra/config/generated/testing/mixins.pyl +++ b/infra/config/generated/testing/mixins.pyl
@@ -243,6 +243,11 @@ '--extra-browser-args=--enable-features=SkiaGraphite', ], }, + 'gpu_gtest_common_args': { + 'android_args': [ + '$$MAGIC_SUBSTITUTION_AndroidDesktopForceMainUser', + ], + }, 'gpu_integration_test_common_args': { 'args': [ '$$MAGIC_SUBSTITUTION_GPUParallelJobs',
diff --git a/infra/config/generated/testing/test_suites.pyl b/infra/config/generated/testing/test_suites.pyl index fbcef91..aaf0c2a4 100644 --- a/infra/config/generated/testing/test_suites.pyl +++ b/infra/config/generated/testing/test_suites.pyl
@@ -524,6 +524,11 @@ 'chromium_gtests': { 'absl_hardening_tests': {}, 'angle_unittests': { + 'test_common': { + 'mixins': [ + 'gpu_gtest_common_args', + ], + }, 'android_args': [ '-v', ], @@ -579,7 +584,13 @@ 'gcm_unit_tests': {}, 'gin_unittests': {}, 'google_apis_unittests': {}, - 'gpu_unittests': {}, + 'gpu_unittests': { + 'test_common': { + 'mixins': [ + 'gpu_gtest_common_args', + ], + }, + }, 'gwp_asan_unittests': {}, 'ipc_tests': {}, 'latency_unittests': {}, @@ -831,7 +842,13 @@ 'gcm_unit_tests': {}, 'gin_unittests': {}, 'google_apis_unittests': {}, - 'gpu_unittests': {}, + 'gpu_unittests': { + 'test_common': { + 'mixins': [ + 'gpu_gtest_common_args', + ], + }, + }, 'headless_browsertests': {}, 'headless_unittests': {}, 'interactive_ui_tests': {}, @@ -1850,7 +1867,13 @@ 'aura_unittests': {}, 'chromeos_components_unittests': {}, 'exo_unittests': {}, - 'gl_unittests_ozone': {}, + 'gl_unittests_ozone': { + 'test_common': { + 'mixins': [ + 'gpu_gtest_common_args', + ], + }, + }, 'keyboard_unittests': {}, 'ozone_gl_unittests': { 'args': [
diff --git a/infra/config/lib/targets-internal/magic_args.star b/infra/config/lib/targets-internal/magic_args.star index 1d25d7a..002643d 100644 --- a/infra/config/lib/targets-internal/magic_args.star +++ b/infra/config/lib/targets-internal/magic_args.star
@@ -99,6 +99,14 @@ return dimensions.get("device_type", "amd64-generic") +def _android_desktop_force_main_user(_, settings, spec_value): + """Automatically adds --force-main-user to gtests on Android Desktop.""" + if settings.os_type != common.os_type.ANDROID: + fail("Ran an Android Desktop-specific substitution on a non-Android builder") + if not _get_android_desktop_board_name(spec_value): + return [] + return ["--force-main-user"] + def _android_desktop_telemetry_remote(_, settings, spec_value): """Substitutes the correct Android Desktop remote Telemetry arguments.""" if settings.os_type != common.os_type.ANDROID: @@ -417,6 +425,10 @@ ) magic_args = struct( + ANDROID_DESKTOP_FORCE_MAIN_USER = _placeholder( + pyl_arg_value = "$$MAGIC_SUBSTITUTION_AndroidDesktopForceMainUser", + function = _android_desktop_force_main_user, + ), ANDROID_DESKTOP_TELEMETRY_REMOTE = _placeholder( pyl_arg_value = "$$MAGIC_SUBSTITUTION_AndroidDesktopTelemetryRemote", function = _android_desktop_telemetry_remote,
diff --git a/infra/config/lib/xcode.star b/infra/config/lib/xcode.star index eeff9ac..c27b8cd 100644 --- a/infra/config/lib/xcode.star +++ b/infra/config/lib/xcode.star
@@ -31,7 +31,7 @@ # Xcode 16 beta version used on beta bots. x16betabots = xcode_enum("16f6"), # Xcode 26 beta version used on beta bots. - x26betabots = xcode_enum("17a5241e"), + x26betabots = xcode_enum("17a5241o"), # in use by ios-webkit-tot x14wk = xcode_enum("14c18wk"), )
diff --git a/infra/config/targets/bundles.star b/infra/config/targets/bundles.star index 7ad6a53..c36888a2 100644 --- a/infra/config/targets/bundles.star +++ b/infra/config/targets/bundles.star
@@ -5088,7 +5088,7 @@ targets.bundle( targets = "ios_blink_tests", variants = [ - "SIM_IPHONE_15_18_4", + "SIM_IPHONE_15_26_0", ], ), ],
diff --git a/infra/config/targets/mixins.star b/infra/config/targets/mixins.star index c253147..d65d33e 100644 --- a/infra/config/targets/mixins.star +++ b/infra/config/targets/mixins.star
@@ -866,6 +866,13 @@ ) targets.mixin( + name = "gpu_gtest_common_args", + android_args = [ + targets.magic_args.ANDROID_DESKTOP_FORCE_MAIN_USER, + ], +) + +targets.mixin( name = "gpu_integration_test_common_args", args = [ targets.magic_args.GPU_PARALLEL_JOBS, @@ -2613,12 +2620,12 @@ generate_pyl_entry = False, args = [ "--xcode-build-version", - "17a5241e", + "17a5241o", ], swarming = targets.swarming( named_caches = [ swarming.cache( - name = "xcode_ios_17a5241e", + name = "xcode_ios_17a5241o", path = "Xcode.app", ), ],
diff --git a/infra/config/targets/tests.star b/infra/config/targets/tests.star index 1234197..2841786 100644 --- a/infra/config/targets/tests.star +++ b/infra/config/targets/tests.star
@@ -89,66 +89,114 @@ targets.tests.gtest_test( name = "angle_deqp_egl_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_gles2_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_gles31_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_gles3_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_khr_gles2_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_khr_gles3_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_khr_gles31_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_gles3_rotate180_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_gles3_rotate270_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_gles3_rotate90_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_gles31_rotate180_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_gles31_rotate270_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_deqp_gles31_rotate90_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_end2end_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_unittests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "angle_white_box_tests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( @@ -1222,6 +1270,9 @@ targets.tests.gtest_test( name = "gl_tests_passthrough", + mixins = [ + "gpu_gtest_common_args", + ], args = [ "--use-cmd-decoder=passthrough", ], @@ -1230,6 +1281,9 @@ targets.tests.gtest_test( name = "gl_tests_validating", + mixins = [ + "gpu_gtest_common_args", + ], args = [ "--use-cmd-decoder=validating", ], @@ -1238,14 +1292,23 @@ targets.tests.gtest_test( name = "gl_unittests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "gl_unittests_ozone", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.gtest_test( name = "gpu_memory_buffer_impl_tests", + mixins = [ + "gpu_gtest_common_args", + ], binary = "gpu_unittests", ) @@ -1359,6 +1422,9 @@ targets.tests.gtest_test( name = "gpu_unittests", + mixins = [ + "gpu_gtest_common_args", + ], ) targets.tests.isolated_script_test(
diff --git a/infra/config/targets/variants.star b/infra/config/targets/variants.star index 052cf91..2ae00a93 100644 --- a/infra/config/targets/variants.star +++ b/infra/config/targets/variants.star
@@ -497,17 +497,17 @@ ) targets.variant( - name = "SIM_IPHONE_15_18_4", - identifier = "iPhone 15 18.4", + name = "SIM_IPHONE_15_26_0", + identifier = "iPhone 15 26.0", generate_pyl_entry = False, mixins = [ - "ios_runtime_cache_18_4", + "ios_runtime_cache_26_0", ], args = [ "--platform", "iPhone 15", "--version", - "18.4", + "26.0", ], )
diff --git a/internal b/internal index 9be020a..dca7124 160000 --- a/internal +++ b/internal
@@ -1 +1 @@ -Subproject commit 9be020a68863ae27c87b490e778991a4402d4b05 +Subproject commit dca7124471d9e1cd831baf19f06f8a2cacfb1b93
diff --git a/ios/build/bots/scripts/iossim_util.py b/ios/build/bots/scripts/iossim_util.py index f5758e0..ef06bba 100644 --- a/ios/build/bots/scripts/iossim_util.py +++ b/ios/build/bots/scripts/iossim_util.py
@@ -364,7 +364,8 @@ """ runtimes = get_simulator_runtime_list() for runtime in runtimes.values(): - if runtime['build'].lower() == runtime_build.lower(): + build = runtime.get('build') + if build and build.lower() == runtime_build.lower(): return runtime return None @@ -390,7 +391,8 @@ """ runtimes = get_simulator_runtime_list() for runtime in runtimes.values(): - if runtime['identifier'].lower() == identifier.lower(): + runtime_id = runtime.get('identifier') + if runtime_id and runtime_id.lower() == identifier.lower(): return runtime return None @@ -419,7 +421,8 @@ # The output might use version with a patch number (e.g. 17.0.1) # but the passed in version does not have a patch number (e.g. 17.0) # Therefore, we should use startswith for substring match. - if runtime['version'].startswith(ios_version): + version = runtime.get('version') + if version and version.startswith(ios_version): return runtime return None @@ -525,8 +528,7 @@ (runtime_id, value['version'])) continue if keep_count < max_to_keep: - LOGGER.debug('Runtime %s with iOS %s should be kept undeleted' % - (runtime_id, value['version'])) + LOGGER.debug('Runtime %s should be kept undeleted' % value) keep_count += 1 else: delete_simulator_runtime(runtime_id, True)
diff --git a/ios/chrome/app/strings/ios_strings.grd b/ios/chrome/app/strings/ios_strings.grd index 6739ff95..f2428a7 100644 --- a/ios/chrome/app/strings/ios_strings.grd +++ b/ios/chrome/app/strings/ios_strings.grd
@@ -1053,6 +1053,9 @@ <message name="IDS_IOS_BWG_PROMO_FIRST_BOX_TITLE" desc="Text for the BWG Promo first box title."> Ask about any page </message> + <message name="IDS_IOS_BWG_PROMO_GRADIENT_TEXT" desc="Text for the BWG Promo that will have a gradient color."> + Gemini + </message> <message name="IDS_IOS_BWG_PROMO_MAIN_TITLE" desc="Text for the BWG Promo main title."> Get answers faster with Gemini in Chrome </message>
diff --git a/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_BWG_PROMO_GRADIENT_TEXT.png.sha1 b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_BWG_PROMO_GRADIENT_TEXT.png.sha1 new file mode 100644 index 0000000..287fc2a --- /dev/null +++ b/ios/chrome/app/strings/ios_strings_grd/IDS_IOS_BWG_PROMO_GRADIENT_TEXT.png.sha1
@@ -0,0 +1 @@ +4bbc551ad8d0c668e2396266feeedcdcd9c953ea \ No newline at end of file
diff --git a/ios/chrome/browser/intelligence/bwg/ui/BUILD.gn b/ios/chrome/browser/intelligence/bwg/ui/BUILD.gn index 5ffc32dc..f7322c0 100644 --- a/ios/chrome/browser/intelligence/bwg/ui/BUILD.gn +++ b/ios/chrome/browser/intelligence/bwg/ui/BUILD.gn
@@ -32,6 +32,7 @@ "//ios/chrome/common/ui/colors", "//ios/chrome/common/ui/promo_style", "//ios/chrome/common/ui/util", + "//ios/public/provider/chrome/browser/font:font_api", "//ios/public/provider/chrome/browser/lottie:lottie_animation_api", ] public_deps = [ ":bwg_lottie_resources" ]
diff --git a/ios/chrome/browser/intelligence/bwg/ui/bwg_promo_view_controller.mm b/ios/chrome/browser/intelligence/bwg/ui/bwg_promo_view_controller.mm index bb2d328..a3684d4 100644 --- a/ios/chrome/browser/intelligence/bwg/ui/bwg_promo_view_controller.mm +++ b/ios/chrome/browser/intelligence/bwg/ui/bwg_promo_view_controller.mm
@@ -14,6 +14,7 @@ #import "ios/chrome/common/ui/promo_style/promo_style_view_controller_delegate.h" #import "ios/chrome/common/ui/util/constraints_ui_util.h" #import "ios/chrome/grit/ios_strings.h" +#import "ios/public/provider/chrome/browser/font/font_api.h" #import "ui/base/l10n/l10n_util_mac.h" namespace { @@ -204,15 +205,7 @@ // Creates the main title. - (UIView*)createMainTitle { - UILabel* mainTitleLabel = [[UILabel alloc] init]; - mainTitleLabel.text = l10n_util::GetNSString(IDS_IOS_BWG_PROMO_MAIN_TITLE); - mainTitleLabel.textAlignment = NSTextAlignmentCenter; - mainTitleLabel.translatesAutoresizingMaskIntoConstraints = NO; - mainTitleLabel.numberOfLines = 0; - - mainTitleLabel.font = - PreferredFontForTextStyle(UIFontTextStyleTitle2, UIFontWeightBold); - + UILabel* mainTitleLabel = [self createGradientMainTitleLabel]; UIView* titleContainerView = [[UIView alloc] init]; titleContainerView.translatesAutoresizingMaskIntoConstraints = NO; @@ -222,6 +215,68 @@ return titleContainerView; } +// Create a gradient main title label. +- (UILabel*)createGradientMainTitleLabel { + UILabel* mainTitleLabel = [[UILabel alloc] init]; + mainTitleLabel.textAlignment = NSTextAlignmentCenter; + mainTitleLabel.translatesAutoresizingMaskIntoConstraints = NO; + mainTitleLabel.numberOfLines = 0; + UIFont* labelFont = + PreferredFontForTextStyle(UIFontTextStyleTitle1, UIFontWeightSemibold); + mainTitleLabel.font = labelFont; + + NSString* mainTitleString = + l10n_util::GetNSString(IDS_IOS_BWG_PROMO_MAIN_TITLE); + NSString* gradientSubstring = + l10n_util::GetNSString(IDS_IOS_BWG_PROMO_GRADIENT_TEXT); + NSMutableAttributedString* attributedString = + [[NSMutableAttributedString alloc] initWithString:mainTitleString]; + + CGSize mainTitleTextSize = [attributedString size]; + CAGradientLayer* gradientLayer = [CAGradientLayer layer]; + gradientLayer.colors = [self createGradientColorsArray]; + gradientLayer.startPoint = CGPointMake(0, 0.5); + gradientLayer.endPoint = CGPointMake(0.8, 0.5); + gradientLayer.frame = + CGRectMake(0, 0, mainTitleTextSize.width, labelFont.pointSize); + + UIGraphicsImageRenderer* renderer = + [[UIGraphicsImageRenderer alloc] initWithSize:mainTitleTextSize]; + UIImage* textImage = [renderer + imageWithActions:^(UIGraphicsImageRendererContext* rendererContext) { + [gradientLayer renderInContext:rendererContext.CGContext]; + }]; + + UIColor* gradientColor = [UIColor colorWithPatternImage:textImage]; + NSRange gradientRange = [mainTitleString rangeOfString:gradientSubstring]; + [attributedString addAttribute:NSForegroundColorAttributeName + value:gradientColor + range:gradientRange]; + + UIFont* gradientStringFont = + ios::provider::GetBrandedProductRegularFont(labelFont.pointSize); + [attributedString addAttribute:NSFontAttributeName + value:gradientStringFont + range:gradientRange]; + + mainTitleLabel.attributedText = attributedString; + return mainTitleLabel; +} + +// Create an array of colors representing a gradient color palette. +- (NSArray*)createGradientColorsArray { + NSArray<UIColor*>* colors = @[ + [UIColor colorNamed:kBlue400Color], [UIColor colorNamed:kBlue700Color], + [UIColor colorNamed:kBlue300Color] + ]; + + NSMutableArray<id>* gradientColorArray = [[NSMutableArray alloc] init]; + for (UIColor* color in colors) { + [gradientColorArray addObject:static_cast<id>(color.CGColor)]; + } + return gradientColorArray; +} + // Creates the iconBox container view with the inner box and icon. - (UIView*)createIconContainerView:(UIImageView*)iconImageView { UIView* iconBox = [[UIView alloc] init];
diff --git a/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_coordinator.mm b/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_coordinator.mm index 5f8292f..85e038c4 100644 --- a/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_coordinator.mm +++ b/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_coordinator.mm
@@ -10,9 +10,11 @@ #import "ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_table_view_controller.h" #import "ios/chrome/browser/settings/ui_bundled/content_settings/default_page_mode_coordinator.h" #import "ios/chrome/browser/settings/ui_bundled/content_settings/web_inspector_state_coordinator.h" +#import "ios/chrome/browser/shared/model/browser/browser_observer_bridge.h" #import "ios/chrome/browser/shared/model/profile/profile_ios.h" @interface ContentSettingsCoordinator () < + BrowserObserving, ContentSettingsTableViewControllerPresentationDelegate> @end @@ -25,6 +27,13 @@ // The coordinator showing the view to enable or disable Web Inspector. WebInspectorStateCoordinator* _webInspectorStateViewCoordinator; + + // Bridge for browser observation, to make sure any references are cut when + // the browser is destroyed. + std::unique_ptr<BrowserObserverBridge> _browserObserverBridge; + + // Verifies that `stop` is always called before dealloc. + BOOL _stopped; } @synthesize baseNavigationController = _baseNavigationController; @@ -41,6 +50,9 @@ } - (void)start { + _browserObserverBridge = + std::make_unique<BrowserObserverBridge>(self.browser, self); + HostContentSettingsMap* settingsMap = ios::HostContentSettingsMapFactory::GetForProfile(self.profile); MailtoHandlerService* mailtoHandlerService = @@ -58,11 +70,21 @@ } - (void)stop { + _stopped = YES; [_defaultModeViewCoordinator stop]; _defaultModeViewCoordinator = nil; [_webInspectorStateViewCoordinator stop]; _webInspectorStateViewCoordinator = nil; + + [_viewController disconnect]; + _viewController = nil; +} + +- (void)dealloc { + // TODO(crbug.com/427791214): If stop is always called before dealloc, then + // do all C++ cleanup in stop. + CHECK(_stopped, base::NotFatalUntil::M150); } #pragma mark - ContentSettingsTableViewControllerPresentationDelegate @@ -90,4 +112,10 @@ [_webInspectorStateViewCoordinator start]; } +#pragma mark - BrowserObserving + +- (void)browserDestroyed:(Browser*)browser { + [_viewController disconnect]; +} + @end
diff --git a/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_table_view_controller.h b/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_table_view_controller.h index 57a19e84..ccc73ad8 100644 --- a/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_table_view_controller.h +++ b/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_table_view_controller.h
@@ -49,6 +49,9 @@ NS_DESIGNATED_INITIALIZER; - (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE; +// Stop observing any C++ objects. +- (void)disconnect; + @end #endif // IOS_CHROME_BROWSER_SETTINGS_UI_BUNDLED_CONTENT_SETTINGS_CONTENT_SETTINGS_TABLE_VIEW_CONTROLLER_H_
diff --git a/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_table_view_controller.mm b/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_table_view_controller.mm index 602132ed..527c2b4 100644 --- a/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_table_view_controller.mm +++ b/ios/chrome/browser/settings/ui_bundled/content_settings/content_settings_table_view_controller.mm
@@ -211,6 +211,35 @@ } } +#pragma mark - Public + +- (void)disconnect { + [_disablePopupsSetting stop]; + _disablePopupsSetting.observer = nil; + _disablePopupsSetting = nil; + [_requestDesktopSetting stop]; + _requestDesktopSetting.observer = nil; + _requestDesktopSetting = nil; + [_linkPreviewEnabled stop]; + _linkPreviewEnabled.observer = nil; + _linkPreviewEnabled = nil; + [_detectAddressesEnabled stop]; + _detectAddressesEnabled.observer = nil; + _detectAddressesEnabled = nil; + [_miniMapShowNativeEnabled stop]; + _miniMapShowNativeEnabled.observer = nil; + _miniMapShowNativeEnabled = nil; + [_detectUnitsEnabled stop]; + _detectUnitsEnabled.observer = nil; + _detectUnitsEnabled = nil; + [_webInspectorEnabled stop]; + _webInspectorEnabled.observer = nil; + _webInspectorEnabled = nil; + _settingsMap = nullptr; + _mailtoHandlerService = nullptr; + _prefService = nullptr; +} + #pragma mark - LegacyChromeTableViewController - (void)loadModel { @@ -617,31 +646,7 @@ - (void)settingsWillBeDismissed { // TODO(crbug.com/40272467) - DUMP_WILL_BE_CHECK(_mailtoHandlerService); - [_disablePopupsSetting stop]; - _disablePopupsSetting.observer = nil; - _disablePopupsSetting = nil; - [_requestDesktopSetting stop]; - _requestDesktopSetting.observer = nil; - _requestDesktopSetting = nil; - [_linkPreviewEnabled stop]; - _linkPreviewEnabled.observer = nil; - _linkPreviewEnabled = nil; - [_detectAddressesEnabled stop]; - _detectAddressesEnabled.observer = nil; - _detectAddressesEnabled = nil; - [_miniMapShowNativeEnabled stop]; - _miniMapShowNativeEnabled.observer = nil; - _miniMapShowNativeEnabled = nil; - [_detectUnitsEnabled stop]; - _detectUnitsEnabled.observer = nil; - _detectUnitsEnabled = nil; - [_webInspectorEnabled stop]; - _webInspectorEnabled.observer = nil; - _webInspectorEnabled = nil; - _settingsMap = nullptr; - _mailtoHandlerService = nullptr; - _prefService = nullptr; + [self disconnect]; } @end
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/BUILD.gn b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/BUILD.gn index d1a8a54..2716ea8f 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/BUILD.gn +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/BUILD.gn
@@ -154,6 +154,8 @@ "tab_groups_panel_mutator.h", "tab_groups_panel_notification_cell.h", "tab_groups_panel_notification_cell.mm", + "tab_groups_panel_out_of_date_message_cell.h", + "tab_groups_panel_out_of_date_message_cell.mm", "tab_groups_panel_view_controller.h", "tab_groups_panel_view_controller.mm", ]
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_constants.h b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_constants.h index 280a1f7..6e19ccb 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_constants.h +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_constants.h
@@ -28,17 +28,22 @@ // Accessibility identifiers for the Recent Activity view. extern NSString* const kTabGroupRecentActivityIdentifier; -// Accessibility identifiers for the Tab Groups panel in Tab Grid. +// Accessibility identifiers for the tab groups panel in Tab Grid. extern NSString* const kTabGroupsPanelIdentifier; -// Accessibility identifier prefix of cells in the Tab Groups panel. +// Accessibility identifiers of cells in the tab groups panel. +extern NSString* const kTabGroupsPanelOutOfDateMessageCellIdentifier; extern NSString* const kTabGroupsPanelNotificationCellIdentifierPrefix; extern NSString* const kTabGroupsPanelCellIdentifierPrefix; -// Accessibility identifier for the Tab Groups panel notification cell. +// Accessibility identifiers for the tab groups panel out-of-date message cell. +extern NSString* const kTabGroupsPanelUpdateOutOfDateMessageIdentifier; +extern NSString* const kTabGroupsPanelCloseOutOfDateMessageIdentifier; + +// Accessibility identifier for the tab groups panel notification cell. extern NSString* const kTabGroupsPanelCloseNotificationIdentifier; -// Accessibility identifier of the Shared Tab Groups user education screen. +// Accessibility identifier of the shared tab groups user education screen. extern NSString* const kSharedTabGroupUserEducationAccessibilityIdentifier; // Name of the pref storing whether the user education has been shown or not. extern NSString* const kSharedTabGroupUserEducationShownOnceKey;
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_constants.mm b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_constants.mm index 12af7ff..17689d2 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_constants.mm +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_constants.mm
@@ -37,11 +37,18 @@ NSString* const kTabGroupsPanelIdentifier = @"kTabGroupsPanelIdentifier"; +NSString* const kTabGroupsPanelOutOfDateMessageCellIdentifier = + @"kTabGroupsPanelOutOfDateMessageCellIdentifier"; NSString* const kTabGroupsPanelNotificationCellIdentifierPrefix = @"kTabGroupsPanelNotificationCellIdentifier"; NSString* const kTabGroupsPanelCellIdentifierPrefix = @"kTabGroupsPanelCellIdentifier"; +NSString* const kTabGroupsPanelUpdateOutOfDateMessageIdentifier = + @"kTabGroupsPanelUpdateOutOfDateMessageIdentifier"; +NSString* const kTabGroupsPanelCloseOutOfDateMessageIdentifier = + @"kTabGroupsPanelCloseOutOfDateMessageIdentifier"; + NSString* const kTabGroupsPanelCloseNotificationIdentifier = @"kTabGroupsPanelCloseNotificationIdentifier";
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_consumer.h b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_consumer.h index 116d56b7..294efda 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_consumer.h +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_consumer.h
@@ -14,8 +14,10 @@ @protocol TabGroupsPanelConsumer // Replace the Tab Groups panel's items with the given items. -- (void)populateNotificationItem:(TabGroupsPanelItem*)notificationItem - tabGroupItems:(NSArray<TabGroupsPanelItem*>*)tabGroupItems; +- (void)populateOutOfDateMessageItem:(TabGroupsPanelItem*)outOfDateMessageItem + notificationItem:(TabGroupsPanelItem*)notificationItem + tabGroupItems: + (NSArray<TabGroupsPanelItem*>*)tabGroupItems; // Reconfigures the given Tab Groups panel's item. - (void)reconfigureItem:(TabGroupsPanelItem*)item;
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_coordinator.mm b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_coordinator.mm index ff94c12..58d1f8fa 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_coordinator.mm +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_coordinator.mm
@@ -25,6 +25,7 @@ #import "ios/chrome/browser/shared/model/browser/browser.h" #import "ios/chrome/browser/shared/model/browser/browser_list_factory.h" #import "ios/chrome/browser/shared/model/profile/profile_ios.h" +#import "ios/chrome/browser/shared/public/commands/application_commands.h" #import "ios/chrome/browser/shared/public/commands/command_dispatcher.h" #import "ios/chrome/browser/shared/public/commands/tab_grid_commands.h" #import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/grid/disabled_grid_view_controller.h" @@ -132,6 +133,8 @@ _mediator.toolbarsMutator = _toolbarsMutator; _mediator.tabGridHandler = HandlerForProtocol(self.browser->GetCommandDispatcher(), TabGridCommands); + _mediator.applicationHandler = HandlerForProtocol( + self.browser->GetCommandDispatcher(), ApplicationCommands); _mediator.consumer = _gridViewController; _mediator.delegate = self; _gridViewController.mutator = _mediator;
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_coordinator_unittest.mm b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_coordinator_unittest.mm index de805a7..7a3f1e09 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_coordinator_unittest.mm +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_coordinator_unittest.mm
@@ -12,6 +12,7 @@ #import "ios/chrome/browser/saved_tab_groups/model/tab_group_sync_service_factory.h" #import "ios/chrome/browser/shared/model/browser/test/test_browser.h" #import "ios/chrome/browser/shared/model/profile/test/test_profile_ios.h" +#import "ios/chrome/browser/shared/public/commands/application_commands.h" #import "ios/chrome/browser/shared/public/commands/command_dispatcher.h" #import "ios/chrome/browser/shared/public/commands/tab_grid_commands.h" #import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/grid/disabled_grid_view_controller.h" @@ -98,6 +99,11 @@ startDispatchingToTarget:tab_grid_handler_mock_ forProtocol:@protocol(TabGridCommands)]; + application_handler_mock_ = OCMProtocolMock(@protocol(ApplicationCommands)); + [browser_->GetCommandDispatcher() + startDispatchingToTarget:application_handler_mock_ + forProtocol:@protocol(ApplicationCommands)]; + base_view_controller_ = [[UIViewController alloc] init]; toolbars_mutator_ = [[TestToolbarsMutator alloc] init]; disabled_grid_view_controller_delegate_ = @@ -119,6 +125,7 @@ TestDisabledGridViewControllerDelegate* disabled_grid_view_controller_delegate_; id tab_grid_handler_mock_; + id application_handler_mock_; }; // Tests that the mediator and view controllers are nil before `start`.
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item.h b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item.h index 6540711..533601f 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item.h +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item.h
@@ -12,6 +12,7 @@ // Different types of items identified by a TabGroupsPanelItem. enum class TabGroupsPanelItemType : NSUInteger { + kOutOfDateMessage, kNotification, kSavedTabGroup, }; @@ -31,6 +32,7 @@ // The sharing state of the item, when type is `kSavedTabGroup`. @property(nonatomic, readonly) tab_groups::SharingState sharingState; +- (instancetype)initWithOutOfDateMessage NS_DESIGNATED_INITIALIZER; - (instancetype)initWithNotificationText:(NSString*)text NS_DESIGNATED_INITIALIZER; - (instancetype)initWithSavedTabGroupID:(base::Uuid)savedTabGroupID
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item.mm b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item.mm index 359e39f7..94dfd40e 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item.mm +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item.mm
@@ -10,6 +10,16 @@ NSUInteger _hash; } +- (instancetype)initWithOutOfDateMessage { + self = [super init]; + if (self) { + _type = TabGroupsPanelItemType::kOutOfDateMessage; + // There is only one possible item in this case. + _hash = 0; + } + return self; +} + - (instancetype)initWithNotificationText:(NSString*)text { self = [super init]; if (self) { @@ -61,6 +71,8 @@ return NO; } switch (_type) { + case TabGroupsPanelItemType::kOutOfDateMessage: + return YES; case TabGroupsPanelItemType::kNotification: return [self.notificationText isEqualToString:item.notificationText]; case TabGroupsPanelItemType::kSavedTabGroup:
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator.h b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator.h index adcba6c..e1ea57e 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator.h +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator.h
@@ -30,6 +30,7 @@ class TabGroupSyncService; } // namespace tab_groups +@protocol ApplicationCommands; class BrowserList; class FaviconLoader; @protocol GridToolbarsMutator; @@ -56,6 +57,9 @@ // Tab Grid handler. @property(nonatomic, weak) id<TabGridCommands> tabGridHandler; +// Application commands handler. +@property(nonatomic, weak) id<ApplicationCommands> applicationHandler; + // - `tabGroupSyncService`: the data source for the Tab Groups panel. // - `regularWebStateList`: used to configure the Done button. Must not be null. // - `disabled`: tells the mediator whether the Tab Groups panel is disabled, to
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator.mm b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator.mm index 0a98287..064dd8af 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator.mm +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator.mm
@@ -19,6 +19,7 @@ #import "components/data_sharing/public/data_sharing_service.h" #import "components/saved_tab_groups/public/saved_tab_group.h" #import "components/saved_tab_groups/public/string_utils.h" +#import "components/saved_tab_groups/public/versioning_message_controller.h" #import "components/tab_groups/tab_group_color.h" #import "ios/chrome/browser/collaboration/model/features.h" #import "ios/chrome/browser/collaboration/model/messaging/messaging_backend_service_bridge.h" @@ -30,6 +31,7 @@ #import "ios/chrome/browser/share_kit/model/sharing_state.h" #import "ios/chrome/browser/shared/model/web_state_list/tab_group.h" #import "ios/chrome/browser/shared/model/web_state_list/web_state_list.h" +#import "ios/chrome/browser/shared/public/commands/application_commands.h" #import "ios/chrome/browser/shared/public/commands/tab_grid_commands.h" #import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/grid/grid_toolbars_mutator.h" #import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_group_sync_service_observer_bridge.h" @@ -55,6 +57,7 @@ using collaboration::messaging::TabGroupMessageMetadata; using tab_groups::SharingState; +using tab_groups::VersioningMessageController; using tab_groups::utils::GetLocalTabGroupInfo; using tab_groups::utils::LocalTabGroupInfo; @@ -109,6 +112,9 @@ raw_ptr<collaboration::messaging::MessagingBackendService> _messagingService; // The data sharing service for shared tab groups. raw_ptr<data_sharing::DataSharingService> _dataSharingService; + // The versioning message controller to know whether to show an out-of-date + // message. + raw_ptr<tab_groups::VersioningMessageController> _versioningMessageController; // The bridge between the service C++ observer and this Objective-C class. std::unique_ptr<TabGroupSyncServiceObserverBridge> _syncServiceObserver; std::unique_ptr<ScopedTabGroupSyncObservation> _scopedSyncServiceObservation; @@ -153,6 +159,8 @@ self = [super init]; if (self) { _tabGroupSyncService = tabGroupSyncService; + _versioningMessageController = + _tabGroupSyncService->GetVersioningMessageController(); _shareKitService = shareKitService; _collaborationService = collaborationService; _messagingService = messagingService; @@ -231,6 +239,7 @@ _shareKitService = nullptr; _collaborationService = nullptr; _dataSharingService = nullptr; + _versioningMessageController = nullptr; _regularWebStateList = nullptr; _faviconsGridConfigurator = nullptr; } @@ -429,6 +438,17 @@ sourceView:sourceView]; } +- (void)updateAppWithOutOfDateMessageItem:(TabGroupsPanelItem*)item { + [_applicationHandler showAppStorePage]; +} + +- (void)deleteOutOfDateMessageItem:(TabGroupsPanelItem*)item { + _versioningMessageController->OnMessageUiDismissed( + VersioningMessageController::MessageType:: + VERSION_OUT_OF_DATE_PERSISTENT_MESSAGE); + [self populateItemsFromServices]; +} + - (void)deleteNotificationItem:(TabGroupsPanelItem*)item { // The user has dismissed the summary card displaying all the "group removed" // messages. Dismissing it should clear all messages on the backend. @@ -522,19 +542,37 @@ [self.toolbarsMutator setToolbarConfiguration:toolbarsConfiguration]; } -// Reads the TabGroupSyncService data, prepares it, and feeds it to the -// consumer. +// Reads the services data, prepares it, and feeds it to the consumer. - (void)populateItemsFromServices { - if (_tabGroupSyncServiceInitialized) { - std::vector<collaboration::messaging::PersistentMessage> messages; - if (_messagingService && _messagingService->IsInitialized()) { - messages = _messagingService->GetMessages( - collaboration::messaging::PersistentNotificationType::TOMBSTONED); - } - NSArray<TabGroupsPanelItem*>* tabGroupItems = [self createTabGroupItems]; - [_consumer populateNotificationItem:CreateNotificationItem(messages) - tabGroupItems:tabGroupItems]; + if (!_tabGroupSyncServiceInitialized) { + return; } + + // The potential out-of-date message. + TabGroupsPanelItem* outOfDateMessageItem; + if (_versioningMessageController && + _versioningMessageController->ShouldShowMessageUi( + VersioningMessageController::MessageType:: + VERSION_OUT_OF_DATE_PERSISTENT_MESSAGE)) { + outOfDateMessageItem = + [[TabGroupsPanelItem alloc] initWithOutOfDateMessage]; + } + + // The potential notification about closed groups. + TabGroupsPanelItem* notificationItem; + if (_messagingService && _messagingService->IsInitialized()) { + std::vector<collaboration::messaging::PersistentMessage> messages = + _messagingService->GetMessages( + collaboration::messaging::PersistentNotificationType::TOMBSTONED); + notificationItem = CreateNotificationItem(messages); + } + + // The groups. + NSArray<TabGroupsPanelItem*>* tabGroupItems = [self createTabGroupItems]; + + [_consumer populateOutOfDateMessageItem:outOfDateMessageItem + notificationItem:notificationItem + tabGroupItems:tabGroupItems]; } // Tells the consumer to reconfigure the group that matches the given `groupId`. @@ -572,6 +610,9 @@ // Returns an array of `TabGroupsPanelItem`. - (NSArray<TabGroupsPanelItem*>*)createTabGroupItems { + if (!_tabGroupSyncServiceInitialized) { + return @[]; + } std::vector<tab_groups::SavedTabGroup> groups = _tabGroupSyncService->GetAllGroups(); // Sort groups by creation date.
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator_unittest.mm b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator_unittest.mm index 23bbcf5..32486309 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator_unittest.mm +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mediator_unittest.mm
@@ -6,15 +6,20 @@ #import "base/strings/sys_string_conversions.h" #import "base/test/metrics/user_action_tester.h" +#import "base/test/scoped_feature_list.h" #import "components/collaboration/public/messaging/messaging_backend_service.h" #import "components/collaboration/public/messaging/util.h" #import "components/collaboration/test_support/mock_collaboration_service.h" #import "components/collaboration/test_support/mock_messaging_backend_service.h" +#import "components/data_sharing/public/features.h" #import "components/data_sharing/test_support/mock_data_sharing_service.h" +#import "components/prefs/testing_pref_service.h" +#import "components/saved_tab_groups/public/pref_names.h" #import "components/saved_tab_groups/public/saved_tab_group.h" #import "components/saved_tab_groups/public/types.h" #import "components/saved_tab_groups/test_support/fake_tab_group_sync_service.h" #import "components/saved_tab_groups/test_support/mock_tab_group_sync_service.h" +#import "components/saved_tab_groups/test_support/mock_versioning_message_controller.h" #import "components/saved_tab_groups/test_support/saved_tab_group_test_utils.h" #import "components/strings/grit/components_strings.h" #import "ios/chrome/browser/saved_tab_groups/model/tab_group_service.h" @@ -52,6 +57,7 @@ using collaboration::messaging::TabGroupMessageMetadata; using tab_groups::MockTabGroupSyncService; +using tab_groups::MockVersioningMessageController; using tab_groups::SharingState; using ::testing::_; using ::testing::Return; @@ -87,6 +93,7 @@ } // namespace @interface FakeTabGroupsPanelConsumer : NSObject <TabGroupsPanelConsumer> +@property(nonatomic, readonly) TabGroupsPanelItem* outOfDateMessageItem; @property(nonatomic, readonly) TabGroupsPanelItem* notificationItem; @property(nonatomic, readonly, copy) NSArray<TabGroupsPanelItem*>* tabGroupItems; @@ -98,8 +105,11 @@ #pragma mark TabGroupsPanelConsumer -- (void)populateNotificationItem:(TabGroupsPanelItem*)notificationItem - tabGroupItems:(NSArray<TabGroupsPanelItem*>*)tabGroupItems { +- (void)populateOutOfDateMessageItem:(TabGroupsPanelItem*)outOfDateMessageItem + notificationItem:(TabGroupsPanelItem*)notificationItem + tabGroupItems: + (NSArray<TabGroupsPanelItem*>*)tabGroupItems { + _outOfDateMessageItem = outOfDateMessageItem; _notificationItem = notificationItem; _tabGroupItems = [tabGroupItems copy]; _populateItemsCallCount++; @@ -160,6 +170,8 @@ messaging_service_ = std::make_unique<MockMessagingBackendService>(); data_sharing_service_ = std::make_unique< ::testing::NiceMock<data_sharing::MockDataSharingService>>(); + ON_CALL(tab_group_sync_service_, GetVersioningMessageController()) + .WillByDefault(Return(&versioning_message_controller_)); } web::WebTaskEnvironment task_environment_; @@ -175,6 +187,7 @@ std::unique_ptr<MockCollaborationService> collaboration_service_; std::unique_ptr<MockMessagingBackendService> messaging_service_; std::unique_ptr<data_sharing::MockDataSharingService> data_sharing_service_; + MockVersioningMessageController versioning_message_controller_; }; // Tests that the service observation starts and stops when the mediator is @@ -415,7 +428,7 @@ } // Tests that setting a consumer before the service initialization doesn't -// populate the consumer +// populate the consumer. TEST_F(TabGroupsPanelMediatorTest, SetConsumerDoesntPopulateFromUninitializedService) { TabGroupsPanelMediator* mediator = [[TabGroupsPanelMediator alloc] @@ -431,6 +444,7 @@ // Prepare a consumer. FakeTabGroupsPanelConsumer* consumer = [[FakeTabGroupsPanelConsumer alloc] init]; + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_NSEQ(consumer.tabGroupItems, nil); EXPECT_EQ(consumer.populateItemsCallCount, 0u); @@ -442,6 +456,7 @@ mediator.consumer = consumer; + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_NSEQ(consumer.tabGroupItems, nil); EXPECT_EQ(consumer.populateItemsCallCount, 0u); @@ -468,6 +483,7 @@ // Prepare a consumer. FakeTabGroupsPanelConsumer* consumer = [[FakeTabGroupsPanelConsumer alloc] init]; + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_NSEQ(consumer.tabGroupItems, nil); EXPECT_EQ(consumer.populateItemsCallCount, 0u); @@ -482,6 +498,7 @@ // Set the consumer. mediator.consumer = consumer; + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 1u); EXPECT_EQ(consumer.populateItemsCallCount, 1u); @@ -508,6 +525,7 @@ // Prepare a consumer. FakeTabGroupsPanelConsumer* consumer = [[FakeTabGroupsPanelConsumer alloc] init]; + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_NSEQ(consumer.tabGroupItems, nil); EXPECT_EQ(consumer.populateItemsCallCount, 0u); @@ -521,6 +539,7 @@ // Set the consumer. mediator.consumer = consumer; + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); EXPECT_EQ(consumer.populateItemsCallCount, 1u); @@ -552,6 +571,7 @@ FakeTabGroupsPanelConsumer* consumer = [[FakeTabGroupsPanelConsumer alloc] init]; mediator.consumer = consumer; + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_NSEQ(consumer.tabGroupItems, nil); EXPECT_EQ(consumer.populateItemsCallCount, 0u); @@ -563,6 +583,7 @@ observer->OnInitialized(); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 1u); EXPECT_EQ(consumer.populateItemsCallCount, 1u); @@ -599,6 +620,7 @@ .WillRepeatedly(Return(groups)); observer->OnInitialized(); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 2u); EXPECT_EQ(consumer.tabGroupItems[0].savedTabGroupID, group_2.saved_guid()); @@ -632,12 +654,14 @@ EXPECT_CALL(tab_group_sync_service_, GetAllGroups()) .WillRepeatedly(Return(groups)); observer->OnInitialized(); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 1u); EXPECT_EQ(consumer.reconfigureItemCallCount, 0u); observer->OnTabGroupUpdated(group, tab_groups::TriggerSource::REMOTE); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 1u); EXPECT_EQ(consumer.reconfigureItemCallCount, 1u); @@ -784,6 +808,7 @@ mediator.consumer = consumer; EXPECT_CALL(*messaging_service_, IsInitialized()) .WillRepeatedly(Return(true)); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); @@ -796,6 +821,7 @@ .WillRepeatedly(Return(std::vector<PersistentMessage>{messages})); observer->DisplayPersistentMessage(persistent_message); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSNE(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); EXPECT_EQ(consumer.notificationItem.type, @@ -835,6 +861,7 @@ mediator.consumer = consumer; EXPECT_CALL(*messaging_service_, IsInitialized()) .WillRepeatedly(Return(true)); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); // Simulate the unsharing of two groups communicated by the messaging backend @@ -850,6 +877,7 @@ persistent_message_1, persistent_message_2})); observer->DisplayPersistentMessage(persistent_message_1); observer->DisplayPersistentMessage(persistent_message_2); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSNE(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); EXPECT_EQ(consumer.notificationItem.type, @@ -863,6 +891,7 @@ .WillRepeatedly(Return(messages)); observer->HidePersistentMessage(persistent_message_1); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSNE(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); EXPECT_EQ(consumer.notificationItem.type, @@ -902,6 +931,7 @@ mediator.consumer = consumer; EXPECT_CALL(*messaging_service_, IsInitialized()) .WillRepeatedly(Return(true)); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); @@ -918,6 +948,7 @@ observer->DisplayPersistentMessage(persistent_message_1); observer->DisplayPersistentMessage(persistent_message_2); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSNE(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); EXPECT_EQ(consumer.notificationItem.type, @@ -957,6 +988,7 @@ mediator.consumer = consumer; EXPECT_CALL(*messaging_service_, IsInitialized()) .WillRepeatedly(Return(true)); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); @@ -976,6 +1008,7 @@ observer->DisplayPersistentMessage(persistent_message_2); observer->DisplayPersistentMessage(persistent_message_3); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSNE(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); EXPECT_EQ(consumer.notificationItem.type, @@ -1016,6 +1049,7 @@ mediator.consumer = consumer; EXPECT_CALL(*messaging_service_, IsInitialized()) .WillRepeatedly(Return(true)); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSEQ(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); @@ -1034,6 +1068,7 @@ observer->DisplayPersistentMessage(persistent_message_2); observer->DisplayPersistentMessage(persistent_message_3); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSNE(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); EXPECT_EQ(consumer.notificationItem.type, @@ -1049,6 +1084,7 @@ .WillRepeatedly(Return(messages)); observer->HidePersistentMessage(persistent_message_2); + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); EXPECT_NSNE(consumer.notificationItem, nil); EXPECT_EQ(consumer.tabGroupItems.count, 0u); EXPECT_EQ(consumer.notificationItem.type, @@ -1056,3 +1092,47 @@ EXPECT_NSEQ(consumer.notificationItem.notificationText, SummaryFromMessages(messages)); } + +// Tests that the out-of-date message is pushed to the consumer when the +// versioning message controller requires it. +TEST_F(TabGroupsPanelMediatorTest, OutOfDateMessageWhenShouldShow) { + // Set up the mediator. + tab_groups::TabGroupSyncService::Observer* observer = nullptr; + EXPECT_CALL(tab_group_sync_service_, AddObserver(_)) + .WillOnce(SaveArg<0>(&observer)); + TabGroupsPanelMediator* mediator = [[TabGroupsPanelMediator alloc] + initWithTabGroupSyncService:&tab_group_sync_service_ + shareKitService:share_kit_service_.get() + collaborationService:collaboration_service_.get() + messagingService:messaging_service_.get() + dataSharingService:data_sharing_service_.get() + regularWebStateList:&web_state_list_ + faviconLoader:nullptr + disabledByPolicy:NO + browserList:browser_list_]; + EXPECT_NE(observer, nullptr); + // Prepare a consumer. + FakeTabGroupsPanelConsumer* consumer = + [[FakeTabGroupsPanelConsumer alloc] init]; + EXPECT_NSEQ(consumer.outOfDateMessageItem, nil); + EXPECT_NSEQ(consumer.notificationItem, nil); + EXPECT_NSEQ(consumer.tabGroupItems, nil); + EXPECT_EQ(consumer.populateItemsCallCount, 0u); + // Set no saved tab group. + std::vector<tab_groups::SavedTabGroup> groups = {}; + EXPECT_CALL(tab_group_sync_service_, GetAllGroups()) + .WillRepeatedly(Return(groups)); + // Set the consumer. + mediator.consumer = consumer; + // Configure the VersioningMessageController to require an out0-of-date + // message. + EXPECT_CALL(versioning_message_controller_, ShouldShowMessageUi(_)) + .WillRepeatedly(Return(true)); + + // Initialize the service. + observer->OnInitialized(); + + EXPECT_NSNE(consumer.outOfDateMessageItem, nil); + EXPECT_NSEQ(consumer.notificationItem, nil); + EXPECT_EQ(consumer.tabGroupItems.count, 0u); +}
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mutator.h b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mutator.h index 6fc0e84f..907ef45 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mutator.h +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mutator.h
@@ -29,6 +29,13 @@ - (void)deleteSharedTabGroupsPanelItem:(TabGroupsPanelItem*)item sourceView:(UIView*)sourceView; +// Tells the receiver to show how to update the app, as the user tapped the +// Update button of the out-of-date message. +- (void)updateAppWithOutOfDateMessageItem:(TabGroupsPanelItem*)item; + +// Tells the receiver to remove the out-of-date message. +- (void)deleteOutOfDateMessageItem:(TabGroupsPanelItem*)item; + // Tells the receiver to remove the notifications associated with `item`. - (void)deleteNotificationItem:(TabGroupsPanelItem*)item;
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_out_of_date_message_cell.h b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_out_of_date_message_cell.h new file mode 100644 index 0000000..585e60f --- /dev/null +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_out_of_date_message_cell.h
@@ -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. + +#ifndef IOS_CHROME_BROWSER_TAB_SWITCHER_UI_BUNDLED_TAB_GRID_TAB_GROUPS_TAB_GROUPS_PANEL_OUT_OF_DATE_MESSAGE_CELL_H_ +#define IOS_CHROME_BROWSER_TAB_SWITCHER_UI_BUNDLED_TAB_GRID_TAB_GROUPS_TAB_GROUPS_PANEL_OUT_OF_DATE_MESSAGE_CELL_H_ + +#import <UIKit/UIKit.h> + +@class TabGroupsPanelItem; +@class TabGroupsPanelOutOfDateMessageCell; + +// Delegate protocol for the tab groups panel out-of-date message cell. +@protocol TabGroupsPanelOutOfDateMessageCellDelegate + +// Notifies the delegate that the update button in the out-of-date message cell +// was tapped. +- (void)updateButtonTappedForOutOfDateMessageCell: + (TabGroupsPanelOutOfDateMessageCell*)outOfDateMessageCell; + +// Notifies the delegate that the close button in the out-of-date message cell +// was tapped. +- (void)closeButtonTappedForOutOfDateMessageCell: + (TabGroupsPanelOutOfDateMessageCell*)outOfDateMessageCell; + +@end + +// Represents the potential out-of-date message at the top of the tab groups +// panel. +@interface TabGroupsPanelOutOfDateMessageCell : UICollectionViewCell + +// Delegate that gets called when the button are tapped. +@property(nonatomic, weak) id<TabGroupsPanelOutOfDateMessageCellDelegate> + delegate; + +// Associated item, identifying the represented out-of-date message. The item +// must have a type of `TabGroupsPanelItemType::kOutOfDateMessage`. +@property(nonatomic, strong) TabGroupsPanelItem* outOfDateMessageItem; + +- (instancetype)initWithCoder:(NSCoder*)coder NS_UNAVAILABLE; + +@end + +#endif // IOS_CHROME_BROWSER_TAB_SWITCHER_UI_BUNDLED_TAB_GRID_TAB_GROUPS_TAB_GROUPS_PANEL_OUT_OF_DATE_MESSAGE_CELL_H_
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_out_of_date_message_cell.mm b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_out_of_date_message_cell.mm new file mode 100644 index 0000000..cb7e63e --- /dev/null +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_out_of_date_message_cell.mm
@@ -0,0 +1,218 @@ +// 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/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_out_of_date_message_cell.h" + +#import "base/check_op.h" +#import "components/strings/grit/components_strings.h" +#import "ios/chrome/browser/shared/ui/symbols/symbols.h" +#import "ios/chrome/browser/shared/ui/util/uikit_ui_util.h" +#import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_constants.h" +#import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item.h" +#import "ios/chrome/common/ui/colors/semantic_color_names.h" +#import "ios/chrome/grit/ios_strings.h" +#import "ui/base/l10n/l10n_util_mac.h" + +namespace { + +const CGFloat kCornerRadius = 16; +const CGFloat kSymbolSize = 20; +const CGFloat kHorizontalPadding = 16; +const CGFloat kVerticalPadding = 20; +const CGFloat kTextLabelWidthMultiplier = 0.7; +const CGFloat kUpdateButtonWidthMultiplier = 0.4; + +} // namespace + +@implementation TabGroupsPanelOutOfDateMessageCell { + UILabel* _textLabel; + UIButton* _updateButton; + UIButton* _closeButton; + + NSArray<NSLayoutConstraint*>* _normalConstraints; + NSArray<NSLayoutConstraint*>* _accessibilityConstraints; +} + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + self.backgroundColor = [UIColor colorNamed:kPrimaryBackgroundColor]; + self.layer.cornerRadius = kCornerRadius; + + UIView* contentView = self.contentView; + + _textLabel = [self createTextLabel]; + _updateButton = [self createUpdateButton]; + _closeButton = [self createCloseButton]; + + [contentView addSubview:_textLabel]; + [contentView addSubview:_updateButton]; + [contentView addSubview:_closeButton]; + + _accessibilityConstraints = @[ + [_textLabel.trailingAnchor + constraintLessThanOrEqualToAnchor:_closeButton.leadingAnchor + constant:-kHorizontalPadding], + [_textLabel.topAnchor constraintEqualToAnchor:contentView.topAnchor + constant:kVerticalPadding], + [_updateButton.leadingAnchor + constraintEqualToAnchor:contentView.leadingAnchor + constant:kHorizontalPadding], + [_updateButton.topAnchor constraintEqualToAnchor:_textLabel.bottomAnchor + constant:kVerticalPadding], + [_updateButton.bottomAnchor + constraintEqualToAnchor:contentView.bottomAnchor + constant:-kVerticalPadding], + [_closeButton.topAnchor constraintEqualToAnchor:contentView.topAnchor + constant:kVerticalPadding], + ]; + + _normalConstraints = @[ + [_textLabel.trailingAnchor + constraintLessThanOrEqualToAnchor:_updateButton.leadingAnchor], + [_updateButton.trailingAnchor + constraintEqualToAnchor:_closeButton.leadingAnchor + constant:-kHorizontalPadding], + [_updateButton.centerYAnchor + constraintEqualToAnchor:contentView.centerYAnchor], + [_textLabel.centerYAnchor + constraintEqualToAnchor:contentView.centerYAnchor], + [_closeButton.centerYAnchor + constraintEqualToAnchor:contentView.centerYAnchor], + [_textLabel.widthAnchor + constraintLessThanOrEqualToAnchor:contentView.widthAnchor + multiplier:kTextLabelWidthMultiplier], + [_updateButton.widthAnchor + constraintLessThanOrEqualToAnchor:contentView.widthAnchor + multiplier:kUpdateButtonWidthMultiplier], + ]; + + [NSLayoutConstraint activateConstraints:@[ + [_closeButton.trailingAnchor + constraintEqualToAnchor:contentView.trailingAnchor + constant:-kHorizontalPadding], + [_closeButton.leadingAnchor + constraintGreaterThanOrEqualToAnchor:_updateButton.trailingAnchor + constant:kHorizontalPadding], + [_textLabel.topAnchor + constraintGreaterThanOrEqualToAnchor:contentView.topAnchor + constant:kVerticalPadding], + [_textLabel.bottomAnchor + constraintLessThanOrEqualToAnchor:contentView.bottomAnchor + constant:-kVerticalPadding], + [_textLabel.leadingAnchor + constraintEqualToAnchor:contentView.leadingAnchor + constant:kHorizontalPadding], + [_updateButton.topAnchor + constraintGreaterThanOrEqualToAnchor:contentView.topAnchor + constant:kVerticalPadding], + [_updateButton.bottomAnchor + constraintLessThanOrEqualToAnchor:contentView.bottomAnchor + constant:-kVerticalPadding], + [_closeButton.widthAnchor constraintEqualToConstant:kSymbolSize], + [_closeButton.heightAnchor constraintEqualToConstant:kSymbolSize], + ]]; + + [self updateConstraintsForContentSizeCategory]; + + [self registerForTraitChanges:@[ UITraitPreferredContentSizeCategory.class ] + withAction:@selector + (updateConstraintsForContentSizeCategory)]; + } + return self; +} + +- (void)prepareForReuse { + [super prepareForReuse]; + _delegate = nil; + _outOfDateMessageItem = nil; +} + +#pragma mark - Private + +// Returns a configured text label. +- (UILabel*)createTextLabel { + UILabel* label = [[UILabel alloc] init]; + label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; + label.adjustsFontForContentSizeCategory = YES; + label.translatesAutoresizingMaskIntoConstraints = NO; + label.textColor = UIColor.whiteColor; + label.numberOfLines = 0; + [label setContentHuggingPriority:UILayoutPriorityDefaultLow + forAxis:UILayoutConstraintAxisHorizontal]; + label.text = l10n_util::GetNSString( + IDS_COLLABORATION_SHARED_TAB_GROUPS_PANEL_OUT_OF_DATE_MESSAGE_CELL_TEXT); + return label; +} + +// Returns a configured update button. +- (UIButton*)createUpdateButton { + __weak __typeof(self) weakSelf = self; + UIAction* updateAction = [UIAction actionWithHandler:^(UIAction* action) { + [weakSelf.delegate updateButtonTappedForOutOfDateMessageCell:weakSelf]; + }]; + UIButtonConfiguration* buttonConfiguration = + [UIButtonConfiguration plainButtonConfiguration]; + NSDirectionalEdgeInsets contentInsets = buttonConfiguration.contentInsets; + contentInsets.leading = 0; + contentInsets.trailing = 0; + buttonConfiguration.contentInsets = contentInsets; + UIButton* button = [UIButton buttonWithConfiguration:buttonConfiguration + primaryAction:updateAction]; + [button + setAttributedTitle: + [[NSAttributedString alloc] + initWithString: + l10n_util::GetNSString( + IDS_IOS_TAB_GROUPS_PANEL_OUT_OF_DATE_MESSAGE_UPDATE_BUTTON) + attributes:@{ + NSFontAttributeName : PreferredFontForTextStyle( + UIFontTextStyleSubheadline, UIFontWeightSemibold) + }] + forState:UIControlStateNormal]; + button.translatesAutoresizingMaskIntoConstraints = NO; + button.titleLabel.adjustsFontForContentSizeCategory = YES; + button.titleLabel.adjustsFontSizeToFitWidth = YES; + button.titleLabel.maximumContentSizeCategory = + UIContentSizeCategoryAccessibilityLarge; + // Make sure that the button has priority over the text. + [button + setContentCompressionResistancePriority:UILayoutPriorityDefaultHigh + 1 + forAxis:UILayoutConstraintAxisHorizontal]; + return button; +} + +// Returns a configured close button. +- (UIButton*)createCloseButton { + UIImage* buttonImage = DefaultSymbolWithPointSize(kXMarkSymbol, kSymbolSize); + UIButtonConfiguration* buttonConfiguration = + [UIButtonConfiguration plainButtonConfiguration]; + [buttonConfiguration setImage:buttonImage]; + __weak __typeof(self) weakSelf = self; + UIAction* closeAction = [UIAction actionWithHandler:^(UIAction* action) { + [weakSelf.delegate closeButtonTappedForOutOfDateMessageCell:weakSelf]; + }]; + UIButton* button = [UIButton buttonWithConfiguration:buttonConfiguration + primaryAction:closeAction]; + button.translatesAutoresizingMaskIntoConstraints = NO; + button.tintColor = [UIColor colorNamed:kTextSecondaryColor]; + button.accessibilityIdentifier = + kTabGroupsPanelCloseOutOfDateMessageIdentifier; + return button; +} + +// Updates the constraints to be appropriate for the current content size +// category. +- (void)updateConstraintsForContentSizeCategory { + if (UIContentSizeCategoryIsAccessibilityCategory( + self.traitCollection.preferredContentSizeCategory)) { + [NSLayoutConstraint deactivateConstraints:_normalConstraints]; + [NSLayoutConstraint activateConstraints:_accessibilityConstraints]; + } else { + [NSLayoutConstraint deactivateConstraints:_accessibilityConstraints]; + [NSLayoutConstraint activateConstraints:_normalConstraints]; + } +} + +@end
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_view_controller.mm b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_view_controller.mm index d88f2581..3bbe272 100644 --- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_view_controller.mm +++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_view_controller.mm
@@ -24,6 +24,7 @@ #import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_item_data.h" #import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_mutator.h" #import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_notification_cell.h" +#import "ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_groups_panel_out_of_date_message_cell.h" using tab_groups::SharingState; @@ -46,6 +47,7 @@ // Percentage of the width dedicated to an horizontal inset when there are two // elements. const CGFloat kHorizontalInsetPercentageWhenLargeAndTwoItems = 0.125; +NSString* const kOutOfDateMessageSection = @"OutOfDateMessage"; NSString* const kNotificationsSection = @"Notifications"; NSString* const kTabGroupsSection = @"TabGroups"; @@ -71,6 +73,7 @@ @interface TabGroupsPanelViewController () < TabGroupsPanelNotificationCellDelegate, + TabGroupsPanelOutOfDateMessageCellDelegate, UICollectionViewDelegate> @end @@ -78,6 +81,8 @@ UICollectionView* _collectionView; UICollectionViewDiffableDataSource<NSString*, TabGroupsPanelItem*>* _dataSource; + // The cell registration for the out-of-date message cell. + UICollectionViewCellRegistration* _outOfDateMessageRegistration; // The cell registration for notifications cells. UICollectionViewCellRegistration* _notificationRegistration; // The cell registration for tab groups cells. @@ -172,6 +177,22 @@ [_collectionView reloadData]; } +#pragma mark TabGroupsPanelOutOfDateCellDelegate + +- (void)updateButtonTappedForOutOfDateMessageCell: + (TabGroupsPanelOutOfDateMessageCell*)outOfDateMessageCell { + TabGroupsPanelItem* item = outOfDateMessageCell.outOfDateMessageItem; + CHECK_EQ(item.type, TabGroupsPanelItemType::kOutOfDateMessage); + [self.mutator updateAppWithOutOfDateMessageItem:item]; +} + +- (void)closeButtonTappedForOutOfDateMessageCell: + (TabGroupsPanelOutOfDateMessageCell*)outOfDateMessageCell { + TabGroupsPanelItem* item = outOfDateMessageCell.outOfDateMessageItem; + CHECK_EQ(item.type, TabGroupsPanelItemType::kOutOfDateMessage); + [self.mutator deleteOutOfDateMessageItem:item]; +} + #pragma mark TabGroupsPanelNotificationCellDelegate - (void)closeButtonTappedForNotificationItem:(TabGroupsPanelItem*)item { @@ -180,10 +201,16 @@ #pragma mark TabGroupsPanelConsumer -- (void)populateNotificationItem:(TabGroupsPanelItem*)notificationItem - tabGroupItems:(NSArray<TabGroupsPanelItem*>*)tabGroupItems { +- (void)populateOutOfDateMessageItem:(TabGroupsPanelItem*)outOfDateMessageItem + notificationItem:(TabGroupsPanelItem*)notificationItem + tabGroupItems: + (NSArray<TabGroupsPanelItem*>*)tabGroupItems { // Sanity check. CHECK_NE(tabGroupItems, nil); + if (outOfDateMessageItem) { + CHECK_EQ(outOfDateMessageItem.type, + TabGroupsPanelItemType::kOutOfDateMessage); + } if (notificationItem) { CHECK_EQ(notificationItem.type, TabGroupsPanelItemType::kNotification); } @@ -196,6 +223,11 @@ // Update the data source. CHECK(_dataSource); TabGroupsPanelSnapshot* snapshot = [[TabGroupsPanelSnapshot alloc] init]; + if (outOfDateMessageItem) { + [snapshot appendSectionsWithIdentifiers:@[ kOutOfDateMessageSection ]]; + [snapshot appendItemsWithIdentifiers:@[ outOfDateMessageItem ]]; + [snapshot reconfigureItemsWithIdentifiers:@[ outOfDateMessageItem ]]; + } if (notificationItem) { [snapshot appendSectionsWithIdentifiers:@[ kNotificationsSection ]]; [snapshot appendItemsWithIdentifiers:@[ notificationItem ]]; @@ -239,6 +271,9 @@ performPrimaryActionForItemAtIndexPath:(NSIndexPath*)indexPath { TabGroupsPanelItem* item = [_dataSource itemIdentifierForIndexPath:indexPath]; switch (item.type) { + case TabGroupsPanelItemType::kOutOfDateMessage: + // No-op. + break; case TabGroupsPanelItemType::kNotification: if (UIAccessibilityIsVoiceOverRunning() || UIAccessibilityIsSwitchControlRunning()) { @@ -257,6 +292,7 @@ point:(CGPoint)point { TabGroupsPanelItem* item = [_dataSource itemIdentifierForIndexPath:indexPath]; switch (item.type) { + case TabGroupsPanelItemType::kOutOfDateMessage: case TabGroupsPanelItemType::kNotification: return nil; case TabGroupsPanelItemType::kSavedTabGroup: { @@ -288,6 +324,9 @@ atIndexPath:(NSIndexPath*)indexPath { UICollectionViewCellRegistration* registration; switch (item.type) { + case TabGroupsPanelItemType::kOutOfDateMessage: + registration = _outOfDateMessageRegistration; + break; case TabGroupsPanelItemType::kNotification: registration = _notificationRegistration; break; @@ -306,6 +345,17 @@ - (void)createRegistrations { __weak __typeof(self) weakSelf = self; + // Register TabGroupsPanelOutOfDateMessageCell. + _outOfDateMessageRegistration = [UICollectionViewCellRegistration + registrationWithCellClass:TabGroupsPanelOutOfDateMessageCell.class + configurationHandler:^(TabGroupsPanelOutOfDateMessageCell* cell, + NSIndexPath* indexPath, + TabGroupsPanelItem* item) { + [weakSelf configureOutOfDateMessageCell:cell + withItem:item + atIndex:indexPath.item]; + }]; + // Register TabGroupsPanelNotificationCell. _notificationRegistration = [UICollectionViewCellRegistration registrationWithCellClass:TabGroupsPanelNotificationCell.class @@ -329,6 +379,11 @@ }]; } +- (BOOL)hasOutOfDateMessage { + return [_dataSource.snapshot + indexOfSectionIdentifier:kOutOfDateMessageSection] != NSNotFound; +} + - (BOOL)hasNotifications { return [_dataSource.snapshot indexOfSectionIdentifier:kNotificationsSection] != NSNotFound; @@ -368,6 +423,10 @@ layoutEnvironment:(id<NSCollectionLayoutEnvironment>)layoutEnvironment { NSString* sectionIdentifier = [_dataSource sectionIdentifierForIndex:sectionIndex]; + if ([sectionIdentifier isEqualToString:kOutOfDateMessageSection]) { + return [self + makeOutOfDateMessageSectionWithLayoutEnvironment:layoutEnvironment]; + } if ([sectionIdentifier isEqualToString:kNotificationsSection]) { return [self makeNotificationsSectionWithLayoutEnvironment:layoutEnvironment]; @@ -378,6 +437,63 @@ NOTREACHED(); } +// Returns the layout section for the out-of-date message. +- (NSCollectionLayoutSection*)makeOutOfDateMessageSectionWithLayoutEnvironment: + (id<NSCollectionLayoutEnvironment>)layoutEnvironment { + const BOOL onlyOneTabGroup = [self hasOnlyOneTabGroup]; + const CGFloat width = layoutEnvironment.container.effectiveContentSize.width; + const BOOL hasLargeWidth = width > kColumnCountWidthThreshold; + + NSCollectionLayoutDimension* itemWidth = + [NSCollectionLayoutDimension fractionalWidthDimension:1]; + NSCollectionLayoutDimension* itemHeight = [NSCollectionLayoutDimension + estimatedDimension:kEstimatedNotificationHeight]; + NSCollectionLayoutSize* itemSize = + [NSCollectionLayoutSize sizeWithWidthDimension:itemWidth + heightDimension:itemHeight]; + NSCollectionLayoutItem* item = + [NSCollectionLayoutItem itemWithLayoutSize:itemSize]; + + NSCollectionLayoutDimension* groupWidth = + [NSCollectionLayoutDimension fractionalWidthDimension:1]; + NSCollectionLayoutSize* groupSize = + [NSCollectionLayoutSize sizeWithWidthDimension:groupWidth + heightDimension:itemHeight]; + NSCollectionLayoutGroup* group = + [NSCollectionLayoutGroup horizontalGroupWithLayoutSize:groupSize + subitems:@[ item ]]; + group.interItemSpacing = + [NSCollectionLayoutSpacing fixedSpacing:kInterItemSpacing]; + + CGFloat groupHorizontalInset = kHorizontalInset; + const BOOL hasLargeInset = + layoutEnvironment.traitCollection.horizontalSizeClass == + UIUserInterfaceSizeClassRegular; + if (hasLargeInset) { + groupHorizontalInset = + width * kHorizontalInsetPercentageWhenLargeAndTwoItems; + if (hasLargeWidth && onlyOneTabGroup) { + groupHorizontalInset = + width * kHorizontalInsetPercentageWhenLargeAndOneItem; + } + } + group.contentInsets = NSDirectionalEdgeInsetsMake(0, groupHorizontalInset, 0, + groupHorizontalInset); + + NSCollectionLayoutSection* section = + [NSCollectionLayoutSection sectionWithGroup:group]; + section.interGroupSpacing = kInterGroupSpacing; + const CGFloat topInset = hasLargeInset ? kLargeVerticalInset : kVerticalInset; + const CGFloat bottomInset = [self hasNotifications] || [self hasTabGroups] + ? kVerticalInset + : kLargeVerticalInset; + // Use the `_contentInsets` horizontal insets. See `setContentInsets:` for + // more details. + section.contentInsets = NSDirectionalEdgeInsetsMake( + topInset, self.contentInsets.left, bottomInset, self.contentInsets.right); + return section; +} + // Returns the layout section for the notifications. - (NSCollectionLayoutSection*)makeNotificationsSectionWithLayoutEnvironment: (id<NSCollectionLayoutEnvironment>)layoutEnvironment { @@ -482,8 +598,9 @@ NSCollectionLayoutSection* section = [NSCollectionLayoutSection sectionWithGroup:group]; section.interGroupSpacing = kInterGroupSpacing; - const CGFloat topInset = - [self hasNotifications] ? kVerticalInset : kLargeVerticalInset; + const CGFloat topInset = [self hasNotifications] || [self hasOutOfDateMessage] + ? kVerticalInset + : kLargeVerticalInset; const CGFloat bottomInset = hasLargeInset ? kLargeVerticalInset : kVerticalInset; // Use the `_contentInsets` horizontal insets. See `setContentInsets:` for @@ -536,6 +653,17 @@ } } +// Configures the out-of-date message cell. +- (void)configureOutOfDateMessageCell:(TabGroupsPanelOutOfDateMessageCell*)cell + withItem:(TabGroupsPanelItem*)item + atIndex:(NSUInteger)index { + CHECK(cell); + CHECK(item); + CHECK_EQ(item.type, TabGroupsPanelItemType::kOutOfDateMessage); + cell.outOfDateMessageItem = item; + cell.delegate = self; +} + // Configures the notification cell. - (void)configureNotificationCell:(TabGroupsPanelNotificationCell*)cell withItem:(TabGroupsPanelItem*)item
diff --git a/media/filters/dav1d_video_decoder.cc b/media/filters/dav1d_video_decoder.cc index 6235700..cb45964 100644 --- a/media/filters/dav1d_video_decoder.cc +++ b/media/filters/dav1d_video_decoder.cc
@@ -534,15 +534,30 @@ return nullptr; auto uv_plane_stride = pic->stride[1]; - const auto* u_plane = static_cast<const uint8_t*>(pic->data[1]); - const auto* v_plane = static_cast<const uint8_t*>(pic->data[2]); + const size_t y_plane_height = pic->p.h; + const size_t uv_plane_height = + media::VideoFrame::PlaneSizeInSamples( + pixel_format, media::VideoFrame::Plane::kU, visible_size) + .height(); + + // SAFETY: Dav1d doesn't give us the size of the planes directly, that's + // why we assume it to be equal to stride * rows, + // as we do in many other places. + auto y_plane = + UNSAFE_BUFFERS(base::span(static_cast<const uint8_t*>(pic->data[0]), + y_plane_height * pic->stride[0])); + auto u_plane = + UNSAFE_BUFFERS(base::span(static_cast<const uint8_t*>(pic->data[1]), + uv_plane_height * uv_plane_stride)); + auto v_plane = + UNSAFE_BUFFERS(base::span(static_cast<const uint8_t*>(pic->data[2]), + uv_plane_height * uv_plane_stride)); const bool needs_fake_uv_planes = pic->p.layout == DAV1D_PIXEL_LAYOUT_I400; if (needs_fake_uv_planes) { // UV planes are half the size of the Y plane. uv_plane_stride = base::bits::AlignUpDeprecatedDoNotUse(pic->stride[0] / 2, ptrdiff_t{2}); - const auto uv_plane_height = (pic->p.h + 1) / 2; const size_t size_needed = uv_plane_stride * uv_plane_height; if (!fake_uv_data_ || fake_uv_data_->size() != size_needed) { @@ -561,15 +576,14 @@ } } - u_plane = v_plane = fake_uv_data_->data(); + u_plane = v_plane = base::span<const uint8_t>(*fake_uv_data_); } auto frame = VideoFrame::WrapExternalYuvData( pixel_format, visible_size, gfx::Rect(visible_size), config_.aspect_ratio().GetNaturalSize(gfx::Rect(visible_size)), - pic->stride[0], uv_plane_stride, uv_plane_stride, - static_cast<uint8_t*>(pic->data[0]), u_plane, v_plane, - base::Microseconds(pic->m.timestamp)); + pic->stride[0], uv_plane_stride, uv_plane_stride, y_plane, u_plane, + v_plane, base::Microseconds(pic->m.timestamp)); if (!frame) return nullptr;
diff --git a/net/url_request/redirect_info.cc b/net/url_request/redirect_info.cc index becf2a4..037df28 100644 --- a/net/url_request/redirect_info.cc +++ b/net/url_request/redirect_info.cc
@@ -65,6 +65,7 @@ RedirectInfo::FirstPartyURLPolicy original_first_party_url_policy, ReferrerPolicy original_referrer_policy, const std::string& original_referrer, + const std::optional<url::Origin>& original_initiator, int http_status_code, const GURL& new_location, const std::optional<std::string>& referrer_policy_header, @@ -73,6 +74,7 @@ bool is_signed_exchange_fallback_redirect) { RedirectInfo redirect_info; + redirect_info.original_initiator = original_initiator; redirect_info.status_code = http_status_code; // The request method may change, depending on the status code.
diff --git a/net/url_request/redirect_info.h b/net/url_request/redirect_info.h index 810eaf97..49fe7a9 100644 --- a/net/url_request/redirect_info.h +++ b/net/url_request/redirect_info.h
@@ -13,6 +13,7 @@ #include "net/cookies/site_for_cookies.h" #include "net/url_request/referrer_policy.h" #include "url/gurl.h" +#include "url/origin.h" namespace net { @@ -42,6 +43,7 @@ FirstPartyURLPolicy original_first_party_url_policy, ReferrerPolicy original_referrer_policy, const std::string& original_referrer, + const std::optional<url::Origin>& original_initiator, // The HTTP status code of the redirect response. int http_status_code, // The new location URL of the redirect response. @@ -58,6 +60,10 @@ // Whether the redirect is caused by a failure of signed exchange loading. bool is_signed_exchange_fallback_redirect = false); + // The original request's initiator. This is used for some checks if a + // redirect is safe. + std::optional<url::Origin> original_initiator; + // The status code for the redirect response. This is almost redundant with // the response headers, but some URLRequestJobs emit redirects without // headers.
diff --git a/net/url_request/redirect_info_unittest.cc b/net/url_request/redirect_info_unittest.cc index ce10b7a3..d1ea43f8a 100644 --- a/net/url_request/redirect_info_unittest.cc +++ b/net/url_request/redirect_info_unittest.cc
@@ -52,8 +52,9 @@ RedirectInfo redirect_info = RedirectInfo::ComputeRedirectInfo( test.original_method, kOriginalUrl, kOriginalSiteForCookies, kOriginalFirstPartyUrlPolicy, kOriginalReferrerPolicy, - kOriginalReferrer, test.http_status_code, kNewLocation, - std::nullopt /* referrer_policy_header */, kInsecureSchemeWasUpgraded, + kOriginalReferrer, /*original_initiator=*/std::nullopt, + test.http_status_code, kNewLocation, + /*referrer_policy_header=*/std::nullopt, kInsecureSchemeWasUpgraded, kCopyFragment); EXPECT_EQ(test.expected_new_method, redirect_info.new_method); @@ -103,8 +104,9 @@ RedirectInfo redirect_info = RedirectInfo::ComputeRedirectInfo( kOriginalMethod, GURL(test.original_url), kOriginalSiteForCookies, kOriginalFirstPartyUrlPolicy, kOriginalReferrerPolicy, - kOriginalReferrer, kHttpStatusCode, GURL(test.new_location), - std::nullopt /* referrer_policy_header */, kInsecureSchemeWasUpgraded, + kOriginalReferrer, /*original_initiator=*/std::nullopt, kHttpStatusCode, + GURL(test.new_location), + /*referrer_policy_header=*/std::nullopt, kInsecureSchemeWasUpgraded, test.copy_fragment); EXPECT_EQ(GURL(test.expected_new_url), redirect_info.new_url); @@ -142,8 +144,9 @@ RedirectInfo redirect_info = RedirectInfo::ComputeRedirectInfo( kOriginalMethod, kOriginalUrl, kOriginalSiteForCookies, test.original_first_party_url_policy, kOriginalReferrerPolicy, - kOriginalReferrer, kHttpStatusCode, kNewLocation, - std::nullopt /* referrer_policy_header */, kInsecureSchemeWasUpgraded, + kOriginalReferrer, /*original_initiator=*/std::nullopt, kHttpStatusCode, + kNewLocation, + /*referrer_policy_header=*/std::nullopt, kInsecureSchemeWasUpgraded, kCopyFragment); EXPECT_TRUE(redirect_info.new_site_for_cookies.IsEquivalent( @@ -462,7 +465,8 @@ RedirectInfo redirect_info = RedirectInfo::ComputeRedirectInfo( kOriginalMethod, original_url, kOriginalSiteForCookies, kOriginalFirstPartyUrlPolicy, test.original_referrer_policy, - test.original_referrer, response_headers->response_code(), new_location, + test.original_referrer, /*original_initiator=*/std::nullopt, + response_headers->response_code(), new_location, RedirectUtil::GetReferrerPolicyHeader(response_headers.get()), kInsecureSchemeWasUpgraded, kCopyFragment);
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc index 8bdef06e..8b0de816 100644 --- a/net/url_request/url_request_job.cc +++ b/net/url_request/url_request_job.cc
@@ -468,7 +468,8 @@ RedirectInfo redirect_info = RedirectInfo::ComputeRedirectInfo( request_->method(), request_->url(), request_->site_for_cookies(), request_->first_party_url_policy(), request_->referrer_policy(), - request_->referrer(), http_status_code, new_location, + request_->referrer(), request_->initiator(), http_status_code, + new_location, net::RedirectUtil::GetReferrerPolicyHeader( request_->response_headers()), insecure_scheme_was_upgraded, CopyFragmentOnRedirect(new_location));
diff --git a/remoting/base/rsa_key_pair.cc b/remoting/base/rsa_key_pair.cc index 5c09322..d254fdc 100644 --- a/remoting/base/rsa_key_pair.cc +++ b/remoting/base/rsa_key_pair.cc
@@ -15,86 +15,52 @@ #include "base/logging.h" #include "base/rand_util.h" #include "base/time/time.h" -#include "crypto/rsa_private_key.h" -#include "crypto/signature_creator.h" +#include "crypto/sign.h" #include "net/cert/x509_util.h" namespace remoting { -RsaKeyPair::RsaKeyPair(std::unique_ptr<crypto::RSAPrivateKey> key) - : key_(std::move(key)) { - DCHECK(key_); -} +RsaKeyPair::RsaKeyPair(crypto::keypair::PrivateKey&& key) + : key_(std::move(key)) {} RsaKeyPair::~RsaKeyPair() = default; // static scoped_refptr<RsaKeyPair> RsaKeyPair::Generate() { - std::unique_ptr<crypto::RSAPrivateKey> key( - crypto::RSAPrivateKey::Create(2048)); - if (!key) { - LOG(ERROR) << "Cannot generate private key."; - return nullptr; - } - return new RsaKeyPair(std::move(key)); + return new RsaKeyPair(crypto::keypair::PrivateKey::GenerateRsa2048()); } // static scoped_refptr<RsaKeyPair> RsaKeyPair::FromString( const std::string& key_base64) { - std::string key_str; - if (!base::Base64Decode(key_base64, &key_str)) { + std::optional<std::vector<uint8_t>> key_bytes = + base::Base64Decode(key_base64); + if (!key_bytes.has_value()) { LOG(ERROR) << "Failed to decode private key."; return nullptr; } - std::vector<uint8_t> key_buf(key_str.begin(), key_str.end()); - std::unique_ptr<crypto::RSAPrivateKey> key( - crypto::RSAPrivateKey::CreateFromPrivateKeyInfo(key_buf)); - if (!key) { + auto key = crypto::keypair::PrivateKey::FromPrivateKeyInfo(*key_bytes); + if (!key.has_value()) { LOG(ERROR) << "Invalid private key."; return nullptr; } - return new RsaKeyPair(std::move(key)); + return new RsaKeyPair(std::move(*key)); } std::string RsaKeyPair::ToString() const { - // Check that the key initialized. - DCHECK(key_.get() != nullptr); - - std::vector<uint8_t> key_buf; - CHECK(key_->ExportPrivateKey(&key_buf)); - std::string key_str(key_buf.begin(), key_buf.end()); - std::string key_base64 = base::Base64Encode(key_str); - return key_base64; + return base::Base64Encode(key_.ToPrivateKeyInfo()); } std::string RsaKeyPair::GetPublicKey() const { - std::vector<uint8_t> public_key; - CHECK(key_->ExportPublicKey(&public_key)); - std::string public_key_str(public_key.begin(), public_key.end()); - std::string public_key_base64 = base::Base64Encode(public_key_str); - return public_key_base64; + return base::Base64Encode(key_.ToSubjectPublicKeyInfo()); } -std::string RsaKeyPair::SignMessage(const std::string& message) const { - std::unique_ptr<crypto::SignatureCreator> signature_creator( - crypto::SignatureCreator::Create(key_.get(), - crypto::SignatureCreator::SHA1)); - signature_creator->Update(reinterpret_cast<const uint8_t*>(message.c_str()), - message.length()); - std::vector<uint8_t> signature_buf; - signature_creator->Final(&signature_buf); - std::string signature_str(signature_buf.begin(), signature_buf.end()); - std::string signature_base64 = base::Base64Encode(signature_str); - return signature_base64; -} - -std::string RsaKeyPair::GenerateCertificate() const { +std::string RsaKeyPair::GenerateCertificate() { std::string der_cert; net::x509_util::CreateSelfSignedCert( - key_->key(), net::x509_util::DIGEST_SHA256, "CN=chromoting", + key_.key(), net::x509_util::DIGEST_SHA256, "CN=chromoting", base::RandInt(1, std::numeric_limits<int>::max()), base::Time::Now(), base::Time::Now() + base::Days(1), {}, &der_cert); return der_cert;
diff --git a/remoting/base/rsa_key_pair.h b/remoting/base/rsa_key_pair.h index 8288809..d359bfa 100644 --- a/remoting/base/rsa_key_pair.h +++ b/remoting/base/rsa_key_pair.h
@@ -9,10 +9,7 @@ #include <string> #include "base/memory/ref_counted.h" - -namespace crypto { -class RSAPrivateKey; -} // namespace crypto +#include "crypto/keypair.h" namespace remoting { @@ -33,22 +30,19 @@ // Generates a DER-encoded self-signed certificate using the key pair. Returns // empty string if cert generation fails (e.g. it may happen when the system // clock is off). - std::string GenerateCertificate() const; + std::string GenerateCertificate(); // Returns a base64-encoded string representing the public key. std::string GetPublicKey() const; - // Returns a base64-encoded signature for the message. - std::string SignMessage(const std::string& message) const; - - crypto::RSAPrivateKey* private_key() { return key_.get(); } + EVP_PKEY* private_key() { return key_.key(); } private: friend class base::RefCountedThreadSafe<RsaKeyPair>; - RsaKeyPair(std::unique_ptr<crypto::RSAPrivateKey> key); + explicit RsaKeyPair(crypto::keypair::PrivateKey&& key); virtual ~RsaKeyPair(); - std::unique_ptr<crypto::RSAPrivateKey> key_; + crypto::keypair::PrivateKey key_; }; } // namespace remoting
diff --git a/remoting/base/rsa_key_pair_unittest.cc b/remoting/base/rsa_key_pair_unittest.cc index e1555eb7..77809f5 100644 --- a/remoting/base/rsa_key_pair_unittest.cc +++ b/remoting/base/rsa_key_pair_unittest.cc
@@ -11,66 +11,7 @@ namespace remoting { -namespace { -const char kTestMessage[] = "Test Message"; - -// |kTestMessage| signed with the key from |kTestRsaKeyPair|. -const char kExpectedSignature[] = -"LfUyXU2AiKM4rpWivUR3bLiQiRt1W3iIenNfJEB8RWyoEfnvSBoD52x8q9yFvtLFDEMPWyIrwM+N2" -"LuaWBKG1c0R7h+twBgvpExzZneJl+lbGMRx9ba8m/KAFrUWA/NRzOen2NHCuPybOEasgrPgGWBrmf" -"gDcvyW8QiGuKLopGj/4c5CQT4yE8JjsyU3Qqo2ZPK4neJYQhOmAlg+Q5dAPLpzWMj5HQyOVHJaSXZ" -"Y8vl/LiKvbdofYLeYNVKAE4q5mfpQMrsysPYpbxBV60AhFyrvtC040MFGcflKQRZNiZwMXVb7DclC" -"BPgvK7rI5Y0ERtVm+yNmH7vCivfyAnDUYA=="; - -// Another RSA key pair, different from |kTestRsaKeyPair| -const char kTestRsaKeyPair2[] = -"MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDLNd9bNNBFxXSasqWHv8ydItmoi" -"NhiWV/1Z6JI6TpKTnTm9yQSxIoCLHT8fB8QA0wzzgYEuZpDHIZDv1WxSdC3kgx84JrWe43+SPDZ2b" -"7ekuhXinPK+f3Nw5GjGaAUevyeWNoDD3GFka5q4zw8W1OE8E/z50FfPqOUejg+qyrgovEWQIZWvI0" -"CHdy8HTtxT7G0YbPJYZ8ycRkUrsXtY2RQX4IaCMEcdAmCm2Q2hYldulbZX6Bvv5GX8FOWYOerbYVK" -"ZsmH5II+KEP4We75ONVR2jdCCJ5L3YMXtbYtZZy1yZXcOf2fpBo6+p81M7rG9com/C75QoMVMVJJC" -"ahCli7/AgMBAAECggEAZNzThUC8k7UDQHmlgbCojeIraOSrin1UDMmomknxHcq9aZqHtC0LVzLbyi" -"qNfHQ2kYwUHqpFMERrPBsvHHVH/KWoPx94mzbubqWjrm3OuEjwu+rDuJ7G5CfLFMp2U1QMKUhuxZA" -"Xx7Vcfj9VuZuW4+gntyc0omLD7MGRQ0HQYXh7ZDGWrMPEs6Cjzcx9/G9AD7ysWIqk14iwJqKhztiD" -"NirMr64eDZFzzDvXTl3j5l+yiAHiV5LPUUKyCe+jEdZMceSKy5wSZXSkiW4zhgEzwdMN2zmxlcC59" -"17dw2c6xD+tKxTMwzx77sauBFNzebNU1m5hIKH+jCPiA8aQv3/l8QKBgQD8J4ilT/CV6hhw0/q99e" -"+54s+SIz8nYo8fvyeEBCiA4lf/OZuxl/sYWK+PthP+xzsjKTq7yoFkliXrtOioW34E0WdLv+6jEXQ" -"hxaXZyk0TMwxm228xMG66evXDJ8OGWCi6uiAnVWNUu6VXacQwKHf9hv6DNRNcmkQGojfcx3ZNZwKB" -"gQDOT0ApweRr0zA28l8C6qtNfY/NIeWTWPDTspt8zDoX1ILXc2HZHYW0QtUQ6tXNQnUW/ymavla7E" -"upa8AoZoqMvaUIg1BjMYIzc4yQMVf1BRCfvT8GsoymX+8Gt/DB34L7KMPOhQysMmZMNjKtozQsbZY" -"wcnN19pWnDv78trFZ6qQKBgHy1nMqN7+JlRjM/VCrxYOAhwiF31ztGbpz38LZFTDb6OyVau5spHKH" -"c8u9z0Q3YQXJRaOAJ9tblv9mEvvDNV1VQr/Lx+TejYTl2xGEjwdz2CXMxohvE5W7Lc5NSrkxae8Jm" -"XZK2k4sLx2mlQMfErBuy0VvZOzs4fN5/CnviFquPAoGBAI8NAI5ztPDW1L2kvSCGmxT2FTnFYSwUJ" -"ZiEZa/Y5AcWAUtm49fp0oW1OYuraWgTxqCVeMGlbPn2Ga3IdxhjXwdG0uV0a2V7JPEcRiiPjzUsDw" -"yunroXwIVzuU3saacVnPURkDynGDh6XC6u9UOLuUHb3ZURZ7rxcS6by/HdZ3FRAoGBAOhjtjyfFEn" -"bZtjcQd+bNtoTPV/L71+K8AYPwV0td5Qy5VbBrTIlv7pNFxE4bYNuEe6cI2cxTua4i5IoKYXyUm5u" -"SvUVkkz7CpoiFwMnnLsNrZmazVS2zq0Y2a2ai8C3mPgLOdroS2fBBAcuFApeq1PvISmT6ZnJJ8Yah" -"HQCfClh"; - -} // namespace - -class RsaKeyPairTest : public testing::Test { -}; - -TEST_F(RsaKeyPairTest, ImportExportImport) { - // Load a key from a string, export to a string, load again, and verify that - // we generate the same signature with both keys. - scoped_refptr<RsaKeyPair> exported_key = RsaKeyPair::FromString( - kTestRsaKeyPair); - scoped_refptr<RsaKeyPair> imported_key = RsaKeyPair::FromString( - exported_key->ToString()); - - ASSERT_EQ(exported_key->SignMessage(kTestMessage), - imported_key->SignMessage(kTestMessage)); -} - -TEST_F(RsaKeyPairTest, Signatures) { - // Sign a message and check that we get the expected signature. - scoped_refptr<RsaKeyPair> key_pair = RsaKeyPair::FromString(kTestRsaKeyPair); - - std::string signature_base64 = key_pair->SignMessage(kTestMessage); - ASSERT_EQ(signature_base64, std::string(kExpectedSignature)); -} +using RsaKeyPairTest = ::testing::Test; TEST_F(RsaKeyPairTest, GenerateKey) { // Test that we can generate a valid key. @@ -78,21 +19,6 @@ ASSERT_TRUE(key_pair.get()); ASSERT_NE(key_pair->ToString(), ""); ASSERT_NE(key_pair->GetPublicKey(), ""); - ASSERT_NE(key_pair->SignMessage(kTestMessage), ""); -} - -TEST_F(RsaKeyPairTest, SignaturesDiffer) { - // Sign using different keys/messages and check that signatures are different. - scoped_refptr<RsaKeyPair> key_pair1 = RsaKeyPair::FromString(kTestRsaKeyPair); - scoped_refptr<RsaKeyPair> key_pair2 = RsaKeyPair::FromString( - kTestRsaKeyPair2); - - std::string signature_kp1_msg1_base64 = key_pair1->SignMessage(kTestMessage); - std::string signature_kp2_msg1_base64 = key_pair2->SignMessage(kTestMessage); - std::string signature_kp1_msg2_base64 = key_pair1->SignMessage("Different"); - ASSERT_NE(signature_kp1_msg1_base64, signature_kp2_msg1_base64); - ASSERT_NE(signature_kp1_msg1_base64, signature_kp1_msg2_base64); - ASSERT_NE(key_pair1->GetPublicKey(), key_pair2->GetPublicKey()); } } // namespace remoting
diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h index 6a3f0f0..e787a14 100644 --- a/remoting/protocol/jingle_session.h +++ b/remoting/protocol/jingle_session.h
@@ -15,7 +15,6 @@ #include "base/strings/string_number_conversions.h" #include "base/threading/thread_checker.h" #include "base/timer/timer.h" -#include "crypto/rsa_private_key.h" #include "remoting/base/source_location.h" #include "remoting/protocol/authenticator.h" #include "remoting/protocol/datagram_channel_factory.h"
diff --git a/remoting/protocol/ssl_hmac_channel_authenticator.cc b/remoting/protocol/ssl_hmac_channel_authenticator.cc index e22d6f8..d454971 100644 --- a/remoting/protocol/ssl_hmac_channel_authenticator.cc +++ b/remoting/protocol/ssl_hmac_channel_authenticator.cc
@@ -238,7 +238,7 @@ ssl_config.require_ecdhe = true; socket_context_.server_context = net::CreateSSLServerContext( - cert.get(), *local_key_pair_->private_key(), ssl_config); + cert.get(), local_key_pair_->private_key(), ssl_config); std::unique_ptr<net::SSLServerSocket> server_socket = socket_context_.server_context->CreateSSLServerSocket(
diff --git a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc index 2659820..926c224 100644 --- a/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc +++ b/remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc
@@ -15,7 +15,6 @@ #include "base/test/task_environment.h" #include "base/test/test_timeouts.h" #include "base/timer/timer.h" -#include "crypto/rsa_private_key.h" #include "net/base/net_errors.h" #include "net/cert/x509_util.h" #include "net/test/cert_test_util.h"
diff --git a/sandbox/policy/BUILD.gn b/sandbox/policy/BUILD.gn index 7d206b8..e7859fb 100644 --- a/sandbox/policy/BUILD.gn +++ b/sandbox/policy/BUILD.gn
@@ -6,7 +6,7 @@ import("//build/config/cast.gni") import("//build/config/sanitizers/sanitizers.gni") import("//chromeos/ash/components/assistant/assistant.gni") -import("//media/gpu/args.gni") +import("//media/media_options.gni") import("//testing/test.gni") # Most consumers of sandbox::policy should depend on this target. @@ -95,7 +95,7 @@ "linux/sandbox_seccomp_bpf_linux.cc", "linux/sandbox_seccomp_bpf_linux.h", ] - if (use_linux_video_acceleration) { + if (allow_oop_video_decoder) { sources += [ "linux/bpf_hardware_video_decoding_policy_linux.cc", "linux/bpf_hardware_video_decoding_policy_linux.h", @@ -110,6 +110,7 @@ ] deps += [ ":chromecast_sandbox_allowlist_buildflags", + "//media:media_buildflags", "//media/gpu:buildflags", "//sandbox:sandbox_buildflags", "//sandbox/linux:sandbox_services",
diff --git a/sandbox/policy/DEPS b/sandbox/policy/DEPS index 179059b..29b344d 100644 --- a/sandbox/policy/DEPS +++ b/sandbox/policy/DEPS
@@ -1,6 +1,7 @@ include_rules = [ "+chromeos/ash/components/assistant/buildflags.h", "+media/gpu/buildflags.h", + "+media/media_buildflags.h", # TODO(crbug.com/40220507): remove this. "+net/base/features.h", "+ppapi/buildflags",
diff --git a/sandbox/policy/linux/sandbox_seccomp_bpf_linux.cc b/sandbox/policy/linux/sandbox_seccomp_bpf_linux.cc index 209bd71..e531dda0 100644 --- a/sandbox/policy/linux/sandbox_seccomp_bpf_linux.cc +++ b/sandbox/policy/linux/sandbox_seccomp_bpf_linux.cc
@@ -18,7 +18,6 @@ #include "base/feature_list.h" #include "base/notreached.h" #include "build/build_config.h" -#include "media/gpu/buildflags.h" #include "ppapi/buildflags/buildflags.h" #include "sandbox/linux/bpf_dsl/bpf_dsl.h" #include "sandbox/linux/bpf_dsl/trap_registry.h" @@ -68,7 +67,11 @@ #endif // BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#include "media/gpu/buildflags.h" // nogncheck +#include "media/media_buildflags.h" // nogncheck +#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) #include "sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.h" +#endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_LINUX) @@ -219,22 +222,24 @@ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) case sandbox::mojom::Sandbox::kScreenAI: return std::make_unique<ScreenAIProcessPolicy>(); -#endif -#if BUILDFLAG(IS_LINUX) - case sandbox::mojom::Sandbox::kVideoEffects: - return std::make_unique<ServiceProcessPolicy>(); -#endif // BUILDFLAG(IS_LINUX) -#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: return std::make_unique<HardwareVideoDecodingProcessPolicy>( HardwareVideoDecodingProcessPolicy::ComputePolicyType( options.use_amd_specific_policies)); +#endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) +#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) case sandbox::mojom::Sandbox::kHardwareVideoEncoding: // TODO(b/255554267): we're using the GPU process sandbox policy for now // as a transition step. However, we should create a policy that's tighter // just for hardware video encoding. return GetGpuProcessSandbox(options); -#endif +#endif // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) + case sandbox::mojom::Sandbox::kVideoEffects: + return std::make_unique<ServiceProcessPolicy>(); +#endif // BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_CHROMEOS) case sandbox::mojom::Sandbox::kIme: return std::make_unique<ImeProcessPolicy>(); @@ -294,10 +299,12 @@ CHECK_EQ(EPERM, errno); #endif // !defined(NDEBUG) } break; -#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: +#endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) +#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) case sandbox::mojom::Sandbox::kHardwareVideoEncoding: -#endif +#endif // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) #if BUILDFLAG(IS_CHROMEOS) case sandbox::mojom::Sandbox::kIme: case sandbox::mojom::Sandbox::kTts:
diff --git a/sandbox/policy/mojom/BUILD.gn b/sandbox/policy/mojom/BUILD.gn index e5d9075..f581401 100644 --- a/sandbox/policy/mojom/BUILD.gn +++ b/sandbox/policy/mojom/BUILD.gn
@@ -4,6 +4,7 @@ import("//chromeos/ash/components/assistant/assistant.gni") import("//media/gpu/args.gni") +import("//media/media_options.gni") import("//mojo/public/tools/bindings/mojom.gni") mojom("mojom") { @@ -20,4 +21,7 @@ if (use_linux_video_acceleration) { enabled_features += [ "enable_oop_video_accelerators" ] } + if (allow_oop_video_decoder) { + enabled_features += [ "enable_oop_video_decoder" ] + } }
diff --git a/sandbox/policy/mojom/sandbox.mojom b/sandbox/policy/mojom/sandbox.mojom index 59d1555b..e7b5d27 100644 --- a/sandbox/policy/mojom/sandbox.mojom +++ b/sandbox/policy/mojom/sandbox.mojom
@@ -109,10 +109,7 @@ // iHD). For V4L2, we set up the broker process to allow opening certain V4L2 // devices and we load the libv4l2.so library. // - // TODO(b/195769334): we're using the GPU process sandbox policy for now as a - // transition step. However, we should create a policy that's tighter just for - // hardware video decoding. - [EnableIf=enable_oop_video_accelerators] kHardwareVideoDecoding, + [EnableIf=enable_oop_video_decoder] kHardwareVideoDecoding, // Used to protect processes that perform hardware video encode acceleration. // Currently uses the same policy as the GPU process sandbox. Warm-up does
diff --git a/sandbox/policy/sandbox_type.cc b/sandbox/policy/sandbox_type.cc index 882462b..dc7873191 100644 --- a/sandbox/policy/sandbox_type.cc +++ b/sandbox/policy/sandbox_type.cc
@@ -19,6 +19,7 @@ #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #include "media/gpu/buildflags.h" // nogncheck +#include "media/media_buildflags.h" // nogncheck #endif namespace sandbox::policy { @@ -323,13 +324,15 @@ return kMirroringSandbox; #endif #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) case Sandbox::kHardwareVideoDecoding: return kHardwareVideoDecodingSandbox; +#endif // BUILDFLAG(ALLOW_OOP_VIDEO_DECODER) +#if BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) case Sandbox::kHardwareVideoEncoding: return kHardwareVideoEncodingSandbox; -#endif -#endif +#endif // BUILDFLAG(USE_LINUX_VIDEO_ACCELERATION) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #if BUILDFLAG(IS_CHROMEOS) case Sandbox::kIme: return kImeSandbox;
diff --git a/services/network/prefetch_url_loader_client_unittest.cc b/services/network/prefetch_url_loader_client_unittest.cc index ed1524ab..f1a6e89 100644 --- a/services/network/prefetch_url_loader_client_unittest.cc +++ b/services/network/prefetch_url_loader_client_unittest.cc
@@ -160,7 +160,8 @@ "GET", TestURL(), TestIsolationInfo().site_for_cookies(), RedirectInfo::FirstPartyURLPolicy::NEVER_CHANGE_URL, net::ReferrerPolicy::CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE, - TestOrigin().Serialize(), 301, GURL(kRedirectTo), std::nullopt, false); + TestOrigin().Serialize(), /*original_initiator=*/std::nullopt, 301, + GURL(kRedirectTo), std::nullopt, false); } // Returns true if two SiteForCookies objects match.
diff --git a/services/network/public/cpp/net_ipc_param_traits.h b/services/network/public/cpp/net_ipc_param_traits.h index aeb766e3..4d12481d 100644 --- a/services/network/public/cpp/net_ipc_param_traits.h +++ b/services/network/public/cpp/net_ipc_param_traits.h
@@ -268,6 +268,7 @@ IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(net::RedirectInfo) + IPC_STRUCT_TRAITS_MEMBER(original_initiator) IPC_STRUCT_TRAITS_MEMBER(status_code) IPC_STRUCT_TRAITS_MEMBER(new_method) IPC_STRUCT_TRAITS_MEMBER(new_url)
diff --git a/services/webnn/ort/context_provider_ort.cc b/services/webnn/ort/context_provider_ort.cc index 09e7723..76d9139 100644 --- a/services/webnn/ort/context_provider_ort.cc +++ b/services/webnn/ort/context_provider_ort.cc
@@ -5,6 +5,9 @@ #include "services/webnn/ort/context_provider_ort.h" #include "base/command_line.h" +#include "base/compiler_specific.h" +#include "base/containers/span.h" +#include "base/strings/cstring_view.h" #include "base/types/expected_macros.h" #include "services/webnn/ort/context_impl_ort.h" #include "services/webnn/ort/ort_status.h" @@ -16,6 +19,73 @@ namespace { +struct EpInfo { + base::cstring_view name; + base::wcstring_view package_family_name; + base::wcstring_view library_name; + PACKAGE_VERSION package_version; + // Represents the vendor id of the hardware device used by the execution + // provider. + uint32_t vendor_id; +}; + +constexpr EpInfo kKnownEPs[] = { + {.name = "OpenVINOExecutionProvider", + .package_family_name = + L"Microsoft.WindowsMLRuntime.Intel.OpenVINO.EP_8wekyb3d8bbwe", + .library_name = L"onnxruntime_providers_openvino.dll", + .package_version = + { + .Major = 0, + .Minor = 0, + .Build = 0, + .Revision = 0, + }, + .vendor_id = 0x8086}, +}; + +// Returns true if the `vendor_id` exists in the `gpu_info`. +bool VendorIdExistsInGpuInfo(const gpu::GPUInfo& gpu_info, uint32_t vendor_id) { + if (gpu_info.active_gpu().vendor_id == vendor_id) { + return true; + } + for (const auto& secondary_gpu : gpu_info.secondary_gpus) { + if (secondary_gpu.vendor_id == vendor_id) { + return true; + } + } + for (const auto& npu : gpu_info.npus) { + if (npu.vendor_id == vendor_id) { + return true; + } + } + return false; +} + +bool IsExecutionProviderRegistered(const OrtApi* ort_api, + OrtEnv* env, + base::cstring_view ep_name) { + size_t num_ep_devices = 0; + const OrtEpDevice* const* ep_devices = nullptr; + CHECK_STATUS(ort_api->GetEpDevices(env, &ep_devices, &num_ep_devices)); + + // SAFETY: ORT guarantees that `ep_devices` is valid and contains + // `num_ep_devices` elements. + base::span<const OrtEpDevice* const> ep_devices_span = + UNSAFE_BUFFERS(base::span(ep_devices, num_ep_devices)); + for (const OrtEpDevice* ep_device : ep_devices_span) { + CHECK(ep_device); + const char* registered_ep_name = ort_api->EpDevice_EpName(ep_device); + // SAFETY: ORT guarantees that `registered_ep_name` is valid and + // null-terminated. + if (registered_ep_name && + ep_name == UNSAFE_BUFFERS(base::cstring_view(registered_ep_name))) { + return true; + } + } + return false; +} + // Helper function to convert a string to OrtLoggingLevel enum. OrtLoggingLevel StringToOrtLoggingLevel(std::string_view logging_level) { if (logging_level == "VERBOSE") { @@ -39,6 +109,7 @@ base::expected<std::unique_ptr<WebNNContextImpl>, mojom::ErrorPtr> CreateContextFromOptions(mojom::CreateContextOptionsPtr options, + const gpu::GPUInfo& gpu_info, mojo::PendingReceiver<mojom::WebNNContext> receiver, WebNNContextProviderImpl* context_provider) { auto* platform_functions = PlatformFunctions::GetInstance(); @@ -57,6 +128,7 @@ ort_logging_level = StringToOrtLoggingLevel(user_logging_level); } + const OrtApi* ort_api = platform_functions->ort_api(); // `OrtEnv` is reference counted. The first `CreateEnv()` will create the // `OrtEnv` instance. The following invocations return a reference to the // same instance. It is released upon the last reference is removed via @@ -64,13 +136,43 @@ // Creating and releasing `OrtEnv` are protected by a lock internally, so it // is sequence bound. ScopedOrtEnv env; - if (ORT_CALL_FAILED(platform_functions->ort_api()->CreateEnv( - ort_logging_level, "WebNN", ScopedOrtEnv::Receiver(env).get()))) { + if (ORT_CALL_FAILED(ort_api->CreateEnv(ort_logging_level, "WebNN", + ScopedOrtEnv::Receiver(env).get()))) { return base::unexpected( mojom::Error::New(mojom::Error::Code::kNotSupportedError, "Failed to create the ONNX Runtime environment.")); } + // Register the execution provider based on the GPU/NPU vendor id if it's not + // registered yet. Ultimately, ignore the failure of registering the EP. + // + // TODO(crbug.com/427242324): Add a flag to register an EP from location + // passed in command line for testing development EP build. + for (const auto& ep_info : kKnownEPs) { + bool vendor_matched = VendorIdExistsInGpuInfo(gpu_info, ep_info.vendor_id); + if (!vendor_matched) { + continue; + } + + bool ep_registered = + IsExecutionProviderRegistered(ort_api, env.get(), ep_info.name); + if (ep_registered) { + continue; + } + + const std::optional<base::FilePath>& ep_package_path = + platform_functions->InitializePackageDependency( + ep_info.package_family_name, ep_info.package_version); + if (ep_package_path) { + CALL_ORT_FUNC(ort_api->RegisterExecutionProviderLibrary( + env.get(), ep_info.name.c_str(), + ep_package_path->Append(L"ExecutionProvider") + .Append(ep_info.library_name) + .value() + .c_str())); + } + } + ASSIGN_OR_RETURN(scoped_refptr<SessionOptions> session_options, SessionOptions::Create(options->device)); return std::make_unique<ContextImplOrt>(std::move(receiver), context_provider,
diff --git a/services/webnn/ort/context_provider_ort.h b/services/webnn/ort/context_provider_ort.h index 9ffb4e52..50a7486 100644 --- a/services/webnn/ort/context_provider_ort.h +++ b/services/webnn/ort/context_provider_ort.h
@@ -6,6 +6,7 @@ #define SERVICES_WEBNN_ORT_CONTEXT_PROVIDER_ORT_H_ #include "base/types/expected.h" +#include "gpu/config/gpu_info.h" #include "services/webnn/public/mojom/webnn_context_provider.mojom.h" #include "services/webnn/public/mojom/webnn_error.mojom.h" @@ -21,6 +22,7 @@ // ML.createContext(MLContextOptions) overload in the WebNN API. base::expected<std::unique_ptr<WebNNContextImpl>, mojom::ErrorPtr> CreateContextFromOptions(mojom::CreateContextOptionsPtr options, + const gpu::GPUInfo& gpu_info, mojo::PendingReceiver<mojom::WebNNContext> receiver, WebNNContextProviderImpl* context_provider);
diff --git a/services/webnn/ort/platform_functions_ort.cc b/services/webnn/ort/platform_functions_ort.cc index adc99338..43ca41b 100644 --- a/services/webnn/ort/platform_functions_ort.cc +++ b/services/webnn/ort/platform_functions_ort.cc
@@ -4,15 +4,9 @@ #include "services/webnn/ort/platform_functions_ort.h" -#include <windows.h> - -#include <appmodel.h> #include <winerror.h> #include <wrl.h> -#include <optional> - -#include "base/files/file_path.h" #include "base/logging.h" #include "base/native_library.h" #include "base/path_service.h" @@ -23,16 +17,17 @@ namespace { using OrtGetApiBaseProc = decltype(OrtGetApiBase)*; -using TryCreatePackageDependencyProc = decltype(TryCreatePackageDependency)*; -using AddPackageDependencyProc = decltype(AddPackageDependency)*; -constexpr int kMinVersionMajor = 0; -constexpr int kMinVersionMinor = 0; -constexpr int kMinVersionBuild = 0; -constexpr int kMinVersionRevision = 0; -constexpr wchar_t kWindowsMLPackageFamilyName[] = +constexpr base::wcstring_view kWindowsMLPackageFamilyName = L"Microsoft.WindowsMLRuntime.0.3_8wekyb3d8bbwe"; +constexpr PACKAGE_VERSION kWindowsMLPackageVersion = { + .Major = 0, + .Minor = 0, + .Build = 0, + .Revision = 0, +}; + struct ScopedWcharTypeTraits { static wchar_t* InvalidValue() { return nullptr; } static void Free(wchar_t* value) { @@ -50,7 +45,7 @@ int32_t result = GetPackagePathByFullName(package_full_name, &path_length, nullptr); if (result != ERROR_INSUFFICIENT_BUFFER) { - LOG(ERROR) << "Failed to get package path length for package: " + LOG(ERROR) << "[WebNN] Failed to get package path length for package: " << package_full_name << ". Error: " << logging::SystemErrorCodeToString(HRESULT_FROM_WIN32(result)); return std::nullopt; @@ -61,7 +56,7 @@ result = GetPackagePathByFullName(package_full_name, &path_length, base::WriteInto(&path_buffer, path_length)); if (result != ERROR_SUCCESS) { - LOG(ERROR) << "Failed to get package path for package: " + LOG(ERROR) << "[WebNN] Failed to get package path for package: " << package_full_name << ". Error: " << logging::SystemErrorCodeToString(HRESULT_FROM_WIN32(result)); return std::nullopt; @@ -70,85 +65,53 @@ return base::FilePath(path_buffer); } -std::optional<base::FilePath> InitializeWindowsML() { - // KernelBase should always be present on Win10+ machines. - base::ScopedNativeLibrary app_model_library( - base::LoadSystemLibrary(L"KernelBase.dll", nullptr)); - CHECK(app_model_library.is_valid()); - - TryCreatePackageDependencyProc try_create_package_dependency_proc = - reinterpret_cast<TryCreatePackageDependencyProc>( - app_model_library.GetFunctionPointer("TryCreatePackageDependency")); - AddPackageDependencyProc add_package_dependency_proc = - reinterpret_cast<AddPackageDependencyProc>( - app_model_library.GetFunctionPointer("AddPackageDependency")); - if (!try_create_package_dependency_proc || !add_package_dependency_proc) { - LOG(ERROR) << "Failed to get TryCreatePackageDependency and " - "AddPackageDependency functions from KernelBase.dll."; - return std::nullopt; - } - - PACKAGE_VERSION min_version = {.Major = kMinVersionMajor, - .Minor = kMinVersionMinor, - .Build = kMinVersionBuild, - .Revision = kMinVersionRevision}; - ScopedWcharType package_dependency_id; - HRESULT hr = try_create_package_dependency_proc( - /*user=*/nullptr, kWindowsMLPackageFamilyName, min_version, - PackageDependencyProcessorArchitectures_None, - PackageDependencyLifetimeKind_Process, - /*lifetimeArtifact=*/nullptr, CreatePackageDependencyOptions_None, - ScopedWcharType::Receiver(package_dependency_id).get()); - if (FAILED(hr)) { - LOG(ERROR) << "TryCreatePackageDependency failed for package: " - << kWindowsMLPackageFamilyName - << ". Error: " << logging::SystemErrorCodeToString(hr); - return std::nullopt; - } - - PACKAGEDEPENDENCY_CONTEXT context{}; - ScopedWcharType package_full_name; - hr = add_package_dependency_proc( - package_dependency_id.get(), /*rank=*/0, - AddPackageDependencyOptions_PrependIfRankCollision, &context, - ScopedWcharType::Receiver(package_full_name).get()); - if (FAILED(hr)) { - LOG(ERROR) << "AddPackageDependency failed for package: " - << package_full_name.get() - << ". Error: " << logging::SystemErrorCodeToString(hr); - return std::nullopt; - } - - return GetPackagePath(package_full_name.get()); -} - } // namespace PlatformFunctions::PlatformFunctions() { - // First try to load onnxruntime.dll from the module folder. This enables - // local testing using the latest redistributable onnxruntime.dll. - base::ScopedNativeLibrary ort_library( - base::LoadNativeLibrary(base::PathService::CheckedGet(base::DIR_MODULE) - .Append(L"onnxruntime.dll"), - nullptr)); + // KernelBase should always be present on Win10+ machines. + app_model_library_ = base::ScopedNativeLibrary( + base::LoadSystemLibrary(L"KernelBase.dll", nullptr)); + CHECK(app_model_library_.is_valid()); - // If it failed to load from module folder, try to load from the Windows ML - // package. + try_create_package_dependency_proc_ = + reinterpret_cast<TryCreatePackageDependencyProc>( + app_model_library_.GetFunctionPointer("TryCreatePackageDependency")); + if (!try_create_package_dependency_proc_) { + LOG(ERROR) << "[WebNN] Failed to get TryCreatePackageDependency function " + "from KernelBase.dll."; + return; + } + + add_package_dependency_proc_ = reinterpret_cast<AddPackageDependencyProc>( + app_model_library_.GetFunctionPointer("AddPackageDependency")); + if (!add_package_dependency_proc_) { + LOG(ERROR) << "[WebNN] Failed to get AddPackageDependency function from " + "KernelBase.dll."; + return; + } + + // Initialize Windows ML. + std::optional<base::FilePath> windows_ml_package_path = + InitializePackageDependency(kWindowsMLPackageFamilyName, + kWindowsMLPackageVersion); + if (!windows_ml_package_path) { + LOG(ERROR) + << "[WebNN] Failed to initialize Windows ML and get the package path."; + return; + } + + // Load the onnxruntime.dll from the Windows ML package path. + // + // TODO(crbug.com/427242325): Add a flag to load the onnxruntime.dll from + // location passed in command line for testing development ORT build. + base::ScopedNativeLibrary ort_library = + base::ScopedNativeLibrary(base::LoadNativeLibrary( + windows_ml_package_path->Append(L"onnxruntime.dll"), nullptr)); if (!ort_library.is_valid()) { - // Initialize Windows ML. - std::optional<base::FilePath> package_path = InitializeWindowsML(); - if (!package_path) { - LOG(ERROR) << "Failed to initialize Windows ML and get the package path."; - return; - } - - ort_library = base::ScopedNativeLibrary(base::LoadNativeLibrary( - package_path->Append(L"onnxruntime.dll"), nullptr)); - if (!ort_library.is_valid()) { - LOG(ERROR) << "[WebNN] Failed to load onnxruntime.dll from package path: " - << package_path->value(); - return; - } + LOG(ERROR) + << "[WebNN] Failed to load onnxruntime.dll from the package path: " + << windows_ml_package_path->value(); + return; } OrtGetApiBaseProc ort_get_api_base_proc = reinterpret_cast<OrtGetApiBaseProc>( @@ -188,8 +151,42 @@ return instance.get(); } +std::optional<base::FilePath> PlatformFunctions::InitializePackageDependency( + base::wcstring_view package_family_name, + PACKAGE_VERSION min_version) { + ScopedWcharType package_dependency_id; + HRESULT hr = try_create_package_dependency_proc_( + /*user=*/nullptr, package_family_name.c_str(), min_version, + PackageDependencyProcessorArchitectures_None, + PackageDependencyLifetimeKind_Process, + /*lifetimeArtifact=*/nullptr, CreatePackageDependencyOptions_None, + ScopedWcharType::Receiver(package_dependency_id).get()); + if (FAILED(hr)) { + LOG(ERROR) << "[WebNN] TryCreatePackageDependency failed for package: " + << package_family_name + << ". Error: " << logging::SystemErrorCodeToString(hr); + return std::nullopt; + } + + PACKAGEDEPENDENCY_CONTEXT context{}; + ScopedWcharType package_full_name; + hr = add_package_dependency_proc_( + package_dependency_id.get(), /*rank=*/0, + AddPackageDependencyOptions_PrependIfRankCollision, &context, + ScopedWcharType::Receiver(package_full_name).get()); + if (FAILED(hr)) { + LOG(ERROR) << "[WebNN] AddPackageDependency failed for package: " + << package_full_name.get() + << ". Error: " << logging::SystemErrorCodeToString(hr); + return std::nullopt; + } + + return GetPackagePath(package_full_name.get()); +} + bool PlatformFunctions::AllFunctionsLoaded() { - return ort_api_ && ort_model_editor_api_; + return ort_api_ && ort_model_editor_api_ && + try_create_package_dependency_proc_ && add_package_dependency_proc_; } } // namespace webnn::ort
diff --git a/services/webnn/ort/platform_functions_ort.h b/services/webnn/ort/platform_functions_ort.h index e3ad42a..f0b5bc0 100644 --- a/services/webnn/ort/platform_functions_ort.h +++ b/services/webnn/ort/platform_functions_ort.h
@@ -5,9 +5,17 @@ #ifndef SERVICES_WEBNN_ORT_PLATFORM_FUNCTIONS_ORT_H_ #define SERVICES_WEBNN_ORT_PLATFORM_FUNCTIONS_ORT_H_ +#include <windows.h> + +#include <appmodel.h> + +#include <optional> + #include "base/component_export.h" +#include "base/files/file_path.h" #include "base/no_destructor.h" #include "base/scoped_native_library.h" +#include "base/strings/cstring_view.h" #include "third_party/onnxruntime_headers/src/include/onnxruntime/core/session/onnxruntime_c_api.h" namespace webnn::ort { @@ -24,6 +32,10 @@ return ort_model_editor_api_.get(); } + std::optional<base::FilePath> InitializePackageDependency( + base::wcstring_view package_family_name, + PACKAGE_VERSION min_version); + private: friend class base::NoDestructor<PlatformFunctions>; @@ -32,6 +44,15 @@ bool AllFunctionsLoaded(); + // Library and functions for package dependency initialization. + base::ScopedNativeLibrary app_model_library_; + + using TryCreatePackageDependencyProc = decltype(TryCreatePackageDependency)*; + TryCreatePackageDependencyProc try_create_package_dependency_proc_ = nullptr; + + using AddPackageDependencyProc = decltype(AddPackageDependency)*; + AddPackageDependencyProc add_package_dependency_proc_ = nullptr; + base::ScopedNativeLibrary ort_library_; raw_ptr<const OrtApi> ort_api_ = nullptr; raw_ptr<const OrtModelEditorApi> ort_model_editor_api_ = nullptr;
diff --git a/services/webnn/webnn_context_provider_impl.cc b/services/webnn/webnn_context_provider_impl.cc index 0d4a530..d8c9dc5 100644 --- a/services/webnn/webnn_context_provider_impl.cc +++ b/services/webnn/webnn_context_provider_impl.cc
@@ -213,7 +213,7 @@ if (base::FeatureList::IsEnabled(mojom::features::kWebNNOnnxRuntime)) { context_creation_results = ort::CreateContextFromOptions( - std::move(options), std::move(receiver), this); + std::move(options), gpu_info_, std::move(receiver), this); if (!context_creation_results.has_value()) { std::move(callback).Run(mojom::CreateContextResult::NewError( std::move(context_creation_results.error())));
diff --git a/testing/buildbot/buildbot_json_magic_substitutions.py b/testing/buildbot/buildbot_json_magic_substitutions.py index b608f9f9..bb2eb094 100644 --- a/testing/buildbot/buildbot_json_magic_substitutions.py +++ b/testing/buildbot/buildbot_json_magic_substitutions.py
@@ -51,6 +51,14 @@ } +def AndroidDesktopForceMainUser(test_config, _, tester_config): + """Automatically adds --force-main-user to gtests on Android Desktop.""" + assert _IsAndroid(tester_config) + if not _GetAndroidDesktopBoardName(test_config): + return [] + return ['--force-main-user'] + + def AndroidDesktopTelemetryRemote(test_config, _, tester_config): """Substitutes the correct Android Desktop remote Telemetry arguments.""" assert _IsAndroid(tester_config)
diff --git a/testing/buildbot/buildbot_json_magic_substitutions_unittest.py b/testing/buildbot/buildbot_json_magic_substitutions_unittest.py index 76c3004..577cdcb 100755 --- a/testing/buildbot/buildbot_json_magic_substitutions_unittest.py +++ b/testing/buildbot/buildbot_json_magic_substitutions_unittest.py
@@ -25,6 +25,31 @@ return dims +class AndroidDesktopForceMainuserTest(unittest.TestCase): + + def testNonAndroid(self): + test_config = CreateConfigWithPool('chromium.tests', board='brya') + with self.assertRaises(AssertionError): + magic_substitutions.AndroidDesktopForceMainUser(test_config, None, + {'os_type': 'linux'}) + + def testNoBoard(self): + test_config = CreateConfigWithPool('chromium.tests') + self.assertEqual( + magic_substitutions.AndroidDesktopForceMainUser(test_config, None, + {'os_type': 'android'}), + []) + + def testSuccess(self): + test_config = CreateConfigWithPool('chromium.tests', board='brya') + self.assertEqual( + magic_substitutions.AndroidDesktopForceMainUser(test_config, None, + {'os_type': 'android'}), + [ + '--force-main-user', + ]) + + class AndroidDesktopTelemetryRemoteTest(unittest.TestCase): def testNonAndroid(self):
diff --git a/testing/buildbot/mixins.pyl b/testing/buildbot/mixins.pyl index 80f369c..2a0bb57 100644 --- a/testing/buildbot/mixins.pyl +++ b/testing/buildbot/mixins.pyl
@@ -243,6 +243,11 @@ '--extra-browser-args=--enable-features=SkiaGraphite', ], }, + 'gpu_gtest_common_args': { + 'android_args': [ + '$$MAGIC_SUBSTITUTION_AndroidDesktopForceMainUser', + ], + }, 'gpu_integration_test_common_args': { 'args': [ '$$MAGIC_SUBSTITUTION_GPUParallelJobs',
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 1c48521..f105d37 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -861,9 +861,11 @@ ], "experiments": [ { - "name": "CreateWithoutServiceGroupImportance", + "name": "CreateWithLowestRanking", "params": { "kill_when_backgrounded": "true", + "lowest-ranking": "true", + "not-perceptible-binding": "false", "omnibox_spare_renderer_delay_ms": "500", "spare_renderer_creation_delay_ms": "2000", "spare_renderer_creation_timing": "after-loading", @@ -871,9 +873,7 @@ }, "enable_features": [ "AndroidWarmUpSpareRendererWithTimeout", - "OverrideAndroidOmniboxSpareRendererDelay" - ], - "disable_features": [ + "OverrideAndroidOmniboxSpareRendererDelay", "ServiceGroupImportance", "SpareRendererProcessPriority" ]
diff --git a/third_party/androidx/build.gradle b/third_party/androidx/build.gradle index fd1f4bb2..7ebf381 100644 --- a/third_party/androidx/build.gradle +++ b/third_party/androidx/build.gradle
@@ -306,7 +306,7 @@ google() maven { // This URL is generated by the fetch_all_androidx.py script. - url 'https://androidx.dev/snapshots/builds/13700704/artifacts/repository' + url 'https://androidx.dev/snapshots/builds/13702671/artifacts/repository' } mavenCentral() }
diff --git a/third_party/angle b/third_party/angle index ca893fd..56e9bff 160000 --- a/third_party/angle +++ b/third_party/angle
@@ -1 +1 @@ -Subproject commit ca893fdfe95b5244e4d0e773b009dc781980158d +Subproject commit 56e9bfff2ec83b56a1a80c24ae0cbbac535c7432
diff --git a/third_party/blink/common/loader/throttling_url_loader.cc b/third_party/blink/common/loader/throttling_url_loader.cc index 7f0fed7..3649b2e 100644 --- a/third_party/blink/common/loader/throttling_url_loader.cc +++ b/third_party/blink/common/loader/throttling_url_loader.cc
@@ -502,6 +502,7 @@ start_info_->url_request.site_for_cookies, first_party_url_policy, start_info_->url_request.referrer_policy, start_info_->url_request.referrer.spec(), + start_info_->url_request.request_initiator, // Use status code 307 to preserve the method, so POST requests work. net::HTTP_TEMPORARY_REDIRECT, throttle_will_start_redirect_url_, std::nullopt, false, false, false);
diff --git a/third_party/blink/common/scheme_registry.cc b/third_party/blink/common/scheme_registry.cc index 4d82788..250c46f 100644 --- a/third_party/blink/common/scheme_registry.cc +++ b/third_party/blink/common/scheme_registry.cc
@@ -19,26 +19,50 @@ return *extension_schemes; } +URLSchemesSet& GetMutableIsolatedAppSchemes() { + static base::NoDestructor<URLSchemesSet> iwa_schemes; + return *iwa_schemes; +} + const URLSchemesSet& GetExtensionSchemes() { return GetMutableExtensionSchemes(); } +const URLSchemesSet& GetIsolatedAppSchemes() { + return GetMutableIsolatedAppSchemes(); +} + void CommonSchemeRegistry::RegisterURLSchemeAsExtension( const std::string& scheme) { DCHECK_EQ(scheme, base::ToLowerASCII(scheme)); GetMutableExtensionSchemes().insert(scheme); } +void CommonSchemeRegistry::RegisterURLSchemeAsIsolatedApp( + const std::string& scheme) { + DCHECK_EQ(scheme, base::ToLowerASCII(scheme)); + GetMutableIsolatedAppSchemes().insert(scheme); +} + void CommonSchemeRegistry::RemoveURLSchemeAsExtensionForTest( const std::string& scheme) { GetMutableExtensionSchemes().erase(scheme); } bool CommonSchemeRegistry::IsExtensionScheme(const std::string& scheme) { - if (scheme.empty()) + if (scheme.empty()) { return false; + } DCHECK_EQ(scheme, base::ToLowerASCII(scheme)); return base::Contains(GetExtensionSchemes(), scheme); } +bool CommonSchemeRegistry::IsIsolatedAppScheme(const std::string& scheme) { + if (scheme.empty()) { + return false; + } + DCHECK_EQ(scheme, base::ToLowerASCII(scheme)); + return base::Contains(GetIsolatedAppSchemes(), scheme); +} + } // namespace blink
diff --git a/third_party/blink/common/service_worker/service_worker_loader_helpers.cc b/third_party/blink/common/service_worker/service_worker_loader_helpers.cc index 9265c53..350507c 100644 --- a/third_party/blink/common/service_worker/service_worker_loader_helpers.cc +++ b/third_party/blink/common/service_worker/service_worker_loader_helpers.cc
@@ -158,6 +158,7 @@ original_request.site_for_cookies, first_party_url_policy, original_request.referrer_policy, original_request.referrer.GetAsReferrer().spec(), + original_request.request_initiator, response_head.headers->response_code(), original_request.url.Resolve(new_location), net::RedirectUtil::GetReferrerPolicyHeader(response_head.headers.get()),
diff --git a/third_party/blink/public/common/scheme_registry.h b/third_party/blink/public/common/scheme_registry.h index b67465f..fbead148 100644 --- a/third_party/blink/public/common/scheme_registry.h +++ b/third_party/blink/public/common/scheme_registry.h
@@ -28,8 +28,10 @@ public: // Schemes that represent browser extensions. static void RegisterURLSchemeAsExtension(const std::string& scheme); + static void RegisterURLSchemeAsIsolatedApp(const std::string& scheme); static void RemoveURLSchemeAsExtensionForTest(const std::string& scheme); static bool IsExtensionScheme(const std::string& scheme); + static bool IsIsolatedAppScheme(const std::string& scheme); }; } // namespace blink
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h index eee2a8d..dfc5c935 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h
@@ -290,7 +290,10 @@ } // Determines whether it is safe to redirect from |from_url| to |to_url|. - virtual bool IsRedirectSafe(const GURL& from_url, const GURL& to_url) { + virtual bool IsRedirectSafe( + const GURL& from_url, + const GURL& to_url, + const std::optional<url::Origin>& request_initiator) { return false; }
diff --git a/third_party/blink/public/web/web_security_policy.h b/third_party/blink/public/web/web_security_policy.h index 1ca0851..33f266e 100644 --- a/third_party/blink/public/web/web_security_policy.h +++ b/third_party/blink/public/web/web_security_policy.h
@@ -132,6 +132,9 @@ // Registers an URL scheme as trusted browser UI. static void RegisterURLSchemeAsWebUI(const WebString&); + // Registers an URL scheme as an Isolated Web App. + static void RegisterURLSchemeAsIsolatedApp(const WebString&); + // Registers an URL scheme which can use code caching but must check in the // renderer whether the script content has changed rather than relying on a // response time match from the network cache.
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc index bcbb481..0d61f53 100644 --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc
@@ -7649,8 +7649,17 @@ return true; } +bool Element::IsClickableFormControlNode() { + auto* form_control_element = DynamicTo<HTMLFormControlElement>(this); + if (form_control_element && form_control_element->FormControlType() != + mojom::blink::FormControlType::kFieldset) { + return true; + } + return false; +} + bool Element::IsMaybeClickable() { - if (IsClickableControl(this)) { + if (IsClickableFormControlNode()) { return true; }
diff --git a/third_party/blink/renderer/core/dom/element.h b/third_party/blink/renderer/core/dom/element.h index 1a2b132..afeaba9 100644 --- a/third_party/blink/renderer/core/dom/element.h +++ b/third_party/blink/renderer/core/dom/element.h
@@ -1756,7 +1756,7 @@ GCedHeapVector<Member<Element>>* ElementsFromAttributeOrInternals( const QualifiedName& attribute) const; - bool IsClickableControl() { return IsClickableControl(this); } + bool IsClickableFormControlNode(); protected: bool HasElementData() const { return static_cast<bool>(element_data_); }
diff --git a/third_party/blink/renderer/core/exported/web_security_policy.cc b/third_party/blink/renderer/core/exported/web_security_policy.cc index 9b2142d2..85095b00 100644 --- a/third_party/blink/renderer/core/exported/web_security_policy.cc +++ b/third_party/blink/renderer/core/exported/web_security_policy.cc
@@ -149,6 +149,11 @@ CommonSchemeRegistry::RegisterURLSchemeAsExtension(scheme.Ascii()); } +void WebSecurityPolicy::RegisterURLSchemeAsIsolatedApp( + const WebString& scheme) { + CommonSchemeRegistry::RegisterURLSchemeAsIsolatedApp(scheme.Ascii()); +} + void WebSecurityPolicy::RegisterURLSchemeAsWebUI(const WebString& scheme) { SchemeRegistry::RegisterURLSchemeAsWebUI(scheme); }
diff --git a/third_party/blink/renderer/core/frame/event_handler_registry.cc b/third_party/blink/renderer/core/frame/event_handler_registry.cc index e7827a674..8dbfdc0 100644 --- a/third_party/blink/renderer/core/frame/event_handler_registry.cc +++ b/third_party/blink/renderer/core/frame/event_handler_registry.cc
@@ -116,7 +116,6 @@ targets->insert(target); return; case kRemove: - DCHECK(targets->Contains(target)); targets->erase(target); return; case kRemoveAll:
diff --git a/third_party/blink/renderer/core/html/forms/select_type.cc b/third_party/blink/renderer/core/html/forms/select_type.cc index 256c815..d11d72d 100644 --- a/third_party/blink/renderer/core/html/forms/select_type.cc +++ b/third_party/blink/renderer/core/html/forms/select_type.cc
@@ -1770,28 +1770,24 @@ // dispatching change events during mouseup, or after autoscroll finishes. SaveLastSelection(); + active_selection_state_ = true; + if (!select_->is_multiple_) mode = SelectionMode::kDeselectOthers; // Keep track of whether an active selection (like during drag selection), // should select or deselect. - active_selection_state_ = - !(clicked_option->Selected() && mode == SelectionMode::kNotChangeOthers); + if (clicked_option->Selected() && mode == SelectionMode::kNotChangeOthers) { + active_selection_state_ = false; + clicked_option->SetSelectedState(false); + clicked_option->SetDirty(true); + } // If we're not in any special multiple selection mode, then deselect all - // other items, excluding the clicked OPTION. If no option was clicked, - // then this will deselect all items in the list. - if (mode == SelectionMode::kDeselectOthers) { - bool did_deselect_others = - select_->DeselectItemsWithoutValidation(clicked_option); - // In a multi-select, if nothing else could be deselected, - // deselect the (already selected) clicked option instead. - if (select_->is_multiple_ && !did_deselect_others && - clicked_option->Selected() && - RuntimeEnabledFeatures::MultiSelectDeselectWhenOnlyOptionEnabled()) { - active_selection_state_ = false; - } - } + // other items, excluding the clicked OPTION. If no option was clicked, then + // this will deselect all items in the list. + if (mode == SelectionMode::kDeselectOthers) + select_->DeselectItemsWithoutValidation(clicked_option); // If the anchor hasn't been set, and we're doing kDeselectOthers or kRange, // then initialize the anchor to the first selected OPTION. @@ -1800,7 +1796,7 @@ // Set the selection state of the clicked OPTION. if (!clicked_option->IsDisabledFormControl()) { - clicked_option->SetSelectedState(active_selection_state_); + clicked_option->SetSelectedState(true); clicked_option->SetDirty(true); }
diff --git a/third_party/blink/renderer/core/html/resources/html.css b/third_party/blink/renderer/core/html/resources/html.css index 08e5052..ab31482 100644 --- a/third_party/blink/renderer/core/html/resources/html.css +++ b/third_party/blink/renderer/core/html/resources/html.css
@@ -113,7 +113,10 @@ margin-inline-start: auto; margin-inline-end: auto; border-style: inset; - border-width: 1px + border-width: 1px; + @supports blink-feature(HrElementGray) { + color: gray; + } } map {
diff --git a/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent.cc b/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent.cc index 5672d208..ad247d0 100644 --- a/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent.cc +++ b/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent.cc
@@ -220,7 +220,7 @@ using Reason = mojom::blink::AIPageContentClickabilityReason; - if (element.IsClickableControl()) { + if (element.IsClickableFormControlNode()) { interaction_info.debug_clickability_reasons.push_back( Reason::kClickableControl); }
diff --git a/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent_unittest.cc b/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent_unittest.cc index e60e3939..74d413aa 100644 --- a/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent_unittest.cc +++ b/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent_unittest.cc
@@ -3682,6 +3682,55 @@ CheckHitTestableButNotInteractive(button); } +TEST_F(AIPageContentAgentTest, Fieldset) { + frame_test_helpers::LoadHTMLString( + helper_.LocalMainFrame(), + R"HTML( + <body> + <form> + <fieldset> + <button type="submit"></button> + </fieldset> + </form> + </body> + )HTML", + url_test_helpers::ToKURL("http://foobar.com")); + + GetAIPageContentWithActionableElements(); + const auto& root = ContentRootNode(); + ASSERT_EQ(root.children_nodes.size(), 1u); + + const auto& form = *root.children_nodes.at(0); + CheckHitTestableButNotInteractive(form); + ASSERT_EQ(form.children_nodes.size(), 1u); + + const auto& fieldset = *form.children_nodes.at(0); + CheckHitTestableButNotInteractive(fieldset); +} + +TEST_F(AIPageContentAgentTest, ShadowDOMInInput) { + frame_test_helpers::LoadHTMLString( + helper_.LocalMainFrame(), + R"HTML( + <body> + <input type=range></input> + </body> + )HTML", + url_test_helpers::ToKURL("http://foobar.com")); + + GetAIPageContentWithActionableElements(); + const auto& root = ContentRootNode(); + ASSERT_EQ(root.children_nodes.size(), 1u); + + const auto& input = *root.children_nodes.at(0); + ASSERT_TRUE(input.content_attributes->node_interaction_info); + EXPECT_TRUE(input.content_attributes->node_interaction_info->is_clickable); + + EXPECT_NE(input.children_nodes.size(), 0u); + const auto& shadow_div = *input.children_nodes.at(0); + CheckHitTestableButNotInteractive(shadow_div); +} + TEST_F(AIPageContentAgentTest, DisabledOption) { frame_test_helpers::LoadHTMLString( helper_.LocalMainFrame(),
diff --git a/third_party/blink/renderer/modules/navigatorcontentutils/navigator_content_utils.cc b/third_party/blink/renderer/modules/navigatorcontentutils/navigator_content_utils.cc index 21c8c05..f64fc6f5 100644 --- a/third_party/blink/renderer/modules/navigatorcontentutils/navigator_content_utils.cc +++ b/third_party/blink/renderer/modules/navigatorcontentutils/navigator_content_utils.cc
@@ -50,6 +50,11 @@ namespace { +constexpr char kIsolatedAppError[] = + "Isolated Web Apps do not support registering/unregistering protocol " + "handlers via the navigator API; use the `protocol_handlers` field in the " + "web app manifest instead."; + // Verify custom handler URL security as described in steps 6 and 7 // https://html.spec.whatwg.org/multipage/system-state.html#normalize-protocol-handler-parameters static bool VerifyCustomHandlerURLSecurity( @@ -176,10 +181,16 @@ const String& url, ExceptionState& exception_state) { LocalDOMWindow* window = navigator.DomWindow(); - if (!window) + if (!window) { return; + } WebSecurityOrigin origin(window->GetSecurityOrigin()); + if (CommonSchemeRegistry::IsIsolatedAppScheme(origin.Protocol().Ascii())) { + exception_state.ThrowSecurityError(kIsolatedAppError); + return; + } + ProtocolHandlerSecurityLevel security_level = Platform::Current()->GetProtocolHandlerSecurityLevel(origin); @@ -191,8 +202,9 @@ return; } - if (!VerifyCustomHandlerURL(*window, url, exception_state, security_level)) + if (!VerifyCustomHandlerURL(*window, url, exception_state, security_level)) { return; + } // Count usage; perhaps we can forbid this from cross-origin subframes as // proposed in https://crbug.com/977083. @@ -226,10 +238,16 @@ const String& url, ExceptionState& exception_state) { LocalDOMWindow* window = navigator.DomWindow(); - if (!window) + if (!window) { return; + } WebSecurityOrigin origin(window->GetSecurityOrigin()); + if (CommonSchemeRegistry::IsIsolatedAppScheme(origin.Protocol().Ascii())) { + exception_state.ThrowSecurityError(kIsolatedAppError); + return; + } + ProtocolHandlerSecurityLevel security_level = Platform::Current()->GetProtocolHandlerSecurityLevel(origin); @@ -239,8 +257,9 @@ return; } - if (!VerifyCustomHandlerURL(*window, url, exception_state, security_level)) + if (!VerifyCustomHandlerURL(*window, url, exception_state, security_level)) { return; + } Document* document = window->document(); auto* client =
diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/background_url_loader_unittest.cc b/third_party/blink/renderer/platform/loader/fetch/url_loader/background_url_loader_unittest.cc index d38ba45..3236e07 100644 --- a/third_party/blink/renderer/platform/loader/fetch/url_loader/background_url_loader_unittest.cc +++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/background_url_loader_unittest.cc
@@ -524,7 +524,10 @@ private: class TestPlatformForRedirects final : public TestingPlatformSupport { public: - bool IsRedirectSafe(const GURL& from_url, const GURL& to_url) override { + bool IsRedirectSafe( + const GURL& from_url, + const GURL& to_url, + const std::optional<url::Origin>& request_initiator) override { return true; } };
diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client.cc b/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client.cc index 7d29a566..4685546 100644 --- a/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client.cc +++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client.cc
@@ -390,9 +390,11 @@ OnComplete(network::URLLoaderCompletionStatus(net::ERR_ABORTED)); return; } + if (!bypass_redirect_checks_ && !Platform::Current()->IsRedirectSafe(GURL(last_loaded_url_), - redirect_info.new_url)) { + redirect_info.new_url, + redirect_info.original_initiator)) { OnComplete(network::URLLoaderCompletionStatus(net::ERR_UNSAFE_REDIRECT)); return; }
diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client_unittest.cc b/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client_unittest.cc index b7b0b5b4..ece0e21 100644 --- a/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client_unittest.cc +++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client_unittest.cc
@@ -248,7 +248,10 @@ class TestPlatform final : public TestingPlatformSupport { public: - bool IsRedirectSafe(const GURL& from_url, const GURL& to_url) override { + bool IsRedirectSafe( + const GURL& from_url, + const GURL& to_url, + const std::optional<url::Origin>& request_initiator) override { return true; } };
diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/resource_request_sender_unittest.cc b/third_party/blink/renderer/platform/loader/fetch/url_loader/resource_request_sender_unittest.cc index 6deb1e1..b1b0649 100644 --- a/third_party/blink/renderer/platform/loader/fetch/url_loader/resource_request_sender_unittest.cc +++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/resource_request_sender_unittest.cc
@@ -129,7 +129,10 @@ class TestPlatformForRedirects final : public TestingPlatformSupport { public: - bool IsRedirectSafe(const GURL& from_url, const GURL& to_url) override { + bool IsRedirectSafe( + const GURL& from_url, + const GURL& to_url, + const std::optional<url::Origin>& request_initiator) override { return true; } };
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 34890048..13f1f1e 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1178,7 +1178,7 @@ { // https://chromestatus.com/feature/5082469066604544 name: "CSSCaretAnimation", - status: "experimental", + status: "stable", }, { // Need a feature entry @@ -2531,6 +2531,12 @@ status: "stable", base_feature: "none", }, + { + // Adds color:gray to the <hr> element in the UA stylesheet. + // https://issues.chromium.org/issues/425113244 + name: "HrElementGray", + status: "stable", + }, // The `anchor` attribute, supported by both anchor positioning and the // popover API. { @@ -3203,10 +3209,6 @@ status: "stable", }, { - name: "MultiSelectDeselectWhenOnlyOption", - status: "test", - }, - { name: "NavigateEventCanTransition", }, {
diff --git a/third_party/blink/renderer/platform/wtf/text/parsing_utilities.h b/third_party/blink/renderer/platform/wtf/text/parsing_utilities.h index 534c42378..d11d02a 100644 --- a/third_party/blink/renderer/platform/wtf/text/parsing_utilities.h +++ b/third_party/blink/renderer/platform/wtf/text/parsing_utilities.h
@@ -36,7 +36,7 @@ #include "base/compiler_specific.h" #include "base/containers/span.h" -namespace WTF { +namespace blink { template <typename CharType> bool SkipExactly(base::span<const CharType> chars, @@ -127,12 +127,6 @@ return position; } -} // namespace WTF - -using WTF::SkipExactly; -using WTF::SkipToken; -using WTF::SkipUntil; -using WTF::SkipWhile; -using WTF::ReverseSkipWhile; +} // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_TEXT_PARSING_UTILITIES_H_
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 3d523d5..030519f 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -1541,7 +1541,6 @@ # expectation files because they contain local path names. # Use crbug.com/490511 for untriaged failures. crbug.com/108417 external/wpt/html/rendering/non-replaced-elements/tables/table-border-1.html [ Failure ] -crbug.com/490511 external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/color.html [ Failure ] crbug.com/692560 external/wpt/html/semantics/document-metadata/styling/LinkStyle.html [ Failure Pass ] crbug.com/895846 external/wpt/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-block-margins.html [ Failure ]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/select-multiple-options-visual-order.html b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/select-multiple-options-visual-order.html index e9454d0..bc5c10e 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/select-multiple-options-visual-order.html +++ b/third_party/blink/web_tests/external/wpt/css/css-writing-modes/forms/select-multiple-options-visual-order.html
@@ -30,7 +30,6 @@ select.style.writingMode = writingMode; this.add_cleanup(() => { select.removeAttribute("style"); - select.value = ""; }); const elementBox = select.getBoundingClientRect();
diff --git a/third_party/blink/web_tests/external/wpt/editing/run/multitest_6001-7000-expected.txt b/third_party/blink/web_tests/external/wpt/editing/run/multitest_6001-7000-expected.txt index d4495cd..0c0aa24 100644 --- a/third_party/blink/web_tests/external/wpt/editing/run/multitest_6001-7000-expected.txt +++ b/third_party/blink/web_tests/external/wpt/editing/run/multitest_6001-7000-expected.txt
@@ -129,7 +129,7 @@ [FAIL] [["forecolor","#0000FF"],["indent",""],["inserttext","a"]] "foo[]bar" queryCommandValue("forecolor") after assert_equals: Wrong result returned (after color normalization) expected "rgb(0, 0, 255)" but got "rgb(0, 0, 0)" [FAIL] [["forecolor","#0000FF"],["inserthorizontalrule",""]] "foo[]bar" queryCommandValue("forecolor") after - assert_equals: Wrong result returned (after color normalization) expected "rgb(0, 0, 255)" but got "rgb(0, 0, 0)" + assert_equals: Wrong result returned (after color normalization) expected "rgb(0, 0, 255)" but got "rgb(128, 128, 128)" [FAIL] [["forecolor","#0000FF"],["inserthorizontalrule",""],["inserttext","a"]] "foo[]bar" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<hr><font color=\\"#0000ff\\">a</font>bar" but got "foo<hr>abar" [FAIL] [["forecolor","#0000FF"],["inserthorizontalrule",""],["inserttext","a"]] "foo[]bar" queryCommandValue("forecolor") after
diff --git a/third_party/blink/web_tests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/hr-expected.txt b/third_party/blink/web_tests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/hr-expected.txt deleted file mode 100644 index c37ab9bf..0000000 --- a/third_party/blink/web_tests/external/wpt/html/rendering/non-replaced-elements/the-hr-element-0/hr-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -This is a testharness.js-based test. -[FAIL] color - assert_equals: expected "rgb(128, 128, 128)" but got "rgb(0, 0, 0)" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popovertarget-disabled-fieldset.html b/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popovertarget-disabled-fieldset.html new file mode 100644 index 0000000..df8ea10d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popovers/popovertarget-disabled-fieldset.html
@@ -0,0 +1,32 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<link rel=help href="https://github.com/whatwg/html/pull/8221#discussion_r987582567"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<div id=popover popover=auto>popover</div> + +<fieldset> + <button id=popoverbutton popovertarget=popover>open popover with popovertarget</button> + <button id=commandbutton commandfor=popover command=show-popover>open popover with command</button> +</fieldset> + +<script> +test(() => { + const popover = document.getElementById('popover'); + const fieldset = document.querySelector('fieldset'); + ['popoverbutton', 'commandbutton'].forEach(id => { + const button = document.getElementById(id); + button.click(); + assert_true(popover.matches(':popover-open'), + `${id}: popover should open when not disabled.`); + popover.hidePopover(); + + fieldset.disabled = true; + button.click(); + assert_false(popover.matches(':popover-open'), + `${id}: popover should not open when disabled.`); + fieldset.disabled = false; + }); +}, 'Disabled fieldset ancestor should prevent popovertarget/command behavior.'); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/touch-events/touch-action-document-crash.html b/third_party/blink/web_tests/external/wpt/touch-events/touch-action-document-crash.html new file mode 100644 index 0000000..a590cb31 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/touch-events/touch-action-document-crash.html
@@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html style="touch-action: pan-down"> +<video></video> +<script> + // This test passes if it does not crash. + window.onload = () => { + document.open(); + document.write('Done'); + document.close(); + } +</script>
diff --git a/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html index a3c1199..c6874d8 100644 --- a/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html +++ b/third_party/blink/web_tests/external/wpt/webaudio/the-audio-api/the-audioparam-interface/automation-rate.html
@@ -4,8 +4,6 @@ <title>AudioParam.automationRate tests</title> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <script src="/webaudio/resources/audit-util.js"></script> - <script src="/webaudio/resources/audit.js"></script> </head> <body> @@ -16,9 +14,7 @@ // Any valid sample rate is fine; we don't actually render anything in the // tests. - let sampleRate = 8000; - - let audit = Audit.createTaskRunner(); + const sampleRate = 8000; // Array of tests. Each test is a dictonary consisting of the name of the // node and an array specifying the AudioParam's of the node. This array @@ -88,80 +84,74 @@ }, ]; - tests.forEach(test => { - // Define a separate test for each test entry. - audit.define(test.nodeName, (task, should) => { - let context = new OfflineAudioContext( - {length: sampleRate, sampleRate: sampleRate}); - // Construct the node and test each AudioParam of the node. - let node = new window[test.nodeName](context); - test.audioParams.forEach(param => { - testAudioParam( - should, {nodeName: test.nodeName, node: node, param: param}); - }); - - task.done(); - }); - }); - - // AudioListener needs it's own special test since it's not a node. - audit.define('AudioListener', (task, should) => { - let context = new OfflineAudioContext( - {length: sampleRate, sampleRate: sampleRate}); - - [{name: 'positionX', defaultRate: 'a-rate', isFixed: false}, - {name: 'positionY', defaultRate: 'a-rate', isFixed: false}, - {name: 'positionZ', defaultRate: 'a-rate', isFixed: false}, - {name: 'forwardX', defaultRate: 'a-rate', isFixed: false}, - {name: 'forwardY', defaultRate: 'a-rate', isFixed: false}, - {name: 'forwardZ', defaultRate: 'a-rate', isFixed: false}, - {name: 'upX', defaultRate: 'a-rate', isFixed: false}, - {name: 'upY', defaultRate: 'a-rate', isFixed: false}, - {name: 'upZ', defaultRate: 'a-rate', isFixed: false}, - ].forEach(param => { - testAudioParam(should, { - nodeName: 'AudioListener', - node: context.listener, - param: param - }); - }); - task.done(); - }); - - audit.run(); - - function testAudioParam(should, options) { - let param = options.param; - let audioParam = options.node[param.name]; - let defaultRate = param.defaultRate; + function testAudioParam(context, node, param) { + const audioParam = node[param.name]; + const defaultRate = param.defaultRate; // Verify that the default value is correct. - should( - audioParam.automationRate, - `Default ${options.nodeName}.${param.name}.automationRate`) - .beEqualTo(defaultRate); + assert_equals( + audioParam.automationRate, + defaultRate, + `Default ${context}.${param.name}.automationRate should be + "${defaultRate}"` + ); // Try setting the rate to a different rate. If the |automationRate| // is fixed, expect an error. Otherwise, expect no error and expect // the value is changed to the new value. - let newRate = defaultRate === 'a-rate' ? 'k-rate' : 'a-rate'; - let setMessage = `Set ${ - options.nodeName - }.${param.name}.automationRate to "${newRate}"` + const newRate = defaultRate === 'a-rate' ? 'k-rate' : 'a-rate'; if (param.isFixed) { - should(() => audioParam.automationRate = newRate, setMessage) - .throw(DOMException, 'InvalidStateError'); - } - else { - should(() => audioParam.automationRate = newRate, setMessage) - .notThrow(); - should( - audioParam.automationRate, - `${options.nodeName}.${param.name}.automationRate`) - .beEqualTo(newRate); + assert_throws_dom( + 'InvalidStateError', + () => { + audioParam.automationRate = newRate; + }, + `Setting ${context}.${param.name}.automationRate to + "${newRate}" should throw InvalidStateError` + ); + } else { + audioParam.automationRate = newRate; + assert_equals( + audioParam.automationRate, + newRate, + `${context}.${param.name}.automationRate should change + to "${newRate}"` + ); } } + + // Tests for each AudioNode type + for (const { nodeName, audioParams } of tests) { + test(() => { + const context = new OfflineAudioContext({ length: sampleRate, + sampleRate }); + const node = new window[nodeName](context); + audioParams.forEach(param => testAudioParam(nodeName, node, + param)); + }, `${nodeName}`); + } + + // Special case: AudioListener tests + test(() => { + const context = new OfflineAudioContext({ length: sampleRate, + sampleRate }); + const listenerParams = [ + { name: 'positionX', defaultRate: 'a-rate', isFixed: false }, + { name: 'positionY', defaultRate: 'a-rate', isFixed: false }, + { name: 'positionZ', defaultRate: 'a-rate', isFixed: false }, + { name: 'forwardX', defaultRate: 'a-rate', isFixed: false }, + { name: 'forwardY', defaultRate: 'a-rate', isFixed: false }, + { name: 'forwardZ', defaultRate: 'a-rate', isFixed: false }, + { name: 'upX', defaultRate: 'a-rate', isFixed: false }, + { name: 'upY', defaultRate: 'a-rate', isFixed: false }, + { name: 'upZ', defaultRate: 'a-rate', isFixed: false } + ]; + + listenerParams.forEach(param => { + testAudioParam('AudioListener', context.listener, param); + }); + }, 'AudioListener'); </script> </body> -</html> +</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/fast/forms/select/listbox-onchange-expected.txt b/third_party/blink/web_tests/fast/forms/select/listbox-onchange-expected.txt index 8e977e9..809e2ff 100644 --- a/third_party/blink/web_tests/fast/forms/select/listbox-onchange-expected.txt +++ b/third_party/blink/web_tests/fast/forms/select/listbox-onchange-expected.txt
@@ -4,30 +4,28 @@ item 3 keyboard test Results: -1) Make sure onChange fires when deselecting an initially selected item +1) Make sure onChange doesn't fire when clicking on an initially selected item +2) Make sure onChange fires when deselecting an initially selected item onChange fired -2) Make sure onChange fires when clicking +3) Make sure onChange fires when clicking onChange fired -3) Make sure onChange fires when clicking on a new item +4) Make sure onChange doesn't fire when clicking again on the same item +5) Make sure onChange fires when clicking on a new item onChange fired -4) Make sure onChange fires when changing the selection with the keyboard +6) Make sure onChange fires when changing the selection with the keyboard onChange fired -5) Make sure onChange doesn't fire when setting the select element's value from JS -6) Make sure onChange fires when clicking on the already selected option +7) Make sure onChange doesn't fire when setting the select element's value from JS +8) Make sure onChange doesn't fire when clicking on the already selected option +9) Make sure onChange doesn't fire when setting an option's selected state from JS +10) Make sure onChange doesn't fire when clicking on this option +11) Make sure onChange fires when deselecting the last selected option with a mouse click onChange fired -7) Make sure onChange doesn't fire when setting an option's selected state from JS -8) Make sure onChange fires when clicking on this option +12) Make sure onChange doesn't fire when adding a new selected option +13) Make sure onChange doesn't fire when clicking on it +14) Make sure onChange fires when clicking on a previously selected option onChange fired -9) Make sure onChange fires when deselecting the last selected option with a mouse click +15) Make sure onChange doesn't fire when removing a selected option +16) Make sure onChange doesn't fire when clicking on the option that remains selected +17) Make sure onChange fires when typing the name of an option onChange fired -10) Make sure onChange doesn't fire when adding a new selected option -11) Make sure onChange fires when clicking on it -onChange fired -12) Make sure onChange fires when clicking on a previously selected option -onChange fired -13) Make sure onChange doesn't fire when removing a selected option -14) Make sure onChange fires when clicking on the option that remains selected -onChange fired -15) Make sure onChange fires when typing the name of an option -onChange fired -16) Make sure onChange doesn't fire when leaving the select +18) Make sure onChange doesn't fire when leaving the select
diff --git a/third_party/blink/web_tests/fast/forms/select/listbox-onchange.html b/third_party/blink/web_tests/fast/forms/select/listbox-onchange.html index 2fd62b4..53c9155 100644 --- a/third_party/blink/web_tests/fast/forms/select/listbox-onchange.html +++ b/third_party/blink/web_tests/fast/forms/select/listbox-onchange.html
@@ -25,85 +25,94 @@ checkSelection("0"); - log("1) Make sure onChange fires when deselecting an initially selected item"); - mouseDownOnSelect("sl1", 0, false, false); - mouseUpOnSelect("sl1", 0, false, false); - checkSelection(""); - - log("2) Make sure onChange fires when clicking"); - mouseDownOnSelect("sl1", 2, false, false); - mouseUpOnSelect("sl1", 2, false, false); - checkSelection("2"); - - log("3) Make sure onChange fires when clicking on a new item"); + log("1) Make sure onChange doesn't fire when clicking on an initially selected item"); mouseDownOnSelect("sl1", 0, false, false); mouseUpOnSelect("sl1", 0, false, false); checkSelection("0"); - log("4) Make sure onChange fires when changing the selection with the keyboard"); + log("2) Make sure onChange fires when deselecting an initially selected item"); + mouseDownOnSelect("sl1", 0, false, true); + mouseUpOnSelect("sl1", 0, false, true); + checkSelection(""); + + log("3) Make sure onChange fires when clicking"); + mouseDownOnSelect("sl1", 2, false, false); + mouseUpOnSelect("sl1", 2, false, false); + checkSelection("2"); + + log("4) Make sure onChange doesn't fire when clicking again on the same item"); + mouseDownOnSelect("sl1", 2, false, false); + mouseUpOnSelect("sl1", 2, false, false); + checkSelection("2"); + + log("5) Make sure onChange fires when clicking on a new item"); + mouseDownOnSelect("sl1", 0, false, false); + mouseUpOnSelect("sl1", 0, false, false); + checkSelection("0"); + + log("6) Make sure onChange fires when changing the selection with the keyboard"); keyDownOnSelect("sl1", "ArrowDown", true, false); checkSelection("0,1"); - log("5) Make sure onChange doesn't fire when setting the select element's value from JS"); + log("7) Make sure onChange doesn't fire when setting the select element's value from JS"); document.getElementById("sl1").value = "2"; checkSelection("2"); - log("6) Make sure onChange fires when clicking on the already selected option"); + log("8) Make sure onChange doesn't fire when clicking on the already selected option"); mouseDownOnSelect("sl1", 2, false, false); mouseUpOnSelect("sl1", 2, false, false); - checkSelection(""); + checkSelection("2"); - log("7) Make sure onChange doesn't fire when setting an option's selected state from JS"); + log("9) Make sure onChange doesn't fire when setting an option's selected state from JS"); document.getElementById("sl1").item(3).selected = true; + checkSelection("2,3"); + document.getElementById("sl1").item(2).selected = false; checkSelection("3"); - document.getElementById("sl1").item(3).selected = false; - checkSelection(""); - log("8) Make sure onChange fires when clicking on this option"); + log("10) Make sure onChange doesn't fire when clicking on this option"); mouseDownOnSelect("sl1", 3, false, false); mouseUpOnSelect("sl1", 3, false, false); checkSelection("3"); - log("9) Make sure onChange fires when deselecting the last selected option with a mouse click"); - mouseDownOnSelect("sl1", 3, false, false); - mouseUpOnSelect("sl1", 3, false, false); + log("11) Make sure onChange fires when deselecting the last selected option with a mouse click"); + mouseDownOnSelect("sl1", 3, false, true); + mouseUpOnSelect("sl1", 3, false, true); checkSelection(""); - log("10) Make sure onChange doesn't fire when adding a new selected option"); + log("12) Make sure onChange doesn't fire when adding a new selected option"); option = document.createElement("option"); option.setAttribute("selected", ""); option.appendChild(document.createTextNode("item 4")); document.getElementById("sl1").appendChild(option); checkSelection("4"); - log("11) Make sure onChange fires when clicking on it"); + log("13) Make sure onChange doesn't fire when clicking on it"); mouseDownOnSelect("sl1", 4, false, false); mouseUpOnSelect("sl1", 4, false, false); - checkSelection(""); + checkSelection("4"); - log("12) Make sure onChange fires when clicking on a previously selected option"); - mouseDownOnSelect("sl1", 3, false, false); - mouseUpOnSelect("sl1", 3, false, false); - checkSelection("3"); + log("14) Make sure onChange fires when clicking on a previously selected option"); + mouseDownOnSelect("sl1", 3, false, true); + mouseUpOnSelect("sl1", 3, false, true); + checkSelection("3,4"); - log("13) Make sure onChange doesn't fire when removing a selected option"); - document.getElementById("sl1").item(4).selected = true; + log("15) Make sure onChange doesn't fire when removing a selected option"); document.getElementById("sl1").removeChild(document.getElementById("sl1").item(4)); checkSelection("3"); - log("14) Make sure onChange fires when clicking on the option that remains selected"); + log("16) Make sure onChange doesn't fire when clicking on the option that remains selected"); mouseDownOnSelect("sl1", 3, false, false); mouseUpOnSelect("sl1", 3, false, false); - checkSelection(""); + checkSelection("3"); - log("15) Make sure onChange fires when typing the name of an option"); + log("17) Make sure onChange fires when typing the name of an option"); option = document.createElement("option"); option.appendChild(document.createTextNode("keyboard test")); document.getElementById("sl1").appendChild(option); keyDownOnSelect("sl1", "K", false, false); checkSelection("4"); - log("16) Make sure onChange doesn't fire when leaving the select"); + log("18) Make sure onChange doesn't fire when leaving the select"); document.getElementById("sl1").blur(); checkSelection("4");
diff --git a/third_party/blink/web_tests/fast/forms/select/select-multiple-elements-with-mouse-drag-with-options-less-than-size.html b/third_party/blink/web_tests/fast/forms/select/select-multiple-elements-with-mouse-drag-with-options-less-than-size.html index 4e6c03bb..28fcfa2 100644 --- a/third_party/blink/web_tests/fast/forms/select/select-multiple-elements-with-mouse-drag-with-options-less-than-size.html +++ b/third_party/blink/web_tests/fast/forms/select/select-multiple-elements-with-mouse-drag-with-options-less-than-size.html
@@ -37,6 +37,7 @@ eventSender.dragMode = false; eventSender.mouseMoveTo(x, y); + eventSender.mouseDown(); debug("Dragging down"); eventSender.mouseDown();
diff --git a/third_party/blink/web_tests/platform/mac/editing/inserting/4278698-expected.txt b/third_party/blink/web_tests/platform/mac/editing/inserting/4278698-expected.txt index 43565a5..57e8237d 100644 --- a/third_party/blink/web_tests/platform/mac/editing/inserting/4278698-expected.txt +++ b/third_party/blink/web_tests/platform/mac/editing/inserting/4278698-expected.txt
@@ -20,5 +20,5 @@ LayoutText {#text} at (2,2) size 94x15 text run at (2,2) width 94: "a b" layer at (8,94) - LayoutBlockFlow {HR} at (0,86) size 784x2 [border: (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE)] + LayoutBlockFlow {HR} at (0,86) size 784x2 [color=#808080] [border: (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE)] caret: position 3 of child 0 {#text} of child 1 {PRE} of child 7 {DIV} of body
diff --git a/third_party/blink/web_tests/platform/mac/editing/selection/4402375-expected.txt b/third_party/blink/web_tests/platform/mac/editing/selection/4402375-expected.txt index b4acd59..ce590de 100644 --- a/third_party/blink/web_tests/platform/mac/editing/selection/4402375-expected.txt +++ b/third_party/blink/web_tests/platform/mac/editing/selection/4402375-expected.txt
@@ -22,6 +22,6 @@ LayoutText {#text} at (0,0) size 182x18 text run at (0,0) width 182: "This text should be selected." layer at (8,60) - LayoutBlockFlow {HR} at (0,52) size 784x2 [border: (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE)] + LayoutBlockFlow {HR} at (0,52) size 784x2 [color=#808080] [border: (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE)] selection start: position 0 of child 1 {#text} of child 6 {DIV} of body selection end: position 29 of child 1 {#text} of child 6 {DIV} of body
diff --git a/third_party/blink/web_tests/platform/win/editing/inserting/4278698-expected.txt b/third_party/blink/web_tests/platform/win/editing/inserting/4278698-expected.txt index 6396eee..eb1fe540 100644 --- a/third_party/blink/web_tests/platform/win/editing/inserting/4278698-expected.txt +++ b/third_party/blink/web_tests/platform/win/editing/inserting/4278698-expected.txt
@@ -20,5 +20,5 @@ LayoutText {#text} at (2,2) size 96x16 text run at (2,2) width 96: "a b" layer at (8,100) - LayoutBlockFlow {HR} at (0,92) size 784x2 [border: (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE)] + LayoutBlockFlow {HR} at (0,92) size 784x2 [color=#808080] [border: (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE)] caret: position 3 of child 0 {#text} of child 1 {PRE} of child 7 {DIV} of body
diff --git a/third_party/blink/web_tests/platform/win/editing/selection/4402375-expected.txt b/third_party/blink/web_tests/platform/win/editing/selection/4402375-expected.txt index 849be21..7f16dc7 100644 --- a/third_party/blink/web_tests/platform/win/editing/selection/4402375-expected.txt +++ b/third_party/blink/web_tests/platform/win/editing/selection/4402375-expected.txt
@@ -22,6 +22,6 @@ LayoutText {#text} at (0,0) size 170x19 text run at (0,0) width 170: "This text should be selected." layer at (8,64) - LayoutBlockFlow {HR} at (0,56) size 784x2 [border: (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE)] + LayoutBlockFlow {HR} at (0,56) size 784x2 [color=#808080] [border: (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE) (1px inset #EEEEEE)] selection start: position 0 of child 1 {#text} of child 6 {DIV} of body selection end: position 29 of child 1 {#text} of child 6 {DIV} of body
diff --git a/third_party/blink/web_tests/virtual/stable/webexposed/css-properties-as-js-properties-expected.txt b/third_party/blink/web_tests/virtual/stable/webexposed/css-properties-as-js-properties-expected.txt index 2602431..77a21b16 100644 --- a/third_party/blink/web_tests/virtual/stable/webexposed/css-properties-as-js-properties-expected.txt +++ b/third_party/blink/web_tests/virtual/stable/webexposed/css-properties-as-js-properties-expected.txt
@@ -116,6 +116,7 @@ breakInside bufferedRendering captionSide +caretAnimation caretColor clear clip
diff --git a/third_party/blink/web_tests/virtual/stable/webexposed/css-property-listing-expected.txt b/third_party/blink/web_tests/virtual/stable/webexposed/css-property-listing-expected.txt index a2bc205fa..d1a8353 100644 --- a/third_party/blink/web_tests/virtual/stable/webexposed/css-property-listing-expected.txt +++ b/third_party/blink/web_tests/virtual/stable/webexposed/css-property-listing-expected.txt
@@ -127,6 +127,7 @@ break-inside buffered-rendering caption-side + caret-animation caret-color clear clip
diff --git a/third_party/crossbench b/third_party/crossbench index dbd6b22..77e83bc 160000 --- a/third_party/crossbench +++ b/third_party/crossbench
@@ -1 +1 @@ -Subproject commit dbd6b227436aba167bcaa53157d5aabd063178cc +Subproject commit 77e83bc30e0f45c6bc3f4018c5999ba7deffe3c6
diff --git a/third_party/dawn b/third_party/dawn index cda86a8..370ee80 160000 --- a/third_party/dawn +++ b/third_party/dawn
@@ -1 +1 @@ -Subproject commit cda86a85a50b6f85e750661624d1124bb1ff7157 +Subproject commit 370ee80a113203da63f74c7591fefe9ca11f70cc
diff --git a/third_party/devtools-frontend/src b/third_party/devtools-frontend/src index da55423..b724879 160000 --- a/third_party/devtools-frontend/src +++ b/third_party/devtools-frontend/src
@@ -1 +1 @@ -Subproject commit da55423600c76cb379edcdd34837d29162e6867f +Subproject commit b724879a877b1d6d7162d419c42b4116612be837
diff --git a/third_party/glslang/src b/third_party/glslang/src index e9d166c..95e6e51a 160000 --- a/third_party/glslang/src +++ b/third_party/glslang/src
@@ -1 +1 @@ -Subproject commit e9d166cd3bdb4d3c89c6c89c7d9f196a0c9e4ffb +Subproject commit 95e6e51a2430185af06a92049395144a6f63a8e1
diff --git a/third_party/perfetto b/third_party/perfetto index 6766ffc..d6a79b5 160000 --- a/third_party/perfetto +++ b/third_party/perfetto
@@ -1 +1 @@ -Subproject commit 6766ffc9858ca6409ab50a01fde339c125f564d3 +Subproject commit d6a79b5507ad97595894fd00c78f8e08159c9d41
diff --git a/third_party/rust/chromium_crates_io/Cargo.lock b/third_party/rust/chromium_crates_io/Cargo.lock index ff34407..c49ccb78 100644 --- a/third_party/rust/chromium_crates_io/Cargo.lock +++ b/third_party/rust/chromium_crates_io/Cargo.lock
@@ -984,7 +984,7 @@ [[package]] name = "temporal_capi" -version = "0.0.9" +version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "diplomat", @@ -998,7 +998,7 @@ [[package]] name = "temporal_rs" -version = "0.0.9" +version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "combine", @@ -1024,7 +1024,7 @@ [[package]] name = "timezone_provider" -version = "0.0.9" +version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "zerotrie", @@ -1054,7 +1054,7 @@ [[package]] name = "tzif" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "combine",
diff --git a/third_party/rust/chromium_crates_io/Cargo.toml b/third_party/rust/chromium_crates_io/Cargo.toml index 5688237..aac8b55 100644 --- a/third_party/rust/chromium_crates_io/Cargo.toml +++ b/third_party/rust/chromium_crates_io/Cargo.toml
@@ -112,7 +112,7 @@ features = ["full"] [dependencies.temporal_capi] -version = "0.0.9" +version = "0.0.10" features = ["compiled_data"] [dependencies.zip]
diff --git a/third_party/rust/chromium_crates_io/supply-chain/config.toml b/third_party/rust/chromium_crates_io/supply-chain/config.toml index 4752d6b..6864a0e5 100644 --- a/third_party/rust/chromium_crates_io/supply-chain/config.toml +++ b/third_party/rust/chromium_crates_io/supply-chain/config.toml
@@ -380,16 +380,16 @@ [policy."synstructure:0.13.2"] criteria = ["crypto-safe", "safe-to-deploy", "ub-risk-2"] -[policy."temporal_capi:0.0.9"] +[policy."temporal_capi:0.0.10"] criteria = ["crypto-safe", "safe-to-deploy", "ub-risk-2"] -[policy."temporal_rs:0.0.9"] +[policy."temporal_rs:0.0.10"] criteria = ["crypto-safe", "safe-to-deploy", "ub-risk-2"] [policy."termcolor:1.4.1"] criteria = ["crypto-safe", "safe-to-run"] -[policy."timezone_provider:0.0.9"] +[policy."timezone_provider:0.0.10"] criteria = ["crypto-safe", "safe-to-deploy", "ub-risk-2"] [policy."tinystr:0.8.1"] @@ -398,7 +398,7 @@ [policy."toktrie:0.7.30"] criteria = ["crypto-safe", "safe-to-deploy", "ub-risk-2"] -[policy."tzif:0.3.0"] +[policy."tzif:0.4.0"] criteria = ["crypto-safe", "safe-to-deploy", "ub-risk-2"] [policy."unicode-ident:1.0.18"]
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/.cargo-checksum.json b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/.cargo-checksum.json similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/.cargo-checksum.json rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/.cargo-checksum.json
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/.cargo_vcs_info.json new file mode 100644 index 0000000..c9f87ca --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/.cargo_vcs_info.json
@@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "b05955e76f983e042380511f45cb4464a33edb38" + }, + "path_in_vcs": "temporal_capi" +} \ No newline at end of file
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/Cargo.lock b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/Cargo.lock similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/Cargo.lock rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/Cargo.lock index 413ba64..7daf1a0 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/Cargo.lock +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/Cargo.lock
@@ -63,9 +63,9 @@ [[package]] name = "diplomat_core" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2adc721d57b84cb388d5569bb0b5771dd38dc9f2d3f14a6205e5ef76c9b1990" +checksum = "ad619d9fdee0e731bb6f8f7d797b6ecfdc2395e363f554d2f6377155955171eb" dependencies = [ "proc-macro2", "quote", @@ -287,9 +287,9 @@ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -309,7 +309,7 @@ [[package]] name = "temporal_capi" -version = "0.0.9" +version = "0.0.10" dependencies = [ "diplomat", "diplomat-runtime", @@ -322,9 +322,9 @@ [[package]] name = "temporal_rs" -version = "0.0.9" +version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7995a53f8d6e4a4dae21067190ee433eb209b7b2b71140c36cec4910c2bc7c37" +checksum = "bc86c57c167d92f33d5dd199a9ea608524ee42ec21c92c8869f6b243a2f814e2" dependencies = [ "combine", "core_maths", @@ -341,9 +341,9 @@ [[package]] name = "timezone_provider" -version = "0.0.9" +version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332757a387cb7e6ce264143e9a103af85c96b3d0fc2fc2126579b52a3d7d95d2" +checksum = "8b0b238b60524fc66d3d334e7fb6e89a881a6d4964f5462190bcfa1b61f3e7fa" dependencies = [ "zerotrie", "zerovec", @@ -361,9 +361,9 @@ [[package]] name = "tzif" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cecffbab91858408738280e7bb6aac788f59a522dda961cd6b15542f0c08559" +checksum = "e5e762ac355f0c204d09ae644b3d59423d5ddfc5603997d60c8c56f24e429a9d" dependencies = [ "combine", ]
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/Cargo.toml b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/Cargo.toml similarity index 98% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/Cargo.toml rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/Cargo.toml index 22198c23..b682839 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/Cargo.toml +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/Cargo.toml
@@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.82.0" name = "temporal_capi" -version = "0.0.9" +version = "0.0.10" authors = ["boa-dev"] build = false include = [
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/Cargo.toml.orig b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/Cargo.toml.orig similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/Cargo.toml.orig rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/Cargo.toml.orig
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/LICENSE-Apache b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/LICENSE-Apache similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/LICENSE-Apache rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/LICENSE-Apache
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/LICENSE-MIT b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/LICENSE-MIT similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/LICENSE-MIT rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/LICENSE-MIT
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/OWNERS b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/OWNERS similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/OWNERS rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/OWNERS
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/README.md b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/README.md similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/README.md rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/README.md
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/AnyCalendarKind.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/AnyCalendarKind.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/AnyCalendarKind.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/AnyCalendarKind.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/AnyCalendarKind.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/AnyCalendarKind.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/AnyCalendarKind.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/AnyCalendarKind.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ArithmeticOverflow.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ArithmeticOverflow.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ArithmeticOverflow.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ArithmeticOverflow.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ArithmeticOverflow.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ArithmeticOverflow.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ArithmeticOverflow.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ArithmeticOverflow.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Calendar.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Calendar.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Calendar.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Calendar.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Calendar.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Calendar.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Calendar.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Calendar.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DateDuration.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DateDuration.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DateDuration.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DateDuration.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DateDuration.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DateDuration.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DateDuration.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DateDuration.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DifferenceSettings.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DifferenceSettings.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DifferenceSettings.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DifferenceSettings.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DifferenceSettings.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DifferenceSettings.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DifferenceSettings.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DifferenceSettings.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Disambiguation.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Disambiguation.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Disambiguation.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Disambiguation.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Disambiguation.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Disambiguation.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Disambiguation.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Disambiguation.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayCalendar.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayCalendar.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayCalendar.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayCalendar.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayCalendar.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayCalendar.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayCalendar.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayCalendar.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayOffset.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayOffset.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayOffset.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayOffset.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayOffset.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayOffset.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayOffset.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayOffset.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayTimeZone.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayTimeZone.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayTimeZone.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayTimeZone.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayTimeZone.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayTimeZone.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DisplayTimeZone.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DisplayTimeZone.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Duration.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Duration.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Duration.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Duration.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Duration.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Duration.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Duration.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Duration.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DurationOverflow.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DurationOverflow.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DurationOverflow.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DurationOverflow.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DurationOverflow.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DurationOverflow.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/DurationOverflow.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/DurationOverflow.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ErrorKind.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ErrorKind.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ErrorKind.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ErrorKind.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ErrorKind.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ErrorKind.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ErrorKind.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ErrorKind.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/I128Nanoseconds.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/I128Nanoseconds.d.h similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/I128Nanoseconds.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/I128Nanoseconds.d.h index e1cc218..268a534 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/I128Nanoseconds.d.h +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/I128Nanoseconds.d.h
@@ -12,7 +12,7 @@ typedef struct I128Nanoseconds { - int64_t high; + uint64_t high; uint64_t low; } I128Nanoseconds;
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/I128Nanoseconds.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/I128Nanoseconds.h similarity index 77% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/I128Nanoseconds.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/I128Nanoseconds.h index 4ac5489..b026864d 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/I128Nanoseconds.h +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/I128Nanoseconds.h
@@ -15,6 +15,8 @@ +bool temporal_rs_I128Nanoseconds_is_valid(I128Nanoseconds self); +
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Instant.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Instant.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Instant.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Instant.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Instant.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Instant.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Instant.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Instant.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoDate.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoDate.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoDate.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoDate.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoDate.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoDate.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoDate.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoDate.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoDateTime.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoDateTime.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoDateTime.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoDateTime.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoDateTime.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoDateTime.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoDateTime.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoDateTime.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoTime.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoTime.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoTime.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoTime.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoTime.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoTime.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/IsoTime.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/IsoTime.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/OffsetDisambiguation.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/OffsetDisambiguation.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/OffsetDisambiguation.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/OffsetDisambiguation.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/OffsetDisambiguation.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/OffsetDisambiguation.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/OffsetDisambiguation.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/OffsetDisambiguation.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/OwnedRelativeTo.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/OwnedRelativeTo.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/OwnedRelativeTo.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/OwnedRelativeTo.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/OwnedRelativeTo.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/OwnedRelativeTo.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/OwnedRelativeTo.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/OwnedRelativeTo.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDate.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDate.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDate.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDate.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDate.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDate.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDate.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDate.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDateTime.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDateTime.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDateTime.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDateTime.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDateTime.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDateTime.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDateTime.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDateTime.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDuration.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDuration.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDuration.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDuration.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDuration.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDuration.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialDuration.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialDuration.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialTime.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialTime.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialTime.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialTime.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialTime.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialTime.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialTime.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialTime.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialZonedDateTime.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialZonedDateTime.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialZonedDateTime.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialZonedDateTime.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialZonedDateTime.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialZonedDateTime.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PartialZonedDateTime.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PartialZonedDateTime.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDate.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDate.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDate.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDate.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDate.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDate.h similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDate.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDate.h index 77abed9..068f72b 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDate.h +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDate.h
@@ -41,6 +41,9 @@ typedef struct temporal_rs_PlainDate_from_partial_result {union {PlainDate* ok; TemporalError err;}; bool is_ok;} temporal_rs_PlainDate_from_partial_result; temporal_rs_PlainDate_from_partial_result temporal_rs_PlainDate_from_partial(PartialDate partial, ArithmeticOverflow_option overflow); +typedef struct temporal_rs_PlainDate_from_epoch_milliseconds_result {union {PlainDate* ok; TemporalError err;}; bool is_ok;} temporal_rs_PlainDate_from_epoch_milliseconds_result; +temporal_rs_PlainDate_from_epoch_milliseconds_result temporal_rs_PlainDate_from_epoch_milliseconds(int64_t ms, const TimeZone* tz); + typedef struct temporal_rs_PlainDate_with_result {union {PlainDate* ok; TemporalError err;}; bool is_ok;} temporal_rs_PlainDate_with_result; temporal_rs_PlainDate_with_result temporal_rs_PlainDate_with(const PlainDate* self, PartialDate partial, ArithmeticOverflow_option overflow);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDateTime.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDateTime.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDateTime.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDateTime.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDateTime.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDateTime.h similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDateTime.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDateTime.h index d74425d4..3f46ac9 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainDateTime.h +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainDateTime.h
@@ -39,6 +39,9 @@ typedef struct temporal_rs_PlainDateTime_from_partial_result {union {PlainDateTime* ok; TemporalError err;}; bool is_ok;} temporal_rs_PlainDateTime_from_partial_result; temporal_rs_PlainDateTime_from_partial_result temporal_rs_PlainDateTime_from_partial(PartialDateTime partial, ArithmeticOverflow_option overflow); +typedef struct temporal_rs_PlainDateTime_from_epoch_milliseconds_result {union {PlainDateTime* ok; TemporalError err;}; bool is_ok;} temporal_rs_PlainDateTime_from_epoch_milliseconds_result; +temporal_rs_PlainDateTime_from_epoch_milliseconds_result temporal_rs_PlainDateTime_from_epoch_milliseconds(int64_t ms, const TimeZone* tz); + typedef struct temporal_rs_PlainDateTime_with_result {union {PlainDateTime* ok; TemporalError err;}; bool is_ok;} temporal_rs_PlainDateTime_with_result; temporal_rs_PlainDateTime_with_result temporal_rs_PlainDateTime_with(const PlainDateTime* self, PartialDateTime partial, ArithmeticOverflow_option overflow);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainMonthDay.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainMonthDay.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainMonthDay.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainMonthDay.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainMonthDay.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainMonthDay.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainMonthDay.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainMonthDay.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainTime.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainTime.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainTime.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainTime.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainTime.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainTime.h similarity index 93% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainTime.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainTime.h index 1df366d..5d9616be 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainTime.h +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainTime.h
@@ -14,6 +14,7 @@ #include "RoundingMode.d.h" #include "TemporalError.d.h" #include "TimeDuration.d.h" +#include "TimeZone.d.h" #include "ToStringRoundingOptions.d.h" #include "Unit.d.h" @@ -33,6 +34,9 @@ typedef struct temporal_rs_PlainTime_from_partial_result {union {PlainTime* ok; TemporalError err;}; bool is_ok;} temporal_rs_PlainTime_from_partial_result; temporal_rs_PlainTime_from_partial_result temporal_rs_PlainTime_from_partial(PartialTime partial, ArithmeticOverflow_option overflow); +typedef struct temporal_rs_PlainTime_from_epoch_milliseconds_result {union {PlainTime* ok; TemporalError err;}; bool is_ok;} temporal_rs_PlainTime_from_epoch_milliseconds_result; +temporal_rs_PlainTime_from_epoch_milliseconds_result temporal_rs_PlainTime_from_epoch_milliseconds(int64_t ms, const TimeZone* tz); + typedef struct temporal_rs_PlainTime_with_result {union {PlainTime* ok; TemporalError err;}; bool is_ok;} temporal_rs_PlainTime_with_result; temporal_rs_PlainTime_with_result temporal_rs_PlainTime_with(const PlainTime* self, PartialTime partial, ArithmeticOverflow_option overflow);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainYearMonth.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainYearMonth.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainYearMonth.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainYearMonth.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainYearMonth.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainYearMonth.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/PlainYearMonth.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/PlainYearMonth.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Precision.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Precision.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Precision.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Precision.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Precision.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Precision.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Precision.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Precision.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RelativeTo.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RelativeTo.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RelativeTo.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RelativeTo.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RelativeTo.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RelativeTo.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RelativeTo.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RelativeTo.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RoundingMode.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RoundingMode.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RoundingMode.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RoundingMode.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RoundingMode.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RoundingMode.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RoundingMode.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RoundingMode.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RoundingOptions.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RoundingOptions.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RoundingOptions.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RoundingOptions.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RoundingOptions.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RoundingOptions.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/RoundingOptions.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/RoundingOptions.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Sign.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Sign.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Sign.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Sign.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Sign.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Sign.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Sign.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Sign.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TemporalError.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TemporalError.d.h similarity index 94% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TemporalError.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TemporalError.d.h index 9b29539..3c37cf5 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TemporalError.d.h +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TemporalError.d.h
@@ -14,6 +14,7 @@ typedef struct TemporalError { ErrorKind kind; + OptionStringView msg; } TemporalError; typedef struct TemporalError_option {union { TemporalError ok; }; bool is_ok; } TemporalError_option;
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TemporalError.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TemporalError.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TemporalError.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TemporalError.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TimeDuration.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TimeDuration.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TimeDuration.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TimeDuration.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TimeDuration.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TimeDuration.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TimeDuration.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TimeDuration.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TimeZone.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TimeZone.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TimeZone.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TimeZone.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TimeZone.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TimeZone.h similarity index 74% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TimeZone.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TimeZone.h index 5d707c9..de5614f 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TimeZone.h +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TimeZone.h
@@ -22,6 +22,11 @@ typedef struct temporal_rs_TimeZone_try_from_str_result {union {TimeZone* ok; TemporalError err;}; bool is_ok;} temporal_rs_TimeZone_try_from_str_result; temporal_rs_TimeZone_try_from_str_result temporal_rs_TimeZone_try_from_str(DiplomatStringView ident); +typedef struct temporal_rs_TimeZone_identifier_result {union { TemporalError err;}; bool is_ok;} temporal_rs_TimeZone_identifier_result; +temporal_rs_TimeZone_identifier_result temporal_rs_TimeZone_identifier(const TimeZone* self, DiplomatWrite* write); + +TimeZone* temporal_rs_TimeZone_clone(const TimeZone* self); + bool temporal_rs_TimeZone_is_valid(const TimeZone* self); void temporal_rs_TimeZone_destroy(TimeZone* self);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ToStringRoundingOptions.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ToStringRoundingOptions.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ToStringRoundingOptions.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ToStringRoundingOptions.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ToStringRoundingOptions.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ToStringRoundingOptions.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ToStringRoundingOptions.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ToStringRoundingOptions.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TransitionDirection.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TransitionDirection.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TransitionDirection.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TransitionDirection.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TransitionDirection.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TransitionDirection.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/TransitionDirection.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/TransitionDirection.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Unit.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Unit.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Unit.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Unit.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Unit.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Unit.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/Unit.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/Unit.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/UnsignedRoundingMode.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/UnsignedRoundingMode.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/UnsignedRoundingMode.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/UnsignedRoundingMode.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/UnsignedRoundingMode.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/UnsignedRoundingMode.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/UnsignedRoundingMode.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/UnsignedRoundingMode.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ZonedDateTime.d.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ZonedDateTime.d.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ZonedDateTime.d.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ZonedDateTime.d.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ZonedDateTime.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ZonedDateTime.h similarity index 91% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ZonedDateTime.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ZonedDateTime.h index 3fce292..4a3d877 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/ZonedDateTime.h +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/ZonedDateTime.h
@@ -50,8 +50,14 @@ int64_t temporal_rs_ZonedDateTime_epoch_milliseconds(const ZonedDateTime* self); +typedef struct temporal_rs_ZonedDateTime_from_epoch_milliseconds_result {union {ZonedDateTime* ok; TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_from_epoch_milliseconds_result; +temporal_rs_ZonedDateTime_from_epoch_milliseconds_result temporal_rs_ZonedDateTime_from_epoch_milliseconds(int64_t ms, const TimeZone* tz); + I128Nanoseconds temporal_rs_ZonedDateTime_epoch_nanoseconds(const ZonedDateTime* self); +typedef struct temporal_rs_ZonedDateTime_offset_nanoseconds_result {union {int64_t ok; TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_offset_nanoseconds_result; +temporal_rs_ZonedDateTime_offset_nanoseconds_result temporal_rs_ZonedDateTime_offset_nanoseconds(const ZonedDateTime* self); + Instant* temporal_rs_ZonedDateTime_to_instant(const ZonedDateTime* self); typedef struct temporal_rs_ZonedDateTime_with_result {union {ZonedDateTime* ok; TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_with_result; @@ -64,6 +70,11 @@ int8_t temporal_rs_ZonedDateTime_compare_instant(const ZonedDateTime* self, const ZonedDateTime* other); +bool temporal_rs_ZonedDateTime_equals(const ZonedDateTime* self, const ZonedDateTime* other); + +typedef struct temporal_rs_ZonedDateTime_offset_result {union { TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_offset_result; +temporal_rs_ZonedDateTime_offset_result temporal_rs_ZonedDateTime_offset(const ZonedDateTime* self, DiplomatWrite* write); + typedef struct temporal_rs_ZonedDateTime_start_of_day_result {union {ZonedDateTime* ok; TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_start_of_day_result; temporal_rs_ZonedDateTime_start_of_day_result temporal_rs_ZonedDateTime_start_of_day(const ZonedDateTime* self);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/diplomat_runtime.h b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/diplomat_runtime.h similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/c/diplomat_runtime.h rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/c/diplomat_runtime.h
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/diplomat_runtime.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/diplomat_runtime.hpp similarity index 94% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/diplomat_runtime.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/diplomat_runtime.hpp index e98b24f..8cd3659 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/diplomat_runtime.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/diplomat_runtime.hpp
@@ -108,6 +108,22 @@ return w; } +// This "trait" allows one to use _write() methods to efficiently +// write to a custom string type. To do this you need to write a specialized +// `WriteTrait<YourType>` (see WriteTrait<std::string> below) +// that is capable of constructing a DiplomatWrite, which can wrap +// your string type with appropriate resize/flush functionality. +template<typename T> struct WriteTrait { + // Fill in this method on a specialization to implement this trait + // static inline capi::DiplomatWrite Construct(T& t); +}; + +template<> struct WriteTrait<std::string> { + static inline capi::DiplomatWrite Construct(std::string& t) { + return diplomat::WriteFromString(t); + } +}; + template<class T> struct Ok { T inner; Ok(T&& i): inner(std::forward<T>(i)) {}
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/AnyCalendarKind.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/AnyCalendarKind.d.hpp similarity index 97% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/AnyCalendarKind.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/AnyCalendarKind.d.hpp index 548d846..fa05443 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/AnyCalendarKind.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/AnyCalendarKind.d.hpp
@@ -67,7 +67,8 @@ Roc = 17, }; - AnyCalendarKind() = default; + AnyCalendarKind(): value(Value::Buddhist) {} + // Implicit conversions between enum and ::Value constexpr AnyCalendarKind(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/AnyCalendarKind.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/AnyCalendarKind.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/AnyCalendarKind.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/AnyCalendarKind.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ArithmeticOverflow.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ArithmeticOverflow.d.hpp similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ArithmeticOverflow.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ArithmeticOverflow.d.hpp index 769cf84..e8ff547 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ArithmeticOverflow.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ArithmeticOverflow.d.hpp
@@ -31,7 +31,8 @@ Reject = 1, }; - ArithmeticOverflow() = default; + ArithmeticOverflow(): value(Value::Constrain) {} + // Implicit conversions between enum and ::Value constexpr ArithmeticOverflow(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ArithmeticOverflow.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ArithmeticOverflow.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ArithmeticOverflow.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ArithmeticOverflow.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Calendar.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Calendar.d.hpp similarity index 92% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Calendar.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Calendar.d.hpp index 4dbc77ec..2928f14 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Calendar.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Calendar.d.hpp
@@ -60,6 +60,8 @@ inline diplomat::result<std::unique_ptr<temporal_rs::Duration>, temporal_rs::TemporalError> date_until(temporal_rs::IsoDate one, temporal_rs::IsoDate two, temporal_rs::Unit largest_unit) const; inline diplomat::result<std::string, temporal_rs::TemporalError> era(temporal_rs::IsoDate date) const; + template<typename W> + inline diplomat::result<std::monostate, temporal_rs::TemporalError> era_write(temporal_rs::IsoDate date, W& writeable_output) const; inline std::optional<int32_t> era_year(temporal_rs::IsoDate date) const; @@ -68,6 +70,8 @@ inline uint8_t month(temporal_rs::IsoDate date) const; inline diplomat::result<std::string, temporal_rs::TemporalError> month_code(temporal_rs::IsoDate date) const; + template<typename W> + inline diplomat::result<std::monostate, temporal_rs::TemporalError> month_code_write(temporal_rs::IsoDate date, W& writeable_output) const; inline uint8_t day(temporal_rs::IsoDate date) const;
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Calendar.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Calendar.hpp similarity index 93% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Calendar.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Calendar.hpp index d37dbbe..d37868d 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Calendar.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Calendar.hpp
@@ -162,6 +162,14 @@ &write); return result.is_ok ? diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Ok<std::string>(std::move(output))) : diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +template<typename W> +inline diplomat::result<std::monostate, temporal_rs::TemporalError> temporal_rs::Calendar::era_write(temporal_rs::IsoDate date, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + auto result = temporal_rs::capi::temporal_rs_Calendar_era(this->AsFFI(), + date.AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Ok<std::monostate>()) : diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} inline std::optional<int32_t> temporal_rs::Calendar::era_year(temporal_rs::IsoDate date) const { auto result = temporal_rs::capi::temporal_rs_Calendar_era_year(this->AsFFI(), @@ -189,6 +197,14 @@ &write); return result.is_ok ? diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Ok<std::string>(std::move(output))) : diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +template<typename W> +inline diplomat::result<std::monostate, temporal_rs::TemporalError> temporal_rs::Calendar::month_code_write(temporal_rs::IsoDate date, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + auto result = temporal_rs::capi::temporal_rs_Calendar_month_code(this->AsFFI(), + date.AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Ok<std::monostate>()) : diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} inline uint8_t temporal_rs::Calendar::day(temporal_rs::IsoDate date) const { auto result = temporal_rs::capi::temporal_rs_Calendar_day(this->AsFFI(),
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DateDuration.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DateDuration.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DateDuration.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DateDuration.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DateDuration.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DateDuration.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DateDuration.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DateDuration.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DifferenceSettings.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DifferenceSettings.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DifferenceSettings.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DifferenceSettings.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DifferenceSettings.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DifferenceSettings.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DifferenceSettings.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DifferenceSettings.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Disambiguation.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Disambiguation.d.hpp similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Disambiguation.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Disambiguation.d.hpp index 117a94f..8ae1ee4 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Disambiguation.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Disambiguation.d.hpp
@@ -35,7 +35,8 @@ Reject = 3, }; - Disambiguation() = default; + Disambiguation(): value(Value::Compatible) {} + // Implicit conversions between enum and ::Value constexpr Disambiguation(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Disambiguation.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Disambiguation.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Disambiguation.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Disambiguation.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayCalendar.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayCalendar.d.hpp similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayCalendar.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayCalendar.d.hpp index f901521e..51390cb5 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayCalendar.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayCalendar.d.hpp
@@ -35,7 +35,8 @@ Critical = 3, }; - DisplayCalendar() = default; + DisplayCalendar(): value(Value::Auto) {} + // Implicit conversions between enum and ::Value constexpr DisplayCalendar(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayCalendar.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayCalendar.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayCalendar.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayCalendar.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayOffset.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayOffset.d.hpp similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayOffset.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayOffset.d.hpp index f19f9f8..8b925f5 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayOffset.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayOffset.d.hpp
@@ -31,7 +31,8 @@ Never = 1, }; - DisplayOffset() = default; + DisplayOffset(): value(Value::Auto) {} + // Implicit conversions between enum and ::Value constexpr DisplayOffset(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayOffset.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayOffset.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayOffset.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayOffset.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayTimeZone.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayTimeZone.d.hpp similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayTimeZone.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayTimeZone.d.hpp index 3f0f88e..8bbcbf2 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayTimeZone.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayTimeZone.d.hpp
@@ -33,7 +33,8 @@ Critical = 2, }; - DisplayTimeZone() = default; + DisplayTimeZone(): value(Value::Auto) {} + // Implicit conversions between enum and ::Value constexpr DisplayTimeZone(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayTimeZone.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayTimeZone.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DisplayTimeZone.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DisplayTimeZone.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Duration.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Duration.d.hpp similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Duration.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Duration.d.hpp index e2c4dd93..69b2e09 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Duration.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Duration.d.hpp
@@ -92,6 +92,8 @@ inline diplomat::result<std::unique_ptr<temporal_rs::Duration>, temporal_rs::TemporalError> subtract(const temporal_rs::Duration& other) const; inline diplomat::result<std::string, temporal_rs::TemporalError> to_string(temporal_rs::ToStringRoundingOptions options) const; + template<typename W> + inline diplomat::result<std::monostate, temporal_rs::TemporalError> to_string_write(temporal_rs::ToStringRoundingOptions options, W& writeable_output) const; inline diplomat::result<std::unique_ptr<temporal_rs::Duration>, temporal_rs::TemporalError> round(temporal_rs::RoundingOptions options, temporal_rs::RelativeTo relative_to) const;
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Duration.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Duration.hpp similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Duration.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Duration.hpp index 48c1f544..b93c19f 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Duration.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Duration.hpp
@@ -257,6 +257,14 @@ &write); return result.is_ok ? diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Ok<std::string>(std::move(output))) : diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +template<typename W> +inline diplomat::result<std::monostate, temporal_rs::TemporalError> temporal_rs::Duration::to_string_write(temporal_rs::ToStringRoundingOptions options, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + auto result = temporal_rs::capi::temporal_rs_Duration_to_string(this->AsFFI(), + options.AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Ok<std::monostate>()) : diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} inline diplomat::result<std::unique_ptr<temporal_rs::Duration>, temporal_rs::TemporalError> temporal_rs::Duration::round(temporal_rs::RoundingOptions options, temporal_rs::RelativeTo relative_to) const { auto result = temporal_rs::capi::temporal_rs_Duration_round(this->AsFFI(),
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DurationOverflow.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DurationOverflow.d.hpp similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DurationOverflow.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DurationOverflow.d.hpp index bcb6d17..e5cc449 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DurationOverflow.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DurationOverflow.d.hpp
@@ -31,7 +31,8 @@ Balance = 1, }; - DurationOverflow() = default; + DurationOverflow(): value(Value::Constrain) {} + // Implicit conversions between enum and ::Value constexpr DurationOverflow(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DurationOverflow.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DurationOverflow.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/DurationOverflow.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/DurationOverflow.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ErrorKind.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ErrorKind.d.hpp similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ErrorKind.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ErrorKind.d.hpp index eeb745c2..218ae1c 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ErrorKind.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ErrorKind.d.hpp
@@ -37,7 +37,8 @@ Assert = 4, }; - ErrorKind() = default; + ErrorKind(): value(Value::Generic) {} + // Implicit conversions between enum and ::Value constexpr ErrorKind(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ErrorKind.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ErrorKind.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ErrorKind.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ErrorKind.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/I128Nanoseconds.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/I128Nanoseconds.d.hpp similarity index 76% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/I128Nanoseconds.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/I128Nanoseconds.d.hpp index 68d117a..0a9a273 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/I128Nanoseconds.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/I128Nanoseconds.d.hpp
@@ -15,7 +15,7 @@ namespace temporal_rs { namespace capi { struct I128Nanoseconds { - int64_t high; + uint64_t high; uint64_t low; }; @@ -26,16 +26,19 @@ namespace temporal_rs { /** - * For portability, we use two i64s instead of an i128. - * The sign is extracted first before - * appending the high/low segments to each other. + * For portability, we use two u64s instead of an i128. + * The high bit of the u64 is the sign. + * This cannot represent i128::MIN, and has a -0, but those are largely + * irrelevant for this purpose. * * This could potentially instead be a bit-by-bit split, or something else */ struct I128Nanoseconds { - int64_t high; + uint64_t high; uint64_t low; + inline bool is_valid() const; + inline temporal_rs::capi::I128Nanoseconds AsFFI() const; inline static temporal_rs::I128Nanoseconds FromFFI(temporal_rs::capi::I128Nanoseconds c_struct); };
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/I128Nanoseconds.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/I128Nanoseconds.hpp similarity index 77% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/I128Nanoseconds.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/I128Nanoseconds.hpp index 37115c2..1e736be 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/I128Nanoseconds.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/I128Nanoseconds.hpp
@@ -18,10 +18,17 @@ namespace capi { extern "C" { + bool temporal_rs_I128Nanoseconds_is_valid(temporal_rs::capi::I128Nanoseconds self); + } // extern "C" } // namespace capi } // namespace +inline bool temporal_rs::I128Nanoseconds::is_valid() const { + auto result = temporal_rs::capi::temporal_rs_I128Nanoseconds_is_valid(this->AsFFI()); + return result; +} + inline temporal_rs::capi::I128Nanoseconds temporal_rs::I128Nanoseconds::AsFFI() const { return temporal_rs::capi::I128Nanoseconds {
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Instant.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Instant.d.hpp similarity index 93% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Instant.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Instant.d.hpp index df1c1b78..09c3251 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Instant.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Instant.d.hpp
@@ -71,6 +71,8 @@ inline temporal_rs::I128Nanoseconds epoch_nanoseconds() const; inline diplomat::result<std::string, temporal_rs::TemporalError> to_ixdtf_string_with_compiled_data(const temporal_rs::TimeZone* zone, temporal_rs::ToStringRoundingOptions options) const; + template<typename W> + inline diplomat::result<std::monostate, temporal_rs::TemporalError> to_ixdtf_string_with_compiled_data_write(const temporal_rs::TimeZone* zone, temporal_rs::ToStringRoundingOptions options, W& writeable_output) const; inline std::unique_ptr<temporal_rs::ZonedDateTime> to_zoned_date_time_iso(const temporal_rs::TimeZone& zone) const;
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Instant.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Instant.hpp similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Instant.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Instant.hpp index 23d02350..53b43fe 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Instant.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Instant.hpp
@@ -174,6 +174,15 @@ &write); return result.is_ok ? diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Ok<std::string>(std::move(output))) : diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +template<typename W> +inline diplomat::result<std::monostate, temporal_rs::TemporalError> temporal_rs::Instant::to_ixdtf_string_with_compiled_data_write(const temporal_rs::TimeZone* zone, temporal_rs::ToStringRoundingOptions options, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + auto result = temporal_rs::capi::temporal_rs_Instant_to_ixdtf_string_with_compiled_data(this->AsFFI(), + zone ? zone->AsFFI() : nullptr, + options.AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Ok<std::monostate>()) : diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} inline std::unique_ptr<temporal_rs::ZonedDateTime> temporal_rs::Instant::to_zoned_date_time_iso(const temporal_rs::TimeZone& zone) const { auto result = temporal_rs::capi::temporal_rs_Instant_to_zoned_date_time_iso(this->AsFFI(),
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoDate.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoDate.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoDate.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoDate.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoDate.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoDate.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoDate.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoDate.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoDateTime.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoDateTime.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoDateTime.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoDateTime.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoDateTime.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoDateTime.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoDateTime.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoDateTime.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoTime.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoTime.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoTime.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoTime.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoTime.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoTime.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/IsoTime.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/IsoTime.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/OffsetDisambiguation.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/OffsetDisambiguation.d.hpp similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/OffsetDisambiguation.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/OffsetDisambiguation.d.hpp index 7f742cb..bdfb465 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/OffsetDisambiguation.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/OffsetDisambiguation.d.hpp
@@ -35,7 +35,8 @@ Reject = 3, }; - OffsetDisambiguation() = default; + OffsetDisambiguation(): value(Value::Use) {} + // Implicit conversions between enum and ::Value constexpr OffsetDisambiguation(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/OffsetDisambiguation.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/OffsetDisambiguation.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/OffsetDisambiguation.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/OffsetDisambiguation.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/OwnedRelativeTo.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/OwnedRelativeTo.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/OwnedRelativeTo.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/OwnedRelativeTo.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/OwnedRelativeTo.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/OwnedRelativeTo.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/OwnedRelativeTo.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/OwnedRelativeTo.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDate.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDate.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDate.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDate.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDate.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDate.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDate.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDate.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDateTime.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDateTime.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDateTime.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDateTime.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDateTime.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDateTime.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDateTime.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDateTime.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDuration.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDuration.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDuration.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDuration.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDuration.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDuration.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialDuration.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialDuration.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialTime.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialTime.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialTime.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialTime.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialTime.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialTime.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialTime.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialTime.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialZonedDateTime.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialZonedDateTime.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialZonedDateTime.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialZonedDateTime.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialZonedDateTime.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialZonedDateTime.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PartialZonedDateTime.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PartialZonedDateTime.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDate.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDate.d.hpp similarity index 92% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDate.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDate.d.hpp index f3ccc99..1315de27 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDate.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDate.d.hpp
@@ -57,6 +57,8 @@ inline static diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError> from_partial(temporal_rs::PartialDate partial, std::optional<temporal_rs::ArithmeticOverflow> overflow); + inline static diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError> from_epoch_milliseconds(int64_t ms, const temporal_rs::TimeZone& tz); + inline diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError> with(temporal_rs::PartialDate partial, std::optional<temporal_rs::ArithmeticOverflow> overflow) const; inline diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError> with_calendar(temporal_rs::AnyCalendarKind calendar) const; @@ -92,6 +94,8 @@ inline uint8_t month() const; inline std::string month_code() const; + template<typename W> + inline void month_code_write(W& writeable_output) const; inline uint8_t day() const; @@ -114,6 +118,8 @@ inline bool in_leap_year() const; inline std::string era() const; + template<typename W> + inline void era_write(W& writeable_output) const; inline std::optional<int32_t> era_year() const; @@ -126,6 +132,8 @@ inline diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> to_zoned_date_time(const temporal_rs::TimeZone& time_zone, const temporal_rs::PlainTime* time) const; inline std::string to_ixdtf_string(temporal_rs::DisplayCalendar display_calendar) const; + template<typename W> + inline void to_ixdtf_string_write(temporal_rs::DisplayCalendar display_calendar, W& writeable_output) const; inline const temporal_rs::capi::PlainDate* AsFFI() const; inline temporal_rs::capi::PlainDate* AsFFI();
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDate.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDate.hpp similarity index 93% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDate.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDate.hpp index c0fffcb8..1a280de 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDate.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDate.hpp
@@ -44,6 +44,9 @@ typedef struct temporal_rs_PlainDate_from_partial_result {union {temporal_rs::capi::PlainDate* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_PlainDate_from_partial_result; temporal_rs_PlainDate_from_partial_result temporal_rs_PlainDate_from_partial(temporal_rs::capi::PartialDate partial, temporal_rs::capi::ArithmeticOverflow_option overflow); + typedef struct temporal_rs_PlainDate_from_epoch_milliseconds_result {union {temporal_rs::capi::PlainDate* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_PlainDate_from_epoch_milliseconds_result; + temporal_rs_PlainDate_from_epoch_milliseconds_result temporal_rs_PlainDate_from_epoch_milliseconds(int64_t ms, const temporal_rs::capi::TimeZone* tz); + typedef struct temporal_rs_PlainDate_with_result {union {temporal_rs::capi::PlainDate* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_PlainDate_with_result; temporal_rs_PlainDate_with_result temporal_rs_PlainDate_with(const temporal_rs::capi::PlainDate* self, temporal_rs::capi::PartialDate partial, temporal_rs::capi::ArithmeticOverflow_option overflow); @@ -168,6 +171,12 @@ return result.is_ok ? diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError>(diplomat::Ok<std::unique_ptr<temporal_rs::PlainDate>>(std::unique_ptr<temporal_rs::PlainDate>(temporal_rs::PlainDate::FromFFI(result.ok)))) : diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +inline diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError> temporal_rs::PlainDate::from_epoch_milliseconds(int64_t ms, const temporal_rs::TimeZone& tz) { + auto result = temporal_rs::capi::temporal_rs_PlainDate_from_epoch_milliseconds(ms, + tz.AsFFI()); + return result.is_ok ? diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError>(diplomat::Ok<std::unique_ptr<temporal_rs::PlainDate>>(std::unique_ptr<temporal_rs::PlainDate>(temporal_rs::PlainDate::FromFFI(result.ok)))) : diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} + inline diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError> temporal_rs::PlainDate::with(temporal_rs::PartialDate partial, std::optional<temporal_rs::ArithmeticOverflow> overflow) const { auto result = temporal_rs::capi::temporal_rs_PlainDate_with(this->AsFFI(), partial.AsFFI(), @@ -273,6 +282,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainDate::month_code_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainDate_month_code(this->AsFFI(), + &write); +} inline uint8_t temporal_rs::PlainDate::day() const { auto result = temporal_rs::capi::temporal_rs_PlainDate_day(this->AsFFI()); @@ -331,6 +346,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainDate::era_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainDate_era(this->AsFFI(), + &write); +} inline std::optional<int32_t> temporal_rs::PlainDate::era_year() const { auto result = temporal_rs::capi::temporal_rs_PlainDate_era_year(this->AsFFI()); @@ -368,6 +389,13 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainDate::to_ixdtf_string_write(temporal_rs::DisplayCalendar display_calendar, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainDate_to_ixdtf_string(this->AsFFI(), + display_calendar.AsFFI(), + &write); +} inline const temporal_rs::capi::PlainDate* temporal_rs::PlainDate::AsFFI() const { return reinterpret_cast<const temporal_rs::capi::PlainDate*>(this);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDateTime.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDateTime.d.hpp similarity index 91% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDateTime.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDateTime.d.hpp index 3c36f8a3..44c3b89 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDateTime.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDateTime.d.hpp
@@ -54,6 +54,8 @@ inline static diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError> from_partial(temporal_rs::PartialDateTime partial, std::optional<temporal_rs::ArithmeticOverflow> overflow); + inline static diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError> from_epoch_milliseconds(int64_t ms, const temporal_rs::TimeZone& tz); + inline diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError> with(temporal_rs::PartialDateTime partial, std::optional<temporal_rs::ArithmeticOverflow> overflow) const; inline diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError> with_time(const temporal_rs::PlainTime* time) const; @@ -89,6 +91,8 @@ inline uint8_t month() const; inline std::string month_code() const; + template<typename W> + inline void month_code_write(W& writeable_output) const; inline uint8_t day() const; @@ -111,6 +115,8 @@ inline bool in_leap_year() const; inline std::string era() const; + template<typename W> + inline void era_write(W& writeable_output) const; inline std::optional<int32_t> era_year() const; @@ -135,6 +141,8 @@ inline diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> to_zoned_date_time(const temporal_rs::TimeZone& time_zone, temporal_rs::Disambiguation disambiguation) const; inline diplomat::result<std::string, temporal_rs::TemporalError> to_ixdtf_string(temporal_rs::ToStringRoundingOptions options, temporal_rs::DisplayCalendar display_calendar) const; + template<typename W> + inline diplomat::result<std::monostate, temporal_rs::TemporalError> to_ixdtf_string_write(temporal_rs::ToStringRoundingOptions options, temporal_rs::DisplayCalendar display_calendar, W& writeable_output) const; inline const temporal_rs::capi::PlainDateTime* AsFFI() const; inline temporal_rs::capi::PlainDateTime* AsFFI();
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDateTime.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDateTime.hpp similarity index 92% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDateTime.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDateTime.hpp index 6f07a87..fc6ce01 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainDateTime.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainDateTime.hpp
@@ -42,6 +42,9 @@ typedef struct temporal_rs_PlainDateTime_from_partial_result {union {temporal_rs::capi::PlainDateTime* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_PlainDateTime_from_partial_result; temporal_rs_PlainDateTime_from_partial_result temporal_rs_PlainDateTime_from_partial(temporal_rs::capi::PartialDateTime partial, temporal_rs::capi::ArithmeticOverflow_option overflow); + typedef struct temporal_rs_PlainDateTime_from_epoch_milliseconds_result {union {temporal_rs::capi::PlainDateTime* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_PlainDateTime_from_epoch_milliseconds_result; + temporal_rs_PlainDateTime_from_epoch_milliseconds_result temporal_rs_PlainDateTime_from_epoch_milliseconds(int64_t ms, const temporal_rs::capi::TimeZone* tz); + typedef struct temporal_rs_PlainDateTime_with_result {union {temporal_rs::capi::PlainDateTime* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_PlainDateTime_with_result; temporal_rs_PlainDateTime_with_result temporal_rs_PlainDateTime_with(const temporal_rs::capi::PlainDateTime* self, temporal_rs::capi::PartialDateTime partial, temporal_rs::capi::ArithmeticOverflow_option overflow); @@ -183,6 +186,12 @@ return result.is_ok ? diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError>(diplomat::Ok<std::unique_ptr<temporal_rs::PlainDateTime>>(std::unique_ptr<temporal_rs::PlainDateTime>(temporal_rs::PlainDateTime::FromFFI(result.ok)))) : diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +inline diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError> temporal_rs::PlainDateTime::from_epoch_milliseconds(int64_t ms, const temporal_rs::TimeZone& tz) { + auto result = temporal_rs::capi::temporal_rs_PlainDateTime_from_epoch_milliseconds(ms, + tz.AsFFI()); + return result.is_ok ? diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError>(diplomat::Ok<std::unique_ptr<temporal_rs::PlainDateTime>>(std::unique_ptr<temporal_rs::PlainDateTime>(temporal_rs::PlainDateTime::FromFFI(result.ok)))) : diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} + inline diplomat::result<std::unique_ptr<temporal_rs::PlainDateTime>, temporal_rs::TemporalError> temporal_rs::PlainDateTime::with(temporal_rs::PartialDateTime partial, std::optional<temporal_rs::ArithmeticOverflow> overflow) const { auto result = temporal_rs::capi::temporal_rs_PlainDateTime_with(this->AsFFI(), partial.AsFFI(), @@ -279,6 +288,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainDateTime::month_code_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainDateTime_month_code(this->AsFFI(), + &write); +} inline uint8_t temporal_rs::PlainDateTime::day() const { auto result = temporal_rs::capi::temporal_rs_PlainDateTime_day(this->AsFFI()); @@ -337,6 +352,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainDateTime::era_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainDateTime_era(this->AsFFI(), + &write); +} inline std::optional<int32_t> temporal_rs::PlainDateTime::era_year() const { auto result = temporal_rs::capi::temporal_rs_PlainDateTime_era_year(this->AsFFI()); @@ -415,6 +436,15 @@ &write); return result.is_ok ? diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Ok<std::string>(std::move(output))) : diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +template<typename W> +inline diplomat::result<std::monostate, temporal_rs::TemporalError> temporal_rs::PlainDateTime::to_ixdtf_string_write(temporal_rs::ToStringRoundingOptions options, temporal_rs::DisplayCalendar display_calendar, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + auto result = temporal_rs::capi::temporal_rs_PlainDateTime_to_ixdtf_string(this->AsFFI(), + options.AsFFI(), + display_calendar.AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Ok<std::monostate>()) : diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} inline const temporal_rs::capi::PlainDateTime* temporal_rs::PlainDateTime::AsFFI() const { return reinterpret_cast<const temporal_rs::capi::PlainDateTime*>(this);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainMonthDay.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainMonthDay.d.hpp similarity index 92% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainMonthDay.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainMonthDay.d.hpp index 2b411634..8057f666 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainMonthDay.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainMonthDay.d.hpp
@@ -57,10 +57,14 @@ inline const temporal_rs::Calendar& calendar() const; inline std::string month_code() const; + template<typename W> + inline void month_code_write(W& writeable_output) const; inline diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError> to_plain_date(std::optional<temporal_rs::PartialDate> year) const; inline std::string to_ixdtf_string(temporal_rs::DisplayCalendar display_calendar) const; + template<typename W> + inline void to_ixdtf_string_write(temporal_rs::DisplayCalendar display_calendar, W& writeable_output) const; inline const temporal_rs::capi::PlainMonthDay* AsFFI() const; inline temporal_rs::capi::PlainMonthDay* AsFFI();
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainMonthDay.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainMonthDay.hpp similarity index 94% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainMonthDay.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainMonthDay.hpp index a6a2fdf..e915645 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainMonthDay.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainMonthDay.hpp
@@ -127,6 +127,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainMonthDay::month_code_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainMonthDay_month_code(this->AsFFI(), + &write); +} inline diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError> temporal_rs::PlainMonthDay::to_plain_date(std::optional<temporal_rs::PartialDate> year) const { auto result = temporal_rs::capi::temporal_rs_PlainMonthDay_to_plain_date(this->AsFFI(), @@ -142,6 +148,13 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainMonthDay::to_ixdtf_string_write(temporal_rs::DisplayCalendar display_calendar, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainMonthDay_to_ixdtf_string(this->AsFFI(), + display_calendar.AsFFI(), + &write); +} inline const temporal_rs::capi::PlainMonthDay* temporal_rs::PlainMonthDay::AsFFI() const { return reinterpret_cast<const temporal_rs::capi::PlainMonthDay*>(this);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainTime.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainTime.d.hpp similarity index 91% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainTime.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainTime.d.hpp index f37109eb..eb34b14 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainTime.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainTime.d.hpp
@@ -18,6 +18,8 @@ class PlainTime; namespace capi { struct TimeDuration; } class TimeDuration; +namespace capi { struct TimeZone; } +class TimeZone; struct DifferenceSettings; struct PartialTime; struct TemporalError; @@ -44,6 +46,8 @@ inline static diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError> from_partial(temporal_rs::PartialTime partial, std::optional<temporal_rs::ArithmeticOverflow> overflow); + inline static diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError> from_epoch_milliseconds(int64_t ms, const temporal_rs::TimeZone& tz); + inline diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError> with(temporal_rs::PartialTime partial, std::optional<temporal_rs::ArithmeticOverflow> overflow) const; inline static diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError> from_utf8(std::string_view s); @@ -81,6 +85,8 @@ inline diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError> round(temporal_rs::Unit smallest_unit, std::optional<double> rounding_increment, std::optional<temporal_rs::RoundingMode> rounding_mode) const; inline diplomat::result<std::string, temporal_rs::TemporalError> to_ixdtf_string(temporal_rs::ToStringRoundingOptions options) const; + template<typename W> + inline diplomat::result<std::monostate, temporal_rs::TemporalError> to_ixdtf_string_write(temporal_rs::ToStringRoundingOptions options, W& writeable_output) const; inline const temporal_rs::capi::PlainTime* AsFFI() const; inline temporal_rs::capi::PlainTime* AsFFI();
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainTime.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainTime.hpp similarity index 91% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainTime.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainTime.hpp index fbca28f7..ea51657 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainTime.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainTime.hpp
@@ -19,6 +19,7 @@ #include "RoundingMode.hpp" #include "TemporalError.hpp" #include "TimeDuration.hpp" +#include "TimeZone.hpp" #include "ToStringRoundingOptions.hpp" #include "Unit.hpp" @@ -36,6 +37,9 @@ typedef struct temporal_rs_PlainTime_from_partial_result {union {temporal_rs::capi::PlainTime* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_PlainTime_from_partial_result; temporal_rs_PlainTime_from_partial_result temporal_rs_PlainTime_from_partial(temporal_rs::capi::PartialTime partial, temporal_rs::capi::ArithmeticOverflow_option overflow); + typedef struct temporal_rs_PlainTime_from_epoch_milliseconds_result {union {temporal_rs::capi::PlainTime* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_PlainTime_from_epoch_milliseconds_result; + temporal_rs_PlainTime_from_epoch_milliseconds_result temporal_rs_PlainTime_from_epoch_milliseconds(int64_t ms, const temporal_rs::capi::TimeZone* tz); + typedef struct temporal_rs_PlainTime_with_result {union {temporal_rs::capi::PlainTime* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_PlainTime_with_result; temporal_rs_PlainTime_with_result temporal_rs_PlainTime_with(const temporal_rs::capi::PlainTime* self, temporal_rs::capi::PartialTime partial, temporal_rs::capi::ArithmeticOverflow_option overflow); @@ -117,6 +121,12 @@ return result.is_ok ? diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError>(diplomat::Ok<std::unique_ptr<temporal_rs::PlainTime>>(std::unique_ptr<temporal_rs::PlainTime>(temporal_rs::PlainTime::FromFFI(result.ok)))) : diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +inline diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError> temporal_rs::PlainTime::from_epoch_milliseconds(int64_t ms, const temporal_rs::TimeZone& tz) { + auto result = temporal_rs::capi::temporal_rs_PlainTime_from_epoch_milliseconds(ms, + tz.AsFFI()); + return result.is_ok ? diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError>(diplomat::Ok<std::unique_ptr<temporal_rs::PlainTime>>(std::unique_ptr<temporal_rs::PlainTime>(temporal_rs::PlainTime::FromFFI(result.ok)))) : diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} + inline diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError> temporal_rs::PlainTime::with(temporal_rs::PartialTime partial, std::optional<temporal_rs::ArithmeticOverflow> overflow) const { auto result = temporal_rs::capi::temporal_rs_PlainTime_with(this->AsFFI(), partial.AsFFI(), @@ -230,6 +240,14 @@ &write); return result.is_ok ? diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Ok<std::string>(std::move(output))) : diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +template<typename W> +inline diplomat::result<std::monostate, temporal_rs::TemporalError> temporal_rs::PlainTime::to_ixdtf_string_write(temporal_rs::ToStringRoundingOptions options, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + auto result = temporal_rs::capi::temporal_rs_PlainTime_to_ixdtf_string(this->AsFFI(), + options.AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Ok<std::monostate>()) : diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} inline const temporal_rs::capi::PlainTime* temporal_rs::PlainTime::AsFFI() const { return reinterpret_cast<const temporal_rs::capi::PlainTime*>(this);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainYearMonth.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainYearMonth.d.hpp similarity index 91% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainYearMonth.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainYearMonth.d.hpp index c691389c..e178dcb8 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainYearMonth.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainYearMonth.d.hpp
@@ -50,6 +50,8 @@ inline int32_t iso_year() const; inline std::string padded_iso_year_string() const; + template<typename W> + inline void padded_iso_year_string_write(W& writeable_output) const; inline uint8_t iso_month() const; @@ -58,6 +60,8 @@ inline uint8_t month() const; inline std::string month_code() const; + template<typename W> + inline void month_code_write(W& writeable_output) const; inline bool in_leap_year() const; @@ -68,6 +72,8 @@ inline uint16_t months_in_year() const; inline std::string era() const; + template<typename W> + inline void era_write(W& writeable_output) const; inline std::optional<int32_t> era_year() const; @@ -88,6 +94,8 @@ inline diplomat::result<std::unique_ptr<temporal_rs::PlainDate>, temporal_rs::TemporalError> to_plain_date(std::optional<temporal_rs::PartialDate> day) const; inline std::string to_ixdtf_string(temporal_rs::DisplayCalendar display_calendar) const; + template<typename W> + inline void to_ixdtf_string_write(temporal_rs::DisplayCalendar display_calendar, W& writeable_output) const; inline const temporal_rs::capi::PlainYearMonth* AsFFI() const; inline temporal_rs::capi::PlainYearMonth* AsFFI();
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainYearMonth.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainYearMonth.hpp similarity index 93% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainYearMonth.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainYearMonth.hpp index 1df1195..f73c3ab3 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/PlainYearMonth.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/PlainYearMonth.hpp
@@ -131,6 +131,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainYearMonth::padded_iso_year_string_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainYearMonth_padded_iso_year_string(this->AsFFI(), + &write); +} inline uint8_t temporal_rs::PlainYearMonth::iso_month() const { auto result = temporal_rs::capi::temporal_rs_PlainYearMonth_iso_month(this->AsFFI()); @@ -154,6 +160,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainYearMonth::month_code_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainYearMonth_month_code(this->AsFFI(), + &write); +} inline bool temporal_rs::PlainYearMonth::in_leap_year() const { auto result = temporal_rs::capi::temporal_rs_PlainYearMonth_in_leap_year(this->AsFFI()); @@ -182,6 +194,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainYearMonth::era_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainYearMonth_era(this->AsFFI(), + &write); +} inline std::optional<int32_t> temporal_rs::PlainYearMonth::era_year() const { auto result = temporal_rs::capi::temporal_rs_PlainYearMonth_era_year(this->AsFFI()); @@ -247,6 +265,13 @@ &write); return output; } +template<typename W> +inline void temporal_rs::PlainYearMonth::to_ixdtf_string_write(temporal_rs::DisplayCalendar display_calendar, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_PlainYearMonth_to_ixdtf_string(this->AsFFI(), + display_calendar.AsFFI(), + &write); +} inline const temporal_rs::capi::PlainYearMonth* temporal_rs::PlainYearMonth::AsFFI() const { return reinterpret_cast<const temporal_rs::capi::PlainYearMonth*>(this);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Precision.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Precision.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Precision.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Precision.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Precision.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Precision.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Precision.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Precision.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RelativeTo.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RelativeTo.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RelativeTo.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RelativeTo.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RelativeTo.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RelativeTo.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RelativeTo.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RelativeTo.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RoundingMode.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RoundingMode.d.hpp similarity index 97% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RoundingMode.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RoundingMode.d.hpp index 1cbcada..58ff1ebe 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RoundingMode.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RoundingMode.d.hpp
@@ -45,7 +45,8 @@ HalfEven = 8, }; - RoundingMode() = default; + RoundingMode(): value(Value::Ceil) {} + // Implicit conversions between enum and ::Value constexpr RoundingMode(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RoundingMode.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RoundingMode.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RoundingMode.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RoundingMode.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RoundingOptions.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RoundingOptions.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RoundingOptions.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RoundingOptions.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RoundingOptions.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RoundingOptions.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/RoundingOptions.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/RoundingOptions.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Sign.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Sign.d.hpp similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Sign.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Sign.d.hpp index 0cdf371..ad11e12b 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Sign.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Sign.d.hpp
@@ -33,7 +33,8 @@ Negative = -1, }; - Sign() = default; + Sign(): value(Value::Zero) {} + // Implicit conversions between enum and ::Value constexpr Sign(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Sign.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Sign.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Sign.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Sign.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TemporalError.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TemporalError.d.hpp similarity index 91% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TemporalError.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TemporalError.d.hpp index 2d59a55..05d5728 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TemporalError.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TemporalError.d.hpp
@@ -21,6 +21,7 @@ namespace capi { struct TemporalError { temporal_rs::capi::ErrorKind kind; + diplomat::capi::OptionStringView msg; }; typedef struct TemporalError_option {union { TemporalError ok; }; bool is_ok; } TemporalError_option; @@ -31,6 +32,7 @@ namespace temporal_rs { struct TemporalError { temporal_rs::ErrorKind kind; + std::optional<std::string_view> msg; inline temporal_rs::capi::TemporalError AsFFI() const; inline static temporal_rs::TemporalError FromFFI(temporal_rs::capi::TemporalError c_struct);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TemporalError.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TemporalError.hpp similarity index 74% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TemporalError.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TemporalError.hpp index 207949a..eb8dc32 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TemporalError.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TemporalError.hpp
@@ -27,12 +27,14 @@ inline temporal_rs::capi::TemporalError temporal_rs::TemporalError::AsFFI() const { return temporal_rs::capi::TemporalError { /* .kind = */ kind.AsFFI(), + /* .msg = */ msg.has_value() ? (diplomat::capi::OptionStringView{ { {msg.value().data(), msg.value().size()} }, true }) : (diplomat::capi::OptionStringView{ {}, false }), }; } inline temporal_rs::TemporalError temporal_rs::TemporalError::FromFFI(temporal_rs::capi::TemporalError c_struct) { return temporal_rs::TemporalError { /* .kind = */ temporal_rs::ErrorKind::FromFFI(c_struct.kind), + /* .msg = */ c_struct.msg.is_ok ? std::optional(std::string_view(c_struct.msg.ok.data, c_struct.msg.ok.len)) : std::nullopt, }; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeDuration.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeDuration.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeDuration.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeDuration.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeDuration.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeDuration.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeDuration.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeDuration.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeZone.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeZone.d.hpp similarity index 84% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeZone.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeZone.d.hpp index e78bacc..2e03c88 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeZone.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeZone.d.hpp
@@ -32,6 +32,12 @@ inline static diplomat::result<std::unique_ptr<temporal_rs::TimeZone>, temporal_rs::TemporalError> try_from_str(std::string_view ident); + inline diplomat::result<std::string, temporal_rs::TemporalError> identifier() const; + template<typename W> + inline diplomat::result<std::monostate, temporal_rs::TemporalError> identifier_write(W& writeable_output) const; + + inline std::unique_ptr<temporal_rs::TimeZone> clone() const; + inline bool is_valid() const; inline const temporal_rs::capi::TimeZone* AsFFI() const;
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeZone.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeZone.hpp similarity index 66% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeZone.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeZone.hpp index 2ebc904b..f38ae778 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TimeZone.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TimeZone.hpp
@@ -25,6 +25,11 @@ typedef struct temporal_rs_TimeZone_try_from_str_result {union {temporal_rs::capi::TimeZone* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_TimeZone_try_from_str_result; temporal_rs_TimeZone_try_from_str_result temporal_rs_TimeZone_try_from_str(diplomat::capi::DiplomatStringView ident); + typedef struct temporal_rs_TimeZone_identifier_result {union { temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_TimeZone_identifier_result; + temporal_rs_TimeZone_identifier_result temporal_rs_TimeZone_identifier(const temporal_rs::capi::TimeZone* self, diplomat::capi::DiplomatWrite* write); + + temporal_rs::capi::TimeZone* temporal_rs_TimeZone_clone(const temporal_rs::capi::TimeZone* self); + bool temporal_rs_TimeZone_is_valid(const temporal_rs::capi::TimeZone* self); void temporal_rs_TimeZone_destroy(TimeZone* self); @@ -43,6 +48,26 @@ return result.is_ok ? diplomat::result<std::unique_ptr<temporal_rs::TimeZone>, temporal_rs::TemporalError>(diplomat::Ok<std::unique_ptr<temporal_rs::TimeZone>>(std::unique_ptr<temporal_rs::TimeZone>(temporal_rs::TimeZone::FromFFI(result.ok)))) : diplomat::result<std::unique_ptr<temporal_rs::TimeZone>, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +inline diplomat::result<std::string, temporal_rs::TemporalError> temporal_rs::TimeZone::identifier() const { + std::string output; + diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); + auto result = temporal_rs::capi::temporal_rs_TimeZone_identifier(this->AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Ok<std::string>(std::move(output))) : diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} +template<typename W> +inline diplomat::result<std::monostate, temporal_rs::TemporalError> temporal_rs::TimeZone::identifier_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + auto result = temporal_rs::capi::temporal_rs_TimeZone_identifier(this->AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Ok<std::monostate>()) : diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} + +inline std::unique_ptr<temporal_rs::TimeZone> temporal_rs::TimeZone::clone() const { + auto result = temporal_rs::capi::temporal_rs_TimeZone_clone(this->AsFFI()); + return std::unique_ptr<temporal_rs::TimeZone>(temporal_rs::TimeZone::FromFFI(result)); +} + inline bool temporal_rs::TimeZone::is_valid() const { auto result = temporal_rs::capi::temporal_rs_TimeZone_is_valid(this->AsFFI()); return result;
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ToStringRoundingOptions.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ToStringRoundingOptions.d.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ToStringRoundingOptions.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ToStringRoundingOptions.d.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ToStringRoundingOptions.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ToStringRoundingOptions.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ToStringRoundingOptions.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ToStringRoundingOptions.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TransitionDirection.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TransitionDirection.d.hpp similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TransitionDirection.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TransitionDirection.d.hpp index 3a474ebd..a8e9b1e 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TransitionDirection.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TransitionDirection.d.hpp
@@ -31,7 +31,8 @@ Previous = 1, }; - TransitionDirection() = default; + TransitionDirection(): value(Value::Next) {} + // Implicit conversions between enum and ::Value constexpr TransitionDirection(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TransitionDirection.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TransitionDirection.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/TransitionDirection.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/TransitionDirection.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Unit.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Unit.d.hpp similarity index 97% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Unit.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Unit.d.hpp index 7c432d9..02e0249 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Unit.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Unit.d.hpp
@@ -49,7 +49,8 @@ Year = 10, }; - Unit() = default; + Unit(): value(Value::Auto) {} + // Implicit conversions between enum and ::Value constexpr Unit(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Unit.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Unit.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/Unit.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/Unit.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/UnsignedRoundingMode.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/UnsignedRoundingMode.d.hpp similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/UnsignedRoundingMode.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/UnsignedRoundingMode.d.hpp index 653b322..aeb2960 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/UnsignedRoundingMode.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/UnsignedRoundingMode.d.hpp
@@ -37,7 +37,8 @@ HalfEven = 4, }; - UnsignedRoundingMode() = default; + UnsignedRoundingMode(): value(Value::Infinity) {} + // Implicit conversions between enum and ::Value constexpr UnsignedRoundingMode(Value v) : value(v) {} constexpr operator Value() const { return value; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/UnsignedRoundingMode.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/UnsignedRoundingMode.hpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/UnsignedRoundingMode.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/UnsignedRoundingMode.hpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ZonedDateTime.d.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ZonedDateTime.d.hpp similarity index 87% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ZonedDateTime.d.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ZonedDateTime.d.hpp index fa2e3767..7f76945 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ZonedDateTime.d.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ZonedDateTime.d.hpp
@@ -65,8 +65,12 @@ inline int64_t epoch_milliseconds() const; + inline static diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> from_epoch_milliseconds(int64_t ms, const temporal_rs::TimeZone& tz); + inline temporal_rs::I128Nanoseconds epoch_nanoseconds() const; + inline diplomat::result<int64_t, temporal_rs::TemporalError> offset_nanoseconds() const; + inline std::unique_ptr<temporal_rs::Instant> to_instant() const; inline diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> with(temporal_rs::PartialZonedDateTime partial, std::optional<temporal_rs::Disambiguation> disambiguation, std::optional<temporal_rs::OffsetDisambiguation> offset_option, std::optional<temporal_rs::ArithmeticOverflow> overflow) const; @@ -77,6 +81,12 @@ inline int8_t compare_instant(const temporal_rs::ZonedDateTime& other) const; + inline bool equals(const temporal_rs::ZonedDateTime& other) const; + + inline diplomat::result<std::string, temporal_rs::TemporalError> offset() const; + template<typename W> + inline diplomat::result<std::monostate, temporal_rs::TemporalError> offset_write(W& writeable_output) const; + inline diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> start_of_day() const; inline diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> get_time_zone_transition(temporal_rs::TransitionDirection direction) const; @@ -90,6 +100,8 @@ inline diplomat::result<std::unique_ptr<temporal_rs::PlainTime>, temporal_rs::TemporalError> to_plain_time() const; inline diplomat::result<std::string, temporal_rs::TemporalError> to_ixdtf_string(temporal_rs::DisplayOffset display_offset, temporal_rs::DisplayTimeZone display_timezone, temporal_rs::DisplayCalendar display_calendar, temporal_rs::ToStringRoundingOptions options) const; + template<typename W> + inline diplomat::result<std::monostate, temporal_rs::TemporalError> to_ixdtf_string_write(temporal_rs::DisplayOffset display_offset, temporal_rs::DisplayTimeZone display_timezone, temporal_rs::DisplayCalendar display_calendar, temporal_rs::ToStringRoundingOptions options, W& writeable_output) const; inline diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> with_calendar(temporal_rs::AnyCalendarKind calendar) const; @@ -124,6 +136,8 @@ inline uint8_t month() const; inline std::string month_code() const; + template<typename W> + inline void month_code_write(W& writeable_output) const; inline uint8_t day() const; @@ -146,6 +160,8 @@ inline bool in_leap_year() const; inline std::string era() const; + template<typename W> + inline void era_write(W& writeable_output) const; inline std::optional<int32_t> era_year() const;
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ZonedDateTime.hpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ZonedDateTime.hpp similarity index 87% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ZonedDateTime.hpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ZonedDateTime.hpp index ce666c94..10b57495 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp/temporal_rs/ZonedDateTime.hpp +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp/temporal_rs/ZonedDateTime.hpp
@@ -53,8 +53,14 @@ int64_t temporal_rs_ZonedDateTime_epoch_milliseconds(const temporal_rs::capi::ZonedDateTime* self); + typedef struct temporal_rs_ZonedDateTime_from_epoch_milliseconds_result {union {temporal_rs::capi::ZonedDateTime* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_from_epoch_milliseconds_result; + temporal_rs_ZonedDateTime_from_epoch_milliseconds_result temporal_rs_ZonedDateTime_from_epoch_milliseconds(int64_t ms, const temporal_rs::capi::TimeZone* tz); + temporal_rs::capi::I128Nanoseconds temporal_rs_ZonedDateTime_epoch_nanoseconds(const temporal_rs::capi::ZonedDateTime* self); + typedef struct temporal_rs_ZonedDateTime_offset_nanoseconds_result {union {int64_t ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_offset_nanoseconds_result; + temporal_rs_ZonedDateTime_offset_nanoseconds_result temporal_rs_ZonedDateTime_offset_nanoseconds(const temporal_rs::capi::ZonedDateTime* self); + temporal_rs::capi::Instant* temporal_rs_ZonedDateTime_to_instant(const temporal_rs::capi::ZonedDateTime* self); typedef struct temporal_rs_ZonedDateTime_with_result {union {temporal_rs::capi::ZonedDateTime* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_with_result; @@ -67,6 +73,11 @@ int8_t temporal_rs_ZonedDateTime_compare_instant(const temporal_rs::capi::ZonedDateTime* self, const temporal_rs::capi::ZonedDateTime* other); + bool temporal_rs_ZonedDateTime_equals(const temporal_rs::capi::ZonedDateTime* self, const temporal_rs::capi::ZonedDateTime* other); + + typedef struct temporal_rs_ZonedDateTime_offset_result {union { temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_offset_result; + temporal_rs_ZonedDateTime_offset_result temporal_rs_ZonedDateTime_offset(const temporal_rs::capi::ZonedDateTime* self, diplomat::capi::DiplomatWrite* write); + typedef struct temporal_rs_ZonedDateTime_start_of_day_result {union {temporal_rs::capi::ZonedDateTime* ok; temporal_rs::capi::TemporalError err;}; bool is_ok;} temporal_rs_ZonedDateTime_start_of_day_result; temporal_rs_ZonedDateTime_start_of_day_result temporal_rs_ZonedDateTime_start_of_day(const temporal_rs::capi::ZonedDateTime* self); @@ -198,11 +209,22 @@ return result; } +inline diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> temporal_rs::ZonedDateTime::from_epoch_milliseconds(int64_t ms, const temporal_rs::TimeZone& tz) { + auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_from_epoch_milliseconds(ms, + tz.AsFFI()); + return result.is_ok ? diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError>(diplomat::Ok<std::unique_ptr<temporal_rs::ZonedDateTime>>(std::unique_ptr<temporal_rs::ZonedDateTime>(temporal_rs::ZonedDateTime::FromFFI(result.ok)))) : diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} + inline temporal_rs::I128Nanoseconds temporal_rs::ZonedDateTime::epoch_nanoseconds() const { auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_epoch_nanoseconds(this->AsFFI()); return temporal_rs::I128Nanoseconds::FromFFI(result); } +inline diplomat::result<int64_t, temporal_rs::TemporalError> temporal_rs::ZonedDateTime::offset_nanoseconds() const { + auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_offset_nanoseconds(this->AsFFI()); + return result.is_ok ? diplomat::result<int64_t, temporal_rs::TemporalError>(diplomat::Ok<int64_t>(result.ok)) : diplomat::result<int64_t, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} + inline std::unique_ptr<temporal_rs::Instant> temporal_rs::ZonedDateTime::to_instant() const { auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_to_instant(this->AsFFI()); return std::unique_ptr<temporal_rs::Instant>(temporal_rs::Instant::FromFFI(result)); @@ -234,6 +256,27 @@ return result; } +inline bool temporal_rs::ZonedDateTime::equals(const temporal_rs::ZonedDateTime& other) const { + auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_equals(this->AsFFI(), + other.AsFFI()); + return result; +} + +inline diplomat::result<std::string, temporal_rs::TemporalError> temporal_rs::ZonedDateTime::offset() const { + std::string output; + diplomat::capi::DiplomatWrite write = diplomat::WriteFromString(output); + auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_offset(this->AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Ok<std::string>(std::move(output))) : diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} +template<typename W> +inline diplomat::result<std::monostate, temporal_rs::TemporalError> temporal_rs::ZonedDateTime::offset_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_offset(this->AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Ok<std::monostate>()) : diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} + inline diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> temporal_rs::ZonedDateTime::start_of_day() const { auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_start_of_day(this->AsFFI()); return result.is_ok ? diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError>(diplomat::Ok<std::unique_ptr<temporal_rs::ZonedDateTime>>(std::unique_ptr<temporal_rs::ZonedDateTime>(temporal_rs::ZonedDateTime::FromFFI(result.ok)))) : diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); @@ -276,6 +319,17 @@ &write); return result.is_ok ? diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Ok<std::string>(std::move(output))) : diplomat::result<std::string, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); } +template<typename W> +inline diplomat::result<std::monostate, temporal_rs::TemporalError> temporal_rs::ZonedDateTime::to_ixdtf_string_write(temporal_rs::DisplayOffset display_offset, temporal_rs::DisplayTimeZone display_timezone, temporal_rs::DisplayCalendar display_calendar, temporal_rs::ToStringRoundingOptions options, W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_to_ixdtf_string(this->AsFFI(), + display_offset.AsFFI(), + display_timezone.AsFFI(), + display_calendar.AsFFI(), + options.AsFFI(), + &write); + return result.is_ok ? diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Ok<std::monostate>()) : diplomat::result<std::monostate, temporal_rs::TemporalError>(diplomat::Err<temporal_rs::TemporalError>(temporal_rs::TemporalError::FromFFI(result.err))); +} inline diplomat::result<std::unique_ptr<temporal_rs::ZonedDateTime>, temporal_rs::TemporalError> temporal_rs::ZonedDateTime::with_calendar(temporal_rs::AnyCalendarKind calendar) const { auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_with_calendar(this->AsFFI(), @@ -375,6 +429,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::ZonedDateTime::month_code_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_ZonedDateTime_month_code(this->AsFFI(), + &write); +} inline uint8_t temporal_rs::ZonedDateTime::day() const { auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_day(this->AsFFI()); @@ -433,6 +493,12 @@ &write); return output; } +template<typename W> +inline void temporal_rs::ZonedDateTime::era_write(W& writeable) const { + diplomat::capi::DiplomatWrite write = diplomat::WriteTrait<W>::Construct(writeable); + temporal_rs::capi::temporal_rs_ZonedDateTime_era(this->AsFFI(), + &write); +} inline std::optional<int32_t> temporal_rs::ZonedDateTime::era_year() const { auto result = temporal_rs::capi::temporal_rs_ZonedDateTime_era_year(this->AsFFI());
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/calendar.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/calendar.rs similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/calendar.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/calendar.rs index ed7f748..bbe5886 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/calendar.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/calendar.rs
@@ -99,8 +99,12 @@ partial: PartialDate, overflow: ArithmeticOverflow, ) -> Result<Box<PlainYearMonth>, TemporalError> { + let partial: temporal_rs::partial::PartialDate = partial.try_into()?; self.0 - .year_month_from_partial(&partial.try_into()?, overflow.into()) + .year_month_from_partial( + &temporal_rs::partial::PartialYearMonth::from(&partial), + overflow.into(), + ) .map(|c| Box::new(PlainYearMonth(c))) .map_err(Into::into) }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/duration.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/duration.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/duration.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/duration.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/error.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/error.rs similarity index 65% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/error.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/error.rs index f385d45..8e58bfb 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/error.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/error.rs
@@ -1,7 +1,11 @@ +use alloc::borrow::Cow; + #[diplomat::bridge] #[diplomat::abi_rename = "temporal_rs_{0}"] #[diplomat::attr(auto, namespace = "temporal_rs")] pub mod ffi { + use diplomat_runtime::{DiplomatOption, DiplomatUtf8StrSlice}; + #[diplomat::enum_convert(temporal_rs::error::ErrorKind)] pub enum ErrorKind { Generic, @@ -14,6 +18,7 @@ // In the future we might turn this into an opaque type with a msg() field pub struct TemporalError { pub kind: ErrorKind, + pub msg: DiplomatOption<DiplomatUtf8StrSlice<'static>>, } impl TemporalError { @@ -21,12 +26,14 @@ pub(crate) fn syntax() -> Self { TemporalError { kind: ErrorKind::Syntax, + msg: None.into(), } } pub(crate) fn range() -> Self { TemporalError { kind: ErrorKind::Range, + msg: None.into(), } } } @@ -34,8 +41,16 @@ impl From<temporal_rs::TemporalError> for ffi::TemporalError { fn from(other: temporal_rs::TemporalError) -> Self { + let kind = other.kind().into(); + let msg = other.into_message(); + let msg = if let Cow::Borrowed(s) = msg { + Some(s) + } else { + None + }; Self { - kind: other.kind().into(), + kind, + msg: msg.map(Into::into).into(), } } }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/instant.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/instant.rs similarity index 77% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/instant.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/instant.rs index 01fbfe6..4054bc0 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/instant.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/instant.rs
@@ -20,16 +20,25 @@ #[diplomat::opaque] pub struct Instant(pub temporal_rs::Instant); - /// For portability, we use two i64s instead of an i128. - /// The sign is extracted first before - /// appending the high/low segments to each other. + /// For portability, we use two u64s instead of an i128. + /// The high bit of the u64 is the sign. + /// This cannot represent i128::MIN, and has a -0, but those are largely + /// irrelevant for this purpose. /// /// This could potentially instead be a bit-by-bit split, or something else + #[derive(Debug, Copy, Clone)] pub struct I128Nanoseconds { - pub high: i64, + pub high: u64, pub low: u64, } + impl I128Nanoseconds { + pub fn is_valid(self) -> bool { + let ns = i128::from(self); + temporal_rs::unix_time::EpochNanoseconds::try_from(ns).is_ok() + } + } + impl Instant { pub fn try_new(ns: I128Nanoseconds) -> Result<Box<Self>, TemporalError> { temporal_rs::Instant::try_new(ns.into()) @@ -158,12 +167,15 @@ } } +const U64_HIGH_BIT_MASK: u64 = 1 << 63; + impl From<ffi::I128Nanoseconds> for i128 { fn from(ns: ffi::I128Nanoseconds) -> Self { - let is_neg = ns.high < 0; - let ns_high_abs = ns.high.unsigned_abs() as u128; + let is_neg = (ns.high & U64_HIGH_BIT_MASK) != 0; + // Remove the bitflag + let ns_high = (ns.high & !U64_HIGH_BIT_MASK) as u128; // Stick them together - let total = ((ns_high_abs << 64) + ns.low as u128) as i128; + let total = ((ns_high << 64) + ns.low as u128) as i128; // Reintroduce the sign if is_neg { -total @@ -175,13 +187,47 @@ impl From<i128> for ffi::I128Nanoseconds { fn from(ns: i128) -> Self { + debug_assert!( + ns != i128::MIN, + "temporal_rs should never produce i128::MIN, it is out of valid range" + ); let is_neg = ns < 0; let ns = ns.unsigned_abs(); - let high = (ns >> 64) as i64; + let high = (ns >> 64) as u64; let low = (ns & u64::MAX as u128) as u64; - let high = if is_neg { -high } else { high }; + let high = if (is_neg) { + high | U64_HIGH_BIT_MASK + } else { + high + }; ffi::I128Nanoseconds { high, low } } } + +#[test] +fn test_i128_roundtrip() { + #[track_caller] + fn roundtrip(x: i128) { + let ns = ffi::I128Nanoseconds::from(x); + let round = i128::from(ns); + assert_eq!(x, round, "{x} does not roundtrip via {ns:?}"); + } + + roundtrip(0); + roundtrip(-1); + roundtrip(1); + roundtrip(100); + roundtrip(1000); + roundtrip(-1000); + roundtrip(1000000000); + roundtrip(-100000000); + roundtrip(u64::MAX as i128); + roundtrip(-(u64::MIN as i128)); + roundtrip(100 * (u64::MAX as i128)); + roundtrip(-100 * (u64::MAX as i128)); + roundtrip(i128::MIN + 1); + roundtrip(i128::MAX); + roundtrip(i128::MAX - 10); +}
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/iso.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/iso.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/iso.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/iso.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/lib.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/lib.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/lib.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/lib.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/options.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/options.rs similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/options.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/options.rs index 07e59c4..6c4d29e 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/options.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/options.rs
@@ -9,11 +9,13 @@ #[diplomat::enum_convert(options::ArithmeticOverflow)] pub enum ArithmeticOverflow { + #[diplomat::attr(auto, default)] Constrain, Reject, } #[diplomat::enum_convert(options::Disambiguation)] pub enum Disambiguation { + #[diplomat::attr(auto, default)] Compatible, Earlier, Later, @@ -22,6 +24,7 @@ #[diplomat::enum_convert(options::DisplayCalendar)] pub enum DisplayCalendar { + #[diplomat::attr(auto, default)] Auto, Always, Never, @@ -30,12 +33,14 @@ #[diplomat::enum_convert(options::DisplayOffset)] pub enum DisplayOffset { + #[diplomat::attr(auto, default)] Auto, Never, } #[diplomat::enum_convert(options::DisplayTimeZone)] pub enum DisplayTimeZone { + #[diplomat::attr(auto, default)] Auto, Never, Critical, @@ -70,6 +75,7 @@ #[diplomat::enum_convert(options::Unit)] pub enum Unit { + #[diplomat::attr(auto, default)] Auto = 0, Nanosecond = 1, Microsecond = 2,
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_date.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_date.rs similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_date.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_date.rs index d873fdb..aa8b0b2 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_date.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_date.rs
@@ -99,6 +99,16 @@ .map_err(Into::into) } + #[cfg(feature = "compiled_data")] + pub fn from_epoch_milliseconds( + ms: i64, + tz: &crate::time_zone::ffi::TimeZone, + ) -> Result<Box<Self>, TemporalError> { + let zdt = crate::zoned_date_time::zdt_from_epoch_ms(ms, &tz.0)?; + zdt.to_plain_date() + .map(|x| Box::new(Self(x))) + .map_err(Into::into) + } pub fn with( &self, partial: PartialDate,
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_date_time.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_date_time.rs similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_date_time.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_date_time.rs index 87f836b..3f881f7 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_date_time.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_date_time.rs
@@ -101,6 +101,17 @@ .map(|x| Box::new(PlainDateTime(x))) .map_err(Into::into) } + + #[cfg(feature = "compiled_data")] + pub fn from_epoch_milliseconds( + ms: i64, + tz: &crate::time_zone::ffi::TimeZone, + ) -> Result<Box<Self>, TemporalError> { + let zdt = crate::zoned_date_time::zdt_from_epoch_ms(ms, &tz.0)?; + zdt.to_plain_datetime() + .map(|x| Box::new(Self(x))) + .map_err(Into::into) + } pub fn with( &self, partial: PartialDateTime,
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_month_day.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_month_day.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_month_day.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_month_day.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_time.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_time.rs similarity index 94% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_time.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_time.rs index e55d03dfb..3fa5ad8 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_time.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_time.rs
@@ -68,6 +68,18 @@ .map(|x| Box::new(PlainTime(x))) .map_err(Into::into) } + + #[cfg(feature = "compiled_data")] + pub fn from_epoch_milliseconds( + ms: i64, + tz: &crate::time_zone::ffi::TimeZone, + ) -> Result<Box<Self>, TemporalError> { + let zdt = crate::zoned_date_time::zdt_from_epoch_ms(ms, &tz.0)?; + zdt.to_plain_time() + .map(|x| Box::new(Self(x))) + .map_err(Into::into) + } + pub fn with( &self, partial: PartialTime,
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_year_month.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_year_month.rs similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_year_month.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_year_month.rs index f3cc1e0f..92b2de5 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_year_month.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_year_month.rs
@@ -44,8 +44,12 @@ partial: PartialDate, overflow: Option<ArithmeticOverflow>, ) -> Result<Box<Self>, TemporalError> { + let partial: temporal_rs::partial::PartialDate = partial.try_into()?; self.0 - .with(partial.try_into()?, overflow.map(Into::into)) + .with( + temporal_rs::partial::PartialYearMonth::from(&partial), + overflow.map(Into::into), + ) .map(|x| Box::new(Self(x))) .map_err(Into::into) }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/time_zone.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/time_zone.rs similarity index 67% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/time_zone.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/time_zone.rs index 5c5972d9..1f0f5bf 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/time_zone.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/time_zone.rs
@@ -4,7 +4,9 @@ pub mod ffi { use crate::error::ffi::TemporalError; use alloc::boxed::Box; + use core::fmt::Write; use core::str; + use diplomat_runtime::DiplomatWrite; #[diplomat::opaque] #[diplomat::transparent_convert] @@ -28,6 +30,22 @@ .map_err(Into::into) } + pub fn identifier(&self, write: &mut DiplomatWrite) -> Result<(), TemporalError> { + // TODO ideally this would use Writeable instead of allocating + let s = self.0.identifier()?; + + // This can only fail in cases where the DiplomatWriteable is capped, we + // don't care about that. + let _ = write.write_str(&s); + + Ok(()) + } + + #[allow(clippy::should_implement_trait)] + pub fn clone(&self) -> Box<TimeZone> { + Box::new(TimeZone(self.0.clone())) + } + #[cfg(feature = "compiled_data")] pub fn is_valid(&self) -> bool { self.0.is_valid()
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/zoned_date_time.rs b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/zoned_date_time.rs similarity index 93% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/zoned_date_time.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/zoned_date_time.rs index 5c43cc6..21ff3d8c54 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/zoned_date_time.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/zoned_date_time.rs
@@ -151,10 +151,18 @@ self.0.epoch_milliseconds() } + pub fn from_epoch_milliseconds(ms: i64, tz: &TimeZone) -> Result<Box<Self>, TemporalError> { + super::zdt_from_epoch_ms(ms, &tz.0).map(|c| Box::new(Self(c))) + } + pub fn epoch_nanoseconds(&self) -> I128Nanoseconds { self.0.epoch_nanoseconds().as_i128().into() } + pub fn offset_nanoseconds(&self) -> Result<i64, TemporalError> { + self.0.offset_nanoseconds().map_err(Into::into) + } + pub fn to_instant(&self) -> Box<Instant> { Box::new(Instant(self.0.to_instant())) } @@ -192,6 +200,17 @@ self.0.compare_instant(&other.0) } + pub fn equals(&self, other: &Self) -> bool { + self.0 == other.0 + } + + pub fn offset(&self, write: &mut DiplomatWrite) -> Result<(), TemporalError> { + let string = self.0.offset()?; + // throw away the error, this should always succeed + let _ = write.write_str(&string); + Ok(()) + } + pub fn start_of_day(&self) -> Result<Box<ZonedDateTime>, TemporalError> { self.0 .start_of_day() @@ -427,6 +446,15 @@ } #[cfg(feature = "compiled_data")] +pub(crate) fn zdt_from_epoch_ms( + ms: i64, + time_zone: &temporal_rs::TimeZone, +) -> Result<temporal_rs::ZonedDateTime, TemporalError> { + let instant = temporal_rs::Instant::from_epoch_milliseconds(ms)?; + Ok(instant.to_zoned_date_time_iso(time_zone.clone())) +} + +#[cfg(feature = "compiled_data")] impl TryFrom<ffi::PartialZonedDateTime<'_>> for temporal_rs::partial::PartialZonedDateTime { type Error = TemporalError; fn try_from(other: ffi::PartialZonedDateTime<'_>) -> Result<Self, TemporalError> {
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/tests/c/Makefile b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/tests/c/Makefile similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/tests/c/Makefile rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/tests/c/Makefile
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/tests/c/simple.c b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/tests/c/simple.c similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/tests/c/simple.c rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/tests/c/simple.c
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/tests/cpp/Makefile b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/tests/cpp/Makefile similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/tests/cpp/Makefile rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/tests/cpp/Makefile
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/tests/cpp/simple.cpp b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/tests/cpp/simple.cpp similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/tests/cpp/simple.cpp rename to third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/tests/cpp/simple.cpp
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/.cargo_vcs_info.json deleted file mode 100644 index e390a68..0000000 --- a/third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/.cargo_vcs_info.json +++ /dev/null
@@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "44632b0d855dd8136371d40ff99fd7566bc1f0aa" - }, - "path_in_vcs": "temporal_capi" -} \ No newline at end of file
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/.cargo-checksum.json b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/.cargo-checksum.json similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/.cargo-checksum.json rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/.cargo-checksum.json
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/.cargo_vcs_info.json new file mode 100644 index 0000000..7514e575 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/.cargo_vcs_info.json
@@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "b05955e76f983e042380511f45cb4464a33edb38" + }, + "path_in_vcs": "" +} \ No newline at end of file
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/CHANGELOG.md b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/CHANGELOG.md similarity index 91% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/CHANGELOG.md rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/CHANGELOG.md index 902b93ec..4373715 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/CHANGELOG.md +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/CHANGELOG.md
@@ -1,3 +1,29 @@ +## What's Changed in v0.0.10 +* Add documentation and doctests for builtins by @blarfoon in [#360](https://github.com/boa-dev/temporal/pull/360) +* More error enums by @Manishearth in [#373](https://github.com/boa-dev/temporal/pull/373) +* [capi] Add stringifier/cloning to timezones by @Manishearth in [#344](https://github.com/boa-dev/temporal/pull/344) +* Handle unknown timezone identifiers in FsTzdbProvider by @Manishearth in [#345](https://github.com/boa-dev/temporal/pull/345) +* [capi] Fix i128Nanoseconds by @Manishearth in [#372](https://github.com/boa-dev/temporal/pull/372) +* [capi] expose error strings by @Manishearth in [#364](https://github.com/boa-dev/temporal/pull/364) +* Consolidate tools into a single `tool` directory by @nekevss in [#368](https://github.com/boa-dev/temporal/pull/368) +* Add a new PartialYearMonth to available partial structs (#288) by @robot-head in [#342](https://github.com/boa-dev/temporal/pull/342) +* Implement zoneinfo parsing/compilation and add TZif structs by @nekevss in [#257](https://github.com/boa-dev/temporal/pull/257) +* Add ErrorMessage enum, start using it by @Manishearth in [#355](https://github.com/boa-dev/temporal/pull/355) +* [capi] Add is_valid() to I128Nanoseconds by @Manishearth in [#363](https://github.com/boa-dev/temporal/pull/363) +* [capi] Add ZonedDateTime::{equals,offset} by @Manishearth in [#362](https://github.com/boa-dev/temporal/pull/362) +* Add convenience methods for constructing FFI datetime types from milliseconds by @Manishearth in [#359](https://github.com/boa-dev/temporal/pull/359) +* [capi] Add offset_nanoseconds() to ZDT FFI by @Manishearth in [#361](https://github.com/boa-dev/temporal/pull/361) +* Update diplomat by @Manishearth in [#357](https://github.com/boa-dev/temporal/pull/357) +* Stop depending on `is_dst` for calculations by @jedel1043 in [#356](https://github.com/boa-dev/temporal/pull/356) +* Add some FAQ style docs for temporal_rs by @nekevss in [#350](https://github.com/boa-dev/temporal/pull/350) +* Add try_from_offset_str ctor for TimeZone by @Manishearth in [#348](https://github.com/boa-dev/temporal/pull/348) +* Switch compiled_data APIs to new CompiledTzdbProvider by @Manishearth in [#346](https://github.com/boa-dev/temporal/pull/346) + +## New Contributors +* @blarfoon made their first contribution in [#360](https://github.com/boa-dev/temporal/pull/360) + +**Full Changelog**: https://github.com/boa-dev/temporal/compare/v0.0.9...v0.0.10 + ## What's Changed in v0.0.9 * Cross boundary rounding fix #286 by @robot-head in [#343](https://github.com/boa-dev/temporal/pull/343) * Implement PlainMonthDay::with functionality by @nekevss in [#335](https://github.com/boa-dev/temporal/pull/335)
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/Cargo.lock b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/Cargo.lock similarity index 97% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/Cargo.lock rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/Cargo.lock index 17ed57e..50e2a1b 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/Cargo.lock +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/Cargo.lock
@@ -340,9 +340,9 @@ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -362,7 +362,7 @@ [[package]] name = "temporal_rs" -version = "0.0.9" +version = "0.0.10" dependencies = [ "combine", "core_maths", @@ -382,9 +382,9 @@ [[package]] name = "timezone_provider" -version = "0.0.9" +version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332757a387cb7e6ce264143e9a103af85c96b3d0fc2fc2126579b52a3d7d95d2" +checksum = "8b0b238b60524fc66d3d334e7fb6e89a881a6d4964f5462190bcfa1b61f3e7fa" dependencies = [ "zerotrie", "zerovec", @@ -402,9 +402,9 @@ [[package]] name = "tzif" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cecffbab91858408738280e7bb6aac788f59a522dda961cd6b15542f0c08559" +checksum = "e5e762ac355f0c204d09ae644b3d59423d5ddfc5603997d60c8c56f24e429a9d" dependencies = [ "combine", ]
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/Cargo.toml b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/Cargo.toml similarity index 98% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/Cargo.toml rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/Cargo.toml index 438ab43..5c89c16 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/Cargo.toml +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/Cargo.toml
@@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.82.0" name = "temporal_rs" -version = "0.0.9" +version = "0.0.10" authors = ["boa-dev"] build = false exclude = [ @@ -117,7 +117,7 @@ version = "0.8.1" [dependencies.tzif] -version = "0.3.0" +version = "0.4.0" optional = true [dependencies.web-time]
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/Cargo.toml.orig b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/Cargo.toml.orig similarity index 81% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/Cargo.toml.orig rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/Cargo.toml.orig index 143a27b..d56ee5e 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/Cargo.toml.orig +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/Cargo.toml.orig
@@ -1,10 +1,17 @@ [workspace] resolver = "2" -members = ["diplomat-gen", "bakeddata", "provider", "temporal_capi", "depcheck"] +members = [ + "provider", + "temporal_capi", + "zoneinfo", + + # Tools + "tools/*", +] [workspace.package] edition = "2021" -version = "0.0.9" +version = "0.0.10" rust-version = "1.82.0" authors = ["boa-dev"] license = "MIT OR Apache-2.0" @@ -23,6 +30,7 @@ # Self temporal_rs = { version = "~0.0.9", path = ".", default-features = false } timezone_provider = { version = "~0.0.9", path = "./provider" } +zoneinfo_rs = { version = "~0.0.9", path = "./zoneinfo" } # Dependencies tinystr = "0.8.1" @@ -33,7 +41,7 @@ ixdtf = "0.5.0" iana-time-zone = "0.1.63" log = "0.4.27" -tzif = "0.3.0" +tzif = "0.4.0" jiff-tzdb = "0.1.4" combine = "4.6.7" web-time = "1.1.0" @@ -57,7 +65,7 @@ core_maths = "0.1.1" icu_calendar = { workspace = true, features = ["compiled_data"] } icu_locale.workspace = true -ixdtf = { workspace = true, features = ["duration"]} +ixdtf = { workspace = true, features = ["duration"] } num-traits.workspace = true tinystr.workspace = true writeable = "0.6.1" @@ -69,10 +77,10 @@ tzif = { workspace = true, optional = true } jiff-tzdb = { workspace = true, optional = true } combine = { workspace = true, optional = true } -timezone_provider = { workspace = true, optional = true} +timezone_provider = { workspace = true, optional = true } # System time feature -web-time = { workspace = true, optional = true } +web-time = { workspace = true, optional = true } iana-time-zone = { workspace = true, optional = true } [features] @@ -80,7 +88,13 @@ log = ["dep:log"] compiled_data = ["tzdb"] sys = ["std", "dep:web-time", "dep:iana-time-zone"] -tzdb = ["dep:tzif", "std", "dep:jiff-tzdb", "dep:combine", "dep:timezone_provider"] +tzdb = [ + "dep:tzif", + "std", + "dep:jiff-tzdb", + "dep:combine", + "dep:timezone_provider", +] std = [] [package.metadata.cargo-all-features]
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/LICENSE-Apache b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/LICENSE-Apache similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/LICENSE-Apache rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/LICENSE-Apache
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/LICENSE-MIT b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/LICENSE-MIT similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/LICENSE-MIT rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/LICENSE-MIT
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/README.md b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/README.md similarity index 94% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/README.md rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/README.md index 212ad31..4b76b66 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/README.md +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/README.md
@@ -8,6 +8,9 @@ crate has been externalized as we intended to make an engine agnostic and general usage implementation of Temporal and its algorithms. +For more information on `temporal_rs`'s general position in the Rust +date/time library ecoystem, see our [FAQ](./docs/FAQ.md). + ## Example usage Below are a few examples to give an overview of `temporal_rs`'s current @@ -49,7 +52,8 @@ ### Create a `ZonedDateTime` for a RFC9557 IXDTF string. -**Important Note:** The below API is enabled with the `compiled_data` feature flag. +**Important Note:** The below API is enabled with the `compiled_data` +feature flag. ```rust use temporal_rs::{ZonedDateTime, TimeZone}; @@ -101,8 +105,8 @@ <!-- TODO: Potentially update with tests if a runner can be implemented --> -The `temporal_rs`'s current conformance results can be viewed on -Boa's [test262 conformance page](https://boajs.dev/conformance). +The `temporal_rs`'s current conformance results can be viewed on Boa's +[test262 conformance page](https://boajs.dev/conformance). ## FFI
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/date.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/date.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/date.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/date.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/duration.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/duration.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/duration.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/duration.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/duration/tests.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/duration/tests.rs similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/duration/tests.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/duration/tests.rs index 6d1f8ae..9dec067d 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/duration/tests.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/duration/tests.rs
@@ -1,5 +1,3 @@ -use std::string::ToString; - use crate::{ options::{ OffsetDisambiguation, RelativeTo, RoundingIncrement, RoundingMode, RoundingOptions, Unit, @@ -509,55 +507,6 @@ } #[test] -fn test_duration_compare() { - // TODO(#199): fix this on Windows - if cfg!(not(windows)) { - let one = Duration::from_partial_duration(PartialDuration { - hours: Some(79), - minutes: Some(10), - ..Default::default() - }) - .unwrap(); - let two = Duration::from_partial_duration(PartialDuration { - days: Some(3), - hours: Some(7), - seconds: Some(630), - ..Default::default() - }) - .unwrap(); - let three = Duration::from_partial_duration(PartialDuration { - days: Some(3), - hours: Some(6), - minutes: Some(50), - ..Default::default() - }) - .unwrap(); - - let mut arr = [&one, &two, &three]; - arr.sort_by(|a, b| Duration::compare(a, b, None).unwrap()); - assert_eq!( - arr.map(ToString::to_string), - [&three, &one, &two].map(ToString::to_string) - ); - - // Sorting relative to a date, taking DST changes into account: - let zdt = ZonedDateTime::from_str( - "2020-11-01T00:00-07:00[America/Los_Angeles]", - Default::default(), - OffsetDisambiguation::Reject, - ) - .unwrap(); - arr.sort_by(|a, b| { - Duration::compare(a, b, Some(RelativeTo::ZonedDateTime(zdt.clone()))).unwrap() - }); - assert_eq!( - arr.map(ToString::to_string), - [&one, &three, &two].map(ToString::to_string) - ) - } -} - -#[test] fn test_duration_total() { let d1 = Duration::from_partial_duration(PartialDuration { hours: Some(130),
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/instant.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/instant.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/instant.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/instant.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/mod.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/mod.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/mod.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/mod.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/now.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/now.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/now.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/now.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/plain_date_time.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/plain_date_time.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/plain_date_time.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/plain_date_time.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/zoneddatetime.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/zoneddatetime.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/zoneddatetime.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/zoneddatetime.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar.rs similarity index 98% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar.rs index a472a6e2..4a3d473 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar.rs
@@ -32,7 +32,7 @@ use icu_locale::extensions::unicode::Value; use tinystr::{tinystr, TinyAsciiStr}; -use super::{PartialDate, ZonedDateTime}; +use super::{PartialDate, PartialYearMonth, ZonedDateTime}; mod era; mod types; @@ -249,11 +249,15 @@ /// `CalendarPlainYearMonthFromFields` pub fn year_month_from_partial( &self, - partial: &PartialDate, + partial: &PartialYearMonth, overflow: ArithmeticOverflow, ) -> TemporalResult<PlainYearMonth> { - let resolved_fields = - ResolvedCalendarFields::try_from_partial(partial, overflow, ResolutionType::YearMonth)?; + // TODO: add a from_partial_year_month method on ResolvedCalendarFields + let resolved_fields = ResolvedCalendarFields::try_from_partial( + &PartialDate::from(partial), + overflow, + ResolutionType::YearMonth, + )?; if self.is_iso() { return PlainYearMonth::new_with_overflow( resolved_fields.era_year.year,
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar/era.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar/era.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar/era.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar/era.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar/types.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar/types.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar/types.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar/types.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/date.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/date.rs similarity index 93% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/date.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/date.rs index 39d667b2..64e1daa 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/date.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/date.rs
@@ -22,7 +22,7 @@ use super::{ calendar::month_to_month_code, duration::{normalized::NormalizedDurationRecord, TimeDuration}, - PlainMonthDay, PlainYearMonth, + PartialYearMonth, PlainMonthDay, PlainYearMonth, }; use tinystr::TinyAsciiStr; @@ -54,32 +54,6 @@ *self == Self::default() } - pub(crate) fn try_from_year_month(year_month: &PlainYearMonth) -> TemporalResult<Self> { - let (year, era, era_year) = if year_month.era().is_some() { - ( - None, - year_month - .era() - .map(|t| TinyAsciiStr::<19>::try_from_utf8(t.as_bytes())) - .transpose() - .map_err(|e| TemporalError::general(format!("{e}")))?, - year_month.era_year(), - ) - } else { - (Some(year_month.year()), None, None) - }; - Ok(Self { - year, - month: Some(year_month.month()), - month_code: Some(year_month.month_code()), - day: Some(1), - era, - era_year, - calendar: year_month.calendar().clone(), - }) - } - - crate::impl_with_fallback_method!(with_fallback_year_month, () PlainYearMonth); // excludes day crate::impl_with_fallback_method!(with_fallback_date, (with_day: day) PlainDate); crate::impl_with_fallback_method!(with_fallback_datetime, (with_day:day) PlainDateTime); } @@ -180,6 +154,74 @@ } /// The native Rust implementation of `Temporal.PlainDate`. +/// +/// Represents a calendar date without any time or timezone +/// information. Useful for dates where the specific time of day doesn't matter, +/// such as deadlines, birth dates, or historical events. +/// +/// Uses the ISO 8601 calendar (proleptic Gregorian calendar) by default, with +/// support for other calendar systems when needed. +/// +/// ## Examples +/// +/// ### Creating dates +/// +/// ```rust +/// use temporal_rs::{PlainDate, Calendar}; +/// +/// // Create a date using the ISO calendar +/// let christmas = PlainDate::try_new_iso(2024, 12, 25).unwrap(); +/// assert_eq!(christmas.year(), 2024); +/// assert_eq!(christmas.month(), 12); +/// assert_eq!(christmas.day(), 25); +/// +/// // Explicit calendar specification +/// let date = PlainDate::try_new(2024, 12, 25, Calendar::default()).unwrap(); +/// assert_eq!(date.year(), 2024); +/// assert_eq!(christmas, date); // Both represent the same date +/// ``` +/// +/// ### Date arithmetic operations +/// +/// ```rust +/// use temporal_rs::{PlainDate, Duration}; +/// use core::str::FromStr; +/// +/// let start = PlainDate::try_new_iso(2024, 1, 15).unwrap(); +/// +/// // Add one month +/// let later = start.add(&Duration::from_str("P1M").unwrap(), None).unwrap(); +/// assert_eq!(later.month(), 2); // Results in 2024-02-15 +/// assert_eq!(later.day(), 15); +/// +/// // Calculate duration between dates +/// let new_year = PlainDate::try_new_iso(2024, 1, 1).unwrap(); +/// let diff = new_year.until(&start, Default::default()).unwrap(); +/// assert_eq!(diff.days(), 14); +/// ``` +/// +/// ### Parsing ISO 8601 date strings +/// +/// ```rust +/// use temporal_rs::PlainDate; +/// use core::str::FromStr; +/// +/// // Standard ISO date format +/// let date = PlainDate::from_str("2024-03-15").unwrap(); +/// assert_eq!(date.year(), 2024); +/// assert_eq!(date.month(), 3); +/// assert_eq!(date.day(), 15); +/// +/// // With explicit calendar annotation +/// let date2 = PlainDate::from_str("2024-03-15[u-ca=iso8601]").unwrap(); +/// assert_eq!(date, date2); +/// ``` +/// +/// ## Reference +/// +/// For more information, see the [MDN documentation][mdn-plaindate]. +/// +/// [mdn-plaindate]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate #[non_exhaustive] #[derive(Debug, Default, Clone, PartialEq, Eq)] pub struct PlainDate { @@ -651,7 +693,6 @@ /// Converts the current `Date` into a `PlainYearMonth` #[inline] pub fn to_plain_year_month(&self) -> TemporalResult<PlainYearMonth> { - // TODO: Migrate to `PartialYearMonth` let era = self .era() .map(|e| { @@ -659,7 +700,7 @@ .map_err(|e| TemporalError::general(format!("{e}"))) }) .transpose()?; - let partial = PartialDate::new() + let partial = PartialYearMonth::new() .with_year(Some(self.year())) .with_era(era) .with_era_year(self.era_year())
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/datetime.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/datetime.rs similarity index 93% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/datetime.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/datetime.rs index cfd420d..55e7501 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/datetime.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/datetime.rs
@@ -54,12 +54,109 @@ } } -// TODO: Example doctest /// The native Rust implementation of a Temporal `PlainDateTime`. /// -/// The `PlainDateTime` represents a date and time without a -/// time zone. The fundemental represenation of a `PlainDateTime` -/// is it's internal ISO date and time fields and a calendar. +/// Combines a date and time into a single value representing a specific moment +/// in calendar time, such as "2024-03-15T14:30:45". Unlike `Instant`, +/// a `PlainDateTime` does not include timezone information. +/// +/// Use `PlainDateTime` when you need to represent a specific date and time but +/// timezone handling is not required, or when working with local times that +/// don't need to be converted across timezones. +/// +/// ## Examples +/// +/// ### Creating date and time values +/// +/// ```rust +/// use temporal_rs::PlainDateTime; +/// use core::str::FromStr; +/// +/// // Create a specific date and time from IXDTF string +/// let meeting = PlainDateTime::from_str("2024-03-15T14:30:45.123456789").unwrap(); +/// assert_eq!(meeting.year(), 2024); +/// assert_eq!(meeting.hour(), 14); +/// assert_eq!(meeting.minute(), 30); +/// ``` +/// +/// ### Parsing ISO 8601 datetime strings +/// +/// ```rust +/// use temporal_rs::PlainDateTime; +/// use core::str::FromStr; +/// +/// let dt = PlainDateTime::from_str("2024-03-15T14:30:45.123456789").unwrap(); +/// assert_eq!(dt.year(), 2024); +/// assert_eq!(dt.month(), 3); +/// assert_eq!(dt.day(), 15); +/// assert_eq!(dt.hour(), 14); +/// assert_eq!(dt.minute(), 30); +/// assert_eq!(dt.second(), 45); +/// assert_eq!(dt.millisecond(), 123); +/// assert_eq!(dt.microsecond(), 456); +/// assert_eq!(dt.nanosecond(), 789); +/// ``` +/// +/// ### DateTime arithmetic +/// +/// ```rust +/// use temporal_rs::{PlainDateTime, Duration}; +/// use core::str::FromStr; +/// +/// let dt = PlainDateTime::from_str("2024-01-15T12:00:00").unwrap(); +/// +/// // Add duration +/// let later = dt.add(&Duration::from_str("P1M2DT3H4M").unwrap(), None).unwrap(); +/// assert_eq!(later.month(), 2); +/// assert_eq!(later.day(), 17); +/// assert_eq!(later.hour(), 15); +/// assert_eq!(later.minute(), 4); +/// +/// // Calculate difference +/// let earlier = PlainDateTime::from_str("2024-01-10T10:30:00").unwrap(); +/// let duration = earlier.until(&dt, Default::default()).unwrap(); +/// assert_eq!(duration.days(), 5); +/// assert_eq!(duration.hours(), 1); +/// assert_eq!(duration.minutes(), 30); +/// ``` +/// +/// ### Working with partial fields +/// +/// ```rust +/// use temporal_rs::{PlainDateTime, partial::{PartialDateTime, PartialDate, PartialTime}}; +/// use core::str::FromStr; +/// +/// let dt = PlainDateTime::from_str("2024-01-15T12:30:45").unwrap(); +/// +/// // Change only the hour +/// let partial = PartialDateTime::new() +/// .with_partial_time(PartialTime::new().with_hour(Some(18))); +/// let modified = dt.with(partial, None).unwrap(); +/// assert_eq!(modified.hour(), 18); +/// assert_eq!(modified.minute(), 30); // unchanged +/// assert_eq!(modified.second(), 45); // unchanged +/// ``` +/// +/// ### Converting to other types +/// +/// ```rust +/// use temporal_rs::{PlainDateTime, PlainTime}; +/// use core::str::FromStr; +/// +/// let dt = PlainDateTime::from_str("2024-03-15T14:30:45").unwrap(); +/// +/// // Extract date component +/// let date = dt.to_plain_date().unwrap(); +/// assert_eq!(date.year(), 2024); +/// assert_eq!(date.month(), 3); +/// assert_eq!(date.day(), 15); +/// +/// // Extract time component +/// let time = dt.to_plain_time().unwrap(); +/// assert_eq!(time.hour(), 14); +/// assert_eq!(time.minute(), 30); +/// assert_eq!(time.second(), 45); +/// ``` /// /// ## Reference ///
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration.rs similarity index 90% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration.rs index d13a85b..aa48463 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration.rs
@@ -68,8 +68,152 @@ /// The native Rust implementation of `Temporal.Duration`. /// -/// `Duration` is made up of a `DateDuration` and `TimeDuration` as primarily -/// defined by Abtract Operation 7.5.1-5. +/// Represents a span of time such as "2 hours and 30 minutes" or "3 years, 2 months". +/// Unlike `Instant` which represents a specific moment in time, Duration represents +/// the amount of time between two moments. +/// +/// A Duration consists of two categories of components: +/// - Date components: years, months, weeks, and days +/// - Time components: hours, minutes, seconds, and subsecond units (nanosecond precision) +/// +/// Note that date arithmetic can be complex. For example, adding "1 month" to January 31st +/// could result in February 28th (non-leap year), February 29th (leap year), or March 3rd +/// (if you overflow February), depending on the calendar system and overflow handling. +/// +/// ## Examples +/// +/// ### Creating durations +/// +/// ```rust +/// use temporal_rs::Duration; +/// +/// // Create a duration with specific components +/// let vacation_duration = Duration::new( +/// 0, 0, 2, 3, // 2 weeks and 3 days +/// 0, 0, 0, // no time components +/// 0, 0, 0 // no subsecond components +/// ).unwrap(); +/// +/// assert_eq!(vacation_duration.weeks(), 2); +/// assert_eq!(vacation_duration.days(), 3); +/// ``` +/// +/// ### Parsing ISO 8601 duration strings +/// +/// ```rust +/// use temporal_rs::Duration; +/// use core::str::FromStr; +/// +/// // Complex duration with multiple components +/// let complex = Duration::from_str("P1Y2M3DT4H5M6.789S").unwrap(); +/// assert_eq!(complex.years(), 1); +/// assert_eq!(complex.months(), 2); +/// assert_eq!(complex.days(), 3); +/// assert_eq!(complex.hours(), 4); +/// assert_eq!(complex.minutes(), 5); +/// assert_eq!(complex.seconds(), 6); +/// +/// // Time-only duration +/// let movie_length = Duration::from_str("PT2H30M").unwrap(); +/// assert_eq!(movie_length.hours(), 2); +/// assert_eq!(movie_length.minutes(), 30); +/// +/// // Negative durations +/// let negative = Duration::from_str("-P1D").unwrap(); +/// assert_eq!(negative.days(), -1); +/// ``` +/// +/// ### Duration arithmetic +/// +/// ```rust +/// use temporal_rs::Duration; +/// use core::str::FromStr; +/// +/// let commute_time = Duration::from_str("PT45M").unwrap(); +/// let lunch_break = Duration::from_str("PT1H").unwrap(); +/// +/// // Add durations together +/// let total_time = commute_time.add(&lunch_break).unwrap(); +/// assert_eq!(total_time.hours(), 1); // Results in 1 hour 45 minutes +/// assert_eq!(total_time.minutes(), 45); +/// +/// // Subtract duration components +/// let shortened = lunch_break.subtract(&Duration::from_str("PT15M").unwrap()).unwrap(); +/// assert_eq!(shortened.minutes(), 45); +/// ``` +/// +/// ### Date arithmetic with durations +/// +/// ```rust +/// use temporal_rs::{PlainDate, Duration, options::ArithmeticOverflow}; +/// use core::str::FromStr; +/// +/// // January 31st in different years +/// let jan_31_2023 = PlainDate::try_new_iso(2023, 1, 31).unwrap(); +/// let jan_31_2024 = PlainDate::try_new_iso(2024, 1, 31).unwrap(); // leap year +/// +/// let one_month = Duration::from_str("P1M").unwrap(); +/// +/// // Adding 1 month to Jan 31st gives different results: +/// let feb_2023 = jan_31_2023.add(&one_month, Some(ArithmeticOverflow::Constrain)).unwrap(); +/// let feb_2024 = jan_31_2024.add(&one_month, Some(ArithmeticOverflow::Constrain)).unwrap(); +/// +/// // 2023: Jan 31 + 1 month = Feb 28 (no Feb 31st exists) +/// assert_eq!(feb_2023.day(), 28); +/// // 2024: Jan 31 + 1 month = Feb 29 (leap year) +/// assert_eq!(feb_2024.day(), 29); +/// ``` +/// +/// ### Working with partial durations +/// +/// ```rust +/// use temporal_rs::{Duration, partial::PartialDuration}; +/// +/// let partial = PartialDuration { +/// hours: Some(3), +/// minutes: Some(45), +/// ..Default::default() +/// }; +/// +/// let duration = Duration::from_partial_duration(partial).unwrap(); +/// assert_eq!(duration.hours(), 3); +/// assert_eq!(duration.minutes(), 45); +/// assert_eq!(duration.days(), 0); // other fields default to 0 +/// ``` +/// +/// ### Duration properties +/// +/// ```rust +/// use temporal_rs::Duration; +/// use core::str::FromStr; +/// +/// let duration = Duration::from_str("P1Y2M3D").unwrap(); +/// +/// // Check if duration is zero +/// assert!(!duration.is_zero()); +/// +/// // Get the sign of the duration +/// let sign = duration.sign(); +/// // Note: This particular duration has mixed signs which affects the overall sign +/// +/// // Get absolute value +/// let abs_duration = duration.abs(); +/// assert_eq!(abs_duration.years(), 1); +/// assert_eq!(abs_duration.months(), 2); +/// assert_eq!(abs_duration.days(), 3); +/// +/// // Negate duration +/// let negated = duration.negated(); +/// assert_eq!(negated.years(), -1); +/// assert_eq!(negated.months(), -2); +/// assert_eq!(negated.days(), -3); +/// ``` +/// +/// ## Reference +/// +/// For more information, see the [MDN documentation][mdn-duration]. +/// +/// [mdn-duration]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration #[non_exhaustive] #[derive(Debug, Clone, Copy, Default)] pub struct Duration {
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/date.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/date.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/date.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/date.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/normalized.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/normalized.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/normalized.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/normalized.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/tests.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/tests.rs similarity index 80% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/tests.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/tests.rs index 64c88bf1..825a482 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/tests.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/tests.rs
@@ -264,6 +264,67 @@ assert_eq!(result.days(), -3); } +#[test] +#[cfg(feature = "compiled_data")] +fn test_duration_compare() { + use crate::builtins::FS_TZ_PROVIDER; + use crate::options::{OffsetDisambiguation, RelativeTo}; + use crate::ZonedDateTime; + use alloc::string::ToString; + // TODO(#199): Make this work with Windows + // This should also ideally use the compiled data APIs and live under builtins/compiled + if cfg!(not(windows)) { + let one = Duration::from_partial_duration(PartialDuration { + hours: Some(79), + minutes: Some(10), + ..Default::default() + }) + .unwrap(); + let two = Duration::from_partial_duration(PartialDuration { + days: Some(3), + hours: Some(7), + seconds: Some(630), + ..Default::default() + }) + .unwrap(); + let three = Duration::from_partial_duration(PartialDuration { + days: Some(3), + hours: Some(6), + minutes: Some(50), + ..Default::default() + }) + .unwrap(); + + let mut arr = [&one, &two, &three]; + arr.sort_by(|a, b| Duration::compare_with_provider(a, b, None, &*FS_TZ_PROVIDER).unwrap()); + assert_eq!( + arr.map(ToString::to_string), + [&three, &one, &two].map(ToString::to_string) + ); + + // Sorting relative to a date, taking DST changes into account: + let zdt = ZonedDateTime::from_str_with_provider( + "2020-11-01T00:00-07:00[America/Los_Angeles]", + Default::default(), + OffsetDisambiguation::Reject, + &*FS_TZ_PROVIDER, + ) + .unwrap(); + arr.sort_by(|a, b| { + Duration::compare_with_provider( + a, + b, + Some(RelativeTo::ZonedDateTime(zdt.clone())), + &*FS_TZ_PROVIDER, + ) + .unwrap() + }); + assert_eq!( + arr.map(ToString::to_string), + [&one, &three, &two].map(ToString::to_string) + ) + } +} /* TODO: Uncomment
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/time.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/time.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/time.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/time.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/instant.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/instant.rs similarity index 85% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/instant.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/instant.rs index 97d90371..6fe5efa 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/instant.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/instant.rs
@@ -32,7 +32,119 @@ const NANOSECONDS_PER_MINUTE: i64 = 60 * NANOSECONDS_PER_SECOND; const NANOSECONDS_PER_HOUR: i64 = 60 * NANOSECONDS_PER_MINUTE; -/// The native Rust implementation of `Temporal.Instant` +/// The native Rust implementation of `Temporal.Instant`. +/// +/// Represents a precise moment in time measured as nanoseconds since the Unix epoch +/// (1970-01-01T00:00:00\[UTC\]). An `Instant` provides a universal timestamp +/// that represents the same moment regardless of timezone or calendar system. +/// +/// Use `Instant` when you need to record exact moments in time, measure elapsed time, +/// or work with high-precision timestamps. Unlike `PlainDateTime`, an `Instant` +/// represents an absolute point on the timeline. +/// +/// ## Examples +/// +/// ### Creating instants +/// +/// ```rust +/// use temporal_rs::Instant; +/// +/// // From epoch nanoseconds (high-precision timestamps) +/// let precise_moment = Instant::try_new(1609459200000000000).unwrap(); +/// assert_eq!(precise_moment.epoch_milliseconds(), 1609459200000); +/// +/// // From epoch milliseconds (common in web applications) +/// let web_timestamp = Instant::from_epoch_milliseconds(1609459200000).unwrap(); +/// assert_eq!(web_timestamp.epoch_nanoseconds().as_i128(), 1609459200000000000); +/// ``` +/// +/// ### Parsing ISO 8601 instant strings +/// +/// ```rust +/// use temporal_rs::Instant; +/// use core::str::FromStr; +/// +/// // Parse ISO 8601 instant strings (must include timezone info) +/// let instant = Instant::from_str("2024-03-15T14:30:45.123Z").unwrap(); +/// assert_eq!(instant.epoch_milliseconds(), 1710513045123); +/// +/// // Parse instants with different timezone notations +/// let instant2 = Instant::from_str("2024-03-15T14:30:45.123+00:00").unwrap(); +/// let instant3 = Instant::from_str("2024-03-15T14:30:45.123-00:00").unwrap(); +/// assert_eq!(instant, instant2); +/// assert_eq!(instant2, instant3); +/// ``` +/// +/// ### Instant arithmetic +/// +/// ```rust +/// use temporal_rs::{Instant, Duration}; +/// use core::str::FromStr; +/// +/// let instant = Instant::try_new(1609459200000000000).unwrap(); // 2021-01-01T00:00:00Z +/// +/// // Add time duration (only time durations, not date durations) +/// let later = instant.add(Duration::from_str("PT1H30M").unwrap()).unwrap(); +/// let expected_ns = 1609459200000000000 + (1 * 3600 + 30 * 60) * 1_000_000_000; +/// assert_eq!(later.epoch_nanoseconds().as_i128(), expected_ns); +/// +/// // Calculate difference between instants +/// let earlier = Instant::try_new(1609459200000000000 - 3600_000_000_000).unwrap(); +/// let duration = earlier.until(&instant, Default::default()).unwrap(); +/// assert_eq!(duration.seconds(), 3600); +/// ``` +/// +/// ### Instant precision and limits +/// +/// ```rust +/// use temporal_rs::Instant; +/// +/// // Instants have well-defined limits based on approximately 100 million days before/after Unix epoch +/// let max_ns = 8_640_000_000_000_000_000_000i128; // ~100M days * 24 * 60 * 60 * 1e9 +/// let min_ns = -max_ns; +/// +/// let max_instant = Instant::try_new(max_ns).unwrap(); +/// let min_instant = Instant::try_new(min_ns).unwrap(); +/// +/// // Values outside the range will fail +/// assert!(Instant::try_new(max_ns + 1).is_err()); +/// assert!(Instant::try_new(min_ns - 1).is_err()); +/// ``` +/// +/// ### Converting to ZonedDateTime (requires provider) +/// +/// ```rust,ignore +/// use temporal_rs::{Instant, TimeZone, Calendar}; +/// +/// let instant = Instant::try_new(1609459200000000000).unwrap(); +/// let timezone = TimeZone::try_from_str("America/New_York").unwrap(); +/// +/// // Convert to a zoned date-time for display in local time +/// let zdt = instant.to_zoned_date_time_iso(timezone); +/// assert_eq!(zdt.timezone().identifier().unwrap(), "America/New_York"); +/// assert_eq!(zdt.calendar().identifier(), "iso8601"); +/// ``` +/// +/// ### Rounding instants +/// +/// ```rust +/// use temporal_rs::{Instant, options::{RoundingOptions, Unit}}; +/// +/// let instant = Instant::try_new(1609459245123456789).unwrap(); // some precise moment +/// +/// let mut opts = RoundingOptions::default(); +/// opts.smallest_unit = Some(Unit::Second); +/// let rounded = instant.round(opts).unwrap(); +/// +/// // Rounded to the nearest second +/// assert_eq!(rounded.epoch_nanoseconds().as_i128() % 1_000_000_000, 0); +/// ``` +/// +/// ## Reference +/// +/// For more information, see the [MDN documentation][mdn-instant]. +/// +/// [mdn-instant]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant #[non_exhaustive] #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub struct Instant(EpochNanoseconds);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/mod.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/mod.rs similarity index 94% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/mod.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/mod.rs index 498402a..f827add1 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/mod.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/mod.rs
@@ -36,6 +36,6 @@ #[doc(inline)] pub use time::{PartialTime, PlainTime}; #[doc(inline)] -pub use year_month::PlainYearMonth; +pub use year_month::{PartialYearMonth, PlainYearMonth}; #[doc(inline)] pub use zoneddatetime::{PartialZonedDateTime, ZonedDateTime};
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/month_day.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/month_day.rs similarity index 69% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/month_day.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/month_day.rs index d7bc8357..57fe742d 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/month_day.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/month_day.rs
@@ -13,7 +13,144 @@ use super::{calendar::month_to_month_code, PartialDate, PlainDate}; use writeable::Writeable; -/// The native Rust implementation of `Temporal.PlainMonthDay` +/// The native Rust implementation of `Temporal.PlainMonthDay`. +/// +/// Represents a calendar month and day without a specific year, such as +/// "December 25th" or "March 15th". Useful for representing recurring annual +/// events where the year is not specified or relevant. +/// +/// Commonly used for holidays, birthdays, anniversaries, and other events +/// that occur on the same date each year. Special handling is required for +/// February 29th when working with non-leap years. +/// +/// ## Examples +/// +/// ### Creating a PlainMonthDay +/// +/// ```rust +/// use temporal_rs::{PlainMonthDay, Calendar, MonthCode, options::ArithmeticOverflow}; +/// +/// // Create March 15th +/// let md = PlainMonthDay::new_with_overflow( +/// 3, 15, // month, day +/// Calendar::default(), // ISO 8601 calendar +/// ArithmeticOverflow::Reject, // reject invalid dates +/// None // no reference year +/// ).unwrap(); +/// +/// assert_eq!(md.month_code(), MonthCode::try_from_utf8("M03".as_bytes()).unwrap()); +/// assert_eq!(md.day(), 15); +/// assert_eq!(md.calendar().identifier(), "iso8601"); +/// ``` +/// +/// ### Parsing ISO 8601 month-day strings +/// +/// ```rust +/// use temporal_rs::{PlainMonthDay, MonthCode}; +/// use core::str::FromStr; +/// +/// // Parse month-day strings +/// let md = PlainMonthDay::from_str("03-15").unwrap(); +/// assert_eq!(md.month_code(), MonthCode::try_from_utf8("M03".as_bytes()).unwrap()); +/// assert_eq!(md.day(), 15); +/// +/// // Also supports various formats +/// let md2 = PlainMonthDay::from_str("--03-15").unwrap(); // RFC 3339 format +/// assert_eq!(md2.month_code(), MonthCode::try_from_utf8("M03".as_bytes()).unwrap()); +/// assert_eq!(md2.day(), 15); +/// assert_eq!(md, md2); // equivalent +/// ``` +/// +/// ### Working with partial fields +/// +/// ```rust +/// use temporal_rs::{PlainMonthDay, MonthCode, partial::PartialDate}; +/// use core::str::FromStr; +/// +/// let md = PlainMonthDay::from_str("03-15").unwrap(); // March 15th +/// +/// // Change the month +/// let partial = PartialDate::new().with_month(Some(12)); +/// let modified = md.with(partial, None).unwrap(); +/// assert_eq!(modified.month_code(), MonthCode::try_from_utf8("M12".as_bytes()).unwrap()); +/// assert_eq!(modified.day(), 15); // unchanged +/// +/// // Change the day +/// let partial = PartialDate::new().with_day(Some(25)); +/// let modified = md.with(partial, None).unwrap(); +/// assert_eq!(modified.month_code(), MonthCode::try_from_utf8("M03".as_bytes()).unwrap()); // unchanged +/// assert_eq!(modified.day(), 25); +/// ``` +/// +/// ### Converting to PlainDate +/// +/// ```rust +/// use temporal_rs::{PlainMonthDay, partial::PartialDate}; +/// use core::str::FromStr; +/// +/// let md = PlainMonthDay::from_str("12-25").unwrap(); // December 25th +/// +/// // Convert to a specific date by providing a year +/// let year_partial = PartialDate::new().with_year(Some(2024)); +/// let date = md.to_plain_date(Some(year_partial)).unwrap(); +/// assert_eq!(date.year(), 2024); +/// assert_eq!(date.month(), 12); +/// assert_eq!(date.day(), 25); +/// // This represents December 25th, 2024 +/// ``` +/// +/// ### Handling leap year dates +/// +/// ```rust +/// use temporal_rs::{PlainMonthDay, MonthCode, partial::PartialDate, Calendar, options::ArithmeticOverflow}; +/// +/// // February 29th (leap day) +/// let leap_day = PlainMonthDay::new_with_overflow( +/// 2, 29, +/// Calendar::default(), +/// ArithmeticOverflow::Reject, +/// Some(2024) // reference year 2024 (a leap year) +/// ).unwrap(); +/// +/// assert_eq!(leap_day.month_code(), MonthCode::try_from_utf8("M02".as_bytes()).unwrap()); +/// assert_eq!(leap_day.day(), 29); +/// +/// // Convert to non-leap year - this would need special handling +/// let year_partial = PartialDate::new().with_year(Some(2023)); // non-leap year +/// let result = leap_day.to_plain_date(Some(year_partial)); +/// // This might fail or be adjusted depending on the calendar's rules +/// ``` +/// +/// ### Practical use cases +/// +/// ```rust +/// use temporal_rs::{PlainMonthDay, partial::PartialDate}; +/// use core::str::FromStr; +/// +/// // Birthday (recurring annually) +/// let birthday = PlainMonthDay::from_str("07-15").unwrap(); // July 15th +/// +/// // Calculate this year's birthday +/// let this_year = 2024; +/// let year_partial = PartialDate::new().with_year(Some(this_year)); +/// let birthday_2024 = birthday.to_plain_date(Some(year_partial)).unwrap(); +/// assert_eq!(birthday_2024.year(), 2024); +/// assert_eq!(birthday_2024.month(), 7); +/// assert_eq!(birthday_2024.day(), 15); +/// +/// // Holiday (Christmas) +/// let christmas = PlainMonthDay::from_str("12-25").unwrap(); +/// let year_partial = PartialDate::new().with_year(Some(this_year)); +/// let christmas_2024 = christmas.to_plain_date(Some(year_partial)).unwrap(); +/// assert_eq!(christmas_2024.month(), 12); +/// assert_eq!(christmas_2024.day(), 25); +/// ``` +/// +/// ## Reference +/// +/// For more information, see the [MDN documentation][mdn-plainmonthday]. +/// +/// [mdn-plainmonthday]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay #[non_exhaustive] #[derive(Debug, Default, Clone, PartialEq, Eq)] pub struct PlainMonthDay {
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/now.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/now.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/now.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/now.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/time.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/time.rs similarity index 89% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/time.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/time.rs index 6ff2035..01bdb11b 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/time.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/time.rs
@@ -84,6 +84,113 @@ } /// The native Rust implementation of `Temporal.PlainTime`. +/// +/// Represents a time of day such as "14:30:45.123" without any date or timezone +/// information. Contains hour, minute, second, and subsecond components with +/// nanosecond precision. +/// +/// Ideal for representing recurring daily events, schedules, or any time value +/// where the specific date is not relevant. +/// +/// ## Examples +/// +/// ### Creating time values +/// +/// ```rust +/// use temporal_rs::PlainTime; +/// +/// // High-precision time +/// let precise_time = PlainTime::try_new( +/// 14, 30, 45, // 2:30:45 PM +/// 123, 456, 789 // subsecond components +/// ).unwrap(); +/// assert_eq!(precise_time.hour(), 14); +/// assert_eq!(precise_time.millisecond(), 123); +/// +/// // Simple time without subseconds +/// let simple = PlainTime::try_new(9, 0, 0, 0, 0, 0).unwrap(); +/// assert_eq!(simple.hour(), 9); +/// ``` +/// +/// ### Parsing ISO 8601 time strings +/// +/// ```rust +/// use temporal_rs::PlainTime; +/// use core::str::FromStr; +/// +/// let time = PlainTime::from_str("14:30:45.123456789").unwrap(); +/// assert_eq!(time.hour(), 14); +/// assert_eq!(time.minute(), 30); +/// assert_eq!(time.second(), 45); +/// assert_eq!(time.millisecond(), 123); +/// assert_eq!(time.microsecond(), 456); +/// assert_eq!(time.nanosecond(), 789); +/// +/// // Also supports time-only portions of ISO 8601 strings +/// let time = PlainTime::from_str("T09:15:30").unwrap(); +/// assert_eq!(time.hour(), 9); +/// assert_eq!(time.minute(), 15); +/// assert_eq!(time.second(), 30); +/// ``` +/// +/// ### Time arithmetic +/// +/// ```rust +/// use temporal_rs::{PlainTime, Duration}; +/// use core::str::FromStr; +/// +/// let time = PlainTime::from_str("12:30:00").unwrap(); +/// +/// // Add 2 hours and 30 minutes +/// let later = time.add(&Duration::from_str("PT2H30M").unwrap()).unwrap(); +/// assert_eq!(later.hour(), 15); +/// assert_eq!(later.minute(), 0); +/// assert_eq!(later.second(), 0); +/// +/// // Calculate difference between times +/// let earlier = PlainTime::from_str("10:00:00").unwrap(); +/// let duration = earlier.until(&time, Default::default()).unwrap(); +/// assert_eq!(duration.hours(), 2); +/// assert_eq!(duration.minutes(), 30); +/// ``` +/// +/// ### Working with partial time fields +/// +/// ```rust +/// use temporal_rs::{PlainTime, partial::PartialTime}; +/// use core::str::FromStr; +/// +/// let time = PlainTime::from_str("12:30:45").unwrap(); +/// +/// // Change only the minute +/// let partial = PartialTime::new().with_minute(Some(15)); +/// let modified = time.with(partial, None).unwrap(); +/// assert_eq!(modified.hour(), 12); // unchanged +/// assert_eq!(modified.minute(), 15); // changed +/// assert_eq!(modified.second(), 45); // unchanged +/// ``` +/// +/// ### Rounding times +/// +/// ```rust +/// use temporal_rs::{PlainTime, options::{Unit, RoundingMode}}; +/// use core::str::FromStr; +/// +/// let time = PlainTime::from_str("14:23:47.789").unwrap(); +/// +/// // Round to nearest minute +/// let rounded = time.round(Unit::Minute, None, None).unwrap(); +/// assert_eq!(rounded.hour(), 14); +/// assert_eq!(rounded.minute(), 24); +/// assert_eq!(rounded.second(), 0); +/// assert_eq!(rounded.millisecond(), 0); +/// ``` +/// +/// ## Reference +/// +/// For more information, see the [MDN documentation][mdn-plaintime]. +/// +/// [mdn-plaintime]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime #[non_exhaustive] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub struct PlainTime {
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/timezone.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/timezone.rs similarity index 98% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/timezone.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/timezone.rs index edfaaf99..367f2a4 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/timezone.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/timezone.rs
@@ -11,7 +11,7 @@ use crate::parsers::{ parse_allowed_timezone_formats, parse_identifier, FormattableOffset, FormattableTime, Precision, }; -use crate::provider::{TimeZoneOffset, TimeZoneProvider}; +use crate::provider::{TimeZoneProvider, TimeZoneTransitionInfo}; use crate::{ builtins::core::{duration::normalized::NormalizedTimeDuration, Instant}, iso::{IsoDate, IsoDateTime, IsoTime}, @@ -177,7 +177,7 @@ // 3. Return GetNamedTimeZoneOffsetNanoseconds(parseResult.[[Name]], epochNs). Self::IanaIdentifier(identifier) => provider .get_named_tz_offset_nanoseconds(identifier, utc_epoch) - .map(|offset| i128::from(offset.offset) * 1_000_000_000), + .map(|transition| i128::from(transition.offset.0) * 1_000_000_000), } } @@ -428,7 +428,7 @@ .with_message("Could not determine the start of day for the provided date.")); }; - let TimeZoneOffset { + let TimeZoneTransitionInfo { transition_epoch: Some(transition_epoch), .. } = provider.get_named_tz_offset_nanoseconds(identifier, after_epoch.0)?
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/year_month.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/year_month.rs similarity index 74% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/year_month.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/year_month.rs index 370745f..a664646 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/year_month.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/year_month.rs
@@ -1,6 +1,6 @@ //! This module implements `YearMonth` and any directly related algorithms. -use alloc::string::String; +use alloc::{format, string::String}; use core::{cmp::Ordering, str::FromStr}; use tinystr::TinyAsciiStr; @@ -16,13 +16,248 @@ utils::pad_iso_year, Calendar, MonthCode, TemporalError, TemporalResult, TemporalUnwrap, TimeZone, }; +use icu_calendar::AnyCalendarKind; use super::{ - duration::normalized::NormalizedDurationRecord, Duration, PartialDate, PlainDate, PlainDateTime, + calendar::month_to_month_code, duration::normalized::NormalizedDurationRecord, Duration, + PartialDate, PlainDate, PlainDateTime, }; use writeable::Writeable; -/// The native Rust implementation of `Temporal.YearMonth`. +/// A partial PlainYearMonth record +#[derive(Debug, Default, Clone, PartialEq)] +pub struct PartialYearMonth { + /// A potentially set `year` field. + pub year: Option<i32>, + /// A potentially set `month` field. + pub month: Option<u8>, + /// A potentially set `month_code` field. + pub month_code: Option<MonthCode>, + /// A potentially set `era` field. + pub era: Option<TinyAsciiStr<19>>, + /// A potentially set `era_year` field. + pub era_year: Option<i32>, + /// The calendar field + pub calendar: Calendar, +} + +impl PartialYearMonth { + pub(crate) fn try_from_year_month(year_month: &PlainYearMonth) -> TemporalResult<Self> { + let (year, era, era_year) = if year_month.era().is_some() { + ( + None, + year_month + .era() + .map(|t| TinyAsciiStr::<19>::try_from_utf8(t.as_bytes())) + .transpose() + .map_err(|e| TemporalError::general(format!("{e}")))?, + year_month.era_year(), + ) + } else { + (Some(year_month.year()), None, None) + }; + Ok(Self { + year, + month: Some(year_month.month()), + month_code: Some(year_month.month_code()), + era, + era_year, + calendar: year_month.calendar().clone(), + }) + } + + crate::impl_with_fallback_method!(with_fallback_year_month, () PlainYearMonth); +} + +impl From<&PartialYearMonth> for PartialDate { + fn from(value: &PartialYearMonth) -> Self { + Self { + year: value.year, + month: value.month, + month_code: value.month_code, + day: None, + era: value.era, + era_year: value.era_year, + calendar: value.calendar.clone(), + } + } +} + +impl From<&PartialDate> for PartialYearMonth { + fn from(value: &PartialDate) -> Self { + Self { + year: value.year, + month: value.month, + month_code: value.month_code, + era: value.era, + era_year: value.era_year, + calendar: value.calendar.clone(), + } + } +} + +/// Convenience methods for building a `PartialYearMonth` +impl PartialYearMonth { + pub const fn new() -> Self { + Self { + year: None, + month: None, + month_code: None, + era: None, + era_year: None, + calendar: Calendar::new(AnyCalendarKind::Iso), + } + } + + pub const fn with_era(mut self, era: Option<TinyAsciiStr<19>>) -> Self { + self.era = era; + self + } + + pub const fn with_era_year(mut self, era_year: Option<i32>) -> Self { + self.era_year = era_year; + self + } + + pub const fn with_year(mut self, year: Option<i32>) -> Self { + self.year = year; + self + } + + pub const fn with_month(mut self, month: Option<u8>) -> Self { + self.month = month; + self + } + + pub const fn with_month_code(mut self, month_code: Option<MonthCode>) -> Self { + self.month_code = month_code; + self + } + + pub const fn with_calendar(mut self, calendar: Calendar) -> Self { + self.calendar = calendar; + self + } +} + +/// The native Rust implementation of `Temporal.PlainYearMonth`. +/// +/// Represents a specific month within a specific year, such as "January 2024" +/// or "December 2023", without a specific day component. +/// +/// Useful for representing time periods at month granularity, such as billing +/// periods, reporting intervals, or any scenario where you need to work with +/// entire months rather than specific dates. +/// +/// ## Examples +/// +/// ### Creating a PlainYearMonth +/// +/// ```rust +/// use temporal_rs::{PlainYearMonth, Calendar}; +/// +/// // Create with ISO 8601 calendar +/// let ym = PlainYearMonth::try_new_iso(2024, 3, None).unwrap(); +/// assert_eq!(ym.year(), 2024); +/// assert_eq!(ym.month(), 3); +/// assert_eq!(ym.calendar().identifier(), "iso8601"); +/// +/// // Create with explicit calendar and reference day +/// let ym = PlainYearMonth::try_new(2024, 3, Some(15), Calendar::default()).unwrap(); +/// assert_eq!(ym.year(), 2024); +/// assert_eq!(ym.month(), 3); +/// // Reference day helps with calendar calculations but doesn't affect the YearMonth itself +/// ``` +/// +/// ### Parsing ISO 8601 year-month strings +/// +/// ```rust +/// use temporal_rs::PlainYearMonth; +/// use core::str::FromStr; +/// +/// // Parse year-month strings +/// let ym = PlainYearMonth::from_str("2024-03").unwrap(); +/// assert_eq!(ym.year(), 2024); +/// assert_eq!(ym.month(), 3); +/// +/// // Also accepts full date strings (day is ignored for YearMonth semantics) +/// let ym2 = PlainYearMonth::from_str("2024-03-15").unwrap(); +/// assert_eq!(ym2.year(), 2024); +/// assert_eq!(ym2.month(), 3); +/// assert_eq!(ym, ym2); // equivalent +/// ``` +/// +/// ### YearMonth arithmetic +/// +/// ```rust +/// use temporal_rs::{PlainYearMonth, options::DifferenceSettings}; +/// use core::str::FromStr; +/// +/// let ym1 = PlainYearMonth::from_str("2024-01").unwrap(); +/// let ym2 = PlainYearMonth::from_str("2024-04").unwrap(); +/// +/// // Calculate difference between year-months +/// let duration = ym1.until(&ym2, DifferenceSettings::default()).unwrap(); +/// assert_eq!(duration.months(), 3); // January to April = 3 months +/// ``` +/// +/// ### Working with partial fields +/// +/// ```rust +/// use temporal_rs::{PlainYearMonth, partial::PartialYearMonth}; +/// use core::str::FromStr; +/// +/// let ym = PlainYearMonth::from_str("2024-01").unwrap(); +/// +/// // Change only the year +/// let partial = PartialYearMonth::new().with_year(Some(2025)); +/// let modified = ym.with(partial, None).unwrap(); +/// assert_eq!(modified.year(), 2025); +/// assert_eq!(modified.month(), 1); // unchanged +/// +/// // Change only the month +/// let partial = PartialYearMonth::new().with_month(Some(6)); +/// let modified = ym.with(partial, None).unwrap(); +/// assert_eq!(modified.year(), 2024); // unchanged +/// assert_eq!(modified.month(), 6); +/// ``` +/// +/// ### Converting to PlainDate +/// +/// ```rust +/// use temporal_rs::{PlainYearMonth, partial::PartialDate}; +/// use core::str::FromStr; +/// +/// let ym = PlainYearMonth::from_str("2024-03").unwrap(); +/// +/// // Convert to a specific date by providing a day +/// let day_partial = PartialDate::new().with_day(Some(15)); +/// let date = ym.to_plain_date(Some(day_partial)).unwrap(); +/// assert_eq!(date.year(), 2024); +/// assert_eq!(date.month(), 3); +/// assert_eq!(date.day(), 15); +/// ``` +/// +/// ### Calendar properties +/// +/// ```rust +/// use temporal_rs::PlainYearMonth; +/// use core::str::FromStr; +/// +/// let ym = PlainYearMonth::from_str("2024-02").unwrap(); // February 2024 +/// +/// // Get calendar-specific properties +/// assert_eq!(ym.days_in_month(), 29); // 2024 is a leap year +/// assert_eq!(ym.days_in_year(), 366); // leap year has 366 days +/// assert_eq!(ym.months_in_year(), 12); // ISO calendar has 12 months +/// assert!(ym.in_leap_year()); // 2024 is indeed a leap year +/// ``` +/// +/// ## Reference +/// +/// For more information, see the [MDN documentation][mdn-plainyearmonth]. +/// +/// [mdn-plainyearmonth]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth #[non_exhaustive] #[derive(Debug, Default, Clone, PartialEq, Eq)] pub struct PlainYearMonth { @@ -51,16 +286,18 @@ overflow: ArithmeticOverflow, ) -> TemporalResult<Self> { // Potential TODO: update to current Temporal specification - let partial = PartialDate::try_from_year_month(self)?; + let partial = PartialYearMonth::try_from_year_month(self)?; - let mut intermediate_date = self.calendar().date_from_partial(&partial, overflow)?; + let mut intermediate_date = self + .calendar() + .date_from_partial(&PartialDate::from(&partial), overflow)?; intermediate_date = intermediate_date.add_date(duration, Some(overflow))?; let result_fields = PartialDate::default().with_fallback_date(&intermediate_date)?; self.calendar() - .year_month_from_partial(&result_fields, overflow) + .year_month_from_partial(&PartialYearMonth::from(&result_fields), overflow) } /// The internal difference operation of `PlainYearMonth`. @@ -213,9 +450,9 @@ Ok(Self::new_unchecked(iso, calendar)) } - /// Create a `PlainYearMonth` from a `PartialDate` + /// Create a `PlainYearMonth` from a `PartialYearMonth` pub fn from_partial( - partial: PartialDate, + partial: PartialYearMonth, overflow: ArithmeticOverflow, ) -> TemporalResult<Self> { partial.calendar.year_month_from_partial(&partial, overflow) @@ -252,7 +489,7 @@ let intermediate = Self::new_unchecked(iso, calendar); // 12. Set result to ISODateToFields(calendar, isoDate, year-month). - let partial = PartialDate::try_from_year_month(&intermediate)?; + let partial = PartialYearMonth::try_from_year_month(&intermediate)?; // 13. NOTE: The following operation is called with constrain regardless of the // value of overflow, in order for the calendar to store a canonical value in the // [[Day]] field of the [[ISODate]] internal slot of the result. @@ -345,10 +582,10 @@ self.calendar.identifier() } - /// Creates a `PlainYearMonth` using the fields provided from a [`PartialDate`] + /// Creates a `PlainYearMonth` using the fields provided from a [`PartialYearMonth`] pub fn with( &self, - partial: PartialDate, + partial: PartialYearMonth, overflow: Option<ArithmeticOverflow>, ) -> TemporalResult<Self> { // 1. Let yearMonth be the this value. @@ -724,7 +961,7 @@ .unwrap(); // Year - let partial = PartialDate { + let partial = PartialYearMonth { year: Some(2001), ..Default::default() }; @@ -735,7 +972,7 @@ assert_eq!(with_year.month_code(), MonthCode::from_str("M03").unwrap()); // assert month code has been initialized correctly // Month - let partial = PartialDate { + let partial = PartialYearMonth { month: Some(2), ..Default::default() }; @@ -745,7 +982,7 @@ assert_eq!(with_month.month_code(), MonthCode::from_str("M02").unwrap()); // assert month code has changed as well as month // Month Code - let partial = PartialDate { + let partial = PartialYearMonth { month_code: Some(MonthCode(tinystr!(4, "M05"))), // change month to May (5) ..Default::default() }; @@ -758,20 +995,16 @@ assert_eq!(with_month_code.iso_month(), 5); // month is changed as well // Day - let partial = PartialDate { - day: Some(15), - ..Default::default() - }; + let partial = PartialYearMonth::new(); let with_day = base.with(partial, None).unwrap(); assert_eq!(with_day.iso_year(), 2025); // year is not changed assert_eq!(with_day.iso_month(), 3); // month is not changed assert_eq!(with_day.iso.day, 1); // day is ignored // All - let partial = PartialDate { + let partial = PartialYearMonth { year: Some(2001), month: Some(2), - day: Some(15), ..Default::default() }; let with_all = base.with(partial, None).unwrap(); @@ -838,4 +1071,51 @@ assert_eq!(plain_date.iso_month(), 5); assert_eq!(plain_date.iso_day(), 3); } + + #[test] + fn test_partial_year_month_try_from_plain() { + let ym = PlainYearMonth::from_str("2024-05").unwrap(); + let partial = PartialYearMonth::try_from_year_month(&ym).unwrap(); + assert_eq!(partial.year, Some(2024)); + assert_eq!(partial.month, Some(5)); + assert_eq!( + partial.month_code, + Some(MonthCode::from_str("M05").unwrap()) + ); + assert_eq!(partial.era, None); + assert_eq!(partial.era_year, None); + assert_eq!(partial.calendar, ym.calendar().clone()); + } + + #[test] + fn test_partial_year_month_date_round_trip() { + let partial = PartialYearMonth::new() + .with_year(Some(1999)) + .with_month(Some(12)); + let pd: PartialDate = (&partial).into(); + let reconstructed: PartialYearMonth = (&pd).into(); + assert_eq!(partial, reconstructed); + } + + #[test] + fn test_partial_year_month_builder_methods() { + let calendar = Calendar::from_str("gregory").unwrap(); + let partial = PartialYearMonth::new() + .with_year(Some(2020)) + .with_month(Some(7)) + .with_month_code(Some(MonthCode::from_str("M07").unwrap())) + .with_era(Some(tinystr!(19, "ce"))) + .with_era_year(Some(2020)) + .with_calendar(calendar.clone()); + + assert_eq!(partial.year, Some(2020)); + assert_eq!(partial.month, Some(7)); + assert_eq!( + partial.month_code, + Some(MonthCode::from_str("M07").unwrap()) + ); + assert_eq!(partial.era, Some(tinystr!(19, "ce"))); + assert_eq!(partial.era_year, Some(2020)); + assert_eq!(partial.calendar, calendar); + } }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/zoneddatetime.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/zoneddatetime.rs similarity index 92% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/zoneddatetime.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/zoneddatetime.rs index e7bbd0e..919994b 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/zoneddatetime.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/zoneddatetime.rs
@@ -13,6 +13,7 @@ timezone::{TimeZone, UtcOffset}, Duration, Instant, PlainDate, PlainDateTime, PlainTime, }, + error::ErrorMessage, iso::{IsoDate, IsoDateTime, IsoTime}, options::{ ArithmeticOverflow, DifferenceOperation, DifferenceSettings, Disambiguation, @@ -83,38 +84,139 @@ /// The native Rust implementation of a Temporal `ZonedDateTime`. /// -/// A `ZonedDateTime` represents a date and time in a specific time -/// zone and calendar. A `ZonedDateTime` is represented as an instant -/// of unix epoch nanoseconds with a calendar, and a time zone. +/// A `ZonedDateTime` represents a date and time in a specific time zone and calendar. +/// Unlike `PlainDateTime`, it represents an exact moment in time by combining a +/// `PlainDateTime` with time zone information. It is internally represented as +/// an instant (epoch nanoseconds) along with calendar and time zone data. /// -/// ## Time zone provider` API +/// Since `ZonedDateTime` includes timezone information, it can handle daylight saving time +/// transitions and timezone offset changes automatically. The type requires a timezone +/// data provider (implementing `TimeZoneProvider`) for most operations, which supplies +/// the necessary timezone rules and historical data. /// -/// The core implementation of `ZonedDateTime` are primarily time zone -/// provider APIs denoted by a `*_with_provider` suffix. This means a -/// provider that implements the `TimeZoneProvider` trait must be provided. +/// Unlike `PlainDateTime` which can be ambiguous during DST transitions, `ZonedDateTime` +/// always represents an unambiguous moment in time. /// -/// A default file system time zone provider, `FsTzdbProvider`, can be -/// enabled with the `tzdb` feature flag. +/// ## Time zone provider API /// -/// The non time zone provider API, which is a default implementation of the -/// methods using `FsTzdbProvider` can be enabled with the `compiled_data` -/// feature flag. +/// The core implementation of `ZonedDateTime` uses time zone provider APIs denoted by +/// a `*_with_provider` suffix. This means a provider that implements the `TimeZoneProvider` +/// trait must be provided for timezone-aware operations. /// -/// ## Example +/// Time zone providers available: +/// - **File system provider**: `FsTzdbProvider` (enabled with `tzdb` feature) +/// - **Compiled data provider**: Default implementation (enabled with `compiled_data` feature) +/// +/// ## Examples +/// +/// ### Creating a ZonedDateTime /// /// ```rust /// use temporal_rs::{Calendar, Instant, TimeZone, ZonedDateTime}; /// -/// let zoned_date_time = ZonedDateTime::try_new( -/// 0, -/// Calendar::default(), -/// TimeZone::default(), +/// // Create from epoch nanoseconds +/// let zdt = ZonedDateTime::try_new( +/// 0, // epoch nanoseconds (Unix epoch) +/// Calendar::default(), // ISO 8601 calendar +/// TimeZone::default(), // UTC timezone /// ).unwrap(); /// -/// assert_eq!(zoned_date_time.epoch_milliseconds(), 0); -/// assert_eq!(zoned_date_time.epoch_nanoseconds().as_i128(), 0); -/// assert_eq!(zoned_date_time.timezone().identifier().unwrap(), "UTC"); -/// assert_eq!(zoned_date_time.calendar().identifier(), "iso8601"); +/// assert_eq!(zdt.epoch_milliseconds(), 0); +/// assert_eq!(zdt.epoch_nanoseconds().as_i128(), 0); +/// assert_eq!(zdt.timezone().identifier().unwrap(), "UTC"); +/// assert_eq!(zdt.calendar().identifier(), "iso8601"); +/// ``` +/// +/// ### Working with timezones (requires provider) +/// +/// ```rust,ignore +/// use temporal_rs::{ZonedDateTime, TimeZone, tzdb::FsTzdbProvider}; +/// +/// let provider = FsTzdbProvider::default(); +/// let tz = TimeZone::try_from_str("America/New_York").unwrap(); +/// let zdt = ZonedDateTime::try_new( +/// 1609459200000000000, // 2021-01-01T00:00:00Z +/// Calendar::default(), +/// tz, +/// ).unwrap(); +/// +/// // Get local time in New York timezone +/// let year = zdt.year_with_provider(&provider).unwrap(); +/// let month = zdt.month_with_provider(&provider).unwrap(); +/// let day = zdt.day_with_provider(&provider).unwrap(); +/// let hour = zdt.hour_with_provider(&provider).unwrap(); +/// +/// // Note: This would be December 31, 2020 19:00 in New York (EST) +/// assert_eq!(year, 2020); +/// assert_eq!(month, 12); +/// assert_eq!(day, 31); +/// assert_eq!(hour, 19); +/// ``` +/// +/// ### ZonedDateTime arithmetic (requires provider) +/// +/// ```rust,ignore +/// use temporal_rs::{ZonedDateTime, Duration, TimeZone, tzdb::FsTzdbProvider}; +/// +/// let provider = FsTzdbProvider::default(); +/// let tz = TimeZone::try_from_str("Europe/London").unwrap(); +/// let zdt = ZonedDateTime::try_new( +/// 1609459200000000000, // 2021-01-01T00:00:00Z +/// Calendar::default(), +/// tz, +/// ).unwrap(); +/// +/// // Add 6 months +/// let later = zdt.add_with_provider( +/// &Duration::from_str("P6M").unwrap(), +/// None, +/// &provider +/// ).unwrap(); +/// +/// let later_month = later.month_with_provider(&provider).unwrap(); +/// assert_eq!(later_month, 7); // July +/// ``` +/// +/// ### Converting from PlainDateTime +/// +/// ```rust,ignore +/// use temporal_rs::{PlainDateTime, ZonedDateTime, TimeZone, options::Disambiguation, tzdb::FsTzdbProvider}; +/// +/// let provider = FsTzdbProvider::default(); +/// let dt = PlainDateTime::from_str("2024-03-15T14:30:00").unwrap(); +/// let tz = TimeZone::try_from_str("America/Los_Angeles").unwrap(); +/// +/// let zdt = dt.to_zoned_date_time_with_provider( +/// &tz, +/// Disambiguation::Compatible, +/// &provider +/// ).unwrap(); +/// +/// // Now we have an exact moment in time in the LA timezone +/// assert_eq!(zdt.timezone().identifier().unwrap(), "America/Los_Angeles"); +/// ``` +/// +/// ### String formatting (requires provider) +/// +/// ```rust,ignore +/// use temporal_rs::{ZonedDateTime, TimeZone, options::ToStringRoundingOptions, tzdb::FsTzdbProvider}; +/// +/// let provider = FsTzdbProvider::default(); +/// let zdt = ZonedDateTime::try_new( +/// 1609459200000000000, +/// Calendar::default(), +/// TimeZone::try_from_str("Asia/Tokyo").unwrap(), +/// ).unwrap(); +/// +/// let iso_string = zdt.to_ixdtf_string_with_provider( +/// ToStringRoundingOptions::default(), +/// &provider +/// ).unwrap(); +/// +/// // Results in something like "2021-01-01T09:00:00+09:00[Asia/Tokyo]" +/// assert!(iso_string.contains("2021-01-01")); +/// assert!(iso_string.contains("+09:00")); +/// assert!(iso_string.contains("[Asia/Tokyo]")); /// ``` /// /// ## Reference @@ -165,8 +267,9 @@ let intermediate = IsoDateTime::new_unchecked(added_date.iso, iso_datetime.time); // 5. If ISODateTimeWithinLimits(intermediateDateTime) is false, throw a RangeError exception. if !intermediate.is_within_limits() { - return Err(TemporalError::range() - .with_message("Intermediate ISO datetime was not within a valid range.")); + return Err( + TemporalError::range().with_enum(ErrorMessage::IntermediateDateTimeOutOfRange) + ); } // 6. Let intermediateNs be ! GetEpochNanosecondsFor(timeZone, intermediateDateTime, compatible). let intermediate_ns = self.timezone().get_epoch_nanoseconds_for( @@ -364,8 +467,7 @@ // NOTE: for order of operations, this should be asserted prior to this point // by any engine implementors, but asserting out of caution. if self.calendar != other.calendar { - return Err(TemporalError::range() - .with_message("Calendar must be the same when diffing two ZonedDateTimes")); + return Err(TemporalError::range().with_enum(ErrorMessage::CalendarMismatch)); } // 4. Set settings be ? GetDifferenceSettings(operation, resolvedOptions, datetime, « », nanosecond, hour). @@ -399,8 +501,7 @@ // 7. If TimeZoneEquals(zonedDateTime.[[TimeZone]], other.[[TimeZone]]) is false, then if self.tz != other.tz { // a. Throw a RangeError exception. - return Err(TemporalError::range() - .with_message("Time zones cannot be different if unit is a date unit.")); + return Err(TemporalError::range().with_enum(ErrorMessage::TzMismatch)); } // 8. If zonedDateTime.[[EpochNanoseconds]] = other.[[EpochNanoseconds]], then @@ -1092,8 +1193,7 @@ let start_ns = self.tz.get_start_of_day(&iso_start.date, provider)?; let end_ns = self.tz.get_start_of_day(&iso_end, provider)?; if !(this_ns.0 >= start_ns.0 && this_ns.0 < end_ns.0) { - return Err(TemporalError::range() - .with_message("ZonedDateTime is outside the expected day bounds")); + return Err(TemporalError::range().with_enum(ErrorMessage::ZDTOutOfDayBounds)); } // g. Let dayLengthNs be ℝ(endNs - startNs). // h. Let dayProgressNs be TimeDurationFromEpochNanosecondsDifference(thisNs, startNs). @@ -1223,9 +1323,7 @@ .transpose()?; let Some(parsed_date) = parse_result.date else { - return Err( - TemporalError::range().with_message("No valid DateRecord Parse Node was found.") - ); + return Err(TemporalError::range().with_enum(ErrorMessage::ParserNeedsDate)); }; let date = IsoDate::new_with_overflow( @@ -1345,8 +1443,9 @@ // 11. If offsetOption is reject, throw a RangeError exception. if offset_option == OffsetDisambiguation::Reject { - return Err(TemporalError::range() - .with_message("Offsets could not be determined without disambiguation")); + return Err( + TemporalError::range().with_enum(ErrorMessage::OffsetNeedsDisambiguation) + ); } // 12. Return ? DisambiguatePossibleEpochNanoseconds(possibleEpochNs, timeZone, isoDateTime, disambiguation). timezone.disambiguate_possible_epoch_nanos(
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/mod.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/mod.rs new file mode 100644 index 0000000..76fa8d0 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/mod.rs
@@ -0,0 +1,21 @@ +//! The builtins module contains the main implementation of the Temporal builtins + +#[cfg(feature = "compiled_data")] +pub mod compiled; +pub mod core; + +pub use core::*; + +#[cfg(feature = "compiled_data")] +use crate::tzdb::CompiledTzdbProvider; +#[cfg(all(test, feature = "compiled_data"))] +use crate::tzdb::FsTzdbProvider; +#[cfg(feature = "compiled_data")] +use std::sync::LazyLock; + +#[cfg(feature = "compiled_data")] +pub static TZ_PROVIDER: LazyLock<CompiledTzdbProvider> = + LazyLock::new(CompiledTzdbProvider::default); + +#[cfg(all(test, feature = "compiled_data"))] +pub(crate) static FS_TZ_PROVIDER: LazyLock<FsTzdbProvider> = LazyLock::new(FsTzdbProvider::default);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/epoch_nanoseconds.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/epoch_nanoseconds.rs similarity index 72% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/epoch_nanoseconds.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/epoch_nanoseconds.rs index 02dd1429..0a931ba 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/epoch_nanoseconds.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/epoch_nanoseconds.rs
@@ -1,6 +1,6 @@ use num_traits::FromPrimitive; -use crate::{TemporalError, NS_MAX_INSTANT}; +use crate::{error::ErrorMessage, TemporalError, NS_MAX_INSTANT}; #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub struct EpochNanoseconds(pub(crate) i128); @@ -9,8 +9,7 @@ type Error = TemporalError; fn try_from(value: i128) -> Result<Self, Self::Error> { if !is_valid_epoch_nanos(&value) { - return Err(TemporalError::range() - .with_message("Instant nanoseconds are not within a valid epoch range.")); + return Err(TemporalError::range().with_enum(ErrorMessage::InstantOutOfRange)); } Ok(Self(value)) } @@ -20,8 +19,7 @@ type Error = TemporalError; fn try_from(value: u128) -> Result<Self, Self::Error> { if (NS_MAX_INSTANT as u128) < value { - return Err(TemporalError::range() - .with_message("Instant nanoseconds are not within a valid epoch range.")); + return Err(TemporalError::range().with_enum(ErrorMessage::InstantOutOfRange)); } Ok(Self(value as i128)) } @@ -31,8 +29,7 @@ type Error = TemporalError; fn try_from(value: f64) -> Result<Self, Self::Error> { let Some(value) = i128::from_f64(value) else { - return Err(TemporalError::range() - .with_message("Instant nanoseconds are not within a valid epoch range.")); + return Err(TemporalError::range().with_enum(ErrorMessage::InstantOutOfRange)); }; Self::try_from(value) }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/error.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/error.rs new file mode 100644 index 0000000..0753eb5d --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/error.rs
@@ -0,0 +1,234 @@ +//! This module implements `TemporalError`. + +use alloc::borrow::Cow; +use alloc::format; +use core::fmt; + +use icu_calendar::DateError; + +/// `TemporalError`'s error type. +#[derive(Debug, Default, Clone, Copy, PartialEq)] +pub enum ErrorKind { + /// Error. + #[default] + Generic, + /// TypeError + Type, + /// RangeError + Range, + /// SyntaxError + Syntax, + /// Assert + Assert, +} + +impl fmt::Display for ErrorKind { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Generic => "Error", + Self::Type => "TypeError", + Self::Range => "RangeError", + Self::Syntax => "SyntaxError", + Self::Assert => "ImplementationError", + } + .fmt(f) + } +} + +/// The error type for `boa_temporal`. +#[derive(Debug, Clone, PartialEq)] +pub struct TemporalError { + kind: ErrorKind, + msg: Cow<'static, str>, +} + +impl TemporalError { + #[inline] + #[must_use] + const fn new(kind: ErrorKind) -> Self { + Self { + kind, + msg: Cow::Borrowed(""), + } + } + + /// Create a generic error + #[inline] + #[must_use] + pub fn general<S>(msg: S) -> Self + where + S: Into<Cow<'static, str>>, + { + Self::new(ErrorKind::Generic).with_message(msg) + } + + /// Create a range error. + #[inline] + #[must_use] + pub const fn range() -> Self { + Self::new(ErrorKind::Range) + } + + /// Create a type error. + #[inline] + #[must_use] + pub const fn r#type() -> Self { + Self::new(ErrorKind::Type) + } + + /// Create a syntax error. + #[inline] + #[must_use] + pub const fn syntax() -> Self { + Self::new(ErrorKind::Syntax) + } + + /// Creates an assertion error + #[inline] + #[must_use] + pub(crate) const fn assert() -> Self { + Self::new(ErrorKind::Assert) + } + + /// Create an abrupt end error. + #[inline] + #[must_use] + pub fn abrupt_end() -> Self { + Self::syntax().with_message("Abrupt end to parsing target.") + } + + /// Add a message to the error. + #[inline] + #[must_use] + pub fn with_message<S>(mut self, msg: S) -> Self + where + S: Into<Cow<'static, str>>, + { + self.msg = msg.into(); + self + } + + /// Add a message enum to the error. + #[inline] + #[must_use] + pub(crate) fn with_enum(mut self, msg: ErrorMessage) -> Self { + self.msg = msg.to_string().into(); + self + } + + /// Returns this error's kind. + #[inline] + #[must_use] + pub const fn kind(&self) -> ErrorKind { + self.kind + } + + /// Returns the error message. + #[inline] + #[must_use] + pub fn message(&self) -> &str { + &self.msg + } + + /// Extracts the error message. + #[inline] + #[must_use] + pub fn into_message(self) -> Cow<'static, str> { + self.msg + } + + pub fn from_icu4x(error: DateError) -> Self { + TemporalError::range().with_message(format!("{error}")) + } +} + +impl fmt::Display for TemporalError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.kind)?; + + let msg = self.msg.trim(); + if !msg.is_empty() { + write!(f, ": {msg}")?; + } + + Ok(()) + } +} + +/// The error message +#[derive(Clone, Copy, PartialEq, Eq)] +pub(crate) enum ErrorMessage { + // Range + InstantOutOfRange, + IntermediateDateTimeOutOfRange, + ZDTOutOfDayBounds, + + // Numerical errors + NumberNotFinite, + NumberNotIntegral, + NumberNotPositive, + NumberOutOfRange, + FractionalDigitsPrecisionInvalid, + + // Options validity + SmallestUnitNotTimeUnit, + SmallestUnitLargerThanLargestUnit, + UnitNotDate, + UnitNotTime, + UnitRequired, + UnitNoAutoDuringComparison, + RoundToUnitInvalid, + RoundingModeInvalid, + CalendarNameInvalid, + OffsetOptionInvalid, + TimeZoneNameInvalid, + + // Field mismatches + CalendarMismatch, + TzMismatch, + + // Parsing + ParserNeedsDate, + + // Other + OffsetNeedsDisambiguation, +} + +impl ErrorMessage { + pub fn to_string(self) -> &'static str { + match self { + Self::InstantOutOfRange => "Instant nanoseconds are not within a valid epoch range.", + Self::IntermediateDateTimeOutOfRange => { + "Intermediate ISO datetime was not within a valid range." + } + Self::ZDTOutOfDayBounds => "ZonedDateTime is outside the expected day bounds", + Self::NumberNotFinite => "number value is not a finite value.", + Self::NumberNotIntegral => "value must be integral.", + Self::NumberNotPositive => "integer must be positive.", + Self::NumberOutOfRange => "number exceeded a valid range.", + Self::FractionalDigitsPrecisionInvalid => "Invalid fractionalDigits precision value", + Self::SmallestUnitNotTimeUnit => "smallestUnit must be a valid time unit.", + Self::SmallestUnitLargerThanLargestUnit => { + "smallestUnit was larger than largestunit in DifferenceeSettings" + } + Self::UnitNotDate => "Unit was not part of the date unit group.", + Self::UnitNotTime => "Unit was not part of the time unit group.", + Self::UnitRequired => "Unit is required", + Self::UnitNoAutoDuringComparison => "'auto' units are not allowed during comparison", + Self::RoundToUnitInvalid => "Invalid roundTo unit provided.", + Self::RoundingModeInvalid => "Invalid roundingMode option provided", + Self::CalendarNameInvalid => "Invalid calendarName option provided", + Self::OffsetOptionInvalid => "Invalid offsetOption option provided", + Self::TimeZoneNameInvalid => "Invalid timeZoneName option provided", + Self::CalendarMismatch => { + "Calendar must be the same for operations involving two calendared types." + } + Self::TzMismatch => "Timezones must be the same if unit is a day unit.", + + Self::ParserNeedsDate => "Could not find a valid DateRecord node during parsing.", + Self::OffsetNeedsDisambiguation => { + "Offsets could not be determined without disambiguation" + } + } + } +}
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/iso.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/iso.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/iso.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/iso.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/lib.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/lib.rs similarity index 97% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/lib.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/lib.rs index e604a4f..76aa36a 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/lib.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/lib.rs
@@ -166,8 +166,9 @@ //! //! The partial records are `temporal_rs`'s method of addressing //! `TemporalFields` in the specification. - pub use crate::builtins::{ - core::PartialDuration, PartialDate, PartialDateTime, PartialTime, PartialZonedDateTime, + pub use crate::builtins::core::{ + PartialDate, PartialDateTime, PartialDuration, PartialTime, PartialYearMonth, + PartialZonedDateTime, }; }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options.rs similarity index 88% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options.rs index 0db9c93..f926db7 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options.rs
@@ -4,7 +4,7 @@ //! operation may be completed. use crate::parsers::Precision; -use crate::{TemporalError, TemporalResult, MS_PER_DAY, NS_PER_DAY}; +use crate::{error::ErrorMessage, TemporalError, TemporalResult, MS_PER_DAY, NS_PER_DAY}; use core::ops::Add; use core::{fmt, str::FromStr}; @@ -71,54 +71,50 @@ rounding_mode, increment: RoundingIncrement::ONE, }), - None => { - match self.precision { - Precision::Auto => Ok(ResolvedToStringRoundingOptions { - precision: Precision::Auto, + None => match self.precision { + Precision::Auto => Ok(ResolvedToStringRoundingOptions { + precision: Precision::Auto, + smallest_unit: Unit::Nanosecond, + rounding_mode, + increment: RoundingIncrement::ONE, + }), + Precision::Digit(0) => Ok(ResolvedToStringRoundingOptions { + precision: Precision::Digit(0), + smallest_unit: Unit::Second, + rounding_mode, + increment: RoundingIncrement::ONE, + }), + Precision::Digit(d) if (1..=3).contains(&d) => { + Ok(ResolvedToStringRoundingOptions { + precision: Precision::Digit(d), + smallest_unit: Unit::Millisecond, + rounding_mode, + increment: RoundingIncrement::try_new(10_u32.pow(3 - d as u32)) + .expect("a valid increment"), + }) + } + Precision::Digit(d) if (4..=6).contains(&d) => { + Ok(ResolvedToStringRoundingOptions { + precision: Precision::Digit(d), + smallest_unit: Unit::Microsecond, + rounding_mode, + increment: RoundingIncrement::try_new(10_u32.pow(6 - d as u32)) + .expect("a valid increment"), + }) + } + Precision::Digit(d) if (7..=9).contains(&d) => { + Ok(ResolvedToStringRoundingOptions { + precision: Precision::Digit(d), smallest_unit: Unit::Nanosecond, rounding_mode, - increment: RoundingIncrement::ONE, - }), - Precision::Digit(0) => Ok(ResolvedToStringRoundingOptions { - precision: Precision::Digit(0), - smallest_unit: Unit::Second, - rounding_mode, - increment: RoundingIncrement::ONE, - }), - Precision::Digit(d) if (1..=3).contains(&d) => { - Ok(ResolvedToStringRoundingOptions { - precision: Precision::Digit(d), - smallest_unit: Unit::Millisecond, - rounding_mode, - increment: RoundingIncrement::try_new(10_u32.pow(3 - d as u32)) - .expect("a valid increment"), - }) - } - Precision::Digit(d) if (4..=6).contains(&d) => { - Ok(ResolvedToStringRoundingOptions { - precision: Precision::Digit(d), - smallest_unit: Unit::Microsecond, - rounding_mode, - increment: RoundingIncrement::try_new(10_u32.pow(6 - d as u32)) - .expect("a valid increment"), - }) - } - Precision::Digit(d) if (7..=9).contains(&d) => { - Ok(ResolvedToStringRoundingOptions { - precision: Precision::Digit(d), - smallest_unit: Unit::Nanosecond, - rounding_mode, - increment: RoundingIncrement::try_new(10_u32.pow(9 - d as u32)) - .expect("a valid increment"), - }) - } - _ => Err(TemporalError::range() - .with_message("Invalid fractionalDigits precision value")), + increment: RoundingIncrement::try_new(10_u32.pow(9 - d as u32)) + .expect("a valid increment"), + }) } - } - _ => { - Err(TemporalError::range().with_message("smallestUnit must be a valid time unit.")) - } + _ => Err(TemporalError::range() + .with_enum(ErrorMessage::FractionalDigitsPrecisionInvalid)), + }, + _ => Err(TemporalError::range().with_enum(ErrorMessage::SmallestUnitNotTimeUnit)), } } } @@ -212,8 +208,9 @@ .unwrap_unit_or(smallest_unit.max(fallback_largest)); // 11. If LargerOfTwoUnits(largestUnit, smallestUnit) is not largestUnit, throw a RangeError exception. if largest_unit < smallest_unit { - return Err(TemporalError::range() - .with_message("smallestUnit was larger than largestunit in DifferenceeSettings")); + return Err( + TemporalError::range().with_enum(ErrorMessage::SmallestUnitLargerThanLargestUnit) + ); } // 12. Let maximum be MaximumTemporalDurationRoundingIncrement(smallestUnit). @@ -243,7 +240,7 @@ } else { let maximum = smallest_unit .to_maximum_rounding_increment() - .ok_or(TemporalError::range().with_message("smallestUnit must be a time unit."))?; + .ok_or(TemporalError::range().with_enum(ErrorMessage::SmallestUnitNotTimeUnit))?; (maximum, false) }; @@ -268,7 +265,7 @@ Unit::Millisecond => MS_PER_DAY as u64, Unit::Microsecond => MS_PER_DAY as u64 * 1000, Unit::Nanosecond => NS_PER_DAY, - _ => return Err(TemporalError::range().with_message("Invalid roundTo unit provided.")), + _ => return Err(TemporalError::range().with_enum(ErrorMessage::RoundToUnitInvalid)), }; increment.validate(maximum, true)?; @@ -302,7 +299,7 @@ extra_unit: Option<Unit>, ) -> TemporalResult<Unit> { let Some(unit) = unit else { - return Err(TemporalError::range().with_message("Unit is required.")); + return Err(TemporalError::range().with_enum(ErrorMessage::UnitRequired)); }; self.validate_unit(Some(unit), extra_unit)?; Ok(unit) @@ -315,15 +312,13 @@ Some(unit) if !unit.is_time_unit() => Ok(()), None => Ok(()), _ if unit == extra_unit => Ok(()), - _ => Err(TemporalError::range() - .with_message("Unit was not part of the date unit group.")), + _ => Err(TemporalError::range().with_enum(ErrorMessage::UnitNotDate)), }, UnitGroup::Time => match unit { Some(unit) if unit.is_time_unit() => Ok(()), None => Ok(()), _ if unit == extra_unit => Ok(()), - _ => Err(TemporalError::range() - .with_message("Unit was not part of the time unit group.")), + _ => Err(TemporalError::range().with_enum(ErrorMessage::UnitNotTime)), }, UnitGroup::DateTime => Ok(()), } @@ -473,7 +468,7 @@ } // NOTE(HalidOdat): deviation from specification. - Err(TemporalError::assert().with_message("auto cannot be used for comparison")) + Err(TemporalError::assert().with_enum(ErrorMessage::UnitNoAutoDuringComparison)) } /// Helper method for getting the index into the [`UNIT_VALUE_TABLE`]. @@ -494,8 +489,7 @@ } } - Err(TemporalError::assert() - .with_message("auto does not exist in the spec Table 21 Value column")) + Err(TemporalError::assert().with_enum(ErrorMessage::UnitNoAutoDuringComparison)) } } @@ -875,7 +869,7 @@ "halfExpand" => Ok(Self::HalfExpand), "halfTrunc" => Ok(Self::HalfTrunc), "halfEven" => Ok(Self::HalfEven), - _ => Err(TemporalError::range().with_message("RoundingMode not an accepted value.")), + _ => Err(TemporalError::range().with_enum(ErrorMessage::RoundingModeInvalid)), } } } @@ -933,7 +927,7 @@ "always" => Ok(Self::Always), "never" => Ok(Self::Never), "critical" => Ok(Self::Critical), - _ => Err(TemporalError::range().with_message("Invalid calendarName provided.")), + _ => Err(TemporalError::range().with_enum(ErrorMessage::CalendarNameInvalid)), } } } @@ -962,7 +956,7 @@ match s { "auto" => Ok(Self::Auto), "never" => Ok(Self::Never), - _ => Err(TemporalError::range().with_message("Invalid offset option provided.")), + _ => Err(TemporalError::range().with_enum(ErrorMessage::OffsetOptionInvalid)), } } } @@ -997,7 +991,7 @@ "auto" => Ok(Self::Auto), "never" => Ok(Self::Never), "critical" => Ok(Self::Critical), - _ => Err(TemporalError::range().with_message("Invalid timeZoneName option provided.")), + _ => Err(TemporalError::range().with_enum(ErrorMessage::TimeZoneNameInvalid)), } } }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options/increment.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options/increment.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options/increment.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options/increment.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options/relative_to.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options/relative_to.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options/relative_to.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options/relative_to.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/parsers.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/parsers.rs similarity index 99% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/parsers.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/parsers.rs index 6695caf..233007a 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/parsers.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/parsers.rs
@@ -91,7 +91,7 @@ } } -impl<'a> Writeable for IxdtfStringBuilder<'a> { +impl Writeable for IxdtfStringBuilder<'_> { fn write_to<W: core::fmt::Write + ?Sized>(&self, sink: &mut W) -> core::fmt::Result { self.inner.write_to(sink) }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/parsers/timezone.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/parsers/timezone.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/parsers/timezone.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/parsers/timezone.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/primitive.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/primitive.rs similarity index 91% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/primitive.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/primitive.rs index ab8c401..89d6cc8 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/primitive.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/primitive.rs
@@ -2,7 +2,7 @@ use core::cmp::Ordering; -use crate::{TemporalError, TemporalResult}; +use crate::{error::ErrorMessage, TemporalError, TemporalResult}; use num_traits::float::FloatCore; use num_traits::{AsPrimitive, FromPrimitive, PrimInt}; @@ -44,7 +44,7 @@ pub fn checked_add(&self, other: &Self) -> TemporalResult<Self> { let result = Self(self.0 + other.0); if !result.0.is_finite() { - return Err(TemporalError::range().with_message("number value is not a finite value.")); + return Err(TemporalError::range().with_enum(ErrorMessage::NumberNotFinite)); } Ok(result) } @@ -53,7 +53,7 @@ pub fn checked_mul_add(&self, a: FiniteF64, b: FiniteF64) -> TemporalResult<Self> { let result = Self(core_maths::CoreFloat::mul_add(self.0, a.0, b.0)); if !result.0.is_finite() { - return Err(TemporalError::range().with_message("number value is not a finite value.")); + return Err(TemporalError::range().with_enum(ErrorMessage::NumberNotFinite)); } Ok(result) } @@ -62,7 +62,7 @@ pub fn checked_div(&self, other: &Self) -> TemporalResult<Self> { let result = Self(self.0 / other.0); if !result.0.is_finite() { - return Err(TemporalError::range().with_message("number value is not a finite value.")); + return Err(TemporalError::range().with_enum(ErrorMessage::NumberNotFinite)); } Ok(result) } @@ -81,7 +81,7 @@ f64: AsPrimitive<T>, { if self.0 != FloatCore::trunc(self.0) { - return Err(TemporalError::range().with_message("value must be integral.")); + return Err(TemporalError::range().with_enum(ErrorMessage::NumberNotIntegral)); } Ok(self.0.as_()) } @@ -106,7 +106,7 @@ { let truncated_value = self.as_integer_with_truncation::<T>(); if truncated_value <= 0i8.as_() { - return Err(TemporalError::range().with_message("integer must be positive.")); + return Err(TemporalError::range().with_enum(ErrorMessage::NumberNotPositive)); } Ok(truncated_value) } @@ -128,7 +128,7 @@ type Error = TemporalError; fn try_from(value: f64) -> Result<Self, Self::Error> { if !value.is_finite() { - return Err(TemporalError::range().with_message("number value is not a finite value.")); + return Err(TemporalError::range().with_enum(ErrorMessage::NumberNotFinite)); } Ok(Self(value)) } @@ -138,7 +138,7 @@ type Error = TemporalError; fn try_from(value: i64) -> Result<Self, Self::Error> { let result = f64::from_i64(value) - .ok_or(TemporalError::range().with_message("number exceeded a valid range."))?; + .ok_or(TemporalError::range().with_enum(ErrorMessage::NumberOutOfRange))?; Ok(Self(result)) } } @@ -147,7 +147,7 @@ type Error = TemporalError; fn try_from(value: u64) -> Result<Self, Self::Error> { let result = f64::from_u64(value) - .ok_or(TemporalError::range().with_message("number exceeded a valid range."))?; + .ok_or(TemporalError::range().with_enum(ErrorMessage::NumberOutOfRange))?; Ok(Self(result)) } } @@ -156,7 +156,7 @@ type Error = TemporalError; fn try_from(value: i128) -> Result<Self, Self::Error> { let result = f64::from_i128(value) - .ok_or(TemporalError::range().with_message("number exceeded a valid range."))?; + .ok_or(TemporalError::range().with_enum(ErrorMessage::NumberOutOfRange))?; debug_assert!(result.is_finite()); Ok(Self(result)) } @@ -166,7 +166,7 @@ type Error = TemporalError; fn try_from(value: u128) -> Result<Self, Self::Error> { let result = f64::from_u128(value) - .ok_or(TemporalError::range().with_message("number exceeded a valid range."))?; + .ok_or(TemporalError::range().with_enum(ErrorMessage::NumberOutOfRange))?; debug_assert!(result.is_finite()); Ok(Self(result)) }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/provider.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/provider.rs similarity index 83% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/provider.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/provider.rs index 565f9d1..5fc0db3 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/provider.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/provider.rs
@@ -5,13 +5,17 @@ use crate::{iso::IsoDateTime, unix_time::EpochNanoseconds, TemporalResult}; use alloc::vec::Vec; -/// `TimeZoneOffset` represents the number of seconds to be added to UT in order to determine local time. +/// `UtcOffsetSeconds` represents the amount of seconds we need to add to the UTC to reach the local time. #[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct TimeZoneOffset { +pub struct UtcOffsetSeconds(pub i64); + +/// `TimeZoneTransitionInfo` represents information about a timezone transition. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct TimeZoneTransitionInfo { /// The transition time epoch at which the offset needs to be applied. pub transition_epoch: Option<i64>, /// The time zone offset in seconds. - pub offset: i64, + pub offset: UtcOffsetSeconds, } #[derive(Debug, Clone, Copy, PartialEq)] @@ -67,7 +71,7 @@ &self, identifier: &str, epoch_nanoseconds: i128, - ) -> TemporalResult<TimeZoneOffset>; + ) -> TemporalResult<TimeZoneTransitionInfo>; // TODO: implement and stabalize fn get_named_tz_transition( @@ -93,7 +97,11 @@ unimplemented!() } - fn get_named_tz_offset_nanoseconds(&self, _: &str, _: i128) -> TemporalResult<TimeZoneOffset> { + fn get_named_tz_offset_nanoseconds( + &self, + _: &str, + _: i128, + ) -> TemporalResult<TimeZoneTransitionInfo> { unimplemented!() }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/rounding.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/rounding.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/rounding.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/rounding.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/sys.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/sys.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/sys.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/sys.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/tzdb.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/tzdb.rs similarity index 85% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/tzdb.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/tzdb.rs index 0d94759..4fcc3ccf 100644 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/tzdb.rs +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/tzdb.rs
@@ -43,7 +43,7 @@ use tzif::{ self, data::{ - posix::{DstTransitionInfo, PosixTzString, TransitionDay, ZoneVariantInfo}, + posix::{DstTransitionInfo, PosixTzString, TimeZoneVariantInfo, TransitionDay}, time::Seconds, tzif::{DataBlock, LocalTimeTypeRecord, TzifData, TzifHeader}, }, @@ -51,7 +51,7 @@ use crate::{ iso::IsoDateTime, - provider::{TimeZoneOffset, TimeZoneProvider, TransitionDirection}, + provider::{TimeZoneProvider, TimeZoneTransitionInfo, TransitionDirection, UtcOffsetSeconds}, unix_time::EpochNanoseconds, utils, TemporalError, TemporalResult, }; @@ -61,37 +61,15 @@ #[cfg(target_family = "unix")] const ZONEINFO_DIR: &str = "/usr/share/zoneinfo/"; -/// `LocalTimeRecord` represents an local time offset record. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct LocalTimeRecord { - /// Whether the local time record is a Daylight Savings Time. - pub is_dst: bool, - /// The time zone offset in seconds. - pub offset: i64, -} - -impl LocalTimeRecord { - fn from_daylight_savings_time(info: &ZoneVariantInfo) -> Self { - Self { - is_dst: true, - offset: -info.offset.0, - } - } - - fn from_standard_time(info: &ZoneVariantInfo) -> Self { - Self { - is_dst: false, - offset: -info.offset.0, - } +impl From<&TimeZoneVariantInfo> for UtcOffsetSeconds { + fn from(value: &TimeZoneVariantInfo) -> Self { + Self(-value.offset.0) } } -impl From<LocalTimeTypeRecord> for LocalTimeRecord { +impl From<LocalTimeTypeRecord> for UtcOffsetSeconds { fn from(value: LocalTimeTypeRecord) -> Self { - Self { - is_dst: value.is_dst, - offset: value.utoff.0, - } + Self(value.utoff.0) } } @@ -106,17 +84,17 @@ #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum LocalTimeRecordResult { Empty, - Single(LocalTimeRecord), + Single(UtcOffsetSeconds), // Note(nekevss): it may be best to switch this to initial, need to double check // disambiguation ops with inverse DST-STD relationship Ambiguous { - std: LocalTimeRecord, - dst: LocalTimeRecord, + std: UtcOffsetSeconds, + dst: UtcOffsetSeconds, }, } -impl From<LocalTimeRecord> for LocalTimeRecordResult { - fn from(value: LocalTimeRecord) -> Self { +impl From<UtcOffsetSeconds> for LocalTimeRecordResult { + fn from(value: UtcOffsetSeconds) -> Self { Self::Single(value) } } @@ -189,12 +167,19 @@ #[cfg(target_family = "unix")] pub fn read_tzif(identifier: &str) -> TemporalResult<Self> { + // Protect from path traversal attacks + if identifier.starts_with('/') || identifier.contains('.') { + return Err(TemporalError::range().with_message("Ill-formed timezone identifier")); + } let mut path = PathBuf::from(ZONEINFO_DIR); path.push(identifier); Self::from_path(&path) } pub fn from_path(path: &Path) -> TemporalResult<Self> { + if !path.exists() { + return Err(TemporalError::range().with_message("Unknown timezone identifier")); + } tzif::parse_tzif_file(path) .map(Into::into) .map_err(|e| TemporalError::general(e.to_string())) @@ -210,7 +195,7 @@ .ok_or(TemporalError::general("Only Tzif V2+ is supported.")) } - pub fn get(&self, epoch_seconds: &Seconds) -> TemporalResult<TimeZoneOffset> { + pub fn get(&self, epoch_seconds: &Seconds) -> TemporalResult<TimeZoneTransitionInfo> { let db = self.get_data_block2()?; let result = db.transition_times.binary_search(epoch_seconds); @@ -225,8 +210,8 @@ if let Some(posix_tz_string) = self.posix_tz_string() { resolve_posix_tz_string_for_epoch_seconds(posix_tz_string, epoch_seconds.0) } else { - Ok(TimeZoneOffset { - offset: db.local_time_type_records[0].utoff.0, + Ok(TimeZoneTransitionInfo { + offset: db.local_time_type_records[0].into(), transition_epoch: None, }) } @@ -317,7 +302,9 @@ // Adjust for offset inversion from northern/southern hemisphere. let offset_range = offset_range(initial_record.utoff.0, next_record.utoff.0); match offset_range.contains(¤t_diff.0) { - true if next_record.is_dst => Ok(LocalTimeRecordResult::Empty), + true if initial_record.utoff.0 < next_record.utoff.0 => { + Ok(LocalTimeRecordResult::Empty) + } true => Ok((next_record, initial_record).into()), false if current_diff <= initial_record.utoff => Ok(initial_record.into()), false => Ok(next_record.into()), @@ -326,13 +313,13 @@ } #[inline] -fn get_timezone_offset(db: &DataBlock, idx: usize) -> TimeZoneOffset { +fn get_timezone_offset(db: &DataBlock, idx: usize) -> TimeZoneTransitionInfo { // NOTE: Transition type can be empty. If no transition_type exists, // then use 0 as the default index of local_time_type_records. let offset = db.local_time_type_records[db.transition_types.get(idx).copied().unwrap_or(0)]; - TimeZoneOffset { + TimeZoneTransitionInfo { transition_epoch: db.transition_times.get(idx).map(|s| s.0), - offset: offset.utoff.0, + offset: offset.into(), } } @@ -347,12 +334,12 @@ fn resolve_posix_tz_string_for_epoch_seconds( posix_tz_string: &PosixTzString, seconds: i64, -) -> TemporalResult<TimeZoneOffset> { +) -> TemporalResult<TimeZoneTransitionInfo> { let Some(dst_variant) = &posix_tz_string.dst_info else { // Regardless of the time, there is one variant and we can return it. - return Ok(TimeZoneOffset { + return Ok(TimeZoneTransitionInfo { transition_epoch: None, - offset: LocalTimeRecord::from_standard_time(&posix_tz_string.std_info).offset, + offset: UtcOffsetSeconds::from(&posix_tz_string.std_info), }); }; @@ -368,15 +355,11 @@ let transition = compute_tz_for_epoch_seconds(is_transition_day, transition, seconds, dst_variant); - let std_offset = LocalTimeRecord::from_standard_time(&posix_tz_string.std_info).offset; - let dst_offset = LocalTimeRecord::from_daylight_savings_time(&dst_variant.variant_info).offset; - let (old_offset, new_offset) = match transition { - TransitionType::Dst => (std_offset, dst_offset), - TransitionType::Std => (dst_offset, std_offset), - }; - let transition = match transition { - TransitionType::Dst => start, - TransitionType::Std => end, + let std_offset = UtcOffsetSeconds::from(&posix_tz_string.std_info); + let dst_offset = UtcOffsetSeconds::from(&dst_variant.variant_info); + let (old_offset, new_offset, transition) = match transition { + TransitionType::Dst => (std_offset, dst_offset, start), + TransitionType::Std => (dst_offset, std_offset, end), }; let year = utils::epoch_time_to_epoch_year(seconds * 1000); let year_epoch = utils::epoch_days_for_year(year) * 86400; @@ -432,8 +415,8 @@ // Transition time is on local time, so we need to add the UTC offset to get the correct UTC timestamp // for the transition. let transition_epoch = - i64::from(year_epoch) + i64::from(days) * 86400 + transition.time.0 - old_offset; - Ok(TimeZoneOffset { + i64::from(year_epoch) + i64::from(days) * 86400 + transition.time.0 - old_offset.0; + Ok(TimeZoneTransitionInfo { offset: new_offset, transition_epoch: Some(transition_epoch), }) @@ -450,7 +433,7 @@ let std = &posix_tz_string.std_info; let Some(dst) = &posix_tz_string.dst_info else { // Regardless of the time, there is one variant and we can return it. - return Ok(LocalTimeRecord::from_standard_time(&posix_tz_string.std_info).into()); + return Ok(UtcOffsetSeconds::from(&posix_tz_string.std_info).into()); }; // TODO: Resolve safety issue around utils. @@ -479,8 +462,8 @@ true if is_dst == TransitionType::Dst => return Ok(LocalTimeRecordResult::Empty), true => { return Ok(LocalTimeRecordResult::Ambiguous { - std: LocalTimeRecord::from_standard_time(std), - dst: LocalTimeRecord::from_daylight_savings_time(&dst.variant_info), + std: UtcOffsetSeconds::from(std), + dst: UtcOffsetSeconds::from(&dst.variant_info), }) } _ => {} @@ -488,12 +471,8 @@ } match is_dst { - TransitionType::Dst => { - Ok(LocalTimeRecord::from_daylight_savings_time(&dst.variant_info).into()) - } - TransitionType::Std => { - Ok(LocalTimeRecord::from_standard_time(&posix_tz_string.std_info).into()) - } + TransitionType::Dst => Ok(UtcOffsetSeconds::from(&dst.variant_info).into()), + TransitionType::Std => Ok(UtcOffsetSeconds::from(&posix_tz_string.std_info).into()), } } @@ -610,6 +589,104 @@ offset_two..offset_one } +/// Timezone provider that uses compiled data. +/// +/// Currently uses jiff_tzdb and performs parsing; will eventually +/// use pure compiled data (<https://github.com/boa-dev/temporal/pull/264>) +#[derive(Debug, Default)] +pub struct CompiledTzdbProvider { + cache: RwLock<BTreeMap<String, Tzif>>, +} + +impl CompiledTzdbProvider { + /// Get timezone data for a single identifier + pub fn get(&self, identifier: &str) -> TemporalResult<Tzif> { + if let Some(tzif) = self + .cache + .read() + .map_err(|_| TemporalError::general("poisoned RWLock"))? + .get(identifier) + { + return Ok(tzif.clone()); + } + + let (identifier, tzif) = { + let Some((canonical_name, data)) = jiff_tzdb::get(identifier) else { + return Err( + TemporalError::range().with_message("Time zone identifier does not exist.") + ); + }; + (canonical_name, Tzif::from_bytes(data)?) + }; + + Ok(self + .cache + .write() + .map_err(|_| TemporalError::general("poisoned RWLock"))? + .entry(identifier.into()) + .or_insert(tzif) + .clone()) + } +} + +impl TimeZoneProvider for CompiledTzdbProvider { + fn check_identifier(&self, identifier: &str) -> bool { + if let Some(index) = SINGLETON_IANA_NORMALIZER.available_id_index.get(identifier) { + return SINGLETON_IANA_NORMALIZER + .normalized_identifiers + .get(index) + .is_some(); + } + false + } + + fn get_named_tz_epoch_nanoseconds( + &self, + identifier: &str, + iso_datetime: IsoDateTime, + ) -> TemporalResult<Vec<EpochNanoseconds>> { + let epoch_nanos = iso_datetime.as_nanoseconds()?; + let seconds = (epoch_nanos.0 / 1_000_000_000) as i64; + let tzif = self.get(identifier)?; + let local_time_record_result = tzif.v2_estimate_tz_pair(&Seconds(seconds))?; + let result = match local_time_record_result { + LocalTimeRecordResult::Empty => Vec::default(), + LocalTimeRecordResult::Single(r) => { + let epoch_ns = + EpochNanoseconds::try_from(epoch_nanos.0 - seconds_to_nanoseconds(r.0))?; + vec![epoch_ns] + } + LocalTimeRecordResult::Ambiguous { std, dst } => { + let std_epoch_ns = + EpochNanoseconds::try_from(epoch_nanos.0 - seconds_to_nanoseconds(std.0))?; + let dst_epoch_ns = + EpochNanoseconds::try_from(epoch_nanos.0 - seconds_to_nanoseconds(dst.0))?; + vec![std_epoch_ns, dst_epoch_ns] + } + }; + Ok(result) + } + + fn get_named_tz_offset_nanoseconds( + &self, + identifier: &str, + utc_epoch: i128, + ) -> TemporalResult<TimeZoneTransitionInfo> { + let tzif = self.get(identifier)?; + let seconds = (utc_epoch / 1_000_000_000) as i64; + tzif.get(&Seconds(seconds)) + } + + fn get_named_tz_transition( + &self, + _identifier: &str, + _epoch_nanoseconds: i128, + _direction: TransitionDirection, + ) -> TemporalResult<Option<EpochNanoseconds>> { + Err(TemporalError::general("Not yet implemented.")) + } +} + #[derive(Debug, Default)] pub struct FsTzdbProvider { cache: RwLock<BTreeMap<String, Tzif>>, @@ -672,14 +749,14 @@ LocalTimeRecordResult::Empty => Vec::default(), LocalTimeRecordResult::Single(r) => { let epoch_ns = - EpochNanoseconds::try_from(epoch_nanos.0 - seconds_to_nanoseconds(r.offset))?; + EpochNanoseconds::try_from(epoch_nanos.0 - seconds_to_nanoseconds(r.0))?; vec![epoch_ns] } LocalTimeRecordResult::Ambiguous { std, dst } => { let std_epoch_ns = - EpochNanoseconds::try_from(epoch_nanos.0 - seconds_to_nanoseconds(std.offset))?; + EpochNanoseconds::try_from(epoch_nanos.0 - seconds_to_nanoseconds(std.0))?; let dst_epoch_ns = - EpochNanoseconds::try_from(epoch_nanos.0 - seconds_to_nanoseconds(dst.offset))?; + EpochNanoseconds::try_from(epoch_nanos.0 - seconds_to_nanoseconds(dst.0))?; vec![std_epoch_ns, dst_epoch_ns] } }; @@ -690,7 +767,7 @@ &self, identifier: &str, utc_epoch: i128, - ) -> TemporalResult<TimeZoneOffset> { + ) -> TemporalResult<TimeZoneTransitionInfo> { let tzif = self.get(identifier)?; let seconds = (utc_epoch / 1_000_000_000) as i64; tzif.get(&Seconds(seconds)) @@ -717,7 +794,7 @@ use crate::{ iso::IsoDateTime, - tzdb::{LocalTimeRecord, LocalTimeRecordResult, TimeZoneProvider}, + tzdb::{LocalTimeRecordResult, TimeZoneProvider, UtcOffsetSeconds}, }; use super::{FsTzdbProvider, Tzif, SINGLETON_IANA_NORMALIZER}; @@ -896,14 +973,8 @@ assert_eq!( locals, LocalTimeRecordResult::Ambiguous { - std: LocalTimeRecord { - is_dst: false, - offset: -18000 - }, - dst: LocalTimeRecord { - is_dst: true, - offset: -14400, - }, + std: UtcOffsetSeconds(-18000), + dst: UtcOffsetSeconds(-14400), } ); } @@ -943,14 +1014,8 @@ assert_eq!( locals, LocalTimeRecordResult::Ambiguous { - std: LocalTimeRecord { - is_dst: false, - offset: 36000 - }, - dst: LocalTimeRecord { - is_dst: true, - offset: 39600, - }, + std: UtcOffsetSeconds(36000), + dst: UtcOffsetSeconds(39600), } ); } @@ -985,14 +1050,8 @@ assert_eq!( locals, LocalTimeRecordResult::Ambiguous { - std: LocalTimeRecord { - is_dst: false, - offset: -18000 - }, - dst: LocalTimeRecord { - is_dst: true, - offset: -14400, - }, + std: UtcOffsetSeconds(-18000), + dst: UtcOffsetSeconds(-14400), } ); } @@ -1026,14 +1085,8 @@ assert_eq!( locals, LocalTimeRecordResult::Ambiguous { - std: LocalTimeRecord { - is_dst: false, - offset: 36000 - }, - dst: LocalTimeRecord { - is_dst: true, - offset: 39600, - }, + std: UtcOffsetSeconds(36000), + dst: UtcOffsetSeconds(39600), } ); }
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/utils.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/utils.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/utils.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/utils.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/utils/neri_schneider.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/utils/neri_schneider.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/utils/neri_schneider.rs rename to third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/utils/neri_schneider.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/tools/README.md b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/tools/README.md new file mode 100644 index 0000000..6d6a355 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/tools/README.md
@@ -0,0 +1,10 @@ +# Tools + +This directory contains various tools for `boa-dev/temporal`. + +| Tool | Description | +| ----------------- | ----------------------------------------------- | +| bakedata | Generates baked data providers | +| depcheck | Dependency check to verify allowed dependencies | +| diplomat-gen | Run and generate FFI bindings | +| zoneinfo-test-gen | Generate testing data for `zoneinfo` |
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/.cargo_vcs_info.json deleted file mode 100644 index 564294d..0000000 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/.cargo_vcs_info.json +++ /dev/null
@@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "44632b0d855dd8136371d40ff99fd7566bc1f0aa" - }, - "path_in_vcs": "" -} \ No newline at end of file
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/mod.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/mod.rs deleted file mode 100644 index bb2fbd7..0000000 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/mod.rs +++ /dev/null
@@ -1,15 +0,0 @@ -//! The builtins module contains the main implementation of the Temporal builtins - -#[cfg(feature = "compiled_data")] -pub mod compiled; -pub mod core; - -pub use core::*; - -#[cfg(feature = "compiled_data")] -use crate::tzdb::FsTzdbProvider; -#[cfg(feature = "compiled_data")] -use std::sync::LazyLock; - -#[cfg(feature = "compiled_data")] -pub static TZ_PROVIDER: LazyLock<FsTzdbProvider> = LazyLock::new(FsTzdbProvider::default);
diff --git a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/error.rs b/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/error.rs deleted file mode 100644 index 5777df2..0000000 --- a/third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/error.rs +++ /dev/null
@@ -1,148 +0,0 @@ -//! This module implements `TemporalError`. - -use alloc::borrow::Cow; -use alloc::format; -use core::fmt; - -use icu_calendar::DateError; - -/// `TemporalError`'s error type. -#[derive(Debug, Default, Clone, Copy, PartialEq)] -pub enum ErrorKind { - /// Error. - #[default] - Generic, - /// TypeError - Type, - /// RangeError - Range, - /// SyntaxError - Syntax, - /// Assert - Assert, -} - -impl fmt::Display for ErrorKind { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::Generic => "Error", - Self::Type => "TypeError", - Self::Range => "RangeError", - Self::Syntax => "SyntaxError", - Self::Assert => "ImplementationError", - } - .fmt(f) - } -} - -/// The error type for `boa_temporal`. -#[derive(Debug, Clone, PartialEq)] -pub struct TemporalError { - kind: ErrorKind, - msg: Cow<'static, str>, -} - -impl TemporalError { - #[inline] - #[must_use] - const fn new(kind: ErrorKind) -> Self { - Self { - kind, - msg: Cow::Borrowed(""), - } - } - - /// Create a generic error - #[inline] - #[must_use] - pub fn general<S>(msg: S) -> Self - where - S: Into<Cow<'static, str>>, - { - Self::new(ErrorKind::Generic).with_message(msg) - } - - /// Create a range error. - #[inline] - #[must_use] - pub const fn range() -> Self { - Self::new(ErrorKind::Range) - } - - /// Create a type error. - #[inline] - #[must_use] - pub const fn r#type() -> Self { - Self::new(ErrorKind::Type) - } - - /// Create a syntax error. - #[inline] - #[must_use] - pub const fn syntax() -> Self { - Self::new(ErrorKind::Syntax) - } - - /// Creates an assertion error - #[inline] - #[must_use] - pub(crate) const fn assert() -> Self { - Self::new(ErrorKind::Assert) - } - - /// Create an abrupt end error. - #[inline] - #[must_use] - pub fn abrupt_end() -> Self { - Self::syntax().with_message("Abrupt end to parsing target.") - } - - /// Add a message to the error. - #[inline] - #[must_use] - pub fn with_message<S>(mut self, msg: S) -> Self - where - S: Into<Cow<'static, str>>, - { - self.msg = msg.into(); - self - } - - /// Returns this error's kind. - #[inline] - #[must_use] - pub const fn kind(&self) -> ErrorKind { - self.kind - } - - /// Returns the error message. - #[inline] - #[must_use] - pub fn message(&self) -> &str { - &self.msg - } - - /// Extracts the error message. - #[inline] - #[must_use] - pub fn into_message(self) -> Cow<'static, str> { - self.msg - } - - pub fn from_icu4x(error: DateError) -> Self { - TemporalError::range().with_message(format!("{error}")) - } -} - -impl fmt::Display for TemporalError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.kind)?; - - let msg = self.msg.trim(); - if !msg.is_empty() { - write!(f, ": {msg}")?; - } - - Ok(()) - } -}
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/.cargo-checksum.json b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/.cargo-checksum.json similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/.cargo-checksum.json rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/.cargo-checksum.json
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/.cargo_vcs_info.json new file mode 100644 index 0000000..b1204b2 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/.cargo_vcs_info.json
@@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "b05955e76f983e042380511f45cb4464a33edb38" + }, + "path_in_vcs": "provider" +} \ No newline at end of file
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/Cargo.lock b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/Cargo.lock similarity index 82% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/Cargo.lock rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/Cargo.lock index 4af407fa..c21a1764 100644 --- a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/Cargo.lock +++ b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/Cargo.lock
@@ -3,13 +3,10 @@ version = 3 [[package]] -name = "aho-corasick" -version = "1.1.3" +name = "allocator-api2" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "databake" @@ -46,6 +43,39 @@ ] [[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "indexmap" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] name = "itoa" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -67,15 +97,6 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] -name = "parse-zoneinfo" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" -dependencies = [ - "regex", -] - -[[package]] name = "proc-macro2" version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -94,35 +115,6 @@ ] [[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] name = "ryu" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -168,9 +160,9 @@ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -190,15 +182,15 @@ [[package]] name = "timezone_provider" -version = "0.0.9" +version = "0.0.10" dependencies = [ "databake", - "parse-zoneinfo", "serde", "serde_json", "yoke", "zerotrie", "zerovec", + "zoneinfo_rs", ] [[package]] @@ -274,4 +266,26 @@ "databake", "serde", "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zoneinfo_rs" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e65e589ab7210e2df08d474be88ea7514f91a03b91e0107f4c763a8c260f8729" +dependencies = [ + "hashbrown", + "indexmap", ]
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/Cargo.toml b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/Cargo.toml similarity index 89% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/Cargo.toml rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/Cargo.toml index d37a22b7..e96954f 100644 --- a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/Cargo.toml +++ b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/Cargo.toml
@@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.82.0" name = "timezone_provider" -version = "0.0.9" +version = "0.0.10" authors = ["boa-dev"] build = false include = [ @@ -35,7 +35,7 @@ [features] datagen = [ - "dep:parse-zoneinfo", + "std", "dep:serde", "dep:databake", "dep:yoke", @@ -44,7 +44,10 @@ "zerotrie/databake", "zerovec/serde", "zerovec/databake", + "zerovec/derive", + "zoneinfo_rs", ] +std = [] [lib] name = "timezone_provider" @@ -55,10 +58,6 @@ features = ["derive"] optional = true -[dependencies.parse-zoneinfo] -version = "0.3.1" -optional = true - [dependencies.serde] version = "1.0.219" features = ["derive"] @@ -78,3 +77,12 @@ [dependencies.zerovec] version = "0.11.2" +features = [ + "derive", + "alloc", +] + +[dependencies.zoneinfo_rs] +version = "~0.0.9" +features = ["std"] +optional = true
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/Cargo.toml.orig b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/Cargo.toml.orig similarity index 64% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/Cargo.toml.orig rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/Cargo.toml.orig index 6d6fdc0e..d09ed80 100644 --- a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/Cargo.toml.orig +++ b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/Cargo.toml.orig
@@ -12,25 +12,36 @@ "Cargo.toml", "LICENSE-Apache", "LICENSE-MIT", - "README.md" + "README.md", ] [features] -datagen = ["dep:parse-zoneinfo", "dep:serde", "dep:databake", - "dep:yoke", "dep:serde_json", - "zerotrie/serde", "zerotrie/databake", "zerovec/serde", "zerovec/databake"] +datagen = [ + "std", + "dep:serde", + "dep:databake", + "dep:yoke", + "dep:serde_json", + "zerotrie/serde", + "zerotrie/databake", + "zerovec/serde", + "zerovec/databake", + "zerovec/derive", + "zoneinfo_rs", +] +std = [] + [dependencies] # Provider dependency zerotrie = "0.2.2" -zerovec = "0.11.2" +zerovec = { version = "0.11.2", features = ["derive", "alloc"] } # IANA dependency -parse-zoneinfo = {version = "0.3.1", optional = true } +zoneinfo_rs = { workspace = true, features = ["std"], optional = true } # Databake dependencies serde = { version = "1.0.219", features = ["derive"], optional = true } databake = { version = "0.2.0", features = ["derive"], optional = true } yoke = { version = "0.8.0", features = ["derive"], optional = true } serde_json = { version = "1.0.140", optional = true } -
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/LICENSE-Apache b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/LICENSE-Apache similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/LICENSE-Apache rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/LICENSE-Apache
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/LICENSE-MIT b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/LICENSE-MIT similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/LICENSE-MIT rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/LICENSE-MIT
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/OWNERS b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/OWNERS similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/OWNERS rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/OWNERS
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/README.md b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/README.md similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/README.md rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/README.md
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/data/debug/iana_normalizer.json b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/data/debug/iana_normalizer.json similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/data/debug/iana_normalizer.json rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/data/debug/iana_normalizer.json
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/data/iana_normalizer.rs.data b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/data/iana_normalizer.rs.data similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/data/iana_normalizer.rs.data rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/data/iana_normalizer.rs.data
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/data/mod.rs b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/data/mod.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/data/mod.rs rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/data/mod.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/lib.rs b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/lib.rs similarity index 93% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/lib.rs rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/lib.rs index 184f242..f962fc7 100644 --- a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/lib.rs +++ b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/lib.rs
@@ -4,7 +4,16 @@ //! for time zone data. //! +#![no_std] + +extern crate alloc; + +#[cfg(feature = "std")] +extern crate std; + mod tzdb; +pub mod tzif; + pub use tzdb::IanaIdentifierNormalizer; #[cfg(feature = "datagen")]
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/tzdb.rs b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/tzdb.rs similarity index 60% rename from third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/tzdb.rs rename to third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/tzdb.rs index 9a6dbba..0e5a57d 100644 --- a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/tzdb.rs +++ b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/tzdb.rs
@@ -8,22 +8,25 @@ // - IANA TZif data (much harder) // -use std::borrow::Cow; +use alloc::borrow::Cow; + +#[cfg(feature = "datagen")] +use alloc::string::String; +#[cfg(feature = "datagen")] +use alloc::vec::Vec; + #[cfg(feature = "datagen")] use std::{ + borrow::ToOwned, collections::{BTreeMap, BTreeSet}, fs, io, path::Path, }; -#[cfg(feature = "datagen")] -use parse_zoneinfo::{ - line::{Line, LineParser}, - table::{Table, TableBuilder}, -}; - use zerotrie::ZeroAsciiIgnoreCaseTrie; use zerovec::{VarZeroVec, ZeroVec}; +#[cfg(feature = "datagen")] +use zoneinfo_rs::{ZoneInfoData, ZoneInfoError}; /// A data struct for IANA identifier normalization #[derive(PartialEq, Debug, Clone)] @@ -45,54 +48,41 @@ } // ==== End Data marker implementation ==== -#[cfg(feature = "datagen")] -const ZONE_INFO_FILES: [&str; 9] = [ - "africa", - "antarctica", - "asia", - "australasia", - "backward", - "etcetera", - "europe", - "northamerica", - "southamerica", -]; +#[derive(Debug)] #[cfg(feature = "datagen")] -pub struct TzdbDataProvider { - version: String, - data: Table, +pub enum TzdbDataSourceError { + Io(io::Error), + ZoneInfo(ZoneInfoError), } #[cfg(feature = "datagen")] -impl TzdbDataProvider { - pub fn new(tzdata: &Path) -> Result<Self, io::Error> { - let parser = LineParser::default(); - let mut builder = TableBuilder::default(); +impl From<io::Error> for TzdbDataSourceError { + fn from(value: io::Error) -> Self { + Self::Io(value) + } +} - let version_file = tzdata.join("version"); - let version = fs::read_to_string(version_file)?.trim().into(); +#[cfg(feature = "datagen")] +impl From<ZoneInfoError> for TzdbDataSourceError { + fn from(value: ZoneInfoError) -> Self { + Self::ZoneInfo(value) + } +} - for filename in ZONE_INFO_FILES { - let file_path = tzdata.join(filename); - let file = fs::read_to_string(file_path)?; +#[cfg(feature = "datagen")] +pub struct TzdbDataSource { + pub version: String, + pub data: ZoneInfoData, +} - for line in file.lines() { - match parser.parse_str(line) { - Ok(Line::Zone(zone)) => builder.add_zone_line(zone).unwrap(), - Ok(Line::Continuation(cont)) => builder.add_continuation_line(cont).unwrap(), - Ok(Line::Rule(rule)) => builder.add_rule_line(rule).unwrap(), - Ok(Line::Link(link)) => builder.add_link_line(link).unwrap(), - Ok(Line::Space) => {} - Err(e) => eprintln!("{e}"), - } - } - } - - Ok(Self { - version, - data: builder.build(), - }) +#[cfg(feature = "datagen")] +impl TzdbDataSource { + pub fn try_from_zoneinfo_directory(tzdata_path: &Path) -> Result<Self, TzdbDataSourceError> { + let version_file = tzdata_path.join("version"); + let version = fs::read_to_string(version_file)?.trim().to_owned(); + let data = ZoneInfoData::from_zoneinfo_directory(tzdata_path)?; + Ok(Self { version, data }) } } @@ -102,24 +92,24 @@ #[cfg(feature = "datagen")] pub enum IanaDataError { Io(io::Error), + Provider(TzdbDataSourceError), Build(zerotrie::ZeroTrieBuildError), } impl IanaIdentifierNormalizer<'_> { #[cfg(feature = "datagen")] - pub fn build(tzdata: &Path) -> Result<Self, IanaDataError> { - let provider = TzdbDataProvider::new(tzdata).unwrap(); + pub fn build(tzdata_path: &Path) -> Result<Self, IanaDataError> { + let provider = TzdbDataSource::try_from_zoneinfo_directory(tzdata_path) + .map_err(IanaDataError::Provider)?; let mut identifiers = BTreeSet::default(); - for zoneset_id in provider.data.zonesets.keys() { + for zone_id in provider.data.zones.keys() { // Add canonical identifiers. - let _ = identifiers.insert(zoneset_id.clone()); + let _ = identifiers.insert(zone_id.clone()); } for links in provider.data.links.keys() { // Add link / non-canonical identifiers let _ = identifiers.insert(links.clone()); } - - // Create trie and bin search the index from Vec let norm_vec: Vec<String> = identifiers.iter().cloned().collect(); let norm_zerovec: VarZeroVec<'static, str> = norm_vec.as_slice().into();
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/tzif.rs b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/tzif.rs new file mode 100644 index 0000000..fa0404d --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/tzif.rs
@@ -0,0 +1,153 @@ +//! A compact, zero copy TZif file. +//! +//! NOTE: This representation does not follow the TZif specification +//! to full detail, but instead attempts to compress TZif data into +//! a functional, data driven equivalent. + +#[cfg(feature = "datagen")] +use alloc::vec::Vec; + +#[cfg(feature = "datagen")] +use std::{collections::BTreeMap, path::Path}; +use zerotrie::ZeroAsciiIgnoreCaseTrie; +#[cfg(feature = "datagen")] +use zerotrie::ZeroTrieBuildError; +use zerovec::{vecs::Index32, VarZeroVec, ZeroVec}; +#[cfg(feature = "datagen")] +use zoneinfo_rs::{compiler::CompiledTransitions, ZoneInfoCompiler, ZoneInfoData}; + +#[cfg(feature = "datagen")] +use crate::tzdb::TzdbDataSource; + +#[derive(Debug, Clone)] +#[cfg_attr( + feature = "datagen", + derive(yoke::Yokeable, serde::Serialize, databake::Bake) +)] +#[cfg_attr(feature = "datagen", databake(path = timezone_provider::tzif))] +pub struct ZoneInfoProvider<'data> { + // IANA identifier map to TZif index. + pub ids: ZeroAsciiIgnoreCaseTrie<ZeroVec<'data, u8>>, + // Vector of TZif data + pub tzifs: VarZeroVec<'data, ZeroTzifULE, Index32>, +} + +#[zerovec::make_varule(ZeroTzifULE)] +#[derive(PartialEq, Debug, Clone)] +#[zerovec::skip_derive(Ord)] +#[zerovec::derive(Debug)] +#[cfg_attr( + feature = "datagen", + derive(yoke::Yokeable, serde::Serialize, databake::Bake) +)] +#[cfg_attr(feature = "datagen", zerovec::derive(Serialize))] +#[cfg_attr(feature = "datagen", databake(path = timezone_provider::tzif))] +pub struct ZeroTzif<'data> { + pub transitions: ZeroVec<'data, i64>, + pub transition_types: ZeroVec<'data, u8>, + // NOTE: zoneinfo64 does a fun little bitmap str + pub types: ZeroVec<'data, LocalTimeRecord>, + pub posix: &'data str, +} + +#[zerovec::make_ule(LocalTimeRecordULE)] +#[derive(PartialEq, Eq, Debug, Clone, Copy, PartialOrd, Ord)] +#[cfg_attr( + feature = "datagen", + derive(yoke::Yokeable, serde::Serialize, databake::Bake) +)] +#[cfg_attr(feature = "datagen", databake(path = timezone_provider::tzif))] +pub struct LocalTimeRecord { + pub offset: i64, +} + +#[cfg(feature = "datagen")] +impl From<&zoneinfo_rs::tzif::LocalTimeRecord> for LocalTimeRecord { + fn from(value: &zoneinfo_rs::tzif::LocalTimeRecord) -> Self { + Self { + offset: value.offset, + } + } +} + +impl ZeroTzif<'_> { + #[cfg(feature = "datagen")] + fn from_transition_data(data: &CompiledTransitions) -> Self { + let tzif = data.to_v2_data_block(); + let transitions = ZeroVec::alloc_from_slice(&tzif.transition_times); + let transition_types = ZeroVec::alloc_from_slice(&tzif.transition_types); + let mapped_local_records: Vec<LocalTimeRecord> = + tzif.local_time_types.iter().map(Into::into).collect(); + let types = ZeroVec::alloc_from_slice(&mapped_local_records); + let posix = "TODO"; + + Self { + transitions, + transition_types, + types, + posix, + } + } +} + +#[cfg(feature = "datagen")] +#[derive(Debug)] +pub enum ZoneInfoDataError { + Build(ZeroTrieBuildError), +} + +impl ZoneInfoProvider<'_> { + #[cfg(feature = "datagen")] + pub fn build(tzdata: &Path) -> Result<Self, ZoneInfoDataError> { + let tzdb_source = TzdbDataSource::try_from_zoneinfo_directory(tzdata).unwrap(); + let compiled_transitions = ZoneInfoCompiler::new(tzdb_source.data.clone()).build(); + + let mut identifiers = BTreeMap::default(); + let mut primary_zones = Vec::default(); + + // Create a Map of <ZoneId | Link, ZoneId>, this is used later to index + let ZoneInfoData { links, zones, .. } = tzdb_source.data; + + for zone_identifier in zones.into_keys() { + primary_zones.push(zone_identifier.clone()); + identifiers.insert(zone_identifier.clone(), zone_identifier); + } + for (link, zone) in links.into_iter() { + identifiers.insert(link, zone); + } + + primary_zones.sort(); + + let identifier_map: BTreeMap<Vec<u8>, usize> = identifiers + .into_iter() + .map(|(id, zoneid)| { + ( + id.to_ascii_lowercase().as_bytes().to_vec(), + primary_zones.binary_search(&zoneid).unwrap(), + ) + }) + .collect(); + + let tzifs: Vec<ZeroTzif<'_>> = primary_zones + .into_iter() + .map(|id| { + let data = compiled_transitions + .data + .get(&id) + .expect("all zones should be built"); + ZeroTzif::from_transition_data(data) + }) + .collect(); + + let tzifs_zerovec: VarZeroVec<'static, ZeroTzifULE, Index32> = tzifs.as_slice().into(); + + let ids = ZeroAsciiIgnoreCaseTrie::try_from(&identifier_map) + .map_err(ZoneInfoDataError::Build)? + .convert_store(); + + Ok(ZoneInfoProvider { + ids, + tzifs: tzifs_zerovec, + }) + } +}
diff --git a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/.cargo_vcs_info.json deleted file mode 100644 index 5ee0465..0000000 --- a/third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/.cargo_vcs_info.json +++ /dev/null
@@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "44632b0d855dd8136371d40ff99fd7566bc1f0aa" - }, - "path_in_vcs": "provider" -} \ No newline at end of file
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/.cargo_vcs_info.json deleted file mode 100644 index 5f3c1519..0000000 --- a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/.cargo_vcs_info.json +++ /dev/null
@@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "a55a78a30248fbd3b888fbb33ba19d9233059941" - }, - "path_in_vcs": "utils/tzif" -} \ No newline at end of file
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/.cargo-checksum.json b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/.cargo-checksum.json similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/.cargo-checksum.json rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/.cargo-checksum.json
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/.cargo_vcs_info.json new file mode 100644 index 0000000..7149a51 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/.cargo_vcs_info.json
@@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "e9ab7308efb2fdc0fca96f71106c68f9f5840056" + }, + "path_in_vcs": "utils/tzif" +} \ No newline at end of file
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/Cargo.lock b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/Cargo.lock new file mode 100644 index 0000000..99deec58 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/Cargo.lock
@@ -0,0 +1,134 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "bytes" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "tzif" +version = "0.4.0" +dependencies = [ + "combine", + "walkdir", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/Cargo.toml b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/Cargo.toml similarity index 95% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/Cargo.toml rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/Cargo.toml index 6ee10c4..8262d38 100644 --- a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/Cargo.toml +++ b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/Cargo.toml
@@ -11,11 +11,12 @@ [package] edition = "2021" -rust-version = "1.71.1" +rust-version = "1.81" name = "tzif" -version = "0.3.0" +version = "0.4.0" authors = ["The ICU4X Project Developers"] build = false +autolib = false autobins = false autoexamples = false autotests = false
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/Cargo.toml.orig b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/Cargo.toml.orig similarity index 97% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/Cargo.toml.orig rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/Cargo.toml.orig index 6cabdc5..66b7a02 100644 --- a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/Cargo.toml.orig +++ b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/Cargo.toml.orig
@@ -5,7 +5,7 @@ [package] name = "tzif" description = "A parser for TZif files" -version = "0.3.0" +version = "0.4.0" keywords = ["time-zone", "posix", "iana", "parse", "data"] categories = ["date-and-time", "parser-implementations"]
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/LICENSE b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/LICENSE similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/LICENSE rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/LICENSE
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/OWNERS b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/OWNERS similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/OWNERS rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/OWNERS
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/README.md b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/README.md similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/README.md rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/README.md
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/mod.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/mod.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/mod.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/mod.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/posix.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/posix.rs similarity index 94% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/posix.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/posix.rs index 3099ba5..1676ab8 100644 --- a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/posix.rs +++ b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/posix.rs
@@ -7,7 +7,7 @@ /// A struct to hold a time-zone variant name and its offset. /// The offset is how many hours must be added to the time to reach UTC. #[derive(Debug, Clone, PartialEq, Eq)] -pub struct ZoneVariantInfo { +pub struct TimeZoneVariantInfo { /// The name of the time-zone variant. pub name: String, /// The offset time in seconds that must be added to reach UTC. @@ -50,7 +50,7 @@ #[derive(Debug, Clone, PartialEq, Eq)] pub struct DstTransitionInfo { /// The zone variant info including name and offset. - pub variant_info: ZoneVariantInfo, + pub variant_info: TimeZoneVariantInfo, /// The DST transition start date. pub start_date: TransitionDate, @@ -63,7 +63,7 @@ #[derive(Debug, Clone, PartialEq, Eq)] pub struct PosixTzString { /// The variant info of the STD time-zone variant. - pub std_info: ZoneVariantInfo, + pub std_info: TimeZoneVariantInfo, /// The variant info of the DST time-zone variant if present. pub dst_info: Option<DstTransitionInfo>,
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/time.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/time.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/time.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/time.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/tzif.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/tzif.rs similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/tzif.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/tzif.rs index ce1e68fa..1948f87 100644 --- a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/tzif.rs +++ b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/tzif.rs
@@ -299,3 +299,17 @@ /// A series of [`UtLocalIndicator`] objects. pub ut_local_indicators: Vec<UtLocalIndicator>, } + +impl DataBlock { + /// Retrieves the timezone designation at index `idx`. + pub fn time_zone_designation(&self, mut idx: usize) -> Option<&str> { + self.time_zone_designations.iter().find_map(|d| { + if idx <= d.len() { + Some(&d[idx..]) + } else { + idx -= d.len() + 1; + None + } + }) + } +}
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/error.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/error.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/error.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/error.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/lib.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/lib.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/lib.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/lib.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/mod.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/mod.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/mod.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/mod.rs
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/posix.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/posix.rs similarity index 97% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/posix.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/posix.rs index 5d6ebff..d8f37d44 100644 --- a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/posix.rs +++ b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/posix.rs
@@ -4,7 +4,7 @@ use super::ensure; use crate::data::posix::{ - DstTransitionInfo, PosixTzString, TransitionDate, TransitionDay, ZoneVariantInfo, + DstTransitionInfo, PosixTzString, TimeZoneVariantInfo, TransitionDate, TransitionDay, }; use crate::data::time::{Hours, Minutes, Seconds}; use combine::parser::byte::{byte, digit}; @@ -249,13 +249,13 @@ /// Parses the STD time-zone variant info including the variant name and the offset in seconds. /// /// See [`zone_variant_name`] and [`offset_time`] for more information. -fn std_variant_info<Input>() -> impl Parser<Input, Output = ZoneVariantInfo> +fn std_variant_info<Input>() -> impl Parser<Input, Output = TimeZoneVariantInfo> where Input: Stream<Token = u8>, Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, { combine::struct_parser! { - ZoneVariantInfo { + TimeZoneVariantInfo { name: zone_variant_name(), offset: offset_time(), } @@ -267,13 +267,13 @@ /// This differs from [`std_variant_info`] in that it takes a predetermined STD offset /// offset as an argument. If no explicit DST offset is parsed, it will default to the /// STD offset minus one hour. -fn dst_variant_info<Input>(std_offset: Seconds) -> impl Parser<Input, Output = ZoneVariantInfo> +fn dst_variant_info<Input>(std_offset: Seconds) -> impl Parser<Input, Output = TimeZoneVariantInfo> where Input: Stream<Token = u8>, Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, { combine::struct_parser! { - ZoneVariantInfo { + TimeZoneVariantInfo { name: zone_variant_name(), offset: optional(offset_time()).map(move |time| time.unwrap_or(std_offset - Hours(1).as_seconds())), } @@ -646,7 +646,7 @@ assert_parse_eq!( std_variant_info(), "EST+5", - ZoneVariantInfo { + TimeZoneVariantInfo { name: "EST".to_owned(), offset: Hours(5).as_seconds(), } @@ -654,7 +654,7 @@ assert_parse_eq!( std_variant_info(), "IST-2", - ZoneVariantInfo { + TimeZoneVariantInfo { name: "IST".to_owned(), offset: Hours(-2).as_seconds(), } @@ -662,7 +662,7 @@ assert_parse_eq!( std_variant_info(), "<0made+up0>-24:59:59", - ZoneVariantInfo { + TimeZoneVariantInfo { name: "0made+up0".to_owned(), offset: Hours(-24).as_seconds() - Minutes(59).as_seconds() - Seconds(59) } @@ -693,7 +693,7 @@ assert_parse_eq!( dst_variant_info(Hours(5).as_seconds()), "EDT", - ZoneVariantInfo { + TimeZoneVariantInfo { name: "EDT".to_owned(), offset: Hours(4).as_seconds(), } @@ -701,7 +701,7 @@ assert_parse_eq!( dst_variant_info(Hours(-2).as_seconds()), "IDT", - ZoneVariantInfo { + TimeZoneVariantInfo { name: "IDT".to_owned(), offset: Hours(-3).as_seconds(), } @@ -709,7 +709,7 @@ assert_parse_eq!( dst_variant_info(Seconds(0)), "<0made+up0>-24:59:59", - ZoneVariantInfo { + TimeZoneVariantInfo { name: "0made+up0".to_owned(), offset: Hours(-24).as_seconds() - Minutes(59).as_seconds() - Seconds(59) } @@ -777,7 +777,7 @@ dst_transition_info(Hours(4).as_seconds()), "WARST,J1/0,J365/25", DstTransitionInfo { - variant_info: ZoneVariantInfo { + variant_info: TimeZoneVariantInfo { name: "WARST".to_owned(), offset: Hours(3).as_seconds() }, @@ -795,7 +795,7 @@ dst_transition_info(Hours(-2).as_seconds()), "IDT,M3.4.4/26,M10.5.0", DstTransitionInfo { - variant_info: ZoneVariantInfo { + variant_info: TimeZoneVariantInfo { name: "IDT".to_owned(), offset: Hours(-3).as_seconds() }, @@ -817,12 +817,12 @@ posix_tz_string(), "WGT3WGST,M3.5.0/-2,M10.5.0/-1", PosixTzString { - std_info: ZoneVariantInfo { + std_info: TimeZoneVariantInfo { name: "WGT".to_owned(), offset: Hours(3).as_seconds(), }, dst_info: Some(DstTransitionInfo { - variant_info: ZoneVariantInfo { + variant_info: TimeZoneVariantInfo { name: "WGST".to_owned(), offset: Hours(2).as_seconds() }, @@ -841,12 +841,12 @@ posix_tz_string(), "WART4WARST,J1/0,J365/25", PosixTzString { - std_info: ZoneVariantInfo { + std_info: TimeZoneVariantInfo { name: "WART".to_owned(), offset: Hours(4).as_seconds(), }, dst_info: Some(DstTransitionInfo { - variant_info: ZoneVariantInfo { + variant_info: TimeZoneVariantInfo { name: "WARST".to_owned(), offset: Hours(3).as_seconds() },
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/tzif.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/tzif.rs similarity index 91% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/tzif.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/tzif.rs index a8fd856..264e0fe 100644 --- a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/tzif.rs +++ b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/tzif.rs
@@ -378,63 +378,38 @@ /// A series of bytes constituting an array of /// NUL-terminated (0x00) time zone designation strings. The total -/// number of bytes is specified by the "charcnt" field in the header. -fn raw_time_zone_designations<Input>(charcnt: usize) -> impl Parser<Input, Output = String> -where - Input: Stream<Token = u8>, - Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, -{ - count_min_max(charcnt, charcnt, any()) - .map(|bytes: Vec<u8>| String::from_utf8_lossy(&bytes).into_owned()) -} - -/// A series of bytes constituting an array of -/// NUL-terminated (0x00) time zone designation strings. The total /// number of bytes is specified by the "charcnt" field in the /// header. /// -/// Splits each designation into a vector of [`String`] where each string -/// starts at an index defined by a local time type record and ends at a -/// NUL-terminator (0x00) +/// Splits the list of bytes by the NULL-terminator (0x00) character +/// and puts each designation into a [`String`]. /// /// > e.g. /// > ```text /// > "LMT\u{0}HMT\u{0}MMT\u{0}IST\u{0}+0630\u{0}" /// > ``` /// -/// Note that two designations MAY overlap if one is a suffix -/// of the other. The character encoding of time zone designation -/// strings is not specified. +/// Note that a local time record index might point in the middle of a +/// designation. In that case the record's designation is the specified +/// suffix. The [DataBlock::time_zone_designation] method can be used to +/// access the correct designation string given an index. /// +/// The character encoding of time zone designation strings is not specified. /// However, time zone designations SHOULD consist of at least three (3) and no /// more than six (6) ASCII characters from the set of alphanumerics, /// '-', and '+'. This is for compatibility with POSIX requirements /// for time zone abbreviations, so this parser enforces a UTF-8 ASCII encoding, /// to ensure compatability with Rust strings. -fn time_zone_designations<Input>( - charcnt: usize, - local_time_type_records: Vec<LocalTimeTypeRecord>, -) -> impl Parser<Input, Output = Vec<String>> +fn time_zone_designations<Input>(charcnt: usize) -> impl Parser<Input, Output = Vec<String>> where Input: Stream<Token = u8>, Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, { - raw_time_zone_designations(charcnt).map(move |raw_time_zone_designations| { - let mut time_zone_designations = Vec::with_capacity(local_time_type_records.len()); - for record in &local_time_type_records { - for end_idx in record.idx..charcnt { - if raw_time_zone_designations.as_bytes()[end_idx] == b'\0' { - time_zone_designations.push( - String::from_utf8_lossy( - raw_time_zone_designations[record.idx..end_idx].as_bytes(), - ) - .into_owned(), - ); - break; - } - } - } - time_zone_designations + count_min_max(charcnt, charcnt, any()).map(|bytes: Vec<u8>| { + bytes + .split_inclusive(|&b| b == b'\0') + .map(|s| String::from_utf8_lossy(&s[0..s.len() - 1]).into_owned()) + .collect() }) } @@ -678,45 +653,17 @@ Input: Stream<Token = u8>, Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, { - ( - historic_transition_times::<V, _>(header.timecnt), - transition_types(header.timecnt, header.typecnt), - local_time_type_records(header.typecnt, header.charcnt), - ) - .then( - move |(transition_times, transition_types, local_time_type_records)| { - ( - value(transition_times), - value(transition_types), - value(local_time_type_records.clone()), - time_zone_designations(header.charcnt, local_time_type_records), - leap_second_records::<V, _>(header.leapcnt), - standard_wall_indicators(header.isstdcnt), - ) - }, - ) - .then( - move |( - transition_times, - transition_types, - local_time_type_records, - time_zone_designations, - leap_second_records, - standard_wall_indicators, - )| { - combine::struct_parser! { - DataBlock { - transition_times: value(transition_times), - transition_types: value(transition_types), - local_time_type_records: value(local_time_type_records), - time_zone_designations: value(time_zone_designations), - leap_second_records: value(leap_second_records), - standard_wall_indicators: value(standard_wall_indicators), - ut_local_indicators: ut_local_indicators(header.isutcnt), - } - } - }, - ) + combine::struct_parser! { + DataBlock { + transition_times: historic_transition_times::<V, _>(header.timecnt), + transition_types: transition_types(header.timecnt, header.typecnt), + local_time_type_records: local_time_type_records(header.typecnt, header.charcnt), + time_zone_designations: time_zone_designations(header.charcnt), + leap_second_records: leap_second_records::<V, _>(header.leapcnt), + standard_wall_indicators: standard_wall_indicators(header.isstdcnt), + ut_local_indicators: ut_local_indicators(header.isutcnt), + } + } } /// Parses a `TZif` footer. @@ -827,7 +774,9 @@ #[cfg(test)] mod test { use super::*; - use crate::data::posix::{DstTransitionInfo, TransitionDate, TransitionDay, ZoneVariantInfo}; + use crate::data::posix::{ + DstTransitionInfo, TimeZoneVariantInfo, TransitionDate, TransitionDay, + }; use crate::data::time::Hours; use crate::{assert_parse_eq, assert_parse_err, assert_parse_ok}; use combine::EasyParser; @@ -1196,32 +1145,52 @@ #[test] fn parse_time_zone_designations() { assert_parse_eq!( - time_zone_designations( - 14, - vec![ - LocalTimeTypeRecord { - utoff: Seconds(35356), - is_dst: false, - idx: 0, - }, - LocalTimeTypeRecord { - utoff: Seconds(39600), - is_dst: true, - idx: 4, - }, - LocalTimeTypeRecord { - utoff: Seconds(36000), - is_dst: false, - idx: 9, - }, - ] - ), + time_zone_designations(14), "LMT\0AEDT\0AEST\0", vec!["LMT".to_owned(), "AEDT".to_owned(), "AEST".to_owned()], ); } #[test] + fn time_zone_designation_indexing() { + let block: &[u8] = &[ + 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, // local time record 0 + 0x00, 0x00, 0x00, 0x10, 0x01, 0x03, // local time record 1 + 0x00, 0x00, 0x00, 0x10, 0x01, 0x04, // local time record 2 + 0x00, 0x00, 0x00, 0x10, 0x01, 0x05, // local time record 3 + b'L', b'M', b'T', 0x00, b'A', b'E', b'D', b'T', 0x00, // timezone designations + ]; + let header = TzifHeader { + version: 0, + isutcnt: 0, + isstdcnt: 0, + leapcnt: 0, + timecnt: 0, + typecnt: 4, + charcnt: 9, + }; + let (block, _) = data_block::<1, _>(header).parse(block).unwrap(); + assert_eq!( + block.time_zone_designation(block.local_time_type_records[0].idx), + Some("LMT") + ); + assert_eq!( + block.time_zone_designation(block.local_time_type_records[1].idx), + Some("") + ); + assert_eq!( + block.time_zone_designation(block.local_time_type_records[2].idx), + Some("AEDT") + ); + assert_eq!( + block.time_zone_designation(block.local_time_type_records[3].idx), + Some("EDT") + ); + assert_eq!(block.time_zone_designation(8), Some("")); + assert_eq!(block.time_zone_designation(9), None); + } + + #[test] fn parse_leap_second_occurrence() { const FIVE: &[u8] = 5i64.to_be_bytes().as_slice(); @@ -1484,12 +1453,12 @@ footer(), "\nEST+5EDT,M3.2.0/2,M11.1.0/2\n", PosixTzString { - std_info: ZoneVariantInfo { + std_info: TimeZoneVariantInfo { name: "EST".to_owned(), offset: Hours(5).as_seconds(), }, dst_info: Some(DstTransitionInfo { - variant_info: ZoneVariantInfo { + variant_info: TimeZoneVariantInfo { name: "EDT".to_owned(), offset: Hours(4).as_seconds() },
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/America/Bogota b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/America/Bogota similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/America/Bogota rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/America/Bogota Binary files differ
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/America/Los_Angeles b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/America/Los_Angeles similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/America/Los_Angeles rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/America/Los_Angeles Binary files differ
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/America/Whitehorse b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/America/Whitehorse similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/America/Whitehorse rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/America/Whitehorse Binary files differ
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Antarctica/Troll b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Antarctica/Troll similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Antarctica/Troll rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Antarctica/Troll Binary files differ
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Arctic/Longyearbyen b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Arctic/Longyearbyen similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Arctic/Longyearbyen rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Arctic/Longyearbyen Binary files differ
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Asia/Tokyo b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Asia/Tokyo similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Asia/Tokyo rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Asia/Tokyo Binary files differ
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Chile/EasterIsland b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Chile/EasterIsland similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Chile/EasterIsland rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Chile/EasterIsland Binary files differ
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/PST8PDT b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/PST8PDT similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/PST8PDT rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/PST8PDT Binary files differ
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Pacific/Pohnpei b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Pacific/Pohnpei similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/testdata/Pacific/Pohnpei rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/testdata/Pacific/Pohnpei Binary files differ
diff --git a/third_party/rust/chromium_crates_io/vendor/tzif-v0_3/tests/mod.rs b/third_party/rust/chromium_crates_io/vendor/tzif-v0_4/tests/mod.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/tzif-v0_3/tests/mod.rs rename to third_party/rust/chromium_crates_io/vendor/tzif-v0_4/tests/mod.rs
diff --git a/third_party/rust/temporal_capi/BUILD.gn b/third_party/rust/temporal_capi/BUILD.gn index 87f1b50..605677b 100644 --- a/third_party/rust/temporal_capi/BUILD.gn +++ b/third_party/rust/temporal_capi/BUILD.gn
@@ -13,11 +13,11 @@ # It is not mandatory to update the `defines` list every time temporal_capi # updates; it is just a convenient tool to use as needed. config("temporal_capi_versioning_defines") { - defines = [ "TEMPORAL_CAPI_VERSION_0_0_9" ] + defines = [ "TEMPORAL_CAPI_VERSION_0_0_10" ] } # v8 includes headers and targets from paths that include a specific crate -# epoch in a directory name (e.g. `v0_0_8`). To insulate v8 from the exact +# epoch in a directory name (e.g. `v0_0_10`). To insulate v8 from the exact # paths: # # * We have some indirection via `group` / `public_deps` to forward to the @@ -30,8 +30,8 @@ ":temporal_capi_include_dirs", ":temporal_capi_versioning_defines", ] - public_deps = [ "//third_party/rust/temporal_capi/v0_0_9:lib" ] + public_deps = [ "//third_party/rust/temporal_capi/v0_0_10:lib" ] } config("temporal_capi_include_dirs") { - include_dirs = [ "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/bindings/cpp" ] + include_dirs = [ "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/bindings/cpp" ] }
diff --git a/third_party/rust/temporal_capi/v0_0_9/BUILD.gn b/third_party/rust/temporal_capi/v0_0_10/BUILD.gn similarity index 85% rename from third_party/rust/temporal_capi/v0_0_9/BUILD.gn rename to third_party/rust/temporal_capi/v0_0_10/BUILD.gn index 2077e99..a529241 100644 --- a/third_party/rust/temporal_capi/v0_0_9/BUILD.gn +++ b/third_party/rust/temporal_capi/v0_0_10/BUILD.gn
@@ -10,24 +10,24 @@ cargo_crate("lib") { crate_name = "temporal_capi" - epoch = "0.0.9" + epoch = "0.0.10" crate_type = "rlib" - crate_root = "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/lib.rs" + crate_root = "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/lib.rs" sources = [ - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/calendar.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/duration.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/error.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/instant.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/iso.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/lib.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/options.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_date.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_date_time.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_month_day.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_time.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/plain_year_month.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/time_zone.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/src/zoned_date_time.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/calendar.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/duration.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/error.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/instant.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/iso.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/lib.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/options.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_date.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_date_time.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_month_day.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_time.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/plain_year_month.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/time_zone.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/src/zoned_date_time.rs", ] inputs = [] @@ -36,7 +36,7 @@ cargo_pkg_authors = "boa-dev" cargo_pkg_name = "temporal_capi" cargo_pkg_description = "C interface to temporal_rs" - cargo_pkg_version = "0.0.9" + cargo_pkg_version = "0.0.10" allow_unsafe = false @@ -46,7 +46,7 @@ "//third_party/rust/icu_calendar/v2:lib", "//third_party/rust/icu_locale/v2:lib", "//third_party/rust/num_traits/v0_2:lib", - "//third_party/rust/temporal_rs/v0_0_9:lib", + "//third_party/rust/temporal_rs/v0_0_10:lib", "//third_party/rust/writeable/v0_6:lib", ] features = [ "compiled_data" ]
diff --git a/third_party/rust/temporal_capi/v0_0_10/README.chromium b/third_party/rust/temporal_capi/v0_0_10/README.chromium new file mode 100644 index 0000000..bda8c01 --- /dev/null +++ b/third_party/rust/temporal_capi/v0_0_10/README.chromium
@@ -0,0 +1,11 @@ +Name: temporal_capi +URL: https://crates.io/crates/temporal_capi +Version: 0.0.10 +Revision: b05955e76f983e042380511f45cb4464a33edb38 +Update Mechanism: Manual +License: Apache-2.0 +License File: //third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/LICENSE-MIT,//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_10/LICENSE-Apache +Shipped: yes +Security Critical: yes + +Description: C interface to temporal_rs
diff --git a/third_party/rust/temporal_capi/v0_0_9/README.chromium b/third_party/rust/temporal_capi/v0_0_9/README.chromium deleted file mode 100644 index 7b52235..0000000 --- a/third_party/rust/temporal_capi/v0_0_9/README.chromium +++ /dev/null
@@ -1,11 +0,0 @@ -Name: temporal_capi -URL: https://crates.io/crates/temporal_capi -Version: 0.0.9 -Revision: 44632b0d855dd8136371d40ff99fd7566bc1f0aa -Update Mechanism: Manual -License: Apache-2.0 -License File: //third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/LICENSE-MIT,//third_party/rust/chromium_crates_io/vendor/temporal_capi-v0_0_9/LICENSE-Apache -Shipped: yes -Security Critical: yes - -Description: C interface to temporal_rs
diff --git a/third_party/rust/temporal_rs/v0_0_9/BUILD.gn b/third_party/rust/temporal_rs/v0_0_10/BUILD.gn similarity index 76% rename from third_party/rust/temporal_rs/v0_0_9/BUILD.gn rename to third_party/rust/temporal_rs/v0_0_10/BUILD.gn index 8e7ae597..e391779 100644 --- a/third_party/rust/temporal_rs/v0_0_9/BUILD.gn +++ b/third_party/rust/temporal_rs/v0_0_10/BUILD.gn
@@ -10,53 +10,53 @@ cargo_crate("lib") { crate_name = "temporal_rs" - epoch = "0.0.9" + epoch = "0.0.10" crate_type = "rlib" - crate_root = "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/lib.rs" + crate_root = "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/lib.rs" sources = [ - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/date.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/duration.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/duration/tests.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/instant.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/now.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/plain_date_time.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/compiled/zoneddatetime.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar/era.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/calendar/types.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/date.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/datetime.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/date.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/normalized.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/tests.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/duration/time.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/instant.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/month_day.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/now.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/time.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/timezone.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/year_month.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/core/zoneddatetime.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/builtins/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/epoch_nanoseconds.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/error.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/iso.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/lib.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options/increment.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/options/relative_to.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/parsers.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/parsers/timezone.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/primitive.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/provider.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/rounding.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/sys.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/tzdb.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/utils.rs", - "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/src/utils/neri_schneider.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/date.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/duration.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/duration/tests.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/instant.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/mod.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/now.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/plain_date_time.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/compiled/zoneddatetime.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar/era.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/calendar/types.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/date.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/datetime.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/date.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/normalized.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/tests.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/duration/time.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/instant.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/mod.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/month_day.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/now.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/time.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/timezone.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/year_month.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/core/zoneddatetime.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/builtins/mod.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/epoch_nanoseconds.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/error.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/iso.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/lib.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options/increment.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/options/relative_to.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/parsers.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/parsers/timezone.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/primitive.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/provider.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/rounding.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/sys.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/tzdb.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/utils.rs", + "//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/src/utils/neri_schneider.rs", ] inputs = [] @@ -65,7 +65,7 @@ cargo_pkg_authors = "boa-dev" cargo_pkg_name = "temporal_rs" cargo_pkg_description = "Temporal in Rust is an implementation of the TC39 Temporal Builtin Proposal in Rust." - cargo_pkg_version = "0.0.9" + cargo_pkg_version = "0.0.10" allow_unsafe = true @@ -77,9 +77,9 @@ "//third_party/rust/ixdtf/v0_5:lib", "//third_party/rust/jiff_tzdb/v0_1:lib", "//third_party/rust/num_traits/v0_2:lib", - "//third_party/rust/timezone_provider/v0_0_9:lib", + "//third_party/rust/timezone_provider/v0_0_10:lib", "//third_party/rust/tinystr/v0_8:lib", - "//third_party/rust/tzif/v0_3:lib", + "//third_party/rust/tzif/v0_4:lib", "//third_party/rust/writeable/v0_6:lib", ] features = [
diff --git a/third_party/rust/temporal_rs/v0_0_9/README.chromium b/third_party/rust/temporal_rs/v0_0_10/README.chromium similarity index 63% rename from third_party/rust/temporal_rs/v0_0_9/README.chromium rename to third_party/rust/temporal_rs/v0_0_10/README.chromium index b9d064b9..435f62cf 100644 --- a/third_party/rust/temporal_rs/v0_0_9/README.chromium +++ b/third_party/rust/temporal_rs/v0_0_10/README.chromium
@@ -1,10 +1,10 @@ Name: temporal_rs URL: https://crates.io/crates/temporal_rs -Version: 0.0.9 -Revision: 44632b0d855dd8136371d40ff99fd7566bc1f0aa +Version: 0.0.10 +Revision: b05955e76f983e042380511f45cb4464a33edb38 Update Mechanism: Manual License: Apache-2.0 -License File: //third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/LICENSE-MIT,//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_9/LICENSE-Apache +License File: //third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/LICENSE-MIT,//third_party/rust/chromium_crates_io/vendor/temporal_rs-v0_0_10/LICENSE-Apache Shipped: yes Security Critical: yes
diff --git a/third_party/rust/timezone_provider/v0_0_9/BUILD.gn b/third_party/rust/timezone_provider/v0_0_10/BUILD.gn similarity index 87% rename from third_party/rust/timezone_provider/v0_0_9/BUILD.gn rename to third_party/rust/timezone_provider/v0_0_10/BUILD.gn index ff87e887..cb970984 100644 --- a/third_party/rust/timezone_provider/v0_0_9/BUILD.gn +++ b/third_party/rust/timezone_provider/v0_0_10/BUILD.gn
@@ -10,17 +10,18 @@ cargo_crate("lib") { crate_name = "timezone_provider" - epoch = "0.0.9" + epoch = "0.0.10" crate_type = "rlib" - crate_root = "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/lib.rs" + crate_root = "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/lib.rs" sources = [ - "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/data/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/lib.rs", - "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/tzdb.rs", + "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/data/mod.rs", + "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/lib.rs", + "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/tzdb.rs", + "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/tzif.rs", ] inputs = [ - "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/data/debug/iana_normalizer.json", - "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/src/data/iana_normalizer.rs.data", + "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/data/debug/iana_normalizer.json", + "//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/src/data/iana_normalizer.rs.data", ] build_native_rust_unit_tests = false @@ -28,7 +29,7 @@ cargo_pkg_authors = "boa-dev" cargo_pkg_name = "timezone_provider" cargo_pkg_description = "Time zone data providers" - cargo_pkg_version = "0.0.9" + cargo_pkg_version = "0.0.10" allow_unsafe = true
diff --git a/third_party/rust/timezone_provider/v0_0_10/README.chromium b/third_party/rust/timezone_provider/v0_0_10/README.chromium new file mode 100644 index 0000000..b5855de --- /dev/null +++ b/third_party/rust/timezone_provider/v0_0_10/README.chromium
@@ -0,0 +1,11 @@ +Name: timezone_provider +URL: https://crates.io/crates/timezone_provider +Version: 0.0.10 +Revision: b05955e76f983e042380511f45cb4464a33edb38 +Update Mechanism: Manual +License: Apache-2.0 +License File: //third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/LICENSE-MIT,//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_10/LICENSE-Apache +Shipped: yes +Security Critical: yes + +Description: Time zone data providers
diff --git a/third_party/rust/timezone_provider/v0_0_9/README.chromium b/third_party/rust/timezone_provider/v0_0_9/README.chromium deleted file mode 100644 index 3a655cc..0000000 --- a/third_party/rust/timezone_provider/v0_0_9/README.chromium +++ /dev/null
@@ -1,11 +0,0 @@ -Name: timezone_provider -URL: https://crates.io/crates/timezone_provider -Version: 0.0.9 -Revision: 44632b0d855dd8136371d40ff99fd7566bc1f0aa -Update Mechanism: Manual -License: Apache-2.0 -License File: //third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/LICENSE-MIT,//third_party/rust/chromium_crates_io/vendor/timezone_provider-v0_0_9/LICENSE-Apache -Shipped: yes -Security Critical: yes - -Description: Time zone data providers
diff --git a/third_party/rust/tzif/v0_3/BUILD.gn b/third_party/rust/tzif/v0_4/BUILD.gn similarity index 76% rename from third_party/rust/tzif/v0_3/BUILD.gn rename to third_party/rust/tzif/v0_4/BUILD.gn index 9cdf3314..89fe4d05 100644 --- a/third_party/rust/tzif/v0_3/BUILD.gn +++ b/third_party/rust/tzif/v0_4/BUILD.gn
@@ -10,20 +10,20 @@ cargo_crate("lib") { crate_name = "tzif" - epoch = "0.3" + epoch = "0.4" crate_type = "rlib" crate_root = - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/lib.rs" + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/lib.rs" sources = [ - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/posix.rs", - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/time.rs", - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/data/tzif.rs", - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/error.rs", - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/lib.rs", - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/mod.rs", - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/posix.rs", - "//third_party/rust/chromium_crates_io/vendor/tzif-v0_3/src/parse/tzif.rs", + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/mod.rs", + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/posix.rs", + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/time.rs", + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/data/tzif.rs", + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/error.rs", + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/lib.rs", + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/mod.rs", + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/posix.rs", + "//third_party/rust/chromium_crates_io/vendor/tzif-v0_4/src/parse/tzif.rs", ] inputs = [] @@ -32,7 +32,7 @@ cargo_pkg_authors = "The ICU4X Project Developers" cargo_pkg_name = "tzif" cargo_pkg_description = "A parser for TZif files" - cargo_pkg_version = "0.3.0" + cargo_pkg_version = "0.4.0" allow_unsafe = false
diff --git a/third_party/rust/tzif/v0_3/README.chromium b/third_party/rust/tzif/v0_4/README.chromium similarity index 74% rename from third_party/rust/tzif/v0_3/README.chromium rename to third_party/rust/tzif/v0_4/README.chromium index 378234f6..5ddb8be 100644 --- a/third_party/rust/tzif/v0_3/README.chromium +++ b/third_party/rust/tzif/v0_4/README.chromium
@@ -1,10 +1,10 @@ Name: tzif URL: https://crates.io/crates/tzif -Version: 0.3.0 -Revision: a55a78a30248fbd3b888fbb33ba19d9233059941 +Version: 0.4.0 +Revision: e9ab7308efb2fdc0fca96f71106c68f9f5840056 Update Mechanism: Manual License: Unicode-3.0 -License File: //third_party/rust/chromium_crates_io/vendor/tzif-v0_3/LICENSE +License File: //third_party/rust/chromium_crates_io/vendor/tzif-v0_4/LICENSE Shipped: yes Security Critical: yes
diff --git a/third_party/skia b/third_party/skia index f041aa5..b0a25d7 160000 --- a/third_party/skia +++ b/third_party/skia
@@ -1 +1 @@ -Subproject commit f041aa580d1154a58eb9124fe9f087b4ca11250b +Subproject commit b0a25d7651bba1dce595e32c5946af1a42692e07
diff --git a/third_party/spirv-tools/src b/third_party/spirv-tools/src index 604c3e7..40eb301 160000 --- a/third_party/spirv-tools/src +++ b/third_party/spirv-tools/src
@@ -1 +1 @@ -Subproject commit 604c3e75a41b3605ac86bdf5bc26987bd9f9589f +Subproject commit 40eb301f320e1d85ce3bc12798022149eae3eee3
diff --git a/third_party/vulkan-deps b/third_party/vulkan-deps index 25f573ec..d3f4b5f 160000 --- a/third_party/vulkan-deps +++ b/third_party/vulkan-deps
@@ -1 +1 @@ -Subproject commit 25f573ec719a61720d4e14e9d5f40bb8b92543e0 +Subproject commit d3f4b5f78306c8d353c0e51a88359c77b10359c0
diff --git a/tools/crates/create_update_cl.md b/tools/crates/create_update_cl.md index 29d1dd9..032d61c 100644 --- a/tools/crates/create_update_cl.md +++ b/tools/crates/create_update_cl.md
@@ -20,12 +20,16 @@ `git checkout origin/main`, and `gclient sync` (but other workflows should also work - e.g. ones based on `git-new-workdir`). -## Avoiding conflicts +## Checking the state of the world Before creating a CL stack, check for open CLs with the [`cratesio-autoupdate` tag](https://chromium-review.googlesource.com/q/hashtag:%22cratesio-autoupdate%22+(status:open%20OR%20status:merged)). Such CLs tend to conflict, so coordinate with owners of any open CLs. +You may also check a doc with notes from previous rotations, where we may note +known issues and their workarounds. See (Google-internal, sorry): +https://docs.google.com/document/d/1S7gsrJFsgoU5CH0K7-X_gL55zIIgd6UsFpCGrJqjdAg/edit?usp=sharing + ## Automated step: `create_update_cl.py` The first actual step of the rotation is running `create_update_cl.py`. You must
diff --git a/tools/json_schema_compiler/cpp_bundle_generator.py b/tools/json_schema_compiler/cpp_bundle_generator.py index 182feda..05bb1e20 100644 --- a/tools/json_schema_compiler/cpp_bundle_generator.py +++ b/tools/json_schema_compiler/cpp_bundle_generator.py
@@ -137,8 +137,8 @@ for platform in model_object.platforms: if platform == Platforms.CHROMEOS: ifdefs.append('BUILDFLAG(IS_CHROMEOS)') - elif platform == Platforms.FUCHSIA: - ifdefs.append('BUILDFLAG(IS_FUCHSIA)') + elif platform == Platforms.DESKTOP_ANDROID: + ifdefs.append('BUILDFLAG(IS_DESKTOP_ANDROID)') elif platform == Platforms.LINUX: ifdefs.append('BUILDFLAG(IS_LINUX)') elif platform == Platforms.MAC: @@ -247,6 +247,7 @@ c.Append('#include "%s"' % (cpp_util.ToPosixPath( os.path.join(self._bundle._impl_dir, 'generated_api_registration.h')))) c.Append() + c.Append('#include "build/android_buildflags.h"') c.Append('#include "build/build_config.h"') c.Append() for namespace in self._bundle._model.namespaces.values():
diff --git a/tools/json_schema_compiler/cpp_bundle_generator_test.py b/tools/json_schema_compiler/cpp_bundle_generator_test.py index 39af7244..81ec7f1 100755 --- a/tools/json_schema_compiler/cpp_bundle_generator_test.py +++ b/tools/json_schema_compiler/cpp_bundle_generator_test.py
@@ -38,8 +38,8 @@ cpp_bundle_generator, model = _createCppBundleGenerator( 'test/function_platform_all.json') self.assertEqual( - 'BUILDFLAG(IS_CHROMEOS) || ' - 'BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)', + 'BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_DESKTOP_ANDROID) ' + '|| BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)', _getPlatformIfdefs(cpp_bundle_generator, model)) def testIfDefsForChromeOS(self):
diff --git a/tools/json_schema_compiler/feature_compiler.py b/tools/json_schema_compiler/feature_compiler.py index d010718a..373a12ab 100644 --- a/tools/json_schema_compiler/feature_compiler.py +++ b/tools/json_schema_compiler/feature_compiler.py
@@ -286,7 +286,6 @@ 'enum_map': { 'chromeos': 'Feature::CHROMEOS_PLATFORM', 'desktop_android': 'Feature::DESKTOP_ANDROID_PLATFORM', - 'fuchsia': 'Feature::FUCHSIA_PLATFORM', 'linux': 'Feature::LINUX_PLATFORM', 'mac': 'Feature::MACOSX_PLATFORM', 'win': 'Feature::WIN_PLATFORM',
diff --git a/tools/json_schema_compiler/idl_schema_test.py b/tools/json_schema_compiler/idl_schema_test.py index 5d63c8c9..433f6f4 100755 --- a/tools/json_schema_compiler/idl_schema_test.py +++ b/tools/json_schema_compiler/idl_schema_test.py
@@ -303,7 +303,7 @@ def testAllPlatformsNamespace(self): schema = idl_schema.Load('test/idl_namespace_all_platforms.idl')[0] self.assertEqual('idl_namespace_all_platforms', schema['namespace']) - expected = ['chromeos', 'desktop_android', 'fuchsia', 'linux', 'mac', 'win'] + expected = ['chromeos', 'desktop_android', 'linux', 'mac', 'win'] self.assertEqual(expected, schema['platforms']) def testNonSpecificPlatformsNamespace(self):
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py index adc817ec..9fc2ac8 100644 --- a/tools/json_schema_compiler/model.py +++ b/tools/json_schema_compiler/model.py
@@ -868,7 +868,6 @@ """ CHROMEOS = _PlatformInfo("chromeos") DESKTOP_ANDROID = _PlatformInfo("desktop_android") - FUCHSIA = _PlatformInfo("fuchsia") LINUX = _PlatformInfo("linux") MAC = _PlatformInfo("mac") WIN = _PlatformInfo("win")
diff --git a/tools/json_schema_compiler/model_test.py b/tools/json_schema_compiler/model_test.py index 1907cee..bac2f13 100755 --- a/tools/json_schema_compiler/model_test.py +++ b/tools/json_schema_compiler/model_test.py
@@ -194,8 +194,8 @@ self.assertEqual([Platforms.CHROMEOS], self.idl_namespace_chromeos.platforms) self.assertEqual([ - Platforms.CHROMEOS, Platforms.DESKTOP_ANDROID, Platforms.FUCHSIA, - Platforms.LINUX, Platforms.MAC, Platforms.WIN + Platforms.CHROMEOS, Platforms.DESKTOP_ANDROID, Platforms.LINUX, + Platforms.MAC, Platforms.WIN ], self.idl_namespace_all_platforms.platforms) self.assertEqual(None, self.idl_namespace_non_specific_platforms.platforms) @@ -224,9 +224,6 @@ function_cros = self.function_platforms.functions['function_cros'] self.assertEqual([Platforms.CHROMEOS], function_cros.platforms) - function_fuchsia = self.function_platforms.functions['function_fuchsia'] - self.assertEqual([Platforms.FUCHSIA], function_fuchsia.platforms) - def testPlatformsOnFunctionsJSON(self): test_function = self.function_platform_win_linux.functions['test'] self.assertEqual([Platforms.WIN, Platforms.LINUX], test_function.platforms)
diff --git a/tools/json_schema_compiler/test/function_platform_all.json b/tools/json_schema_compiler/test/function_platform_all.json index 6272534..b059fc7 100644 --- a/tools/json_schema_compiler/test/function_platform_all.json +++ b/tools/json_schema_compiler/test/function_platform_all.json
@@ -9,7 +9,13 @@ "functions": [{ "name": "test", "type": "function", - "platforms": ["chromeos", "fuchsia", "linux", "win"], + "platforms": [ + "chromeos", + "desktop_android", + "linux", + "mac", + "win" + ], "parameters": [] }] }
diff --git a/tools/json_schema_compiler/test/function_platforms.idl b/tools/json_schema_compiler/test/function_platforms.idl index 56c67ac0..3aa095b 100644 --- a/tools/json_schema_compiler/test/function_platforms.idl +++ b/tools/json_schema_compiler/test/function_platforms.idl
@@ -13,8 +13,5 @@ [platforms=("chromeos")] static void function_cros(); - - [platforms=("fuchsia")] - static void function_fuchsia(); }; };
diff --git a/tools/json_schema_compiler/test/idl_namespace_all_platforms.idl b/tools/json_schema_compiler/test/idl_namespace_all_platforms.idl index a7f0bb4..3cdaf11 100644 --- a/tools/json_schema_compiler/test/idl_namespace_all_platforms.idl +++ b/tools/json_schema_compiler/test/idl_namespace_all_platforms.idl
@@ -4,7 +4,7 @@ // Tests a variety of basic API definition features. -[platforms=("chromeos", "desktop_android", "fuchsia", "linux", "mac", "win")] +[platforms=("chromeos", "desktop_android", "linux", "mac", "win")] namespace idl_namespace_all_platforms { };
diff --git a/tools/json_schema_compiler/test/web_idl/all_platforms_on_namespace.idl b/tools/json_schema_compiler/test/web_idl/all_platforms_on_namespace.idl index 1478fe5..fa768708 100644 --- a/tools/json_schema_compiler/test/web_idl/all_platforms_on_namespace.idl +++ b/tools/json_schema_compiler/test/web_idl/all_platforms_on_namespace.idl
@@ -3,7 +3,7 @@ // found in the LICENSE file. // Demonstrates using the platforms extended attribute with all used values. -[platforms=("chromeos", "desktop_android", "fuchsia", "linux", "mac", "win")] +[platforms=("chromeos", "desktop_android", "linux", "mac", "win")] interface AllPlatformsAPI { };
diff --git a/tools/json_schema_compiler/test/web_idl/basics.idl b/tools/json_schema_compiler/test/web_idl/basics.idl index d36d8d74..fee16728 100644 --- a/tools/json_schema_compiler/test/web_idl/basics.idl +++ b/tools/json_schema_compiler/test/web_idl/basics.idl
@@ -74,12 +74,17 @@ // Promise returning function, with a comment that provides the name and // description of the value the promise resolves to. // |arg1|: This is a normal argument comment. + // |Returns|: General description for the promise return. // |PromiseValue|: returnValueName: A description for the value the promise // resolves to: with an extra colon for good measure. static Promise<ExampleType> describedPromiseReturn(boolean arg1); // |PromiseValue|: justAName static Promise<boolean> namedPromiseReturn(); + + // General function description for the describedReturnFunction. + // |Returns|: Description for the returns object itself. + static DOMString describedReturnFunction(); }; // Comment for parameter descriptions on the onTestOne event. The first part of
diff --git a/tools/json_schema_compiler/web_idl_schema.py b/tools/json_schema_compiler/web_idl_schema.py index 54589fe..63db660 100755 --- a/tools/json_schema_compiler/web_idl_schema.py +++ b/tools/json_schema_compiler/web_idl_schema.py
@@ -436,6 +436,10 @@ """Handles processing for function return values.""" def Process(self) -> dict: + # If the descriptions use the 'Returns' key, we use that to extract a + # description to add to the return properties. + if self.descriptions and 'Returns' in self.descriptions: + self.properties['description'] = self.descriptions['Returns'] if 'type' in self.properties and self.properties['type'] == 'promise': # For legacy reasons, promise returns always get named "callback". self.properties['name'] = 'callback'
diff --git a/tools/json_schema_compiler/web_idl_schema_test.py b/tools/json_schema_compiler/web_idl_schema_test.py index 962bbcf..b5b6993 100755 --- a/tools/json_schema_compiler/web_idl_schema_test.py +++ b/tools/json_schema_compiler/web_idl_schema_test.py
@@ -373,6 +373,8 @@ 'callback', 'optional': True, + 'description': + 'General description for the promise return.', 'type': 'promise', 'parameters': [{ @@ -402,6 +404,16 @@ }, named_promise_function_async_return) + return_function = getFunction(schema, 'describedReturnFunction') + self.assertEqual( + 'General function description for the describedReturnFunction.', + return_function.get('description')) + return_function_returns_value = getFunctionReturn( + schema, 'describedReturnFunction') + self.assertEqual('Description for the returns object itself.', + return_function_returns_value.get('description')) + + # Tests that API events are processed as expected. def testEvents(self): schema = self.idl_basics @@ -717,7 +729,7 @@ 'test/web_idl/all_platforms_on_namespace.idl') self.assertEqual(1, len(platforms_schema)) self.assertEqual('allPlatformsAPI', platforms_schema[0]['namespace']) - expected = ['chromeos', 'desktop_android', 'fuchsia', 'linux', 'mac', 'win'] + expected = ['chromeos', 'desktop_android', 'linux', 'mac', 'win'] self.assertEqual(expected, platforms_schema[0]['platforms']) # Tests that an API interface with just chromeos listed in the platforms
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index a6fcc1fb..eb9fc6c8a 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -17124,7 +17124,6 @@ <int value="1176484713" label="SingleCaCertVerificationPhase0:enabled"/> <int value="1177120582" label="InstallableInkDrop:disabled"/> <int value="1177174300" label="LayoutNGTable:disabled"/> - <int value="1177255376" label="enable-builtin-hls:enabled"/> <int value="1177628103" label="GaiaActionButtons:disabled"/> <int value="1178640449" label="ProductivityLauncher:disabled"/> <int value="1179013979" @@ -19241,7 +19240,6 @@ <int value="1927374573" label="EnterpriseRealtimeExtensionRequest:enabled"/> <int value="1927572319" label="OmniboxShortcutExpanding:enabled"/> <int value="1928193837" label="WebNNCoreML:enabled"/> - <int value="1928641476" label="enable-builtin-hls:disabled"/> <int value="1928643493" label="AutofillEnableFlatRateCardBenefitsFromCurinos:disabled"/> <int value="1928797262" label="RootScrollbarFollowsBrowserTheme:enabled"/>
diff --git a/tools/metrics/histograms/metadata/chromeos_settings/enums.xml b/tools/metrics/histograms/metadata/chromeos_settings/enums.xml index f9ae8db..1ce03e06 100644 --- a/tools/metrics/histograms/metadata/chromeos_settings/enums.xml +++ b/tools/metrics/histograms/metadata/chromeos_settings/enums.xml
@@ -217,6 +217,8 @@ <int value="444" label="Low battery sound: On/Off"/> <int value="445" label="Battery Saver: On/Off"/> <int value="446" label="Touchpad: Simulate Right Click"/> + <int value="447" label="Optimized Charging: On/Off"/> + <int value="448" label="Power: Charge Limit"/> <int value="500" label="Open Wallpaper"/> <int value="501" label="Ambient Mode On/Off"/> <int value="502" label="Ambient Mode Source"/>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 3110c56..7bc347b 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/v51.0/linux-arm64/trace_processor_shell" }, "win": { - "hash": "56bf628c3fc6e319c505df69f1618bcbfc5f4e53", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/8eb032e80a9442fe18c90c6ea01f641db63c0868/trace_processor_shell.exe" + "hash": "afc5b49125f2150d74c685859890347539f637b8", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/6766ffc9858ca6409ab50a01fde339c125f564d3/trace_processor_shell.exe" }, "linux_arm": { "hash": "247a7da473f8a92c9168f0ffdf73d2e0b9d46deb",
diff --git a/tools/perf/process_perf_results.py b/tools/perf/process_perf_results.py index e2a8d00..707e85b 100755 --- a/tools/perf/process_perf_results.py +++ b/tools/perf/process_perf_results.py
@@ -469,7 +469,10 @@ # Ignoring Charts, as uploading mixed results isn't supported. merged_results = histograms_results else: - merged_results = charts_results + # Skip uploading Charts due to crbug.com/418674022#comment19 + logging.warning('Skip uploading Charts results to legacy dashboard: %s.', + benchmark_name) + return False, 0, 0 with open(results_filename, 'w') as rf: json.dump(merged_results, rf)
diff --git a/ui/android/java/res/values-night/colors.xml b/ui/android/java/res/values-night/colors.xml index 3a452ee..0002df04 100644 --- a/ui/android/java/res/values-night/colors.xml +++ b/ui/android/java/res/values-night/colors.xml
@@ -100,10 +100,6 @@ <color name="gm3_baseline_surface">@color/gm3_baseline_surface_dark</color> <color name="signin_header_animation_background">@color/header_background_dark</color> - <!-- LINT.IfChange(drag_handlebar_color_baseline) --> - <color name="drag_handlebar_color_baseline">@color/gm3_baseline_outline_variant_dark</color> - <!-- LINT.ThenChange(//components/browser_ui/styles/android/java/res/color-night/drag_handlebar_color_list.xml) --> - <!-- Menu colors --> <color name="menu_list_item_icon_color">@color/baseline_neutral_variant_80</color> <color name="menu_list_item_icon_color_disabled">@color/baseline_neutral_90</color>
diff --git a/ui/android/java/res/values/semantic_colors_adaptive.xml b/ui/android/java/res/values/semantic_colors_adaptive.xml index 77300120..b0d83e0 100644 --- a/ui/android/java/res/values/semantic_colors_adaptive.xml +++ b/ui/android/java/res/values/semantic_colors_adaptive.xml
@@ -112,10 +112,6 @@ <color name="gm3_baseline_surface">@color/gm3_baseline_surface_light</color> <color name="signin_header_animation_background">@color/baseline_neutral_95</color> - <!-- LINT.IfChange(drag_handlebar_color_baseline) --> - <color name="drag_handlebar_color_baseline">@color/gm3_baseline_surface_container_highest_light</color> - <!-- LINT.ThenChange(//components/browser_ui/styles/android/java/res/color/drag_handlebar_color_list.xml) --> - <!-- Menu colors --> <color name="menu_bg_color_baseline">@color/gm3_baseline_surface_container</color> <color name="menu_list_item_icon_color">@color/baseline_neutral_variant_30</color>
diff --git a/ui/android/java/src/org/chromium/ui/listmenu/MenuModelBridge.java b/ui/android/java/src/org/chromium/ui/listmenu/MenuModelBridge.java index 39100a7..c3add94 100644 --- a/ui/android/java/src/org/chromium/ui/listmenu/MenuModelBridge.java +++ b/ui/android/java/src/org/chromium/ui/listmenu/MenuModelBridge.java
@@ -13,6 +13,7 @@ import org.chromium.build.annotations.NullMarked; import org.chromium.build.annotations.Nullable; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; +import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel; import java.util.ArrayList; @@ -43,6 +44,17 @@ } /** + * Returns the list of {@link ListItem} held by this {@link MenuModelBridge}, as a {@link + * ModelList}. + */ + public ModelList populateModelList() { + ModelList result = new ModelList(); + // addAll asserts that the collection is nonempty, so we MUST perform this check. + if (!mItems.isEmpty()) result.addAll(mItems); + return result; + } + + /** * Adds a context menu item which triggers a command when activated. * * @param label The label to display.
diff --git a/ui/android/java/src/org/chromium/ui/modelutil/PropertyModel.java b/ui/android/java/src/org/chromium/ui/modelutil/PropertyModel.java index 1dc54f62..02393e7 100644 --- a/ui/android/java/src/org/chromium/ui/modelutil/PropertyModel.java +++ b/ui/android/java/src/org/chromium/ui/modelutil/PropertyModel.java
@@ -319,10 +319,21 @@ mTransformers = transformers; } + /** Returns whether the given key is contained in the property model. */ public boolean containsKey(PropertyKey key) { return mData.containsKey(key); } + /** Returns whether the given key is contained and the value is equal to the passed arg. */ + public boolean containsKeyEqualTo(ReadableBooleanPropertyKey key, boolean value) { + return mData.containsKey(key) && get(key) == value; + } + + /** Returns whether the given key is contained and the value is equal to the passed arg. */ + public boolean containsKeyEqualTo(ReadableIntPropertyKey key, int value) { + return mData.containsKey(key) && get(key) == value; + } + private void validateKey(PropertyKey key) { if (BuildConfig.ENABLE_ASSERTS && !mData.containsKey(key)) { throw new IllegalArgumentException(
diff --git a/ui/color/color_provider_utils.cc b/ui/color/color_provider_utils.cc index 72f6fae..c4c9daf 100644 --- a/ui/color/color_provider_utils.cc +++ b/ui/color/color_provider_utils.cc
@@ -742,8 +742,6 @@ mixer[kColorCssSystemGrayText] = {SkColorSetRGB(0x80, 0x80, 0x80)}; mixer[kColorCssSystemHighlight] = {SkColorSetRGB(0x19, 0x67, 0xD2)}; mixer[kColorCssSystemHighlightText] = {SK_ColorWHITE}; - mixer[kColorCssSystemLinkText] = {SkColorSetRGB(0x00, 0x00, 0xEE)}; - mixer[kColorCssSystemVisitedText] = {SkColorSetRGB(0x55, 0x1A, 0x8B)}; if (dark_mode) { mixer[kColorCssSystemBtnFace] = {SkColorSetRGB(0x6B, 0x6B, 0x6B)}; mixer[kColorCssSystemBtnText] = {SK_ColorWHITE}; @@ -754,6 +752,8 @@ mixer[kColorCssSystemWindow] = {SkColorSetRGB(0x12, 0x12, 0x12)}; mixer[kColorCssSystemWindowText] = {SK_ColorWHITE}; mixer[kColorCssSystemHotlight] = {SkColorSetRGB(0x9E, 0x9E, 0xFF)}; + mixer[kColorCssSystemLinkText] = {SkColorSetRGB(0x9E, 0x9E, 0xFF)}; + mixer[kColorCssSystemVisitedText] = {SkColorSetRGB(0xD0, 0xAD, 0xF0)}; } else { mixer[kColorCssSystemBtnFace] = {SkColorSetRGB(0xEF, 0xEF, 0xEF)}; mixer[kColorCssSystemBtnText] = {SK_ColorBLACK}; @@ -764,6 +764,8 @@ mixer[kColorCssSystemWindow] = {SK_ColorWHITE}; mixer[kColorCssSystemWindowText] = {SK_ColorBLACK}; mixer[kColorCssSystemHotlight] = {SkColorSetRGB(0x00, 0x00, 0xEE)}; + mixer[kColorCssSystemLinkText] = {SkColorSetRGB(0x00, 0x00, 0xEE)}; + mixer[kColorCssSystemVisitedText] = {SkColorSetRGB(0x55, 0x1A, 0x8B)}; } }
diff --git a/ui/ozone/platform/wayland/ozone_platform_wayland.cc b/ui/ozone/platform/wayland/ozone_platform_wayland.cc index 428b639b..9c2dbee 100644 --- a/ui/ozone/platform/wayland/ozone_platform_wayland.cc +++ b/ui/ozone/platform/wayland/ozone_platform_wayland.cc
@@ -361,6 +361,9 @@ // API is implemented. properties->supports_color_picker_dialog = false; + // TODO(crbug.com/425715421): Remove this once support is implemented. + properties->supports_split_view_drag_and_drop = false; + initialised = true; }
diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h index 1384e162..69854ac 100644 --- a/ui/ozone/public/ozone_platform.h +++ b/ui/ozone/public/ozone_platform.h
@@ -151,6 +151,10 @@ // Whether the platform supports system/shell integrated color picker // dialog. An example is XDG Desktop Portal provided PickColor dialog. bool supports_color_picker_dialog = true; + + // Whether the platform supports drag and drop as an entrypoint to create + // new Split Views. + bool supports_split_view_drag_and_drop = true; }; // Groups platform properties that can only be known at run time.
diff --git a/ui/views/accessibility/ax_virtual_view.cc b/ui/views/accessibility/ax_virtual_view.cc index 1be64229..68dd670 100644 --- a/ui/views/accessibility/ax_virtual_view.cc +++ b/ui/views/accessibility/ax_virtual_view.cc
@@ -232,6 +232,14 @@ return nullptr; } +std::string AXVirtualView::GetDebugString() const { + View* owner_view = GetOwnerView(); + if (!owner_view) { + return std::string("Virtual view with no owner view"); + } + return base::StrCat({"Virtual view child of ", owner_view->GetClassName()}); +} + void AXVirtualView::NotifyEvent(ax::mojom::Event event_type, bool send_native_event) { // If `ready_to_notify_events_` is false, it means we are initializing
diff --git a/ui/views/accessibility/ax_virtual_view.h b/ui/views/accessibility/ax_virtual_view.h index 945f63b..5dee1cd 100644 --- a/ui/views/accessibility/ax_virtual_view.h +++ b/ui/views/accessibility/ax_virtual_view.h
@@ -9,6 +9,7 @@ #include <memory> #include <optional> +#include <string> #include <vector> #include "base/functional/callback_forward.h" @@ -127,6 +128,8 @@ // AXVirtualView no longer needs to extend AXPlatformNodeDelegate. ViewAccessibility* GetViewAccessibilityParent() const override; + std::string GetDebugString() const override; + // ui::AXPlatformNodeDelegate. Note that // - Some of these functions have Mac-specific implementations in // ax_virtual_view_mac.mm.
diff --git a/ui/views/accessibility/tree/view_accessibility_ax_tree_source.cc b/ui/views/accessibility/tree/view_accessibility_ax_tree_source.cc index 31d4f35a..c1277ba 100644 --- a/ui/views/accessibility/tree/view_accessibility_ax_tree_source.cc +++ b/ui/views/accessibility/tree/view_accessibility_ax_tree_source.cc
@@ -31,7 +31,27 @@ void ViewAccessibilityAXTreeSource::HandleAccessibleAction( const ui::AXActionData& action) { - // TODO(accessibility): Implement. + int id = action.target_node_id; + + // In Views, we only support setting the selection within a single node, + // not across multiple nodes like on the web. + if (action.action == ax::mojom::Action::kSetSelection) { + CHECK_EQ(action.anchor_node_id, action.focus_node_id); + id = action.anchor_node_id; + } + + // TODO(crbug.com/40672441): Add a convenience virtual function + // HandleAccessibleAction on ViewAccessibility once AXVirtualView, a subclass + // of ViewAccessibility, doesn't need to extend the AXPlatformNodeDelegate + // anymore -- there's currently a function with a conflicting name. + if (ViewAccessibility* node = GetFromId(id)) { + if (View* view = node->view()) { + view->HandleAccessibleAction(action); + } else if (AXVirtualView* virtual_view = + static_cast<AXVirtualView*>(node)) { + virtual_view->HandleAccessibleAction(action); + } + } } bool ViewAccessibilityAXTreeSource::GetTreeData( @@ -52,12 +72,15 @@ } int32_t ViewAccessibilityAXTreeSource::GetId(ViewAccessibility* node) const { + if (!node) { + return ui::kInvalidAXNodeID; + } return node->GetUniqueId(); } void ViewAccessibilityAXTreeSource::CacheChildrenIfNeeded( ViewAccessibility* node) { - if (cache_->HasCachedChildren(node)) { + if (!node || cache_->HasCachedChildren(node)) { return; } cache_->CacheChildrenIfNeeded(node); @@ -65,51 +88,67 @@ size_t ViewAccessibilityAXTreeSource::GetChildCount( ViewAccessibility* node) const { + if (!node) { + return 0; + } return node->GetChildren().size(); } ViewAccessibility* ViewAccessibilityAXTreeSource::ChildAt( ViewAccessibility* node, size_t index) const { + if (!node) { + return nullptr; + } + auto children = node->GetChildren(); if (index >= children.size()) { return nullptr; } + return children[index]; } void ViewAccessibilityAXTreeSource::ClearChildCache(ViewAccessibility* node) { + if (!node) { + return; + } cache_->RemoveFromChildCache(node); } ViewAccessibility* ViewAccessibilityAXTreeSource::GetParent( ViewAccessibility* node) const { - if (node->GetUniqueId() == root_id_) { + if (!node || node->GetUniqueId() == root_id_) { return nullptr; } - return node->GetUnignoredParent(); } bool ViewAccessibilityAXTreeSource::IsIgnored(ViewAccessibility* node) const { - return false; + if (!node) { + return false; + } + return node->GetIsIgnored(); } bool ViewAccessibilityAXTreeSource::IsEqual(ViewAccessibility* node1, ViewAccessibility* node2) const { - // TODO(accessibility): Implement. - return false; + if (!node1 || !node2) { + return false; + } + return node1->GetUniqueId() == node2->GetUniqueId(); } ViewAccessibility* ViewAccessibilityAXTreeSource::GetNull() const { - // TODO(accessibility): Implement. return nullptr; } std::string ViewAccessibilityAXTreeSource::GetDebugString( ViewAccessibility* node) const { - // TODO(accessibility): Implement. - return std::string(); + if (!node) { + return "null"; + } + return node->GetDebugString(); } void ViewAccessibilityAXTreeSource::SerializeNode( @@ -120,8 +159,22 @@ std::string ViewAccessibilityAXTreeSource::ToString(ViewAccessibility* root, std::string prefix) { - // TODO(accessibility): Implement. - return std::string(); + if (!root) { + return prefix + "null\n"; + } + + ui::AXNodeData data; + SerializeNode(root, &data); + std::string output = prefix + data.ToString() + '\n'; + + auto children = root->GetChildren(); + + prefix += prefix[0]; + for (auto child : children) { + output += ToString(child, prefix); + } + + return output; } } // namespace views
diff --git a/ui/views/accessibility/tree/view_accessibility_ax_tree_source_unittest.cc b/ui/views/accessibility/tree/view_accessibility_ax_tree_source_unittest.cc index a1fbf546..2de4af2 100644 --- a/ui/views/accessibility/tree/view_accessibility_ax_tree_source_unittest.cc +++ b/ui/views/accessibility/tree/view_accessibility_ax_tree_source_unittest.cc
@@ -7,9 +7,11 @@ #include <memory> #include <utility> +#include "base/test/gtest_util.h" #include "base/test/scoped_feature_list.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/accessibility/accessibility_features.h" +#include "ui/accessibility/ax_action_data.h" #include "ui/accessibility/ax_tree_data.h" #include "ui/views/accessibility/ax_virtual_view.h" #include "ui/views/accessibility/tree/view_accessibility_ax_tree_source_test_api.h" @@ -48,6 +50,38 @@ features::kAccessibilityTreeForViews}; }; +class ActionTestView : public View { + public: + ActionTestView() = default; + ~ActionTestView() override = default; + + bool HandleAccessibleAction(const ui::AXActionData& action) override { + last_action_id_ = action.target_node_id; + return true; + } + + ui::AXNodeID last_action_id() const { return last_action_id_; } + + private: + ui::AXNodeID last_action_id_ = ui::kInvalidAXNodeID; +}; + +class ActionTestVirtualView : public AXVirtualView { + public: + ActionTestVirtualView() = default; + ~ActionTestVirtualView() override = default; + + bool HandleAccessibleAction(const ui::AXActionData& action) override { + last_action_id_ = action.target_node_id; + return true; + } + + ui::AXNodeID last_action_id() const { return last_action_id_; } + + private: + ui::AXNodeID last_action_id_ = ui::kInvalidAXNodeID; +}; + TEST_F(ViewAccessibilityAXTreeSourceTest, CacheInsertGetRemove) { auto v = std::make_unique<View>(); @@ -179,4 +213,157 @@ &grand->GetViewAccessibility()); } +TEST_F(ViewAccessibilityAXTreeSourceTest, HandleAccessibleAction_OnKnownView) { + auto v = std::make_unique<ActionTestView>(); + test_api().cache().Insert(&v->GetViewAccessibility()); + + ui::AXActionData action; + action.action = ax::mojom::Action::kFocus; // Unimportant for the test. + action.target_node_id = v->GetViewAccessibility().GetUniqueId(); + + EXPECT_EQ(v->last_action_id(), ui::kInvalidAXNodeID); + source()->HandleAccessibleAction(action); + EXPECT_EQ(v->last_action_id(), action.target_node_id); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, + HandleAccessibleAction_OnUnknownView) { + auto v = std::make_unique<ActionTestView>(); + // Don't add the view to the cache so it can't find it. + + ui::AXActionData action; + action.action = ax::mojom::Action::kFocus; // Irrelevant for the test. + action.target_node_id = v->GetViewAccessibility().GetUniqueId(); + + EXPECT_EQ(v->last_action_id(), ui::kInvalidAXNodeID); + source()->HandleAccessibleAction(action); + EXPECT_EQ(v->last_action_id(), ui::kInvalidAXNodeID); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, + HandleAccessibleAction_OnKnownVirtualView) { + auto v = std::make_unique<ActionTestVirtualView>(); + + test_api().cache().Insert(v.get()); + + ui::AXActionData action; + action.action = ax::mojom::Action::kFocus; // Irrelevant for the test. + action.target_node_id = v->ViewAccessibility::GetUniqueId(); + + EXPECT_EQ(v->last_action_id(), ui::kInvalidAXNodeID); + source()->HandleAccessibleAction(action); + EXPECT_EQ(v->last_action_id(), action.target_node_id); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, + HandleAccessibleAction_OnUnknownVirtualView) { + auto v = std::make_unique<ActionTestVirtualView>(); + // Don't add the virtual view to the cache so it can't find it. + + ui::AXActionData action; + action.action = ax::mojom::Action::kFocus; + action.target_node_id = v->ViewAccessibility::GetUniqueId(); + + EXPECT_EQ(v->last_action_id(), ui::kInvalidAXNodeID); + source()->HandleAccessibleAction(action); + EXPECT_EQ(v->last_action_id(), ui::kInvalidAXNodeID); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, + HandleAccessibleAction_SetSelection_MismatchedDeath) { + ui::AXActionData action; + action.action = ax::mojom::Action::kSetSelection; + action.anchor_node_id = 1; + action.focus_node_id = 2; + + // CHECK_EQ(anchor, focus) should fail because the IDs do not match. + EXPECT_CHECK_DEATH(source()->HandleAccessibleAction(action)); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, + HandleAccessibleAction_SetSelection_UsesAnchorNotTarget) { + auto target = std::make_unique<ActionTestView>(); + auto anchor = std::make_unique<ActionTestView>(); + + test_api().cache().Insert(&target->GetViewAccessibility()); + test_api().cache().Insert(&anchor->GetViewAccessibility()); + + // Prepare a SetSelection action where target != anchor == focus. + ui::AXActionData action; + action.action = ax::mojom::Action::kSetSelection; + action.target_node_id = target->GetViewAccessibility().GetUniqueId(); + action.anchor_node_id = anchor->GetViewAccessibility().GetUniqueId(); + action.focus_node_id = anchor->GetViewAccessibility().GetUniqueId(); + + EXPECT_EQ(target->last_action_id(), ui::kInvalidAXNodeID); + EXPECT_EQ(anchor->last_action_id(), ui::kInvalidAXNodeID); + + source()->HandleAccessibleAction(action); + + // The action should be performed on the anchor, not the target. However, + // because of how the test view is structured, we still expect the last + // action ID of the anchor to be the target's ID. + EXPECT_EQ(target->last_action_id(), ui::kInvalidAXNodeID); + EXPECT_EQ(anchor->last_action_id(), action.target_node_id); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, IsIgnored) { + EXPECT_FALSE(source()->IsIgnored(nullptr)); + + auto v = std::make_unique<View>(); + auto& ax = v->GetViewAccessibility(); + + EXPECT_FALSE(source()->IsIgnored(&ax)); + ax.SetIsIgnored(true); + EXPECT_TRUE(source()->IsIgnored(&ax)); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, IsEqual) { + auto v1 = std::make_unique<View>(); + auto v2 = std::make_unique<View>(); + auto& a1 = v1->GetViewAccessibility(); + auto& a2 = v2->GetViewAccessibility(); + + EXPECT_FALSE(source()->IsEqual(nullptr, &a1)); + EXPECT_FALSE(source()->IsEqual(&a1, nullptr)); + EXPECT_FALSE(source()->IsEqual(nullptr, nullptr)); + + EXPECT_TRUE(source()->IsEqual(&a1, &a1)); + + EXPECT_FALSE(source()->IsEqual(&a1, &a2)); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, GetNull) { + EXPECT_EQ(source()->GetNull(), nullptr); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, ToString_SingleNode) { + auto v = std::make_unique<View>(); + auto& ax = v->GetViewAccessibility(); + + ui::AXNodeData data; + source()->SerializeNode(&ax, &data); + std::string prefix = "##"; + std::string expected = prefix + data.ToString() + "\n"; + + EXPECT_EQ(source()->ToString(&ax, prefix), expected); +} + +TEST_F(ViewAccessibilityAXTreeSourceTest, ToString_TwoLevelTree) { + auto parent = std::make_unique<View>(); + auto* child = parent->AddChildView(std::make_unique<View>()); + auto& p_ax = parent->GetViewAccessibility(); + auto& c_ax = child->GetViewAccessibility(); + + ui::AXNodeData p_data, c_data; + source()->SerializeNode(&p_ax, &p_data); + source()->SerializeNode(&c_ax, &c_data); + + std::string prefix = "*"; + std::string want = prefix + p_data.ToString() + "\n" + + std::string(2, prefix[0]) + c_data.ToString() + "\n"; + + EXPECT_EQ(source()->ToString(&p_ax, prefix), want); +} + } // namespace views::test
diff --git a/ui/views/accessibility/view_accessibility.cc b/ui/views/accessibility/view_accessibility.cc index 2a109f8..a874191 100644 --- a/ui/views/accessibility/view_accessibility.cc +++ b/ui/views/accessibility/view_accessibility.cc
@@ -1539,6 +1539,10 @@ return out; } +std::string ViewAccessibility::GetDebugString() const { + return std::string(view_ ? view_->GetClassName() : "ViewAccessibility"); +} + void ViewAccessibility::FireNativeEvent(ax::mojom::Event event_type) { if (accessibility_events_callback_) { accessibility_events_callback_.Run(nullptr, event_type);
diff --git a/ui/views/accessibility/view_accessibility.h b/ui/views/accessibility/view_accessibility.h index a37cb200..193cc35 100644 --- a/ui/views/accessibility/view_accessibility.h +++ b/ui/views/accessibility/view_accessibility.h
@@ -571,6 +571,8 @@ // ViewAccessibility objects associated with the children of the `view_`. std::vector<raw_ptr<ViewAccessibility>> GetChildren() const; + virtual std::string GetDebugString() const; + // If true, moves accessibility focus to an ancestor. void set_propagate_focus_to_ancestor(bool value) { propagate_focus_to_ancestor_ = value;
diff --git a/v8 b/v8 index 3e93887..c8b2dbf 160000 --- a/v8 +++ b/v8
@@ -1 +1 @@ -Subproject commit 3e93887a44e2eb0e05a80af6c9192c1542b94524 +Subproject commit c8b2dbf389f00190338351d9ce989f84e73fc7a0