diff --git a/DEPS b/DEPS index 3a5ba7b..9598f5dc 100644 --- a/DEPS +++ b/DEPS
@@ -196,7 +196,7 @@ # luci-go CIPD package version. # Make sure the revision is uploaded by infra-packagers builder. # https://ci.chromium.org/p/infra-internal/g/infra-packagers/console - 'luci_go': 'git_revision:db421da12bad8e57f97ee45b24147e34ec882007', + 'luci_go': 'git_revision:ef18edd2fa067d8bf14c006abc03993f2c1eb1b9', # This can be overridden, e.g. with custom_vars, to build clang from HEAD # instead of downloading the prebuilt pinned revision. @@ -228,11 +228,11 @@ # 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': '6bf9189ae55401fcfaaadb8ee7bcc8103f87ddfe', + 'skia_revision': 'b6d60183850f85ac100dcc5433d4009bc54fdf87', # 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': '4ca9099406f256e1582a6e7ddc17d3162d569fec', + 'v8_revision': '218b9eeaa0d624accaf5d9441c8b9c6a2c85f677', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -240,7 +240,7 @@ # 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': '61517a160f016bcc4922fe49255405986ccf8182', + 'angle_revision': 'f016c4352f5203c10511df078b1ed5359afc1b35', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -299,7 +299,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '61f0e50fb92a3aea539bf5c22f3708e12e90dd17', + 'catapult_revision': '3c7d4d8aae77dad633cfda01dbb1f1744013855e', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -307,7 +307,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': 'f6d1346cfb3fd27044107f94114019f0d39a2aa7', + 'devtools_frontend_revision': 'fa99abbab5e2242fa719d481d4936d8377c5536d', # 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. @@ -347,7 +347,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': '8975f1656de5af1044e5d15bb0a5f40d644ffe04', + 'dawn_revision': '858e585cce6052cf043c04e4c0df73893af46617', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -767,7 +767,7 @@ 'packages': [ { 'package': 'chromium/third_party/androidx', - 'version': 'GpWCGdjX5wF8nbSbZY5hqlRfEA-DL6lRgj-iN2tjTXIC', + 'version': 'kJ-Oj1Wdw4nbj8PVnlEe9bsmXERGvXJ16-R5o54YQ84C', }, ], 'condition': 'checkout_android', @@ -1146,7 +1146,7 @@ Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + '18e09b9197a3b1d771c077c530d1a4ebad04c167', 'src/third_party/icu': - Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '2a822c5626ab1ed40366758e4740b4f0ea40237d', + Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '75e34bcccea0be165c31fdb278b3712c516c5876', 'src/third_party/icu4j': { 'packages': [ @@ -1389,7 +1389,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '171e281775914c1c427b926666bf1c0f8070e762', + Var('android_git') + '/platform/external/perfetto.git' + '@' + 'f94e497acc562fab07b1cbe20e973c8e150900ec', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1497,7 +1497,7 @@ }, 'src/third_party/re2/src': - Var('chromium_git') + '/external/github.com/google/re2.git' + '@' + '3a95199bcbea2f8762f899a66ea5f2e61fbd0395', + Var('chromium_git') + '/external/github.com/google/re2.git' + '@' + '6a994180b85293eafcce21d9f3eb8a3526498248', 'src/third_party/r8': { 'packages': [ @@ -1682,7 +1682,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@499fb7ba4c37e93cf8cbe4c1ade18d38e926578c', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@4a4f3e5129fcdc5f4932900566fe2d9ef639037d', 'condition': 'checkout_src_internal', },
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index 06274dd8..bb419897 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -625,6 +625,10 @@ const base::Feature kImeSystemEmojiPickerClipboard{ "SystemEmojiPickerClipboard", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enable or disable a new UI for stylus writing on the virtual keyboard +const base::Feature kImeStylusHandwriting{"StylusHandwriting", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Enables or disables Instant Tethering on Chrome OS. const base::Feature kInstantTethering{"InstantTethering", base::FEATURE_ENABLED_BY_DEFAULT};
diff --git a/ash/constants/ash_features.h b/ash/constants/ash_features.h index 0d66bb6..2e8d3f6 100644 --- a/ash/constants/ash_features.h +++ b/ash/constants/ash_features.h
@@ -238,6 +238,8 @@ extern const base::Feature kImeSystemEmojiPicker; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kImeSystemEmojiPickerClipboard; +COMPONENT_EXPORT(ASH_CONSTANTS) +extern const base::Feature kImeStylusHandwriting; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kInstantTethering; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kKeyboardBasedDisplayArrangementInSettings;
diff --git a/build/extract_partition.py b/build/extract_partition.py index 4b2f064..8b79a06 100755 --- a/build/extract_partition.py +++ b/build/extract_partition.py
@@ -5,8 +5,125 @@ """Extracts an LLD partition from an ELF file.""" import argparse +import hashlib +import math +import os +import struct import subprocess import sys +import tempfile + + +def _ComputeNewBuildId(old_build_id, file_path): + """ + Computes the new build-id from old build-id and file_path. + + Args: + old_build_id: Original build-id in bytearray. + file_path: Path to output ELF file. + + Returns: + New build id with the same length as |old_build_id|. + """ + m = hashlib.sha256() + m.update(old_build_id) + m.update(os.path.basename(file_path).encode('utf-8')) + hash_bytes = m.digest() + # In case build_id is longer than hash computed, repeat the hash + # to the desired length first. + id_size = len(old_build_id) + hash_size = len(hash_bytes) + return (hash_bytes * (id_size // hash_size + 1))[:id_size] + + +def _ExtractPartition(objcopy, input_elf, output_elf, partition): + """ + Extracts a partition from an ELF file. + + For partitions other than main partition, we need to rewrite + the .note.gnu.build-id section so that the build-id remains + unique. + + Note: + - `objcopy` does not modify build-id when partitioning the + combined ELF file by default. + - The new build-id is calculated as hash of original build-id + and partitioned ELF file name. + + Args: + objcopy: Path to objcopy binary. + input_elf: Path to input ELF file. + output_elf: Path to output ELF file. + partition: Partition to extract from combined ELF file. None when + extracting main partition. + """ + if not partition: # main partition + # We do not overwrite build-id on main partition to allow the expected + # partition build ids to be synthesized given a libchrome.so binary, + # if necessary. + subprocess.check_call( + [objcopy, '--extract-main-partition', input_elf, output_elf]) + return + + # partitioned libs + build_id_section = '.note.gnu.build-id' + + with tempfile.TemporaryDirectory() as tempdir: + temp_elf = os.path.join(tempdir, 'obj_without_id.so') + old_build_id_file = os.path.join(tempdir, 'old_build_id') + new_build_id_file = os.path.join(tempdir, 'new_build_id') + + # Dump out build-id section and remove original build-id section from + # ELF file. + subprocess.check_call([ + objcopy, + '--extract-partition', + partition, + # Note: Not using '--update-section' here as it is not supported + # by llvm-objcopy. + '--remove-section', + build_id_section, + '--dump-section', + '{}={}'.format(build_id_section, old_build_id_file), + input_elf, + temp_elf, + ]) + + with open(old_build_id_file, 'rb') as f: + note_content = f.read() + + # .note section has following format according to <elf/external.h> + # typedef struct { + # unsigned char namesz[4]; /* Size of entry's owner string */ + # unsigned char descsz[4]; /* Size of the note descriptor */ + # unsigned char type[4]; /* Interpretation of the descriptor */ + # char name[1]; /* Start of the name+desc data */ + # } Elf_External_Note; + # `build-id` rewrite is only required on Android platform, + # where we have partitioned lib. + # Android platform uses little-endian. + # <: little-endian + # 4x: Skip 4 bytes + # L: unsigned long, 4 bytes + descsz, = struct.Struct('<4xL').unpack_from(note_content) + prefix = note_content[:-descsz] + build_id = note_content[-descsz:] + + with open(new_build_id_file, 'wb') as f: + f.write(prefix + _ComputeNewBuildId(build_id, output_elf)) + + # Write back the new build-id section. + subprocess.check_call([ + objcopy, + '--add-section', + '{}={}'.format(build_id_section, new_build_id_file), + # Add alloc section flag, or else the section will be removed by + # objcopy --strip-all when generating unstripped lib file. + '--set-section-flags', + '{}={}'.format(build_id_section, 'alloc'), + temp_elf, + output_elf, + ]) def main(): @@ -34,18 +151,14 @@ parser.add_argument('input', help='Input file') args = parser.parse_args() - objcopy_args = [args.objcopy] - if args.partition: - objcopy_args += ['--extract-partition', args.partition] - else: - objcopy_args += ['--extract-main-partition'] - objcopy_args += [args.input, args.unstripped_output] - subprocess.check_call(objcopy_args) - - objcopy_args = [ - args.objcopy, '--strip-all', args.unstripped_output, args.stripped_output - ] - subprocess.check_call(objcopy_args) + _ExtractPartition(args.objcopy, args.input, args.unstripped_output, + args.partition) + subprocess.check_call([ + args.objcopy, + '--strip-all', + args.unstripped_output, + args.stripped_output, + ]) if args.dwp: dwp_args = [
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1 index be959448..c7ae5140 100644 --- a/build/fuchsia/linux.sdk.sha1 +++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@ -6.20210802.2.1 +6.20210803.0.1
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1 index be959448..c7ae5140 100644 --- a/build/fuchsia/mac.sdk.sha1 +++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@ -6.20210802.2.1 +6.20210803.0.1
diff --git a/chrome/VERSION b/chrome/VERSION index 0d733439..b2f39e3 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=94 MINOR=0 -BUILD=4596 +BUILD=4597 PATCH=0
diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni index 30e2219..bf38b71e 100644 --- a/chrome/android/chrome_java_resources.gni +++ b/chrome/android/chrome_java_resources.gni
@@ -708,6 +708,7 @@ "java/res/layout/recent_tabs_group_separator_visible.xml", "java/res/layout/recent_tabs_list_item.xml", "java/res/layout/recent_tabs_page.xml", + "java/res/layout/revamped_incognito_description_layout.xml", "java/res/layout/search_activity.xml", "java/res/layout/search_widget_template.xml", "java/res/layout/send_tab_to_self_device_picker_item.xml",
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni index a95f22d4..0b0a7be 100644 --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni
@@ -798,6 +798,7 @@ "java/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionView.java", "java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java", "java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java", + "java/src/org/chromium/chrome/browser/ntp/LegacyIncognitoDescriptionView.java", "java/src/org/chromium/chrome/browser/ntp/LogoBridge.java", "java/src/org/chromium/chrome/browser/ntp/LogoDelegateImpl.java", "java/src/org/chromium/chrome/browser/ntp/LogoView.java", @@ -818,6 +819,7 @@ "java/src/org/chromium/chrome/browser/ntp/RecentlyClosedBridge.java", "java/src/org/chromium/chrome/browser/ntp/RecentlyClosedTab.java", "java/src/org/chromium/chrome/browser/ntp/RecentlyClosedTabManager.java", + "java/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionView.java", "java/src/org/chromium/chrome/browser/ntp/ScrollListener.java", "java/src/org/chromium/chrome/browser/ntp/ScrollableContainerDelegate.java", "java/src/org/chromium/chrome/browser/ntp/SnapScrollHelper.java",
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksView.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksView.java index 5136a17..b6a124c 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksView.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksView.java
@@ -26,7 +26,7 @@ import org.chromium.base.MathUtils; import org.chromium.chrome.browser.feed.FeedSurfaceCoordinator; import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; -import org.chromium.chrome.browser.ntp.IncognitoDescriptionView; +import org.chromium.chrome.browser.ntp.LegacyIncognitoDescriptionView; import org.chromium.chrome.browser.ntp.search.SearchBoxCoordinator; import org.chromium.chrome.browser.omnibox.SearchEngineLogoUtils; import org.chromium.chrome.tab_ui.R; @@ -46,7 +46,7 @@ private AppBarLayout mHeaderView; private AppBarLayout.OnOffsetChangedListener mFakeSearchBoxShrinkAnimation; private SearchBoxCoordinator mSearchBoxCoordinator; - private IncognitoDescriptionView mIncognitoDescriptionView; + private LegacyIncognitoDescriptionView mIncognitoDescriptionView; private View.OnClickListener mIncognitoDescriptionLearnMoreListener; private boolean mIncognitoCookieControlsCardIsVisible; private boolean mIncognitoCookieControlsToggleIsChecked; @@ -184,7 +184,7 @@ containerView.setFocusable(true); containerView.setFocusableInTouchMode(true); } - mIncognitoDescriptionView = (IncognitoDescriptionView) containerView.findViewById( + mIncognitoDescriptionView = (LegacyIncognitoDescriptionView) containerView.findViewById( R.id.new_tab_incognito_container); if (mIncognitoDescriptionLearnMoreListener != null) { setIncognitoDescriptionLearnMoreClickListener(mIncognitoDescriptionLearnMoreListener);
diff --git a/chrome/android/java/res/layout/incognito_description_layout.xml b/chrome/android/java/res/layout/incognito_description_layout.xml index 3ba735c..f59ba56b 100644 --- a/chrome/android/java/res/layout/incognito_description_layout.xml +++ b/chrome/android/java/res/layout/incognito_description_layout.xml
@@ -3,7 +3,7 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> -<org.chromium.chrome.browser.ntp.IncognitoDescriptionView +<org.chromium.chrome.browser.ntp.LegacyIncognitoDescriptionView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" @@ -122,4 +122,4 @@ </RelativeLayout> -</org.chromium.chrome.browser.ntp.IncognitoDescriptionView> +</org.chromium.chrome.browser.ntp.LegacyIncognitoDescriptionView>
diff --git a/chrome/android/java/res/layout/new_tab_page_incognito.xml b/chrome/android/java/res/layout/new_tab_page_incognito.xml index fe50af78..a43c80e 100644 --- a/chrome/android/java/res/layout/new_tab_page_incognito.xml +++ b/chrome/android/java/res/layout/new_tab_page_incognito.xml
@@ -21,7 +21,10 @@ android:fillViewport="false" android:requiresFadingEdge="vertical" > - <include layout="@layout/incognito_description_layout" /> + <ViewStub + android:id="@+id/incognito_description_layout_stub" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> </org.chromium.chrome.browser.ntp.NewTabPageScrollView>
diff --git a/chrome/android/java/res/layout/revamped_incognito_description_layout.xml b/chrome/android/java/res/layout/revamped_incognito_description_layout.xml new file mode 100644 index 0000000..fa0e388 --- /dev/null +++ b/chrome/android/java/res/layout/revamped_incognito_description_layout.xml
@@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2021 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. --> + +<org.chromium.chrome.browser.ntp.RevampedIncognitoDescriptionView + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/revamped_new_tab_incognito_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="start" + android:orientation="vertical" + android:paddingStart="@dimen/md_incognito_ntp_padding_left" > + + <ImageView + android:id="@+id/revamped_new_tab_incognito_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + tools:ignore="ContentDescription" + android:src="@drawable/incognito_splash" + app:tint="@color/ntp_incognito_icon_color" /> + + <TextView + android:id="@+id/revamped_new_tab_incognito_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/new_tab_otr_title" + android:textAppearance="@style/TextAppearance.Headline.Primary.Light" /> + + <org.chromium.ui.widget.TextViewWithClickableSpans + android:id="@+id/revamped_new_tab_incognito_subtitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.TextMedium.Secondary.Light" + android:lineSpacingExtra="@dimen/md_incognito_ntp_line_spacing" /> + + <LinearLayout + android:id="@+id/revamped_new_tab_incognito_bulletpoints_container" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="start" + android:layout_marginBottom="12dp"> + + <org.chromium.ui.widget.TextViewWithLeading + android:id="@+id/revamped_new_tab_incognito_features" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.TextMedium.Secondary.Light" + app:leading="@dimen/text_size_medium_leading" /> + + <org.chromium.ui.widget.TextViewWithLeading + android:id="@+id/revamped_new_tab_incognito_warning" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.TextMedium.Secondary.Light" + app:leading="@dimen/text_size_medium_leading" /> + + </LinearLayout> + + <org.chromium.ui.widget.TextViewWithLeading + android:id="@+id/revamped_learn_more" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minHeight="@dimen/min_touch_target_size" + android:gravity="center_vertical" + android:text="@string/learn_more" + android:textAppearance="@style/TextAppearance.IncognitoNewTabLearnMoreLinkModern" + app:leading="@dimen/text_size_medium_leading" /> + +</org.chromium.chrome.browser.ntp.RevampedIncognitoDescriptionView>
diff --git a/chrome/android/java/res/xml/legal_information_preferences.xml b/chrome/android/java/res/xml/legal_information_preferences.xml index 9d5c710..898f5a89 100644 --- a/chrome/android/java/res/xml/legal_information_preferences.xml +++ b/chrome/android/java/res/xml/legal_information_preferences.xml
@@ -21,5 +21,5 @@ <org.chromium.chrome.browser.about_settings.HyperlinkPreference android:key="privacy_policy" android:title="@string/privacy_policy_title" - app:url="@string/chrome_privacy_policy_url" /> + app:url="@string/google_privacy_policy_url" /> </PreferenceScreen>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java b/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java index adc4c4f..c21dfcff 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java
@@ -17,9 +17,11 @@ import org.chromium.base.ActivityState; import org.chromium.base.ApiCompatibilityUtils; import org.chromium.base.ApplicationStatus; +import org.chromium.base.ContextUtils; import org.chromium.base.metrics.RecordUserAction; import org.chromium.base.supplier.ObservableSupplier; import org.chromium.chrome.browser.ChromeTabbedActivity; +import org.chromium.chrome.browser.app.tab_activity_glue.ReparentingTask; import org.chromium.chrome.browser.app.tabmodel.TabModelOrchestrator; import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton; import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; @@ -86,8 +88,38 @@ @Override protected void moveTabToOtherWindow(Tab tab) { - // TODO: Implement the target instance selection UI. Make it possible to move tabs - // to uninstantiated activity too. + // TODO: Invoke target selector dialog. + // TargetSelectorCoordinator.showDialog( + // mActivity, (instanceInfo) -> moveTabAction(instanceInfo, tab), getInstanceInfo()); + } + + private void moveTabAction(InstanceInfo info, Tab tab) { + Activity targetActivity = getActivityById(info.instanceId); + if (targetActivity != null) { + reparentTabToRunningActivity((ChromeTabbedActivity) targetActivity, tab); + } else { + onMultiInstanceModeStarted(); + Intent intent = MultiWindowUtils.createNewWindowIntent( + mActivity, info.instanceId, /*openAdjacently=*/true); + ReparentingTask.from(tab).begin(mActivity, intent, + mMultiWindowModeStateDispatcher.getOpenInOtherWindowActivityOptions(), null); + } + } + + private void reparentTabToRunningActivity(ChromeTabbedActivity targetActivity, Tab tab) { + assert targetActivity != null; + Intent intent = new Intent(); + Context appContext = ContextUtils.getApplicationContext(); + intent.setClassName(appContext, ChromeTabbedActivity.class.getName()); + MultiWindowUtils.setOpenInOtherWindowIntentExtras( + intent, mActivity, targetActivity.getClass()); + onMultiInstanceModeStarted(); + RecordUserAction.record("MobileMenuMoveToOtherWindow"); + + ReparentingTask.from(tab).setupIntent(mActivity, intent, null); + + targetActivity.onNewIntent(intent); + bringTaskForeground(targetActivity.getTaskId()); } @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionView.java index b324263..bc4e078 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionView.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionView.java
@@ -1,397 +1,58 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. +// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.ntp; -import static org.chromium.ui.base.ViewUtils.dpToPx; - -import android.content.Context; -import android.content.res.Configuration; -import android.content.res.Resources; -import android.text.SpannableString; -import android.text.method.LinkMovementMethod; -import android.text.style.ForegroundColorSpan; -import android.util.AttributeSet; -import android.view.Gravity; import android.view.View; -import android.widget.CompoundButton.OnCheckedChangeListener; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.RelativeLayout; -import android.widget.TextView; - -import androidx.annotation.IdRes; -import androidx.annotation.StringRes; -import androidx.appcompat.widget.SwitchCompat; - -import org.chromium.base.ApiCompatibilityUtils; -import org.chromium.chrome.R; -import org.chromium.chrome.browser.flags.CachedFeatureFlags; -import org.chromium.chrome.browser.flags.ChromeFeatureList; -import org.chromium.components.content_settings.CookieControlsEnforcement; -import org.chromium.ui.text.NoUnderlineClickableSpan; -import org.chromium.ui.text.SpanApplier; -import org.chromium.ui.widget.ChromeBulletSpan; +import android.widget.CompoundButton; /** - * The view to describle incognito mode. + * This interface includes method that are shared in LegacyIncognitoDescriptionView and + * RevampedIncognitoDescriptionView. */ -public class IncognitoDescriptionView extends LinearLayout { - private int mWidthDp; - private int mHeightDp; - private boolean mShowCard; - - private LinearLayout mContainer; - private TextView mHeader; - private TextView mSubtitle; - private LinearLayout mBulletpointsContainer; - private TextView mLearnMore; - private TextView[] mParagraphs; - private RelativeLayout mCookieControlsCard; - private SwitchCompat mCookieControlsToggle; - private ImageView mCookieControlsManagedIcon; - private TextView mCookieControlsTitle; - private TextView mCookieControlsSubtitle; - - private static final int BULLETPOINTS_HORIZONTAL_SPACING_DP = 40; - private static final int BULLETPOINTS_MARGIN_BOTTOM_DP = 12; - private static final int CONTENT_WIDTH_DP = 600; - private static final int WIDE_LAYOUT_THRESHOLD_DP = 720; - private static final int COOKIES_CONTROL_MARGIN_TOP_DP = 12; - - /** Default constructor needed to inflate via XML. */ - public IncognitoDescriptionView(Context context, AttributeSet attrs) { - super(context, attrs); - } +public interface IncognitoDescriptionView { + /** + * Set NTP Header + * @param newTabPageHeader + */ + void setNewTabHeader(String newTabPageHeader); /** * Set learn more on click listerner. * @param listener The given listener. */ - public void setLearnMoreOnclickListener(OnClickListener listener) { - mLearnMore.setOnClickListener(listener); - } - - /** - * Set cookie controls toggle on checked change listerner. - * @param listener The given listener. - */ - public void setCookieControlsToggleOnCheckedChangeListener(OnCheckedChangeListener listener) { - mCookieControlsToggle.setOnCheckedChangeListener(listener); - } - - /** - * Set cookie controls toggle's checked value. - * @param enabled The value to set the toggle to. - */ - public void setCookieControlsToggle(boolean enabled) { - mCookieControlsToggle.setChecked(enabled); - } - - /** - * Set cookie controls icon on click listener. - * @param listener The given listener. - */ - public void setCookieControlsIconOnclickListener(OnClickListener listener) { - mCookieControlsManagedIcon.setOnClickListener(listener); - } - - @Override - protected void onFinishInflate() { - super.onFinishInflate(); - - mWidthDp = getContext().getResources().getConfiguration().screenWidthDp; - mHeightDp = getContext().getResources().getConfiguration().screenHeightDp; - - populateBulletpoints(R.id.new_tab_incognito_features, R.string.new_tab_otr_not_saved); - populateBulletpoints(R.id.new_tab_incognito_warning, R.string.new_tab_otr_visible); - - mContainer = findViewById(R.id.new_tab_incognito_container); - mHeader = findViewById(R.id.new_tab_incognito_title); - mSubtitle = findViewById(R.id.new_tab_incognito_subtitle); - mLearnMore = findViewById(R.id.learn_more); - mParagraphs = new TextView[] {mSubtitle, findViewById(R.id.new_tab_incognito_features), - findViewById(R.id.new_tab_incognito_warning)}; - mBulletpointsContainer = findViewById(R.id.new_tab_incognito_bulletpoints_container); - mCookieControlsCard = findViewById(R.id.cookie_controls_card); - mCookieControlsToggle = findViewById(R.id.cookie_controls_card_toggle); - mCookieControlsManagedIcon = findViewById(R.id.cookie_controls_card_managed_icon); - mCookieControlsTitle = findViewById(R.id.cookie_controls_card_title); - mCookieControlsSubtitle = findViewById(R.id.cookie_controls_card_subtitle); - - adjustView(); - } - - @Override - public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - // View#onConfigurationChanged() doesn't get called when resizing this view in - // multi-window mode, so #onMeasure() is used instead. - Configuration config = getContext().getResources().getConfiguration(); - if (mWidthDp != config.screenWidthDp || mHeightDp != config.screenHeightDp) { - mWidthDp = config.screenWidthDp; - mHeightDp = config.screenHeightDp; - adjustView(); - } - - super.onMeasure(widthMeasureSpec, heightMeasureSpec); - } - - private void adjustView() { - adjustIcon(); - adjustLayout(); - adjustLearnMore(); - adjustCookieControlsCard(); - } - - /** - * @param element Resource ID of the element to be populated with the bulletpoints. - * @param content String ID to serve as the text of |element|. Must contain an <em></em> span, - * which will be emphasized, and three <li> items, which will be converted to - * bulletpoints. - * Populates |element| with |content|. - */ - private void populateBulletpoints(@IdRes int element, @StringRes int content) { - TextView view = (TextView) findViewById(element); - String text = getContext().getResources().getString(content); - - // TODO(msramek): Unfortunately, our strings are missing the closing "</li>" tag, which - // is not a problem when they're used in the Desktop WebUI (omitting the tag is valid in - // HTML5), but it is a problem for SpanApplier. Update the strings and remove this regex. - // Note that modifying the strings is a non-trivial operation as they went through a special - // translation process. - text = text.replaceAll("<li>([^<]+)\n", "<li>$1</li>\n"); - - // Format the bulletpoints: - // - Disambiguate the <li></li> spans for SpanApplier. - // - Remove leading whitespace (caused by formatting in the .grdp file) - // - Remove the trailing newline after the last bulletpoint. - text = text.replaceFirst(" *<li>([^<]*)</li>", "<li1>$1</li1>"); - text = text.replaceFirst(" *<li>([^<]*)</li>", "<li2>$1</li2>"); - text = text.replaceFirst(" *<li>([^<]*)</li>\n", "<li3>$1</li3>"); - - // Remove the <ul></ul> tags which serve no purpose here, including the whitespace around - // them. - text = text.replaceAll(" *</?ul>\\n?", ""); - - view.setText(SpanApplier.applySpans(text, - new SpanApplier.SpanInfo("<em>", "</em>", - new ForegroundColorSpan(ApiCompatibilityUtils.getColor( - getContext().getResources(), R.color.incognito_emphasis))), - new SpanApplier.SpanInfo("<li1>", "</li1>", new ChromeBulletSpan(getContext())), - new SpanApplier.SpanInfo("<li2>", "</li2>", new ChromeBulletSpan(getContext())), - new SpanApplier.SpanInfo("<li3>", "</li3>", new ChromeBulletSpan(getContext())))); - } - - /** Adjusts the paddings, margins, and the orientation of bulletpoints. */ - private void adjustLayout() { - int paddingHorizontalDp; - int paddingVerticalDp; - - boolean bulletpointsArrangedHorizontally; - - if (mWidthDp <= WIDE_LAYOUT_THRESHOLD_DP) { - // Small padding. - paddingHorizontalDp = mWidthDp <= 240 ? 24 : 32; - paddingVerticalDp = 32; - - // Align left. - mContainer.setGravity(Gravity.START); - - // Decide the bulletpoints orientation. - bulletpointsArrangedHorizontally = false; - - // The subtitle is sized automatically, but not wider than CONTENT_WIDTH_DP. - mSubtitle.setLayoutParams( - new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, - LinearLayout.LayoutParams.WRAP_CONTENT)); - mSubtitle.setMaxWidth(dpToPx(getContext(), CONTENT_WIDTH_DP)); - - // The bulletpoints container takes the same width as subtitle. Since the width can - // not be directly measured at this stage, we must calculate it manually. - mBulletpointsContainer.getLayoutParams().width = dpToPx( - getContext(), Math.min(CONTENT_WIDTH_DP, mWidthDp - 2 * paddingHorizontalDp)); - } else { - // Large padding. - paddingHorizontalDp = 0; // Should not be necessary on a screen this large. - paddingVerticalDp = mHeightDp <= 320 ? 16 : 72; - - // Align to the center. - mContainer.setGravity(Gravity.CENTER_HORIZONTAL); - - // Decide the bulletpoints orientation. - bulletpointsArrangedHorizontally = true; - - int contentWidthPx = dpToPx(getContext(), CONTENT_WIDTH_DP); - mSubtitle.setLayoutParams(new LinearLayout.LayoutParams( - contentWidthPx, LinearLayout.LayoutParams.WRAP_CONTENT)); - mBulletpointsContainer.getLayoutParams().width = contentWidthPx; - } - - // Apply the bulletpoints orientation. - if (bulletpointsArrangedHorizontally) { - mBulletpointsContainer.setOrientation(LinearLayout.HORIZONTAL); - } else { - mBulletpointsContainer.setOrientation(LinearLayout.VERTICAL); - } - - // Set up paddings and margins. - int paddingTop; - int paddingBottom; - paddingTop = paddingBottom = dpToPx(getContext(), paddingVerticalDp); - mContainer.setPadding(dpToPx(getContext(), paddingHorizontalDp), paddingTop, - dpToPx(getContext(), paddingHorizontalDp), paddingBottom); - - // Total space between adjacent paragraphs (Including margins, paddings, etc.) - int totalSpaceBetweenViews = getContext().getResources().getDimensionPixelSize( - R.dimen.incognito_ntp_total_space_between_views); - - for (TextView paragraph : mParagraphs) { - // If bulletpoints are arranged horizontally, there should be space between them. - int rightMarginPx = (bulletpointsArrangedHorizontally - && paragraph == mBulletpointsContainer.getChildAt(0)) - ? dpToPx(getContext(), BULLETPOINTS_HORIZONTAL_SPACING_DP) - : 0; - - ((LinearLayout.LayoutParams) paragraph.getLayoutParams()) - .setMargins(0, totalSpaceBetweenViews, rightMarginPx, 0); - paragraph.setLayoutParams(paragraph.getLayoutParams()); // Apply the new layout. - } - - // The learn more text view has height of min_touch_target_size. Typically the actual text - // is not that tall, and already has some space. We want to have a - // totalSpaceBetweenViews tall gap between the learn more text and the adjacent - // elements. So add the difference as an additional margin. - int innerSpacing = (int) ((getContext().getResources().getDimensionPixelSize( - R.dimen.min_touch_target_size) - - mLearnMore.getTextSize()) - / 2); - int learnMoreSpacingTop = totalSpaceBetweenViews - innerSpacing - - dpToPx(getContext(), BULLETPOINTS_MARGIN_BOTTOM_DP); - int learnMoreSpacingBottom = - dpToPx(getContext(), COOKIES_CONTROL_MARGIN_TOP_DP) - innerSpacing; - - LinearLayout.LayoutParams params = (LayoutParams) mLearnMore.getLayoutParams(); - params.setMargins(0, learnMoreSpacingTop, 0, learnMoreSpacingBottom); - mLearnMore.requestLayout(); - - ((LinearLayout.LayoutParams) mHeader.getLayoutParams()) - .setMargins(0, totalSpaceBetweenViews, 0, 0); - mHeader.setLayoutParams(mHeader.getLayoutParams()); // Apply the new layout. - } - - /** Adjust the Incognito icon. */ - private void adjustIcon() { - // The icon resource is 120dp x 120dp (i.e. 120px x 120px at MDPI). This method always - // resizes the icon view to 120dp x 120dp or smaller, therefore image quality is not lost. - - int sizeDp; - if (mWidthDp <= WIDE_LAYOUT_THRESHOLD_DP) { - sizeDp = (mWidthDp <= 240 || mHeightDp <= 480) ? 48 : 72; - } else { - sizeDp = mHeightDp <= 480 ? 72 : 120; - } - - ImageView icon = (ImageView) findViewById(R.id.new_tab_incognito_icon); - icon.getLayoutParams().width = dpToPx(getContext(), sizeDp); - icon.getLayoutParams().height = dpToPx(getContext(), sizeDp); - } - - /** Adjust the "Learn More" link. */ - private void adjustLearnMore() { - boolean readLaterEnabled = CachedFeatureFlags.isEnabled(ChromeFeatureList.READ_LATER); - final String subtitleText = getContext().getResources().getString(readLaterEnabled - ? R.string.new_tab_otr_subtitle_with_reading_list - : R.string.new_tab_otr_subtitle); - boolean learnMoreInSubtitle = mWidthDp > WIDE_LAYOUT_THRESHOLD_DP; - - mLearnMore.setVisibility(learnMoreInSubtitle ? View.GONE : View.VISIBLE); - - if (!learnMoreInSubtitle) { - // Revert to the original text. - mSubtitle.setText(subtitleText); - mSubtitle.setMovementMethod(null); - return; - } - - // Concatenate the original text with a clickable "Learn more" link. - StringBuilder concatenatedText = new StringBuilder(); - concatenatedText.append(subtitleText); - concatenatedText.append(" "); - concatenatedText.append(getContext().getResources().getString(R.string.learn_more)); - SpannableString textWithLearnMoreLink = new SpannableString(concatenatedText.toString()); - - NoUnderlineClickableSpan span = new NoUnderlineClickableSpan( - getResources(), R.color.modern_blue_300, (view) -> mLearnMore.callOnClick()); - textWithLearnMoreLink.setSpan( - span, subtitleText.length() + 1, textWithLearnMoreLink.length(), 0 /* flags */); - mSubtitle.setText(textWithLearnMoreLink); - mSubtitle.setMovementMethod(LinkMovementMethod.getInstance()); - } - - /** Adjust the Cookie Controls Card. */ - private void adjustCookieControlsCard() { - if (mShowCard) { - if (mWidthDp <= WIDE_LAYOUT_THRESHOLD_DP) { - // Portrait - mCookieControlsCard.getLayoutParams().width = - LinearLayout.LayoutParams.MATCH_PARENT; - } else { - // Landscape - mCookieControlsCard.getLayoutParams().width = - dpToPx(getContext(), CONTENT_WIDTH_DP); - } - } - } + void setLearnMoreOnclickListener(View.OnClickListener listener); /** * Adjust the Cookie Controls Card. * @param showCard A boolean indicating if the card should be visible or not. */ - public void showCookieControlsCard(boolean showCard) { - mShowCard = showCard; - mCookieControlsCard.setVisibility(showCard ? View.VISIBLE : View.GONE); - adjustCookieControlsCard(); - } + default void showCookieControlsCard(boolean showCard) {} + + /** + * Set cookie controls toggle's checked value. + * @param enabled The value to set the toggle to. + */ + default void setCookieControlsToggle(boolean enabled) {} + + /** + * Set cookie controls toggle on checked change listerner. + * @param listener The given listener. + */ + default void setCookieControlsToggleOnCheckedChangeListener( + CompoundButton.OnCheckedChangeListener listener) {} /** * Sets the cookie controls enforced state. * @param enforcement A CookieControlsEnforcement enum type indicating the type of * enforcement policy being applied to Cookie Controls. */ - public void setCookieControlsEnforcement(@CookieControlsEnforcement int enforcement) { - boolean enforced = enforcement != CookieControlsEnforcement.NO_ENFORCEMENT; - mCookieControlsToggle.setEnabled(!enforced); - mCookieControlsManagedIcon.setVisibility(enforced ? View.VISIBLE : View.GONE); - mCookieControlsTitle.setEnabled(!enforced); - mCookieControlsSubtitle.setEnabled(!enforced); + default void setCookieControlsEnforcement(int enforcement) {} - Resources resources = getContext().getResources(); - StringBuilder subtitleText = new StringBuilder(); - subtitleText.append(resources.getString(R.string.new_tab_otr_third_party_cookie_sublabel)); - if (!enforced) { - mCookieControlsSubtitle.setText(subtitleText.toString()); - return; - } - - int iconRes; - String addition; - switch (enforcement) { - case CookieControlsEnforcement.ENFORCED_BY_POLICY: - iconRes = R.drawable.ic_business_small; - addition = resources.getString(R.string.managed_by_your_organization); - break; - case CookieControlsEnforcement.ENFORCED_BY_COOKIE_SETTING: - iconRes = R.drawable.settings_cog; - addition = resources.getString( - R.string.new_tab_otr_cookie_controls_controlled_tooltip_text); - break; - default: - return; - } - mCookieControlsManagedIcon.setImageResource(iconRes); - subtitleText.append("\n"); - subtitleText.append(addition); - mCookieControlsSubtitle.setText(subtitleText.toString()); - } + /** + * Set cookie controls icon on click listener. + * @param listener The given listener. + */ + default void setCookieControlsIconOnclickListener(View.OnClickListener listener) {} }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java index 725f4fe..6175236 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java
@@ -8,7 +8,6 @@ import android.graphics.Canvas; import android.os.Build; import android.view.LayoutInflater; -import android.widget.TextView; import androidx.annotation.VisibleForTesting; import androidx.core.view.ViewCompat; @@ -124,9 +123,9 @@ (IncognitoNewTabPageView) inflater.inflate(R.layout.new_tab_page_incognito, null); mIncognitoNewTabPageView.initialize(mIncognitoNewTabPageManager); - TextView newTabIncognitoHeader = - mIncognitoNewTabPageView.findViewById(R.id.new_tab_incognito_title); - newTabIncognitoHeader.setText(R.string.new_tab_otr_title); + String newTabPageHeader = + mIncognitoNewTabPageView.getContext().getString(R.string.new_tab_otr_title); + mIncognitoNewTabPageView.setIncognitoNewTabHeader(newTabPageHeader); // Work around https://crbug.com/943873 and https://crbug.com/963385 where default focus // highlight shows up after toggling dark mode.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java index 09e6384..4f30d2f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java
@@ -8,11 +8,13 @@ import android.graphics.Canvas; import android.util.AttributeSet; import android.view.View; +import android.view.ViewStub; import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.FrameLayout; import org.chromium.base.ApiCompatibilityUtils; import org.chromium.chrome.R; +import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.components.content_settings.CookieControlsEnforcement; import org.chromium.ui.base.ViewUtils; @@ -77,11 +79,17 @@ // any shortcut causes the UrlBar to be focused. See ViewRootImpl.leaveTouchMode(). mScrollView.setDescendantFocusability(FOCUS_BEFORE_DESCENDANTS); - mDescriptionView = - (IncognitoDescriptionView) findViewById(R.id.new_tab_incognito_container); + ViewStub viewStub = findViewById(R.id.incognito_description_layout_stub); + if (shouldShowRevampedIncognitoNTP()) { + viewStub.setLayoutResource(R.layout.revamped_incognito_description_layout); + } else { + viewStub.setLayoutResource(R.layout.incognito_description_layout); + } + + mDescriptionView = (IncognitoDescriptionView) viewStub.inflate(); mDescriptionView.setLearnMoreOnclickListener(new OnClickListener() { @Override - public void onClick(View v) { + public void onClick(View view) { mManager.loadIncognitoLearnMore(); } }); @@ -122,6 +130,10 @@ || getHeight() != mSnapshotHeight || mScrollView.getScrollY() != mSnapshotScrollY; } + boolean shouldShowRevampedIncognitoNTP() { + return ChromeFeatureList.isEnabled(ChromeFeatureList.INCOGNITO_NTP_REVAMP); + } + /** * @see org.chromium.chrome.browser.compositor.layouts.content. * InvalidationAwareThumbnailProvider#captureThumbnail(Canvas) @@ -172,4 +184,8 @@ void setIncognitoCookieControlsIconOnclickListener(OnClickListener listener) { mDescriptionView.setCookieControlsIconOnclickListener(listener); } + + void setIncognitoNewTabHeader(String newTabPageHeader) { + mDescriptionView.setNewTabHeader(newTabPageHeader); + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/LegacyIncognitoDescriptionView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/LegacyIncognitoDescriptionView.java new file mode 100644 index 0000000..e46be671 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/LegacyIncognitoDescriptionView.java
@@ -0,0 +1,384 @@ +// Copyright 2019 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.chrome.browser.ntp; + +import static org.chromium.ui.base.ViewUtils.dpToPx; + +import android.content.Context; +import android.content.res.Configuration; +import android.content.res.Resources; +import android.text.SpannableString; +import android.text.method.LinkMovementMethod; +import android.text.style.ForegroundColorSpan; +import android.util.AttributeSet; +import android.view.Gravity; +import android.view.View; +import android.widget.CompoundButton.OnCheckedChangeListener; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.RelativeLayout; +import android.widget.TextView; + +import androidx.annotation.IdRes; +import androidx.annotation.StringRes; +import androidx.appcompat.widget.SwitchCompat; + +import org.chromium.base.ApiCompatibilityUtils; +import org.chromium.chrome.R; +import org.chromium.chrome.browser.flags.CachedFeatureFlags; +import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.components.content_settings.CookieControlsEnforcement; +import org.chromium.ui.text.NoUnderlineClickableSpan; +import org.chromium.ui.text.SpanApplier; +import org.chromium.ui.widget.ChromeBulletSpan; + +/** + * The view to describle incognito mode. + */ +public class LegacyIncognitoDescriptionView + extends LinearLayout implements IncognitoDescriptionView { + private int mWidthDp; + private int mHeightDp; + private boolean mShowCard; + + private LinearLayout mContainer; + private TextView mHeader; + private TextView mSubtitle; + private LinearLayout mBulletpointsContainer; + private TextView mLearnMore; + private TextView[] mParagraphs; + private RelativeLayout mCookieControlsCard; + private SwitchCompat mCookieControlsToggle; + private ImageView mCookieControlsManagedIcon; + private TextView mCookieControlsTitle; + private TextView mCookieControlsSubtitle; + + private static final int BULLETPOINTS_HORIZONTAL_SPACING_DP = 40; + private static final int BULLETPOINTS_MARGIN_BOTTOM_DP = 12; + private static final int CONTENT_WIDTH_DP = 600; + private static final int WIDE_LAYOUT_THRESHOLD_DP = 720; + private static final int COOKIES_CONTROL_MARGIN_TOP_DP = 12; + + /** Default constructor needed to inflate via XML. */ + public LegacyIncognitoDescriptionView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + public void setNewTabHeader(String newTabPageHeader) { + mHeader.setText(newTabPageHeader); + } + + @Override + public void setLearnMoreOnclickListener(OnClickListener listener) { + mLearnMore.setOnClickListener(listener); + } + + @Override + public void setCookieControlsToggleOnCheckedChangeListener(OnCheckedChangeListener listener) { + mCookieControlsToggle.setOnCheckedChangeListener(listener); + } + + @Override + public void setCookieControlsToggle(boolean enabled) { + mCookieControlsToggle.setChecked(enabled); + } + + @Override + public void setCookieControlsIconOnclickListener(OnClickListener listener) { + mCookieControlsManagedIcon.setOnClickListener(listener); + } + + @Override + protected void onFinishInflate() { + super.onFinishInflate(); + + mWidthDp = getContext().getResources().getConfiguration().screenWidthDp; + mHeightDp = getContext().getResources().getConfiguration().screenHeightDp; + + populateBulletpoints(R.id.new_tab_incognito_features, R.string.new_tab_otr_not_saved); + populateBulletpoints(R.id.new_tab_incognito_warning, R.string.new_tab_otr_visible); + + mContainer = findViewById(R.id.new_tab_incognito_container); + mHeader = findViewById(R.id.new_tab_incognito_title); + mSubtitle = findViewById(R.id.new_tab_incognito_subtitle); + mLearnMore = findViewById(R.id.learn_more); + mParagraphs = new TextView[] {mSubtitle, findViewById(R.id.new_tab_incognito_features), + findViewById(R.id.new_tab_incognito_warning)}; + mBulletpointsContainer = findViewById(R.id.new_tab_incognito_bulletpoints_container); + mCookieControlsCard = findViewById(R.id.cookie_controls_card); + mCookieControlsToggle = findViewById(R.id.cookie_controls_card_toggle); + mCookieControlsManagedIcon = findViewById(R.id.cookie_controls_card_managed_icon); + mCookieControlsTitle = findViewById(R.id.cookie_controls_card_title); + mCookieControlsSubtitle = findViewById(R.id.cookie_controls_card_subtitle); + + adjustView(); + } + + @Override + public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + // View#onConfigurationChanged() doesn't get called when resizing this view in + // multi-window mode, so #onMeasure() is used instead. + Configuration config = getContext().getResources().getConfiguration(); + if (mWidthDp != config.screenWidthDp || mHeightDp != config.screenHeightDp) { + mWidthDp = config.screenWidthDp; + mHeightDp = config.screenHeightDp; + adjustView(); + } + + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + } + + private void adjustView() { + adjustIcon(); + adjustLayout(); + adjustLearnMore(); + adjustCookieControlsCard(); + } + + /** + * @param element Resource ID of the element to be populated with the bulletpoints. + * @param content String ID to serve as the text of |element|. Must contain an <em></em> span, + * which will be emphasized, and three <li> items, which will be converted to + * bulletpoints. + * Populates |element| with |content|. + */ + private void populateBulletpoints(@IdRes int element, @StringRes int content) { + TextView view = (TextView) findViewById(element); + String text = getContext().getResources().getString(content); + + // TODO(msramek): Unfortunately, our strings are missing the closing "</li>" tag, which + // is not a problem when they're used in the Desktop WebUI (omitting the tag is valid in + // HTML5), but it is a problem for SpanApplier. Update the strings and remove this regex. + // Note that modifying the strings is a non-trivial operation as they went through a special + // translation process. + text = text.replaceAll("<li>([^<]+)\n", "<li>$1</li>\n"); + + // Format the bulletpoints: + // - Disambiguate the <li></li> spans for SpanApplier. + // - Remove leading whitespace (caused by formatting in the .grdp file) + // - Remove the trailing newline after the last bulletpoint. + text = text.replaceFirst(" *<li>([^<]*)</li>", "<li1>$1</li1>"); + text = text.replaceFirst(" *<li>([^<]*)</li>", "<li2>$1</li2>"); + text = text.replaceFirst(" *<li>([^<]*)</li>\n", "<li3>$1</li3>"); + + // Remove the <ul></ul> tags which serve no purpose here, including the whitespace around + // them. + text = text.replaceAll(" *</?ul>\\n?", ""); + + view.setText(SpanApplier.applySpans(text, + new SpanApplier.SpanInfo("<em>", "</em>", + new ForegroundColorSpan(ApiCompatibilityUtils.getColor( + getContext().getResources(), R.color.incognito_emphasis))), + new SpanApplier.SpanInfo("<li1>", "</li1>", new ChromeBulletSpan(getContext())), + new SpanApplier.SpanInfo("<li2>", "</li2>", new ChromeBulletSpan(getContext())), + new SpanApplier.SpanInfo("<li3>", "</li3>", new ChromeBulletSpan(getContext())))); + } + + /** Adjusts the paddings, margins, and the orientation of bulletpoints. */ + private void adjustLayout() { + int paddingHorizontalDp; + int paddingVerticalDp; + + boolean bulletpointsArrangedHorizontally; + + if (mWidthDp <= WIDE_LAYOUT_THRESHOLD_DP) { + // Small padding. + paddingHorizontalDp = mWidthDp <= 240 ? 24 : 32; + paddingVerticalDp = 32; + + // Align left. + mContainer.setGravity(Gravity.START); + + // Decide the bulletpoints orientation. + bulletpointsArrangedHorizontally = false; + + // The subtitle is sized automatically, but not wider than CONTENT_WIDTH_DP. + mSubtitle.setLayoutParams( + new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.WRAP_CONTENT)); + mSubtitle.setMaxWidth(dpToPx(getContext(), CONTENT_WIDTH_DP)); + + // The bulletpoints container takes the same width as subtitle. Since the width can + // not be directly measured at this stage, we must calculate it manually. + mBulletpointsContainer.getLayoutParams().width = dpToPx( + getContext(), Math.min(CONTENT_WIDTH_DP, mWidthDp - 2 * paddingHorizontalDp)); + } else { + // Large padding. + paddingHorizontalDp = 0; // Should not be necessary on a screen this large. + paddingVerticalDp = mHeightDp <= 320 ? 16 : 72; + + // Align to the center. + mContainer.setGravity(Gravity.CENTER_HORIZONTAL); + + // Decide the bulletpoints orientation. + bulletpointsArrangedHorizontally = true; + + int contentWidthPx = dpToPx(getContext(), CONTENT_WIDTH_DP); + mSubtitle.setLayoutParams(new LinearLayout.LayoutParams( + contentWidthPx, LinearLayout.LayoutParams.WRAP_CONTENT)); + mBulletpointsContainer.getLayoutParams().width = contentWidthPx; + } + + // Apply the bulletpoints orientation. + if (bulletpointsArrangedHorizontally) { + mBulletpointsContainer.setOrientation(LinearLayout.HORIZONTAL); + } else { + mBulletpointsContainer.setOrientation(LinearLayout.VERTICAL); + } + + // Set up paddings and margins. + int paddingTop; + int paddingBottom; + paddingTop = paddingBottom = dpToPx(getContext(), paddingVerticalDp); + mContainer.setPadding(dpToPx(getContext(), paddingHorizontalDp), paddingTop, + dpToPx(getContext(), paddingHorizontalDp), paddingBottom); + + // Total space between adjacent paragraphs (Including margins, paddings, etc.) + int totalSpaceBetweenViews = getContext().getResources().getDimensionPixelSize( + R.dimen.incognito_ntp_total_space_between_views); + + for (TextView paragraph : mParagraphs) { + // If bulletpoints are arranged horizontally, there should be space between them. + int rightMarginPx = (bulletpointsArrangedHorizontally + && paragraph == mBulletpointsContainer.getChildAt(0)) + ? dpToPx(getContext(), BULLETPOINTS_HORIZONTAL_SPACING_DP) + : 0; + + ((LinearLayout.LayoutParams) paragraph.getLayoutParams()) + .setMargins(0, totalSpaceBetweenViews, rightMarginPx, 0); + paragraph.setLayoutParams(paragraph.getLayoutParams()); // Apply the new layout. + } + + // The learn more text view has height of min_touch_target_size. Typically the actual text + // is not that tall, and already has some space. We want to have a + // totalSpaceBetweenViews tall gap between the learn more text and the adjacent + // elements. So add the difference as an additional margin. + int innerSpacing = (int) ((getContext().getResources().getDimensionPixelSize( + R.dimen.min_touch_target_size) + - mLearnMore.getTextSize()) + / 2); + int learnMoreSpacingTop = totalSpaceBetweenViews - innerSpacing + - dpToPx(getContext(), BULLETPOINTS_MARGIN_BOTTOM_DP); + int learnMoreSpacingBottom = + dpToPx(getContext(), COOKIES_CONTROL_MARGIN_TOP_DP) - innerSpacing; + + LinearLayout.LayoutParams params = (LayoutParams) mLearnMore.getLayoutParams(); + params.setMargins(0, learnMoreSpacingTop, 0, learnMoreSpacingBottom); + mLearnMore.requestLayout(); + + ((LinearLayout.LayoutParams) mHeader.getLayoutParams()) + .setMargins(0, totalSpaceBetweenViews, 0, 0); + mHeader.setLayoutParams(mHeader.getLayoutParams()); // Apply the new layout. + } + + /** Adjust the Incognito icon. */ + private void adjustIcon() { + // The icon resource is 120dp x 120dp (i.e. 120px x 120px at MDPI). This method always + // resizes the icon view to 120dp x 120dp or smaller, therefore image quality is not lost. + + int sizeDp; + if (mWidthDp <= WIDE_LAYOUT_THRESHOLD_DP) { + sizeDp = (mWidthDp <= 240 || mHeightDp <= 480) ? 48 : 72; + } else { + sizeDp = mHeightDp <= 480 ? 72 : 120; + } + + ImageView icon = (ImageView) findViewById(R.id.new_tab_incognito_icon); + icon.getLayoutParams().width = dpToPx(getContext(), sizeDp); + icon.getLayoutParams().height = dpToPx(getContext(), sizeDp); + } + + /** Adjust the "Learn More" link. */ + private void adjustLearnMore() { + boolean readLaterEnabled = CachedFeatureFlags.isEnabled(ChromeFeatureList.READ_LATER); + final String subtitleText = getContext().getResources().getString(readLaterEnabled + ? R.string.new_tab_otr_subtitle_with_reading_list + : R.string.new_tab_otr_subtitle); + boolean learnMoreInSubtitle = mWidthDp > WIDE_LAYOUT_THRESHOLD_DP; + + mLearnMore.setVisibility(learnMoreInSubtitle ? View.GONE : View.VISIBLE); + + if (!learnMoreInSubtitle) { + // Revert to the original text. + mSubtitle.setText(subtitleText); + mSubtitle.setMovementMethod(null); + return; + } + + // Concatenate the original text with a clickable "Learn more" link. + StringBuilder concatenatedText = new StringBuilder(); + concatenatedText.append(subtitleText); + concatenatedText.append(" "); + concatenatedText.append(getContext().getResources().getString(R.string.learn_more)); + SpannableString textWithLearnMoreLink = new SpannableString(concatenatedText.toString()); + + NoUnderlineClickableSpan span = new NoUnderlineClickableSpan( + getResources(), R.color.modern_blue_300, (view) -> mLearnMore.callOnClick()); + textWithLearnMoreLink.setSpan( + span, subtitleText.length() + 1, textWithLearnMoreLink.length(), 0 /* flags */); + mSubtitle.setText(textWithLearnMoreLink); + mSubtitle.setMovementMethod(LinkMovementMethod.getInstance()); + } + + /** Adjust the Cookie Controls Card. */ + private void adjustCookieControlsCard() { + if (mShowCard) { + if (mWidthDp <= WIDE_LAYOUT_THRESHOLD_DP) { + // Portrait + mCookieControlsCard.getLayoutParams().width = + LinearLayout.LayoutParams.MATCH_PARENT; + } else { + // Landscape + mCookieControlsCard.getLayoutParams().width = + dpToPx(getContext(), CONTENT_WIDTH_DP); + } + } + } + + @Override + public void showCookieControlsCard(boolean showCard) { + mShowCard = showCard; + mCookieControlsCard.setVisibility(showCard ? View.VISIBLE : View.GONE); + adjustCookieControlsCard(); + } + + @Override + public void setCookieControlsEnforcement(@CookieControlsEnforcement int enforcement) { + boolean enforced = enforcement != CookieControlsEnforcement.NO_ENFORCEMENT; + mCookieControlsToggle.setEnabled(!enforced); + mCookieControlsManagedIcon.setVisibility(enforced ? View.VISIBLE : View.GONE); + mCookieControlsTitle.setEnabled(!enforced); + mCookieControlsSubtitle.setEnabled(!enforced); + + Resources resources = getContext().getResources(); + StringBuilder subtitleText = new StringBuilder(); + subtitleText.append(resources.getString(R.string.new_tab_otr_third_party_cookie_sublabel)); + if (!enforced) { + mCookieControlsSubtitle.setText(subtitleText.toString()); + return; + } + + int iconRes; + String addition; + switch (enforcement) { + case CookieControlsEnforcement.ENFORCED_BY_POLICY: + iconRes = R.drawable.ic_business_small; + addition = resources.getString(R.string.managed_by_your_organization); + break; + case CookieControlsEnforcement.ENFORCED_BY_COOKIE_SETTING: + iconRes = R.drawable.settings_cog; + addition = resources.getString( + R.string.new_tab_otr_cookie_controls_controlled_tooltip_text); + break; + default: + return; + } + mCookieControlsManagedIcon.setImageResource(iconRes); + subtitleText.append("\n"); + subtitleText.append(addition); + mCookieControlsSubtitle.setText(subtitleText.toString()); + } +}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionView.java new file mode 100644 index 0000000..dfbfa2e --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionView.java
@@ -0,0 +1,295 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.chrome.browser.ntp; + +import static org.chromium.ui.base.ViewUtils.dpToPx; + +import android.content.Context; +import android.content.res.Configuration; +import android.text.SpannableString; +import android.text.method.LinkMovementMethod; +import android.text.style.ForegroundColorSpan; +import android.util.AttributeSet; +import android.view.Gravity; +import android.view.View; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.IdRes; +import androidx.annotation.StringRes; + +import org.chromium.base.ApiCompatibilityUtils; +import org.chromium.chrome.R; +import org.chromium.chrome.browser.flags.CachedFeatureFlags; +import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.ui.text.NoUnderlineClickableSpan; +import org.chromium.ui.text.SpanApplier; +import org.chromium.ui.widget.ChromeBulletSpan; + +/** + * The view to describle revamped incognito mode. + */ +public class RevampedIncognitoDescriptionView + extends LinearLayout implements IncognitoDescriptionView { + private int mWidthDp; + private int mHeightDp; + + private LinearLayout mContainer; + private TextView mHeader; + private TextView mSubtitle; + private LinearLayout mBulletpointsContainer; + private TextView mLearnMore; + private TextView[] mParagraphs; + + private static final int BULLETPOINTS_HORIZONTAL_SPACING_DP = 40; + private static final int CONTENT_WIDTH_DP = 600; + private static final int WIDE_LAYOUT_THRESHOLD_DP = 720; + private static final int COOKIES_CONTROL_MARGIN_TOP_DP = 24; + + /** Default constructor needed to inflate via XML. */ + public RevampedIncognitoDescriptionView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + @Override + public void setNewTabHeader(String newTabPageHeader) { + mHeader.setText(newTabPageHeader); + } + + @Override + public void setLearnMoreOnclickListener(OnClickListener listener) { + mLearnMore.setOnClickListener(listener); + } + + @Override + protected void onFinishInflate() { + super.onFinishInflate(); + + mWidthDp = getContext().getResources().getConfiguration().screenWidthDp; + mHeightDp = getContext().getResources().getConfiguration().screenHeightDp; + + populateBulletpoints( + R.id.revamped_new_tab_incognito_features, R.string.new_tab_otr_not_saved); + populateBulletpoints(R.id.revamped_new_tab_incognito_warning, R.string.new_tab_otr_visible); + + mContainer = findViewById(R.id.revamped_new_tab_incognito_container); + mHeader = findViewById(R.id.revamped_new_tab_incognito_title); + mSubtitle = findViewById(R.id.revamped_new_tab_incognito_subtitle); + mLearnMore = findViewById(R.id.revamped_learn_more); + mParagraphs = + new TextView[] {mSubtitle, findViewById(R.id.revamped_new_tab_incognito_features), + findViewById(R.id.revamped_new_tab_incognito_warning)}; + mBulletpointsContainer = + findViewById(R.id.revamped_new_tab_incognito_bulletpoints_container); + + adjustView(); + } + + @Override + public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + // View#onConfigurationChanged() doesn't get called when resizing this view in + // multi-window mode, so #onMeasure() is used instead. + Configuration config = getContext().getResources().getConfiguration(); + if (mWidthDp != config.screenWidthDp || mHeightDp != config.screenHeightDp) { + mWidthDp = config.screenWidthDp; + mHeightDp = config.screenHeightDp; + adjustView(); + } + + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + } + + private void adjustView() { + adjustIcon(); + adjustLayout(); + adjustLearnMore(); + } + + /** + * @param element Resource ID of the element to be populated with the bulletpoints. + * @param content String ID to serve as the text of |element|. Must contain an <em></em> span, + * which will be emphasized, and three <li> items, which will be converted to + * bulletpoints. + * Populates |element| with |content|. + */ + private void populateBulletpoints(@IdRes int element, @StringRes int content) { + TextView view = (TextView) findViewById(element); + String text = getContext().getResources().getString(content); + + // TODO(msramek): Unfortunately, our strings are missing the closing "</li>" tag, which + // is not a problem when they're used in the Desktop WebUI (omitting the tag is valid in + // HTML5), but it is a problem for SpanApplier. Update the strings and remove this regex. + // Note that modifying the strings is a non-trivial operation as they went through a special + // translation process. + text = text.replaceAll("<li>([^<]+)\n", "<li>$1</li>\n"); + + // Format the bulletpoints: + // - Disambiguate the <li></li> spans for SpanApplier. + // - Remove leading whitespace (caused by formatting in the .grdp file) + // - Remove the trailing newline after the last bulletpoint. + text = text.replaceFirst(" *<li>([^<]*)</li>", "<li1>$1</li1>"); + text = text.replaceFirst(" *<li>([^<]*)</li>", "<li2>$1</li2>"); + text = text.replaceFirst(" *<li>([^<]*)</li>\n", "<li3>$1</li3>"); + + // Remove the <ul></ul> tags which serve no purpose here, including the whitespace around + // them. + text = text.replaceAll(" *</?ul>\\n?", ""); + + view.setText(SpanApplier.applySpans(text, + new SpanApplier.SpanInfo("<em>", "</em>", + new ForegroundColorSpan( + ApiCompatibilityUtils.getColor(getContext().getResources(), + org.chromium.chrome.R.color.incognito_emphasis))), + new SpanApplier.SpanInfo("<li1>", "</li1>", new ChromeBulletSpan(getContext())), + new SpanApplier.SpanInfo("<li2>", "</li2>", new ChromeBulletSpan(getContext())), + new SpanApplier.SpanInfo("<li3>", "</li3>", new ChromeBulletSpan(getContext())))); + } + + /** Adjusts the paddings, margins, and the orientation of bulletpoints. */ + private void adjustLayout() { + int paddingHorizontalDp; + int paddingVerticalDp; + + boolean bulletpointsArrangedHorizontally; + + if (mWidthDp <= WIDE_LAYOUT_THRESHOLD_DP) { + // Small padding. + paddingHorizontalDp = mWidthDp <= 240 ? 24 : 32; + paddingVerticalDp = 32; + + // Align left. + mContainer.setGravity(Gravity.START); + + // Decide the bulletpoints orientation. + bulletpointsArrangedHorizontally = false; + + // The subtitle is sized automatically, but not wider than CONTENT_WIDTH_DP. + mSubtitle.setLayoutParams( + new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, + LinearLayout.LayoutParams.WRAP_CONTENT)); + mSubtitle.setMaxWidth(dpToPx(getContext(), CONTENT_WIDTH_DP)); + + // The bulletpoints container takes the same width as subtitle. Since the width can + // not be directly measured at this stage, we must calculate it manually. + mBulletpointsContainer.setLayoutParams(new LinearLayout.LayoutParams( + dpToPx(getContext(), + Math.min(CONTENT_WIDTH_DP, mWidthDp - 2 * paddingHorizontalDp)), + LinearLayout.LayoutParams.WRAP_CONTENT)); + } else { + // Large padding. + paddingHorizontalDp = 0; // Should not be necessary on a screen this large. + paddingVerticalDp = mHeightDp <= 320 ? 16 : 72; + + // Align to the center. + mContainer.setGravity(Gravity.CENTER_HORIZONTAL); + + // Decide the bulletpoints orientation. + bulletpointsArrangedHorizontally = true; + + int contentWidthPx = dpToPx(getContext(), CONTENT_WIDTH_DP); + mSubtitle.setLayoutParams(new LinearLayout.LayoutParams( + contentWidthPx, LinearLayout.LayoutParams.WRAP_CONTENT)); + mBulletpointsContainer.setLayoutParams(new LinearLayout.LayoutParams( + contentWidthPx, LinearLayout.LayoutParams.WRAP_CONTENT)); + } + + // Apply the bulletpoints orientation. + if (bulletpointsArrangedHorizontally) { + mBulletpointsContainer.setOrientation(LinearLayout.HORIZONTAL); + } else { + mBulletpointsContainer.setOrientation(LinearLayout.VERTICAL); + } + + // Set up paddings and margins. + int paddingTop; + int paddingBottom; + paddingTop = paddingBottom = dpToPx(getContext(), paddingVerticalDp); + mContainer.setPadding(dpToPx(getContext(), paddingHorizontalDp), paddingTop, + dpToPx(getContext(), paddingHorizontalDp), paddingBottom); + + int spacingPx = + (int) Math.ceil(mParagraphs[0].getTextSize() * (mHeightDp <= 600 ? 1 : 1.5)); + + for (TextView paragraph : mParagraphs) { + // If bulletpoints are arranged horizontally, there should be space between them. + int rightMarginPx = (bulletpointsArrangedHorizontally + && paragraph == mBulletpointsContainer.getChildAt(0)) + ? dpToPx(getContext(), BULLETPOINTS_HORIZONTAL_SPACING_DP) + : 0; + + ((LinearLayout.LayoutParams) paragraph.getLayoutParams()) + .setMargins(0, spacingPx, rightMarginPx, 0); + paragraph.setLayoutParams(paragraph.getLayoutParams()); // Apply the new layout. + } + + // Set up margins of learn more link to maintain a constant space between link text + // and other views. + int innerSpacing = (int) ((getContext().getResources().getDimensionPixelSize( + org.chromium.chrome.R.dimen.min_touch_target_size) + - mLearnMore.getTextSize()) + / 2); + int learnMoreSpacingTop = spacingPx - innerSpacing; + int learnMoreSpacingBottom = + dpToPx(getContext(), COOKIES_CONTROL_MARGIN_TOP_DP) - innerSpacing; + LinearLayout.LayoutParams params = (LayoutParams) mLearnMore.getLayoutParams(); + params.setMargins( + 0, Math.max(learnMoreSpacingTop, 0), 0, Math.max(learnMoreSpacingBottom, 0)); + mLearnMore.requestLayout(); + + ((LinearLayout.LayoutParams) mHeader.getLayoutParams()).setMargins(0, spacingPx, 0, 0); + mHeader.setLayoutParams(mHeader.getLayoutParams()); // Apply the new layout. + } + + /** Adjust the Incognito icon. */ + private void adjustIcon() { + // The icon resource is 120dp x 120dp (i.e. 120px x 120px at MDPI). This method always + // resizes the icon view to 120dp x 120dp or smaller, therefore image quality is not lost. + + int sizeDp; + if (mWidthDp <= WIDE_LAYOUT_THRESHOLD_DP) { + sizeDp = (mWidthDp <= 240 || mHeightDp <= 480) ? 48 : 72; + } else { + sizeDp = mHeightDp <= 480 ? 72 : 120; + } + + ImageView icon = (ImageView) findViewById(R.id.revamped_new_tab_incognito_icon); + icon.getLayoutParams().width = dpToPx(getContext(), sizeDp); + icon.getLayoutParams().height = dpToPx(getContext(), sizeDp); + } + + /** Adjust the "Learn More" link. */ + private void adjustLearnMore() { + boolean readLaterEnabled = CachedFeatureFlags.isEnabled(ChromeFeatureList.READ_LATER); + final String subtitleText = getContext().getResources().getString(readLaterEnabled + ? org.chromium.chrome.R.string.new_tab_otr_subtitle_with_reading_list + : org.chromium.chrome.R.string.new_tab_otr_subtitle); + boolean learnMoreInSubtitle = mWidthDp > WIDE_LAYOUT_THRESHOLD_DP; + + mLearnMore.setVisibility(learnMoreInSubtitle ? View.GONE : View.VISIBLE); + + if (!learnMoreInSubtitle) { + // Revert to the original text. + mSubtitle.setText(subtitleText); + mSubtitle.setMovementMethod(null); + return; + } + + // Concatenate the original text with a clickable "Learn more" link. + StringBuilder concatenatedText = new StringBuilder(); + concatenatedText.append(subtitleText); + concatenatedText.append(" "); + concatenatedText.append( + getContext().getResources().getString(org.chromium.chrome.R.string.learn_more)); + SpannableString textWithLearnMoreLink = new SpannableString(concatenatedText.toString()); + + NoUnderlineClickableSpan span = new NoUnderlineClickableSpan(getResources(), + org.chromium.chrome.R.color.modern_blue_300, (view) -> mLearnMore.callOnClick()); + textWithLearnMoreLink.setSpan( + span, subtitleText.length() + 1, textWithLearnMoreLink.length(), 0 /* flags */); + mSubtitle.setText(textWithLearnMoreLink); + mSubtitle.setMovementMethod(LinkMovementMethod.getInstance()); + } +}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninCheckerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninCheckerTest.java index d1cc637..3b07b89 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninCheckerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninCheckerTest.java
@@ -25,7 +25,6 @@ import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CriteriaHelper; import org.chromium.base.test.util.DisableIf; -import org.chromium.base.test.util.FlakyTest; import org.chromium.base.test.util.UserActionTester; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.ChromeSwitches; @@ -127,7 +126,6 @@ @Test @MediumTest - @FlakyTest(message = "https://crbug.com/1205346") public void signoutWhenPrimaryAccountIsRemoved() { mActivityTestRule.startMainActivityOnBlankPage(); mAccountManagerTestRule.addAccountAndWaitForSeeding("the.second.account@gmail.com");
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt index 2b2c676..32d0924 100644 --- a/chrome/android/profiles/newest.txt +++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-93.0.4577.22_rc-r1-merged.afdo.bz2 +chromeos-chrome-amd64-93.0.4577.23_rc-r1-merged.afdo.bz2
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 1a6051c0..bec2f33 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -650,8 +650,8 @@ <message name="IDS_CONTENT_CONTEXT_LOOP" desc="The name of the Loop command for audio and video playback in the content area context menu"> &Loop </message> - <message name="IDS_CONTENT_CONTEXT_CONTROLS" desc="The name of the Show Controls command for audio and video playback in the content area context menu"> - Show &controls + <message name="IDS_CONTENT_CONTEXT_CONTROLS" desc="The name of the Show All Controls command for audio and video playback in the content area context menu"> + Show all &controls </message> <message name="IDS_CONTENT_CONTEXT_ROTATECW" desc="The name of the Rotate clockwise command for plugins in the content area context menu"> Rotate &clockwise @@ -891,8 +891,8 @@ <message name="IDS_CONTENT_CONTEXT_LOOP" desc="In Title Case: The name of the Loop command for audio and video playback in the content area context menu"> &Loop </message> - <message name="IDS_CONTENT_CONTEXT_CONTROLS" desc="In Title Case: The name of the Show Controls command for audio and video playback in the content area context menu"> - Show &Controls + <message name="IDS_CONTENT_CONTEXT_CONTROLS" desc="In Title Case: The name of the Show All Controls command for audio and video playback in the content area context menu"> + Show All &Controls </message> <message name="IDS_CONTENT_CONTEXT_ROTATECW" desc="In Title Case: The name of the Rotate Clockwise command for plugins in the content area context menu"> Rotate &Clockwise
diff --git a/chrome/app/generated_resources_grd/IDS_CONTENT_CONTEXT_CONTROLS.png.sha1 b/chrome/app/generated_resources_grd/IDS_CONTENT_CONTEXT_CONTROLS.png.sha1 new file mode 100644 index 0000000..43f043b1 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_CONTENT_CONTEXT_CONTROLS.png.sha1
@@ -0,0 +1 @@ +bbeac8fb613562390630847573d8a3fa62e94702 \ No newline at end of file
diff --git a/chrome/app/os_settings_strings.grdp b/chrome/app/os_settings_strings.grdp index 04f6657..cb1464d0 100644 --- a/chrome/app/os_settings_strings.grdp +++ b/chrome/app/os_settings_strings.grdp
@@ -3864,6 +3864,16 @@ App details </message> + <!-- Apps > Manage your apps > Borealis --> + <!-- TODO(b/194640944): Replace "borealis" string before launch --> + <message name="IDS_SETTINGS_APPS_BOREALIS_MAIN_PERMISSION_TEXT" translateable="false" desc="Describes how Borealis permissions are applied on main app with learn more link."> + Permission settings applied here are applied across all Borealis apps. <ph name="LINK_BEGIN"><a></ph>Learn more<ph name="LINK_END"></a></ph> + </message> + <message name="IDS_SETTINGS_APPS_BOREALIS_APP_PERMISSION_TEXT" translateable="false" desc="Link to main Borealis app from other borealis apps."> + Permissions for apps installed by Borealis are managed via the <ph name="LINK_BEGIN"><a></ph>Borealis app settings<ph name="LINK_END"></a></ph>. + Borealis permission settings are applied across all Borealis applications. + </message> + <!-- Apps > Manage your apps > Parallels --> <message name="IDS_SETTINGS_APPS_PLUGIN_VM_PERMISSION_DIALOG_CAMERA_LABEL" desc="Label for the Parallels permissions dialog when camera permissions are being adjusted"> The change in camera setting requires Parallels Desktop to relaunch. Relaunch Parallels Desktop to proceed.
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 8369636..c7f02460 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -4801,9 +4801,9 @@ "chrome_browser_main_parts_lacros.h", "feedback/show_feedback_page_lacros.cc", "first_run/first_run_internal_lacros.cc", - "lacros/account_manager_facade_factory_lacros.cc", - "lacros/account_manager_util.cc", - "lacros/account_manager_util.h", + "lacros/account_manager/account_manager_facade_factory_lacros.cc", + "lacros/account_manager/account_manager_util.cc", + "lacros/account_manager/account_manager_util.h", "lacros/automation_manager_lacros.cc", "lacros/automation_manager_lacros.h", "lacros/browser_service_lacros.cc",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index db9c9fb8..a0253cc 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -4111,6 +4111,10 @@ flag_descriptions::kImeSystemEmojiPickerClipboardName, flag_descriptions::kImeSystemEmojiPickerClipboardDescription, kOsCrOS, FEATURE_VALUE_TYPE(chromeos::features::kImeSystemEmojiPickerClipboard)}, + {"enable-cros-ime-stylus-handwriting", + flag_descriptions::kImeStylusHandwritingName, + flag_descriptions::kImeStylusHandwritingDescription, kOsCrOS, + FEATURE_VALUE_TYPE(chromeos::features::kImeStylusHandwriting)}, {"enable-cros-language-settings-update-2", flag_descriptions::kCrosLanguageSettingsUpdate2Name, flag_descriptions::kCrosLanguageSettingsUpdate2Description, kOsCrOS,
diff --git a/chrome/browser/apps/app_service/webapk/webapk_manager.cc b/chrome/browser/apps/app_service/webapk/webapk_manager.cc index f71f4ca..6f5db1ee 100644 --- a/chrome/browser/apps/app_service/webapk/webapk_manager.cc +++ b/chrome/browser/apps/app_service/webapk/webapk_manager.cc
@@ -12,6 +12,8 @@ #include "chrome/browser/apps/app_service/webapk/webapk_install_queue.h" #include "chrome/browser/apps/app_service/webapk/webapk_prefs.h" #include "chrome/browser/ash/apps/apk_web_app_service.h" +#include "chrome/browser/ash/arc/arc_util.h" +#include "chrome/browser/ash/arc/session/arc_session_manager.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/browser/web_applications/web_app_registrar.h" @@ -37,11 +39,34 @@ DCHECK(app_list_prefs_); install_queue_ = std::make_unique<WebApkInstallQueue>(profile); + // Always observe AppListPrefs, even when the rest of WebAPKs is not enabled, + // so that we can detect WebAPK uninstalls that happen when the feature is + // disabled. arc_app_list_prefs_observer_.Observe(app_list_prefs_); - Observe(&proxy_->AppRegistryCache()); + arc::ArcSessionManager::Get()->AddObserver(this); + StartOrStopObserving(); } -WebApkManager::~WebApkManager() = default; +WebApkManager::~WebApkManager() { + auto* arc_session_manager = arc::ArcSessionManager::Get(); + // ArcSessionManager can be destroyed early in unit tests. + if (arc_session_manager) { + arc_session_manager->RemoveObserver(this); + } +} + +void WebApkManager::StartOrStopObserving() { + // WebApkManager is only created when arc::IsArcAllowedForProfile() is true. + // We additionally check whether Play Store is enabled through Settings before + // enabling anything. + bool arc_enabled = arc::IsArcPlayStoreEnabledForProfile(profile_); + + if (arc_enabled) { + Observe(&proxy_->AppRegistryCache()); + } else { + Observe(nullptr); + } +} void WebApkManager::OnAppUpdate(const AppUpdate& update) { if (!initialized_) { @@ -146,6 +171,10 @@ // installed and eligible. } +void WebApkManager::OnArcPlayStoreEnabledChanged(bool enabled) { + StartOrStopObserving(); +} + WebApkInstallQueue* WebApkManager::GetInstallQueueForTest() { return install_queue_.get(); }
diff --git a/chrome/browser/apps/app_service/webapk/webapk_manager.h b/chrome/browser/apps/app_service/webapk/webapk_manager.h index 98c4a7d..e42fb733 100644 --- a/chrome/browser/apps/app_service/webapk/webapk_manager.h +++ b/chrome/browser/apps/app_service/webapk/webapk_manager.h
@@ -9,6 +9,8 @@ #include <vector> #include "base/scoped_observation.h" +#include "chrome/browser/ash/arc/session/arc_session_manager.h" +#include "chrome/browser/ash/arc/session/arc_session_manager_observer.h" #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" #include "chrome/browser/web_applications/web_app_registrar.h" #include "components/arc/mojom/intent_helper.mojom-forward.h" @@ -26,7 +28,8 @@ class WebApkInstallQueue; class WebApkManager : public AppRegistryCache::Observer, - public ArcAppListPrefs::Observer { + public ArcAppListPrefs::Observer, + public arc::ArcSessionManagerObserver { public: explicit WebApkManager(Profile* profile); ~WebApkManager() override; @@ -37,22 +40,29 @@ WebApkInstallQueue* GetInstallQueueForTest(); private: + // Checks whether WebAPKs should be enabled for the current profile and + // starts/stops observing app changes as appropriate. + void StartOrStopObserving(); + bool IsAppEligibleForWebApk(const AppUpdate& app); void QueueInstall(const std::string& app_id); void QueueUpdate(const std::string& app_id); void QueueUninstall(const std::string& app_id); void UninstallInternal(const std::string& app_id); - // AppRegistryCache::Observer overrides: + // AppRegistryCache::Observer: void OnAppUpdate(const AppUpdate& update) override; void OnAppTypeInitialized(apps::mojom::AppType type) override; void OnAppRegistryCacheWillBeDestroyed(AppRegistryCache* cache) override; - // ArcAppListPrefs::Observer overrides: + // ArcAppListPrefs::Observer: void OnPackageListInitialRefreshed() override; - void OnPackageRemoved(const std::string& package_namei, + void OnPackageRemoved(const std::string& package_name, bool uninstalled) override; + // ArcSessionManagerObserver: + void OnArcPlayStoreEnabledChanged(bool enabled) override; + Profile* profile_; AppServiceProxyBase* proxy_; ash::ApkWebAppService* apk_service_;
diff --git a/chrome/browser/apps/app_service/webapk/webapk_manager_unittest.cc b/chrome/browser/apps/app_service/webapk/webapk_manager_unittest.cc index 0702ea2b..f7984e8 100644 --- a/chrome/browser/apps/app_service/webapk/webapk_manager_unittest.cc +++ b/chrome/browser/apps/app_service/webapk/webapk_manager_unittest.cc
@@ -15,6 +15,7 @@ #include "chrome/browser/apps/app_service/webapk/webapk_install_queue.h" #include "chrome/browser/apps/app_service/webapk/webapk_install_task.h" #include "chrome/browser/apps/app_service/webapk/webapk_prefs.h" +#include "chrome/browser/ash/arc/arc_util.h" #include "chrome/browser/ui/app_list/arc/arc_app_test.h" #include "chrome/browser/web_applications/test/test_web_app_provider.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -268,3 +269,15 @@ ASSERT_EQ(install_task->app_id(), app_id_1); AssertNoPendingInstalls(); } + +TEST_F(WebApkManagerTest, IgnoresInstallsWhilePlayStoreDisabled) { + StartWebApkManager(); + + arc::SetArcPlayStoreEnabledForProfile(profile(), /*enabled=*/false); + + auto app_id = + web_app::test::InstallWebApp(profile(), BuildDefaultWebAppInfo()); + app_service_test()->FlushMojoCalls(); + + AssertNoPendingInstalls(); +}
diff --git a/chrome/browser/ash/arc/accessibility/arc_accessibility_helper_bridge_browsertest.cc b/chrome/browser/ash/arc/accessibility/arc_accessibility_helper_bridge_browsertest.cc index 62ddee6..84e1bae 100644 --- a/chrome/browser/ash/arc/accessibility/arc_accessibility_helper_bridge_browsertest.cc +++ b/chrome/browser/ash/arc/accessibility/arc_accessibility_helper_bridge_browsertest.cc
@@ -9,9 +9,11 @@ #include "ash/accessibility/ui/accessibility_focus_ring_controller_impl.h" #include "ash/accessibility/ui/accessibility_focus_ring_layer.h" +#include "ash/constants/app_types.h" #include "ash/shell.h" #include "base/feature_list.h" #include "chrome/browser/ash/accessibility/accessibility_manager.h" +#include "chrome/browser/ash/arc/accessibility/ax_tree_source_arc.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/ash/shelf/app_service/exo_app_type_resolver.h" #include "chrome/browser/ui/browser.h" @@ -31,6 +33,8 @@ #include "components/exo/wm_helper_chromeos.h" #include "components/viz/common/features.h" #include "content/public/test/browser_test.h" +#include "extensions/browser/api/automation_internal/automation_event_router_interface.h" +#include "ui/accessibility/ax_action_data.h" #include "ui/aura/client/aura_constants.h" #include "ui/compositor/layer.h" #include "ui/views/widget/widget.h" @@ -40,12 +44,55 @@ using ::ash::AccessibilityManager; +namespace { + struct ArcTestWindow { std::unique_ptr<exo::Buffer> buffer; std::unique_ptr<exo::Surface> surface; std::unique_ptr<exo::ClientControlledShellSurface> shell_surface; }; +class MockAutomationEventRouter + : public extensions::AutomationEventRouterInterface { + public: + MockAutomationEventRouter() = default; + virtual ~MockAutomationEventRouter() = default; + + // extensions::AutomationEventRouterInterface: + void DispatchAccessibilityEvents(const ui::AXTreeID& tree_id, + std::vector<ui::AXTreeUpdate> updates, + const gfx::Point& mouse_location, + std::vector<ui::AXEvent> events) override {} + + void DispatchAccessibilityLocationChange( + const ExtensionMsg_AccessibilityLocationChangeParams& params) override {} + + void DispatchTreeDestroyedEvent( + ui::AXTreeID tree_id, + content::BrowserContext* browser_context) override {} + + void DispatchActionResult( + const ui::AXActionData& data, + bool result, + content::BrowserContext* browser_context = nullptr) override { + last_dispatched_action_data_ = data; + last_dispatched_action_result_ = result; + } + + void DispatchGetTextLocationDataResult( + const ui::AXActionData& data, + const absl::optional<gfx::Rect>& rect) override { + last_dispatched_action_data_ = data; + last_dispatched_text_location_ = rect; + } + + absl::optional<ui::AXActionData> last_dispatched_action_data_; + absl::optional<bool> last_dispatched_action_result_; + absl::optional<gfx::Rect> last_dispatched_text_location_; +}; + +} // namespace + class ArcAccessibilityHelperBridgeBrowserTest : public InProcessBrowserTest { void SetUpCommandLine(base::CommandLine* command_line) override { arc::SetArcAvailableCommandLineForTesting(command_line); @@ -95,6 +142,11 @@ // Forcefully set task_id for each window. ret.surface->SetApplicationId(name.c_str()); + + // CreateClientControlledShellSurface doesn't set AppType so do it here. + ret.shell_surface->GetWidget()->GetNativeWindow()->SetProperty( + aura::client::kAppType, static_cast<int>(ash::AppType::ARC_APP)); + return ret; } @@ -176,11 +228,9 @@ EXPECT_TRUE( fake_accessibility_helper_instance_->last_requested_tree_window_key() - ->get() ->is_window_id()); EXPECT_EQ( 10U, fake_accessibility_helper_instance_->last_requested_tree_window_key() - ->get() ->get_window_id()); exo::SetShellClientAccessibilityId( @@ -188,7 +238,6 @@ EXPECT_EQ( 20U, fake_accessibility_helper_instance_->last_requested_tree_window_key() - ->get() ->get_window_id()); exo::SetShellClientAccessibilityId( @@ -196,7 +245,6 @@ EXPECT_EQ( 21U, fake_accessibility_helper_instance_->last_requested_tree_window_key() - ->get() ->get_window_id()); } @@ -285,4 +333,88 @@ << " should contain the given rect " << node_rect2.ToString(); } +IN_PROC_BROWSER_TEST_F(ArcAccessibilityHelperBridgeBrowserTest, PerformAction) { + ArcTestWindow test_window = MakeTestWindow("org.chromium.arc.1"); + AccessibilityManager::Get()->EnableSpokenFeedback(true); + + ArcAccessibilityHelperBridge* bridge = + ArcAccessibilityHelperBridge::GetForBrowserContext(browser()->profile()); + auto& tree_map = bridge->trees_for_test(); + ASSERT_EQ(1, tree_map.size()); + AXTreeSourceArc* tree_source = tree_map.begin()->second.get(); + MockAutomationEventRouter router; + tree_source->set_automation_event_router_for_test(&router); + tree_source->set_window_id_for_test(5); + + ui::AXActionData action_data; + action_data.target_node_id = 10; + action_data.target_tree_id = tree_source->ax_tree_id(); + action_data.action = ax::mojom::Action::kDoDefault; + bridge->OnAction(action_data); + + mojom::AccessibilityActionData* requested_action = + fake_accessibility_helper_instance_->last_requested_action(); + EXPECT_EQ(10, requested_action->node_id); + EXPECT_EQ(mojom::AccessibilityActionType::CLICK, + requested_action->action_type); + EXPECT_EQ(5, requested_action->window_id); + + ui::AXActionData dispatched_action = + router.last_dispatched_action_data_.value(); + EXPECT_EQ(10, dispatched_action.target_node_id); + EXPECT_EQ(tree_source->ax_tree_id(), dispatched_action.target_tree_id); + EXPECT_EQ(ax::mojom::Action::kDoDefault, dispatched_action.action); + + EXPECT_TRUE(router.last_dispatched_action_result_.has_value()); + EXPECT_TRUE(router.last_dispatched_action_result_.value()); + + // Clear event router to prevent invalid access. + tree_source->set_automation_event_router_for_test(nullptr); +} + +IN_PROC_BROWSER_TEST_F(ArcAccessibilityHelperBridgeBrowserTest, + GetTextLocation) { + ArcTestWindow test_window = MakeTestWindow("org.chromium.arc.1"); + AccessibilityManager::Get()->SetSelectToSpeakEnabled(true); + + ArcAccessibilityHelperBridge* bridge = + ArcAccessibilityHelperBridge::GetForBrowserContext(browser()->profile()); + auto& tree_map = bridge->trees_for_test(); + ASSERT_EQ(1, tree_map.size()); + AXTreeSourceArc* tree_source = tree_map.begin()->second.get(); + MockAutomationEventRouter router; + tree_source->set_automation_event_router_for_test(&router); + tree_source->set_window_id_for_test(5); + + ui::AXActionData action_data; + action_data.target_node_id = 10; + action_data.target_tree_id = tree_source->ax_tree_id(); + action_data.action = ax::mojom::Action::kGetTextLocation; + action_data.start_index = 3; + action_data.end_index = 6; + bridge->OnAction(action_data); + + mojom::AccessibilityActionData* requested_action = + fake_accessibility_helper_instance_->last_requested_action(); + fake_accessibility_helper_instance_->refresh_with_extra_data_callback().Run( + gfx::Rect(10, 20, 30, 40)); + + EXPECT_EQ(10, requested_action->node_id); + EXPECT_EQ(mojom::AccessibilityActionType::GET_TEXT_LOCATION, + requested_action->action_type); + EXPECT_EQ(5, requested_action->window_id); + EXPECT_EQ(3, requested_action->start_index); + EXPECT_EQ(6, requested_action->end_index); + + EXPECT_TRUE(router.last_dispatched_text_location_.has_value()); + EXPECT_EQ(gfx::Rect(10, 20, 30, 40), + router.last_dispatched_text_location_.value()); + + // General action path should not be used. + EXPECT_FALSE(router.last_dispatched_action_result_.has_value()); + + // Clear event router to prevent invalid access. + tree_source->set_automation_event_router_for_test(nullptr); +} + } // namespace arc
diff --git a/chrome/browser/ash/arc/accessibility/ax_tree_source_arc.cc b/chrome/browser/ash/arc/accessibility/ax_tree_source_arc.cc index c4db96b7..ef6da16 100644 --- a/chrome/browser/ash/arc/accessibility/ax_tree_source_arc.cc +++ b/chrome/browser/ash/arc/accessibility/ax_tree_source_arc.cc
@@ -284,6 +284,9 @@ extensions::AutomationEventRouterInterface* AXTreeSourceArc::GetAutomationEventRouter() const { + if (automation_event_router_for_test_) + return automation_event_router_for_test_; + return extensions::AutomationEventRouter::GetInstance(); }
diff --git a/chrome/browser/ash/arc/accessibility/ax_tree_source_arc.h b/chrome/browser/ash/arc/accessibility/ax_tree_source_arc.h index de80639..3796180 100644 --- a/chrome/browser/ash/arc/accessibility/ax_tree_source_arc.h +++ b/chrome/browser/ash/arc/accessibility/ax_tree_source_arc.h
@@ -115,6 +115,12 @@ // The window id of this tree. absl::optional<int32_t> window_id() const { return window_id_; } + void set_automation_event_router_for_test( + extensions::AutomationEventRouterInterface* router) { + automation_event_router_for_test_ = router; + } + void set_window_id_for_test(int32_t window_id) { window_id_ = window_id; } + private: friend class arc::AXTreeSourceArcTest; @@ -122,9 +128,8 @@ void NotifyAccessibilityEventInternal( const mojom::AccessibilityEventData& event_data); - // virtual for testing. - virtual extensions::AutomationEventRouterInterface* GetAutomationEventRouter() - const; + // Returns AutomationEventRouter. + extensions::AutomationEventRouterInterface* GetAutomationEventRouter() const; // Computes the smallest rect that encloses all of the descendants of // |info_data|. @@ -209,6 +214,9 @@ // delegate is valid during the lifetime of this tree. const Delegate* const delegate_; + extensions::AutomationEventRouterInterface* + automation_event_router_for_test_ = nullptr; + DISALLOW_COPY_AND_ASSIGN(AXTreeSourceArc); };
diff --git a/chrome/browser/ash/arc/accessibility/ax_tree_source_arc_unittest.cc b/chrome/browser/ash/arc/accessibility/ax_tree_source_arc_unittest.cc index 321b5da..37c2a6f 100644 --- a/chrome/browser/ash/arc/accessibility/ax_tree_source_arc_unittest.cc +++ b/chrome/browser/ash/arc/accessibility/ax_tree_source_arc_unittest.cc
@@ -42,6 +42,8 @@ using AXWindowIntListProperty = mojom::AccessibilityWindowIntListProperty; using AXWindowStringProperty = mojom::AccessibilityWindowStringProperty; +namespace { + class MockAutomationEventRouter : public extensions::AutomationEventRouterInterface { public: @@ -91,27 +93,21 @@ std::vector<ui::AXEvent> last_dispatched_events_; }; +} // namespace + class AXTreeSourceArcTest : public testing::Test, public AXTreeSourceArc::Delegate { public: - class TestAXTreeSourceArc : public AXTreeSourceArc { - public: - TestAXTreeSourceArc(AXTreeSourceArc::Delegate* delegate, - MockAutomationEventRouter* router) - : AXTreeSourceArc(delegate, /*window=*/nullptr), router_(router) {} - - private: - extensions::AutomationEventRouterInterface* GetAutomationEventRouter() - const override { - return router_; - } - - MockAutomationEventRouter* const router_; - }; - AXTreeSourceArcTest() - : router_(new MockAutomationEventRouter()), - tree_source_(new TestAXTreeSourceArc(this, router_.get())) {} + : router_(std::make_unique<MockAutomationEventRouter>()), + tree_source_( + std::make_unique<AXTreeSourceArc>(this, /*window=*/nullptr)) { + tree_source_->set_automation_event_router_for_test(router_.get()); + } + + // AXTreeSourceArc::Delegate overrides. + void OnAction(const ui::AXActionData& data) const override {} + bool UseFullFocusMode() const override { return full_focus_mode_; } protected: void CallNotifyAccessibilityEvent(AXEventData* event_data) { @@ -161,11 +157,7 @@ void set_full_focus_mode(bool enabled) { full_focus_mode_ = enabled; } - bool UseFullFocusMode() const override { return full_focus_mode_; } - private: - void OnAction(const ui::AXActionData& data) const override {} - const std::unique_ptr<MockAutomationEventRouter> router_; const std::unique_ptr<AXTreeSourceArc> tree_source_;
diff --git a/chrome/browser/ash/crosapi/keystore_service_ash_unittest.cc b/chrome/browser/ash/crosapi/keystore_service_ash_unittest.cc index 5c6030e..b822930 100644 --- a/chrome/browser/ash/crosapi/keystore_service_ash_unittest.cc +++ b/chrome/browser/ash/crosapi/keystore_service_ash_unittest.cc
@@ -193,7 +193,7 @@ base::Unretained(this)); } - T result; + absl::optional<T> result; }; // A mock for observing callbacks that return a single result of the type |T| by @@ -211,10 +211,6 @@ absl::optional<T> result; }; -using BinaryCallbackObserver = CallbackObserver<mojom::KeystoreBinaryResultPtr>; -using SelectCertsCallbackObserver = - CallbackObserver<mojom::KeystoreSelectClientCertificatesResultPtr>; - // A mock for observing status results returned via a callback. struct StatusCallbackObserver { MOCK_METHOD(void, Callback, (bool is_error, mojom::KeystoreError error)); @@ -227,7 +223,9 @@ base::Unretained(this)); } - bool result_is_error = false; + bool has_value() const { return result_is_error.has_value(); } + + absl::optional<bool> result_is_error; mojom::KeystoreError result_error = mojom::KeystoreError::kUnknown; }; @@ -244,7 +242,8 @@ MakeRsaKeystoreSigningAlgorithm(modulus_length), observer.GetCallback()); - AssertBlobEq(observer.result, GetPublicKeyBin()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertBlobEq(observer.result.value(), GetPublicKeyBin()); } TEST_F(KeystoreServiceAshTest, GenerateDeviceEcKeySuccess) { @@ -254,24 +253,26 @@ GenerateECKey(TokenId::kSystem, named_curve, /*callback=*/_)) .WillOnce(RunOnceCallback<2>(GetPublicKeyStr(), Status::kSuccess)); - BinaryCallbackObserver observer; + CallbackObserver<mojom::KeystoreBinaryResultPtr> observer; keystore_service_.GenerateKey(mojom::KeystoreType::kDevice, MakeEcKeystoreSigningAlgorithm(named_curve), observer.GetCallback()); - AssertBlobEq(observer.result, GetPublicKeyBin()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertBlobEq(observer.result.value(), GetPublicKeyBin()); } TEST_F(KeystoreServiceAshTest, GenerateKeyFail) { EXPECT_CALL(platform_keys_service_, GenerateECKey) .WillOnce(RunOnceCallback<2>("", Status::kErrorInternal)); - BinaryCallbackObserver observer; + CallbackObserver<mojom::KeystoreBinaryResultPtr> observer; keystore_service_.GenerateKey(mojom::KeystoreType::kUser, MakeEcKeystoreSigningAlgorithm("named_curve_1"), observer.GetCallback()); - AssertErrorEq(observer.result, mojom::KeystoreError::kInternal); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertErrorEq(observer.result.value(), mojom::KeystoreError::kInternal); } //------------------------------------------------------------------------------ @@ -286,13 +287,14 @@ /*callback=*/_)) .WillOnce(RunOnceCallback<4>(GetDataStr(), Status::kSuccess)); - BinaryCallbackObserver observer; + CallbackObserver<mojom::KeystoreBinaryResultPtr> observer; keystore_service_.Sign( /*is_keystore_provided=*/true, mojom::KeystoreType::kUser, GetPublicKeyBin(), mojom::KeystoreSigningScheme::kRsassaPkcs1V15Sha256, GetDataBin(), observer.GetCallback()); - AssertBlobEq(observer.result, GetDataBin()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertBlobEq(observer.result.value(), GetDataBin()); } TEST_F(KeystoreServiceAshTest, SignEcSuccess) { @@ -305,26 +307,28 @@ /*callback=*/_)) .WillOnce(RunOnceCallback<4>(GetDataStr(), Status::kSuccess)); - BinaryCallbackObserver observer; + CallbackObserver<mojom::KeystoreBinaryResultPtr> observer; keystore_service_.Sign( /*is_keystore_provided=*/true, mojom::KeystoreType::kDevice, GetPublicKeyBin(), mojom::KeystoreSigningScheme::kEcdsaSha512, GetDataBin(), observer.GetCallback()); - AssertBlobEq(observer.result, GetDataBin()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertBlobEq(observer.result.value(), GetDataBin()); } TEST_F(KeystoreServiceAshTest, SignFail) { EXPECT_CALL(platform_keys_service_, SignECDSADigest) .WillOnce(RunOnceCallback<4>("", Status::kErrorKeyNotAllowedForSigning)); - BinaryCallbackObserver observer; + CallbackObserver<mojom::KeystoreBinaryResultPtr> observer; keystore_service_.Sign( /*is_keystore_provided=*/true, mojom::KeystoreType::kDevice, GetPublicKeyBin(), mojom::KeystoreSigningScheme::kEcdsaSha512, GetDataBin(), observer.GetCallback()); - AssertErrorEq(observer.result, + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertErrorEq(observer.result.value(), mojom::KeystoreError::kKeyNotAllowedForSigning); } @@ -339,6 +343,7 @@ keystore_service_.RemoveKey(mojom::KeystoreType::kDevice, GetPublicKeyBin(), observer.GetCallback()); + ASSERT_TRUE(observer.has_value()); EXPECT_EQ(observer.result_is_error, false); } @@ -351,6 +356,7 @@ keystore_service_.RemoveKey(mojom::KeystoreType::kDevice, GetPublicKeyBin(), observer.GetCallback()); + ASSERT_TRUE(observer.has_value()); EXPECT_EQ(observer.result_is_error, true); EXPECT_EQ(observer.result_error, mojom::KeystoreError::kKeyNotFound); } @@ -370,13 +376,14 @@ std::move(callback).Run(GetCertificateList(), Status::kSuccess); })); - SelectCertsCallbackObserver observer; + CallbackObserver<mojom::KeystoreSelectClientCertificatesResultPtr> observer; keystore_service_.SelectClientCertificates(cert_authorities_bin, observer.GetCallback()); - ASSERT_TRUE(observer.result); - ASSERT_TRUE(observer.result->is_certificates()); - AssertCertListEq(observer.result->get_certificates(), GetCertificateList()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_certificates()); + AssertCertListEq(observer.result.value()->get_certificates(), + GetCertificateList()); } TEST_F(KeystoreServiceAshTest, SelectClientCertificatesFail) { @@ -385,10 +392,11 @@ std::move(callback).Run({}, Status::kErrorInternal); })); - SelectCertsCallbackObserver observer; + CallbackObserver<mojom::KeystoreSelectClientCertificatesResultPtr> observer; keystore_service_.SelectClientCertificates({}, observer.GetCallback()); - AssertErrorEq(observer.result, mojom::KeystoreError::kInternal); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertErrorEq(observer.result.value(), mojom::KeystoreError::kInternal); } //------------------------------------------------------------------------------ @@ -402,9 +410,9 @@ CallbackObserver<mojom::GetKeyTagsResultPtr> observer; keystore_service_.GetKeyTags(GetPublicKeyBin(), observer.GetCallback()); - ASSERT_TRUE(observer.result); - ASSERT_EQ(observer.result->which(), mojom::GetKeyTagsResult::Tag::kTags); - EXPECT_EQ(observer.result->get_tags(), + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_tags()); + EXPECT_EQ(observer.result.value()->get_tags(), static_cast<uint64_t>(mojom::KeyTag::kCorporate)); } @@ -415,7 +423,8 @@ CallbackObserver<mojom::GetKeyTagsResultPtr> observer; keystore_service_.GetKeyTags(GetPublicKeyBin(), observer.GetCallback()); - AssertErrorEq(observer.result, mojom::KeystoreError::kInternal); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertErrorEq(observer.result.value(), mojom::KeystoreError::kInternal); } //------------------------------------------------------------------------------ @@ -430,6 +439,7 @@ StatusCallbackObserver observer; keystore_service_.AddKeyTags(GetPublicKeyBin(), tags, observer.GetCallback()); + ASSERT_TRUE(observer.has_value()); EXPECT_EQ(observer.result_is_error, false); } @@ -443,6 +453,7 @@ StatusCallbackObserver observer; keystore_service_.AddKeyTags(GetPublicKeyBin(), tags, observer.GetCallback()); + ASSERT_TRUE(observer.has_value()); EXPECT_EQ(observer.result_is_error, true); EXPECT_EQ(observer.result_error, mojom::KeystoreError::kInternal); } @@ -458,6 +469,7 @@ keystore_service_.CanUserGrantPermissionForKey(GetPublicKeyBin(), observer.GetCallback()); + ASSERT_TRUE(observer.result.has_value()); EXPECT_EQ(observer.result, false); } @@ -472,14 +484,16 @@ cert_bin, mojom::KeystoreSigningAlgorithmName::kRsassaPkcs115, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_success_result()); - ASSERT_EQ(observer.result->get_success_result()->public_key, - GetPublicKeyBin()); - ASSERT_TRUE(observer.result->get_success_result() - ->algorithm_properties->is_pkcs115()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + + ASSERT_TRUE(observer.result.value()->is_success_result()); + const mojom::GetPublicKeySuccessResultPtr& success_result = + observer.result.value()->get_success_result(); + ASSERT_EQ(success_result->public_key, GetPublicKeyBin()); + + ASSERT_TRUE(success_result->algorithm_properties->is_pkcs115()); const mojom::KeystorePKCS115ParamsPtr& params = - observer.result->get_success_result() - ->algorithm_properties->get_pkcs115(); + success_result->algorithm_properties->get_pkcs115(); EXPECT_EQ(params->modulus_length, 2048); EXPECT_EQ(params->public_exponent, (std::vector<uint8_t>{1, 0, 1})); } @@ -493,9 +507,9 @@ mojom::KeystoreSigningAlgorithmName::kUnknown, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_error()); - EXPECT_EQ(observer.result->get_error(), - mojom::KeystoreError::kAlgorithmNotPermittedByCertificate); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertErrorEq(observer.result.value(), + mojom::KeystoreError::kAlgorithmNotPermittedByCertificate); } //------------------------------------------------------------------------------ @@ -506,8 +520,10 @@ CallbackObserver<mojom::GetKeyStoresResultPtr> observer; keystore_service_.GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_key_stores()); - EXPECT_TRUE(observer.result->get_key_stores().empty()); + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_key_stores()); + EXPECT_TRUE(observer.result.value()->get_key_stores().empty()); } TEST_F(KeystoreServiceAshTest, GetKeyStoresUserSuccess) { @@ -517,8 +533,10 @@ CallbackObserver<mojom::GetKeyStoresResultPtr> observer; keystore_service_.GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_key_stores()); - EXPECT_THAT(observer.result->get_key_stores(), + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_key_stores()); + EXPECT_THAT(observer.result.value()->get_key_stores(), ElementsAre(crosapi::mojom::KeystoreType::kUser)); } @@ -529,8 +547,10 @@ CallbackObserver<mojom::GetKeyStoresResultPtr> observer; keystore_service_.GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_key_stores()); - EXPECT_THAT(observer.result->get_key_stores(), + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_key_stores()); + EXPECT_THAT(observer.result.value()->get_key_stores(), ElementsAre(crosapi::mojom::KeystoreType::kDevice)); } @@ -541,8 +561,10 @@ CallbackObserver<mojom::GetKeyStoresResultPtr> observer; keystore_service_.GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_key_stores()); - EXPECT_THAT(observer.result->get_key_stores(), + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_key_stores()); + EXPECT_THAT(observer.result.value()->get_key_stores(), UnorderedElementsAre(crosapi::mojom::KeystoreType::kUser, crosapi::mojom::KeystoreType::kDevice)); } @@ -553,8 +575,9 @@ CallbackObserver<mojom::GetKeyStoresResultPtr> observer; keystore_service_.GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_error()); - EXPECT_EQ(observer.result->get_error(), mojom::KeystoreError::kInternal); + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertErrorEq(observer.result.value(), mojom::KeystoreError::kInternal); } //------------------------------------------------------------------------------ @@ -567,8 +590,11 @@ CallbackObserver<mojom::GetCertificatesResultPtr> observer; keystore_service_.GetCertificates(mojom::KeystoreType::kUser, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_certificates()); - AssertCertListEq(observer.result->get_certificates(), GetCertificateList()); + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_certificates()); + AssertCertListEq(observer.result.value()->get_certificates(), + GetCertificateList()); } TEST_F(KeystoreServiceAshTest, GetCertificatesFail) { @@ -580,8 +606,9 @@ CallbackObserver<mojom::GetCertificatesResultPtr> observer; keystore_service_.GetCertificates(mojom::KeystoreType::kUser, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_error()); - EXPECT_EQ(observer.result->get_error(), mojom::KeystoreError::kInternal); + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + AssertErrorEq(observer.result.value(), mojom::KeystoreError::kInternal); } //------------------------------------------------------------------------------ @@ -599,6 +626,7 @@ CertToBlob(cert_list->front()), observer.GetCallback()); + ASSERT_TRUE(observer.has_value()); EXPECT_EQ(observer.result_is_error, false); } @@ -615,6 +643,7 @@ CertToBlob(cert_list->front()), observer.GetCallback()); + ASSERT_TRUE(observer.has_value()); EXPECT_EQ(observer.result_is_error, true); EXPECT_EQ(observer.result_error, mojom::KeystoreError::kCertificateInvalid); } @@ -634,6 +663,7 @@ CertToBlob(cert_list->front()), observer.GetCallback()); + ASSERT_TRUE(observer.has_value()); EXPECT_EQ(observer.result_is_error, false); } @@ -650,6 +680,7 @@ CertToBlob(cert_list->front()), observer.GetCallback()); + ASSERT_TRUE(observer.has_value()); EXPECT_EQ(observer.result_is_error, true); EXPECT_EQ(observer.result_error, mojom::KeystoreError::kCertificateInvalid); } @@ -688,8 +719,9 @@ mojom::KeystoreType::kUser, /*challenge=*/GetDataBin(), /*migrate=*/false, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_challenge_response()); - EXPECT_EQ(observer.result->get_challenge_response(), GetDataBin()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_challenge_response()); + EXPECT_EQ(observer.result.value()->get_challenge_response(), GetDataBin()); } TEST_F(KeystoreServiceAshTest, ChallengeUserKeyMigrateSuccess) { @@ -714,8 +746,9 @@ mojom::KeystoreType::kUser, /*challenge=*/GetDataBin(), /*migrate=*/true, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_challenge_response()); - EXPECT_EQ(observer.result->get_challenge_response(), GetDataBin()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_challenge_response()); + EXPECT_EQ(observer.result.value()->get_challenge_response(), GetDataBin()); } TEST_F(KeystoreServiceAshTest, ChallengeDeviceKeyNoMigrateSuccess) { @@ -740,8 +773,9 @@ mojom::KeystoreType::kDevice, /*challenge=*/GetDataBin(), /*migrate=*/false, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_challenge_response()); - EXPECT_EQ(observer.result->get_challenge_response(), GetDataBin()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_challenge_response()); + EXPECT_EQ(observer.result.value()->get_challenge_response(), GetDataBin()); } TEST_F(KeystoreServiceAshTest, ChallengeDeviceKeyMigrateSuccess) { @@ -767,8 +801,9 @@ mojom::KeystoreType::kDevice, /*challenge=*/GetDataBin(), /*migrate=*/true, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_challenge_response()); - EXPECT_EQ(observer.result->get_challenge_response(), GetDataBin()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_challenge_response()); + EXPECT_EQ(observer.result.value()->get_challenge_response(), GetDataBin()); } TEST_F(KeystoreServiceAshTest, ChallengeKeyFail) { @@ -791,8 +826,9 @@ mojom::KeystoreType::kUser, /*challenge=*/GetDataBin(), /*migrate=*/false, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_error_message()); - EXPECT_EQ(observer.result->get_error_message(), + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_error_message()); + EXPECT_EQ(observer.result.value()->get_error_message(), challenge_result.GetErrorMessage()); } @@ -809,14 +845,16 @@ cert_bin, mojom::KeystoreSigningAlgorithmName::kRsassaPkcs115, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_success_result()); - ASSERT_EQ(observer.result->get_success_result()->public_key, - GetPublicKeyBin()); - ASSERT_TRUE(observer.result->get_success_result() - ->algorithm_properties->is_pkcs115()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + + ASSERT_TRUE(observer.result.value()->is_success_result()); + const mojom::GetPublicKeySuccessResultPtr& success_result = + observer.result.value()->get_success_result(); + ASSERT_EQ(success_result->public_key, GetPublicKeyBin()); + + ASSERT_TRUE(success_result->algorithm_properties->is_pkcs115()); const mojom::KeystorePKCS115ParamsPtr& params = - observer.result->get_success_result() - ->algorithm_properties->get_pkcs115(); + success_result->algorithm_properties->get_pkcs115(); EXPECT_EQ(params->modulus_length, 2048); EXPECT_EQ(params->public_exponent, (std::vector<uint8_t>{1, 0, 1})); } @@ -830,8 +868,9 @@ cert_bin, mojom::KeystoreSigningAlgorithmName::kUnknown, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_error_message()); - EXPECT_EQ(observer.result->get_error_message(), + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_error_message()); + EXPECT_EQ(observer.result.value()->get_error_message(), chromeos::platform_keys::KeystoreErrorToString( mojom::KeystoreError::kAlgorithmNotPermittedByCertificate)); } @@ -844,8 +883,10 @@ CallbackObserver<mojom::DEPRECATED_GetKeyStoresResultPtr> observer; keystore_service_.DEPRECATED_GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_key_stores()); - EXPECT_TRUE(observer.result->get_key_stores().empty()); + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_key_stores()); + EXPECT_TRUE(observer.result.value()->get_key_stores().empty()); } TEST_F(KeystoreServiceAshTest, DeprecatedGetKeyStoresUserSuccess) { @@ -855,8 +896,10 @@ CallbackObserver<mojom::DEPRECATED_GetKeyStoresResultPtr> observer; keystore_service_.DEPRECATED_GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_key_stores()); - EXPECT_THAT(observer.result->get_key_stores(), + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_key_stores()); + EXPECT_THAT(observer.result.value()->get_key_stores(), ElementsAre(crosapi::mojom::KeystoreType::kUser)); } @@ -867,8 +910,10 @@ CallbackObserver<mojom::DEPRECATED_GetKeyStoresResultPtr> observer; keystore_service_.DEPRECATED_GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_key_stores()); - EXPECT_THAT(observer.result->get_key_stores(), + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_key_stores()); + EXPECT_THAT(observer.result.value()->get_key_stores(), ElementsAre(crosapi::mojom::KeystoreType::kDevice)); } @@ -879,8 +924,10 @@ CallbackObserver<mojom::DEPRECATED_GetKeyStoresResultPtr> observer; keystore_service_.DEPRECATED_GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_key_stores()); - EXPECT_THAT(observer.result->get_key_stores(), + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_key_stores()); + EXPECT_THAT(observer.result.value()->get_key_stores(), UnorderedElementsAre(crosapi::mojom::KeystoreType::kUser, crosapi::mojom::KeystoreType::kDevice)); } @@ -891,8 +938,10 @@ CallbackObserver<mojom::DEPRECATED_GetKeyStoresResultPtr> observer; keystore_service_.DEPRECATED_GetKeyStores(observer.GetCallback()); - ASSERT_TRUE(observer.result->is_error_message()); - EXPECT_EQ(observer.result->get_error_message(), + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_error_message()); + EXPECT_EQ(observer.result.value()->get_error_message(), chromeos::platform_keys::KeystoreErrorToString( mojom::KeystoreError::kInternal)); } @@ -907,8 +956,11 @@ CallbackObserver<mojom::DEPRECATED_GetCertificatesResultPtr> observer; keystore_service_.DEPRECATED_GetCertificates(mojom::KeystoreType::kUser, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_certificates()); - AssertCertListEq(observer.result->get_certificates(), GetCertificateList()); + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_certificates()); + AssertCertListEq(observer.result.value()->get_certificates(), + GetCertificateList()); } TEST_F(KeystoreServiceAshTest, DeprecatedGetCertificatesFail) { @@ -920,8 +972,10 @@ CallbackObserver<mojom::DEPRECATED_GetCertificatesResultPtr> observer; keystore_service_.DEPRECATED_GetCertificates(mojom::KeystoreType::kUser, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_error_message()); - EXPECT_EQ(observer.result->get_error_message(), + + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_error_message()); + EXPECT_EQ(observer.result.value()->get_error_message(), chromeos::platform_keys::KeystoreErrorToString( mojom::KeystoreError::kInternal)); } @@ -941,8 +995,8 @@ CertToBlob(cert_list->front()), observer.GetCallback()); - ASSERT_TRUE(observer.result); - EXPECT_TRUE(observer.result->empty()); + ASSERT_TRUE(observer.result.has_value()); + EXPECT_TRUE(observer.result.value().empty()); } TEST_F(KeystoreServiceAshTest, DeprecatedAddCertificateFail) { @@ -958,9 +1012,10 @@ CertToBlob(cert_list->front()), observer.GetCallback()); - ASSERT_TRUE(observer.result); - EXPECT_EQ(observer.result, chromeos::platform_keys::KeystoreErrorToString( - mojom::KeystoreError::kCertificateInvalid)); + ASSERT_TRUE(observer.result.has_value()); + EXPECT_EQ(observer.result.value(), + chromeos::platform_keys::KeystoreErrorToString( + mojom::KeystoreError::kCertificateInvalid)); } //------------------------------------------------------------------------------ @@ -978,8 +1033,8 @@ CertToBlob(cert_list->front()), observer.GetCallback()); - ASSERT_TRUE(observer.result); - EXPECT_TRUE(observer.result->empty()); + ASSERT_TRUE(observer.result.has_value()); + EXPECT_TRUE(observer.result.value().empty()); } TEST_F(KeystoreServiceAshTest, DeprecatedRemoveCertificateFail) { @@ -995,9 +1050,10 @@ CertToBlob(cert_list->front()), observer.GetCallback()); - ASSERT_TRUE(observer.result); - EXPECT_EQ(observer.result, chromeos::platform_keys::KeystoreErrorToString( - mojom::KeystoreError::kCertificateInvalid)); + ASSERT_TRUE(observer.result.has_value()); + EXPECT_EQ(observer.result.value(), + chromeos::platform_keys::KeystoreErrorToString( + mojom::KeystoreError::kCertificateInvalid)); } //------------------------------------------------------------------------------ @@ -1024,8 +1080,9 @@ /*challenge=*/GetDataStr(), mojom::KeystoreType::kUser, /*migrate=*/false, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_challenge_response()); - EXPECT_EQ(observer.result->get_challenge_response(), GetDataStr()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_challenge_response()); + EXPECT_EQ(observer.result.value()->get_challenge_response(), GetDataStr()); } TEST_F(KeystoreServiceAshTest, DeprecatedChallengeUserKeyMigrateSuccess) { @@ -1050,8 +1107,9 @@ /*challenge=*/GetDataStr(), mojom::KeystoreType::kUser, /*migrate=*/true, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_challenge_response()); - EXPECT_EQ(observer.result->get_challenge_response(), GetDataStr()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_challenge_response()); + EXPECT_EQ(observer.result.value()->get_challenge_response(), GetDataStr()); } TEST_F(KeystoreServiceAshTest, DeprecatedChallengeDeviceKeyNoMigrateSuccess) { @@ -1076,8 +1134,9 @@ /*challenge=*/GetDataStr(), mojom::KeystoreType::kDevice, /*migrate=*/false, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_challenge_response()); - EXPECT_EQ(observer.result->get_challenge_response(), GetDataStr()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_challenge_response()); + EXPECT_EQ(observer.result.value()->get_challenge_response(), GetDataStr()); } TEST_F(KeystoreServiceAshTest, DeprecatedChallengeDeviceKeyMigrateSuccess) { @@ -1103,8 +1162,9 @@ /*challenge=*/GetDataStr(), mojom::KeystoreType::kDevice, /*migrate=*/true, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_challenge_response()); - EXPECT_EQ(observer.result->get_challenge_response(), GetDataStr()); + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_challenge_response()); + EXPECT_EQ(observer.result.value()->get_challenge_response(), GetDataStr()); } TEST_F(KeystoreServiceAshTest, DeprecatedChallengeKeyFail) { @@ -1127,8 +1187,9 @@ /*challenge=*/GetDataStr(), mojom::KeystoreType::kUser, /*migrate=*/false, observer.GetCallback()); - ASSERT_TRUE(observer.result->is_error_message()); - EXPECT_EQ(observer.result->get_error_message(), + ASSERT_TRUE(observer.result.has_value() && observer.result.value()); + ASSERT_TRUE(observer.result.value()->is_error_message()); + EXPECT_EQ(observer.result.value()->get_error_message(), challenge_result.GetErrorMessage()); }
diff --git a/chrome/browser/ash/crosapi/local_printer_ash.cc b/chrome/browser/ash/crosapi/local_printer_ash.cc index 292c6d3..60bf2e9 100644 --- a/chrome/browser/ash/crosapi/local_printer_ash.cc +++ b/chrome/browser/ash/crosapi/local_printer_ash.cc
@@ -82,17 +82,12 @@ const absl::optional<printing::PrinterSemanticCapsAndDefaults>& caps) { return mojom::CapabilitiesResponse::New( LocalPrinterAsh::PrinterToMojom(printer), printer.HasSecureProtocol(), - caps, prefs->GetInteger(prefs::kPrintingAllowedColorModes), - prefs->GetInteger(prefs::kPrintingAllowedDuplexModes), - static_cast<printing::mojom::PinModeRestriction>( - prefs->GetInteger(prefs::kPrintingAllowedPinModes)), - static_cast<printing::mojom::ColorModeRestriction>( - prefs->GetInteger(prefs::kPrintingColorDefault)), - static_cast<printing::mojom::DuplexModeRestriction>( - prefs->GetInteger(prefs::kPrintingDuplexDefault)), - static_cast<printing::mojom::PinModeRestriction>( - prefs->GetInteger(prefs::kPrintingPinDefault)), - 0); // deprecated + caps, // comment to prevent git cl format + 0, 0, 0, // deprecated + printing::mojom::PinModeRestriction::kUnset, // deprecated + printing::mojom::ColorModeRestriction::kUnset, // deprecated + printing::mojom::DuplexModeRestriction::kUnset, // deprecated + printing::mojom::PinModeRestriction::kUnset); // deprecated } } // namespace @@ -385,6 +380,7 @@ Profile* profile = GetProfile(); PrefService* prefs = profile->GetPrefs(); mojom::PoliciesPtr policies = mojom::Policies::New(); + if (prefs->HasPrefPath(prefs::kPrintHeaderFooter)) { (prefs->IsManagedPreference(prefs::kPrintHeaderFooter) ? policies->print_header_footer_allowed @@ -393,6 +389,7 @@ ? mojom::Policies::OptionalBool::kTrue : mojom::Policies::OptionalBool::kFalse; } + if (prefs->HasPrefPath(prefs::kPrintingAllowedBackgroundGraphicsModes)) { policies->allowed_background_graphics_modes = static_cast<mojom::Policies::BackgroundGraphicsModeRestriction>( @@ -403,6 +400,7 @@ static_cast<mojom::Policies::BackgroundGraphicsModeRestriction>( prefs->GetInteger(prefs::kPrintingBackgroundGraphicsDefault)); } + policies->paper_size_default = printing::ParsePaperSizeDefault(*prefs); if (prefs->HasPrefPath(prefs::kPrintingMaxSheetsAllowed)) { int max_sheets = prefs->GetInteger(prefs::kPrintingMaxSheetsAllowed); @@ -411,6 +409,30 @@ policies->max_sheets_allowed_has_value = true; } } + + if (prefs->HasPrefPath(prefs::kPrintingAllowedColorModes)) + policies->allowed_color_modes = + prefs->GetInteger(prefs::kPrintingAllowedColorModes); + if (prefs->HasPrefPath(prefs::kPrintingAllowedDuplexModes)) + policies->allowed_duplex_modes = + prefs->GetInteger(prefs::kPrintingAllowedDuplexModes); + if (prefs->HasPrefPath(prefs::kPrintingAllowedPinModes)) + policies->allowed_pin_modes = + static_cast<printing::mojom::PinModeRestriction>( + prefs->GetInteger(prefs::kPrintingAllowedPinModes)); + if (prefs->HasPrefPath(prefs::kPrintingColorDefault)) + policies->default_color_mode = + static_cast<printing::mojom::ColorModeRestriction>( + prefs->GetInteger(prefs::kPrintingColorDefault)); + if (prefs->HasPrefPath(prefs::kPrintingDuplexDefault)) + policies->default_duplex_mode = + static_cast<printing::mojom::DuplexModeRestriction>( + prefs->GetInteger(prefs::kPrintingDuplexDefault)); + if (prefs->HasPrefPath(prefs::kPrintingPinDefault)) + policies->default_pin_mode = + static_cast<printing::mojom::PinModeRestriction>( + prefs->GetInteger(prefs::kPrintingPinDefault)); + std::move(callback).Run(std::move(policies)); }
diff --git a/chrome/browser/ash/crosapi/local_printer_ash_unittest.cc b/chrome/browser/ash/crosapi/local_printer_ash_unittest.cc index 84d896f..6187f09 100644 --- a/chrome/browser/ash/crosapi/local_printer_ash_unittest.cc +++ b/chrome/browser/ash/crosapi/local_printer_ash_unittest.cc
@@ -458,22 +458,6 @@ // Tests that fetching capabilities for an existing installed printer is // successful. TEST_P(LocalPrinterAshProcessScopeTest, GetCapabilityValidPrinter) { - auto* prefs = GetPrefs(); - // printing::mojom::ColorModeRestriction::kMonochrome | - // printing::mojom::ColorModeRestriction::kColor - prefs->SetInteger(prefs::kPrintingAllowedColorModes, 3); - // printing::mojom::DuplexModeRestriction::kSimplex | - // printing::mojom::DuplexModeRestriction::kDuplex - prefs->SetInteger(prefs::kPrintingAllowedDuplexModes, 7); - // printing::mojom::PinModeRestriction::kPin - prefs->SetInteger(prefs::kPrintingAllowedPinModes, 1); - // printing::mojom::ColorModeRestriction::kColor - prefs->SetInteger(prefs::kPrintingColorDefault, 2); - // printing::mojom::DuplexModeRestriction::kSimplex - prefs->SetInteger(prefs::kPrintingDuplexDefault, 1); - // printing::mojom::PinModeRestriction::kNoPin - prefs->SetInteger(prefs::kPrintingPinDefault, 2); - Printer saved_printer = CreateTestPrinter("printer1", "saved", "description1"); printers_manager().AddPrinter(saved_printer, PrinterClass::kSaved); @@ -499,21 +483,6 @@ ASSERT_TRUE(fetched_caps->basic_info->uri); EXPECT_EQ(kPrinterUri, *fetched_caps->basic_info->uri); - // printing::mojom::ColorModeRestriction::kMonochrome | - // printing::mojom::ColorModeRestriction::kColor - EXPECT_EQ(3, fetched_caps->allowed_color_modes); - // printing::mojom::DuplexModeRestriction::kSimplex | - // printing::mojom::DuplexModeRestriction::kDuplex - EXPECT_EQ(7, fetched_caps->allowed_duplex_modes); - EXPECT_EQ(printing::mojom::PinModeRestriction::kPin, - fetched_caps->allowed_pin_modes); - EXPECT_EQ(printing::mojom::ColorModeRestriction::kColor, - fetched_caps->default_color_mode); - EXPECT_EQ(printing::mojom::DuplexModeRestriction::kSimplex, - fetched_caps->default_duplex_mode); - EXPECT_EQ(printing::mojom::PinModeRestriction::kNoPin, - fetched_caps->default_pin_mode); - ASSERT_TRUE(fetched_caps->capabilities); EXPECT_EQ(kPapers, fetched_caps->capabilities->papers); } @@ -859,6 +828,55 @@ policies->print_header_footer_default); } +TEST_F(LocalPrinterAshTest, GetPolicies_Color) { + const uint32_t expected_allowed_color_modes = static_cast<uint32_t>( + static_cast<int32_t>(printing::mojom::ColorModeRestriction::kMonochrome) | + static_cast<int32_t>(printing::mojom::ColorModeRestriction::kColor)); + auto* prefs = GetPrefs(); + prefs->SetInteger(prefs::kPrintingAllowedColorModes, 3); + prefs->SetInteger(prefs::kPrintingColorDefault, 2); + + crosapi::mojom::PoliciesPtr policies; + local_printer_ash()->GetPolicies(base::BindOnce(base::BindLambdaForTesting( + [&](crosapi::mojom::PoliciesPtr data) { policies = std::move(data); }))); + + EXPECT_EQ(expected_allowed_color_modes, policies->allowed_color_modes); + EXPECT_EQ(printing::mojom::ColorModeRestriction::kColor, + policies->default_color_mode); +} + +TEST_F(LocalPrinterAshTest, GetPolicies_Duplex) { + const uint32_t expected_allowed_duplex_modes = static_cast<uint32_t>( + static_cast<int32_t>(printing::mojom::DuplexModeRestriction::kSimplex) | + static_cast<int32_t>(printing::mojom::DuplexModeRestriction::kDuplex)); + auto* prefs = GetPrefs(); + prefs->SetInteger(prefs::kPrintingAllowedDuplexModes, 7); + prefs->SetInteger(prefs::kPrintingDuplexDefault, 1); + + crosapi::mojom::PoliciesPtr policies; + local_printer_ash()->GetPolicies(base::BindOnce(base::BindLambdaForTesting( + [&](crosapi::mojom::PoliciesPtr data) { policies = std::move(data); }))); + + EXPECT_EQ(expected_allowed_duplex_modes, policies->allowed_duplex_modes); + EXPECT_EQ(printing::mojom::DuplexModeRestriction::kSimplex, + policies->default_duplex_mode); +} + +TEST_F(LocalPrinterAshTest, GetPolicies_Pin) { + auto* prefs = GetPrefs(); + prefs->SetInteger(prefs::kPrintingAllowedPinModes, 1); + prefs->SetInteger(prefs::kPrintingPinDefault, 2); + + crosapi::mojom::PoliciesPtr policies; + local_printer_ash()->GetPolicies(base::BindOnce(base::BindLambdaForTesting( + [&](crosapi::mojom::PoliciesPtr data) { policies = std::move(data); }))); + + EXPECT_EQ(printing::mojom::PinModeRestriction::kPin, + policies->allowed_pin_modes); + EXPECT_EQ(printing::mojom::PinModeRestriction::kNoPin, + policies->default_pin_mode); +} + TEST_F(LocalPrinterAshTest, GetUsernamePerPolicy_Allowed) { SetUsername("user@email.com"); GetPrefs()->SetBoolean(prefs::kPrintingSendUsernameAndFilenameEnabled, true);
diff --git a/chrome/browser/ash/file_manager/file_manager_jstest.cc b/chrome/browser/ash/file_manager/file_manager_jstest.cc index c6c5575..0767b06 100644 --- a/chrome/browser/ash/file_manager/file_manager_jstest.cc +++ b/chrome/browser/ash/file_manager/file_manager_jstest.cc
@@ -230,6 +230,10 @@ RunTestURL("foreground/js/navigation_list_model_unittest.m_gen.html"); } +IN_PROC_BROWSER_TEST_F(FileManagerJsTest, PathComponent) { + RunTestURL("foreground/js/path_component_unittest.m_gen.html"); +} + IN_PROC_BROWSER_TEST_F(FileManagerJsTest, ProvidersModel) { RunTestURL("foreground/js/providers_model_unittest.m_gen.html"); }
diff --git a/chrome/browser/ash/login/enable_debugging_browsertest.cc b/chrome/browser/ash/login/enable_debugging_browsertest.cc index 988dea8..649dd50 100644 --- a/chrome/browser/ash/login/enable_debugging_browsertest.cc +++ b/chrome/browser/ash/login/enable_debugging_browsertest.cc
@@ -60,17 +60,11 @@ const test::UIPath kRemoveProtectionButton = {kDebuggingScreenId, "removeProtectionProceedButton"}; -} // namespace - class TestDebugDaemonClient : public FakeDebugDaemonClient { public: - TestDebugDaemonClient() - : got_reply_(false), - num_query_debugging_features_(0), - num_enable_debugging_features_(0), - num_remove_protection_(0) {} + TestDebugDaemonClient() = default; - ~TestDebugDaemonClient() override {} + ~TestDebugDaemonClient() override = default; // FakeDebugDaemonClient overrides: void SetDebuggingFeaturesStatus(int featues_mask) override { @@ -169,12 +163,14 @@ private: scoped_refptr<content::MessageLoopRunner> runner_; - bool got_reply_; - int num_query_debugging_features_; - int num_enable_debugging_features_; - int num_remove_protection_; + bool got_reply_ = false; + int num_query_debugging_features_ = 0; + int num_enable_debugging_features_ = 0; + int num_remove_protection_ = 0; }; +} // namespace + class EnableDebuggingTestBase : public OobeBaseTest { public: EnableDebuggingTestBase() = default;
diff --git a/chrome/browser/ash/login/screens/offline_login_screen.cc b/chrome/browser/ash/login/screens/offline_login_screen.cc index bad3684..8010a32 100644 --- a/chrome/browser/ash/login/screens/offline_login_screen.cc +++ b/chrome/browser/ash/login/screens/offline_login_screen.cc
@@ -106,10 +106,9 @@ view_->Hide(); } -void OfflineLoginScreen::LoadOffline(std::string email) { +void OfflineLoginScreen::LoadOffline() { base::DictionaryValue params; - params.SetString("email", email); const std::string enterprise_domain_manager(GetEnterpriseDomainManager()); if (!enterprise_domain_manager.empty()) params.SetString("enterpriseDomainManager", enterprise_domain_manager); @@ -146,9 +145,7 @@ LOG(ERROR) << "OfflineLoginScreen::HandleCompleteAuth: User not found! " "account type=" << AccountId::AccountTypeToString(account_id.GetAccountType()); - LoginDisplayHost::default_host()->GetSigninUI()->ShowSigninError( - SigninError::kOfflineFailedNetworkNotConnected, - /*details=*/std::string()); + view_->ShowPasswordMismatchMessage(); return; }
diff --git a/chrome/browser/ash/login/screens/offline_login_screen.h b/chrome/browser/ash/login/screens/offline_login_screen.h index 83dbf02..470884d3 100644 --- a/chrome/browser/ash/login/screens/offline_login_screen.h +++ b/chrome/browser/ash/login/screens/offline_login_screen.h
@@ -41,7 +41,7 @@ // Unbind() on the associated View if this class is destroyed before that. void OnViewDestroyed(OfflineLoginView* view); - void LoadOffline(std::string email); + void LoadOffline(); void HandleCompleteAuth(const std::string& username, const std::string& password);
diff --git a/chrome/browser/ash/policy/core/user_policy_manager_builder_chromeos.cc b/chrome/browser/ash/policy/core/user_policy_manager_builder_ash.cc similarity index 99% rename from chrome/browser/ash/policy/core/user_policy_manager_builder_chromeos.cc rename to chrome/browser/ash/policy/core/user_policy_manager_builder_ash.cc index 49e3467..88caaa1 100644 --- a/chrome/browser/ash/policy/core/user_policy_manager_builder_chromeos.cc +++ b/chrome/browser/ash/policy/core/user_policy_manager_builder_ash.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ash/policy/core/user_policy_manager_builder_chromeos.h" +#include "chrome/browser/ash/policy/core/user_policy_manager_builder_ash.h" #include <utility>
diff --git a/chrome/browser/ash/policy/core/user_policy_manager_builder_chromeos.h b/chrome/browser/ash/policy/core/user_policy_manager_builder_ash.h similarity index 95% rename from chrome/browser/ash/policy/core/user_policy_manager_builder_chromeos.h rename to chrome/browser/ash/policy/core/user_policy_manager_builder_ash.h index fa0948b..e6824f2 100644 --- a/chrome/browser/ash/policy/core/user_policy_manager_builder_chromeos.h +++ b/chrome/browser/ash/policy/core/user_policy_manager_builder_ash.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_ASH_POLICY_CORE_USER_POLICY_MANAGER_BUILDER_CHROMEOS_H_ -#define CHROME_BROWSER_ASH_POLICY_CORE_USER_POLICY_MANAGER_BUILDER_CHROMEOS_H_ +#ifndef CHROME_BROWSER_ASH_POLICY_CORE_USER_POLICY_MANAGER_BUILDER_ASH_H_ +#define CHROME_BROWSER_ASH_POLICY_CORE_USER_POLICY_MANAGER_BUILDER_ASH_H_ #include <memory> @@ -34,4 +34,4 @@ } // namespace policy -#endif // CHROME_BROWSER_ASH_POLICY_CORE_USER_POLICY_MANAGER_BUILDER_CHROMEOS_H_ +#endif // CHROME_BROWSER_ASH_POLICY_CORE_USER_POLICY_MANAGER_BUILDER_ASH_H_
diff --git a/chrome/browser/ash/policy/dlp/dlp_notification_helper.cc b/chrome/browser/ash/policy/dlp/dlp_notification_helper.cc index 3d730e0..c5d9ad06 100644 --- a/chrome/browser/ash/policy/dlp/dlp_notification_helper.cc +++ b/chrome/browser/ash/policy/dlp/dlp_notification_helper.cc
@@ -21,6 +21,7 @@ namespace { constexpr char kPrintBlockedNotificationId[] = "print_dlp_blocked"; +constexpr char kPrintWarningNotificationId[] = "print_dlp_warning"; constexpr char kScreenCapturePausedNotificationPrefix[] = "screen_capture_dlp_paused-"; constexpr char kScreenCaptureResumedNotificationPrefix[] = @@ -65,6 +66,18 @@ l10n_util::GetStringUTF16(IDS_POLICY_DLP_PRINTING_BLOCKED_MESSAGE)); } +void ShowDlpPrintWarningDialog(base::OnceClosure continue_cb, + base::OnceClosure cancel_cb) { + // TODO(aidazolic): show a warning dialog instead of toast that will get + // response from the user and call the right callback + ShowDlpNotification( + kPrintWarningNotificationId, + l10n_util::GetStringUTF16(IDS_POLICY_DLP_PRINTING_WARNING_TITLE), + l10n_util::GetStringUTF16(IDS_POLICY_DLP_PRINTING_WARNING_MESSAGE)); + + std::move(continue_cb).Run(); +} + void HideDlpScreenCapturePausedNotification(const std::string& capture_id) { NotificationDisplayService::GetForProfile( ProfileManager::GetActiveUserProfile())
diff --git a/chrome/browser/ash/policy/dlp/dlp_notification_helper.h b/chrome/browser/ash/policy/dlp/dlp_notification_helper.h index 98663155..4d13861 100644 --- a/chrome/browser/ash/policy/dlp/dlp_notification_helper.h +++ b/chrome/browser/ash/policy/dlp/dlp_notification_helper.h
@@ -7,11 +7,19 @@ #include <string> +#include "base/callback_forward.h" + namespace policy { // Shows a notification that printing is not allowed due to DLP rules. void ShowDlpPrintDisabledNotification(); +// Shows a warning dialog that printing is not recommended and allows the user +// to choose whether to continue or not. Based on the response, only one of +// |continue_cb| and |cancel_cb| will run. +void ShowDlpPrintWarningDialog(base::OnceClosure continue_cb, + base::OnceClosure cancel_cb); + // Shows/hides a notification that screen capture was paused because // confidential content appeared in the captured area, or resumed when it left // the captured area.
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc index ad7fb91..f0abf1b 100644 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
@@ -823,7 +823,7 @@ // Password manager if (remove_mask & constants::DATA_TYPE_PASSWORDS) { base::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords")); - auto password_store = PasswordStoreFactory::GetForProfile( + auto password_store = PasswordStoreFactory::GetInterfaceForProfile( profile_, ServiceAccessType::EXPLICIT_ACCESS); if (password_store) { @@ -863,7 +863,7 @@ } if (remove_mask & constants::DATA_TYPE_ACCOUNT_PASSWORDS) { - auto account_store = AccountPasswordStoreFactory::GetForProfile( + auto account_store = AccountPasswordStoreFactory::GetInterfaceForProfile( profile_, ServiceAccessType::EXPLICIT_ACCESS); if (account_store) { @@ -878,9 +878,9 @@ } if (remove_mask & content::BrowsingDataRemover::DATA_TYPE_COOKIES) { - password_manager::PasswordStore* password_store = - PasswordStoreFactory::GetForProfile(profile_, - ServiceAccessType::EXPLICIT_ACCESS) + password_manager::PasswordStoreInterface* password_store = + PasswordStoreFactory::GetInterfaceForProfile( + profile_, ServiceAccessType::EXPLICIT_ACCESS) .get(); if (password_store) { @@ -891,9 +891,9 @@ } if (remove_mask & constants::DATA_TYPE_HISTORY) { - password_manager::PasswordStore* password_store = - PasswordStoreFactory::GetForProfile(profile_, - ServiceAccessType::EXPLICIT_ACCESS) + password_manager::PasswordStoreInterface* password_store = + PasswordStoreFactory::GetInterfaceForProfile( + profile_, ServiceAccessType::EXPLICIT_ACCESS) .get(); if (password_store) {
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc index ddade7e..be44fe6 100644 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
@@ -1438,16 +1438,8 @@ EXPECT_TRUE(tester.HistoryContainsURL(kOrigin2)); } -// TODO(crbug.com/1234803): Crashes on linux-ubsan-vptr -#if defined(UNDEFINED_SANITIZER) -#define MAYBE_RemoveMultipleTypesHistoryProhibited \ - DISABLED_RemoveMultipleTypesHistoryProhibited -#else -#define MAYBE_RemoveMultipleTypesHistoryProhibited \ - RemoveMultipleTypesHistoryProhibited -#endif TEST_F(ChromeBrowsingDataRemoverDelegateTest, - MAYBE_RemoveMultipleTypesHistoryProhibited) { + RemoveMultipleTypesHistoryProhibited) { PrefService* prefs = GetProfile()->GetPrefs(); prefs->SetBoolean(prefs::kAllowDeletingBrowserHistory, false); @@ -2002,13 +1994,7 @@ content::BrowsingDataRemover::DATA_TYPE_DOWNLOADS, false); } -// TODO(crbug.com/1234803): Crashes on linux-ubsan-vptr -#if defined(UNDEFINED_SANITIZER) -#define MAYBE_RemovePasswordStatistics DISABLED_RemovePasswordStatistics -#else -#define MAYBE_RemovePasswordStatistics RemovePasswordStatistics -#endif -TEST_F(ChromeBrowsingDataRemoverDelegateTest, MAYBE_RemovePasswordStatistics) { +TEST_F(ChromeBrowsingDataRemoverDelegateTest, RemovePasswordStatistics) { RemovePasswordsTester tester(GetProfile()); base::RepeatingCallback<bool(const GURL&)> empty_filter; @@ -2061,13 +2047,7 @@ constants::DATA_TYPE_HISTORY, std::move(builder)); } -// TODO(crbug.com/1234803): Crashes on linux-ubsan-vptr -#if defined(UNDEFINED_SANITIZER) -#define MAYBE_RemovePasswordsByTimeOnly DISABLED_RemovePasswordsByTimeOnly -#else -#define MAYBE_RemovePasswordsByTimeOnly RemovePasswordsByTimeOnly -#endif -TEST_F(ChromeBrowsingDataRemoverDelegateTest, MAYBE_RemovePasswordsByTimeOnly) { +TEST_F(ChromeBrowsingDataRemoverDelegateTest, RemovePasswordsByTimeOnly) { RemovePasswordsTester tester(GetProfile()); ExpectRemoveLoginsByURLAndTime(tester.profile_store()); @@ -2092,12 +2072,6 @@ std::move(builder)); } -// TODO(crbug.com/1234803): Crashes on linux-ubsan-vptr -#if defined(UNDEFINED_SANITIZER) -#define MAYBE_DisableAutoSignIn DISABLED_DisableAutoSignIn -#else -#define MAYBE_DisableAutoSignIn DisableAutoSignIn -#endif TEST_F(ChromeBrowsingDataRemoverDelegateTest, DisableAutoSignIn) { RemovePasswordsTester tester(GetProfile()); base::RepeatingCallback<bool(const GURL&)> empty_filter = @@ -2115,16 +2089,8 @@ false); } -// TODO(crbug.com/1234803): Crashes on linux-ubsan-vptr -#if defined(UNDEFINED_SANITIZER) -#define MAYBE_DisableAutoSignInAfterRemovingPasswords \ - DISABLED_DisableAutoSignInAfterRemovingPasswords -#else -#define MAYBE_DisableAutoSignInAfterRemovingPasswords \ - DisableAutoSignInAfterRemovingPasswords -#endif TEST_F(ChromeBrowsingDataRemoverDelegateTest, - MAYBE_DisableAutoSignInAfterRemovingPasswords) { + DisableAutoSignInAfterRemovingPasswords) { RemovePasswordsTester tester(GetProfile()); base::RepeatingCallback<bool(const GURL&)> empty_filter = BrowsingDataFilterBuilder::BuildNoopFilter(); @@ -3169,16 +3135,8 @@ } }; -// TODO(crbug.com/1234803): Crashes on linux-ubsan-vptr -#if defined(UNDEFINED_SANITIZER) -#define MAYBE_RemovePasswordsByTimeOnly_WithAccountStore \ - DISABLED_RemovePasswordsByTimeOnly_WithAccountStore -#else -#define MAYBE_RemovePasswordsByTimeOnly_WithAccountStore \ - RemovePasswordsByTimeOnly_WithAccountStore -#endif TEST_F(ChromeBrowsingDataRemoverDelegateEnabledPasswordsTest, - MAYBE_RemovePasswordsByTimeOnly_WithAccountStore) { + RemovePasswordsByTimeOnly_WithAccountStore) { RemovePasswordsTester tester(GetProfile()); ExpectRemoveLoginsByURLAndTime(tester.profile_store()); @@ -3189,16 +3147,8 @@ constants::DATA_TYPE_PASSWORDS, false); } -// TODO(crbug.com/1234803): Crashes on linux-ubsan-vptr -#if defined(UNDEFINED_SANITIZER) -#define MAYBE_RemoveAccountPasswordsByTimeOnly_WithAccountStore \ - DISABLED_RemoveAccountPasswordsByTimeOnly_WithAccountStore -#else -#define MAYBE_RemoveAccountPasswordsByTimeOnly_WithAccountStore \ - RemoveAccountPasswordsByTimeOnly_WithAccountStore -#endif TEST_F(ChromeBrowsingDataRemoverDelegateEnabledPasswordsTest, - MAYBE_RemoveAccountPasswordsByTimeOnly_WithAccountStore) { + RemoveAccountPasswordsByTimeOnly_WithAccountStore) { RemovePasswordsTester tester(GetProfile()); EXPECT_CALL(*tester.profile_store(), RemoveLoginsByURLAndTime).Times(0); @@ -3208,16 +3158,8 @@ constants::DATA_TYPE_ACCOUNT_PASSWORDS, false); } -// TODO(crbug.com/1234803): Crashes on linux-ubsan-vptr -#if defined(UNDEFINED_SANITIZER) -#define MAYBE_RemoveAccountPasswordsByTimeOnly_WithAccountStore_Failure \ - DISABLED_RemoveAccountPasswordsByTimeOnly_WithAccountStore_Failure -#else -#define MAYBE_RemoveAccountPasswordsByTimeOnly_WithAccountStore_Failure \ - RemoveAccountPasswordsByTimeOnly_WithAccountStore_Failure -#endif TEST_F(ChromeBrowsingDataRemoverDelegateEnabledPasswordsTest, - MAYBE_RemoveAccountPasswordsByTimeOnly_WithAccountStore_Failure) { + RemoveAccountPasswordsByTimeOnly_WithAccountStore_Failure) { RemovePasswordsTester tester(GetProfile()); EXPECT_CALL(*tester.profile_store(), RemoveLoginsByURLAndTime).Times(0);
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index 3b8a4e9..ffcf9125 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -2115,8 +2115,8 @@ "../ash/policy/core/user_cloud_policy_token_forwarder.h", "../ash/policy/core/user_cloud_policy_token_forwarder_factory.cc", "../ash/policy/core/user_cloud_policy_token_forwarder_factory.h", - "../ash/policy/core/user_policy_manager_builder_chromeos.cc", - "../ash/policy/core/user_policy_manager_builder_chromeos.h", + "../ash/policy/core/user_policy_manager_builder_ash.cc", + "../ash/policy/core/user_policy_manager_builder_ash.h", "../ash/policy/display/display_resolution_handler.cc", "../ash/policy/display/display_resolution_handler.h", "../ash/policy/display/display_rotation_default_handler.cc",
diff --git a/chrome/browser/chromeos/extensions/telemetry/api/BUILD.gn b/chrome/browser/chromeos/extensions/telemetry/api/BUILD.gn index dee65f2..f78fb3a 100644 --- a/chrome/browser/chromeos/extensions/telemetry/api/BUILD.gn +++ b/chrome/browser/chromeos/extensions/telemetry/api/BUILD.gn
@@ -49,7 +49,9 @@ deps = [ ":api", "//chrome/test:test_support", + "//chromeos/dbus", "//chromeos/dbus/cros_healthd", + "//chromeos/dbus/debug_daemon", "//chromeos/services/cros_healthd/public/cpp", "//chromeos/services/cros_healthd/public/mojom", "//extensions:test_support",
diff --git a/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api.cc b/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api.cc index 98bb840f..d93aa79 100644 --- a/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api.cc +++ b/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api.cc
@@ -14,8 +14,13 @@ namespace chromeos { -OsTelemetryGetVpdInfoFunction::OsTelemetryGetVpdInfoFunction() +TelemetryApiFunctionBase::TelemetryApiFunctionBase() : probe_service_(remote_probe_service_.BindNewPipeAndPassReceiver()) {} +TelemetryApiFunctionBase::~TelemetryApiFunctionBase() = default; + +// getVpdInfo ------------------------------------------------------------------ + +OsTelemetryGetVpdInfoFunction::OsTelemetryGetVpdInfoFunction() = default; OsTelemetryGetVpdInfoFunction::~OsTelemetryGetVpdInfoFunction() = default; ExtensionFunction::ResponseAction OsTelemetryGetVpdInfoFunction::Run() { @@ -59,4 +64,32 @@ Respond(ArgumentList(api::os_telemetry::GetVpdInfo::Results::Create(result))); } +// getOemData ------------------------------------------------------------------ + +OsTelemetryGetOemDataFunction::OsTelemetryGetOemDataFunction() = default; +OsTelemetryGetOemDataFunction::~OsTelemetryGetOemDataFunction() = default; + +ExtensionFunction::ResponseAction OsTelemetryGetOemDataFunction::Run() { + // We don't need Unretained() or WeakPtr because ExtensionFunction is + // ref-counted. + auto cb = base::BindOnce(&OsTelemetryGetOemDataFunction::OnResult, this); + + remote_probe_service_->GetOemData(std::move(cb)); + + return RespondLater(); +} + +void OsTelemetryGetOemDataFunction::OnResult(health::mojom::OemDataPtr ptr) { + if (!ptr || !ptr->oem_data.has_value()) { + Respond(Error("API internal error")); + return; + } + + api::os_telemetry::OemData result; + result.oem_data = + std::make_unique<std::string>(std::move(ptr->oem_data.value())); + + Respond(ArgumentList(api::os_telemetry::GetOemData::Results::Create(result))); +} + } // namespace chromeos
diff --git a/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api.h b/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api.h index 9b9e30b..4db0e5c 100644 --- a/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api.h +++ b/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api.h
@@ -13,7 +13,23 @@ namespace chromeos { -class OsTelemetryGetVpdInfoFunction : public ExtensionFunction { +class TelemetryApiFunctionBase : public ExtensionFunction { + public: + TelemetryApiFunctionBase(); + + TelemetryApiFunctionBase(const TelemetryApiFunctionBase&) = delete; + TelemetryApiFunctionBase& operator=(const TelemetryApiFunctionBase&) = delete; + + protected: + ~TelemetryApiFunctionBase() override; + + mojo::Remote<health::mojom::ProbeService> remote_probe_service_; + + private: + ProbeService probe_service_; +}; + +class OsTelemetryGetVpdInfoFunction : public TelemetryApiFunctionBase { public: DECLARE_EXTENSION_FUNCTION("os.telemetry.getVpdInfo", OS_TELEMETRY_GETVPDINFO) @@ -29,9 +45,24 @@ ResponseAction Run() override; void OnResult(health::mojom::TelemetryInfoPtr ptr); +}; - mojo::Remote<health::mojom::ProbeService> remote_probe_service_; - ProbeService probe_service_; +class OsTelemetryGetOemDataFunction : public TelemetryApiFunctionBase { + public: + DECLARE_EXTENSION_FUNCTION("os.telemetry.getOemData", OS_TELEMETRY_GETOEMDATA) + + OsTelemetryGetOemDataFunction(); + OsTelemetryGetOemDataFunction(const OsTelemetryGetOemDataFunction&) = delete; + OsTelemetryGetOemDataFunction& operator=( + const OsTelemetryGetOemDataFunction&) = delete; + + private: + ~OsTelemetryGetOemDataFunction() override; + + // ExtensionFunction: + ResponseAction Run() override; + + void OnResult(health::mojom::OemDataPtr ptr); }; } // namespace chromeos
diff --git a/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api_browsertest.cc b/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api_browsertest.cc index b86c977..9ac28a6 100644 --- a/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api_browsertest.cc +++ b/chrome/browser/chromeos/extensions/telemetry/api/telemetry_api_browsertest.cc
@@ -9,6 +9,8 @@ #include "chrome/browser/extensions/extension_browsertest.h" #include "chromeos/dbus/cros_healthd/fake_cros_healthd_client.h" +#include "chromeos/dbus/dbus_thread_manager.h" +#include "chromeos/dbus/debug_daemon/fake_debug_daemon_client.h" #include "chromeos/services/cros_healthd/public/mojom/cros_healthd_probe.mojom.h" #include "content/public/test/browser_test.h" #include "extensions/test/result_catcher.h" @@ -112,4 +114,50 @@ )"); } +namespace { + +class TestDebugDaemonClient : public FakeDebugDaemonClient { + public: + TestDebugDaemonClient() = default; + ~TestDebugDaemonClient() override = default; + + void GetLog(const std::string& log_name, + DBusMethodCallback<std::string> callback) override { + EXPECT_EQ(log_name, "oemdata"); + std::move(callback).Run(absl::nullopt); + } +}; + +} // namespace + +IN_PROC_BROWSER_TEST_F(TelemetryExtensionBrowserTest, GetOemDataError) { + DBusThreadManager::GetSetterForTesting()->SetDebugDaemonClient( + std::make_unique<TestDebugDaemonClient>()); + + CreateExtensionAndRunServiceWorker(R"( + chrome.test.runTests([ + async function getOemData() { + await chrome.test.assertPromiseRejects( + chrome.os.telemetry.getOemData(), + 'Error: API internal error' + ); + chrome.test.succeed(); + } + ]); + )"); +} + +IN_PROC_BROWSER_TEST_F(TelemetryExtensionBrowserTest, GetOemDataSuccess) { + CreateExtensionAndRunServiceWorker(R"( + chrome.test.runTests([ + async function getOemData() { + const result = await chrome.os.telemetry.getOemData(); + chrome.test.assertEq( + "oemdata: response from GetLog", result.oemData); + chrome.test.succeed(); + } + ]); + )"); +} + } // namespace chromeos
diff --git a/chrome/browser/diagnostics/diagnostics_model.cc b/chrome/browser/diagnostics/diagnostics_model.cc index 7bd0102..55baf2b 100644 --- a/chrome/browser/diagnostics/diagnostics_model.cc +++ b/chrome/browser/diagnostics/diagnostics_model.cc
@@ -34,8 +34,10 @@ const int DiagnosticsModel::kDiagnosticsTestCount = 18; #else const int DiagnosticsModel::kDiagnosticsTestCount = 16; -#endif -#endif +#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#elif defined(OS_FUCHSIA) +const int DiagnosticsModel::kDiagnosticsTestCount = 16; +#endif // defined(OS_WIN) namespace { @@ -227,6 +229,30 @@ DISALLOW_COPY_AND_ASSIGN(DiagnosticsModelPosix); }; +#elif defined(OS_FUCHSIA) +class DiagnosticsModelFuchsia : public DiagnosticsModelImpl { + public: + DiagnosticsModelFuchsia() { + // TODO(crbug.com/1234737) Check that the list of diagnostic is correct. + tests_.push_back(MakeInstallTypeTest()); + tests_.push_back(MakeVersionTest()); + tests_.push_back(MakeUserDirTest()); + tests_.push_back(MakeLocalStateFileTest()); + tests_.push_back(MakeDictonaryDirTest()); + tests_.push_back(MakeResourcesFileTest()); + tests_.push_back(MakeDiskSpaceTest()); + tests_.push_back(MakePreferencesTest()); + tests_.push_back(MakeLocalStateTest()); + tests_.push_back(MakeBookMarksTest()); + tests_.push_back(MakeSqliteWebDataDbTest()); + tests_.push_back(MakeSqliteCookiesDbTest()); + tests_.push_back(MakeSqliteFaviconsDbTest()); + tests_.push_back(MakeSqliteHistoryDbTest()); + tests_.push_back(MakeSqliteTopSitesDbTest()); + tests_.push_back(MakeSqliteWebDatabaseTrackerDbTest()); + } +}; + #endif } // namespace @@ -242,6 +268,8 @@ return new DiagnosticsModelMac(); #elif defined(OS_POSIX) return new DiagnosticsModelPosix(); +#elif defined(OS_FUCHSIA) + return new DiagnosticsModelFuchsia(); #endif }
diff --git a/chrome/browser/enterprise/reporting/browser_report_generator_unittest.cc b/chrome/browser/enterprise/reporting/browser_report_generator_unittest.cc index 9ac3d32..16f7ae40 100644 --- a/chrome/browser/enterprise/reporting/browser_report_generator_unittest.cc +++ b/chrome/browser/enterprise/reporting/browser_report_generator_unittest.cc
@@ -25,7 +25,6 @@ #include "chrome/test/base/testing_profile_manager.h" #include "components/account_id/account_id.h" #include "components/enterprise/browser/reporting/browser_report_generator.h" -#include "content/public/browser/plugin_service.h" #include "content/public/common/webplugininfo.h" #include "content/public/test/browser_task_environment.h" #include "device_management_backend.pb.h" @@ -39,6 +38,10 @@ #include "chrome/test/base/scoped_channel_override.h" #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) && !defined(OS_CHROMEOS) +#if BUILDFLAG(ENABLE_PLUGINS) +#include "content/public/browser/plugin_service.h" +#endif + namespace em = enterprise_management; namespace enterprise_reporting {
diff --git a/chrome/browser/enterprise/reporting/report_generator_unittest.cc b/chrome/browser/enterprise/reporting/report_generator_unittest.cc index 6f1b704d..e8e4f91 100644 --- a/chrome/browser/enterprise/reporting/report_generator_unittest.cc +++ b/chrome/browser/enterprise/reporting/report_generator_unittest.cc
@@ -23,7 +23,6 @@ #include "components/account_id/account_id.h" #include "components/enterprise/browser/reporting/report_request_definition.h" #include "components/policy/core/common/cloud/cloud_policy_util.h" -#include "content/public/browser/plugin_service.h" #include "content/public/common/webplugininfo.h" #include "content/public/test/browser_task_environment.h" #include "extensions/browser/extension_registry.h" @@ -37,6 +36,10 @@ #include "components/arc/test/fake_app_instance.h" #endif +#if BUILDFLAG(ENABLE_PLUGINS) +#include "content/public/browser/plugin_service.h" +#endif + namespace em = enterprise_management; namespace enterprise_reporting {
diff --git a/chrome/browser/enterprise/reporting/report_request_queue_generator_unittest.cc b/chrome/browser/enterprise/reporting/report_request_queue_generator_unittest.cc index 6c83994..068a6770 100644 --- a/chrome/browser/enterprise/reporting/report_request_queue_generator_unittest.cc +++ b/chrome/browser/enterprise/reporting/report_request_queue_generator_unittest.cc
@@ -23,12 +23,15 @@ #include "components/policy/core/common/mock_policy_service.h" #include "components/policy/core/common/policy_map.h" #include "components/sync_preferences/pref_service_syncable.h" -#include "content/public/browser/plugin_service.h" #include "content/public/test/browser_task_environment.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/extension_builder.h" #include "testing/gtest/include/gtest/gtest.h" +#if BUILDFLAG(ENABLE_PLUGINS) +#include "content/public/browser/plugin_service.h" +#endif + namespace em = enterprise_management; namespace enterprise_reporting {
diff --git a/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_unittest.cc b/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_unittest.cc index 09a99c05..92287fc 100644 --- a/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_unittest.cc +++ b/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_unittest.cc
@@ -80,7 +80,7 @@ using ::testing::UnorderedElementsAreArray; std::string GetParseError(ParseResult result, int rule_id) { - return ParseInfo(result, &rule_id).error(); + return ParseInfo(result, rule_id).error(); } std::string GetErrorWithFilename(
diff --git a/chrome/browser/extensions/api/identity/gaia_remote_consent_flow.cc b/chrome/browser/extensions/api/identity/gaia_remote_consent_flow.cc index 17b1d1a57..c48465a5 100644 --- a/chrome/browser/extensions/api/identity/gaia_remote_consent_flow.cc +++ b/chrome/browser/extensions/api/identity/gaia_remote_consent_flow.cc
@@ -28,7 +28,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_LACROS) -#include "chrome/browser/lacros/account_manager_util.h" +#include "chrome/browser/lacros/account_manager/account_manager_util.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) namespace extensions {
diff --git a/chrome/browser/extensions/api/terminal/terminal_private_api.cc b/chrome/browser/extensions/api/terminal/terminal_private_api.cc index 5f54c44..caf011d 100644 --- a/chrome/browser/extensions/api/terminal/terminal_private_api.cc +++ b/chrome/browser/extensions/api/terminal/terminal_private_api.cc
@@ -12,6 +12,7 @@ #include "ash/constants/ash_pref_names.h" #include "base/bind.h" +#include "base/callback.h" #include "base/command_line.h" #include "base/containers/flat_set.h" #include "base/json/json_writer.h" @@ -21,6 +22,7 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/system/sys_info.h" +#include "base/task_runner_util.h" #include "base/values.h" #include "chrome/browser/ash/crostini/crostini_features.h" #include "chrome/browser/ash/crostini/crostini_manager.h" @@ -77,18 +79,41 @@ const char kCwdTerminalIdPrefix[] = "terminal_id:"; +void CloseTerminal(const std::string& terminal_id, + base::OnceCallback<void(bool)> callback) { + chromeos::ProcessProxyRegistry::GetTaskRunner()->PostTaskAndReplyWithResult( + FROM_HERE, + base::BindOnce( + [](const std::string& terminal_id) { + return chromeos::ProcessProxyRegistry::Get()->CloseProcess( + terminal_id); + }, + terminal_id), + std::move(callback)); +} + class TerminalTabHelper : public content::WebContentsUserData<TerminalTabHelper> { public: + ~TerminalTabHelper() override { + // The web contents object is being destructed. We should close all + // terminals that haven't been closed already. This can happen when the JS + // code didn't have a chance to do that (e.g. memory stress causes the web + // contents to be killed directly). + for (const std::string& terminal_id : terminal_ids_) { + CloseTerminal(terminal_id, base::DoNothing()); + } + } + void AddTerminalId(const std::string& terminal_id) { if (!terminal_ids_.insert(terminal_id).second) { - LOG(ERROR) << "terminal id already exists" << terminal_id; + LOG(ERROR) << "Terminal id already exists: " << terminal_id; } } void RemoveTerminalId(const std::string& terminal_id) { if (terminal_ids_.erase(terminal_id) == 0) { - LOG(ERROR) << "terminal id does not exists" << terminal_id; + LOG(ERROR) << "Terminal id does not exist: " << terminal_id; } } @@ -491,27 +516,15 @@ TerminalTabHelper::FromWebContents(GetSenderWebContents()) ->RemoveTerminalId(params->id); - // Registry lives on its own task runner. - chromeos::ProcessProxyRegistry::GetTaskRunner()->PostTask( - FROM_HERE, base::BindOnce(&TerminalPrivateCloseTerminalProcessFunction:: - CloseOnRegistryTaskRunner, - this, params->id)); + CloseTerminal( + params->id, + base::BindOnce( + &TerminalPrivateCloseTerminalProcessFunction::RespondOnUIThread, + this)); return RespondLater(); } -void TerminalPrivateCloseTerminalProcessFunction::CloseOnRegistryTaskRunner( - const std::string& terminal_id) { - bool success = - chromeos::ProcessProxyRegistry::Get()->CloseProcess(terminal_id); - - content::GetUIThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce( - &TerminalPrivateCloseTerminalProcessFunction::RespondOnUIThread, this, - success)); -} - void TerminalPrivateCloseTerminalProcessFunction::RespondOnUIThread( bool success) { Respond(OneArgument(base::Value(success)));
diff --git a/chrome/browser/extensions/api/terminal/terminal_private_api.h b/chrome/browser/extensions/api/terminal/terminal_private_api.h index 8617970..286f39e 100644 --- a/chrome/browser/extensions/api/terminal/terminal_private_api.h +++ b/chrome/browser/extensions/api/terminal/terminal_private_api.h
@@ -135,7 +135,6 @@ ExtensionFunction::ResponseAction Run() override; private: - void CloseOnRegistryTaskRunner(const std::string& terminal_id); void RespondOnUIThread(bool success); };
diff --git a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc index b156ad1c..c6cc9e0 100644 --- a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc +++ b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc
@@ -533,6 +533,9 @@ "floatingkeyboarddefault", base::FeatureList::IsEnabled( chromeos::features::kVirtualKeyboardFloatingDefault))); + features.Append(GenerateFeatureFlag( + "stylushandwriting", + base::FeatureList::IsEnabled(chromeos::features::kImeStylusHandwriting))); // Flag used to enable system built-in IME decoder instead of NaCl. bool mojo_decoder =
diff --git a/chrome/browser/extensions/back_forward_cache_browsertest.cc b/chrome/browser/extensions/back_forward_cache_browsertest.cc index c8cdafa..9e30902 100644 --- a/chrome/browser/extensions/back_forward_cache_browsertest.cc +++ b/chrome/browser/extensions/back_forward_cache_browsertest.cc
@@ -12,6 +12,7 @@ #include "chrome/test/base/ui_test_utils.h" #include "components/back_forward_cache/back_forward_cache_disable.h" #include "content/public/browser/back_forward_cache.h" +#include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_features.h" #include "content/public/test/browser_test.h" @@ -31,7 +32,8 @@ bool allow_content_scripts = true, bool extension_message_support = true, std::string blocked_extensions = "") - : extension_message_support_(extension_message_support) { + : allow_content_scripts_(allow_content_scripts), + extension_message_support_(extension_message_support) { // If `allow_content_scripts` is true then `all_extensions_allowed` must // also be true. DCHECK(!(allow_content_scripts && !all_extensions_allowed)); @@ -83,7 +85,7 @@ static_cast<int>( extension_message_support_ ? back_forward_cache::DisabledReasonId:: - kExtensionMessagingForOpenPort + kExtensionSentMessageToCachedFrame : back_forward_cache::DisabledReasonId::kExtensionMessaging); std::string action = base::StringPrintf( @@ -107,20 +109,38 @@ // 3) Navigate to B. ui_test_utils::NavigateToURL(browser(), url_b); - // Expect that `rfh_a` is destroyed as it wouldn't be placed in the cache - // since it uses the chrome.runtime API. - delete_observer_rfh_a.WaitUntilDeleted(); + // What happens next depends on whether or not content script is allowed. If + // it is, then the `rfh_a` should be cached and the channel should still be + // open. If it isn't, then `rfh_a` and the channel should be deleted. + if (!allow_content_scripts_) { + // `rfh_a` should be destroyed, and the channel should be closed. + delete_observer_rfh_a.WaitUntilDeleted(); + EXPECT_EQ(0u, MessageService::Get(profile())->GetChannelCountForTest()); + } else { + // Expect that `rfh_a` is cached, and the channel is still open. + EXPECT_EQ(rfh_a->GetLifecycleState(), + content::RenderFrameHost::LifecycleState::kInBackForwardCache); + EXPECT_EQ(1u, MessageService::Get(profile())->GetChannelCountForTest()); - // 4) Go back to A. + // 4) Send a message to the port. + ASSERT_TRUE(ExecuteScriptInBackgroundPageNoWait( + extension->id(), "port.postMessage('bye');")); + + // `rfh_a` should be destroyed now, and the channel should be closed. + delete_observer_rfh_a.WaitUntilDeleted(); + EXPECT_EQ(0u, MessageService::Get(profile())->GetChannelCountForTest()); + } + + // 5) Go back to A. content::WebContents* web_contents = browser()->tab_strip_model()->GetActiveWebContents(); web_contents->GetController().GoBack(); EXPECT_TRUE(WaitForLoadStop(web_contents)); // When extension_message_support_ = true, validate that the not restored - // reason is `ExtensionMessagingForOpenPort` due to an active message - // channel. Otherwise, validate that the not restored reason is - // `ExtensionMessaging` due to extension messages. + // reason is `kExtensionSentMessageToCachedFrame` due to a message being + // sent to an inactive frame. Otherwise, validate that the not restored + // reason is `ExtensionMessaging` due to extension messages. EXPECT_EQ(1, histogram_tester_.GetBucketCount( "BackForwardCache.HistoryNavigationOutcome." "DisabledForRenderFrameHostReason2", @@ -180,6 +200,7 @@ private: base::test::ScopedFeatureList feature_list_; + bool allow_content_scripts_; bool extension_message_support_; }; @@ -653,7 +674,8 @@ } // Test if the chrome.tabs.connect is called and then the page is navigated, -// the page is not allowed to enter the bfcache due to an open channel. +// the page is allowed to enter the bfcache, but if the extension tries to send +// it a message the page will be evicted. IN_PROC_BROWSER_TEST_F(ExtensionBackForwardCacheBrowserTest, ChromeTabsConnect) { const Extension* extension = @@ -673,9 +695,11 @@ constexpr char kScript[] = R"HTML( - var p; chrome.tabs.query({}, (t) => { p = chrome.tabs.connect(t[0].id); + // Save a "global" reference to the port so it can be used by the test + // later. + port = p; p.onMessage.addListener( (m) => {window.domAutomationController.send(m)} ); @@ -690,8 +714,87 @@ // 3) Navigate to B. ui_test_utils::NavigateToURL(browser(), url_b); - // Expect that `rfh_a` is destroyed as it should be cleared from the cache. + // Expect that `rfh_a` is cached, and the channel is still open. + EXPECT_EQ(rfh_a->GetLifecycleState(), + content::RenderFrameHost::LifecycleState::kInBackForwardCache); + EXPECT_EQ(1u, MessageService::Get(profile())->GetChannelCountForTest()); + + // 4) Send a message to the port. + ASSERT_TRUE(ExecuteScriptInBackgroundPageNoWait(extension->id(), + "port.postMessage('bye');")); + + // Expect that `rfh_a` is destroyed, since the message should cause it to be + // evicted, and that the channel is closed. delete_observer_rfh_a.WaitUntilDeleted(); + EXPECT_EQ(0u, MessageService::Get(profile())->GetChannelCountForTest()); +} + +// Test that after caching and restoring a page, long-lived ports still work. +IN_PROC_BROWSER_TEST_F(ExtensionBackForwardCacheBrowserTest, + ChromeTabsConnectChannelWorksAfterRestore) { + const Extension* extension = + LoadExtension(test_data_dir_.AppendASCII("back_forward_cache") + .AppendASCII("content_script")); + ASSERT_TRUE(extension); + + ASSERT_TRUE(embedded_test_server()->Start()); + GURL url_a(embedded_test_server()->GetURL("a.com", "/title1.html")); + GURL url_b(embedded_test_server()->GetURL("b.com", "/title1.html")); + + // 1) Navigate to A. + content::RenderFrameHost* rfh_a = + ui_test_utils::NavigateToURL(browser(), url_a); + content::RenderFrameDeletedObserver delete_observer_rfh_a(rfh_a); + std::u16string expected_title_connected = u"connected"; + content::TitleWatcher title_watcher_connected( + browser()->tab_strip_model()->GetActiveWebContents(), + expected_title_connected); + + EXPECT_EQ(MessageService::Get(profile())->GetChannelCountForTest(), 0u); + + std::string action = base::StringPrintf( + R"HTML( + var p = chrome.runtime.connect('%s'); + p.onMessage.addListener((m) => { + document.title = m; + }); + )HTML", + extension->id().c_str()); + ASSERT_TRUE(ExecJs(rfh_a, action)); + + // 2) Wait for the message port to be connected. + EXPECT_EQ(expected_title_connected, + title_watcher_connected.WaitAndGetTitle()); + + EXPECT_EQ(MessageService::Get(profile())->GetChannelCountForTest(), 1u); + + // 3) Navigate to B. + ui_test_utils::NavigateToURL(browser(), url_b); + + EXPECT_EQ(MessageService::Get(profile())->GetChannelCountForTest(), 1u); + + // Expect that `rfh_a` is cached. + EXPECT_EQ(rfh_a->GetLifecycleState(), + content::RenderFrameHost::LifecycleState::kInBackForwardCache); + + // 4) Navigate back to A. + content::WebContents* web_contents = + browser()->tab_strip_model()->GetActiveWebContents(); + web_contents->GetController().GoBack(); + ASSERT_TRUE(WaitForLoadStop(web_contents)); + + // Verify that `rfh_a` is the active frame again. + EXPECT_TRUE(rfh_a->GetLifecycleState() == + content::RenderFrameHost::LifecycleState::kActive); + + // 5) Post a message to the frame. + ASSERT_TRUE(ExecuteScriptInBackgroundPageNoWait( + extension->id(), "port.postMessage('restored');")); + + // Verify that the message was received properly. + content::TitleWatcher title_watcher_restored( + browser()->tab_strip_model()->GetActiveWebContents(), u"restored"); + EXPECT_EQ(u"restored", title_watcher_restored.WaitAndGetTitle()); } // Test if the chrome.tabs.connect is called then disconnected, the page is
diff --git a/chrome/browser/extensions/extension_garbage_collector_unittest.cc b/chrome/browser/extensions/extension_garbage_collector_unittest.cc index 08491fe2..d756199c 100644 --- a/chrome/browser/extensions/extension_garbage_collector_unittest.cc +++ b/chrome/browser/extensions/extension_garbage_collector_unittest.cc
@@ -16,13 +16,16 @@ #include "chrome/common/chrome_constants.h" #include "chrome/test/base/testing_profile.h" #include "components/prefs/scoped_user_pref_update.h" -#include "content/public/browser/plugin_service.h" #include "content/public/test/browser_task_environment.h" #include "content/public/test/test_utils.h" #include "extensions/browser/extension_prefs.h" #include "extensions/browser/pref_names.h" #include "ppapi/buildflags/buildflags.h" +#if BUILDFLAG(ENABLE_PLUGINS) +#include "content/public/browser/plugin_service.h" +#endif + namespace extensions { class ExtensionGarbageCollectorUnitTest : public ExtensionServiceTestBase {
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index d6b001f..bd72bc3 100644 --- a/chrome/browser/extensions/extension_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -105,7 +105,6 @@ #include "content/public/browser/dom_storage_context.h" #include "content/public/browser/gpu_data_manager.h" #include "content/public/browser/notification_service.h" -#include "content/public/browser/plugin_service.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/storage_partition.h" #include "content/public/common/content_constants.h" @@ -170,6 +169,10 @@ #include "url/gurl.h" #include "url/origin.h" +#if BUILDFLAG(ENABLE_PLUGINS) +#include "content/public/browser/plugin_service.h" +#endif + // The blocklist tests rely on the safe-browsing database. #if BUILDFLAG(SAFE_BROWSING_DB_LOCAL) #define ENABLE_BLOCKLIST_TESTS @@ -178,7 +181,6 @@ using content::BrowserContext; using content::BrowserThread; using content::DOMStorageContext; -using content::PluginService; using extensions::mojom::APIPermissionID; using extensions::mojom::ManifestLocation; @@ -732,7 +734,7 @@ void InitPluginService() { #if BUILDFLAG(ENABLE_PLUGINS) - PluginService::GetInstance()->Init(); + content::PluginService::GetInstance()->Init(); #endif } @@ -7864,6 +7866,7 @@ EXPECT_FALSE(prefs->IsExtensionDisabled(good_crx)); } +#if BUILDFLAG(ENABLE_PLUGINS) // Regression test for crbug.com/460699. Ensure PluginManager doesn't crash even // if OnExtensionUnloaded is invoked twice in succession. TEST_F(ExtensionServiceTest, PluginManagerCrash) { @@ -7880,6 +7883,7 @@ // redundantly for a disabled extension. service()->BlockAllExtensions(); } +#endif // BUILDFLAG(ENABLE_PLUGINS) class ExternalExtensionPriorityTest : public ExtensionServiceTest,
diff --git a/chrome/browser/external_protocol/external_protocol_handler.cc b/chrome/browser/external_protocol/external_protocol_handler.cc index cc9106a..cee19d84 100644 --- a/chrome/browser/external_protocol/external_protocol_handler.cc +++ b/chrome/browser/external_protocol/external_protocol_handler.cc
@@ -32,9 +32,12 @@ #include "url/gurl.h" #include "url/origin.h" -#if !defined(OS_ANDROID) +#if !defined(OS_ANDROID) && !defined(OS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) #include "chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h" #include "chrome/browser/sharing/click_to_call/click_to_call_utils.h" +#endif + +#if !defined(OS_ANDROID) #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -194,7 +197,7 @@ bool chrome_is_default_handler = state == shell_integration::IS_DEFAULT; // On ChromeOS, Click to Call is integrated into the external protocol dialog. -#if !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) +#if !defined(OS_ANDROID) && !defined(OS_FUCHSIA) && !BUILDFLAG(IS_CHROMEOS_ASH) if (web_contents && ShouldOfferClickToCallForURL( web_contents->GetBrowserContext(), escaped_url)) { // Handle tel links by opening the Click to Call dialog. This will call back
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 14de9fe3..bc95cba 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -1620,6 +1620,11 @@ "expiry_milestone": 95 }, { + "name": "enable-cros-ime-stylus-handwriting", + "owners": ["jopalmer", "essential-inputs-team@google.com"], + "expiry_milestone" : 100 + }, + { "name": "enable-cros-ime-system-emoji-picker", "owners": [ "jopalmer", "essential-inputs-team@google.com" ], "expiry_milestone": 95
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index ee55be6..8652744 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -4934,6 +4934,9 @@ const char kImeSystemEmojiPickerClipboardDescription[] = "Emoji picker will insert emoji into clipboard if they can't be inserted " "into a text field"; +const char kImeStylusHandwritingName[] = "Stylus Handwriting"; +const char kImeStylusHandwritingDescription[] = + "Enable VK UI for stylus in text fields"; const char kCrosLanguageSettingsImeOptionsInSettingsName[] = "Ime settings in settings";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index caa1e810..a433131 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -2844,6 +2844,9 @@ extern const char kImeSystemEmojiPickerClipboardName[]; extern const char kImeSystemEmojiPickerClipboardDescription[]; +extern const char kImeStylusHandwritingName[]; +extern const char kImeStylusHandwritingDescription[]; + extern const char kIntentHandlingSharingName[]; extern const char kIntentHandlingSharingDescription[];
diff --git a/chrome/browser/lacros/account_manager/OWNERS b/chrome/browser/lacros/account_manager/OWNERS new file mode 100644 index 0000000..6e39354e --- /dev/null +++ b/chrome/browser/lacros/account_manager/OWNERS
@@ -0,0 +1 @@ +file://components/account_manager_core/OWNERS
diff --git a/chrome/browser/lacros/account_manager_facade_factory_lacros.cc b/chrome/browser/lacros/account_manager/account_manager_facade_factory_lacros.cc similarity index 100% rename from chrome/browser/lacros/account_manager_facade_factory_lacros.cc rename to chrome/browser/lacros/account_manager/account_manager_facade_factory_lacros.cc
diff --git a/chrome/browser/lacros/account_manager_util.cc b/chrome/browser/lacros/account_manager/account_manager_util.cc similarity index 88% rename from chrome/browser/lacros/account_manager_util.cc rename to chrome/browser/lacros/account_manager/account_manager_util.cc index 8b01c8b2..ce06549b 100644 --- a/chrome/browser/lacros/account_manager_util.cc +++ b/chrome/browser/lacros/account_manager/account_manager_util.cc
@@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/lacros/account_manager_util.h" +#include "chrome/browser/lacros/account_manager/account_manager_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profiles_state.h" #include "chromeos/crosapi/mojom/crosapi.mojom.h" #include "chromeos/lacros/lacros_service.h" -bool IsAccountManagerAvailable(const Profile* const profile) { +bool IsAccountManagerAvailable(const Profile* profile) { const crosapi::mojom::BrowserInitParams* init_params = chromeos::LacrosService::Get()->init_params(); if (!init_params->use_new_account_manager)
diff --git a/chrome/browser/lacros/account_manager/account_manager_util.h b/chrome/browser/lacros/account_manager/account_manager_util.h new file mode 100644 index 0000000..8decc6c --- /dev/null +++ b/chrome/browser/lacros/account_manager/account_manager_util.h
@@ -0,0 +1,12 @@ +// Copyright 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_LACROS_ACCOUNT_MANAGER_ACCOUNT_MANAGER_UTIL_H_ +#define CHROME_BROWSER_LACROS_ACCOUNT_MANAGER_ACCOUNT_MANAGER_UTIL_H_ + +class Profile; + +bool IsAccountManagerAvailable(const Profile* profile); + +#endif // CHROME_BROWSER_LACROS_ACCOUNT_MANAGER_ACCOUNT_MANAGER_UTIL_H_
diff --git a/chrome/browser/lacros/account_manager_util.h b/chrome/browser/lacros/account_manager_util.h deleted file mode 100644 index b81f552..0000000 --- a/chrome/browser/lacros/account_manager_util.h +++ /dev/null
@@ -1,12 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_LACROS_ACCOUNT_MANAGER_UTIL_H_ -#define CHROME_BROWSER_LACROS_ACCOUNT_MANAGER_UTIL_H_ - -class Profile; - -bool IsAccountManagerAvailable(const Profile* const profile); - -#endif // CHROME_BROWSER_LACROS_ACCOUNT_MANAGER_UTIL_H_
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc index 10eba8b..bf147b1 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -437,8 +437,11 @@ if (base::FeatureList::IsEnabled( features::kDesktopPWAsNotificationIconAndTitle)) { web_app_icon_and_title = FindWebAppIconAndTitle(web_app_hint_url); - if (web_app_icon_and_title) { + if (web_app_icon_and_title && notification_resources.badge.isNull()) { #if BUILDFLAG(IS_CHROMEOS_ASH) + // ChromeOS: Enables web app theme color only if monochrome web app icon + // has been specified. `badge` Notifications API icons must be masked with + // the accent color. optional_fields.ignore_accent_color_for_small_image = true; #endif // BUILDFLAG(IS_CHROMEOS_ASH) }
diff --git a/chrome/browser/permissions/chrome_permission_request_manager_unittest.cc b/chrome/browser/permissions/chrome_permission_request_manager_unittest.cc index e82cc31..0ad3735 100644 --- a/chrome/browser/permissions/chrome_permission_request_manager_unittest.cc +++ b/chrome/browser/permissions/chrome_permission_request_manager_unittest.cc
@@ -321,7 +321,7 @@ "true"}, {QuietNotificationPermissionUiConfig::kEnableAdaptiveActivationDryRun, "true"}}}}, - {}); + {features::kPermissionPredictions}); ASSERT_TRUE( QuietNotificationPermissionUiConfig::IsAdaptiveActivationDryRunEnabled()); @@ -403,7 +403,7 @@ {QuietNotificationPermissionUiConfig:: kAdaptiveActivationActionWindowSizeInDays, "7"}}}}, - {}); + {features::kPermissionPredictions}); ASSERT_EQ( base::TimeDelta::FromDays(7), @@ -447,7 +447,8 @@ {{features::kQuietNotificationPrompts, {{QuietNotificationPermissionUiConfig::kEnableAdaptiveActivation, "true"}}}}, - {permissions::features::kBlockRepeatedNotificationPermissionPrompts}); + {permissions::features::kBlockRepeatedNotificationPermissionPrompts, + features::kPermissionPredictions}); EXPECT_FALSE(profile()->GetPrefs()->GetBoolean( prefs::kEnableQuietNotificationPermissionUi));
diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc index 162dc6a..49a80683 100644 --- a/chrome/browser/printing/print_view_manager.cc +++ b/chrome/browser/printing/print_view_manager.cc
@@ -191,16 +191,37 @@ print_preview_rfh_ = nullptr; } -bool PrintViewManager::RejectPrintPreviewRequestIfRestricted( - content::RenderFrameHost* rfh) { - if (!IsPrintingRestricted()) - return false; +void PrintViewManager::RejectPrintPreviewRequestIfRestricted( + base::OnceClosure on_print_preview_allowed_cb, + base::OnceClosure on_print_preview_rejected_cb) { + if (IsPrintingRestricted()) { +#if BUILDFLAG(IS_CHROMEOS_ASH) + policy::ShowDlpPrintDisabledNotification(); +#else + NOTREACHED(); +#endif + std::move(on_print_preview_rejected_cb).Run(); + } else if (ShouldWarnBeforePrinting()) { +#if BUILDFLAG(IS_CHROMEOS_ASH) + policy::ShowDlpPrintWarningDialog(std::move(on_print_preview_allowed_cb), + std::move(on_print_preview_rejected_cb)); +#else + NOTREACHED(); +#endif + } else { + std::move(on_print_preview_allowed_cb).Run(); + } +} + +void PrintViewManager::OnPrintPreviewRequestRejected(int render_process_id, + int render_frame_id) { + auto* rfh = + content::RenderFrameHost::FromID(render_process_id, render_frame_id); + if (!rfh) { + return; + } GetPrintRenderFrame(rfh)->OnPrintPreviewDialogClosed(); PrintPreviewDone(); -#if BUILDFLAG(IS_CHROMEOS_ASH) - policy::ShowDlpPrintDisabledNotification(); -#endif - return true; } void PrintViewManager::RenderFrameCreated( @@ -279,10 +300,31 @@ return; } - if (RejectPrintPreviewRequestIfRestricted(rfh)) { - std::move(callback).Run(); + // The |callback| should be called whether the request is rejected or not, so + // passing it in both cases. + auto split = base::SplitOnceCallback(std::move(callback)); + RejectPrintPreviewRequestIfRestricted( + base::BindOnce(&PrintViewManager::OnScriptedPrintPreviewAllowed, + weak_factory_.GetWeakPtr(), std::move(split.first), + rph->GetID(), rfh->GetRoutingID()), + base::BindOnce(&PrintViewManager::OnPrintPreviewRequestRejected, + weak_factory_.GetWeakPtr(), rph->GetID(), + rfh->GetRoutingID()) + .Then(std::move(split.second))); +} + +void PrintViewManager::OnScriptedPrintPreviewAllowed( + SetupScriptedPrintPreviewCallback callback, + int render_process_id, + int render_frame_id) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + auto* rfh = + content::RenderFrameHost::FromID(render_process_id, render_frame_id); + auto* rph = content::RenderProcessHost::FromID(render_process_id); + if (!rfh || !rph) { return; } + auto& map = g_scripted_print_preview_closure_map.Get(); DCHECK(!print_preview_rfh_); print_preview_rfh_ = rfh; @@ -327,9 +369,28 @@ void PrintViewManager::RequestPrintPreview( mojom::RequestPrintPreviewParamsPtr params) { content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame(); - if (RejectPrintPreviewRequestIfRestricted(render_frame_host)) - return; + content::RenderProcessHost* render_process_host = + render_frame_host->GetProcess(); + RejectPrintPreviewRequestIfRestricted( + base::BindOnce(&PrintViewManager::OnRequestPrintPreviewAllowed, + weak_factory_.GetWeakPtr(), std::move(params), + render_process_host->GetID(), + render_frame_host->GetRoutingID()), + base::BindOnce(&PrintViewManager::OnPrintPreviewRequestRejected, + weak_factory_.GetWeakPtr(), render_process_host->GetID(), + render_frame_host->GetRoutingID())); +} + +void PrintViewManager::OnRequestPrintPreviewAllowed( + mojom::RequestPrintPreviewParamsPtr params, + int render_process_id, + int render_frame_id) { + auto* render_frame_host = + content::RenderFrameHost::FromID(render_process_id, render_frame_id); + if (!render_frame_host) { + return; + } if (params->webnode_only) { PrintPreviewForWebNode(render_frame_host); } @@ -367,6 +428,15 @@ #endif } +bool PrintViewManager::ShouldWarnBeforePrinting() const { +#if BUILDFLAG(IS_CHROMEOS_ASH) + return policy::DlpContentManager::Get()->ShouldWarnBeforePrinting( + web_contents()); +#else + return false; +#endif +} + WEB_CONTENTS_USER_DATA_KEY_IMPL(PrintViewManager) } // namespace printing
diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h index b5cba8a..89635985 100644 --- a/chrome/browser/printing/print_view_manager.h +++ b/chrome/browser/printing/print_view_manager.h
@@ -98,14 +98,42 @@ void OnScriptedPrintPreviewReply(SetupScriptedPrintPreviewCallback callback); + // Helper method for SetupScriptedPrintPreview(). To be called after + // RejectPrintPreviewRequestIfRestricted(), in case the request is not + // rejected. + void OnScriptedPrintPreviewAllowed(SetupScriptedPrintPreviewCallback callback, + int render_process_id, + int render_frame_id); + + // Helper method for RequestPrintPreview(). To be called after + // RejectPrintPreviewRequestIfRestricted(), in case the request is not + // rejected. + void OnRequestPrintPreviewAllowed(mojom::RequestPrintPreviewParamsPtr params, + int render_process_id, + int render_frame_id); + void MaybeUnblockScriptedPreviewRPH(); // Checks whether printing is restricted due to Data Leak Protection rules. bool IsPrintingRestricted() const; + // Checks whether printing is not advised due to Data Leak Protection rules. + bool ShouldWarnBeforePrinting() const; + // Checks whether printing is currently restricted and aborts print preview if - // needed. - bool RejectPrintPreviewRequestIfRestricted(content::RenderFrameHost* rfh); + // needed. There are cases when this check is performed asynchronously, so in + // order to continue or abort the print preview, one of + // |on_print_preview_allowed_cb| or |on_print_preview_rejected_cb| will be + // invoked. + void RejectPrintPreviewRequestIfRestricted( + base::OnceClosure on_print_preview_allowed_cb, + base::OnceClosure on_print_preview_rejected_cb); + + // Helper method for RejectPrintPreviewRequestIfRestricted(). Handles any + // tasks that need to be done when the request is rejected due to + // restrictions. + void OnPrintPreviewRequestRejected(int render_process_id, + int render_frame_id); base::OnceClosure on_print_dialog_shown_callback_;
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 46c6cdc..886e388 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc
@@ -179,7 +179,7 @@ #include "chrome/browser/ash/login/session/user_session_manager.h" #include "chrome/browser/ash/policy/active_directory/active_directory_policy_manager.h" #include "chrome/browser/ash/policy/core/user_cloud_policy_manager_ash.h" -#include "chrome/browser/ash/policy/core/user_policy_manager_builder_chromeos.h" +#include "chrome/browser/ash/policy/core/user_policy_manager_builder_ash.h" #include "chrome/browser/ash/profiles/profile_helper.h" #include "chrome/browser/ash/settings/device_settings_service.h" #include "chrome/browser/chromeos/locale_change_guard.h"
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc index 9855f1e..a1b52912 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -1388,7 +1388,9 @@ } } +#if !defined(OS_FUCHSIA) AppendClickToCallItem(); +#endif menu_model_.AddSeparator(ui::NORMAL_SEPARATOR); menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_SAVELINKAS, @@ -2000,7 +2002,9 @@ int items_before_sharing = menu_model_.GetItemCount(); bool starting_separator_added = items_before_sharing > items_initial; +#if !defined(OS_FUCHSIA) AppendClickToCallItem(); +#endif AppendSharedClipboardItem(); // Add an ending separator if there are sharing items, otherwise remove the @@ -2012,6 +2016,7 @@ menu_model_.RemoveItemAt(items_initial); } +#if !defined(OS_FUCHSIA) void RenderViewContextMenu::AppendClickToCallItem() { SharingClickToCallEntryPoint entry_point; absl::optional<std::string> phone_number; @@ -2038,6 +2043,7 @@ click_to_call_context_menu_observer_->BuildMenu(*phone_number, selection_text, entry_point); } +#endif // !defined(OS_FUCHSIA) void RenderViewContextMenu::AppendSharedClipboardItem() { if (!ShouldOfferSharedClipboard(browser_context_, params_.selection_text))
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.h b/chrome/browser/renderer_context_menu/render_view_context_menu.h index 7b6f191..15e5809a 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -208,7 +208,9 @@ void AppendPasswordItems(); void AppendPictureInPictureItem(); void AppendSharingItems(); +#if !defined(OS_FUCHSIA) void AppendClickToCallItem(); +#endif void AppendSharedClipboardItem(); void AppendLensRegionSearchItem(); void AppendQRCodeGeneratorItem(bool for_image, bool draw_icon);
diff --git a/chrome/browser/resources/chromeos/login/debug/debug.js b/chrome/browser/resources/chromeos/login/debug/debug.js index 4168c23d..a338cbe1 100644 --- a/chrome/browser/resources/chromeos/login/debug/debug.js +++ b/chrome/browser/resources/chromeos/login/debug/debug.js
@@ -597,12 +597,12 @@ }, }, { - // Retry after incorrect password attempt, user name is already known. - id: 'offline-gaia-user', + // Password and email mismatch error message. + id: 'offline-login-password-mismatch', trigger: (screen) => { - screen.loadParams({ - email: 'someone@example.com', - }); + screen.setEmailForTest('someuser@gmail.com'); + screen.proceedToPasswordPage(); + screen.showPasswordMismatchMessage(); }, }, ],
diff --git a/chrome/browser/resources/chromeos/login/saml_confirm_password.js b/chrome/browser/resources/chromeos/login/saml_confirm_password.js index dbb266e..5690390d 100644 --- a/chrome/browser/resources/chromeos/login/saml_confirm_password.js +++ b/chrome/browser/resources/chromeos/login/saml_confirm_password.js
@@ -82,10 +82,7 @@ cr.ui.Oobe.showScreen({id: 'saml-confirm-password'}); }, - reset() { - if (this.$.cancelConfirmDlg.open) - this.$.cancelConfirmDlg.hideDialog(); - this.setUIStep(UIState.PASSWORD); + resetFields() { this.$.passwordInput.invalid = false; this.$.passwordInput.value = ''; if (this.isManualInput) { @@ -94,6 +91,14 @@ } }, + reset() { + if (this.$.cancelConfirmDlg.open) + this.$.cancelConfirmDlg.hideDialog(); + this.setUIStep(UIState.PASSWORD); + this.resetFields(); + }, + + onCancel_() { this.$.cancelConfirmDlg.showDialog(); }, @@ -124,10 +129,9 @@ return; } } - this.setUIStep(UIState.PROGRESS); this.callback_(this.$.passwordInput.value); - this.reset(); + this.resetFields(); }, onDialogOverlayClosed_() {
diff --git a/chrome/browser/resources/chromeos/login/screens/login/offline_login.js b/chrome/browser/resources/chromeos/login/screens/login/offline_login.js index 439752a..1458966 100644 --- a/chrome/browser/resources/chromeos/login/screens/login/offline_login.js +++ b/chrome/browser/resources/chromeos/login/screens/login/offline_login.js
@@ -7,13 +7,22 @@ const DEFAULT_EMAIL_DOMAIN = '@gmail.com'; const INPUT_EMAIL_PATTERN = '^[a-zA-Z0-9.!#$%&\'*+=?^_`{|}~-]+(@[^\\s@]+)?$'; +const LOGIN_SECTION = { + EMAIL: 'emailSection', + PASSWORD: 'passwordSection', +}; + Polymer({ is: 'offline-login-element', behaviors: [OobeI18nBehavior, OobeDialogHostBehavior, LoginScreenBehavior], EXTERNAL_API: [ - 'loadParams', 'reset', 'proceedToPasswordPage', 'showOnlineRequiredDialog' + 'loadParams', + 'reset', + 'proceedToPasswordPage', + 'showOnlineRequiredDialog', + 'showPasswordMismatchMessage', ], properties: { @@ -65,7 +74,7 @@ activeSection: { type: String, - value: 'emailSection', + value: LOGIN_SECTION.EMAIL, }, animationInProgress: Boolean, @@ -98,6 +107,8 @@ onBeforeShow() { cr.ui.login.invokePolymerMethod(this.$.dialog, 'onBeforeShow'); this.$.emailInput.pattern = INPUT_EMAIL_PATTERN; + if (!this.email_) + this.switchToEmailCard(false /* animated */); }, reset() { @@ -108,6 +119,7 @@ this.fullEmail_ = ''; this.$.emailInput.invalid = false; this.$.passwordInput.invalid = false; + this.activeSection = LOGIN_SECTION.EMAIL; }, /** @@ -119,7 +131,6 @@ this.manager = params['enterpriseDomainManager']; if ('emailDomain' in params) this.emailDomain = '@' + params['emailDomain']; - this.setEmail(params.email); }, proceedToPasswordPage() { @@ -149,27 +160,12 @@ this.disabled = false; }, - /** - * @param {string} email - */ - setEmail(email) { - if (email) { - if (this.emailDomain) - email = email.replace(this.emailDomain, ''); - this.switchToPasswordCard(email, false /* animated */); - this.$.passwordInput.invalid = true; - } else { - this.email_ = ''; - this.switchToEmailCard(false /* animated */); - } - }, - isRTL_() { return !!document.querySelector('html[dir=rtl]'); }, isEmailSectionActive_() { - return this.activeSection == 'emailSection'; + return this.activeSection == LOGIN_SECTION.EMAIL; }, /** @@ -183,7 +179,7 @@ return; this.animationInProgress = animated; - this.activeSection = 'emailSection'; + this.activeSection = LOGIN_SECTION.EMAIL; }, /** @@ -204,7 +200,7 @@ return; this.animationInProgress = animated; - this.activeSection = 'passwordSection'; + this.activeSection = LOGIN_SECTION.PASSWORD; }, onSlideAnimationEnd_() { @@ -244,10 +240,25 @@ this.onPasswordSubmitted_(); }, + /** + * @param {string} domain + * @param {string} email + */ computeDomain_(domain, email) { if (email && email.indexOf('@') !== -1) return ''; return domain; }, + + showPasswordMismatchMessage() { + this.$.passwordInput.invalid = true; + }, + + /** + * @param {string} email + */ + setEmailForTest(email) { + this.email_ = email; + }, }); })();
diff --git a/chrome/browser/resources/print_preview/BUILD.gn b/chrome/browser/resources/print_preview/BUILD.gn index b5856b0..93028a4 100644 --- a/chrome/browser/resources/print_preview/BUILD.gn +++ b/chrome/browser/resources/print_preview/BUILD.gn
@@ -94,7 +94,6 @@ "data/coordinate2d.js", "data/destination.js", "data/destination_match.js", - "data/destination_policies.js", "data/destination_store.js", "data/document_info.js", "data/local_parsers.js", @@ -327,7 +326,6 @@ js_library("native_layer_cros") { deps = [ - "data:destination_policies", "data:printer_status_cros", "//ui/webui/resources/js:assert.m", "//ui/webui/resources/js:cr.m",
diff --git a/chrome/browser/resources/print_preview/data/BUILD.gn b/chrome/browser/resources/print_preview/data/BUILD.gn index 043e69a..a0c4311 100644 --- a/chrome/browser/resources/print_preview/data/BUILD.gn +++ b/chrome/browser/resources/print_preview/data/BUILD.gn
@@ -14,7 +14,6 @@ ":coordinate2d", ":destination", ":destination_match", - ":destination_policies", ":destination_store", ":document_info", ":local_parsers", @@ -37,9 +36,6 @@ js_library("cdd") { } -js_library("destination_policies") { -} - js_library("destination_store") { deps = [ ":cdd", @@ -72,7 +68,6 @@ deps = [ ":destination", ":destination_match", - ":destination_policies", "..:native_layer", "//ui/webui/resources/js:cr.m", ] @@ -100,10 +95,7 @@ ] if (is_chromeos) { - deps += [ - ":destination_policies", - "..:native_layer_cros", - ] + deps += [ "..:native_layer_cros" ] } }
diff --git a/chrome/browser/resources/print_preview/data/destination.js b/chrome/browser/resources/print_preview/data/destination.js index 455c359..18d1ba97 100644 --- a/chrome/browser/resources/print_preview/data/destination.js +++ b/chrome/browser/resources/print_preview/data/destination.js
@@ -12,7 +12,6 @@ import {NativeLayerCrosImpl} from '../native_layer_cros.js'; import {Cdd} from './cdd.js'; -import {ColorModeRestriction, DestinationPolicies, DuplexModeRestriction, PinModeRestriction} from './destination_policies.js'; import {getStatusReasonFromPrinterStatus, PrinterStatus, PrinterStatusReason} from './printer_status_cros.js'; // </if> @@ -185,7 +184,6 @@ * description: (string|undefined), * certificateStatus: * (DestinationCertificateStatus|undefined), - * policies: (DestinationPolicies|undefined), * }=} opt_params Optional * parameters for the destination. */ @@ -227,12 +225,6 @@ this.capabilities_ = null; /** - * Policies affecting the destination. - * @private {?DestinationPolicies} - */ - this.policies_ = (opt_params && opt_params.policies) || null; - - /** * Whether the destination is owned by the user. * @private {boolean} */ @@ -499,21 +491,6 @@ } // <if expr="chromeos or lacros"> - /** - * @return {?DestinationPolicies} Print policies affecting the destination. - */ - get policies() { - return this.policies_; - } - - /** - * @param {?DestinationPolicies} policies Print policies affecting the - * destination. - */ - set policies(policies) { - this.policies_ = policies; - } - /** @return {string} The EULA URL for a the destination */ get eulaUrl() { return this.eulaUrl_; @@ -808,37 +785,6 @@ null; } - // <if expr="chromeos or lacros"> - /** - * @return {?ColorModeRestriction} Color mode set by policy. - */ - get colorPolicy() { - return this.policies && this.policies.allowedColorModes ? - this.policies.allowedColorModes : - null; - } - - /** - * @return {?DuplexModeRestriction} Duplex modes allowed by - * policy. - */ - get duplexPolicy() { - return this.policies && this.policies.allowedDuplexModes ? - this.policies.allowedDuplexModes : - null; - } - - /** - * @return {?PinModeRestriction} Pin mode allowed by policy. - */ - get pinPolicy() { - return this.policies && this.policies.allowedPinModes ? - this.policies.allowedPinModes : - null; - } - - // </if> - /** @return {boolean} Whether the printer supports copies. */ get hasCopiesCapability() { const capability = this.copiesCapability_(); @@ -868,32 +814,6 @@ return hasColor && hasMonochrome; } - // <if expr="chromeos or lacros"> - /** - * @return {?ColorModeRestriction} Value of default color - * setting given by policy. - */ - get defaultColorPolicy() { - return this.policies && this.policies.defaultColorMode; - } - - /** - * @return {?DuplexModeRestriction} Value of default duplex - * setting given by policy. - */ - get defaultDuplexPolicy() { - return this.policies && this.policies.defaultDuplexMode; - } - - /** - * @return {?PinModeRestriction} Value of default pin setting - * given by policy. - */ - get defaultPinPolicy() { - return this.policies && this.policies.defaultPinMode; - } - // </if> - /** * @param {boolean} isColor Whether to use a color printing mode. * @return {Object} Selected color option.
diff --git a/chrome/browser/resources/print_preview/data/destination_policies.js b/chrome/browser/resources/print_preview/data/destination_policies.js deleted file mode 100644 index b2af7481..0000000 --- a/chrome/browser/resources/print_preview/data/destination_policies.js +++ /dev/null
@@ -1,54 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -/** - * Enumeration of color mode restrictions used by Chromium. - * This has to coincide with |printing::ColorModeRestriction| as defined in - * printing/backend/printing_restrictions.h - * @enum {number} - */ -export const ColorModeRestriction = { - UNSET: 0x0, - MONOCHROME: 0x1, - COLOR: 0x2, -}; - -/** - * Enumeration of duplex mode restrictions used by Chromium. - * This has to coincide with |printing::DuplexModeRestriction| as defined in - * printing/backend/printing_restrictions.h - * @enum {number} - */ -export const DuplexModeRestriction = { - UNSET: 0x0, - SIMPLEX: 0x1, - LONG_EDGE: 0x2, - SHORT_EDGE: 0x4, - DUPLEX: 0x6, -}; - -/** - * Enumeration of PIN printing mode restrictions used by Chromium. - * This has to coincide with |printing::PinModeRestriction| as defined in - * printing/backend/printing_restrictions.h - * @enum {number} - */ -export const PinModeRestriction = { - UNSET: 0, - PIN: 1, - NO_PIN: 2, -}; - -/** - * Policies affecting a destination. - * @typedef {{ - * allowedColorModes: ?ColorModeRestriction, - * allowedDuplexModes: ?DuplexModeRestriction, - * allowedPinMode: ?PinModeRestriction, - * defaultColorMode: ?ColorModeRestriction, - * defaultDuplexMode: ?DuplexModeRestriction, - * defaultPinMode: ?PinModeRestriction, - * }} - */ -export let DestinationPolicies;
diff --git a/chrome/browser/resources/print_preview/data/destination_store.js b/chrome/browser/resources/print_preview/data/destination_store.js index 0e556de..af9e131 100644 --- a/chrome/browser/resources/print_preview/data/destination_store.js +++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -1099,9 +1099,6 @@ parseDestination(originToType(origin), assert(settingsInfo.printer))); } if (dest) { - if (settingsInfo.printer && settingsInfo.printer.policies) { - dest.policies = settingsInfo.printer.policies; - } if ((origin === DestinationOrigin.LOCAL || origin === DestinationOrigin.CROS) && dest.capabilities) {
diff --git a/chrome/browser/resources/print_preview/data/local_parsers.js b/chrome/browser/resources/print_preview/data/local_parsers.js index e2b48f12..81193b74 100644 --- a/chrome/browser/resources/print_preview/data/local_parsers.js +++ b/chrome/browser/resources/print_preview/data/local_parsers.js
@@ -7,9 +7,6 @@ import {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationProvisionalType, DestinationType} from './destination.js'; import {PrinterType} from './destination_match.js'; -// <if expr="chromeos or lacros"> -import {DestinationPolicies} from './destination_policies.js'; -// </if> /** * @typedef {{ @@ -18,7 +15,6 @@ * printerDescription: (string | undefined), * cupsEnterprisePrinter: (boolean | undefined), * printerOptions: (Object | undefined), - * policies: (DestinationPolicies | undefined), * }} */ export let LocalDestinationInfo; @@ -81,7 +77,6 @@ const options = { description: destinationInfo.printerDescription, isEnterprisePrinter: destinationInfo.cupsEnterprisePrinter, - policies: destinationInfo.policies, }; if (destinationInfo.printerOptions) { // Convert options into cloud print tags format.
diff --git a/chrome/browser/resources/print_preview/data/model.js b/chrome/browser/resources/print_preview/data/model.js index 2665b8a..0241f5f2 100644 --- a/chrome/browser/resources/print_preview/data/model.js +++ b/chrome/browser/resources/print_preview/data/model.js
@@ -8,13 +8,10 @@ import {PromiseResolver} from 'chrome://resources/js/promise_resolver.m.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {BackgroundGraphicsModeRestriction, Policies} from '../native_layer.js'; +import {BackgroundGraphicsModeRestriction, ColorModeRestriction, DuplexModeRestriction, PinModeRestriction, Policies} from '../native_layer.js'; import {Cdd, CddCapabilities, VendorCapability} from './cdd.js'; import {Destination, DestinationOrigin, DestinationType, RecentDestination} from './destination.js'; import {getPrinterTypeForDestination, PrinterType} from './destination_match.js'; -// <if expr="chromeos or lacros"> -import {ColorModeRestriction, DuplexModeRestriction, PinModeRestriction} from './destination_policies.js'; -// </if> import {DocumentSettings} from './document_info.js'; import {CustomMarginsOrientation, Margins, MarginsSetting, MarginsType} from './margins.js'; import {ScalingType} from './scaling.js'; @@ -112,6 +109,9 @@ * cssBackground: (PolicyEntry | undefined), * mediaSize: (PolicyEntry | undefined), * sheets: (number | undefined), + * color: (PolicyEntry | undefined), + * duplex: (PolicyEntry | undefined), + * pin: (PolicyEntry | undefined), * }} */ export let PolicySettings; @@ -1108,6 +1108,33 @@ } break; } + case 'color': { + const value = allowedMode ? allowedMode : defaultMode; + if (value !== undefined) { + this.setPolicySetting_( + settingName, value, !!allowedMode, + /*applyOnDestinationUpdate=*/ false); + } + break; + } + case 'duplex': { + const value = allowedMode ? allowedMode : defaultMode; + if (value !== undefined) { + this.setPolicySetting_( + settingName, value, !!allowedMode, + /*applyOnDestinationUpdate=*/ false); + } + break; + } + case 'pin': { + const value = allowedMode ? allowedMode : defaultMode; + if (value !== undefined) { + this.setPolicySetting_( + settingName, value, !!allowedMode, + /*applyOnDestinationUpdate=*/ false); + } + break; + } default: break; } @@ -1140,6 +1167,14 @@ applyOnDestinationUpdate: false }; } + ['color', 'duplex', 'pin'].forEach(settingName => { + if (!policies[settingName]) { + return; + } + const defaultMode = policies[settingName].defaultMode; + const allowedMode = policies[settingName].allowedMode; + this.configurePolicySetting_(settingName, allowedMode, defaultMode); + }); // </if> } @@ -1202,6 +1237,42 @@ this.maxSheets = this.policySettings_['sheets'].value; continue; } + if (settingName === 'color') { + this.set( + 'settings.color.value', + policy.value === ColorModeRestriction.COLOR); + this.set('settings.color.setByPolicy', policy.managed); + continue; + } + if (settingName === 'duplex') { + let setDuplexTypeByPolicy = false; + this.set( + 'settings.duplex.value', + policy.value !== DuplexModeRestriction.SIMPLEX); + if (policy.value === DuplexModeRestriction.SHORT_EDGE) { + this.set('settings.duplexShortEdge.value', true); + setDuplexTypeByPolicy = true; + } else if (policy.value === DuplexModeRestriction.LONG_EDGE) { + this.set('settings.duplexShortEdge.value', false); + setDuplexTypeByPolicy = true; + } + this.set('settings.duplex.setByPolicy', policy.managed); + this.set( + 'settings.duplexShortEdge.setByPolicy', + policy.managed && setDuplexTypeByPolicy); + continue; + } + if (settingName === 'pin') { + if (policy.value === PinModeRestriction.NO_PIN && policy.managed) { + this.set('settings.pin.available', false); + this.set('settings.pinValue.available', false); + } else { + this.set( + 'settings.pin.value', policy.value === PinModeRestriction.PIN); + } + this.set('settings.pin.setByPolicy', policy.managed); + continue; + } // </if> if (policy.value !== undefined && !policy.applyOnDestinationUpdate) { this.setSetting(settingName, policy.value, true); @@ -1213,58 +1284,11 @@ } } - // TODO (crbug.com/1069802): Migrate these policies from Destination.policies - // to NativeInitialSettings.policies. /** * Restricts settings and applies defaults as defined by policy applicable to * current destination. */ applyDestinationSpecificPolicies() { - // <if expr="chromeos or lacros"> - const colorPolicy = this.destination.colorPolicy; - const colorValue = - colorPolicy ? colorPolicy : this.destination.defaultColorPolicy; - if (colorValue) { - // |this.setSetting| does nothing if policy is present. - // We want to set the value nevertheless so we call |this.set| directly. - this.set( - 'settings.color.value', colorValue === ColorModeRestriction.COLOR); - } - this.set('settings.color.setByPolicy', !!colorPolicy); - - const duplexPolicy = this.destination.duplexPolicy; - const duplexValue = - duplexPolicy ? duplexPolicy : this.destination.defaultDuplexPolicy; - let setDuplexTypeByPolicy = false; - if (duplexValue) { - this.set( - 'settings.duplex.value', - duplexValue !== DuplexModeRestriction.SIMPLEX); - if (duplexValue === DuplexModeRestriction.SHORT_EDGE) { - this.set('settings.duplexShortEdge.value', true); - setDuplexTypeByPolicy = true; - } else if (duplexValue === DuplexModeRestriction.LONG_EDGE) { - this.set('settings.duplexShortEdge.value', false); - setDuplexTypeByPolicy = true; - } - } - this.set('settings.duplex.setByPolicy', !!duplexPolicy); - this.set( - 'settings.duplexShortEdge.setByPolicy', - !!duplexPolicy && setDuplexTypeByPolicy); - - const pinPolicy = this.destination.pinPolicy; - if (pinPolicy === PinModeRestriction.NO_PIN) { - this.set('settings.pin.available', false); - this.set('settings.pinValue.available', false); - } - const pinValue = pinPolicy ? pinPolicy : this.destination.defaultPinPolicy; - if (pinValue) { - this.set('settings.pin.value', pinValue === PinModeRestriction.PIN); - } - this.set('settings.pin.setByPolicy', !!pinPolicy); - // </if> - if (this.settings.mediaSize.available && this.policySettings_) { const mediaSizePolicy = this.policySettings_['mediaSize'] && this.policySettings_['mediaSize'].value;
diff --git a/chrome/browser/resources/print_preview/native_layer.js b/chrome/browser/resources/print_preview/native_layer.js index d954047..9c72fe6 100644 --- a/chrome/browser/resources/print_preview/native_layer.js +++ b/chrome/browser/resources/print_preview/native_layer.js
@@ -6,7 +6,6 @@ import {addSingletonGetter, sendWithPromise} from 'chrome://resources/js/cr.m.js'; import {Cdd} from './data/cdd.js'; -import {Destination} from './data/destination.js'; import {PrinterType} from './data/destination_match.js'; import {LocalDestinationInfo, PrivetPrinterDescription} from './data/local_parsers.js'; import {MeasurementSystemUnitType} from './data/measurement_system.js'; @@ -36,6 +35,44 @@ }; /** + * Enumeration of color mode restrictions used by Chromium. + * This has to coincide with |printing::ColorModeRestriction| as defined in + * printing/backend/printing_restrictions.h + * @enum {number} + */ +export const ColorModeRestriction = { + UNSET: 0x0, + MONOCHROME: 0x1, + COLOR: 0x2, +}; + +/** + * Enumeration of duplex mode restrictions used by Chromium. + * This has to coincide with |printing::DuplexModeRestriction| as defined in + * printing/backend/printing_restrictions.h + * @enum {number} + */ +export const DuplexModeRestriction = { + UNSET: 0x0, + SIMPLEX: 0x1, + LONG_EDGE: 0x2, + SHORT_EDGE: 0x4, + DUPLEX: 0x6, +}; + +/** + * Enumeration of PIN printing mode restrictions used by Chromium. + * This has to coincide with |printing::PinModeRestriction| as defined in + * printing/backend/printing_restrictions.h + * @enum {number} + */ +export const PinModeRestriction = { + UNSET: 0, + PIN: 1, + NO_PIN: 2, +}; + +/** * Policies affecting print settings values and availability. * @typedef {{ * headerFooter: ({ @@ -54,7 +91,19 @@ * } | undefined), * sheets: ({ * value: (number | undefined), - * } | undefined) + * } | undefined), + * color: ({ + * allowedMode: (ColorModeRestriction | undefined), + * defaultMode: (ColorModeRestriction | undefined), + * } | undefined), + * duplex: ({ + * allowedMode: (DuplexModeRestriction | undefined), + * defaultMode: (DuplexModeRestriction | undefined), + * } | undefined), + * pin: ({ + * allowedMode: (PinModeRestriction | undefined), + * defaultMode: (PinModeRestriction | undefined), + * } | undefined), * }} */ export let Policies;
diff --git a/chrome/browser/resources/print_preview/native_layer_cros.js b/chrome/browser/resources/print_preview/native_layer_cros.js index 7be456f..b85bcbfc 100644 --- a/chrome/browser/resources/print_preview/native_layer_cros.js +++ b/chrome/browser/resources/print_preview/native_layer_cros.js
@@ -6,7 +6,6 @@ import {addSingletonGetter, sendWithPromise} from 'chrome://resources/js/cr.m.js'; import {Cdd} from './data/cdd.js'; -import {DestinationPolicies} from './data/destination_policies.js'; import {ProvisionalDestinationInfo} from './data/local_parsers.js'; import {PrinterStatus, PrinterStatusReason} from './data/printer_status_cros.js'; @@ -14,7 +13,6 @@ * @typedef {{ * printerId: string, * capabilities: !Cdd, - * policies: (DestinationPolicies | undefined), * }} */ export let PrinterSetupResponse;
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js index 1dfb37c..ca690bc 100644 --- a/chrome/browser/resources/print_preview/print_preview.js +++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -13,9 +13,6 @@ export {SAVE_TO_DRIVE_CROS_DESTINATION_KEY} from './data/destination.js'; // </if> export {PrinterType} from './data/destination_match.js'; -// <if expr="chromeos or lacros"> -export {ColorModeRestriction, DuplexModeRestriction, PinModeRestriction} from './data/destination_policies.js'; -// </if> export {DestinationErrorType, DestinationStore} from './data/destination_store.js'; export {PageLayoutInfo} from './data/document_info.js'; export {LocalDestinationInfo, ProvisionalDestinationInfo} from './data/local_parsers.js'; @@ -31,11 +28,13 @@ export {ScalingType} from './data/scaling.js'; export {Size} from './data/size.js'; export {Error, State} from './data/state.js'; -export {BackgroundGraphicsModeRestriction, CapabilitiesResponse, NativeInitialSettings, NativeLayer, NativeLayerImpl} from './native_layer.js'; +export {BackgroundGraphicsModeRestriction, CapabilitiesResponse, ColorModeRestriction, DuplexModeRestriction, NativeInitialSettings, NativeLayer, NativeLayerImpl, PinModeRestriction} from './native_layer.js'; // <if expr="chromeos or lacros"> export {NativeLayerCros, NativeLayerCrosImpl, PrinterSetupResponse, PrintServer, PrintServersConfig} from './native_layer_cros.js'; // </if> export {getSelectDropdownBackground} from './print_preview_utils.js'; +export {PrintPreviewAdvancedSettingsDialogElement} from './ui/advanced_settings_dialog.js'; +export {PrintPreviewAdvancedSettingsItemElement} from './ui/advanced_settings_item.js'; export {DEFAULT_MAX_COPIES} from './ui/copies_settings.js'; export {DestinationState, NUM_PERSISTED_DESTINATIONS} from './ui/destination_settings.js'; export {PDFPlugin, PluginProxy, PluginProxyImpl} from './ui/plugin_proxy.js';
diff --git a/chrome/browser/resources/print_preview/ui/advanced_options_settings.js b/chrome/browser/resources/print_preview/ui/advanced_options_settings.js index b2712c6..a3b4b38 100644 --- a/chrome/browser/resources/print_preview/ui/advanced_options_settings.js +++ b/chrome/browser/resources/print_preview/ui/advanced_options_settings.js
@@ -7,40 +7,52 @@ import './print_preview_shared_css.js'; import './settings_section.js'; -import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {Destination} from '../data/destination.js'; import {Settings} from '../data/model.js'; -Polymer({ - is: 'print-preview-advanced-options-settings', - _template: html`{__html_template__}`, +/** @polymer */ +class PrintPreviewAdvancedOptionsSettingsElement extends PolymerElement { + static get is() { + return 'print-preview-advanced-options-settings'; + } - properties: { - disabled: Boolean, + static get template() { + return html`{__html_template__}`; + } - /** @type {!Destination} */ - destination: Object, + static get properties() { + return { + disabled: Boolean, - /** @type {!Settings} */ - settings: Object, + /** @type {!Destination} */ + destination: Object, - /** @private {boolean} */ - showAdvancedDialog_: { - type: Boolean, - value: false, - }, - }, + /** @type {!Settings} */ + settings: Object, + + /** @private {boolean} */ + showAdvancedDialog_: { + type: Boolean, + value: false, + }, + }; + } /** @private */ onButtonClick_() { this.showAdvancedDialog_ = true; - }, + } /** @private */ onDialogClose_() { this.showAdvancedDialog_ = false; this.$.button.focus(); - }, -}); + } +} + +customElements.define( + PrintPreviewAdvancedOptionsSettingsElement.is, + PrintPreviewAdvancedOptionsSettingsElement);
diff --git a/chrome/browser/resources/print_preview/ui/advanced_settings_dialog.js b/chrome/browser/resources/print_preview/ui/advanced_settings_dialog.js index 143b894..56b82c9 100644 --- a/chrome/browser/resources/print_preview/ui/advanced_settings_dialog.js +++ b/chrome/browser/resources/print_preview/ui/advanced_settings_dialog.js
@@ -11,59 +11,84 @@ import './print_preview_vars_css.js'; import '../strings.m.js'; -import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js'; +import {I18nBehavior, I18nBehaviorInterface} from 'chrome://resources/js/i18n_behavior.m.js'; import {removeHighlights} from 'chrome://resources/js/search_highlight_utils.js'; -import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {Destination} from '../data/destination.js'; import {Metrics, MetricsContext} from '../metrics.js'; -import {SettingsBehavior} from './settings_behavior.js'; +import {SettingsBehavior, SettingsBehaviorInterface} from './settings_behavior.js'; -Polymer({ - is: 'print-preview-advanced-settings-dialog', +/** + * @constructor + * @extends {PolymerElement} + * @implements {I18nBehaviorInterface} + * @implements {SettingsBehaviorInterface} + */ +const PrintPreviewAdvancedSettingsDialogElementBase = + mixinBehaviors([SettingsBehavior, I18nBehavior], PolymerElement); - _template: html`{__html_template__}`, +/** @polymer */ +export class PrintPreviewAdvancedSettingsDialogElement extends + PrintPreviewAdvancedSettingsDialogElementBase { + static get is() { + return 'print-preview-advanced-settings-dialog'; + } - behaviors: [SettingsBehavior, I18nBehavior], + static get template() { + return html`{__html_template__}`; + } - properties: { - /** @type {!Destination} */ - destination: Object, + static get properties() { + return { + /** @type {!Destination} */ + destination: Object, - /** @private {?RegExp} */ - searchQuery_: { - type: Object, - value: null, - }, + /** @private {?RegExp} */ + searchQuery_: { + type: Object, + value: null, + }, - /** @private {boolean} */ - hasMatching_: { - type: Boolean, - notify: true, - computed: 'computeHasMatching_(searchQuery_)', - }, - }, + /** @private {boolean} */ + hasMatching_: { + type: Boolean, + notify: true, + computed: 'computeHasMatching_(searchQuery_)', + }, + }; + } - listeners: { - 'keydown': 'onKeydown_', - }, + constructor() { + super(); - /** @private {!Array<!Node>} */ - highlights_: [], + /** @private {!Array<!Node>} */ + this.highlights_ = []; - /** @private {!Map<!Node, number>} */ - bubbles_: new Map, + /** @private {!Map<!Node, number>} */ + this.bubbles_ = new Map(); - /** @private {!MetricsContext} */ - metrics_: MetricsContext.printSettingsUi(), + /** @private {!MetricsContext} */ + this.metrics_ = MetricsContext.printSettingsUi(); + } /** @override */ - attached() { + ready() { + super.ready(); + + this.addEventListener( + 'keydown', e => this.onKeydown_(/** @type {!KeyboardEvent} */ (e))); + } + + /** @override */ + connectedCallback() { + super.connectedCallback(); + this.metrics_.record( Metrics.PrintSettingsUiBucket.ADVANCED_SETTINGS_DIALOG_SHOWN); this.$.dialog.showModal(); - }, + } /** * @param {!KeyboardEvent} e Event containing the key @@ -89,7 +114,7 @@ e.preventDefault(); return; } - }, + } /** * @return {boolean} Whether there is more than one vendor item to display. @@ -97,7 +122,7 @@ */ hasMultipleItems_() { return this.destination.capabilities.printer.vendor_capability.length > 1; - }, + } /** * @return {boolean} Whether there is a setting matching the query. @@ -124,7 +149,7 @@ ...item.updateHighlighting(this.searchQuery_, this.bubbles_)); }); return hasMatch; - }, + } /** * @return {boolean} Whether the no matching settings hint should be shown. @@ -132,7 +157,7 @@ */ shouldShowHint_() { return !!this.searchQuery_ && !this.hasMatching_; - }, + } /** @private */ onCloseOrCancel_() { @@ -143,12 +168,12 @@ this.metrics_.record( Metrics.PrintSettingsUiBucket.ADVANCED_SETTINGS_DIALOG_CANCELED); } - }, + } /** @private */ onCancelButtonClick_() { this.$.dialog.cancel(); - }, + } /** @private */ onApplyButtonClick_() { @@ -159,11 +184,11 @@ }); this.setSetting('vendorItems', settingsValues); this.$.dialog.close(); - }, + } close() { this.$.dialog.close(); - }, + } /** * @return {string} @@ -171,5 +196,9 @@ */ isSearching_() { return this.searchQuery_ ? 'searching' : ''; - }, -}); + } +} + +customElements.define( + PrintPreviewAdvancedSettingsDialogElement.is, + PrintPreviewAdvancedSettingsDialogElement);
diff --git a/chrome/browser/resources/print_preview/ui/advanced_settings_item.js b/chrome/browser/resources/print_preview/ui/advanced_settings_item.js index 57756dd..05b7c9a0 100644 --- a/chrome/browser/resources/print_preview/ui/advanced_settings_item.js +++ b/chrome/browser/resources/print_preview/ui/advanced_settings_item.js
@@ -10,33 +10,50 @@ import 'chrome://resources/cr_elements/md_select_css.m.js'; import './print_preview_shared_css.js'; -import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {VendorCapability, VendorCapabilitySelectOption} from '../data/cdd.js'; import {Destination} from '../data/destination.js'; import {getStringForCurrentLocale} from '../print_preview_utils.js'; import {updateHighlights} from './highlight_utils.js'; -import {SettingsBehavior} from './settings_behavior.js'; +import {SettingsBehavior, SettingsBehaviorInterface} from './settings_behavior.js'; -Polymer({ - is: 'print-preview-advanced-settings-item', - _template: html`{__html_template__}`, +/** + * @constructor + * @extends {PolymerElement} + * @implements {SettingsBehaviorInterface} + */ +const PrintPreviewAdvancedSettingsItemElementBase = + mixinBehaviors([SettingsBehavior], PolymerElement); - behaviors: [SettingsBehavior], +/** @polymer */ +export class PrintPreviewAdvancedSettingsItemElement extends + PrintPreviewAdvancedSettingsItemElementBase { + static get is() { + return 'print-preview-advanced-settings-item'; + } - properties: { - /** @type {!VendorCapability} */ - capability: Object, + static get template() { + return html`{__html_template__}`; + } - /** @private {string} */ - currentValue_: String, - }, + static get properties() { + return { + /** @type {!VendorCapability} */ + capability: Object, - observers: [ - 'updateFromSettings_(capability, settings.vendorItems.value)', - ], + /** @private {string} */ + currentValue_: String, + }; + } + + static get observers() { + return [ + 'updateFromSettings_(capability, settings.vendorItems.value)', + ]; + } /** @private */ updateFromSettings_() { @@ -58,9 +75,9 @@ } } else { this.currentValue_ = value; - this.$$('cr-input').value = this.currentValue_; + this.shadowRoot.querySelector('cr-input').value = this.currentValue_; } - }, + } /** * @param {!VendorCapability | @@ -74,7 +91,7 @@ displayName = getStringForCurrentLocale(item.display_name_localized); } return displayName || ''; - }, + } /** * @return {boolean} Whether the capability represented by this item is @@ -83,7 +100,7 @@ */ isCapabilityTypeSelect_() { return this.capability.type === 'SELECT'; - }, + } /** * @return {boolean} Whether the capability represented by this item is @@ -93,7 +110,7 @@ isCapabilityTypeCheckbox_() { return this.capability.type === 'TYPED_VALUE' && this.capability.typed_value_cap.value_type === 'BOOLEAN'; - }, + } /** * @return {boolean} Whether the capability represented by this item is @@ -102,7 +119,7 @@ */ isCapabilityTypeInput_() { return !this.isCapabilityTypeSelect_() && !this.isCapabilityTypeCheckbox_(); - }, + } /** * @return {boolean} Whether the checkbox setting is checked. @@ -110,7 +127,7 @@ */ isChecked_() { return this.currentValue_ === 'true'; - }, + } /** * @param {!VendorCapabilitySelectOption} option The option @@ -122,7 +139,7 @@ return this.currentValue_ === undefined ? !!option.is_default : option.value === this.currentValue_; - }, + } /** * @return {string} The placeholder value for the capability's text input. @@ -139,7 +156,7 @@ return this.capability.range_cap.default.toString() || ''; } return ''; - }, + } /** * @return {boolean} @@ -150,7 +167,7 @@ !!this.capability.select_cap.option && this.capability.select_cap.option.some( option => option.value === value); - }, + } /** * @param {?RegExp} query The current search query. @@ -173,7 +190,7 @@ } } return false; - }, + } /** * @param {!Event} e Event containing the new value. @@ -181,7 +198,7 @@ */ onUserInput_(e) { this.currentValue_ = e.target.value; - }, + } /** * @param {!Event} e Event containing the new value. @@ -189,7 +206,7 @@ */ onCheckboxInput_(e) { this.currentValue_ = e.target.checked ? 'true' : 'false'; - }, + } /** * @return {string} The current value of the setting, or the empty string if @@ -197,7 +214,7 @@ */ getCurrentValue() { return this.currentValue_ || ''; - }, + } /** * Only used in tests. @@ -205,7 +222,7 @@ */ setCurrentValueForTest(value) { this.currentValue_ = value; - }, + } /** * @param {?RegExp} query The current search query. @@ -214,5 +231,9 @@ */ updateHighlighting(query, bubbles) { return updateHighlights(this, query, bubbles); - }, -}); + } +} + +customElements.define( + PrintPreviewAdvancedSettingsItemElement.is, + PrintPreviewAdvancedSettingsItemElement);
diff --git a/chrome/browser/resources/print_preview/ui/destination_dialog_cros.js b/chrome/browser/resources/print_preview/ui/destination_dialog_cros.js index a55ca93e..bb0f966a 100644 --- a/chrome/browser/resources/print_preview/ui/destination_dialog_cros.js +++ b/chrome/browser/resources/print_preview/ui/destination_dialog_cros.js
@@ -300,9 +300,6 @@ this.destinationInConfiguring_ = null; listItem.onConfigureComplete(true); destination.capabilities = response.capabilities; - if (response.policies) { - destination.policies = response.policies; - } this.selectDestination_(destination); // After destination is selected, start fetching for the EULA // URL.
diff --git a/chrome/browser/resources/print_preview/ui/settings_behavior.js b/chrome/browser/resources/print_preview/ui/settings_behavior.js index bbe8a79..f0a38cff7 100644 --- a/chrome/browser/resources/print_preview/ui/settings_behavior.js +++ b/chrome/browser/resources/print_preview/ui/settings_behavior.js
@@ -63,3 +63,53 @@ getInstance().setSettingValid(settingName, valid); }, }; + +/** @interface */ +export class SettingsBehaviorInterface { + constructor() { + /** @type {Settings} */ + this.settings; + } + + /** + * @param {string} settingName Name of the setting to get. + * @return {Setting} The setting object. + */ + getSetting(settingName) {} + + /** + * @param {string} settingName Name of the setting to get the value for. + * @return {*} The value of the setting, accounting for availability. + */ + getSettingValue(settingName) {} + + /** + * Sets settings.settingName.value to |value|, unless updating the setting is + * disallowed by enterprise policy. Fires preview-setting-changed and + * sticky-setting-changed events if the update impacts the preview or requires + * an update to sticky settings. + * @param {string} settingName Name of the setting to set + * @param {*} value The value to set the setting to. + * @param {boolean=} noSticky Whether to avoid stickying the setting. Defaults + * to false. + */ + setSetting(settingName, value, noSticky) {} + + /** + * @param {string} settingName Name of the setting to set + * @param {number} start + * @param {number} end + * @param {*} newValue The value to add (if any). + * @param {boolean=} noSticky Whether to avoid stickying the setting. Defaults + * to false. + */ + setSettingSplice(settingName, start, end, newValue, noSticky) {} + + /** + * Sets the validity of |settingName| to |valid|. If the validity is changed, + * fires a setting-valid-changed event. + * @param {string} settingName Name of the setting to set + * @param {boolean} valid Whether the setting value is currently valid. + */ + setSettingValid(settingName, valid) {} +}
diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn index d10716bf..55909d5 100644 --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn
@@ -122,13 +122,13 @@ "controls/settings_idle_load.js", "downloads_page/downloads_browser_proxy.js", "ensure_lazy_loaded.js", - "extension_control_browser_proxy.js", + "extension_control_browser_proxy.ts", "global_scroll_target_mixin.js", "hats_browser_proxy.js", "i18n_setup.ts", "incompatible_applications_page/incompatible_applications_browser_proxy.js", "lazy_load.ts", - "lifetime_browser_proxy.js", + "lifetime_browser_proxy.ts", "metrics_browser_proxy.js", "on_startup_page/on_startup_browser_proxy.js", "on_startup_page/startup_urls_page_browser_proxy.js", @@ -468,8 +468,10 @@ } js_library("extension_control_browser_proxy") { + sources = [ "$root_gen_dir/chrome/browser/resources/settings/tsc/extension_control_browser_proxy.js" ] deps = [ "//ui/webui/resources/js:cr.m" ] externs_list = [ "$externs_path/chrome_send.js" ] + extra_deps = [ ":build_ts" ] } js_library("i18n_setup") { @@ -522,7 +524,9 @@ } js_library("lifetime_browser_proxy") { + sources = [ "$root_gen_dir/chrome/browser/resources/settings/tsc/lifetime_browser_proxy.js" ] deps = [ "//ui/webui/resources/js:cr.m" ] + extra_deps = [ ":build_ts" ] } js_library("metrics_browser_proxy") { @@ -716,13 +720,13 @@ "downloads_page/downloads_browser_proxy.js", "downloads_page/downloads_page.js", "ensure_lazy_loaded.js", - "extension_control_browser_proxy.js", + "extension_control_browser_proxy.ts", "global_scroll_target_mixin.js", "hats_browser_proxy.js", "i18n_setup.ts", "icons.ts", "lazy_load.ts", - "lifetime_browser_proxy.js", + "lifetime_browser_proxy.ts", "metrics_browser_proxy.js", "on_startup_page/on_startup_browser_proxy.js", "on_startup_page/on_startup_page.js",
diff --git a/chrome/browser/resources/settings/about_page/about_page.js b/chrome/browser/resources/settings/about_page/about_page.js index 14e8d1b3..0a0e71d 100644 --- a/chrome/browser/resources/settings/about_page/about_page.js +++ b/chrome/browser/resources/settings/about_page/about_page.js
@@ -27,7 +27,7 @@ import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {loadTimeData} from '../i18n_setup.js'; -import {LifetimeBrowserProxy, LifetimeBrowserProxyImpl} from '../lifetime_browser_proxy.js'; +import {LifetimeBrowserProxyImpl} from '../lifetime_browser_proxy.js'; import {Router} from '../router.js'; import {AboutPageBrowserProxy, AboutPageBrowserProxyImpl, PromoteUpdaterStatus, UpdateStatus, UpdateStatusChangedEvent} from './about_page_browser_proxy.js'; @@ -127,9 +127,6 @@ /** @private {!AboutPageBrowserProxy} */ this.aboutBrowserProxy_ = AboutPageBrowserProxyImpl.getInstance(); - - /** @private {!LifetimeBrowserProxy} */ - this.lifetimeBrowserProxy_ = LifetimeBrowserProxyImpl.getInstance(); } /** @override */ @@ -229,7 +226,7 @@ /** @private */ onRelaunchTap_() { - this.lifetimeBrowserProxy_.relaunch(); + LifetimeBrowserProxyImpl.getInstance().relaunch(); } // <if expr="not chromeos">
diff --git a/chrome/browser/resources/settings/chromeos/BUILD.gn b/chrome/browser/resources/settings/chromeos/BUILD.gn index 3bcc9267..1433328 100644 --- a/chrome/browser/resources/settings/chromeos/BUILD.gn +++ b/chrome/browser/resources/settings/chromeos/BUILD.gn
@@ -38,6 +38,7 @@ out_manifest = "$target_gen_dir/$build_manifest_v3" deps = [ + ":copy_browser_settings_tsc", ":preprocess_gen_v3", ":preprocess_mojo_v3", ":preprocess_v3", @@ -236,7 +237,6 @@ "chromeos/os_printing_page/cups_printers_browser_proxy.js", "chromeos/os_printing_page/cups_printers_entry_manager.js", "chromeos/bluetooth_page/bluetooth_page_browser_proxy.js", - "chromeos/os_about_page/device_name_browser_proxy.js", "chromeos/os_reset_page/os_reset_browser_proxy.js", "chromeos/os_settings.js", "chromeos/personalization_page/change_picture_browser_proxy.js", @@ -244,10 +244,8 @@ "chromeos/os_privacy_page/peripheral_data_access_browser_proxy.js", "controls/pref_control_behavior.js", "controls/settings_boolean_control_behavior.js", - "extension_control_browser_proxy.js", "languages_page/languages.js", "languages_page/languages_browser_proxy.js", - "lifetime_browser_proxy.js", "page_visibility.js", "people_page/account_manager_browser_proxy.js", "people_page/profile_info_browser_proxy.js", @@ -274,8 +272,10 @@ out_folder = "$target_gen_dir/$preprocess_folder_v3" out_manifest = "$target_gen_dir/$browser_settings_tsc_manifest" in_files = [ + "extension_control_browser_proxy.js", "i18n_setup.js", "icons.js", + "lifetime_browser_proxy.js", "setting_id_param_util.js", "settings_page_css.js", "settings_shared_css.js", @@ -405,11 +405,12 @@ "chromeos/os_a11y_page/manage_a11y_page_browser_proxy.m.js", "chromeos/os_a11y_page/tts_subpage.m.js", "chromeos/os_a11y_page/tts_subpage_browser_proxy.m.js", - "chromeos/os_about_page/channel_switcher_dialog.js", - "chromeos/os_about_page/detailed_build_info.js", - "chromeos/os_about_page/edit_hostname_dialog.js", - "chromeos/os_about_page/os_about_page.js", - "chromeos/os_about_page/update_warning_dialog.js", + "chromeos/os_about_page/channel_switcher_dialog.m.js", + "chromeos/os_about_page/detailed_build_info.m.js", + "chromeos/os_about_page/device_name_browser_proxy.m.js", + "chromeos/os_about_page/edit_hostname_dialog.m.js", + "chromeos/os_about_page/os_about_page.m.js", + "chromeos/os_about_page/update_warning_dialog.m.js", "chromeos/os_apps_page/android_apps_browser_proxy.m.js", "chromeos/os_apps_page/android_apps_subpage.m.js", "chromeos/os_apps_page/app_notifications_page/app_notifications_subpage.js", @@ -724,7 +725,7 @@ "nearby_share_page:polymer3_elements", "os_a11y_page:polymer3_elements", "os_a11y_page:web_components", - "os_about_page:web_components", + "os_about_page:polymer3_elements", "os_apps_page:polymer3_elements", "os_apps_page/app_management_page:polymer3_elements", "os_apps_page/app_management_page/borealis_page:polymer3_elements",
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/BUILD.gn b/chrome/browser/resources/settings/chromeos/os_about_page/BUILD.gn index 32c4417..b1b4c16 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/BUILD.gn +++ b/chrome/browser/resources/settings/chromeos/os_about_page/BUILD.gn
@@ -3,35 +3,39 @@ # found in the LICENSE file. import("//third_party/closure_compiler/compile_js.gni") -import("//tools/polymer/html_to_js.gni") +import("//tools/polymer/polymer.gni") +import("//ui/webui/resources/tools/js_modulizer.gni") import("../os_settings.gni") js_type_check("closure_compile_module") { closure_flags = os_settings_closure_flags is_polymer3 = true deps = [ - ":channel_switcher_dialog", - ":detailed_build_info", - ":device_name_browser_proxy", - ":edit_hostname_dialog", - ":os_about_page", - ":update_warning_dialog", + ":channel_switcher_dialog.m", + ":detailed_build_info.m", + ":device_name_browser_proxy.m", + ":edit_hostname_dialog.m", + ":os_about_page.m", + ":update_warning_dialog.m", ] } -js_library("channel_switcher_dialog") { +js_library("channel_switcher_dialog.m") { + sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.m.js" ] deps = [ "../../about_page:about_page_browser_proxy", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", "//ui/webui/resources/js:assert.m", "//ui/webui/resources/js:load_time_data.m", ] + extra_deps = [ ":channel_switcher_dialog_module" ] } -js_library("detailed_build_info") { +js_library("detailed_build_info.m") { + sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.m.js" ] deps = [ - ":channel_switcher_dialog", - ":edit_hostname_dialog", + ":channel_switcher_dialog.m", + ":edit_hostname_dialog.m", "..:deep_linking_behavior.m", "..:os_route.m", "../..:router", @@ -41,25 +45,31 @@ "//ui/webui/resources/cr_elements/policy:cr_tooltip_icon.m", "//ui/webui/resources/js:i18n_behavior.m", ] + extra_deps = [ ":detailed_build_info_module" ] } -js_library("device_name_browser_proxy") { +js_library("device_name_browser_proxy.m") { + sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_about_page/device_name_browser_proxy.m.js" ] deps = [ "//ui/webui/resources/js:cr.m" ] externs_list = [ "$externs_path/chrome_send.js" ] + extra_deps = [ ":modulize" ] } -js_library("edit_hostname_dialog") { +js_library("edit_hostname_dialog.m") { + sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.m.js" ] deps = [ "../../about_page:about_page_browser_proxy", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", "//ui/webui/resources/js:assert.m", "//ui/webui/resources/js:load_time_data.m", ] + extra_deps = [ ":edit_hostname_dialog_module" ] } -js_library("os_about_page") { +js_library("os_about_page.m") { + sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.m.js" ] deps = [ - ":device_name_browser_proxy", + ":device_name_browser_proxy.m", "..:deep_linking_behavior.m", "..:os_route.m", "../..:i18n_setup", @@ -73,22 +83,75 @@ "//ui/webui/resources/js:parse_html_subset.m", "//ui/webui/resources/js:web_ui_listener_behavior.m", ] + extra_deps = [ ":os_about_page_module" ] } -js_library("update_warning_dialog") { +js_library("update_warning_dialog.m") { + sources = [ "$root_gen_dir/chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.m.js" ] deps = [ "../../about_page:about_page_browser_proxy", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", "//ui/webui/resources/js:i18n_behavior.m", ] + extra_deps = [ ":update_warning_dialog_module" ] } -html_to_js("web_components") { - js_files = [ - "channel_switcher_dialog.js", - "detailed_build_info.js", - "edit_hostname_dialog.js", - "os_about_page.js", - "update_warning_dialog.js", +group("polymer3_elements") { + public_deps = [ + ":channel_switcher_dialog_module", + ":detailed_build_info_module", + ":edit_hostname_dialog_module", + ":modulize", + ":os_about_page_module", + ":update_warning_dialog_module", ] } + +polymer_modulizer("channel_switcher_dialog") { + js_file = "channel_switcher_dialog.js" + html_file = "channel_switcher_dialog.html" + html_type = "dom-module" + migrated_imports = os_settings_migrated_imports + namespace_rewrites = os_settings_namespace_rewrites + auto_imports = os_settings_auto_imports +} + +polymer_modulizer("detailed_build_info") { + js_file = "detailed_build_info.js" + html_file = "detailed_build_info.html" + html_type = "dom-module" + migrated_imports = os_settings_migrated_imports + namespace_rewrites = os_settings_namespace_rewrites + auto_imports = os_settings_auto_imports +} + +polymer_modulizer("edit_hostname_dialog") { + js_file = "edit_hostname_dialog.js" + html_file = "edit_hostname_dialog.html" + html_type = "dom-module" + migrated_imports = os_settings_migrated_imports + namespace_rewrites = os_settings_namespace_rewrites + auto_imports = os_settings_auto_imports +} + +polymer_modulizer("os_about_page") { + js_file = "os_about_page.js" + html_file = "os_about_page.html" + html_type = "dom-module" + migrated_imports = os_settings_migrated_imports + namespace_rewrites = os_settings_namespace_rewrites + auto_imports = os_settings_auto_imports +} + +polymer_modulizer("update_warning_dialog") { + js_file = "update_warning_dialog.js" + html_file = "update_warning_dialog.html" + html_type = "dom-module" + migrated_imports = os_settings_migrated_imports + namespace_rewrites = os_settings_namespace_rewrites + auto_imports = os_settings_auto_imports +} + +js_modulizer("modulize") { + input_files = [ "device_name_browser_proxy.js" ] +}
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.html b/chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.html index 348b21d..36ccecd55 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.html +++ b/chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.html
@@ -1,56 +1,73 @@ -<style include="settings-shared"> - #warningSelector > :not(.iron-selected) { - display: none; - } -</style> -<cr-dialog id="dialog" close-text="$i18n{close}"> - <div slot="title">$i18n{aboutChangeChannel}</div> - <div slot="body"> - <!-- TODO(dbeam): this can be policy-controlled. Show this in the UI. - https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ChromeOsReleaseChannel - --> - <cr-radio-group on-selected-changed="onChannelSelectionChanged_"> - <cr-radio-button name="[[browserChannelEnum_.STABLE]]"> - $i18n{aboutChannelDialogStable} - </cr-radio-button> - <cr-radio-button name="[[browserChannelEnum_.BETA]]"> - $i18n{aboutChannelDialogBeta} - </cr-radio-button> - <cr-radio-button name="[[browserChannelEnum_.DEV]]"> - $i18n{aboutChannelDialogDev} - </cr-radio-button> - </cr-radio-group> - <iron-selector id="warningSelector"> - <div> - <h2>$i18n{aboutDelayedWarningTitle}</h2> - <div>[[substituteString_( - '$i18nPolymer{aboutDelayedWarningMessage}', - '$i18nPolymer{aboutOsProductTitle}')]]</div> +<link rel="import" href="chrome://resources/html/polymer.html"> + +<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_radio_button/cr_radio_button.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_radio_group/cr_radio_group.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-selector.html"> +<link rel="import" href="../../about_page/about_page_browser_proxy.html"> +<link rel="import" href="../../settings_shared_css.html"> +<link rel="import" href="chrome://resources/html/assert.html"> +<link rel="import" href="chrome://resources/html/load_time_data.html"> + +<dom-module id="settings-channel-switcher-dialog"> + <template> + <style include="settings-shared"> + #warningSelector > :not(.iron-selected) { + display: none; + } + </style> + <cr-dialog id="dialog" close-text="$i18n{close}"> + <div slot="title">$i18n{aboutChangeChannel}</div> + <div slot="body"> + <!-- TODO(dbeam): this can be policy-controlled. Show this in the UI. + https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ChromeOsReleaseChannel + --> + <cr-radio-group on-selected-changed="onChannelSelectionChanged_"> + <cr-radio-button name="[[browserChannelEnum_.STABLE]]"> + $i18n{aboutChannelDialogStable} + </cr-radio-button> + <cr-radio-button name="[[browserChannelEnum_.BETA]]"> + $i18n{aboutChannelDialogBeta} + </cr-radio-button> + <cr-radio-button name="[[browserChannelEnum_.DEV]]"> + $i18n{aboutChannelDialogDev} + </cr-radio-button> + </cr-radio-group> + <iron-selector id="warningSelector"> + <div> + <h2>$i18n{aboutDelayedWarningTitle}</h2> + <div>[[substituteString_( + '$i18nPolymer{aboutDelayedWarningMessage}', + '$i18nPolymer{aboutOsProductTitle}')]]</div> + </div> + <div> + <h2>$i18n{aboutPowerwashWarningTitle}</h2> + <div>$i18n{aboutPowerwashWarningMessage}</div> + </div> + <div> + <h2>$i18n{aboutUnstableWarningTitle}</h2> + <div>[[substituteString_( + '$i18nPolymer{aboutUnstableWarningMessage}', + '$i18nPolymer{aboutOsProductTitle}')]]</div> + </div> + </iron-selector> </div> - <div> - <h2>$i18n{aboutPowerwashWarningTitle}</h2> - <div>$i18n{aboutPowerwashWarningMessage}</div> + <div slot="button-container"> + <cr-button class="cancel-button" on-click="onCancelTap_" + id="cancel">$i18n{cancel}</cr-button> + <cr-button id="changeChannel" class="action-button" + on-click="onChangeChannelTap_" + hidden="[[!shouldShowButtons_.changeChannel]]"> + $i18n{aboutChangeChannel} + </cr-button> + <cr-button id="changeChannelAndPowerwash" class="action-button" + on-click="onChangeChannelAndPowerwashTap_" + hidden="[[!shouldShowButtons_.changeChannelAndPowerwash]]"> + $i18n{aboutChangeChannelAndPowerwash} + </cr-button> </div> - <div> - <h2>$i18n{aboutUnstableWarningTitle}</h2> - <div>[[substituteString_( - '$i18nPolymer{aboutUnstableWarningMessage}', - '$i18nPolymer{aboutOsProductTitle}')]]</div> - </div> - </iron-selector> - </div> - <div slot="button-container"> - <cr-button class="cancel-button" on-click="onCancelTap_" - id="cancel">$i18n{cancel}</cr-button> - <cr-button id="changeChannel" class="action-button" - on-click="onChangeChannelTap_" - hidden="[[!shouldShowButtons_.changeChannel]]"> - $i18n{aboutChangeChannel} - </cr-button> - <cr-button id="changeChannelAndPowerwash" class="action-button" - on-click="onChangeChannelAndPowerwashTap_" - hidden="[[!shouldShowButtons_.changeChannelAndPowerwash]]"> - $i18n{aboutChangeChannelAndPowerwash} - </cr-button> - </div> -</cr-dialog> + </cr-dialog> + </template> + <script src="channel_switcher_dialog.js"></script> +</dom-module>
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.js b/chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.js index 3e30edc5..e39e438 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.js +++ b/chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.js
@@ -2,19 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import '//resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import '//resources/cr_elements/cr_button/cr_button.m.js'; -import '//resources/cr_elements/cr_radio_button/cr_radio_button.m.js'; -import '//resources/cr_elements/cr_radio_group/cr_radio_group.m.js'; -import '//resources/polymer/v3_0/iron-selector/iron-selector.js'; -import '../../settings_shared_css.js'; - -import {assert, assertNotReached} from '//resources/js/assert.m.js'; -import {loadTimeData} from '//resources/js/load_time_data.m.js'; -import {afterNextRender, flush, html, Polymer, TemplateInstanceBase, Templatizer} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js'; - -import {AboutPageBrowserProxy, AboutPageBrowserProxyImpl, AboutPageUpdateInfo, BrowserChannel, browserChannelToI18nId, ChannelInfo, isTargetChannelMoreStable, RegulatoryInfo, TPMFirmwareUpdateStatusChangedEvent, UpdateStatus, UpdateStatusChangedEvent, VersionInfo} from '../../about_page/about_page_browser_proxy.js'; - +(function() { /** */ @@ -32,7 +20,6 @@ * release channel to notify parents of this dialog. */ Polymer({ - _template: html`{__html_template__}`, is: 'settings-channel-switcher-dialog', properties: { @@ -58,12 +45,12 @@ }, }, - /** @private {?AboutPageBrowserProxy} */ + /** @private {?settings.AboutPageBrowserProxy} */ browserProxy_: null, /** @override */ ready() { - this.browserProxy_ = AboutPageBrowserProxyImpl.getInstance(); + this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); this.browserProxy_.getChannelInfo().then(info => { this.currentChannel_ = info.currentChannel; this.targetChannel_ = info.targetChannel; @@ -138,7 +125,8 @@ return; } - if (isTargetChannelMoreStable(this.currentChannel_, selectedChannel)) { + if (settings.isTargetChannelMoreStable( + this.currentChannel_, selectedChannel)) { // More stable channel selected. For non managed devices, notify the user // about powerwash. if (loadTimeData.getBoolean('aboutEnterpriseManaged')) { @@ -169,3 +157,4 @@ return loadTimeData.substituteString(format, replacement); }, }); +})(); \ No newline at end of file
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.html b/chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.html index 70c8d24..8c1d26fe 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.html +++ b/chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.html
@@ -1,108 +1,133 @@ -<style include="settings-shared"> - cr-policy-indicator { - margin-inline-start: var(--cr-controlled-by-spacing); - } +<link rel="import" href="chrome://resources/html/polymer.html"> - /* The command line string can contain very long substrings that - * don't have any spaces, need to force a line break in such cases. */ - #command-line { - overflow-wrap: break-word; - width: 100%; - } +<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> +<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_indicator.html"> +<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_indicator_behavior.html"> +<link rel="import" href="chrome://resources/cr_elements/policy/cr_tooltip_icon.html"> +<link rel="import" href="chrome://resources/html/assert.html"> +<link rel="import" href="chrome://resources/html/cr/ui/focus_without_ink.html"> +<link rel="import" href="chrome://resources/html/i18n_behavior.html"> +<link rel="import" href="../../about_page/about_page_browser_proxy.html"> +<link rel="import" href="../../i18n_setup.html"> +<link rel="import" href="../../router.html"> +<link rel="import" href="../../settings_shared_css.html"> +<link rel="import" href="../deep_linking_behavior.html"> +<link rel="import" href="../localized_link/localized_link.html"> +<link rel="import" href="../os_route.html"> +<link rel="import" href="channel_switcher_dialog.html"> +<link rel="import" href="device_name_browser_proxy.html"> +<link rel="import" href="edit_hostname_dialog.html"> - #managedEolTooltipIcon { - margin-inline-end: 54px; - } -</style> -<div class="settings-box two-line"> - <div class="start"> - <div role="heading" aria-level="2">$i18n{aboutChannelLabel}</div> - <div id="currentlyOnChannelText" aria-hidden="true" class="secondary"> - [[currentlyOnChannelText_]] - </div> - </div> - <div class="separator"></div> - <cr-button on-click="onChangeChannelTap_" - aria-describedby="currentlyOnChannelText" - disabled="[[!canChangeChannel_]]" - deep-link-focus-id$="[[Setting.kChangeChromeChannel]]"> - $i18n{aboutChangeChannel} - </cr-button> - <template is="dom-if" if="[[!canChangeChannel_]]"> - <cr-policy-indicator - indicator-source-name="[[getChangeChannelIndicatorSourceName_( - canChangeChannel_)]]" - indicator-type="[[getChangeChannelIndicatorType_( - canChangeChannel_)]]"> - </cr-policy-indicator> - </template> - <template is="dom-if" if="[[showChannelSwitcherDialog_]]" restamp> - <settings-channel-switcher-dialog - on-close="onChannelSwitcherDialogClosed_"> - </settings-channel-switcher-dialog> - </template> -</div> -<div id="endOfLifeSectionContainer" - class="settings-box two-line single-column" - hidden="[[shouldHideEolInfo_]]"> - <div role="heading" aria-level="2">$i18n{aboutEndOfLifeTitle}</div> - <settings-localized-link class="secondary" - localized-string="[[eolMessageWithMonthAndYear]]"> - </settings-localized-link> -</div> -<template is="dom-if" if="[[isManaged_]]"> - <div class="settings-box two-line"> - <div class="start" aria-hidden="true"> - <div role="heading">$i18n{aboutEndOfLifeTitle}</div> - <div class="secondary"> - $i18n{aboutManagedEndOfLifeSubtitle} +<dom-module id="settings-detailed-build-info"> + <template> + <style include="settings-shared"> + cr-policy-indicator { + margin-inline-start: var(--cr-controlled-by-spacing); + } + + /* The command line string can contain very long substrings that + * don't have any spaces, need to force a line break in such cases. */ + #command-line { + overflow-wrap: break-word; + width: 100%; + } + + #managedEolTooltipIcon { + margin-inline-end: 54px; + } + </style> + <div class="settings-box two-line"> + <div class="start"> + <div role="heading" aria-level="2">$i18n{aboutChannelLabel}</div> + <div id="currentlyOnChannelText" aria-hidden="true" class="secondary"> + [[currentlyOnChannelText_]] + </div> </div> + <div class="separator"></div> + <cr-button on-click="onChangeChannelTap_" + aria-describedby="currentlyOnChannelText" + disabled="[[!canChangeChannel_]]" + deep-link-focus-id$="[[Setting.kChangeChromeChannel]]"> + $i18n{aboutChangeChannel} + </cr-button> + <template is="dom-if" if="[[!canChangeChannel_]]"> + <cr-policy-indicator + indicator-source-name="[[getChangeChannelIndicatorSourceName_( + canChangeChannel_)]]" + indicator-type="[[getChangeChannelIndicatorType_( + canChangeChannel_)]]"> + </cr-policy-indicator> + </template> + <template is="dom-if" if="[[showChannelSwitcherDialog_]]" restamp> + <settings-channel-switcher-dialog + on-close="onChannelSwitcherDialogClosed_"> + </settings-channel-switcher-dialog> + </template> </div> - <cr-tooltip-icon - id="managedEolTooltipIcon" - icon-class="cr20:domain" - tooltip-text="$i18n{aboutManagedEndOfLifeSubtitle}" - icon-aria-label="$i18n{aboutManagedEndOfLifeSubtitle}" - tooltip-position="bottom"> - </cr-tooltip-icon> - </div> -</template> -<template is="dom-if" if="[[isHostnameSettingEnabled_]]"> - <div class="settings-box two-line"> - <div class="start"> - <div role="heading">$i18n{aboutDeviceName}</div> - <div id="deviceName" aria-hidden="true" class="secondary"> - [[deviceNameText_]] + <div id="endOfLifeSectionContainer" + class="settings-box two-line single-column" + hidden="[[shouldHideEolInfo_]]"> + <div role="heading" aria-level="2">$i18n{aboutEndOfLifeTitle}</div> + <settings-localized-link class="secondary" + localized-string="[[eolMessageWithMonthAndYear]]"> + </settings-localized-link> + </div> + <template is="dom-if" if="[[isManaged_]]"> + <div class="settings-box two-line"> + <div class="start" aria-hidden="true"> + <div role="heading">$i18n{aboutEndOfLifeTitle}</div> + <div class="secondary"> + $i18n{aboutManagedEndOfLifeSubtitle} + </div> + </div> + <cr-tooltip-icon + id="managedEolTooltipIcon" + icon-class="cr20:domain" + tooltip-text="$i18n{aboutManagedEndOfLifeSubtitle}" + icon-aria-label="$i18n{aboutManagedEndOfLifeSubtitle}" + tooltip-position="bottom"> + </cr-tooltip-icon> </div> + </template> + <template is="dom-if" if="[[isHostnameSettingEnabled_]]"> + <div class="settings-box two-line"> + <div class="start"> + <div role="heading">$i18n{aboutDeviceName}</div> + <div id="deviceName" aria-hidden="true" class="secondary"> + [[deviceNameText_]] + </div> + </div> + <cr-icon-button class="icon-edit" on-click="onEditHostnameTap_"> + </cr-icon-button> + </div> + <template is="dom-if" if="[[showEditHostnameDialog_]]" restamp> + <edit-hostname-dialog + on-close="onEditHostnameDialogClosed_"> + </edit-hostname-dialog> + </template> + </template> + <div id="buildDetailsLinkContainer" class="settings-box"> + <div class="start" id="aboutBuildDetailsTitle"> + $i18n{aboutBuildDetailsTitle} + </div> + <cr-icon-button id="copyBuildDetailsButton" class="icon-copy-content" + aria-labelledby="copyBuildDetailsButtonToolTip" + on-click="onCopyBuildDetailsToClipBoardTap_" + disabled="[[!copyToClipBoardEnabled_(versionInfo_, channelInfo_)]]" + deep-link-focus-id$="[[Setting.kCopyDetailedBuildInfo]]"> + </cr-icon-button> + <paper-tooltip id="copyBuildDetailsButtonToolTip" + for="copyBuildDetailsButton" + position="bottom" fit-to-visible-bounds> + $i18n{aboutBuildDetailsCopyTooltipLabel} + </paper-tooltip> + <div class="separator"></div> + <cr-icon-button on-click="onVisitBuildDetailsPageTap_" + aria-labelledby="aboutBuildDetailsTitle" + class="icon-external"> + </cr-icon-button> </div> - <cr-icon-button class="icon-edit" on-click="onEditHostnameTap_"> - </cr-icon-button> - </div> - <template is="dom-if" if="[[showEditHostnameDialog_]]" restamp> - <edit-hostname-dialog - on-close="onEditHostnameDialogClosed_"> - </edit-hostname-dialog> + <div class="hr"></div> </template> -</template> -<div id="buildDetailsLinkContainer" class="settings-box"> - <div class="start" id="aboutBuildDetailsTitle"> - $i18n{aboutBuildDetailsTitle} - </div> - <cr-icon-button id="copyBuildDetailsButton" class="icon-copy-content" - aria-labelledby="copyBuildDetailsButtonToolTip" - on-click="onCopyBuildDetailsToClipBoardTap_" - disabled="[[!copyToClipBoardEnabled_(versionInfo_, channelInfo_)]]" - deep-link-focus-id$="[[Setting.kCopyDetailedBuildInfo]]"> - </cr-icon-button> - <paper-tooltip id="copyBuildDetailsButtonToolTip" - for="copyBuildDetailsButton" - position="bottom" fit-to-visible-bounds> - $i18n{aboutBuildDetailsCopyTooltipLabel} - </paper-tooltip> - <div class="separator"></div> - <cr-icon-button on-click="onVisitBuildDetailsPageTap_" - aria-labelledby="aboutBuildDetailsTitle" - class="icon-external"> - </cr-icon-button> -</div> -<div class="hr"></div> + <script src="detailed_build_info.js"></script> +</dom-module>
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.js b/chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.js index 3da862b..d77ddbd 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.js +++ b/chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.js
@@ -7,36 +7,13 @@ * information for ChromeOS. */ -import '//resources/cr_elements/cr_button/cr_button.m.js'; -import '//resources/cr_elements/policy/cr_policy_indicator.m.js'; -import '//resources/cr_elements/policy/cr_tooltip_icon.m.js'; -import '../../settings_shared_css.js'; -import '../localized_link/localized_link.js'; -import './channel_switcher_dialog.js'; -import './edit_hostname_dialog.js'; - -import {CrPolicyIndicatorType} from '//resources/cr_elements/policy/cr_policy_indicator_behavior.m.js'; -import {assert, assertNotReached} from '//resources/js/assert.m.js'; -import {focusWithoutInk} from '//resources/js/cr/ui/focus_without_ink.m.js'; -import {I18nBehavior} from '//resources/js/i18n_behavior.m.js'; -import {afterNextRender, flush, html, Polymer, TemplateInstanceBase, Templatizer} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js'; - -import {AboutPageBrowserProxy, AboutPageBrowserProxyImpl, AboutPageUpdateInfo, BrowserChannel, browserChannelToI18nId, ChannelInfo, isTargetChannelMoreStable, RegulatoryInfo, TPMFirmwareUpdateStatusChangedEvent, UpdateStatus, UpdateStatusChangedEvent, VersionInfo} from '../../about_page/about_page_browser_proxy.js'; -import {loadTimeData} from '../../i18n_setup.js'; -import {Route, RouteObserverBehavior, Router} from '../../router.js'; -import {DeepLinkingBehavior} from '../deep_linking_behavior.m.js'; -import {routes} from '../os_route.m.js'; - -import {DeviceNameBrowserProxy, DeviceNameBrowserProxyImpl} from './device_name_browser_proxy.js'; - Polymer({ - _template: html`{__html_template__}`, is: 'settings-detailed-build-info', behaviors: [ DeepLinkingBehavior, I18nBehavior, - RouteObserverBehavior, + settings.RouteObserverBehavior, ], properties: { @@ -109,7 +86,7 @@ /** @override */ ready() { - const browserProxy = AboutPageBrowserProxyImpl.getInstance(); + const browserProxy = settings.AboutPageBrowserProxyImpl.getInstance(); browserProxy.pageReady(); browserProxy.getVersionInfo().then(versionInfo => { @@ -124,12 +101,12 @@ }, /** - * @param {!Route} route - * @param {!Route} oldRoute + * @param {!settings.Route} route + * @param {!settings.Route} oldRoute */ currentRouteChanged(route, oldRoute) { // Does not apply to this page. - if (route !== routes.DETAILED_BUILD_INFO) { + if (route !== settings.routes.DETAILED_BUILD_INFO) { return; } @@ -146,7 +123,7 @@ /** @private */ updateChannelInfo_() { - const browserProxy = AboutPageBrowserProxyImpl.getInstance(); + const browserProxy = settings.AboutPageBrowserProxyImpl.getInstance(); // canChangeChannel() call is expected to be low-latency, so fetch this // value by itself to ensure UI consistency (see https://crbug.com/848750). @@ -161,7 +138,8 @@ // Display the target channel for the 'Currently on' message. this.currentlyOnChannelText_ = this.i18n( 'aboutCurrentlyOnChannel', - this.i18n(browserChannelToI18nId(info.targetChannel, info.isLts))); + this.i18n( + settings.browserChannelToI18nId(info.targetChannel, info.isLts))); }); }, @@ -260,14 +238,14 @@ /** @private */ onChannelSwitcherDialogClosed_() { this.showChannelSwitcherDialog_ = false; - focusWithoutInk(assert(this.$$('cr-button'))); + cr.ui.focusWithoutInk(assert(this.$$('cr-button'))); this.updateChannelInfo_(); }, /** @private */ onEditHostnameDialogClosed_() { this.showEditHostnameDialog_ = false; - focusWithoutInk(assert(this.$$('cr-button'))); + cr.ui.focusWithoutInk(assert(this.$$('cr-button'))); // TODO(jhawkins): Verify hostname property updated at this point. }, });
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/device_name_browser_proxy.js b/chrome/browser/resources/settings/chromeos/os_about_page/device_name_browser_proxy.js index f8cfff17..df0e1f1 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/device_name_browser_proxy.js +++ b/chrome/browser/resources/settings/chromeos/os_about_page/device_name_browser_proxy.js
@@ -3,7 +3,7 @@ // found in the LICENSE file. // clang-format off -import {addSingletonGetter, sendWithPromise} from 'chrome://resources/js/cr.m.js'; +// #import {addSingletonGetter, sendWithPromise} from 'chrome://resources/js/cr.m.js'; // clang-format on /** @@ -11,10 +11,10 @@ * deviceName: string, * }} */ -export let DeviceNameMetadata; +/* #export */ let DeviceNameMetadata; /** @interface */ -export class DeviceNameBrowserProxy { +/* #export */ class DeviceNameBrowserProxy { /** * Queries the system for metadata about the device name. * @return {!Promise<!DeviceNameMetadata>} @@ -25,13 +25,13 @@ /** * @implements {DeviceNameBrowserProxy} */ -export class DeviceNameBrowserProxyImpl { +/* #export */ class DeviceNameBrowserProxyImpl { /** @override */ getDeviceNameMetadata() { - return sendWithPromise('getDeviceNameMetadata'); + return cr.sendWithPromise('getDeviceNameMetadata'); } } // The singleton instance_ is replaced with a test version of this wrapper // during testing. -addSingletonGetter(DeviceNameBrowserProxyImpl); +cr.addSingletonGetter(DeviceNameBrowserProxyImpl);
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.html b/chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.html index 251350654..8a64870 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.html +++ b/chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.html
@@ -1,32 +1,50 @@ -<style include="settings-shared"> - cr-input { - --cr-input-error-display: none; - } +<link rel="import" href="chrome://resources/html/polymer.html"> - #input-subtext { - display: flex; - } +<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_radio_button/cr_radio_button.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_radio_group/cr_radio_group.html"> +<link rel="import" href="chrome://resources/html/assert.html"> +<link rel="import" href="chrome://resources/html/load_time_data.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-selector.html"> +<link rel="import" href="../../about_page/about_page_browser_proxy.html"> +<link rel="import" href="../../settings_shared_css.html"> - #input-subtext span:last-child { - margin-inline-start: auto; - } -</style> -<cr-dialog id="dialog" show-on-attach> - <div slot="title">$i18n{aboutEditDeviceName}</div> - <div slot="body"> - <div>$i18n{aboutDeviceNameInfo}</div> - <cr-input></cr-input> - <div id="input-subtext"> - <span>$i18n{aboutDeviceNameConstraints}</span> - <span>1/15</span> - </div> - </div> - <div slot="button-container"> - <cr-button class="cancel-button" on-click="onCancelTap_"> - $i18n{cancel} - </cr-button> - <cr-button class="action-button" on-click="onDoneTap_"> - $i18n{done} - </cr-button> - </div> -</cr-dialog> +<dom-module id="edit-hostname-dialog"> + <template> + <style include="settings-shared"> + cr-input { + --cr-input-error-display: none; + } + + #input-subtext { + display: flex; + } + + #input-subtext span:last-child { + margin-inline-start: auto; + } + </style> + <cr-dialog id="dialog" show-on-attach> + <div slot="title">$i18n{aboutEditDeviceName}</div> + <div slot="body"> + <div>$i18n{aboutDeviceNameInfo}</div> + <cr-input></cr-input> + <div id="input-subtext"> + <span>$i18n{aboutDeviceNameConstraints}</span> + <span>1/15</span> + </div> + </div> + <div slot="button-container"> + <cr-button class="cancel-button" on-click="onCancelTap_"> + $i18n{cancel} + </cr-button> + <cr-button class="action-button" on-click="onDoneTap_"> + $i18n{done} + </cr-button> + </div> + </cr-dialog> + </template> + <script src="edit_hostname_dialog.js"></script> +</dom-module>
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.js b/chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.js index d27796e0..fa76e09 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.js +++ b/chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.js
@@ -6,22 +6,7 @@ * @fileoverview 'edit-hostname-dialog' is a component allowing the * user to edit the device hostname. */ -import '//resources/cr_elements/cr_button/cr_button.m.js'; -import '//resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import '//resources/cr_elements/cr_input/cr_input.m.js'; -import '//resources/cr_elements/cr_radio_button/cr_radio_button.m.js'; -import '//resources/cr_elements/cr_radio_group/cr_radio_group.m.js'; -import '//resources/polymer/v3_0/iron-selector/iron-selector.js'; -import '../../settings_shared_css.js'; - -import {assert, assertNotReached} from '//resources/js/assert.m.js'; -import {loadTimeData} from '//resources/js/load_time_data.m.js'; -import {afterNextRender, flush, html, Polymer, TemplateInstanceBase, Templatizer} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js'; - -import {AboutPageBrowserProxy, AboutPageBrowserProxyImpl, AboutPageUpdateInfo, BrowserChannel, browserChannelToI18nId, ChannelInfo, isTargetChannelMoreStable, RegulatoryInfo, TPMFirmwareUpdateStatusChangedEvent, UpdateStatus, UpdateStatusChangedEvent, VersionInfo} from '../../about_page/about_page_browser_proxy.js'; - Polymer({ - _template: html`{__html_template__}`, is: 'edit-hostname-dialog', /** @private */
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.html b/chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.html index e29a1478..ea71d9f 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.html +++ b/chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.html
@@ -1,224 +1,260 @@ -<style include="settings-shared settings-page-styles"> - :host { - --about-page-image-space: 10px; - } +<link rel="import" href="chrome://resources/html/polymer.html"> - .info-section { - margin-bottom: 12px; - } +<link rel="import" href="chrome://resources/html/parse_html_subset.html"> +<link rel="import" href="../../about_page/about_page_browser_proxy.html"> +<link rel="import" href="../../i18n_setup.html"> +<link rel="import" href="../../icons.html"> +<link rel="import" href="../../lifetime_browser_proxy.html"> +<link rel="import" href="../../prefs/prefs.html"> +<link rel="import" href="../os_settings_page/main_page_behavior.html"> +<link rel="import" href="../../settings_page/settings_animated_pages.html"> +<link rel="import" href="../../settings_page/settings_section.html"> +<link rel="import" href="../../settings_page/settings_subpage.html"> +<link rel="import" href="../../settings_page_css.html"> +<link rel="import" href="../../settings_shared_css.html"> +<link rel="import" href="../deep_linking_behavior.html"> +<link rel="import" href="../metrics_recorder.html"> +<link rel="import" href="../os_icons.html"> +<link rel="import" href="../os_route.html"> +<link rel="import" href="../../router.html"> +<link rel="import" href="../os_reset_page/os_powerwash_dialog.html"> +<link rel="import" href="../localized_link/localized_link.html"> +<link rel="import" href="detailed_build_info.html"> +<link rel="import" href="update_warning_dialog.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_link_row/cr_link_row.html"> +<link rel="import" href="chrome://resources/cr_elements/icons.html"> +<link rel="import" href="chrome://resources/html/assert.html"> +<link rel="import" href="chrome://resources/html/i18n_behavior.html"> +<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> +<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> - .padded { - padding-bottom: 10px; - padding-top: 10px; - } +<dom-module id="os-settings-about-page"> + <template> + <style include="settings-shared settings-page-styles"> + :host { + --about-page-image-space: 10px; + } - .product-title { - font-size: 153.85%; /* 20px / 13px */ - font-weight: 400; - margin-bottom: auto; - margin-top: auto; - } + .info-section { + margin-bottom: 12px; + } - img { - margin-inline-end: var(--about-page-image-space); - } + .padded { + padding-bottom: 10px; + padding-top: 10px; + } - .icon-container { - margin-inline-end: var(--about-page-image-space); - min-width: 32px; /* The width of the product-logo img. */ - text-align: center; - } + .product-title { + font-size: 153.85%; /* 20px / 13px */ + font-weight: 400; + margin-bottom: auto; + margin-top: auto; + } - /* TODO(crbug.com/986596): Don't use browser icons here. Fork them. */ - iron-icon[icon='settings:check-circle'] { - fill: var(--cros-icon-color-prominent); - } + img { + margin-inline-end: var(--about-page-image-space); + } - iron-icon[icon='cr:error-outline'] { - fill: var(--cros-text-color-alert); - } + .icon-container { + margin-inline-end: var(--about-page-image-space); + min-width: 32px; /* The width of the product-logo img. */ + text-align: center; + } - .settings-box .start { - overflow-x: auto; - } + /* TODO(crbug.com/986596): Don't use browser icons here. Fork them. */ + iron-icon[icon='settings:check-circle'] { + fill: var(--cros-icon-color-prominent); + } - cr-button { - white-space: nowrap; - } + iron-icon[icon='cr:error-outline'] { + fill: var(--cros-text-color-alert); + } - #regulatoryInfo img { - width: 330px; - } -</style> -<settings-section page-title="$i18n{aboutOsPageTitle}" section="about"> - <settings-animated-pages id="pages" section="about" - focus-config="[[focusConfig_]]"> - <div route-path="default"> - <div class="settings-box two-line first"> - <img id="product-logo" on-click="onProductLogoClick_" - srcset="chrome://theme/current-channel-logo@1x 1x, - chrome://theme/current-channel-logo@2x 2x" - alt="$i18n{aboutProductLogoAlt}" - role="presentation"> - <h1 class="product-title">$i18n{aboutOsProductTitle}</h1> - </div> - <div class="settings-box two-line"> - <!-- Set the icon from the iconset (when it's obsolete/EOL and - when update is done) or set the src (when it's updating). --> - <div class="icon-container" - hidden="[[!shouldShowIcons_(showUpdateStatus_)]]"> - <!-- TODO(crbug.com/986596): Don't use browser icons here. Fork - them. --> - <iron-icon - icon$="[[getUpdateStatusIcon_( - hasEndOfLife_, currentUpdateStatusEvent_)]]" - src="[[getThrobberSrcIfUpdating_( - hasEndOfLife_, currentUpdateStatusEvent_)]]"> - </iron-icon> - </div> - <div class="start padded"> - <div id="updateStatusMessage" hidden="[[!showUpdateStatus_]]"> - <div - inner-h-t-m-l="[[getUpdateStatusMessage_( - currentUpdateStatusEvent_, targetChannel_)]]"></div> - <a hidden$="[[!shouldShowLearnMoreLink_( - currentUpdateStatusEvent_)]]" target="_blank" - href="https://support.google.com/chrome?p=update_error"> - $i18n{learnMore} - </a> + .settings-box .start { + overflow-x: auto; + } + + cr-button { + white-space: nowrap; + } + + #regulatoryInfo img { + width: 330px; + } + </style> + <settings-section page-title="$i18n{aboutOsPageTitle}" section="about"> + <settings-animated-pages id="pages" section="about" + focus-config="[[focusConfig_]]"> + <div route-path="default"> + <div class="settings-box two-line first"> + <img id="product-logo" on-click="onProductLogoClick_" + srcset="chrome://theme/current-channel-logo@1x 1x, + chrome://theme/current-channel-logo@2x 2x" + alt="$i18n{aboutProductLogoAlt}" + role="presentation"> + <h1 class="product-title">$i18n{aboutOsProductTitle}</h1> </div> - <settings-localized-link - id="endOfLifeMessageContainer" hidden="[[!hasEndOfLife_]]" - localized-string="$i18n{endOfLifeMessage}"> - </settings-localized-link> - <div class="secondary">$i18n{aboutBrowserVersion}</div> + <div class="settings-box two-line"> + <!-- Set the icon from the iconset (when it's obsolete/EOL and + when update is done) or set the src (when it's updating). --> + <div class="icon-container" + hidden="[[!shouldShowIcons_(showUpdateStatus_)]]"> + <!-- TODO(crbug.com/986596): Don't use browser icons here. Fork them. --> + <iron-icon + icon$="[[getUpdateStatusIcon_( + hasEndOfLife_, currentUpdateStatusEvent_)]]" + src="[[getThrobberSrcIfUpdating_( + hasEndOfLife_, currentUpdateStatusEvent_)]]"> + </iron-icon> + </div> + <div class="start padded"> + <div id="updateStatusMessage" hidden="[[!showUpdateStatus_]]"> + <div + inner-h-t-m-l="[[getUpdateStatusMessage_( + currentUpdateStatusEvent_, targetChannel_)]]"></div> + <a hidden$="[[!shouldShowLearnMoreLink_( + currentUpdateStatusEvent_)]]" target="_blank" + href="https://support.google.com/chrome?p=update_error"> + $i18n{learnMore} + </a> + </div> + <settings-localized-link + id="endOfLifeMessageContainer" hidden="[[!hasEndOfLife_]]" + localized-string="$i18n{endOfLifeMessage}"> + </settings-localized-link> + <div class="secondary">$i18n{aboutBrowserVersion}</div> + </div> + <div class="separator" hidden="[[!showButtonContainer_]]"></div> + <span id="buttonContainer" hidden="[[!showButtonContainer_]]"> + <cr-button id="relaunch" hidden$="[[!showRelaunch_]]" + on-click="onRelaunchClick_"> + [[getRelaunchButtonText_( + currentUpdateStatusEvent_)]] + </cr-button> + <cr-button id="checkForUpdates" hidden="[[!showCheckUpdates_]]" + on-click="onCheckUpdatesClick_" + deep-link-focus-id$="[[Setting.kCheckForOsUpdate]]"> + $i18n{aboutCheckForUpdates} + </cr-button> + </span> + </div> + <cr-link-row + id="aboutTPMFirmwareUpdate" + class="hr" + hidden$="[[!showTPMFirmwareUpdateLineItem_]]" + label="$i18n{aboutTPMFirmwareUpdateTitle}" + on-click="onTPMFirmwareUpdateClick_"> + <div slot="sub-label"> + $i18n{aboutTPMFirmwareUpdateDescription} + <a href="$i18n{aboutTPMFirmwareUpdateLearnMoreURL}" + target="_blank" on-click="onLearnMoreClick_"> + $i18n{learnMore} + </a> + </div> + </cr-link-row> + <template is="dom-if" if="[[hasInternetConnection_]]"> + <cr-link-row class="hr" id="releaseNotesOnline" + on-click="onReleaseNotesTap_" + label="$i18n{aboutShowReleaseNotes}" external + deep-link-focus-id$="[[Setting.kSeeWhatsNew]]"> + </cr-link-row> + </template> + <template is="dom-if" if="[[!hasInternetConnection_]]"> + <cr-link-row class="hr" id="releaseNotesOffline" + on-click="onReleaseNotesTap_" + label="$i18n{aboutShowReleaseNotes}" + title="$i18n{aboutReleaseNotesOffline}" external + deep-link-focus-id$="[[Setting.kSeeWhatsNew]]"> + </cr-link-row> + </template> + <cr-link-row class="hr" id="help" on-click="onHelpClick_" + label="$i18n{aboutGetHelpUsingChromeOs}" external + deep-link-focus-id$="[[Setting.kGetHelpWithChromeOs]]"> + </cr-link-row> +<if expr="_google_chrome"> + <cr-link-row class="hr" id="reportIssue" + on-click="onReportIssueClick_" + hidden="[[!prefs.feedback_allowed.value]]" + label="$i18n{aboutReportAnIssue}" external + deep-link-focus-id$="[[Setting.kReportAnIssue]]"> + </cr-link-row> +</if> + <cr-link-row class="hr" id="diagnostics" + on-click="onDiagnosticsClick_" + hidden$="[[!showDiagnosticsApp_]]" + label="$i18n{aboutDiagnostics}" external + deep-link-focus-id$="[[Setting.kDiagnostics]]"> + </cr-link-row> + <cr-link-row class="hr" id="detailed-build-info-trigger" + on-click="onDetailedBuildInfoClick_" + label="$i18n{aboutDetailedBuildInfo}" + role-description="$i18n{subpageArrowRoleDescription}"> + </cr-link-row> + <cr-link-row class="hr" on-click="onManagementPageClick_" + start-icon="cr:domain" label="$i18n{managementPage}" + hidden$="[[!isManaged_]]" external> + </cr-link-row> </div> - <div class="separator" hidden="[[!showButtonContainer_]]"></div> - <span id="buttonContainer" hidden="[[!showButtonContainer_]]"> - <cr-button id="relaunch" hidden$="[[!showRelaunch_]]" - on-click="onRelaunchClick_"> - [[getRelaunchButtonText_( - currentUpdateStatusEvent_)]] - </cr-button> - <cr-button id="checkForUpdates" hidden="[[!showCheckUpdates_]]" - on-click="onCheckUpdatesClick_" - deep-link-focus-id$="[[Setting.kCheckForOsUpdate]]"> - $i18n{aboutCheckForUpdates} - </cr-button> - </span> - </div> - <cr-link-row - id="aboutTPMFirmwareUpdate" - class="hr" - hidden$="[[!showTPMFirmwareUpdateLineItem_]]" - label="$i18n{aboutTPMFirmwareUpdateTitle}" - on-click="onTPMFirmwareUpdateClick_"> - <div slot="sub-label"> - $i18n{aboutTPMFirmwareUpdateDescription} - <a href="$i18n{aboutTPMFirmwareUpdateLearnMoreURL}" - target="_blank" on-click="onLearnMoreClick_"> - $i18n{learnMore} + <template is="dom-if" route-path="/help/details"> + <settings-subpage page-title="$i18n{aboutDetailedBuildInfo}"> + <settings-detailed-build-info + eol-message-with-month-and-year= + "[[eolMessageWithMonthAndYear_]]"> + </settings-detailed-build-info> + </settings-subpage> + </template> + </settings-animated-pages> + </settings-section> + + <settings-section> + <div class="settings-box padded block first"> + <div class="info-section"> + <div class="secondary">$i18n{aboutOsProductTitle}</div> + <div class="secondary">$i18n{aboutProductCopyright}</div> + </div> + + <div class="info-section"> + <div class="secondary">$i18nRaw{aboutProductLicense}</div> + <div class="secondary" + inner-h-t-m-l="[[getAboutProductOsLicense_( + showCrostiniLicense_)]]"> + </div> + </div> +<if expr="_google_chrome"> + <div class="secondary"> + <a id="aboutProductTos" href="$i18n{aboutTermsURL}" target="_blank" + deep-link-focus-id$="[[Setting.kTermsOfService]]"> + $i18n{aboutProductTos} </a> </div> - </cr-link-row> - <template is="dom-if" if="[[hasInternetConnection_]]"> - <cr-link-row class="hr" id="releaseNotesOnline" - on-click="onReleaseNotesTap_" - label="$i18n{aboutShowReleaseNotes}" external - deep-link-focus-id$="[[Setting.kSeeWhatsNew]]"> - </cr-link-row> - </template> - <template is="dom-if" if="[[!hasInternetConnection_]]"> - <cr-link-row class="hr" id="releaseNotesOffline" - on-click="onReleaseNotesTap_" - label="$i18n{aboutShowReleaseNotes}" - title="$i18n{aboutReleaseNotesOffline}" external - deep-link-focus-id$="[[Setting.kSeeWhatsNew]]"> - </cr-link-row> - </template> - <cr-link-row class="hr" id="help" on-click="onHelpClick_" - label="$i18n{aboutGetHelpUsingChromeOs}" external - deep-link-focus-id$="[[Setting.kGetHelpWithChromeOs]]"> - </cr-link-row> -<if expr="_google_chrome"> - <cr-link-row class="hr" id="reportIssue" - on-click="onReportIssueClick_" - hidden="[[!prefs.feedback_allowed.value]]" - label="$i18n{aboutReportAnIssue}" external - deep-link-focus-id$="[[Setting.kReportAnIssue]]"> - </cr-link-row> </if> - <cr-link-row class="hr" id="diagnostics" - on-click="onDiagnosticsClick_" - hidden$="[[!showDiagnosticsApp_]]" - label="$i18n{aboutDiagnostics}" external - deep-link-focus-id$="[[Setting.kDiagnostics]]"> - </cr-link-row> - <cr-link-row class="hr" id="detailed-build-info-trigger" - on-click="onDetailedBuildInfoClick_" - label="$i18n{aboutDetailedBuildInfo}" - role-description="$i18n{subpageArrowRoleDescription}"> - </cr-link-row> - <cr-link-row class="hr" on-click="onManagementPageClick_" - start-icon="cr:domain" label="$i18n{managementPage}" - hidden$="[[!isManaged_]]" external> - </cr-link-row> - </div> - <template is="dom-if" route-path="/help/details"> - <settings-subpage page-title="$i18n{aboutDetailedBuildInfo}"> - <settings-detailed-build-info - eol-message-with-month-and-year= - "[[eolMessageWithMonthAndYear_]]"> - </settings-detailed-build-info> - </settings-subpage> - </template> - </settings-animated-pages> -</settings-section> - -<settings-section> - <div class="settings-box padded block first"> - <div class="info-section"> - <div class="secondary">$i18n{aboutOsProductTitle}</div> - <div class="secondary">$i18n{aboutProductCopyright}</div> - </div> - - <div class="info-section"> - <div class="secondary">$i18nRaw{aboutProductLicense}</div> - <div class="secondary" - inner-h-t-m-l="[[getAboutProductOsLicense_( - showCrostiniLicense_)]]"> </div> - </div> + <div class="settings-box padded block" id="regulatoryInfo" + hidden$="[[!shouldShowRegulatoryOrSafetyInfo_(regulatoryInfo_)]]"> <if expr="_google_chrome"> - <div class="secondary"> - <a id="aboutProductTos" href="$i18n{aboutTermsURL}" target="_blank" - deep-link-focus-id$="[[Setting.kTermsOfService]]"> - $i18n{aboutProductTos} - </a> - </div> + <div class="secondary" hidden$="[[!shouldShowSafetyInfo_()]]"> + <a target="_blank" href="$i18n{aboutProductSafetyURL}"> + $i18nRaw{aboutProductSafety} + </a> + </div> </if> - </div> - <div class="settings-box padded block" id="regulatoryInfo" - hidden$="[[!shouldShowRegulatoryOrSafetyInfo_(regulatoryInfo_)]]"> -<if expr="_google_chrome"> - <div class="secondary" hidden$="[[!shouldShowSafetyInfo_()]]"> - <a target="_blank" href="$i18n{aboutProductSafetyURL}"> - $i18nRaw{aboutProductSafety} - </a> - </div> -</if> - <img src="[[regulatoryInfo_.url]]" alt="[[regulatoryInfo_.text]]" - hidden$="[[!shouldShowRegulatoryInfo_(regulatoryInfo_)]]"> - </div> -</settings-section> -<template is="dom-if" if="[[showUpdateWarningDialog_]]" restamp> - <settings-update-warning-dialog update-info="[[updateInfo_]]" - on-close="onUpdateWarningDialogClose_"> - </settings-update-warning-dialog> -</template> -<template is="dom-if" if="[[showTPMFirmwareUpdateDialog_]]" - restamp> - <os-settings-powerwash-dialog request-tpm-firmware-update - on-close="onPowerwashDialogClose_"> - </os-settings-powerwash-dialog> -</template> + <img src="[[regulatoryInfo_.url]]" alt="[[regulatoryInfo_.text]]" + hidden$="[[!shouldShowRegulatoryInfo_(regulatoryInfo_)]]"> + </div> + </settings-section> + <template is="dom-if" if="[[showUpdateWarningDialog_]]" restamp> + <settings-update-warning-dialog update-info="[[updateInfo_]]" + on-close="onUpdateWarningDialogClose_"> + </settings-update-warning-dialog> + </template> + <template is="dom-if" if="[[showTPMFirmwareUpdateDialog_]]" + restamp> + <os-settings-powerwash-dialog request-tpm-firmware-update + on-close="onPowerwashDialogClose_"> + </os-settings-powerwash-dialog> + </template> + </template> + <script src="os_about_page.js"></script> +</dom-module>
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.js b/chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.js index a20cf221..14bf0b5 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.js +++ b/chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.js
@@ -7,48 +7,14 @@ * information. */ -import '../../icons.js'; -import '../../prefs/prefs.js'; -import '../../settings_page/settings_animated_pages.js'; -import '../../settings_page/settings_section.js'; -import '../../settings_page/settings_subpage.js'; -import '../../settings_page_css.js'; -import '../../settings_shared_css.js'; -import '../os_icons.m.js'; -import '../os_reset_page/os_powerwash_dialog.js'; -import '../localized_link/localized_link.js'; -import './detailed_build_info.js'; -import './update_warning_dialog.js'; -import '//resources/cr_elements/cr_button/cr_button.m.js'; -import '//resources/cr_elements/cr_icon_button/cr_icon_button.m.js'; -import '//resources/cr_elements/cr_link_row/cr_link_row.js'; -import '//resources/cr_elements/icons.m.js'; -import '//resources/polymer/v3_0/iron-icon/iron-icon.js'; - -import {assert, assertNotReached} from '//resources/js/assert.m.js'; -import {I18nBehavior} from '//resources/js/i18n_behavior.m.js'; -import {parseHtmlSubset} from '//resources/js/parse_html_subset.m.js'; -import {WebUIListenerBehavior} from '//resources/js/web_ui_listener_behavior.m.js'; -import {afterNextRender, flush, html, Polymer, TemplateInstanceBase, Templatizer} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js'; - -import {AboutPageBrowserProxy, AboutPageBrowserProxyImpl, AboutPageUpdateInfo, BrowserChannel, browserChannelToI18nId, ChannelInfo, isTargetChannelMoreStable, RegulatoryInfo, TPMFirmwareUpdateStatusChangedEvent, UpdateStatus, UpdateStatusChangedEvent, VersionInfo} from '../../about_page/about_page_browser_proxy.js'; -import {loadTimeData} from '../../i18n_setup.js'; -import {LifetimeBrowserProxy, LifetimeBrowserProxyImpl} from '../../lifetime_browser_proxy.js'; -import {Route, RouteObserverBehavior, Router} from '../../router.js'; -import {DeepLinkingBehavior} from '../deep_linking_behavior.m.js'; -import {recordClick, recordNavigation, recordPageBlur, recordPageFocus, recordSearch, recordSettingChange, setUserActionRecorderForTesting} from '../metrics_recorder.m.js'; -import {routes} from '../os_route.m.js'; -import {MainPageBehavior} from '../os_settings_page/main_page_behavior.m.js'; - Polymer({ - _template: html`{__html_template__}`, is: 'os-settings-about-page', behaviors: [ DeepLinkingBehavior, WebUIListenerBehavior, - MainPageBehavior, - RouteObserverBehavior, + settings.MainPageBehavior, + settings.RouteObserverBehavior, I18nBehavior, ], @@ -161,9 +127,10 @@ type: Object, value() { const map = new Map(); - if (routes.DETAILED_BUILD_INFO) { + if (settings.routes.DETAILED_BUILD_INFO) { map.set( - routes.DETAILED_BUILD_INFO.path, '#detailed-build-info-trigger'); + settings.routes.DETAILED_BUILD_INFO.path, + '#detailed-build-info-trigger'); } return map; }, @@ -223,19 +190,14 @@ 'handleCrostiniEnabledChanged_(prefs.crostini.enabled.value)', ], - /** @private {?AboutPageBrowserProxy} */ + /** @private {?settings.AboutPageBrowserProxy} */ aboutBrowserProxy_: null, - /** @private {?LifetimeBrowserProxy} */ - lifetimeBrowserProxy_: null, - /** @override */ attached() { - this.aboutBrowserProxy_ = AboutPageBrowserProxyImpl.getInstance(); + this.aboutBrowserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); this.aboutBrowserProxy_.pageReady(); - this.lifetimeBrowserProxy_ = LifetimeBrowserProxyImpl.getInstance(); - this.addEventListener('target-channel-changed', e => { this.targetChannel_ = e.detail; }); @@ -260,21 +222,22 @@ this.hasInternetConnection_ = result; }); - if (Router.getInstance().getQueryParameters().get('checkForUpdate') === - 'true') { + if (settings.Router.getInstance().getQueryParameters().get( + 'checkForUpdate') === 'true') { this.onCheckUpdatesClick_(); } }, /** - * @param {!Route} newRoute - * @param {Route} oldRoute + * @param {!settings.Route} newRoute + * @param {settings.Route} oldRoute */ currentRouteChanged(newRoute, oldRoute) { - MainPageBehavior.currentRouteChanged.call(this, newRoute, oldRoute); + settings.MainPageBehavior.currentRouteChanged.call( + this, newRoute, oldRoute); // Does not apply to this page. - if (newRoute !== routes.ABOUT_ABOUT) { + if (newRoute !== settings.routes.ABOUT_ABOUT) { return; } @@ -290,9 +253,9 @@ }); }, - // Override MainPageBehavior method. + // Override settings.MainPageBehavior method. containsRoute(route) { - return !route || routes.ABOUT.contains(route); + return !route || settings.routes.ABOUT.contains(route); }, /** @private */ @@ -344,13 +307,13 @@ onDiagnosticsClick_() { assert(this.showDiagnosticsApp_); this.aboutBrowserProxy_.openDiagnostics(); - recordSettingChange(chromeos.settings.mojom.Setting.kDiagnostics); + settings.recordSettingChange(chromeos.settings.mojom.Setting.kDiagnostics); }, /** @private */ onRelaunchClick_() { - recordSettingChange(); - this.lifetimeBrowserProxy_.relaunch(); + settings.recordSettingChange(); + settings.LifetimeBrowserProxyImpl.getInstance().relaunch(); }, /** @private */ @@ -440,8 +403,8 @@ if (this.currentChannel_ !== this.targetChannel_) { return this.i18nAdvanced('aboutUpgradeUpdatingChannelSwitch', { substitutions: [ - this.i18nAdvanced( - browserChannelToI18nId(this.targetChannel_, this.isLts_)), + this.i18nAdvanced(settings.browserChannelToI18nId( + this.targetChannel_, this.isLts_)), progressPercent ] }); @@ -555,7 +518,8 @@ /** @private */ onDetailedBuildInfoClick_() { - Router.getInstance().navigateTo(routes.DETAILED_BUILD_INFO); + settings.Router.getInstance().navigateTo( + settings.routes.DETAILED_BUILD_INFO); }, /**
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.html b/chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.html index bcb0f7d9..3080573a 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.html +++ b/chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.html
@@ -1,15 +1,28 @@ -<style include="settings-shared"></style> -<cr-dialog id="dialog" close-text="$i18n{close}"> - <div slot="title">$i18n{aboutUpdateWarningTitle}</div> - <div slot="body"> - <div id="update-warning-message"></div> - </div> - <div slot="button-container"> - <cr-button id="cancel" class="cancel-button" - on-click="onCancelTap_">$i18n{cancel}</cr-button> - <cr-button id="continue" class="action-button" - on-click="onContinueTap_"> - $i18n{continue} - </cr-button> - </div> -</cr-dialog> +<link rel="import" href="chrome://resources/html/polymer.html"> + +<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> +<link rel="import" href="chrome://resources/html/i18n_behavior.html"> +<link rel="import" href="../../about_page/about_page_browser_proxy.html"> +<link rel="import" href="../../settings_shared_css.html"> + +<dom-module id="settings-update-warning-dialog"> + <template> + <style include="settings-shared"></style> + <cr-dialog id="dialog" close-text="$i18n{close}"> + <div slot="title">$i18n{aboutUpdateWarningTitle}</div> + <div slot="body"> + <div id="update-warning-message"></div> + </div> + <div slot="button-container"> + <cr-button id="cancel" class="cancel-button" + on-click="onCancelTap_">$i18n{cancel}</cr-button> + <cr-button id="continue" class="action-button" + on-click="onContinueTap_"> + $i18n{continue} + </cr-button> + </div> + </cr-dialog> + </template> + <script src="update_warning_dialog.js"></script> +</dom-module>
diff --git a/chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.js b/chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.js index e0e90a3..e679770 100644 --- a/chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.js +++ b/chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.js
@@ -7,17 +7,7 @@ * user about update over mobile data. By clicking 'Continue', the user * agrees to download update using mobile data. */ -import '//resources/cr_elements/cr_button/cr_button.m.js'; -import '//resources/cr_elements/cr_dialog/cr_dialog.m.js'; -import '../../settings_shared_css.js'; - -import {I18nBehavior} from '//resources/js/i18n_behavior.m.js'; -import {afterNextRender, flush, html, Polymer, TemplateInstanceBase, Templatizer} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js'; - -import {AboutPageBrowserProxy, AboutPageBrowserProxyImpl, AboutPageUpdateInfo, BrowserChannel, browserChannelToI18nId, ChannelInfo, isTargetChannelMoreStable, RegulatoryInfo, TPMFirmwareUpdateStatusChangedEvent, UpdateStatus, UpdateStatusChangedEvent, VersionInfo} from '../../about_page/about_page_browser_proxy.js'; - Polymer({ - _template: html`{__html_template__}`, is: 'settings-update-warning-dialog', behaviors: [I18nBehavior], @@ -30,12 +20,12 @@ }, }, - /** @private {?AboutPageBrowserProxy} */ + /** @private {?settings.AboutPageBrowserProxy} */ browserProxy_: null, /** @override */ ready() { - this.browserProxy_ = AboutPageBrowserProxyImpl.getInstance(); + this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); }, /** @override */
diff --git a/chrome/browser/resources/settings/chromeos/os_apps_page/app_management_page/borealis_page/borealis_detail_view.html b/chrome/browser/resources/settings/chromeos/os_apps_page/app_management_page/borealis_page/borealis_detail_view.html index 4d2f21d..3aecb39 100644 --- a/chrome/browser/resources/settings/chromeos/os_apps_page/app_management_page/borealis_page/borealis_detail_view.html +++ b/chrome/browser/resources/settings/chromeos/os_apps_page/app_management_page/borealis_page/borealis_detail_view.html
@@ -17,7 +17,19 @@ <dom-module id="app-management-borealis-detail-view"> <template> - <style include="app-management-shared-css"></style> + <style include="app-management-shared-css"> + .permission-text-row { + border-top: none; + } + iron-icon { + --iron-icon-fill-color: var(--secondary-text-color); + padding-inline-end: var(--row-item-icon-padding); + } + settings-localized-link { + color: var(--secondary-text-color); + white-space: pre-line; + } + </style> <div class="permission-list"> <app-management-pin-to-shelf-item @@ -30,6 +42,26 @@ <div class="header-text">$i18n{appManagementPermissionsLabel}</div> </div> <div class="permission-list indented-permission-block"> + <div class=permission-text-row aria-hidden="true"> + <div class="horizontal-align"> + <iron-icon id="icon" icon="cr:help-outline"></iron-icon> + <template is="dom-if" if="[[isMainApp_(app_.*)]]" restamp> + <!-- TODO(b/194640944): Add link to borealis learn more page --> + <settings-localized-link + id="main-link" + localized-string="$i18n{borealisMainPermissionText}" + link-url=https://www.youtube.com/watch?v=dQw4w9WgXcQ> + </settings-localized-link> + </template> + <template is="dom-if" if="[[!isMainApp_(app_.*)]]" restamp> + <settings-localized-link + id="borealis-link" + localized-string="$i18n{borealisAppPermissionText}" + on-link-clicked="onBorealisLinkClicked_"> + </settings-localized-link> + </template> + </div> + </div> <app-management-permission-item id="microphone-permission" class="subpermission-row" icon="app-management:microphone"
diff --git a/chrome/browser/resources/settings/chromeos/os_apps_page/app_management_page/borealis_page/borealis_detail_view.js b/chrome/browser/resources/settings/chromeos/os_apps_page/app_management_page/borealis_page/borealis_detail_view.js index 2ac4421..8b19599 100644 --- a/chrome/browser/resources/settings/chromeos/os_apps_page/app_management_page/borealis_page/borealis_detail_view.js +++ b/chrome/browser/resources/settings/chromeos/os_apps_page/app_management_page/borealis_page/borealis_detail_view.js
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +const kBorealisMainAppId = 'epfhbkiklgmlkhfpbcdleadnhcfdjfmo'; + Polymer({ is: 'app-management-borealis-detail-view', @@ -11,7 +13,9 @@ properties: { /** @private {App} */ - app_: Object, + app_: { + type: Object, + } }, attached() { @@ -20,4 +24,23 @@ this.watch('app_', state => app_management.util.getSelectedApp(state)); this.updateFromStore(); }, + + /** + * @return {boolean} + * @protected + */ + isMainApp_() { + return this.app_.id === kBorealisMainAppId; + }, + + /** + * @param {!Event} event + * @private + */ + onBorealisLinkClicked_(event) { + event.detail.event.preventDefault(); + const params = new URLSearchParams; + params.append('id', kBorealisMainAppId); + Router.getInstance().navigateTo(routes.APP_MANAGEMENT_DETAIL, params); + }, });
diff --git a/chrome/browser/resources/settings/chromeos/os_reset_page/os_powerwash_dialog.js b/chrome/browser/resources/settings/chromeos/os_reset_page/os_powerwash_dialog.js index d57c1826..a36b471 100644 --- a/chrome/browser/resources/settings/chromeos/os_reset_page/os_powerwash_dialog.js +++ b/chrome/browser/resources/settings/chromeos/os_reset_page/os_powerwash_dialog.js
@@ -18,7 +18,7 @@ import {html, Polymer} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {OncMojo} from 'chrome://resources/cr_components/chromeos/network/onc_mojo.m.js'; -import {LifetimeBrowserProxy, LifetimeBrowserProxyImpl} from '../../lifetime_browser_proxy.js'; +import {LifetimeBrowserProxyImpl} from '../../lifetime_browser_proxy.js'; import {Router} from '../../router.js'; import {recordSettingChange} from '../metrics_recorder.m.js'; import {routes} from '../os_route.m.js';
diff --git a/chrome/browser/resources/settings/chromeos/os_settings.gni b/chrome/browser/resources/settings/chromeos/os_settings.gni index 814c999..9c180999 100644 --- a/chrome/browser/resources/settings/chromeos/os_settings.gni +++ b/chrome/browser/resources/settings/chromeos/os_settings.gni
@@ -240,7 +240,7 @@ "chrome/browser/resources/settings/controls/settings_dropdown_menu.html|DropdownMenuOptionList", "chrome/browser/resources/settings/chromeos/global_scroll_target_behavior.html|GlobalScrollTargetBehavior,setGlobalScrollTarget", "chrome/browser/resources/settings/languages_page/languages_browser_proxy.html|LanguagesBrowserProxy,LanguagesBrowserProxyImpl", - "chrome/browser/resources/settings/lifetime_browser_proxy.html|LifetimeBrowserProxy,LifetimeBrowserProxyImpl", + "chrome/browser/resources/settings/lifetime_browser_proxy.html|LifetimeBrowserProxyImpl", "chrome/browser/resources/settings/people_page/account_manager_browser_proxy.html|AccountManagerBrowserProxy,AccountManagerBrowserProxyImpl,Account", "chrome/browser/resources/settings/people_page/profile_info_browser_proxy.html|ProfileInfoBrowserProxyImpl,ProfileInfoBrowserProxy,ProfileInfo", "chrome/browser/resources/settings/people_page/sync_browser_proxy.html|SyncBrowserProxyImpl,SyncBrowserProxy,StatusAction,SyncStatus,SyncPrefs", @@ -332,12 +332,6 @@ "chrome/browser/resources/settings/chromeos/internet_page/tether_connection_dialog.html", "chrome/browser/resources/settings/chromeos/localized_link/localized_link.html", "chrome/browser/resources/settings/chromeos/on_startup_page/on_startup_page.html", - "chrome/browser/resources/settings/chromeos/os_about_page/channel_switcher_dialog.html", - "chrome/browser/resources/settings/chromeos/os_about_page/detailed_build_info.html", - "chrome/browser/resources/settings/chromeos/os_about_page/device_name_browser_proxy.html", - "chrome/browser/resources/settings/chromeos/os_about_page/edit_hostname_dialog.html", - "chrome/browser/resources/settings/chromeos/os_about_page/os_about_page.html", - "chrome/browser/resources/settings/chromeos/os_about_page/update_warning_dialog.html", "chrome/browser/resources/settings/chromeos/os_a11y_page/change_dictation_locale_dialog.html", "chrome/browser/resources/settings/chromeos/os_apps_page/app_notifications_page/app_notifications_subpage.html", "chrome/browser/resources/settings/chromeos/os_bluetooth_page/os_bluetooth_page.html",
diff --git a/chrome/browser/resources/settings/chromeos/os_settings.js b/chrome/browser/resources/settings/chromeos/os_settings.js index a4749294..d1e3cd1 100644 --- a/chrome/browser/resources/settings/chromeos/os_settings.js +++ b/chrome/browser/resources/settings/chromeos/os_settings.js
@@ -43,10 +43,10 @@ import './personalization_page/dark_mode_subpage.m.js'; import './personalization_page/personalization_page.m.js'; import './os_a11y_page/change_dictation_locale_dialog.js'; -import './os_about_page/channel_switcher_dialog.js'; -import './os_about_page/detailed_build_info.js'; -import './os_about_page/os_about_page.js'; -import './os_about_page/update_warning_dialog.js'; +import './os_about_page/channel_switcher_dialog.m.js'; +import './os_about_page/detailed_build_info.m.js'; +import './os_about_page/os_about_page.m.js'; +import './os_about_page/update_warning_dialog.m.js'; import './os_apps_page/android_apps_subpage.m.js'; import './os_apps_page/app_notifications_page/app_notifications_subpage.js'; import './os_apps_page/app_management_page/app_item.m.js'; @@ -89,7 +89,7 @@ import './parental_controls_page/parental_controls_page.m.js'; export {AboutPageBrowserProxyImpl, BrowserChannel, UpdateStatus} from '../about_page/about_page_browser_proxy.js'; -export {LifetimeBrowserProxy, LifetimeBrowserProxyImpl} from '../lifetime_browser_proxy.js'; +export {LifetimeBrowserProxyImpl} from '../lifetime_browser_proxy.js'; export {pageVisibility} from '../page_visibility.js'; export {AccountManagerBrowserProxy, AccountManagerBrowserProxyImpl} from '../people_page/account_manager_browser_proxy.js'; export {ProfileInfoBrowserProxy, ProfileInfoBrowserProxyImpl} from '../people_page/profile_info_browser_proxy.js'; @@ -121,7 +121,7 @@ export {OsA11yPageBrowserProxy, OsA11yPageBrowserProxyImpl} from './os_a11y_page/os_a11y_page_browser_proxy.m.js'; export {SwitchAccessSubpageBrowserProxy, SwitchAccessSubpageBrowserProxyImpl} from './os_a11y_page/switch_access_subpage_browser_proxy.m.js'; export {TtsSubpageBrowserProxy, TtsSubpageBrowserProxyImpl} from './os_a11y_page/tts_subpage_browser_proxy.m.js'; -export {DeviceNameBrowserProxy, DeviceNameBrowserProxyImpl} from './os_about_page/device_name_browser_proxy.js'; +export {DeviceNameBrowserProxy, DeviceNameBrowserProxyImpl} from './os_about_page/device_name_browser_proxy.m.js'; export {AndroidAppsBrowserProxyImpl} from './os_apps_page/android_apps_browser_proxy.m.js'; export {addApp, changeApp, removeApp, updateSelectedAppId} from './os_apps_page/app_management_page/actions.m.js'; export {BrowserProxy} from './os_apps_page/app_management_page/browser_proxy.m.js';
diff --git a/chrome/browser/resources/settings/extension_control_browser_proxy.js b/chrome/browser/resources/settings/extension_control_browser_proxy.js deleted file mode 100644 index 532dcd6..0000000 --- a/chrome/browser/resources/settings/extension_control_browser_proxy.js +++ /dev/null
@@ -1,34 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import {addSingletonGetter} from 'chrome://resources/js/cr.m.js'; - - /** @interface */ - export class ExtensionControlBrowserProxy { - // TODO(dbeam): should be be returning !Promise<boolean> to indicate whether - // it succeeded? - /** @param {string} extensionId */ - disableExtension(extensionId) {} - - /** @param {string} extensionId */ - manageExtension(extensionId) {} - } - - /** - * @implements {ExtensionControlBrowserProxy} - */ - export class ExtensionControlBrowserProxyImpl { - /** @override */ - disableExtension(extensionId) { - chrome.send('disableExtension', [extensionId]); - } - - /** @override */ - manageExtension(extensionId) { - window.open('chrome://extensions?id=' + extensionId); - } - } - - addSingletonGetter(ExtensionControlBrowserProxyImpl); -
diff --git a/chrome/browser/resources/settings/extension_control_browser_proxy.ts b/chrome/browser/resources/settings/extension_control_browser_proxy.ts new file mode 100644 index 0000000..d317784 --- /dev/null +++ b/chrome/browser/resources/settings/extension_control_browser_proxy.ts
@@ -0,0 +1,26 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import {addSingletonGetter} from 'chrome://resources/js/cr.m.js'; + +export interface ExtensionControlBrowserProxy { + // TODO(dbeam): should be be returning !Promise<boolean> to indicate whether + // it succeeded? + disableExtension(extensionId: string): void; + + manageExtension(extensionId: string): void; +} + +export class ExtensionControlBrowserProxyImpl implements + ExtensionControlBrowserProxy { + disableExtension(extensionId: string) { + chrome.send('disableExtension', [extensionId]); + } + + manageExtension(extensionId: string) { + window.open('chrome://extensions?id=' + extensionId); + } +} + +addSingletonGetter(ExtensionControlBrowserProxyImpl);
diff --git a/chrome/browser/resources/settings/lifetime_browser_proxy.js b/chrome/browser/resources/settings/lifetime_browser_proxy.js deleted file mode 100644 index 995719c..0000000 --- a/chrome/browser/resources/settings/lifetime_browser_proxy.js +++ /dev/null
@@ -1,57 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// clang-format on -import {addSingletonGetter} from 'chrome://resources/js/cr.m.js'; -// clang-format off - - /** @interface */ - export class LifetimeBrowserProxy { - // Triggers a browser restart. - restart() {} - - // Triggers a browser relaunch. - relaunch() {} - - // <if expr="chromeos"> - // First signs out current user and then performs a restart. - signOutAndRestart() {} - - /** - * Triggers a factory reset. The parameter indicates whether to install a - * TPM firmware update (if available) after the reset. - * - * @param {boolean} requestTpmFirmwareUpdate - */ - factoryReset(requestTpmFirmwareUpdate) {} - // </if> - } - - /** @implements {LifetimeBrowserProxy} */ - export class LifetimeBrowserProxyImpl { - /** @override */ - restart() { - chrome.send('restart'); - } - - /** @override */ - relaunch() { - chrome.send('relaunch'); - } - - // <if expr="chromeos"> - /** @override */ - signOutAndRestart() { - chrome.send('signOutAndRestart'); - } - - /** @override */ - factoryReset(requestTpmFirmwareUpdate) { - chrome.send('factoryReset', [requestTpmFirmwareUpdate]); - } - // </if> - } - - addSingletonGetter(LifetimeBrowserProxyImpl); -
diff --git a/chrome/browser/resources/settings/lifetime_browser_proxy.ts b/chrome/browser/resources/settings/lifetime_browser_proxy.ts new file mode 100644 index 0000000..a7d49bb --- /dev/null +++ b/chrome/browser/resources/settings/lifetime_browser_proxy.ts
@@ -0,0 +1,48 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// clang-format on +import {addSingletonGetter} from 'chrome://resources/js/cr.m.js'; +// clang-format off + +export interface LifetimeBrowserProxy { + // Triggers a browser restart. + restart(): void; + + // Triggers a browser relaunch. + relaunch(): void; + + // <if expr="chromeos"> + // First signs out current user and then performs a restart. + signOutAndRestart(): void; + + /** + * Triggers a factory reset. The parameter indicates whether to install a + * TPM firmware update (if available) after the reset. + */ + factoryReset(requestTpmFirmwareUpdate: boolean): void; + // </if> +} + +export class LifetimeBrowserProxyImpl implements LifetimeBrowserProxy { + restart() { + chrome.send('restart'); + } + + relaunch() { + chrome.send('relaunch'); + } + + // <if expr="chromeos"> + signOutAndRestart() { + chrome.send('signOutAndRestart'); + } + + factoryReset(requestTpmFirmwareUpdate: boolean) { + chrome.send('factoryReset', [requestTpmFirmwareUpdate]); + } + // </if> +} + +addSingletonGetter(LifetimeBrowserProxyImpl);
diff --git a/chrome/browser/resources/settings/safety_check_page/safety_check_updates_child.js b/chrome/browser/resources/settings/safety_check_page/safety_check_updates_child.js index 4dd5648..cf19ef8 100644 --- a/chrome/browser/resources/settings/safety_check_page/safety_check_updates_child.js +++ b/chrome/browser/resources/settings/safety_check_page/safety_check_updates_child.js
@@ -12,7 +12,7 @@ import {WebUIListenerBehavior, WebUIListenerBehaviorInterface} from 'chrome://resources/js/web_ui_listener_behavior.m.js'; import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {LifetimeBrowserProxy, LifetimeBrowserProxyImpl} from '../lifetime_browser_proxy.js'; +import {LifetimeBrowserProxyImpl} from '../lifetime_browser_proxy.js'; import {MetricsBrowserProxy, MetricsBrowserProxyImpl, SafetyCheckInteractions} from '../metrics_browser_proxy.js'; import {SafetyCheckCallbackConstants, SafetyCheckUpdatesStatus} from './safety_check_browser_proxy.js'; @@ -71,9 +71,6 @@ constructor() { super(); - /** @private {!LifetimeBrowserProxy} */ - this.lifetimeBrowserProxy_ = LifetimeBrowserProxyImpl.getInstance(); - /** @private {!MetricsBrowserProxy} */ this.metricsBrowserProxy_ = MetricsBrowserProxyImpl.getInstance(); } @@ -141,7 +138,7 @@ this.metricsBrowserProxy_.recordAction( 'Settings.SafetyCheck.RelaunchAfterUpdates'); - this.lifetimeBrowserProxy_.relaunch(); + LifetimeBrowserProxyImpl.getInstance().relaunch(); } /**
diff --git a/chrome/browser/resources/settings/search_engines_page/omnibox_extension_entry.js b/chrome/browser/resources/settings/search_engines_page/omnibox_extension_entry.js index f39b5198..440d44f 100644 --- a/chrome/browser/resources/settings/search_engines_page/omnibox_extension_entry.js +++ b/chrome/browser/resources/settings/search_engines_page/omnibox_extension_entry.js
@@ -17,7 +17,7 @@ import {FocusRowBehavior, FocusRowBehaviorInterface} from 'chrome://resources/js/cr/ui/focus_row_behavior.m.js'; import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {ExtensionControlBrowserProxy, ExtensionControlBrowserProxyImpl} from '../extension_control_browser_proxy.js'; +import {ExtensionControlBrowserProxyImpl} from '../extension_control_browser_proxy.js'; import {SearchEngine} from './search_engines_browser_proxy.js'; @@ -52,7 +52,7 @@ constructor() { super(); - /** @private {!ExtensionControlBrowserProxy} */ + /** @private {!ExtensionControlBrowserProxyImpl} */ this.browserProxy_ = ExtensionControlBrowserProxyImpl.getInstance(); }
diff --git a/chrome/browser/signin/account_consistency_mode_manager.cc b/chrome/browser/signin/account_consistency_mode_manager.cc index f409628d..b967496 100644 --- a/chrome/browser/signin/account_consistency_mode_manager.cc +++ b/chrome/browser/signin/account_consistency_mode_manager.cc
@@ -27,7 +27,7 @@ #endif #if BUILDFLAG(IS_CHROMEOS_LACROS) -#include "chrome/browser/lacros/account_manager_util.h" +#include "chrome/browser/lacros/account_manager/account_manager_util.h" #endif using signin::AccountConsistencyMethod;
diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc index f6c2387b..3de78fc1a 100644 --- a/chrome/browser/signin/chrome_signin_client.cc +++ b/chrome/browser/signin/chrome_signin_client.cc
@@ -56,7 +56,7 @@ #endif #if BUILDFLAG(IS_CHROMEOS_LACROS) -#include "chrome/browser/lacros/account_manager_util.h" +#include "chrome/browser/lacros/account_manager/account_manager_util.h" #include "chromeos/crosapi/mojom/account_manager.mojom.h" #include "chromeos/lacros/lacros_service.h" #include "components/account_manager_core/account.h"
diff --git a/chrome/browser/supervised_user/permission_request_creator_mock.cc b/chrome/browser/supervised_user/permission_request_creator_mock.cc index 51f18de..466cef29 100644 --- a/chrome/browser/supervised_user/permission_request_creator_mock.cc +++ b/chrome/browser/supervised_user/permission_request_creator_mock.cc
@@ -17,30 +17,17 @@ namespace { -std::unique_ptr<base::DictionaryValue> GetManualBehaviorHostDict( - Profile* profile) { +std::unique_ptr<base::Value> GetManualBehaviorHostDict(Profile* profile) { SupervisedUserSettingsService* settings_service = SupervisedUserSettingsServiceFactory::GetForKey(profile->GetProfileKey()); - const base::DictionaryValue* local_settings = - settings_service->LocalSettingsForTest(); - std::unique_ptr<base::DictionaryValue> dict_to_insert; + const base::Value& local_settings = settings_service->LocalSettingsForTest(); - if (local_settings->HasKey( - supervised_users::kContentPackManualBehaviorHosts)) { - const base::DictionaryValue* dict_value; + const base::Value* dict_value = + local_settings.FindKey(supervised_users::kContentPackManualBehaviorHosts); + if (dict_value) + return base::Value::ToUniquePtrValue(dict_value->Clone()); - local_settings->GetDictionary( - supervised_users::kContentPackManualBehaviorHosts, &dict_value); - - std::unique_ptr<base::Value> clone = - std::make_unique<base::Value>(dict_value->Clone()); - - dict_to_insert = base::DictionaryValue::From(std::move(clone)); - } else { - dict_to_insert = std::make_unique<base::DictionaryValue>(); - } - - return dict_to_insert; + return std::make_unique<base::Value>(base::Value::Type::DICTIONARY); } } // namespace
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc b/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc index 47d32cd5..6ad3fe3 100644 --- a/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc +++ b/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc
@@ -165,23 +165,17 @@ SupervisedUserSettingsServiceFactory::GetForKey( profile->GetProfileKey()); - const base::DictionaryValue* local_settings = + const base::Value& local_settings = settings_service->LocalSettingsForTest(); - std::unique_ptr<base::DictionaryValue> dict_to_insert; + std::unique_ptr<base::Value> dict_to_insert; - if (local_settings->HasKey( - supervised_users::kContentPackManualBehaviorHosts)) { - const base::DictionaryValue* dict_value; - - local_settings->GetDictionary( - supervised_users::kContentPackManualBehaviorHosts, &dict_value); - - std::unique_ptr<base::Value> clone = - std::make_unique<base::Value>(dict_value->Clone()); - - dict_to_insert = base::DictionaryValue::From(std::move(clone)); + const base::Value* dict_value = local_settings.FindKey( + supervised_users::kContentPackManualBehaviorHosts); + if (dict_value) { + dict_to_insert = std::make_unique<base::Value>(dict_value->Clone()); } else { - dict_to_insert = std::make_unique<base::DictionaryValue>(); + dict_to_insert = + std::make_unique<base::Value>(base::Value::Type::DICTIONARY); } dict_to_insert->SetKey(host, base::Value(allowlist));
diff --git a/chrome/browser/supervised_user/supervised_user_settings_service.cc b/chrome/browser/supervised_user/supervised_user_settings_service.cc index ea087b3..2a92f66 100644 --- a/chrome/browser/supervised_user/supervised_user_settings_service.cc +++ b/chrome/browser/supervised_user/supervised_user_settings_service.cc
@@ -60,7 +60,7 @@ SupervisedUserSettingsService::SupervisedUserSettingsService() : active_(false), initialization_failed_(false), - local_settings_(new base::DictionaryValue) {} + local_settings_(base::Value::Type::DICTIONARY) {} SupervisedUserSettingsService::~SupervisedUserSettingsService() {} @@ -141,16 +141,16 @@ const std::string& key, std::unique_ptr<base::Value> value) { std::string key_suffix = key; - base::DictionaryValue* dict = nullptr; + base::Value* dict = nullptr; if (sync_processor_) { base::RecordAction(UserMetricsAction("ManagedUsers_UploadItem_Syncing")); dict = GetDictionaryAndSplitKey(&key_suffix); DCHECK(GetQueuedItems()->DictEmpty()); SyncChangeList change_list; SyncData data = CreateSyncDataForSetting(key, *value); - SyncChange::SyncChangeType change_type = - dict->HasKey(key_suffix) ? SyncChange::ACTION_UPDATE - : SyncChange::ACTION_ADD; + SyncChange::SyncChangeType change_type = dict->FindKey(key_suffix) + ? SyncChange::ACTION_UPDATE + : SyncChange::ACTION_ADD; change_list.push_back(SyncChange(FROM_HERE, change_type, data)); absl::optional<ModelError> error = sync_processor_->ProcessSyncChanges(FROM_HERE, change_list); @@ -168,10 +168,10 @@ const std::string& key, std::unique_ptr<base::Value> value) { if (value) - local_settings_->SetKey(key, - base::Value::FromUniquePtrValue(std::move(value))); + local_settings_.SetKey(key, + base::Value::FromUniquePtrValue(std::move(value))); else - local_settings_->RemoveKey(key); + local_settings_.RemoveKey(key); InformSubscribers(); } @@ -215,23 +215,20 @@ error_handler_ = std::move(error_handler); std::set<std::string> seen_keys; - for (base::DictionaryValue::Iterator it(*GetAtomicSettings()); !it.IsAtEnd(); - it.Advance()) { - seen_keys.insert(it.key()); + for (const auto it : GetAtomicSettings()->DictItems()) { + seen_keys.insert(it.first); } // Getting number of split setting items. - for (base::DictionaryValue::Iterator it(*GetSplitSettings()); !it.IsAtEnd(); - it.Advance()) { - const base::DictionaryValue* dict = nullptr; - it.value().GetAsDictionary(&dict); - for (base::DictionaryValue::Iterator jt(*dict); !jt.IsAtEnd(); - jt.Advance()) { - seen_keys.insert(MakeSplitSettingKey(it.key(), jt.key())); + for (const auto it : GetSplitSettings()->DictItems()) { + const base::Value& split_setting = it.second; + DCHECK(split_setting.is_dict()); + for (const auto jt : split_setting.DictItems()) { + seen_keys.insert(MakeSplitSettingKey(it.first, jt.first)); } } // Getting number of queued items. - base::DictionaryValue* queued_items = GetQueuedItems(); + base::Value* queued_items = GetQueuedItems(); // Clear all atomic and split settings, then recreate them from Sync data. Clear(); @@ -252,7 +249,7 @@ } std::string name_suffix = supervised_user_setting.name(); std::string name_key = name_suffix; - base::DictionaryValue* dict = GetDictionaryAndSplitKey(&name_suffix); + base::Value* dict = GetDictionaryAndSplitKey(&name_suffix); dict->SetKey(name_suffix, base::Value::FromUniquePtrValue(std::move(value))); if (seen_keys.find(name_key) == seen_keys.end()) { @@ -269,19 +266,18 @@ // Upload all the queued up items (either with an ADD or an UPDATE action, // depending on whether they already exist) and move them to split settings. SyncChangeList change_list; - for (base::DictionaryValue::Iterator it(*queued_items); !it.IsAtEnd(); - it.Advance()) { - std::string key_suffix = it.key(); + for (const auto it : queued_items->DictItems()) { + std::string key_suffix = it.first; std::string name_key = key_suffix; - base::DictionaryValue* dict = GetDictionaryAndSplitKey(&key_suffix); - SyncData data = CreateSyncDataForSetting(it.key(), it.value()); - SyncChange::SyncChangeType change_type = - dict->HasKey(key_suffix) ? SyncChange::ACTION_UPDATE - : SyncChange::ACTION_ADD; + base::Value* dict = GetDictionaryAndSplitKey(&key_suffix); + SyncData data = CreateSyncDataForSetting(it.first, it.second); + SyncChange::SyncChangeType change_type = dict->FindKey(key_suffix) + ? SyncChange::ACTION_UPDATE + : SyncChange::ACTION_ADD; change_list.push_back(SyncChange(FROM_HERE, change_type, data)); - dict->SetKey(key_suffix, it.value().Clone()); + dict->SetKey(key_suffix, it.second.Clone()); } - queued_items->Clear(); + queued_items->DictClear(); // Process all the accumulated changes from the queued items. if (!change_list.empty()) { @@ -303,18 +299,15 @@ ModelType type) const { DCHECK_EQ(syncer::SUPERVISED_USER_SETTINGS, type); SyncDataList data; - for (base::DictionaryValue::Iterator it(*GetAtomicSettings()); !it.IsAtEnd(); - it.Advance()) { - data.push_back(CreateSyncDataForSetting(it.key(), it.value())); + for (const auto it : GetAtomicSettings()->DictItems()) { + data.push_back(CreateSyncDataForSetting(it.first, it.second)); } - for (base::DictionaryValue::Iterator it(*GetSplitSettings()); !it.IsAtEnd(); - it.Advance()) { - const base::DictionaryValue* dict = nullptr; - it.value().GetAsDictionary(&dict); - for (base::DictionaryValue::Iterator jt(*dict); - !jt.IsAtEnd(); jt.Advance()) { + for (const auto it : GetSplitSettings()->DictItems()) { + const base::Value& split_setting = it.second; + DCHECK(split_setting.is_dict()); + for (const auto jt : split_setting.DictItems()) { data.push_back(CreateSyncDataForSetting( - MakeSplitSettingKey(it.key(), jt.key()), jt.value())); + MakeSplitSettingKey(it.first, jt.first), jt.second)); } } DCHECK_EQ(0u, GetQueuedItems()->DictSize()); @@ -331,14 +324,14 @@ const ::sync_pb::ManagedUserSettingSpecifics& supervised_user_setting = data.GetSpecifics().managed_user_setting(); std::string key = supervised_user_setting.name(); - base::DictionaryValue* dict = GetDictionaryAndSplitKey(&key); + base::Value* dict = GetDictionaryAndSplitKey(&key); SyncChange::SyncChangeType change_type = sync_change.change_type(); switch (change_type) { case SyncChange::ACTION_ADD: case SyncChange::ACTION_UPDATE: { std::unique_ptr<base::Value> value = JSONReader::ReadDeprecated(supervised_user_setting.value()); - if (dict->HasKey(key)) { + if (dict->FindKey(key)) { DLOG_IF(WARNING, change_type == SyncChange::ACTION_ADD) << "Value for key " << key << " already exists"; } else { @@ -349,8 +342,8 @@ break; } case SyncChange::ACTION_DELETE: { - DLOG_IF(WARNING, !dict->HasKey(key)) << "Trying to delete nonexistent " - << "key " << key; + DLOG_IF(WARNING, !dict->FindKey(key)) << "Trying to delete nonexistent " + << "key " << key; dict->RemoveKey(key); break; } @@ -385,30 +378,28 @@ InformSubscribers(); } -const base::DictionaryValue* -SupervisedUserSettingsService::LocalSettingsForTest() const { - return local_settings_.get(); +const base::Value& SupervisedUserSettingsService::LocalSettingsForTest() const { + return local_settings_; } -base::DictionaryValue* SupervisedUserSettingsService::GetDictionaryAndSplitKey( +base::Value* SupervisedUserSettingsService::GetDictionaryAndSplitKey( std::string* key) const { size_t pos = key->find_first_of(kSplitSettingKeySeparator); if (pos == std::string::npos) return GetAtomicSettings(); - base::DictionaryValue* split_settings = GetSplitSettings(); + base::Value* split_settings = GetSplitSettings(); std::string prefix = key->substr(0, pos); - base::DictionaryValue* dict = nullptr; - if (!split_settings->GetDictionary(prefix, &dict)) { - DCHECK(!split_settings->HasKey(prefix)); - dict = split_settings->SetDictionary( - prefix, std::make_unique<base::DictionaryValue>()); + base::Value* dict = split_settings->FindKey(prefix); + if (!dict) { + dict = split_settings->SetKey(prefix, + base::Value(base::Value::Type::DICTIONARY)); } key->erase(0, pos + 1); return dict; } -base::DictionaryValue* SupervisedUserSettingsService::GetOrCreateDictionary( +base::Value* SupervisedUserSettingsService::GetOrCreateDictionary( const std::string& key) const { base::Value* value = nullptr; if (!store_->GetMutableValue(key, &value)) { @@ -417,22 +408,19 @@ WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); store_->GetMutableValue(key, &value); } - base::DictionaryValue* dict = nullptr; - bool success = value->GetAsDictionary(&dict); - DCHECK(success); - return dict; + DCHECK(value->is_dict()); + return value; } -base::DictionaryValue* -SupervisedUserSettingsService::GetAtomicSettings() const { +base::Value* SupervisedUserSettingsService::GetAtomicSettings() const { return GetOrCreateDictionary(kAtomicSettings); } -base::DictionaryValue* SupervisedUserSettingsService::GetSplitSettings() const { +base::Value* SupervisedUserSettingsService::GetSplitSettings() const { return GetOrCreateDictionary(kSplitSettings); } -base::DictionaryValue* SupervisedUserSettingsService::GetQueuedItems() const { +base::Value* SupervisedUserSettingsService::GetQueuedItems() const { return GetOrCreateDictionary(kQueuedItems); } @@ -442,27 +430,26 @@ if (!active_ || initialization_failed_) return nullptr; - std::unique_ptr<base::DictionaryValue> settings(local_settings_->DeepCopy()); + base::Value settings(local_settings_.Clone()); - base::DictionaryValue* atomic_settings = GetAtomicSettings(); - for (base::DictionaryValue::Iterator it(*atomic_settings); !it.IsAtEnd(); - it.Advance()) { - if (!SettingShouldApplyToPrefs(it.key())) + base::Value* atomic_settings = GetAtomicSettings(); + for (const auto it : atomic_settings->DictItems()) { + if (!SettingShouldApplyToPrefs(it.first)) continue; - settings->Set(it.key(), std::make_unique<base::Value>(it.value().Clone())); + settings.SetKey(it.first, base::Value(it.second.Clone())); } - base::DictionaryValue* split_settings = GetSplitSettings(); - for (base::DictionaryValue::Iterator it(*split_settings); !it.IsAtEnd(); - it.Advance()) { - if (!SettingShouldApplyToPrefs(it.key())) + base::Value* split_settings = GetSplitSettings(); + for (const auto it : split_settings->DictItems()) { + if (!SettingShouldApplyToPrefs(it.first)) continue; - settings->Set(it.key(), std::make_unique<base::Value>(it.value().Clone())); + settings.SetKey(it.first, base::Value(it.second.Clone())); } - return settings; + return base::DictionaryValue::From( + base::Value::ToUniquePtrValue(std::move(settings))); } void SupervisedUserSettingsService::InformSubscribers() {
diff --git a/chrome/browser/supervised_user/supervised_user_settings_service.h b/chrome/browser/supervised_user/supervised_user_settings_service.h index 86ba7da..219a523 100644 --- a/chrome/browser/supervised_user/supervised_user_settings_service.h +++ b/chrome/browser/supervised_user/supervised_user_settings_service.h
@@ -143,19 +143,19 @@ void OnPrefValueChanged(const std::string& key) override; void OnInitializationCompleted(bool success) override; - const base::DictionaryValue* LocalSettingsForTest() const; + const base::Value& LocalSettingsForTest() const; // Returns the dictionary where a given Sync item should be stored, depending // on whether the supervised user setting is atomic or split. In case of a // split setting, the split setting prefix of |key| is removed, so that |key| // can be used to update the returned dictionary. - base::DictionaryValue* GetDictionaryAndSplitKey(std::string* key) const; + base::Value* GetDictionaryAndSplitKey(std::string* key) const; private: - base::DictionaryValue* GetOrCreateDictionary(const std::string& key) const; - base::DictionaryValue* GetAtomicSettings() const; - base::DictionaryValue* GetSplitSettings() const; - base::DictionaryValue* GetQueuedItems() const; + base::Value* GetOrCreateDictionary(const std::string& key) const; + base::Value* GetAtomicSettings() const; + base::Value* GetSplitSettings() const; + base::Value* GetQueuedItems() const; // Returns a dictionary with all supervised user settings if the service is // active, or NULL otherwise. @@ -180,7 +180,7 @@ base::OnceClosure wait_until_ready_to_sync_cb_; // A set of local settings that are fixed and not configured remotely. - std::unique_ptr<base::DictionaryValue> local_settings_; + base::Value local_settings_; SettingsCallbackList settings_callback_list_;
diff --git a/chrome/browser/sync/test/integration/enable_disable_test.cc b/chrome/browser/sync/test/integration/enable_disable_test.cc index 3f7369b..a07c35a 100644 --- a/chrome/browser/sync/test/integration/enable_disable_test.cc +++ b/chrome/browser/sync/test/integration/enable_disable_test.cc
@@ -31,6 +31,7 @@ using syncer::ModelTypeFromString; using syncer::ModelTypeSet; using syncer::ModelTypeToString; +using syncer::ProxyTypes; using syncer::SyncUserSettings; using syncer::UserSelectableType; using syncer::UserSelectableTypeSet; @@ -62,8 +63,8 @@ return multi; } -// This test enables and disables types and verifies the type is active via -// SyncService::GetActiveDataTypes(). +// This test enables and disables types and verifies the type is sufficiently +// affected by checking for existence of a root node. class EnableDisableSingleClientTest : public SyncTest { public: EnableDisableSingleClientTest() : SyncTest(SINGLE_CLIENT) {} @@ -72,8 +73,33 @@ // Don't use self-notifications as they can trigger additional sync cycles. bool TestUsesSelfNotifications() override { return false; } - bool IsModelTypeActive(ModelType type) { - return GetSyncService(0)->GetActiveDataTypes().Has(type); + bool ModelTypeExists(ModelType type) { + base::RunLoop loop; + std::unique_ptr<base::ListValue> all_nodes; + GetSyncService(0)->GetAllNodesForDebugging( + base::BindLambdaForTesting([&](std::unique_ptr<base::ListValue> nodes) { + all_nodes = std::move(nodes); + loop.Quit(); + })); + loop.Run(); + // Look for the root node corresponding to |type|. + for (const base::Value& value : all_nodes->GetList()) { + DCHECK(value.is_dict()); + const base::Value* nodes = value.FindKey("nodes"); + DCHECK(nodes); + DCHECK(nodes->is_list()); + // Ignore types that are empty, because we expect the root node. + if (nodes->GetList().empty()) { + continue; + } + const base::Value* model_type = value.FindKey("type"); + DCHECK(model_type); + DCHECK(model_type->is_string()); + if (type == ModelTypeFromString(model_type->GetString())) { + return true; + } + } + return false; } void InjectSyncedBookmark() { @@ -110,6 +136,7 @@ ModelTypeSet grouped_types = syncer::SyncUserSettingsImpl::ResolvePreferredTypesForTesting({type}); grouped_types.RetainAll(registered_data_types_); + grouped_types.RemoveAll(ProxyTypes()); return grouped_types; } @@ -127,27 +154,14 @@ DISALLOW_COPY_AND_ASSIGN(EnableDisableSingleClientTest); }; -// TODO(crbug.com/1235713): Possibly fails/flaky on Linux. -#if defined(OS_LINUX) -#define MAYBE_EnableOneAtATime DISABLED_EnableOneAtATime -#else -#define MAYBE_EnableOneAtATime EnableOneAtATime -#endif -IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, MAYBE_EnableOneAtATime) { +IN_PROC_BROWSER_TEST_F(EnableDisableSingleClientTest, EnableOneAtATime) { // Setup sync with no enabled types. SetupTest(/*all_types_enabled=*/false); - // Certain datatypes like SESSIONS can be configured by multiple - // user-selectable types. Hence, enabling a new user-selectable type doesn't - // necessarily mean that the datatype (SESSIONS) will be newly-configured. In - // this particular test, this influences whether the engine will issue UMA - // corresponding to the configuration cycle. - syncer::ModelTypeSet previously_active_types; - for (UserSelectableType type : registered_selectable_types_) { const ModelTypeSet grouped_types = ResolveGroup(type); for (ModelType single_grouped_type : WithoutMultiTypes(grouped_types)) { - ASSERT_FALSE(IsModelTypeActive(single_grouped_type)) + ASSERT_FALSE(ModelTypeExists(single_grouped_type)) << " for " << GetUserSelectableTypeName(type); } @@ -155,12 +169,10 @@ EXPECT_TRUE(GetClient(0)->EnableSyncForType(type)); for (ModelType grouped_type : grouped_types) { - EXPECT_TRUE(IsModelTypeActive(grouped_type)) + EXPECT_TRUE(ModelTypeExists(grouped_type)) << " for " << GetUserSelectableTypeName(type); - if (!syncer::ProtocolTypes().Has(grouped_type) || - syncer::CommitOnlyTypes().Has(grouped_type) || - previously_active_types.Has(grouped_type)) { + if (syncer::CommitOnlyTypes().Has(grouped_type)) { EXPECT_EQ(0, histogram_tester.GetBucketCount( "Sync.PostedDataTypeGetUpdatesRequest", @@ -173,8 +185,6 @@ static_cast<int>(ModelTypeHistogramValue(grouped_type)))) << " for " << ModelTypeToString(grouped_type); } - - previously_active_types.Put(grouped_type); } } } @@ -186,14 +196,14 @@ for (UserSelectableType type : registered_selectable_types_) { const ModelTypeSet grouped_types = ResolveGroup(type); for (ModelType grouped_type : grouped_types) { - ASSERT_TRUE(IsModelTypeActive(grouped_type)) + ASSERT_TRUE(ModelTypeExists(grouped_type)) << " for " << GetUserSelectableTypeName(type); } EXPECT_TRUE(GetClient(0)->DisableSyncForType(type)); for (ModelType single_grouped_type : WithoutMultiTypes(grouped_types)) { - EXPECT_FALSE(IsModelTypeActive(single_grouped_type)) + EXPECT_FALSE(ModelTypeExists(single_grouped_type)) << " for " << GetUserSelectableTypeName(type); } } @@ -201,7 +211,7 @@ // Lastly make sure that all the multi grouped times are all gone, since we // did not check these after disabling inside the above loop. for (ModelType multi_grouped_type : multi_grouped_types_) { - EXPECT_FALSE(IsModelTypeActive(multi_grouped_type)) + EXPECT_FALSE(ModelTypeExists(multi_grouped_type)) << " for " << ModelTypeToString(multi_grouped_type); } } @@ -215,7 +225,7 @@ const ModelTypeSet grouped_types = ResolveGroup(type); const ModelTypeSet single_grouped_types = WithoutMultiTypes(grouped_types); for (ModelType single_grouped_type : single_grouped_types) { - ASSERT_FALSE(IsModelTypeActive(single_grouped_type)) + ASSERT_FALSE(ModelTypeExists(single_grouped_type)) << " for " << GetUserSelectableTypeName(type); } @@ -225,7 +235,7 @@ EXPECT_TRUE(GetClient(0)->DisableSyncForType(type)); for (ModelType single_grouped_type : single_grouped_types) { - EXPECT_FALSE(IsModelTypeActive(single_grouped_type)) + EXPECT_FALSE(ModelTypeExists(single_grouped_type)) << " for " << GetUserSelectableTypeName(type); } } @@ -233,7 +243,7 @@ // Lastly make sure that all the multi grouped times are all gone, since we // did not check these after disabling inside the above loop. for (ModelType multi_grouped_type : multi_grouped_types_) { - EXPECT_FALSE(IsModelTypeActive(multi_grouped_type)) + EXPECT_FALSE(ModelTypeExists(multi_grouped_type)) << " for " << ModelTypeToString(multi_grouped_type); } } @@ -246,7 +256,7 @@ for (UserSelectableType type : registered_selectable_types_) { const ModelTypeSet grouped_types = ResolveGroup(type); for (ModelType grouped_type : grouped_types) { - ASSERT_TRUE(IsModelTypeActive(grouped_type)) + ASSERT_TRUE(ModelTypeExists(grouped_type)) << " for " << GetUserSelectableTypeName(type); } @@ -256,7 +266,7 @@ EXPECT_TRUE(GetClient(0)->EnableSyncForType(type)); for (ModelType grouped_type : grouped_types) { - EXPECT_TRUE(IsModelTypeActive(grouped_type)) + EXPECT_TRUE(ModelTypeExists(grouped_type)) << " for " << GetUserSelectableTypeName(type); } } @@ -271,7 +281,7 @@ const ModelTypeSet single_grouped_types = WithoutMultiTypes(ResolveGroup(type)); for (ModelType single_grouped_type : single_grouped_types) { - ASSERT_FALSE(IsModelTypeActive(single_grouped_type)) + ASSERT_FALSE(ModelTypeExists(single_grouped_type)) << " for " << GetUserSelectableTypeName(type); } @@ -282,7 +292,7 @@ EXPECT_TRUE(GetClient(0)->EnableSyncForType(type)); for (ModelType single_grouped_type : single_grouped_types) { - EXPECT_TRUE(IsModelTypeActive(single_grouped_type)) + EXPECT_TRUE(ModelTypeExists(single_grouped_type)) << " for " << GetUserSelectableTypeName(type); } } @@ -299,7 +309,7 @@ for (UserSelectableType type : UserSelectableTypeSet::All()) { for (ModelType grouped_type : ResolveGroup(type)) { - EXPECT_FALSE(IsModelTypeActive(grouped_type)) + EXPECT_FALSE(ModelTypeExists(grouped_type)) << " for " << GetUserSelectableTypeName(type); } } @@ -316,7 +326,7 @@ for (UserSelectableType type : UserSelectableTypeSet::All()) { for (ModelType model_type : ResolveGroup(type)) { - EXPECT_TRUE(IsModelTypeActive(model_type)) + EXPECT_TRUE(ModelTypeExists(model_type)) << " for " << ModelTypeToString(model_type); } } @@ -334,7 +344,7 @@ for (UserSelectableType type : UserSelectableTypeSet::All()) { for (ModelType model_type : ResolveGroup(type)) { - EXPECT_TRUE(IsModelTypeActive(model_type)) + EXPECT_TRUE(ModelTypeExists(model_type)) << " for " << ModelTypeToString(model_type); } }
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd index 1c17a66b..366b49c 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -1659,10 +1659,10 @@ <message name="IDS_CHROME_ADDITIONAL_TERMS_OF_SERVICE_URL" desc="URL for Chrome and Chrome OS additional terms of service" translateable="false"> https://www.google.com/chrome/terms/ </message> - <message name="IDS_PRIVACY_POLICY_TITLE" desc="Title for the Chrome privacy policy"> - Chrome Privacy Policy + <message name="IDS_PRIVACY_POLICY_TITLE" desc="Title for the Google privacy policy"> + Google Privacy Policy </message> - <message name="IDS_CHROME_PRIVACY_POLICY_URL" desc="URL for the Chrome privacy policy" translateable="false"> + <message name="IDS_GOOGLE_PRIVACY_POLICY_URL" desc="URL for the Google privacy policy" translateable="false"> https://policies.google.com/privacy </message> <message name="IDS_FAMILY_LINK_PRIVACY_POLICY_URL" desc="URL for the Family Link privacy policy" translateable="false">
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_PRIVACY_POLICY_TITLE.png.sha1 b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_PRIVACY_POLICY_TITLE.png.sha1 index e574b1a..cae39b4 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_PRIVACY_POLICY_TITLE.png.sha1 +++ b/chrome/browser/ui/android/strings/android_chrome_strings_grd/IDS_PRIVACY_POLICY_TITLE.png.sha1
@@ -1 +1 @@ -a11ffdbf3d5234ccb829ad57c183482c670070d2 \ No newline at end of file +e68952f21522faa9fdee3b19b306bee5ca493813 \ No newline at end of file
diff --git a/chrome/browser/ui/ash/shelf/browser_apps_tracker.cc b/chrome/browser/ui/ash/shelf/browser_apps_tracker.cc index 00bd0ab..2d81c7a0 100644 --- a/chrome/browser/ui/ash/shelf/browser_apps_tracker.cc +++ b/chrome/browser/ui/ash/shelf/browser_apps_tracker.cc
@@ -25,7 +25,6 @@ #include "extensions/browser/extension_system.h" #include "extensions/common/constants.h" #include "extensions/common/extension.h" -#include "ui/wm/public/activation_client.h" namespace { @@ -50,9 +49,7 @@ } bool IsBrowserActive(Browser* browser) { - aura::Window* window = browser->window()->GetNativeWindow(); - auto* client = wm::GetActivationClient(window->GetRootWindow()); - return client && window == client->GetActiveWindow(); + return browser->window()->IsActive(); } bool IsAppVisible(Browser* browser, content::WebContents* contents) { @@ -95,17 +92,14 @@ "EnableBrowserAppsTracker", base::FEATURE_DISABLED_BY_DEFAULT}; BrowserAppsTracker::BrowserAppsTracker( - apps::AppRegistryCache& app_registry_cache, - wm::ActivationClient* activation_client) + apps::AppRegistryCache& app_registry_cache) : apps::AppRegistryCache::Observer(&app_registry_cache), - browser_tab_strip_tracker_(this, nullptr), - activation_client_(activation_client) { - DCHECK(activation_client_); - activation_client_->AddObserver(this); + browser_tab_strip_tracker_(this, nullptr) { + BrowserList::GetInstance()->AddObserver(this); } BrowserAppsTracker::~BrowserAppsTracker() { - activation_client_->RemoveObserver(this); + BrowserList::GetInstance()->RemoveObserver(this); } void BrowserAppsTracker::Initialize() { @@ -187,18 +181,22 @@ void BrowserAppsTracker::OnWindowVisibilityChanged(aura::Window* window, bool visible) { DCHECK(window); - OnBrowserWindowUpdated(window); + // We only want to send window events for the browsers we track to avoid + // sending window events before a "browser added" event. + if (Browser* browser = FindTrackedBrowserByWindow(window)) { + OnBrowserWindowUpdated(browser); + } } -void BrowserAppsTracker::OnWindowActivated( - wm::ActivationChangeObserver::ActivationReason reason, - aura::Window* gained_active, - aura::Window* lost_active) { - if (gained_active) { - OnBrowserWindowUpdated(gained_active); +void BrowserAppsTracker::OnBrowserSetLastActive(Browser* browser) { + if (base::Contains(browser_to_tab_map_, browser)) { + OnBrowserWindowUpdated(browser); } - if (lost_active) { - OnBrowserWindowUpdated(lost_active); +} + +void BrowserAppsTracker::OnBrowserNoLongerActive(Browser* browser) { + if (base::Contains(browser_to_tab_map_, browser)) { + OnBrowserWindowUpdated(browser); } } @@ -230,7 +228,7 @@ for (const auto& inserted_tab : insert.contents) { auto& known_tabs = browser_to_tab_map_[browser]; if (known_tabs.size() == 0) { - OnBrowserAdded(browser); + OnBrowserFirstTabAttached(browser); BrowserWindow* window = browser->window(); if (window && window->GetNativeWindow()) { browser_window_observations_.AddObservation(window->GetNativeWindow()); @@ -302,7 +300,7 @@ BrowserWindow* window = browser->window(); DCHECK(window && window->GetNativeWindow()); browser_window_observations_.RemoveObservation(window->GetNativeWindow()); - OnBrowserRemoved(browser); + OnBrowserLastTabDetached(browser); browser_to_tab_map_.erase(browser); } } @@ -335,13 +333,13 @@ } } -void BrowserAppsTracker::OnBrowserAdded(Browser* browser) { +void BrowserAppsTracker::OnBrowserFirstTabAttached(Browser* browser) { if (browser->is_type_normal()) { CreateChromeInstance(browser); } } -void BrowserAppsTracker::OnBrowserRemoved(Browser* browser) { +void BrowserAppsTracker::OnBrowserLastTabDetached(Browser* browser) { RemoveChromeInstanceIfExists(browser); } @@ -400,14 +398,7 @@ } } -void BrowserAppsTracker::OnBrowserWindowUpdated(aura::Window* window) { - // We only want to send window events for the browsers we track to avoid - // sending window events before a "browser added" event. - Browser* browser = FindTrackedBrowserByWindow(window); - if (!browser) { - return; - } - +void BrowserAppsTracker::OnBrowserWindowUpdated(Browser* browser) { auto it = chrome_instances_.find(browser); if (it != chrome_instances_.end()) { MaybeUpdateChromeInstance(*it->second);
diff --git a/chrome/browser/ui/ash/shelf/browser_apps_tracker.h b/chrome/browser/ui/ash/shelf/browser_apps_tracker.h index 93f4009..8b98178 100644 --- a/chrome/browser/ui/ash/shelf/browser_apps_tracker.h +++ b/chrome/browser/ui/ash/shelf/browser_apps_tracker.h
@@ -16,20 +16,16 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/ash/shelf/browser_app_status_observer.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_list_observer.h" #include "chrome/browser/ui/browser_tab_strip_tracker.h" #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" #include "components/services/app_service/public/cpp/app_registry_cache.h" #include "content/public/browser/web_contents.h" #include "ui/aura/window.h" #include "ui/aura/window_observer.h" -#include "ui/wm/public/activation_change_observer.h" class Browser; -namespace wm { -class ActivationClient; -} - // BrowserAppsTracker monitors changes to Browsers, TabStripModels and browsers' // native windows to maintain a list of running apps and notify its registered // observers of any changes: @@ -38,12 +34,11 @@ class BrowserAppsTracker : public TabStripModelObserver, public aura::WindowObserver, public apps::AppRegistryCache::Observer, - public wm::ActivationChangeObserver { + public BrowserListObserver { public: static const base::Feature kEnabled; - BrowserAppsTracker(apps::AppRegistryCache& app_registry_cache, - wm::ActivationClient* activation_client); + explicit BrowserAppsTracker(apps::AppRegistryCache& app_registry_cache); ~BrowserAppsTracker() override; BrowserAppsTracker(const BrowserAppsTracker&) = delete; BrowserAppsTracker& operator=(const BrowserAppsTracker&) = delete; @@ -82,10 +77,9 @@ // aura::WindowObserver overrides: void OnWindowVisibilityChanged(aura::Window* window, bool visible) override; - // ActivationChangeObserver overrides: - void OnWindowActivated(wm::ActivationChangeObserver::ActivationReason reason, - aura::Window* gained_active, - aura::Window* lost_active) override; + // BrowserListObserver overrides: + void OnBrowserSetLastActive(Browser* browser) override; + void OnBrowserNoLongerActive(Browser* browser) override; // apps::AppRegistryCache::Observer: void OnAppUpdate(const apps::AppUpdate& update) override; @@ -109,8 +103,8 @@ const TabStripSelectionChange& selection); // Called by OnTabStripModelChange* functions. - void OnBrowserAdded(Browser* browser); - void OnBrowserRemoved(Browser* browser); + void OnBrowserFirstTabAttached(Browser* browser); + void OnBrowserLastTabDetached(Browser* browser); void OnTabCreated(Browser* browser, content::WebContents* contents); void OnTabAttached(Browser* browser, content::WebContents* contents); void OnTabUpdated(Browser* browser, content::WebContents* contents); @@ -120,7 +114,7 @@ void OnTabNavigationFinished(content::WebContents* contents); // Called on browser window changes. Sends update events for all open tabs. - void OnBrowserWindowUpdated(aura::Window* window); + void OnBrowserWindowUpdated(Browser* browser); Browser* FindTrackedBrowserByWindow(aura::Window* window); @@ -177,7 +171,6 @@ browser_window_observations_{this}; BrowserTabStripTracker browser_tab_strip_tracker_; - wm::ActivationClient* activation_client_; #if DCHECK_IS_ON() // Tabs that are removed from one browser and are getting reinserted into
diff --git a/chrome/browser/ui/ash/shelf/browser_apps_tracker_browsertest.cc b/chrome/browser/ui/ash/shelf/browser_apps_tracker_browsertest.cc index 525ff7f..dedbe74 100644 --- a/chrome/browser/ui/ash/shelf/browser_apps_tracker_browsertest.cc +++ b/chrome/browser/ui/ash/shelf/browser_apps_tracker_browsertest.cc
@@ -20,7 +20,6 @@ #include "content/public/browser/page_navigator.h" #include "content/public/test/test_navigation_observer.h" #include "extensions/common/constants.h" -#include "ui/wm/public/activation_client.h" // default implementation of RunTestOnMainThread() and TestBody() #include "content/public/test/browser_test.h" @@ -212,8 +211,7 @@ Profile* profile = ProfileManager::GetPrimaryUserProfile(); apps::AppServiceProxyChromeOs* proxy = apps::AppServiceProxyFactory::GetForProfile(profile); - tracker_ = std::make_unique<BrowserAppsTracker>( - proxy->AppRegistryCache(), ash::Shell::Get()->activation_client()); + tracker_ = std::make_unique<BrowserAppsTracker>(proxy->AppRegistryCache()); tracker_->Initialize(); ASSERT_EQ(kAppAId, InstallWebApp("https://a.example.org")); @@ -467,18 +465,15 @@ auto* bg_tab = InsertForegroundTab(browser, "https://a.example.org"); auto* fg_tab = InsertForegroundTab(browser, "https://b.example.org"); InsertForegroundTab(browser, "https://c.example.org"); - auto* window = browser->window()->GetNativeWindow(); - auto* activation_client = ash::Shell::Get()->activation_client(); // Prevent spurious deactivation events. - activation_client->DeactivateWindow(window); - ASSERT_EQ(activation_client->GetActiveWindow(), nullptr); + browser->window()->Deactivate(); // Hide the window. { SCOPED_TRACE("hide window"); Recorder recorder(tracker_.get()); - window->Hide(); + browser->window()->GetNativeWindow()->Hide(); recorder.Verify({ {"updated", kChromeAppId, browser, nullptr, kHidden, kInactive}, {"updated", kAppAId, browser, bg_tab, kHidden, kInactive}, @@ -491,7 +486,7 @@ SCOPED_TRACE("show window"); Recorder recorder(tracker_.get()); - window->Show(); + browser->window()->GetNativeWindow()->Show(); recorder.Verify({ {"updated", kChromeAppId, browser, nullptr, kVisible, kInactive}, {"updated", kAppAId, browser, bg_tab, kVisible, kInactive}, @@ -506,30 +501,28 @@ InsertForegroundTab(browser1, "https://a.example.org"); InsertForegroundTab(browser1, "https://c.example.org"); auto* fg_tab1 = InsertForegroundTab(browser1, "https://b.example.org"); - auto* window1 = browser1->window()->GetNativeWindow(); auto* browser2 = CreateBrowser(); InsertForegroundTab(browser2, "https://a.example.org"); InsertForegroundTab(browser2, "https://c.example.org"); auto* fg_tab2 = InsertForegroundTab(browser2, "https://b.example.org"); - auto* window2 = browser2->window()->GetNativeWindow(); - auto* activation_client = ash::Shell::Get()->activation_client(); - ASSERT_EQ(activation_client->GetActiveWindow(), window2); + ASSERT_FALSE(browser1->window()->IsActive()); + ASSERT_TRUE(browser2->window()->IsActive()); // Activate window 1. { SCOPED_TRACE("activate window 1"); Recorder recorder(tracker_.get()); - activation_client->ActivateWindow(window1); + browser1->window()->Activate(); recorder.Verify({ - // activated first - {"updated", kChromeAppId, browser1, nullptr, kVisible, kActive}, - {"updated", kAppBId, browser1, fg_tab1, kVisible, kActive}, - // then deactivated + // deactivated first {"updated", kChromeAppId, browser2, nullptr, kVisible, kInactive}, {"updated", kAppBId, browser2, fg_tab2, kVisible, kInactive}, + // then activated + {"updated", kChromeAppId, browser1, nullptr, kVisible, kActive}, + {"updated", kAppBId, browser1, fg_tab1, kVisible, kActive}, }); } @@ -538,14 +531,14 @@ SCOPED_TRACE("activate window 2"); Recorder recorder(tracker_.get()); - activation_client->ActivateWindow(window2); + browser2->window()->Activate(); recorder.Verify({ - // activated first - {"updated", kChromeAppId, browser2, nullptr, kVisible, kActive}, - {"updated", kAppBId, browser2, fg_tab2, kVisible, kActive}, - // then deactivated + // deactivated first {"updated", kChromeAppId, browser1, nullptr, kVisible, kInactive}, {"updated", kAppBId, browser1, fg_tab1, kVisible, kInactive}, + // then activated + {"updated", kChromeAppId, browser2, nullptr, kVisible, kActive}, + {"updated", kAppBId, browser2, fg_tab2, kVisible, kActive}, }); } } @@ -555,16 +548,14 @@ auto* browser1 = CreateBrowser(); InsertForegroundTab(browser1, "https://a.example.org"); auto* fg_tab1 = InsertForegroundTab(browser1, "https://b.example.org"); - auto* window1 = browser1->window()->GetNativeWindow(); auto* browser2 = CreateBrowser(); InsertForegroundTab(browser2, "https://a.example.org"); auto* bg_tab2 = InsertForegroundTab(browser2, "https://a.example.org"); auto* fg_tab2 = InsertForegroundTab(browser2, "https://b.example.org"); - auto* window2 = browser2->window()->GetNativeWindow(); - auto* activation_client = ash::Shell::Get()->activation_client(); - ASSERT_EQ(activation_client->GetActiveWindow(), window2); + ASSERT_FALSE(browser1->window()->IsActive()); + ASSERT_TRUE(browser2->window()->IsActive()); // Drag the active tab of browser 2 and rop it into the last position in // browser 1. @@ -580,7 +571,7 @@ browser2->tab_strip_model()->DetachWebContentsAtForInsertion(src_index); // Target browser window goes into foreground right before drop. - activation_client->ActivateWindow(window1); + browser1->window()->Activate(); // Attach. int dst_index = browser1->tab_strip_model()->count(); @@ -590,12 +581,12 @@ // background tab in the dragged-from browser gets activated when the // active tab is detached {"updated", kAppAId, browser2, bg_tab2, kVisible, kActive}, - // dragged-into browser window goes into foreground - {"updated", kChromeAppId, browser1, nullptr, kVisible, kActive}, - {"updated", kAppBId, browser1, fg_tab1, kVisible, kActive}, // dragged-from browser goes into background {"updated", kChromeAppId, browser2, nullptr, kVisible, kInactive}, {"updated", kAppAId, browser2, bg_tab2, kVisible, kInactive}, + // dragged-into browser window goes into foreground + {"updated", kChromeAppId, browser1, nullptr, kVisible, kActive}, + {"updated", kAppBId, browser1, fg_tab1, kVisible, kActive}, // previously foreground tab in the dragged-into browser goes into // background when the dragged tab is attached to the new browser {"updated", kAppBId, browser1, fg_tab1, kVisible, kInactive}, @@ -618,8 +609,9 @@ auto* browser3 = CreateAppBrowser(kAppBId); auto* b3_tab1 = InsertForegroundTab(browser3, "https://b.example.org"); - ASSERT_EQ(ash::Shell::Get()->activation_client()->GetActiveWindow(), - browser3->window()->GetNativeWindow()); + ASSERT_FALSE(browser1->window()->IsActive()); + ASSERT_FALSE(browser2->window()->IsActive()); + ASSERT_TRUE(browser3->window()->IsActive()); auto* b1_app = tracker_->GetChromeInstance(browser1); auto* b1_tab1_app = tracker_->GetAppInstance(b1_tab1);
diff --git a/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc b/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc index 99ec9c9..3bf88bc 100644 --- a/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc +++ b/chrome/browser/ui/ash/shelf/chrome_shelf_controller.cc
@@ -258,8 +258,8 @@ if (base::FeatureList::IsEnabled(BrowserAppsTracker::kEnabled)) { apps::AppServiceProxyChromeOs* proxy = apps::AppServiceProxyFactory::GetForProfile(profile); - browser_apps_tracker_ = std::make_unique<BrowserAppsTracker>( - proxy->AppRegistryCache(), ash::Shell::Get()->activation_client()); + browser_apps_tracker_ = + std::make_unique<BrowserAppsTracker>(proxy->AppRegistryCache()); } }
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc index 1838ba3..a1f81e6e 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -89,7 +89,7 @@ #endif #if BUILDFLAG(IS_CHROMEOS_LACROS) -#include "chrome/browser/lacros/account_manager_util.h" +#include "chrome/browser/lacros/account_manager/account_manager_util.h" #include "chrome/browser/lacros/lacros_prefs.h" #include "chrome/browser/lacros/lacros_startup_infobar_delegate.h" #include "chromeos/lacros/lacros_service.h"
diff --git a/chrome/browser/ui/webui/chromeos/login/offline_login_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/offline_login_screen_handler.cc index 9e34267..4d41567f 100644 --- a/chrome/browser/ui/webui/chromeos/login/offline_login_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/offline_login_screen_handler.cc
@@ -108,4 +108,8 @@ CallJS("login.OfflineLoginScreen.showOnlineRequiredDialog"); } +void OfflineLoginScreenHandler::ShowPasswordMismatchMessage() { + CallJS("login.OfflineLoginScreen.showPasswordMismatchMessage"); +} + } // namespace chromeos
diff --git a/chrome/browser/ui/webui/chromeos/login/offline_login_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/offline_login_screen_handler.h index d693563..6e17bb1 100644 --- a/chrome/browser/ui/webui/chromeos/login/offline_login_screen_handler.h +++ b/chrome/browser/ui/webui/chromeos/login/offline_login_screen_handler.h
@@ -45,6 +45,9 @@ // Shows error pop-up when the user cannot login offline. virtual void ShowOnlineRequiredDialog() = 0; + + // Shows error message for not matching email/password pair. + virtual void ShowPasswordMismatchMessage() = 0; }; class OfflineLoginScreenHandler : public BaseScreenHandler, @@ -72,6 +75,7 @@ void LoadParams(base::DictionaryValue& params) override; void ShowPasswordPage() override; void ShowOnlineRequiredDialog() override; + void ShowPasswordMismatchMessage() override; // BaseScreenHandler: void RegisterMessages() override;
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc index 18e28c6..bc7d05e 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -343,7 +343,7 @@ AddCallback("launchIncognito", &SigninScreenHandler::HandleLaunchIncognito); AddCallback("launchSAMLPublicSession", &SigninScreenHandler::HandleLaunchSAMLPublicSession); - AddRawCallback("offlineLogin", &SigninScreenHandler::HandleOfflineLogin); + AddCallback("offlineLogin", &SigninScreenHandler::HandleOfflineLogin); // TODO(crbug.com/1100910): migrate logic to dedicated test api. AddCallback("toggleEnrollmentScreen", &SigninScreenHandler::HandleToggleEnrollmentScreen); @@ -683,17 +683,15 @@ delegate_->Login(context, SigninSpecifics()); } -void SigninScreenHandler::HandleOfflineLogin(const base::ListValue* args) { +void SigninScreenHandler::HandleOfflineLogin() { if (!delegate_) { NOTREACHED(); return; } - std::string email; - args->GetString(0, &email); auto* offline_login_screen = WizardController::default_controller()->GetScreen<OfflineLoginScreen>(); - offline_login_screen->LoadOffline(email); + offline_login_screen->LoadOffline(); HideOfflineMessage(NetworkStateInformer::OFFLINE, NetworkError::ERROR_REASON_NONE); LoginDisplayHost::default_host()->StartWizard(OfflineLoginView::kScreenId);
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h index 3e0a9f9..58a6635 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h
@@ -41,10 +41,6 @@ } // namespace mojom } // namespace ash -namespace base { -class ListValue; -} - namespace chromeos { class CoreOobeView; @@ -195,7 +191,7 @@ bool authenticated_by_pin); void HandleLaunchIncognito(); void HandleLaunchSAMLPublicSession(const std::string& email); - void HandleOfflineLogin(const base::ListValue* args); + void HandleOfflineLogin(); void HandleToggleEnrollmentScreen(); void HandleToggleResetScreen(); void HandleToggleKioskAutolaunchScreen();
diff --git a/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc b/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc index 9b45fd7..9ce3c1c2 100644 --- a/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc +++ b/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
@@ -118,17 +118,24 @@ : kValueFalse}}), PrinterSemanticCapsAndDefaults::Papers(), caps->has_secure_protocol, base::OptionalOrNullptr(caps->capabilities)); + + // TODO(b/195001379, jkopanski): This block of code should be removed once + // Ash Chrome M94 is on stable channel. base::Value policies(base::Value::Type::DICTIONARY); - policies.SetIntKey(kAllowedColorModes, caps->allowed_color_modes); - policies.SetIntKey(kAllowedDuplexModes, caps->allowed_duplex_modes); - policies.SetIntKey(kAllowedPinModes, - static_cast<int>(caps->allowed_pin_modes)); + policies.SetIntKey(kAllowedColorModes, caps->allowed_color_modes_deprecated); + policies.SetIntKey(kAllowedDuplexModes, + caps->allowed_duplex_modes_deprecated); + policies.SetIntKey( + kAllowedPinModes, + static_cast<int>(caps->allowed_pin_modes_deprecated_version_1)); policies.SetIntKey(kDefaultColorMode, - static_cast<int>(caps->default_color_mode)); + static_cast<int>(caps->default_color_mode_deprecated)); policies.SetIntKey(kDefaultDuplexMode, - static_cast<int>(caps->default_duplex_mode)); - policies.SetIntKey(kDefaultPinMode, static_cast<int>(caps->default_pin_mode)); + static_cast<int>(caps->default_duplex_mode_deprecated)); + policies.SetIntKey(kDefaultPinMode, + static_cast<int>(caps->default_pin_mode_deprecated)); dict.FindKey(kPrinter)->SetKey(kSettingPolicies, std::move(policies)); + return dict; }
diff --git a/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc b/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc index 08cc356..3d634f2d 100644 --- a/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc +++ b/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos_unittest.cc
@@ -159,12 +159,21 @@ auto caps = crosapi::mojom::CapabilitiesResponse::New(); caps->basic_info = crosapi::mojom::LocalDestinationInfo::New( "device_name", "printer_name", "printer_description", false); - caps->allowed_color_modes = 1; - caps->allowed_duplex_modes = 2; - caps->allowed_pin_modes = printing::mojom::PinModeRestriction::kPin; - caps->default_color_mode = printing::mojom::ColorModeRestriction::kColor; - caps->default_duplex_mode = printing::mojom::DuplexModeRestriction::kSimplex; - caps->default_pin_mode = printing::mojom::PinModeRestriction::kNoPin; + + // TODO(b/195001379, jkopanski): This block of code should be removed once + // Ash Chrome M94 is on stable channel. Also remove associated "policies" + // field in kExpectedValue below. + caps->allowed_color_modes_deprecated = 1; + caps->allowed_duplex_modes_deprecated = 2; + caps->allowed_pin_modes_deprecated_version_1 = + printing::mojom::PinModeRestriction::kPin; + caps->default_color_mode_deprecated = + printing::mojom::ColorModeRestriction::kColor; + caps->default_duplex_mode_deprecated = + printing::mojom::DuplexModeRestriction::kSimplex; + caps->default_pin_mode_deprecated = + printing::mojom::PinModeRestriction::kNoPin; + const base::Value kExpectedValue = *base::JSONReader::Read(R"({ "printer": { "cupsEnterprisePrinter": false, @@ -190,12 +199,21 @@ auto caps = crosapi::mojom::CapabilitiesResponse::New(); caps->basic_info = crosapi::mojom::LocalDestinationInfo::New( "device_name", "printer_name", "printer_description", true); - caps->allowed_color_modes = 1; - caps->allowed_duplex_modes = 2; - caps->allowed_pin_modes = printing::mojom::PinModeRestriction::kPin; - caps->default_color_mode = printing::mojom::ColorModeRestriction::kColor; - caps->default_duplex_mode = printing::mojom::DuplexModeRestriction::kSimplex; - caps->default_pin_mode = printing::mojom::PinModeRestriction::kNoPin; + + // TODO(b/195001379, jkopanski): This block of code should be removed once + // Ash Chrome M94 is on stable channel. Also remove associated "policies" + // field in kExpectedValue below. + caps->allowed_color_modes_deprecated = 1; + caps->allowed_duplex_modes_deprecated = 2; + caps->allowed_pin_modes_deprecated_version_1 = + printing::mojom::PinModeRestriction::kPin; + caps->default_color_mode_deprecated = + printing::mojom::ColorModeRestriction::kColor; + caps->default_duplex_mode_deprecated = + printing::mojom::DuplexModeRestriction::kSimplex; + caps->default_pin_mode_deprecated = + printing::mojom::PinModeRestriction::kNoPin; + const base::Value kExpectedValue = *base::JSONReader::Read(R"({ "printer": { "cupsEnterprisePrinter": true,
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc index 80b6dc8..db2533e 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -91,7 +91,7 @@ #include "chrome/browser/ash/crosapi/local_printer_ash.h" #include "chrome/browser/ash/drive/drive_integration_service.h" #elif BUILDFLAG(IS_CHROMEOS_LACROS) -#include "chrome/browser/lacros/account_manager_util.h" +#include "chrome/browser/lacros/account_manager/account_manager_util.h" #include "chromeos/crosapi/mojom/drive_integration_service.mojom.h" #include "chromeos/lacros/lacros_service.h" #endif @@ -181,6 +181,12 @@ const char kValue[] = "value"; // Name of a dictionary pref holding the policy value for the sheets number. const char kSheets[] = "sheets"; +// Name of a dictionary pref holding the policy value for the color setting. +const char kColor[] = "color"; +// Name of a dictionary pref holding the policy value for the duplex setting. +const char kDuplex[] = "duplex"; +// Name of a dictionary pref holding the policy value for the pin setting. +const char kPin[] = "pin"; #endif // defined(OS_CHROMEOS) // Name of a dictionary field indicating whether the 'Save to PDF' destination // is disabled. @@ -300,6 +306,36 @@ policies.SetKey(kSheets, std::move(sheets_policy)); } + base::Value color_policy(base::Value::Type::DICTIONARY); + if (ptr->allowed_color_modes) + color_policy.SetIntKey(kAllowedMode, + static_cast<int>(ptr->allowed_color_modes)); + if (ptr->default_color_mode != printing::mojom::ColorModeRestriction::kUnset) + color_policy.SetIntKey(kDefaultMode, + static_cast<int>(ptr->default_color_mode)); + if (!color_policy.DictEmpty()) + policies.SetKey(kColor, std::move(color_policy)); + + base::Value duplex_policy(base::Value::Type::DICTIONARY); + if (ptr->allowed_duplex_modes) + duplex_policy.SetIntKey(kAllowedMode, + static_cast<int>(ptr->allowed_duplex_modes)); + if (ptr->default_duplex_mode != + printing::mojom::DuplexModeRestriction::kUnset) + duplex_policy.SetIntKey(kDefaultMode, + static_cast<int>(ptr->default_duplex_mode)); + if (!duplex_policy.DictEmpty()) + policies.SetKey(kDuplex, std::move(duplex_policy)); + + base::Value pin_policy(base::Value::Type::DICTIONARY); + if (ptr->allowed_pin_modes != printing::mojom::PinModeRestriction::kUnset) + pin_policy.SetIntKey(kAllowedMode, + static_cast<int>(ptr->allowed_pin_modes)); + if (ptr->default_pin_mode != printing::mojom::PinModeRestriction::kUnset) + pin_policy.SetIntKey(kDefaultMode, static_cast<int>(ptr->default_pin_mode)); + if (!pin_policy.DictEmpty()) + policies.SetKey(kPin, std::move(pin_policy)); + return policies; }
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc index 337a957612..095abde0 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler_unittest.cc
@@ -986,6 +986,91 @@ ValidateInitialSettingsValuePolicy(*web_ui()->call_data().back(), "sheets", base::Value(2)); } + +TEST_F(PrintPreviewHandlerTest, InitialSettingsEnableColorAndMonochrome) { +#if BUILDFLAG(IS_CHROMEOS_LACROS) + crosapi::mojom::Policies policies; + policies.allowed_color_modes = 3; + SetPolicies(policies); +#else + // Set a pref that should take priority over StickySettings. + prefs()->SetInteger(prefs::kPrintingAllowedColorModes, 3); +#endif + Initialize(); + ValidateInitialSettingsAllowedDefaultModePolicy( + *web_ui()->call_data().back(), "color", base::Value(3), absl::nullopt); +} + +TEST_F(PrintPreviewHandlerTest, InitialSettingsDefaultColor) { +#if BUILDFLAG(IS_CHROMEOS_LACROS) + crosapi::mojom::Policies policies; + policies.default_color_mode = printing::mojom::ColorModeRestriction::kColor; + SetPolicies(policies); +#else + // Set a pref that should take priority over StickySettings. + prefs()->SetInteger(prefs::kPrintingColorDefault, 2); +#endif + Initialize(); + ValidateInitialSettingsAllowedDefaultModePolicy( + *web_ui()->call_data().back(), "color", absl::nullopt, base::Value(2)); +} + +TEST_F(PrintPreviewHandlerTest, InitialSettingsEnableSimplexAndDuplex) { +#if BUILDFLAG(IS_CHROMEOS_LACROS) + crosapi::mojom::Policies policies; + policies.allowed_duplex_modes = 7; + SetPolicies(policies); +#else + // Set a pref that should take priority over StickySettings. + prefs()->SetInteger(prefs::kPrintingAllowedDuplexModes, 7); +#endif + Initialize(); + ValidateInitialSettingsAllowedDefaultModePolicy( + *web_ui()->call_data().back(), "duplex", base::Value(7), absl::nullopt); +} + +TEST_F(PrintPreviewHandlerTest, InitialSettingsDefaultSimplex) { +#if BUILDFLAG(IS_CHROMEOS_LACROS) + crosapi::mojom::Policies policies; + policies.default_duplex_mode = + printing::mojom::DuplexModeRestriction::kSimplex; + SetPolicies(policies); +#else + // Set a pref that should take priority over StickySettings. + prefs()->SetInteger(prefs::kPrintingDuplexDefault, 1); +#endif + Initialize(); + ValidateInitialSettingsAllowedDefaultModePolicy( + *web_ui()->call_data().back(), "duplex", absl::nullopt, base::Value(1)); +} + +TEST_F(PrintPreviewHandlerTest, InitialSettingsRestrictPin) { +#if BUILDFLAG(IS_CHROMEOS_LACROS) + crosapi::mojom::Policies policies; + policies.allowed_pin_modes = printing::mojom::PinModeRestriction::kPin; + SetPolicies(policies); +#else + // Set a pref that should take priority over StickySettings. + prefs()->SetInteger(prefs::kPrintingAllowedPinModes, 1); +#endif + Initialize(); + ValidateInitialSettingsAllowedDefaultModePolicy( + *web_ui()->call_data().back(), "pin", base::Value(1), absl::nullopt); +} + +TEST_F(PrintPreviewHandlerTest, InitialSettingsDefaultNoPin) { +#if BUILDFLAG(IS_CHROMEOS_LACROS) + crosapi::mojom::Policies policies; + policies.default_pin_mode = printing::mojom::PinModeRestriction::kNoPin; + SetPolicies(policies); +#else + // Set a pref that should take priority over StickySettings. + prefs()->SetInteger(prefs::kPrintingPinDefault, 2); +#endif + Initialize(); + ValidateInitialSettingsAllowedDefaultModePolicy( + *web_ui()->call_data().back(), "pin", absl::nullopt, base::Value(2)); +} #endif // defined(OS_CHROMEOS) TEST_F(PrintPreviewHandlerTest, GetPrinters) {
diff --git a/chrome/browser/ui/webui/settings/chromeos/apps_section.cc b/chrome/browser/ui/webui/settings/chromeos/apps_section.cc index 9d2e637..a819001 100644 --- a/chrome/browser/ui/webui/settings/chromeos/apps_section.cc +++ b/chrome/browser/ui/webui/settings/chromeos/apps_section.cc
@@ -192,6 +192,16 @@ html_source->AddLocalizedStrings(kLocalizedStrings); } +void AddBorealisStrings(content::WebUIDataSource* html_source) { + static constexpr webui::LocalizedString kLocalizedStrings[] = { + {"borealisMainPermissionText", + IDS_SETTINGS_APPS_BOREALIS_MAIN_PERMISSION_TEXT}, + {"borealisAppPermissionText", + IDS_SETTINGS_APPS_BOREALIS_APP_PERMISSION_TEXT}, + }; + html_source->AddLocalizedStrings(kLocalizedStrings); +} + bool ShowPluginVm(const Profile* profile, const PrefService& pref_service) { // Even if not allowed, we still want to show Plugin VM if the VM image is on // disk, so that users are still able to delete the image at will. @@ -279,6 +289,7 @@ AddGuestOsStrings(html_source); AddAndroidAppStrings(html_source); AddPluginVmLoadTimeData(html_source); + AddBorealisStrings(html_source); AddOnStartupTimeData(html_source); }
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc index b61ac45..93a2443 100644 --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -92,7 +92,7 @@ #include "ui/strings/grit/ui_strings.h" #if BUILDFLAG(IS_CHROMEOS_LACROS) -#include "chrome/browser/lacros/account_manager_util.h" +#include "chrome/browser/lacros/account_manager/account_manager_util.h" #endif // BUILDFLAG(IS_CHROMEOS_LACROS) #if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc index fa9fb8f..96d10cb 100644 --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc
@@ -720,7 +720,7 @@ // Enables using the prediction service for permission prompts. const base::Feature kPermissionPredictions{"PermissionPredictions", - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_ENABLED_BY_DEFAULT}; const base::FeatureParam<double> kPermissionPredictionsHoldbackChance( &kPermissionPredictions,
diff --git a/chrome/common/chromeos/extensions/api/telemetry.idl b/chrome/common/chromeos/extensions/api/telemetry.idl index 157aa6c..0077576 100644 --- a/chrome/common/chromeos/extensions/api/telemetry.idl +++ b/chrome/common/chromeos/extensions/api/telemetry.idl
@@ -21,8 +21,18 @@ callback VpdInfoCallback = void (VpdInfo vpdInfo); + dictionary OemData { + // OEM data. + DOMString? oemData; + }; + + callback OemDataCallback = void (OemData oemData); + interface Functions { // Retrieves VPD info. [supportsPromises] static void getVpdInfo(VpdInfoCallback callback); + + // Retrieves OEM data. + [supportsPromises] static void getOemData(OemDataCallback callback); }; };
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index b5bf6e80..8a6d9bf2 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -1916,7 +1916,6 @@ "../browser/ui/views/incognito_clear_browsing_data_dialog_browsertest.cc", "../browser/ui/views/intent_picker_bubble_view_browsertest.cc", "../browser/ui/views/reader_mode/reader_mode_icon_view_browsertest.cc", - "../browser/ui/views/sharing/click_to_call_browsertest.cc", "../browser/ui/views/sharing/remote_copy_browsertest.cc", "../browser/ui/views/sharing/shared_clipboard_browsertest.cc", "../browser/ui/views/sharing/sharing_browsertest.cc", @@ -2069,6 +2068,10 @@ sources += [ "../browser/extensions/preinstalled_apps_browsertest.cc" ] } + if (enable_click_to_call) { + sources += [ "../browser/ui/views/sharing/click_to_call_browsertest.cc" ] + } + if (enable_pdf) { deps += [ "//pdf:internal" ] } @@ -5995,9 +5998,6 @@ "../browser/renderer_context_menu/mock_render_view_context_menu.h", "../browser/renderer_context_menu/render_view_context_menu_test_util.cc", "../browser/renderer_context_menu/render_view_context_menu_test_util.h", - "../browser/sharing/click_to_call/click_to_call_context_menu_observer_unittest.cc", - "../browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc", - "../browser/sharing/click_to_call/click_to_call_utils_unittest.cc", "../browser/sharing/shared_clipboard/remote_copy_message_handler_unittest.cc", "../browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer_unittest.cc", "../browser/sharing/shared_clipboard/shared_clipboard_message_handler_desktop_unittest.cc", @@ -6293,6 +6293,14 @@ deps += [ "//ui/events/devices:test_support" ] } + if (enable_click_to_call && !is_android) { + sources += [ + "../browser/sharing/click_to_call/click_to_call_context_menu_observer_unittest.cc", + "../browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc", + "../browser/sharing/click_to_call/click_to_call_utils_unittest.cc", + ] + } + if (enable_background_contents) { sources += [ "../browser/background/background_contents_service_unittest.cc" ] @@ -7651,7 +7659,6 @@ "//content/public/browser", "//extensions/buildflags", "//google_apis", - "//ppapi/shared_impl", "//printing/buildflags", "//services/device/public/cpp:test_support", "//skia", @@ -7677,6 +7684,8 @@ "ppapi/ppapi_test_select_file_dialog_factory.cc", "ppapi/ppapi_test_select_file_dialog_factory.h", ] + + deps += [ "//ppapi/shared_impl" ] } if (enable_extensions) {
diff --git a/chrome/test/chromedriver/chrome/chrome_impl.cc b/chrome/test/chromedriver/chrome/chrome_impl.cc index 39b87c5..40fa6dd 100644 --- a/chrome/test/chromedriver/chrome/chrome_impl.cc +++ b/chrome/test/chromedriver/chrome/chrome_impl.cc
@@ -149,17 +149,19 @@ return Status(kNoSuchWindow); base::DictionaryValue params; - params.SetString("url", "about:blank"); - params.SetBoolean("newWindow", type == WindowType::kWindow); - params.SetBoolean("background", true); + params.SetStringKey("url", "about:blank"); + params.SetBoolKey("newWindow", type == WindowType::kWindow); + params.SetBoolKey("background", true); std::unique_ptr<base::DictionaryValue> result; status = devtools_websocket_client_->SendCommandAndGetResult( "Target.createTarget", params, &result); if (status.IsError()) return status; - if (!result->GetString("targetId", window_handle)) + const std::string* target_id_str = result->FindStringKey("targetId"); + if (!target_id_str) return Status(kUnknownError, "no targetId from createTarget"); + *window_handle = *target_id_str; return Status(kOk); } @@ -170,7 +172,7 @@ return status; base::DictionaryValue params; - params.SetString("targetId", target_id); + params.SetStringKey("targetId", target_id); std::unique_ptr<base::DictionaryValue> result; status = devtools_websocket_client_->SendCommandAndGetResult( "Browser.getWindowForTarget", params, &result); @@ -204,7 +206,7 @@ return Status(kOk); auto bounds = std::make_unique<base::DictionaryValue>(); - bounds->SetString("windowState", "maximized"); + bounds->SetStringKey("windowState", "maximized"); return SetWindowBounds(&window, target_id, std::move(bounds)); } @@ -218,7 +220,7 @@ return Status(kOk); auto bounds = std::make_unique<base::DictionaryValue>(); - bounds->SetString("windowState", "minimized"); + bounds->SetStringKey("windowState", "minimized"); return SetWindowBounds(&window, target_id, std::move(bounds)); } @@ -232,7 +234,7 @@ return Status(kOk); auto bounds = std::make_unique<base::DictionaryValue>(); - bounds->SetString("windowState", "fullscreen"); + bounds->SetStringKey("windowState", "fullscreen"); return SetWindowBounds(&window, target_id, std::move(bounds)); } @@ -246,19 +248,18 @@ auto bounds = std::make_unique<base::DictionaryValue>(); // window position - int x = 0; - int y = 0; - if (params.GetInteger("x", &x) && params.GetInteger("y", &y)) { - bounds->SetInteger("left", x); - bounds->SetInteger("top", y); + absl::optional<int> x = params.FindIntKey("x"); + absl::optional<int> y = params.FindIntKey("y"); + if (x.has_value() && y.has_value()) { + bounds->SetIntKey("left", *x); + bounds->SetIntKey("top", *y); } // window size - int width = 0; - int height = 0; - if (params.GetInteger("width", &width) && - params.GetInteger("height", &height)) { - bounds->SetInteger("width", width); - bounds->SetInteger("height", height); + absl::optional<int> width = params.FindIntKey("width"); + absl::optional<int> height = params.FindIntKey("height"); + if (width.has_value() && height.has_value()) { + bounds->SetIntKey("width", *width); + bounds->SetIntKey("height", *height); } return SetWindowBounds(&window, target_id, std::move(bounds)); @@ -270,7 +271,7 @@ return status; base::DictionaryValue params; - params.SetInteger("windowId", window_id); + params.SetIntKey("windowId", window_id); std::unique_ptr<base::DictionaryValue> result; status = devtools_websocket_client_->SendCommandAndGetResult( "Browser.getWindowBounds", params, &result); @@ -289,10 +290,10 @@ return status; base::DictionaryValue params; - params.SetInteger("windowId", window->id); + params.SetIntKey("windowId", window->id); const std::string normal = "normal"; if (window->state != normal) { - params.SetString("bounds.windowState", normal); + params.SetStringPath("bounds.windowState", normal); status = devtools_websocket_client_->SendCommand("Browser.setWindowBounds", params); if (status.IsError()) @@ -307,10 +308,10 @@ return MakeFailedStatus(normal, window->state); } - std::string desired_state; - bounds->GetString("windowState", &desired_state); + const std::string* desired_state = bounds->FindStringKey("windowState"); - if (desired_state == "fullscreen" && !GetBrowserInfo()->is_headless) { + if (desired_state && *desired_state == "fullscreen" && + !GetBrowserInfo()->is_headless) { // Work around crbug.com/982071. This block of code is necessary to ensure // that document.webkitIsFullScreen and document.fullscreenElement return // the correct values. @@ -321,10 +322,10 @@ return status; base::DictionaryValue params; - params.SetString("expression", - "document.documentElement.requestFullscreen()"); - params.SetBoolean("userGesture", true); - params.SetBoolean("awaitPromise", true); + params.SetStringKey("expression", + "document.documentElement.requestFullscreen()"); + params.SetBoolKey("userGesture", true); + params.SetBoolKey("awaitPromise", true); status = web_view->SendCommand("Runtime.evaluate", params); if (status.IsError()) return status; @@ -333,16 +334,16 @@ if (status.IsError()) return status; - if (window->state == desired_state) + if (window->state == *desired_state) return Status(kOk); - return MakeFailedStatus(desired_state, window->state); + return MakeFailedStatus(*desired_state, window->state); } // crbug.com/946023. When setWindowBounds is run before requestFullscreen, // we sometimes see a devtools crash. Because the latter call will // set fullscreen, do not call setWindowBounds with a fullscreen request // unless running headless. see https://crbug.com/1049336 - params.Set("bounds", bounds->CreateDeepCopy()); + params.SetKey("bounds", bounds->Clone()); status = devtools_websocket_client_->SendCommand("Browser.setWindowBounds", params); if (status.IsError()) @@ -350,17 +351,17 @@ base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100)); - if (desired_state.empty()) + if (!desired_state || desired_state->empty()) return Status(kOk); status = GetWindowBounds(window->id, window); if (status.IsError()) return status; - if (window->state == desired_state) + if (window->state == *desired_state) return Status(kOk); - if (desired_state == "maximized" && window->state == "normal") { + if (*desired_state == "maximized" && window->state == "normal") { // Maximize window is not supported in some environment, such as Mac Chrome // version 70 and above, or Linux without a window manager. // In these cases, we simulate window maximization by setting window size @@ -385,11 +386,11 @@ if (width == nullptr || height == nullptr) return Status(kUnknownError, "unexpected JavaScript result"); auto bounds = std::make_unique<base::DictionaryValue>(); - bounds->SetInteger("width", width->GetInt()); - bounds->SetInteger("height", height->GetInt()); - bounds->SetInteger("left", 0); - bounds->SetInteger("top", 0); - params.Set("bounds", bounds->CreateDeepCopy()); + bounds->SetIntKey("width", width->GetInt()); + bounds->SetIntKey("height", height->GetInt()); + bounds->SetIntKey("left", 0); + bounds->SetIntKey("top", 0); + params.SetKey("bounds", bounds->Clone()); return devtools_websocket_client_->SendCommand("Browser.setWindowBounds", params); } @@ -398,7 +399,7 @@ // Wait and retry for 1 second for (; retries < 10; ++retries) { // SetWindowBounds again for retry - params.Set("bounds", bounds->CreateDeepCopy()); + params.SetKey("bounds", bounds->Clone()); status = devtools_websocket_client_->SendCommand("Browser.setWindowBounds", params); @@ -407,17 +408,19 @@ status = GetWindowBounds(window->id, window); if (status.IsError()) return status; - if (window->state == desired_state) + if (window->state == *desired_state) return Status(kOk); } - return MakeFailedStatus(desired_state, window->state); + return MakeFailedStatus(*desired_state, window->state); } Status ChromeImpl::ParseWindow(std::unique_ptr<base::DictionaryValue> params, Window* window) { - if (!params->GetInteger("windowId", &window->id)) + absl::optional<int> id = params->FindIntKey("windowId"); + if (!id) return Status(kUnknownError, "no window id in response"); + window->id = *id; return ParseWindowBounds(std::move(params), window); } @@ -425,22 +428,34 @@ Status ChromeImpl::ParseWindowBounds( std::unique_ptr<base::DictionaryValue> params, Window* window) { - const base::Value* value = nullptr; - const base::DictionaryValue* bounds_dict = nullptr; - if (!params->Get("bounds", &value) || !value->GetAsDictionary(&bounds_dict)) + const base::Value* value = params->FindKey("bounds"); + if (!value || !value->is_dict()) return Status(kUnknownError, "no window bounds in response"); - if (!bounds_dict->GetString("windowState", &window->state)) + const std::string* state = value->FindStringKey("windowState"); + if (!state) return Status(kUnknownError, "no window state in window bounds"); + window->state = *state; - if (!bounds_dict->GetInteger("left", &window->left)) + absl::optional<int> left = value->FindIntKey("left"); + if (!left) return Status(kUnknownError, "no left offset in window bounds"); - if (!bounds_dict->GetInteger("top", &window->top)) + window->left = *left; + + absl::optional<int> top = value->FindIntKey("top"); + if (!top) return Status(kUnknownError, "no top offset in window bounds"); - if (!bounds_dict->GetInteger("width", &window->width)) + window->top = *top; + + absl::optional<int> width = value->FindIntKey("width"); + if (!width) return Status(kUnknownError, "no width in window bounds"); - if (!bounds_dict->GetInteger("height", &window->height)) + window->width = *width; + + absl::optional<int> height = value->FindIntKey("height"); + if (!height) return Status(kUnknownError, "no height in window bounds"); + window->height = *height; return Status(kOk); } @@ -472,7 +487,7 @@ return status; base::DictionaryValue params; - params.SetBoolean("ignore", true); + params.SetBoolKey("ignore", true); return devtools_websocket_client_->SendCommand( "Security.setIgnoreCertificateErrors", params); } @@ -503,9 +518,9 @@ return Status(kInvalidArgument, "unsupported PermissionState"); base::DictionaryValue args; - args.SetString("origin", current_url); - args.SetDictionary("permission", std::move(permission_descriptor)); - args.SetString("setting", permission_setting); + args.SetStringKey("origin", current_url); + args.SetKey("permission", std::move(*permission_descriptor)); + args.SetStringKey("setting", permission_setting); return devtools_websocket_client_->SendCommand("Browser.setPermission", args); }
diff --git a/chrome/test/data/extensions/back_forward_cache/content_script/background.js b/chrome/test/data/extensions/back_forward_cache/content_script/background.js index c6229de..46c91000e 100644 --- a/chrome/test/data/extensions/back_forward_cache/content_script/background.js +++ b/chrome/test/data/extensions/back_forward_cache/content_script/background.js
@@ -2,7 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +var port; + chrome.runtime.onConnectExternal.addListener((p) => { + // Save a "global" reference to the port so it can be used by the test later. + port = p; p.postMessage('connected'); p.onMessage.addListener((m) => { if (m == 'disconnect') {
diff --git a/chrome/test/data/webui/print_preview/advanced_dialog_test.js b/chrome/test/data/webui/print_preview/advanced_dialog_test.js index 9c929cc..041fc7f8 100644 --- a/chrome/test/data/webui/print_preview/advanced_dialog_test.js +++ b/chrome/test/data/webui/print_preview/advanced_dialog_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType} from 'chrome://print/print_preview.js'; +import {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationType, PrintPreviewAdvancedSettingsDialogElement} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {keyEventOn} from 'chrome://resources/polymer/v3_0/iron-test-helpers/mock-interactions.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; @@ -88,7 +88,7 @@ */ function verifyListWithItemCount(count) { // Search box should be hidden if there is only 1 item. - const searchBox = dialog.$$('#searchBox'); + const searchBox = dialog.shadowRoot.querySelector('#searchBox'); assertEquals(count === 1, searchBox.hidden); // Verify item is displayed. @@ -165,7 +165,8 @@ const items = dialog.shadowRoot.querySelectorAll( 'print-preview-advanced-settings-item'); - const typedItemInput = items[2].$$('cr-input'); // Watermark + const typedItemInput = + items[2].shadowRoot.querySelector('cr-input'); // Watermark // Simulate typing a value and then pressing enter. typedItemInput.value = 'Hello World'; @@ -212,10 +213,11 @@ assert(advanced_dialog_test.TestNames.AdvancedSettingsFilter), function() { setupDialog(3); - const searchBox = dialog.$$('#searchBox'); + const searchBox = dialog.shadowRoot.querySelector('#searchBox'); const items = dialog.shadowRoot.querySelectorAll( 'print-preview-advanced-settings-item'); - const noMatchHint = dialog.$$('.no-settings-match-hint'); + const noMatchHint = + dialog.shadowRoot.querySelector('.no-settings-match-hint'); // Query is initialized to null. All items are shown and the hint is // hidden.
diff --git a/chrome/test/data/webui/print_preview/advanced_item_test.js b/chrome/test/data/webui/print_preview/advanced_item_test.js index 6038f5a..4e72c17 100644 --- a/chrome/test/data/webui/print_preview/advanced_item_test.js +++ b/chrome/test/data/webui/print_preview/advanced_item_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {PrintPreviewModelElement} from 'chrome://print/print_preview.js'; +import {PrintPreviewAdvancedSettingsItemElement, PrintPreviewModelElement} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; @@ -54,19 +54,20 @@ // Test that a select capability is displayed correctly. test(assert(advanced_item_test.TestNames.DisplaySelect), function() { - const label = item.$$('.label'); + const label = item.shadowRoot.querySelector('.label'); assertEquals('Paper Type', label.textContent); // Check that the default option is selected. - const select = item.$$('select'); + const select = item.shadowRoot.querySelector('select'); assertEquals(0, select.selectedIndex); assertEquals('Standard', select.options[0].textContent.trim()); assertEquals('Recycled', select.options[1].textContent.trim()); assertEquals('Special', select.options[2].textContent.trim()); // Don't show input or checkbox. - assertTrue(item.$$('cr-input').parentElement.hidden); - assertTrue(item.$$('cr-checkbox').parentElement.hidden); + assertTrue(item.shadowRoot.querySelector('cr-input').parentElement.hidden); + assertTrue( + item.shadowRoot.querySelector('cr-checkbox').parentElement.hidden); }); test(assert(advanced_item_test.TestNames.DisplayInput), function() { @@ -75,17 +76,18 @@ .capabilities.printer.vendor_capability[2]; flush(); - const label = item.$$('.label'); + const label = item.shadowRoot.querySelector('.label'); assertEquals('Watermark', label.textContent); // The input should be shown. - const input = item.$$('cr-input'); + const input = item.shadowRoot.querySelector('cr-input'); assertFalse(input.parentElement.hidden); assertEquals('', input.inputElement.value); // Don't show select or checkbox. - assertEquals(null, item.$$('select')); - assertTrue(item.$$('cr-checkbox').parentElement.hidden); + assertEquals(null, item.shadowRoot.querySelector('select')); + assertTrue( + item.shadowRoot.querySelector('cr-checkbox').parentElement.hidden); }); test(assert(advanced_item_test.TestNames.DisplayCheckbox), function() { @@ -94,24 +96,24 @@ .capabilities.printer.vendor_capability[3]; flush(); - const label = item.$$('.label'); + const label = item.shadowRoot.querySelector('.label'); assertEquals('Staple', label.textContent); // The checkbox should be shown. - const checkbox = item.$$('cr-checkbox'); + const checkbox = item.shadowRoot.querySelector('cr-checkbox'); assertFalse(checkbox.parentElement.hidden); assertFalse(checkbox.checked); // Don't show select or input. - assertEquals(null, item.$$('select')); - assertTrue(item.$$('cr-input').parentElement.hidden); + assertEquals(null, item.shadowRoot.querySelector('select')); + assertTrue(item.shadowRoot.querySelector('cr-input').parentElement.hidden); }); // Test that a select capability updates correctly when the setting is // updated (e.g. when sticky settings are set). test(assert(advanced_item_test.TestNames.UpdateSelect), function() { // Check that the default option is selected. - const select = item.$$('select'); + const select = item.shadowRoot.querySelector('select'); assertEquals(0, select.selectedIndex); // Update the setting. @@ -128,7 +130,7 @@ flush(); // Check that the default value is set. - const input = item.$$('cr-input'); + const input = item.shadowRoot.querySelector('cr-input'); assertEquals('', input.inputElement.value); // Update the setting. @@ -145,7 +147,7 @@ flush(); // Check that checkbox is unset. - const checkbox = item.$$('cr-checkbox'); + const checkbox = item.shadowRoot.querySelector('cr-checkbox'); assertFalse(checkbox.checked); // Update the setting. @@ -160,7 +162,7 @@ assertTrue(item.hasMatch(query)); item.updateHighlighting(query, new Map); - const label = item.$$('.label'); + const label = item.shadowRoot.querySelector('.label'); assertEquals( item.capability.display_name + item.capability.display_name, label.textContent); @@ -171,7 +173,7 @@ assertEquals('Type', searchHits[0].textContent); // No highlighting on the control. - const control = item.$$('.value'); + const control = item.shadowRoot.querySelector('.value'); assertEquals(0, control.querySelectorAll('.search-highlight-hit').length); assertEquals(0, control.querySelectorAll('.search-bubble').length); }); @@ -183,14 +185,14 @@ assertTrue(item.hasMatch(query)); item.updateHighlighting(query, new Map); - const label = item.$$('.label'); + const label = item.shadowRoot.querySelector('.label'); assertEquals('Paper Type', label.textContent); // Label should not be highlighted. assertEquals(0, label.querySelectorAll('.search-highlight-hit').length); // Control should have highlight bubble but no highlighting. - const control = item.$$('.value'); + const control = item.shadowRoot.querySelector('.value'); assertEquals(0, control.querySelectorAll('.search-highlight-hit').length); const searchBubbleHits = control.querySelectorAll('.search-bubble'); assertEquals(1, searchBubbleHits.length);
diff --git a/chrome/test/data/webui/print_preview/destination_search_test_chromeos.js b/chrome/test/data/webui/print_preview/destination_search_test_chromeos.js index 8f2970fa..c709c12 100644 --- a/chrome/test/data/webui/print_preview/destination_search_test_chromeos.js +++ b/chrome/test/data/webui/print_preview/destination_search_test_chromeos.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {ColorModeRestriction, Destination, DestinationConnectionStatus, DestinationOrigin, DestinationStore, DestinationType, DuplexModeRestriction, NativeLayer, NativeLayerCrosImpl, NativeLayerImpl} from 'chrome://print/print_preview.js'; +import {Destination, DestinationConnectionStatus, DestinationOrigin, DestinationStore, DestinationType, NativeLayerCrosImpl, NativeLayerImpl} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {NativeEventTarget as EventTarget} from 'chrome://resources/js/cr/event_target.m.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; @@ -173,42 +173,4 @@ // Verify that the destination has been selected. assertEquals(printerId, destinationStore.selectedDestination.id); }); - - // Tests that if policies are set correctly if they are present - // for a destination. - test( - assert(destination_search_test_chromeos.TestNames - .ReceiveSuccessfulSetupWithPolicies), - function() { - const destId = '00112233DEADBEEF'; - const response = { - printerId: destId, - capabilities: getCddTemplate(destId).capabilities, - policies: { - allowedColorModes: ColorModeRestriction.MONOCHROME, - allowedDuplexModes: DuplexModeRestriction.DUPLEX, - allowedPinMode: null, - defaultColorMode: null, - defaultDuplexMode: null, - defaultPinMode: null, - }, - }; - nativeLayerCros.setSetupPrinterResponse(response); - requestSetup(destId); - return nativeLayerCros.whenCalled('setupPrinter') - .then(function(actualId) { - assertEquals(destId, actualId); - const selectedDestination = destinationStore.selectedDestination; - assertNotEquals(null, selectedDestination); - assertEquals(destId, selectedDestination.id); - assertNotEquals(null, selectedDestination.capabilities); - assertNotEquals(null, selectedDestination.policies); - assertEquals( - ColorModeRestriction.MONOCHROME, - selectedDestination.policies.allowedColorModes); - assertEquals( - DuplexModeRestriction.DUPLEX, - selectedDestination.policies.allowedDuplexModes); - }); - }); });
diff --git a/chrome/test/data/webui/print_preview/destination_store_test.js b/chrome/test/data/webui/print_preview/destination_store_test.js index 43cf18454..9a904d92 100644 --- a/chrome/test/data/webui/print_preview/destination_store_test.js +++ b/chrome/test/data/webui/print_preview/destination_store_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {CloudPrintInterfaceEventType, Destination, DestinationConnectionStatus, DestinationErrorType, DestinationOrigin, DestinationStore, DestinationType, LocalDestinationInfo, makeRecentDestination, NativeInitialSettings, NativeLayer, NativeLayerImpl, PluginProxy, PrinterType} from 'chrome://print/print_preview.js'; +import {CloudPrintInterfaceEventType, Destination, DestinationConnectionStatus, DestinationErrorType, DestinationOrigin, DestinationStore, DestinationType, LocalDestinationInfo, makeRecentDestination, NativeInitialSettings, NativeLayerImpl, PrinterType} from 'chrome://print/print_preview.js'; import {assert} from 'chrome://resources/js/assert.m.js'; import {isChromeOS, isLacros} from 'chrome://resources/js/cr.m.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; @@ -578,21 +578,10 @@ assertEquals( Destination.GooglePromotedId.SAVE_AS_PDF, destinationStore.selectedDestination.id); - // Update destination with ID 1 so that it has policies. const localDestinationInfo = { deviceName: id1, printerName: name1 }; - if (isChromeOS || isLacros) { - localDestinationInfo.policies = { - allowedColorModes: 0x1, // ColorModeRestriction.MONOCHROME - defaultColorMode: 0x1, // ColorModeRestriction.MONOCHROME - allowedPinMode: null, - defaultPinMode: null, - allowedDuplexModes: null, - defaultDuplexMode: null, - }; - } // Typecast localDestinationInfo to work around the fact that // policy types are only defined on Chrome OS. nativeLayer.setLocalDestinationCapabilities({ @@ -608,9 +597,6 @@ destinationStore.destinations().find(d => d.id === id1); // No capabilities or policies yet. assertFalse(!!destination.capabilities); - if (isChromeOS || isLacros) { - assertEquals(null, destination.policies); - } destinationStore.selectDestination(destination); return nativeLayer.whenCalled('getPrinterCapabilities'); }) @@ -618,10 +604,6 @@ assertEquals(destination, destinationStore.selectedDestination); // Capabilities are updated. assertTrue(!!destination.capabilities); - if (isChromeOS || isLacros) { - // Policies are updated. - assertTrue(!!destination.policies); - } }); });
diff --git a/chrome/test/data/webui/print_preview/key_event_test.js b/chrome/test/data/webui/print_preview/key_event_test.js index 89fe428..61f9e8e 100644 --- a/chrome/test/data/webui/print_preview/key_event_test.js +++ b/chrome/test/data/webui/print_preview/key_event_test.js
@@ -127,7 +127,7 @@ moreSettingsElement.$.label.click(); const button = page.$$('print-preview-sidebar') .$$('print-preview-advanced-options-settings') - .$$('cr-button'); + .shadowRoot.querySelector('cr-button'); const whenKeyEventFired = eventToPromise('keydown', button); keyEventOn(button, 'keydown', 'Enter', [], 'Enter'); await whenKeyEventFired;
diff --git a/chrome/test/data/webui/print_preview/model_settings_policy_test.js b/chrome/test/data/webui/print_preview/model_settings_policy_test.js index 2942370..7d0959d 100644 --- a/chrome/test/data/webui/print_preview/model_settings_policy_test.js +++ b/chrome/test/data/webui/print_preview/model_settings_policy_test.js
@@ -14,8 +14,7 @@ /** @type {!PrintPreviewModelElement} */ let model; - /** @override */ - setup(function() { + function setupModel() { document.body.innerHTML = ''; model = /** @type {!PrintPreviewModelElement} */ ( document.createElement('print-preview-model')); @@ -43,13 +42,9 @@ model.set( 'destination.capabilities', getCddTemplate(model.destination.id).capabilities); - }); + } test('color managed', function() { - // Remove color capability. - let capabilities = getCddTemplate(model.destination.id).capabilities; - delete capabilities.printer.color; - [{ // Policy has no effect, setting unavailable colorCap: {option: [{type: 'STANDARD_COLOR', is_default: true}]}, @@ -99,18 +94,37 @@ expectedAvailable: true, expectedManaged: false, expectedEnforced: false, + }, + { + // Default defined by policy but setting is modifiable (same as the case + // above but with swapped defaults). + colorCap: { + option: [ + {type: 'STANDARD_MONOCHROME'}, + {type: 'STANDARD_COLOR', is_default: true} + ] + }, + colorDefault: ColorModeRestriction.MONOCHROME, + expectedValue: false, + expectedAvailable: true, + expectedManaged: false, + expectedEnforced: false, }].forEach(subtestParams => { - capabilities = getCddTemplate(model.destination.id).capabilities; + setupModel(); + // Remove color capability. + const capabilities = getCddTemplate(model.destination.id).capabilities; capabilities.printer.color = subtestParams.colorCap; const policies = { - allowedColorModes: subtestParams.colorPolicy, - defaultColorMode: subtestParams.colorDefault, + color: { + allowedMode: subtestParams.colorPolicy, + defaultMode: subtestParams.colorDefault, + } }; - // In practice |capabilities| are always set after |policies| and - // observers only check for |capabilities|, so the order is important. - model.set('destination.policies', policies); + model.set('destination.capabilities', capabilities); - model.applyDestinationSpecificPolicies(); + model.setPolicySettings(policies); + model.applyStickySettings(); + assertEquals(subtestParams.expectedValue, model.getSettingValue('color')); assertEquals( subtestParams.expectedAvailable, model.settings.color.available); @@ -121,10 +135,6 @@ }); test('duplex managed', function() { - // Remove duplex capability. - let capabilities = getCddTemplate(model.destination.id).capabilities; - delete capabilities.printer.duplex; - [{ // Policy has no effect. duplexCap: {option: [{type: 'NO_DUPLEX', is_default: true}]}, @@ -206,17 +216,21 @@ expectedShortEdgeAvailable: true, expectedShortEdgeEnforced: false, }].forEach(subtestParams => { - capabilities = getCddTemplate('FooPrinter').capabilities; + setupModel(); + // Remove duplex capability. + const capabilities = getCddTemplate(model.destination.id).capabilities; capabilities.printer.duplex = subtestParams.duplexCap; const policies = { - allowedDuplexModes: subtestParams.duplexPolicy, - defaultDuplexMode: subtestParams.duplexDefault, + duplex: { + allowedMode: subtestParams.duplexPolicy, + defaultMode: subtestParams.duplexDefault, + } }; - // In practice |capabilities| are always set after |policies| and - // observers only check for |capabilities|, so the order is important. - model.set('destination.policies', policies); + model.set('destination.capabilities', capabilities); - model.applyDestinationSpecificPolicies(); + model.setPolicySettings(policies); + model.applyStickySettings(); + assertEquals( subtestParams.expectedValue, model.getSettingValue('duplex')); assertEquals( @@ -237,14 +251,6 @@ }); test('pin managed', function() { - // Remove pin capability. - let capabilities = getCddTemplate(model.destination.id).capabilities; - delete capabilities.printer.pin; - - // Make device enterprise managed since pin setting is available only on - // managed devices. - loadTimeData.overrideValues({isEnterpriseManaged: true}); - [{ // No policies, settings is modifiable. pinCap: {supported: true}, @@ -312,17 +318,24 @@ expectedManaged: false, expectedEnforced: false, }].forEach(subtestParams => { - capabilities = getCddTemplate(model.destination.id).capabilities; + setupModel(); + // Make device enterprise managed since pin setting is available only on + // managed devices. + loadTimeData.overrideValues({isEnterpriseManaged: true}); + // Remove pin capability. + const capabilities = getCddTemplate(model.destination.id).capabilities; capabilities.printer.pin = subtestParams.pinCap; const policies = { - allowedPinModes: subtestParams.pinPolicy, - defaultPinMode: subtestParams.pinDefault, + pin: { + allowedMode: subtestParams.pinPolicy, + defaultMode: subtestParams.pinDefault, + } }; - // In practice |capabilities| are always set after |policies| and - // observers only check for |capabilities|, so the order is important. - model.set('destination.policies', policies); + model.set('destination.capabilities', capabilities); - model.applyDestinationSpecificPolicies(); + model.setPolicySettings(policies); + model.applyStickySettings(); + assertEquals(subtestParams.expectedValue, model.getSettingValue('pin')); assertEquals( subtestParams.expectedAvailable, model.settings.pin.available);
diff --git a/chrome/test/data/webui/print_preview/policy_test.js b/chrome/test/data/webui/print_preview/policy_test.js index e246961d..959d0bd 100644 --- a/chrome/test/data/webui/print_preview/policy_test.js +++ b/chrome/test/data/webui/print_preview/policy_test.js
@@ -2,11 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {BackgroundGraphicsModeRestriction, NativeLayer, NativeLayerImpl, PluginProxyImpl, PrintPreviewPluralStringProxyImpl} from 'chrome://print/print_preview.js'; +import {BackgroundGraphicsModeRestriction, DuplexMode, NativeLayerImpl, PluginProxyImpl, PrintPreviewPluralStringProxyImpl} from 'chrome://print/print_preview.js'; +// <if expr="chromeos or lacros"> +import {ColorModeRestriction, DuplexModeRestriction, PinModeRestriction} from 'chrome://print/print_preview.js'; +// </if> import {assert} from 'chrome://resources/js/assert.m.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {NativeLayerStub} from 'chrome://test/print_preview/native_layer_stub.js'; -import {getCddTemplate, getDefaultInitialSettings} from 'chrome://test/print_preview/print_preview_test_utils.js'; +import {getDefaultInitialSettings} from 'chrome://test/print_preview/print_preview_test_utils.js'; import {TestPluginProxy} from 'chrome://test/print_preview/test_plugin_proxy.js'; import {TestPluralStringProxy} from 'chrome://test/test_plural_string_proxy.js'; @@ -22,6 +25,9 @@ CssBackgroundPolicy: 'css background policy', MediaSizePolicy: 'media size policy', SheetsPolicy: 'sheets policy', + ColorPolicy: 'color policy', + DuplexPolicy: 'duplex policy', + PinPolicy: 'pin policy', }; class PolicyTestPluralStringProxy extends TestPluralStringProxy { @@ -137,7 +143,7 @@ .$$(`#${settingName}`); } - /** Tests different scenarios of applying header/footer policy. */ + // Tests different scenarios of applying header/footer policy. test(assert(policy_tests.TestNames.HeaderFooterPolicy), async () => { const tests = [ { @@ -187,7 +193,7 @@ } }); - /** Tests different scenarios of applying background graphics policy. */ + // Tests different scenarios of applying background graphics policy. test(assert(policy_tests.TestNames.CssBackgroundPolicy), async () => { const tests = [ { @@ -239,7 +245,7 @@ } }); - /** Tests different scenarios of applying default paper policy. */ + // Tests different scenarios of applying default paper policy. test(assert(policy_tests.TestNames.MediaSizePolicy), async () => { const tests = [ { @@ -341,4 +347,320 @@ !errorMessage.hidden && !!errorMessage.innerText); } }); + + // <if expr="chromeos or lacros"> + // Tests different scenarios of color printing policy. + test(assert(policy_tests.TestNames.ColorPolicy), async () => { + const tests = [ + { + // No policies. + allowedMode: undefined, + defaultMode: undefined, + expectedDisabled: false, + expectedValue: 'color', + }, + { + // Print in color by default. + allowedMode: undefined, + defaultMode: ColorModeRestriction.COLOR, + expectedDisabled: false, + expectedValue: 'color', + }, + { + // Print in black and white by default. + allowedMode: undefined, + defaultMode: ColorModeRestriction.MONOCHROME, + expectedDisabled: false, + expectedValue: 'bw', + }, + { + // Allowed and default policies unset. + allowedMode: ColorModeRestriction.UNSET, + defaultMode: ColorModeRestriction.UNSET, + expectedDisabled: false, + expectedValue: 'bw', + }, + { + // Allowed unset, default set to color printing. + allowedMode: ColorModeRestriction.UNSET, + defaultMode: ColorModeRestriction.COLOR, + expectedDisabled: false, + expectedValue: 'color', + }, + { + // Enforce color printing. + allowedMode: ColorModeRestriction.COLOR, + defaultMode: ColorModeRestriction.UNSET, + expectedDisabled: true, + expectedValue: 'color', + }, + { + // Enforce black and white printing. + allowedMode: ColorModeRestriction.MONOCHROME, + defaultMode: undefined, + expectedDisabled: true, + expectedValue: 'bw', + }, + { + // Enforce color printing, default is ignored. + allowedMode: ColorModeRestriction.COLOR, + defaultMode: ColorModeRestriction.MONOCHROME, + expectedDisabled: true, + expectedValue: 'color', + }, + ]; + for (const subtestParams of tests) { + await doAllowedDefaultModePolicySetup( + 'color', 'isColorEnabled', subtestParams.allowedMode, + subtestParams.defaultMode); + const colorSettingsSelect = page.$$('print-preview-sidebar') + .$$('print-preview-color-settings') + .$$('select'); + assertEquals( + subtestParams.expectedDisabled, colorSettingsSelect.disabled); + assertEquals(subtestParams.expectedValue, colorSettingsSelect.value); + } + }); + + // Tests different scenarios of duplex printing policy. + test(assert(policy_tests.TestNames.DuplexPolicy), async () => { + const tests = [ + { + // No policies. + allowedMode: undefined, + defaultMode: undefined, + expectedChecked: false, + expectedOpened: false, + expectedDisabled: false, + expectedValue: DuplexMode.LONG_EDGE, + }, + { + // No restriction, default set to SIMPLEX. + allowedMode: undefined, + defaultMode: DuplexModeRestriction.SIMPLEX, + expectedChecked: false, + expectedOpened: false, + expectedDisabled: false, + expectedValue: DuplexMode.LONG_EDGE, + }, + { + // No restriction, default set to UNSET. + allowedMode: undefined, + defaultMode: DuplexModeRestriction.UNSET, + expectedChecked: true, + expectedOpened: true, + expectedDisabled: false, + expectedValue: DuplexMode.LONG_EDGE, + }, + { + // Allowed mode set to UNSET. + allowedMode: DuplexModeRestriction.UNSET, + defaultMode: undefined, + expectedChecked: false, + expectedOpened: false, + expectedDisabled: false, + expectedValue: DuplexMode.LONG_EDGE, + }, + { + // No restriction, default set to LONG_EDGE. + allowedMode: undefined, + defaultMode: DuplexModeRestriction.LONG_EDGE, + expectedChecked: true, + expectedOpened: true, + expectedDisabled: false, + expectedValue: DuplexMode.LONG_EDGE, + }, + { + // No restriction, default set to SHORT_EDGE. + allowedMode: undefined, + defaultMode: DuplexModeRestriction.SHORT_EDGE, + expectedChecked: true, + expectedOpened: true, + expectedDisabled: false, + expectedValue: DuplexMode.SHORT_EDGE, + }, + { + // No restriction, default set to DUPLEX. + allowedMode: undefined, + defaultMode: DuplexModeRestriction.DUPLEX, + expectedChecked: true, + expectedOpened: true, + expectedDisabled: false, + expectedValue: DuplexMode.LONG_EDGE, + }, + { + // No restriction, default set to SHORT_EDGE. + allowedMode: DuplexModeRestriction.SIMPLEX, + defaultMode: undefined, + expectedChecked: false, + expectedOpened: false, + expectedDisabled: false, + expectedValue: DuplexMode.LONG_EDGE, + }, + { + // Restricted to LONG_EDGE. + allowedMode: DuplexModeRestriction.LONG_EDGE, + defaultMode: undefined, + expectedChecked: true, + expectedOpened: true, + expectedDisabled: true, + expectedValue: DuplexMode.LONG_EDGE, + }, + { + // Restricted to SHORT_EDGE. + allowedMode: DuplexModeRestriction.SHORT_EDGE, + defaultMode: undefined, + expectedChecked: true, + expectedOpened: true, + expectedDisabled: true, + expectedValue: DuplexMode.SHORT_EDGE, + }, + { + // Restricted to DUPLEX. + allowedMode: DuplexModeRestriction.DUPLEX, + defaultMode: undefined, + expectedChecked: true, + expectedOpened: true, + expectedDisabled: false, + expectedValue: DuplexMode.LONG_EDGE, + }, + { + // Restricted to SHORT_EDGE, default is ignored. + allowedMode: DuplexModeRestriction.SHORT_EDGE, + defaultMode: DuplexModeRestriction.LONG_EDGE, + expectedChecked: true, + expectedOpened: true, + expectedDisabled: true, + expectedValue: DuplexMode.SHORT_EDGE, + }, + ]; + for (const subtestParams of tests) { + await doAllowedDefaultModePolicySetup( + 'duplex', 'isDuplexEnabled', subtestParams.allowedMode, + subtestParams.defaultMode); + toggleMoreSettings(); + const duplexSettingsSection = + page.$$('print-preview-sidebar').$$('print-preview-duplex-settings'); + const checkbox = duplexSettingsSection.$$('cr-checkbox'); + const collapse = duplexSettingsSection.$$('iron-collapse'); + const select = duplexSettingsSection.$$('select'); + const expectedValue = subtestParams.expectedValue.toString(); + assertEquals(subtestParams.expectedChecked, checkbox.checked); + assertEquals(subtestParams.expectedOpened, collapse.opened); + assertEquals(subtestParams.expectedDisabled, select.disabled); + assertEquals(expectedValue, select.value); + } + }); + + // Tests different scenarios of pin printing policy. + test(assert(policy_tests.TestNames.PinPolicy), async () => { + const tests = [ + { + // No policies. + allowedMode: undefined, + defaultMode: undefined, + expectedCheckboxDisabled: false, + expectedChecked: false, + expectedOpened: false, + expectedInputDisabled: true, + }, + { + // No restriction, default set to UNSET. + allowedMode: undefined, + defaultMode: PinModeRestriction.UNSET, + expectedCheckboxDisabled: false, + expectedChecked: false, + expectedOpened: false, + expectedInputDisabled: true, + }, + { + // No restriction, default set to PIN. + allowedMode: undefined, + defaultMode: PinModeRestriction.PIN, + expectedCheckboxDisabled: false, + expectedChecked: true, + expectedOpened: true, + expectedInputDisabled: false, + }, + { + // No restriction, default set to NO_PIN. + allowedMode: undefined, + defaultMode: PinModeRestriction.NO_PIN, + expectedCheckboxDisabled: false, + expectedChecked: false, + expectedOpened: false, + expectedInputDisabled: true, + }, + { + // Restriction se to UNSET. + allowedMode: PinModeRestriction.UNSET, + defaultMode: undefined, + expectedCheckboxDisabled: false, + expectedChecked: false, + expectedOpened: false, + expectedInputDisabled: true, + }, + { + // Restriction set to PIN. + allowedMode: PinModeRestriction.PIN, + defaultMode: undefined, + expectedCheckboxDisabled: true, + expectedChecked: true, + expectedOpened: true, + expectedInputDisabled: false, + }, + { + // Restriction set to NO_PIN. + allowedMode: PinModeRestriction.NO_PIN, + defaultMode: undefined, + expectedCheckboxDisabled: true, + expectedChecked: false, + expectedOpened: false, + expectedInputDisabled: true, + }, + { + // Restriction set to PIN, default is ignored. + allowedMode: PinModeRestriction.NO_PIN, + defaultMode: PinModeRestriction.PIN, + expectedCheckboxDisabled: true, + expectedChecked: false, + expectedOpened: false, + expectedInputDisabled: true, + }, + ]; + for (const subtestParams of tests) { + const initialSettings = getDefaultInitialSettings(); + + if (subtestParams.allowedMode !== undefined || + subtestParams.defaultMode !== undefined) { + const policy = {}; + if (subtestParams.allowedMode !== undefined) { + policy.allowedMode = subtestParams.allowedMode; + } + if (subtestParams.defaultMode !== undefined) { + policy.defaultMode = subtestParams.defaultMode; + } + initialSettings.policies = {"pin": policy}; + } + + const appState = {version: 2, "pinValue": "0000"}; + if (subtestParams.defaultMode !== undefined) { + appState.isPinEnabled = !subtestParams.defaultMode; + } + initialSettings.serializedAppStateStr = JSON.stringify(appState); + + await loadInitialSettings(initialSettings); + + const pinSettingsSection = + page.$$('print-preview-sidebar').$$('print-preview-pin-settings'); + const checkbox = pinSettingsSection.$$('cr-checkbox'); + const collapse = pinSettingsSection.$$('iron-collapse'); + const input = pinSettingsSection.$$('cr-input'); + assertEquals(subtestParams.expectedCheckboxDisabled, checkbox.disabled); + assertEquals(subtestParams.expectedChecked, checkbox.checked); + assertEquals(subtestParams.expectedOpened, collapse.opened); + assertEquals(subtestParams.expectedInputDisabled, input.disabled); + } + }); + // </if> });
diff --git a/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js b/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js index 15db235e..5cbebbb9 100644 --- a/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js +++ b/chrome/test/data/webui/print_preview/print_preview_ui_browsertest.js
@@ -235,6 +235,18 @@ TEST_F('PrintPreviewPolicyTest', 'SheetsPolicy', function() { this.runMochaTest(policy_tests.TestNames.SheetsPolicy); }); + +TEST_F('PrintPreviewPolicyTest', 'ColorPolicy', function() { + this.runMochaTest(policy_tests.TestNames.ColorPolicy); +}); + +TEST_F('PrintPreviewPolicyTest', 'DuplexPolicy', function() { + this.runMochaTest(policy_tests.TestNames.DuplexPolicy); +}); + +TEST_F('PrintPreviewPolicyTest', 'PinPolicy', function() { + this.runMochaTest(policy_tests.TestNames.PinPolicy); +}); GEN('#endif'); // eslint-disable-next-line no-var @@ -987,13 +999,6 @@ }); TEST_F( - 'PrintPreviewDestinationSearchTestChromeOS', - 'ReceiveSuccessfultSetupWithPolicies', function() { - this.runMochaTest( - destination_search_test_chromeos.TestNames.ResolutionFails); - }); - -TEST_F( 'PrintPreviewDestinationSearchTestChromeOS', 'CloudKioskPrinter', function() { this.runMochaTest(
diff --git a/chrome/test/data/webui/settings/chromeos/app_management/borealis_detail_view_test.js b/chrome/test/data/webui/settings/chromeos/app_management/borealis_detail_view_test.js index 7ab59da3..b4dd9e05 100644 --- a/chrome/test/data/webui/settings/chromeos/app_management/borealis_detail_view_test.js +++ b/chrome/test/data/webui/settings/chromeos/app_management/borealis_detail_view_test.js
@@ -7,23 +7,25 @@ // #import {BorealisPermissionType, createPermission, PermissionValueType, Bool, AppManagementStore, updateSelectedAppId, getPermissionValueBool, convertOptionalBoolToBool} from 'chrome://os-settings/chromeos/os_settings.js'; // #import {setupFakeHandler, replaceStore, replaceBody, getPermissionCrToggleByType, getPermissionToggleByType} from './test_util.m.js'; +// #import {eventToPromise, flushTasks} from 'chrome://test/test_util.m.js'; +// #import {Router, routes, Route, pageVisibility} from 'chrome://os-settings/chromeos/os_settings.js'; // clang-format on 'use strict'; suite('<app-management-borealis-detail-view>', function() { - let BorealisDetailView; + let borealisDetailView; let fakeHandler; const kBorealisMainAppId = 'epfhbkiklgmlkhfpbcdleadnhcfdjfmo'; function getPermissionBoolByType(permissionType) { return app_management.util.getPermissionValueBool( - BorealisDetailView.app_, permissionType); + borealisDetailView.app_, permissionType); } async function clickToggle(permissionType) { - getPermissionToggleByType(BorealisDetailView, permissionType).click(); + getPermissionToggleByType(borealisDetailView, permissionType).click(); await fakeHandler.flushPipesForTesting(); } @@ -44,43 +46,42 @@ false /*is_managed*/); } - // Add an app, and make it the currently selected app. - const options = { + // Add main app, and make it the currently selected app. + const mainOptions = { type: apps.mojom.AppType.kBorealis, permissions: permissions }; - const app = await fakeHandler.addApp(kBorealisMainAppId, options); + const mainApp = await fakeHandler.addApp(kBorealisMainAppId, mainOptions); app_management.AppManagementStore.getInstance().dispatch( - app_management.actions.updateSelectedAppId(app.id)); - - BorealisDetailView = + app_management.actions.updateSelectedAppId(mainApp.id)); + borealisDetailView = document.createElement('app-management-borealis-detail-view'); - replaceBody(BorealisDetailView); + replaceBody(borealisDetailView); }); test('App is rendered correctly', function() { assertEquals( app_management.AppManagementStore.getInstance().data.selectedAppId, - BorealisDetailView.app_.id); + borealisDetailView.app_.id); }); test('Toggle permissions', async function() { const checkToggle = async (permissionType) => { assertTrue(getPermissionBoolByType(permissionType)); - assertTrue(getPermissionCrToggleByType(BorealisDetailView, permissionType) + assertTrue(getPermissionCrToggleByType(borealisDetailView, permissionType) .checked); // Toggle off. await clickToggle(permissionType); assertFalse(getPermissionBoolByType(permissionType)); assertFalse( - getPermissionCrToggleByType(BorealisDetailView, permissionType) + getPermissionCrToggleByType(borealisDetailView, permissionType) .checked); // Toggle on. await clickToggle(permissionType); assertTrue(getPermissionBoolByType(permissionType)); - assertTrue(getPermissionCrToggleByType(BorealisDetailView, permissionType) + assertTrue(getPermissionCrToggleByType(borealisDetailView, permissionType) .checked); }; @@ -88,7 +89,7 @@ }); test('Pin to shelf toggle', async function() { - const pinToShelfItem = BorealisDetailView.$['pin-to-shelf-setting']; + const pinToShelfItem = borealisDetailView.$['pin-to-shelf-setting']; const toggle = pinToShelfItem.$['toggle-row'].$.toggle; assertFalse(toggle.checked); @@ -111,4 +112,33 @@ app_management.util.convertOptionalBoolToBool( getSelectedAppFromStore().isPinned)); }); + + test('Permission info links are correct', async function() { + assertTrue(!!borealisDetailView.$$('#main-link')); + assertFalse(!!borealisDetailView.$$('#borealis-link')); + + // Add borealis (non main) app. Note that any tests after this will + // have the borealis app selected as default. + const options = { + type: apps.mojom.AppType.kBorealis, + }; + const app = await fakeHandler.addApp('foo', options); + app_management.AppManagementStore.getInstance().dispatch( + app_management.actions.updateSelectedAppId(app.id)); + await fakeHandler.flushPipesForTesting(); + assertFalse(!!borealisDetailView.$$('#main-link')); + assertTrue(!!borealisDetailView.$$('#borealis-link')); + + // Check that link directs to main app page. + const link = borealisDetailView.$$('#borealis-link'); + const anchorTag = link.$$('a'); + assertTrue(!!anchorTag); + const localizedLinkPromise = test_util.eventToPromise('link-clicked', link); + anchorTag.click(); + await Promise.all([localizedLinkPromise, test_util.flushTasks()]); + await fakeHandler.flushPipesForTesting(); + assertEquals( + settings.Router.getInstance().getQueryParameters().get('id'), + kBorealisMainAppId); + }); });
diff --git a/chrome/test/data/webui/settings/chromeos/os_reset_page_test.js b/chrome/test/data/webui/settings/chromeos/os_reset_page_test.js index 6c99fe1..539315f 100644 --- a/chrome/test/data/webui/settings/chromeos/os_reset_page_test.js +++ b/chrome/test/data/webui/settings/chromeos/os_reset_page_test.js
@@ -5,7 +5,7 @@ // clang-format off // #import {TestLifetimeBrowserProxy} from './test_os_lifetime_browser_proxy.m.js'; // #import {OsResetBrowserProxyImpl} from 'chrome://os-settings/chromeos/lazy_load.js'; -// #import {LifetimeBrowserProxy, LifetimeBrowserProxyImpl, Router, routes} from 'chrome://os-settings/chromeos/os_settings.js'; +// #import {LifetimeBrowserProxyImpl, Router, routes} from 'chrome://os-settings/chromeos/os_settings.js'; // #import {TestOsResetBrowserProxy} from './test_os_reset_browser_proxy.m.js'; // #import {setESimManagerRemoteForTesting} from 'chrome://resources/cr_components/chromeos/cellular_setup/mojo_interface_provider.m.js'; // #import {FakeESimManagerRemote} from 'chrome://test/cr_components/chromeos/cellular_setup/fake_esim_manager_remote.m.js';
diff --git a/chrome/test/data/webui/settings/chromeos/test_os_lifetime_browser_proxy.js b/chrome/test/data/webui/settings/chromeos/test_os_lifetime_browser_proxy.js index e4e2a70..34b2ae04 100644 --- a/chrome/test/data/webui/settings/chromeos/test_os_lifetime_browser_proxy.js +++ b/chrome/test/data/webui/settings/chromeos/test_os_lifetime_browser_proxy.js
@@ -3,13 +3,10 @@ // found in the LICENSE file. // #import {TestBrowserProxy} from '../../test_browser_proxy.m.js'; -// #import {LifetimeBrowserProxy} from 'chrome://os-settings/chromeos/os_settings.js'; cr.define('settings', function() { /** * A test version of LifetimeBrowserProxy. - * - * @implements {settings.LifetimeBrowserProxy} */ /* #export */ class TestLifetimeBrowserProxy extends TestBrowserProxy { constructor() {
diff --git a/chrome/test/data/webui/settings/test_lifetime_browser_proxy.js b/chrome/test/data/webui/settings/test_lifetime_browser_proxy.js index 7866099d..770293e 100644 --- a/chrome/test/data/webui/settings/test_lifetime_browser_proxy.js +++ b/chrome/test/data/webui/settings/test_lifetime_browser_proxy.js
@@ -3,14 +3,11 @@ // found in the LICENSE file. import {isChromeOS} from 'chrome://resources/js/cr.m.js'; -import {LifetimeBrowserProxy} from 'chrome://settings/settings.js'; import {TestBrowserProxy} from '../test_browser_proxy.m.js'; /** * A test version of LifetimeBrowserProxy. - * - * @implements {LifetimeBrowserProxy} */ export class TestLifetimeBrowserProxy extends TestBrowserProxy { constructor() { @@ -22,24 +19,20 @@ super(methodNames); } - /** @override */ restart() { this.methodCalled('restart'); } - /** @override */ relaunch() { this.methodCalled('relaunch'); } } if (isChromeOS) { - /** @override */ TestLifetimeBrowserProxy.prototype.signOutAndRestart = function() { this.methodCalled('signOutAndRestart'); }; - /** @override */ TestLifetimeBrowserProxy.prototype.factoryReset = function( requestTpmFirmwareUpdate) { this.methodCalled('factoryReset', requestTpmFirmwareUpdate);
diff --git a/chromeos/components/camera_app_ui/BUILD.gn b/chromeos/components/camera_app_ui/BUILD.gn index f74756d..f904198 100644 --- a/chromeos/components/camera_app_ui/BUILD.gn +++ b/chromeos/components/camera_app_ui/BUILD.gn
@@ -37,6 +37,7 @@ ":window_managemet", "//ash/public/cpp", "//chromeos/components/web_applications", + "//chromeos/utils", "//components/arc", "//content/public/browser", "//content/public/common",
diff --git a/chromeos/components/camera_app_ui/camera_app_helper.mojom b/chromeos/components/camera_app_ui/camera_app_helper.mojom index b10720d..36f6e89 100644 --- a/chromeos/components/camera_app_ui/camera_app_helper.mojom +++ b/chromeos/components/camera_app_ui/camera_app_helper.mojom
@@ -5,6 +5,7 @@ module chromeos_camera.mojom; import "components/arc/mojom/camera_intent.mojom"; +import "ui/gfx/geometry/mojom/geometry.mojom"; // Interface for monitoring tablet mode state of device. The state is detected // from Chrome browser process and is notified to Chrome Camera App in renderer @@ -95,6 +96,11 @@ Focus() => (); }; +enum DocumentOutputFormat { + JPEG = 0, + PDF = 1, +}; + // Interface for communication between Chrome Camera App (Remote) and Chrome // (Receiver). interface CameraAppHelper { @@ -165,4 +171,29 @@ // request is raised, or when the error occurs. We can determine the cases // by result. MonitorFileDeletion(string name) => (FileMonitorResult result); + + // Returns true if document mode is supported on the device. + IsDocumentModeSupported() => (bool is_supported); + + // Returns the detected document corners from given |jpeg_data|. + // The amount of corners will be either 0, indicating there are no corners + // detected, or 4, which are in top-left => bottom-left => bottom-right => + // top-right order. The value of the coordinate of a corner will be in [0, 1). + // If there is non-zero orientation info in EXIF of |jpeg_data|, the output + // |corners| will be detected on image with orientation corrected. + ScanDocumentCorners(array<uint8> jpeg_data) + => (array<gfx.mojom.PointF> corners); + + // Does the post processing for document given by its |jpeg_data|, document + // |corners|, and convert the result to the desired |output_format|. The input + // |corners| should be the ones based on the image with corrected orientation. + // And it is guaranteed that the output |doc_data| will have none or corrected + // orientation. + ConvertToDocument(array<uint8> jpeg_data, + array<gfx.mojom.PointF, 4> corners, + DocumentOutputFormat output_format) + => (array<uint8> doc_data); + + // Converts the given |jpeg_data| to PDF format. + ConvertToPdf(array<uint8> jpeg_data) => (array<uint8> pdf_data); };
diff --git a/chromeos/components/camera_app_ui/camera_app_helper_impl.cc b/chromeos/components/camera_app_ui/camera_app_helper_impl.cc index b259aae..f8c2e91 100644 --- a/chromeos/components/camera_app_ui/camera_app_helper_impl.cc +++ b/chromeos/components/camera_app_ui/camera_app_helper_impl.cc
@@ -9,8 +9,10 @@ #include "ash/public/cpp/tablet_mode.h" #include "ash/public/cpp/window_properties.h" #include "base/callback_helpers.h" +#include "base/notreached.h" #include "base/strings/string_number_conversions.h" #include "base/trace_event/trace_event.h" +#include "chromeos/utils/pdf_conversion.h" #include "content/public/browser/web_contents.h" #include "net/base/url_util.h" #include "ui/aura/window.h" @@ -18,6 +20,8 @@ namespace chromeos_camera { namespace { +using chromeos_camera::mojom::DocumentOutputFormat; + mojom::ScreenState ToMojoScreenState(ash::ScreenBacklightState s) { switch (s) { case ash::ScreenBacklightState::ON: @@ -67,6 +71,19 @@ return intent_id; } +bool IsValidCorners(const std::vector<gfx::PointF>& corners) { + if (corners.size() != 4) { + return false; + } + for (auto& corner : corners) { + if (corner.x() < 0.f || corner.x() > 1.f || corner.y() < 0.f || + corner.y() > 1.f) { + return false; + } + } + return true; +} + } // namespace CameraAppHelperImpl::CameraAppHelperImpl( @@ -79,7 +96,9 @@ send_broadcast_callback_(std::move(send_broadcast_callback)), has_external_screen_(HasExternalScreen()), pending_intent_id_(absl::nullopt), - window_(window) { + window_(window), + document_scanner_service_( + chromeos::DocumentScannerServiceClient::Create()) { DCHECK(camera_app_ui); DCHECK(window); window->SetProperty(ash::kCanConsumeSystemKeysKey, true); @@ -169,6 +188,48 @@ external_screen_monitor_->Update(has_external_screen_); } +void CameraAppHelperImpl::OnScannedDocumentCorners( + ScanDocumentCornersCallback callback, + bool success, + const std::vector<gfx::PointF>& corners) { + if (success) { + std::move(callback).Run(corners); + } else { + LOG(ERROR) << "Failed to scan document corners"; + std::move(callback).Run({}); + } +} + +void CameraAppHelperImpl::OnConvertedToDocument( + DocumentOutputFormat output_format, + ConvertToDocumentCallback callback, + bool success, + const std::vector<uint8_t>& processed_jpeg_image) { + if (!success) { + LOG(ERROR) << "Failed to convert to document"; + std::move(callback).Run({}); + return; + } + + switch (output_format) { + case DocumentOutputFormat::JPEG: + std::move(callback).Run(processed_jpeg_image); + return; + case DocumentOutputFormat::PDF: { + std::vector<uint8_t> pdf_data; + if (!chromeos::ConvertJpgImageToPdf(processed_jpeg_image, &pdf_data)) { + LOG(ERROR) << "Failed to convert jpeg image to PDF format"; + std::move(callback).Run({}); + return; + } + std::move(callback).Run(std::move(pdf_data)); + return; + } + default: + NOTREACHED() << "Unsupported output format: " << output_format; + } +} + void CameraAppHelperImpl::OpenFileInGallery(const std::string& name) { camera_app_ui_->delegate()->OpenFileInGallery(name); } @@ -222,6 +283,73 @@ std::move(callback))); } +void CameraAppHelperImpl::IsDocumentModeSupported( + IsDocumentModeSupportedCallback callback) { + bool supported = document_scanner_service_ != nullptr; + std::move(callback).Run(supported); +} + +void CameraAppHelperImpl::ScanDocumentCorners( + const std::vector<uint8_t>& jpeg_data, + ScanDocumentCornersCallback callback) { + DCHECK(document_scanner_service_); + base::MappedReadOnlyRegion memory = + base::ReadOnlySharedMemoryRegion::Create(jpeg_data.size()); + if (!memory.IsValid()) { + LOG(ERROR) << "Failed to map memory"; + std::move(callback).Run({}); + } + memcpy(memory.mapping.memory(), jpeg_data.data(), jpeg_data.size()); + + // Since |this| owns |document_scanner_service|, and the callback will be + // posted to other sequence with weak pointer of |document_scanner_service|. + // Therefore, it is safe to use |base::Unretained(this)| here. + document_scanner_service_->DetectCornersFromJPEGImage( + std::move(memory.region), + base::BindOnce(&CameraAppHelperImpl::OnScannedDocumentCorners, + base::Unretained(this), std::move(callback))); +} + +void CameraAppHelperImpl::ConvertToDocument( + const std::vector<uint8_t>& jpeg_data, + const std::vector<gfx::PointF>& corners, + DocumentOutputFormat output_format, + ConvertToDocumentCallback callback) { + DCHECK(document_scanner_service_); + if (!IsValidCorners(corners)) { + LOG(ERROR) << "Failed to convert to document due to invalid corners"; + std::move(callback).Run({}); + } + + base::MappedReadOnlyRegion memory = + base::ReadOnlySharedMemoryRegion::Create(jpeg_data.size()); + if (!memory.IsValid()) { + LOG(ERROR) << "Failed to map memory"; + std::move(callback).Run({}); + } + memcpy(memory.mapping.memory(), jpeg_data.data(), jpeg_data.size()); + + // Since |this| owns |document_scanner_service|, and the callback will be + // posted to other sequence with weak pointer of |document_scanner_service|. + // Therefore, it is safe to use |base::Unretained(this)| here. + document_scanner_service_->DoPostProcessing( + std::move(memory.region), corners, + base::BindOnce(&CameraAppHelperImpl::OnConvertedToDocument, + base::Unretained(this), output_format, + std::move(callback))); +} + +void CameraAppHelperImpl::ConvertToPdf(const std::vector<uint8_t>& jpeg_data, + ConvertToPdfCallback callback) { + std::vector<uint8_t> pdf_data; + if (!chromeos::ConvertJpgImageToPdf(jpeg_data, &pdf_data)) { + LOG(ERROR) << "Failed to convert jpeg image to PDF format"; + std::move(callback).Run({}); + return; + } + std::move(callback).Run(std::move(pdf_data)); +} + void CameraAppHelperImpl::OnTabletModeStarted() { if (tablet_mode_monitor_.is_bound()) tablet_mode_monitor_->Update(true);
diff --git a/chromeos/components/camera_app_ui/camera_app_helper_impl.h b/chromeos/components/camera_app_ui/camera_app_helper_impl.h index ddb4307..ecf2ef82 100644 --- a/chromeos/components/camera_app_ui/camera_app_helper_impl.h +++ b/chromeos/components/camera_app_ui/camera_app_helper_impl.h
@@ -13,6 +13,7 @@ #include "chromeos/components/camera_app_ui/camera_app_helper.mojom.h" #include "chromeos/components/camera_app_ui/camera_app_ui.h" #include "chromeos/components/camera_app_ui/camera_app_window_state_controller.h" +#include "chromeos/components/camera_app_ui/document_scanner_service_client.h" #include "mojo/public/cpp/bindings/remote.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/aura/window.h" @@ -72,10 +73,30 @@ void SendNewCaptureBroadcast(bool is_video, const std::string& name) override; void MonitorFileDeletion(const std::string& name, MonitorFileDeletionCallback callback) override; + void IsDocumentModeSupported( + IsDocumentModeSupportedCallback callback) override; + void ScanDocumentCorners(const std::vector<uint8_t>& jpeg_data, + ScanDocumentCornersCallback callback) override; + void ConvertToDocument( + const std::vector<uint8_t>& jpeg_data, + const std::vector<gfx::PointF>& corners, + chromeos_camera::mojom::DocumentOutputFormat output_format, + ConvertToDocumentCallback callback) override; + void ConvertToPdf(const std::vector<uint8_t>& jpeg_data, + ConvertToPdfCallback callback) override; private: void CheckExternalScreenState(); + void OnScannedDocumentCorners(ScanDocumentCornersCallback callback, + bool success, + const std::vector<gfx::PointF>& corners); + void OnConvertedToDocument( + chromeos_camera::mojom::DocumentOutputFormat output_format, + ConvertToDocumentCallback callback, + bool success, + const std::vector<uint8_t>& processed_jpeg_data); + // ash::TabletModeObserver overrides; void OnTabletModeStarted() override; void OnTabletModeEnded() override; @@ -115,6 +136,10 @@ display::ScopedDisplayObserver display_observer_{this}; + // Client to connect to document detection service. + std::unique_ptr<chromeos::DocumentScannerServiceClient> + document_scanner_service_; + DISALLOW_COPY_AND_ASSIGN(CameraAppHelperImpl); };
diff --git a/chromeos/components/camera_app_ui/resources/images/spinner.svg b/chromeos/components/camera_app_ui/resources/images/spinner.svg index 936309cda..d185b689 100644 --- a/chromeos/components/camera_app_ui/resources/images/spinner.svg +++ b/chromeos/components/camera_app_ui/resources/images/spinner.svg
@@ -90,7 +90,7 @@ <!-- 12.5= RADIUS --> <!-- 1.5= STROKEWIDTH/2 --> <!-- ARCSIZE would affect the 1.5,14 part of this... 1.5,14 is specific to - 270 degress --> + 270 degrees --> <g class="qp-circular-loader"> <path class="qp-circular-loader-path" fill="none" d="M 14,1.5 A 12.5,12.5 0 1 1 1.5,14" stroke-width="3"
diff --git a/chromeos/components/camera_app_ui/resources/js/device/device_info_updater.js b/chromeos/components/camera_app_ui/resources/js/device/device_info_updater.js index b3ab375..2781465 100644 --- a/chromeos/components/camera_app_ui/resources/js/device/device_info_updater.js +++ b/chromeos/components/camera_app_ui/resources/js/device/device_info_updater.js
@@ -53,7 +53,7 @@ /** * Listeners to be called after new camera information is available. - * @type {!Array<function(!DeviceInfoUpdater): !Promise>} + * @type {!Array<function(!DeviceInfoUpdater): void>} * @private */ this.deviceChangeListeners_ = []; @@ -142,7 +142,7 @@ if (await DeviceOperator.isSupported()) { this.photoPreferrer_.updateDevicesInfo(this.camera3DevicesInfo_); this.videoPreferrer_.updateDevicesInfo(this.camera3DevicesInfo_); - await Promise.all(this.deviceChangeListeners_.map((l) => l(this))); + this.deviceChangeListeners_.forEach((l) => l(this)); } else { this.camera3DevicesInfo_ = null; } @@ -150,7 +150,7 @@ /** * Registers listener to be called when state of available devices changes. - * @param {function(!DeviceInfoUpdater): !Promise} listener + * @param {function(!DeviceInfoUpdater): void} listener */ addDeviceChangeListener(listener) { this.deviceChangeListeners_.push(listener); @@ -186,27 +186,27 @@ /** * Gets MediaDeviceInfo for all available video devices. - * @return {!Promise<!Array<!MediaDeviceInfo>>} + * @return {!Array<!MediaDeviceInfo>} */ - async getDevicesInfo() { + getDevicesInfo() { return this.devicesInfo_; } /** * Gets MediaDeviceInfo of specific video device. * @param {string} deviceId Device id of video device to get information from. - * @return {!Promise<?MediaDeviceInfo>} + * @return {?MediaDeviceInfo} */ - async getDeviceInfo(deviceId) { - const /** !Array<!MediaDeviceInfo> */ infos = await this.getDevicesInfo(); + getDeviceInfo(deviceId) { + const /** !Array<!MediaDeviceInfo> */ infos = this.getDevicesInfo(); return infos.find((d) => d.deviceId === deviceId) || null; } /** * Gets Camera3DeviceInfo for all available video devices. - * @return {!Promise<?Array<!Camera3DeviceInfo>>} + * @return {?Array<!Camera3DeviceInfo>} */ - async getCamera3DevicesInfo() { + getCamera3DevicesInfo() { return this.camera3DevicesInfo_; } }
diff --git a/chromeos/components/camera_app_ui/resources/js/externs/types.d.ts b/chromeos/components/camera_app_ui/resources/js/externs/types.d.ts index 5626406..61ee7f8 100644 --- a/chromeos/components/camera_app_ui/resources/js/externs/types.d.ts +++ b/chromeos/components/camera_app_ui/resources/js/externs/types.d.ts
@@ -112,6 +112,7 @@ Promise<FileSystemDirectoryHandle>; getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>; + removeEntry(name: string): Promise<void>; values(): IterableIterator<FileSystemHandle>; } @@ -142,7 +143,7 @@ } } -// v8 specific stack information +// v8 specific stack information. interface CallSite { getFileName(): string|undefined; getFunctionName(): string|undefined; @@ -150,7 +151,22 @@ getColumnNumber(): number|undefined; } -// v8 specific stack trace customizing, see https://v8.dev/docs/stack-trace-api +// v8 specific stack trace customizing, see https://v8.dev/docs/stack-trace-api. interface ErrorConstructor { prepareStackTrace(error: Error, structuredStackTrace: CallSite[]): void; } + +// Chrome private API for crash report. +declare namespace chrome.crashReportPrivate { + export type ErrorInfo = { + message: string, + url: string, + columnNumber?: number, + debugId?: string, + lineNumber?: number, + product?: string, + stackTrace?: string, + version?: string, + }; + export const reportError: (info: ErrorInfo, callback: () => void) => void; +}
diff --git a/chromeos/components/camera_app_ui/resources/js/externs/typescript.js b/chromeos/components/camera_app_ui/resources/js/externs/typescript.js index db0f0bfe..9157a096 100644 --- a/chromeos/components/camera_app_ui/resources/js/externs/typescript.js +++ b/chromeos/components/camera_app_ui/resources/js/externs/typescript.js
@@ -10,3 +10,6 @@ /** @typedef {NodeList} */ var NodeListOf; + +/** @typedef {Event} */ +var BeforeUnloadEvent;
diff --git a/chromeos/components/camera_app_ui/resources/js/focus_ring.js b/chromeos/components/camera_app_ui/resources/js/focus_ring.js index 45302ea..8fabc2a 100644 --- a/chromeos/components/camera_app_ui/resources/js/focus_ring.js +++ b/chromeos/components/camera_app_ui/resources/js/focus_ring.js
@@ -57,8 +57,8 @@ for (const v of ringStyleValues) { ring.classList.toggle(v, ringStyleValue.includes(v)); } - const uiRectEvent = new CustomEvent( - FOCUS_RING_UI_RECT_EVENT_NAME, {cancelable: true, target}); + const uiRectEvent = + new CustomEvent(FOCUS_RING_UI_RECT_EVENT_NAME, {cancelable: true}); const doDefault = el.dispatchEvent(uiRectEvent); if (doDefault) { setUIRect(el.getBoundingClientRect());
diff --git a/chromeos/components/camera_app_ui/resources/js/js.gni b/chromeos/components/camera_app_ui/resources/js/js.gni index 0754d45..119c6df 100644 --- a/chromeos/components/camera_app_ui/resources/js/js.gni +++ b/chromeos/components/camera_app_ui/resources/js/js.gni
@@ -49,7 +49,6 @@ "mojo/chrome_helper.js", "mojo/device_operator.js", "mojo/image_capture.js", - "mojo/mock_document_scanner.js", "mojo/util.js", "nav.js", "new_feature_toast.js",
diff --git a/chromeos/components/camera_app_ui/resources/js/models/barcode.js b/chromeos/components/camera_app_ui/resources/js/models/barcode.js index 80daa1be..609613b 100644 --- a/chromeos/components/camera_app_ui/resources/js/models/barcode.js +++ b/chromeos/components/camera_app_ui/resources/js/models/barcode.js
@@ -9,14 +9,14 @@ // eslint-disable-next-line no-unused-vars import {BarcodeWorkerInterface} from './barcode_worker_interface.js'; -// The delay interval bewteen consecutive barcode detections. +// The delay interval between consecutive barcode detections. const SCAN_INTERVAL = 200; // If any dimension of the video exceeds this size, the image would be cropped // and/or scaled before scanning to speed up the detection. const MAX_SCAN_SIZE = 720; -// The portion of the sqaure in the middle that would be scanned for barcode. +// The portion of the square in the middle that would be scanned for barcode. // TODO(b/172879638): Change 1.0 to match the final UI spec. const ACTIVE_SCAN_RATIO = 1.0;
diff --git a/chromeos/components/camera_app_ui/resources/js/models/file_system_access_entry.js b/chromeos/components/camera_app_ui/resources/js/models/file_system_access_entry.js index e48953c..8e27c2f1 100644 --- a/chromeos/components/camera_app_ui/resources/js/models/file_system_access_entry.js +++ b/chromeos/components/camera_app_ui/resources/js/models/file_system_access_entry.js
@@ -8,39 +8,14 @@ import {AsyncWriter} from './async_writer.js'; /** - * The file system entry implementation for SWA. - */ -export class FileSystemAccessEntry { - /** - * @param {!FileSystemHandle} handle - */ - constructor(handle) { - /** - * @type {!FileSystemHandle} - * @private - */ - this.handle_ = handle; - } - - /** - * @return {string} - */ - get name() { - return this.handle_.name; - } -} - -/** * The file entry implementation for SWA. */ -export class FileAccessEntry extends FileSystemAccessEntry { +export class FileAccessEntry { /** * @param {!FileSystemFileHandle} handle * @param {?DirectoryAccessEntryImpl} parent */ constructor(handle, parent = null) { - super(handle); - /** * @type {!FileSystemFileHandle} * @private @@ -112,6 +87,13 @@ } return this.parent_.removeEntry(this.name); } + + /** + * @return {string} + */ + get name() { + return this.handle_.name; + } } /** @@ -199,14 +181,12 @@ * The directory entry implementation for SWA. * @implements {DirectoryAccessEntry} */ -export class DirectoryAccessEntryImpl extends FileSystemAccessEntry { +export class DirectoryAccessEntryImpl { /** * @param {!FileSystemDirectoryHandle} handle * @param {?DirectoryAccessEntryImpl} parent */ constructor(handle, parent = null) { - super(handle); - /** * @type {!FileSystemDirectoryHandle} * @private @@ -224,23 +204,33 @@ * @override */ get name() { - return this.name; + return this.handle_.name; } /** * @override */ async getFiles() { - return /** @type {!Array<!FileAccessEntry>} */ ( - await this.getHandles_({isDirectory: false})); + const results = []; + for await (const handle of this.handle_.values()) { + if (handle.kind === 'file') { + results.push(new FileAccessEntry(handle, this)); + } + } + return results; } /** * @override */ async getDirectories() { - return /** @type {!Array<!DirectoryAccessEntry>} */ ( - await this.getHandles_({isDirectory: true})); + const results = []; + for await (const handle of this.handle_.values()) { + if (handle.kind === 'directory') { + results.push(new DirectoryAccessEntryImpl(handle, this)); + } + } + return results; } /** @@ -309,22 +299,4 @@ async removeEntry(name) { return this.handle_.removeEntry(name); } - - /** - * Gets the file handles in this directory if |isDirectory| is set to false. - * If |isDirectory| is true, gets the directory entries instead. - * @param {{isDirectory: boolean}} params - * @return {!Promise<!Array<!FileSystemAccessEntry>>} - */ - async getHandles_({isDirectory}) { - const results = []; - for await (const handle of this.handle_.values()) { - if (isDirectory && handle.kind === 'directory') { - results.push(new DirectoryAccessEntryImpl(handle, this)); - } else if (!isDirectory && handle.kind === 'file') { - results.push(new FileAccessEntry(handle, this)); - } - } - return results; - } }
diff --git a/chromeos/components/camera_app_ui/resources/js/mojo/chrome_helper.js b/chromeos/components/camera_app_ui/resources/js/mojo/chrome_helper.js index 31a1dca3..285f182 100644 --- a/chromeos/components/camera_app_ui/resources/js/mojo/chrome_helper.js +++ b/chromeos/components/camera_app_ui/resources/js/mojo/chrome_helper.js
@@ -11,7 +11,6 @@ } from '../type.js'; import {windowController} from '../window_controller.js'; -import {MockDocumentScanner} from './mock_document_scanner.js'; import {wrapEndpoint} from './util.js'; /** @@ -266,9 +265,7 @@ * @return {!Promise<boolean>} */ async isDocumentModeSupported() { - // TODO(b/180564352): Switch to the actual implementation once it is ready. - const {isSupported} = - await MockDocumentScanner.getInstance().isDocumentModeSupported(); + const {isSupported} = await this.remote_.isDocumentModeSupported(); return isSupported; } @@ -280,10 +277,8 @@ async scanDocumentCorners(blob) { const buffer = new Uint8Array(await blob.arrayBuffer()); - // TODO(b/180564352): Switch to the actual implementation once it is ready. const {corners} = - await MockDocumentScanner.getInstance().scanDocumentCorners( - castToNumberArray(buffer)); + await this.remote_.scanDocumentCorners(castToNumberArray(buffer)); return corners; } @@ -299,12 +294,18 @@ async convertToDocument(blob, corners, mimeType) { assert(corners.length === 4, 'Unexpected amount of corners'); const buffer = new Uint8Array(await blob.arrayBuffer()); + let outputFormat; + if (mimeType === MimeType.JPEG) { + outputFormat = chromeosCamera.mojom.DocumentOutputFormat.JPEG; + } else if (mimeType === MimeType.PDF) { + outputFormat = chromeosCamera.mojom.DocumentOutputFormat.PDF; + } else { + throw new Error(`Output mimetype unsupported: ${mimeType}`); + } - // TODO(b/180564352): Switch to the actual implementation once it is ready. - const {processedData} = - await MockDocumentScanner.getInstance().convertToDocument( - castToNumberArray(buffer), corners, mimeType); - return new Blob([new Uint8Array(processedData)], {type: mimeType}); + const {docData} = await this.remote_.convertToDocument( + castToNumberArray(buffer), corners, outputFormat); + return new Blob([new Uint8Array(docData)], {type: mimeType}); } /** @@ -314,8 +315,8 @@ */ async convertToPdf(jpegBlob) { const buffer = new Uint8Array(await jpegBlob.arrayBuffer()); - const {pdfData} = await MockDocumentScanner.getInstance().convertToPdf( - castToNumberArray(buffer)); + const {pdfData} = + await this.remote_.convertToPdf(castToNumberArray(buffer)); return new Blob([new Uint8Array(pdfData)], {type: MimeType.PDF}); }
diff --git a/chromeos/components/camera_app_ui/resources/js/mojo/device_operator.js b/chromeos/components/camera_app_ui/resources/js/mojo/device_operator.js index 315dd38..0db861f 100644 --- a/chromeos/components/camera_app_ui/resources/js/mojo/device_operator.js +++ b/chromeos/components/camera_app_ui/resources/js/mojo/device_operator.js
@@ -16,7 +16,6 @@ } from '../type.js'; import {WaitableEvent} from '../waitable_event.js'; -import {MockDocumentScanner} from './mock_document_scanner.js'; import {wrapEndpoint} from './util.js'; /** @@ -614,33 +613,36 @@ } /** - * Registers a document corners detector and triggers |callback| if the + * Registers a document corners observer and triggers |callback| if the * detected corners are updated. * @param {string} deviceId The id of target camera device. * @param {function(!Array<Point>): void} callback Callback to * trigger when the detected corners are updated. - * @return {!Promise<number>} Id for the added detector. + * @return {!Promise<number>} Id for the added observer. */ - async registerDocumentCornersDetector(deviceId, callback) { - // TODO(b/180564352): Switch to the actual implementation once it is ready. - const {id} = - await MockDocumentScanner.getInstance().registerDocumentCornersDetector( - (corners) => { - callback(corners.map((c) => new Point(c.x, c.y))); - }); + async registerDocumentCornersObserver(deviceId, callback) { + const observerCallbackRouter = + wrapEndpoint(new cros.mojom.DocumentCornersObserverCallbackRouter()); + observerCallbackRouter.onDocumentCornersUpdated.addListener((corners) => { + callback(corners.map((c) => new Point(c.x, c.y))); + }); + + const device = await this.getDevice_(deviceId); + const {id} = await device.registerDocumentCornersObserver( + observerCallbackRouter.$.bindNewPipeAndPassRemote()); return id; } /** - * Unregisters the document corners detector given by its id. + * Unregisters the document corners observer given by its id. * @param {string} deviceId The id of target camera device. - * @param {number} detectorId The id of the detector. + * @param {number} observerId The id of the observer. * @return {!Promise<boolean>} True if it succeed. */ - async unregisterDocumentCornersDetector(deviceId, detectorId) { - // TODO(b/180564352): Switch to the actual implementation once it is ready. - const {isSuccess} = await MockDocumentScanner.getInstance() - .unregisterDocumentCornersDetector(detectorId); + async unregisterDocumentCornersObserver(deviceId, observerId) { + const device = await this.getDevice_(deviceId); + const {isSuccess} = + await device.unregisterDocumentCornersObserver(observerId); return isSuccess; }
diff --git a/chromeos/components/camera_app_ui/resources/js/mojo/mock_document_scanner.js b/chromeos/components/camera_app_ui/resources/js/mojo/mock_document_scanner.js deleted file mode 100644 index 35b0743..0000000 --- a/chromeos/components/camera_app_ui/resources/js/mojo/mock_document_scanner.js +++ /dev/null
@@ -1,140 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// eslint-disable-next-line no-unused-vars -import {MimeType} from '../type.js'; - -/** - * The singleton instance of MockDocumentScanner. Initialized by the first - * invocation of getInstance(). - * @type {?MockDocumentScanner} - */ -let instance = null; - -/** - * Mock implementation for document scanner related APIs. - */ -export class MockDocumentScanner { - /** - * @public - */ - constructor() { - /** - * @const {!Map<number, function(!Array<gfx.mojom.PointF>): void>} - * @private - */ - this.detectors_ = new Map(); - - /** - * @type {number} - * @private - */ - this.detectorIdCounter_ = 0; - - // Emulate the scanner which can provide scanning results in 10 fps. - setInterval(() => { - const corners = this.generateFakeCorners_(); - for (const detector of this.detectors_.values()) { - detector(corners); - } - }, 100); - } - - /** - * Generates a set of fake detected corners. - * @return {!Array<gfx.mojom.PointF>} - * @private - */ - generateFakeCorners_() { - const makePoint = (x, y) => { - return {x, y}; - }; - - // Get a random offset in range [-0.05, 0.05). - const randomOffset = () => { - return Math.random() * 0.1 - 0.05; - }; - - const corners = [ - makePoint(0.1 + randomOffset(), 0.1 + randomOffset()), - makePoint(0.1 + randomOffset(), 0.9 + randomOffset()), - makePoint(0.9 + randomOffset(), 0.9 + randomOffset()), - makePoint(0.9 + randomOffset(), 0.1 + randomOffset()), - ]; - return corners; - } - - /** - * Returns true if document mode is supported on the device. - * @return {!Promise<{isSupported: boolean}>} - */ - async isDocumentModeSupported() { - return {isSupported: true}; - } - - /** - * Registers the document corners detector for preview and returns the - * detector |id|. - * @param {function(!Array<gfx.mojom.PointF>): void} callback Callback to - * trigger when the detected corners are updated. - * @return {!Promise<{id: number}>} - */ - async registerDocumentCornersDetector(callback) { - this.detectorIdCounter_++; - this.detectors_.set(this.detectorIdCounter_, callback); - return {id: this.detectorIdCounter_}; - } - - /** - * Unregister the document corners detector by given |id|. - * @param {number} detectorId - * @return {!Promise<{isSuccess: boolean}>} - */ - async unregisterDocumentCornersDetector(detectorId) { - return {isSuccess: this.detectors_.delete(detectorId)}; - } - - /** - * Returns the detected document corners from given |jpeg_data|. The - * coordinate space of |corners| will be in [0, 1]. - * @param {!Array<number>} jpegData - * @return {!Promise<{corners: !Array<!gfx.mojom.PointF>}>} - */ - async scanDocumentCorners(jpegData) { - return {corners: this.generateFakeCorners_()}; - } - - /** - * Does the post processing for document given by its |jpeg_data|, document - * |corners|, and convert the result to the desired |output_format|. - * @param {!Array<number>} jpegData - * @param {!Array<!gfx.mojom.PointF>} corners - * @param {!MimeType} outputFormat - * @return {!Promise<{processedData: !Array<number>}>} - */ - async convertToDocument(jpegData, corners, outputFormat) { - return {processedData: jpegData}; - } - - /** - * Converts an jpeg image to PDF format. - * @param {!Array<number>} jpegData - * @return {!Promise<{pdfData: !Array<number>}>} - */ - async convertToPdf(jpegData) { - return {pdfData: jpegData}; - } - - /** - * Creates a new instance of MockDocumentScanner if it is not set. Returns - * the exist instance. - * @return {!MockDocumentScanner} The singleton instance. - */ - static getInstance() { - if (instance === null) { - instance = new MockDocumentScanner(); - } - return instance; - } -}
diff --git a/chromeos/components/camera_app_ui/resources/js/nav.js b/chromeos/components/camera_app_ui/resources/js/nav.js index 62b5715c..9eb79e3 100644 --- a/chromeos/components/camera_app_ui/resources/js/nav.js +++ b/chromeos/components/camera_app_ui/resources/js/nav.js
@@ -83,10 +83,10 @@ } /** - * Inactivates the view to be unfocusable. + * Deactivates the view to be unfocusable. * @param {number} index Index of the view. */ -function inactivate(index) { +function deactivate(index) { const view = allViews[index]; view.root.setAttribute('aria-hidden', 'true'); dom.getAllFrom(view.root, '[tabindex]', HTMLElement).forEach((element) => { @@ -121,7 +121,7 @@ view.layout(); if (index > topmostIndex) { if (topmostIndex >= 0) { - inactivate(topmostIndex); + deactivate(topmostIndex); } activate(index); topmostIndex = index; @@ -144,13 +144,13 @@ } /** - * Hides the view indexed in the stacked views and inactivate the view if it was + * Hides the view indexed in the stacked views and deactivate the view if it was * the topmost visible view. * @param {number} index Index of the view. */ function hide(index) { if (index === topmostIndex) { - inactivate(index); + deactivate(index); const next = findNextTopmostIndex(); if (next >= 0) { activate(next);
diff --git a/chromeos/components/camera_app_ui/resources/js/tooltip.js b/chromeos/components/camera_app_ui/resources/js/tooltip.js index 10ccc7b..fd9188d 100644 --- a/chromeos/components/camera_app_ui/resources/js/tooltip.js +++ b/chromeos/components/camera_app_ui/resources/js/tooltip.js
@@ -70,8 +70,8 @@ } wrapper.textContent = message; hovered = element; - const positionEvent = new CustomEvent( - TOOLTIP_POSITION_EVENT_NAME, {cancelable: true, target: hovered}); + const positionEvent = + new CustomEvent(TOOLTIP_POSITION_EVENT_NAME, {cancelable: true}); const doDefault = hovered.dispatchEvent(positionEvent); if (doDefault) { position(hovered.getBoundingClientRect());
diff --git a/chromeos/components/camera_app_ui/resources/js/views/camera.js b/chromeos/components/camera_app_ui/resources/js/views/camera.js index 18e8e6c..fac45ccf 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/camera.js +++ b/chromeos/components/camera_app_ui/resources/js/views/camera.js
@@ -971,7 +971,7 @@ try { await this.infoUpdater_.lockDeviceInfo(async () => { if (!this.isSuspended()) { - for (const id of await this.options_.videoDeviceIds()) { + for (const id of this.options_.videoDeviceIds()) { if (await this.startWithDevice_(id)) { // Make the different active camera announced by screen reader. const currentId = this.options_.currentDeviceId; @@ -980,7 +980,7 @@ return; } this.activeDeviceId_ = currentId; - const info = await this.infoUpdater_.getDeviceInfo(currentId); + const info = this.infoUpdater_.getDeviceInfo(currentId); if (info !== null) { toast.speak(I18nString.STATUS_MSG_CAMERA_SWITCHED, info.label); }
diff --git a/chromeos/components/camera_app_ui/resources/js/views/camera/document_corner_overlay.js b/chromeos/components/camera_app_ui/resources/js/views/camera/document_corner_overlay.js index 240f010..e7ce0d2e 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/camera/document_corner_overlay.js +++ b/chromeos/components/camera_app_ui/resources/js/views/camera/document_corner_overlay.js
@@ -154,7 +154,7 @@ * @type {?number} * @private */ - this.detectorId_ = null; + this.observerId_ = null; /** * @type {!Array<!Line>} @@ -215,7 +215,7 @@ * @return {!Promise} */ async start() { - if (this.detectorId_ !== null) { + if (this.observerId_ !== null) { return; } const deviceOperator = await DeviceOperator.getInstance(); @@ -223,7 +223,7 @@ // Skip showing indicator on fake camera. return; } - this.detectorId_ = await deviceOperator.registerDocumentCornersDetector( + this.observerId_ = await deviceOperator.registerDocumentCornersObserver( assertString(this.deviceId_), (corners) => { if (corners.length === 0) { this.clear_(); @@ -240,16 +240,16 @@ * @return {!Promise} */ async stop() { - if (this.detectorId_ === null) { + if (this.observerId_ === null) { return; } - const nonNullDetectorId = this.detectorId_; + const nonNullObserverId = this.observerId_; const deviceOperator = assertInstanceof(await DeviceOperator.getInstance(), DeviceOperator); - const isSuccess = deviceOperator.unregisterDocumentCornersDetector( - assertString(this.deviceId_), nonNullDetectorId); + const isSuccess = deviceOperator.unregisterDocumentCornersObserver( + assertString(this.deviceId_), nonNullObserverId); assert(isSuccess); - this.detectorId_ = null; + this.observerId_ = null; this.clear_(); } @@ -257,7 +257,7 @@ * @return {boolean} */ isEnabled() { - return this.detectorId_ !== null; + return this.observerId_ !== null; } /**
diff --git a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/photo.js b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/photo.js index 265b4842..6593687 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/photo.js +++ b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/photo.js
@@ -3,6 +3,8 @@ // found in the LICENSE file. import {assertInstanceof} from '../../../chrome_util.js'; +// eslint-disable-next-line no-unused-vars +import {StreamConstraints} from '../../../device/stream_constraints.js'; import {reportError} from '../../../error.js'; import {I18nString} from '../../../i18n_string.js'; import {Filenamer} from '../../../models/file_namer.js'; @@ -252,12 +254,23 @@ * @override */ async prepareDevice(constraints, resolution) { + return this.prepareDeviceWithCaptureIntent_( + constraints, resolution, cros.mojom.CaptureIntent.STILL_CAPTURE); + } + + /** + * @param {!StreamConstraints} constraints + * @param {?Resolution} resolution + * @param {cros.mojom.CaptureIntent} captureIntent + * @return {!Promise} + */ + async prepareDeviceWithCaptureIntent_( + constraints, resolution, captureIntent) { this.captureResolution_ = resolution; const deviceOperator = await DeviceOperator.getInstance(); if (deviceOperator !== null) { const deviceId = constraints.deviceId; - await deviceOperator.setCaptureIntent( - deviceId, cros.mojom.CaptureIntent.STILL_CAPTURE); + await deviceOperator.setCaptureIntent(deviceId, captureIntent); await deviceOperator.setStillCaptureResolution( deviceId, assertInstanceof(this.captureResolution_, Resolution)); }
diff --git a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/scanner.js b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/scanner.js index 119c3e32..1a5339d 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/scanner.js +++ b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/scanner.js
@@ -158,4 +158,12 @@ this.handler_, ); } + + /** + * @override + */ + async prepareDevice(constraints, resolution) { + return super.prepareDeviceWithCaptureIntent_( + constraints, resolution, cros.mojom.CaptureIntent.DOCUMENT); + } }
diff --git a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/video.js b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/video.js index c2afd50..d42918d 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/camera/mode/video.js +++ b/chromeos/components/camera_app_ui/resources/js/views/camera/mode/video.js
@@ -85,7 +85,7 @@ /** * The 'beforeunload' listener which will show confirm dialog when trying to * close window. - * @param {!Event} event The 'beforeunload' event. + * @param {!BeforeUnloadEvent} event The 'beforeunload' event. */ function beforeUnloadListener(event) { event.preventDefault();
diff --git a/chromeos/components/camera_app_ui/resources/js/views/camera/options.js b/chromeos/components/camera_app_ui/resources/js/views/camera/options.js index b75f3c28..36f80ec 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/camera/options.js +++ b/chromeos/components/camera_app_ui/resources/js/views/camera/options.js
@@ -104,10 +104,8 @@ // Remove the deprecated values. localStorage.remove('effectIndex', 'toggleMulti', 'toggleMirror'); - this.infoUpdater_.addDeviceChangeListener(async (updater) => { - state.set( - state.State.MULTI_CAMERA, - (await updater.getDevicesInfo()).length >= 2); + this.infoUpdater_.addDeviceChangeListener((updater) => { + state.set(state.State.MULTI_CAMERA, updater.getDevicesInfo().length >= 2); }); } @@ -130,7 +128,7 @@ } state.set(PerfEvent.CAMERA_SWITCHING, true); if (deviceId === undefined) { - const devices = await this.infoUpdater_.getDevicesInfo(); + const devices = this.infoUpdater_.getDevicesInfo(); let index = devices.findIndex((entry) => entry.deviceId === this.videoDeviceId_); if (index === -1) { @@ -200,9 +198,9 @@ /** * Gets the video device ids sorted by preference. - * @return {!Promise<!Array<string>>} + * @return {!Array<string>} */ - async videoDeviceIds() { + videoDeviceIds() { /** @type {!Array<(!Camera3DeviceInfo|!MediaDeviceInfo)>} */ let devices; /** @@ -211,7 +209,7 @@ */ let facings = null; - const camera3Info = await this.infoUpdater_.getCamera3DevicesInfo(); + const camera3Info = this.infoUpdater_.getCamera3DevicesInfo(); if (camera3Info) { devices = camera3Info; facings = {}; @@ -219,7 +217,7 @@ facings[deviceId] = facing; } } else { - devices = await this.infoUpdater_.getDevicesInfo(); + devices = this.infoUpdater_.getDevicesInfo(); } const defaultFacing = util.getDefaultFacing();
diff --git a/chromeos/components/camera_app_ui/resources/js/views/camera/scanner_options.js b/chromeos/components/camera_app_ui/resources/js/views/camera/scanner_options.js index 77906bc8..2eed87f1 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/camera/scanner_options.js +++ b/chromeos/components/camera_app_ui/resources/js/views/camera/scanner_options.js
@@ -121,8 +121,8 @@ this.doReconfigure_(); updateShowScannerMode(); }); - infoUpdater.addDeviceChangeListener(async () => { - const devicesInfo = await infoUpdater.getCamera3DevicesInfo(); + infoUpdater.addDeviceChangeListener(() => { + const devicesInfo = infoUpdater.getCamera3DevicesInfo(); if (devicesInfo === null) { return; }
diff --git a/chromeos/components/camera_app_ui/resources/js/views/settings.js b/chromeos/components/camera_app_ui/resources/js/views/settings.js index b4024e2..3763082 100644 --- a/chromeos/components/camera_app_ui/resources/js/views/settings.js +++ b/chromeos/components/camera_app_ui/resources/js/views/settings.js
@@ -350,9 +350,8 @@ */ this.openedSettingDeviceId_ = null; - infoUpdater.addDeviceChangeListener(async (updater) => { - /** @type {?Array<!Camera3DeviceInfo>} */ - const devices = await updater.getCamera3DevicesInfo(); + infoUpdater.addDeviceChangeListener((updater) => { + const devices = updater.getCamera3DevicesInfo(); if (devices === null) { state.set(state.State.NO_RESOLUTION_SETTINGS, true); return;
diff --git a/chromeos/crosapi/mojom/local_printer.mojom b/chromeos/crosapi/mojom/local_printer.mojom index 8d2c65e..c7828bdd 100644 --- a/chromeos/crosapi/mojom/local_printer.mojom +++ b/chromeos/crosapi/mojom/local_printer.mojom
@@ -173,17 +173,17 @@ // Printer capabilities and defaults corresponding to the // PrinterSemanticCapsAndDefaults class in printing/backend/print_backend.h. printing.mojom.PrinterSemanticCapsAndDefaults? capabilities@2; + // The fields below are no longer used. // Bitmask of allowed color modes corresponding to the ColorModeRestriction // enum in printing/backend/printing_restrictions.h. - uint32 allowed_color_modes@3; + uint32 allowed_color_modes_deprecated@3; // Bitmask of allowed duplex modes. - uint32 allowed_duplex_modes@4; - [MinVersion=1] printing.mojom.PinModeRestriction allowed_pin_modes@9; - printing.mojom.ColorModeRestriction default_color_mode@6; - printing.mojom.DuplexModeRestriction default_duplex_mode@7; - printing.mojom.PinModeRestriction default_pin_mode@8; - // No longer used. - uint32 allowed_pin_modes_deprecated@5; + uint32 allowed_duplex_modes_deprecated@4; + uint32 allowed_pin_modes_deprecated_version_0@5; + [MinVersion=1] printing.mojom.PinModeRestriction allowed_pin_modes_deprecated_version_1@9; + printing.mojom.ColorModeRestriction default_color_mode_deprecated@6; + printing.mojom.DuplexModeRestriction default_duplex_mode_deprecated@7; + printing.mojom.PinModeRestriction default_pin_mode_deprecated@8; }; // Global print policies that are not printer specific. @@ -202,6 +202,15 @@ // Indicates how many sheets is allowed to use for a single print job. uint32 max_sheets_allowed@5; bool max_sheets_allowed_has_value@6; + // Bitmask of allowed color modes corresponding to the ColorModeRestriction + // enum in printing/backend/printing_restrictions.h. + [MinVersion=1] uint32 allowed_color_modes@7; + // Bitmask of allowed duplex modes. + [MinVersion=1] uint32 allowed_duplex_modes@8; + [MinVersion=1] printing.mojom.PinModeRestriction allowed_pin_modes@9; + [MinVersion=1] printing.mojom.ColorModeRestriction default_color_mode@10; + [MinVersion=1] printing.mojom.DuplexModeRestriction default_duplex_mode@11; + [MinVersion=1] printing.mojom.PinModeRestriction default_pin_mode@12; // Allowed background graphics modes. // This is used in pref file and should never change. // Corresponds to enum class BackgroundGraphicsModeRestriction in
diff --git a/chromeos/profiles/bigcore.afdo.newest.txt b/chromeos/profiles/bigcore.afdo.newest.txt index 59a9fb037..0c3e0bc 100644 --- a/chromeos/profiles/bigcore.afdo.newest.txt +++ b/chromeos/profiles/bigcore.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-bigcore-93-4577.5-1627292532-benchmark-93.0.4577.22-r1-redacted.afdo.xz +chromeos-chrome-amd64-bigcore-93-4577.15-1627899156-benchmark-93.0.4577.23-r1-redacted.afdo.xz
diff --git a/components/account_manager_core/README.md b/components/account_manager_core/README.md index 7726d24..b1b6f0d 100644 --- a/components/account_manager_core/README.md +++ b/components/account_manager_core/README.md
@@ -12,4 +12,4 @@ Also, see: - `//ash/components/account_manager/` -- `//chrome/browser/lacros/account_manager*.*` +- `//chrome/browser/lacros/account_manager/`
diff --git a/components/arc/test/fake_accessibility_helper_instance.cc b/components/arc/test/fake_accessibility_helper_instance.cc index b3f264b..1cfd838c6 100644 --- a/components/arc/test/fake_accessibility_helper_instance.cc +++ b/components/arc/test/fake_accessibility_helper_instance.cc
@@ -27,7 +27,10 @@ void FakeAccessibilityHelperInstance::PerformAction( mojom::AccessibilityActionDataPtr action_data_ptr, - PerformActionCallback callback) {} + PerformActionCallback callback) { + last_requested_action_ = std::move(action_data_ptr); + std::move(callback).Run(true); +} void FakeAccessibilityHelperInstance:: SetNativeChromeVoxArcSupportForFocusedWindow( @@ -42,7 +45,10 @@ void FakeAccessibilityHelperInstance::RefreshWithExtraData( mojom::AccessibilityActionDataPtr action_data_ptr, - RefreshWithExtraDataCallback callback) {} + RefreshWithExtraDataCallback callback) { + last_requested_action_ = std::move(action_data_ptr); + refresh_with_extra_data_callback_ = std::move(callback); +} void FakeAccessibilityHelperInstance::SetCaptionStyle( mojom::CaptionStylePtr style_ptr) {}
diff --git a/components/arc/test/fake_accessibility_helper_instance.h b/components/arc/test/fake_accessibility_helper_instance.h index eca3f900..81589fbdf7 100644 --- a/components/arc/test/fake_accessibility_helper_instance.h +++ b/components/arc/test/fake_accessibility_helper_instance.h
@@ -33,8 +33,14 @@ mojom::AccessibilityFilterType filter_type() { return filter_type_; } bool explore_by_touch_enabled() { return explore_by_touch_enabled_; } - mojom::AccessibilityWindowKeyPtr* last_requested_tree_window_key() { - return &last_requested_tree_window_key_; + mojom::AccessibilityActionData* last_requested_action() { + return last_requested_action_.get(); + } + mojom::AccessibilityWindowKey* last_requested_tree_window_key() { + return last_requested_tree_window_key_.get(); + } + RefreshWithExtraDataCallback refresh_with_extra_data_callback() { + return std::move(refresh_with_extra_data_callback_); } private: @@ -45,7 +51,9 @@ // in this test as well. bool explore_by_touch_enabled_ = true; + mojom::AccessibilityActionDataPtr last_requested_action_; mojom::AccessibilityWindowKeyPtr last_requested_tree_window_key_; + RefreshWithExtraDataCallback refresh_with_extra_data_callback_; DISALLOW_COPY_AND_ASSIGN(FakeAccessibilityHelperInstance); };
diff --git a/components/back_forward_cache/back_forward_cache_disable.cc b/components/back_forward_cache/back_forward_cache_disable.cc index 34f386c1..43b2a9de 100644 --- a/components/back_forward_cache/back_forward_cache_disable.cc +++ b/components/back_forward_cache/back_forward_cache_disable.cc
@@ -37,6 +37,8 @@ return "ExtensionMessaging"; case DisabledReasonId::kExtensionMessagingForOpenPort: return "ExtensionMessagingForOpenPort"; + case DisabledReasonId::kExtensionSentMessageToCachedFrame: + return "ExtensionSentMessageToCachedFrame"; case DisabledReasonId::kOomInterventionTabHelper: return "OomInterventionTabHelper"; }
diff --git a/components/back_forward_cache/back_forward_cache_disable.h b/components/back_forward_cache/back_forward_cache_disable.h index 3224841..5a7b62a 100644 --- a/components/back_forward_cache/back_forward_cache_disable.h +++ b/components/back_forward_cache/back_forward_cache_disable.h
@@ -29,9 +29,20 @@ // Modal dialog such as form resubmittion or http password dialog is shown for // the page. kModalDialog = 11, + // Support for extensions is added in stages (see crbug.com/1110891), each + // with its own enum. + // - kExtensions: All extensions are blocklisted. + // - kExtensionMessaging: Extensions using messaging APIs are blocklisted. + // - kExtensionMessagingForOpenPort: Extensions using long-lived connections + // that don't close the connection before attempting to cache the frame are + // blocklisted. + // - kExtensionSentMessageToCachedFrame: Extensions using long-lived + // connections that attempt to send a message to a frame while it is cached + // (inactive) are blocklisted. kExtensions = 12, kExtensionMessaging = 13, kExtensionMessagingForOpenPort = 14, + kExtensionSentMessageToCachedFrame = 15, // New reasons should be accompanied by a comment as to why BackForwardCache // cannot be used in this case and a link to a bug to fix that if it is // fixable.
diff --git a/components/browsing_data/content/local_storage_helper.cc b/components/browsing_data/content/local_storage_helper.cc index 84775498..3b6114d 100644 --- a/components/browsing_data/content/local_storage_helper.cc +++ b/components/browsing_data/content/local_storage_helper.cc
@@ -15,6 +15,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_usage_info.h" +#include "third_party/blink/public/common/storage_key/storage_key.h" #include "url/gurl.h" #include "url/origin.h" #include "url/url_constants.h" @@ -67,7 +68,9 @@ void LocalStorageHelper::DeleteOrigin(const url::Origin& origin, base::OnceClosure callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - dom_storage_context_->DeleteLocalStorage(origin, std::move(callback)); + dom_storage_context_->DeleteLocalStorage( + // TODO(https://crbug.com/1212808): Use storage_key instead of origin. + blink::StorageKey(origin), std::move(callback)); } //---------------------------------------------------------
diff --git a/components/metrics/content/content_stability_metrics_provider.cc b/components/metrics/content/content_stability_metrics_provider.cc index e4aa390d..f2f4b51 100644 --- a/components/metrics/content/content_stability_metrics_provider.cc +++ b/components/metrics/content/content_stability_metrics_provider.cc
@@ -4,8 +4,6 @@ #include "components/metrics/content/content_stability_metrics_provider.h" -#include <vector> - #include "base/check.h" #include "base/notreached.h" #include "build/build_config.h"
diff --git a/components/metrics/metrics_log.h b/components/metrics/metrics_log.h index ffbe252..b0031b91 100644 --- a/components/metrics/metrics_log.h +++ b/components/metrics/metrics_log.h
@@ -12,7 +12,6 @@ #include <memory> #include <string> -#include <vector> #include "base/callback_forward.h" #include "base/macros.h"
diff --git a/components/metrics/metrics_log_manager.h b/components/metrics/metrics_log_manager.h index 123a186..94fd624 100644 --- a/components/metrics/metrics_log_manager.h +++ b/components/metrics/metrics_log_manager.h
@@ -8,7 +8,6 @@ #include <stddef.h> #include <memory> -#include <vector> #include "base/macros.h" #include "components/metrics/metrics_log.h"
diff --git a/components/metrics/metrics_log_manager_unittest.cc b/components/metrics/metrics_log_manager_unittest.cc index 2eab9e59..ed27724b 100644 --- a/components/metrics/metrics_log_manager_unittest.cc +++ b/components/metrics/metrics_log_manager_unittest.cc
@@ -8,7 +8,6 @@ #include <string> #include <utility> -#include <vector> #include "base/memory/ptr_util.h" #include "components/metrics/metrics_log.h"
diff --git a/components/metrics/metrics_service.h b/components/metrics/metrics_service.h index 7fbcf1a..fd126fa 100644 --- a/components/metrics/metrics_service.h +++ b/components/metrics/metrics_service.h
@@ -13,7 +13,6 @@ #include <map> #include <memory> #include <string> -#include <vector> #include "base/gtest_prod_util.h" #include "base/macros.h"
diff --git a/components/metrics/net/network_metrics_provider.cc b/components/metrics/net/network_metrics_provider.cc index b91031f..1f2d7f8 100644 --- a/components/metrics/net/network_metrics_provider.cc +++ b/components/metrics/net/network_metrics_provider.cc
@@ -9,7 +9,6 @@ #include <algorithm> #include <string> #include <utility> -#include <vector> #include "base/bind.h" #include "base/callback_helpers.h"
diff --git a/components/metrics/stability_metrics_helper.cc b/components/metrics/stability_metrics_helper.cc index 0f01929b..c19e0c6 100644 --- a/components/metrics/stability_metrics_helper.cc +++ b/components/metrics/stability_metrics_helper.cc
@@ -7,7 +7,6 @@ #include <stdint.h> #include <string> -#include <vector> #include "base/check.h" #include "base/metrics/histogram_functions.h"
diff --git a/components/policy_strings.grdp b/components/policy_strings.grdp index e278587..50e74ce 100644 --- a/components/policy_strings.grdp +++ b/components/policy_strings.grdp
@@ -648,6 +648,12 @@ <message name="IDS_POLICY_DLP_PRINTING_BLOCKED_MESSAGE" desc="The message for notification informing the user that printing is blocked."> Printing this content is blocked by administrator policy </message> + <message name="IDS_POLICY_DLP_PRINTING_WARNING_TITLE" desc="The title for notification informing the user that printing is not recommended."> + Confidential file + </message> + <message name="IDS_POLICY_DLP_PRINTING_WARNING_MESSAGE" desc="The message for notification informing the user that printing is not recommended."> + This document is confidential and printing is not advised by your administrator. + </message> <message name="IDS_POLICY_DLP_SCREEN_CAPTURE_PAUSED_TITLE" desc="The title for notification informing the user that screen capture is paused."> Screen capture paused </message>
diff --git a/components/policy_strings_grdp/IDS_POLICY_DLP_PRINTING_WARNING_MESSAGE.png.sha1 b/components/policy_strings_grdp/IDS_POLICY_DLP_PRINTING_WARNING_MESSAGE.png.sha1 new file mode 100644 index 0000000..2b61e4e --- /dev/null +++ b/components/policy_strings_grdp/IDS_POLICY_DLP_PRINTING_WARNING_MESSAGE.png.sha1
@@ -0,0 +1 @@ +2d64c1dcdd3bb00e144069fd1201ba2d13454a1c \ No newline at end of file
diff --git a/components/policy_strings_grdp/IDS_POLICY_DLP_PRINTING_WARNING_TITLE.png.sha1 b/components/policy_strings_grdp/IDS_POLICY_DLP_PRINTING_WARNING_TITLE.png.sha1 new file mode 100644 index 0000000..2b61e4e --- /dev/null +++ b/components/policy_strings_grdp/IDS_POLICY_DLP_PRINTING_WARNING_TITLE.png.sha1
@@ -0,0 +1 @@ +2d64c1dcdd3bb00e144069fd1201ba2d13454a1c \ No newline at end of file
diff --git a/components/signin/internal/identity_manager/account_fetcher_service.cc b/components/signin/internal/identity_manager/account_fetcher_service.cc index 41a5e5848..a2ca6d6 100644 --- a/components/signin/internal/identity_manager/account_fetcher_service.cc +++ b/components/signin/internal/identity_manager/account_fetcher_service.cc
@@ -151,7 +151,7 @@ void AccountFetcherService::RefreshAccountInfoIfStale( const CoreAccountId& account_id) { DCHECK(network_fetches_enabled_); - RefreshAccountInfo(account_id, /*only_fetch_if_invalid=*/false); + RefreshAccountInfo(account_id, /*only_fetch_if_invalid=*/true); } void AccountFetcherService::UpdateChildInfo() {
diff --git a/content/browser/dom_storage/dom_storage_browsertest.cc b/content/browser/dom_storage/dom_storage_browsertest.cc index bce98a2..b69fe7b6 100644 --- a/content/browser/dom_storage/dom_storage_browsertest.cc +++ b/content/browser/dom_storage/dom_storage_browsertest.cc
@@ -31,6 +31,7 @@ #include "content/shell/browser/shell_content_browser_client.h" #include "testing/gmock/include/gmock/gmock.h" #include "third_party/blink/public/common/features.h" +#include "third_party/blink/public/common/storage_key/storage_key.h" namespace content { @@ -72,9 +73,9 @@ return usage; } - void DeletePhysicalOrigin(url::Origin origin) { + void DeletePhysicalStorageKey(blink::StorageKey storage_key) { base::RunLoop loop; - partition()->GetDOMStorageContext()->DeleteLocalStorage(origin, + partition()->GetDOMStorageContext()->DeleteLocalStorage(storage_key, loop.QuitClosure()); loop.Run(); } @@ -124,12 +125,12 @@ SimpleTest(GetTestUrl("dom_storage", "verify_data.html"), kNotIncognito); } -IN_PROC_BROWSER_TEST_F(DOMStorageBrowserTest, DeletePhysicalOrigin) { +IN_PROC_BROWSER_TEST_F(DOMStorageBrowserTest, DeletePhysicalStorageKey) { EXPECT_EQ(0U, GetUsage().size()); SimpleTest(GetTestUrl("dom_storage", "store_data.html"), kNotIncognito); std::vector<StorageUsageInfo> usage = GetUsage(); ASSERT_EQ(1U, usage.size()); - DeletePhysicalOrigin(usage[0].origin); + DeletePhysicalStorageKey(blink::StorageKey(usage[0].origin)); EXPECT_EQ(0U, GetUsage().size()); }
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.cc b/content/browser/dom_storage/dom_storage_context_wrapper.cc index 07d2e01..ef055a7 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper.cc +++ b/content/browser/dom_storage/dom_storage_context_wrapper.cc
@@ -36,7 +36,6 @@ #include "storage/browser/quota/special_storage_policy.h" #include "third_party/blink/public/common/features.h" #include "third_party/blink/public/common/storage_key/storage_key.h" -#include "url/origin.h" namespace content { namespace { @@ -48,8 +47,7 @@ result.reserve(usage.size()); for (const auto& entry : usage) { SessionStorageUsageInfo info; - // TODO(https://crbug.com/1212808): Use storage_key instead of origin. - info.origin = entry->storage_key.origin().GetURL(); + info.storage_key = entry->storage_key; info.namespace_id = entry->namespace_id; result.push_back(std::move(info)); } @@ -62,6 +60,8 @@ std::vector<StorageUsageInfo> result; result.reserve(usage.size()); for (const auto& info : usage) { + // TODO(https://crbug.com/1199077): Pass the real StorageKey when + // StorageUsageInfo is converted. result.emplace_back(info->origin, info->total_size_bytes, info->last_modified); } @@ -142,8 +142,9 @@ base::BindOnce(&AdaptSessionStorageUsageInfo, std::move(callback))); } -void DOMStorageContextWrapper::DeleteLocalStorage(const url::Origin& origin, - base::OnceClosure callback) { +void DOMStorageContextWrapper::DeleteLocalStorage( + const blink::StorageKey& storage_key, + base::OnceClosure callback) { DCHECK(callback); if (!local_storage_control_) { // Shutdown() has been called. @@ -151,9 +152,7 @@ return; } - local_storage_control_->DeleteStorage( - // TODO(https://crbug.com/1212808): Use storage_key instead of origin. - blink::StorageKey(origin), std::move(callback)); + local_storage_control_->DeleteStorage(storage_key, std::move(callback)); } void DOMStorageContextWrapper::PerformLocalStorageCleanup( @@ -177,9 +176,7 @@ return; } session_storage_control_->DeleteStorage( - // TODO(https://crbug.com/1212808): Use storage_key instead of origin. - blink::StorageKey(url::Origin::Create(usage_info.origin)), - usage_info.namespace_id, std::move(callback)); + usage_info.storage_key, usage_info.namespace_id, std::move(callback)); } void DOMStorageContextWrapper::PerformSessionStorageCleanup( @@ -240,14 +237,15 @@ } void DOMStorageContextWrapper::OpenLocalStorage( - const url::Origin& origin, + const blink::StorageKey& storage_key, mojo::PendingReceiver<blink::mojom::StorageArea> receiver) { DCHECK(local_storage_control_); - local_storage_control_->BindStorageArea( - // TODO(https://crbug.com/1212808): Use storage_key instead of origin. - blink::StorageKey(origin), std::move(receiver)); - if (storage_policy_observer_) - storage_policy_observer_->StartTrackingOrigin(origin); + local_storage_control_->BindStorageArea(storage_key, std::move(receiver)); + if (storage_policy_observer_) { + // TODO(https://crbug.com/1199077): Pass the real StorageKey when + // StoragePolicyObserver is converted. + storage_policy_observer_->StartTrackingOrigin(storage_key.origin()); + } } void DOMStorageContextWrapper::BindNamespace( @@ -261,11 +259,13 @@ void DOMStorageContextWrapper::BindStorageArea( ChildProcessSecurityPolicyImpl::Handle security_policy_handle, - const url::Origin& origin, + const blink::StorageKey& storage_key, const std::string& namespace_id, mojo::ReportBadMessageCallback bad_message_callback, mojo::PendingReceiver<blink::mojom::StorageArea> receiver) { - if (!security_policy_handle.CanAccessDataForOrigin(origin)) { + // TODO(https://crbug.com/1199077): Pass the real StorageKey when + // ChildProcessSecurityPolicyImpl is converted. + if (!security_policy_handle.CanAccessDataForOrigin(storage_key.origin())) { std::move(bad_message_callback) .Run("Access denied for sessionStorage request"); return; @@ -273,9 +273,7 @@ DCHECK(session_storage_control_); session_storage_control_->BindStorageArea( - // TODO(https://crbug.com/1212808): Use storage_key instead of origin. - blink::StorageKey(origin), namespace_id, std::move(receiver), - base::DoNothing()); + storage_key, namespace_id, std::move(receiver), base::DoNothing()); } void DOMStorageContextWrapper::RecoverFromStorageServiceCrash() { @@ -360,8 +358,13 @@ return; std::vector<url::Origin> origins; - for (const auto& info : usage) + for (const auto& info : usage) { + // TODO(https://crbug.com/1199077): Pass the real StorageKey when + // StorageUsageInfo is converted. origins.emplace_back(std::move(info->origin)); + } + // TODO(https://crbug.com/1199077): Pass the real StorageKey when + // StoragePolicyObserver is converted. storage_policy_observer_->StartTrackingOrigins(std::move(origins)); }
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.h b/content/browser/dom_storage/dom_storage_context_wrapper.h index 6a17812..1765f8c 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper.h +++ b/content/browser/dom_storage/dom_storage_context_wrapper.h
@@ -28,12 +28,16 @@ #include "third_party/blink/public/mojom/dom_storage/session_storage_namespace.mojom.h" #include "third_party/blink/public/mojom/dom_storage/storage_area.mojom.h" +namespace blink { +class StorageKey; +} // namespace blink + namespace storage { class SpecialStoragePolicy; namespace mojom { class Partition; -} -} +} // namespace mojom +} // namespace storage namespace content { @@ -73,7 +77,7 @@ // DOMStorageContext implementation. void GetLocalStorageUsage(GetLocalStorageUsageCallback callback) override; void GetSessionStorageUsage(GetSessionStorageUsageCallback callback) override; - void DeleteLocalStorage(const url::Origin& origin, + void DeleteLocalStorage(const blink::StorageKey& storage_key, base::OnceClosure callback) override; void PerformLocalStorageCleanup(base::OnceClosure callback) override; void DeleteSessionStorage(const SessionStorageUsageInfo& usage_info, @@ -95,7 +99,7 @@ void Flush(); void OpenLocalStorage( - const url::Origin& origin, + const blink::StorageKey& storage_key, mojo::PendingReceiver<blink::mojom::StorageArea> receiver); void BindNamespace( const std::string& namespace_id, @@ -103,7 +107,7 @@ mojo::PendingReceiver<blink::mojom::SessionStorageNamespace> receiver); void BindStorageArea( ChildProcessSecurityPolicyImpl::Handle security_policy_handle, - const url::Origin& origin, + const blink::StorageKey& storage_key, const std::string& namespace_id, mojo::ReportBadMessageCallback bad_message_callback, mojo::PendingReceiver<blink::mojom::StorageArea> receiver);
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc b/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc index cd4c425f..c7c208b 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc +++ b/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc
@@ -15,6 +15,7 @@ #include "content/public/test/test_browser_context.h" #include "mojo/public/cpp/bindings/message.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/public/common/storage_key/storage_key.h" #include "third_party/blink/public/mojom/dom_storage/storage_area.mojom.h" #include "url/origin.h" @@ -35,14 +36,16 @@ security_policy->Add(kTestProcessIdOrigin1, &browser_context_); security_policy->Add(kTestProcessIdOrigin2, &browser_context_); security_policy->AddFutureIsolatedOrigins( - {test_origin1_, test_origin2_}, + {test_storage_key1_.origin(), test_storage_key2_.origin()}, ChildProcessSecurityPolicy::IsolatedOriginSource::TEST); IsolationContext isolation_context(BrowsingInstanceId(1), &browser_context_); security_policy->LockProcessForTesting( - isolation_context, kTestProcessIdOrigin1, test_origin1_.GetURL()); + isolation_context, kTestProcessIdOrigin1, + test_storage_key1_.origin().GetURL()); security_policy->LockProcessForTesting( - isolation_context, kTestProcessIdOrigin2, test_origin2_.GetURL()); + isolation_context, kTestProcessIdOrigin2, + test_storage_key2_.origin().GetURL()); } void TearDown() override { @@ -70,10 +73,10 @@ } const std::string test_namespace_id_{base::GenerateGUID()}; - const url::Origin test_origin1_{ - url::Origin::Create(GURL("https://host1.com/"))}; - const url::Origin test_origin2_{ - url::Origin::Create(GURL("https://host2.com/"))}; + const blink::StorageKey test_storage_key1_{ + blink::StorageKey::CreateFromStringForTesting("https://host1.com/")}; + const blink::StorageKey test_storage_key2_{ + blink::StorageKey::CreateFromStringForTesting("https://host2.com/")}; content::BrowserTaskEnvironment task_environment_; TestBrowserContext browser_context_; @@ -81,13 +84,13 @@ bool bad_message_called_ = false; }; -TEST_F(DOMStorageContextWrapperTest, ProcessLockedToOtherOrigin) { - // Tries to open an area with a process that is locked to a different origin - // and verifies the bad message callback. +TEST_F(DOMStorageContextWrapperTest, ProcessLockedToOtherStorageKey) { + // Tries to open an area with a process that is locked to a different + // StorageKey and verifies the bad message callback. mojo::Remote<blink::mojom::StorageArea> area; context_->BindStorageArea(CreateSecurityPolicyHandle(kTestProcessIdOrigin1), - test_origin2_, test_namespace_id_, + test_storage_key2_, test_namespace_id_, MakeBadMessageCallback(), area.BindNewPipeAndPassReceiver()); EXPECT_TRUE(bad_message_called_);
diff --git a/content/browser/renderer_host/input/input_router.h b/content/browser/renderer_host/input/input_router.h index 38cb18c1..0e22be117 100644 --- a/content/browser/renderer_host/input/input_router.h +++ b/content/browser/renderer_host/input/input_router.h
@@ -72,13 +72,6 @@ // to viewport. virtual void SetDeviceScaleFactor(float device_scale_factor) = 0; - // Sets the frame tree node id of associated frame, used when tracing - // input event latencies to relate events to their target frames. Since - // input always flows to Local Frame Roots, the |frameTreeNodeId| is - // relative to the Frame associated with the Local Frame Root for the - // widget owning this InputRouter. - virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0; - // Return the currently allowed touch-action. virtual absl::optional<cc::TouchAction> AllowedTouchAction() = 0;
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc index a03c46e..95d1a01 100644 --- a/content/browser/renderer_host/input/input_router_impl.cc +++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -88,7 +88,6 @@ const Config& config) : client_(client), disposition_handler_(disposition_handler), - frame_tree_node_id_(FrameTreeNode::kFrameTreeNodeInvalidId), touch_scroll_started_sent_(false), wheel_event_queue_(this), touch_event_queue_(this, config.touch_config), @@ -240,10 +239,6 @@ device_scale_factor_ = device_scale_factor; } -void InputRouterImpl::SetFrameTreeNodeId(int frame_tree_node_id) { - frame_tree_node_id_ = frame_tree_node_id; -} - void InputRouterImpl::SetForceEnableZoom(bool enabled) { touch_action_filter_.SetForceEnableZoom(enabled); } @@ -512,12 +507,11 @@ TRACE_EVENT1("input", "InputRouterImpl::FilterAndSendWebInputEvent", "type", WebInputEvent::GetName(input_event.GetType())); TRACE_EVENT("input,benchmark,devtools.timeline", "LatencyInfo.Flow", - [&latency_info, this](perfetto::EventContext ctx) { + [&latency_info](perfetto::EventContext ctx) { ChromeLatencyInfo* info = ctx.event()->set_chrome_latency_info(); info->set_trace_id(latency_info.trace_id()); info->set_step(ChromeLatencyInfo::STEP_SEND_INPUT_EVENT_UI); - info->set_frame_tree_node_id(frame_tree_node_id_); tracing::FillFlowEvent( ctx,
diff --git a/content/browser/renderer_host/input/input_router_impl.h b/content/browser/renderer_host/input/input_router_impl.h index 3c5d434c..aea19ed 100644 --- a/content/browser/renderer_host/input/input_router_impl.h +++ b/content/browser/renderer_host/input/input_router_impl.h
@@ -77,7 +77,6 @@ void NotifySiteIsMobileOptimized(bool is_mobile_optimized) override; bool HasPendingEvents() const override; void SetDeviceScaleFactor(float device_scale_factor) override; - void SetFrameTreeNodeId(int frame_tree_node_id) override; void SetForceEnableZoom(bool enabled) override; absl::optional<cc::TouchAction> AllowedTouchAction() override; absl::optional<cc::TouchAction> ActiveTouchAction() override; @@ -233,7 +232,6 @@ InputRouterImplClient* client_; InputDispositionHandler* disposition_handler_; - int frame_tree_node_id_; // Whether the TouchScrollStarted event has been sent for the current // gesture scroll yet.
diff --git a/content/browser/renderer_host/input/mock_input_router.h b/content/browser/renderer_host/input/mock_input_router.h index 36a2d296..255d81a 100644 --- a/content/browser/renderer_host/input/mock_input_router.h +++ b/content/browser/renderer_host/input/mock_input_router.h
@@ -41,7 +41,6 @@ void NotifySiteIsMobileOptimized(bool is_mobile_optimized) override {} bool HasPendingEvents() const override; void SetDeviceScaleFactor(float device_scale_factor) override {} - void SetFrameTreeNodeId(int frameTreeNodeId) override {} absl::optional<cc::TouchAction> AllowedTouchAction() override; absl::optional<cc::TouchAction> ActiveTouchAction() override; void SetForceEnableZoom(bool enabled) override {}
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc index ac731d0..6875cb8 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -1518,8 +1518,6 @@ if (is_main_frame()) GetLocalRenderWidgetHost()->SetIntersectsViewport(true); GetLocalRenderWidgetHost()->SetFrameDepth(frame_tree_node_->depth()); - GetLocalRenderWidgetHost()->input_router()->SetFrameTreeNodeId( - frame_tree_node_->frame_tree_node_id()); } // Verify is_local_root() now indicates whether this frame is a local root or // not. It is safe to use this method anywhere beyond this point. @@ -3158,8 +3156,6 @@ // Initialize the RenderWidgetHost which marks it and the RenderViewHost as // live before calling to the `delegate_`. if (GetLocalRenderWidgetHost()) { - GetLocalRenderWidgetHost()->input_router()->SetFrameTreeNodeId( - frame_tree_node_->frame_tree_node_id()); #if defined(OS_ANDROID) GetLocalRenderWidgetHost()->SetForceEnableZoom( delegate_->GetOrCreateWebPreferences().force_enable_zoom);
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc index 3ed99ee..60b3ee2 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc
@@ -345,7 +345,10 @@ if (info.last_modified >= delete_begin && info.last_modified <= delete_end) { - dom_storage_context->DeleteLocalStorage(info.origin, barrier); + dom_storage_context->DeleteLocalStorage( + // TODO(https://crbug.com/1199077): Pass the real StorageKey + // when StoragePartitionImpl is converted. + blink::StorageKey(info.origin), barrier); } else { barrier.Run(); } @@ -372,8 +375,11 @@ base::BarrierClosure(infos.size(), std::move(done_callback)); for (const SessionStorageUsageInfo& info : infos) { - if (origin_matcher && !origin_matcher.Run(url::Origin::Create(info.origin), - special_storage_policy.get())) { + if (origin_matcher && + !origin_matcher.Run( + // TODO(https://crbug.com/1199077): Pass the real StorageKey + // when StoragePartitionImpl is converted. + info.storage_key.origin(), special_storage_policy.get())) { barrier.Run(); continue; } @@ -398,7 +404,10 @@ special_storage_policy.get()); if (can_delete) { dom_storage_context->DeleteLocalStorage( - url::Origin::Create(storage_origin), std::move(callback)); + // TODO(https://crbug.com/1199077): Pass the real StorageKey + // when StoragePartitionImpl is converted. + blink::StorageKey(url::Origin::Create(storage_origin)), + std::move(callback)); } else { std::move(callback).Run(); } @@ -1706,7 +1715,10 @@ "Access denied for localStorage request"); return; } - dom_storage_context_->OpenLocalStorage(origin, std::move(receiver)); + dom_storage_context_->OpenLocalStorage( + // TODO(https://crbug.com/1199077): Pass the real StorageKey + // when StoragePartitionImpl is converted. + blink::StorageKey(origin), std::move(receiver)); } void StoragePartitionImpl::BindSessionStorageNamespace( @@ -1726,7 +1738,10 @@ ChildProcessSecurityPolicyImpl::Handle security_policy_handle = dom_storage_receivers_.current_context()->Duplicate(); dom_storage_context_->BindStorageArea( - std::move(security_policy_handle), origin, namespace_id, + std::move(security_policy_handle), + // TODO(https://crbug.com/1199077): Pass the real StorageKey + // when StoragePartitionImpl is converted. + blink::StorageKey(origin), namespace_id, dom_storage_receivers_.GetBadMessageCallback(), std::move(receiver)); }
diff --git a/content/browser/worker_host/dedicated_worker_host.cc b/content/browser/worker_host/dedicated_worker_host.cc index 413dc180..e0b3246 100644 --- a/content/browser/worker_host/dedicated_worker_host.cc +++ b/content/browser/worker_host/dedicated_worker_host.cc
@@ -12,6 +12,7 @@ #include "content/browser/appcache/appcache_navigation_handle.h" #include "content/browser/blob_storage/chrome_blob_storage_context.h" #include "content/browser/code_cache/generated_code_cache_context.h" +#include "content/browser/devtools/devtools_instrumentation.h" #include "content/browser/loader/content_security_notifier.h" #include "content/browser/renderer_host/code_cache_host_impl.h" #include "content/browser/renderer_host/cross_origin_embedder_policy.h" @@ -362,12 +363,9 @@ // Set up the default network loader factory. bool bypass_redirect_checks = false; - mojo::PendingRemote<network::mojom::URLLoaderFactory> - url_loader_factory_remote = CreateNetworkFactoryForSubresources( - ancestor_render_frame_host, &bypass_redirect_checks); - DCHECK(url_loader_factory_remote); subresource_loader_factories->pending_default_factory() = - std::move(url_loader_factory_remote); + CreateNetworkFactoryForSubresources(ancestor_render_frame_host, + &bypass_redirect_checks); subresource_loader_factories->set_bypass_redirect_checks( bypass_redirect_checks); @@ -410,6 +408,7 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(ancestor_render_frame_host); DCHECK(bypass_redirect_checks); + DCHECK(base::FeatureList::IsEnabled(blink::features::kPlzDedicatedWorker)); mojo::PendingRemote<network::mojom::URLLoaderFactory> pending_default_factory; mojo::PendingReceiver<network::mojom::URLLoaderFactory> @@ -424,10 +423,8 @@ network::mojom::ClientSecurityStatePtr client_security_state = ancestor_render_frame_host->BuildClientSecurityState(); - if (base::FeatureList::IsEnabled(blink::features::kPlzDedicatedWorker)) { - client_security_state->cross_origin_embedder_policy = - cross_origin_embedder_policy(); - } + client_security_state->cross_origin_embedder_policy = + cross_origin_embedder_policy(); network::mojom::URLLoaderFactoryParamsPtr factory_params = URLLoaderFactoryParamsHelper::CreateForFrame( @@ -450,8 +447,10 @@ bypass_redirect_checks, /*disable_secure_dns=*/nullptr, &factory_params->factory_override); - // TODO(nhiroki): Call devtools_instrumentation::WillCreateURLLoaderFactory() - // here. + devtools_instrumentation::WillCreateURLLoaderFactory( + ancestor_render_frame_host, /*is_navigation=*/false, + /*is_download=*/false, &default_factory_receiver, + &factory_params->factory_override); worker_process_host_->CreateURLLoaderFactory( std::move(default_factory_receiver), std::move(factory_params)); @@ -642,6 +641,8 @@ void DedicatedWorkerHost::ObserveNetworkServiceCrash( StoragePartitionImpl* storage_partition_impl) { + DCHECK(base::FeatureList::IsEnabled(blink::features::kPlzDedicatedWorker)); + auto params = network::mojom::URLLoaderFactoryParams::New(); params->process_id = worker_process_host_->GetID(); params->debug_tag = "DedicatedWorkerHost::ObserveNetworkServiceCrash"; @@ -660,6 +661,7 @@ DCHECK(subresource_loader_updater_.is_bound()); DCHECK(network_service_connection_error_handler_holder_); DCHECK(!network_service_connection_error_handler_holder_.is_connected()); + DCHECK(base::FeatureList::IsEnabled(blink::features::kPlzDedicatedWorker)); auto* storage_partition_impl = static_cast<StoragePartitionImpl*>( worker_process_host_->GetStoragePartition());
diff --git a/content/public/browser/dom_storage_context.h b/content/public/browser/dom_storage_context.h index 1a5b9704..7ebebd4 100644 --- a/content/public/browser/dom_storage_context.h +++ b/content/public/browser/dom_storage_context.h
@@ -10,9 +10,9 @@ #include "base/callback.h" -namespace url { -class Origin; -} +namespace blink { +class StorageKey; +} // namespace blink namespace content { @@ -30,32 +30,33 @@ using GetSessionStorageUsageCallback = base::OnceCallback<void(const std::vector<SessionStorageUsageInfo>&)>; - // Returns a collection of origins using local storage to the given callback. + // Returns a collection of StorageKeys using local storage to the given + // callback. virtual void GetLocalStorageUsage(GetLocalStorageUsageCallback callback) = 0; - // Returns a collection of origins using session storage to the given + // Returns a collection of StorageKeys using session storage to the given // callback. virtual void GetSessionStorageUsage( GetSessionStorageUsageCallback callback) = 0; - // Deletes the local storage for the origin of |origin_url|. |callback| is - // called when the deletion is sent to the database and GetLocalStorageUsage() - // will not return entries for |origin_url| anymore. - virtual void DeleteLocalStorage(const url::Origin& origin, + // Deletes the local storage for `storage_key`. `callback` is called when the + // deletion is sent to the database and GetLocalStorageUsage() will not return + // entries for `storage_key` anymore. + virtual void DeleteLocalStorage(const blink::StorageKey& storage_key, base::OnceClosure callback) = 0; // Removes traces of deleted data from the local storage backend. virtual void PerformLocalStorageCleanup(base::OnceClosure callback) = 0; - // Deletes the session storage data identified by |usage_info|. + // Deletes the session storage data identified by `usage_info`. virtual void DeleteSessionStorage(const SessionStorageUsageInfo& usage_info, base::OnceClosure callback) = 0; virtual void PerformSessionStorageCleanup(base::OnceClosure callback) = 0; - // Creates a SessionStorageNamespace with the given |namespace_id|. Used + // Creates a SessionStorageNamespace with the given `namespace_id`. Used // after tabs are restored by session restore. When created, the - // SessionStorageNamespace with the correct |namespace_id| will be + // SessionStorageNamespace with the correct `namespace_id` will be // associated with the persisted sessionStorage data. virtual scoped_refptr<SessionStorageNamespace> RecreateSessionStorage( const std::string& namespace_id) = 0;
diff --git a/content/public/browser/session_storage_usage_info.h b/content/public/browser/session_storage_usage_info.h index f528b9c..eb02515 100644 --- a/content/public/browser/session_storage_usage_info.h +++ b/content/public/browser/session_storage_usage_info.h
@@ -6,13 +6,13 @@ #define CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_USAGE_INFO_H_ #include "content/common/content_export.h" -#include "url/gurl.h" +#include "third_party/blink/public/common/storage_key/storage_key.h" namespace content { // Used to report Session Storage usage info by DOMStorageContext. struct CONTENT_EXPORT SessionStorageUsageInfo { - GURL origin; + blink::StorageKey storage_key; std::string namespace_id; };
diff --git a/content/test/gpu/gpu_tests/test_expectations/context_lost_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/context_lost_expectations.txt index 02f952b..0497a7a8 100644 --- a/content/test/gpu/gpu_tests/test_expectations/context_lost_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/context_lost_expectations.txt
@@ -58,9 +58,6 @@ # results: [ Failure RetryOnFailure Skip ] # END TAG HEADER -# Win7 bots -crbug.com/1127541 [ win7 ] ContextLost_WebGPUContextLostFromGPUProcessExit [ Skip ] - # Win8 Release and Debug NVIDIA bots. crbug.com/524808 [ win8 nvidia ] ContextLost_WebGLContextLostFromSelectElement [ Skip ] @@ -119,7 +116,11 @@ # Flaky on Fuchsia. crbug.com/1122373 [ fuchsia ] ContextLost_WebGLContextLostFromQuantity [ Failure ] -# Webgpu not fully supported on Linux, Android, ChromeOS, and Fuchsia +# Webgpu not fully supported on Win7, Linux, Android, ChromeOS, and Fuchsia +[ win7 ] ContextLost_WebGPUContextLostFromGPUProcessExit [ Skip ] +[ win7 ] ContextLost_WebGPUBlockedAfterJSNavigation [ Skip ] +[ win7 ] ContextLost_WebGPUUnblockedAfterUserInitiatedReload [ Skip ] +[ win7 ] GpuNormalTermination_WebGPUNotBlocked [ Skip ] [ linux ] ContextLost_WebGPUContextLostFromGPUProcessExit [ Skip ] [ linux ] ContextLost_WebGPUBlockedAfterJSNavigation [ Skip ] [ linux ] ContextLost_WebGPUUnblockedAfterUserInitiatedReload [ Skip ]
diff --git a/extensions/browser/api/declarative_net_request/constants.h b/extensions/browser/api/declarative_net_request/constants.h index 625a338d..514926ce4 100644 --- a/extensions/browser/api/declarative_net_request/constants.h +++ b/extensions/browser/api/declarative_net_request/constants.h
@@ -13,8 +13,8 @@ namespace extensions { namespace declarative_net_request { -// The result of parsing JSON rules provided by an extension. Can correspond to -// a single or multiple rules. +// The result of parsing JSON rules provided by an extension. Corresponds to a +// single rule. enum class ParseResult { NONE, SUCCESS, @@ -29,7 +29,6 @@ ERROR_EMPTY_URL_FILTER, ERROR_INVALID_REDIRECT_URL, ERROR_DUPLICATE_IDS, - ERROR_PERSISTING_RULESET, // Parse errors related to fields containing non-ascii characters. ERROR_NON_ASCII_URL_FILTER, @@ -75,23 +74,26 @@ kSuccess = 0, kErrorReadJSONRules = 1, kErrorRuleCountExceeded = 2, - kErrorCreateTemporarySource = 3, - kErrorWriteTemporaryJSONRuleset = 4, - kErrorWriteTemporaryIndexedRuleset = 5, + // kErrorCreateTemporarySource_Deprecated = 3, + // kErrorWriteTemporaryJSONRuleset_Deprecated = 4, + // kErrorWriteTemporaryIndexedRuleset_Deprecated = 5, kErrorInvalidRules = 6, kErrorCreateDynamicRulesDirectory = 7, - kErrorReplaceIndexedFile = 8, - kErrorReplaceJSONFile = 9, + // kErrorReplaceIndexedFile_Deprecated = 8, + // kErrorReplaceJSONFile_Deprecated = 9, kErrorCreateMatcher_InvalidPath = 10, kErrorCreateMatcher_FileReadError = 11, kErrorCreateMatcher_ChecksumMismatch = 12, kErrorCreateMatcher_VersionMismatch = 13, kErrorRegexTooLarge = 14, kErrorRegexRuleCountExceeded = 15, + kErrorSerializeToJson = 16, + kErrorWriteJson = 17, + kErrorWriteFlatbuffer = 18, // Magic constant used by histograms code. Should be equal to the largest enum // value. - kMaxValue = kErrorRegexRuleCountExceeded, + kMaxValue = kErrorWriteFlatbuffer, }; // Describes the result of loading a single JSON Ruleset.
diff --git a/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc b/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc index 91da86e..b501227a 100644 --- a/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc +++ b/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc
@@ -57,7 +57,7 @@ } std::string GetErrorWithFilename(const base::FilePath& json_path, - const std::string& error) { + base::StringPiece error) { return base::StrCat({GetFilename(json_path), ": ", error}); } @@ -220,13 +220,15 @@ DCHECK_EQ(Status::kSuccess, read_result.status); - const ParseInfo info = - source.IndexAndPersistRules(std::move(read_result.rules)); - + const ParseInfo info = source.IndexRules(std::move(read_result.rules)); if (info.has_error()) { - std::string error = GetErrorWithFilename(source.json_path(), info.error()); return IndexAndPersistJSONRulesetResult::CreateErrorResult( - std::move(error)); + GetErrorWithFilename(source.json_path(), info.error())); + } + + if (!PersistIndexedRuleset(source.indexed_path(), info.GetBuffer())) { + return IndexAndPersistJSONRulesetResult::CreateErrorResult( + GetErrorWithFilename(source.json_path(), kErrorPersisting)); } // Don't cause a hard error if the regex failed compilation due to @@ -422,20 +424,6 @@ std::move(callback))); } -ParseInfo FileBackedRulesetSource::IndexAndPersistRules( - std::vector<dnr_api::Rule> rules) const { - ParseInfo info = IndexRules(std::move(rules)); - if (info.has_error()) - return info; - - if (!PersistIndexedRuleset(indexed_path_, info.GetBuffer())) { - return ParseInfo(ParseResult::ERROR_PERSISTING_RULESET, - nullptr /* rule_id */); - } - - return info; -} - ReadJSONRulesResult FileBackedRulesetSource::ReadJSONRulesUnsafe() const { ReadJSONRulesResult result; @@ -462,8 +450,9 @@ rule_count_limit(), is_dynamic_ruleset()); } -bool FileBackedRulesetSource::WriteRulesToJSON( - const std::vector<dnr_api::Rule>& rules) const { +bool FileBackedRulesetSource::SerializeRulesToJSON( + const std::vector<dnr_api::Rule>& rules, + std::string* json) const { DCHECK_LE(rules.size(), rule_count_limit()); std::unique_ptr<base::Value> rules_value = @@ -471,18 +460,9 @@ DCHECK(rules_value); DCHECK(rules_value->is_list()); - if (!base::CreateDirectory(json_path_.DirName())) - return false; - - std::string json_contents; - JSONStringValueSerializer serializer(&json_contents); + JSONStringValueSerializer serializer(json); serializer.set_pretty_print(false); - if (!serializer.Serialize(*rules_value)) - return false; - - int data_size = static_cast<int>(json_contents.size()); - return base::WriteFile(json_path_, json_contents.data(), data_size) == - data_size; + return serializer.Serialize(*rules_value); } LoadRulesetResult FileBackedRulesetSource::CreateVerifiedMatcher(
diff --git a/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.h b/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.h index 58541957..159dc86 100644 --- a/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.h +++ b/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.h
@@ -193,18 +193,14 @@ data_decoder::DataDecoder* decoder, IndexAndPersistJSONRulesetCallback callback) const; - // Indexes the given |rules| in indexed/flatbuffer format. The number of - // |rules| must be less than the rule count limit. - ParseInfo IndexAndPersistRules( - std::vector<api::declarative_net_request::Rule> rules) const; - // Reads JSON rules synchronously. Callers should only use this if the JSON is // trusted. Must be called on a sequence which supports file IO. ReadJSONRulesResult ReadJSONRulesUnsafe() const; - // Serializes and writes |rules| to the json path. Returns false on failure. - bool WriteRulesToJSON( - const std::vector<api::declarative_net_request::Rule>& rules) const; + // Serializes |rules| into the `json` string. Returns false on failure. + bool SerializeRulesToJSON( + const std::vector<api::declarative_net_request::Rule>& rules, + std::string* json) const; // Creates a verified RulesetMatcher corresponding to indexed ruleset on disk. // Returns kSuccess on success along with the ruleset |matcher|. Must be
diff --git a/extensions/browser/api/declarative_net_request/file_sequence_helper.cc b/extensions/browser/api/declarative_net_request/file_sequence_helper.cc index da4f793..5b1d767 100644 --- a/extensions/browser/api/declarative_net_request/file_sequence_helper.cc +++ b/extensions/browser/api/declarative_net_request/file_sequence_helper.cc
@@ -14,6 +14,7 @@ #include "base/containers/contains.h" #include "base/containers/cxx20_erase.h" #include "base/files/file_util.h" +#include "base/files/important_file_writer.h" #include "base/memory/ref_counted.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" @@ -233,6 +234,10 @@ DCHECK(error); DCHECK(status); + // Dynamic JSON and indexed rulesets for an extension are stored in the same + // directory. + DCHECK_EQ(source.indexed_path().DirName(), source.json_path().DirName()); + std::set<int> rule_ids_to_add; for (const dnr_api::Rule& rule : rules_to_add) rule_ids_to_add.insert(rule.id); @@ -244,36 +249,22 @@ return false; // |error| and |status| already populated. } - // Initially write the new JSON and indexed rulesets to temporary files to - // ensure we don't leave the actual files in an inconsistent state. - std::unique_ptr<FileBackedRulesetSource> temporary_source = - FileBackedRulesetSource::CreateTemporarySource( - source.id(), source.rule_count_limit(), source.extension_id()); - if (!temporary_source) { + // Serialize rules to JSON. + std::string json; + if (!source.SerializeRulesToJSON(new_rules, &json)) { *error = kInternalErrorUpdatingDynamicRules; - *status = UpdateDynamicRulesStatus::kErrorCreateTemporarySource; + *status = UpdateDynamicRulesStatus::kErrorSerializeToJson; return false; } - // Persist JSON. - if (!temporary_source->WriteRulesToJSON(new_rules)) { - *error = kInternalErrorUpdatingDynamicRules; - *status = UpdateDynamicRulesStatus::kErrorWriteTemporaryJSONRuleset; - return false; - } - - // Index and persist the indexed ruleset. - ParseInfo info = temporary_source->IndexAndPersistRules(std::move(new_rules)); + // Index rules. + ParseInfo info = source.IndexRules(std::move(new_rules)); if (info.has_error()) { *error = info.error(); - *status = info.error_reason() == ParseResult::ERROR_PERSISTING_RULESET - ? UpdateDynamicRulesStatus::kErrorWriteTemporaryIndexedRuleset - : UpdateDynamicRulesStatus::kErrorInvalidRules; + *status = UpdateDynamicRulesStatus::kErrorInvalidRules; return false; } - *ruleset_checksum = info.ruleset_checksum(); - // Treat rules which exceed the regex memory limit as errors if these are new // rules. Just surface an error for the first such rule. for (int rule_id : info.regex_limit_exceeded_rules()) { @@ -290,44 +281,48 @@ return false; } - // Dynamic JSON and indexed rulesets for an extension are stored in the same - // directory. - DCHECK_EQ(source.indexed_path().DirName(), source.json_path().DirName()); - - // Place the indexed ruleset at the correct location. base::ReplaceFile should - // involve a rename and ideally be atomic at the system level. Before doing so - // ensure that the destination directory exists, since this is not handled by - // base::ReplaceFile. + // Ensure that the destination directory exists. if (!base::CreateDirectory(source.indexed_path().DirName())) { *error = kInternalErrorUpdatingDynamicRules; *status = UpdateDynamicRulesStatus::kErrorCreateDynamicRulesDirectory; return false; } - // TODO(karandeepb): ReplaceFile can fail if the source and destination files - // are on different volumes. Investigate if temporary files can be created on - // a different volume than the profile path. - if (!base::ReplaceFile(temporary_source->indexed_path(), - source.indexed_path(), nullptr /* error */)) { + // Persist indexed ruleset. Use `ImportantFileWriter` to make this atomic and + // decrease the likelihood of file corruption. + if (!base::ImportantFileWriter::WriteFileAtomically( + source.indexed_path(), GetIndexedRulesetData(info.GetBuffer()), + "DNRDynamicRulesFlatbuffer")) { + // If this fails, we might have corrupted the existing indexed ruleset file. + // However the JSON source of truth hasn't been modified. The next time the + // extension is loaded, the indexed ruleset will fail checksum verification + // leading to reindexing of the JSON ruleset. *error = kInternalErrorUpdatingDynamicRules; - *status = UpdateDynamicRulesStatus::kErrorReplaceIndexedFile; + *status = UpdateDynamicRulesStatus::kErrorWriteFlatbuffer; return false; } - // Place the json ruleset at the correct location. - if (!base::ReplaceFile(temporary_source->json_path(), source.json_path(), - nullptr /* error */)) { + // Persist JSON. Since the JSON ruleset is the source of truth, use + // `ImportantFileWriter` to make this atomic and decrease the likelihood of + // file corruption. + if (!base::ImportantFileWriter::WriteFileAtomically( + source.json_path(), json, "DNRDynamicRulesetJson")) { // We have entered into an inconsistent state where the indexed ruleset was // updated but not the JSON ruleset. This should be extremely rare. However // if we get here, the next time the extension is loaded, we'll identify // that the indexed ruleset checksum is inconsistent and reindex the JSON // ruleset. + // If the JSON ruleset is corrupted here though, loading the dynamic ruleset + // subsequently will fail. A call by extension to `updateDynamicRules` + // should help it start from a clean slate in this case (See + // `GetNewDynamicRules` above). *error = kInternalErrorUpdatingDynamicRules; - *status = UpdateDynamicRulesStatus::kErrorReplaceJSONFile; + *status = UpdateDynamicRulesStatus::kErrorWriteJson; return false; } - return true; // |ruleset_checksum| already populated. + *ruleset_checksum = info.ruleset_checksum(); + return true; } } // namespace
diff --git a/extensions/browser/api/declarative_net_request/file_sequence_helper_unittest.cc b/extensions/browser/api/declarative_net_request/file_sequence_helper_unittest.cc index 9c36a17..75878ccc 100644 --- a/extensions/browser/api/declarative_net_request/file_sequence_helper_unittest.cc +++ b/extensions/browser/api/declarative_net_request/file_sequence_helper_unittest.cc
@@ -332,7 +332,7 @@ api_rules.push_back(GetAPIRule(rule)); int rule_id = kMinValidID + 1; - ParseInfo info(ParseResult::ERROR_INVALID_RULE_PRIORITY, &rule_id); + ParseInfo info(ParseResult::ERROR_INVALID_RULE_PRIORITY, rule_id); TestAddDynamicRules(source.Clone(), std::move(api_rules), ReadJSONRulesResult::Status::kSuccess, UpdateDynamicRulesStatus::kErrorInvalidRules,
diff --git a/extensions/browser/api/declarative_net_request/parse_info.cc b/extensions/browser/api/declarative_net_request/parse_info.cc index 379e30e..eb27fed 100644 --- a/extensions/browser/api/declarative_net_request/parse_info.cc +++ b/extensions/browser/api/declarative_net_request/parse_info.cc
@@ -27,10 +27,7 @@ return base::JoinString(parts_piece, ", "); } -std::string GetError(ParseResult error_reason, const int* rule_id) { - // Every error except ERROR_PERSISTING_RULESET requires |rule_id|. - DCHECK_EQ(!rule_id, error_reason == ParseResult::ERROR_PERSISTING_RULESET); - +std::string GetError(ParseResult error_reason, int rule_id) { switch (error_reason) { case ParseResult::NONE: break; @@ -38,149 +35,145 @@ break; case ParseResult::ERROR_REQUEST_METHOD_DUPLICATED: return ErrorUtils::FormatErrorMessage(kErrorRequestMethodDuplicated, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); case ParseResult::ERROR_RESOURCE_TYPE_DUPLICATED: return ErrorUtils::FormatErrorMessage(kErrorResourceTypeDuplicated, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); case ParseResult::ERROR_INVALID_RULE_ID: return ErrorUtils::FormatErrorMessage( - kErrorInvalidRuleKey, base::NumberToString(*rule_id), kIDKey, + kErrorInvalidRuleKey, base::NumberToString(rule_id), kIDKey, base::NumberToString(kMinValidID)); case ParseResult::ERROR_INVALID_RULE_PRIORITY: return ErrorUtils::FormatErrorMessage( - kErrorInvalidRuleKey, base::NumberToString(*rule_id), kPriorityKey, + kErrorInvalidRuleKey, base::NumberToString(rule_id), kPriorityKey, base::NumberToString(kMinValidPriority)); case ParseResult::ERROR_NO_APPLICABLE_RESOURCE_TYPES: return ErrorUtils::FormatErrorMessage(kErrorNoApplicableResourceTypes, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); case ParseResult::ERROR_EMPTY_DOMAINS_LIST: return ErrorUtils::FormatErrorMessage( - kErrorEmptyList, base::NumberToString(*rule_id), kDomainsKey); + kErrorEmptyList, base::NumberToString(rule_id), kDomainsKey); case ParseResult::ERROR_EMPTY_RESOURCE_TYPES_LIST: return ErrorUtils::FormatErrorMessage( - kErrorEmptyList, base::NumberToString(*rule_id), kResourceTypesKey); + kErrorEmptyList, base::NumberToString(rule_id), kResourceTypesKey); case ParseResult::ERROR_EMPTY_REQUEST_METHODS_LIST: return ErrorUtils::FormatErrorMessage( - kErrorEmptyList, base::NumberToString(*rule_id), kRequestMethodsKey); + kErrorEmptyList, base::NumberToString(rule_id), kRequestMethodsKey); case ParseResult::ERROR_EMPTY_URL_FILTER: return ErrorUtils::FormatErrorMessage( - kErrorEmptyKey, base::NumberToString(*rule_id), kUrlFilterKey); + kErrorEmptyKey, base::NumberToString(rule_id), kUrlFilterKey); case ParseResult::ERROR_INVALID_REDIRECT_URL: return ErrorUtils::FormatErrorMessage(kErrorInvalidRedirectUrl, - base::NumberToString(*rule_id), + base::NumberToString(rule_id), kRedirectUrlPath); case ParseResult::ERROR_DUPLICATE_IDS: return ErrorUtils::FormatErrorMessage(kErrorDuplicateIDs, - base::NumberToString(*rule_id)); - case ParseResult::ERROR_PERSISTING_RULESET: - return kErrorPersisting; + base::NumberToString(rule_id)); case ParseResult::ERROR_NON_ASCII_URL_FILTER: return ErrorUtils::FormatErrorMessage( - kErrorNonAscii, base::NumberToString(*rule_id), kUrlFilterKey); + kErrorNonAscii, base::NumberToString(rule_id), kUrlFilterKey); case ParseResult::ERROR_NON_ASCII_DOMAIN: return ErrorUtils::FormatErrorMessage( - kErrorNonAscii, base::NumberToString(*rule_id), kDomainsKey); + kErrorNonAscii, base::NumberToString(rule_id), kDomainsKey); case ParseResult::ERROR_NON_ASCII_EXCLUDED_DOMAIN: return ErrorUtils::FormatErrorMessage( - kErrorNonAscii, base::NumberToString(*rule_id), kExcludedDomainsKey); + kErrorNonAscii, base::NumberToString(rule_id), kExcludedDomainsKey); case ParseResult::ERROR_INVALID_URL_FILTER: return ErrorUtils::FormatErrorMessage( - kErrorInvalidKey, base::NumberToString(*rule_id), kUrlFilterKey); + kErrorInvalidKey, base::NumberToString(rule_id), kUrlFilterKey); case ParseResult::ERROR_INVALID_REDIRECT: return ErrorUtils::FormatErrorMessage( - kErrorInvalidKey, base::NumberToString(*rule_id), kRedirectPath); + kErrorInvalidKey, base::NumberToString(rule_id), kRedirectPath); case ParseResult::ERROR_INVALID_EXTENSION_PATH: return ErrorUtils::FormatErrorMessage( - kErrorInvalidKey, base::NumberToString(*rule_id), kExtensionPathPath); + kErrorInvalidKey, base::NumberToString(rule_id), kExtensionPathPath); case ParseResult::ERROR_INVALID_TRANSFORM_SCHEME: return ErrorUtils::FormatErrorMessage( - kErrorInvalidTransformScheme, base::NumberToString(*rule_id), + kErrorInvalidTransformScheme, base::NumberToString(rule_id), kTransformSchemePath, JoinString(base::span<const char* const>(kAllowedTransformSchemes))); case ParseResult::ERROR_INVALID_TRANSFORM_PORT: return ErrorUtils::FormatErrorMessage( - kErrorInvalidKey, base::NumberToString(*rule_id), kTransformPortPath); + kErrorInvalidKey, base::NumberToString(rule_id), kTransformPortPath); case ParseResult::ERROR_INVALID_TRANSFORM_QUERY: - return ErrorUtils::FormatErrorMessage(kErrorInvalidKey, - base::NumberToString(*rule_id), - kTransformQueryPath); + return ErrorUtils::FormatErrorMessage( + kErrorInvalidKey, base::NumberToString(rule_id), kTransformQueryPath); case ParseResult::ERROR_INVALID_TRANSFORM_FRAGMENT: return ErrorUtils::FormatErrorMessage(kErrorInvalidKey, - base::NumberToString(*rule_id), + base::NumberToString(rule_id), kTransformFragmentPath); case ParseResult::ERROR_QUERY_AND_TRANSFORM_BOTH_SPECIFIED: return ErrorUtils::FormatErrorMessage( - kErrorQueryAndTransformBothSpecified, base::NumberToString(*rule_id), + kErrorQueryAndTransformBothSpecified, base::NumberToString(rule_id), kTransformQueryPath, kTransformQueryTransformPath); case ParseResult::ERROR_JAVASCRIPT_REDIRECT: return ErrorUtils::FormatErrorMessage(kErrorJavascriptRedirect, - base::NumberToString(*rule_id), + base::NumberToString(rule_id), kRedirectUrlPath); case ParseResult::ERROR_EMPTY_REGEX_FILTER: return ErrorUtils::FormatErrorMessage( - kErrorEmptyKey, base::NumberToString(*rule_id), kRegexFilterKey); + kErrorEmptyKey, base::NumberToString(rule_id), kRegexFilterKey); case ParseResult::ERROR_NON_ASCII_REGEX_FILTER: return ErrorUtils::FormatErrorMessage( - kErrorNonAscii, base::NumberToString(*rule_id), kRegexFilterKey); + kErrorNonAscii, base::NumberToString(rule_id), kRegexFilterKey); case ParseResult::ERROR_INVALID_REGEX_FILTER: return ErrorUtils::FormatErrorMessage( - kErrorInvalidKey, base::NumberToString(*rule_id), kRegexFilterKey); + kErrorInvalidKey, base::NumberToString(rule_id), kRegexFilterKey); case ParseResult::ERROR_NO_HEADERS_SPECIFIED: return ErrorUtils::FormatErrorMessage( - kErrorNoHeaderListsSpecified, base::NumberToString(*rule_id), + kErrorNoHeaderListsSpecified, base::NumberToString(rule_id), kRequestHeadersPath, kResponseHeadersPath); case ParseResult::ERROR_EMPTY_REQUEST_HEADERS_LIST: return ErrorUtils::FormatErrorMessage( - kErrorEmptyList, base::NumberToString(*rule_id), kRequestHeadersPath); + kErrorEmptyList, base::NumberToString(rule_id), kRequestHeadersPath); case ParseResult::ERROR_EMPTY_RESPONSE_HEADERS_LIST: - return ErrorUtils::FormatErrorMessage(kErrorEmptyList, - base::NumberToString(*rule_id), - kResponseHeadersPath); + return ErrorUtils::FormatErrorMessage( + kErrorEmptyList, base::NumberToString(rule_id), kResponseHeadersPath); case ParseResult::ERROR_INVALID_HEADER_NAME: return ErrorUtils::FormatErrorMessage(kErrorInvalidHeaderName, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); case ParseResult::ERROR_INVALID_HEADER_VALUE: return ErrorUtils::FormatErrorMessage(kErrorInvalidHeaderValue, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); case ParseResult::ERROR_HEADER_VALUE_NOT_SPECIFIED: return ErrorUtils::FormatErrorMessage(kErrorNoHeaderValueSpecified, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); case ParseResult::ERROR_HEADER_VALUE_PRESENT: return ErrorUtils::FormatErrorMessage(kErrorHeaderValuePresent, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); case ParseResult::ERROR_APPEND_REQUEST_HEADER_UNSUPPORTED: return ErrorUtils::FormatErrorMessage(kErrorCannotAppendRequestHeader, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); case ParseResult::ERROR_REGEX_TOO_LARGE: // These rules are ignored while indexing and so won't cause an error. break; case ParseResult::ERROR_MULTIPLE_FILTERS_SPECIFIED: return ErrorUtils::FormatErrorMessage(kErrorMultipleFilters, - base::NumberToString(*rule_id), + base::NumberToString(rule_id), kUrlFilterKey, kRegexFilterKey); case ParseResult::ERROR_REGEX_SUBSTITUTION_WITHOUT_FILTER: return ErrorUtils::FormatErrorMessage( - kErrorRegexSubstitutionWithoutFilter, base::NumberToString(*rule_id), + kErrorRegexSubstitutionWithoutFilter, base::NumberToString(rule_id), kRegexSubstitutionKey, kRegexFilterKey); case ParseResult::ERROR_INVALID_REGEX_SUBSTITUTION: return ErrorUtils::FormatErrorMessage(kErrorInvalidKey, - base::NumberToString(*rule_id), + base::NumberToString(rule_id), kRegexSubstitutionPath); case ParseResult::ERROR_INVALID_ALLOW_ALL_REQUESTS_RESOURCE_TYPE: return ErrorUtils::FormatErrorMessage( kErrorInvalidAllowAllRequestsResourceType, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); case ParseResult::ERROR_EMPTY_TAB_IDS_LIST: return ErrorUtils::FormatErrorMessage( - kErrorEmptyList, base::NumberToString(*rule_id), kTabIdsKey); + kErrorEmptyList, base::NumberToString(rule_id), kTabIdsKey); case ParseResult::ERROR_TAB_IDS_ON_NON_SESSION_RULE: return ErrorUtils::FormatErrorMessage(kErrorTabIdsOnNonSessionRule, - base::NumberToString(*rule_id), + base::NumberToString(rule_id), kTabIdsKey, kExcludedTabIdsKey); case ParseResult::ERROR_TAB_ID_DUPLICATED: return ErrorUtils::FormatErrorMessage(kErrorTabIdDuplicated, - base::NumberToString(*rule_id)); + base::NumberToString(rule_id)); } NOTREACHED(); return std::string(); @@ -200,7 +193,7 @@ buffer_(std::move(buffer)), ruleset_checksum_(ruleset_checksum) {} -ParseInfo::ParseInfo(ParseResult error_reason, const int* rule_id) +ParseInfo::ParseInfo(ParseResult error_reason, int rule_id) : has_error_(true), error_(GetError(error_reason, rule_id)), error_reason_(error_reason) {}
diff --git a/extensions/browser/api/declarative_net_request/parse_info.h b/extensions/browser/api/declarative_net_request/parse_info.h index dbb41aa..3159f6c 100644 --- a/extensions/browser/api/declarative_net_request/parse_info.h +++ b/extensions/browser/api/declarative_net_request/parse_info.h
@@ -28,7 +28,7 @@ int ruleset_checksum); // Constructor to be used on error. - ParseInfo(ParseResult error_reason, const int* rule_id); + ParseInfo(ParseResult error_reason, int rule_id); ParseInfo(ParseInfo&&); ParseInfo& operator=(ParseInfo&&);
diff --git a/extensions/browser/api/declarative_net_request/ruleset_source.cc b/extensions/browser/api/declarative_net_request/ruleset_source.cc index 90b5009..3156788 100644 --- a/extensions/browser/api/declarative_net_request/ruleset_source.cc +++ b/extensions/browser/api/declarative_net_request/ruleset_source.cc
@@ -50,7 +50,7 @@ int rule_id = rule.id; bool inserted = id_set.insert(rule_id).second; if (!inserted) - return ParseInfo(ParseResult::ERROR_DUPLICATE_IDS, &rule_id); + return ParseInfo(ParseResult::ERROR_DUPLICATE_IDS, rule_id); IndexedRule indexed_rule; ParseResult parse_result = IndexedRule::CreateIndexedRule( @@ -62,7 +62,7 @@ } if (parse_result != ParseResult::SUCCESS) - return ParseInfo(parse_result, &rule_id); + return ParseInfo(parse_result, rule_id); indexer.AddUrlRule(indexed_rule); rules_count++;
diff --git a/extensions/browser/api/declarative_net_request/test_utils.cc b/extensions/browser/api/declarative_net_request/test_utils.cc index 4ee0d45..1f99dbb 100644 --- a/extensions/browser/api/declarative_net_request/test_utils.cc +++ b/extensions/browser/api/declarative_net_request/test_utils.cc
@@ -200,9 +200,6 @@ case ParseResult::ERROR_DUPLICATE_IDS: output << "ERROR_DUPLICATE_IDS"; break; - case ParseResult::ERROR_PERSISTING_RULESET: - output << "ERROR_PERSISTING_RULESET"; - break; case ParseResult::ERROR_NON_ASCII_URL_FILTER: output << "ERROR_NON_ASCII_URL_FILTER"; break;
diff --git a/extensions/browser/api/declarative_net_request/utils.cc b/extensions/browser/api/declarative_net_request/utils.cc index 932b2820..79bd4227 100644 --- a/extensions/browser/api/declarative_net_request/utils.cc +++ b/extensions/browser/api/declarative_net_request/utils.cc
@@ -13,6 +13,7 @@ #include "base/files/file_util.h" #include "base/hash/hash.h" #include "base/metrics/histogram_functions.h" +#include "base/strings/strcat.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" @@ -123,12 +124,24 @@ g_override_checksum_for_test = checksum; } +std::string GetIndexedRulesetData(base::span<const uint8_t> data) { + return base::StrCat( + {GetVersionHeader(), + base::StringPiece(reinterpret_cast<const char*>(data.data()), + data.size())}); +} + bool PersistIndexedRuleset(const base::FilePath& path, base::span<const uint8_t> data) { // Create the directory corresponding to |path| if it does not exist. if (!base::CreateDirectory(path.DirName())) return false; + // Unlike for dynamic rules, we don't use `ImportantFileWriter` here since it + // can be quite slow (and this will be called for the extension's indexed + // static rulesets). Also the file persisting logic here is simpler than for + // dynamic rules where we need to persist both the JSON and indexed rulesets + // and keep them in sync. base::File ruleset_file( path, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); if (!ruleset_file.IsValid())
diff --git a/extensions/browser/api/declarative_net_request/utils.h b/extensions/browser/api/declarative_net_request/utils.h index 6dbe23f..f252e0c 100644 --- a/extensions/browser/api/declarative_net_request/utils.h +++ b/extensions/browser/api/declarative_net_request/utils.h
@@ -55,6 +55,11 @@ // |checksum|. Note: If |checksum| is -1, no such override is performed. void OverrideGetChecksumForTest(int checksum); +// Returns the indexed ruleset data to be persisted to disk. The ruleset is +// composed of a version header corresponding to the current ruleset format +// version, followed by the actual ruleset data. +std::string GetIndexedRulesetData(base::span<const uint8_t> data); + // Helper function to persist the indexed ruleset |data| at the given |path|. // The ruleset is composed of a version header corresponding to the current // ruleset format version, followed by the actual ruleset data.
diff --git a/extensions/browser/api/messaging/extension_message_port.cc b/extensions/browser/api/messaging/extension_message_port.cc index d087a86..19ed7002 100644 --- a/extensions/browser/api/messaging/extension_message_port.cc +++ b/extensions/browser/api/messaging/extension_message_port.cc
@@ -8,14 +8,13 @@ #include <utility> #include "base/bind.h" -#include "base/metrics/field_trial_params.h" #include "base/notreached.h" #include "base/scoped_observation.h" #include "base/strings/strcat.h" #include "components/back_forward_cache/back_forward_cache_disable.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/navigation_handle.h" -#include "content/public/browser/render_document_host_user_data.h" +#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" @@ -33,88 +32,19 @@ namespace { -using PassKey = base::PassKey<ExtensionMessagePort>; - -bool IsExtensionMessageSupported() { - if (!content::BackForwardCache::IsBackForwardCacheFeatureEnabled()) - return false; - static const base::FeatureParam<bool> extension_message_supported( - &features::kBackForwardCache, "extension_message_supported", false); - return extension_message_supported.Get(); -} - std::string PortIdToString(const extensions::PortId& port_id) { return base::StrCat({port_id.GetChannelId().first.ToString(), ":", base::NumberToString(port_id.GetChannelId().second)}); } -// This class is created per RenderDocument. It stores the set of -// ExtensionMessagePort objects that have the associated `RenderFrameHost` in -// the `ExtensionMessagePort::frames_` set. -class MessagePortStatePerRenderDocument - : public content::RenderDocumentHostUserData< - MessagePortStatePerRenderDocument> { - public: - ~MessagePortStatePerRenderDocument() override { - if (!ports_opened_.empty()) { - // Clear the disable reason as the new document may reuse the - // RenderFrameHost. - content::BackForwardCache::ClearDisableReasonForRenderFrameHost( - rfh_id_, back_forward_cache::DisabledReason( - back_forward_cache::DisabledReasonId:: - kExtensionMessagingForOpenPort)); - } - } - - void PortOpened(extensions::ExtensionMessagePort* port) { - ports_opened_.insert(port); - if (ports_opened_.size() != 1) - return; - back_forward_cache::DisabledReasonId reason_id = - back_forward_cache::DisabledReasonId::kExtensionMessagingForOpenPort; - if (!IsExtensionMessageSupported()) { - // When extension messages are not supported, use kExtensionMessaging. - // kExtensionMessaging will not be cleared by - // ClearDisableReasonForRenderFrameHost(kExtensionMessagingForOpenPort). - reason_id = back_forward_cache::DisabledReasonId::kExtensionMessaging; - } - content::BackForwardCache::DisableForRenderFrameHost( - rfh_id_, back_forward_cache::DisabledReason(reason_id)); - } - - void PortClosed(extensions::ExtensionMessagePort* port) { - if (ports_opened_.erase(port) == 0) - return; - - if (!ports_opened_.empty()) - return; - - content::BackForwardCache::ClearDisableReasonForRenderFrameHost( - rfh_id_, back_forward_cache::DisabledReason( - back_forward_cache::DisabledReasonId:: - kExtensionMessagingForOpenPort)); - } - - private: - explicit MessagePortStatePerRenderDocument(content::RenderFrameHost* rfh) - : rfh_id_(rfh->GetGlobalId()) {} - friend class content::RenderDocumentHostUserData< - MessagePortStatePerRenderDocument>; - - std::set<extensions::ExtensionMessagePort*> ports_opened_; - const content::GlobalRenderFrameHostId rfh_id_; - - RENDER_DOCUMENT_HOST_USER_DATA_KEY_DECL(); -}; - -RENDER_DOCUMENT_HOST_USER_DATA_KEY_IMPL(MessagePortStatePerRenderDocument) - -} // namespace +using PassKey = base::PassKey<ExtensionMessagePort>; const char kReceivingEndDoesntExistError[] = // TODO(lazyboy): Test these in service worker implementation. "Could not establish connection. Receiving end does not exist."; +} // namespace + // Helper class to detect when frames are destroyed. class ExtensionMessagePort::FrameTracker : public content::WebContentsObserver, public ProcessManagerObserver { @@ -139,8 +69,36 @@ void DidFinishNavigation( content::NavigationHandle* navigation_handle) override { + // There are a number of possible scenarios for the navigation: + // 1. Same-document navigation - Don't unregister the frame, since it can + // still use the port. + // 2. Cross-document navigation, reusing the RenderFrameHost - Unregister + // the frame, since the new document is not allowed to use the port. + // 3. Cross-document navigation, with a new RenderFrameHost - Since the + // navigated-to document has a new RFH, the port can not be registered for + // it, so it doesn't matter whether we unregister it or not. If the + // navigated-from document is stored in the back-forward cache, don't + // unregister the frame (see note below). If it is not cached, the frame + // will be unregistered when the RFH is deleted. + // 4. Restoring a cached frame from back-forward cache - This is similar to + // (3) in that the navigation changes RFH, with the difference that the RFH + // is not new and so may be registered. Don't unregister the frame in this + // case since it may stil use the port. + + // Note that we don't just disconnect channels when a frame is bf-cached + // since when such a document is later restored, there is no "load" and so a + // message channel won't be immediately available to extensions. + // Contrast this with a normal load where an extension is able to inject + // scripts at "document_start" and set up message ports. if (navigation_handle->HasCommitted() && - !navigation_handle->IsSameDocument()) { + !navigation_handle->IsSameDocument() && + !navigation_handle->IsServedFromBackForwardCache()) { + // Note: This unregisters the _new_ RenderFrameHost. In case a new RFH was + // created for this navigation, this will be a no-op, since we haven't + // seen it before. In case the RFH is reused for the navigation, this will + // correctly unregister the frame, to avoid messages intended for the + // previous document being sent to the new document. If the navigated-to + // RFH is served from cache, keep the port alive. port_->UnregisterFrame(navigation_handle->GetRenderFrameHost()); } } @@ -258,29 +216,13 @@ extension_id_(extension_id), browser_context_(browser_context) {} -ExtensionMessagePort::~ExtensionMessagePort() { - ClearFrames(); -} - -void ExtensionMessagePort::ClearFrames() { - for (auto* rfh : frames_) { - auto* message_port_state = - MessagePortStatePerRenderDocument::GetForCurrentDocument(rfh); - if (message_port_state) - message_port_state->PortClosed(this); - } - frames_.clear(); -} +ExtensionMessagePort::~ExtensionMessagePort() = default; void ExtensionMessagePort::RemoveCommonFrames(const MessagePort& port) { // Avoid overlap in the set of frames to make sure that it does not matter // when UnregisterFrame is called. for (auto it = frames_.begin(); it != frames_.end();) { if (port.HasFrame(*it)) { - auto* message_port_state = - MessagePortStatePerRenderDocument::GetForCurrentDocument(*it); - if (message_port_state) - message_port_state->PortClosed(this); frames_.erase(it++); } else { ++it; @@ -436,22 +378,12 @@ // |frames_| can eventually contain a stale pointer because RenderFrameDeleted // is not triggered for |rfh|. if (rfh->IsRenderFrameLive()) { - auto* message_port_state = - MessagePortStatePerRenderDocument::GetOrCreateForCurrentDocument(rfh); - message_port_state->PortOpened(this); frames_.insert(rfh); } } void ExtensionMessagePort::UnregisterFrame(content::RenderFrameHost* rfh) { - if (frames_.erase(rfh) == 0) - return; - auto* message_port_state = - MessagePortStatePerRenderDocument::GetForCurrentDocument(rfh); - if (message_port_state) - message_port_state->PortClosed(this); - - if (!HasReceivers()) + if (frames_.erase(rfh) != 0 && !HasReceivers()) CloseChannel(); } @@ -508,6 +440,23 @@ } for (const IPCTarget& target : targets) { + // Frames in the BackForwardCache are not allowed to receive messages (or + // even have them queued). In such a case, we evict the frame from the cache + // and "drop" the message (See comment in `DidFinishNavigation()`). + // Note: Since this will cause the frame to be deleted, we do this here + // instead of in the loop above to avoid modifying `frames_` while it is + // being iterated. + if (target.render_frame_host && + target.render_frame_host->GetLifecycleState() == + content::RenderFrameHost::LifecycleState::kInBackForwardCache) { + content::BackForwardCache::DisableForRenderFrameHost( + target.render_frame_host, + back_forward_cache::DisabledReason( + back_forward_cache::DisabledReasonId:: + kExtensionSentMessageToCachedFrame)); + continue; + } + std::unique_ptr<IPC::Message> ipc_message = ipc_builder.Run(target); SendToIPCTarget(target, std::move(ipc_message)); }
diff --git a/extensions/browser/api/messaging/extension_message_port.h b/extensions/browser/api/messaging/extension_message_port.h index 60cd2ae7..60a5d17 100644 --- a/extensions/browser/api/messaging/extension_message_port.h +++ b/extensions/browser/api/messaging/extension_message_port.h
@@ -101,9 +101,6 @@ class FrameTracker; struct IPCTarget; - // Clears the `frames_` set. - void ClearFrames(); - // Registers a frame as a receiver / sender. void RegisterFrame(content::RenderFrameHost* rfh);
diff --git a/extensions/browser/api/messaging/message_service.cc b/extensions/browser/api/messaging/message_service.cc index c78fd3c0..928e654 100644 --- a/extensions/browser/api/messaging/message_service.cc +++ b/extensions/browser/api/messaging/message_service.cc
@@ -16,9 +16,12 @@ #include "base/json/json_writer.h" #include "base/lazy_instance.h" #include "base/macros.h" +#include "base/metrics/field_trial_params.h" #include "base/metrics/histogram_macros.h" #include "base/values.h" #include "build/build_config.h" +#include "components/back_forward_cache/back_forward_cache_disable.h" +#include "content/public/browser/back_forward_cache.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" @@ -29,6 +32,7 @@ #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "content/public/common/child_process_host.h" +#include "content/public/common/content_features.h" #include "extensions/browser/api/extensions_api_client.h" #include "extensions/browser/api/messaging/channel_endpoint.h" #include "extensions/browser/api/messaging/extension_message_port.h" @@ -110,6 +114,26 @@ true); } +bool IsExtensionMessageSupportedInBackForwardCache() { + if (!content::BackForwardCache::IsBackForwardCacheFeatureEnabled()) + return false; + static const bool is_extension_message_supported = + base::FeatureParam<bool>(&features::kBackForwardCache, + "extension_message_supported", false) + .Get(); + return is_extension_message_supported; +} + +// Disables the back forward for `host` if the current configuration does not +// support extension messaging APIs. +void MaybeDisableBackForwardCacheForMessaging(content::RenderFrameHost* host) { + if (!host || IsExtensionMessageSupportedInBackForwardCache()) + return; + content::BackForwardCache::DisableForRenderFrameHost( + host, back_forward_cache::DisabledReason( + back_forward_cache::DisabledReasonId::kExtensionMessaging)); +} + } // namespace struct MessageService::MessageChannel { @@ -215,6 +239,8 @@ BrowserContext* context = source.browser_context(); DCHECK(ExtensionsBrowserClient::Get()->IsSameContext(context, context_)); + MaybeDisableBackForwardCacheForMessaging(source_render_frame_host); + if (!opener_port) { DCHECK(source_endpoint.type == MessagingEndpoint::Type::kTab || source_endpoint.type == MessagingEndpoint::Type::kExtension); @@ -408,6 +434,8 @@ content::RenderFrameHost* source_rfh = source.is_for_render_frame() ? source.GetRenderFrameHost() : nullptr; + MaybeDisableBackForwardCacheForMessaging(source_rfh); + std::string error = kReceivingEndDoesntExistError; const PortId receiver_port_id = source_port_id.GetOppositePortId(); // NOTE: We're creating |receiver| with nullptr |source_rfh|, which seems to @@ -472,6 +500,8 @@ return; } + MaybeDisableBackForwardCacheForMessaging(receiver_contents->GetMainFrame()); + const PortId receiver_port_id = source_port_id.GetOppositePortId(); std::unique_ptr<MessagePort> receiver = messaging_delegate_->CreateReceiverForTab(weak_factory_.GetWeakPtr(),
diff --git a/extensions/browser/extension_function_histogram_value.h b/extensions/browser/extension_function_histogram_value.h index 84727b6..a36447bb 100644 --- a/extensions/browser/extension_function_histogram_value.h +++ b/extensions/browser/extension_function_histogram_value.h
@@ -1628,6 +1628,7 @@ OS_TELEMETRY_GETVPDINFO = 1565, ACCESSIBILITY_PRIVATE_MAGNIFIERCENTERONPOINT = 1566, STORAGE_SETACCESSLEVEL = 1567, + OS_TELEMETRY_GETOEMDATA = 1568, // Last entry: Add new entries above, then run: // python tools/metrics/histograms/update_extension_histograms.py ENUM_BOUNDARY
diff --git a/gpu/command_buffer/service/shared_image_backing_gl_image.cc b/gpu/command_buffer/service/shared_image_backing_gl_image.cc index 5f7d635..6ad03db 100644 --- a/gpu/command_buffer/service/shared_image_backing_gl_image.cc +++ b/gpu/command_buffer/service/shared_image_backing_gl_image.cc
@@ -642,9 +642,14 @@ bool SharedImageBackingGLImage:: SharedImageRepresentationGLTextureBeginAccess() { - if (!release_fence_.is_null()) - gl::GLFence::CreateFromGpuFence(gfx::GpuFence(std::move(release_fence_))) - ->ServerWait(); + if (!release_fence_.is_null()) { + auto fence = gfx::GpuFence(std::move(release_fence_)); + if (gl::GLFence::IsGpuFenceSupported()) { + gl::GLFence::CreateFromGpuFence(std::move(fence))->ServerWait(); + } else { + fence.Wait(); + } + } return BindOrCopyImageIfNeeded(); }
diff --git a/infra/config/generated/commit-queue.cfg b/infra/config/generated/commit-queue.cfg index 3bca9f1e1..aae76f5 100644 --- a/infra/config/generated/commit-queue.cfg +++ b/infra/config/generated/commit-queue.cfg
@@ -1011,7 +1011,7 @@ } builders { name: "chromium/try/lacros-arm-generic-rel" - experiment_percentage: 50 + experiment_percentage: 100 location_regexp: ".*" location_regexp_exclude: ".+/[+]/docs/.+" location_regexp_exclude: ".+/[+]/infra/config/.+"
diff --git a/infra/config/generated/cq-builders.md b/infra/config/generated/cq-builders.md index b511b17..81222190 100644 --- a/infra/config/generated/cq-builders.md +++ b/infra/config/generated/cq-builders.md
@@ -444,7 +444,7 @@ * Experiment percentage: 1.0 * [lacros-arm-generic-rel](https://ci.chromium.org/p/chromium/builders/try/lacros-arm-generic-rel) ([definition](https://cs.chromium.org/search?q=package:%5Echromium$+file:/cq.star$+-file:/beta/+-file:/stable/+lacros-arm-generic-rel)) ([matching builders](https://cs.chromium.org/search?q=+file:trybots.py+lacros-arm-generic-rel)) - * Experiment percentage: 50.0 + * Experiment percentage: 100.0 * [linux-1mbu-compile-fyi-rel](https://ci.chromium.org/p/chromium/builders/try/linux-1mbu-compile-fyi-rel) ([definition](https://cs.chromium.org/search?q=package:%5Echromium$+file:/cq.star$+-file:/beta/+-file:/stable/+linux-1mbu-compile-fyi-rel)) ([matching builders](https://cs.chromium.org/search?q=+file:trybots.py+linux-1mbu-compile-fyi-rel)) * Experiment percentage: 5.0
diff --git a/infra/config/generated/cr-buildbucket.cfg b/infra/config/generated/cr-buildbucket.cfg index d74a4f01..98ed12c 100644 --- a/infra/config/generated/cr-buildbucket.cfg +++ b/infra/config/generated/cr-buildbucket.cfg
@@ -102,6 +102,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -194,6 +200,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -286,6 +298,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -378,6 +396,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -470,6 +494,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -562,6 +592,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -654,6 +690,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -746,6 +788,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -838,6 +886,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -931,6 +985,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1029,6 +1089,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1122,6 +1188,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1215,6 +1287,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1308,6 +1386,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1401,6 +1485,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1494,6 +1584,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1587,6 +1683,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1680,6 +1782,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1773,6 +1881,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1866,6 +1980,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -1959,6 +2079,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2051,6 +2177,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2144,6 +2276,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2237,6 +2375,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2330,6 +2474,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2423,6 +2573,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2516,6 +2672,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2608,6 +2770,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2701,6 +2869,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2798,6 +2972,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2896,6 +3076,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -2989,6 +3175,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3082,6 +3274,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3175,6 +3373,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3262,6 +3466,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3355,6 +3565,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3448,6 +3664,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3541,6 +3763,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3634,6 +3862,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3727,6 +3961,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3820,6 +4060,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -3912,6 +4158,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4014,6 +4266,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4101,6 +4359,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4188,6 +4452,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4280,6 +4550,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4372,6 +4648,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4458,6 +4740,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4544,6 +4832,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4630,6 +4924,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4716,6 +5016,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4805,6 +5111,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4894,6 +5206,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -4980,6 +5298,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5066,6 +5390,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5152,6 +5482,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5238,6 +5574,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5324,6 +5666,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5416,6 +5764,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5508,6 +5862,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5600,6 +5960,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5686,6 +6052,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5772,6 +6144,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5858,6 +6236,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -5944,6 +6328,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6036,6 +6426,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6128,6 +6524,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6214,6 +6616,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6300,6 +6708,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6386,6 +6800,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6472,6 +6892,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6565,6 +6991,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6658,6 +7090,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6750,6 +7188,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6843,6 +7287,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -6936,6 +7386,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7029,6 +7485,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7122,6 +7584,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7215,6 +7683,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7308,6 +7782,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7401,6 +7881,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7494,6 +7980,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7584,6 +8076,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7674,6 +8172,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7767,6 +8271,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7860,6 +8370,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -7953,6 +8469,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8046,6 +8568,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8139,6 +8667,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8232,6 +8766,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8324,6 +8864,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8416,6 +8962,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8505,6 +9057,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8594,6 +9152,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8686,6 +9250,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8778,6 +9348,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8865,6 +9441,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -8952,6 +9534,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9045,6 +9633,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9137,6 +9731,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9229,6 +9829,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9321,6 +9927,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9413,6 +10025,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9504,6 +10122,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9596,6 +10220,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9688,6 +10318,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9780,6 +10416,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9872,6 +10514,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -9964,6 +10612,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10056,6 +10710,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10146,6 +10806,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10237,6 +10903,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10330,6 +11002,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10423,6 +11101,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10516,6 +11200,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10613,6 +11303,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10706,6 +11402,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10798,6 +11500,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10890,6 +11598,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -10983,6 +11697,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11076,6 +11796,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11168,6 +11894,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11260,6 +11992,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11355,6 +12093,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11450,6 +12194,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11543,6 +12293,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11636,6 +12392,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11729,6 +12491,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11821,6 +12589,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -11914,6 +12688,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12007,6 +12787,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12093,6 +12879,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12180,6 +12972,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12267,6 +13065,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12354,6 +13158,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12447,6 +13257,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12534,6 +13350,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12621,6 +13443,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12708,6 +13536,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12795,6 +13629,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12888,6 +13728,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -12975,6 +13821,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13062,6 +13914,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13149,6 +14007,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13236,6 +14100,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13329,6 +14199,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13422,6 +14298,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13515,6 +14397,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13608,6 +14496,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13701,6 +14595,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13787,6 +14687,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13880,6 +14786,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -13972,6 +14884,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14066,6 +14984,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14159,6 +15083,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14252,6 +15182,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14345,6 +15281,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14438,6 +15380,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14524,6 +15472,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14617,6 +15571,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14709,6 +15669,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14802,6 +15768,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14895,6 +15867,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -14987,6 +15965,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15079,6 +16063,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15169,6 +16159,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15259,6 +16255,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15349,6 +16351,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15440,6 +16448,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15529,6 +16543,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15618,6 +16638,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15706,6 +16732,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15792,6 +16824,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15879,6 +16917,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -15966,6 +17010,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16053,6 +17103,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16140,6 +17196,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16230,6 +17292,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16317,6 +17385,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16404,6 +17478,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16491,6 +17571,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16578,6 +17664,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16665,6 +17757,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16752,6 +17850,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16842,6 +17946,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -16929,6 +18039,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17015,6 +18131,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17101,6 +18223,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17187,6 +18315,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17276,6 +18410,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17365,6 +18505,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17451,6 +18597,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17537,6 +18689,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17623,6 +18781,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17709,6 +18873,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17795,6 +18965,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17881,6 +19057,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -17967,6 +19149,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18060,6 +19248,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18153,6 +19347,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18245,6 +19445,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18337,6 +19543,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18429,6 +19641,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18520,6 +19738,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18613,6 +19837,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18706,6 +19936,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18799,6 +20035,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18891,6 +20133,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -18983,6 +20231,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19078,6 +20332,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19170,6 +20430,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19264,6 +20530,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19359,6 +20631,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19453,6 +20731,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19547,6 +20831,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19642,6 +20932,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19736,6 +21032,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19827,6 +21129,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -19914,6 +21222,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20001,6 +21315,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20088,6 +21408,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20175,6 +21501,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20262,6 +21594,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20349,6 +21687,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20436,6 +21780,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20523,6 +21873,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20610,6 +21966,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20697,6 +22059,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20784,6 +22152,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20871,6 +22245,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -20958,6 +22338,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21044,6 +22430,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21131,6 +22523,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21218,6 +22616,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21305,6 +22709,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21392,6 +22802,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21479,6 +22895,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21567,6 +22989,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21655,6 +23083,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21743,6 +23177,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21831,6 +23271,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -21918,6 +23364,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22004,6 +23456,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22091,6 +23549,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22178,6 +23642,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22265,6 +23735,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22352,6 +23828,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22439,6 +23921,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22525,6 +24013,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22612,6 +24106,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22699,6 +24199,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22786,6 +24292,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22877,6 +24389,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -22968,6 +24486,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23060,6 +24584,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23152,6 +24682,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23244,6 +24780,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23336,6 +24878,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23428,6 +24976,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23521,6 +25075,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23614,6 +25174,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23707,6 +25273,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23798,6 +25370,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23889,6 +25467,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -23981,6 +25565,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24072,6 +25662,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24163,6 +25759,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24254,6 +25856,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24345,6 +25953,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24436,6 +26050,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24528,6 +26148,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24619,6 +26245,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24712,6 +26344,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24799,6 +26437,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24886,6 +26530,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -24973,6 +26623,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25060,6 +26716,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25147,6 +26809,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25234,6 +26902,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25321,6 +26995,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25408,6 +27088,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25495,6 +27181,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25582,6 +27274,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25675,6 +27373,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25762,6 +27466,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25853,6 +27563,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -25944,6 +27660,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26029,6 +27751,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26115,6 +27843,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26201,6 +27935,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26293,6 +28033,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26380,6 +28126,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26467,6 +28219,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26554,6 +28312,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26646,6 +28410,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26738,6 +28508,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26830,6 +28606,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -26923,6 +28705,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27015,6 +28803,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27107,6 +28901,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27193,6 +28993,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27286,6 +29092,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27373,6 +29185,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27466,6 +29284,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27553,6 +29377,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27645,6 +29475,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27737,6 +29573,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27830,6 +29672,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -27923,6 +29771,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28021,6 +29875,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28113,6 +29973,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28205,6 +30071,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28298,6 +30170,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28391,6 +30269,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28490,6 +30374,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28589,6 +30479,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28682,6 +30578,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28775,6 +30677,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28868,6 +30776,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -28961,6 +30875,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29054,6 +30974,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29147,6 +31073,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29240,6 +31172,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29333,6 +31271,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29422,6 +31366,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29515,6 +31465,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29607,6 +31563,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29700,6 +31662,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29793,6 +31761,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29886,6 +31860,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -29979,6 +31959,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30072,6 +32058,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30165,6 +32157,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30258,6 +32256,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30349,6 +32353,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30442,6 +32452,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30535,6 +32551,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30628,6 +32650,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30720,6 +32748,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30813,6 +32847,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -30906,6 +32946,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31090,6 +33136,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31182,6 +33234,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31274,6 +33332,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31367,6 +33431,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31460,6 +33530,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31553,6 +33629,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31645,6 +33727,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31737,6 +33825,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31829,6 +33923,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -31922,6 +34022,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32015,6 +34121,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32107,6 +34219,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32199,6 +34317,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32291,6 +34415,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32383,6 +34513,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32475,6 +34611,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32567,6 +34709,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32659,6 +34807,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32753,6 +34907,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32848,6 +35008,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -32940,6 +35106,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33032,6 +35204,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33124,6 +35302,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33216,6 +35400,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33309,6 +35499,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33402,6 +35598,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33497,6 +35699,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33589,6 +35797,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33681,6 +35895,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33773,6 +35993,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33865,6 +36091,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -33957,6 +36189,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34048,6 +36286,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34141,6 +36385,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34234,6 +36484,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34329,6 +36585,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34416,6 +36678,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34510,6 +36778,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34604,6 +36878,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34698,6 +36978,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34801,6 +37087,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34895,6 +37187,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -34989,6 +37287,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35083,6 +37387,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35177,6 +37487,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35271,6 +37587,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35365,6 +37687,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35459,6 +37787,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35553,6 +37887,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35647,6 +37987,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35741,6 +38087,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35858,6 +38210,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -35950,6 +38308,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36042,6 +38406,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36136,6 +38506,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36228,6 +38604,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36320,6 +38702,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36413,6 +38801,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36506,6 +38900,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36593,6 +38993,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36680,6 +39086,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36767,6 +39179,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36854,6 +39272,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -36946,6 +39370,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37038,6 +39468,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37130,6 +39566,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37253,6 +39695,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37361,6 +39809,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37453,6 +39907,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37546,6 +40006,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37639,6 +40105,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37731,6 +40203,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37823,6 +40301,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -37915,6 +40399,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38007,6 +40497,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38095,6 +40591,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38183,6 +40685,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38275,6 +40783,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38374,6 +40888,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38466,6 +40986,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38561,6 +41087,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38653,6 +41185,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38745,6 +41283,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38837,6 +41381,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -38936,6 +41486,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39027,6 +41583,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39118,6 +41680,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39210,6 +41778,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39309,6 +41883,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39402,6 +41982,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39494,6 +42080,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39580,6 +42172,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39672,6 +42270,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39764,6 +42368,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39856,6 +42466,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -39950,6 +42566,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40049,6 +42671,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40141,6 +42769,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40233,6 +42867,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40325,6 +42965,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40417,6 +43063,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40509,6 +43161,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40601,6 +43259,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40692,6 +43356,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40783,6 +43453,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40874,6 +43550,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -40967,6 +43649,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41058,6 +43746,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41150,6 +43844,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41242,6 +43942,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41334,6 +44040,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41426,6 +44138,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41518,6 +44236,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41611,6 +44335,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41704,6 +44434,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41796,6 +44532,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41883,6 +44625,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -41976,6 +44724,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42069,6 +44823,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42162,6 +44922,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42255,6 +45021,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42342,6 +45114,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42429,6 +45207,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42519,6 +45303,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42606,6 +45396,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42696,6 +45492,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42783,6 +45585,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42870,6 +45678,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -42957,6 +45771,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43047,6 +45867,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43137,6 +45963,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43227,6 +46059,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43317,6 +46155,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43406,6 +46250,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43495,6 +46345,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43581,6 +46437,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43673,6 +46535,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43765,6 +46633,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43863,6 +46737,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -43953,6 +46833,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44043,6 +46929,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44132,6 +47024,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44224,6 +47122,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44314,6 +47218,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44404,6 +47314,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44493,6 +47409,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44582,6 +47504,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44671,6 +47599,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44761,6 +47695,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44853,6 +47793,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -44945,6 +47891,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45037,6 +47989,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45129,6 +48087,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45221,6 +48185,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45313,6 +48283,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45405,6 +48381,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45497,6 +48479,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45589,6 +48577,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45681,6 +48675,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45773,6 +48773,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45865,6 +48871,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -45958,6 +48970,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46042,6 +49060,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46135,6 +49159,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46228,6 +49258,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46321,6 +49357,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46414,6 +49456,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46506,6 +49554,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46597,6 +49651,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46688,6 +49748,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46781,6 +49847,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46873,6 +49945,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -46965,6 +50043,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47060,6 +50144,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47155,6 +50245,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47246,6 +50342,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47337,6 +50439,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47429,6 +50537,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47521,6 +50635,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47613,6 +50733,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47705,6 +50831,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47797,6 +50929,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47889,6 +51027,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -47981,6 +51125,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48073,6 +51223,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48165,6 +51321,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48257,6 +51419,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48349,6 +51517,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48436,6 +51610,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48523,6 +51703,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48610,6 +51796,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48697,6 +51889,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48796,6 +51994,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48888,6 +52092,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -48980,6 +52190,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49072,6 +52288,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49163,6 +52385,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49254,6 +52482,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49346,6 +52580,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49437,6 +52677,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49529,6 +52775,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49621,6 +52873,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49713,6 +52971,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49805,6 +53069,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49892,6 +53162,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -49979,6 +53255,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -50066,6 +53348,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -50158,6 +53446,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -50250,6 +53544,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -50359,6 +53659,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -50452,6 +53758,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -50545,6 +53857,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -50638,6 +53956,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -50731,6 +54055,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -50824,6 +54154,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -53636,6 +56972,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "ci_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_ci_test_results" test_results { predicate { @@ -53802,6 +57144,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -53905,6 +57253,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54008,6 +57362,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54111,6 +57471,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54214,6 +57580,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54317,6 +57689,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54420,6 +57798,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54523,6 +57907,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54640,6 +58030,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54743,6 +58139,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54846,6 +58248,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -54949,6 +58357,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55052,6 +58466,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55155,6 +58575,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55258,6 +58684,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55369,6 +58801,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55473,6 +58911,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55576,6 +59020,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55680,6 +59130,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55783,6 +59239,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55886,6 +59348,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -55989,6 +59457,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -56092,6 +59566,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -56199,6 +59679,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -56306,6 +59792,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -56409,6 +59901,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -56513,6 +60011,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -56616,6 +60120,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -56720,6 +60230,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -56823,6 +60339,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -56926,6 +60448,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57029,6 +60557,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57132,6 +60666,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57235,6 +60775,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57338,6 +60884,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57441,6 +60993,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57544,6 +61102,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57647,6 +61211,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57750,6 +61320,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57853,6 +61429,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -57956,6 +61538,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58059,6 +61647,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58162,6 +61756,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58265,6 +61865,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58369,6 +61975,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58472,6 +62084,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58575,6 +62193,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58679,6 +62303,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58782,6 +62412,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58885,6 +62521,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -58988,6 +62630,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -59090,6 +62738,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -59193,6 +62847,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -59296,6 +62956,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -59399,6 +63065,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -59502,6 +63174,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -59602,6 +63280,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -59731,6 +63415,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -59842,6 +63532,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -59944,6 +63640,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60047,6 +63749,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60149,6 +63857,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60252,6 +63966,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60355,6 +64075,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60458,6 +64184,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60560,6 +64292,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60663,6 +64401,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60765,6 +64509,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60868,6 +64618,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -60970,6 +64726,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61073,6 +64835,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61176,6 +64944,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61278,6 +65052,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61379,6 +65159,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61479,6 +65265,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61579,6 +65371,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61680,6 +65478,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61781,6 +65585,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61882,6 +65692,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -61983,6 +65799,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -62086,6 +65908,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -62189,6 +66017,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -62292,6 +66126,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -62395,6 +66235,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -62498,6 +66344,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -62601,6 +66453,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -62704,6 +66562,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -62807,6 +66671,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -62910,6 +66780,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63013,6 +66889,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63116,6 +66998,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63218,6 +67106,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63320,6 +67214,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63422,6 +67322,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63524,6 +67430,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63623,6 +67535,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63722,6 +67640,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63821,6 +67745,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -63920,6 +67850,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64019,6 +67955,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64118,6 +68060,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64217,6 +68165,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64316,6 +68270,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64415,6 +68375,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64514,6 +68480,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64613,6 +68585,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64712,6 +68690,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64811,6 +68795,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -64910,6 +68900,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65009,6 +69005,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65108,6 +69110,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65207,6 +69215,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65306,6 +69320,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65405,6 +69425,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65504,6 +69530,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65603,6 +69635,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65702,6 +69740,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65801,6 +69845,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65900,6 +69950,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -65999,6 +70055,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66098,6 +70160,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66195,6 +70263,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66292,6 +70366,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66389,6 +70469,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66486,6 +70572,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66583,6 +70675,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66680,6 +70778,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66777,6 +70881,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66874,6 +70984,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -66971,6 +71087,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67068,6 +71190,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67165,6 +71293,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67262,6 +71396,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67359,6 +71499,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67458,6 +71604,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67557,6 +71709,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67656,6 +71814,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67755,6 +71919,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67854,6 +72024,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -67953,6 +72129,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68052,6 +72234,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68151,6 +72339,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68250,6 +72444,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68349,6 +72549,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68448,6 +72654,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68547,6 +72759,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68646,6 +72864,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68745,6 +72969,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68844,6 +73074,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -68943,6 +73179,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69040,6 +73282,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69137,6 +73385,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69236,6 +73490,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69338,6 +73598,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69443,6 +73709,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69556,6 +73828,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69661,6 +73939,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69774,6 +74058,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69879,6 +74169,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -69984,6 +74280,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -70089,6 +74391,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -70201,6 +74509,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -70306,6 +74620,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -70411,6 +74731,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -70516,6 +74842,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -70621,6 +74953,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -70723,6 +75061,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -70825,6 +75169,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -70928,6 +75278,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71031,6 +75387,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71137,6 +75499,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71240,6 +75608,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71343,6 +75717,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71446,6 +75826,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71549,6 +75935,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71652,6 +76044,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71755,6 +76153,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71859,6 +76263,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -71962,6 +76372,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72065,6 +76481,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72168,6 +76590,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72271,6 +76699,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72374,6 +76808,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72477,6 +76917,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72576,6 +77022,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72679,6 +77131,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72781,6 +77239,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72884,6 +77348,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -72987,6 +77457,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -73094,6 +77570,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -73204,6 +77686,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -73308,6 +77796,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -73412,6 +77906,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -73513,6 +78013,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -73616,6 +78122,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -73719,6 +78231,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -73822,6 +78340,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -73919,6 +78443,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74022,6 +78552,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74125,6 +78661,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74229,6 +78771,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74332,6 +78880,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74435,6 +78989,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74537,6 +79097,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74640,6 +79206,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74743,6 +79315,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74846,6 +79424,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -74948,6 +79532,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75051,6 +79641,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75161,6 +79757,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75270,6 +79872,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75376,6 +79984,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75482,6 +80096,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75588,6 +80208,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75688,6 +80314,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75788,6 +80420,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75888,6 +80526,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -75988,6 +80632,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -76092,6 +80742,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -76195,6 +80851,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -76298,6 +80960,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -76401,6 +81069,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -76504,6 +81178,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -76607,6 +81287,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -76711,6 +81397,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -76814,6 +81506,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -76917,6 +81615,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77020,6 +81724,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77123,6 +81833,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77227,6 +81943,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77330,6 +82052,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77434,6 +82162,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77538,6 +82272,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77641,6 +82381,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77744,6 +82490,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77847,6 +82599,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -77954,6 +82712,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78057,6 +82821,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78164,6 +82934,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78268,6 +83044,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78371,6 +83153,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78474,6 +83262,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78577,6 +83371,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78680,6 +83480,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78783,6 +83589,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78886,6 +83698,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -78988,6 +83806,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79085,6 +83909,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79188,6 +84018,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79289,6 +84125,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79390,6 +84232,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79492,6 +84340,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79592,6 +84446,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79693,6 +84553,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79793,6 +84659,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79894,6 +84766,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -79999,6 +84877,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -80104,6 +84988,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -80201,6 +85091,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -80301,6 +85197,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -80401,6 +85303,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -80502,6 +85410,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -80603,6 +85517,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -80704,6 +85624,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -80805,6 +85731,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -80906,6 +85838,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81007,6 +85945,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81108,6 +86052,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81209,6 +86159,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81310,6 +86266,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81411,6 +86373,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81512,6 +86480,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81613,6 +86587,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81715,6 +86695,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81817,6 +86803,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -81918,6 +86910,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82019,6 +87017,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82119,6 +87123,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82215,6 +87225,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82311,6 +87327,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82414,6 +87436,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82517,6 +87545,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82620,6 +87654,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82723,6 +87763,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82826,6 +87872,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -82929,6 +87981,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83032,6 +88090,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83135,6 +88199,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83238,6 +88308,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83341,6 +88417,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83445,6 +88527,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83552,6 +88640,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83653,6 +88747,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83755,6 +88855,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83858,6 +88964,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -83958,6 +89070,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84058,6 +89176,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84158,6 +89282,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84258,6 +89388,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84358,6 +89494,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84458,6 +89600,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84558,6 +89706,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84661,6 +89815,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84764,6 +89924,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84867,6 +90033,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -84975,6 +90147,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -85078,6 +90256,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -85181,6 +90365,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -85284,6 +90474,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -85393,6 +90589,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -85496,6 +90698,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -85607,6 +90815,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -85709,6 +90923,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -85815,6 +91035,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -85918,6 +91144,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86021,6 +91253,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86125,6 +91363,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86228,6 +91472,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86332,6 +91582,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86435,6 +91691,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86538,6 +91800,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86641,6 +91909,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86744,6 +92018,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86847,6 +92127,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -86943,6 +92229,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate { @@ -87046,6 +92338,12 @@ bq_exports { project: "chrome-luci-data" dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" table: "gpu_try_test_results" test_results { predicate {
diff --git a/infra/config/lib/ci.star b/infra/config/lib/ci.star index 2fd4af9..ffc50ccd 100644 --- a/infra/config/lib/ci.star +++ b/infra/config/lib/ci.star
@@ -63,7 +63,7 @@ specifying additional parameters for exporting test results to BigQuery. Will always upload to the following tables in addition to any tables specified by the list's elements: - luci-resultdb.chromium.ci_test_results + chrome-luci-data.chromium.ci_test_results chrome-luci-data.chromium.gpu_ci_test_results experiments - a dict of experiment name to the percentage chance (0-100) that it will apply to builds generated from this builder. @@ -78,10 +78,15 @@ notifies = (notifies or []) + ["chromium-tree-closer", "chromium-tree-closer-email"] merged_resultdb_bigquery_exports = [ + # TODO(crbug.com/1230801): Remove when all usages of this table have + # been migrated to `chrome-luci-data.chromium.ci_test_results`. resultdb.export_test_results( bq_table = "luci-resultdb.chromium.ci_test_results", ), resultdb.export_test_results( + bq_table = "chrome-luci-data.chromium.ci_test_results", + ), + resultdb.export_test_results( bq_table = "chrome-luci-data.chromium.gpu_ci_test_results", predicate = resultdb.test_result_predicate( # Only match the telemetry_gpu_integration_test and
diff --git a/infra/config/lib/try.star b/infra/config/lib/try.star index 95b60bf9..d92c6b2 100644 --- a/infra/config/lib/try.star +++ b/infra/config/lib/try.star
@@ -106,7 +106,7 @@ specifying additional parameters for exporting test results to BigQuery. Will always upload to the following tables in addition to any tables specified by the list's elements: - luci-resultdb.chromium.try_test_results + chrome-luci-data.chromium.try_test_results chrome-luci-data.gpu_try_test_results """ if not branches.matches(branch_selector): @@ -118,10 +118,15 @@ experiments.setdefault("chromium.resultdb.result_sink.junit_tests", 100) merged_resultdb_bigquery_exports = [ + # TODO(crbug.com/1230801): Remove when all usages of this table have + # been migrated to `chrome-luci-data.chromium.try_test_results`. resultdb.export_test_results( bq_table = "luci-resultdb.chromium.try_test_results", ), resultdb.export_test_results( + bq_table = "chrome-luci-data.chromium.try_test_results", + ), + resultdb.export_test_results( bq_table = "chrome-luci-data.chromium.gpu_try_test_results", predicate = resultdb.test_result_predicate( # Only match the telemetry_gpu_integration_test and
diff --git a/infra/config/subprojects/chromium/try.star b/infra/config/subprojects/chromium/try.star index 594c58a7..734cecd 100644 --- a/infra/config/subprojects/chromium/try.star +++ b/infra/config/subprojects/chromium/try.star
@@ -814,7 +814,7 @@ builderless = not settings.is_main, main_list_view = "try", tryjob = try_.job( - experiment_percentage = 50, + experiment_percentage = 100, ), os = os.LINUX_BIONIC_REMOVE, )
diff --git a/ios/chrome/browser/ui/first_run/first_run_screen_view_controller.mm b/ios/chrome/browser/ui/first_run/first_run_screen_view_controller.mm index 0c7c55c6..2bb838e3 100644 --- a/ios/chrome/browser/ui/first_run/first_run_screen_view_controller.mm +++ b/ios/chrome/browser/ui/first_run/first_run_screen_view_controller.mm
@@ -41,6 +41,7 @@ constexpr CGFloat kContentMaxWidth = 327; constexpr CGFloat kMoreArrowMargin = 4; constexpr CGFloat kPreviousContentVisibleOnScroll = 0.15; +constexpr CGFloat kSeparatorHeight = 1; } // namespace @@ -56,12 +57,14 @@ @property(nonatomic, strong) UIButton* secondaryActionButton; @property(nonatomic, strong) UIButton* tertiaryActionButton; +@property(nonatomic, strong) UIView* separator; + @property(nonatomic, assign) BOOL didReachBottom; -// YES if the primary button content can be updated (e.g., change the text -// label string) which corresponds to the moment where the layout reflects the -// latest updates. -@property(nonatomic, assign) BOOL canUpdatePrimaryButton; +// YES if the views can be updated on scroll updates (e.g., change the text +// label string of the primary button) which corresponds to the moment where the +// layout reflects the latest updates. +@property(nonatomic, assign) BOOL canUpdateViewsOnScroll; @end @@ -79,6 +82,12 @@ // the view height. UILayoutGuide* subtitleMarginLayoutGuide = [[UILayoutGuide alloc] init]; + self.separator = [[UIView alloc] init]; + self.separator.translatesAutoresizingMaskIntoConstraints = NO; + self.separator.backgroundColor = [UIColor colorNamed:kSeparatorColor]; + self.separator.hidden = YES; + [self.view addSubview:self.separator]; + self.scrollContentView = [[UIView alloc] init]; self.scrollContentView.translatesAutoresizingMaskIntoConstraints = NO; [self.scrollContentView addSubview:self.imageView]; @@ -147,6 +156,15 @@ constraintEqualToAnchor:actionStackView.topAnchor constant:actionStackViewTopMargin], + // Separator constraints. + [self.separator.heightAnchor constraintEqualToConstant:kSeparatorHeight], + [self.separator.leadingAnchor + constraintEqualToAnchor:self.view.leadingAnchor], + [self.separator.trailingAnchor + constraintEqualToAnchor:self.view.trailingAnchor], + [self.separator.topAnchor + constraintEqualToAnchor:self.scrollView.bottomAnchor], + // Scroll content view constraints. Constrain its height to at least the // scroll view height, so that derived VCs can pin UI elements just above // the buttons. @@ -236,7 +254,7 @@ } - (void)viewWillDisappear:(BOOL)animated { - self.canUpdatePrimaryButton = NO; + self.canUpdateViewsOnScroll = NO; } - (void)viewWillAppear:(BOOL)animated { @@ -262,19 +280,19 @@ // done. dispatch_async(dispatch_get_main_queue(), ^{ self.scrollView.delegate = self; - self.canUpdatePrimaryButton = YES; + self.canUpdateViewsOnScroll = YES; // At this point, the scroll view has computed its content height. If // scrolling to the end is needed, and the entire content is already // fully visible (scrolled), set |didReachBottom| to YES. Otherwise, replace // the primary button's label with the read more label to indicate that more // scrolling is required. - if (!self.didReachBottom) { - if ([self isScrolledToBottom]) { - self.didReachBottom = YES; - } else { - [self setReadMoreText]; - } + BOOL isScrolledToBottom = [self isScrolledToBottom]; + self.separator.hidden = isScrolledToBottom; + if (isScrolledToBottom) { + self.didReachBottom = YES; + } else if (!self.didReachBottom) { + [self setReadMoreText]; } }); } @@ -288,7 +306,7 @@ // right measurements to evaluate the scroll position. void (^transition)(id<UIViewControllerTransitionCoordinatorContext>) = ^(id<UIViewControllerTransitionCoordinatorContext> context) { - [self updatePrimaryButtonIfReachedBottom]; + [self updateViewsOnScrollViewUpdate]; }; [coordinator animateAlongsideTransition:transition completion:nil]; } @@ -305,7 +323,7 @@ // Update the primary button once the layout changes take effect to have the // right measurements to evaluate the scroll position. dispatch_async(dispatch_get_main_queue(), ^{ - [self updatePrimaryButtonIfReachedBottom]; + [self updateViewsOnScrollViewUpdate]; }); } @@ -488,7 +506,7 @@ return; } - if (!self.canUpdatePrimaryButton) { + if (!self.canUpdateViewsOnScroll) { return; } @@ -601,16 +619,18 @@ // If scrolling to the end of the content is mandatory, this method updates the // primary button's label based on whether the scroll view is currently scrolled // to the end. If the scroll view has scrolled to the end, also sets -// |didReachBottom|. If scrolling to the end of the content isn't mandatory, or -// if the scroll view had already been scrolled to the end previously, this -// method has no effect. -- (void)updatePrimaryButtonIfReachedBottom { - if (!self.canUpdatePrimaryButton) { +// |didReachBottom|. +// It also updates the separator visibility based on scroll position. +- (void)updateViewsOnScrollViewUpdate { + if (!self.canUpdateViewsOnScroll) { return; } - if (self.scrollToEndMandatory && !self.didReachBottom && - [self isScrolledToBottom]) { + BOOL isScrolledToBottom = [self isScrolledToBottom]; + + self.separator.hidden = isScrolledToBottom; + + if (self.scrollToEndMandatory && !self.didReachBottom && isScrolledToBottom) { self.didReachBottom = YES; [self.primaryActionButton setAttributedTitle:nil forState:UIControlStateNormal]; @@ -664,7 +684,7 @@ #pragma mark - UIScrollViewDelegate - (void)scrollViewDidScroll:(UIScrollView*)scrollView { - [self updatePrimaryButtonIfReachedBottom]; + [self updateViewsOnScrollViewUpdate]; } @end
diff --git a/ios/chrome/browser/ui/first_run/sync/sync_screen_coordinator.mm b/ios/chrome/browser/ui/first_run/sync/sync_screen_coordinator.mm index ee5836a..3896bd30 100644 --- a/ios/chrome/browser/ui/first_run/sync/sync_screen_coordinator.mm +++ b/ios/chrome/browser/ui/first_run/sync/sync_screen_coordinator.mm
@@ -12,6 +12,7 @@ #import "ios/chrome/browser/policy/policy_watcher_browser_agent_observer_bridge.h" #import "ios/chrome/browser/signin/authentication_service.h" #import "ios/chrome/browser/signin/authentication_service_factory.h" +#import "ios/chrome/browser/signin/chrome_account_manager_service_factory.h" #import "ios/chrome/browser/signin/identity_manager_factory.h" #import "ios/chrome/browser/sync/consent_auditor_factory.h" #include "ios/chrome/browser/sync/sync_service_factory.h" @@ -113,6 +114,8 @@ initWithAuthenticationService:authenticationService identityManager:IdentityManagerFactory::GetForBrowserState( browserState) + accountManagerService:ChromeAccountManagerServiceFactory:: + GetForBrowserState(browserState) consentAuditor:ConsentAuditorFactory::GetForBrowserState( browserState) syncSetupService:syncSetupService @@ -138,6 +141,7 @@ self.delegate = nil; self.viewController = nil; + [self.mediator disconnect]; self.mediator = nil; [self.policySignoutPromptCoordinator stop]; self.policySignoutPromptCoordinator = nil; @@ -181,6 +185,10 @@ } } +- (void)userRemoved { + [self.delegate willFinishPresenting]; +} + #pragma mark - PolicyWatcherBrowserAgentObserving - (void)policyWatcherBrowserAgentNotifySignInDisabled:
diff --git a/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator.h b/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator.h index 4ae786a..030a2cf 100644 --- a/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator.h +++ b/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator.h
@@ -9,6 +9,7 @@ @class AuthenticationFlow; class AuthenticationService; +class ChromeAccountManagerService; @protocol SyncScreenConsumer; @protocol SyncScreenMediatorDelegate; class SyncSetupService; @@ -38,6 +39,8 @@ - (instancetype) initWithAuthenticationService:(AuthenticationService*)authenticationService identityManager:(signin::IdentityManager*)identityManager + accountManagerService: + (ChromeAccountManagerService*)accountManagerService consentAuditor: (consent_auditor::ConsentAuditor*)consentAuditor syncSetupService:(SyncSetupService*)syncSetupService @@ -45,6 +48,9 @@ (unified_consent::UnifiedConsentService*)unifiedConsentService NS_DESIGNATED_INITIALIZER; +// Disconnect the mediator. +- (void)disconnect; + // Delegate. @property(nonatomic, weak) id<SyncScreenMediatorDelegate> delegate;
diff --git a/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator.mm b/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator.mm index c7b1546..047e78b 100644 --- a/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator.mm +++ b/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator.mm
@@ -8,6 +8,7 @@ #import "components/consent_auditor/consent_auditor.h" #import "components/unified_consent/unified_consent_service.h" #import "ios/chrome/browser/signin/authentication_service.h" +#include "ios/chrome/browser/signin/chrome_account_manager_service_observer_bridge.h" #import "ios/chrome/browser/signin/identity_manager_factory.h" #import "ios/chrome/browser/sync/sync_setup_service.h" #import "ios/chrome/browser/ui/authentication/authentication_flow.h" @@ -20,7 +21,10 @@ #error "This file requires ARC support." #endif -@interface SyncScreenMediator () +@interface SyncScreenMediator () <ChromeAccountManagerServiceObserver> { + std::unique_ptr<ChromeAccountManagerServiceObserverBridge> + _accountManagerServiceObserver; +} // Manager for user's Google identities. @property(nonatomic, assign) signin::IdentityManager* identityManager; @@ -43,6 +47,8 @@ - (instancetype) initWithAuthenticationService:(AuthenticationService*)authenticationService identityManager:(signin::IdentityManager*)identityManager + accountManagerService: + (ChromeAccountManagerService*)accountManagerService consentAuditor: (consent_auditor::ConsentAuditor*)consentAuditor syncSetupService:(SyncSetupService*)syncSetupService @@ -57,10 +63,17 @@ _authenticationService = authenticationService; _syncSetupService = syncSetupService; _unifiedConsentService = unifiedConsentService; + _accountManagerServiceObserver.reset( + new ChromeAccountManagerServiceObserverBridge(self, + accountManagerService)); } return self; } +- (void)disconnect { + _accountManagerServiceObserver = nullptr; +} + - (void)startSyncWithConfirmationID:(const int)confirmationID consentIDs:(NSArray<NSNumber*>*)consentIDs authenticationFlow:(AuthenticationFlow*)authenticationFlow @@ -82,6 +95,16 @@ }]; } +#pragma mark - ChromeAccountManagerServiceObserver + +- (void)identityListChanged { + ChromeIdentity* identity = self.authenticationService->GetPrimaryIdentity( + signin::ConsentLevel::kSignin); + if (!identity) { + [self.delegate userRemoved]; + } +} + #pragma mark - Private // Callback used when the sign in flow is complete, with |success|.
diff --git a/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator_delegate.h b/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator_delegate.h index 0ce47de..dfc5516 100644 --- a/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator_delegate.h +++ b/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator_delegate.h
@@ -16,6 +16,9 @@ - (void)syncScreenMediator:(SyncScreenMediator*)mediator didFinishSigninWithResult:(SigninCoordinatorResult)result; +// Notifies the delegate that the user has been removed. +- (void)userRemoved; + @end #endif // IOS_CHROME_BROWSER_UI_FIRST_RUN_SYNC_SYNC_SCREEN_MEDIATOR_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator_unittest.mm b/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator_unittest.mm index 2d0a9fc..1a7275c 100644 --- a/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator_unittest.mm +++ b/ios/chrome/browser/ui/first_run/sync/sync_screen_mediator_unittest.mm
@@ -12,6 +12,7 @@ #import "ios/chrome/browser/main/test_browser.h" #import "ios/chrome/browser/signin/authentication_service_factory.h" #import "ios/chrome/browser/signin/authentication_service_fake.h" +#import "ios/chrome/browser/signin/chrome_account_manager_service_factory.h" #import "ios/chrome/browser/signin/identity_manager_factory.h" #import "ios/chrome/browser/sync/consent_auditor_factory.h" #import "ios/chrome/browser/sync/sync_service_factory.h" @@ -91,9 +92,14 @@ SyncSetupService* sync_setup_service = SyncSetupServiceFactory::GetForBrowserState(browser_state_.get()); + ChromeAccountManagerService* account_manager_service = + ChromeAccountManagerServiceFactory::GetForBrowserState( + browser_state_.get()); + mediator_ = [[SyncScreenMediator alloc] initWithAuthenticationService:authentication_service identityManager:identity_manager + accountManagerService:account_manager_service consentAuditor:consent_auditor syncSetupService:sync_setup_service unifiedConsentService:UnifiedConsentServiceFactory:: @@ -106,7 +112,10 @@ static_cast<SyncSetupServiceMock*>(sync_setup_service); } - void TearDown() override { PlatformTest::TearDown(); } + void TearDown() override { + PlatformTest::TearDown(); + [mediator_ disconnect]; + } web::WebTaskEnvironment task_environment_; SyncScreenMediator* mediator_;
diff --git a/ios/chrome/browser/ui/infobars/translate_infobar_egtest.mm b/ios/chrome/browser/ui/infobars/translate_infobar_egtest.mm index 01e716e9..d750704 100644 --- a/ios/chrome/browser/ui/infobars/translate_infobar_egtest.mm +++ b/ios/chrome/browser/ui/infobars/translate_infobar_egtest.mm
@@ -266,6 +266,12 @@ // Tests that different language signals are detected correctly. - (void)testLanguageDetection { +// TODO(crbug.com/1235979): test failing on ipad device +#if !TARGET_IPHONE_SIMULATOR + if ([ChromeEarlGrey isIPadIdiom]) { + EARL_GREY_TEST_SKIPPED(@"This test doesn't pass on iPad device."); + } +#endif const GURL URL = web::test::HttpServer::MakeUrl("http://scenarioLanguageDetection"); std::map<GURL, std::string> responses;
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1 index 698d6b3..526f256 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -29b0a86a5ac02dbed78e9147969a81af2161710e \ No newline at end of file +aff96c241c9b8949efba15c0e96edee7903ed9cc \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1 index fdcc15e..0ff1a61 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -4de3fe78df5e02ff6e0a359dc5c1646b0f63ea22 \ No newline at end of file +2bfc1c31bd00324d34f6b340b97e664176f3f38f \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.arm64.zip.sha1 index b2aa24bb..2e6700e 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -5dbed6584b490871529e1a854dd76a456312da25 \ No newline at end of file +c61563b9c9872d27edb4f0d0649a4f0c94955001 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1 index a896c59c..63c25c3 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -00e247c9b396117ee720f5b5cbe5fbfcc1816e2d \ No newline at end of file +ec5093dfa23951d590e2d5487cace1617b6d4b37 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1 index 521bea8..bdfc3a59 100644 --- a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -a1095d8119d81e6f226dc31cd8caef6d045ec67e \ No newline at end of file +9af67f6a0ba0e726ed0a770eaffb6c7724bf664a \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1 index 959a3da..655c3e4 100644 --- a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -ada79233739ef0e626be40ca1cc8fcd8a749b5fb \ No newline at end of file +7f52e5153445129edb28ee665edbd07f7cfe6a0f \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1 index da6b5e15..da6b490 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -4e90ce0fb02b7dd4ea1583c6a20fbb0bce552444 \ No newline at end of file +01d7158fe727884588aee54e2056d48bcd0efb51 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1 index 1e181d8c..ad264a1 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -ba540df4ea6e27e1e52de24dbfe3ab561fc47dad \ No newline at end of file +d0e03fc78520fe265a00ee698f2af53cd46ba743 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1 index cad0b793..482fbcb 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -ee8fcb0338fc52f9b06a74867cd3d06d7be30190 \ No newline at end of file +d233ccb974074c1e3a46d557bb8d2e438d58e68a \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1 index 5ee761e4..ab20a75 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -d8d5b008e7c3ef6d7e8ab1bf5472e69eb7ae6378 \ No newline at end of file +d423943dba30d54d67a3766d61e858837dcb5030 \ No newline at end of file
diff --git a/media/base/video_bitrate_allocation.cc b/media/base/video_bitrate_allocation.cc index d9a286d..1d65077 100644 --- a/media/base/video_bitrate_allocation.cc +++ b/media/base/video_bitrate_allocation.cc
@@ -7,6 +7,7 @@ #include <cstring> #include <limits> #include <numeric> +#include <sstream> #include "base/check_op.h" #include "base/numerics/checked_math.h" @@ -48,6 +49,47 @@ return sum_; } +std::string VideoBitrateAllocation::ToString() const { + size_t num_active_spatial_layers = 0; + size_t num_temporal_layers[kMaxSpatialLayers] = {}; + for (size_t sid = 0; sid < kMaxSpatialLayers; ++sid) { + for (size_t tid = 0; tid < kMaxTemporalLayers; ++tid) { + if (bitrates_[sid][tid] > 0) + num_temporal_layers[sid] = tid + 1; + } + if (num_temporal_layers[sid] > 0) + num_active_spatial_layers += 1; + } + + if (num_active_spatial_layers == 0) { + // VideoBitrateAllocation containing no positive value is used to pause an + // encoder in webrtc. + return "Empty VideoBitrateAllocation"; + } + + std::stringstream ss; + ss << "active spatial layers: " << num_active_spatial_layers; + ss << ", {"; + + bool first_sid = true; + for (size_t sid = 0; sid < kMaxSpatialLayers; ++sid) { + if (num_temporal_layers[sid] == 0) + continue; + if (!first_sid) + ss << ", "; + first_sid = false; + ss << "SL#" << sid << ": {"; + for (size_t tid = 0; tid < num_temporal_layers[sid]; ++tid) { + if (tid) + ss << ", "; + ss << bitrates_[sid][tid]; + } + ss << "}"; + } + ss << "}"; + return ss.str(); +} + bool VideoBitrateAllocation::operator==( const VideoBitrateAllocation& other) const { if (sum_ != other.sum_) {
diff --git a/media/base/video_bitrate_allocation.h b/media/base/video_bitrate_allocation.h index f56c0b0..d7bbdf4 100644 --- a/media/base/video_bitrate_allocation.h +++ b/media/base/video_bitrate_allocation.h
@@ -7,6 +7,7 @@ #include <stddef.h> #include <stdint.h> +#include <string> #include "base/macros.h" #include "media/base/media_export.h" @@ -33,6 +34,8 @@ // Sum of all bitrates. int32_t GetSumBps() const; + std::string ToString() const; + bool operator==(const VideoBitrateAllocation& other) const; inline bool operator!=(const VideoBitrateAllocation& other) const { return !(*this == other);
diff --git a/media/base/video_bitrate_allocation_unittest.cc b/media/base/video_bitrate_allocation_unittest.cc index 32dffd3..de45750 100644 --- a/media/base/video_bitrate_allocation_unittest.cc +++ b/media/base/video_bitrate_allocation_unittest.cc
@@ -79,4 +79,38 @@ EXPECT_NE(copy, allocation); } +TEST(VideoBitrateAllocationTest, ToString) { + VideoBitrateAllocation allocation; + EXPECT_TRUE(allocation.SetBitrate(0, 0, 123)); + EXPECT_TRUE(allocation.SetBitrate(0, 1, 456)); + EXPECT_TRUE(allocation.SetBitrate(0, 2, 789)); + EXPECT_EQ(allocation.ToString(), + "active spatial layers: 1, {SL#0: {123, 456, 789}}"); + + // Add spatial layer. + EXPECT_TRUE(allocation.SetBitrate(1, 0, 789)); + EXPECT_TRUE(allocation.SetBitrate(1, 1, 456)); + EXPECT_EQ( + allocation.ToString(), + "active spatial layers: 2, {SL#0: {123, 456, 789}, SL#1: {789, 456}}"); + + // Reset the bottom spatial layer. + EXPECT_TRUE(allocation.SetBitrate(0, 0, 0)); + EXPECT_TRUE(allocation.SetBitrate(0, 1, 0)); + EXPECT_TRUE(allocation.SetBitrate(0, 2, 0)); + EXPECT_EQ(allocation.ToString(), + "active spatial layers: 1, {SL#1: {789, 456}}"); + + // Add one more spatial layer. + EXPECT_TRUE(allocation.SetBitrate(2, 0, 123)); + EXPECT_EQ(allocation.ToString(), + "active spatial layers: 2, {SL#1: {789, 456}, SL#2: {123}}"); + + // Reset all the spatial layers. + EXPECT_TRUE(allocation.SetBitrate(1, 0, 0)); + EXPECT_TRUE(allocation.SetBitrate(1, 1, 0)); + EXPECT_TRUE(allocation.SetBitrate(2, 0, 0)); + EXPECT_EQ(allocation.ToString(), "Empty VideoBitrateAllocation"); +} + } // namespace media
diff --git a/media/capture/BUILD.gn b/media/capture/BUILD.gn index 039cc26..5207dde6 100644 --- a/media/capture/BUILD.gn +++ b/media/capture/BUILD.gn
@@ -326,6 +326,7 @@ deps += [ "//ash/constants", "//build/config/linux/libdrm", + "//chromeos/components/camera_app_ui:document_scanning", "//chromeos/components/sensors:sensors", "//chromeos/dbus/power", "//components/chromeos_camera:mojo_mjpeg_decode_accelerator",
diff --git a/media/capture/video/chromeos/DEPS b/media/capture/video/chromeos/DEPS index 170ac6c6..4c07d00c 100644 --- a/media/capture/video/chromeos/DEPS +++ b/media/capture/video/chromeos/DEPS
@@ -1,5 +1,6 @@ include_rules = [ "+ash/constants/ash_features.h", + "+chromeos/components/camera_app_ui/document_scanner_service_client.h", "+chromeos/components/sensors", "+chromeos/dbus", "+components/chromeos_camera",
diff --git a/media/capture/video/chromeos/camera_app_device_bridge_impl.cc b/media/capture/video/chromeos/camera_app_device_bridge_impl.cc index 322a0601..cacc47a 100644 --- a/media/capture/video/chromeos/camera_app_device_bridge_impl.cc +++ b/media/capture/video/chromeos/camera_app_device_bridge_impl.cc
@@ -96,7 +96,8 @@ base::OnceClosure callback) { auto device = GetWeakCameraAppDevice(device_id); if (device) { - device->InvalidatePtrs(std::move(callback), should_disable_new_ptrs); + device->ResetOnDeviceIpcThread(std::move(callback), + should_disable_new_ptrs); } else { std::move(callback).Run(); }
diff --git a/media/capture/video/chromeos/camera_app_device_impl.cc b/media/capture/video/chromeos/camera_app_device_impl.cc index 81029bc..5d9f8c5 100644 --- a/media/capture/video/chromeos/camera_app_device_impl.cc +++ b/media/capture/video/chromeos/camera_app_device_impl.cc
@@ -4,15 +4,21 @@ #include "media/capture/video/chromeos/camera_app_device_impl.h" +#include "base/bind_post_task.h" +#include "gpu/ipc/common/gpu_memory_buffer_impl.h" #include "media/base/bind_to_current_loop.h" #include "media/capture/video/chromeos/camera_app_device_bridge_impl.h" #include "media/capture/video/chromeos/camera_device_context.h" #include "media/capture/video/chromeos/camera_metadata_utils.h" +#include "third_party/libyuv/include/libyuv.h" namespace media { namespace { +constexpr int kDetectionWidth = 256; +constexpr int kDetectionHeight = 256; + void OnStillCaptureDone(media::mojom::ImageCapture::TakePhotoCallback callback, int status, mojom::BlobPtr blob) { @@ -78,6 +84,10 @@ // All the weak pointers of |weak_ptr_factory_| should be invalidated on // camera device IPC thread before destroying CameraAppDeviceImpl. DCHECK(!weak_ptr_factory_.HasWeakPtrs()); + + // Document scanner service must be reset on the device IPC thread, where its + // mojo channels are bound. + DCHECK(!document_scanner_service_); } void CameraAppDeviceImpl::BindReceiver( @@ -93,12 +103,13 @@ return allow_new_ipc_weak_ptrs_ ? weak_ptr_factory_.GetWeakPtr() : nullptr; } -void CameraAppDeviceImpl::InvalidatePtrs(base::OnceClosure callback, - bool should_disable_new_ptrs) { +void CameraAppDeviceImpl::ResetOnDeviceIpcThread(base::OnceClosure callback, + bool should_disable_new_ptrs) { if (should_disable_new_ptrs) { allow_new_ipc_weak_ptrs_ = false; } weak_ptr_factory_.InvalidateWeakPtrs(); + document_scanner_service_.reset(); std::move(callback).Run(); } @@ -165,6 +176,72 @@ camera_device_context_ = camera_device_context; } +bool CameraAppDeviceImpl::ShouldDetectDocumentCorners() { + { + base::AutoLock lock(capture_intent_lock_); + if (capture_intent_ != cros::mojom::CaptureIntent::DOCUMENT) { + return false; + } + } + + if (!chromeos::DocumentScannerServiceClient::IsSupported()) { + return false; + } + + if (!document_scanner_service_) { + document_scanner_service_ = + chromeos::DocumentScannerServiceClient::Create(); + DCHECK(document_scanner_service_); + } + + base::AutoLock lock(document_corners_observer_lock_); + return !document_corners_observers_.empty() && + !has_ongoing_document_detection_task_ && + document_scanner_service_->IsLoaded(); +} + +void CameraAppDeviceImpl::DetectDocumentCorners( + std::unique_ptr<gpu::GpuMemoryBufferImpl> gmb) { + DCHECK(gmb); + if (!gmb->Map()) { + LOG(ERROR) << "Failed to map frame buffer"; + return; + } + auto frame_size = gmb->GetSize(); + int width = frame_size.width(); + int height = frame_size.height(); + + base::MappedReadOnlyRegion memory = base::ReadOnlySharedMemoryRegion::Create( + kDetectionWidth * kDetectionHeight * 3 / 2); + + auto* y_data = memory.mapping.GetMemoryAs<uint8_t>(); + auto* uv_data = y_data + kDetectionWidth * kDetectionHeight; + + int status = libyuv::NV12Scale( + static_cast<uint8_t*>(gmb->memory(0)), gmb->stride(0), + static_cast<uint8_t*>(gmb->memory(1)), gmb->stride(1), width, height, + y_data, kDetectionWidth, uv_data, kDetectionWidth, kDetectionWidth, + kDetectionHeight, libyuv::FilterMode::kFilterNone); + gmb->Unmap(); + if (status != 0) { + LOG(ERROR) << "Failed to scale buffer"; + return; + } + + { + base::AutoLock lock(document_corners_observer_lock_); + has_ongoing_document_detection_task_ = true; + + DCHECK(document_scanner_service_); + document_scanner_service_->DetectCornersFromNV12Image( + std::move(memory.region), + base::BindPostTask( + mojo_task_runner_, + base::BindOnce(&CameraAppDeviceImpl::OnDetectedDocumentCorners, + weak_ptr_factory_for_mojo_.GetWeakPtr()))); + } +} + void CameraAppDeviceImpl::GetCameraInfo(GetCameraInfoCallback callback) { DCHECK(mojo_task_runner_->BelongsToCurrentThread()); DCHECK(camera_info_); @@ -341,6 +418,30 @@ std::move(callback).Run(rotation); } +void CameraAppDeviceImpl::RegisterDocumentCornersObserver( + mojo::PendingRemote<cros::mojom::DocumentCornersObserver> observer, + RegisterDocumentCornersObserverCallback callback) { + DCHECK(mojo_task_runner_->BelongsToCurrentThread()); + + base::AutoLock lock(document_corners_observer_lock_); + + uint32_t id = next_document_corners_observer_id_++; + document_corners_observers_[id] = + mojo::Remote<cros::mojom::DocumentCornersObserver>(std::move(observer)); + std::move(callback).Run(id); +} + +void CameraAppDeviceImpl::UnregisterDocumentCornersObserver( + uint32_t id, + UnregisterDocumentCornersObserverCallback callback) { + DCHECK(mojo_task_runner_->BelongsToCurrentThread()); + + base::AutoLock lock(document_corners_observer_lock_); + + bool is_success = document_corners_observers_.erase(id) == 1; + std::move(callback).Run(is_success); +} + // static void CameraAppDeviceImpl::DisableEeNr(ReprocessTask* task) { auto ee_entry = @@ -353,6 +454,21 @@ task->extra_metadata.push_back(std::move(nr_entry)); } +void CameraAppDeviceImpl::OnDetectedDocumentCorners( + bool success, + const std::vector<gfx::PointF>& corners) { + base::AutoLock lock(document_corners_observer_lock_); + has_ongoing_document_detection_task_ = false; + if (!success) { + LOG(ERROR) << "Failed to detect document corners"; + return; + } + + for (auto& observer : document_corners_observers_) { + observer.second->OnDocumentCornersUpdated(corners); + } +} + void CameraAppDeviceImpl::OnMojoConnectionError() { CameraAppDeviceBridgeImpl::GetInstance()->OnDeviceMojoDisconnected( device_id_);
diff --git a/media/capture/video/chromeos/camera_app_device_impl.h b/media/capture/video/chromeos/camera_app_device_impl.h index 4e98297b..9d800e391 100644 --- a/media/capture/video/chromeos/camera_app_device_impl.h +++ b/media/capture/video/chromeos/camera_app_device_impl.h
@@ -10,11 +10,13 @@ #include <utility> #include <vector> +#include "base/containers/flat_map.h" #include "base/containers/flat_set.h" #include "base/containers/queue.h" #include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" #include "base/synchronization/lock.h" +#include "chromeos/components/camera_app_ui/document_scanner_service_client.h" #include "media/capture/capture_export.h" #include "media/capture/mojom/image_capture.mojom.h" #include "media/capture/video/chromeos/mojom/camera3.mojom.h" @@ -24,6 +26,12 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/range/range.h" +namespace gpu { + +class GpuMemoryBufferImpl; + +} // namespace gpu + namespace media { class CameraDeviceContext; @@ -73,10 +81,12 @@ // the camera device ipc thread. base::WeakPtr<CameraAppDeviceImpl> GetWeakPtr(); - // Invalidates all the existing weak pointers and then triggers |callback|. + // Resets things which need to be handled on device IPC thread, including + // invalidating all the existing weak pointers, and then triggers |callback|. // When |should_disable_new_ptrs| is set to true, no more weak pointers can be // created. It is used when tearing down the CameraAppDeviceImpl instance. - void InvalidatePtrs(base::OnceClosure callback, bool should_disable_new_ptrs); + void ResetOnDeviceIpcThread(base::OnceClosure callback, + bool should_disable_new_ptrs); // Consumes all the pending reprocess tasks if there is any and eventually // generates a ReprocessTaskQueue which contains: @@ -109,6 +119,12 @@ // opened camera. Used to configure and query camera frame rotation. void SetCameraDeviceContext(CameraDeviceContext* device_context); + // Returns true if we should perform a document corners detection. + bool ShouldDetectDocumentCorners(); + + // Detect document corners on the frame given by its gpu memory buffer. + void DetectDocumentCorners(std::unique_ptr<gpu::GpuMemoryBufferImpl> gmb); + // cros::mojom::CameraAppDevice implementations. void GetCameraInfo(GetCameraInfoCallback callback) override; void SetReprocessOption(cros::mojom::Effect effect, @@ -137,10 +153,19 @@ bool is_enabled, SetCameraFrameRotationEnabledAtSourceCallback callback) override; void GetCameraFrameRotation(GetCameraFrameRotationCallback callback) override; + void RegisterDocumentCornersObserver( + mojo::PendingRemote<cros::mojom::DocumentCornersObserver> observer, + RegisterDocumentCornersObserverCallback callback) override; + void UnregisterDocumentCornersObserver( + uint32_t id, + UnregisterDocumentCornersObserverCallback callback) override; private: static void DisableEeNr(ReprocessTask* task); + void OnDetectedDocumentCorners(bool success, + const std::vector<gfx::PointF>& corners); + void OnMojoConnectionError(); void SetReprocessResultOnMojoThread(SetReprocessOptionCallback callback, @@ -197,6 +222,18 @@ CameraDeviceContext* camera_device_context_ GUARDED_BY(camera_device_context_lock_); + base::Lock document_corners_observer_lock_; + uint32_t next_document_corners_observer_id_ + GUARDED_BY(document_corners_observer_lock_) = 0; + base::flat_map<uint32_t, mojo::Remote<cros::mojom::DocumentCornersObserver>> + document_corners_observers_ GUARDED_BY(document_corners_observer_lock_); + bool has_ongoing_document_detection_task_ = false; + + // Client to connect to document detection service. It should only be + // used/destructed on the device IPC thread. + std::unique_ptr<chromeos::DocumentScannerServiceClient> + document_scanner_service_; + // The weak pointers should be dereferenced and invalidated on camera device // ipc thread. base::WeakPtrFactory<CameraAppDeviceImpl> weak_ptr_factory_{this};
diff --git a/media/capture/video/chromeos/camera_device_delegate.cc b/media/capture/video/chromeos/camera_device_delegate.cc index 433457b..7030912 100644 --- a/media/capture/video/chromeos/camera_device_delegate.cc +++ b/media/capture/video/chromeos/camera_device_delegate.cc
@@ -841,6 +841,8 @@ return true; case cros::mojom::CaptureIntent::VIDEO_RECORD: return false; + case cros::mojom::CaptureIntent::DOCUMENT: + return true; default: NOTREACHED() << "Unknown capture intent: " << capture_intent; return false;
diff --git a/media/capture/video/chromeos/mojom/camera_app.mojom b/media/capture/video/chromeos/mojom/camera_app.mojom index 76848f1..5efd62c 100644 --- a/media/capture/video/chromeos/mojom/camera_app.mojom +++ b/media/capture/video/chromeos/mojom/camera_app.mojom
@@ -38,6 +38,7 @@ DEFAULT = 0, VIDEO_RECORD = 1, STILL_CAPTURE = 2, + DOCUMENT = 3, }; // Interface to let Chrome Camera App (Remote) get specific CameraAppDevice from @@ -143,6 +144,15 @@ // display the camera preview upright in the UI. The only valid values for // |rotation| are 0, 90, 180, and 270. GetCameraFrameRotation() => (uint32 rotation); + + // Registers the document corners observer for preview and returns the + // observer |id|. + RegisterDocumentCornersObserver( + pending_remote<DocumentCornersObserver> observer) + => (uint32 id); + + // Unregister the document corners observer by given |id|. + UnregisterDocumentCornersObserver(uint32 id) => (bool is_success); }; // Interface for camera device to send camera metadata to Chrome Camera App. @@ -157,3 +167,12 @@ // Triggered when the shutter is done for a still capture image. OnShutterDone(); }; + +// Interface for document corners detection. +interface DocumentCornersObserver { + // Triggered when the detected document |corners| should be updated. + // The amount of corners will be either 0, indicating there are no corners + // detected, or 4, which are in top-left => bottom-left => bottom-right => + // top-right order. The value of the coordinate of a corner will be in [0, 1). + OnDocumentCornersUpdated(array<gfx.mojom.PointF> corners); +};
diff --git a/media/capture/video/chromeos/request_manager.cc b/media/capture/video/chromeos/request_manager.cc index 3c253f1..1de8c8d 100644 --- a/media/capture/video/chromeos/request_manager.cc +++ b/media/capture/video/chromeos/request_manager.cc
@@ -18,6 +18,7 @@ #include "base/posix/safe_strerror.h" #include "base/strings/string_number_conversions.h" #include "base/trace_event/trace_event.h" +#include "gpu/ipc/common/gpu_memory_buffer_impl.h" #include "media/capture/video/chromeos/camera_app_device_bridge_impl.h" #include "media/capture/video/chromeos/camera_buffer_factory.h" #include "media/capture/video/chromeos/camera_metadata_utils.h" @@ -961,6 +962,7 @@ StreamType stream_type) { const CaptureResult& pending_result = pending_results_[frame_number]; auto client_type = kStreamClientTypeMap[static_cast<int>(stream_type)]; + if (video_capture_use_gmb_) { VideoCaptureFormat format; absl::optional<VideoCaptureDevice::Client::Buffer> buffer = @@ -968,6 +970,17 @@ stream_type, buffer_ipc_id, &format); CHECK(buffer); + auto camera_app_device = + CameraAppDeviceBridgeImpl::GetInstance()->GetWeakCameraAppDevice( + device_id_); + if (camera_app_device && stream_type == StreamType::kPreviewOutput && + camera_app_device->ShouldDetectDocumentCorners()) { + camera_app_device->DetectDocumentCorners( + stream_buffer_manager_->CreateGpuMemoryBuffer( + buffer->handle_provider->GetGpuMemoryBufferHandle(), format, + gfx::BufferUsage::VEA_READ_CAMERA_AND_CPU_READ_WRITE)); + } + // TODO: Figure out the right color space for the camera frame. We may need // to populate the camera metadata with the color space reported by the V4L2 // device.
diff --git a/media/capture/video/chromeos/stream_buffer_manager.cc b/media/capture/video/chromeos/stream_buffer_manager.cc index 2c10716..e9829b88c 100644 --- a/media/capture/video/chromeos/stream_buffer_manager.cc +++ b/media/capture/video/chromeos/stream_buffer_manager.cc
@@ -389,6 +389,18 @@ stream_context_.end(); } +std::unique_ptr<gpu::GpuMemoryBufferImpl> +StreamBufferManager::CreateGpuMemoryBuffer(gfx::GpuMemoryBufferHandle handle, + const VideoCaptureFormat& format, + gfx::BufferUsage buffer_usage) { + absl::optional<gfx::BufferFormat> gfx_format = + PixFormatVideoToGfx(format.pixel_format); + DCHECK(gfx_format); + return gmb_support_->CreateGpuMemoryBufferImplFromHandle( + std::move(handle), format.frame_size, *gfx_format, buffer_usage, + base::NullCallback()); +} + // static uint64_t StreamBufferManager::GetBufferIpcId(StreamType stream_type, int key) { uint64_t id = 0;
diff --git a/media/capture/video/chromeos/stream_buffer_manager.h b/media/capture/video/chromeos/stream_buffer_manager.h index 86ea140..8e336fd2 100644 --- a/media/capture/video/chromeos/stream_buffer_manager.h +++ b/media/capture/video/chromeos/stream_buffer_manager.h
@@ -32,6 +32,7 @@ namespace gpu { +class GpuMemoryBufferImpl; class GpuMemoryBufferSupport; } // namespace gpu @@ -107,6 +108,11 @@ bool IsRecordingSupported(); + std::unique_ptr<gpu::GpuMemoryBufferImpl> CreateGpuMemoryBuffer( + gfx::GpuMemoryBufferHandle handle, + const VideoCaptureFormat& format, + gfx::BufferUsage buffer_usage); + private: friend class RequestManagerTest;
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc index 7364a6f..6ea101c6 100644 --- a/pdf/pdfium/pdfium_engine.cc +++ b/pdf/pdfium/pdfium_engine.cc
@@ -19,6 +19,7 @@ #include "base/bind.h" #include "base/check_op.h" #include "base/containers/contains.h" +#include "base/containers/flat_map.h" #include "base/debug/alias.h" #include "base/feature_list.h" #include "base/location.h" @@ -3188,6 +3189,8 @@ FPDF_RenderPage_Close(pages_[page_index]->GetPage()); progressive_paints_.erase(progressive_paints_.begin() + progressive_index); + + MaybeRequestPendingThumbnail(page_index); } void PDFiumEngine::CancelPaints() { @@ -4238,8 +4241,37 @@ float device_pixel_ratio, SendThumbnailCallback send_callback) { DCHECK(PageIndexInBounds(page_index)); - pages_[page_index]->RequestThumbnail(device_pixel_ratio, - std::move(send_callback)); + + // Thumbnails cannot be generated in the middle of a progressive paint of a + // page. Generate the thumbnail immediately only if the page is not currently + // being progressively painted. Otherwise, wait for progressive painting to + // finish. + const int progressive_index = GetProgressiveIndex(page_index); + if (progressive_index == -1) { + pages_[page_index]->RequestThumbnail(device_pixel_ratio, + std::move(send_callback)); + return; + } + + // A thumbnail may be already pending for a page. Overwrite the pending + // thumbnail in that case. + PendingThumbnail& pending_thumbnail = pending_thumbnails_[page_index]; + pending_thumbnail.device_pixel_ratio = device_pixel_ratio; + pending_thumbnail.send_callback = std::move(send_callback); +} + +void PDFiumEngine::MaybeRequestPendingThumbnail(int page_index) { + DCHECK_EQ(GetProgressiveIndex(page_index), -1); + + auto it = pending_thumbnails_.find(page_index); + if (it == pending_thumbnails_.end()) + return; + + PendingThumbnail& pending_thumbnail = it->second; + pages_[page_index]->RequestThumbnail( + pending_thumbnail.device_pixel_ratio, + std::move(pending_thumbnail.send_callback)); + pending_thumbnails_.erase(it); } void PDFiumEngine::SetLastInstance() { @@ -4265,4 +4297,14 @@ image_data_ = std::move(image_data); } +PDFiumEngine::PendingThumbnail::PendingThumbnail() = default; + +PDFiumEngine::PendingThumbnail::PendingThumbnail(PendingThumbnail&& that) = + default; + +PDFiumEngine::PendingThumbnail& PDFiumEngine::PendingThumbnail::operator=( + PendingThumbnail&& that) = default; + +PDFiumEngine::PendingThumbnail::~PendingThumbnail() = default; + } // namespace chrome_pdf
diff --git a/pdf/pdfium/pdfium_engine.h b/pdf/pdfium/pdfium_engine.h index aeb1c033..f194c9a 100644 --- a/pdf/pdfium/pdfium_engine.h +++ b/pdf/pdfium/pdfium_engine.h
@@ -13,6 +13,7 @@ #include <string> #include <vector> +#include "base/containers/flat_map.h" #include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "base/timer/timer.h" @@ -638,6 +639,10 @@ void UpdateLinkUnderCursor(const std::string& target_url); void SetLinkUnderCursorForAnnotation(FPDF_ANNOTATION annot, int page_index); + // Checks whether a given `page_index` exists in `pending_thumbnails_`. If so, + // requests the thumbnail for that page. + void MaybeRequestPendingThumbnail(int page_index); + // Keeps track of the most recently used plugin instance. // TODO(crbug.com/702993): Remove when PPAPI is gone. void SetLastInstance(); @@ -819,6 +824,20 @@ // Shadow matrix for generating the page shadow bitmap. std::unique_ptr<draw_utils::ShadowMatrix> page_shadow_; + // Pending thumbnail requests. + struct PendingThumbnail { + PendingThumbnail(); + PendingThumbnail(PendingThumbnail&& that); + PendingThumbnail& operator=(PendingThumbnail&& that); + ~PendingThumbnail(); + + float device_pixel_ratio = 1.0f; + SendThumbnailCallback send_callback; + }; + + // Map of page indices to pending thumbnail requests. + base::flat_map<int, PendingThumbnail> pending_thumbnails_; + // A list of information of document attachments. std::vector<DocumentAttachmentInfo> doc_attachment_info_list_;
diff --git a/printing/backend/printing_restrictions.h b/printing/backend/printing_restrictions.h index 3406574..8e877bf 100644 --- a/printing/backend/printing_restrictions.h +++ b/printing/backend/printing_restrictions.h
@@ -16,11 +16,11 @@ #if defined(OS_CHROMEOS) // Allowed printing modes as a bitmask. -// This is used in pref file and should never change. +// This is used in pref file and crosapi. It should never change. using ColorModeRestriction = mojom::ColorModeRestriction; // Allowed duplex modes as a bitmask. -// This is used in pref file and should never change. +// This is used in pref file and crosapi. It should never change. using DuplexModeRestriction = mojom::DuplexModeRestriction; // Allowed PIN printing modes.
diff --git a/testing/buildbot/chromium.android.fyi.json b/testing/buildbot/chromium.android.fyi.json index 84393dc..0fc20da 100644 --- a/testing/buildbot/chromium.android.fyi.json +++ b/testing/buildbot/chromium.android.fyi.json
@@ -10984,7 +10984,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.134" + "revision": "version:92.0.4515.135" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -11071,7 +11071,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.22" + "revision": "version:93.0.4577.23" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -11245,7 +11245,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.134" + "revision": "version:92.0.4515.135" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -11332,7 +11332,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.22" + "revision": "version:93.0.4577.23" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index 63a5db9..86fff54c 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -50487,7 +50487,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.134" + "revision": "version:92.0.4515.135" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50575,7 +50575,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.22" + "revision": "version:93.0.4577.23" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50751,7 +50751,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.134" + "revision": "version:92.0.4515.135" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50839,7 +50839,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.22" + "revision": "version:93.0.4577.23" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -51088,7 +51088,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.134" + "revision": "version:92.0.4515.135" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -51175,7 +51175,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.22" + "revision": "version:93.0.4577.23" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -51349,7 +51349,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.134" + "revision": "version:92.0.4515.135" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -51436,7 +51436,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.22" + "revision": "version:93.0.4577.23" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -51685,7 +51685,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.134" + "revision": "version:92.0.4515.135" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -51772,7 +51772,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.22" + "revision": "version:93.0.4577.23" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -51946,7 +51946,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.134" + "revision": "version:92.0.4515.135" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -52033,7 +52033,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.22" + "revision": "version:93.0.4577.23" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 3fb63ae952..303df54 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -90831,21 +90831,21 @@ "gtest_tests": [ { "args": [ - "--ash-chrome-path-override=../../lacros_version_skew_tests_v93.0.4573.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v94.0.4588.0/test_ash_chrome", "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_Lacros version skew testing ash 93.0.4573.0", + "name": "lacros_chrome_browsertests_Lacros version skew testing ash 94.0.4588.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v93.0.4573.0", - "revision": "version:93.0.4573.0" + "location": "lacros_version_skew_tests_v94.0.4588.0", + "revision": "version:94.0.4588.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -90855,21 +90855,21 @@ }, { "args": [ - "--ash-chrome-path-override=../../lacros_version_skew_tests_v93.0.4577.10/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v94.0.4596.0/test_ash_chrome", "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_Lacros version skew testing ash 93.0.4577.10", + "name": "lacros_chrome_browsertests_Lacros version skew testing ash 94.0.4596.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v93.0.4577.10", - "revision": "version:93.0.4577.10" + "location": "lacros_version_skew_tests_v94.0.4596.0", + "revision": "version:94.0.4596.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -90879,21 +90879,21 @@ }, { "args": [ - "--ash-chrome-path-override=../../lacros_version_skew_tests_v93.0.4573.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v94.0.4588.0/test_ash_chrome", "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series_Lacros version skew testing ash 93.0.4573.0", + "name": "lacros_chrome_browsertests_run_in_series_Lacros version skew testing ash 94.0.4588.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v93.0.4573.0", - "revision": "version:93.0.4573.0" + "location": "lacros_version_skew_tests_v94.0.4588.0", + "revision": "version:94.0.4588.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" @@ -90903,21 +90903,21 @@ }, { "args": [ - "--ash-chrome-path-override=../../lacros_version_skew_tests_v93.0.4577.10/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v94.0.4596.0/test_ash_chrome", "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series_Lacros version skew testing ash 93.0.4577.10", + "name": "lacros_chrome_browsertests_run_in_series_Lacros version skew testing ash 94.0.4596.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v93.0.4577.10", - "revision": "version:93.0.4577.10" + "location": "lacros_version_skew_tests_v94.0.4596.0", + "revision": "version:94.0.4596.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com"
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 00ea425..bce569f 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -46,32 +46,32 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v93.0.4573.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v94.0.4596.0/test_ash_chrome', '--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter', ], - 'identifier': 'Lacros version skew testing ash 93.0.4573.0', + 'identifier': 'Lacros version skew testing ash 94.0.4596.0', 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v93.0.4573.0', - 'revision': 'version:93.0.4573.0', + 'location': 'lacros_version_skew_tests_v94.0.4596.0', + 'revision': 'version:94.0.4596.0', }, ], }, }, 'LACROS_VERSION_SKEW_DEV': { 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v93.0.4577.10/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v94.0.4588.0/test_ash_chrome', '--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter', ], - 'identifier': 'Lacros version skew testing ash 93.0.4577.10', + 'identifier': 'Lacros version skew testing ash 94.0.4588.0', 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v93.0.4577.10', - 'revision': 'version:93.0.4577.10', + 'location': 'lacros_version_skew_tests_v94.0.4588.0', + 'revision': 'version:94.0.4588.0', }, ], }, @@ -421,7 +421,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M93', - 'revision': 'version:93.0.4577.22', + 'revision': 'version:93.0.4577.23', } ], }, @@ -445,7 +445,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M92', - 'revision': 'version:92.0.4515.134', + 'revision': 'version:92.0.4515.135', } ], }, @@ -493,7 +493,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M93', - 'revision': 'version:93.0.4577.22', + 'revision': 'version:93.0.4577.23', } ], }, @@ -517,7 +517,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M92', - 'revision': 'version:92.0.4515.134', + 'revision': 'version:92.0.4515.135', } ], }, @@ -565,7 +565,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M93', - 'revision': 'version:93.0.4577.22', + 'revision': 'version:93.0.4577.23', } ], }, @@ -589,7 +589,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M92', - 'revision': 'version:92.0.4515.134', + 'revision': 'version:92.0.4515.135', } ], },
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index dbd0808..4aef31c 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1279,6 +1279,27 @@ ] } ], + "AutofillUseOnlyFormRendererIDForOldDuplicateFormRemoval": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "ios", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "AutofillUseOnlyFormRendererIDForOldDuplicateFormRemoval" + ] + } + ] + } + ], "AutofillUseUniqueRendererIDsOnIOS": [ { "platforms": [
diff --git a/third_party/blink/renderer/core/dom/text.cc b/third_party/blink/renderer/core/dom/text.cc index 6ff0ca1c..954dd8c 100644 --- a/third_party/blink/renderer/core/dom/text.cc +++ b/third_party/blink/renderer/core/dom/text.cc
@@ -438,8 +438,8 @@ return true; } if (text_layout_object->IsTextFragment()) { - // Changes of |textNode| may change first letter part, so we should - // reattach. Note: When |textNode| is empty or holds collapsed white spaces + // Changes of |text_node| may change first letter part, so we should + // reattach. Note: When |text_node| is empty or holds collapsed whitespaces // |text_fragment_layout_object| represents first-letter part but it isn't // inside first-letter-pseudo element. See http://crbug.com/978947 const auto& text_fragment_layout_object = @@ -447,13 +447,13 @@ return text_fragment_layout_object.GetFirstLetterPseudoElement() || !text_fragment_layout_object.IsRemainingTextLayoutObject(); } - if (auto* next = text_layout_object->NextSibling()) { - if (IsA<FirstLetterPseudoElement>(next->GetNode())) { - // This |Text| node is not a first-letter part, but it may be changed. - // So, we should rebuild first-letter part and remaining part. - // See FirstLetterPseudoElementTest.AppendDataToSpace - return true; - } + if (!FirstLetterPseudoElement::FirstLetterLength( + text_layout_object->GetText()) && + FirstLetterPseudoElement::FirstLetterLength(text_node.data())) { + // We did not previously apply ::first-letter styles to this |text_node|, + // and if there was no first formatted letter, but now is, we may need to + // reattach. + return true; } return false; }
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.cc b/third_party/blink/renderer/core/frame/local_frame_view.cc index d656f5dd..e81a37d 100644 --- a/third_party/blink/renderer/core/frame/local_frame_view.cc +++ b/third_party/blink/renderer/core/frame/local_frame_view.cc
@@ -4765,6 +4765,7 @@ FontPerformance::PrimaryFontTimeInStyle()); UMA_HISTOGRAM_TIMES("Renderer.Font.SystemFallback.FCP", FontPerformance::SystemFallbackFontTime()); + FontPerformance::DidReachFirstContentfulPaint(); } EnsureUkmAggregator().DidReachFirstContentfulPaint(is_main_frame); }
diff --git a/third_party/blink/renderer/core/html/media/html_media_element.cc b/third_party/blink/renderer/core/html/media/html_media_element.cc index 169a05ea..d2055d5 100644 --- a/third_party/blink/renderer/core/html/media/html_media_element.cc +++ b/third_party/blink/renderer/core/html/media/html_media_element.cc
@@ -2830,6 +2830,14 @@ return false; } +bool HTMLMediaElement::ShouldShowAllControls() const { + // If the user has explicitly shown or hidden the controls, then force that + // choice. Otherwise returns whether controls should be shown and no controls + // are meant to be hidden. + return user_wants_controls_visible_.value_or( + ShouldShowControls() && !ControlsListInternal()->CanShowAllControls()); +} + DOMTokenList* HTMLMediaElement::controlsList() const { return controls_list_.Get(); } @@ -2921,6 +2929,10 @@ UpdateControlsVisibility(); } +bool HTMLMediaElement::UserWantsControlsVisible() const { + return user_wants_controls_visible_.value_or(false); +} + double HTMLMediaElement::EffectiveMediaVolume() const { if (muted_) return 0;
diff --git a/third_party/blink/renderer/core/html/media/html_media_element.h b/third_party/blink/renderer/core/html/media/html_media_element.h index 8d14815..02afd360 100644 --- a/third_party/blink/renderer/core/html/media/html_media_element.h +++ b/third_party/blink/renderer/core/html/media/html_media_element.h
@@ -243,6 +243,7 @@ // controls bool ShouldShowControls( const RecordMetricsBehavior = RecordMetricsBehavior::kDoNotRecord) const; + bool ShouldShowAllControls() const; DOMTokenList* controlsList() const; HTMLMediaElementControlsList* ControlsListInternal() const; double volume() const; @@ -251,6 +252,7 @@ void setMuted(bool); virtual bool SupportsPictureInPicture() const { return false; } void SetUserWantsControlsVisible(bool visible); + bool UserWantsControlsVisible() const; void TogglePlayState();
diff --git a/third_party/blink/renderer/core/html/media/html_media_element_controls_list.cc b/third_party/blink/renderer/core/html/media/html_media_element_controls_list.cc index 03be7b18..72e75ab 100644 --- a/third_party/blink/renderer/core/html/media/html_media_element_controls_list.cc +++ b/third_party/blink/renderer/core/html/media/html_media_element_controls_list.cc
@@ -50,4 +50,9 @@ return contains(kNoRemotePlayback); } +bool HTMLMediaElementControlsList::CanShowAllControls() const { + return ShouldHideDownload() || ShouldHideFullscreen() || + ShouldHidePlaybackRate() || ShouldHideRemotePlayback(); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/html/media/html_media_element_controls_list.h b/third_party/blink/renderer/core/html/media/html_media_element_controls_list.h index 652416f..1d1b56f 100644 --- a/third_party/blink/renderer/core/html/media/html_media_element_controls_list.h +++ b/third_party/blink/renderer/core/html/media/html_media_element_controls_list.h
@@ -23,6 +23,8 @@ bool ShouldHidePlaybackRate() const; bool ShouldHideRemotePlayback() const; + bool CanShowAllControls() const; + private: bool ValidateTokenValue(const AtomicString&, ExceptionState&) const override; };
diff --git a/third_party/blink/renderer/core/html/media/html_media_element_test.cc b/third_party/blink/renderer/core/html/media/html_media_element_test.cc index 37532d6..bac895e 100644 --- a/third_party/blink/renderer/core/html/media/html_media_element_test.cc +++ b/third_party/blink/renderer/core/html/media/html_media_element_test.cc
@@ -338,6 +338,10 @@ bool ControlsVisible() const { return Media()->ShouldShowControls(); } + bool MediaShouldShowAllControls() const { + return Media()->ShouldShowAllControls(); + } + ExecutionContext* GetExecutionContext() const { return dummy_page_holder_->GetFrame().DomWindow(); } @@ -1135,4 +1139,37 @@ EXPECT_FALSE(ControlsVisible()); } +TEST_P(HTMLMediaElementTest, + MediaShouldShowAllControlsDependsOnControlslistAttr) { + // Enable scripts to prevent controls being shown due to no scripts. + Media()->GetDocument().GetSettings()->SetScriptEnabled(true); + + // Setting the controls attribute to true should show the controls. + Media()->SetBooleanAttribute(html_names::kControlsAttr, true); + EXPECT_TRUE(MediaShouldShowAllControls()); + + // Setting the controlsList attribute to a valid value should not show the + // controls. + Media()->setAttribute(blink::html_names::kControlslistAttr, "nofullscreen"); + EXPECT_FALSE(MediaShouldShowAllControls()); + + // Removing the controlsList attribute should show the controls. + Media()->removeAttribute(blink::html_names::kControlslistAttr); + EXPECT_TRUE(MediaShouldShowAllControls()); + + // Setting the controlsList attribute to an invalid value should still show + // the controls. + Media()->setAttribute(blink::html_names::kControlslistAttr, "foo"); + EXPECT_TRUE(MediaShouldShowAllControls()); + + // Setting the controlsList attribute to another valid value should not show + // the controls. + Media()->setAttribute(blink::html_names::kControlslistAttr, "noplaybackrate"); + EXPECT_FALSE(MediaShouldShowAllControls()); + + // If the user explicitly shows them, that should override the controlsList + // attribute. + Media()->SetUserWantsControlsVisible(true); + EXPECT_TRUE(MediaShouldShowAllControls()); +} } // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc index 6223124..80e4adb 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
@@ -1719,7 +1719,6 @@ is_after_break = false; } - bool has_forced_break = false; for (const NGInlineItemResult& result : line_info.Results()) { const NGInlineItem& item = *result.item; if (item.Type() == NGInlineItem::kText) { @@ -1736,14 +1735,10 @@ } if (item.Type() == NGInlineItem::kControl) { UChar c = items_data.text_content[item.StartOffset()]; - if (c == kNewlineCharacter) { - // Compute the forced break after all results were handled, because - // when close tags appear after a forced break, they are included in - // the line, and they may have inline sizes. crbug.com/991320. - DCHECK(!has_forced_break); - has_forced_break = true; - continue; - } +#if DCHECK_IS_ON() + if (c == kNewlineCharacter) + DCHECK(line_info.HasForcedBreak()); +#endif // Tabulation characters change the widths by their positions, so // their widths for the max size may be different from the widths for // the min size. Fall back to 2 pass for now. @@ -1752,9 +1747,16 @@ continue; } } +#if DCHECK_IS_ON() + if (item.Type() == NGInlineItem::kBlockInInline) + DCHECK(line_info.HasForcedBreak()); +#endif position += result.inline_size; } - if (has_forced_break) + // Compute the forced break after all results were handled, because + // when close tags appear after a forced break, they are included in + // the line, and they may have inline sizes. crbug.com/991320. + if (line_info.HasForcedBreak()) ForceLineBreak(line_info); } };
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc index be33c481..0adff8f 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
@@ -1738,6 +1738,7 @@ if (UNLIKELY(HasHyphen())) position_ -= RemoveHyphen(line_info->MutableResults()); is_after_forced_break_ = true; + line_info->SetHasForcedBreak(); line_info->SetIsLastLine(true); state_ = LineBreakState::kDone; } @@ -1981,6 +1982,10 @@ return; } const NGPhysicalFragment& fragment = layout_result->PhysicalFragment(); + item_result->inline_size = + NGFragment(constraint_space_.GetWritingDirection(), fragment) + .InlineSize(); + position_ += item_result->inline_size; item_result->should_create_line_box = !layout_result->IsSelfCollapsing(); item_result->layout_result = std::move(layout_result); @@ -1988,6 +1993,8 @@ line_info->SetBlockInInlineBreakToken( To<NGBlockBreakToken>(fragment.BreakToken())); line_info->SetIsBlockInInline(); + line_info->SetHasForcedBreak(); + is_after_forced_break_ = true; trailing_whitespace_ = WhitespaceState::kNone; if (!line_info->BlockInInlineBreakToken()) MoveToNextOf(item); @@ -2746,6 +2753,7 @@ DCHECK_LE(item_index_, items.size()); if (item_index_ >= items.size()) return nullptr; + DCHECK_EQ(line_info.HasForcedBreak(), is_after_forced_break_); return NGInlineBreakToken::Create( node_, current_style_.get(), item_index_, offset_, (is_after_forced_break_ ? NGInlineBreakToken::kIsForcedBreak : 0) |
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_info.h b/third_party/blink/renderer/core/layout/ng/inline/ng_line_info.h index 9a55b8e..c1ea06f 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_info.h +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_info.h
@@ -53,6 +53,12 @@ bool IsLastLine() const { return is_last_line_; } void SetIsLastLine(bool is_last_line) { is_last_line_ = is_last_line; } + // Whether this line has ended with a forced break or not. Note, the forced + // break item may not be the last item if trailing items are included, or even + // does not exist if synthesized for block-in-inline. + bool HasForcedBreak() const { return has_forced_break_; } + void SetHasForcedBreak() { has_forced_break_ = true; } + // If the line is marked as empty, it means that there's no content that // requires it to be present at all, e.g. when there are only close tags with // no margin/border/padding. @@ -188,6 +194,7 @@ bool use_first_line_style_ = false; bool is_last_line_ = false; + bool has_forced_break_ = false; bool is_empty_line_ = false; bool is_block_in_inline_ = false; bool has_overflow_ = false;
diff --git a/third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.cc b/third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.cc index 83998f7d..3bbd3b9 100644 --- a/third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.cc +++ b/third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.cc
@@ -226,14 +226,9 @@ return false; if (!node.IsBlock() || !node.IsMathML()) return false; - auto base = To<NGBlockNode>(FirstChildInFlow(node)); - // TODO(crbug.com/1124298)): - // https://w3c.github.io/mathml-core/#embellished-operators - if (auto* element = - DynamicTo<MathMLOperatorElement>(base.GetDOMNode())) { - return element->HasBooleanProperty(MathMLOperatorElement::kMovableLimits); - } - return false; + const auto base = To<NGBlockNode>(FirstChildInFlow(node)); + const auto base_properties = GetMathMLEmbellishedOperatorProperties(base); + return base_properties && base_properties->has_movablelimits; } bool IsOperatorWithSpecialShaping(const NGBlockNode& node) { @@ -291,4 +286,48 @@ return LayoutUnit(block_offset / 2 + MathAxisHeight(style)); } +namespace { + +MathMLOperatorElement* GetCoreOperator(const NGBlockNode& node) { + if (!node || !node.IsMathML()) + return nullptr; + + // See https://w3c.github.io/mathml-core/#embellished-operators + // TODO(crbug.com/1124298): Implement embellished operators. + auto* element = DynamicTo<MathMLElement>(node.GetDOMNode()); + if (element && element->HasTagName(mathml_names::kMoTag)) { + // 1. An <mo> element; + return To<MathMLOperatorElement>(element); + } + return nullptr; +} + +} // namespace + +absl::optional<MathMLEmbellishedOperatorProperties> +GetMathMLEmbellishedOperatorProperties(const NGBlockNode& node) { + auto* core_operator = GetCoreOperator(node); + if (!core_operator) + return absl::nullopt; + + MathMLEmbellishedOperatorProperties properties; + + properties.has_movablelimits = + core_operator->HasBooleanProperty(MathMLOperatorElement::kMovableLimits); + + LayoutUnit leading_space(core_operator->DefaultLeadingSpace() * + node.Style().FontSize()); + properties.lspace = + ValueForLength(node.Style().GetMathLSpace(), leading_space) + .ClampNegativeToZero(); + + LayoutUnit trailing_space(core_operator->DefaultTrailingSpace() * + node.Style().FontSize()); + properties.rspace = + ValueForLength(node.Style().GetMathRSpace(), trailing_space) + .ClampNegativeToZero(); + + return properties; +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.h b/third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.h index 7196176..2cdd125 100644 --- a/third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.h +++ b/third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.h
@@ -101,6 +101,16 @@ LayoutUnit MathTableBaseline(const ComputedStyle&, LayoutUnit block_offset); +// For nodes corresponding to embellished operators, this function returns the +// properties of its core operator. Otherwise, it returns a null optional. +// See https://mathml-refresh.github.io/mathml-core/#embellished-operators +struct MathMLEmbellishedOperatorProperties { + bool has_movablelimits; + LayoutUnit lspace; + LayoutUnit rspace; +}; +absl::optional<MathMLEmbellishedOperatorProperties> +GetMathMLEmbellishedOperatorProperties(const NGBlockNode&); } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_MATHML_NG_MATH_LAYOUT_UTILS_H_
diff --git a/third_party/blink/renderer/core/layout/ng/mathml/ng_math_row_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/mathml/ng_math_row_layout_algorithm.cc index a464e1a8..01709dda 100644 --- a/third_party/blink/renderer/core/layout/ng/mathml/ng_math_row_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/mathml/ng_math_row_layout_algorithm.cc
@@ -26,23 +26,12 @@ return LayoutUnit(); } -static void DetermineOperatorSpacing(const NGLayoutInputNode& node, +static void DetermineOperatorSpacing(const NGBlockNode& node, LayoutUnit* lspace, LayoutUnit* rspace) { - auto* core_operator = - DynamicTo<MathMLOperatorElement>(node.GetDOMNode()); - if (core_operator) { - // TODO(crbug.com/1124298): Implement embellished operators. - LayoutUnit leading_space(core_operator->DefaultLeadingSpace() * - node.Style().FontSize()); - *lspace = std::max<LayoutUnit>( - ValueForLength(node.Style().GetMathLSpace(), leading_space), - LayoutUnit()); - LayoutUnit trailing_space(core_operator->DefaultTrailingSpace() * - node.Style().FontSize()); - *rspace = std::max<LayoutUnit>( - ValueForLength(node.Style().GetMathRSpace(), trailing_space), - LayoutUnit()); + if (auto properties = GetMathMLEmbellishedOperatorProperties(node)) { + *lspace = properties->lspace; + *rspace = properties->rspace; } } @@ -143,7 +132,7 @@ const auto child_layout_result = To<NGBlockNode>(child).Layout( child_constraint_space, nullptr /* break_token */); LayoutUnit lspace, rspace; - DetermineOperatorSpacing(child, &lspace, &rspace); + DetermineOperatorSpacing(To<NGBlockNode>(child), &lspace, &rspace); const NGPhysicalFragment& physical_fragment = child_layout_result->PhysicalFragment(); NGBoxFragment fragment(ConstraintSpace().GetWritingDirection(), @@ -237,7 +226,7 @@ sizes += child_result.sizes; LayoutUnit lspace, rspace; - DetermineOperatorSpacing(child, &lspace, &rspace); + DetermineOperatorSpacing(To<NGBlockNode>(child), &lspace, &rspace); sizes += lspace + rspace; depends_on_block_constraints |= child_result.depends_on_block_constraints;
diff --git a/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc b/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc index db7a3e683..f0278bb 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc
@@ -431,8 +431,7 @@ min_max_length_sizes = {LayoutUnit(), LayoutUnit::Max()}; } else { min_max_length_sizes = ComputeMinMaxInlineSizes( - space, node, border_padding, MinMaxSizesFunc, &min_inline_length, - /* is_block_size_indefinite */ !can_compute_block_size_without_layout); + space, node, border_padding, MinMaxSizesFunc, &min_inline_length); } const auto writing_direction = style.GetWritingDirection();
diff --git a/third_party/blink/renderer/core/layout/ng/ng_length_utils.h b/third_party/blink/renderer/core/layout/ng/ng_length_utils.h index a2aa789..83c95b2 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_length_utils.h +++ b/third_party/blink/renderer/core/layout/ng/ng_length_utils.h
@@ -309,13 +309,11 @@ const NGBoxStrut& border_padding); template <typename MinMaxSizesFunc> -MinMaxSizes ComputeMinMaxInlineSizes( - const NGConstraintSpace& space, - const NGBlockNode& node, - const NGBoxStrut& border_padding, - const MinMaxSizesFunc& min_max_sizes_func, - const Length* opt_min_length = nullptr, - absl::optional<bool> is_block_size_indefinite = absl::nullopt) { +MinMaxSizes ComputeMinMaxInlineSizes(const NGConstraintSpace& space, + const NGBlockNode& node, + const NGBoxStrut& border_padding, + const MinMaxSizesFunc& min_max_sizes_func, + const Length* opt_min_length = nullptr) { const ComputedStyle& style = node.Style(); const Length& min_length = opt_min_length ? *opt_min_length : style.LogicalMinWidth(); @@ -328,8 +326,7 @@ // This implements the transferred min/max sizes per: // https://drafts.csswg.org/css-sizing-4/#aspect-ratio-size-transfers if (!style.AspectRatio().IsAuto() && - is_block_size_indefinite.value_or( - BlockLengthUnresolvable(space, style.LogicalHeight()))) { + BlockLengthUnresolvable(space, style.LogicalHeight())) { MinMaxSizes transferred_sizes = ComputeMinMaxInlineSizesFromAspectRatio(space, style, border_padding); sizes.min_size = std::max(
diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/third_party/blink/renderer/core/page/context_menu_controller.cc index 3d6ffff..1c160c05 100644 --- a/third_party/blink/renderer/core/page/context_menu_controller.cc +++ b/third_party/blink/renderer/core/page/context_menu_controller.cc
@@ -532,7 +532,7 @@ if (IsA<HTMLVideoElement>(media_element) && media_element->HasVideo() && !media_element->IsFullscreen()) data.media_flags |= ContextMenuData::kMediaCanToggleControls; - if (media_element->ShouldShowControls()) + if (media_element->ShouldShowAllControls()) data.media_flags |= ContextMenuData::kMediaControls; } else if (IsA<HTMLObjectElement>(*result.InnerNode()) || IsA<HTMLEmbedElement>(*result.InnerNode())) {
diff --git a/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc b/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc index 2e4a02b..8a176f4 100644 --- a/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc +++ b/third_party/blink/renderer/core/paint/ng/ng_box_fragment_painter.cc
@@ -45,6 +45,7 @@ #include "third_party/blink/renderer/core/paint/paint_timing_detector.h" #include "third_party/blink/renderer/core/paint/rounded_border_geometry.h" #include "third_party/blink/renderer/core/paint/scoped_paint_state.h" +#include "third_party/blink/renderer/core/paint/scoped_svg_paint_state.h" #include "third_party/blink/renderer/core/paint/scrollable_area_painter.h" #include "third_party/blink/renderer/core/paint/theme_painter.h" #include "third_party/blink/renderer/core/paint/url_metadata_utils.h" @@ -1655,7 +1656,14 @@ return; } + const LayoutObject* layout_object = child_fragment.GetLayoutObject(); if (child_fragment.IsInlineBox()) { + if (layout_object->IsSVGInline()) { + ScopedSVGPaintState paint_state(*layout_object, paint_info); + NGInlineBoxFragmentPainter(cursor, item, child_fragment) + .Paint(paint_info, paint_offset); + return; + } NGInlineBoxFragmentPainter(cursor, item, child_fragment) .Paint(paint_info, paint_offset); return; @@ -1663,7 +1671,7 @@ // Block-in-inline DCHECK(RuntimeEnabledFeatures::LayoutNGBlockInInlineEnabled()); - DCHECK(!child_fragment.GetLayoutObject()->IsInline()); + DCHECK(!layout_object->IsInline()); PaintInfo paint_info_for_descendants = paint_info.ForDescendants(); paint_info_for_descendants.SetIsInFragmentTraversal(); PaintBlockChild({&child_fragment, item.OffsetInContainerFragment()},
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_download_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_download_button_element.cc index 055b623..0a2c8e7 100644 --- a/third_party/blink/renderer/modules/media_controls/elements/media_control_download_button_element.cc +++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_download_button_element.cc
@@ -41,7 +41,8 @@ // The attribute disables the download button. // This is run after `SupportSave()` to guarantee that it is recorded only if // it blocks the download button from showing up. - if (MediaElement().ControlsListInternal()->ShouldHideDownload()) { + if (MediaElement().ControlsListInternal()->ShouldHideDownload() && + !MediaElement().UserWantsControlsVisible()) { UseCounter::Count(MediaElement().GetDocument(), WebFeature::kHTMLMediaElementControlsListNoDownload); return false;
diff --git a/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc b/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc index ed83fe7..a260d500 100644 --- a/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc +++ b/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc
@@ -154,7 +154,8 @@ bool ShouldShowPlaybackSpeedButton(HTMLMediaElement& media_element) { // The page disabled the button via the controlsList attribute. - if (media_element.ControlsListInternal()->ShouldHidePlaybackRate()) { + if (media_element.ControlsListInternal()->ShouldHidePlaybackRate() && + !media_element.UserWantsControlsVisible()) { UseCounter::Count(media_element.GetDocument(), WebFeature::kHTMLMediaElementControlsListNoPlaybackRate); return false; @@ -193,7 +194,8 @@ } // The page disabled the button via the attribute. - if (media_element.ControlsListInternal()->ShouldHideRemotePlayback()) { + if (media_element.ControlsListInternal()->ShouldHideRemotePlayback() && + !media_element.UserWantsControlsVisible()) { UseCounter::Count( media_element.GetDocument(), WebFeature::kHTMLMediaElementControlsListNoRemotePlayback);
diff --git a/third_party/blink/renderer/modules/media_controls/media_controls_impl_test.cc b/third_party/blink/renderer/modules/media_controls/media_controls_impl_test.cc index 5632f9156..4ac3966d 100644 --- a/third_party/blink/renderer/modules/media_controls/media_controls_impl_test.cc +++ b/third_party/blink/renderer/modules/media_controls/media_controls_impl_test.cc
@@ -38,10 +38,12 @@ #include "third_party/blink/renderer/modules/media_controls/elements/media_control_cast_button_element.h" #include "third_party/blink/renderer/modules/media_controls/elements/media_control_current_time_display_element.h" #include "third_party/blink/renderer/modules/media_controls/elements/media_control_download_button_element.h" +#include "third_party/blink/renderer/modules/media_controls/elements/media_control_fullscreen_button_element.h" #include "third_party/blink/renderer/modules/media_controls/elements/media_control_mute_button_element.h" #include "third_party/blink/renderer/modules/media_controls/elements/media_control_overflow_menu_button_element.h" #include "third_party/blink/renderer/modules/media_controls/elements/media_control_overflow_menu_list_element.h" #include "third_party/blink/renderer/modules/media_controls/elements/media_control_play_button_element.h" +#include "third_party/blink/renderer/modules/media_controls/elements/media_control_playback_speed_button_element.h" #include "third_party/blink/renderer/modules/media_controls/elements/media_control_remaining_time_display_element.h" #include "third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.h" #include "third_party/blink/renderer/modules/media_controls/elements/media_control_volume_slider_element.h" @@ -253,6 +255,12 @@ MediaControlDownloadButtonElement* DownloadButtonElement() const { return media_controls_->download_button_; } + MediaControlFullscreenButtonElement* FullscreenButtonElement() const { + return media_controls_->fullscreen_button_; + } + MediaControlPlaybackSpeedButtonElement* PlaybackSpeedButtonElement() const { + return media_controls_->playback_speed_button_; + } MediaControlPlayButtonElement* PlayButtonElement() const { return media_controls_->play_button_; } @@ -550,6 +558,29 @@ EXPECT_FALSE(IsElementVisible(*cast_overlay_button)); } +TEST_F(MediaControlsImplTest, CastButtonVisibilityDependsOnControlslistAttr) { + EnsureSizing(); + + MediaControlCastButtonElement* cast_button = CastButtonElement(); + ASSERT_NE(nullptr, cast_button); + + SimulateRouteAvailable(); + ASSERT_TRUE(IsOverflowElementVisible(*cast_button)); + + MediaControls().MediaElement().setAttribute( + blink::html_names::kControlslistAttr, "noremoteplayback"); + test::RunPendingTasks(); + + // Cast button should not be displayed because of + // controlslist="noremoteplayback". + ASSERT_FALSE(IsOverflowElementVisible(*cast_button)); + + // If the user explicitly shows all controls, that should override the + // controlsList attribute and cast button should be displayed. + MediaControls().MediaElement().SetUserWantsControlsVisible(true); + ASSERT_TRUE(IsOverflowElementVisible(*cast_button)); +} + TEST_F(MediaControlsImplTest, KeepControlsVisibleIfOverflowListVisible) { Element* overflow_list = GetElementByShadowPseudoId( MediaControls(), "-internal-media-controls-overflow-menu-list"); @@ -634,6 +665,77 @@ EXPECT_FALSE(IsOverflowElementVisible(*download_button)); } +TEST_F(MediaControlsImplTest, + DownloadButtonVisibilityDependsOnControlslistAttr) { + EnsureSizing(); + + MediaControlDownloadButtonElement* download_button = DownloadButtonElement(); + ASSERT_NE(nullptr, download_button); + + MediaControls().MediaElement().SetSrc("https://example.com/foo.mp4"); + MediaControls().MediaElement().setAttribute( + blink::html_names::kControlslistAttr, "nodownload"); + test::RunPendingTasks(); + SimulateLoadedMetadata(); + + // Download button should not be displayed because of + // controlslist="nodownload". + EXPECT_FALSE(IsOverflowElementVisible(*download_button)); + + // If the user explicitly shows all controls, that should override the + // controlsList attribute and download button should be displayed. + MediaControls().MediaElement().SetUserWantsControlsVisible(true); + EXPECT_TRUE(IsOverflowElementVisible(*download_button)); +} + +TEST_F(MediaControlsImplTest, + FullscreenButtonDisabledDependsOnControlslistAttr) { + EnsureSizing(); + + MediaControlFullscreenButtonElement* fullscreen_button = + FullscreenButtonElement(); + ASSERT_NE(nullptr, fullscreen_button); + + MediaControls().MediaElement().SetSrc("https://example.com/foo.mp4"); + MediaControls().MediaElement().setAttribute( + blink::html_names::kControlslistAttr, "nofullscreen"); + test::RunPendingTasks(); + SimulateLoadedMetadata(); + + // Fullscreen button should be disabled because of + // controlslist="nofullscreen". + EXPECT_TRUE(fullscreen_button->IsDisabled()); + + // If the user explicitly shows all controls, that should override the + // controlsList attribute and fullscreen button should be enabled. + MediaControls().MediaElement().SetUserWantsControlsVisible(true); + EXPECT_FALSE(fullscreen_button->IsDisabled()); +} + +TEST_F(MediaControlsImplTest, + PlaybackSpeedButtonVisibilityDependsOnControlslistAttr) { + EnsureSizing(); + + MediaControlPlaybackSpeedButtonElement* playback_speed_button = + PlaybackSpeedButtonElement(); + ASSERT_NE(nullptr, playback_speed_button); + + MediaControls().MediaElement().SetSrc("https://example.com/foo.mp4"); + MediaControls().MediaElement().setAttribute( + blink::html_names::kControlslistAttr, "noplaybackrate"); + test::RunPendingTasks(); + SimulateLoadedMetadata(); + + // Fullscreen button should not be displayed because of + // controlslist="noplaybackrate". + EXPECT_FALSE(IsOverflowElementVisible(*playback_speed_button)); + + // If the user explicitly shows all controls, that should override the + // controlsList attribute and playback speed button should be displayed. + MediaControls().MediaElement().SetUserWantsControlsVisible(true); + EXPECT_TRUE(IsOverflowElementVisible(*playback_speed_button)); +} + TEST_F(MediaControlsImplTest, TimelineSeekToRoundedEnd) { EnsureSizing();
diff --git a/third_party/blink/renderer/modules/media_controls/media_controls_shared_helper.cc b/third_party/blink/renderer/modules/media_controls/media_controls_shared_helper.cc index 826f622..6fe841b3 100644 --- a/third_party/blink/renderer/modules/media_controls/media_controls_shared_helper.cc +++ b/third_party/blink/renderer/modules/media_controls/media_controls_shared_helper.cc
@@ -152,7 +152,8 @@ if (!Fullscreen::FullscreenEnabled(media_element.GetDocument())) return false; - if (media_element.ControlsListInternal()->ShouldHideFullscreen()) { + if (media_element.ControlsListInternal()->ShouldHideFullscreen() && + !media_element.UserWantsControlsVisible()) { UseCounter::Count(media_element.GetDocument(), WebFeature::kHTMLMediaElementControlsListNoFullscreen); return false;
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc index 98ae7539..715fb2c1 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc +++ b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
@@ -1463,17 +1463,22 @@ String sdp = session_description_init->sdp(); // https://w3c.github.io/webrtc-pc/#dom-peerconnection-setlocaldescription // step 4.4 and 4.5: If SDP is empty, return the last created offer or answer. - if (sdp.IsNull() || sdp.IsEmpty()) { - if (session_description_init->type() == "offer") { - sdp = last_offer_; - } else if (session_description_init->type() == "answer" || - session_description_init->type() == "pranswer") { - sdp = last_answer_; + if (sdp.IsEmpty()) { + switch (session_description_init->type().AsEnum()) { + case V8RTCSdpType::Enum::kOffer: + sdp = last_offer_; + break; + case V8RTCSdpType::Enum::kPranswer: + case V8RTCSdpType::Enum::kAnswer: + sdp = last_answer_; + break; + case V8RTCSdpType::Enum::kRollback: + break; } } ParsedSessionDescription parsed_sdp = ParsedSessionDescription::Parse(session_description_init->type(), sdp); - if (session_description_init->type() != "rollback") { + if (session_description_init->type() != V8RTCSdpType::Enum::kRollback) { RecordSdpCategoryAndMaybeEmitWarnings(parsed_sdp); ReportSetSdpUsage(SetSdpOperationType::kSetLocalDescription, parsed_sdp); @@ -1517,17 +1522,26 @@ String sdp = session_description_init->sdp(); // https://w3c.github.io/webrtc-pc/#dom-peerconnection-setlocaldescription // step 4.4 and 4.5: If SDP is empty, return the last created offer or answer. - if (sdp.IsNull() || sdp.IsEmpty()) { - if (session_description_init->type() == "offer") { - sdp = last_offer_; - } else if (session_description_init->type() == "answer" || - session_description_init->type() == "pranswer") { - sdp = last_answer_; + if (sdp.IsEmpty() && session_description_init->hasType()) { + switch (session_description_init->type().AsEnum()) { + case V8RTCSdpType::Enum::kOffer: + sdp = last_offer_; + break; + case V8RTCSdpType::Enum::kPranswer: + case V8RTCSdpType::Enum::kAnswer: + sdp = last_answer_; + break; + case V8RTCSdpType::Enum::kRollback: + break; } } - ParsedSessionDescription parsed_sdp = - ParsedSessionDescription::Parse(session_description_init->type(), sdp); - if (session_description_init->type() != "rollback") { + ParsedSessionDescription parsed_sdp = ParsedSessionDescription::Parse( + session_description_init->hasType() + ? session_description_init->type().AsString() + : String(), + sdp); + if (!session_description_init->hasType() || + session_description_init->type() != V8RTCSdpType::Enum::kRollback) { RecordSdpCategoryAndMaybeEmitWarnings(parsed_sdp); ReportSetSdpUsage(SetSdpOperationType::kSetLocalDescription, parsed_sdp); } @@ -1549,7 +1563,8 @@ WebFeature:: kRTCPeerConnectionSetLocalDescriptionLegacyNoFailureCallback); } - if (session_description_init->type() != "rollback") { + if (!session_description_init->hasType() || + session_description_init->type() != V8RTCSdpType::Enum::kRollback) { DOMException* exception = checkSdpForStateErrors(context, parsed_sdp); if (exception) { if (error_callback) @@ -1595,8 +1610,7 @@ ParsedSessionDescription parsed_sdp = ParsedSessionDescription::Parse(session_description_init); if (!session_description_init->hasType() || - session_description_init->type().AsEnum() != - V8RTCSdpType::Enum::kRollback) { + session_description_init->type() != V8RTCSdpType::Enum::kRollback) { RecordSdpCategoryAndMaybeEmitWarnings(parsed_sdp); ReportSetSdpUsage(SetSdpOperationType::kSetRemoteDescription, parsed_sdp); } @@ -1646,7 +1660,8 @@ DCHECK(script_state->ContextIsValid()); ParsedSessionDescription parsed_sdp = ParsedSessionDescription::Parse(session_description_init); - if (session_description_init->type() != "rollback") { + if (!session_description_init->hasType() || + session_description_init->type() != V8RTCSdpType::Enum::kRollback) { RecordSdpCategoryAndMaybeEmitWarnings(parsed_sdp); ReportSetSdpUsage(SetSdpOperationType::kSetRemoteDescription, parsed_sdp); }
diff --git a/third_party/blink/renderer/modules/webtransport/web_transport.cc b/third_party/blink/renderer/modules/webtransport/web_transport.cc index 9b89c9a..9873082 100644 --- a/third_party/blink/renderer/modules/webtransport/web_transport.cc +++ b/third_party/blink/renderer/modules/webtransport/web_transport.cc
@@ -934,15 +934,19 @@ auto* execution_context = GetExecutionContext(); + bool had_csp_failure = false; if (!execution_context->GetContentSecurityPolicyForCurrentWorld() ->AllowConnectToSource(url_, url_, RedirectStatus::kNoRedirect)) { - // TODO(ricea): This error should probably be asynchronous like it is for - // WebSockets and fetch. - exception_state.ThrowSecurityError( + auto dom_exception = V8ThrowDOMException::CreateOrEmpty( + script_state_->GetIsolate(), DOMExceptionCode::kSecurityError, "Failed to connect to '" + url_.ElidedString() + "'", "Refused to connect to '" + url_.ElidedString() + "' because it violates the document's Content Security Policy"); - return; + + ready_resolver_->Reject(dom_exception); + closed_resolver_->Reject(dom_exception); + + had_csp_failure = true; } Vector<network::mojom::blink::WebTransportCertificateFingerprintPtr> @@ -961,18 +965,20 @@ // TODO(ricea): Check the SubresourceFilter and fail asynchronously if // disallowed. Must be done before shipping. - mojo::Remote<mojom::blink::WebTransportConnector> connector; - execution_context->GetBrowserInterfaceBroker().GetInterface( - connector.BindNewPipeAndPassReceiver( - execution_context->GetTaskRunner(TaskType::kNetworking))); + if (!had_csp_failure) { + mojo::Remote<mojom::blink::WebTransportConnector> connector; + execution_context->GetBrowserInterfaceBroker().GetInterface( + connector.BindNewPipeAndPassReceiver( + execution_context->GetTaskRunner(TaskType::kNetworking))); - connector->Connect( - url_, std::move(fingerprints), - handshake_client_receiver_.BindNewPipeAndPassRemote( - execution_context->GetTaskRunner(TaskType::kNetworking))); + connector->Connect( + url_, std::move(fingerprints), + handshake_client_receiver_.BindNewPipeAndPassRemote( + execution_context->GetTaskRunner(TaskType::kNetworking))); - handshake_client_receiver_.set_disconnect_handler( - WTF::Bind(&WebTransport::OnConnectionError, WrapWeakPersistent(this))); + handshake_client_receiver_.set_disconnect_handler( + WTF::Bind(&WebTransport::OnConnectionError, WrapWeakPersistent(this))); + } probe::WebTransportCreated(execution_context, inspector_transport_id_, url_);
diff --git a/third_party/blink/renderer/modules/webtransport/web_transport_test.cc b/third_party/blink/renderer/modules/webtransport/web_transport_test.cc index 351e53cd..4077b68 100644 --- a/third_party/blink/renderer/modules/webtransport/web_transport_test.cc +++ b/third_party/blink/renderer/modules/webtransport/web_transport_test.cc
@@ -375,7 +375,6 @@ TEST_F(WebTransportTest, FailByCSP) { V8TestingScope scope; - auto& exception_state = scope.GetExceptionState(); scope.GetExecutionContext() ->GetContentSecurityPolicyForCurrentWorld() ->AddPolicies(ParseContentSecurityPolicies( @@ -383,13 +382,19 @@ network::mojom::ContentSecurityPolicyType::kEnforce, network::mojom::ContentSecurityPolicySource::kHTTP, *(scope.GetExecutionContext()->GetSecurityOrigin()))); - WebTransport::Create(scope.GetScriptState(), String("https://example.com/"), - EmptyOptions(), exception_state); - EXPECT_TRUE(exception_state.HadException()); - EXPECT_EQ(static_cast<int>(DOMExceptionCode::kSecurityError), - exception_state.Code()); - EXPECT_EQ("Failed to connect to 'https://example.com/'", - exception_state.Message()); + auto* web_transport = WebTransport::Create( + scope.GetScriptState(), String("https://example.com/"), EmptyOptions(), + ASSERT_NO_EXCEPTION); + ScriptPromiseTester ready_tester(scope.GetScriptState(), + web_transport->ready()); + ScriptPromiseTester closed_tester(scope.GetScriptState(), + web_transport->closed()); + + test::RunPendingTasks(); + + EXPECT_FALSE(web_transport->HasPendingActivity()); + EXPECT_TRUE(ready_tester.IsRejected()); + EXPECT_TRUE(closed_tester.IsRejected()); } TEST_F(WebTransportTest, PassCSP) { @@ -397,7 +402,6 @@ // This doesn't work without the https:// prefix, even thought it should // according to // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src. - auto& exception_state = scope.GetExceptionState(); scope.GetExecutionContext() ->GetContentSecurityPolicyForCurrentWorld() ->AddPolicies(ParseContentSecurityPolicies( @@ -405,9 +409,15 @@ network::mojom::ContentSecurityPolicyType::kEnforce, network::mojom::ContentSecurityPolicySource::kHTTP, *(scope.GetExecutionContext()->GetSecurityOrigin()))); - WebTransport::Create(scope.GetScriptState(), String("https://example.com/"), - EmptyOptions(), exception_state); - EXPECT_FALSE(exception_state.HadException()); + auto* web_transport = + CreateAndConnectSuccessfully(scope, "https://example.com/"); + ScriptPromiseTester ready_tester(scope.GetScriptState(), + web_transport->ready()); + + EXPECT_TRUE(web_transport->HasPendingActivity()); + + ready_tester.WaitUntilSettled(); + EXPECT_TRUE(ready_tester.IsFulfilled()); } TEST_F(WebTransportTest, SendConnect) {
diff --git a/third_party/blink/renderer/platform/bindings/enumeration_base.h b/third_party/blink/renderer/platform/bindings/enumeration_base.h index 4159ba6a..5f2fd42 100644 --- a/third_party/blink/renderer/platform/bindings/enumeration_base.h +++ b/third_party/blink/renderer/platform/bindings/enumeration_base.h
@@ -75,7 +75,7 @@ bool> operator==(const EnumTypeClass& lhs, const EnumTypeClass& rhs) { DCHECK(!lhs.IsEmpty() && !rhs.IsEmpty()); - return lhs.AsCStr() == rhs.AsCStr(); + return lhs.AsEnum() == rhs.AsEnum(); } template <typename EnumTypeClass> @@ -83,8 +83,41 @@ std::is_base_of<bindings::EnumerationBase, EnumTypeClass>::value, bool> operator!=(const EnumTypeClass& lhs, const EnumTypeClass& rhs) { - DCHECK(!lhs.IsEmpty() && !rhs.IsEmpty()); - return lhs.AsCStr() != rhs.AsCStr(); + return !(lhs == rhs); +} + +template <typename EnumTypeClass> +typename std::enable_if_t< + std::is_base_of<bindings::EnumerationBase, EnumTypeClass>::value, + bool> +operator==(const EnumTypeClass& lhs, typename EnumTypeClass::Enum rhs) { + DCHECK(!lhs.IsEmpty()); + return lhs.AsEnum() == rhs; +} + +template <typename EnumTypeClass> +typename std::enable_if_t< + std::is_base_of<bindings::EnumerationBase, EnumTypeClass>::value, + bool> +operator==(typename EnumTypeClass::Enum lhs, const EnumTypeClass& rhs) { + DCHECK(!rhs.IsEmpty()); + return lhs == rhs.AsEnum(); +} + +template <typename EnumTypeClass> +typename std::enable_if_t< + std::is_base_of<bindings::EnumerationBase, EnumTypeClass>::value, + bool> +operator!=(const EnumTypeClass& lhs, typename EnumTypeClass::Enum rhs) { + return !(lhs == rhs); +} + +template <typename EnumTypeClass> +typename std::enable_if_t< + std::is_base_of<bindings::EnumerationBase, EnumTypeClass>::value, + bool> +operator!=(typename EnumTypeClass::Enum lhs, const EnumTypeClass& rhs) { + return !(lhs == rhs); } // Migration adapters
diff --git a/third_party/blink/renderer/platform/fonts/font_performance.h b/third_party/blink/renderer/platform/fonts/font_performance.h index 4d4a4e77..25756aa 100644 --- a/third_party/blink/renderer/platform/fonts/font_performance.h +++ b/third_party/blink/renderer/platform/fonts/font_performance.h
@@ -14,6 +14,12 @@ // This class collects performance data for font-related operations. class PLATFORM_EXPORT FontPerformance { public: + static void DidReachFirstContentfulPaint() { + primary_font_ = base::TimeDelta(); + primary_font_in_style_ = base::TimeDelta(); + system_fallback_ = base::TimeDelta(); + } + // The aggregated time spent in |DeterminePrimarySimpleFontData|. static base::TimeDelta PrimaryFontTime() { return primary_font_ + primary_font_in_style_;
diff --git a/third_party/blink/tools/blinkpy/web_tests/models/test_configuration.py b/third_party/blink/tools/blinkpy/web_tests/models/test_configuration.py index 9fbc21c..351ea94b 100644 --- a/third_party/blink/tools/blinkpy/web_tests/models/test_configuration.py +++ b/third_party/blink/tools/blinkpy/web_tests/models/test_configuration.py
@@ -43,10 +43,10 @@ return ['version', 'architecture', 'build_type'] def items(self): - return self.__dict__.items() + return list(self.__dict__.items()) def keys(self): - return self.__dict__.keys() + return list(self.__dict__.keys()) def __str__(self): return ( @@ -63,7 +63,7 @@ def values(self): """Returns the configuration values of this instance as a tuple.""" - return self.__dict__.values() + return list(self.__dict__.values()) class SpecifierSorter(object): @@ -100,7 +100,7 @@ return self._specifier_to_category.get(specifier) def sort_specifiers(self, specifiers): - category_slots = map(lambda x: [], TestConfiguration.category_order()) + category_slots = [[] for x in TestConfiguration.category_order()] for specifier in specifiers: category_slots[self.specifier_priority(specifier)].append( specifier) @@ -177,7 +177,7 @@ matching_sets.setdefault(category, set()).update(configurations) - return reduce(set.intersection, matching_sets.values()) + return reduce(set.intersection, list(matching_sets.values())) @classmethod def collapse_macros(cls, macros_dict, specifiers_list): @@ -276,7 +276,7 @@ # 3) Abbreviate specifier sets by combining specifiers across categories. # (win7, release), (win10, release) --> (win7, win10, release) - while try_abbreviating(self._collapsing_sets_by_size.values()): + while try_abbreviating(list(self._collapsing_sets_by_size.values())): pass # 4) Substitute specifier subsets that match macros within each set:
diff --git a/third_party/blink/tools/blinkpy/web_tests/models/test_expectations.py b/third_party/blink/tools/blinkpy/web_tests/models/test_expectations.py index 2967c55..a9d19cd 100644 --- a/third_party/blink/tools/blinkpy/web_tests/models/test_expectations.py +++ b/third_party/blink/tools/blinkpy/web_tests/models/test_expectations.py
@@ -37,6 +37,7 @@ from blinkpy.common.memoized import memoized from blinkpy.web_tests.models import typ_types from typ import expectations_parser +from functools import reduce ResultType = typ_types.ResultType @@ -233,9 +234,9 @@ if lineno_to_exps: lines.append(_NotExpectation('', len(content_lines) + 1)) - for line in sorted( - reduce(lambda x,y: x+y, lineno_to_exps.values()), - key=lambda e: e.test): + for line in sorted(reduce(lambda x, y: x + y, + list(lineno_to_exps.values())), + key=lambda e: e.test): if line.lineno: raise ValueError( "Expectation '%s' was given a line number that " @@ -345,7 +346,7 @@ trailing_comments=trailing_comments) def get_expectations_from_file(self, path, test_name): - idx = self._expectations_dict.keys().index(path) + idx = list(self._expectations_dict.keys()).index(path) return copy.deepcopy( self._expectations[idx].individual_exps.get(test_name) or []) @@ -435,7 +436,7 @@ path: Absolute path of file where the Expectation instances came from. exps: List of Expectation instances to be deleted.""" - idx = self._expectations_dict.keys().index(path) + idx = list(self._expectations_dict.keys()).index(path) typ_expectations = self._expectations[idx] for exp in exps: @@ -458,7 +459,7 @@ exps: List of Expectation instances to be added to the file. lineno: Line number in expectations file where the expectations will be added.""" - idx = self._expectations_dict.keys().index(path) + idx = list(self._expectations_dict.keys()).index(path) typ_expectations = self._expectations[idx] added_glob = False @@ -483,7 +484,7 @@ if added_glob: glob_exps = reduce(lambda x, y: x + y, - typ_expectations.glob_exps.values()) + list(typ_expectations.glob_exps.values())) glob_exps.sort(key=lambda e: len(e.test), reverse=True) typ_expectations.glob_exps = OrderedDict() for exp in glob_exps: @@ -500,16 +501,17 @@ def __init__(self, test_expectations): self._test_expectations = test_expectations self._configuration_specifiers_dict = {} - for os, os_versions in (self._test_expectations.port. - configuration_specifier_macros().items()): + for os, os_versions in (list( + self._test_expectations.port.configuration_specifier_macros( + ).items())): self._configuration_specifiers_dict[os.lower()] = (frozenset( version.lower() for version in os_versions)) self._os_specifiers = frozenset( os for os in self._configuration_specifiers_dict.keys()) self._version_specifiers = frozenset( - specifier.lower() for specifier in reduce( - lambda x, y: x | y, self._configuration_specifiers_dict. - values())) + specifier.lower() for specifier in + reduce(lambda x, y: x | y, + list(self._configuration_specifiers_dict.values()))) self._deleted_lines = set() self._generic_exp_file_path = \ self._test_expectations.port.path_to_generic_test_expectations_file()
diff --git a/third_party/blink/tools/blinkpy/web_tests/models/test_expectations_unittest.py b/third_party/blink/tools/blinkpy/web_tests/models/test_expectations_unittest.py index ad8f0dd..c45b924 100644 --- a/third_party/blink/tools/blinkpy/web_tests/models/test_expectations_unittest.py +++ b/third_party/blink/tools/blinkpy/web_tests/models/test_expectations_unittest.py
@@ -37,6 +37,8 @@ from blinkpy.web_tests.models.test_expectations import ( TestExpectations, SystemConfigurationRemover, ParseError) from blinkpy.web_tests.models.typ_types import ResultType, Expectation +from six.moves import range +from functools import reduce class Base(unittest.TestCase): @@ -464,7 +466,7 @@ self.set_up_using_raw_expectations(raw_expectations) all_versions = reduce( lambda x, y: x + y, - self._port.configuration_specifier_macros_dict.values()) + list(self._port.configuration_specifier_macros_dict.values())) self._system_config_remover.remove_os_versions( 'failures/expected/text.html', all_versions) self._system_config_remover.update_expectations() @@ -484,7 +486,7 @@ self.set_up_using_raw_expectations(raw_expectations) all_versions = reduce( lambda x, y: x + y, - self._port.configuration_specifier_macros_dict.values()) + list(self._port.configuration_specifier_macros_dict.values())) self._system_config_remover.remove_os_versions( 'failures/expected/text.html', all_versions) self._system_config_remover.update_expectations()
diff --git a/third_party/blink/tools/blinkpy/web_tests/models/test_failures_unittest.py b/third_party/blink/tools/blinkpy/web_tests/models/test_failures_unittest.py index 1b8dbff..acf0111 100644 --- a/third_party/blink/tools/blinkpy/web_tests/models/test_failures_unittest.py +++ b/third_party/blink/tools/blinkpy/web_tests/models/test_failures_unittest.py
@@ -102,7 +102,7 @@ test_failure.result_directory = '/dir' pass_with_stderr = PassWithStderr( - DriverOutput(None, None, None, None, error='pass with stderr')) + DriverOutput(None, None, None, None, error=b'pass with stderr')) init_test_failure(pass_with_stderr) crash = FailureCrash( DriverOutput(None, @@ -110,10 +110,10 @@ None, None, crash=True, - error='crash stderr')) + error=b'crash stderr')) init_test_failure(crash) timeout = FailureTimeout( - DriverOutput(None, None, None, None, error='timeout with stderr')) + DriverOutput(None, None, None, None, error=b'timeout with stderr')) init_test_failure(timeout) pass_with_stderr.create_artifacts(artifacts)
diff --git a/third_party/blink/web_tests/FlagExpectations/enable-features=BackForwardCache b/third_party/blink/web_tests/FlagExpectations/enable-features=BackForwardCache index 073cad1..664a396 100644 --- a/third_party/blink/web_tests/FlagExpectations/enable-features=BackForwardCache +++ b/third_party/blink/web_tests/FlagExpectations/enable-features=BackForwardCache
@@ -4,7 +4,6 @@ # Tests that are not compatible with same-site back-forward cache. To run these # tests, we have to disable same-site back-forward cache. -crbug.com/1132180 http/tests/history/cross-origin-redirect-on-back.html [ Skip ] crbug.com/1132180 http/tests/history/dynamic-frame-creation-order-inline-scripts.html [ Skip ] crbug.com/1132180 http/tests/history/dynamic-frame-creation-order-onload-handler.html [ Skip ] crbug.com/1132180 http/tests/misc/resource-timing-iframe-restored-from-history.html [ Skip ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index ebf4b2f..605c4e4 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -2621,6 +2621,8 @@ crbug.com/626703 external/wpt/service-workers/service-worker/worker-interception.https.html [ Failure ] # ====== New tests from wpt-importer added here ====== +crbug.com/626703 external/wpt/css/css-ruby/improperly-contained-annotation-001.html [ Failure ] +crbug.com/626703 [ Mac10.14 ] virtual/off-main-thread-css-paint/external/wpt/css/css-paint-api/valid-image-after-load.https.html [ Failure ] crbug.com/626703 external/wpt/css/css-ruby/ruby-base-container-abs.html [ Failure ] crbug.com/626703 external/wpt/css/css-ruby/empty-ruby-base-container.html [ Failure ] crbug.com/626703 [ Mac11.0 ] virtual/threaded/external/wpt/animation-worklet/worklet-animation-local-time-null-2.https.html [ Failure ] @@ -4119,35 +4121,17 @@ crbug.com/618969 external/wpt/css/css-grid/subgrid/* [ Skip ] ### Tests failing with SVGTextNG enabled: -crbug.com/1179585 virtual/layout_ng_svg_text/paint/invalidation/svg/ems-display-none.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/paint/invalidation/svg/exs-display-none.svg [ Failure ] -crbug.com/1179585 [ Mac ] virtual/layout_ng_svg_text/paint/invalidation/svg/modify-transferred-listitem-different-attr.html [ Failure ] -crbug.com/1179585 [ Mac ] virtual/layout_ng_svg_text/paint/invalidation/svg/repaint-non-scaling-stroke-text.html [ Failure ] -crbug.com/1179585 [ Mac ] virtual/layout_ng_svg_text/paint/invalidation/svg/repaint-non-scaling-stroke-text-decoration.html [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/paint/invalidation/svg/text-match-svg.html [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/paint/invalidation/svg/transform-text-element.html [ Failure Pass ] -crbug.com/1179585 [ Mac ] virtual/layout_ng_svg_text/paint/invalidation/svg/tspan-dynamic-positioning.svg [ Failure ] -crbug.com/1179585 [ Mac ] virtual/layout_ng_svg_text/paint/invalidation/svg/use-detach.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/smallFonts.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textDecoration.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textDecoration2.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textFeatures.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/batik/text/textProperties.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/css/text-shadow-multiple.xhtml [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/custom/empty-mask.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/custom/gradient-userSpaceOnUse-with-percentage.svg [ Pass Skip ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/custom/svg-root-with-opacity.html [ Failure Pass ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/custom/text-match-highlight.html [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/custom/visibility-collapse.html [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/dom/undefined-null.html [ Crash Pass ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/dynamic-updates/SVGTextElement-dom-lengthAdjust-attr.html [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/dynamic-updates/SVGTextElement-dom-transform-attr.html [ Failure Pass ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/dynamic-updates/SVGTextElement-svgdom-lengthAdjust-prop.html [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/filters/feComponentTransfer-style-crash.xhtml [ Pass ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/filters/filter-on-tspan.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/hittest/text-multiple-dx-values.svg [ Failure Pass ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/masking/mask-of-root.html [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/stroke/non-scaling-stroke-text-decoration.html [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/stroke/non-scaling-stroke-text-decoration-dashed.html [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/bbox-with-glyph-overflow.html [ Failure ] @@ -4155,17 +4139,10 @@ crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/bbox-with-glyph-overflow-zoomed.html [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/bidi-dir-rtl.html [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/bidi-embedded-direction.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/columns-do-not-apply.html [ Failure Pass ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/getextentofchar-nonbmp.html [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/non-invertible-matrix-text.svg [ Failure Pass ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/selection-background-color.xhtml [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/selection-styles.xhtml [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/surrogate-pair-attribute-positions.html [ Failure Pass ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/text-decorations-in-scaled-pattern.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/textPathBoundsBug.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/text-selection-deco-01-b.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/text-selection-text-03-b.svg [ Failure ] -crbug.com/1179585 virtual/layout_ng_svg_text/svg/text/text-with-geometric-precision.svg [ Skip ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/transforms/text-with-mask-with-svg-transform.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/W3C-SVG-1.1/masking-mask-01-b.svg [ Failure ] crbug.com/1179585 virtual/layout_ng_svg_text/svg/W3C-SVG-1.1/text-deco-01-b.svg [ Failure ] @@ -7255,3 +7232,4 @@ # Sheriff 2021-08-02 crbug.com/1235685 [ Mac10.14 ] virtual/scroll-unification/plugins/focus-change-4-change-focus-and-blur.html [ Failure Pass ] +crbug.com/1215390 [ Linux ] external/wpt/pointerevents/pointerevent_pointerId_scope.html [ Failure Pass ]
diff --git a/third_party/blink/web_tests/editing/input/password-echo-passnode-expected.txt b/third_party/blink/web_tests/editing/input/password-echo-passnode-expected.txt index e517912..c2f53df 100644 --- a/third_party/blink/web_tests/editing/input/password-echo-passnode-expected.txt +++ b/third_party/blink/web_tests/editing/input/password-echo-passnode-expected.txt
@@ -1,6 +1,6 @@ Tests if input chars are secured correctly -Success: secured right after. expected=false, actual=false +Success: secured right after. expected=true, actual=true Success: secured after delay. expected=true, actual=true -Success: secured right after. expected=false, actual=false +Success: secured right after. expected=true, actual=true Success: secured after delay. expected=true, actual=true
diff --git a/third_party/blink/web_tests/editing/input/password-echo-passnode.html b/third_party/blink/web_tests/editing/input/password-echo-passnode.html index c9141f4d..7f703040 100644 --- a/third_party/blink/web_tests/editing/input/password-echo-passnode.html +++ b/third_party/blink/web_tests/editing/input/password-echo-passnode.html
@@ -3,8 +3,8 @@ <script language="javascript" type="text/javascript"> var mytests = [ //format: [preedit1, preedit2,...,commit_text], secured_right_after?, secured_after_delay? check? - [['a'], false, true, true], // test password (when only 1 char) is only secured after a delay(regular). - [['2','2','b'], false, true, true], // test password (when only 1 char) is only secured after a delay(ime). + [['a'], true, true, true], // test password (when only 1 char) is always secured(regular). + [['2','2','b'], true, true, true], // test password (when only 1 char) is always secured(ime). ]; </script> <body onload=init(mytests)>
diff --git a/third_party/blink/web_tests/editing/input/password-echo-passnode2-expected.txt b/third_party/blink/web_tests/editing/input/password-echo-passnode2-expected.txt index e517912..c2f53df 100644 --- a/third_party/blink/web_tests/editing/input/password-echo-passnode2-expected.txt +++ b/third_party/blink/web_tests/editing/input/password-echo-passnode2-expected.txt
@@ -1,6 +1,6 @@ Tests if input chars are secured correctly -Success: secured right after. expected=false, actual=false +Success: secured right after. expected=true, actual=true Success: secured after delay. expected=true, actual=true -Success: secured right after. expected=false, actual=false +Success: secured right after. expected=true, actual=true Success: secured after delay. expected=true, actual=true
diff --git a/third_party/blink/web_tests/editing/input/password-echo-passnode2.html b/third_party/blink/web_tests/editing/input/password-echo-passnode2.html index fd1ebf80..5ed6d07a 100644 --- a/third_party/blink/web_tests/editing/input/password-echo-passnode2.html +++ b/third_party/blink/web_tests/editing/input/password-echo-passnode2.html
@@ -3,9 +3,9 @@ <script language="javascript" type="text/javascript"> var mytests = [ //format: [preedit1, preedit2,...,commit_text], secured_right_after?, secured_after_delay? check? - [['a'], false, true, false], - [['f'], false, true, true], // test password (when more than 1 char) is only secured after a delay(regular). - [['3','3','3','f'], false, true, true], // test password (when more than 1 char) is only secured after a delay(ime). + [['a'], true, true, false], + [['f'], true, true, true], // test password (when more than 1 char) is always secured(regular). + [['3','3','3','f'], true, true, true], // test password (when more than 1 char) is always secured(ime). ]; </script> <body onload=init(mytests)> @@ -15,4 +15,3 @@ <ul id="console"></ul> </body> </html> -
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json index d289d7e..1017a7db 100644 --- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json +++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json
@@ -77485,7 +77485,7 @@ ] ], "out-of-flow-in-multicolumn-044.html": [ - "4c2b9c9af74143a0a2eff4e68910c3e6e77ad855", + "d06f4040fb4865eb51e81f2a5b6526b8874394c4", [ null, [ @@ -77809,6 +77809,19 @@ {} ] ], + "out-of-flow-in-multicolumn-073.html": [ + "57093e2264a39d49b9dd107b710d45058da95995", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "overflow-clip-000.html": [ "72b10f5cdd3092a042f1f90bff04e9428d61608e", [ @@ -103570,6 +103583,19 @@ {} ] ], + "system-ui.html": [ + "8ad66aeb89cb71af8c8121ecab294af1bb3488cb", + [ + null, + [ + [ + "/css/css-fonts/system-ui-notref.html", + "!=" + ] + ], + {} + ] + ], "test-synthetic-italic-2.html": [ "6e8910e22c86c309de1403060f9a5061dbbf571c", [ @@ -122204,6 +122230,32 @@ {} ] ], + "fixedpos-static-pos-with-viewport-cb-001.html": [ + "8b71999a23b7aafd9e720cc7496444d03e475a39", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "fixedpos-static-pos-with-viewport-cb-002.html": [ + "c2afef38aa2c58de083f4fc000d537c31e506ff4", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "float-and-block.html": [ "21f9fb97436be415dfad77a83f2c1f085dbc0700", [ @@ -128733,7 +128785,7 @@ "multicol": { "static-position": { "vlr-ltr-ltr-in-multicol.html": [ - "173ba5a7b5d5fe8cad1e71bee1cbab4cb66b16d0", + "45de6ffb421d9bfa70a0ab4e262b4192f4275dba", [ null, [ @@ -128746,7 +128798,7 @@ ] ], "vlr-ltr-rtl-in-multicol.tentative.html": [ - "dc9daf48bf04368e17e3ef746a2e4ecba8d294e5", + "9cb6c26e9c43194f912846a7c6b25173fb812b0d", [ null, [ @@ -128759,7 +128811,7 @@ ] ], "vlr-rtl-ltr-in-multicol.tentative.html": [ - "8b30512dd28692e302d3fafd042ee71362c8e50e", + "5a094987ba8f2c1e326b45ced25bf706cfd14e43", [ null, [ @@ -128772,7 +128824,7 @@ ] ], "vlr-rtl-rtl-in-multicol.html": [ - "6e9702f613327776ea14e8c5ef516de3ba489d5a", + "e7c4088aa4347ac409adeac0af89a7fa3c62ec28", [ null, [ @@ -128785,7 +128837,7 @@ ] ], "vrl-ltr-ltr-in-multicol.html": [ - "8ceae518cb11c67cbc8f921954f3d780cd3d77fe", + "ae5059ce787c4a1fa1a0d657415642bf2d644ac3", [ null, [ @@ -128798,7 +128850,7 @@ ] ], "vrl-ltr-rtl-in-multicol.tentative.html": [ - "9d2ef3d71a7cc94af3d8b229a259418ca61f9dc4", + "44bf087765d83d63687244ab4e2209a611842844", [ null, [ @@ -128811,7 +128863,7 @@ ] ], "vrl-rtl-ltr-in-multicol.tentative.html": [ - "871d755f66576ad85a808ad3d50e8d703e4f3300", + "3cf8e6728e952d66a577ba7b0923990949fdedf5", [ null, [ @@ -128824,7 +128876,7 @@ ] ], "vrl-rtl-rtl-in-multicol.html": [ - "e239dc51d6162fa1e27ae6666f7e2e085700fa7a", + "a13f1cf3e91eb48821b00163837418ed333315bb", [ null, [ @@ -129228,6 +129280,19 @@ {} ] ], + "position-absolute-fit-content.html": [ + "a84cc043811607df5bb22f06d769701927631512", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "position-absolute-iframe-print-001.sub.html": [ "a873e1be7f29be5ef75855da8999211a639c87d4", [ @@ -130036,7 +130101,7 @@ ] ], "vlr-ltr-ltr.html": [ - "aa929a7b5085a72acdde7b05b49d9f452fc373e8", + "992bb720f4ce34f8aa7f56391f8734ec3c392169", [ null, [ @@ -130049,7 +130114,7 @@ ] ], "vlr-ltr-rtl.tentative.html": [ - "c423d18c639fdad7951de7310b978173b8e0fd4a", + "9491fb89a2286c318d496d9b2a978016b499249b", [ null, [ @@ -130062,7 +130127,7 @@ ] ], "vlr-rtl-ltr.tentative.html": [ - "1a0ab006e39a2a4a1967e7c76a2efc51e6f137cf", + "e334ff74b8f9bfce07d6fdaba0b3c1e678ddf6fa", [ null, [ @@ -130075,7 +130140,7 @@ ] ], "vlr-rtl-rtl.html": [ - "ead69bba1f9f494f22cf08f9c964e512aa5d658c", + "45c8aa3c2675dbf35c2b49d4aad15edb297d201b", [ null, [ @@ -130088,7 +130153,7 @@ ] ], "vrl-ltr-ltr.html": [ - "e22bf64cc19fd8801570d7c1827296637b4d34ee", + "9e3c1306abf91be191e3df2b48acc971d179c4cd", [ null, [ @@ -130101,7 +130166,7 @@ ] ], "vrl-ltr-rtl.tentative.html": [ - "f38a90bdd6697d8b285f20ff0a75683d7ba401a2", + "a0923f3b48bb5db0cacb9299d24422d13a2118ab", [ null, [ @@ -130114,7 +130179,7 @@ ] ], "vrl-rtl-ltr.tentative.html": [ - "bf95d6bd5b3259b9641b608e4a6c2a0fb47b75ea", + "29ae6a5f98f40504b56efcf15765dc76cdfec15a", [ null, [ @@ -130127,7 +130192,7 @@ ] ], "vrl-rtl-rtl.html": [ - "c341531b706b5749342c3c99c6c0b70a8b13e37d", + "cfb411871897677f16ad7f01ea7a1f8139850b6d", [ null, [ @@ -132602,6 +132667,19 @@ {} ] ], + "improperly-contained-annotation-001.html": [ + "6231dce9e7b561a02fd0c46a92328793c8febfca", + [ + null, + [ + [ + "/css/css-ruby/reference/improperly-contained-annotation-001-ref.html", + "==" + ] + ], + {} + ] + ], "root-block-ruby.xhtml": [ "51ac507c3bec74bff8650965b327089e4d9853ce", [ @@ -137494,6 +137572,19 @@ {} ] ], + "abspos-021.html": [ + "c44b29c4b3b08e778503dc8c0e4dd4f8271e2a16", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "auto-margins-001.html": [ "9e89ab6ca7f5220ea030aa537bcb3b64f156043d", [ @@ -142539,6 +142630,19 @@ {} ] ], + "percent-height-replaced-in-percent-cell-002.html": [ + "78d4b0be1d2551972b6d5476ddf46b3da4819379", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], "percent-height-replaced-in-percent-cell.tentative.html": [ "ed5effa8a755d9533054e0b6005900305735b3d6", [ @@ -190079,6 +190183,19 @@ {} ] ], + "first-letter-flag-001.html": [ + "dc23dda1741b154a7af3f48677b0fbe0744d06d4", + [ + null, + [ + [ + "/css/selectors/first-letter-flag-001-ref.html", + "==" + ] + ], + {} + ] + ], "first-line-bidi-001.html": [ "608a0cabd538ddfd01c7a55f1d8f5d91e633e51b", [ @@ -201857,6 +201974,19 @@ ], {} ] + ], + "underover-stretchy-001.html": [ + "833eb9f02edda443cecdf3183bd90e88b0c4ca5f", + [ + null, + [ + [ + "/mathml/presentation-markup/scripts/underover-stretchy-001-ref.html", + "==" + ] + ], + {} + ] ] }, "spaces": { @@ -229870,7 +230000,7 @@ [] ], "font-family-valid-expected.txt": [ - "30d61bea11f3f7a49ff0c9770c85bca6d9738305", + "37685b30cd5e8020c6de44a2fbaf5b53284281b9", [] ], "font-language-override-computed-expected.txt": [ @@ -236108,6 +236238,10 @@ [] ] }, + "system-ui-notref.html": [ + "244f74d4fc1458221c72347d1813941e35cb35ec", + [] + ], "test-synthetic-italic-2-ref.html": [ "d3165b681c86dbe8b0aff6d91df56a9369d2127b", [] @@ -241638,11 +241772,11 @@ [] ], "vlr-ref.html": [ - "2dc2012f0466c4cd2fd8f3d98da3a6e52af90070", + "2ab92decd37d551ea9061055a4102f08e564fe33", [] ], "vrl-ref.html": [ - "31be2b52cd982bc696b0377b60461870ffcc0b58", + "5e607dbb8685802a1d4365b7f4fb59b7979499ab", [] ] }, @@ -242386,6 +242520,12 @@ [] ] }, + "reference": { + "improperly-contained-annotation-001-ref.html": [ + "72a55541bcba241cdced59588e46118a40c8528c", + [] + ] + }, "root-ruby-ref.xhtml": [ "9edd7e3601d3c90f8af670ad81a9dcc2e1ebe5b1", [] @@ -242681,7 +242821,7 @@ [] ], "overflowing-snap-areas-expected.txt": [ - "fd979042a2ff91cd9f0befb9e23a1d5564ce3df8", + "949de2fde4dc7ce2214614dfd6607839b9580b67", [] ], "scroll-margin-visibility-check-expected.txt": [ @@ -256234,6 +256374,10 @@ } } }, + "first-letter-flag-001-ref.html": [ + "7643368305c3dbd1c536c2eeb2131443935ed2a6", + [] + ], "first-line-bidi-001-ref.html": [ "beb6caf5c4714fcc8ddb52132376081b812ed044", [] @@ -261224,19 +261368,19 @@ [] ], "request-upload.any-expected.txt": [ - "279a40fa0c5555c05277f0c10371a2a60ec103a3", + "0e981bdd1afe9f66acdd2f47c1e8dc23cc9cd963", [] ], "request-upload.any.serviceworker-expected.txt": [ - "8dbbac8fcd76eb7793c147b60e03ffd34ea77013", + "14ad958723a641b06b3dd096a3e0a5f9cb1fe9c5", [] ], "request-upload.any.sharedworker-expected.txt": [ - "279a40fa0c5555c05277f0c10371a2a60ec103a3", + "14ad958723a641b06b3dd096a3e0a5f9cb1fe9c5", [] ], "request-upload.any.worker-expected.txt": [ - "279a40fa0c5555c05277f0c10371a2a60ec103a3", + "14ad958723a641b06b3dd096a3e0a5f9cb1fe9c5", [] ] }, @@ -263701,7 +263845,7 @@ [] ], "stretchy.woff": [ - "f5a2c4a00c9d57f5e1f9894246ede33fec7c563d", + "fc1b75c948d460b5f6061122bca29b4ad737fc79", [] ], "underover-accentbaseheight4000-overbarextraascender3000.woff": [ @@ -275977,18 +276121,10 @@ "c1dac735ceade2af73c23179e0e9a7c668985274", [] ], - "116-expected.txt": [ - "eb072edc5011fd9dbe28d5aa562be8afb5e85c06", - [] - ], "128-expected.txt": [ "4c6504ee207535b1b97fb81e196c5eb8a3aa075b", [] ], - "146-expected.txt": [ - "8a61a7e534064be01350c19050ac244b4338f186", - [] - ], "148-expected.txt": [ "bc08031fe89cbc5237632dedbd38cd0aa519d34d", [] @@ -276023,7 +276159,7 @@ [] ], "find-body.js": [ - "22e1050ffc3e3e11caf217e24804b6f344ce552c", + "1ce198f13edb3792a03d517beff7de172f264539", [] ], "find-foo.js": [ @@ -276432,7 +276568,7 @@ [] ], "inline-event-handlers-UA-code.js": [ - "eaf98f3807feffcc5d8ebf50eeef8093b0a7c1f6", + "3202ce47b921c214c66348de0ef72315b482f48a", [] ], "no-active-script.js": [ @@ -276440,7 +276576,7 @@ [] ], "reflected-inline-event-handlers.js": [ - "402219d0b4c214f9f50341d52480407658df35a1", + "923eb7d8b616052377967ff35e980c1b3752122e", [] ], "setTimeout.js": [ @@ -276448,6 +276584,22 @@ [] ] }, + "string-compilation-base-url-external-classic-expected.txt": [ + "8e4257e6682af578dac8a8457b19d25cffc55f3d", + [] + ], + "string-compilation-base-url-external-module-expected.txt": [ + "8e4257e6682af578dac8a8457b19d25cffc55f3d", + [] + ], + "string-compilation-base-url-inline-classic-expected.txt": [ + "bb78d071c2901beea3abf504010e1caaf555e8b4", + [] + ], + "string-compilation-base-url-inline-module-expected.txt": [ + "bb78d071c2901beea3abf504010e1caaf555e8b4", + [] + ], "string-compilation-nonce-classic-expected.txt": [ "28dd27104b71556f86d41664e7d30eaf6dff3f74", [] @@ -276691,14 +276843,6 @@ "e317b01cc21307aae297fa75aa864bc8fc13bb34", [] ], - "instantiation-error-3-expected.txt": [ - "1b30fce3bb5dfa5676796f14e7131f20e29023b9", - [] - ], - "instantiation-error-4-expected.txt": [ - "fdde0fa534cfde0e5bea2b572b8331cdadd77f3b", - [] - ], "instantiation-error-4a.js": [ "6fed27f1c7ba4d5b834e1285dda65df71c957851", [] @@ -276715,10 +276859,6 @@ "ac04ccb9b349022530647c8d496f863487272ac9", [] ], - "instantiation-error-5-expected.txt": [ - "d603140821e44b1edd5e5aa93cdfdac405e0dc5f", - [] - ], "instantiation-error-5a.js": [ "b2e6b106b212b26f9b906daae18af71dd7014bad", [] @@ -281406,6 +281546,10 @@ "underover-parameters-4.tentative-expected.txt": [ "7ca753da6662a38a0d6ca324d78ee129c892ac42", [] + ], + "underover-stretchy-001-ref.html": [ + "89ac9c63246163bebfd71d98a7b3129b27ae8fa8", + [] ] }, "spaces": { @@ -281881,7 +282025,7 @@ [] ], "stretchy.py": [ - "f6a42b01e47b96a11716ffd836facee14fd5cd43", + "95ec4bb27cffd29ef7a5a3e1be474d5062f869f0", [] ], "underover.py": [ @@ -296088,7 +296232,7 @@ [] ], "RTCRtpTransceiver.https-expected.txt": [ - "d7dae0f9210361eae456b249de4d8b0719154fbb", + "cba73637158287119471b23117bf859f98019ea4", [] ], "RTCStats-helper.js": [ @@ -335857,6 +336001,13 @@ {} ] ], + "fallback-remote-to-data-url.html": [ + "2f63312494e77239fd5da28300145ad25888b202", + [ + null, + {} + ] + ], "fallback-url-to-local.html": [ "c30af93d149e1df045c53e2403ad3a4c56dd6ce3", [ @@ -336017,7 +336168,7 @@ ] ], "font-family-valid.html": [ - "2dafcc684569a9ea2b8b455ab23644ba7bd1da52", + "ceaa9a0d14446e8ffd12a5926590b40ec62a4ca8", [ null, {} @@ -343689,7 +343840,7 @@ ] ], "overflowing-snap-areas.html": [ - "c1b4e25c5776d24a866dc40d54395786459bfaed", + "08aff5ebaebf71d7a4683dd53aa2b5d9a14a8f30", [ null, {} @@ -378385,7 +378536,7 @@ ] ], "request-upload.any.js": [ - "ac2345d0eb91abe0b8196b7b32b92b9959b7d578", + "6da2c8a38c3cbc325c23cd2cc9609f2275cd20f6", [ "fetch/api/basic/request-upload.any.html", { @@ -425585,8 +425736,15 @@ {} ] ], + "146-href.html": [ + "6c0869db541a1b11bc21fc1a9d1b6790771e6a1e", + [ + null, + {} + ] + ], "146.html": [ - "9cf6bb7b7ba3548f0d51083ddbc2700f03a9d216", + "333ac3fa0fdbc342b16bc0291a0654b55f5146bb", [ null, {} @@ -426264,28 +426422,28 @@ ] ], "string-compilation-base-url-external-classic.html": [ - "7cf2dac0ac6e9c48eeae2151fba12165f5729b2f", + "855705e5859ff135fd20cc09343a751176db8a42", [ null, {} ] ], "string-compilation-base-url-external-module.html": [ - "73986c2c9970cae1bb4d227d32b0e3ea4f833415", + "d90af9c96abaccf3e7509a05a28524eadf6d4e5b", [ null, {} ] ], "string-compilation-base-url-inline-classic.html": [ - "1bd6d7dfd7560b7c52714ee52b0dac7b31342568", + "2fe1f755358e2b1123d99573d792f0cee38571f7", [ null, {} ] ], "string-compilation-base-url-inline-module.html": [ - "f5b85740f5550c261fb615f81084570ff5ea4905", + "1691550ecb152f87f6bec0d528df5b36268f04bf", [ null, {} @@ -426565,21 +426723,21 @@ ] ], "instantiation-error-3.html": [ - "8fa2b8b8d3fc3f895deafd62e248bd193f653390", + "32f0a4a243e701e747db9a9cfa0c8c6a6bc7e032", [ null, {} ] ], "instantiation-error-4.html": [ - "238e8832c00992a2da4e0103ecdd3327dff9bd14", + "8d3f23819a1d82077896f7916f2c429c1c978572", [ null, {} ] ], "instantiation-error-5.html": [ - "de2b6ba7b348c6eefe09a6ac39599f4980a9ec0b", + "20df0bb5c96f05c6e6a527bbb9f9ae1415159ed5", [ null, {} @@ -432476,7 +432634,7 @@ ] ], "inert-retargeting-iframe.tentative.html": [ - "d363adc20bc9411945f50c82e29df038453f0193", + "579fc57be258a709a9d22cb263a6422d9bdb7953", [ null, {
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/parsing/font-family-valid-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-fonts/parsing/font-family-valid-expected.txt index 30d61bea..37685b3 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/parsing/font-family-valid-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/parsing/font-family-valid-expected.txt
@@ -4,7 +4,8 @@ PASS e.style['font-family'] = "Cursive" should set the property value PASS e.style['font-family'] = "Fantasy" should set the property value PASS e.style['font-family'] = "Monospace" should set the property value -PASS e.style['font-family'] = "serif, sans-serif, cursive, fantasy, monospace" should set the property value +FAIL e.style['font-family'] = "System-UI" should set the property value assert_equals: serialization should be canonical expected "system-ui" but got "System-UI" +PASS e.style['font-family'] = "serif, sans-serif, cursive, fantasy, monospace, system-ui" should set the property value PASS e.style['font-family'] = "Helvetica, Verdana, sans-serif" should set the property value PASS e.style['font-family'] = "\"New Century Schoolbook\", serif" should set the property value PASS e.style['font-family'] = "'21st Century', fantasy" should set the property value
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/parsing/font-family-valid.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/parsing/font-family-valid.html index 2dafcc6..ceaa9a0d 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-fonts/parsing/font-family-valid.html +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/parsing/font-family-valid.html
@@ -16,7 +16,8 @@ test_valid_value('font-family', 'Cursive', 'cursive'); test_valid_value('font-family', 'Fantasy', 'fantasy'); test_valid_value('font-family', 'Monospace', 'monospace'); -test_valid_value('font-family', 'serif, sans-serif, cursive, fantasy, monospace'); +test_valid_value('font-family', 'System-UI', 'system-ui'); +test_valid_value('font-family', 'serif, sans-serif, cursive, fantasy, monospace, system-ui'); test_valid_value('font-family', 'Helvetica, Verdana, sans-serif'); test_valid_value('font-family', '"New Century Schoolbook", serif');
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/system-ui-notref.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/system-ui-notref.html new file mode 100644 index 0000000..244f74d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/system-ui-notref.html
@@ -0,0 +1,9 @@ +<!doctype html> +<title>CSS Test Reference</title> +<link rel="stylesheet" href="/fonts/ahem.css"> +<style> +p { + font-family: Ahem; +} +</style> +<p>ABC</p>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/system-ui.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/system-ui.html new file mode 100644 index 0000000..8ad66aeb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/system-ui.html
@@ -0,0 +1,13 @@ +<!doctype html> +<title>Tests that system-ui font-family works</title> +<link rel="help" href="https://drafts.csswg.org/css-fonts/#system-ui-def"> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<link rel="mismatch" href="system-ui-notref.html"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<style> +p { + font-family: system-ui, Ahem; +} +</style> +<p>ABC</p>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-pseudo/first-letter-punctuation-dynamic-ref.html b/third_party/blink/web_tests/external/wpt/css/css-pseudo/first-letter-punctuation-dynamic-ref.html new file mode 100644 index 0000000..c02b8bfbb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-pseudo/first-letter-punctuation-dynamic-ref.html
@@ -0,0 +1,5 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Test Reference</title> +<p>Only the 'A' below should be green.</p> +<span style="color:green">A</span> .B
diff --git a/third_party/blink/web_tests/external/wpt/css/css-pseudo/first-letter-punctuation-dynamic.html b/third_party/blink/web_tests/external/wpt/css/css-pseudo/first-letter-punctuation-dynamic.html new file mode 100644 index 0000000..0a729560 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-pseudo/first-letter-punctuation-dynamic.html
@@ -0,0 +1,14 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Pseudo-Elements Test: ::first-letter modified text node with punctuation</title> +<link rel="help" href="https://drafts.csswg.org/css-pseudo/#first-letter-pseudo"> +<link rel="match" href="first-letter-punctuation-dynamic-ref.html"> +<style> + #target::first-letter { color: green; } +</style> +<p>Only the 'A' below should be green.</p> +<div id="target"> .<span>B</span></div> +<script> + target.offsetTop; + target.firstChild.insertData(0, 'A'); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-ruby/improperly-contained-annotation-001.html b/third_party/blink/web_tests/external/wpt/css/css-ruby/improperly-contained-annotation-001.html new file mode 100644 index 0000000..6231dce --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-ruby/improperly-contained-annotation-001.html
@@ -0,0 +1,28 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Ruby Test: Improperly-contained ruby annotation</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-ruby-1/#ruby-display"> + <link rel="help" href="https://www.w3.org/TR/css-ruby-1/#box-fixup"> + <link rel="match" href="reference/improperly-contained-annotation-001-ref.html"> + + <meta content="" name="flags"> + <meta content="This test checks that an improperly-contained ruby annotation is wrapped in an anonymous ruby container."> + + <style> + ruby + { + background-color: lightblue; + font-size: 40px; + } + + rbc + { + display: ruby-base-container; + } + </style> + + <ruby><rbc>B<rt>A</rt></rbc></ruby>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-ruby/reference/improperly-contained-annotation-001-ref.html b/third_party/blink/web_tests/external/wpt/css/css-ruby/reference/improperly-contained-annotation-001-ref.html new file mode 100644 index 0000000..72a5554 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-ruby/reference/improperly-contained-annotation-001-ref.html
@@ -0,0 +1,25 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reference File</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + ruby + { + background-color: lightblue; + font-size: 40px; + } + </style> + + <ruby><rbc>B<ruby>​<rt>A</rt></ruby></rbc></ruby> + + <!-- + + ​ or ​ is the entity reference for zero-wide space. + + MathML uses the entity name ​ for this character. + + -->
diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt index fd97904..949de2f 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt
@@ -10,5 +10,7 @@ PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on y and there is no subsequent snap positions. FAIL Don't snap back even if scrollTo tries to scroll to positions which are outside of the scroll range and if a snap target element covers the snaport assert_equals: expected 3715 but got 2200 PASS Snap to current scroll position on x as the area is covering x axis.However, we snap to the specified snap position on y as the area is not covering y axis. +PASS snap to current scroll position on y as the area is covering y axis, even though that area is not the only scroll area at the same position. +PASS snap to current scroll position on x as the area is covering x axis, even though that area is not the only scroll area at the same position. Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/overflowing-snap-areas.html b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/overflowing-snap-areas.html index c1b4e25c..08aff5eb 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/overflowing-snap-areas.html +++ b/third_party/blink/web_tests/external/wpt/css/css-scroll-snap/overflowing-snap-areas.html
@@ -24,16 +24,16 @@ } .target { scroll-snap-align: start; + height: 400px; + width: 400px; } .large-x { width: 3000px; - height: 400px; background-color: yellow; } .large-y { - width: 400px; height: 2000px; - background-color: green; + background-color: yellow; } .small { height: 200px; @@ -72,11 +72,25 @@ <div class="target large-x" style="top: 200px"></div> </div> +<div class="scroller-x" id="overlapping-overflow" style="scroll-snap-type: both mandatory"> + <div class="space"></div> + <div style="left: 200px; top: 200px;"> + <div class="target small"></div> + <div class="target small"></div> + <div class="target small"></div> + <div class="target large-y large-x"></div> + <div class="target small"></div> + <div class="target small"></div> + <div class="target small"></div> + </div> +</div> + <script> var one_target_scroller = document.getElementById("one-target"); var scroller_x = document.getElementById("x"); var scroller_y = document.getElementById("y"); var two_axes_scroller = document.getElementById("two-axes"); +var overlapping_scroller = document.getElementById("overlapping-overflow"); test(() => { one_target_scroller.scrollTo(10, 0); @@ -165,4 +179,19 @@ }, "Snap to current scroll position on x as the area is covering x axis." + "However, we snap to the specified snap position on y as the area is not " + "covering y axis."); + +test(() => { + overlapping_scroller.scrollTo(200, 800); + assert_equals(overlapping_scroller.scrollLeft, 200); + assert_equals(overlapping_scroller.scrollTop, 800); +}, "snap to current scroll position on y as the area is covering y axis, " + + "even though that area is not the only scroll area at the same position."); + +test(() => { + overlapping_scroller.scrollTo(800, 200); + assert_equals(overlapping_scroller.scrollLeft, 800); + assert_equals(overlapping_scroller.scrollTop, 200); +}, "snap to current scroll position on x as the area is covering x axis, " + + "even though that area is not the only scroll area at the same position."); +</script> </script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-sizing/aspect-ratio/abspos-021.html b/third_party/blink/web_tests/external/wpt/css/css-sizing/aspect-ratio/abspos-021.html new file mode 100644 index 0000000..c44b29c4b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-sizing/aspect-ratio/abspos-021.html
@@ -0,0 +1,7 @@ +<!DOCTYPE html> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1233150"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="position: relative; width: 200px;"> + <div style="position: absolute; inset: 0; max-height: 100px; aspect-ratio: 1/1; background: green;"></div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/selectors/first-letter-flag-001-ref.html b/third_party/blink/web_tests/external/wpt/css/selectors/first-letter-flag-001-ref.html new file mode 100644 index 0000000..7643368 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/selectors/first-letter-flag-001-ref.html
@@ -0,0 +1,12 @@ +<!doctype html> +<meta charset=utf-8> +<title>::first-letter with a Regional-Indicator flag symbol - reference</title> +<style> + p { + font: 24px/3 serif; + } + span { + font-size: 2em; + } +</style> +<p><span>🇬🇧</span> UK flag
diff --git a/third_party/blink/web_tests/external/wpt/css/selectors/first-letter-flag-001.html b/third_party/blink/web_tests/external/wpt/css/selectors/first-letter-flag-001.html new file mode 100644 index 0000000..dc23dda --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/selectors/first-letter-flag-001.html
@@ -0,0 +1,16 @@ +<!doctype html> +<meta charset=utf-8> +<title>::first-letter with a Regional-Indicator flag symbol</title> +<meta name="assert" content="::first-letter should apply to symbol characters"> +<link rel=help href="https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo"> +<link rel=help href="https://github.com/w3c/csswg-drafts/issues/5099#issuecomment-759612015"> +<link rel=match href=first-letter-flag-001-ref.html> +<style> + p { + font: 24px/3 serif; + } + p::first-letter { + font-size: 2em; + } +</style> +<p>🇬🇧 UK flag
diff --git a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any-expected.txt b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any-expected.txt index 279a40f..0e981bd 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any-expected.txt +++ b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any-expected.txt
@@ -17,5 +17,7 @@ PASS Fetch with POST with ReadableStream containing Blob PASS Fetch with POST with text body on 421 response should be retried once on new connection. FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" +PASS Feature detect for POST with ReadableStream +FAIL Feature detect for POST with ReadableStream, using request object promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'fetch' on 'Window': If request is made from ReadableStream, mode should be"same-origin" or "cors"" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.js b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.js index ac2345d0..6da2c8a 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.js +++ b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.js
@@ -143,3 +143,30 @@ const text = await resp.text(); assert_equals(text, "ok. Request was sent 1 times. 1 connections were created."); }, "Fetch with POST with ReadableStream on 421 response should return the response and not retry."); + +promise_test(async (test) => { + const request = new Request('', { + body: new ReadableStream(), + method: 'POST', + }); + + assert_equals(request.headers.get('Content-Type'), null, `Request should not have a content-type set`); + + const response = await fetch('data:a/a;charset=utf-8,test', { + method: 'POST', + body: new ReadableStream(), + }); + + assert_equals(await response.text(), 'test', `Response has correct body`); +}, "Feature detect for POST with ReadableStream"); + +promise_test(async (test) => { + const request = new Request('data:a/a;charset=utf-8,test', { + body: new ReadableStream(), + method: 'POST', + }); + + assert_equals(request.headers.get('Content-Type'), null, `Request should not have a content-type set`); + const response = await fetch(request); + assert_equals(await response.text(), 'test', `Response has correct body`); +}, "Feature detect for POST with ReadableStream, using request object");
diff --git a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt index 8dbbac8f..14ad9587 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt
@@ -10,7 +10,6 @@ PASS Fetch with POST with Float64Array body PASS Fetch with POST with DataView body PASS Fetch with POST with Blob body with mime type -FAIL Fetch with POST with ReadableStream promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" PASS Fetch with POST with ReadableStream containing String PASS Fetch with POST with ReadableStream containing null PASS Fetch with POST with ReadableStream containing number @@ -18,5 +17,7 @@ PASS Fetch with POST with ReadableStream containing Blob PASS Fetch with POST with text body on 421 response should be retried once on new connection. FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" +PASS Feature detect for POST with ReadableStream +FAIL Feature detect for POST with ReadableStream, using request object promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': If request is made from ReadableStream, mode should be"same-origin" or "cors"" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt index 279a40f..14ad9587 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt
@@ -17,5 +17,7 @@ PASS Fetch with POST with ReadableStream containing Blob PASS Fetch with POST with text body on 421 response should be retried once on new connection. FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" +PASS Feature detect for POST with ReadableStream +FAIL Feature detect for POST with ReadableStream, using request object promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': If request is made from ReadableStream, mode should be"same-origin" or "cors"" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt index 279a40f..14ad9587 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt
@@ -17,5 +17,7 @@ PASS Fetch with POST with ReadableStream containing Blob PASS Fetch with POST with text body on 421 response should be retried once on new connection. FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" +PASS Feature detect for POST with ReadableStream +FAIL Feature detect for POST with ReadableStream, using request object promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': If request is made from ReadableStream, mode should be"same-origin" or "cors"" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/http/tests/history/.htaccess b/third_party/blink/web_tests/http/tests/history/.htaccess new file mode 100644 index 0000000..d9793405 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/history/.htaccess
@@ -0,0 +1,5 @@ +# cross-origin-redirect-on-back.html is not compatible with back-forward cache. +# The following setting disables back-forward cache. +<Files "cross-origin-redirect-on-back.html"> +Header set Cache-Control "no-store" +</Files>
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/network/interception-worker-import-scripts.js b/third_party/blink/web_tests/http/tests/inspector-protocol/network/interception-worker-import-scripts.js index b0a265da..47a2f610 100644 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/network/interception-worker-import-scripts.js +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/network/interception-worker-import-scripts.js
@@ -8,10 +8,13 @@ const importScriptRequestWillBeSent = new Promise(resolve => { dp.Target.onAttachedToTarget(async event => { const wdp = session.createChild(event.params.sessionId).protocol; + wdp.Network.onRequestWillBeSent(e => { + if (e.params.request.url.endsWith('/final.js')) { + resolve(`Network.requestWillBeSent: ${e.params.request.url}`); + } + }); await wdp.Network.enable(); wdp.Runtime.runIfWaitingForDebugger(); - const willBeSent = await wdp.Network.onceRequestWillBeSent(); - resolve(`Network.requestWillBeSent: ${willBeSent.params.request.url}`); }); });
diff --git a/third_party/blink/web_tests/http/tests/security/contentSecurityPolicy/strict-dynamic/script-src-strict-dynamic-whitelist.html b/third_party/blink/web_tests/http/tests/security/contentSecurityPolicy/strict-dynamic/script-src-strict-dynamic-allowed.html similarity index 100% rename from third_party/blink/web_tests/http/tests/security/contentSecurityPolicy/strict-dynamic/script-src-strict-dynamic-whitelist.html rename to third_party/blink/web_tests/http/tests/security/contentSecurityPolicy/strict-dynamic/script-src-strict-dynamic-allowed.html
diff --git a/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text-expected.png b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text-expected.png new file mode 100644 index 0000000..5246f64 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/text/textPathBoundsBug-expected.png b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/text/textPathBoundsBug-expected.png new file mode 100644 index 0000000..4ce7f1b --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/text/textPathBoundsBug-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/css/css-fonts/parsing/font-family-valid-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/css/css-fonts/parsing/font-family-valid-expected.txt new file mode 100644 index 0000000..30d61bea --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/css/css-fonts/parsing/font-family-valid-expected.txt
@@ -0,0 +1,13 @@ +This is a testharness.js-based test. +PASS e.style['font-family'] = "Serif" should set the property value +PASS e.style['font-family'] = "Sans-Serif" should set the property value +PASS e.style['font-family'] = "Cursive" should set the property value +PASS e.style['font-family'] = "Fantasy" should set the property value +PASS e.style['font-family'] = "Monospace" should set the property value +PASS e.style['font-family'] = "serif, sans-serif, cursive, fantasy, monospace" should set the property value +PASS e.style['font-family'] = "Helvetica, Verdana, sans-serif" should set the property value +PASS e.style['font-family'] = "\"New Century Schoolbook\", serif" should set the property value +PASS e.style['font-family'] = "'21st Century', fantasy" should set the property value +FAIL e.style['font-family'] = "\"inherit\", \"serif\"" should set the property value assert_equals: serialization should be canonical expected "\"inherit\", \"serif\"" but got "inherit, serif" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt new file mode 100644 index 0000000..fd97904 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt
@@ -0,0 +1,14 @@ +This is a testharness.js-based test. +PASS Snaps to the snap position if the snap area doesn't cover the snapport on x. +PASS Snaps to the snap position if the snap area covers the snapport on x on the right border. +PASS Snaps to the snap position if the snap area covers the snapport on x on the left border. +PASS Snaps if the distance between the previous(400) and next(800) snap positions is smaller than snapport(500) on x. +PASS Snaps if the distance between the previous(400) and next(800) snap positions is smaller than snapport(500) on y. +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on x and the distance between the previous(800) and next(1400) is larger than snapport(500). +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on y and the distance between the previous(800) and next(1400) is larger than snapport(500). +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on x and there is no subsequent snap positions. +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on y and there is no subsequent snap positions. +FAIL Don't snap back even if scrollTo tries to scroll to positions which are outside of the scroll range and if a snap target element covers the snaport assert_equals: expected 3715 but got 2200 +PASS Snap to current scroll position on x as the area is covering x axis.However, we snap to the specified snap position on y as the area is not covering y axis. +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/threaded/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/threaded/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt new file mode 100644 index 0000000..fd97904 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/threaded/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt
@@ -0,0 +1,14 @@ +This is a testharness.js-based test. +PASS Snaps to the snap position if the snap area doesn't cover the snapport on x. +PASS Snaps to the snap position if the snap area covers the snapport on x on the right border. +PASS Snaps to the snap position if the snap area covers the snapport on x on the left border. +PASS Snaps if the distance between the previous(400) and next(800) snap positions is smaller than snapport(500) on x. +PASS Snaps if the distance between the previous(400) and next(800) snap positions is smaller than snapport(500) on y. +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on x and the distance between the previous(800) and next(1400) is larger than snapport(500). +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on y and the distance between the previous(800) and next(1400) is larger than snapport(500). +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on x and there is no subsequent snap positions. +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on y and there is no subsequent snap positions. +FAIL Don't snap back even if scrollTo tries to scroll to positions which are outside of the scroll range and if a snap target element covers the snaport assert_equals: expected 3715 but got 2200 +PASS Snap to current scroll position on x as the area is covering x axis.However, we snap to the specified snap position on y as the area is not covering y axis. +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt deleted file mode 100644 index 8dbbac8f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt +++ /dev/null
@@ -1,22 +0,0 @@ -This is a testharness.js-based test. -PASS Fetch with PUT with body -PASS Fetch with POST with text body -PASS Fetch with POST with URLSearchParams body -PASS Fetch with POST with Blob body -PASS Fetch with POST with ArrayBuffer body -PASS Fetch with POST with Uint8Array body -PASS Fetch with POST with Int8Array body -PASS Fetch with POST with Float32Array body -PASS Fetch with POST with Float64Array body -PASS Fetch with POST with DataView body -PASS Fetch with POST with Blob body with mime type -FAIL Fetch with POST with ReadableStream promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" -PASS Fetch with POST with ReadableStream containing String -PASS Fetch with POST with ReadableStream containing null -PASS Fetch with POST with ReadableStream containing number -PASS Fetch with POST with ReadableStream containing ArrayBuffer -PASS Fetch with POST with ReadableStream containing Blob -PASS Fetch with POST with text body on 421 response should be retried once on new connection. -FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt deleted file mode 100644 index 279a40f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -PASS Fetch with PUT with body -PASS Fetch with POST with text body -PASS Fetch with POST with URLSearchParams body -PASS Fetch with POST with Blob body -PASS Fetch with POST with ArrayBuffer body -PASS Fetch with POST with Uint8Array body -PASS Fetch with POST with Int8Array body -PASS Fetch with POST with Float32Array body -PASS Fetch with POST with Float64Array body -PASS Fetch with POST with DataView body -PASS Fetch with POST with Blob body with mime type -PASS Fetch with POST with ReadableStream containing String -PASS Fetch with POST with ReadableStream containing null -PASS Fetch with POST with ReadableStream containing number -PASS Fetch with POST with ReadableStream containing ArrayBuffer -PASS Fetch with POST with ReadableStream containing Blob -PASS Fetch with POST with text body on 421 response should be retried once on new connection. -FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt deleted file mode 100644 index 279a40f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -PASS Fetch with PUT with body -PASS Fetch with POST with text body -PASS Fetch with POST with URLSearchParams body -PASS Fetch with POST with Blob body -PASS Fetch with POST with ArrayBuffer body -PASS Fetch with POST with Uint8Array body -PASS Fetch with POST with Int8Array body -PASS Fetch with POST with Float32Array body -PASS Fetch with POST with Float64Array body -PASS Fetch with POST with DataView body -PASS Fetch with POST with Blob body with mime type -PASS Fetch with POST with ReadableStream containing String -PASS Fetch with POST with ReadableStream containing null -PASS Fetch with POST with ReadableStream containing number -PASS Fetch with POST with ReadableStream containing ArrayBuffer -PASS Fetch with POST with ReadableStream containing Blob -PASS Fetch with POST with text body on 421 response should be retried once on new connection. -FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt deleted file mode 100644 index 279a40f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -PASS Fetch with PUT with body -PASS Fetch with POST with text body -PASS Fetch with POST with URLSearchParams body -PASS Fetch with POST with Blob body -PASS Fetch with POST with ArrayBuffer body -PASS Fetch with POST with Uint8Array body -PASS Fetch with POST with Int8Array body -PASS Fetch with POST with Float32Array body -PASS Fetch with POST with Float64Array body -PASS Fetch with POST with DataView body -PASS Fetch with POST with Blob body with mime type -PASS Fetch with POST with ReadableStream containing String -PASS Fetch with POST with ReadableStream containing null -PASS Fetch with POST with ReadableStream containing number -PASS Fetch with POST with ReadableStream containing ArrayBuffer -PASS Fetch with POST with ReadableStream containing Blob -PASS Fetch with POST with text body on 421 response should be retried once on new connection. -FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt deleted file mode 100644 index 279a40f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -PASS Fetch with PUT with body -PASS Fetch with POST with text body -PASS Fetch with POST with URLSearchParams body -PASS Fetch with POST with Blob body -PASS Fetch with POST with ArrayBuffer body -PASS Fetch with POST with Uint8Array body -PASS Fetch with POST with Int8Array body -PASS Fetch with POST with Float32Array body -PASS Fetch with POST with Float64Array body -PASS Fetch with POST with DataView body -PASS Fetch with POST with Blob body with mime type -PASS Fetch with POST with ReadableStream containing String -PASS Fetch with POST with ReadableStream containing null -PASS Fetch with POST with ReadableStream containing number -PASS Fetch with POST with ReadableStream containing ArrayBuffer -PASS Fetch with POST with ReadableStream containing Blob -PASS Fetch with POST with text body on 421 response should be retried once on new connection. -FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt deleted file mode 100644 index 279a40f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -PASS Fetch with PUT with body -PASS Fetch with POST with text body -PASS Fetch with POST with URLSearchParams body -PASS Fetch with POST with Blob body -PASS Fetch with POST with ArrayBuffer body -PASS Fetch with POST with Uint8Array body -PASS Fetch with POST with Int8Array body -PASS Fetch with POST with Float32Array body -PASS Fetch with POST with Float64Array body -PASS Fetch with POST with DataView body -PASS Fetch with POST with Blob body with mime type -PASS Fetch with POST with ReadableStream containing String -PASS Fetch with POST with ReadableStream containing null -PASS Fetch with POST with ReadableStream containing number -PASS Fetch with POST with ReadableStream containing ArrayBuffer -PASS Fetch with POST with ReadableStream containing Blob -PASS Fetch with POST with text body on 421 response should be retried once on new connection. -FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/paint/invalidation/svg/modify-transferred-listitem-different-attr-expected.txt b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/paint/invalidation/svg/modify-transferred-listitem-different-attr-expected.txt new file mode 100644 index 0000000..ff6e290 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/paint/invalidation/svg/modify-transferred-listitem-different-attr-expected.txt
@@ -0,0 +1,15 @@ +{ + "layers": [ + { + "name": "Scrolling Contents Layer", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF", + "invalidations": [ + [23, 8, 85, 23], + [58, 45, 50, 26] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/css/text-shadow-multiple-expected.png b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/css/text-shadow-multiple-expected.png new file mode 100644 index 0000000..0355237 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text-expected.png b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text-expected.png new file mode 100644 index 0000000..b73270cb --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/filters/filter-on-tspan-expected.png b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/filters/filter-on-tspan-expected.png new file mode 100644 index 0000000..0d67598 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/filters/filter-on-tspan-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/text/selection-styles-expected.png b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/text/selection-styles-expected.png new file mode 100644 index 0000000..e8d9ddf --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/text/selection-styles-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/text/textPathBoundsBug-expected.png b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/text/textPathBoundsBug-expected.png new file mode 100644 index 0000000..9c059505 --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/virtual/layout_ng_svg_text/svg/text/textPathBoundsBug-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt b/third_party/blink/web_tests/platform/win/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt deleted file mode 100644 index 279a40f..0000000 --- a/third_party/blink/web_tests/platform/win/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -PASS Fetch with PUT with body -PASS Fetch with POST with text body -PASS Fetch with POST with URLSearchParams body -PASS Fetch with POST with Blob body -PASS Fetch with POST with ArrayBuffer body -PASS Fetch with POST with Uint8Array body -PASS Fetch with POST with Int8Array body -PASS Fetch with POST with Float32Array body -PASS Fetch with POST with Float64Array body -PASS Fetch with POST with DataView body -PASS Fetch with POST with Blob body with mime type -PASS Fetch with POST with ReadableStream containing String -PASS Fetch with POST with ReadableStream containing null -PASS Fetch with POST with ReadableStream containing number -PASS Fetch with POST with ReadableStream containing ArrayBuffer -PASS Fetch with POST with ReadableStream containing Blob -PASS Fetch with POST with text body on 421 response should be retried once on new connection. -FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt b/third_party/blink/web_tests/platform/win/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt deleted file mode 100644 index 279a40f..0000000 --- a/third_party/blink/web_tests/platform/win/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt +++ /dev/null
@@ -1,21 +0,0 @@ -This is a testharness.js-based test. -PASS Fetch with PUT with body -PASS Fetch with POST with text body -PASS Fetch with POST with URLSearchParams body -PASS Fetch with POST with Blob body -PASS Fetch with POST with ArrayBuffer body -PASS Fetch with POST with Uint8Array body -PASS Fetch with POST with Int8Array body -PASS Fetch with POST with Float32Array body -PASS Fetch with POST with Float64Array body -PASS Fetch with POST with DataView body -PASS Fetch with POST with Blob body with mime type -PASS Fetch with POST with ReadableStream containing String -PASS Fetch with POST with ReadableStream containing null -PASS Fetch with POST with ReadableStream containing number -PASS Fetch with POST with ReadableStream containing ArrayBuffer -PASS Fetch with POST with ReadableStream containing Blob -PASS Fetch with POST with text body on 421 response should be retried once on new connection. -FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win/virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text-expected.png b/third_party/blink/web_tests/platform/win/virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text-expected.png new file mode 100644 index 0000000..7bb37b7 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/layout_ng_svg_text/svg/filters/filter-on-filter-for-text-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/layout_ng_svg_text/svg/text/textPathBoundsBug-expected.png b/third_party/blink/web_tests/platform/win/virtual/layout_ng_svg_text/svg/text/textPathBoundsBug-expected.png new file mode 100644 index 0000000..c6a5b5f --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/layout_ng_svg_text/svg/text/textPathBoundsBug-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any-expected.txt b/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any-expected.txt index 279a40f..0e981bd 100644 --- a/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any-expected.txt +++ b/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any-expected.txt
@@ -17,5 +17,7 @@ PASS Fetch with POST with ReadableStream containing Blob PASS Fetch with POST with text body on 421 response should be retried once on new connection. FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" +PASS Feature detect for POST with ReadableStream +FAIL Feature detect for POST with ReadableStream, using request object promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'fetch' on 'Window': If request is made from ReadableStream, mode should be"same-origin" or "cors"" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt b/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt similarity index 77% rename from third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt rename to third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt index 279a40f..14ad9587 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt +++ b/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.serviceworker-expected.txt
@@ -17,5 +17,7 @@ PASS Fetch with POST with ReadableStream containing Blob PASS Fetch with POST with text body on 421 response should be retried once on new connection. FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" +PASS Feature detect for POST with ReadableStream +FAIL Feature detect for POST with ReadableStream, using request object promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': If request is made from ReadableStream, mode should be"same-origin" or "cors"" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt b/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt similarity index 77% copy from third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt copy to third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt index 279a40f..14ad9587 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt +++ b/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.sharedworker-expected.txt
@@ -17,5 +17,7 @@ PASS Fetch with POST with ReadableStream containing Blob PASS Fetch with POST with text body on 421 response should be retried once on new connection. FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" +PASS Feature detect for POST with ReadableStream +FAIL Feature detect for POST with ReadableStream, using request object promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': If request is made from ReadableStream, mode should be"same-origin" or "cors"" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt b/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt similarity index 77% copy from third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt copy to third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt index 279a40f..14ad9587 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt +++ b/third_party/blink/web_tests/virtual/plz-dedicated-worker/external/wpt/fetch/api/basic/request-upload.any.worker-expected.txt
@@ -17,5 +17,7 @@ PASS Fetch with POST with ReadableStream containing Blob PASS Fetch with POST with text body on 421 response should be retried once on new connection. FAIL Fetch with POST with ReadableStream on 421 response should return the response and not retry. promise_test: Unhandled rejection with value: object "TypeError: Failed to fetch" +PASS Feature detect for POST with ReadableStream +FAIL Feature detect for POST with ReadableStream, using request object promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': If request is made from ReadableStream, mode should be"same-origin" or "cors"" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/virtual/threaded/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt b/third_party/blink/web_tests/virtual/threaded/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt new file mode 100644 index 0000000..949de2f --- /dev/null +++ b/third_party/blink/web_tests/virtual/threaded/external/wpt/css/css-scroll-snap/overflowing-snap-areas-expected.txt
@@ -0,0 +1,16 @@ +This is a testharness.js-based test. +PASS Snaps to the snap position if the snap area doesn't cover the snapport on x. +PASS Snaps to the snap position if the snap area covers the snapport on x on the right border. +PASS Snaps to the snap position if the snap area covers the snapport on x on the left border. +PASS Snaps if the distance between the previous(400) and next(800) snap positions is smaller than snapport(500) on x. +PASS Snaps if the distance between the previous(400) and next(800) snap positions is smaller than snapport(500) on y. +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on x and the distance between the previous(800) and next(1400) is larger than snapport(500). +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on y and the distance between the previous(800) and next(1400) is larger than snapport(500). +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on x and there is no subsequent snap positions. +PASS Snap to current scroll position which is a valid snap position, as the snap area covers snapport on y and there is no subsequent snap positions. +FAIL Don't snap back even if scrollTo tries to scroll to positions which are outside of the scroll range and if a snap target element covers the snaport assert_equals: expected 3715 but got 2200 +PASS Snap to current scroll position on x as the area is covering x axis.However, we snap to the specified snap position on y as the area is not covering y axis. +PASS snap to current scroll position on y as the area is covering y axis, even though that area is not the only scroll area at the same position. +PASS snap to current scroll position on x as the area is covering x axis, even though that area is not the only scroll area at the same position. +Harness: the test ran to completion. +
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 043413c..49b01db 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -7009,6 +7009,7 @@ <int value="196620" label="kEmbedder-kExtensions"/> <int value="196621" label="kEmbedder-kExtensionMessaging"/> <int value="196622" label="kEmbedder-kExtensionMessagingForOpenPort"/> + <int value="196623" label="kEmbedder-kExtensionSentMessageToCachedFrame"/> </enum> <enum name="BackForwardCacheDisabledForRenderFrameHostReasonShort"> @@ -28822,6 +28823,7 @@ <int value="1565" label="OS_TELEMETRY_GETVPDINFO"/> <int value="1566" label="ACCESSIBILITY_PRIVATE_MAGNIFIERCENTERONPOINT"/> <int value="1567" label="STORAGE_SETACCESSLEVEL"/> + <int value="1568" label="OS_TELEMETRY_GETOEMDATA"/> </enum> <enum name="ExtensionIconState"> @@ -50317,6 +50319,7 @@ <int value="946185008" label="EnableAppDataSearch:disabled"/> <int value="946688335" label="OmniboxSpareRenderer:disabled"/> <int value="948351976" label="WallpaperWebUI:disabled"/> + <int value="948521531" label="StylusHandwriting:disabled"/> <int value="952558794" label="enable-remote-assistance"/> <int value="955340765" label="ChromeHomeOptOutSnackbar:enabled"/> <int value="955425932" label="EnterpriseReportingInChromeOS:enabled"/> @@ -51287,6 +51290,7 @@ <int value="1719958026" label="QueryTiles:enabled"/> <int value="1722748383" label="EnableAppReinstallZeroState:disabled"/> <int value="1723601083" label="enable-app-window-controls"/> + <int value="1724247189" label="StylusHandwriting:enabled"/> <int value="1724800383" label="AsmJsToWebAssembly:disabled"/> <int value="1725438666" label="NewStyleNotifications:enabled"/> <int value="1730094138" label="enable-md-storage-manager"/> @@ -82397,19 +82401,22 @@ <int value="0" label="kSuccess"/> <int value="1" label="kErrorReadJSONRules"/> <int value="2" label="kErrorRuleCountExceeded"/> - <int value="3" label="kErrorCreateTemporarySource"/> - <int value="4" label="kErrorWriteTemporaryJSONRuleset"/> - <int value="5" label="kErrorWriteTemporaryIndexedRuleset"/> + <int value="3" label="kErrorCreateTemporarySource_Deprecated"/> + <int value="4" label="kErrorWriteTemporaryJSONRuleset_Deprecated"/> + <int value="5" label="kErrorWriteTemporaryIndexedRuleset_Deprecated"/> <int value="6" label="kErrorInvalidRules"/> <int value="7" label="kErrorCreateDynamicRulesDirectory"/> - <int value="8" label="kErrorReplaceIndexedFile"/> - <int value="9" label="kErrorReplaceJSONFile"/> + <int value="8" label="kErrorReplaceIndexedFile_Deprecated"/> + <int value="9" label="kErrorReplaceJSONFile_Deprecated"/> <int value="10" label="kErrorCreateMatcher_InvalidPath"/> <int value="11" label="kErrorCreateMatcher_FileReadError"/> <int value="12" label="kErrorCreateMatcher_ChecksumMismatch"/> <int value="13" label="kErrorCreateMatcher_VersionMismatch"/> <int value="14" label="kErrorRegexTooLarge"/> <int value="15" label="kErrorRegexRuleCountExceeded"/> + <int value="16" label="kErrorSerializeToJson"/> + <int value="17" label="kErrorWriteJson"/> + <int value="18" label="kErrorWriteFlatbuffer"/> </enum> <enum name="UpdateEngineAttemptResult">
diff --git a/tools/metrics/histograms/metadata/accessibility/histograms.xml b/tools/metrics/histograms/metadata/accessibility/histograms.xml index 4f6be30..5d2d92e 100644 --- a/tools/metrics/histograms/metadata/accessibility/histograms.xml +++ b/tools/metrics/histograms/metadata/accessibility/histograms.xml
@@ -448,7 +448,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.BubbleDismissMethod" - enum="CrosSelectToSpeakActivationMethod" expires_after="2021-11-30"> + enum="CrosSelectToSpeakActivationMethod" expires_after="2022-01-30"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -469,7 +469,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.NavigationControls" - enum="BooleanEnabled" expires_after="2021-11-30"> + enum="BooleanEnabled" expires_after="2022-01-30"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -479,7 +479,7 @@ <histogram name="Accessibility.CrosSelectToSpeak.OverrideSpeechRateMultiplier" enum="CrosSelectToSpeakOverrideSpeechRateMultiplier" - expires_after="2021-11-30"> + expires_after="2022-01-30"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -494,7 +494,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.ParagraphNavigationMethod" - enum="CrosSelectToSpeakActivationMethod" expires_after="2021-11-30"> + enum="CrosSelectToSpeakActivationMethod" expires_after="2022-01-30"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -505,7 +505,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.SentenceNavigationMethod" - enum="CrosSelectToSpeakActivationMethod" expires_after="2021-11-30"> + enum="CrosSelectToSpeakActivationMethod" expires_after="2022-01-30"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/android/histograms.xml b/tools/metrics/histograms/metadata/android/histograms.xml index c03e66d..006d82b6 100644 --- a/tools/metrics/histograms/metadata/android/histograms.xml +++ b/tools/metrics/histograms/metadata/android/histograms.xml
@@ -391,7 +391,7 @@ </histogram> <histogram name="Android.BackgroundTaskScheduler.TaskLoadedNative" - enum="BackgroundTaskId" expires_after="2021-12-01"> + enum="BackgroundTaskId" expires_after="2022-01-30"> <owner>fgorski@chromium.org</owner> <owner>nyquist@chromium.org</owner> <summary> @@ -440,7 +440,7 @@ </histogram> <histogram name="Android.BackgroundTaskScheduler.TaskStarted" - enum="BackgroundTaskId" expires_after="2021-12-01"> + enum="BackgroundTaskId" expires_after="2022-01-30"> <owner>fgorski@chromium.org</owner> <owner>nyquist@chromium.org</owner> <summary>Records that a specific background task has been started.</summary> @@ -869,7 +869,7 @@ </histogram> <histogram name="Android.DexFixer" enum="DexFixerReason" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>agrieve@chromium.org</owner> <owner>cduvall@chromium.org</owner> <summary> @@ -2128,7 +2128,7 @@ </histogram> <histogram name="Android.OmniboxFocusReason" enum="OmniboxFocusReason" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>mdjones@chromium.org</owner> <owner>twellington@chromium.org</owner> <owner>amaralp@chromium.org</owner> @@ -3873,7 +3873,7 @@ </histogram> <histogram name="Android.WebView.Startup.CreationTime.Stage1.FactoryInit" - units="ms" expires_after="2021-11-28"> + units="ms" expires_after="2022-01-30"> <owner>changwan@chromium.org</owner> <owner>src/android_webview/OWNERS</owner> <summary> @@ -3883,7 +3883,7 @@ </histogram> <histogram name="Android.WebView.Startup.CreationTime.Stage2.ProviderInit.Cold" - units="ms" expires_after="2021-11-28"> + units="ms" expires_after="2022-01-30"> <owner>changwan@chromium.org</owner> <owner>src/android_webview/OWNERS</owner> <summary> @@ -3895,7 +3895,7 @@ </histogram> <histogram name="Android.WebView.Startup.CreationTime.Stage2.ProviderInit.Warm" - units="ms" expires_after="2021-11-28"> + units="ms" expires_after="2022-01-30"> <owner>changwan@chromium.org</owner> <owner>src/android_webview/OWNERS</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/arc/histograms.xml b/tools/metrics/histograms/metadata/arc/histograms.xml index 9ee5055b..537bc6f 100644 --- a/tools/metrics/histograms/metadata/arc/histograms.xml +++ b/tools/metrics/histograms/metadata/arc/histograms.xml
@@ -1407,7 +1407,7 @@ </histogram> <histogram name="Arc.Runtime.Performance.Generic.FirstFrameRendered" units="ms" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>camurcu@google.com</owner> <owner>khmel@google.com</owner> <summary> @@ -1418,7 +1418,7 @@ </histogram> <histogram name="Arc.Runtime.Performance.Generic.FrameTime" units="ms" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>camurcu@google.com</owner> <owner>khmel@google.com</owner> <summary> @@ -1428,7 +1428,7 @@ </histogram> <histogram name="Arc.Runtime.Performance.Generic.Jankiness" units="%" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>camurcu@google.com</owner> <owner>khmel@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/ash/histograms.xml b/tools/metrics/histograms/metadata/ash/histograms.xml index 9a84059..8f84d91 100644 --- a/tools/metrics/histograms/metadata/ash/histograms.xml +++ b/tools/metrics/histograms/metadata/ash/histograms.xml
@@ -408,7 +408,7 @@ </histogram> <histogram name="Ash.CaptureModeController.ScreenshotsPerDay" units="int" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>afakhry@chromium.org</owner> <owner>gzadina@google.com</owner> <summary> @@ -420,7 +420,7 @@ </histogram> <histogram name="Ash.CaptureModeController.ScreenshotsPerWeek" units="int" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>afakhry@chromium.org</owner> <owner>gzadina@google.com</owner> <summary> @@ -764,7 +764,7 @@ </histogram> <histogram name="Ash.Desks.AnimationSmoothness.DeskActivation" units="%" - expires_after="2021-11-29"> + expires_after="2022-01-30"> <owner>afakhry@chromium.org</owner> <owner>tclaiborne@chromium.org</owner> <owner>mukai@chromium.org</owner> @@ -1038,7 +1038,7 @@ </histogram> <histogram name="Ash.Desks.RemoveDesk" enum="DesksCreationRemovalSource" - expires_after="2021-11-29"> + expires_after="2022-01-30"> <owner>afakhry@chromium.org</owner> <owner>tclaiborne@chromium.org</owner> <summary> @@ -1686,14 +1686,14 @@ </histogram> <histogram name="Ash.NightLight.AutoNightLightNotificationShown" - enum="BooleanShown" expires_after="2021-11-29"> + enum="BooleanShown" expires_after="2022-01-30"> <owner>afakhry@chromium.org</owner> <owner>tclaiborne@chromium.org</owner> <summary>Emitted when the Auto Night Light notification is shown.</summary> </histogram> <histogram name="Ash.NightLight.AutoNightLightNotificationState" - enum="AshAutoNightLightNotificationState" expires_after="2021-11-29"> + enum="AshAutoNightLightNotificationState" expires_after="2022-01-30"> <owner>afakhry@chromium.org</owner> <owner>tclaiborne@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/blink/histograms.xml b/tools/metrics/histograms/metadata/blink/histograms.xml index 6e7d4886..73519ef 100644 --- a/tools/metrics/histograms/metadata/blink/histograms.xml +++ b/tools/metrics/histograms/metadata/blink/histograms.xml
@@ -109,7 +109,7 @@ </histogram> <histogram name="Blink.Canvas.ContentChangeMode" - enum="BooleanContentChangeMode" expires_after="2021-08-09"> + enum="BooleanContentChangeMode" expires_after="2022-01-31"> <owner>yiyix@chromium.org</owner> <owner>fserb@chromium.org</owner> <summary> @@ -2850,7 +2850,7 @@ </histogram> <histogram base="true" name="Blink.Style.UpdateTime" units="microseconds" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePreFCPSuffixes" --> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePostFCPSuffixes" -->
diff --git a/tools/metrics/histograms/metadata/chromeos/histograms.xml b/tools/metrics/histograms/metadata/chromeos/histograms.xml index 8c7fac5..23198fbb 100644 --- a/tools/metrics/histograms/metadata/chromeos/histograms.xml +++ b/tools/metrics/histograms/metadata/chromeos/histograms.xml
@@ -362,7 +362,7 @@ </histogram> <histogram name="ChromeOS.CWP.RecordPerf" enum="ChromeOSProfileRecordStatus" - expires_after="2021-11-30"> + expires_after="2022-01-30"> <owner>dubin@google.com</owner> <owner>cwp-team@google.com</owner> <summary> @@ -384,7 +384,7 @@ </histogram> <histogram name="ChromeOS.DeviceSettings.FeatureFlagsMigration" - enum="DeviceSettingsFeatureFlagsMigrationStatus" expires_after="2021-11-30"> + enum="DeviceSettingsFeatureFlagsMigrationStatus" expires_after="2022-01-30"> <owner>mnissler@chromium.org</owner> <owner>src/chrome/browser/ash/settings/OWNERS</owner> <summary> @@ -1792,7 +1792,7 @@ </histogram> <histogram name="ChromeOS.UrlXattrsCount" units="units" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>jorgelo@chromium.org</owner> <owner>tnagel@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/content/histograms.xml b/tools/metrics/histograms/metadata/content/histograms.xml index ef38d636..05cdf74b 100644 --- a/tools/metrics/histograms/metadata/content/histograms.xml +++ b/tools/metrics/histograms/metadata/content/histograms.xml
@@ -1287,7 +1287,7 @@ </histogram> <histogram name="ContentSuggestions.Feed.UploadActionsStatus" - enum="FeedUploadActionsStatus" expires_after="2021-12-01"> + enum="FeedUploadActionsStatus" expires_after="2022-01-30"> <owner>iwells@chromium.org</owner> <owner>harringtond@chromium.org</owner> <owner>feed@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/cras/histograms.xml b/tools/metrics/histograms/metadata/cras/histograms.xml index 87a3a3f..7a5e59f4 100644 --- a/tools/metrics/histograms/metadata/cras/histograms.xml +++ b/tools/metrics/histograms/metadata/cras/histograms.xml
@@ -84,7 +84,7 @@ </histogram> <histogram name="Cras.DeviceTypeOutput" enum="CrasDeviceType" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>yuhsuan@chromium.org</owner> <owner>chromeos-audio@google.com</owner> <summary> @@ -94,7 +94,7 @@ </summary> </histogram> -<histogram name="Cras.DeviceVolume" units="level" expires_after="2021-12-01"> +<histogram name="Cras.DeviceVolume" units="level" expires_after="2022-01-30"> <!-- Name completed by histogram_suffixes name="Cras.DeviceType" --> @@ -153,7 +153,7 @@ </histogram> <histogram name="Cras.HfpWidebandSpeechPacketLoss" units="units" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>enshuo@chromium.org</owner> <owner>chromeos-audio@google.com</owner> <summary> @@ -267,7 +267,7 @@ </histogram> <histogram name="Cras.InputDeviceBluetoothWideBandMicRuntime" units="seconds" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>hychao@chromium.org</owner> <owner>chromeos-audio@google.com</owner> <summary> @@ -643,7 +643,7 @@ </histogram> <histogram name="Cras.OutputDeviceInternalSpeakerRuntime" units="seconds" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>yuhsuan@chromium.org</owner> <owner>chromeos-audio@google.com</owner> <summary> @@ -910,7 +910,7 @@ </histogram> <histogram name="Cras.UnderrunsPerDevice" units="count" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>yuhsuan@chromium.org</owner> <owner>chromeos-audio@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/cross_device/histograms.xml b/tools/metrics/histograms/metadata/cross_device/histograms.xml index 8a2da521..e1e78f6 100644 --- a/tools/metrics/histograms/metadata/cross_device/histograms.xml +++ b/tools/metrics/histograms/metadata/cross_device/histograms.xml
@@ -1804,7 +1804,7 @@ </histogram> <histogram name="MultiDevice.SecureChannel.Nearby.ConnectionMedium" - enum="SecureChannelNearbyConnectionMedium" expires_after="2021-11-30"> + enum="SecureChannelNearbyConnectionMedium" expires_after="2022-01-30"> <owner>khorimoto@chromium.org</owner> <owner>better-together-dev@google.com</owner> <summary> @@ -1845,7 +1845,7 @@ </histogram> <histogram name="MultiDevice.SecureChannel.Nearby.EffectiveConnectionResult" - enum="BooleanSuccess" expires_after="2021-11-30"> + enum="BooleanSuccess" expires_after="2022-01-30"> <owner>khorimoto@chromium.org</owner> <owner>better-together-dev@google.com</owner> <summary> @@ -1893,7 +1893,7 @@ </histogram> <histogram name="MultiDevice.SecureChannel.Nearby.SendMessageResult" - enum="BooleanSuccess" expires_after="2021-11-30"> + enum="BooleanSuccess" expires_after="2022-01-30"> <owner>khorimoto@chromium.org</owner> <owner>better-together-dev@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/extension/histograms.xml b/tools/metrics/histograms/metadata/extension/histograms.xml index 44bf8a9..881b78d 100644 --- a/tools/metrics/histograms/metadata/extension/histograms.xml +++ b/tools/metrics/histograms/metadata/extension/histograms.xml
@@ -66,7 +66,7 @@ </histogram> <histogram name="ExtensionBlacklist.UnblacklistInstalled" - enum="ExtensionLocation" expires_after="2021-12-01"> + enum="ExtensionLocation" expires_after="2022-01-30"> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/gpu/histograms.xml b/tools/metrics/histograms/metadata/gpu/histograms.xml index ec4b314..aa255de 100644 --- a/tools/metrics/histograms/metadata/gpu/histograms.xml +++ b/tools/metrics/histograms/metadata/gpu/histograms.xml
@@ -559,7 +559,7 @@ </histogram> <histogram name="GPU.DirectComposition.IsUnderlay" enum="BooleanUnderlay" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>magchen@chromium.org</owner> <owner>zmo@chromium.org</owner> <summary> @@ -823,7 +823,7 @@ </summary> </histogram> -<histogram name="GPU.GpuCount" units="gpus" expires_after="2021-12-01"> +<histogram name="GPU.GpuCount" units="gpus" expires_after="2022-01-30"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -866,7 +866,7 @@ </histogram> <histogram name="GPU.GPUProcessExitCode" enum="GPUProcessExitCode" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -913,7 +913,7 @@ </histogram> <histogram name="GPU.HardwareAccelerationModeEnabled" enum="BooleanEnabled" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -1005,7 +1005,7 @@ </histogram> <histogram name="GPU.MultiGpu.AMD" enum="AMDDeviceId" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary> @@ -1015,7 +1015,7 @@ </histogram> <histogram name="GPU.MultiGpu.Nvidia" enum="NvidiaDeviceId" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>zmo@chromium.org</owner> <owner>graphics-dev@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/holding_space/histograms.xml b/tools/metrics/histograms/metadata/holding_space/histograms.xml index 0d62831a..9bf82cbd 100644 --- a/tools/metrics/histograms/metadata/holding_space/histograms.xml +++ b/tools/metrics/histograms/metadata/holding_space/histograms.xml
@@ -52,7 +52,7 @@ </variants> <histogram name="HoldingSpace.Animation.BubbleResize.Smoothness" units="%" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -76,7 +76,7 @@ </histogram> <histogram name="HoldingSpace.Downloads.Action.All" - enum="HoldingSpaceDownloadsAction" expires_after="2021-11-28"> + enum="HoldingSpaceDownloadsAction" expires_after="2022-01-30"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -86,7 +86,7 @@ </histogram> <histogram name="HoldingSpace.FilesAppChip.Action.All" - enum="HoldingSpaceFilesAppChipAction" expires_after="2021-11-28"> + enum="HoldingSpaceFilesAppChipAction" expires_after="2022-01-30"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -96,7 +96,7 @@ </histogram> <histogram name="HoldingSpace.Item.Action.All" enum="HoldingSpaceItemAction" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -159,7 +159,7 @@ </histogram> <histogram name="HoldingSpace.Pod.Action.All" enum="HoldingSpacePodAction" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -179,7 +179,7 @@ </histogram> <histogram name="HoldingSpace.TimeFromFirstAvailabilityToFirstEntry" units="ms" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary> @@ -189,7 +189,7 @@ </histogram> <histogram name="HoldingSpace.TimeFromFirstEntryToFirstPin" units="ms" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>dmblack@google.com</owner> <owner>gzadina@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/input/histograms.xml b/tools/metrics/histograms/metadata/input/histograms.xml index 4f259813..b2bedca3 100644 --- a/tools/metrics/histograms/metadata/input/histograms.xml +++ b/tools/metrics/histograms/metadata/input/histograms.xml
@@ -54,7 +54,7 @@ </histogram> <histogram name="InputMethod.Assistive.Autocorrect.Count" - enum="IMETextInputClient" expires_after="2021-11-21"> + enum="IMETextInputClient" expires_after="2022-01-30"> <owner>myy@google.com</owner> <owner>essential-inputs-team@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/login/histograms.xml b/tools/metrics/histograms/metadata/login/histograms.xml index 7617ca9c..ea26866f 100644 --- a/tools/metrics/histograms/metadata/login/histograms.xml +++ b/tools/metrics/histograms/metadata/login/histograms.xml
@@ -186,7 +186,7 @@ </histogram> <histogram name="Login.PasswordStoreSites.InitializedBeforeQuery" - enum="Boolean" expires_after="2021-11-30"> + enum="Boolean" expires_after="2022-01-30"> <owner>rajendrant@chromium.org</owner> <owner>mcrouse@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/memory/histograms.xml b/tools/metrics/histograms/metadata/memory/histograms.xml index 33f3cc94..9ad1142 100644 --- a/tools/metrics/histograms/metadata/memory/histograms.xml +++ b/tools/metrics/histograms/metadata/memory/histograms.xml
@@ -1624,7 +1624,7 @@ </histogram> <histogram name="Memory.NativeLibrary.MappedAndResidentMemoryFootprint3" - units="KB" expires_after="2021-11-28"> + units="KB" expires_after="2022-01-30"> <owner>lizeb@chromium.org</owner> <owner>pasko@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/net/histograms.xml b/tools/metrics/histograms/metadata/net/histograms.xml index 60ecc75..5a5d5ad 100644 --- a/tools/metrics/histograms/metadata/net/histograms.xml +++ b/tools/metrics/histograms/metadata/net/histograms.xml
@@ -1248,7 +1248,7 @@ </histogram> <histogram name="Net.DNS.ProbeSequence.ConfigChange.Failure.AttemptTime" - units="ms" expires_after="2021-11-28"> + units="ms" expires_after="2022-01-30"> <owner>ericorth@chromium.org</owner> <owner>doh-core@google.com</owner> <summary> @@ -5100,7 +5100,7 @@ </histogram> <histogram name="Net.SpdySessionErrorDetails2" enum="SpdyProtocolErrorDetails2" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>dschinazi@chromium.org</owner> <owner>src/net/OWNERS</owner> <summary>The type of SPDY Protocol error encountered.</summary>
diff --git a/tools/metrics/histograms/metadata/network/histograms.xml b/tools/metrics/histograms/metadata/network/histograms.xml index b8e600b..5dac9643 100644 --- a/tools/metrics/histograms/metadata/network/histograms.xml +++ b/tools/metrics/histograms/metadata/network/histograms.xml
@@ -793,7 +793,7 @@ <histogram name="Network.Shill.Cellular.3GPPRegistrationDelayedDrop" enum="NetworkCellular3GPPRegistrationDelayedDrop" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>ejcaruso@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -804,7 +804,7 @@ </histogram> <histogram name="Network.Shill.Cellular.AutoConnectTotalTime" units="ms" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>ejcaruso@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -815,7 +815,7 @@ </histogram> <histogram name="Network.Shill.Cellular.AutoConnectTries" units="units" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>ejcaruso@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -839,7 +839,7 @@ </histogram> <histogram name="Network.Shill.Cellular.DevicePresenceStatus" - enum="BooleanPresent" expires_after="2021-12-01"> + enum="BooleanPresent" expires_after="2022-01-30"> <owner>ejcaruso@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -982,7 +982,7 @@ </histogram> <histogram name="Network.Shill.Cellular.TimeToConnect" units="ms" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>ejcaruso@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1022,7 +1022,7 @@ </histogram> <histogram name="Network.Shill.Cellular.TimeToOnline" units="ms" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>ejcaruso@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1261,7 +1261,7 @@ </histogram> <histogram name="Network.Shill.Ethernet.DevicePresenceStatus" - enum="BooleanPresent" expires_after="2021-12-01"> + enum="BooleanPresent" expires_after="2022-01-30"> <owner>stevenjb@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1622,7 +1622,7 @@ </histogram> <histogram name="Network.Shill.Vpn.Driver" enum="VPNDriver" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>akhouderchah@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1642,7 +1642,7 @@ </histogram> <histogram name="Network.Shill.Vpn.TimeOnline" units="ms" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>akhouderchah@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1676,7 +1676,7 @@ </histogram> <histogram name="Network.Shill.Vpn.UserAuthenticationType" - enum="VPNUserAuthenticationType" expires_after="2021-12-01"> + enum="VPNUserAuthenticationType" expires_after="2022-01-30"> <owner>akhouderchah@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1748,7 +1748,7 @@ </histogram> <histogram name="Network.Shill.WiFi.ApDisconnectReason" enum="WiFiReasonCode" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1768,7 +1768,7 @@ </histogram> <histogram name="Network.Shill.WiFi.AssocFailureType" enum="WiFiStatusCode" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>akhouderchah@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1780,7 +1780,7 @@ </histogram> <histogram name="Network.Shill.WiFi.AuthFailureType" enum="WiFiStatusCode" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>akhouderchah@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1792,7 +1792,7 @@ </histogram> <histogram name="Network.Shill.WiFi.AutoConnectableServices" units="units" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1823,7 +1823,7 @@ </histogram> <histogram name="Network.Shill.Wifi.Channel" enum="NetworkChannelType" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1833,7 +1833,7 @@ </histogram> <histogram name="Network.Shill.WiFi.ClientDisconnectReason" - enum="WiFiReasonCode" expires_after="2021-12-01"> + enum="WiFiReasonCode" expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1895,7 +1895,7 @@ </histogram> <histogram name="Network.Shill.Wifi.EapInnerProtocol" enum="EAPInnerProtocol" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1905,7 +1905,7 @@ </histogram> <histogram name="Network.Shill.Wifi.EapOuterProtocol" enum="EAPOuterProtocol" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1979,7 +1979,7 @@ </histogram> <histogram name="Network.Shill.WiFi.HiddenSSIDNetworkCount" units="units" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>tnagel@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <owner>cros-privacy-core@google.com</owner> @@ -2132,7 +2132,7 @@ </histogram> <histogram name="Network.Shill.Wifi.NeighborLinkMonitorFailure" - enum="NeighborLinkMonitorFailureType" expires_after="2021-12-01"> + enum="NeighborLinkMonitorFailureType" expires_after="2022-01-30"> <owner>jiejiang@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2143,7 +2143,7 @@ </histogram> <histogram name="Network.Shill.Wifi.NetworkConnectionIPType" - enum="NetworkConnectionIPType" expires_after="2021-12-01"> + enum="NetworkConnectionIPType" expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2217,7 +2217,7 @@ </histogram> <histogram name="Network.Shill.WiFi.RememberedNetworkCount" units="units" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2229,7 +2229,7 @@ </histogram> <histogram name="Network.Shill.WiFi.RememberedSystemNetworkCount" units="units" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2302,7 +2302,7 @@ </histogram> <histogram name="Network.Shill.Wifi.Security" enum="NetworkSecurityType" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2344,7 +2344,7 @@ </histogram> <histogram name="Network.Shill.Wifi.SignalStrength" units="negative dBm" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2470,7 +2470,7 @@ </histogram> <histogram name="Network.Shill.Wifi.TimeResumeToReady" units="ms" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2577,7 +2577,7 @@ </histogram> <histogram name="Network.Shill.WiFi.TransmitBitrateMbps" units="Mbps" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -2611,7 +2611,7 @@ </histogram> <histogram name="Network.Shill.WiFi.UserInitiatedConnectionResult" - enum="ConnectionResult" expires_after="2021-12-01"> + enum="ConnectionResult" expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/notifications/histograms.xml b/tools/metrics/histograms/metadata/notifications/histograms.xml index fa4ab49..c7ecafc 100644 --- a/tools/metrics/histograms/metadata/notifications/histograms.xml +++ b/tools/metrics/histograms/metadata/notifications/histograms.xml
@@ -243,7 +243,7 @@ </histogram> <histogram name="Notifications.Database.DeleteAllForOriginsResult" - enum="NotificationDatabaseStatus" expires_after="M94"> + enum="NotificationDatabaseStatus" expires_after="M98"> <owner>knollr@chromium.org</owner> <owner>peter@chromium.org</owner> <summary> @@ -274,7 +274,7 @@ </histogram> <histogram name="Notifications.Database.DeleteServiceWorkerRegistrationResult" - enum="NotificationDatabaseStatus" expires_after="M94"> + enum="NotificationDatabaseStatus" expires_after="M98"> <owner>knollr@chromium.org</owner> <owner>peter@chromium.org</owner> <summary> @@ -628,7 +628,7 @@ </histogram> <histogram name="Notifications.PersistentWebNotificationClickEventResult" - enum="ServiceWorkerStatusCode" expires_after="2021-08-22"> + enum="ServiceWorkerStatusCode" expires_after="M98"> <owner>peter@chromium.org</owner> <owner>knollr@chromium.org</owner> <summary> @@ -648,7 +648,7 @@ </histogram> <histogram name="Notifications.PersistentWebNotificationCloseEventResult" - enum="ServiceWorkerStatusCode" expires_after="2021-08-22"> + enum="ServiceWorkerStatusCode" expires_after="M98"> <owner>peter@chromium.org</owner> <owner>knollr@chromium.org</owner> <summary> @@ -1202,6 +1202,9 @@ <histogram name="Notifications.XPCConnectionEvent" enum="XPCConnectionEvent" expires_after="M94"> + <obsolete> + We no longer use an XPC service for macOS notifications from 06/2021. + </obsolete> <owner>peter@chromium.org</owner> <owner>rsesek@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index 8d0901c..cbfc8f9 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -870,7 +870,7 @@ </histogram> <histogram name="appcache.UpdateJob.ExistingResourceCorruptionRecovery" - units="units" expires_after="2021-11-28"> + units="units" expires_after="2022-01-30"> <owner>cmp@chromium.org</owner> <owner>pwnall@chromium.org</owner> <summary> @@ -8432,7 +8432,7 @@ </histogram> <histogram name="Kiosk.Launch.CryptohomeFailure" enum="LoginFailureReason" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>xiyuan@chromium.org</owner> <owner>apotapchuk@chromium.org</owner> <summary>Tracks cryptohome failure during kiosk launch.</summary> @@ -8549,7 +8549,7 @@ </histogram> <histogram name="LanguageSettings.PageImpression" - enum="LanguageSettingsPageType" expires_after="2021-12-01"> + enum="LanguageSettingsPageType" expires_after="2022-01-30"> <owner>googleo@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -8560,7 +8560,7 @@ </histogram> <histogram name="LanguageUsage.AcceptLanguage" enum="LanguageName" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>perrier@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -8570,7 +8570,7 @@ </histogram> <histogram name="LanguageUsage.AcceptLanguage.Count" units="units" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>dvallet@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -8580,7 +8580,7 @@ </histogram> <histogram name="LanguageUsage.ApplicationLanguage" enum="LanguageName" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>perrier@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -8590,7 +8590,7 @@ </histogram> <histogram name="LanguageUsage.MostFrequentPageLanguages" enum="LanguageName" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>perrier@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -8608,7 +8608,7 @@ </histogram> <histogram name="LanguageUsage.UI.Android.Availability" - enum="LanguageUsage.UI.Android.Availability" expires_after="2021-12-01"> + enum="LanguageUsage.UI.Android.Availability" expires_after="2022-01-30"> <owner>perrier@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -8636,7 +8636,7 @@ </histogram> <histogram name="LanguageUsage.UI.Android.Correctness.NoOverride" - enum="LanguageUsage.UI.Android.Correctness" expires_after="2021-12-01"> + enum="LanguageUsage.UI.Android.Correctness" expires_after="2022-01-30"> <owner>perrier@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -8650,7 +8650,7 @@ </histogram> <histogram name="LanguageUsage.UI.Android.Correctness.Override" - enum="LanguageUsage.UI.Android.Correctness" expires_after="2021-12-01"> + enum="LanguageUsage.UI.Android.Correctness" expires_after="2022-01-30"> <owner>perrier@chromium.org</owner> <owner>chrome-language@google.com</owner> <summary> @@ -12704,7 +12704,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.CookieDomainCount" units="units" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -12715,7 +12715,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.DatabaseSize" units="KiB" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -12726,7 +12726,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.RecordCount" units="units" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -12737,7 +12737,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.StorageOriginCount" units="units" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -12748,7 +12748,7 @@ </histogram> <histogram name="Privacy.AccessContextAudit.TopFrameOriginCount" units="units" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>msramek@chromium.org</owner> <owner>sauski@google.com</owner> <summary> @@ -15490,7 +15490,7 @@ </histogram> <histogram name="SiteIsolation.SavedUserTriggeredIsolatedOrigins.Size" - units="origins" expires_after="2021-11-30"> + units="origins" expires_after="2022-01-30"> <owner>alexmos@chromium.org</owner> <owner>creis@chromium.org</owner> <owner>lukasza@chromium.org</owner> @@ -16584,7 +16584,7 @@ </histogram> <histogram name="Tablet.AppDrag.EndWindowState" - enum="AppWindowDragEndWindowState" expires_after="2021-12-01"> + enum="AppWindowDragEndWindowState" expires_after="2022-01-30"> <owner>minch@chromium.org</owner> <owner>omrilio@chromium.org</owner> <summary> @@ -16605,7 +16605,7 @@ </histogram> <histogram name="Tablet.AppWindowDrag.InSplitView.CountOfPerUserSession" - units="times" expires_after="2021-12-01"> + units="times" expires_after="2022-01-30"> <owner>minch@chromium.org</owner> <owner>omrilio@chromium.org</owner> <summary> @@ -19203,7 +19203,7 @@ </histogram> <histogram name="WebFont.CacheHit" enum="WebFontCacheHit" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>hajimehoshi@chromium.org</owner> <owner>kenjibaheux@chromium.org</owner> <owner>kouhei@chromium.org</owner> @@ -19461,7 +19461,7 @@ </histogram> <histogram name="WebsiteSettings.Discoverability.Action" - enum="WebsiteSettingsDiscoverabilityAction" expires_after="M94"> + enum="WebsiteSettingsDiscoverabilityAction" expires_after="M96"> <owner>eokoyomon@chromium.org</owner> <owner>dullweber@chromium.org</owner> <summary> @@ -19470,7 +19470,7 @@ </histogram> <histogram name="WebsiteSettings.Discoverability.TimeToClickHighlight" - units="ms" expires_after="M94"> + units="ms" expires_after="M96"> <owner>eokoyomon@chromium.org</owner> <owner>dullweber@chromium.org</owner> <summary> @@ -19480,7 +19480,7 @@ </histogram> <histogram name="WebsiteSettings.Discoverability.TimeToOpen" units="ms" - expires_after="2022-01-02"> + expires_after="M96"> <owner>eokoyomon@chromium.org</owner> <owner>dullweber@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/page/histograms.xml b/tools/metrics/histograms/metadata/page/histograms.xml index f8af1c0..404d9a7 100644 --- a/tools/metrics/histograms/metadata/page/histograms.xml +++ b/tools/metrics/histograms/metadata/page/histograms.xml
@@ -703,7 +703,7 @@ </histogram> <histogram name="PageLoad.Clients.Scheme.HTTP.PaintTiming.UnderStat" - enum="PageLoadTimingUnderStat" expires_after="2021-11-28"> + enum="PageLoadTimingUnderStat" expires_after="2022-01-30"> <owner>tbansal@chromium.org</owner> <summary> Records if the time from navigation to first contentful paint was less than @@ -731,7 +731,7 @@ </histogram> <histogram name="PageLoad.Clients.Scheme.HTTPS.PaintTiming.UnderStat" - enum="PageLoadTimingUnderStat" expires_after="2021-11-28"> + enum="PageLoadTimingUnderStat" expires_after="2022-01-30"> <owner>tbansal@chromium.org</owner> <summary> Records if the time from navigation to first contentful paint was less than
diff --git a/tools/metrics/histograms/metadata/phonehub/histograms.xml b/tools/metrics/histograms/metadata/phonehub/histograms.xml index 201a3e3..3740cd7 100644 --- a/tools/metrics/histograms/metadata/phonehub/histograms.xml +++ b/tools/metrics/histograms/metadata/phonehub/histograms.xml
@@ -40,7 +40,7 @@ </histogram> <histogram name="PhoneHub.CompletedUserAction" enum="PhoneHubUserAction" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>khorimoto@chromium.org</owner> <owner>better-together-dev@google.com</owner> <summary> @@ -61,7 +61,7 @@ </histogram> <histogram name="PhoneHub.Connection.Result" enum="BooleanSuccess" - expires_after="2021-11-30"> + expires_after="2022-01-30"> <owner>khorimoto@chromium.org</owner> <owner>better-together-dev@google.com</owner> <summary> @@ -202,7 +202,7 @@ </histogram> <histogram name="PhoneHub.OptInEntryPoint" enum="PhoneHubOptInEntryPoint" - expires_after="2021-11-25"> + expires_after="2022-01-30"> <owner>meilinw@chromium.org</owner> <owner>khorimoto@chromium.org</owner> <summary>Tracks the UI surface with which users enable Phone Hub.</summary>
diff --git a/tools/metrics/histograms/metadata/platform/histograms.xml b/tools/metrics/histograms/metadata/platform/histograms.xml index ab388f09..fb86733c 100644 --- a/tools/metrics/histograms/metadata/platform/histograms.xml +++ b/tools/metrics/histograms/metadata/platform/histograms.xml
@@ -213,7 +213,7 @@ </histogram> <histogram name="Platform.Cr50.RlzOfBoardIdMismatch" enum="Cr50CrosRlzCodes" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>vbendeb@chromium.org</owner> <owner>apronin@chromium.org</owner> <owner>cros-hwsec+uma@chromium.org</owner> @@ -1403,7 +1403,7 @@ </histogram> <histogram name="Platform.WiFiDeviceCount" units="wifi devices" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner> <summary> @@ -1413,7 +1413,7 @@ </histogram> <histogram name="Platform.WiFiDisapppearedFromPCI" units="units" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>rajatja@chromium.org</owner> <owner>briannorris@chromium.org</owner> <owner>chromeos-kernel-wifi@google.com</owner> @@ -1428,7 +1428,7 @@ </histogram> <histogram name="Platform.WiFiStatusAfterForcedPCIRescan" enum="WiFiPCIStatus" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>rajatja@chromium.org</owner> <owner>briannorris@chromium.org</owner> <owner>cros-network-metrics@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/power/histograms.xml b/tools/metrics/histograms/metadata/power/histograms.xml index e5a4af84..13546be 100644 --- a/tools/metrics/histograms/metadata/power/histograms.xml +++ b/tools/metrics/histograms/metadata/power/histograms.xml
@@ -125,7 +125,7 @@ </histogram> <histogram name="Power.BatteryDischargeRate" units="mW" - expires_after="2021-12-12"> + expires_after="2022-01-30"> <owner>puthik@chromium.org</owner> <owner>chromeos-platform-power@google.com</owner> <summary> @@ -350,7 +350,7 @@ </histogram> <histogram name="Power.CpuTimeSecondsPerProcessType" enum="ProcessType2" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>eseckler@chromium.org</owner> <owner>skyostil@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/printing/histograms.xml b/tools/metrics/histograms/metadata/printing/histograms.xml index a814fea..29f3880 100644 --- a/tools/metrics/histograms/metadata/printing/histograms.xml +++ b/tools/metrics/histograms/metadata/printing/histograms.xml
@@ -135,7 +135,7 @@ </histogram> <histogram name="Printing.CUPS.IppAttributesSuccess" enum="BooleanSuccess" - expires_after="2021-11-21"> + expires_after="2022-01-30"> <owner>skau@chromium.org</owner> <owner>cros-printing-dev@chromium.org</owner> <summary> @@ -347,7 +347,7 @@ </histogram> <histogram name="Printing.CUPS.ProtocolUsed" enum="PrinterProtocol" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>skau@chromium.org</owner> <owner>cros-printing-dev@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml index 39419c50..0511906 100644 --- a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml +++ b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml
@@ -1982,7 +1982,7 @@ </histogram> <histogram name="SafeBrowsing.V4Update.Network.Result" - enum="CombinedHttpResponseAndNetErrorCode" expires_after="2021-11-28"> + enum="CombinedHttpResponseAndNetErrorCode" expires_after="2022-01-30"> <owner>vakh@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> <summary> @@ -2007,7 +2007,7 @@ </histogram> <histogram name="SafeBrowsing.V4Update.ResponseSizeKB" units="KB" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>vakh@chromium.org</owner> <owner>chrome-safebrowsing-alerts@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/session/histograms.xml b/tools/metrics/histograms/metadata/session/histograms.xml index 3c57916..bc9d4275 100644 --- a/tools/metrics/histograms/metadata/session/histograms.xml +++ b/tools/metrics/histograms/metadata/session/histograms.xml
@@ -60,7 +60,7 @@ </histogram> <histogram name="Session.OpenedTabCounts" units="operations" - expires_after="2021-11-21"> + expires_after="2022-01-30"> <owner>rohitrao@chromium.org</owner> <owner>marq@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/uma/histograms.xml b/tools/metrics/histograms/metadata/uma/histograms.xml index 7e57485..0b51c4b 100644 --- a/tools/metrics/histograms/metadata/uma/histograms.xml +++ b/tools/metrics/histograms/metadata/uma/histograms.xml
@@ -728,7 +728,7 @@ </histogram> <histogram name="UMA.StructuredMetrics.NumEventsInUpload" units="count" - expires_after="2021-12-01"> + expires_after="2022-01-30"> <owner>tby@chromium.org</owner> <owner>rkaplow@chromium.org</owner> <owner>asvitkine@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/web_rtc/histograms.xml b/tools/metrics/histograms/metadata/web_rtc/histograms.xml index 4692b5a..f5fe8da 100644 --- a/tools/metrics/histograms/metadata/web_rtc/histograms.xml +++ b/tools/metrics/histograms/metadata/web_rtc/histograms.xml
@@ -840,7 +840,7 @@ </histogram> <histogram name="WebRTC.Audio.SpeechExpandRatePercent" units="%" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>hlundin@chromium.org</owner> <summary> Measures the audible expand rate for an incoming WebRTC audio stream. The @@ -1875,7 +1875,7 @@ </histogram> <histogram name="WebRTC.ReceivedAudioTrackDuration" units="ms" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>perkj@chromium.org</owner> <summary> Durations of audio tracks received over a PeerConnection. The stopwatch @@ -1885,7 +1885,7 @@ </histogram> <histogram name="WebRTC.ReceivedVideoTrackDuration" units="ms" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>perkj@chromium.org</owner> <summary> Durations of video tracks received over a PeerConnection. The stopwatch @@ -1911,7 +1911,7 @@ </histogram> <histogram name="WebRTC.SentAudioTrackDuration" units="ms" - expires_after="2021-11-28"> + expires_after="2022-01-30"> <owner>perkj@chromium.org</owner> <summary> Durations of audio tracks sent over a PeerConnection. The stopwatch starts
diff --git a/tools/metrics/histograms/metadata/webauthn/histograms.xml b/tools/metrics/histograms/metadata/webauthn/histograms.xml index 5ed998e..35717446 100644 --- a/tools/metrics/histograms/metadata/webauthn/histograms.xml +++ b/tools/metrics/histograms/metadata/webauthn/histograms.xml
@@ -156,7 +156,7 @@ </histogram> <histogram name="WebAuthentication.GetAssertionRequestTransport" - enum="WebAuthenticationFidoTransport" expires_after="2021-12-01"> + enum="WebAuthenticationFidoTransport" expires_after="2022-01-30"> <owner>kenrb@chromium.org</owner> <owner>martinkr@google.com</owner> <summary> @@ -167,7 +167,7 @@ </histogram> <histogram name="WebAuthentication.GetAssertionResponseTransport" - enum="WebAuthenticationFidoTransport" expires_after="2021-12-01"> + enum="WebAuthenticationFidoTransport" expires_after="2022-01-30"> <owner>kenrb@chromium.org</owner> <owner>martinkr@google.com</owner> <summary> @@ -227,7 +227,7 @@ </histogram> <histogram name="WebAuthentication.MakeCredentialResponseTransport" - enum="WebAuthenticationFidoTransport" expires_after="2021-12-01"> + enum="WebAuthenticationFidoTransport" expires_after="2022-01-30"> <owner>kenrb@chromium.org</owner> <owner>martinkr@google.com</owner> <summary>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 493a4f481..2faceaa3 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -2,15 +2,15 @@ "trace_processor_shell": { "win": { "hash": "dfe3ae9820abd756129c53fc0ec7f50c0851723a", - "remote_path": "perfetto_binaries/trace_processor_shell/win/70e408c9bc8610ab9a8484b2ed91461d8416166e/trace_processor_shell.exe" + "remote_path": "perfetto_binaries/trace_processor_shell/win/ef682fd91263e8e05e1b177649aeea3f18f37d79/trace_processor_shell.exe" }, "mac": { "hash": "e7000eeeefed60f263b77eea1156606a18304379", - "remote_path": "perfetto_binaries/trace_processor_shell/mac/70e408c9bc8610ab9a8484b2ed91461d8416166e/trace_processor_shell" + "remote_path": "perfetto_binaries/trace_processor_shell/mac/171e281775914c1c427b926666bf1c0f8070e762/trace_processor_shell" }, "linux": { "hash": "672ed966e2e8072a7d6322367ac35c5fedd1ff9f", - "remote_path": "perfetto_binaries/trace_processor_shell/linux/171e281775914c1c427b926666bf1c0f8070e762/trace_processor_shell" + "remote_path": "perfetto_binaries/trace_processor_shell/linux/ef682fd91263e8e05e1b177649aeea3f18f37d79/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/ui/accessibility/BUILD.gn b/ui/accessibility/BUILD.gn index e34a108..42d1928f 100644 --- a/ui/accessibility/BUILD.gn +++ b/ui/accessibility/BUILD.gn
@@ -61,12 +61,12 @@ "ax_mode.h", "ax_node_data.cc", "ax_node_data.h", - "ax_node_text_styles.cc", - "ax_node_text_styles.h", "ax_relative_bounds.cc", "ax_relative_bounds.h", "ax_role_properties.cc", "ax_role_properties.h", + "ax_text_attributes.cc", + "ax_text_attributes.h", "ax_tree_data.cc", "ax_tree_data.h", "ax_tree_id.cc",
diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc index 0c082dd..6dc61bf 100644 --- a/ui/accessibility/ax_node_data.cc +++ b/ui/accessibility/ax_node_data.cc
@@ -550,34 +550,37 @@ }); } -AXNodeTextStyles AXNodeData::GetTextStyles() const { - AXNodeTextStyles style_attributes; +AXTextAttributes AXNodeData::GetTextAttributes() const { + AXTextAttributes text_attributes; + // This overload of `GetIntAttribute` does not set the return value to 0 if + // the attribute is not present, hence maintaining the corresponding member in + // `AXTextAttributes` as `AXTextAttributes::kUnsetValue`. GetIntAttribute(ax::mojom::IntAttribute::kBackgroundColor, - &style_attributes.background_color); - GetIntAttribute(ax::mojom::IntAttribute::kColor, &style_attributes.color); + &text_attributes.background_color); + GetIntAttribute(ax::mojom::IntAttribute::kColor, &text_attributes.color); GetIntAttribute(ax::mojom::IntAttribute::kInvalidState, - &style_attributes.invalid_state); + &text_attributes.invalid_state); GetIntAttribute(ax::mojom::IntAttribute::kTextOverlineStyle, - &style_attributes.overline_style); + &text_attributes.overline_style); GetIntAttribute(ax::mojom::IntAttribute::kTextDirection, - &style_attributes.text_direction); + &text_attributes.text_direction); GetIntAttribute(ax::mojom::IntAttribute::kTextPosition, - &style_attributes.text_position); + &text_attributes.text_position); GetIntAttribute(ax::mojom::IntAttribute::kTextStrikethroughStyle, - &style_attributes.strikethrough_style); + &text_attributes.strikethrough_style); GetIntAttribute(ax::mojom::IntAttribute::kTextStyle, - &style_attributes.text_style); + &text_attributes.text_style); GetIntAttribute(ax::mojom::IntAttribute::kTextUnderlineStyle, - &style_attributes.underline_style); + &text_attributes.underline_style); GetFloatAttribute(ax::mojom::FloatAttribute::kFontSize, - &style_attributes.font_size); + &text_attributes.font_size); GetFloatAttribute(ax::mojom::FloatAttribute::kFontWeight, - &style_attributes.font_weight); + &text_attributes.font_weight); GetStringAttribute(ax::mojom::StringAttribute::kFontFamily, - &style_attributes.font_family); + &text_attributes.font_family); - return style_attributes; + return text_attributes; } void AXNodeData::SetName(const std::string& name) {
diff --git a/ui/accessibility/ax_node_data.h b/ui/accessibility/ax_node_data.h index 0c29a42b..c1f5057fc 100644 --- a/ui/accessibility/ax_node_data.h +++ b/ui/accessibility/ax_node_data.h
@@ -16,8 +16,8 @@ #include "base/strings/string_split.h" #include "ui/accessibility/ax_base_export.h" #include "ui/accessibility/ax_enums.mojom-forward.h" -#include "ui/accessibility/ax_node_text_styles.h" #include "ui/accessibility/ax_relative_bounds.h" +#include "ui/accessibility/ax_text_attributes.h" #include "ui/gfx/geometry/rect_f.h" namespace ui { @@ -144,9 +144,10 @@ void RemoveStringListAttribute(ax::mojom::StringListAttribute attribute); // - // Text styles. + // Text attributes, such as spelling markers and style information. // - AXNodeTextStyles GetTextStyles() const; + + AXTextAttributes GetTextAttributes() const; // // Convenience functions.
diff --git a/ui/accessibility/ax_node_data_unittest.cc b/ui/accessibility/ax_node_data_unittest.cc index 368a3e3..e5a7ca1 100644 --- a/ui/accessibility/ax_node_data_unittest.cc +++ b/ui/accessibility/ax_node_data_unittest.cc
@@ -14,6 +14,7 @@ #include "ui/accessibility/ax_enum_util.h" #include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_role_properties.h" +#include "ui/accessibility/ax_text_attributes.h" namespace ui { @@ -41,38 +42,38 @@ AXNodeData node_2; node_2.AddFloatAttribute(ax::mojom::FloatAttribute::kFontSize, 1.5); - EXPECT_TRUE(node_1.GetTextStyles() == node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes()); node_2.AddIntAttribute(ax::mojom::IntAttribute::kColor, 100); - EXPECT_TRUE(node_1.GetTextStyles() != node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes()); node_1.AddIntAttribute(ax::mojom::IntAttribute::kColor, 100); - EXPECT_TRUE(node_1.GetTextStyles() == node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes()); node_2.RemoveIntAttribute(ax::mojom::IntAttribute::kColor); - EXPECT_TRUE(node_1.GetTextStyles() != node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes()); node_2.AddIntAttribute(ax::mojom::IntAttribute::kColor, 100); - EXPECT_TRUE(node_1.GetTextStyles() == node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes()); node_1.AddStringAttribute(ax::mojom::StringAttribute::kFontFamily, "test font"); - EXPECT_TRUE(node_1.GetTextStyles() != node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes()); node_2.AddStringAttribute(ax::mojom::StringAttribute::kFontFamily, "test font"); - EXPECT_TRUE(node_1.GetTextStyles() == node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes()); node_2.RemoveStringAttribute(ax::mojom::StringAttribute::kFontFamily); - EXPECT_TRUE(node_1.GetTextStyles() != node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes()); node_2.AddStringAttribute(ax::mojom::StringAttribute::kFontFamily, "test font"); - EXPECT_TRUE(node_1.GetTextStyles() == node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() == node_2.GetTextAttributes()); node_2.AddStringAttribute(ax::mojom::StringAttribute::kFontFamily, "different font"); - EXPECT_TRUE(node_1.GetTextStyles() != node_2.GetTextStyles()); + EXPECT_TRUE(node_1.GetTextAttributes() != node_2.GetTextAttributes()); std::string tooltip; node_2.AddStringAttribute(ax::mojom::StringAttribute::kTooltip, @@ -81,10 +82,10 @@ &tooltip)); EXPECT_EQ(tooltip, "test tooltip"); - AXNodeTextStyles node1_styles = node_1.GetTextStyles(); - AXNodeTextStyles moved_styles = std::move(node1_styles); - EXPECT_TRUE(node1_styles != moved_styles); - EXPECT_TRUE(moved_styles == node_1.GetTextStyles()); + AXTextAttributes node1_attributes = node_1.GetTextAttributes(); + AXTextAttributes moved_attributes = std::move(node1_attributes); + EXPECT_TRUE(node1_attributes != moved_attributes); + EXPECT_TRUE(moved_attributes == node_1.GetTextAttributes()); } TEST(AXNodeDataTest, IsButtonPressed) {
diff --git a/ui/accessibility/ax_node_position_unittest.cc b/ui/accessibility/ax_node_position_unittest.cc index 2282e1e..3b761de 100644 --- a/ui/accessibility/ax_node_position_unittest.cc +++ b/ui/accessibility/ax_node_position_unittest.cc
@@ -2112,7 +2112,7 @@ EXPECT_TRUE(text_position->AtEndOfParagraph()); } -TEST_F(AXPositionTest, ParagraphEdgesWithPreservedNewLine) { +TEST_F(AXPositionTest, AtStartOrEndOfParagraphWithPreservedNewLine) { // This test ensures that "At{Start|End}OfParagraph" work correctly when a // text position is on a preserved newline character. // @@ -2270,60 +2270,6 @@ EXPECT_FALSE(text_position14->AtStartOfParagraph()); } -TEST_F( - AXPositionTest, - PreviousParagraphEndStopAtAnchorBoundaryWithConsecutiveParentChildLineBreakingObjects) { - // This test updates the tree structure to test a specific edge case - - // CreatePreviousParagraphEndPosition(), stopping at an anchor boundary, - // with consecutive parent-child line breaking objects. - // ++1 rootWebArea - // ++++2 staticText name="first" - // ++++3 genericContainer isLineBreakingObject - // ++++++4 genericContainer isLineBreakingObject - // ++++++5 staticText name="second" - AXNodeData root_data; - root_data.id = 1; - root_data.role = ax::mojom::Role::kRootWebArea; - - AXNodeData static_text_data_a; - static_text_data_a.id = 2; - static_text_data_a.role = ax::mojom::Role::kStaticText; - static_text_data_a.SetName("first"); - - AXNodeData container_data_a; - container_data_a.id = 3; - container_data_a.role = ax::mojom::Role::kGenericContainer; - container_data_a.AddBoolAttribute( - ax::mojom::BoolAttribute::kIsLineBreakingObject, true); - - AXNodeData container_data_b; - container_data_b.id = 4; - container_data_b.role = ax::mojom::Role::kGenericContainer; - container_data_b.AddBoolAttribute( - ax::mojom::BoolAttribute::kIsLineBreakingObject, true); - - AXNodeData static_text_data_b; - static_text_data_b.id = 5; - static_text_data_b.role = ax::mojom::Role::kStaticText; - static_text_data_b.SetName("second"); - - root_data.child_ids = {static_text_data_a.id, container_data_a.id}; - container_data_a.child_ids = {container_data_b.id, static_text_data_b.id}; - - SetTree(CreateAXTree({root_data, static_text_data_a, container_data_a, - container_data_b, static_text_data_b})); - - TestPositionType test_position = AXNodePosition::CreateTextPosition( - GetTreeID(), root_data.id, 11 /* text_offset */, - ax::mojom::TextAffinity::kDownstream); - - test_position = test_position->CreatePreviousParagraphEndPosition( - AXBoundaryBehavior::StopAtAnchorBoundary); - EXPECT_TRUE(test_position->IsTextPosition()); - EXPECT_EQ(root_data.id, test_position->anchor_id()); - EXPECT_EQ(5, test_position->text_offset()); -} - TEST_F(AXPositionTest, AtStartOrEndOfParagraphOnAListMarker) { // "AtStartOfParagraph" should return true before a list marker, either a // Legacy Layout or an NG Layout one. It should return false on the next @@ -3112,6 +3058,254 @@ EXPECT_FALSE(text_position->AtStartOfParagraph()); } +TEST_F(AXPositionTest, CreateNextOrPreviousParagraphPositionWithIgnoredNodes) { + // When searching for a paragraph start position, we should always place the + // resulting position after any ignored paragraph boundary, not before it. + // Otherwise we are running the risk of including parts of the previous + // paragraph in the current paragraph, or providing inconsistent results if + // assistive software calls `AtStart/EndOfParagraph()` on the resulting + // position. We should do the same when searching for paragraph end positions. + // ++1 kRootWebArea isLineBreakingObject + // ++++2 kStaticText "First paragraph" + // ++++++3 kInlineTextBox "First paragraph" + // ++++4 kGenericContainer ignored isLineBreakingObject + // ++++5 kStaticText "Second paragraph" + // ++++++6 kInlineTextBox "Second" + // ++++++7 kInlineTextBox " " + // ++++++8 kInlineTextBox "paragraph" + // ++++9 kGenericContainer ignored isLineBreakingObject + // ++++10 kStaticText "Third paragraph" + // ++++++11 kInlineTextBox "Third paragraph" + + AXNodeData root_data; + root_data.id = 1; + AXNodeData static_text_data_a; + static_text_data_a.id = 2; + AXNodeData inline_text_data_a; + inline_text_data_a.id = 3; + AXNodeData ignored_container_data_a; + ignored_container_data_a.id = 4; + AXNodeData static_text_data_b; + static_text_data_b.id = 5; + AXNodeData inline_text_data_b_1; + inline_text_data_b_1.id = 6; + AXNodeData inline_text_data_b_2; + inline_text_data_b_2.id = 7; + AXNodeData inline_text_data_b_3; + inline_text_data_b_3.id = 8; + AXNodeData ignored_container_data_b; + ignored_container_data_b.id = 9; + AXNodeData static_text_data_c; + static_text_data_c.id = 10; + AXNodeData inline_text_data_c; + inline_text_data_c.id = 11; + + root_data.role = ax::mojom::Role::kRootWebArea; + root_data.AddBoolAttribute(ax::mojom::BoolAttribute::kIsLineBreakingObject, + true); + root_data.child_ids = {static_text_data_a.id, ignored_container_data_a.id, + static_text_data_b.id, ignored_container_data_b.id, + static_text_data_c.id}; + + static_text_data_a.role = ax::mojom::Role::kStaticText; + static_text_data_a.SetName("First paragraph"); + static_text_data_a.child_ids = {inline_text_data_a.id}; + + inline_text_data_a.role = ax::mojom::Role::kInlineTextBox; + inline_text_data_a.SetName("First paragraph"); + + ignored_container_data_a.role = ax::mojom::Role::kGenericContainer; + ignored_container_data_a.AddBoolAttribute( + ax::mojom::BoolAttribute::kIsLineBreakingObject, true); + + static_text_data_b.role = ax::mojom::Role::kStaticText; + static_text_data_b.SetName("Second paragraph"); + static_text_data_b.child_ids = {inline_text_data_b_1.id, + inline_text_data_b_2.id, + inline_text_data_b_3.id}; + + inline_text_data_b_1.role = ax::mojom::Role::kInlineTextBox; + inline_text_data_b_1.SetName("Paragraph"); + + inline_text_data_b_2.role = ax::mojom::Role::kInlineTextBox; + inline_text_data_b_2.SetName(" "); + + inline_text_data_b_3.role = ax::mojom::Role::kInlineTextBox; + inline_text_data_b_3.SetName("paragraph"); + + ignored_container_data_b.role = ax::mojom::Role::kGenericContainer; + ignored_container_data_b.AddState(ax::mojom::State::kIgnored); + ignored_container_data_b.AddBoolAttribute( + ax::mojom::BoolAttribute::kIsLineBreakingObject, true); + + static_text_data_c.role = ax::mojom::Role::kStaticText; + static_text_data_c.SetName("Third paragraph"); + static_text_data_c.child_ids = {inline_text_data_c.id}; + + inline_text_data_c.role = ax::mojom::Role::kInlineTextBox; + inline_text_data_c.SetName("Third paragraph"); + + SetTree(CreateAXTree({root_data, static_text_data_a, inline_text_data_a, + ignored_container_data_a, static_text_data_b, + inline_text_data_b_1, inline_text_data_b_2, + inline_text_data_b_3, ignored_container_data_b, + static_text_data_c, inline_text_data_c})); + + TestPositionType paragraph_start_position = + AXNodePosition::CreateTextPosition(GetTreeID(), inline_text_data_a.id, + 0 /* text_offset */, + ax::mojom::TextAffinity::kDownstream); + paragraph_start_position = + paragraph_start_position->CreateNextParagraphStartPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_start_position->IsTextPosition()); + EXPECT_EQ(inline_text_data_b_1.id, paragraph_start_position->anchor_id()); + EXPECT_EQ(0, paragraph_start_position->text_offset()); + paragraph_start_position = + paragraph_start_position->CreateNextParagraphStartPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_start_position->IsTextPosition()); + EXPECT_EQ(inline_text_data_c.id, paragraph_start_position->anchor_id()); + EXPECT_EQ(0, paragraph_start_position->text_offset()); + paragraph_start_position = + paragraph_start_position->CreateNextParagraphStartPosition( + AXBoundaryBehavior::CrossBoundary); + EXPECT_TRUE(paragraph_start_position->IsNullPosition()); + + paragraph_start_position = AXNodePosition::CreateTextPosition( + GetTreeID(), inline_text_data_c.id, 15 /* text_offset */, + ax::mojom::TextAffinity::kDownstream); + paragraph_start_position = + paragraph_start_position->CreatePreviousParagraphStartPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_start_position->IsTextPosition()); + EXPECT_EQ(inline_text_data_c.id, paragraph_start_position->anchor_id()); + EXPECT_EQ(0, paragraph_start_position->text_offset()); + paragraph_start_position = + paragraph_start_position->CreatePreviousParagraphStartPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_start_position->IsTextPosition()); + EXPECT_EQ(inline_text_data_b_1.id, paragraph_start_position->anchor_id()); + EXPECT_EQ(0, paragraph_start_position->text_offset()); + paragraph_start_position = + paragraph_start_position->CreatePreviousParagraphStartPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_start_position->IsTextPosition()); + EXPECT_EQ(inline_text_data_a.id, paragraph_start_position->anchor_id()); + EXPECT_EQ(0, paragraph_start_position->text_offset()); + paragraph_start_position = + paragraph_start_position->CreatePreviousParagraphStartPosition( + AXBoundaryBehavior::CrossBoundary); + EXPECT_TRUE(paragraph_start_position->IsNullPosition()); + + TestPositionType paragraph_end_position = AXNodePosition::CreateTextPosition( + GetTreeID(), inline_text_data_a.id, 0 /* text_offset */, + ax::mojom::TextAffinity::kDownstream); + paragraph_end_position = + paragraph_end_position->CreateNextParagraphEndPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_end_position->IsTextPosition()); + // TODO(nektar): Fix the next paragraph end position in a followup. It should + // not be on an ignored node. + EXPECT_EQ(ignored_container_data_a.id, paragraph_end_position->anchor_id()); + EXPECT_EQ(0, paragraph_end_position->text_offset()); + paragraph_end_position = + paragraph_end_position->CreateNextParagraphEndPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_end_position->IsTextPosition()); + EXPECT_EQ(inline_text_data_b_3.id, paragraph_end_position->anchor_id()); + // "paragraph<>". + EXPECT_EQ(9, paragraph_end_position->text_offset()); + paragraph_end_position = + paragraph_end_position->CreateNextParagraphEndPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_end_position->IsTextPosition()); + EXPECT_EQ(inline_text_data_c.id, paragraph_end_position->anchor_id()); + // "Third paragraph<>". + EXPECT_EQ(15, paragraph_end_position->text_offset()); + paragraph_end_position = + paragraph_end_position->CreateNextParagraphEndPosition( + AXBoundaryBehavior::CrossBoundary); + EXPECT_TRUE(paragraph_end_position->IsNullPosition()); + + paragraph_end_position = AXNodePosition::CreateTextPosition( + GetTreeID(), inline_text_data_c.id, 15 /* text_offset */, + ax::mojom::TextAffinity::kDownstream); + paragraph_end_position = + paragraph_end_position->CreatePreviousParagraphEndPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_end_position->IsTextPosition()); + EXPECT_EQ(inline_text_data_b_3.id, paragraph_end_position->anchor_id()); + // "paragraph<>". + EXPECT_EQ(9, paragraph_end_position->text_offset()); + paragraph_end_position = + paragraph_end_position->CreatePreviousParagraphEndPosition( + AXBoundaryBehavior::CrossBoundary); + ASSERT_TRUE(paragraph_end_position->IsTextPosition()); + // TODO(nektar): Fix this paragraph end position in a followup patch. It + // should not be on an ignored node. + EXPECT_EQ(ignored_container_data_a.id, paragraph_end_position->anchor_id()); + EXPECT_EQ(0, paragraph_end_position->text_offset()); + paragraph_end_position = + paragraph_end_position->CreatePreviousParagraphEndPosition( + AXBoundaryBehavior::CrossBoundary); + EXPECT_TRUE(paragraph_end_position->IsNullPosition()); +} + +TEST_F( + AXPositionTest, + CreatePreviousParagraphEndPositionStopAtAnchorBoundaryWithConsecutiveParentChildLineBreakingObjects) { + // This test updates the tree structure to test a specific edge case - + // CreatePreviousParagraphEndPosition(), stopping at an anchor boundary, + // with consecutive parent-child line breaking objects. + // ++1 rootWebArea + // ++++2 staticText name="first" + // ++++3 genericContainer isLineBreakingObject + // ++++++4 genericContainer isLineBreakingObject + // ++++++5 staticText name="second" + AXNodeData root_data; + root_data.id = 1; + root_data.role = ax::mojom::Role::kRootWebArea; + + AXNodeData static_text_data_a; + static_text_data_a.id = 2; + static_text_data_a.role = ax::mojom::Role::kStaticText; + static_text_data_a.SetName("first"); + + AXNodeData container_data_a; + container_data_a.id = 3; + container_data_a.role = ax::mojom::Role::kGenericContainer; + container_data_a.AddBoolAttribute( + ax::mojom::BoolAttribute::kIsLineBreakingObject, true); + + AXNodeData container_data_b; + container_data_b.id = 4; + container_data_b.role = ax::mojom::Role::kGenericContainer; + container_data_b.AddBoolAttribute( + ax::mojom::BoolAttribute::kIsLineBreakingObject, true); + + AXNodeData static_text_data_b; + static_text_data_b.id = 5; + static_text_data_b.role = ax::mojom::Role::kStaticText; + static_text_data_b.SetName("second"); + + root_data.child_ids = {static_text_data_a.id, container_data_a.id}; + container_data_a.child_ids = {container_data_b.id, static_text_data_b.id}; + + SetTree(CreateAXTree({root_data, static_text_data_a, container_data_a, + container_data_b, static_text_data_b})); + + TestPositionType test_position = AXNodePosition::CreateTextPosition( + GetTreeID(), root_data.id, 11 /* text_offset */, + ax::mojom::TextAffinity::kDownstream); + + test_position = test_position->CreatePreviousParagraphEndPosition( + AXBoundaryBehavior::StopAtAnchorBoundary); + EXPECT_TRUE(test_position->IsTextPosition()); + EXPECT_EQ(root_data.id, test_position->anchor_id()); + EXPECT_EQ(5, test_position->text_offset()); +} + TEST_F(AXPositionTest, LowestCommonAncestor) { TestPositionType null_position = AXNodePosition::CreateNullPosition(); ASSERT_NE(nullptr, null_position);
diff --git a/ui/accessibility/ax_position.h b/ui/accessibility/ax_position.h index 7a291b9..6ce81df 100644 --- a/ui/accessibility/ax_position.h +++ b/ui/accessibility/ax_position.h
@@ -28,8 +28,8 @@ #include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_node.h" #include "ui/accessibility/ax_node_data.h" -#include "ui/accessibility/ax_node_text_styles.h" #include "ui/accessibility/ax_role_properties.h" +#include "ui/accessibility/ax_text_attributes.h" #include "ui/accessibility/ax_tree_id.h" #include "ui/accessibility/ax_tree_manager.h" #include "ui/accessibility/ax_tree_manager_map.h" @@ -2995,7 +2995,7 @@ } return next_position->AsUnignoredPosition( - AdjustmentBehaviorFromBoundaryDirection(move_direction)); + AXPositionAdjustmentBehavior::kMoveForward); } // Continue searching for the next boundary start in the specified @@ -3032,18 +3032,17 @@ if (IsTreePosition()) text_position = text_position->AsTreePosition(); AXPositionInstance unignored_position = text_position->AsUnignoredPosition( - AdjustmentBehaviorFromBoundaryDirection(move_direction)); + AXPositionAdjustmentBehavior::kMoveForward); // If there are no unignored positions in |move_direction| then - // |text_position| is anchored in ignored content at the start or end - // of the whole content. - // For StopAtLastAnchorBoundary, try to adjust in the opposite direction - // to return a position within the whole content just before crossing into - // the ignored content. This will be the last unignored anchor boundary. + // `text_position` is anchored in ignored content at the end of the whole + // content. For StopAtLastAnchorBoundary, try to adjust in the opposite + // direction to return a position within the whole content just before + // crossing into the ignored content. This will be the last unignored anchor + // boundary. if (unignored_position->IsNullPosition() && boundary_behavior == AXBoundaryBehavior::StopAtLastAnchorBoundary) { - unignored_position = - text_position->AsUnignoredPosition(OppositeAdjustmentBehavior( - AdjustmentBehaviorFromBoundaryDirection(move_direction))); + unignored_position = text_position->AsUnignoredPosition( + AXPositionAdjustmentBehavior::kMoveBackward); } return unignored_position; } @@ -3136,7 +3135,7 @@ } return next_position->AsUnignoredPosition( - AdjustmentBehaviorFromBoundaryDirection(move_direction)); + AXPositionAdjustmentBehavior::kMoveBackward); } // Continue searching for the next boundary end in the specified @@ -3188,7 +3187,7 @@ if (IsTreePosition()) text_position = text_position->AsTreePosition(); AXPositionInstance unignored_position = text_position->AsUnignoredPosition( - AdjustmentBehaviorFromBoundaryDirection(move_direction)); + AXPositionAdjustmentBehavior::kMoveBackward); // If there are no unignored positions in |move_direction| then // |text_position| is anchored in ignored content at the start or end // of the whole content. @@ -3197,9 +3196,8 @@ // the ignored content. This will be the last unignored anchor boundary. if (unignored_position->IsNullPosition() && boundary_behavior == AXBoundaryBehavior::StopAtLastAnchorBoundary) { - unignored_position = - text_position->AsUnignoredPosition(OppositeAdjustmentBehavior( - AdjustmentBehaviorFromBoundaryDirection(move_direction))); + unignored_position = text_position->AsUnignoredPosition( + AXPositionAdjustmentBehavior::kMoveForward); } return unignored_position; } @@ -4167,19 +4165,19 @@ ax::mojom::Role GetRole(AXNode* node) const { return node->data().role; } - AXNodeTextStyles GetTextStyles() const { - // Check either the current anchor or its parent for text styles. - AXNodeTextStyles current_anchor_text_styles = - !IsNullPosition() ? GetAnchor()->data().GetTextStyles() - : AXNodeTextStyles(); - if (current_anchor_text_styles.IsUnset()) { + AXTextAttributes GetTextAttributes() const { + // Check either the current anchor or its parent for text attributes. + AXTextAttributes current_anchor_text_attributes = + !IsNullPosition() ? GetAnchor()->data().GetTextAttributes() + : AXTextAttributes(); + if (current_anchor_text_attributes.IsUnset()) { AXPositionInstance parent_position = AsTreePosition()->CreateParentPosition( ax::mojom::MoveDirection::kBackward); if (!parent_position->IsNullPosition()) - return parent_position->GetAnchor()->data().GetTextStyles(); + return parent_position->GetAnchor()->data().GetTextAttributes(); } - return current_anchor_text_styles; + return current_anchor_text_attributes; } std::vector<int32_t> GetWordStartOffsets() const { @@ -4543,9 +4541,9 @@ return true; } - // Stop moving when text styles differ. - return move_from.AsLeafTreePosition()->GetTextStyles() != - move_to.AsLeafTreePosition()->GetTextStyles(); + // Stop moving when text attributes differ. + return move_from.AsLeafTreePosition()->GetTextAttributes() != + move_to.AsLeafTreePosition()->GetTextAttributes(); } static bool MoveCrossesLineBreakingObject(const AXPosition& move_from, @@ -4728,29 +4726,6 @@ return false; } - static AXPositionAdjustmentBehavior AdjustmentBehaviorFromBoundaryDirection( - ax::mojom::MoveDirection move_direction) { - switch (move_direction) { - case ax::mojom::MoveDirection::kNone: - NOTREACHED(); - return AXPositionAdjustmentBehavior::kMoveForward; - case ax::mojom::MoveDirection::kBackward: - return AXPositionAdjustmentBehavior::kMoveBackward; - case ax::mojom::MoveDirection::kForward: - return AXPositionAdjustmentBehavior::kMoveForward; - } - } - - static AXPositionAdjustmentBehavior OppositeAdjustmentBehavior( - AXPositionAdjustmentBehavior adjustment_behavior) { - switch (adjustment_behavior) { - case AXPositionAdjustmentBehavior::kMoveForward: - return AXPositionAdjustmentBehavior::kMoveBackward; - case AXPositionAdjustmentBehavior::kMoveBackward: - return AXPositionAdjustmentBehavior::kMoveForward; - } - } - static std::vector<int32_t> GetWordStartOffsetsFunc( const AXPositionInstance& position) { return position->GetWordStartOffsets();
diff --git a/ui/accessibility/ax_node_text_styles.cc b/ui/accessibility/ax_text_attributes.cc similarity index 86% rename from ui/accessibility/ax_node_text_styles.cc rename to ui/accessibility/ax_text_attributes.cc index 516832c..d2ec6ec2 100644 --- a/ui/accessibility/ax_node_text_styles.cc +++ b/ui/accessibility/ax_text_attributes.cc
@@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/accessibility/ax_node_text_styles.h" +#include "ui/accessibility/ax_text_attributes.h" constexpr int kUnsetValue = -1; namespace ui { -AXNodeTextStyles::AXNodeTextStyles() +AXTextAttributes::AXTextAttributes() : background_color(kUnsetValue), color(kUnsetValue), invalid_state(kUnsetValue), @@ -20,7 +20,7 @@ font_size(kUnsetValue), font_weight(kUnsetValue) {} -AXNodeTextStyles::AXNodeTextStyles(AXNodeTextStyles&& other) +AXTextAttributes::AXTextAttributes(AXTextAttributes&& other) : background_color(other.background_color), color(other.color), invalid_state(other.invalid_state), @@ -34,7 +34,7 @@ font_weight(other.font_weight), font_family(std::move(other.font_family)) {} -AXNodeTextStyles& AXNodeTextStyles::operator=(AXNodeTextStyles&& other) { +AXTextAttributes& AXTextAttributes::operator=(AXTextAttributes&& other) { background_color = other.background_color; color = other.color; invalid_state = other.invalid_state; @@ -51,7 +51,7 @@ return *this; } -bool AXNodeTextStyles::operator==(const AXNodeTextStyles& other) const { +bool AXTextAttributes::operator==(const AXTextAttributes& other) const { return (background_color == other.background_color && color == other.color && invalid_state == other.invalid_state && overline_style == other.overline_style && @@ -64,11 +64,11 @@ font_family == other.font_family); } -bool AXNodeTextStyles::operator!=(const AXNodeTextStyles& other) const { +bool AXTextAttributes::operator!=(const AXTextAttributes& other) const { return !operator==(other); } -bool AXNodeTextStyles::IsUnset() const { +bool AXTextAttributes::IsUnset() const { return (background_color == kUnsetValue && invalid_state == kUnsetValue && overline_style == kUnsetValue && strikethrough_style == kUnsetValue && text_position == kUnsetValue && font_size == kUnsetValue &&
diff --git a/ui/accessibility/ax_node_text_styles.h b/ui/accessibility/ax_text_attributes.h similarity index 63% rename from ui/accessibility/ax_node_text_styles.h rename to ui/accessibility/ax_text_attributes.h index 2dd98a98..3ce02c0 100644 --- a/ui/accessibility/ax_node_text_styles.h +++ b/ui/accessibility/ax_text_attributes.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_ACCESSIBILITY_AX_NODE_TEXT_STYLES_H_ -#define UI_ACCESSIBILITY_AX_NODE_TEXT_STYLES_H_ +#ifndef UI_ACCESSIBILITY_AX_TEXT_ATTRIBUTES_H_ +#define UI_ACCESSIBILITY_AX_TEXT_ATTRIBUTES_H_ #include <string> @@ -15,20 +15,20 @@ // a snapshot at a given time and is not intended to be held for periods of // time. For this reason, it is a move-only class, to encourage deliberate // short-term usage. -struct AX_BASE_EXPORT AXNodeTextStyles { - AXNodeTextStyles(); +struct AX_BASE_EXPORT AXTextAttributes { + AXTextAttributes(); // Move-only class, explicitly delete copy-construction and assignment - AXNodeTextStyles(const AXNodeTextStyles& other) = delete; - AXNodeTextStyles& operator=(const AXNodeTextStyles&) = delete; + AXTextAttributes(const AXTextAttributes& other) = delete; + AXTextAttributes& operator=(const AXTextAttributes&) = delete; // Move constructor and assignment - AXNodeTextStyles(AXNodeTextStyles&& other); - AXNodeTextStyles& operator=(AXNodeTextStyles&& other); + AXTextAttributes(AXTextAttributes&& other); + AXTextAttributes& operator=(AXTextAttributes&& other); - bool operator==(const AXNodeTextStyles& other) const; + bool operator==(const AXTextAttributes& other) const; - bool operator!=(const AXNodeTextStyles& other) const; + bool operator!=(const AXTextAttributes& other) const; bool IsUnset() const; @@ -48,4 +48,4 @@ } // namespace ui -#endif // UI_ACCESSIBILITY_AX_NODE_TEXT_STYLES_H_ +#endif // UI_ACCESSIBILITY_AX_TEXT_ATTRIBUTES_H_
diff --git a/ui/file_manager/file_manager/background/js/entry_location_impl.js b/ui/file_manager/file_manager/background/js/entry_location_impl.js index e9548b0..f0e4dfa 100644 --- a/ui/file_manager/file_manager/background/js/entry_location_impl.js +++ b/ui/file_manager/file_manager/background/js/entry_location_impl.js
@@ -39,7 +39,6 @@ /** @override */ this.isDriveBased = this.rootType === VolumeManagerCommon.RootType.DRIVE || - this.rootType === VolumeManagerCommon.RootType.DRIVE_OTHER || this.rootType === VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME || this.rootType === VolumeManagerCommon.RootType.DRIVE_RECENT || this.rootType === VolumeManagerCommon.RootType.DRIVE_OFFLINE ||
diff --git a/ui/file_manager/file_manager/background/js/mock_volume_manager.js b/ui/file_manager/file_manager/background/js/mock_volume_manager.js index 82f67e66..d0ecaa4 100644 --- a/ui/file_manager/file_manager/background/js/mock_volume_manager.js +++ b/ui/file_manager/file_manager/background/js/mock_volume_manager.js
@@ -142,6 +142,8 @@ rootType = VolumeManagerCommon.RootType.COMPUTER; isRootEntry = util.isComputersRoot(entry); } + } else if (/^\/\.(files|shortcut-targets)-by-id/.test(entry.fullPath)) { + rootType = VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME; } return new EntryLocationImpl(volumeInfo, rootType, isRootEntry, true); }
diff --git a/ui/file_manager/file_manager/background/js/volume_manager_impl.js b/ui/file_manager/file_manager/background/js/volume_manager_impl.js index d4c2961..19ba5f0 100644 --- a/ui/file_manager/file_manager/background/js/volume_manager_impl.js +++ b/ui/file_manager/file_manager/background/js/volume_manager_impl.js
@@ -407,15 +407,9 @@ } } } else if ( - entry.fullPath == '/other' || - entry.fullPath.indexOf('/other/') === 0) { - rootType = VolumeManagerCommon.RootType.DRIVE_OTHER; - isReadOnly = true; - isRootEntry = entry.fullPath === '/other'; - } else if ( entry.fullPath === '/.files-by-id' || entry.fullPath.indexOf('/.files-by-id/') === 0) { - rootType = VolumeManagerCommon.RootType.DRIVE_OTHER; + rootType = VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME; // /.files-by-id/<id> is read-only, but /.files-by-id/<id>/foo is // read-write. @@ -424,7 +418,7 @@ } else if ( entry.fullPath === '/.shortcut-targets-by-id' || entry.fullPath.indexOf('/.shortcut-targets-by-id/') === 0) { - rootType = VolumeManagerCommon.RootType.DRIVE_OTHER; + rootType = VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME; // /.shortcut-targets-by-id/<id> is read-only, but // /.shortcut-targets-by-id/<id>/foo is read-write.
diff --git a/ui/file_manager/file_manager/background/js/volume_manager_unittest.m.js b/ui/file_manager/file_manager/background/js/volume_manager_unittest.m.js index e319620f..4365b458 100644 --- a/ui/file_manager/file_manager/background/js/volume_manager_unittest.m.js +++ b/ui/file_manager/file_manager/background/js/volume_manager_unittest.m.js
@@ -326,7 +326,7 @@ const driveFilesByIdDirectoryLocationInfo = volumeManager.getLocationInfo(driveFilesByIdDirectoryEntry); assertEquals( - VolumeManagerCommon.RootType.DRIVE_OTHER, + VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME, driveFilesByIdDirectoryLocationInfo.rootType); assertFalse(driveFilesByIdDirectoryLocationInfo.hasFixedLabel); assertTrue(driveFilesByIdDirectoryLocationInfo.isReadOnly); @@ -338,7 +338,7 @@ const driveFilesByIdLocationInfo = volumeManager.getLocationInfo(driveFilesByIdEntry); assertEquals( - VolumeManagerCommon.RootType.DRIVE_OTHER, + VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME, driveFilesByIdLocationInfo.rootType); assertFalse(driveFilesByIdLocationInfo.hasFixedLabel); assertFalse(driveFilesByIdLocationInfo.isReadOnly); @@ -352,7 +352,7 @@ volumeManager.getLocationInfo( driveShortcutTargetsByIdDirectoryEntry); assertEquals( - VolumeManagerCommon.RootType.DRIVE_OTHER, + VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME, driveShortcutTargetsByIdDirectoryLocationInfo.rootType); assertFalse( driveShortcutTargetsByIdDirectoryLocationInfo.hasFixedLabel); @@ -365,7 +365,7 @@ const driveShortcutTargetsByIdLocationInfo = volumeManager.getLocationInfo(driveShortcutTargetsByIdEntry); assertEquals( - VolumeManagerCommon.RootType.DRIVE_OTHER, + VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME, driveShortcutTargetsByIdLocationInfo.rootType); assertFalse(driveShortcutTargetsByIdLocationInfo.hasFixedLabel); assertFalse(driveShortcutTargetsByIdLocationInfo.isReadOnly);
diff --git a/ui/file_manager/file_manager/common/js/util.js b/ui/file_manager/file_manager/common/js/util.js index f2c28f8..8c5843f 100644 --- a/ui/file_manager/file_manager/common/js/util.js +++ b/ui/file_manager/file_manager/common/js/util.js
@@ -1186,7 +1186,6 @@ } console.error('Unsupported media view root type: ' + mediaViewRootType); return locationInfo.volumeInfo.label; - case VolumeManagerCommon.RootType.DRIVE_OTHER: case VolumeManagerCommon.RootType.ARCHIVE: case VolumeManagerCommon.RootType.REMOVABLE: case VolumeManagerCommon.RootType.MTP:
diff --git a/ui/file_manager/file_manager/common/js/volume_manager_types.js b/ui/file_manager/file_manager/common/js/volume_manager_types.js index de5c4cd..e826506 100644 --- a/ui/file_manager/file_manager/common/js/volume_manager_types.js +++ b/ui/file_manager/file_manager/common/js/volume_manager_types.js
@@ -80,8 +80,8 @@ PROVIDED: 'provided', // Root for entries that is not located under RootType.DRIVE. e.g. shared - // files. - DRIVE_OTHER: 'drive_other', + // files. Deprecated, applied to pre-drivefs. + DEPRECATED_DRIVE_OTHER: 'drive_other', // Fake root for offline available files on the drive. DRIVE_OFFLINE: 'drive_offline', @@ -161,7 +161,7 @@ VolumeManagerCommon.RootType.SHARED_DRIVE, // 5 VolumeManagerCommon.RootType.MTP, // 6 VolumeManagerCommon.RootType.PROVIDED, // 7 - VolumeManagerCommon.RootType.DRIVE_OTHER, // 8 + VolumeManagerCommon.RootType.DEPRECATED_DRIVE_OTHER, // 8 VolumeManagerCommon.RootType.DRIVE_OFFLINE, // 9 VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME, // 10 VolumeManagerCommon.RootType.DRIVE_RECENT, // 11 @@ -284,7 +284,7 @@ case VolumeManagerCommon.RootType.DRIVE: case VolumeManagerCommon.RootType.SHARED_DRIVES_GRAND_ROOT: case VolumeManagerCommon.RootType.SHARED_DRIVE: - case VolumeManagerCommon.RootType.DRIVE_OTHER: + case VolumeManagerCommon.RootType.DEPRECATED_DRIVE_OTHER: case VolumeManagerCommon.RootType.DRIVE_OFFLINE: case VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME: case VolumeManagerCommon.RootType.DRIVE_RECENT:
diff --git a/ui/file_manager/file_manager/foreground/js/BUILD.gn b/ui/file_manager/file_manager/foreground/js/BUILD.gn index 8bd898a9..6070559 100644 --- a/ui/file_manager/file_manager/foreground/js/BUILD.gn +++ b/ui/file_manager/file_manager/foreground/js/BUILD.gn
@@ -1032,6 +1032,17 @@ ] } +js_unittest("path_component_unittest.m") { + deps = [ + ":path_component", + "//chrome/test/data/webui:chai_assert", + "//ui/file_manager/file_manager/background/js:mock_volume_manager", + "//ui/file_manager/file_manager/common/js:mock_entry", + "//ui/file_manager/file_manager/common/js:volume_manager_types", + "//ui/file_manager/file_manager/externs:volume_info", + ] +} + js_library("providers_model") { deps = [ "//ui/file_manager/file_manager/common/js:volume_manager_types", @@ -1276,6 +1287,7 @@ ":import_controller_unittest.m", ":list_thumbnail_loader_unittest.m", ":navigation_list_model_unittest.m", + ":path_component_unittest.m", ":providers_model_unittest.m", ":spinner_controller_unittest.m", ":task_controller_unittest.m",
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js index 20625fb..772a3da 100644 --- a/ui/file_manager/file_manager/foreground/js/directory_model.js +++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -1443,7 +1443,8 @@ /** @type {!DirectoryEntry} */ (entry)); }; } - if (locationInfo && locationInfo.isSpecialSearchRoot) { + if (locationInfo && locationInfo.isRootEntry && + locationInfo.isSpecialSearchRoot) { // Drive special search. let searchType; switch (locationInfo.rootType) {
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js index f5855e9..21a21ad 100644 --- a/ui/file_manager/file_manager/foreground/js/file_manager.js +++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
@@ -1454,11 +1454,11 @@ if (!locationInfo) { nextCurrentDirEntry = null; } else { - // Having root directory of DRIVE_OTHER here should be only for shared - // with me files. Fallback to Drive root in such case. + // Having root directory of DRIVE_SHARED_WITH_ME here should be only for + // shared with me files. Fallback to Drive root in such case. if (locationInfo.isRootEntry && locationInfo.rootType === - VolumeManagerCommon.RootType.DRIVE_OTHER) { + VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME) { const volumeInfo = this.volumeManager_.getVolumeInfo(nextCurrentDirEntry); if (!volumeInfo) {
diff --git a/ui/file_manager/file_manager/foreground/js/path_component.js b/ui/file_manager/file_manager/foreground/js/path_component.js index 2e26bfc..b6bad61 100644 --- a/ui/file_manager/file_manager/foreground/js/path_component.js +++ b/ui/file_manager/file_manager/foreground/js/path_component.js
@@ -87,14 +87,17 @@ components.push(new PathComponent( prefixEntry.name, prefixEntry.toURL(), prefixEntry)); } - if (locationInfo.rootType === VolumeManagerCommon.RootType.DRIVE_OTHER) { - // When target path is a shared directory, volume should be shared with - // me. - const match = entry.fullPath.match(/\/\.files-by-id\/\d+\//); + if (locationInfo.rootType === + VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME) { + // DriveFS shared items are in either of: + // <drivefs>/.files-by-id/<id>/<item> + // <drivefs>/.shortcut-targets-by-id/<id>/<item> + const match = + entry.fullPath.match(/^\/\.(files|shortcut-targets)-by-id\/.+?\//); if (match) { displayRootFullPath = match[0]; } else { - displayRootFullPath = '/other'; + console.error('Unexpected shared DriveFS path: ', entry.fullPath); } displayRootUrl = replaceRootName(displayRootUrl, displayRootFullPath); const sharedWithMeFakeEntry =
diff --git a/ui/file_manager/file_manager/foreground/js/path_component_unittest.m.js b/ui/file_manager/file_manager/foreground/js/path_component_unittest.m.js new file mode 100644 index 0000000..773ca343 --- /dev/null +++ b/ui/file_manager/file_manager/foreground/js/path_component_unittest.m.js
@@ -0,0 +1,134 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import {assertEquals} from 'chrome://test/chai_assert.js'; + +import {MockVolumeManager} from '../../background/js/mock_volume_manager.js'; +import {MockFileSystem} from '../../common/js/mock_entry.js'; +import {VolumeManagerCommon} from '../../common/js/volume_manager_types.js'; + +import {PathComponent} from './path_component.js'; + +export async function testComputeComponentsFromEntry() { + const volumeManager = new MockVolumeManager(); + window.webkitResolveLocalFileSystemURL = + MockVolumeManager.resolveLocalFileSystemURL.bind(null, volumeManager); + const driveVolumeInfo = volumeManager.getCurrentProfileVolumeInfo( + VolumeManagerCommon.VolumeType.DRIVE); + await driveVolumeInfo.resolveDisplayRoot(); + let fs = /** @type {!MockFileSystem} */ (driveVolumeInfo.fileSystem); + + async function validate(path, components) { + fs.populate([path]); + const result = PathComponent.computeComponentsFromEntry( + fs.entries[path], volumeManager); + assertEquals(components.length, result.length); + for (let i = 0; i < components.length; i++) { + const c = components[i]; + assertEquals(c[0], result[i].name); + const entry = await result[i].resolveEntry(); + assertEquals(c[1], entry.toURL()); + } + } + + // Drive volume. + // .files-by-id. + await validate('/.files-by-id/1234/file', [ + [ + 'DRIVE_SHARED_WITH_ME_COLLECTION_LABEL', + 'fake-entry://drive_shared_with_me' + ], + ['file', 'filesystem:drive/.files-by-id/1234/file'], + ]); + await validate('/.files-by-id/1234/a/file', [ + [ + 'DRIVE_SHARED_WITH_ME_COLLECTION_LABEL', + 'fake-entry://drive_shared_with_me' + ], + ['a', 'filesystem:drive/.files-by-id/1234/a'], + ['file', 'filesystem:drive/.files-by-id/1234/a/file'], + ]); + // .shortcut-targets-by-id. + await validate('/.shortcut-targets-by-id/1-abc-xyz/file', [ + [ + 'DRIVE_SHARED_WITH_ME_COLLECTION_LABEL', + 'fake-entry://drive_shared_with_me' + ], + ['file', 'filesystem:drive/.shortcut-targets-by-id/1-abc-xyz/file'], + ]); + await validate('/.shortcut-targets-by-id/1-abc-xyz/a/file', [ + [ + 'DRIVE_SHARED_WITH_ME_COLLECTION_LABEL', + 'fake-entry://drive_shared_with_me' + ], + ['a', 'filesystem:drive/.shortcut-targets-by-id/1-abc-xyz/a'], + ['file', 'filesystem:drive/.shortcut-targets-by-id/1-abc-xyz/a/file'], + ]); + // Computers. + await validate('/Computers/C1/file', [ + ['DRIVE_COMPUTERS_LABEL', 'filesystem:drive/Computers'], + ['C1', 'filesystem:drive/Computers/C1'], + ['file', 'filesystem:drive/Computers/C1/file'], + ]); + await validate('/Computers/C1/a/file', [ + ['DRIVE_COMPUTERS_LABEL', 'filesystem:drive/Computers'], + ['C1', 'filesystem:drive/Computers/C1'], + ['a', 'filesystem:drive/Computers/C1/a'], + ['file', 'filesystem:drive/Computers/C1/a/file'], + ]); + // root. + await validate('/root/file', [ + ['DRIVE_MY_DRIVE_LABEL', 'filesystem:drive/root'], + ['file', 'filesystem:drive/root/file'], + ]); + await validate('/root/a/file', [ + ['DRIVE_MY_DRIVE_LABEL', 'filesystem:drive/root'], + ['a', 'filesystem:drive/root/a'], + ['file', 'filesystem:drive/root/a/file'], + ]); + // team_drives. + await validate('/team_drives/S1/file', [ + ['DRIVE_SHARED_DRIVES_LABEL', 'filesystem:drive/team_drives'], + ['S1', 'filesystem:drive/team_drives/S1'], + ['file', 'filesystem:drive/team_drives/S1/file'], + ]); + await validate('/team_drives/S1/a/file', [ + ['DRIVE_SHARED_DRIVES_LABEL', 'filesystem:drive/team_drives'], + ['S1', 'filesystem:drive/team_drives/S1'], + ['a', 'filesystem:drive/team_drives/S1/a'], + ['file', 'filesystem:drive/team_drives/S1/a/file'], + ]); + + const downloadsVolumeInfo = volumeManager.getCurrentProfileVolumeInfo( + VolumeManagerCommon.VolumeType.DOWNLOADS); + fs = /** @type {!MockFileSystem} */ (downloadsVolumeInfo.fileSystem); + + // Downloads. + await validate('/file', [ + ['DOWNLOADS_DIRECTORY_LABEL', 'filesystem:downloads/'], + ['file', 'filesystem:downloads/file'], + ]); + await validate('/a/file', [ + ['DOWNLOADS_DIRECTORY_LABEL', 'filesystem:downloads/'], + ['a', 'filesystem:downloads/a'], + ['file', 'filesystem:downloads/a/file'], + ]); + + // Special labels for '/Downloads', '/PvmDefault', '/Camera'. + await validate('/Downloads/file', [ + ['DOWNLOADS_DIRECTORY_LABEL', 'filesystem:downloads/'], + ['DOWNLOADS_DIRECTORY_LABEL', 'filesystem:downloads/Downloads'], + ['file', 'filesystem:downloads/Downloads/file'], + ]); + await validate('/PvmDefault/file', [ + ['DOWNLOADS_DIRECTORY_LABEL', 'filesystem:downloads/'], + ['PLUGIN_VM_DIRECTORY_LABEL', 'filesystem:downloads/PvmDefault'], + ['file', 'filesystem:downloads/PvmDefault/file'], + ]); + await validate('/Camera/file', [ + ['DOWNLOADS_DIRECTORY_LABEL', 'filesystem:downloads/'], + ['CAMERA_DIRECTORY_LABEL', 'filesystem:downloads/Camera'], + ['file', 'filesystem:downloads/Camera/file'], + ]); +}
diff --git a/ui/file_manager/file_manager/foreground/js/search_controller.js b/ui/file_manager/file_manager/foreground/js/search_controller.js index 2b75d02f..d08767dc 100644 --- a/ui/file_manager/file_manager/foreground/js/search_controller.js +++ b/ui/file_manager/file_manager/foreground/js/search_controller.js
@@ -243,7 +243,7 @@ if (!locationInfo || (locationInfo.isRootEntry && locationInfo.rootType === - VolumeManagerCommon.RootType.DRIVE_OTHER)) { + VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME)) { this.taskController_.executeEntryTask(entry); return; }
diff --git a/ui/ozone/platform/wayland/emulate/wayland_input_emulate.cc b/ui/ozone/platform/wayland/emulate/wayland_input_emulate.cc index 15d5da14..173d6f7 100644 --- a/ui/ozone/platform/wayland/emulate/wayland_input_emulate.cc +++ b/ui/ozone/platform/wayland/emulate/wayland_input_emulate.cc
@@ -182,11 +182,32 @@ wayland_proxy->ScheduleDisplayFlush(); } -void WaylandInputEmulate::OnWindowConfigured(gfx::AcceleratedWidget widget) { +void WaylandInputEmulate::OnWindowConfigured(gfx::AcceleratedWidget widget, + bool is_configured) { auto it = windows_.find(widget); DCHECK(it != windows_.end()); auto* test_surface = it->second.get(); + // The buffer is no longer attached as the window lost its role. Wait until + // the configuration event comes. + if (!is_configured) { + test_surface->buffer_attached_and_configured = false; + // Also destroy the frame callback... + if (test_surface->frame_callback) { + wl_callback_destroy(test_surface->frame_callback); + test_surface->frame_callback = nullptr; + } + // ... and the buffer. + if (test_surface->buffer) { + auto* wayland_proxy = wl::WaylandProxy::GetInstance(); + DCHECK(wayland_proxy); + wayland_proxy->DestroyShmForWlBuffer(test_surface->buffer); + wayland_proxy->ScheduleDisplayFlush(); + test_surface->buffer = nullptr; + } + return; + } + if (test_surface->buffer_attached_and_configured) return;
diff --git a/ui/ozone/platform/wayland/emulate/wayland_input_emulate.h b/ui/ozone/platform/wayland/emulate/wayland_input_emulate.h index d5c67ac..77a5ec6 100644 --- a/ui/ozone/platform/wayland/emulate/wayland_input_emulate.h +++ b/ui/ozone/platform/wayland/emulate/wayland_input_emulate.h
@@ -118,7 +118,8 @@ // WaylandProxy::Delegate. void OnWindowAdded(gfx::AcceleratedWidget widget) override; void OnWindowRemoved(gfx::AcceleratedWidget widget) override; - void OnWindowConfigured(gfx::AcceleratedWidget widget) override; + void OnWindowConfigured(gfx::AcceleratedWidget widget, + bool is_configured) override; // weston_test_listener. static void HandlePointerPosition(void* data,
diff --git a/ui/ozone/platform/wayland/host/proxy/wayland_proxy.h b/ui/ozone/platform/wayland/host/proxy/wayland_proxy.h index 97e47722..5f32460 100644 --- a/ui/ozone/platform/wayland/host/proxy/wayland_proxy.h +++ b/ui/ozone/platform/wayland/host/proxy/wayland_proxy.h
@@ -37,8 +37,10 @@ // from the list of windows stored by WaylandWindowManager. virtual void OnWindowRemoved(gfx::AcceleratedWidget widget) = 0; - // Invoked when an existing surface is configured. - virtual void OnWindowConfigured(gfx::AcceleratedWidget widget) = 0; + // Invoked when an existing surface is configured or it's no longer + // configured (wl_surface lost its role and is going to be reconfigured). + virtual void OnWindowConfigured(gfx::AcceleratedWidget widget, + bool is_configured) = 0; protected: virtual ~Delegate() = default;
diff --git a/ui/ozone/platform/wayland/host/proxy/wayland_proxy_impl.cc b/ui/ozone/platform/wayland/host/proxy/wayland_proxy_impl.cc index ae80285e..e095daa07 100644 --- a/ui/ozone/platform/wayland/host/proxy/wayland_proxy_impl.cc +++ b/ui/ozone/platform/wayland/host/proxy/wayland_proxy_impl.cc
@@ -107,7 +107,8 @@ void WaylandProxyImpl::OnWindowConfigured(ui::WaylandWindow* window) { DCHECK(delegate_); - delegate_->OnWindowConfigured(window->GetWidget()); + delegate_->OnWindowConfigured(window->GetWidget(), + window->IsSurfaceConfigured()); } } // namespace wl
diff --git a/ui/ozone/platform/wayland/host/shell_object_factory.cc b/ui/ozone/platform/wayland/host/shell_object_factory.cc index 86bddd8..e1636dd2 100644 --- a/ui/ozone/platform/wayland/host/shell_object_factory.cc +++ b/ui/ozone/platform/wayland/host/shell_object_factory.cc
@@ -54,18 +54,18 @@ if (!surface->Initialize()) return nullptr; - auto popup = std::make_unique<XDGPopupWrapperImpl>(std::move(surface), - wayland_window); - return popup->Initialize(connection, params) ? std::move(popup) : nullptr; + auto popup = std::make_unique<XDGPopupWrapperImpl>( + std::move(surface), wayland_window, connection); + return popup->Initialize(params) ? std::move(popup) : nullptr; } else if (connection->shell_v6()) { auto surface = std::make_unique<ZXDGSurfaceV6WrapperImpl>(wayland_window, connection); if (!surface->Initialize()) return nullptr; - auto popup = std::make_unique<ZXDGPopupV6WrapperImpl>(std::move(surface), - wayland_window); - return popup->Initialize(connection, params) ? std::move(popup) : nullptr; + auto popup = std::make_unique<ZXDGPopupV6WrapperImpl>( + std::move(surface), wayland_window, connection); + return popup->Initialize(params) ? std::move(popup) : nullptr; } LOG(WARNING) << "Shell protocol is not available."; return nullptr;
diff --git a/ui/ozone/platform/wayland/host/shell_popup_wrapper.h b/ui/ozone/platform/wayland/host/shell_popup_wrapper.h index c89f93d6..69ae01d 100644 --- a/ui/ozone/platform/wayland/host/shell_popup_wrapper.h +++ b/ui/ozone/platform/wayland/host/shell_popup_wrapper.h
@@ -71,8 +71,7 @@ virtual ~ShellPopupWrapper() {} // Initializes the popup surface. - virtual bool Initialize(WaylandConnection* connection, - const ShellPopupParams& params) = 0; + virtual bool Initialize(const ShellPopupParams& params) = 0; // Sends acknowledge configure event back to wayland. virtual void AckConfigure(uint32_t serial) = 0; @@ -80,6 +79,11 @@ // Tells if the surface has been AckConfigured at least once. virtual bool IsConfigured() = 0; + // Changes bounds of the popup window. If changing bounds is not supported, + // false is returned and the client should recreate the shell popup instead + // if it still wants to reposition the popup. + virtual bool SetBounds(const gfx::Rect& new_bounds) = 0; + bool CanGrabPopup(WaylandConnection* connection) const; };
diff --git a/ui/ozone/platform/wayland/host/wayland_connection.cc b/ui/ozone/platform/wayland/host/wayland_connection.cc index fbffd87..bbd65f6 100644 --- a/ui/ozone/platform/wayland/host/wayland_connection.cc +++ b/ui/ozone/platform/wayland/host/wayland_connection.cc
@@ -95,7 +95,8 @@ constexpr uint32_t kMaxLinuxDmabufVersion = 3; constexpr uint32_t kMaxSeatVersion = 5; constexpr uint32_t kMaxShmVersion = 1; -constexpr uint32_t kMaxXdgShellVersion = 1; +constexpr uint32_t kMaxXdgShellVersion = 3; +constexpr uint32_t kMaxZXdgShellVersion = 1; constexpr uint32_t kMaxDeviceManagerVersion = 3; constexpr uint32_t kMaxWpPresentationVersion = 1; constexpr uint32_t kMaxWpViewporterVersion = 1; @@ -482,7 +483,7 @@ strcmp(interface, "zxdg_shell_v6") == 0) { // Check for zxdg_shell_v6 first. connection->shell_v6_ = wl::Bind<zxdg_shell_v6>( - registry, name, std::min(version, kMaxXdgShellVersion)); + registry, name, std::min(version, kMaxZXdgShellVersion)); if (!connection->shell_v6_) { LOG(ERROR) << "Failed to bind to zxdg_shell_v6 global"; return;
diff --git a/ui/ozone/platform/wayland/host/wayland_popup.cc b/ui/ozone/platform/wayland/host/wayland_popup.cc index 3fe52bbb..02c85dd 100644 --- a/ui/ozone/platform/wayland/host/wayland_popup.cc +++ b/ui/ozone/platform/wayland/host/wayland_popup.cc
@@ -6,10 +6,12 @@ #include <aura-shell-client-protocol.h> +#include "base/auto_reset.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/display/display.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/transform.h" +#include "ui/ozone/platform/wayland/common/wayland_object.h" #include "ui/ozone/platform/wayland/common/wayland_util.h" #include "ui/ozone/platform/wayland/host/shell_object_factory.h" #include "ui/ozone/platform/wayland/host/shell_popup_wrapper.h" @@ -116,6 +118,28 @@ return !!shell_popup_; } +void WaylandPopup::SetBounds(const gfx::Rect& bounds) { + auto old_bounds = GetBounds(); + WaylandWindow::SetBounds(bounds); + + // The shell popup can be null if bounds are being fixed during + // the initialization. See WaylandPopup::CreateShellPopup. + if (shell_popup_ && old_bounds != bounds && !wayland_sets_bounds_) { + const auto bounds_dip = + wl::TranslateWindowBoundsToParentDIP(this, parent_window()); + // If ShellPopup doesn't support repositioning, the popup will be recreated + // with new geometry applied. Availability of methods to move/resize popup + // surfaces purely depends on a protocol. See implementations of ShellPopup + // for more details. + if (!shell_popup_->SetBounds(bounds_dip)) { + // This will also close all the children windows... + Hide(); + // ... and will result in showing them again starting with their parents. + GetTopMostChildWindow()->Show(false); + } + } +} + void WaylandPopup::HandlePopupConfigure(const gfx::Rect& bounds_dip) { DCHECK(shell_popup()); DCHECK(parent_window()); @@ -161,6 +185,7 @@ DCHECK(new_bounds_dip.y() >= 0); } + base::AutoReset<bool> auto_reset(&wayland_sets_bounds_, true); SetBoundsDip(new_bounds_dip); }
diff --git a/ui/ozone/platform/wayland/host/wayland_popup.h b/ui/ozone/platform/wayland/host/wayland_popup.h index 09021fc..ec1a0c8 100644 --- a/ui/ozone/platform/wayland/host/wayland_popup.h +++ b/ui/ozone/platform/wayland/host/wayland_popup.h
@@ -25,6 +25,7 @@ void Show(bool inactive) override; void Hide() override; bool IsVisible() const override; + void SetBounds(const gfx::Rect& bounds) override; private: // WaylandWindow overrides: @@ -55,6 +56,10 @@ gfx::Rect pending_initial_bounds_px_; + // Helps to avoid reposition itself if HandlePopupConfigure was called, which + // resulted in calling SetBounds. + bool wayland_sets_bounds_ = false; + DISALLOW_COPY_AND_ASSIGN(WaylandPopup); };
diff --git a/ui/ozone/platform/wayland/host/wayland_window_unittest.cc b/ui/ozone/platform/wayland/host/wayland_window_unittest.cc index c1f08b2..6986ac7 100644 --- a/ui/ozone/platform/wayland/host/wayland_window_unittest.cc +++ b/ui/ozone/platform/wayland/host/wayland_window_unittest.cc
@@ -3072,6 +3072,62 @@ EXPECT_TRUE(menu_window->AsWaylandPopup()); } +// Tests that WaylandPopups can be repositioned. +TEST_P(WaylandWindowTest, RepositionPopups) { + VerifyAndClearExpectations(); + + EXPECT_CALL(delegate_, GetMenuType()) + .WillRepeatedly(Return(MenuType::kRootContextMenu)); + gfx::Rect menu_window_bounds(gfx::Rect(6, 20, 8, 20)); + std::unique_ptr<WaylandWindow> menu_window = CreateWaylandWindowWithParams( + PlatformWindowType::kMenu, window_->GetWidget(), menu_window_bounds, + &delegate_); + EXPECT_TRUE(menu_window); + EXPECT_TRUE(menu_window->IsVisible()); + + menu_window->set_update_visual_size_immediately(true); + + Sync(); + + auto* mock_surface_popup = server_.GetObject<wl::MockSurface>( + menu_window->root_surface()->GetSurfaceId()); + auto* mock_xdg_popup = mock_surface_popup->xdg_surface()->xdg_popup(); + + EXPECT_EQ(mock_xdg_popup->anchor_rect().origin(), + menu_window_bounds.origin()); + EXPECT_EQ(mock_xdg_popup->size(), menu_window_bounds.size()); + EXPECT_EQ(mock_surface_popup->opaque_region(), + gfx::Rect(menu_window_bounds.size())); + + VerifyAndClearExpectations(); + + menu_window_bounds.set_origin({10, 10}); + menu_window->SetBounds(menu_window_bounds); + + Sync(); + + // Xdg objects can be recreated depending on the version of the xdg shell. + mock_surface_popup = server_.GetObject<wl::MockSurface>( + menu_window->root_surface()->GetSurfaceId()); + mock_xdg_popup = mock_surface_popup->xdg_surface()->xdg_popup(); + + EXPECT_EQ(mock_xdg_popup->anchor_rect().origin(), + menu_window_bounds.origin()); + EXPECT_EQ(mock_xdg_popup->size(), menu_window_bounds.size()); + EXPECT_EQ(mock_surface_popup->opaque_region(), + gfx::Rect(menu_window_bounds.size())); + + // This will send a configure event for the xdg_surface that backs the + // xdg_popup. Size and state are not used there. + SendConfigureEvent(mock_surface_popup->xdg_surface(), 0, 0, 1, nullptr); + + // Call sync so that server's configuration event is received by + // Ozone/Wayland. + Sync(); + + VerifyAndClearExpectations(); +} + INSTANTIATE_TEST_SUITE_P(XdgVersionStableTest, WaylandWindowTest, Values(wl::ServerConfig{
diff --git a/ui/ozone/platform/wayland/host/xdg_popup_wrapper_impl.cc b/ui/ozone/platform/wayland/host/xdg_popup_wrapper_impl.cc index bd7721b..a5fc12d 100644 --- a/ui/ozone/platform/wayland/host/xdg_popup_wrapper_impl.cc +++ b/ui/ozone/platform/wayland/host/xdg_popup_wrapper_impl.cc
@@ -10,6 +10,7 @@ #include <memory> #include "base/environment.h" +#include "base/logging.h" #include "base/nix/xdg_util.h" #include "ui/events/event.h" #include "ui/events/event_constants.h" @@ -102,8 +103,10 @@ XDGPopupWrapperImpl::XDGPopupWrapperImpl( std::unique_ptr<XDGSurfaceWrapperImpl> surface, - WaylandWindow* wayland_window) + WaylandWindow* wayland_window, + WaylandConnection* connection) : wayland_window_(wayland_window), + connection_(connection), xdg_surface_wrapper_(std::move(surface)) { DCHECK(xdg_surface_wrapper_); DCHECK(wayland_window_ && wayland_window_->parent_window()); @@ -111,9 +114,8 @@ XDGPopupWrapperImpl::~XDGPopupWrapperImpl() = default; -bool XDGPopupWrapperImpl::Initialize(WaylandConnection* connection, - const ShellPopupParams& params) { - if (!connection->shell() && !connection->shell_v6()) { +bool XDGPopupWrapperImpl::Initialize(const ShellPopupParams& params) { + if (!connection_->shell()) { NOTREACHED() << "Wrong shell protocol"; return false; } @@ -136,29 +138,21 @@ if (!xdg_surface_wrapper_ || !parent_xdg_surface) return false; - auto new_params = params; + params_ = params; // Wayland doesn't allow empty bounds. If a zero or negative size is set, the // invalid_input error is raised. Thus, use the least possible one. // WaylandPopup will update its bounds upon the following configure event. - if (params.bounds.IsEmpty()) - new_params.bounds.set_size({1, 1}); + if (params_.bounds.IsEmpty()) + params_.bounds.set_size({1, 1}); - if (connection->shell()) - return InitializeStable(connection, new_params, parent_xdg_surface); - return false; -} - -bool XDGPopupWrapperImpl::InitializeStable( - WaylandConnection* connection, - const ShellPopupParams& params, - XDGSurfaceWrapperImpl* parent_xdg_surface) { - static constexpr xdg_popup_listener xdg_popup_listener = { - &Configure, - &PopupDone, + static constexpr struct xdg_popup_listener xdg_popup_listener = { + &XDGPopupWrapperImpl::Configure, + &XDGPopupWrapperImpl::PopupDone, + &XDGPopupWrapperImpl::Repositioned, }; struct xdg_positioner* positioner = - CreatePositioner(connection, wayland_window_->parent_window(), params); + CreatePositioner(wayland_window_->parent_window()); if (!positioner) return false; @@ -170,8 +164,9 @@ xdg_positioner_destroy(positioner); - if (CanGrabPopup(connection)) { - xdg_popup_grab(xdg_popup_.get(), connection->seat(), connection->serial()); + if (CanGrabPopup(connection_)) { + xdg_popup_grab(xdg_popup_.get(), connection_->seat(), + connection_->serial()); } xdg_popup_add_listener(xdg_popup_.get(), &xdg_popup_listener, this); @@ -189,36 +184,60 @@ return xdg_surface_wrapper_->IsConfigured(); } +bool XDGPopupWrapperImpl::SetBounds(const gfx::Rect& new_bounds) { + if (xdg_popup_get_version(xdg_popup_.get()) < + XDG_POPUP_REPOSITIONED_SINCE_VERSION) { + return false; + } + + params_.bounds = new_bounds; + + // Create a new positioner with new bounds. + auto* positioner = CreatePositioner(wayland_window_->parent_window()); + DCHECK(positioner); + // TODO(msisov): figure out how we can make use of the reposition token. + // The protocol says the token itself is opaque, and has no other special + // meaning. + xdg_popup_reposition(xdg_popup_.get(), positioner, ++next_reposition_token_); + connection_->ScheduleFlush(); + + // We can safely destroy the object now. + xdg_positioner_destroy(positioner); + return true; +} + struct xdg_positioner* XDGPopupWrapperImpl::CreatePositioner( - WaylandConnection* connection, - WaylandWindow* parent_window, - const ShellPopupParams& params) { + WaylandWindow* parent_window) { struct xdg_positioner* positioner; - positioner = xdg_wm_base_create_positioner(connection->shell()); + positioner = xdg_wm_base_create_positioner(connection_->shell()); if (!positioner) return nullptr; // The parent we got must be the topmost in the stack of the same family // windows. - DCHECK_EQ(parent_window->GetTopMostChildWindow(), parent_window); + auto* topmost_child = parent_window->GetTopMostChildWindow(); + DCHECK(parent_window == parent_window->GetTopMostChildWindow() || + topmost_child == wayland_window_); // Place anchor to the end of the possible position. gfx::Rect anchor_rect = GetAnchorRect( - params.menu_type, params.bounds, + params_.menu_type, params_.bounds, gfx::ScaleToRoundedRect(parent_window->GetBounds(), 1.0 / parent_window->window_scale())); xdg_positioner_set_anchor_rect(positioner, anchor_rect.x(), anchor_rect.y(), anchor_rect.width(), anchor_rect.height()); - xdg_positioner_set_size(positioner, params.bounds.width(), - params.bounds.height()); + xdg_positioner_set_size(positioner, params_.bounds.width(), + params_.bounds.height()); xdg_positioner_set_anchor( - positioner, TranslateAnchor(GetAnchor(params.menu_type, params.bounds))); - xdg_positioner_set_gravity(positioner, TranslateGravity(GetGravity( - params.menu_type, params.bounds))); + positioner, + TranslateAnchor(GetAnchor(params_.menu_type, params_.bounds))); + xdg_positioner_set_gravity( + positioner, + TranslateGravity(GetGravity(params_.menu_type, params_.bounds))); xdg_positioner_set_constraint_adjustment( positioner, - TranslateContraintAdjustment(GetConstraintAdjustment(params.menu_type))); + TranslateContraintAdjustment(GetConstraintAdjustment(params_.menu_type))); return positioner; } @@ -250,6 +269,13 @@ window->OnCloseRequest(); } +// static +void XDGPopupWrapperImpl::Repositioned(void* data, + struct xdg_popup* xdg_popup, + uint32_t token) { + NOTIMPLEMENTED_LOG_ONCE(); +} + XDGSurfaceWrapperImpl* XDGPopupWrapperImpl::xdg_surface_wrapper() const { DCHECK(xdg_surface_wrapper_.get()); return xdg_surface_wrapper_.get();
diff --git a/ui/ozone/platform/wayland/host/xdg_popup_wrapper_impl.h b/ui/ozone/platform/wayland/host/xdg_popup_wrapper_impl.h index 88757c0..b1bd7b2 100644 --- a/ui/ozone/platform/wayland/host/xdg_popup_wrapper_impl.h +++ b/ui/ozone/platform/wayland/host/xdg_popup_wrapper_impl.h
@@ -20,22 +20,18 @@ class XDGPopupWrapperImpl : public ShellPopupWrapper { public: XDGPopupWrapperImpl(std::unique_ptr<XDGSurfaceWrapperImpl> surface, - WaylandWindow* wayland_window); + WaylandWindow* wayland_window, + WaylandConnection* connection); ~XDGPopupWrapperImpl() override; // XDGPopupWrapper: - bool Initialize(WaylandConnection* connection, - const ShellPopupParams& params) override; + bool Initialize(const ShellPopupParams& params) override; void AckConfigure(uint32_t serial) override; bool IsConfigured() override; + bool SetBounds(const gfx::Rect& new_bounds) override; private: - bool InitializeStable(WaylandConnection* connection, - const ShellPopupParams& params, - XDGSurfaceWrapperImpl* parent_xdg_surface_wrapper); - struct xdg_positioner* CreatePositioner(WaylandConnection* connection, - WaylandWindow* parent_window, - const ShellPopupParams& params); + struct xdg_positioner* CreatePositioner(WaylandWindow* parent_window); // xdg_popup_listener static void Configure(void* data, @@ -45,11 +41,15 @@ int32_t width, int32_t height); static void PopupDone(void* data, struct xdg_popup* xdg_popup); + static void Repositioned(void* data, + struct xdg_popup* xdg_popup, + uint32_t token); XDGSurfaceWrapperImpl* xdg_surface_wrapper() const; // Non-owned WaylandWindow that uses this popup. WaylandWindow* const wayland_window_; + WaylandConnection* const connection_; // Ground surface for this popup. std::unique_ptr<XDGSurfaceWrapperImpl> xdg_surface_wrapper_; @@ -57,6 +57,11 @@ // XDG Shell Stable object. wl::Object<xdg_popup> xdg_popup_; + // Parameters that help to configure this popup. + ShellPopupParams params_; + + uint32_t next_reposition_token_ = 1; + DISALLOW_COPY_AND_ASSIGN(XDGPopupWrapperImpl); };
diff --git a/ui/ozone/platform/wayland/host/xdg_surface_wrapper_impl.cc b/ui/ozone/platform/wayland/host/xdg_surface_wrapper_impl.cc index 9ce027d..b8d15bf 100644 --- a/ui/ozone/platform/wayland/host/xdg_surface_wrapper_impl.cc +++ b/ui/ozone/platform/wayland/host/xdg_surface_wrapper_impl.cc
@@ -16,7 +16,11 @@ WaylandConnection* connection) : wayland_window_(wayland_window), connection_(connection) {} -XDGSurfaceWrapperImpl::~XDGSurfaceWrapperImpl() = default; +XDGSurfaceWrapperImpl::~XDGSurfaceWrapperImpl() { + is_configured_ = false; + connection_->wayland_window_manager()->NotifyWindowConfigured( + wayland_window_); +} bool XDGSurfaceWrapperImpl::Initialize() { if (!connection_->shell()) { @@ -43,9 +47,10 @@ void XDGSurfaceWrapperImpl::AckConfigure(uint32_t serial) { DCHECK(xdg_surface_); xdg_surface_ack_configure(xdg_surface_.get(), serial); + + is_configured_ = true; connection_->wayland_window_manager()->NotifyWindowConfigured( wayland_window_); - is_configured_ = true; } bool XDGSurfaceWrapperImpl::IsConfigured() {
diff --git a/ui/ozone/platform/wayland/host/zxdg_popup_v6_wrapper_impl.cc b/ui/ozone/platform/wayland/host/zxdg_popup_v6_wrapper_impl.cc index 6642023..16c379a 100644 --- a/ui/ozone/platform/wayland/host/zxdg_popup_v6_wrapper_impl.cc +++ b/ui/ozone/platform/wayland/host/zxdg_popup_v6_wrapper_impl.cc
@@ -103,8 +103,10 @@ ZXDGPopupV6WrapperImpl::ZXDGPopupV6WrapperImpl( std::unique_ptr<ZXDGSurfaceV6WrapperImpl> surface, - WaylandWindow* wayland_window) + WaylandWindow* wayland_window, + WaylandConnection* connection) : wayland_window_(wayland_window), + connection_(connection), zxdg_surface_v6_wrapper_(std::move(surface)) { DCHECK(zxdg_surface_v6_wrapper_); DCHECK(wayland_window_ && wayland_window_->parent_window()); @@ -112,9 +114,8 @@ ZXDGPopupV6WrapperImpl::~ZXDGPopupV6WrapperImpl() = default; -bool ZXDGPopupV6WrapperImpl::Initialize(WaylandConnection* connection, - const ShellPopupParams& params) { - if (!connection->shell() && !connection->shell_v6()) { +bool ZXDGPopupV6WrapperImpl::Initialize(const ShellPopupParams& params) { + if (!connection_->shell_v6()) { NOTREACHED() << "Wrong shell protocol"; return false; } @@ -137,30 +138,20 @@ if (!zxdg_surface_v6_wrapper_ || !parent_xdg_surface) return false; - auto new_params = params; + params_ = params; // Wayland doesn't allow empty bounds. If a zero or negative size is set, the // invalid_input error is raised. Thus, use the least possible one. // WaylandPopup will update its bounds upon the following configure event. - if (new_params.bounds.IsEmpty()) - new_params.bounds.set_size({1, 1}); + if (params_.bounds.IsEmpty()) + params_.bounds.set_size({1, 1}); - if (connection->shell_v6()) - return InitializeV6(connection, new_params, parent_xdg_surface); - - return false; -} - -bool ZXDGPopupV6WrapperImpl::InitializeV6( - WaylandConnection* connection, - const ShellPopupParams& params, - ZXDGSurfaceV6WrapperImpl* parent_xdg_surface) { static constexpr zxdg_popup_v6_listener zxdg_popup_v6_listener = { - &Configure, - &PopupDone, + &ZXDGPopupV6WrapperImpl::Configure, + &ZXDGPopupV6WrapperImpl::PopupDone, }; zxdg_positioner_v6* positioner = - CreatePositioner(connection, wayland_window_->parent_window(), params); + CreatePositioner(wayland_window_->parent_window()); if (!positioner) return false; @@ -172,9 +163,9 @@ zxdg_positioner_v6_destroy(positioner); - if (CanGrabPopup(connection)) { - zxdg_popup_v6_grab(zxdg_popup_v6_.get(), connection->seat(), - connection->serial()); + if (CanGrabPopup(connection_)) { + zxdg_popup_v6_grab(zxdg_popup_v6_.get(), connection_->seat(), + connection_->serial()); } zxdg_popup_v6_add_listener(zxdg_popup_v6_.get(), &zxdg_popup_v6_listener, this); @@ -193,12 +184,16 @@ return zxdg_surface_v6_wrapper_->IsConfigured(); } +bool ZXDGPopupV6WrapperImpl::SetBounds(const gfx::Rect& new_bounds) { + // zxdg_popup_v6 doesn't support repositioning. The client must recreate the + // objects instead. + return false; +} + zxdg_positioner_v6* ZXDGPopupV6WrapperImpl::CreatePositioner( - WaylandConnection* connection, - WaylandWindow* parent_window, - const ShellPopupParams& params) { + WaylandWindow* parent_window) { struct zxdg_positioner_v6* positioner; - positioner = zxdg_shell_v6_create_positioner(connection->shell_v6()); + positioner = zxdg_shell_v6_create_positioner(connection_->shell_v6()); if (!positioner) return nullptr; @@ -208,23 +203,24 @@ // Place anchor to the end of the possible position. gfx::Rect anchor_rect = GetAnchorRect( - params.menu_type, params.bounds, + params_.menu_type, params_.bounds, gfx::ScaleToRoundedRect(parent_window->GetBounds(), 1.0 / parent_window->window_scale())); zxdg_positioner_v6_set_anchor_rect(positioner, anchor_rect.x(), anchor_rect.y(), anchor_rect.width(), anchor_rect.height()); - zxdg_positioner_v6_set_size(positioner, params.bounds.width(), - params.bounds.height()); + zxdg_positioner_v6_set_size(positioner, params_.bounds.width(), + params_.bounds.height()); zxdg_positioner_v6_set_anchor( - positioner, TranslateAnchor(GetAnchor(params.menu_type, params.bounds))); + positioner, + TranslateAnchor(GetAnchor(params_.menu_type, params_.bounds))); zxdg_positioner_v6_set_gravity( positioner, - TranslateGravity(GetGravity(params.menu_type, params.bounds))); + TranslateGravity(GetGravity(params_.menu_type, params_.bounds))); zxdg_positioner_v6_set_constraint_adjustment( - positioner, - TranslateConstraintAdjustment(GetConstraintAdjustment(params.menu_type))); + positioner, TranslateConstraintAdjustment( + GetConstraintAdjustment(params_.menu_type))); return positioner; }
diff --git a/ui/ozone/platform/wayland/host/zxdg_popup_v6_wrapper_impl.h b/ui/ozone/platform/wayland/host/zxdg_popup_v6_wrapper_impl.h index d6cd487..0f18a85f 100644 --- a/ui/ozone/platform/wayland/host/zxdg_popup_v6_wrapper_impl.h +++ b/ui/ozone/platform/wayland/host/zxdg_popup_v6_wrapper_impl.h
@@ -20,22 +20,18 @@ class ZXDGPopupV6WrapperImpl : public ShellPopupWrapper { public: ZXDGPopupV6WrapperImpl(std::unique_ptr<ZXDGSurfaceV6WrapperImpl> surface, - WaylandWindow* wayland_window); + WaylandWindow* wayland_window, + WaylandConnection* connection); ~ZXDGPopupV6WrapperImpl() override; // XDGPopupWrapper: - bool Initialize(WaylandConnection* connection, - const ShellPopupParams& params) override; + bool Initialize(const ShellPopupParams& params) override; void AckConfigure(uint32_t serial) override; bool IsConfigured() override; + bool SetBounds(const gfx::Rect& new_bounds) override; private: - bool InitializeV6(WaylandConnection* connection, - const ShellPopupParams& params, - ZXDGSurfaceV6WrapperImpl* parent_zxdg_surface_v6_wrapper); - struct zxdg_positioner_v6* CreatePositioner(WaylandConnection* connection, - WaylandWindow* parent_window, - const ShellPopupParams& bounds); + struct zxdg_positioner_v6* CreatePositioner(WaylandWindow* parent_window); // zxdg_popup_v6_listener static void Configure(void* data, @@ -50,6 +46,8 @@ // Non-owned WaylandWindow that uses this popup. WaylandWindow* const wayland_window_; + // Non-owned WaylandConnection. + WaylandConnection* const connection_; // Ground surface for this popup. std::unique_ptr<ZXDGSurfaceV6WrapperImpl> zxdg_surface_v6_wrapper_; @@ -57,6 +55,9 @@ // XDG Shell V6 object. wl::Object<zxdg_popup_v6> zxdg_popup_v6_; + // Parameters of this popup. + ShellPopupParams params_; + DISALLOW_COPY_AND_ASSIGN(ZXDGPopupV6WrapperImpl); };
diff --git a/ui/ozone/platform/wayland/host/zxdg_surface_v6_wrapper_impl.cc b/ui/ozone/platform/wayland/host/zxdg_surface_v6_wrapper_impl.cc index b3d7bc6..d8a2a69 100644 --- a/ui/ozone/platform/wayland/host/zxdg_surface_v6_wrapper_impl.cc +++ b/ui/ozone/platform/wayland/host/zxdg_surface_v6_wrapper_impl.cc
@@ -18,7 +18,11 @@ WaylandConnection* connection) : wayland_window_(wayland_window), connection_(connection) {} -ZXDGSurfaceV6WrapperImpl::~ZXDGSurfaceV6WrapperImpl() = default; +ZXDGSurfaceV6WrapperImpl::~ZXDGSurfaceV6WrapperImpl() { + is_configured_ = false; + connection_->wayland_window_manager()->NotifyWindowConfigured( + wayland_window_); +} bool ZXDGSurfaceV6WrapperImpl::Initialize() { if (!connection_->shell_v6()) { @@ -46,9 +50,9 @@ void ZXDGSurfaceV6WrapperImpl::AckConfigure(uint32_t serial) { DCHECK(zxdg_surface_v6_); zxdg_surface_v6_ack_configure(zxdg_surface_v6_.get(), serial); + is_configured_ = true; connection_->wayland_window_manager()->NotifyWindowConfigured( wayland_window_); - is_configured_ = true; } bool ZXDGSurfaceV6WrapperImpl::IsConfigured() {
diff --git a/ui/ozone/platform/wayland/test/mock_xdg_shell.cc b/ui/ozone/platform/wayland/test/mock_xdg_shell.cc index a9b1af5e..c7a52a6 100644 --- a/ui/ozone/platform/wayland/test/mock_xdg_shell.cc +++ b/ui/ozone/platform/wayland/test/mock_xdg_shell.cc
@@ -13,7 +13,8 @@ namespace { -constexpr uint32_t kXdgShellVersion = 1; +constexpr uint32_t kXdgShellVersion = 3; +constexpr uint32_t kZXdgShellVersion = 1; void GetXdgSurfaceImpl(wl_client* client, wl_resource* resource, @@ -107,7 +108,7 @@ MockZxdgShellV6::MockZxdgShellV6() : GlobalObject(&zxdg_shell_v6_interface, &kMockZxdgShellV6Impl, - kXdgShellVersion) {} + kZXdgShellVersion) {} MockZxdgShellV6::~MockZxdgShellV6() {}
diff --git a/ui/ozone/platform/wayland/test/test_xdg_popup.cc b/ui/ozone/platform/wayland/test/test_xdg_popup.cc index f8268ed..1c6ad3ad 100644 --- a/ui/ozone/platform/wayland/test/test_xdg_popup.cc +++ b/ui/ozone/platform/wayland/test/test_xdg_popup.cc
@@ -5,6 +5,7 @@ #include "ui/ozone/platform/wayland/test/test_xdg_popup.h" #include "ui/ozone/platform/wayland/test/mock_xdg_surface.h" +#include "ui/ozone/platform/wayland/test/test_positioner.h" namespace wl { @@ -17,11 +18,22 @@ GetUserDataAs<TestXdgPopup>(resource)->set_grab_serial(serial); } +void Reposition(struct wl_client* client, + struct wl_resource* resource, + struct wl_resource* positioner, + uint32_t token) { + auto* test_positioner = GetUserDataAs<TestPositioner>(positioner); + DCHECK(test_positioner); + GetUserDataAs<TestXdgPopup>(resource)->set_position( + test_positioner->position()); +} + } // namespace const struct xdg_popup_interface kXdgPopupImpl = { &DestroyResource, // destroy &Grab, // grab + &Reposition, // reposition }; const struct zxdg_popup_v6_interface kZxdgPopupV6Impl = {
diff --git a/ui/ozone/platform/wayland/test/test_xdg_popup.h b/ui/ozone/platform/wayland/test/test_xdg_popup.h index a3268bf..0beecc56 100644 --- a/ui/ozone/platform/wayland/test/test_xdg_popup.h +++ b/ui/ozone/platform/wayland/test/test_xdg_popup.h
@@ -27,6 +27,9 @@ TestXdgPopup& operator=(const TestXdgPopup&) = delete; ~TestXdgPopup() override; + struct TestPositioner::PopupPosition position() const { + return position_; + } void set_position(struct TestPositioner::PopupPosition position) { position_ = std::move(position); }
diff --git a/ui/webui/resources/cr_components/chromeos/network/network_config.html b/ui/webui/resources/cr_components/chromeos/network/network_config.html index 519b1e21..c782a0b 100644 --- a/ui/webui/resources/cr_components/chromeos/network/network_config.html +++ b/ui/webui/resources/cr_components/chromeos/network/network_config.html
@@ -67,10 +67,6 @@ <!-- VPN --> <template is="dom-if" if="[[showVpn_]]" restamp> - <network-config-input label="[[i18n('OncVPN-Host')]]" - value="{{configProperties_.typeConfig.vpn.host}}" - property="[[managedProperties_.typeProperties.vpn.host]]"> - </network-config-input> <network-config-input label="[[i18n('OncName')]]" value="{{configProperties_.name}}" readonly="[[hasGuid_(guid)]]"> @@ -79,6 +75,10 @@ value="{{vpnType_}}" items="[[vpnTypeItems_]]" onc-prefix="VPN.Type" disabled="[[hasGuid_(guid)]]"> </network-config-select> + <network-config-input label="[[i18n('OncVPN-Host')]]" + value="{{configProperties_.typeConfig.vpn.host}}" + property="[[managedProperties_.typeProperties.vpn.host]]"> + </network-config-input> <template is="dom-if" if="[[!showVpn_.OpenVPN]]"> <network-config-input label="[[i18n('OncVPN-L2TP-Username')]]" value="{{configProperties_.typeConfig.vpn.l2tp.username}}"