diff --git a/DEPS b/DEPS index 70eb4eaa..539d028 100644 --- a/DEPS +++ b/DEPS
@@ -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': 'd090aa7feee336b4716edc23a1e99125a5a9c642', + 'skia_revision': 'bc6d93397f9cff3503b3e40efa4ef094bbfeb471', # 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': 'c26eb95a3425602903f447d4fd3f8f1cfde43937', + 'v8_revision': '49898ece362e2784a04d8595e7f5f9d1615a7a19', # 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. @@ -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': '01a52efc6bd7cf995e2caa76835e8457d3d5107a', + 'devtools_frontend_revision': 'e83077df4c7793687104404992dce6f8408b990b', # 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': '2d41f8c1df45b1aa642b5149060a8ec9ad9a0c63', + 'dawn_revision': 'c607e81de239c0c06af6e5cdb76bc4e89b144a63', # 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': 'K8c7JN0QlH9y-iVNRC74RIWTTwcUwtM9CIwQ8vPQyFkC', + 'version': 'R0benUT8A1oqvs7L0N-hfCvDpMzfzemd6fXXr4tBOrEC', }, ], 'condition': 'checkout_android', @@ -1389,7 +1389,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + 'f7ba153308a223418921dff22a61527a00aea264', + Var('android_git') + '/platform/external/perfetto.git' + '@' + 'cb07e44638b99718b8c54bc19f8dbd84a3743dc6', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1478,7 +1478,7 @@ 'packages': [ { 'package': 'fuchsia/third_party/aemu/linux-amd64', - 'version': 'jIoBgZ-iUWXLCCH8YkbLabPLzKXZ54b27lb6trJpzpUC' + 'version': 'oLzjQqDQvVJY21nYf9yTG_9MDOl6D5lteCCosHg-Uc0C' }, ], 'condition': 'host_os == "linux" and checkout_fuchsia', @@ -1618,7 +1618,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '827cad9e402b63bbe38787456115bcb681a8a152', 'src/third_party/webgpu-cts/src': - Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'f19dd8595c4cc6058ec47db576b292d072353e5e', + Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '1a09f6aebfcb8e2c5d85673902c5198610f9651f', 'src/third_party/webrtc': Var('webrtc_git') + '/src.git' + '@' + '6882a3f7d04865975f4c5eeee76fe324f3141521', @@ -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@ab758d53e34a2985054eacd2407fa021827b88fb', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@2066aaa5e55d4a55d0371b590e586f75e672c4c5', 'condition': 'checkout_src_internal', },
diff --git a/WATCHLISTS b/WATCHLISTS index 5004d3d6..287c042 100644 --- a/WATCHLISTS +++ b/WATCHLISTS
@@ -841,7 +841,6 @@ '|components/policy/'\ '|chromeos/policy/'\ '|chrome/browser/ash/policy/'\ - '|chrome/browser/chromeos/policy/'\ '|chrome/browser/policy/' }, 'cros_reporting': {
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd index 1ba35f8..f9b86718 100644 --- a/ash/ash_strings.grd +++ b/ash/ash_strings.grd
@@ -3253,7 +3253,7 @@ <ph name="DESC_TEXT">$1<ex>Cannot connect to the internet. Click to try again.</ex></ph>: Retry </message> <message name="IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_IMPROVE_LABEL" desc="Description text of the report query button for the Quick Answers view."> - We want to improve this! + Help us improve this! </message> <message name="IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_REPORT_LABEL" desc="Description text of the report query button for the Quick Answers view."> Report this query
diff --git a/ash/ash_strings_grd/IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_IMPROVE_LABEL.png.sha1 b/ash/ash_strings_grd/IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_IMPROVE_LABEL.png.sha1 index 6188fcb7..da1dfed 100644 --- a/ash/ash_strings_grd/IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_IMPROVE_LABEL.png.sha1 +++ b/ash/ash_strings_grd/IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_IMPROVE_LABEL.png.sha1
@@ -1 +1 @@ -64a86d83da87b92b131ae9507b26f352c3970e4c +122f7b4b961c5e3055532b4c2190f23fb1796a34 \ No newline at end of file
diff --git a/ash/ash_strings_grd/IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_REPORT_LABEL.png.sha1 b/ash/ash_strings_grd/IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_REPORT_LABEL.png.sha1 index 6188fcb7..da1dfed 100644 --- a/ash/ash_strings_grd/IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_REPORT_LABEL.png.sha1 +++ b/ash/ash_strings_grd/IDS_ASH_QUICK_ANSWERS_VIEW_REPORT_QUERY_REPORT_LABEL.png.sha1
@@ -1 +1 @@ -64a86d83da87b92b131ae9507b26f352c3970e4c +122f7b4b961c5e3055532b4c2190f23fb1796a34 \ No newline at end of file
diff --git a/ash/hud_display/ash_tracing_request.h b/ash/hud_display/ash_tracing_request.h index 30f0ac5..8849ad1c 100644 --- a/ash/hud_display/ash_tracing_request.h +++ b/ash/hud_display/ash_tracing_request.h
@@ -5,6 +5,8 @@ #ifndef ASH_HUD_DISPLAY_ASH_TRACING_REQUEST_H_ #define ASH_HUD_DISPLAY_ASH_TRACING_REQUEST_H_ +#include <sys/stat.h> + #include <memory> #include "base/callback_forward.h"
diff --git a/ash/public/cpp/shelf_ui_info.h b/ash/public/cpp/shelf_ui_info.h index 048b5871..1fd1a2b 100644 --- a/ash/public/cpp/shelf_ui_info.h +++ b/ash/public/cpp/shelf_ui_info.h
@@ -74,6 +74,9 @@ // The current hotseat state. HotseatState hotseat_state = HotseatState::kHidden; + + // Indicates whether the hotseat is being autohidden. + bool is_auto_hidden = false; }; } // namespace ash
diff --git a/ash/quick_answers/ui/quick_answers_view.cc b/ash/quick_answers/ui/quick_answers_view.cc index af2f0cf..e653736 100644 --- a/ash/quick_answers/ui/quick_answers_view.cc +++ b/ash/quick_answers/ui/quick_answers_view.cc
@@ -67,7 +67,7 @@ // Info icon. constexpr int kFeedbackIconSizeDip = 16; -constexpr gfx::Insets kFeedbackIconInsets(8, 10, 8, 8); +constexpr gfx::Insets kFeedbackIconInsets(9, 10, 7, 8); // Spacing between lines in the main view. constexpr int kLineSpacingDip = 4;
diff --git a/ash/shelf/shelf_test_api.cc b/ash/shelf/shelf_test_api.cc index 5d82678..5be626c 100644 --- a/ash/shelf/shelf_test_api.cc +++ b/ash/shelf/shelf_test_api.cc
@@ -118,6 +118,8 @@ gfx::Point swipe_end_location = info.swipe_up.swipe_start_location; swipe_end_location.set_y(swipe_end_location.y() - swipe_distance); info.swipe_up.swipe_end_location = swipe_end_location; + info.is_auto_hidden = + GetShelf()->shelf_layout_manager()->is_shelf_auto_hidden(); return info; }
diff --git a/ash/webui/shimless_rma/resources/BUILD.gn b/ash/webui/shimless_rma/resources/BUILD.gn index 97b469e..11d4773 100644 --- a/ash/webui/shimless_rma/resources/BUILD.gn +++ b/ash/webui/shimless_rma/resources/BUILD.gn
@@ -23,6 +23,7 @@ "onboarding_update_page.js", "onboarding_wait_for_manual_wp_disable_page.js", "onboarding_wp_disable_complete_page.js", + "reimaging_accelerometer_calibration_page.js", "reimaging_device_information_page.js", "reimaging_firmware_update_page.js", "reimaging_provisioning_page.js", @@ -71,6 +72,7 @@ ":onboarding_update_page", ":onboarding_wait_for_manual_wp_disable_page", ":onboarding_wp_disable_complete_page", + ":reimaging_accelerometer_calibration_page", ":reimaging_device_information_page", ":reimaging_firmware_update_page", ":reimaging_provisioning_page", @@ -201,6 +203,13 @@ ] } +js_library("reimaging_accelerometer_calibration_page") { + deps = [ + ":shimless_rma_types", + "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", + ] +} + js_library("reimaging_firmware_update_page") { deps = [ ":mojo_interface_provider",
diff --git a/ash/webui/shimless_rma/resources/fake_shimless_rma_service.js b/ash/webui/shimless_rma/resources/fake_shimless_rma_service.js index 6602299..81368f6 100644 --- a/ash/webui/shimless_rma/resources/fake_shimless_rma_service.js +++ b/ash/webui/shimless_rma/resources/fake_shimless_rma_service.js
@@ -45,6 +45,12 @@ */ this.automaticallyTriggerProvisioningObservation_ = false; + /** + * Control automatically triggering calibration observations. + * @private {boolean} + */ + this.automaticallyTriggerCalibrationObservation_ = false; + this.reset(); } @@ -458,6 +464,10 @@ /** @type {!CalibrationComponent} */ (component), /** @type {number} */ (progress)); }); + if (this.automaticallyTriggerCalibrationObservation_) { + this.triggerCalibrationObserver( + CalibrationComponent.kAccelerometer, 100, 1500); + } } /** @@ -491,6 +501,13 @@ } /** + * Trigger calibration observations when an observer is added. + */ + automaticallyTriggerCalibrationObservation() { + this.automaticallyTriggerCalibrationObservation_ = true; + } + + /** * Implements ShimlessRmaServiceInterface.ObserveHardwareWriteProtectionState. * @param {!HardwareWriteProtectionStateObserverRemote} remote */
diff --git a/ash/webui/shimless_rma/resources/mojo_interface_provider.js b/ash/webui/shimless_rma/resources/mojo_interface_provider.js index c70428c..da721559 100644 --- a/ash/webui/shimless_rma/resources/mojo_interface_provider.js +++ b/ash/webui/shimless_rma/resources/mojo_interface_provider.js
@@ -47,6 +47,7 @@ service.setReimageRequiredResult(false); service.automaticallyTriggerDisableWriteProtectionObservation(); service.automaticallyTriggerProvisioningObservation(); + service.automaticallyTriggerCalibrationObservation(); service.setGetOriginalSerialNumberResult('serial# 0001') service.setGetRegionListResult(fakeDeviceRegions);
diff --git a/ash/webui/shimless_rma/resources/reimaging_accelerometer_calibration_page.html b/ash/webui/shimless_rma/resources/reimaging_accelerometer_calibration_page.html new file mode 100644 index 0000000..f362a98 --- /dev/null +++ b/ash/webui/shimless_rma/resources/reimaging_accelerometer_calibration_page.html
@@ -0,0 +1,19 @@ +<style include="cr-shared-style shimless-rma-shared"> +</style> + +<base-page> + <div slot="header"> + <!-- TODO(joonbug): update for i18n --> + <h1>Calibrate the device's accelerometer</h1> + <div id="preCalibration" hidden$="[[calibrationObserverReceiver_]]"> + <span>Please place the device on a flat surface before proceeding</span> + </div> + <div id="calibration" hidden$="[[!calibrationObserverReceiver_]]"> + <span>Please wait while accelerometer is calibrated</span> + </div> + <span hidden$="[[!calibrationComplete_]]">Completed</span> + </div> + <div slot="body"> + <!-- TODO(joonbug): add accelerometer calibration image --> + </div> +</base-page>
diff --git a/ash/webui/shimless_rma/resources/reimaging_accelerometer_calibration_page.js b/ash/webui/shimless_rma/resources/reimaging_accelerometer_calibration_page.js new file mode 100644 index 0000000..2a34589 --- /dev/null +++ b/ash/webui/shimless_rma/resources/reimaging_accelerometer_calibration_page.js
@@ -0,0 +1,97 @@ +// 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 './shimless_rma_shared_css.js'; +import './base_page.js'; + +import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + +import {getShimlessRmaService} from './mojo_interface_provider.js'; +import {CalibrationComponent, CalibrationObserverInterface, CalibrationObserverReceiver, ShimlessRmaServiceInterface, StateResult} from './shimless_rma_types.js'; + +/** + * @fileoverview + * 'reimaging-accelerometer-calibration-page' is for recalibration of the + * accelerometer during the reimaging process. + * TODO(joonbug): when needed, generalize this for different components. + */ +export class ReimagingAccelerometerCalibrationPageElement extends + PolymerElement { + static get is() { + return 'reimaging-accelerometer-calibration-page'; + } + + static get template() { + return html`{__html_template__}`; + } + + static get properties() { + return { + /** @private {ShimlessRmaServiceInterface} */ + shimlessRmaService_: { + type: Object, + value: null, + }, + + /** + * Receiver responsible for observing battery health. + * @protected {CalibrationObserverReceiver} + */ + calibrationObserverReceiver_: { + type: Object, + value: null, + }, + + /** @protected */ + calibrationComplete_: { + type: Boolean, + value: false, + } + }; + } + + /** @override */ + ready() { + super.ready(); + this.shimlessRmaService_ = getShimlessRmaService(); + } + + + /** @return {!Promise<!StateResult>} */ + onNextButtonClick() { + if (!this.calibrationObserverReceiver_) { + this.observeCalibrationProgress_(); + return Promise.reject(); + } + + if (this.calibrationComplete_) { + return this.shimlessRmaService_.transitionNextState(); + } + return Promise.reject(new Error('Calibration is not complete.')); + } + + /** + * Implements ProvisioningObserver.onProvisioningUpdated() + * @param {!CalibrationComponent} component + * @param {number} progress + */ + onCalibrationUpdated(component, progress) { + if (progress === 100) { + this.calibrationComplete_ = true; + } + } + + /** @private */ + observeCalibrationProgress_() { + this.calibrationObserverReceiver_ = new CalibrationObserverReceiver( + /** @type {!CalibrationObserverInterface} */ (this)); + + this.shimlessRmaService_.observeCalibrationProgress( + this.calibrationObserverReceiver_.$.bindNewPipeAndPassRemote()); + } +}; + +customElements.define( + ReimagingAccelerometerCalibrationPageElement.is, + ReimagingAccelerometerCalibrationPageElement);
diff --git a/ash/webui/shimless_rma/resources/shimless_rma.js b/ash/webui/shimless_rma/resources/shimless_rma.js index 147057d..e7744b6 100644 --- a/ash/webui/shimless_rma/resources/shimless_rma.js +++ b/ash/webui/shimless_rma/resources/shimless_rma.js
@@ -11,6 +11,7 @@ import './onboarding_update_page.js'; import './onboarding_wait_for_manual_wp_disable_page.js'; import './onboarding_wp_disable_complete_page.js'; +import './reimaging_accelerometer_calibration_page.js'; import './reimaging_device_information_page.js'; import './reimaging_firmware_update_page.js'; import './reimaging_provisioning_page.js'; @@ -121,6 +122,12 @@ btnCancel: ButtonState.HIDDEN, btnBack: ButtonState.VISIBLE, }, + [RmaState.kCalibrateComponents]: { + componentIs: 'reimaging-accelerometer-calibration-page', + buttonNext: ButtonState.VISIBLE, + buttonCancel: ButtonState.HIDDEN, + buttonBack: ButtonState.VISIBLE, + }, [RmaState.kProvisionDevice]: { componentIs: 'reimaging-provisioning-page', btnNext: ButtonState.VISIBLE,
diff --git a/ash/webui/shimless_rma/resources/shimless_rma_types.js b/ash/webui/shimless_rma/resources/shimless_rma_types.js index 26219fff4..4873de4 100644 --- a/ash/webui/shimless_rma/resources/shimless_rma_types.js +++ b/ash/webui/shimless_rma/resources/shimless_rma_types.js
@@ -74,6 +74,20 @@ ash.shimlessRma.mojom.CalibrationObserverRemote; /** + * Type alias for CalibrationObserverReceiver. + * @typedef {ash.shimlessRma.mojom.CalibrationObserverReceiver} + */ +export let CalibrationObserverReceiver = + ash.shimlessRma.mojom.CalibrationObserverReceiver; + +/** + * Type alias for CalibrationObserverInterface. + * @typedef {ash.shimlessRma.mojom.CalibrationObserverInterface} + */ +export let CalibrationObserverInterface = + ash.shimlessRma.mojom.CalibrationObserverInterface; + +/** * Type alias for ProvisioningObserverRemote. * @typedef {ash.shimlessRma.mojom.ProvisioningObserverRemote} */
diff --git a/ash/webui/shortcut_customization_ui/resources/BUILD.gn b/ash/webui/shortcut_customization_ui/resources/BUILD.gn index c9e85e5f..2ed555f0 100644 --- a/ash/webui/shortcut_customization_ui/resources/BUILD.gn +++ b/ash/webui/shortcut_customization_ui/resources/BUILD.gn
@@ -13,12 +13,14 @@ polymer_element_files = [ "accelerator_edit_dialog.js", + "accelerator_edit_view.js", "accelerator_row.js", "accelerator_view.js", "accessibility_shortcuts_page.js", "android_shortcuts_page.js", "browser_shortcuts_page.js", "chromeos_shortcuts_page.js", + "icons.js", "input_key.js", "shortcut_customization_app.js", "shortcut_input.js", @@ -114,6 +116,21 @@ ] } +js_library("accelerator_edit_view") { + deps = [ + ":accelerator_view", + ":icons", + "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", + "//ui/webui/resources/cr_elements/cr_button:cr_button.m", + ] +} + +js_library("icons") { + deps = [ + "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", + ] +} + preprocess_if_expr("preprocess_generated") { deps = [ ":web_components" ] in_folder = target_gen_dir
diff --git a/ash/webui/shortcut_customization_ui/resources/accelerator_edit_dialog.html b/ash/webui/shortcut_customization_ui/resources/accelerator_edit_dialog.html index d637d9ac..a77ec1f6 100644 --- a/ash/webui/shortcut_customization_ui/resources/accelerator_edit_dialog.html +++ b/ash/webui/shortcut_customization_ui/resources/accelerator_edit_dialog.html
@@ -12,8 +12,8 @@ <div slot="body"> <div id="acceleratorViewList"> <template is="dom-repeat" items=[[accelerators]]> - <accelerator-view class="acceleratorItem" accelerator=[[item]]> - </accelerator-view> + <accelerator-edit-view class="acceleratorItem" accelerator=[[item]]> + </accelerator-edit-view> </template> </div> </div>
diff --git a/ash/webui/shortcut_customization_ui/resources/accelerator_edit_dialog.js b/ash/webui/shortcut_customization_ui/resources/accelerator_edit_dialog.js index 3626c78..d3192fe0 100644 --- a/ash/webui/shortcut_customization_ui/resources/accelerator_edit_dialog.js +++ b/ash/webui/shortcut_customization_ui/resources/accelerator_edit_dialog.js
@@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import './accelerator_view.js' +import './accelerator_view.js'; +import './accelerator_edit_view.js'; import 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.m.js';
diff --git a/ash/webui/shortcut_customization_ui/resources/accelerator_edit_view.html b/ash/webui/shortcut_customization_ui/resources/accelerator_edit_view.html new file mode 100644 index 0000000..240eed7 --- /dev/null +++ b/ash/webui/shortcut_customization_ui/resources/accelerator_edit_view.html
@@ -0,0 +1,57 @@ +<style include="cr-shared-style"> + #container { + display: flex; + flex-direction: row; + justify-content: space-between; + padding-bottom: 10px; + } + + #acceleratorInfoText { + padding-top: 10px + } + + #cancelButtonContainer { + margin-top: 5px; + } + + :host([is-edit-view_]) #acceleratorView { + border-color: var(--google-blue-600); + border-radius: 5px; + border-style: solid; + border-width: thin; + padding: 5px; + } +</style> + +<div id="container"> + <div id="acceleratorContainer"> + <div id="acceleratorView"> + <accelerator-view id="acceleratorItem" + accelerator=[[accelerator]] is-editable=[[isEditView_]]> + </accelerator-view> + </div> + <div id="acceleratorInfoText" hidden=[[!isEditView_]]> + <!-- TODO(jimmyxgong): Localize string --> + Press 1-4 modifiers and 1 other key on your keyboard + </div> + </div> + <div id="buttonContainer"> + <div id="editButtonsContainer" hidden=[[isEditView_]]> + <cr-icon-button id="editButton" + iron-icon="shortcut-customization:cancel" + aria-hidden="true" + on-click="onEditButtonClicked_"> + </cr-icon-button> + <cr-icon-button id="deleteButton" + iron-icon="shortcut-customization:delete" + aria-hidden="true" + on-click="onDeleteButtonClicked_"> + </cr-icon-button> + </div> + <div id="cancelButtonContainer" hidden=[[!isEditView_]]> + <cr-button id="cancelButton" on-click="onCancelButtonClicked_"> + <!-- TODO(jimmyxgong): Localize string --> + cancel + </cr-button> + </div> +</div> \ No newline at end of file
diff --git a/ash/webui/shortcut_customization_ui/resources/accelerator_edit_view.js b/ash/webui/shortcut_customization_ui/resources/accelerator_edit_view.js new file mode 100644 index 0000000..075c702 --- /dev/null +++ b/ash/webui/shortcut_customization_ui/resources/accelerator_edit_view.js
@@ -0,0 +1,68 @@ +// 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 './accelerator_view.js' +import './icons.js' + +import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.m.js'; +import 'chrome://resources/cr_elements/cr_icons_css.m.js'; +import 'chrome://resources/cr_elements/icons.m.js'; +import 'chrome://resources/cr_elements/shared_style_css.m.js'; +import 'chrome://resources/cr_elements/shared_vars_css.m.js'; + +import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + +/** + * @fileoverview + * 'accelerator-edit-view' is a wrapper component for one accelerator. It is + * responsible for displaying the edit/remove buttons to an accelerator and also + * displaying context or errors strings for an accelerator. + */ +export class AcceleratorEditViewElement extends PolymerElement { + static get is() { + return 'accelerator-edit-view'; + } + + static get template() { + return html`{__html_template__}`; + } + + static get properties() { + return { + /** + * TODO(jimmyxgong): Replace with proper mojom::Accelerator type. + * @type {!Object} + */ + accelerator: { + type: Object, + value: () => {}, + }, + + /** @private */ + isEditView_: { + type: Boolean, + value: false, + reflectToAttribute: true, + }, + } + } + + /** @private */ + onEditButtonClicked_() { + this.isEditView_ = true; + } + + /** @private */ + onDeleteButtonClicked_() { + // TODO(jimmyxgong): Implement this function + } + + /** @private */ + onCancelButtonClicked_() { + this.isEditView_ = false; + } +} + +customElements.define(AcceleratorEditViewElement.is, + AcceleratorEditViewElement); \ No newline at end of file
diff --git a/ash/webui/shortcut_customization_ui/resources/accelerator_view.html b/ash/webui/shortcut_customization_ui/resources/accelerator_view.html index be20f04..ea0e2d0 100644 --- a/ash/webui/shortcut_customization_ui/resources/accelerator_view.html +++ b/ash/webui/shortcut_customization_ui/resources/accelerator_view.html
@@ -13,4 +13,11 @@ <input-key key=[[accelerator.key]] key-state="alpha-numeric-selected"> </input-key> </template> + <template is="dom-if" if=[[isEditable]]> + <input-key key="ctrl" key-state="not-selected"></input-key> + <input-key key="alt" key-state="not-selected"></input-key> + <input-key key="shift" key-state="not-selected"></input-key> + <input-key key="search" key-state="not-selected"></input-key> + <input-key key="key" key-state="not-selected"></input-key> + </template> </div> \ No newline at end of file
diff --git a/ash/webui/shortcut_customization_ui/resources/icons.html b/ash/webui/shortcut_customization_ui/resources/icons.html new file mode 100644 index 0000000..c4611b8 --- /dev/null +++ b/ash/webui/shortcut_customization_ui/resources/icons.html
@@ -0,0 +1,14 @@ +<iron-iconset-svg name="shortcut-customization" size="20"> + <svg> + <defs> + <!-- TODO(jimmyxgong): Replace these temporary icons with the actual + ones--> + <g id="cancel" width="16" height="16" viewBox="0 0 16 16"> + <path d="M9.65759 5.44L7.99999 7.0976L6.34239 5.44L5.43999 6.3424L7.09759 8L5.43999 9.6576L6.34239 10.56L7.99999 8.9024L9.65759 10.56L10.56 9.6576L8.90239 8L10.56 6.3424L9.65759 5.44ZM8 1.60001C4.4608 1.60001 1.6 4.46081 1.6 8.00001C1.6 11.5392 4.4608 14.4 8 14.4C11.5392 14.4 14.4 11.5392 14.4 8.00001C14.4 4.46081 11.5392 1.60001 8 1.60001ZM8 12.8C5.354 12.8 3.2 10.646 3.2 8.00001C3.2 5.35401 5.354 3.20001 8 3.20001C10.646 3.20001 12.8 5.35401 12.8 8.00001C12.8 10.646 10.646 12.8 8 12.8Z"/> + </g> + <g id="delete" width="20" height="20" viewBox="0 0 20 20"> + <path d="M13 3V2H7V3H3V5H4V16C4 17.1 4.9 18 6 18H14C15.1 18 16 17.1 16 16V5H17V3H13ZM14 16H6V5H14V16Z"/> + </g> + </defs> + </svg> +</iron-iconset-svg> \ No newline at end of file
diff --git a/ash/webui/shortcut_customization_ui/resources/icons.js b/ash/webui/shortcut_customization_ui/resources/icons.js new file mode 100644 index 0000000..e585ad2 --- /dev/null +++ b/ash/webui/shortcut_customization_ui/resources/icons.js
@@ -0,0 +1,10 @@ +// 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 'chrome://resources/polymer/v3_0/iron-iconset-svg/iron-iconset-svg.js'; + +import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + +const template = html`{__html_template__}`; +document.head.appendChild(template.content); \ No newline at end of file
diff --git a/base/files/file.h b/base/files/file.h index 8b62129..a264d93 100644 --- a/base/files/file.h +++ b/base/files/file.h
@@ -18,19 +18,21 @@ #include "base/trace_event/base_tracing_forward.h" #include "build/build_config.h" -#if defined(OS_POSIX) || defined(OS_FUCHSIA) -#include <sys/stat.h> +#if defined(OS_BSD) || defined(OS_APPLE) || defined(OS_NACL) || \ + defined(OS_FUCHSIA) || (defined(OS_ANDROID) && __ANDROID_API__ < 21) +struct stat; +namespace base { +typedef struct stat stat_wrapper_t; +} +#elif defined(OS_POSIX) +struct stat64; +namespace base { +typedef struct stat64 stat_wrapper_t; +} #endif namespace base { -#if defined(OS_BSD) || defined(OS_APPLE) || defined(OS_NACL) || \ - defined(OS_FUCHSIA) || (defined(OS_ANDROID) && __ANDROID_API__ < 21) -typedef struct stat stat_wrapper_t; -#elif defined(OS_POSIX) -typedef struct stat64 stat_wrapper_t; -#endif - // Thin wrapper around an OS-level file. // Note that this class does not provide any support for asynchronous IO, other // than the ability to create asynchronous handles on Windows.
diff --git a/base/files/file_enumerator.h b/base/files/file_enumerator.h index d9d81d5..baba4d2 100644 --- a/base/files/file_enumerator.h +++ b/base/files/file_enumerator.h
@@ -20,6 +20,7 @@ #if defined(OS_WIN) #include "base/win/windows_types.h" #elif defined(OS_POSIX) || defined(OS_FUCHSIA) +#include <sys/stat.h> #include <unistd.h> #include <unordered_set> #endif
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc index 460e773..9d1db616 100644 --- a/base/files/file_posix.cc +++ b/base/files/file_posix.cc
@@ -7,6 +7,7 @@ #include <errno.h> #include <fcntl.h> #include <stdint.h> +#include <sys/stat.h> #include <unistd.h> #include "base/check_op.h"
diff --git a/base/files/file_util.h b/base/files/file_util.h index f6cacc86..d43c5995 100644 --- a/base/files/file_util.h +++ b/base/files/file_util.h
@@ -17,11 +17,6 @@ #include <string> #include <vector> -#if defined(OS_POSIX) || defined(OS_FUCHSIA) -#include <sys/stat.h> -#include <unistd.h> -#endif - #include "base/base_export.h" #include "base/callback_forward.h" #include "base/containers/span.h" @@ -33,6 +28,8 @@ #if defined(OS_WIN) #include "base/win/windows_types.h" #elif defined(OS_POSIX) || defined(OS_FUCHSIA) +#include <sys/stat.h> +#include <unistd.h> #include "base/file_descriptor_posix.h" #include "base/posix/eintr_wrapper.h" #endif
diff --git a/base/os_compat_android.cc b/base/os_compat_android.cc index fa67706..80a0a10 100644 --- a/base/os_compat_android.cc +++ b/base/os_compat_android.cc
@@ -8,6 +8,7 @@ #include <errno.h> #include <limits.h> #include <math.h> +#include <sys/stat.h> #include <sys/syscall.h> #include <unistd.h> #include "base/strings/string_util.h"
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1 index 53ab7dc..d3ed277 100644 --- a/build/fuchsia/linux.sdk.sha1 +++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@ -5.20210721.2.1 +5.20210721.4.1
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1 index 53ab7dc..d3ed277 100644 --- a/build/fuchsia/mac.sdk.sha1 +++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@ -5.20210721.2.1 +5.20210721.4.1
diff --git a/cc/trees/proxy_main.cc b/cc/trees/proxy_main.cc index 4e20727..735a814 100644 --- a/cc/trees/proxy_main.cc +++ b/cc/trees/proxy_main.cc
@@ -170,24 +170,10 @@ final_pipeline_stage_ = max_requested_pipeline_stage_; max_requested_pipeline_stage_ = NO_PIPELINE_STAGE; - // When we don't need to produce a CompositorFrame, there's also no need to - // commit our updates. We still need to run layout and paint though, as it can - // have side effects on page loading behavior. - bool skip_commit = begin_main_frame_state->begin_frame_args.animate_only; - // If main frame updates and commits are deferred, skip the entire pipeline. - bool skip_full_pipeline = defer_main_frame_update_; - - // We may have previously skipped paint and commit. If we should still skip it - // now, and there was no intermediate request for a commit since the last - // BeginMainFrame, we can skip the full pipeline. - skip_full_pipeline |= - skip_commit && final_pipeline_stage_ == NO_PIPELINE_STAGE; - - if (skip_full_pipeline) { + if (defer_main_frame_update_) { TRACE_EVENT_INSTANT0("cc", "EarlyOut_DeferCommit", TRACE_EVENT_SCOPE_THREAD); - // In this case, since the commit is deferred to a later time, gathered // events metrics are not discarded so that they can be reported if the // commit happens in the future. @@ -217,7 +203,7 @@ // the status at this point to keep scroll in sync. if (IsDeferringCommits() && base::TimeTicks::Now() > commits_restart_time_) StopDeferringCommits(ReasonToTimeoutTrigger(*paint_holding_reason_)); - skip_commit |= IsDeferringCommits(); + bool skip_commit = IsDeferringCommits(); if (!skip_commit) { // Synchronizes scroll offsets and page scale deltas (for pinch zoom) from @@ -266,6 +252,11 @@ // of the defer... flags, so re-evaluate skip_commit. skip_commit |= defer_main_frame_update_ || IsDeferringCommits(); + // When we don't need to produce a CompositorFrame, there's also no need to + // commit our updates. We still need to run layout and paint though, as it can + // have side effects on page loading behavior. + skip_commit |= begin_main_frame_state->begin_frame_args.animate_only; + if (skip_commit) { current_pipeline_stage_ = NO_PIPELINE_STAGE; layer_tree_host_->DidBeginMainFrame();
diff --git a/chrome/VERSION b/chrome/VERSION index 3cd34dd..849537e 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=94 MINOR=0 -BUILD=4583 +BUILD=4584 PATCH=0
diff --git a/chrome/android/features/cablev2_authenticator/BUILD.gn b/chrome/android/features/cablev2_authenticator/BUILD.gn index dfd66d7..e44113a 100644 --- a/chrome/android/features/cablev2_authenticator/BUILD.gn +++ b/chrome/android/features/cablev2_authenticator/BUILD.gn
@@ -3,6 +3,7 @@ # found in the LICENSE file. import("//build/config/android/rules.gni") +import("//chrome/android/chrome_common_shared_library.gni") android_library("java") { sources = [ @@ -99,4 +100,9 @@ "//device/fido:cablev2_registration", "//third_party/boringssl", ] + + # caBLE v2 authenticator native entrypoints belong in the partition. + if (use_native_partitions) { + cflags = [ "-fsymbol-partition=cablev2_authenticator_partition" ] + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ManageSpaceActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ManageSpaceActivity.java index 0801dee..3eacd71 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ManageSpaceActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ManageSpaceActivity.java
@@ -83,6 +83,7 @@ protected void onCreate(Bundle savedInstanceState) { ensureActivityNotExported(); + setTheme(R.style.ColorOverlay_ChromiumAndroid); setContentView(R.layout.manage_space_activity); Resources r = getResources(); setTitle(String.format(r.getString(R.string.storage_management_activity_label),
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index d00939a1..7cb6ecf 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -2388,6 +2388,7 @@ "//chrome/browser/ui/webui/chromeos/crostini_installer:mojo_bindings", "//chrome/browser/ui/webui/chromeos/crostini_upgrader:mojo_bindings", "//chrome/browser/ui/webui/chromeos/emoji:mojo_bindings", + "//chrome/browser/ui/webui/chromeos/enterprise_casting:mojo_bindings", "//chrome/browser/ui/webui/chromeos/launcher_internals:mojo_bindings", "//chrome/browser/ui/webui/chromeos/vm:mojo_bindings", "//chrome/browser/ui/webui/settings/chromeos/constants:mojom", @@ -2436,7 +2437,6 @@ if (!is_official_build) { deps += [ "//chromeos/components/demo_mode_app_ui", - "//chromeos/components/demo_mode_app_ui/mojom", "//chromeos/components/telemetry_extension_ui", "//chromeos/components/telemetry_extension_ui/mojom", ]
diff --git a/chrome/browser/apps/app_service/app_platform_metrics.cc b/chrome/browser/apps/app_service/app_platform_metrics.cc index b079da3..01f2cb3 100644 --- a/chrome/browser/apps/app_service/app_platform_metrics.cc +++ b/chrome/browser/apps/app_service/app_platform_metrics.cc
@@ -6,6 +6,7 @@ #include <set> +#include "base/containers/contains.h" #include "base/metrics/histogram_functions.h" #include "base/no_destructor.h" #include "base/util/values/values_util.h" @@ -431,6 +432,12 @@ RecordAppLaunchSource(launch_source); RecordAppLaunchPerAppType( GetAppTypeName(profile, app_type, app_id, container)); + + auto* proxy = apps::AppServiceProxyFactory::GetForProfile(profile); + if (proxy && proxy->AppPlatformMetrics()) { + proxy->AppPlatformMetrics()->RecordAppLaunchUkm(app_type, app_id, + launch_source, container); + } } AppPlatformMetrics::AppPlatformMetrics( @@ -531,10 +538,40 @@ RecordAppsUsageTime(); } +void AppPlatformMetrics::RecordAppLaunchUkm( + apps::mojom::AppType app_type, + const std::string& app_id, + apps::mojom::LaunchSource launch_source, + apps::mojom::LaunchContainer container) { + if (app_type == apps::mojom::AppType::kUnknown || !ShouldRecordUkm()) { + return; + } + + apps::AppTypeName app_type_name = + GetAppTypeName(profile_, app_type, app_id, container); + + if (!ShouldRecordUkmForAppTypeName(app_type_name)) { + return; + } + + ukm::SourceId source_id = GetSourceId(app_id); + if (source_id == ukm::kInvalidSourceId) { + return; + } + + ukm::builders::ChromeOSApp_Launch builder(source_id); + builder.SetAppType((int)app_type_name) + .SetLaunchSource((int)launch_source) + .SetUserDeviceMatrix(GetUserTypeByDeviceTypeMetrics()) + .Record(ukm::UkmRecorder::Get()); +} + void AppPlatformMetrics::OnAppTypeInitialized(apps::mojom::AppType app_type) { if (should_record_metrics_on_new_day_) { RecordAppsCount(app_type); } + + initialized_app_types.insert(app_type); } void AppPlatformMetrics::OnAppRegistryCacheWillBeDestroyed( @@ -542,7 +579,22 @@ apps::AppRegistryCache::Observer::Observe(nullptr); } -void AppPlatformMetrics::OnAppUpdate(const apps::AppUpdate& update) {} +void AppPlatformMetrics::OnAppUpdate(const apps::AppUpdate& update) { + if (!ShouldRecordUkm()) { + return; + } + + if (!update.ReadinessChanged() || + update.Readiness() != apps::mojom::Readiness::kReady) { + return; + } + + InstallTime install_time = + base::Contains(initialized_app_types, update.AppType()) + ? InstallTime::kRunning + : InstallTime::kInit; + RecordAppsInstallUkm(update, install_time); +} void AppPlatformMetrics::OnInstanceUpdate(const apps::InstanceUpdate& update) { if (!update.StateChanged()) { @@ -774,6 +826,28 @@ app_id_running_time_per_five_minutes_.clear(); } +void AppPlatformMetrics::RecordAppsInstallUkm(const apps::AppUpdate& update, + InstallTime install_time) { + AppTypeName app_type_name = + GetAppTypeName(profile_, update.AppType(), update.AppId(), + apps::mojom::LaunchContainer::kLaunchContainerNone); + if (!ShouldRecordUkmForAppTypeName(app_type_name)) { + return; + } + + ukm::SourceId source_id = GetSourceId(update.AppId()); + if (source_id == ukm::kInvalidSourceId) { + return; + } + + ukm::builders::ChromeOSApp_InstalledApp builder(source_id); + builder.SetAppType((int)app_type_name) + .SetInstallSource((int)update.InstallSource()) + .SetInstallTime((int)install_time) + .SetUserDeviceMatrix(user_type_by_device_type_) + .Record(ukm::UkmRecorder::Get()); +} + bool AppPlatformMetrics::ShouldRecordUkm() { switch (syncer::GetUploadToGoogleState( SyncServiceFactory::GetForProfile(profile_), syncer::ModelType::APPS)) {
diff --git a/chrome/browser/apps/app_service/app_platform_metrics.h b/chrome/browser/apps/app_service/app_platform_metrics.h index db492fd2..dc7389f 100644 --- a/chrome/browser/apps/app_service/app_platform_metrics.h +++ b/chrome/browser/apps/app_service/app_platform_metrics.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_APPS_APP_SERVICE_APP_PLATFORM_METRICS_H_ #include <map> +#include <set> #include "base/time/time.h" #include "components/services/app_service/public/cpp/app_registry_cache.h" @@ -44,6 +45,16 @@ kMaxValue = kStandaloneBrowserExtension, }; +// This is used for logging, so do not remove or reorder existing entries. +enum class InstallTime { + kInit = 0, + kRunning = 1, + + // Add any new values above this one, and update kMaxValue to the highest + // enumerator value. + kMaxValue = kRunning, +}; + extern const char kAppRunningDuration[]; extern const char kAppActivatedCount[]; @@ -110,6 +121,12 @@ void OnTenMinutes(); void OnFiveMinutes(); + // Records UKM when launching apps. + void RecordAppLaunchUkm(apps::mojom::AppType app_type, + const std::string& app_id, + apps::mojom::LaunchSource launch_source, + apps::mojom::LaunchContainer container); + private: struct RunningStartTime { base::TimeTicks start_time; @@ -145,6 +162,10 @@ // Records the app usage time UKM in five minutes intervals. void RecordAppsUsageTimeUkm(); + // Records the installed app in Chrome OS. + void RecordAppsInstallUkm(const apps::AppUpdate& update, + InstallTime install_time); + // Returns true if we are allowed to record UKM. Otherwise, returns false. bool ShouldRecordUkm(); @@ -177,6 +198,8 @@ std::map<AppTypeName, base::TimeDelta> app_type_running_time_per_five_minutes_; std::map<std::string, base::TimeDelta> app_id_running_time_per_five_minutes_; + + std::set<apps::mojom::AppType> initialized_app_types; }; } // namespace apps
diff --git a/chrome/browser/apps/app_service/app_platform_metrics_service.cc b/chrome/browser/apps/app_service/app_platform_metrics_service.cc index 742d42aa..af9983f0 100644 --- a/chrome/browser/apps/app_service/app_platform_metrics_service.cc +++ b/chrome/browser/apps/app_service/app_platform_metrics_service.cc
@@ -51,7 +51,7 @@ void AppPlatformMetricsService::Start( apps::AppRegistryCache& app_registry_cache, InstanceRegistry& instance_registry) { - app_platform_app_metrics_ = std::make_unique<AppPlatformMetrics>( + app_platform_app_metrics_ = std::make_unique<apps::AppPlatformMetrics>( profile_, app_registry_cache, instance_registry); day_id_ = profile_->GetPrefs()->GetInteger(kAppPlatformMetricsDayId);
diff --git a/chrome/browser/apps/app_service/app_platform_metrics_service.h b/chrome/browser/apps/app_service/app_platform_metrics_service.h index c7c68716..96d1b5aa 100644 --- a/chrome/browser/apps/app_service/app_platform_metrics_service.h +++ b/chrome/browser/apps/app_service/app_platform_metrics_service.h
@@ -39,6 +39,10 @@ void Start(AppRegistryCache& app_registry_cache, InstanceRegistry& instance_registry); + apps::AppPlatformMetrics* AppPlatformMetrics() { + return app_platform_app_metrics_.get(); + } + private: // Helper function to check if a new day has arrived. void CheckForNewDay(); @@ -56,7 +60,7 @@ // A periodic timer that checks if five minutes have arrived. base::RepeatingTimer five_minutes_timer_; - std::unique_ptr<AppPlatformMetrics> app_platform_app_metrics_; + std::unique_ptr<apps::AppPlatformMetrics> app_platform_app_metrics_; }; } // namespace apps
diff --git a/chrome/browser/apps/app_service/app_platform_metrics_service_unittest.cc b/chrome/browser/apps/app_service/app_platform_metrics_service_unittest.cc index d78e05c..e67bb2b 100644 --- a/chrome/browser/apps/app_service/app_platform_metrics_service_unittest.cc +++ b/chrome/browser/apps/app_service/app_platform_metrics_service_unittest.cc
@@ -36,6 +36,7 @@ #include "components/user_manager/scoped_user_manager.h" #include "content/public/test/browser_task_environment.h" #include "extensions/common/constants.h" +#include "services/metrics/public/cpp/ukm_source.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/aura/test/test_window_delegate.h" @@ -69,10 +70,14 @@ apps::mojom::AppPtr MakeApp(const char* app_id, apps::mojom::AppType app_type, + const std::string& publisher_id, + apps::mojom::Readiness readiness, apps::mojom::InstallSource install_source) { apps::mojom::AppPtr app = apps::mojom::App::New(); app->app_id = app_id; app->app_type = app_type; + app->publisher_id = publisher_id; + app->readiness = readiness; app->install_source = install_source; return app; } @@ -153,46 +158,77 @@ apps::AppServiceProxyFactory::GetForProfile(testing_profile_.get()); std::vector<apps::mojom::AppPtr> deltas; apps::AppRegistryCache& cache = proxy->AppRegistryCache(); - deltas.push_back(MakeApp(/*app_id=*/"u", apps::mojom::AppType::kUnknown, - apps::mojom::InstallSource::kUnknown)); + deltas.push_back(MakeApp(/*app_id=*/"a", apps::mojom::AppType::kArc, + "com.google.A", apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kUser)); + cache.OnApps(std::move(deltas), apps::mojom::AppType::kArc, + true /* should_notify_initialized */); + deltas.clear(); + deltas.push_back(MakeApp(/*app_id=*/"bu", apps::mojom::AppType::kBuiltIn, + "", apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kSystem)); + cache.OnApps(std::move(deltas), apps::mojom::AppType::kBuiltIn, + true /* should_notify_initialized */); + deltas.clear(); + deltas.push_back(MakeApp(/*app_id=*/"c", apps::mojom::AppType::kCrostini, + "", apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kUser)); + cache.OnApps(std::move(deltas), apps::mojom::AppType::kCrostini, + true /* should_notify_initialized */); + deltas.clear(); + deltas.push_back(MakeApp(/*app_id=*/"w", apps::mojom::AppType::kWeb, + "https://foo.com", apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kSync)); + cache.OnApps(std::move(deltas), apps::mojom::AppType::kWeb, + true /* should_notify_initialized */); + deltas.clear(); + deltas.push_back(MakeApp( - /*app_id=*/"m", apps::mojom::AppType::kMacOs, - apps::mojom::InstallSource::kUnknown)); + /*app_id=*/"s", apps::mojom::AppType::kSystemWeb, "https://os-settings", + apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kDefault)); + cache.OnApps(std::move(deltas), apps::mojom::AppType::kWeb, + true /* should_notify_initialized */); + deltas.clear(); + + deltas.push_back(MakeApp(/*app_id=*/"u", apps::mojom::AppType::kUnknown, "", + apps::mojom::Readiness::kReady, + apps::mojom::InstallSource::kUnknown)); deltas.push_back(MakeApp( - /*app_id=*/"p", apps::mojom::AppType::kPluginVm, - apps::mojom::InstallSource::kUser)); + /*app_id=*/"m", apps::mojom::AppType::kMacOs, "", + apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kUnknown)); deltas.push_back(MakeApp( - /*app_id=*/"l", apps::mojom::AppType::kStandaloneBrowser, - apps::mojom::InstallSource::kSystem)); + /*app_id=*/"p", apps::mojom::AppType::kPluginVm, "", + apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kUser)); deltas.push_back(MakeApp( - /*app_id=*/"lcr", apps::mojom::AppType::kStandaloneBrowserExtension, - apps::mojom::InstallSource::kUser)); + /*app_id=*/"l", apps::mojom::AppType::kStandaloneBrowser, "", + apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kSystem)); deltas.push_back(MakeApp( - /*app_id=*/"r", apps::mojom::AppType::kRemote, - apps::mojom::InstallSource::kPolicy)); + /*app_id=*/"lcr", apps::mojom::AppType::kStandaloneBrowserExtension, "", + apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kUser)); + deltas.push_back(MakeApp( + /*app_id=*/"r", apps::mojom::AppType::kRemote, "", + apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kPolicy)); deltas.push_back(MakeApp(/*app_id=*/"bo", apps::mojom::AppType::kBorealis, + "", apps::mojom::Readiness::kReady, apps::mojom::InstallSource::kOem)); - deltas.push_back(MakeApp(/*app_id=*/"s", apps::mojom::AppType::kSystemWeb, - apps::mojom::InstallSource::kDefault)); cache.OnApps(std::move(deltas), apps::mojom::AppType::kUnknown, false /* should_notify_initialized */); } - void InstallOneApp(const std::string& app_id, apps::mojom::AppType app_type) { + void InstallOneApp(const std::string& app_id, + apps::mojom::AppType app_type, + const std::string& publisher_id, + apps::mojom::Readiness readiness) { auto* proxy = apps::AppServiceProxyFactory::GetForProfile(testing_profile_.get()); std::vector<apps::mojom::AppPtr> deltas; apps::AppRegistryCache& cache = proxy->AppRegistryCache(); - deltas.push_back( - MakeApp(app_id.c_str(), app_type, apps::mojom::InstallSource::kUser)); + deltas.push_back(MakeApp(app_id.c_str(), app_type, publisher_id, readiness, + apps::mojom::InstallSource::kUser)); cache.OnApps(std::move(deltas), apps::mojom::AppType::kUnknown, false /* should_notify_initialized */); } @@ -268,6 +304,15 @@ /*expected_count=*/1); histogram_tester_.ExpectTotalCount( AppPlatformMetrics::GetAppsCountHistogramNameForTest( + AppTypeName::kStandaloneBrowserExtension), + /*expected_count=*/1); + histogram_tester_.ExpectTotalCount( + AppPlatformMetrics::GetAppsCountPerInstallSourceHistogramNameForTest( + AppTypeName::kStandaloneBrowserExtension, + apps::mojom::InstallSource::kUser), + /*expected_count=*/1); + histogram_tester_.ExpectTotalCount( + AppPlatformMetrics::GetAppsCountHistogramNameForTest( AppTypeName::kRemote), /*expected_count=*/1); histogram_tester_.ExpectTotalCount( @@ -437,13 +482,65 @@ const std::string kUrl = std::string("app://") + app_id; const auto entries = test_ukm_recorder()->GetEntriesByName("ChromeOSApp.UsageTime"); - ASSERT_EQ(1ul, entries.size()); - const auto* entry = entries.back(); - test_ukm_recorder()->ExpectEntrySourceHasUrl(entry, GURL(kUrl)); - test_ukm_recorder()->ExpectEntryMetric(entry, "UserDeviceMatrix", 0); - test_ukm_recorder()->ExpectEntryMetric(entry, "Duration", duration); - test_ukm_recorder()->ExpectEntryMetric(entry, "AppType", - (int)app_type_name); + int count = 0; + for (const auto* entry : entries) { + const ukm::UkmSource* src = + test_ukm_recorder()->GetSourceForSourceId(entry->source_id); + if (src == nullptr || src->url() != GURL(kUrl)) { + continue; + } + ++count; + test_ukm_recorder()->ExpectEntryMetric(entry, "UserDeviceMatrix", 0); + test_ukm_recorder()->ExpectEntryMetric(entry, "Duration", duration); + test_ukm_recorder()->ExpectEntryMetric(entry, "AppType", + (int)app_type_name); + } + ASSERT_EQ(1, count); + } + + void VerifyInstalledAppsUkm(const std::string& app_info, + AppTypeName app_type_name, + apps::mojom::InstallSource install_source, + InstallTime install_time) { + const auto entries = + test_ukm_recorder()->GetEntriesByName("ChromeOSApp.InstalledApp"); + int count = 0; + for (const auto* entry : entries) { + const ukm::UkmSource* src = + test_ukm_recorder()->GetSourceForSourceId(entry->source_id); + if (src == nullptr || src->url() != GURL(app_info)) { + continue; + } + ++count; + test_ukm_recorder()->ExpectEntryMetric(entry, "AppType", + (int)app_type_name); + test_ukm_recorder()->ExpectEntryMetric(entry, "InstallSource", + (int)install_source); + test_ukm_recorder()->ExpectEntryMetric(entry, "InstallTime", + (int)install_time); + } + ASSERT_EQ(1, count); + } + + void VerifyAppsLaunchUkm(const std::string& app_info, + AppTypeName app_type_name, + apps::mojom::LaunchSource launch_source) { + const auto entries = + test_ukm_recorder()->GetEntriesByName("ChromeOSApp.Launch"); + int count = 0; + for (const auto* entry : entries) { + const ukm::UkmSource* src = + test_ukm_recorder()->GetSourceForSourceId(entry->source_id); + if (src == nullptr || src->url() != GURL(app_info)) { + continue; + } + ++count; + test_ukm_recorder()->ExpectEntryMetric(entry, "AppType", + (int)app_type_name); + test_ukm_recorder()->ExpectEntryMetric(entry, "LaunchSource", + (int)launch_source); + } + ASSERT_EQ(1, count); } ukm::TestAutoSetUkmRecorder* test_ukm_recorder() { @@ -459,6 +556,12 @@ return GetPrefService()->GetInteger(kAppPlatformMetricsDayId); } + std::unique_ptr<AppPlatformMetricsService> GetAppPlatformMetricsService() { + return std::move(app_platform_metrics_service_); + } + + TestingProfile* profile() { return testing_profile_.get(); } + syncer::TestSyncService* sync_service() { return sync_service_; } base::HistogramTester& histogram_tester() { return histogram_tester_; } @@ -523,7 +626,8 @@ task_environment_.FastForwardBy(base::TimeDelta::FromHours(3)); VerifyMetrics(); - InstallOneApp("aa", apps::mojom::AppType::kArc); + InstallOneApp("aa", apps::mojom::AppType::kArc, "com.google.AA", + apps::mojom::Readiness::kReady); task_environment_.FastForwardBy(base::TimeDelta::FromDays(1)); histogram_tester().ExpectTotalCount( AppPlatformMetrics::GetAppsCountHistogramNameForTest(AppTypeName::kArc), @@ -531,7 +635,8 @@ } TEST_F(AppPlatformMetricsServiceTest, BrowserWindow) { - InstallOneApp(extension_misc::kChromeAppId, apps::mojom::AppType::kExtension); + InstallOneApp(extension_misc::kChromeAppId, apps::mojom::AppType::kExtension, + "Chrome", apps::mojom::Readiness::kReady); BrowserList* active_browser_list = BrowserList::GetInstance(); // Expect BrowserList is empty at the beginning. @@ -594,7 +699,8 @@ // Tests the UMA metrics when launching an app in one day . TEST_F(AppPlatformMetricsServiceTest, OpenWindowInOneDay) { std::string app_id = "aa"; - InstallOneApp(app_id, apps::mojom::AppType::kArc); + InstallOneApp(app_id, apps::mojom::AppType::kArc, "com.google.AA", + apps::mojom::Readiness::kReady); // Create a window to simulate launching the app. auto window = std::make_unique<aura::Window>(nullptr); @@ -640,7 +746,8 @@ // Tests the UMA metrics when launching an app multiple days. TEST_F(AppPlatformMetricsServiceTest, OpenWindowInMultipleDays) { std::string app_id = "aa"; - InstallOneApp(app_id, apps::mojom::AppType::kArc); + InstallOneApp(app_id, apps::mojom::AppType::kArc, "com.google.AA", + apps::mojom::Readiness::kReady); // Create a window to simulate launching the app. auto window = std::make_unique<aura::Window>(nullptr); @@ -686,7 +793,8 @@ // Tests the UMA metrics when an app window is reactivated. TEST_F(AppPlatformMetricsServiceTest, ReactiveWindow) { std::string app_id = "aa"; - InstallOneApp(app_id, apps::mojom::AppType::kArc); + InstallOneApp(app_id, apps::mojom::AppType::kArc, "com.google.AA", + apps::mojom::Readiness::kReady); // Create a window to simulate launching the app. auto window = std::make_unique<aura::Window>(nullptr); @@ -784,7 +892,8 @@ // and an ARC app in one day. TEST_F(AppPlatformMetricsServiceTest, AppRunningPercentrage) { // Launch a browser window. - InstallOneApp(extension_misc::kChromeAppId, apps::mojom::AppType::kExtension); + InstallOneApp(extension_misc::kChromeAppId, apps::mojom::AppType::kExtension, + "Chrome", apps::mojom::Readiness::kReady); std::unique_ptr<Browser> browser = CreateBrowserWithAuraWindow1(); EXPECT_EQ(1U, BrowserList::GetInstance()->size()); @@ -799,7 +908,8 @@ // Launch an ARC app. std::string app_id = "aa"; - InstallOneApp(app_id, apps::mojom::AppType::kArc); + InstallOneApp(app_id, apps::mojom::AppType::kArc, "com.google.AA", + apps::mojom::Readiness::kReady); // Create a window to simulate launching the app. auto window = std::make_unique<aura::Window>(nullptr); @@ -826,7 +936,8 @@ TEST_F(AppPlatformMetricsServiceTest, UsageTime) { // Create an ARC app window. std::string app_id = "aa"; - InstallOneApp(app_id, apps::mojom::AppType::kArc); + InstallOneApp(app_id, apps::mojom::AppType::kArc, "com.google.AA", + apps::mojom::Readiness::kReady); auto window = std::make_unique<aura::Window>(nullptr); window->Init(ui::LAYER_NOT_DRAWN); ModifyInstance(app_id, window.get(), apps::InstanceState::kActive); @@ -840,7 +951,8 @@ ModifyInstance(app_id, window.get(), kInactiveInstanceState); // Create a browser window - InstallOneApp(extension_misc::kChromeAppId, apps::mojom::AppType::kExtension); + InstallOneApp(extension_misc::kChromeAppId, apps::mojom::AppType::kExtension, + "Chrome", apps::mojom::Readiness::kReady); std::unique_ptr<Browser> browser = CreateBrowserWithAuraWindow1(); EXPECT_EQ(1U, BrowserList::GetInstance()->size()); @@ -871,7 +983,8 @@ TEST_F(AppPlatformMetricsServiceTest, UsageTimeUkm) { // Create a browser window. - InstallOneApp(extension_misc::kChromeAppId, apps::mojom::AppType::kExtension); + InstallOneApp(extension_misc::kChromeAppId, apps::mojom::AppType::kExtension, + "Chrome", apps::mojom::Readiness::kReady); std::unique_ptr<Browser> browser = CreateBrowserWithAuraWindow1(); EXPECT_EQ(1U, BrowserList::GetInstance()->size()); @@ -886,7 +999,6 @@ task_environment_.FastForwardBy(base::TimeDelta::FromMinutes(5)); // Verify UKM is not reported. - const std::string kUrl = std::string("app://") + extension_misc::kChromeAppId; const auto entries = test_ukm_recorder()->GetEntriesByName("ChromeOSApp.UsageTime"); ASSERT_EQ(0U, entries.size()); @@ -898,4 +1010,59 @@ AppTypeName::kChromeBrowser); } +TEST_F(AppPlatformMetricsServiceTest, InstalledAppsUkm) { + // Verify the apps installed during the init phase. + VerifyInstalledAppsUkm("app://com.google.A", AppTypeName::kArc, + apps::mojom::InstallSource::kUser, InstallTime::kInit); + VerifyInstalledAppsUkm("app://bu", AppTypeName::kBuiltIn, + apps::mojom::InstallSource::kSystem, + InstallTime::kInit); + VerifyInstalledAppsUkm("https://os-settings", AppTypeName::kSystemWeb, + apps::mojom::InstallSource::kDefault, + InstallTime::kInit); + VerifyInstalledAppsUkm("https://foo.com", AppTypeName::kChromeBrowser, + apps::mojom::InstallSource::kSync, InstallTime::kInit); + + // Install a new ARC app during the running time. + InstallOneApp("aa", apps::mojom::AppType::kArc, "com.google.AA", + apps::mojom::Readiness::kReady); + + // Verify the ARC app installed during the running time. + VerifyInstalledAppsUkm("app://com.google.AA", AppTypeName::kArc, + apps::mojom::InstallSource::kUser, + InstallTime::kRunning); +} + +TEST_F(AppPlatformMetricsServiceTest, LaunchAppsUkm) { + auto* proxy = apps::AppServiceProxyFactory::GetForProfile(profile()); + proxy->SetAppPlatformMetricsServiceForTesting(GetAppPlatformMetricsService()); + + proxy->Launch( + /*app_id=*/"c", ui::EventFlags::EF_NONE, + apps::mojom::LaunchSource::kFromChromeInternal, nullptr); + // Verify UKM is not reported for the Crostini app. + const auto entries = + test_ukm_recorder()->GetEntriesByName("ChromeOSApp.Launch"); + ASSERT_EQ(0U, entries.size()); + + proxy->Launch( + /*app_id=*/"a", ui::EventFlags::EF_NONE, + apps::mojom::LaunchSource::kFromChromeInternal, nullptr); + VerifyAppsLaunchUkm("app://com.google.A", AppTypeName::kArc, + apps::mojom::LaunchSource::kFromChromeInternal); + + proxy->LaunchAppWithUrl( + /*app_id=*/"w", ui::EventFlags::EF_NONE, GURL("https://boo.com/a"), + apps::mojom::LaunchSource::kFromFileManager, nullptr); + VerifyAppsLaunchUkm("https://foo.com", AppTypeName::kChromeBrowser, + apps::mojom::LaunchSource::kFromFileManager); + + proxy->BrowserAppLauncher()->LaunchAppWithParams(apps::AppLaunchParams( + "s", apps::mojom::LaunchContainer::kLaunchContainerTab, + WindowOpenDisposition::NEW_FOREGROUND_TAB, + apps::mojom::AppLaunchSource::kSourceTest)); + VerifyAppsLaunchUkm("https://os-settings", AppTypeName::kChromeBrowser, + apps::mojom::LaunchSource::kFromTest); +} + } // namespace apps
diff --git a/chrome/browser/apps/app_service/app_service_proxy_chromeos.cc b/chrome/browser/apps/app_service/app_service_proxy_chromeos.cc index 1572e680..7bcc5ca 100644 --- a/chrome/browser/apps/app_service/app_service_proxy_chromeos.cc +++ b/chrome/browser/apps/app_service/app_service_proxy_chromeos.cc
@@ -146,6 +146,12 @@ return instance_registry_; } +apps::AppPlatformMetrics* AppServiceProxyChromeOs::AppPlatformMetrics() { + return app_platform_metrics_service_ + ? app_platform_metrics_service_->AppPlatformMetrics() + : nullptr; +} + void AppServiceProxyChromeOs::Uninstall( const std::string& app_id, apps::mojom::UninstallSource uninstall_source, @@ -264,6 +270,12 @@ std::move(callback)); } +void AppServiceProxyChromeOs::SetAppPlatformMetricsServiceForTesting( + std::unique_ptr<apps::AppPlatformMetricsService> + app_platform_metrics_service) { + app_platform_metrics_service_ = std::move(app_platform_metrics_service); +} + void AppServiceProxyChromeOs::Shutdown() { app_platform_metrics_service_.reset();
diff --git a/chrome/browser/apps/app_service/app_service_proxy_chromeos.h b/chrome/browser/apps/app_service/app_service_proxy_chromeos.h index 0252d4d..2715e19 100644 --- a/chrome/browser/apps/app_service/app_service_proxy_chromeos.h +++ b/chrome/browser/apps/app_service/app_service_proxy_chromeos.h
@@ -32,6 +32,7 @@ namespace apps { +class AppPlatformMetrics; class AppPlatformMetricsService; class BorealisApps; class BuiltInChromeOsApps; @@ -61,6 +62,7 @@ ~AppServiceProxyChromeOs() override; apps::InstanceRegistry& InstanceRegistry(); + apps::AppPlatformMetrics* AppPlatformMetrics(); // apps::AppServiceProxyBase overrides: void Uninstall(const std::string& app_id, @@ -94,6 +96,9 @@ void UninstallForTesting(const std::string& app_id, gfx::NativeWindow parent_window, base::OnceClosure callback); + void SetAppPlatformMetricsServiceForTesting( + std::unique_ptr<apps::AppPlatformMetricsService> + app_platform_metrics_service); private: using UninstallDialogs = std::set<std::unique_ptr<apps::UninstallDialog>, @@ -189,7 +194,8 @@ UninstallDialogs uninstall_dialogs_; - std::unique_ptr<AppPlatformMetricsService> app_platform_metrics_service_; + std::unique_ptr<apps::AppPlatformMetricsService> + app_platform_metrics_service_; base::WeakPtrFactory<AppServiceProxyChromeOs> weak_ptr_factory_{this}; };
diff --git a/chrome/browser/ash/arc/fileapi/arc_content_file_system_size_util.cc b/chrome/browser/ash/arc/fileapi/arc_content_file_system_size_util.cc index e4758f67..cffa3303 100644 --- a/chrome/browser/ash/arc/fileapi/arc_content_file_system_size_util.cc +++ b/chrome/browser/ash/arc/fileapi/arc_content_file_system_size_util.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ash/arc/fileapi/arc_content_file_system_size_util.h" +#include <sys/stat.h> + #include "base/task/thread_pool.h" #include "chrome/browser/ash/arc/fileapi/arc_file_system_operation_runner_util.h" #include "content/public/browser/browser_task_traits.h"
diff --git a/chrome/browser/ash/child_accounts/child_status_reporting_service.cc b/chrome/browser/ash/child_accounts/child_status_reporting_service.cc index 217a2c1..c130fb02 100644 --- a/chrome/browser/ash/child_accounts/child_status_reporting_service.cc +++ b/chrome/browser/ash/child_accounts/child_status_reporting_service.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/ash/child_accounts/usage_time_limit_processor.h" #include "chrome/browser/ash/policy/core/user_cloud_policy_manager_chromeos.h" #include "chrome/browser/ash/policy/status_collector/child_status_collector.h" -#include "chrome/browser/chromeos/policy/uploading/status_uploader.h" +#include "chrome/browser/ash/policy/uploading/status_uploader.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" #include "chromeos/system/statistics_provider.h"
diff --git a/chrome/browser/ash/first_run/drive_first_run_browsertest.cc b/chrome/browser/ash/first_run/drive_first_run_browsertest.cc index e2e32bc..2f648ba 100644 --- a/chrome/browser/ash/first_run/drive_first_run_browsertest.cc +++ b/chrome/browser/ash/first_run/drive_first_run_browsertest.cc
@@ -22,7 +22,7 @@ #include "net/test/embedded_test_server/http_request.h" #include "net/test/embedded_test_server/http_response.h" -namespace chromeos { +namespace ash { namespace { @@ -180,4 +180,4 @@ EXPECT_TRUE(timed_out()); } -} // namespace chromeos +} // namespace ash
diff --git a/chrome/browser/ash/first_run/drive_first_run_controller.cc b/chrome/browser/ash/first_run/drive_first_run_controller.cc index e4089718..1eb8a953 100644 --- a/chrome/browser/ash/first_run/drive_first_run_controller.cc +++ b/chrome/browser/ash/first_run/drive_first_run_controller.cc
@@ -48,7 +48,7 @@ #include "ui/message_center/public/cpp/notification_delegate.h" #include "url/gurl.h" -namespace chromeos { +namespace ash { namespace { @@ -450,4 +450,4 @@ NotificationHandler::Type::TRANSIENT, notification, /*metadata=*/nullptr); } -} // namespace chromeos +} // namespace ash
diff --git a/chrome/browser/ash/first_run/drive_first_run_controller.h b/chrome/browser/ash/first_run/drive_first_run_controller.h index d05293c..cbfe683 100644 --- a/chrome/browser/ash/first_run/drive_first_run_controller.h +++ b/chrome/browser/ash/first_run/drive_first_run_controller.h
@@ -10,7 +10,7 @@ #include "base/timer/timer.h" #include "chrome/browser/profiles/profile.h" -namespace chromeos { +namespace ash { class DriveWebContentsManager; @@ -92,6 +92,11 @@ DISALLOW_COPY_AND_ASSIGN(DriveFirstRunController); }; +} // namespace ash + +// TODO(https://crbug.com/1164001): remove when ChromeOS code migration is done. +namespace chromeos { +using ::ash::DriveFirstRunController; } // namespace chromeos // TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
diff --git a/chrome/browser/ash/first_run/first_run.cc b/chrome/browser/ash/first_run/first_run.cc index 0deb0b8..71607755 100644 --- a/chrome/browser/ash/first_run/first_run.cc +++ b/chrome/browser/ash/first_run/first_run.cc
@@ -40,7 +40,7 @@ #include "ui/events/event_constants.h" #include "ui/gfx/geometry/rect.h" -namespace chromeos { +namespace ash { namespace first_run { namespace { @@ -139,7 +139,7 @@ if (!IsRegularUserOrSupervisedChild(user_manager)) return false; - if (chromeos::switches::ShouldSkipOobePostLogin()) + if (switches::ShouldSkipOobePostLogin()) return false; if (command_line->HasSwitch(switches::kForceFirstRunUI)) { @@ -177,4 +177,4 @@ } } // namespace first_run -} // namespace chromeos +} // namespace ash
diff --git a/chrome/browser/ash/first_run/first_run.h b/chrome/browser/ash/first_run/first_run.h index b2a46657..28486a7 100644 --- a/chrome/browser/ash/first_run/first_run.h +++ b/chrome/browser/ash/first_run/first_run.h
@@ -9,9 +9,9 @@ namespace user_prefs { class PrefRegistrySyncable; -} +} // namespace user_prefs -namespace chromeos { +namespace ash { namespace first_run { // Registers preferences related to ChromeOS first-run tutorial. @@ -26,15 +26,6 @@ void LaunchHelpApp(Profile* profile); } // namespace first_run -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -namespace first_run { -using ::chromeos::first_run::LaunchHelpApp; -using ::chromeos::first_run::ShouldLaunchHelpApp; -} // namespace first_run } // namespace ash #endif // CHROME_BROWSER_ASH_FIRST_RUN_FIRST_RUN_H_
diff --git a/chrome/browser/ash/login/enrollment/enrollment_local_policy_server_browsertest.cc b/chrome/browser/ash/login/enrollment/enrollment_local_policy_server_browsertest.cc index 21b26cb..83b88e8 100644 --- a/chrome/browser/ash/login/enrollment/enrollment_local_policy_server_browsertest.cc +++ b/chrome/browser/ash/login/enrollment/enrollment_local_policy_server_browsertest.cc
@@ -852,9 +852,17 @@ EXPECT_TRUE(InstallAttributes::Get()->IsEnterpriseManaged()); } +// This test is flaky on ChromeOS. https://crbug.com/1231472 +#if defined(OS_CHROMEOS) +#define MAYBE_ZeroTouchForcedAttestationFail \ + DISABLED_ZeroTouchForcedAttestationFail +#else +#define MAYBE_ZeroTouchForcedAttestationFail ZeroTouchForcedAttestationFail +#endif // Zero touch with attestation authentication fail. Attestation fails because we // send empty cert request. Should switch to interactive authentication. -IN_PROC_BROWSER_TEST_F(InitialEnrollmentTest, ZeroTouchForcedAttestationFail) { +IN_PROC_BROWSER_TEST_F(InitialEnrollmentTest, + MAYBE_ZeroTouchForcedAttestationFail) { auto initial_enrollment = enterprise_management::DeviceInitialEnrollmentStateResponse:: INITIAL_ENROLLMENT_MODE_ZERO_TOUCH_ENFORCED;
diff --git a/chrome/browser/ash/policy/DEPS b/chrome/browser/ash/policy/DEPS index dfab6f6..9e8fc49 100644 --- a/chrome/browser/ash/policy/DEPS +++ b/chrome/browser/ash/policy/DEPS
@@ -1,6 +1,3 @@ -# TODO(https://crbug.com/1164001): When this file is edited, same file in -# //chrome/browser/chromeos/policy should be updated as well. We need to sync -# both files until the migration of //chrome/browser/chromeos/policy is done. include_rules = [ # Run #
diff --git a/chrome/browser/ash/policy/DIR_METADATA b/chrome/browser/ash/policy/DIR_METADATA index 11999464..543dab0e 100644 --- a/chrome/browser/ash/policy/DIR_METADATA +++ b/chrome/browser/ash/policy/DIR_METADATA
@@ -1,6 +1,3 @@ -# TODO(https://crbug.com/1164001): When this file is edited, same file in -# //chrome/browser/chromeos/policy should be updated as well. We need to sync -# both files until the migration of //chrome/browser/chromeos/policy is done. monorail: { component: "OS>Software>Enterprise" }
diff --git a/chrome/browser/ash/policy/core/device_cloud_policy_manager_chromeos.cc b/chrome/browser/ash/policy/core/device_cloud_policy_manager_chromeos.cc index 1da2c04..baa0114 100644 --- a/chrome/browser/ash/policy/core/device_cloud_policy_manager_chromeos.cc +++ b/chrome/browser/ash/policy/core/device_cloud_policy_manager_chromeos.cc
@@ -33,10 +33,10 @@ #include "chrome/browser/ash/policy/rsu/lookup_key_uploader.h" #include "chrome/browser/ash/policy/server_backed_state/server_backed_state_keys_broker.h" #include "chrome/browser/ash/policy/status_collector/device_status_collector.h" +#include "chrome/browser/ash/policy/uploading/heartbeat_scheduler.h" +#include "chrome/browser/ash/policy/uploading/status_uploader.h" +#include "chrome/browser/ash/policy/uploading/system_log_uploader.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/chromeos/policy/uploading/heartbeat_scheduler.h" -#include "chrome/browser/chromeos/policy/uploading/status_uploader.h" -#include "chrome/browser/chromeos/policy/uploading/system_log_uploader.h" #include "chrome/common/pref_names.h" #include "chromeos/system/statistics_provider.h" #include "chromeos/tpm/install_attributes.h"
diff --git a/chrome/browser/ash/policy/core/device_cloud_policy_store_ash.cc b/chrome/browser/ash/policy/core/device_cloud_policy_store_ash.cc index 4693c9d..08eb20c6 100644 --- a/chrome/browser/ash/policy/core/device_cloud_policy_store_ash.cc +++ b/chrome/browser/ash/policy/core/device_cloud_policy_store_ash.cc
@@ -14,7 +14,7 @@ #include "base/sequenced_task_runner.h" #include "chrome/browser/ash/login/startup_utils.h" #include "chrome/browser/ash/policy/core/device_policy_decoder_chromeos.h" -#include "chrome/browser/chromeos/policy/value_validation/onc_device_policy_value_validator.h" +#include "chrome/browser/ash/policy/value_validation/onc_device_policy_value_validator.h" #include "chromeos/tpm/install_attributes.h" #include "components/ownership/owner_key_util.h" #include "components/policy/core/common/cloud/cloud_external_data_manager.h"
diff --git a/chrome/browser/ash/policy/core/device_local_account_policy_store.cc b/chrome/browser/ash/policy/core/device_local_account_policy_store.cc index 3e6764b..8dae914 100644 --- a/chrome/browser/ash/policy/core/device_local_account_policy_store.cc +++ b/chrome/browser/ash/policy/core/device_local_account_policy_store.cc
@@ -10,7 +10,7 @@ #include "base/callback.h" #include "base/sequence_checker.h" #include "base/sequenced_task_runner.h" -#include "chrome/browser/chromeos/policy/value_validation/onc_user_policy_value_validator.h" +#include "chrome/browser/ash/policy/value_validation/onc_user_policy_value_validator.h" #include "components/ownership/owner_key_util.h" #include "components/policy/core/common/cloud/device_management_service.h" #include "components/policy/core/common/external_data_fetcher.h"
diff --git a/chrome/browser/ash/policy/core/user_cloud_policy_store_chromeos.cc b/chrome/browser/ash/policy/core/user_cloud_policy_store_chromeos.cc index ae418cb0..5dcbf1ac 100644 --- a/chrome/browser/ash/policy/core/user_cloud_policy_store_chromeos.cc +++ b/chrome/browser/ash/policy/core/user_cloud_policy_store_chromeos.cc
@@ -14,7 +14,7 @@ #include "base/sequenced_task_runner.h" #include "chrome/browser/ash/crosapi/browser_manager.h" #include "chrome/browser/ash/policy/core/cached_policy_key_loader.h" -#include "chrome/browser/chromeos/policy/value_validation/onc_user_policy_value_validator.h" +#include "chrome/browser/ash/policy/value_validation/onc_user_policy_value_validator.h" #include "chrome/browser/lifetime/application_lifetime.h" #include "chromeos/cryptohome/cryptohome_parameters.h" #include "components/policy/proto/device_management_backend.pb.h"
diff --git a/chrome/browser/ash/policy/remote_commands/device_command_fetch_status_job.cc b/chrome/browser/ash/policy/remote_commands/device_command_fetch_status_job.cc index 4062f846..8dcc8f2 100644 --- a/chrome/browser/ash/policy/remote_commands/device_command_fetch_status_job.cc +++ b/chrome/browser/ash/policy/remote_commands/device_command_fetch_status_job.cc
@@ -12,10 +12,10 @@ #include "base/threading/thread_task_runner_handle.h" #include "chrome/browser/ash/policy/core/browser_policy_connector_chromeos.h" #include "chrome/browser/ash/policy/core/device_cloud_policy_manager_chromeos.h" +#include "chrome/browser/ash/policy/uploading/status_uploader.h" +#include "chrome/browser/ash/policy/uploading/system_log_uploader.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process_platform_part.h" -#include "chrome/browser/chromeos/policy/uploading/status_uploader.h" -#include "chrome/browser/chromeos/policy/uploading/system_log_uploader.h" #include "components/policy/proto/device_management_backend.pb.h" namespace policy {
diff --git a/chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.cc b/chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.cc index 516f6ff5..643c26d 100644 --- a/chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.cc +++ b/chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.cc
@@ -17,7 +17,7 @@ #include "base/syslog_logging.h" #include "base/threading/thread_task_runner_handle.h" #include "base/values.h" -#include "chrome/browser/chromeos/policy/uploading/upload_job_impl.h" +#include "chrome/browser/ash/policy/uploading/upload_job_impl.h" #include "components/policy/proto/device_management_backend.pb.h" #include "content/public/browser/browser_thread.h" #include "net/http/http_request_headers.h"
diff --git a/chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.h b/chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.h index d65ea34..60f3f3e6 100644 --- a/chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.h +++ b/chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.h
@@ -17,7 +17,7 @@ #include "base/memory/ref_counted_memory.h" #include "base/memory/weak_ptr.h" #include "base/task_runner.h" -#include "chrome/browser/chromeos/policy/uploading/upload_job.h" +#include "chrome/browser/ash/policy/uploading/upload_job.h" #include "components/policy/core/common/remote_commands/remote_command_job.h" #include "ui/snapshot/snapshot.h" #include "url/gurl.h"
diff --git a/chrome/browser/ash/policy/remote_commands/screenshot_delegate.cc b/chrome/browser/ash/policy/remote_commands/screenshot_delegate.cc index 38b09008..570f53d 100644 --- a/chrome/browser/ash/policy/remote_commands/screenshot_delegate.cc +++ b/chrome/browser/ash/policy/remote_commands/screenshot_delegate.cc
@@ -12,10 +12,10 @@ #include "base/threading/thread_task_runner_handle.h" #include "chrome/browser/ash/policy/core/browser_policy_connector_chromeos.h" #include "chrome/browser/ash/policy/core/device_cloud_policy_manager_chromeos.h" +#include "chrome/browser/ash/policy/uploading/status_uploader.h" +#include "chrome/browser/ash/policy/uploading/upload_job_impl.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process_platform_part.h" -#include "chrome/browser/chromeos/policy/uploading/status_uploader.h" -#include "chrome/browser/chromeos/policy/uploading/upload_job_impl.h" #include "chrome/browser/device_identity/device_oauth2_token_service.h" #include "chrome/browser/device_identity/device_oauth2_token_service_factory.h" #include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/ash/policy/remote_commands/screenshot_delegate.h b/chrome/browser/ash/policy/remote_commands/screenshot_delegate.h index 433c357..d233ab2 100644 --- a/chrome/browser/ash/policy/remote_commands/screenshot_delegate.h +++ b/chrome/browser/ash/policy/remote_commands/screenshot_delegate.h
@@ -11,7 +11,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "chrome/browser/ash/policy/remote_commands/device_command_screenshot_job.h" -#include "chrome/browser/chromeos/policy/uploading/upload_job.h" +#include "chrome/browser/ash/policy/uploading/upload_job.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/native_widget_types.h" #include "ui/snapshot/snapshot.h"
diff --git a/chrome/browser/chromeos/policy/tools/generate_device_policy_remover.py b/chrome/browser/ash/policy/tools/generate_device_policy_remover.py similarity index 100% rename from chrome/browser/chromeos/policy/tools/generate_device_policy_remover.py rename to chrome/browser/ash/policy/tools/generate_device_policy_remover.py
diff --git a/chrome/browser/chromeos/policy/uploading/README.md b/chrome/browser/ash/policy/uploading/README.md similarity index 86% rename from chrome/browser/chromeos/policy/uploading/README.md rename to chrome/browser/ash/policy/uploading/README.md index 6fcf7032..a7e600a 100644 --- a/chrome/browser/chromeos/policy/uploading/README.md +++ b/chrome/browser/ash/policy/uploading/README.md
@@ -1,4 +1,4 @@ -chrome/browser/chromeos/policy/uploading +chrome/browser/ash/policy/uploading ======================================== This directory should contain code that handles periodically scheduled
diff --git a/chrome/browser/chromeos/policy/uploading/heartbeat_scheduler.cc b/chrome/browser/ash/policy/uploading/heartbeat_scheduler.cc similarity index 99% rename from chrome/browser/chromeos/policy/uploading/heartbeat_scheduler.cc rename to chrome/browser/ash/policy/uploading/heartbeat_scheduler.cc index f4a4409..f17b19a1 100644 --- a/chrome/browser/chromeos/policy/uploading/heartbeat_scheduler.cc +++ b/chrome/browser/ash/policy/uploading/heartbeat_scheduler.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/chromeos/policy/uploading/heartbeat_scheduler.h" +#include "chrome/browser/ash/policy/uploading/heartbeat_scheduler.h" #include <memory> #include <vector>
diff --git a/chrome/browser/chromeos/policy/uploading/heartbeat_scheduler.h b/chrome/browser/ash/policy/uploading/heartbeat_scheduler.h similarity index 96% rename from chrome/browser/chromeos/policy/uploading/heartbeat_scheduler.h rename to chrome/browser/ash/policy/uploading/heartbeat_scheduler.h index f6ad295..d7ba8238 100644 --- a/chrome/browser/chromeos/policy/uploading/heartbeat_scheduler.h +++ b/chrome/browser/ash/policy/uploading/heartbeat_scheduler.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_CHROMEOS_POLICY_UPLOADING_HEARTBEAT_SCHEDULER_H_ -#define CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_HEARTBEAT_SCHEDULER_H_ +#ifndef CHROME_BROWSER_ASH_POLICY_UPLOADING_HEARTBEAT_SCHEDULER_H_ +#define CHROME_BROWSER_ASH_POLICY_UPLOADING_HEARTBEAT_SCHEDULER_H_ #include <stdint.h> @@ -163,4 +163,4 @@ } // namespace policy -#endif // CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_HEARTBEAT_SCHEDULER_H_ +#endif // CHROME_BROWSER_ASH_POLICY_UPLOADING_HEARTBEAT_SCHEDULER_H_
diff --git a/chrome/browser/chromeos/policy/uploading/heartbeat_scheduler_unittest.cc b/chrome/browser/ash/policy/uploading/heartbeat_scheduler_unittest.cc similarity index 99% rename from chrome/browser/chromeos/policy/uploading/heartbeat_scheduler_unittest.cc rename to chrome/browser/ash/policy/uploading/heartbeat_scheduler_unittest.cc index 3ed75d3..34fc2fff3 100644 --- a/chrome/browser/chromeos/policy/uploading/heartbeat_scheduler_unittest.cc +++ b/chrome/browser/ash/policy/uploading/heartbeat_scheduler_unittest.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/chromeos/policy/uploading/heartbeat_scheduler.h" +#include "chrome/browser/ash/policy/uploading/heartbeat_scheduler.h" #include <stdint.h>
diff --git a/chrome/browser/chromeos/policy/uploading/status_uploader.cc b/chrome/browser/ash/policy/uploading/status_uploader.cc similarity index 99% rename from chrome/browser/chromeos/policy/uploading/status_uploader.cc rename to chrome/browser/ash/policy/uploading/status_uploader.cc index c87078d..9fbb475 100644 --- a/chrome/browser/chromeos/policy/uploading/status_uploader.cc +++ b/chrome/browser/ash/policy/uploading/status_uploader.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/chromeos/policy/uploading/status_uploader.h" +#include "chrome/browser/ash/policy/uploading/status_uploader.h" #include <algorithm> #include <string>
diff --git a/chrome/browser/chromeos/policy/uploading/status_uploader.h b/chrome/browser/ash/policy/uploading/status_uploader.h similarity index 95% rename from chrome/browser/chromeos/policy/uploading/status_uploader.h rename to chrome/browser/ash/policy/uploading/status_uploader.h index 6df09bf..ccda664 100644 --- a/chrome/browser/chromeos/policy/uploading/status_uploader.h +++ b/chrome/browser/ash/policy/uploading/status_uploader.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_CHROMEOS_POLICY_UPLOADING_STATUS_UPLOADER_H_ -#define CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_STATUS_UPLOADER_H_ +#ifndef CHROME_BROWSER_ASH_POLICY_UPLOADING_STATUS_UPLOADER_H_ +#define CHROME_BROWSER_ASH_POLICY_UPLOADING_STATUS_UPLOADER_H_ #include <memory> @@ -119,4 +119,4 @@ } // namespace policy -#endif // CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_STATUS_UPLOADER_H_ +#endif // CHROME_BROWSER_ASH_POLICY_UPLOADING_STATUS_UPLOADER_H_
diff --git a/chrome/browser/chromeos/policy/uploading/status_uploader_unittest.cc b/chrome/browser/ash/policy/uploading/status_uploader_unittest.cc similarity index 99% rename from chrome/browser/chromeos/policy/uploading/status_uploader_unittest.cc rename to chrome/browser/ash/policy/uploading/status_uploader_unittest.cc index 341b361..98d0e84 100644 --- a/chrome/browser/chromeos/policy/uploading/status_uploader_unittest.cc +++ b/chrome/browser/ash/policy/uploading/status_uploader_unittest.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/chromeos/policy/uploading/status_uploader.h" +#include "chrome/browser/ash/policy/uploading/status_uploader.h" #include <memory> #include <utility>
diff --git a/chrome/browser/chromeos/policy/uploading/system_log_uploader.cc b/chrome/browser/ash/policy/uploading/system_log_uploader.cc similarity index 99% rename from chrome/browser/chromeos/policy/uploading/system_log_uploader.cc rename to chrome/browser/ash/policy/uploading/system_log_uploader.cc index 55a5b28..52dcb82 100644 --- a/chrome/browser/chromeos/policy/uploading/system_log_uploader.cc +++ b/chrome/browser/ash/policy/uploading/system_log_uploader.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/chromeos/policy/uploading/system_log_uploader.h" +#include "chrome/browser/ash/policy/uploading/system_log_uploader.h" #include <algorithm> #include <map> @@ -24,8 +24,8 @@ #include "base/task/thread_pool.h" #include "base/values.h" #include "chrome/browser/ash/policy/core/policy_pref_names.h" +#include "chrome/browser/ash/policy/uploading/upload_job_impl.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/chromeos/policy/uploading/upload_job_impl.h" #include "chrome/browser/device_identity/device_oauth2_token_service.h" #include "chrome/browser/device_identity/device_oauth2_token_service_factory.h" #include "chrome/browser/policy/chrome_browser_policy_connector.h"
diff --git a/chrome/browser/chromeos/policy/uploading/system_log_uploader.h b/chrome/browser/ash/policy/uploading/system_log_uploader.h similarity index 95% rename from chrome/browser/chromeos/policy/uploading/system_log_uploader.h rename to chrome/browser/ash/policy/uploading/system_log_uploader.h index cb1a06d..97bd7f9 100644 --- a/chrome/browser/chromeos/policy/uploading/system_log_uploader.h +++ b/chrome/browser/ash/policy/uploading/system_log_uploader.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_CHROMEOS_POLICY_UPLOADING_SYSTEM_LOG_UPLOADER_H_ -#define CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_SYSTEM_LOG_UPLOADER_H_ +#ifndef CHROME_BROWSER_ASH_POLICY_UPLOADING_SYSTEM_LOG_UPLOADER_H_ +#define CHROME_BROWSER_ASH_POLICY_UPLOADING_SYSTEM_LOG_UPLOADER_H_ #include <stdint.h> @@ -18,8 +18,8 @@ #include "base/memory/weak_ptr.h" #include "base/threading/thread_checker.h" #include "base/time/time.h" +#include "chrome/browser/ash/policy/uploading/upload_job.h" #include "chrome/browser/ash/settings/cros_settings.h" -#include "chrome/browser/chromeos/policy/uploading/upload_job.h" namespace base { class SequencedTaskRunner; @@ -198,4 +198,4 @@ } // namespace policy -#endif // CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_SYSTEM_LOG_UPLOADER_H_ +#endif // CHROME_BROWSER_ASH_POLICY_UPLOADING_SYSTEM_LOG_UPLOADER_H_
diff --git a/chrome/browser/chromeos/policy/uploading/system_log_uploader_unittest.cc b/chrome/browser/ash/policy/uploading/system_log_uploader_unittest.cc similarity index 99% rename from chrome/browser/chromeos/policy/uploading/system_log_uploader_unittest.cc rename to chrome/browser/ash/policy/uploading/system_log_uploader_unittest.cc index 6ba0f60..da58349 100644 --- a/chrome/browser/chromeos/policy/uploading/system_log_uploader_unittest.cc +++ b/chrome/browser/ash/policy/uploading/system_log_uploader_unittest.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/chromeos/policy/uploading/system_log_uploader.h" +#include "chrome/browser/ash/policy/uploading/system_log_uploader.h" #include <utility>
diff --git a/chrome/browser/chromeos/policy/uploading/upload_job.h b/chrome/browser/ash/policy/uploading/upload_job.h similarity index 93% rename from chrome/browser/chromeos/policy/uploading/upload_job.h rename to chrome/browser/ash/policy/uploading/upload_job.h index 0583aad..5886ed7 100644 --- a/chrome/browser/chromeos/policy/uploading/upload_job.h +++ b/chrome/browser/ash/policy/uploading/upload_job.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_CHROMEOS_POLICY_UPLOADING_UPLOAD_JOB_H_ -#define CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_UPLOAD_JOB_H_ +#ifndef CHROME_BROWSER_ASH_POLICY_UPLOADING_UPLOAD_JOB_H_ +#define CHROME_BROWSER_ASH_POLICY_UPLOADING_UPLOAD_JOB_H_ #include <map> #include <memory> @@ -75,4 +75,4 @@ } // namespace policy -#endif // CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_UPLOAD_JOB_H_ +#endif // CHROME_BROWSER_ASH_POLICY_UPLOADING_UPLOAD_JOB_H_
diff --git a/chrome/browser/chromeos/policy/uploading/upload_job_impl.cc b/chrome/browser/ash/policy/uploading/upload_job_impl.cc similarity index 99% rename from chrome/browser/chromeos/policy/uploading/upload_job_impl.cc rename to chrome/browser/ash/policy/uploading/upload_job_impl.cc index 9e6bc7a..3753b33 100644 --- a/chrome/browser/chromeos/policy/uploading/upload_job_impl.cc +++ b/chrome/browser/ash/policy/uploading/upload_job_impl.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/chromeos/policy/uploading/upload_job_impl.h" +#include "chrome/browser/ash/policy/uploading/upload_job_impl.h" #include <stddef.h>
diff --git a/chrome/browser/chromeos/policy/uploading/upload_job_impl.h b/chrome/browser/ash/policy/uploading/upload_job_impl.h similarity index 95% rename from chrome/browser/chromeos/policy/uploading/upload_job_impl.h rename to chrome/browser/ash/policy/uploading/upload_job_impl.h index 0d5ff14..01a4e3d1 100644 --- a/chrome/browser/chromeos/policy/uploading/upload_job_impl.h +++ b/chrome/browser/ash/policy/uploading/upload_job_impl.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_CHROMEOS_POLICY_UPLOADING_UPLOAD_JOB_IMPL_H_ -#define CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_UPLOAD_JOB_IMPL_H_ +#ifndef CHROME_BROWSER_ASH_POLICY_UPLOADING_UPLOAD_JOB_IMPL_H_ +#define CHROME_BROWSER_ASH_POLICY_UPLOADING_UPLOAD_JOB_IMPL_H_ #include <map> #include <memory> @@ -13,7 +13,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/threading/thread_checker.h" -#include "chrome/browser/chromeos/policy/uploading/upload_job.h" +#include "chrome/browser/ash/policy/uploading/upload_job.h" #include "google_apis/gaia/oauth2_access_token_manager.h" #include "net/traffic_annotation/network_traffic_annotation.h" #include "url/gurl.h" @@ -195,4 +195,4 @@ } // namespace policy -#endif // CHROME_BROWSER_CHROMEOS_POLICY_UPLOADING_UPLOAD_JOB_IMPL_H_ +#endif // CHROME_BROWSER_ASH_POLICY_UPLOADING_UPLOAD_JOB_IMPL_H_
diff --git a/chrome/browser/chromeos/policy/uploading/upload_job_unittest.cc b/chrome/browser/ash/policy/uploading/upload_job_unittest.cc similarity index 98% rename from chrome/browser/chromeos/policy/uploading/upload_job_unittest.cc rename to chrome/browser/ash/policy/uploading/upload_job_unittest.cc index 7d76a4e..bb01f271 100644 --- a/chrome/browser/chromeos/policy/uploading/upload_job_unittest.cc +++ b/chrome/browser/ash/policy/uploading/upload_job_unittest.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/chromeos/policy/uploading/upload_job.h" +#include "chrome/browser/ash/policy/uploading/upload_job.h" #include <stddef.h> @@ -19,7 +19,7 @@ #include "base/run_loop.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" -#include "chrome/browser/chromeos/policy/uploading/upload_job_impl.h" +#include "chrome/browser/ash/policy/uploading/upload_job_impl.h" #include "content/public/test/browser_task_environment.h" #include "google_apis/gaia/core_account_id.h" #include "google_apis/gaia/fake_oauth2_access_token_manager.h"
diff --git a/chrome/browser/chromeos/policy/value_validation/onc_device_policy_value_validator.cc b/chrome/browser/ash/policy/value_validation/onc_device_policy_value_validator.cc similarity index 91% rename from chrome/browser/chromeos/policy/value_validation/onc_device_policy_value_validator.cc rename to chrome/browser/ash/policy/value_validation/onc_device_policy_value_validator.cc index c1e34adb..00f117ad 100644 --- a/chrome/browser/chromeos/policy/value_validation/onc_device_policy_value_validator.cc +++ b/chrome/browser/ash/policy/value_validation/onc_device_policy_value_validator.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/chromeos/policy/value_validation/onc_device_policy_value_validator.h" +#include "chrome/browser/ash/policy/value_validation/onc_device_policy_value_validator.h" #include "components/policy/policy_constants.h" #include "components/policy/proto/chrome_device_policy.pb.h"
diff --git a/chrome/browser/chromeos/policy/value_validation/onc_device_policy_value_validator.h b/chrome/browser/ash/policy/value_validation/onc_device_policy_value_validator.h similarity index 66% rename from chrome/browser/chromeos/policy/value_validation/onc_device_policy_value_validator.h rename to chrome/browser/ash/policy/value_validation/onc_device_policy_value_validator.h index 4e5b556..6a087dc7 100644 --- a/chrome/browser/chromeos/policy/value_validation/onc_device_policy_value_validator.h +++ b/chrome/browser/ash/policy/value_validation/onc_device_policy_value_validator.h
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_CHROMEOS_POLICY_VALUE_VALIDATION_ONC_DEVICE_POLICY_VALUE_VALIDATOR_H_ -#define CHROME_BROWSER_CHROMEOS_POLICY_VALUE_VALIDATION_ONC_DEVICE_POLICY_VALUE_VALIDATOR_H_ +#ifndef CHROME_BROWSER_ASH_POLICY_VALUE_VALIDATION_ONC_DEVICE_POLICY_VALUE_VALIDATOR_H_ +#define CHROME_BROWSER_ASH_POLICY_VALUE_VALIDATION_ONC_DEVICE_POLICY_VALUE_VALIDATOR_H_ -#include "chrome/browser/chromeos/policy/value_validation/onc_policy_value_validator_base.h" +#include "chrome/browser/ash/policy/value_validation/onc_policy_value_validator_base.h" namespace enterprise_management { class ChromeDeviceSettingsProto; @@ -31,4 +31,4 @@ } // namespace policy -#endif // CHROME_BROWSER_CHROMEOS_POLICY_VALUE_VALIDATION_ONC_DEVICE_POLICY_VALUE_VALIDATOR_H_ +#endif // CHROME_BROWSER_ASH_POLICY_VALUE_VALIDATION_ONC_DEVICE_POLICY_VALUE_VALIDATOR_H_
diff --git a/chrome/browser/chromeos/policy/value_validation/onc_policy_value_validator_base.h b/chrome/browser/ash/policy/value_validation/onc_policy_value_validator_base.h similarity index 91% rename from chrome/browser/chromeos/policy/value_validation/onc_policy_value_validator_base.h rename to chrome/browser/ash/policy/value_validation/onc_policy_value_validator_base.h index 8f98d0c2..7f7366a7 100644 --- a/chrome/browser/chromeos/policy/value_validation/onc_policy_value_validator_base.h +++ b/chrome/browser/ash/policy/value_validation/onc_policy_value_validator_base.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_CHROMEOS_POLICY_VALUE_VALIDATION_ONC_POLICY_VALUE_VALIDATOR_BASE_H_ -#define CHROME_BROWSER_CHROMEOS_POLICY_VALUE_VALIDATION_ONC_POLICY_VALUE_VALIDATOR_BASE_H_ +#ifndef CHROME_BROWSER_ASH_POLICY_VALUE_VALIDATION_ONC_POLICY_VALUE_VALIDATOR_BASE_H_ +#define CHROME_BROWSER_ASH_POLICY_VALUE_VALIDATION_ONC_POLICY_VALUE_VALIDATOR_BASE_H_ #include "components/policy/core/common/cloud/policy_value_validator.h" @@ -81,4 +81,4 @@ } // namespace policy -#endif // CHROME_BROWSER_CHROMEOS_POLICY_VALUE_VALIDATION_ONC_POLICY_VALUE_VALIDATOR_BASE_H_ +#endif // CHROME_BROWSER_ASH_POLICY_VALUE_VALIDATION_ONC_POLICY_VALUE_VALIDATOR_BASE_H_
diff --git a/chrome/browser/chromeos/policy/value_validation/onc_user_policy_value_validator.cc b/chrome/browser/ash/policy/value_validation/onc_user_policy_value_validator.cc similarity index 90% rename from chrome/browser/chromeos/policy/value_validation/onc_user_policy_value_validator.cc rename to chrome/browser/ash/policy/value_validation/onc_user_policy_value_validator.cc index 685724b..94d0f6c 100644 --- a/chrome/browser/chromeos/policy/value_validation/onc_user_policy_value_validator.cc +++ b/chrome/browser/ash/policy/value_validation/onc_user_policy_value_validator.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/chromeos/policy/value_validation/onc_user_policy_value_validator.h" +#include "chrome/browser/ash/policy/value_validation/onc_user_policy_value_validator.h" #include "components/policy/policy_constants.h" #include "components/policy/proto/cloud_policy.pb.h"
diff --git a/chrome/browser/chromeos/policy/value_validation/onc_user_policy_value_validator.h b/chrome/browser/ash/policy/value_validation/onc_user_policy_value_validator.h similarity index 66% rename from chrome/browser/chromeos/policy/value_validation/onc_user_policy_value_validator.h rename to chrome/browser/ash/policy/value_validation/onc_user_policy_value_validator.h index ade5b9d..aa940ab 100644 --- a/chrome/browser/chromeos/policy/value_validation/onc_user_policy_value_validator.h +++ b/chrome/browser/ash/policy/value_validation/onc_user_policy_value_validator.h
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_CHROMEOS_POLICY_VALUE_VALIDATION_ONC_USER_POLICY_VALUE_VALIDATOR_H_ -#define CHROME_BROWSER_CHROMEOS_POLICY_VALUE_VALIDATION_ONC_USER_POLICY_VALUE_VALIDATOR_H_ +#ifndef CHROME_BROWSER_ASH_POLICY_VALUE_VALIDATION_ONC_USER_POLICY_VALUE_VALIDATOR_H_ +#define CHROME_BROWSER_ASH_POLICY_VALUE_VALIDATION_ONC_USER_POLICY_VALUE_VALIDATOR_H_ -#include "chrome/browser/chromeos/policy/value_validation/onc_policy_value_validator_base.h" +#include "chrome/browser/ash/policy/value_validation/onc_policy_value_validator_base.h" namespace enterprise_management { class CloudPolicySettings; @@ -31,4 +31,4 @@ } // namespace policy -#endif // CHROME_BROWSER_CHROMEOS_POLICY_VALUE_VALIDATION_ONC_USER_POLICY_VALUE_VALIDATOR_H_ +#endif // CHROME_BROWSER_ASH_POLICY_VALUE_VALIDATION_ONC_USER_POLICY_VALUE_VALIDATOR_H_
diff --git a/chrome/browser/ash/web_applications/demo_mode_app_integration_browsertest.cc b/chrome/browser/ash/web_applications/demo_mode_app_integration_browsertest.cc index eb9839c3..5439897 100644 --- a/chrome/browser/ash/web_applications/demo_mode_app_integration_browsertest.cc +++ b/chrome/browser/ash/web_applications/demo_mode_app_integration_browsertest.cc
@@ -7,7 +7,6 @@ #include "chrome/browser/ash/web_applications/system_web_app_integration_test.h" #include "chromeos/components/demo_mode_app_ui/url_constants.h" #include "content/public/test/browser_test.h" -#include "ui/views/widget/widget.h" class DemoModeAppIntegrationTest : public SystemWebAppIntegrationTest { public: @@ -26,23 +25,5 @@ web_app::SystemAppType::DEMO_MODE, url, "Demo Mode App")); } -// Test that Demo Mode app starts in fullscreen from initial call to -// ToggleFullscreen() Mojo API, and subsequent call exits fullscreen -IN_PROC_BROWSER_TEST_P(DemoModeAppIntegrationTest, - DemoModeAppToggleFullscreen) { - WaitForTestSystemAppInstall(); - Browser* browser; - content::WebContents* web_contents = - LaunchApp(web_app::SystemAppType::DEMO_MODE, &browser); - views::Widget* widget = views::Widget::GetWidgetForNativeWindow( - web_contents->GetTopLevelNativeWindow()); - EXPECT_TRUE(widget->IsFullscreen()); - - bool success = content::ExecuteScript( - web_contents, "window.pageHandler.toggleFullscreen();"); - EXPECT_TRUE(success); - EXPECT_FALSE(widget->IsFullscreen()); -} - INSTANTIATE_SYSTEM_WEB_APP_MANAGER_TEST_SUITE_GUEST_SESSION_P( DemoModeAppIntegrationTest);
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.cc b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.cc index c02d767..b3b82d1 100644 --- a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.cc +++ b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller.cc
@@ -26,7 +26,7 @@ // This stores the latest milestone with new Discover Tab content. If the last // milestone the user has seen the notification is before this, a new // notification will be shown. -constexpr int kLastChromeVersionWithDiscoverTabContent = 92; +constexpr int kLastChromeVersionWithDiscoverTabContent = 94; constexpr int kTimesToShowSuggestionChip = 3; int CurrentMilestone() {
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller_unittest.cc b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller_unittest.cc index 858400ed..46a3b174 100644 --- a/chrome/browser/ash/web_applications/help_app/help_app_notification_controller_unittest.cc +++ b/chrome/browser/ash/web_applications/help_app/help_app_notification_controller_unittest.cc
@@ -333,34 +333,6 @@ EXPECT_EQ(false, HasDiscoverTabNotification()); } -TEST_F(HelpAppNotificationControllerTest, - DoesNotShowDiscoverNotificationIfAlreadyShownIfM92) { - std::unique_ptr<Profile> profile = CreateChildProfile(); - profile->GetPrefs()->SetInteger(prefs::kHelpAppNotificationLastShownMilestone, - 92); - std::unique_ptr<HelpAppNotificationController> controller = - std::make_unique<HelpAppNotificationController>(profile.get()); - - controller->MaybeShowDiscoverNotification(); - - EXPECT_EQ(0, notification_count_); - EXPECT_EQ(false, HasDiscoverTabNotification()); -} - -TEST_F(HelpAppNotificationControllerTest, - DoesNotShowDiscoverNotificationIfAlreadyShownInM93) { - std::unique_ptr<Profile> profile = CreateChildProfile(); - profile->GetPrefs()->SetInteger(prefs::kHelpAppNotificationLastShownMilestone, - 93); - std::unique_ptr<HelpAppNotificationController> controller = - std::make_unique<HelpAppNotificationController>(profile.get()); - - controller->MaybeShowDiscoverNotification(); - - EXPECT_EQ(0, notification_count_); - EXPECT_EQ(false, HasDiscoverTabNotification()); -} - // TODO(b/187774783): Remove this when discover tab is supported in all locales. TEST_F(HelpAppNotificationControllerTest, DoesNotShowDiscoverNotificationIfSystemLanguageNotEnglish) {
diff --git a/chrome/browser/chrome_browser_interface_binders.cc b/chrome/browser/chrome_browser_interface_binders.cc index 7ec620d7..964593b8 100644 --- a/chrome/browser/chrome_browser_interface_binders.cc +++ b/chrome/browser/chrome_browser_interface_binders.cc
@@ -187,6 +187,8 @@ #include "chrome/browser/ui/webui/chromeos/crostini_upgrader/crostini_upgrader_ui.h" #include "chrome/browser/ui/webui/chromeos/emoji/emoji_picker.mojom.h" #include "chrome/browser/ui/webui/chromeos/emoji/emoji_ui.h" +#include "chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting.mojom.h" +#include "chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting_ui.h" #include "chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_network_ui.h" #include "chrome/browser/ui/webui/chromeos/internet_config_dialog.h" #include "chrome/browser/ui/webui/chromeos/internet_detail_dialog.h" @@ -239,8 +241,6 @@ #endif #if BUILDFLAG(IS_CHROMEOS_ASH) && !defined(OFFICIAL_BUILD) -#include "chromeos/components/demo_mode_app_ui/demo_mode_app_ui.h" -#include "chromeos/components/demo_mode_app_ui/mojom/demo_mode_app_ui.mojom.h" #include "chromeos/components/telemetry_extension_ui/mojom/diagnostics_service.mojom.h" // nogncheck crbug.com/1125897 #include "chromeos/components/telemetry_extension_ui/mojom/probe_service.mojom.h" // nogncheck crbug.com/1125897 #include "chromeos/components/telemetry_extension_ui/mojom/system_events_service.mojom.h" // nogncheck crbug.com/1125897 @@ -893,15 +893,13 @@ RegisterWebUIControllerInterfaceBinder< launcher_internals::mojom::PageHandlerFactory, chromeos::LauncherInternalsUI>(map); + + RegisterWebUIControllerInterfaceBinder< + enterprise_casting::mojom::PageHandlerFactory, + chromeos::EnterpriseCastingUI>(map); #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_CHROMEOS_ASH) && !defined(OFFICIAL_BUILD) - if (chromeos::features::IsDemoModeSWAEnabled()) { - RegisterWebUIControllerInterfaceBinder< - chromeos::mojom::demo_mode::PageHandlerFactory, - chromeos::DemoModeAppUI>(map); - } - if (base::FeatureList::IsEnabled(chromeos::features::kTelemetryExtension)) { RegisterWebUIControllerInterfaceBinder< chromeos::health::mojom::DiagnosticsService,
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 5dc5ab65..2aa89a3 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc
@@ -88,6 +88,7 @@ #include "chrome/browser/startup_data.h" #include "chrome/browser/tracing/background_tracing_field_trial.h" #include "chrome/browser/tracing/trace_event_system_stats_monitor.h" +#include "chrome/browser/translate/chrome_translate_client.h" #include "chrome/browser/translate/translate_service.h" #include "chrome/browser/ui/javascript_dialogs/chrome_javascript_app_modal_dialog_view_factory.h" #include "chrome/browser/ui/profile_error_dialog.h" @@ -142,6 +143,7 @@ #include "components/startup_metric_utils/browser/startup_metric_utils.h" #include "components/tracing/common/tracing_switches.h" #include "components/translate/core/browser/translate_download_manager.h" +#include "components/translate/core/browser/translate_metrics_logger_impl.h" #include "components/variations/field_trial_config/field_trial_util.h" #include "components/variations/pref_names.h" #include "components/variations/service/variations_service.h" @@ -1554,6 +1556,8 @@ profile_->GetPrefs()->GetString(language::prefs::kAcceptLanguages)); language::LanguageUsageMetrics::RecordApplicationLanguage( browser_process_->GetApplicationLocale()); + translate::TranslateMetricsLoggerImpl::LogApplicationStartMetrics( + ChromeTranslateClient::CreateTranslatePrefs(profile_->GetPrefs())); // On ChromeOS results in a crash. https://crbug.com/1151558 #if !BUILDFLAG(IS_CHROMEOS_ASH) language::LanguageUsageMetrics::RecordPageLanguages(
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index f4e2daf..c9ceb41 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -2264,6 +2264,20 @@ "../ash/policy/status_collector/status_collector_state.h", "../ash/policy/status_collector/tpm_status_combiner.cc", "../ash/policy/status_collector/tpm_status_combiner.h", + "../ash/policy/uploading/heartbeat_scheduler.cc", + "../ash/policy/uploading/heartbeat_scheduler.h", + "../ash/policy/uploading/status_uploader.cc", + "../ash/policy/uploading/status_uploader.h", + "../ash/policy/uploading/system_log_uploader.cc", + "../ash/policy/uploading/system_log_uploader.h", + "../ash/policy/uploading/upload_job.h", + "../ash/policy/uploading/upload_job_impl.cc", + "../ash/policy/uploading/upload_job_impl.h", + "../ash/policy/value_validation/onc_device_policy_value_validator.cc", + "../ash/policy/value_validation/onc_device_policy_value_validator.h", + "../ash/policy/value_validation/onc_policy_value_validator_base.h", + "../ash/policy/value_validation/onc_user_policy_value_validator.cc", + "../ash/policy/value_validation/onc_user_policy_value_validator.h", "../ash/power/auto_screen_brightness/adapter.cc", "../ash/power/auto_screen_brightness/adapter.h", "../ash/power/auto_screen_brightness/als_file_reader.cc", @@ -2983,20 +2997,6 @@ "platform_keys/platform_keys_service_factory.cc", "platform_keys/platform_keys_service_factory.h", "platform_keys/platform_keys_service_nss.cc", - "policy/uploading/heartbeat_scheduler.cc", - "policy/uploading/heartbeat_scheduler.h", - "policy/uploading/status_uploader.cc", - "policy/uploading/status_uploader.h", - "policy/uploading/system_log_uploader.cc", - "policy/uploading/system_log_uploader.h", - "policy/uploading/upload_job.h", - "policy/uploading/upload_job_impl.cc", - "policy/uploading/upload_job_impl.h", - "policy/value_validation/onc_device_policy_value_validator.cc", - "policy/value_validation/onc_device_policy_value_validator.h", - "policy/value_validation/onc_policy_value_validator_base.h", - "policy/value_validation/onc_user_policy_value_validator.cc", - "policy/value_validation/onc_user_policy_value_validator.h", "preferences.cc", "preferences.h", "printing/automatic_usb_printer_configurer.cc", @@ -4040,6 +4040,10 @@ "../ash/policy/status_collector/enterprise_activity_storage_unittest.cc", "../ash/policy/status_collector/interval_map_unittest.cc", "../ash/policy/status_collector/managed_session_service_unittest.cc", + "../ash/policy/uploading/heartbeat_scheduler_unittest.cc", + "../ash/policy/uploading/status_uploader_unittest.cc", + "../ash/policy/uploading/system_log_uploader_unittest.cc", + "../ash/policy/uploading/upload_job_unittest.cc", "../ash/power/auto_screen_brightness/adapter_unittest.cc", "../ash/power/auto_screen_brightness/als_file_reader_unittest.cc", "../ash/power/auto_screen_brightness/als_reader_unittest.cc", @@ -4259,10 +4263,6 @@ "phonehub/browser_tabs_model_provider_impl_unittest.cc", "platform_keys/key_permissions/arc_key_permissions_manager_delegate_unittest.cc", "platform_keys/key_permissions/key_permissions_service_impl_unittest.cc", - "policy/uploading/heartbeat_scheduler_unittest.cc", - "policy/uploading/status_uploader_unittest.cc", - "policy/uploading/system_log_uploader_unittest.cc", - "policy/uploading/upload_job_unittest.cc", "preferences_unittest.cc", "printing/automatic_usb_printer_configurer_unittest.cc", "printing/bulk_printers_calculator_unittest.cc", @@ -4566,7 +4566,7 @@ device_policy_remover_path = "$target_gen_dir/device_policy_remover.cc" action("device_policy_remover_generate") { - script = "policy/tools/generate_device_policy_remover.py" + script = "../ash/policy/tools/generate_device_policy_remover.py" descriptor_pool_path = "//third_party/protobuf/python" symbol_database_path = "$root_out_dir/pyproto"
diff --git a/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.cc b/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.cc index 5266dd31..db84f16 100644 --- a/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.cc +++ b/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.cc
@@ -4849,6 +4849,7 @@ hotseat_ui_info.swipe_up = std::move(swipe_up_descriptor); hotseat_ui_info.is_animating = hotseat_info.is_animating; hotseat_ui_info.state = GetHotseatState(hotseat_info.hotseat_state); + hotseat_ui_info.is_auto_hidden = hotseat_info.is_auto_hidden; shelf_ui_info.hotseat_info = std::move(hotseat_ui_info); }
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc index 3436b504..7398616 100644 --- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc +++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -450,6 +450,8 @@ base::BindRepeating(&EventRouter::DispatchDirectoryChangeEventImpl, base::Unretained(this))) { DCHECK_CURRENTLY_ON(BrowserThread::UI); + // Notification manager can call into Drive FS for dialog handling. + notification_manager_->SetDriveFSEventRouter(drivefs_event_router_.get()); ObserveEvents(); } @@ -901,6 +903,7 @@ util::VolumeToVolumeMetadata(profile_, volume, &event.volume_metadata); event.should_notify = ShouldShowNotificationForVolume(profile_, *device_event_router_, volume); + notification_manager_->HandleMountCompletedEvent(event, volume); BroadcastEvent(profile_, extensions::events::FILE_MANAGER_PRIVATE_ON_MOUNT_COMPLETED, file_manager_private::OnMountCompleted::kEventName,
diff --git a/chrome/browser/chromeos/extensions/file_manager/system_notification_manager.cc b/chrome/browser/chromeos/extensions/file_manager/system_notification_manager.cc index 49ea195..1394a4d 100644 --- a/chrome/browser/chromeos/extensions/file_manager/system_notification_manager.cc +++ b/chrome/browser/chromeos/extensions/file_manager/system_notification_manager.cc
@@ -8,6 +8,11 @@ #include "base/bind.h" #include "base/strings/strcat.h" #include "base/strings/utf_string_conversions.h" +#include "chrome/browser/ash/drive/drivefs_native_message_host.h" +#include "chrome/browser/chromeos/extensions/file_manager/drivefs_event_router.h" +#include "chrome/browser/platform_util.h" +#include "chrome/browser/ui/settings_window_manager_chromeos.h" +#include "chrome/browser/ui/webui/settings/chromeos/constants/routes.mojom-forward.h" #include "chrome/grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" @@ -151,7 +156,144 @@ } } -void SystemNotificationManager::HandleEvent(const extensions::Event& event) {} +namespace file_manager_private = extensions::api::file_manager_private; + +std::unique_ptr<message_center::Notification> +SystemNotificationManager::MakeDriveSyncErrorNotification( + const extensions::Event& event, + base::Value::ListView& event_arguments) { + std::unique_ptr<message_center::Notification> notification; + file_manager_private::DriveSyncErrorEvent sync_error; + const char* id; + std::u16string title = + l10n_util::GetStringUTF16(IDS_FILE_BROWSER_DRIVE_DIRECTORY_LABEL); + std::u16string message; + if (file_manager_private::DriveSyncErrorEvent::Populate(event_arguments[0], + &sync_error)) { + id = file_manager_private::ToString(sync_error.type); + switch (sync_error.type) { + case file_manager_private:: + DRIVE_SYNC_ERROR_TYPE_DELETE_WITHOUT_PERMISSION: + message = l10n_util::GetStringFUTF16( + IDS_FILE_BROWSER_SYNC_DELETE_WITHOUT_PERMISSION_ERROR, + base::UTF8ToUTF16(event.event_url.ExtractFileName())); + notification = CreateNotification(id, title, message); + break; + case file_manager_private::DRIVE_SYNC_ERROR_TYPE_SERVICE_UNAVAILABLE: + notification = + CreateNotification(id, IDS_FILE_BROWSER_DRIVE_DIRECTORY_LABEL, + IDS_FILE_BROWSER_SYNC_SERVICE_UNAVAILABLE_ERROR); + break; + case file_manager_private::DRIVE_SYNC_ERROR_TYPE_NO_SERVER_SPACE: + message = l10n_util::GetStringFUTF16( + IDS_FILE_BROWSER_SYNC_NO_SERVER_SPACE, + base::UTF8ToUTF16(event.event_url.ExtractFileName())); + notification = CreateNotification(id, title, message); + break; + case file_manager_private::DRIVE_SYNC_ERROR_TYPE_NO_LOCAL_SPACE: + notification = + CreateNotification(id, IDS_FILE_BROWSER_DRIVE_DIRECTORY_LABEL, + IDS_FILE_BROWSER_DRIVE_OUT_OF_SPACE_HEADER); + break; + case file_manager_private::DRIVE_SYNC_ERROR_TYPE_MISC: + message = l10n_util::GetStringFUTF16( + IDS_FILE_BROWSER_SYNC_MISC_ERROR, + base::UTF8ToUTF16(event.event_url.ExtractFileName())); + notification = CreateNotification(id, title, message); + break; + default: + DLOG(WARNING) << "Unknown Drive Sync error: " << sync_error.type; + break; + } + } + return notification; +} + +const char* kDriveDialogId = "swa-drive-confirm-dialog"; + +void SystemNotificationManager::HandleDriveDialogClick( + absl::optional<int> button_index) { + drivefs::mojom::DialogResult result = drivefs::mojom::DialogResult::kDismiss; + if (button_index) { + if (button_index.value() == 1) { + result = drivefs::mojom::DialogResult::kAccept; + } else { + result = drivefs::mojom::DialogResult::kReject; + } + } + // Send the dialog result to the callback stored in DriveFS on dialog + // creation. + if (drivefs_event_router_) { + drivefs_event_router_->OnDialogResult(result); + } + GetNotificationDisplayService()->Close(NotificationHandler::Type::TRANSIENT, + kDriveDialogId); +} + +std::unique_ptr<message_center::Notification> +SystemNotificationManager::MakeDriveConfirmDialogNotification( + const extensions::Event& event, + base::Value::ListView& event_arguments) { + std::unique_ptr<message_center::Notification> notification; + file_manager_private::DriveConfirmDialogEvent dialog_event; + const char* id; + std::u16string title = + l10n_util::GetStringUTF16(IDS_FILE_BROWSER_DRIVE_DIRECTORY_LABEL); + std::u16string message; + if (file_manager_private::DriveConfirmDialogEvent::Populate( + event_arguments[0], &dialog_event)) { + std::vector<message_center::ButtonInfo> notification_buttons; + id = file_manager_private::ToString(dialog_event.type); + notification = ash::CreateSystemNotification( + message_center::NOTIFICATION_TYPE_SIMPLE, kDriveDialogId, + l10n_util::GetStringUTF16(IDS_FILE_BROWSER_DRIVE_DIRECTORY_LABEL), + l10n_util::GetStringUTF16(IDS_FILE_BROWSER_OFFLINE_ENABLE_MESSAGE), + std::u16string(), GURL(), message_center::NotifierId(), + message_center::RichNotificationData(), + new message_center::HandleNotificationClickDelegate(base::BindRepeating( + &SystemNotificationManager::HandleDriveDialogClick, + weak_ptr_factory_.GetWeakPtr())), + kNotificationGoogleIcon, + message_center::SystemNotificationWarningLevel::NORMAL); + + notification_buttons.push_back(message_center::ButtonInfo( + l10n_util::GetStringUTF16(IDS_FILE_BROWSER_OFFLINE_ENABLE_REJECT))); + notification_buttons.push_back(message_center::ButtonInfo( + l10n_util::GetStringUTF16(IDS_FILE_BROWSER_OFFLINE_ENABLE_ACCEPT))); + notification->set_buttons(notification_buttons); + } + return notification; +} + +void SystemNotificationManager::HandleEvent(const extensions::Event& event) { + if (!swa_enabled_) { + return; + } + base::Value::ListView event_arguments; + + event_arguments = event.event_args->GetList(); + if (event_arguments.size() < 1) { + return; + } + std::unique_ptr<message_center::Notification> notification; + switch (event.histogram_value) { + case extensions::events::FILE_MANAGER_PRIVATE_ON_DRIVE_SYNC_ERROR: + notification = MakeDriveSyncErrorNotification(event, event_arguments); + break; + case extensions::events::FILE_MANAGER_PRIVATE_ON_DRIVE_CONFIRM_DIALOG: + notification = MakeDriveConfirmDialogNotification(event, event_arguments); + break; + default: + DLOG(WARNING) << "Unhandled event: " << event.event_name; + break; + } + + if (notification) { + GetNotificationDisplayService()->Display( + NotificationHandler::Type::TRANSIENT, *notification, + /*metadata=*/nullptr); + } +} void SystemNotificationManager::HandleCopyStart( int copy_id, @@ -166,8 +308,6 @@ const char* kSwaFileOperationPrefix = "swa-file-operation-"; -namespace file_manager_private = extensions::api::file_manager_private; - void SystemNotificationManager::HandleCopyEvent( int copy_id, file_manager_private::CopyOrMoveProgressStatus& status) { @@ -228,9 +368,88 @@ } } +const char* kRemovableNotificationId = "swa-removable-device-id"; + +void SystemNotificationManager::HandleRemovableNotificationClick( + const std::string& path, + absl::optional<int> button_index) { + if (button_index) { + if (button_index.value() == 0) { + base::FilePath volume_root(path); + platform_util::ShowItemInFolder(profile_, volume_root); + } else { + chrome::SettingsWindowManager::GetInstance()->ShowOSSettings( + profile_, chromeos::settings::mojom::kExternalStorageSubpagePath); + } + } + + GetNotificationDisplayService()->Close(NotificationHandler::Type::TRANSIENT, + kRemovableNotificationId); +} + +std::unique_ptr<message_center::Notification> +SystemNotificationManager::MakeRemovableNotification( + file_manager_private::MountCompletedEvent& event, + const Volume& volume) { + std::unique_ptr<message_center::Notification> notification = + ash::CreateSystemNotification( + message_center::NOTIFICATION_TYPE_SIMPLE, kRemovableNotificationId, + l10n_util::GetStringUTF16(IDS_REMOVABLE_DEVICE_DETECTION_TITLE), + l10n_util::GetStringUTF16(IDS_REMOVABLE_DEVICE_NAVIGATION_MESSAGE), + std::u16string(), GURL(), message_center::NotifierId(), + message_center::RichNotificationData(), + new message_center::HandleNotificationClickDelegate( + base::BindRepeating( + &SystemNotificationManager::HandleRemovableNotificationClick, + weak_ptr_factory_.GetWeakPtr(), volume.mount_path().value())), + kNotificationGoogleIcon, + message_center::SystemNotificationWarningLevel::NORMAL); + + std::vector<message_center::ButtonInfo> notification_buttons; + notification_buttons.push_back(message_center::ButtonInfo( + l10n_util::GetStringUTF16(IDS_REMOVABLE_DEVICE_NAVIGATION_BUTTON_LABEL))); + notification_buttons.push_back( + message_center::ButtonInfo(l10n_util::GetStringUTF16( + IDS_REMOVABLE_DEVICE_OPEN_SETTTINGS_BUTTON_LABEL))); + notification->set_buttons(notification_buttons); + + return notification; +} + +void SystemNotificationManager::HandleMountCompletedEvent( + file_manager_private::MountCompletedEvent& event, + const Volume& volume) { + if (!swa_enabled_) { + return; + } + std::unique_ptr<message_center::Notification> notification; + + switch (event.event_type) { + case file_manager_private::MOUNT_COMPLETED_EVENT_TYPE_MOUNT: + if (event.should_notify) { + notification = MakeRemovableNotification(event, volume); + } + break; + default: + DLOG(WARNING) << "Unhandled mount event for type " << event.event_type; + break; + } + + if (notification) { + GetNotificationDisplayService()->Display( + NotificationHandler::Type::TRANSIENT, *notification, + /*metadata=*/nullptr); + } +} + NotificationDisplayService* SystemNotificationManager::GetNotificationDisplayService() { return NotificationDisplayServiceFactory::GetForProfile(profile_); } +void SystemNotificationManager::SetDriveFSEventRouter( + DriveFsEventRouter* drivefs_event_router) { + drivefs_event_router_ = drivefs_event_router; +} + } // namespace file_manager
diff --git a/chrome/browser/chromeos/extensions/file_manager/system_notification_manager.h b/chrome/browser/chromeos/extensions/file_manager/system_notification_manager.h index bcd23625..b7a6a9ae 100644 --- a/chrome/browser/chromeos/extensions/file_manager/system_notification_manager.h +++ b/chrome/browser/chromeos/extensions/file_manager/system_notification_manager.h
@@ -8,6 +8,7 @@ #include "ash/public/cpp/notification_utils.h" #include "base/memory/weak_ptr.h" #include "chrome/app/vector_icons/vector_icons.h" +#include "chrome/browser/ash/file_manager/volume_manager.h" #include "chrome/browser/notifications/notification_display_service.h" #include "chrome/browser/notifications/notification_display_service_factory.h" #include "chrome/browser/notifications/system_notification_helper.h" @@ -21,6 +22,8 @@ namespace file_manager_private = extensions::api::file_manager_private; +class DriveFsEventRouter; + // Manages creation/deletion and update of system notifications on behalf // of the File Manager application. class SystemNotificationManager { @@ -83,12 +86,56 @@ file_manager_private::CopyOrMoveProgressStatus& status); /** + * Processes volume mount completed events. + */ + void HandleMountCompletedEvent( + file_manager_private::MountCompletedEvent& event, + const Volume& volume); + + /** * Returns the message center display service that manages notifications. */ NotificationDisplayService* GetNotificationDisplayService(); + /** + * Stores a reference to the DriveFS event router instance. + */ + void SetDriveFSEventRouter(DriveFsEventRouter* drivefs_event_router); + private: /** + * Make notifications for DriveFS sync errors. + */ + std::unique_ptr<message_center::Notification> MakeDriveSyncErrorNotification( + const extensions::Event& event, + base::Value::ListView& event_arguments); + + /** + * Click handler for the Drive offline confirmation dialog notification. + */ + void HandleDriveDialogClick(absl::optional<int> button_index); + + /** + * Make notification from the DriveFS offline settings event. + */ + std::unique_ptr<message_center::Notification> + MakeDriveConfirmDialogNotification(const extensions::Event& event, + base::Value::ListView& event_arguments); + + /** + * Click handler for the removable device notification. + */ + void HandleRemovableNotificationClick(const std::string& path, + absl::optional<int> button_index); + + /** + * Makes a notification instance for removable devices. + */ + std::unique_ptr<message_center::Notification> MakeRemovableNotification( + file_manager_private::MountCompletedEvent& event, + const Volume& volume); + + /** * Helper function bound to notification instances that hides notifications. */ void Dismiss(const std::string& notification_id); @@ -99,6 +146,9 @@ std::map<int, double> required_copy_space_; Profile* const profile_; + // Reference to non-owned DriveFS event router. + DriveFsEventRouter* drivefs_event_router_; + // Caches the SWA feature flag. bool swa_enabled_; base::WeakPtrFactory<SystemNotificationManager> weak_ptr_factory_{this};
diff --git a/chrome/browser/chromeos/policy/DEPS b/chrome/browser/chromeos/policy/DEPS deleted file mode 100644 index f18c9e9a..0000000 --- a/chrome/browser/chromeos/policy/DEPS +++ /dev/null
@@ -1,13 +0,0 @@ -# TODO(https://crbug.com/1164001): When this file is edited, same file in -# //chrome/browser/ash/policy should be updated as well. We need to sync -# both files until the migration of //chrome/browser/chromeos/policy is done. -include_rules = [ - # Run - # - # buildtools/checkdeps/checkdeps.py chrome/browser/chromeos/policy - # - # to test. - # Allow includes for shell-encryption and private_membership third_party libs. - "+third_party/private_membership", - "+third_party/shell-encryption", -]
diff --git a/chrome/browser/chromeos/policy/DIR_METADATA b/chrome/browser/chromeos/policy/DIR_METADATA deleted file mode 100644 index 650bca92..0000000 --- a/chrome/browser/chromeos/policy/DIR_METADATA +++ /dev/null
@@ -1,6 +0,0 @@ -# TODO(https://crbug.com/1164001): When this file is edited, same file in -# //chrome/browser/ash/policy should be updated as well. We need to sync -# both files until the migration of //chrome/browser/chromeos/policy is done. -monorail: { - component: "OS>Software>Enterprise" -}
diff --git a/chrome/browser/chromeos/policy/OWNERS b/chrome/browser/chromeos/policy/OWNERS deleted file mode 100644 index f5d20cd..0000000 --- a/chrome/browser/chromeos/policy/OWNERS +++ /dev/null
@@ -1,3 +0,0 @@ -# TODO(https://crbug.com/1164001): Share OWNERS until the migration of -# //chrome/browser/chromeos/policy completes. -file://chrome/browser/ash/policy/OWNERS
diff --git a/chrome/browser/download/chrome_download_manager_delegate.h b/chrome/browser/download/chrome_download_manager_delegate.h index 16c7e30..4eba2c0 100644 --- a/chrome/browser/download/chrome_download_manager_delegate.h +++ b/chrome/browser/download/chrome_download_manager_delegate.h
@@ -27,6 +27,7 @@ #include "components/download/public/common/download_danger_type.h" #include "components/download/public/common/download_item.h" #include "components/download/public/common/download_path_reservation_tracker.h" +#include "components/safe_browsing/buildflags.h" #include "content/public/browser/download_manager_delegate.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/download/download_item_model.cc index 18476c6..92da7da 100644 --- a/chrome/browser/download/download_item_model.cc +++ b/chrome/browser/download/download_item_model.cc
@@ -31,6 +31,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/safe_browsing/download_protection/deep_scanning_request.h" #include "chrome/browser/safe_browsing/download_protection/download_feedback_service.h" +#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" #include "components/download/public/common/download_danger_type.h"
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc index f42bf4c..b65fdfe4 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
@@ -36,6 +36,7 @@ #include "chrome/browser/installable/installable_utils.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/safe_browsing/download_protection/download_protection_service.h" +#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/ui/file_system_access_dialogs.h" #include "chrome/common/chrome_paths.h" #include "components/content_settings/core/browser/host_content_settings_map.h"
diff --git a/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckFragmentView.java b/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckFragmentView.java index 8341627..1f5a39c 100644 --- a/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckFragmentView.java +++ b/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckFragmentView.java
@@ -9,7 +9,6 @@ import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; - import androidx.fragment.app.DialogFragment; import androidx.preference.PreferenceFragmentCompat; import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat; @@ -83,7 +82,9 @@ // by the system. mComponentDelegate.onDestroyFragment(); if (getActivity().isFinishing() - && mPasswordCheckReferrer == PasswordCheckReferrer.LEAK_DIALOG) { + && (mPasswordCheckReferrer == PasswordCheckReferrer.LEAK_DIALOG + || mPasswordCheckReferrer + == PasswordCheckReferrer.PHISHED_WARNING_DIALOG)) { mComponentDelegate.destroy(); } }
diff --git a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc index dcf65ba4..180d0b7 100644 --- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc +++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
@@ -747,11 +747,8 @@ // achieved by attaching an observer (SafeBrowsingUserInteractionObserver) to // the current WebContents. Create an observer and attach it to simulate a // delayed warning. - auto safe_browsing_service = - base::MakeRefCounted<safe_browsing::TestSafeBrowsingService>(); auto ui_manager = - base::MakeRefCounted<safe_browsing::TestSafeBrowsingUIManager>( - safe_browsing_service); + base::MakeRefCounted<safe_browsing::TestSafeBrowsingUIManager>(); security_interstitials::UnsafeResource resource; safe_browsing::SafeBrowsingUserInteractionObserver::CreateForWebContents( test_web_contents.get(), resource, /* is_main_frame= */ true, ui_manager);
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 2f10fe8..8c156eb 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1268,7 +1268,7 @@ ash::FamilyUserMetricsService::RegisterProfilePrefs(registry); ash::FamilyUserSessionMetrics::RegisterProfilePrefs(registry); chromeos::InlineLoginHandlerChromeOS::RegisterProfilePrefs(registry); - chromeos::first_run::RegisterProfilePrefs(registry); + ash::first_run::RegisterProfilePrefs(registry); ash::file_system_provider::RegisterProfilePrefs(registry); chromeos::full_restore::RegisterProfilePrefs(registry); ash::KerberosCredentialsManager::RegisterProfilePrefs(registry);
diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD.gn index 6ac28d92..366e22fa 100644 --- a/chrome/browser/resources/BUILD.gn +++ b/chrome/browser/resources/BUILD.gn
@@ -57,6 +57,7 @@ "chromeos:multidevice_setup_resources", "chromeos/accessibility:build", "chromeos/emoji_picker:resources", + "chromeos/enterprise_casting:resources", "chromeos/launcher_internals:resources", "chromeos/login:modulized_resources", "chromeos/login:resources",
diff --git a/chrome/browser/resources/chromeos/accessibility/select_to_speak/BUILD.gn b/chrome/browser/resources/chromeos/accessibility/select_to_speak/BUILD.gn index 4695c0f..b901c0a 100644 --- a/chrome/browser/resources/chromeos/accessibility/select_to_speak/BUILD.gn +++ b/chrome/browser/resources/chromeos/accessibility/select_to_speak/BUILD.gn
@@ -83,6 +83,7 @@ sources = [ # These are end-to-end tests. "paragraph_utils_overflow_test.js", + "select_to_speak_enhanced_voices_test.js", "select_to_speak_keystroke_selection_test.js", "select_to_speak_mouse_selection_test.js", "select_to_speak_navigation_control_test.js",
diff --git a/chrome/browser/resources/chromeos/accessibility/select_to_speak/prefs_manager.js b/chrome/browser/resources/chromeos/accessibility/select_to_speak/prefs_manager.js index 59d4554..fc7603fa 100644 --- a/chrome/browser/resources/chromeos/accessibility/select_to_speak/prefs_manager.js +++ b/chrome/browser/resources/chromeos/accessibility/select_to_speak/prefs_manager.js
@@ -42,6 +42,9 @@ /** @private {boolean} */ this.enhancedNetworkVoicesEnabled_ = true; + + /** @private {boolean} */ + this.enhancedVoicesDialogShown_ = false; } /** @@ -231,7 +234,8 @@ chrome.storage.sync.get( [ 'voice', 'rate', 'pitch', 'wordHighlight', 'highlightColor', - 'backgroundShading', 'navigationControls', 'enhancedNetworkVoices' + 'backgroundShading', 'navigationControls', 'enhancedNetworkVoices', + 'enhancedVoicesDialogShown' ], (prefs) => { if (prefs['voice']) { @@ -267,6 +271,14 @@ 'enhancedNetworkVoices': this.enhancedNetworkVoicesEnabled_ }); } + if (prefs['enhancedVoicesDialogShown'] !== undefined) { + this.enhancedVoicesDialogShown_ = + prefs['enhancedVoicesDialogShown']; + } else { + chrome.storage.sync.set({ + 'enhancedVoicesDialogShown': this.enhancedVoicesDialogShown_ + }); + } if (prefs['rate'] && prefs['pitch']) { // Removes 'rate' and 'pitch' prefs after migrating data to global // TTS settings if appropriate. @@ -372,6 +384,32 @@ enhancedNetworkVoicesEnabled() { return this.enhancedNetworkVoicesEnabled_; } + + /** + * Gets whether the initial popup authorizing enhanced network voices has been + * shown to the user or not. + * + * @returns {boolean} True if the initial popup dialog has been shown already. + */ + enhancedVoicesDialogShown() { + return this.enhancedVoicesDialogShown_; + } + + /** + * Sets whether enhanced network voices are enabled or not from initial popup. + * @param {boolean} enabled Specifies if the user enabled enhanced voices in + * the popup. + */ + setEnhancedNetworkVoicesFromDialog(enabled) { + if (enabled !== undefined) { + this.enhancedNetworkVoicesEnabled_ = enabled; + chrome.storage.sync.set( + {'enhancedNetworkVoices': this.enhancedNetworkVoicesEnabled_}); + this.enhancedVoicesDialogShown_ = true; + chrome.storage.sync.set( + {'enhancedVoicesDialogShown': this.enhancedVoicesDialogShown_}); + } + } } /**
diff --git a/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak.js b/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak.js index 7605bcb..5410df0 100644 --- a/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak.js +++ b/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak.js
@@ -192,6 +192,16 @@ this.navigationControlFlag_ = result; }); + /** + * Feature flag controlling availability of enhanced network voices + * @type {boolean} + */ + this.enhancedVoicesFlag_ = false; + chrome.accessibilityPrivate.isFeatureEnabled( + AccessibilityFeature.ENHANCED_NETWORK_VOICES, (result) => { + this.enhancedVoicesFlag_ = result; + }); + /** @private {number} Default speech rate set in system settings. */ this.systemSpeechRate_ = 1.0; chrome.settingsPrivate.getPref(SPEECH_RATE_KEY, (pref) => { @@ -922,21 +932,23 @@ */ startSpeech_(text) { this.prepareForSpeech_(true /* clearFocusRing */); - const options = this.prefsManager_.speechOptions(); - // Without nodes to anchor on, navigate is not supported. - this.supportsNavigationPanel_ = false; - options.onEvent = (event) => { - if (event.type === 'start') { - this.onStateChanged_(SelectToSpeakState.SPEAKING); - this.updateUi_(); - } else if ( - event.type === 'end' || event.type === 'interrupted' || - event.type === 'cancelled') { - // Automatically dismiss when we're at the end. - this.onStateChanged_(SelectToSpeakState.INACTIVE); - } - }; - this.ttsManager_.speak(text, options); + this.maybeShowEnhancedVoicesDialog_(() => { + const options = this.prefsManager_.speechOptions(); + // Without nodes to anchor on, navigate is not supported. + this.supportsNavigationPanel_ = false; + options.onEvent = (event) => { + if (event.type === 'start') { + this.onStateChanged_(SelectToSpeakState.SPEAKING); + this.updateUi_(); + } else if ( + event.type === 'end' || event.type === 'interrupted' || + event.type === 'cancelled') { + // Automatically dismiss when we're at the end. + this.onStateChanged_(SelectToSpeakState.INACTIVE); + } + }; + this.ttsManager_.speak(text, options); + }); } /** @@ -958,37 +970,39 @@ * @private */ startSpeechQueue_(nodes, opt_params) { - const params = opt_params || {}; - const clearFocusRing = params.clearFocusRing || false; - let startCharIndex = params.startCharIndex; - let endCharIndex = params.endCharIndex; + this.maybeShowEnhancedVoicesDialog_(() => { + const params = opt_params || {}; + const clearFocusRing = params.clearFocusRing || false; + let startCharIndex = params.startCharIndex; + let endCharIndex = params.endCharIndex; - this.prepareForSpeech_(clearFocusRing /* clear the focus ring */); + this.prepareForSpeech_(clearFocusRing /* clear the focus ring */); - if (nodes.length === 0) { - return; - } + if (nodes.length === 0) { + return; + } - // Remember the original first and last node in the given list, as - // |startCharIndex| and |endCharIndex| pertain to them. If, after SVG - // resorting, the first or last nodes are re-ordered, do not clip them. - const originalFirstNode = nodes[0]; - const originalLastNode = nodes[nodes.length - 1]; - // Sort any SVG child nodes, if present, by visual reading order. - NodeUtils.sortSvgNodesByReadingOrder(nodes); - // Override start or end index if original nodes were sorted. - if (originalFirstNode !== nodes[0]) { - startCharIndex = undefined; - } - if (originalLastNode !== nodes[nodes.length - 1]) { - endCharIndex = undefined; - } + // Remember the original first and last node in the given list, as + // |startCharIndex| and |endCharIndex| pertain to them. If, after SVG + // resorting, the first or last nodes are re-ordered, do not clip them. + const originalFirstNode = nodes[0]; + const originalLastNode = nodes[nodes.length - 1]; + // Sort any SVG child nodes, if present, by visual reading order. + NodeUtils.sortSvgNodesByReadingOrder(nodes); + // Override start or end index if original nodes were sorted. + if (originalFirstNode !== nodes[0]) { + startCharIndex = undefined; + } + if (originalLastNode !== nodes[nodes.length - 1]) { + endCharIndex = undefined; + } - this.supportsNavigationPanel_ = this.isNavigationPanelSupported_(nodes); - this.updateNodeGroups_(nodes, startCharIndex, endCharIndex); + this.supportsNavigationPanel_ = this.isNavigationPanelSupported_(nodes); + this.updateNodeGroups_(nodes, startCharIndex, endCharIndex); - // Play TTS according to the current state variables. - this.startCurrentNodeGroup_(); + // Play TTS according to the current state variables. + this.startCurrentNodeGroup_(); + }); } /** @@ -1541,6 +1555,38 @@ } /** + * Shows a dialog to the user on first-run after enhanced voices update, + * showing privacy disclaimer and asking if the user wants to turn on enhanced + * network voices. + * + * @param {function()} callback Called back after user has confirmed or + * canceled in the dialog. + */ + maybeShowEnhancedVoicesDialog_(callback) { + if (this.enhancedVoicesFlag_ && + !this.prefsManager_.enhancedVoicesDialogShown()) { + // TODO(crbug.com/1230227): Style this dialog to match UX mocks. + const title = + chrome.i18n.getMessage('select_to_speak_natural_voice_dialog_title'); + const description = chrome.i18n.getMessage( + 'select_to_speak_natural_voice_dialog_description'); + chrome.accessibilityPrivate.showConfirmationDialog( + title, description, (confirm) => { + this.prefsManager_.setEnhancedNetworkVoicesFromDialog(confirm); + if (callback !== undefined) { + callback(); + } + }); + } else { + // Flag not set or already shown, so we can continue the control flow + // synchronously. + if (callback !== undefined) { + callback(); + } + } + } + + /** * Updates the currently highlighted node word based on the current text * and the character index of an event. * @param {string} text The current text
diff --git a/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak_enhanced_voices_test.js b/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak_enhanced_voices_test.js new file mode 100644 index 0000000..6814a537 --- /dev/null +++ b/chrome/browser/resources/chromeos/accessibility/select_to_speak/select_to_speak_enhanced_voices_test.js
@@ -0,0 +1,109 @@ +// 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. + +GEN_INCLUDE(['select_to_speak_e2e_test_base.js']); +GEN_INCLUDE(['mock_tts.js']); + +SelectToSpeakEnhancedNetworkTtsVoicesTest = class extends SelectToSpeakE2ETest { + constructor() { + super(); + this.mockTts = new MockTts(); + chrome.tts = this.mockTts; + this.confirmationDialogShowCount_ = 0; + this.confirmationDialogResponse_ = true; + + chrome.accessibilityPrivate.showConfirmationDialog = + (title, description, callback) => { + this.confirmationDialogShowCount_ += 1; + callback(this.confirmationDialogResponse_); + }; + } + + /** @override */ + setUp() { + var runTest = this.deferRunTest(WhenTestDone.EXPECT); + + (async () => { + await importModule( + 'selectToSpeak', '/select_to_speak/select_to_speak_main.js'); + await importModule( + 'SelectToSpeakConstants', + '/select_to_speak/select_to_speak_constants.js'); + await importModule('PrefsManager', '/select_to_speak/prefs_manager.js'); + + runTest(); + })(); + } + + /** @override */ + get featureList() { + return {enabled: ['features::kEnhancedNetworkVoices']}; + } +}; + +TEST_F( + 'SelectToSpeakEnhancedNetworkTtsVoicesTest', + 'EnablesVoicesIfConfirmedInDialog', function() { + this.confirmationDialogResponse_ = true; + + this.runWithLoadedTree( + 'data:text/html;charset=utf-8,' + + '<p>This is some text</p>', + function(root) { + assertFalse(this.mockTts.currentlySpeaking()); + assertEquals(this.mockTts.pendingUtterances().length, 0); + this.mockTts.setOnSpeechCallbacks([this.newCallback(function( + utterance) { + // Speech starts asynchronously. + assertEquals(this.confirmationDialogShowCount_, 1); + assertTrue( + selectToSpeak.prefsManager_.enhancedVoicesDialogShown()); + assertTrue( + selectToSpeak.prefsManager_.enhancedNetworkVoicesEnabled()); + assertTrue(this.mockTts.currentlySpeaking()); + assertEquals(this.mockTts.pendingUtterances().length, 1); + this.assertEqualsCollapseWhitespace( + this.mockTts.pendingUtterances()[0], 'This is some text'); + })]); + const textNode = this.findTextNode(root, 'This is some text'); + const event = { + screenX: textNode.location.left + 1, + screenY: textNode.location.top + 1 + }; + this.triggerReadMouseSelectedText(event, event); + }); + }); + + +TEST_F( + 'SelectToSpeakEnhancedNetworkTtsVoicesTest', + 'DisablesVoicesIfCanceledInDialog', function() { + this.confirmationDialogResponse_ = false; + this.runWithLoadedTree( + 'data:text/html;charset=utf-8,' + + '<p>This is some text</p>', + function(root) { + assertFalse(this.mockTts.currentlySpeaking()); + assertEquals(this.mockTts.pendingUtterances().length, 0); + this.mockTts.setOnSpeechCallbacks([this.newCallback(function( + utterance) { + // Speech starts asynchronously. + assertEquals(this.confirmationDialogShowCount_, 1); + assertTrue( + selectToSpeak.prefsManager_.enhancedVoicesDialogShown()); + assertFalse( + selectToSpeak.prefsManager_.enhancedNetworkVoicesEnabled()); + assertTrue(this.mockTts.currentlySpeaking()); + assertEquals(this.mockTts.pendingUtterances().length, 1); + this.assertEqualsCollapseWhitespace( + this.mockTts.pendingUtterances()[0], 'This is some text'); + })]); + const textNode = this.findTextNode(root, 'This is some text'); + const event = { + screenX: textNode.location.left + 1, + screenY: textNode.location.top + 1 + }; + this.triggerReadMouseSelectedText(event, event); + }); + });
diff --git a/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings.grdp b/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings.grdp index 535be6b..b2eeb720 100644 --- a/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings.grdp +++ b/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings.grdp
@@ -114,4 +114,10 @@ <message desc="Sample text around which will be drawn a Select to Speak visual preview. This should be less than one line long." name="IDS_SELECT_TO_SPEAK_OPTIONS_SAMPLE_TEXT"> The quick brown fox jumped over the lazy dog. </message> +<message desc="Title of the dialog shown to users the first time they use Select to speak after the natural voices update." name="IDS_SELECT_TO_SPEAK_NATURAL_VOICE_DIALOG_TITLE"> + Use natural voice? +</message> +<message desc="Content of the dialog shown to users the first time they use Select to speak after the natural voices update." name="IDS_SELECT_TO_SPEAK_NATURAL_VOICE_DIALOG_DESCRIPTION"> + You can use a natural, human-like voice when your device is online. Text will be sent to Google for processing. You can turn this off any time in Settings. +</message> </grit-part>
diff --git a/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings_grdp/IDS_SELECT_TO_SPEAK_NATURAL_VOICE_DIALOG_DESCRIPTION.png.sha1 b/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings_grdp/IDS_SELECT_TO_SPEAK_NATURAL_VOICE_DIALOG_DESCRIPTION.png.sha1 new file mode 100644 index 0000000..171da66 --- /dev/null +++ b/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings_grdp/IDS_SELECT_TO_SPEAK_NATURAL_VOICE_DIALOG_DESCRIPTION.png.sha1
@@ -0,0 +1 @@ +1b6f00e02d27c97116c0731d3d62cbc76b6780b3 \ No newline at end of file
diff --git a/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings_grdp/IDS_SELECT_TO_SPEAK_NATURAL_VOICE_DIALOG_TITLE.png.sha1 b/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings_grdp/IDS_SELECT_TO_SPEAK_NATURAL_VOICE_DIALOG_TITLE.png.sha1 new file mode 100644 index 0000000..171da66 --- /dev/null +++ b/chrome/browser/resources/chromeos/accessibility/strings/select_to_speak_strings_grdp/IDS_SELECT_TO_SPEAK_NATURAL_VOICE_DIALOG_TITLE.png.sha1
@@ -0,0 +1 @@ +1b6f00e02d27c97116c0731d3d62cbc76b6780b3 \ No newline at end of file
diff --git a/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/bluetooth_pairing_dialog.html b/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/bluetooth_pairing_dialog.html index 4513bc5e..e9b397f 100644 --- a/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/bluetooth_pairing_dialog.html +++ b/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/bluetooth_pairing_dialog.html
@@ -5,7 +5,9 @@ width: 100%; } </style> -<bluetooth-dialog id="deviceDialog" no-cancel on-close="onDialogClose_" - pairing-device="[[pairingDevice_]]" - dialog-title="$i18n{bluetoothPairDeviceTitle}"> -</bluetooth-dialog> +<template is="dom-if" if="[[!isBluetoothRevampEnabled_]]" restamp> + <bluetooth-dialog id="deviceDialog" no-cancel on-close="onDialogClose_" + pairing-device="[[pairingDevice_]]" + dialog-title="$i18n{bluetoothPairDeviceTitle}"> + </bluetooth-dialog> +</template>
diff --git a/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/bluetooth_pairing_dialog.js b/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/bluetooth_pairing_dialog.js index 717aeaa..3d5c4c6 100644 --- a/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/bluetooth_pairing_dialog.js +++ b/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/bluetooth_pairing_dialog.js
@@ -8,8 +8,9 @@ import 'chrome://resources/cr_elements/cr_page_host_style_css.js'; import './strings.m.js'; +import {loadTimeData} from '//resources/js/load_time_data.m.js'; import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js'; -import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {afterNextRender, html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; /** * @fileoverview @@ -34,21 +35,38 @@ * @private */ pairingDevice_: Object, + + /** @private */ + isBluetoothRevampEnabled_: { + type: Boolean, + value() { + return loadTimeData.getBoolean('enableBluetoothRevamp'); + } + }, }, /** @override */ attached() { + if (this.isBluetoothRevampEnabled_) { + // TODO(crbug.com/1010321): Add revamp Bluetooth init logic here. + return; + } + let dialogArgs = chrome.getVariableValue('dialogArguments'); if (!dialogArgs) { // This situation currently only occurs if the user navigates to the debug // chrome://bluetooth-pairing. console.warn('No arguments were provided to the dialog.'); - this.$.deviceDialog.open(); + + // Wait for next render or deviceDialog has not been created yet. + afterNextRender(this, () => this.$$('#deviceDialog').open()); return; } let parsedDialogArgs = JSON.parse(dialogArgs); - this.connect_(parsedDialogArgs.address); + + // Wait for next render or deviceDialog has not been created yet. + afterNextRender(this, () => this.connect_(parsedDialogArgs.address)); }, /** @@ -56,12 +74,12 @@ * @private */ connect_(address) { - this.$.deviceDialog.open(); + this.$$('#deviceDialog').open(); chrome.bluetooth.getDevice(address, device => { this.pairingDevice_ = device; chrome.bluetoothPrivate.connect(address, result => { - var dialog = this.$.deviceDialog; + var dialog = this.$$('#deviceDialog'); dialog.endConnectionAttempt( this.pairingDevice_, true /* wasPairing */, chrome.runtime.lastError, result);
diff --git a/chrome/browser/resources/chromeos/enterprise_casting/BUILD.gn b/chrome/browser/resources/chromeos/enterprise_casting/BUILD.gn new file mode 100644 index 0000000..14d4854 --- /dev/null +++ b/chrome/browser/resources/chromeos/enterprise_casting/BUILD.gn
@@ -0,0 +1,48 @@ +# 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("//third_party/closure_compiler/compile_js.gni") +import("//tools/grit/grit_rule.gni") +import("//ui/webui/resources/tools/generate_grd.gni") + +assert(is_chromeos, "enterprise_casting is Chrome OS only.") + +mojo_grdp_file = "$target_gen_dir/mojo_resources.grdp" +resources_grd_file = "$target_gen_dir/resources.grd" + +generate_grd("build_mojo_grdp") { + input_files = [ "enterprise_casting.mojom-webui.js" ] + input_files_base_dir = rebase_path( + "${root_gen_dir}/mojom-webui/chrome/browser/ui/webui/chromeos/enterprise_casting", + "$root_build_dir") + deps = [ "//chrome/browser/ui/webui/chromeos/enterprise_casting:mojo_bindings_webui_js" ] + + grd_prefix = "enterprise_casting" + out_grd = mojo_grdp_file +} + +generate_grd("build_grd") { + input_files = [ "index.html" ] + input_files_base_dir = rebase_path(".", "//") + deps = [ ":build_mojo_grdp" ] + grdp_files = [ mojo_grdp_file ] + + grd_prefix = "enterprise_casting" + out_grd = resources_grd_file +} + +grit("resources") { + # These arguments are needed since the grd is generated at build time. + enable_input_discovery_for_gn_analyze = false + source = resources_grd_file + deps = [ ":build_grd" ] + + outputs = [ + "grit/enterprise_casting_resources.h", + "grit/enterprise_casting_resources_map.cc", + "grit/enterprise_casting_resources_map.h", + "enterprise_casting_resources.pak", + ] + output_dir = "$root_gen_dir/chrome" +}
diff --git a/chrome/browser/resources/chromeos/enterprise_casting/index.html b/chrome/browser/resources/chromeos/enterprise_casting/index.html new file mode 100644 index 0000000..d61adc5 --- /dev/null +++ b/chrome/browser/resources/chromeos/enterprise_casting/index.html
@@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <title>Cast Receiver</title> + <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> +</head> + +<body> + enterprise_casting Skeleton +</body> + +</html>
diff --git a/chrome/browser/resources/downloads/item.html b/chrome/browser/resources/downloads/item.html index 577f8a9..6ec3a75 100644 --- a/chrome/browser/resources/downloads/item.html +++ b/chrome/browser/resources/downloads/item.html
@@ -42,7 +42,6 @@ flex: none; margin: 6px auto; min-height: 103px; - position: relative; width: var(--downloads-card-width); } @@ -169,10 +168,6 @@ max-width: 100%; } - div[role='gridcell'] { - display: inline; - } - #name, #file-link { font-weight: 500; @@ -253,6 +248,10 @@ color: var(--controlled-by-active-link-color); } + .more-options { + display: flex; + flex-direction: column; + } cr-icon-button { --cr-icon-button-icon-size: 16px; @@ -262,11 +261,12 @@ #incognito { -webkit-mask-image: url(images/incognito_marker.svg); + align-self: flex-end; background-color: var(--cr-secondary-text-color); - bottom: 20px; height: 16px; - position: absolute; - right: 16px; + margin-block-end: 20px; + margin-block-start: auto; + margin-inline-end: 16px; width: 16px; } @@ -341,42 +341,42 @@ </template> <div id="safe" class="controls" hidden="[[isDangerous_]]"> - <div role="gridcell"> + <span role="gridcell" hidden="[[!hasShowInFolderLink_]]"> <a is="action-link" id="show" on-click="onShowTap_" - hidden="[[!hasShowInFolderLink_]]" focus-row-control + focus-row-control focus-type="show">[[data.showInFolderText]]</a> - </div> + </span> <template is="dom-if" if="[[data.retry]]"> - <div role="gridcell"> + <span role="gridcell"> <cr-button class="action-button" on-click="onRetryTap_" focus-row-control focus-type="retry"> $i18n{controlRetry} </cr-button> - </div> + </span> </template> <template is="dom-if" if="[[pauseOrResumeText_]]"> - <div role="gridcell"> + <span role="gridcell"> <cr-button on-click="onPauseOrResumeTap_" id="pauseOrResume" focus-row-control focus-type="pauseOrResume"> [[pauseOrResumeText_]] </cr-button> - </div> + </span> </template> <template is="dom-if" if="[[showOpenNow_]]" restamp> - <div role="gridcell"> + <span role="gridcell"> <cr-button on-click="onOpenNowTap_" id="openNow" class="action-button" focus-row-control focus-type="open"> $i18n{controlOpenNow} </cr-button> - </div> + </span> </template> <template is="dom-if" if="[[showCancel_]]"> - <div role="gridcell"> + <span role="gridcell"> <cr-button on-click="onCancelTap_" focus-row-control focus-type="cancel"> $i18n{controlCancel} </cr-button> - </div> + </span> </template> <span id="controlled-by"><!-- Text populated dynamically. --></span> </div> @@ -385,43 +385,44 @@ <div id="dangerous" class="controls"> <!-- Dangerous file types (e.g. .exe, .jar). --> <template is="dom-if" if="[[!isMalware_]]"> - <div role="gridcell"> + <span role="gridcell"> <cr-button on-click="onDiscardDangerousTap_" class="action-button" focus-row-control focus-type="discard">$i18n{dangerDiscard}</cr-button> - </div> - <div role="gridcell"> + </span> + <span role="gridcell"> <cr-button on-click="onSaveDangerousTap_" focus-row-control focus-type="save"> $i18n{dangerSave}</cr-button> - </div> + </span> </template> <!-- Things that safe browsing has determined to be dangerous. --> <template is="dom-if" if="[[isMalware_]]"> - <div role="gridcell"> + <span role="gridcell"> <cr-button on-click="onDiscardDangerousTap_" class="action-button" focus-row-control focus-type="discard"> $i18n{controlRemoveFromList}</cr-button> - </div> - <div role="gridcell"> + </span> + <span role="gridcell"> <cr-button on-click="onSaveDangerousTap_" focus-row-control focus-type="save"> $i18n{dangerRestore}</cr-button> - </div> + </span> </template> </div> </template> </div> - <div role="gridcell"> - <cr-icon-button class="icon-clear" - style$="[[computeRemoveStyle_(isDangerous_, showCancel_)]]" - id="remove" title="$i18n{controlRemoveFromList}" - aria-label$="[[controlRemoveFromListAriaLabel_]]" - on-click="onRemoveTap_" focus-row-control focus-type="remove"> - </cr-icon-button> - </div> - <div id="incognito" title="$i18n{inIncognito}" hidden="[[!data.otr]]"> + <div class="more-options"> + <div role="gridcell"> + <cr-icon-button class="icon-clear" + style$="[[computeRemoveStyle_(isDangerous_, showCancel_)]]" + id="remove" title="$i18n{controlRemoveFromList}" + aria-label$="[[controlRemoveFromListAriaLabel_]]" + on-click="onRemoveTap_" focus-row-control focus-type="remove"> + </cr-icon-button> + </div> + <div id="incognito" title="$i18n{inIncognito}" hidden="[[!data.otr]]"></div> </div> </div>
diff --git a/chrome/browser/resources/new_tab_page/icons/BUILD.gn b/chrome/browser/resources/new_tab_page/icons/BUILD.gn index eb88ea8..c0cf6e1 100644 --- a/chrome/browser/resources/new_tab_page/icons/BUILD.gn +++ b/chrome/browser/resources/new_tab_page/icons/BUILD.gn
@@ -16,6 +16,7 @@ "colored_header.svg", "colors.svg", "copy.svg", + "drive_logo.svg", "facebook.svg", "generic_globe.svg", "google_logo.svg",
diff --git a/chrome/browser/resources/new_tab_page/realbox/icons/drive_logo.svg b/chrome/browser/resources/new_tab_page/icons/drive_logo.svg similarity index 100% rename from chrome/browser/resources/new_tab_page/realbox/icons/drive_logo.svg rename to chrome/browser/resources/new_tab_page/icons/drive_logo.svg
diff --git a/chrome/browser/resources/new_tab_page/modules/drive_v2/BUILD.gn b/chrome/browser/resources/new_tab_page/modules/drive_v2/BUILD.gn index f1fca89..ee729189 100644 --- a/chrome/browser/resources/new_tab_page/modules/drive_v2/BUILD.gn +++ b/chrome/browser/resources/new_tab_page/modules/drive_v2/BUILD.gn
@@ -8,6 +8,7 @@ js_library("module") { deps = [ "..:module_descriptor", + "../..:i18n_setup", "//chrome/browser/resources/new_tab_page/modules/drive:drive_module_proxy", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", ]
diff --git a/chrome/browser/resources/new_tab_page/modules/drive_v2/module.html b/chrome/browser/resources/new_tab_page/modules/drive_v2/module.html index e1f5898..b1472e2 100644 --- a/chrome/browser/resources/new_tab_page/modules/drive_v2/module.html +++ b/chrome/browser/resources/new_tab_page/modules/drive_v2/module.html
@@ -6,11 +6,14 @@ width: 100%; } + ntp-module-header { + margin-bottom: 8px; + } + #files { display: flex; flex-direction: column; margin-bottom: 12px; - margin-top: 15px; } .file:hover { @@ -69,6 +72,17 @@ width: 24px; } </style> +<ntp-module-header + show-dismiss-button show-info-button-dropdown + dismiss-text="[[i18nRecursive('', + 'modulesDismissButtonText', + 'modulesDriveFilesLower')]]" + disable-text="[[i18nRecursive('', + 'modulesDisableButtonText', + 'modulesDriveSentence2')]]" + icon-src="icons/drive_logo.svg"> + [[i18n('modulesDriveTitle')]] +</ntp-module-header> <div id="files"> <template id="fileRepeat" is="dom-repeat" items="[[files]]"> <a class="file" href="[[item.itemUrl.url]]">
diff --git a/chrome/browser/resources/new_tab_page/modules/drive_v2/module.js b/chrome/browser/resources/new_tab_page/modules/drive_v2/module.js index 65f06c58..01d483dc69 100644 --- a/chrome/browser/resources/new_tab_page/modules/drive_v2/module.js +++ b/chrome/browser/resources/new_tab_page/modules/drive_v2/module.js
@@ -2,13 +2,22 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import '../module_header.js'; -import {loadTimeData} from '../../i18n_setup.js'; +import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + +import {I18nBehavior, loadTimeData} from '../../i18n_setup.js'; import {DriveProxy} from '../drive/drive_module_proxy.js'; import {ModuleDescriptor} from '../module_descriptor.js'; -class DriveModuleElement extends PolymerElement { +/** + * The Drive module, which serves as an inside look in to recent activity within + * a user's Google Drive. + * @polymer + * @extends {PolymerElement} + */ +class DriveModuleElement extends mixinBehaviors +([I18nBehavior], PolymerElement) { static get is() { return 'ntp-drive-module-redesigned'; }
diff --git a/chrome/browser/resources/new_tab_page/modules/module_header.html b/chrome/browser/resources/new_tab_page/modules/module_header.html index 6aad5dd..b758568d 100644 --- a/chrome/browser/resources/new_tab_page/modules/module_header.html +++ b/chrome/browser/resources/new_tab_page/modules/module_header.html
@@ -11,6 +11,22 @@ height: 22px; } + .icon-background { + align-items: center; + background-color: var(--ntp-module-scroll-button-color); + border-radius: 50%; + display: flex; + height: 18px; + justify-content: center; + margin-inline-end: 8px; + width: 18px; + } + + .module-icon { + height: 10px; + width: 10px; + } + #title { color: var(--cr-primary-text-color); font-size: 15px; @@ -44,6 +60,21 @@ margin-inline-end: -10px; } + :host([modules-redesigned-enabled_]) #menuButton { + background-color: var(--ntp-module-scroll-button-color); + height: 18px; + margin: 0; + width: 18px; + } + + :host([modules-redesigned-enabled_]) #menuButton:hover { + background-color: var(--ntp-module-scroll-button-hover-color); + } + + :host([modules-redesigned-enabled_]) .dropdown-item { + font-size: 13px; + } + #description { color: var(--cr-secondary-text-color); font-size: 12px; @@ -52,6 +83,11 @@ } </style> <div id="titleContainer"> + <template is="dom-if" if="[[iconSrc]]"> + <div class="icon-background"> + <img class="module-icon" src="[[iconSrc]]"></img> + </div> + </template> <span id="title"><slot></slot></span> <template is="dom-if" if="[[chipText]]"> <div id="chip">[[chipText]]</div> @@ -84,4 +120,9 @@ on-click="onCustomizeButtonClick_"> [[i18n('modulesCustomizeButtonText')]] </button> + <template is="dom-if" if="[[showInfoButtonDropdown]]"> + <button id="infoButton" class="dropdown-item"> + [[i18n('moduleInfoButtonTitle')]] + </button> + </template> </cr-action-menu>
diff --git a/chrome/browser/resources/new_tab_page/modules/module_header.js b/chrome/browser/resources/new_tab_page/modules/module_header.js index 6d75558..8f282845 100644 --- a/chrome/browser/resources/new_tab_page/modules/module_header.js +++ b/chrome/browser/resources/new_tab_page/modules/module_header.js
@@ -6,7 +6,7 @@ import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {I18nBehavior} from '../i18n_setup.js'; +import {I18nBehavior, loadTimeData} from '../i18n_setup.js'; /** * Element that displays a header inside a module. @@ -26,6 +26,12 @@ static get properties() { return { /** + * The src for the icon showing on the header. + * @type {string} + */ + iconSrc: String, + + /** * The chip text showing on the header. * @type {string} */ @@ -47,6 +53,17 @@ }, /** + * True if the redesigned modules are enabled. Will put the info + * button in the action menu dropdown instead of separate button next to + * the action menu. + * @type {boolean} + */ + showInfoButtonDropdown: { + type: Boolean, + value: false, + }, + + /** * True if the header should display a dismiss button. * @type {boolean} */ @@ -60,6 +77,13 @@ /** @type {string} */ disableText: String, + + /** @private */ + modulesRedesignedEnabled_: { + type: Boolean, + value: () => loadTimeData.getBoolean('modulesRedesignedEnabled'), + reflectToAttribute: true, + }, }; }
diff --git a/chrome/browser/resources/new_tab_page/realbox/icons/BUILD.gn b/chrome/browser/resources/new_tab_page/realbox/icons/BUILD.gn index d0865aa..2f4928e 100644 --- a/chrome/browser/resources/new_tab_page/realbox/icons/BUILD.gn +++ b/chrome/browser/resources/new_tab_page/realbox/icons/BUILD.gn
@@ -14,7 +14,6 @@ "drive_folder.svg", "drive_form.svg", "drive_image.svg", - "drive_logo.svg", "drive_pdf.svg", "drive_sheets.svg", "drive_slides.svg",
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc b/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc index 45786b6..0c0dbd9 100644 --- a/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc +++ b/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc
@@ -308,14 +308,9 @@ StringProvider sync_password_hash_provider = base::BindLambdaForTesting([=] { return sync_password_hash; }); - // TODO(crbug/925153): Port consumers of the SafeBrowsingService - // to use the interface in components/safe_browsing, and remove this - // cast. return std::make_unique<MockChromePasswordProtectionService>( profile(), new SafeBrowsingUIManager( - static_cast<safe_browsing::SafeBrowsingService*>( - SafeBrowsingService::CreateSafeBrowsingService()), std::make_unique<ChromeSafeBrowsingUIManagerDelegate>(), std::make_unique<ChromeSafeBrowsingBlockingPageFactory>(), GURL(chrome::kChromeUINewTabURL)),
diff --git a/chrome/browser/safe_browsing/chrome_ui_manager_delegate.cc b/chrome/browser/safe_browsing/chrome_ui_manager_delegate.cc index 5848801..107687b 100644 --- a/chrome/browser/safe_browsing/chrome_ui_manager_delegate.cc +++ b/chrome/browser/safe_browsing/chrome_ui_manager_delegate.cc
@@ -10,7 +10,9 @@ #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" #include "chrome/browser/prefetch/no_state_prefetch/chrome_no_state_prefetch_contents_delegate.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "content/public/browser/web_contents.h" +#include "services/network/public/cpp/cross_thread_pending_shared_url_loader_factory.h" #if BUILDFLAG(ENABLE_EXTENSIONS) #include "extensions/browser/process_manager.h" @@ -83,6 +85,17 @@ ServiceAccessType::EXPLICIT_ACCESS); } +PingManager* ChromeSafeBrowsingUIManagerDelegate::GetPingManagerIfExists() { + return g_browser_process->safe_browsing_service()->ping_manager(); +} + +scoped_refptr<network::SharedURLLoaderFactory> +ChromeSafeBrowsingUIManagerDelegate::GetURLLoaderFactory( + content::BrowserContext* browser_context) { + return g_browser_process->safe_browsing_service()->GetURLLoaderFactory( + browser_context); +} + bool ChromeSafeBrowsingUIManagerDelegate::IsMetricsAndCrashReportingEnabled() { return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(); }
diff --git a/chrome/browser/safe_browsing/chrome_ui_manager_delegate.h b/chrome/browser/safe_browsing/chrome_ui_manager_delegate.h index 8d34be8..a960530 100644 --- a/chrome/browser/safe_browsing/chrome_ui_manager_delegate.h +++ b/chrome/browser/safe_browsing/chrome_ui_manager_delegate.h
@@ -39,6 +39,9 @@ PrefService* GetPrefs(content::BrowserContext* browser_context) override; history::HistoryService* GetHistoryService( content::BrowserContext* browser_context) override; + PingManager* GetPingManagerIfExists() override; + scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory( + content::BrowserContext* browser_context) override; bool IsMetricsAndCrashReportingEnabled() override; };
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_browsertest.cc b/chrome/browser/safe_browsing/client_side_detection_host_browsertest.cc index 533d6b3..98e99b46 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host_browsertest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host_browsertest.cc
@@ -8,6 +8,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.h" #include "chrome/browser/safe_browsing/chrome_ui_manager_delegate.h" +#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/safe_browsing/ui_manager.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -79,7 +80,6 @@ public: MockSafeBrowsingUIManager() : SafeBrowsingUIManager( - nullptr, std::make_unique<ChromeSafeBrowsingUIManagerDelegate>(), std::make_unique<ChromeSafeBrowsingBlockingPageFactory>(), GURL(chrome::kChromeUINewTabURL)) {}
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc index 2fe3db7..54ecb353 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -150,9 +150,8 @@ class MockSafeBrowsingUIManager : public SafeBrowsingUIManager { public: - explicit MockSafeBrowsingUIManager(SafeBrowsingService* service) + MockSafeBrowsingUIManager() : SafeBrowsingUIManager( - service, std::make_unique<ChromeSafeBrowsingUIManagerDelegate>(), std::make_unique<ChromeSafeBrowsingBlockingPageFactory>(), GURL(chrome::kChromeUINewTabURL)) {} @@ -323,11 +322,7 @@ // Inject service classes. csd_service_ = std::make_unique<MockClientSideDetectionService>(); database_manager_ = new StrictMock<MockSafeBrowsingDatabaseManager>(); - ui_manager_ = new StrictMock<MockSafeBrowsingUIManager>( - // TODO(crbug/925153): Port consumers of the SafeBrowsingService to - // use the interface in components/safe_browsing, and remove this cast. - static_cast<safe_browsing::SafeBrowsingService*>( - SafeBrowsingService::CreateSafeBrowsingService())); + ui_manager_ = new StrictMock<MockSafeBrowsingUIManager>(); identity_test_env_.MakePrimaryAccountAvailable("user@gmail.com", signin::ConsentLevel::kSync);
diff --git a/chrome/browser/safe_browsing/download_protection/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection/download_protection_service.cc index e5eb6e74..b243a31 100644 --- a/chrome/browser/safe_browsing/download_protection/download_protection_service.cc +++ b/chrome/browser/safe_browsing/download_protection/download_protection_service.cc
@@ -31,6 +31,7 @@ #include "chrome/browser/safe_browsing/download_protection/download_url_sb_client.h" #include "chrome/browser/safe_browsing/download_protection/ppapi_download_request.h" #include "chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager_factory.h" +#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/safe_browsing/services_delegate.h" #include "chrome/common/safe_browsing/binary_feature_extractor.h" #include "chrome/common/safe_browsing/download_type_util.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index 802fa35..a9b5b36 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -279,7 +279,7 @@ SafeBrowsingUIManager* SafeBrowsingService::CreateUIManager() { return new SafeBrowsingUIManager( - this, std::make_unique<ChromeSafeBrowsingUIManagerDelegate>(), + std::make_unique<ChromeSafeBrowsingUIManagerDelegate>(), std::make_unique<ChromeSafeBrowsingBlockingPageFactory>(), GURL(chrome::kChromeUINewTabURL)); }
diff --git a/chrome/browser/safe_browsing/test_safe_browsing_service.cc b/chrome/browser/safe_browsing/test_safe_browsing_service.cc index 745e369..6e90411 100644 --- a/chrome/browser/safe_browsing/test_safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/test_safe_browsing_service.cc
@@ -76,7 +76,6 @@ void TestSafeBrowsingService::SetUIManager( TestSafeBrowsingUIManager* ui_manager) { - ui_manager->SetSafeBrowsingService(this); ui_manager_ = ui_manager; } @@ -202,15 +201,6 @@ // TestSafeBrowsingUIManager functions: TestSafeBrowsingUIManager::TestSafeBrowsingUIManager() : SafeBrowsingUIManager( - nullptr, - std::make_unique<ChromeSafeBrowsingUIManagerDelegate>(), - std::make_unique<ChromeSafeBrowsingBlockingPageFactory>(), - GURL(chrome::kChromeUINewTabURL)) {} - -TestSafeBrowsingUIManager::TestSafeBrowsingUIManager( - const scoped_refptr<SafeBrowsingService>& service) - : SafeBrowsingUIManager( - service, std::make_unique<ChromeSafeBrowsingUIManagerDelegate>(), std::make_unique<ChromeSafeBrowsingBlockingPageFactory>(), GURL(chrome::kChromeUINewTabURL)) {} @@ -218,16 +208,10 @@ TestSafeBrowsingUIManager::TestSafeBrowsingUIManager( std::unique_ptr<SafeBrowsingBlockingPageFactory> blocking_page_factory) : SafeBrowsingUIManager( - nullptr, std::make_unique<ChromeSafeBrowsingUIManagerDelegate>(), std::move(blocking_page_factory), GURL(chrome::kChromeUINewTabURL)) {} -void TestSafeBrowsingUIManager::SetSafeBrowsingService( - SafeBrowsingService* sb_service) { - sb_service_ = sb_service; -} - void TestSafeBrowsingUIManager::SendSerializedThreatDetails( content::BrowserContext* browser_context, const std::string& serialized) {
diff --git a/chrome/browser/safe_browsing/test_safe_browsing_service.h b/chrome/browser/safe_browsing/test_safe_browsing_service.h index 2719b9e9..846795e 100644 --- a/chrome/browser/safe_browsing/test_safe_browsing_service.h +++ b/chrome/browser/safe_browsing/test_safe_browsing_service.h
@@ -147,12 +147,9 @@ public: TestSafeBrowsingUIManager(); explicit TestSafeBrowsingUIManager( - const scoped_refptr<SafeBrowsingService>& service); - explicit TestSafeBrowsingUIManager( std::unique_ptr<SafeBrowsingBlockingPageFactory> blocking_page_factory); void SendSerializedThreatDetails(content::BrowserContext* browser_context, const std::string& serialized) override; - void SetSafeBrowsingService(SafeBrowsingService* sb_service); std::list<std::string>* GetThreatDetails(); protected:
diff --git a/chrome/browser/safe_browsing/threat_details_unittest.cc b/chrome/browser/safe_browsing/threat_details_unittest.cc index f063226..fdbcd3c 100644 --- a/chrome/browser/safe_browsing/threat_details_unittest.cc +++ b/chrome/browser/safe_browsing/threat_details_unittest.cc
@@ -165,7 +165,6 @@ // The safe browsing UI manager does not need a service for this test. MockSafeBrowsingUIManager() : SafeBrowsingUIManager( - nullptr, std::make_unique<ChromeSafeBrowsingUIManagerDelegate>(), std::make_unique<ChromeSafeBrowsingBlockingPageFactory>(), GURL(chrome::kChromeUINewTabURL)),
diff --git a/chrome/browser/safe_browsing/ui_manager.cc b/chrome/browser/safe_browsing/ui_manager.cc index bd3a299..9b62d36 100644 --- a/chrome/browser/safe_browsing/ui_manager.cc +++ b/chrome/browser/safe_browsing/ui_manager.cc
@@ -10,7 +10,6 @@ #include "base/metrics/histogram_macros.h" #include "base/threading/thread.h" #include "base/threading/thread_restrictions.h" -#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/safe_browsing/safe_browsing_subresource_tab_helper.h" #include "components/no_state_prefetch/browser/no_state_prefetch_contents.h" #include "components/prefs/pref_service.h" @@ -23,6 +22,7 @@ #include "components/security_interstitials/content/security_interstitial_tab_helper.h" #include "components/security_interstitials/content/unsafe_resource_util.h" #include "components/security_interstitials/core/unsafe_resource.h" +#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/navigation_entry.h" @@ -40,12 +40,10 @@ namespace safe_browsing { SafeBrowsingUIManager::SafeBrowsingUIManager( - const scoped_refptr<SafeBrowsingService>& service, std::unique_ptr<Delegate> delegate, std::unique_ptr<SafeBrowsingBlockingPageFactory> blocking_page_factory, const GURL& default_safe_page) - : sb_service_(service), - delegate_(std::move(delegate)), + : delegate_(std::move(delegate)), blocking_page_factory_(std::move(blocking_page_factory)), default_safe_page_(default_safe_page) {} @@ -56,12 +54,6 @@ if (shutdown) { shut_down_ = true; - - // Tests require this variable to be nulled out to avoid errors due to mocks - // being leaked. - // TODO(crbug.com/1226567): Eliminate the need for this as part of - // eliminating this class' dependence on SafeBrowsingService altogether. - sb_service_ = nullptr; } } @@ -178,14 +170,14 @@ // The service may delete the ping manager (i.e. when user disabling service, // etc). This happens on the IO thread. - if (shut_down_ || !sb_service_->ping_manager()) + if (shut_down_ || !delegate_->GetPingManagerIfExists()) return; DVLOG(1) << "ReportSafeBrowsingHit: " << hit_report.malicious_url << " " << hit_report.page_url << " " << hit_report.referrer_url << " " << hit_report.is_subresource << " " << hit_report.threat_type; - sb_service_->ping_manager()->ReportSafeBrowsingHit( - sb_service_->GetURLLoaderFactory(web_contents->GetBrowserContext()), + delegate_->GetPingManagerIfExists()->ReportSafeBrowsingHit( + delegate_->GetURLLoaderFactory(web_contents->GetBrowserContext()), hit_report); } @@ -270,13 +262,13 @@ // The service may delete the ping manager (i.e. when user disabling service, // etc). This happens on the IO thread. - if (shut_down_ || !sb_service_->ping_manager()) + if (shut_down_ || !delegate_->GetPingManagerIfExists()) return; if (!serialized.empty()) { DVLOG(1) << "Sending serialized threat details."; - sb_service_->ping_manager()->ReportThreatDetails( - sb_service_->GetURLLoaderFactory(browser_context), serialized); + delegate_->GetPingManagerIfExists()->ReportThreatDetails( + delegate_->GetURLLoaderFactory(browser_context), serialized); } }
diff --git a/chrome/browser/safe_browsing/ui_manager.h b/chrome/browser/safe_browsing/ui_manager.h index d1fa2a65..fad28ae 100644 --- a/chrome/browser/safe_browsing/ui_manager.h +++ b/chrome/browser/safe_browsing/ui_manager.h
@@ -14,7 +14,6 @@ #include "base/callback.h" #include "base/macros.h" #include "base/observer_list.h" -#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "components/safe_browsing/content/browser/base_ui_manager.h" #include "components/safe_browsing/content/browser/safe_browsing_blocking_page_factory.h" #include "components/security_interstitials/core/unsafe_resource.h" @@ -36,6 +35,7 @@ namespace safe_browsing { class BaseBlockingPage; +class PingManager; struct HitReport; @@ -108,12 +108,19 @@ virtual history::HistoryService* GetHistoryService( content::BrowserContext* browser_context) = 0; + // Gets the PingManager. This may be null. + virtual PingManager* GetPingManagerIfExists() = 0; + + // Gets the URLLoaderFactory attached to |browser_context|. Guaranteed to be + // non-null if GetPingManagerIfExists() is non-null. + virtual scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory( + content::BrowserContext* browser_context) = 0; + // Returns true if metrics reporting is enabled. virtual bool IsMetricsAndCrashReportingEnabled() = 0; }; SafeBrowsingUIManager( - const scoped_refptr<SafeBrowsingService>& service, std::unique_ptr<Delegate> delegate, std::unique_ptr<SafeBrowsingBlockingPageFactory> blocking_page_factory, const GURL& default_safe_page); @@ -195,9 +202,6 @@ const GURL& blocked_url, const UnsafeResource& unsafe_resource) override; - // Safebrowsing service. - scoped_refptr<SafeBrowsingService> sb_service_; - std::unique_ptr<Delegate> delegate_; std::unique_ptr<SafeBrowsingBlockingPageFactory> blocking_page_factory_;
diff --git a/chrome/browser/safe_browsing/ui_manager_unittest.cc b/chrome/browser/safe_browsing/ui_manager_unittest.cc index 33b37d7..3a95ac18 100644 --- a/chrome/browser/safe_browsing/ui_manager_unittest.cc +++ b/chrome/browser/safe_browsing/ui_manager_unittest.cc
@@ -8,28 +8,19 @@ #include "base/callback_helpers.h" #include "base/run_loop.h" #include "base/values.h" -#include "chrome/browser/history/history_service_factory.h" -#include "chrome/browser/net/system_network_context_manager.h" -#include "chrome/browser/password_manager/password_store_factory.h" -#include "chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.h" -#include "chrome/browser/safe_browsing/safe_browsing_metrics_collector_factory.h" -#include "chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager_factory.h" -#include "chrome/browser/safe_browsing/test_safe_browsing_service.h" #include "chrome/browser/safe_browsing/ui_manager.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" -#include "chrome/test/base/scoped_testing_local_state.h" -#include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_profile.h" -#include "components/password_manager/core/browser/mock_password_store.h" -#include "components/password_manager/core/browser/password_manager_test_utils.h" #include "components/prefs/testing_pref_service.h" #include "components/safe_browsing/content/browser/safe_browsing_blocking_page.h" #include "components/safe_browsing/content/browser/safe_browsing_blocking_page_factory.h" +#include "components/safe_browsing/content/browser/safe_browsing_controller_client.h" #include "components/safe_browsing/core/browser/db/util.h" #include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/security_interstitials/content/security_interstitial_controller_client.h" +#include "components/security_interstitials/content/settings_page_helper.h" #include "components/security_interstitials/content/unsafe_resource_util.h" #include "components/security_interstitials/core/base_safe_browsing_error_ui.h" +#include "components/security_interstitials/core/metrics_helper.h" #include "components/security_interstitials/core/unsafe_resource.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -42,6 +33,7 @@ #include "content/public/test/browser_task_environment.h" #include "content/public/test/navigation_simulator.h" #include "content/public/test/web_contents_tester.h" +#include "services/network/public/cpp/cross_thread_pending_shared_url_loader_factory.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" @@ -103,10 +95,16 @@ web_contents, main_frame_url, unsafe_resources, - ChromeSafeBrowsingBlockingPageFactory::CreateControllerClient( + std::make_unique<safe_browsing::SafeBrowsingControllerClient>( web_contents, - unsafe_resources, - manager), + std::make_unique<security_interstitials::MetricsHelper>( + unsafe_resources[0].url, + BaseBlockingPage::GetReportingInfo(unsafe_resources), + /*history_service=*/nullptr), + /*prefs=*/nullptr, + manager->app_locale(), + manager->default_safe_page(), + /*settings_helper=*/nullptr), BaseSafeBrowsingErrorUI::SBErrorDisplayOptions( BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), false, // is_extended_reporting_opt_in_allowed @@ -121,14 +119,10 @@ false, // is_safe_browsing_managed "cpn_safe_browsing"), // help_center_article_link true, // should_trigger_reporting - HistoryServiceFactory::GetForProfile( - Profile::FromBrowserContext(web_contents->GetBrowserContext()), - ServiceAccessType::EXPLICIT_ACCESS), - SafeBrowsingNavigationObserverManagerFactory::GetForBrowserContext( - web_contents->GetBrowserContext()), - SafeBrowsingMetricsCollectorFactory::GetForProfile( - Profile::FromBrowserContext(web_contents->GetBrowserContext())), - g_browser_process->safe_browsing_service()->trigger_manager()) { + /*history_service=*/nullptr, + /*navigation_observer_manager=*/nullptr, + /*metrics_collector=*/nullptr, + /*trigger_manager=*/nullptr) { // Don't delay details at all for the unittest. SetThreatDetailsProceedDelayForTesting(0); DontCreateViewForTesting(); @@ -188,6 +182,11 @@ content::BrowserContext* browser_context) override { return nullptr; } + PingManager* GetPingManagerIfExists() override { return nullptr; } + scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory( + content::BrowserContext* browser_context) override { + return nullptr; + } bool IsMetricsAndCrashReportingEnabled() override { return false; } void set_is_hosting_extension(bool is_hosting_extension) { @@ -202,13 +201,12 @@ class SafeBrowsingUIManagerTest : public ChromeRenderViewHostTestHarness { public: - SafeBrowsingUIManagerTest() - : scoped_testing_local_state_(TestingBrowserProcess::GetGlobal()) { + SafeBrowsingUIManagerTest() { auto ui_manager_delegate = std::make_unique<TestSafeBrowsingUIManagerDelegate>(); raw_ui_manager_delegate_ = ui_manager_delegate.get(); ui_manager_ = new SafeBrowsingUIManager( - nullptr, std::move(ui_manager_delegate), + std::move(ui_manager_delegate), std::make_unique<TestSafeBrowsingBlockingPageFactory>(), GURL("chrome://new-tab-page/")); } @@ -218,35 +216,6 @@ void SetUp() override { ChromeRenderViewHostTestHarness::SetUp(); SafeBrowsingUIManager::CreateAllowlistForTesting(web_contents()); - - safe_browsing::TestSafeBrowsingServiceFactory sb_service_factory; - auto* safe_browsing_service = - sb_service_factory.CreateSafeBrowsingService(); - TestingBrowserProcess::GetGlobal()->SetSafeBrowsingService( - safe_browsing_service); - g_browser_process->safe_browsing_service()->Initialize(); - // A profile was created already but SafeBrowsingService wasn't around to - // get notified of it, so include that notification now. - safe_browsing_service->OnProfileAdded( - Profile::FromBrowserContext(web_contents()->GetBrowserContext())); - content::BrowserThread::RunAllPendingTasksOnThreadForTesting( - content::BrowserThread::IO); - PasswordStoreFactory::GetInstance()->SetTestingFactoryAndUse( - profile(), - base::BindRepeating( - &password_manager::BuildPasswordStore< - content::BrowserContext, password_manager::MockPasswordStore>)); - } - - void TearDown() override { - TestingBrowserProcess::GetGlobal()->safe_browsing_service()->ShutDown(); - TestingBrowserProcess::GetGlobal()->SetSafeBrowsingService(nullptr); - - // Depends on LocalState from ChromeRenderViewHostTestHarness. - if (SystemNetworkContextManager::GetInstance()) - SystemNetworkContextManager::DeleteInstance(); - - ChromeRenderViewHostTestHarness::TearDown(); } bool IsAllowlisted(security_interstitials::UnsafeResource resource) { @@ -309,7 +278,6 @@ private: scoped_refptr<SafeBrowsingUIManager> ui_manager_; TestSafeBrowsingUIManagerDelegate* raw_ui_manager_delegate_ = nullptr; - ScopedTestingLocalState scoped_testing_local_state_; }; TEST_F(SafeBrowsingUIManagerTest, Allowlist) {
diff --git a/chrome/browser/safe_browsing/user_interaction_observer.cc b/chrome/browser/safe_browsing/user_interaction_observer.cc index 80c222c..644b22aaa 100644 --- a/chrome/browser/safe_browsing/user_interaction_observer.cc +++ b/chrome/browser/safe_browsing/user_interaction_observer.cc
@@ -11,10 +11,12 @@ #include "chrome/browser/profiles/profile.h" #include "components/omnibox/browser/omnibox_prefs.h" #include "components/prefs/pref_service.h" +#include "components/safe_browsing/buildflags.h" #include "components/safe_browsing/core/common/features.h" #include "content/public/browser/navigation_handle.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +#include "extensions/buildflags/buildflags.h" #include "third_party/blink/public/common/input/web_mouse_event.h" #include "ui/events/keycodes/keyboard_codes.h"
diff --git a/chrome/browser/sharesheet/sharesheet_service.cc b/chrome/browser/sharesheet/sharesheet_service.cc index 84832ef..876a5209 100644 --- a/chrome/browser/sharesheet/sharesheet_service.cc +++ b/chrome/browser/sharesheet/sharesheet_service.cc
@@ -149,6 +149,7 @@ delegate->OnActionLaunched(); share_action->LaunchAction(delegate, share_action_view, std::move(intent)); } else if (type == TargetType::kArcApp || type == TargetType::kWebApp) { + DCHECK(intent); LaunchApp(target_name, std::move(intent)); delegate->CloseSharesheet(SharesheetResult::kSuccess); }
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 5fe3d69..0ea370da 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -2328,6 +2328,8 @@ "webui/chromeos/emoji/emoji_page_handler.h", "webui/chromeos/emoji/emoji_ui.cc", "webui/chromeos/emoji/emoji_ui.h", + "webui/chromeos/enterprise_casting/enterprise_casting_ui.cc", + "webui/chromeos/enterprise_casting/enterprise_casting_ui.h", "webui/chromeos/image_source.cc", "webui/chromeos/image_source.h", "webui/chromeos/in_session_password_change/base_lock_dialog.cc", @@ -2761,6 +2763,7 @@ "//chrome/browser/ui/webui/app_management:mojo_bindings", "//chrome/browser/ui/webui/chromeos/add_supervision:mojo_bindings", "//chrome/browser/ui/webui/chromeos/crostini_upgrader:mojo_bindings", + "//chrome/browser/ui/webui/chromeos/enterprise_casting:mojo_bindings", "//chrome/browser/ui/webui/chromeos/launcher_internals:mojo_bindings", "//chrome/browser/ui/webui/chromeos/vm:mojo_bindings", "//chrome/browser/ui/webui/nearby_share:mojom",
diff --git a/chrome/browser/ui/app_list/arc/arc_app_utils.cc b/chrome/browser/ui/app_list/arc/arc_app_utils.cc index 8d2fa19..25a984c 100644 --- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc +++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc
@@ -51,6 +51,7 @@ #include "components/arc/metrics/arc_metrics_service.h" #include "components/arc/mojom/intent_helper.mojom.h" #include "components/arc/session/arc_bridge_service.h" +#include "components/full_restore/full_restore_utils.h" #include "components/language/core/browser/pref_names.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_context.h" @@ -373,7 +374,13 @@ } } - arc::ArcBootPhaseMonitorBridge::RecordFirstAppLaunchDelayUMA(context); + // App launched by user rather than full restore. + if (window_info && + window_info->window_id <= + full_restore::kArcSessionIdOffsetForRestoredLaunching) { + arc::ArcBootPhaseMonitorBridge::RecordFirstAppLaunchDelayUMA(context); + } + ChromeShelfController* chrome_controller = ChromeShelfController::instance(); // chrome_controller may be null in tests.
diff --git a/chrome/browser/ui/ash/sharesheet/sharesheet_header_view.cc b/chrome/browser/ui/ash/sharesheet/sharesheet_header_view.cc index 742bb463..722193e 100644 --- a/chrome/browser/ui/ash/sharesheet/sharesheet_header_view.cc +++ b/chrome/browser/ui/ash/sharesheet/sharesheet_header_view.cc
@@ -29,6 +29,7 @@ #include "chrome/common/chrome_features.h" #include "chrome/grit/generated_resources.h" #include "chromeos/ui/vector_icons/vector_icons.h" +#include "components/url_formatter/url_formatter.h" #include "storage/browser/file_system/file_system_context.h" #include "storage/browser/file_system/file_system_url.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -392,7 +393,21 @@ text_fields.push_back(base::UTF8ToUTF16(extracted_text)); if (extracted_url.is_valid()) { - text_fields.push_back(base::ASCIIToUTF16(extracted_url.spec())); + // We format the URL to match the location bar so the user is not + // surprised by what is being shared. This means: + // - International characters are unescaped (human readable) where safe. + // - Characters representing emojis are unescaped. + // - No elisions that change the meaning of the URL. + // - Spaces are not unescaped. We cannot share a URL with unescaped spaces + // as the receiving program may think the URL ends at the space. Hence we + // align the preview with the content to be shared. + const auto format_types = url_formatter::kFormatUrlOmitDefaults & + ~url_formatter::kFormatUrlOmitHTTP; + const auto formatted_text = url_formatter::FormatUrl( + extracted_url, format_types, net::UnescapeRule::NORMAL, + /*new_parsed=*/nullptr, + /*prefix_end=*/nullptr, /*offset_for_adjustment=*/nullptr); + text_fields.push_back(formatted_text); text_icon_ = TextPlaceholderIcon::kLink; } }
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc index 294a50ab..7586f9ec 100644 --- a/chrome/browser/ui/views/download/download_item_view.cc +++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -249,6 +249,39 @@ } } // namespace +class DownloadItemView::ContextMenuButton : public views::ImageButton { + public: + METADATA_HEADER(ContextMenuButton); + + explicit ContextMenuButton(DownloadItemView* owner) + : views::ImageButton( + base::BindRepeating(&DownloadItemView::DropdownButtonPressed, + base::Unretained(owner))), + owner_(owner) { + views::ConfigureVectorImageButton(this); + SetAccessibleName(l10n_util::GetStringUTF16( + IDS_DOWNLOAD_ITEM_DROPDOWN_BUTTON_ACCESSIBLE_TEXT)); + SetBorder(views::CreateEmptyBorder(gfx::Insets(10))); + SetHasInkDropActionOnClick(false); + } + + bool OnMousePressed(const ui::MouseEvent& event) override { + suppress_button_release_ = owner_->GetDropdownPressed(); + return ImageButton::OnMousePressed(event); + } + + bool IsTriggerableEvent(const ui::Event& event) override { + return !event.IsMouseEvent() || !suppress_button_release_; + } + + private: + DownloadItemView* const owner_; + bool suppress_button_release_ = false; +}; + +BEGIN_METADATA(DownloadItemView, ContextMenuButton, views::ImageButton) +END_METADATA + DownloadItemView::DownloadItemView(DownloadUIModel::DownloadUIModelPtr model, DownloadShelfView* shelf, views::View* accessible_alert) @@ -326,14 +359,7 @@ base::Unretained(this)), l10n_util::GetStringUTF16(IDS_REVIEW_DOWNLOAD))); - dropdown_button_ = - AddChildView(views::CreateVectorImageButton(base::BindRepeating( - &DownloadItemView::DropdownButtonPressed, base::Unretained(this)))); - dropdown_button_->SetAccessibleName(l10n_util::GetStringUTF16( - IDS_DOWNLOAD_ITEM_DROPDOWN_BUTTON_ACCESSIBLE_TEXT)); - dropdown_button_->SetBorder(views::CreateEmptyBorder(gfx::Insets(10))); - dropdown_button_->SetHasInkDropActionOnClick(false); - dropdown_button_->SizeToPreferredSize(); + dropdown_button_ = AddChildView(std::make_unique<ContextMenuButton>(this)); complete_animation_.SetSlideDuration(base::TimeDelta::FromMilliseconds(2500)); complete_animation_.SetTweenType(gfx::Tween::LINEAR); @@ -1221,6 +1247,7 @@ dropdown_pressed_ ? vector_icons::kCaretDownIcon : vector_icons::kCaretUpIcon, GetThemeProvider()->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT)); + dropdown_button_->SizeToPreferredSize(); } void DownloadItemView::OpenButtonPressed() { @@ -1340,15 +1367,22 @@ static_cast<views::internal::RootView*>(GetWidget()->GetRootView()) ->SetMouseAndGestureHandler(nullptr); - const auto release_dropdown = [](DownloadItemView* view) { - view->SetDropdownPressed(false); + const auto release_dropdown = [](base::WeakPtr<DownloadItemView> view) { // Make sure any new status from activating a context menu option is read. view->announce_accessible_alert_soon_ = true; + + // The context menu is destroyed before the button's MousePressed() + // function (which wants to know if the button was already pressed) is + // reached -- so delay marking the button as "released" until the callstack + // unwinds. + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(&DownloadItemView::SetDropdownPressed, + std::move(view), false)); }; - context_menu_.Run( - GetWidget()->GetTopLevelWidget(), rect, source_type, - base::BindRepeating(std::move(release_dropdown), base::Unretained(this))); + context_menu_.Run(GetWidget()->GetTopLevelWidget(), rect, source_type, + base::BindRepeating(std::move(release_dropdown), + weak_ptr_factory_.GetWeakPtr())); } void DownloadItemView::OpenDownloadDuringAsyncScanning() {
diff --git a/chrome/browser/ui/views/download/download_item_view.h b/chrome/browser/ui/views/download/download_item_view.h index 406c8b0..29eb3ba 100644 --- a/chrome/browser/ui/views/download/download_item_view.h +++ b/chrome/browser/ui/views/download/download_item_view.h
@@ -121,6 +121,8 @@ float new_device_scale_factor) override; private: + class ContextMenuButton; + // Sets the current mode to |mode| and updates UI appropriately. void SetMode(download::DownloadItemMode mode); download::DownloadItemMode GetMode() const;
diff --git a/chrome/browser/ui/views/file_system_access/file_system_access_browsertest.cc b/chrome/browser/ui/views/file_system_access/file_system_access_browsertest.cc index 9137581..48c552a 100644 --- a/chrome/browser/ui/views/file_system_access/file_system_access_browsertest.cc +++ b/chrome/browser/ui/views/file_system_access/file_system_access_browsertest.cc
@@ -15,6 +15,7 @@ #include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/safe_browsing/download_protection/download_protection_service.h" +#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/frame/toolbar_button_provider.h"
diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc index 6a44e6de..006c2c6a 100644 --- a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc +++ b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc
@@ -614,6 +614,7 @@ } } title_label_->SetText(title, is_filename); + domain_label_->SetText(domain, absl::nullopt); const bool alternate_layout = UseAlternateHoverCardFormat(); if (alert_state_ != old_alert_state) { @@ -652,13 +653,6 @@ thumbnail_view_->SetRoundedCorners(corners, corner_radius_.value_or(0)); } } - - domain_label_->SetText(domain, absl::nullopt); - - // Because we may have changed the card's contents, if the card has yet to be - // shown, ensure that it starts at the correct size. - if (!GetWidget()->IsVisible()) - SizeToContents(); } void TabHoverCardBubbleView::SetTextFade(double percent) {
diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc b/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc index 3146bcb..8a582c2 100644 --- a/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc +++ b/chrome/browser/ui/views/tabs/tab_hover_card_controller.cc
@@ -277,6 +277,7 @@ if (update_type == TabController::HoverCardUpdateType::kTabDataChanged) { DCHECK(IsHoverCardShowingForTab(tab)); UpdateCardContent(tab); + slide_animator_->UpdateTargetBounds(); return; } @@ -332,6 +333,7 @@ CreateHoverCard(target_tab_); UpdateCardContent(target_tab_); + slide_animator_->UpdateTargetBounds(); MaybeStartThumbnailObservation(target_tab_, is_initial); // Ensure the hover card Widget assumes the highest z-order to avoid occlusion
diff --git a/chrome/browser/ui/views/toolbar/app_menu.cc b/chrome/browser/ui/views/toolbar/app_menu.cc index ad830a7..42ce95c3 100644 --- a/chrome/browser/ui/views/toolbar/app_menu.cc +++ b/chrome/browser/ui/views/toolbar/app_menu.cc
@@ -856,20 +856,22 @@ return menu_runner_.get() && menu_runner_->IsRunning(); } -void AppMenu::GetLabelStyle(int command_id, LabelStyle* style) const { - if (IsRecentTabsCommand(command_id)) { - const gfx::FontList* font_list = - recent_tabs_menu_model_delegate_->GetLabelFontListForCommandId( - command_id); - // Only fill in |*color| if there's a font list - otherwise this method will - // override the color for every recent tab item, not just the header. - if (font_list) { - // TODO(ellyjones): Use CONTEXT_MENU instead of CONTEXT_LABEL. - style->foreground = views::style::GetColor( - *root_, views::style::CONTEXT_LABEL, views::style::STYLE_PRIMARY); - style->font_list = *font_list; - } - } +const gfx::FontList* AppMenu::GetLabelFontList(int command_id) const { + return IsRecentTabsCommand(command_id) + ? recent_tabs_menu_model_delegate_->GetLabelFontListForCommandId( + command_id) + : nullptr; +} + +absl::optional<SkColor> AppMenu::GetLabelColor(int command_id) const { + // Only return a color if there's a font list - otherwise this method will + // return a color for every recent tab item, not just the header. + // TODO(ellyjones): Use CONTEXT_MENU instead of CONTEXT_LABEL. + return GetLabelFontList(command_id) + ? absl::optional<SkColor>( + views::style::GetColor(*root_, views::style::CONTEXT_LABEL, + views::style::STYLE_PRIMARY)) + : absl::nullopt; } std::u16string AppMenu::GetTooltipText(int command_id,
diff --git a/chrome/browser/ui/views/toolbar/app_menu.h b/chrome/browser/ui/views/toolbar/app_menu.h index 494e0ba..ac575e0 100644 --- a/chrome/browser/ui/views/toolbar/app_menu.h +++ b/chrome/browser/ui/views/toolbar/app_menu.h
@@ -56,7 +56,8 @@ views::MenuItemView* root_menu_item() { return root_; } // MenuDelegate overrides: - void GetLabelStyle(int command_id, LabelStyle* style) const override; + const gfx::FontList* GetLabelFontList(int command_id) const override; + absl::optional<SkColor> GetLabelColor(int command_id) const override; std::u16string GetTooltipText(int command_id, const gfx::Point& p) const override; bool IsTriggerableEvent(views::MenuItemView* menu,
diff --git a/chrome/browser/ui/web_applications/web_app_launch_manager.cc b/chrome/browser/ui/web_applications/web_app_launch_manager.cc index d168606..359f0b0c 100644 --- a/chrome/browser/ui/web_applications/web_app_launch_manager.cc +++ b/chrome/browser/ui/web_applications/web_app_launch_manager.cc
@@ -182,6 +182,13 @@ return false; } +WebAppLaunchManager::OpenApplicationCallback& +GetOpenApplicationCallbackForTesting() { + static base::NoDestructor<WebAppLaunchManager::OpenApplicationCallback> + callback; + return *callback; +} + } // namespace Browser* CreateWebApplicationWindow(Profile* profile, @@ -237,8 +244,8 @@ if (params.container == apps::mojom::LaunchContainer::kLaunchContainerWindow) RecordAppWindowLaunch(profile_, params.app_id); - if (GetOpenApplicationCallback()) - return GetOpenApplicationCallback().Run(std::move(params)); + if (GetOpenApplicationCallbackForTesting()) + return GetOpenApplicationCallbackForTesting().Run(std::move(params)); // Determine the launch URL. bool is_share_intent = @@ -444,7 +451,7 @@ // static void WebAppLaunchManager::SetOpenApplicationCallbackForTesting( OpenApplicationCallback callback) { - GetOpenApplicationCallback() = std::move(callback); + GetOpenApplicationCallbackForTesting() = std::move(callback); } void WebAppLaunchManager::LaunchWebApplication( @@ -473,14 +480,6 @@ std::move(callback).Run(browser, container); } -// static -WebAppLaunchManager::OpenApplicationCallback& -WebAppLaunchManager::GetOpenApplicationCallback() { - static base::NoDestructor<OpenApplicationCallback> callback; - - return *callback; -} - void RecordAppWindowLaunch(Profile* profile, const std::string& app_id) { WebAppProvider* provider = WebAppProvider::Get(profile); if (!provider)
diff --git a/chrome/browser/ui/web_applications/web_app_launch_manager.h b/chrome/browser/ui/web_applications/web_app_launch_manager.h index a23ab7e..484b501 100644 --- a/chrome/browser/ui/web_applications/web_app_launch_manager.h +++ b/chrome/browser/ui/web_applications/web_app_launch_manager.h
@@ -67,8 +67,6 @@ apps::mojom::LaunchContainer container)> callback); - static OpenApplicationCallback& GetOpenApplicationCallback(); - Profile* const profile_; WebAppProvider* const provider_;
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index ee35f2a..b834729 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -206,6 +206,7 @@ #include "chrome/browser/ui/webui/chromeos/cryptohome_ui.h" #include "chrome/browser/ui/webui/chromeos/drive_internals_ui.h" #include "chrome/browser/ui/webui/chromeos/emoji/emoji_ui.h" +#include "chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting_ui.h" #include "chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_network_ui.h" #include "chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_start_reauth_ui.h" #include "chrome/browser/ui/webui/chromeos/in_session_password_change/password_change_ui.h" @@ -800,6 +801,9 @@ return &NewWebUI<chromeos::DriveInternalsUI>; if (url.host_piece() == chrome::kChromeUILauncherInternalsHost) return &NewWebUI<chromeos::LauncherInternalsUI>; + if (base::FeatureList::IsEnabled(features::kEnterpriseCastingUI) && + url.host_piece() == chrome::kChromeUIEnterpriseCastingHost) + return &NewWebUI<chromeos::EnterpriseCastingUI>; if (url.host_piece() == chromeos::kChromeUIHelpAppHost) return &NewComponentUI<chromeos::HelpAppUI, ChromeHelpAppUIDelegate>; if (url.host_piece() == chrome::kChromeUIMobileSetupHost)
diff --git a/chrome/browser/ui/webui/chromeos/enterprise_casting/BUILD.gn b/chrome/browser/ui/webui/chromeos/enterprise_casting/BUILD.gn new file mode 100644 index 0000000..1a73667 --- /dev/null +++ b/chrome/browser/ui/webui/chromeos/enterprise_casting/BUILD.gn
@@ -0,0 +1,12 @@ +# 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("//mojo/public/tools/bindings/mojom.gni") + +assert(is_chromeos, "EnterpriseCasting is Chrome OS only.") + +mojom("mojo_bindings") { + sources = [ "enterprise_casting.mojom" ] + webui_module_path = "/" +}
diff --git a/chrome/browser/ui/webui/chromeos/enterprise_casting/OWNERS b/chrome/browser/ui/webui/chromeos/enterprise_casting/OWNERS new file mode 100644 index 0000000..57d67b8 --- /dev/null +++ b/chrome/browser/ui/webui/chromeos/enterprise_casting/OWNERS
@@ -0,0 +1,7 @@ +gbj@google.com +bmalcolm@google.com +bzielinski@google.com +jacqueli@google.com + +per-file *.mojom=set noparent +per-file *.mojom=file://ipc/SECURITY_OWNERS
diff --git a/chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting.mojom b/chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting.mojom new file mode 100644 index 0000000..6b5b694 --- /dev/null +++ b/chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting.mojom
@@ -0,0 +1,11 @@ +// 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. + +module enterprise_casting.mojom; + +// Interface for creating enterprise_casting handlers. Implemented by the WebUI +// controller and used by chrome://enterprise-casting. +interface PageHandlerFactory { + // TODO(b/193421383): Add a CreatePageHandler method. +};
diff --git a/chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting_ui.cc b/chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting_ui.cc new file mode 100644 index 0000000..cebd129 --- /dev/null +++ b/chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting_ui.cc
@@ -0,0 +1,42 @@ +// 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. + +#include "chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting_ui.h" + +#include "base/containers/span.h" +#include "chrome/browser/ui/webui/webui_util.h" +#include "chrome/common/webui_url_constants.h" +#include "chrome/grit/enterprise_casting_resources.h" +#include "chrome/grit/enterprise_casting_resources_map.h" +#include "content/public/browser/web_contents.h" +#include "content/public/browser/web_ui_data_source.h" + +namespace chromeos { + +EnterpriseCastingUI::EnterpriseCastingUI(content::WebUI* web_ui) + : MojoWebUIController(web_ui) { + auto source = base::WrapUnique( + content::WebUIDataSource::Create(chrome::kChromeUIEnterpriseCastingHost)); + webui::SetupWebUIDataSource(source.get(), + base::make_span(kEnterpriseCastingResources, + kEnterpriseCastingResourcesSize), + IDR_ENTERPRISE_CASTING_INDEX_HTML); + + content::BrowserContext* browser_context = + web_ui->GetWebContents()->GetBrowserContext(); + content::WebUIDataSource::Add(browser_context, source.release()); +} + +EnterpriseCastingUI::~EnterpriseCastingUI() = default; + +void EnterpriseCastingUI::BindInterface( + mojo::PendingReceiver<enterprise_casting::mojom::PageHandlerFactory> + receiver) { + factory_receiver_.reset(); + factory_receiver_.Bind(std::move(receiver)); +} + +WEB_UI_CONTROLLER_TYPE_IMPL(EnterpriseCastingUI) + +} // namespace chromeos
diff --git a/chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting_ui.h b/chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting_ui.h new file mode 100644 index 0000000..92ecb6b1 --- /dev/null +++ b/chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting_ui.h
@@ -0,0 +1,40 @@ +// 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. + +#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_ENTERPRISE_CASTING_ENTERPRISE_CASTING_UI_H_ +#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_ENTERPRISE_CASTING_ENTERPRISE_CASTING_UI_H_ + +#include "chrome/browser/ui/webui/chromeos/enterprise_casting/enterprise_casting.mojom.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/receiver.h" +#include "ui/webui/mojo_web_ui_controller.h" + +namespace chromeos { + +// The WebUI controller for chrome://enterprise-casting. +class EnterpriseCastingUI + : public ui::MojoWebUIController, + public enterprise_casting::mojom::PageHandlerFactory { + public: + explicit EnterpriseCastingUI(content::WebUI* web_ui); + ~EnterpriseCastingUI() override; + + EnterpriseCastingUI(const EnterpriseCastingUI&) = delete; + EnterpriseCastingUI& operator=(const EnterpriseCastingUI&) = delete; + + void BindInterface( + mojo::PendingReceiver<enterprise_casting::mojom::PageHandlerFactory> + receiver); + + private: + mojo::Receiver<enterprise_casting::mojom::PageHandlerFactory> + factory_receiver_{this}; + + WEB_UI_CONTROLLER_TYPE_DECL(); +}; + +} // namespace chromeos + +#endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_ENTERPRISE_CASTING_ENTERPRISE_CASTING_UI_H_
diff --git a/chrome/browser/ui/webui/management/management_ui_handler.cc b/chrome/browser/ui/webui/management/management_ui_handler.cc index 90aa7b0..1f923b1 100644 --- a/chrome/browser/ui/webui/management/management_ui_handler.cc +++ b/chrome/browser/ui/webui/management/management_ui_handler.cc
@@ -53,10 +53,10 @@ #include "chrome/browser/ash/policy/networking/policy_cert_service_factory.h" #include "chrome/browser/ash/policy/status_collector/device_status_collector.h" #include "chrome/browser/ash/policy/status_collector/status_collector.h" +#include "chrome/browser/ash/policy/uploading/status_uploader.h" +#include "chrome/browser/ash/policy/uploading/system_log_uploader.h" #include "chrome/browser/ash/profiles/profile_helper.h" #include "chrome/browser/ash/settings/cros_settings.h" -#include "chrome/browser/chromeos/policy/uploading/status_uploader.h" -#include "chrome/browser/chromeos/policy/uploading/system_log_uploader.h" #include "chrome/browser/ui/webui/management/management_ui_handler_chromeos.h" #include "chrome/browser/ui/webui/webui_util.h" #include "chrome/grit/chromium_strings.h"
diff --git a/chrome/browser/ui/webui/management/management_ui_handler_unittest.cc b/chrome/browser/ui/webui/management/management_ui_handler_unittest.cc index 806d18af..4c0038e 100644 --- a/chrome/browser/ui/webui/management/management_ui_handler_unittest.cc +++ b/chrome/browser/ui/webui/management/management_ui_handler_unittest.cc
@@ -52,10 +52,10 @@ #include "chrome/browser/ash/policy/enrollment/device_cloud_policy_initializer.h" #include "chrome/browser/ash/policy/status_collector/device_status_collector.h" #include "chrome/browser/ash/policy/status_collector/status_collector.h" +#include "chrome/browser/ash/policy/uploading/status_uploader.h" +#include "chrome/browser/ash/policy/uploading/system_log_uploader.h" #include "chrome/browser/ash/settings/device_settings_test_helper.h" #include "chrome/browser/ash/settings/scoped_testing_cros_settings.h" -#include "chrome/browser/chromeos/policy/uploading/status_uploader.h" -#include "chrome/browser/chromeos/policy/uploading/system_log_uploader.h" #include "chrome/browser/prefs/browser_prefs.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h"
diff --git a/chrome/browser/ui/webui/realbox/realbox_handler.cc b/chrome/browser/ui/webui/realbox/realbox_handler.cc index d6fe3bb..6cd7f312 100644 --- a/chrome/browser/ui/webui/realbox/realbox_handler.cc +++ b/chrome/browser/ui/webui/realbox/realbox_handler.cc
@@ -68,7 +68,7 @@ "realbox/icons/drive_folder.svg"; constexpr char kDriveFormIconResourceName[] = "realbox/icons/drive_form.svg"; constexpr char kDriveImageIconResourceName[] = "realbox/icons/drive_image.svg"; -constexpr char kDriveLogoIconResourceName[] = "realbox/icons/drive_logo.svg"; +constexpr char kDriveLogoIconResourceName[] = "icons/drive_logo.svg"; constexpr char kDrivePdfIconResourceName[] = "realbox/icons/drive_pdf.svg"; constexpr char kDriveSheetsIconResourceName[] = "realbox/icons/drive_sheets.svg";
diff --git a/chrome/browser/web_applications/components/web_app_protocol_handler_registration_win.cc b/chrome/browser/web_applications/components/web_app_protocol_handler_registration_win.cc index c88665f..3ff9ea9d 100644 --- a/chrome/browser/web_applications/components/web_app_protocol_handler_registration_win.cc +++ b/chrome/browser/web_applications/components/web_app_protocol_handler_registration_win.cc
@@ -102,7 +102,8 @@ // Remove protocol associations from the Windows registry. ShellUtil::RemoveAppProtocolAssociations( - web_app::GetProgIdForApp(profile_path, app_id)); + web_app::GetProgIdForApp(profile_path, app_id), + /*elevate_if_not_admin=*/true); } } // namespace
diff --git a/chrome/browser/web_applications/os_integration_manager.cc b/chrome/browser/web_applications/os_integration_manager.cc index 83d2a20..5c03b885 100644 --- a/chrome/browser/web_applications/os_integration_manager.cc +++ b/chrome/browser/web_applications/os_integration_manager.cc
@@ -396,6 +396,8 @@ // Disable protocol handler unregistration on Win7 due to bad interactions // between preinstalled app scenarios and the need for elevation to unregister // protocol handlers on that platform. See crbug.com/1224327 for context. + // TODO(crbug.com/1224747): remove this check and remove Win7 protocol handler + // support in Shell classes. #if defined(OS_WIN) if (base::win::GetVersion() == base::win::Version::WIN7) { std::move(callback).Run(true); @@ -538,6 +540,8 @@ // Disable protocol handler unregistration on Win7 due to bad interactions // between preinstalled app scenarios and the need for elevation to unregister // protocol handlers on that platform. See crbug.com/1224327 for context. + // TODO(crbug.com/1224747): remove this check and remove Win7 protocol handler + // support in Shell classes. #if defined(OS_WIN) if (base::win::GetVersion() == base::win::Version::WIN7) { std::move(callback).Run(true);
diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni index 7b81197..f872878 100644 --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni
@@ -203,6 +203,7 @@ "$root_gen_dir/chrome/bluetooth_pairing_dialog_resources.pak", "$root_gen_dir/chrome/browser/supervised_user/supervised_user_unscaled_resources.pak", "$root_gen_dir/chrome/emoji_picker_resources.pak", + "$root_gen_dir/chrome/enterprise_casting_resources.pak", "$root_gen_dir/chrome/internet_config_dialog_resources.pak", "$root_gen_dir/chrome/internet_detail_dialog_resources.pak", "$root_gen_dir/chrome/launcher_internals_resources.pak", @@ -244,6 +245,7 @@ "//chrome/browser/resources:internet_detail_dialog_resources", "//chrome/browser/resources/chromeos:multidevice_setup_resources", "//chrome/browser/resources/chromeos/emoji_picker:resources", + "//chrome/browser/resources/chromeos/enterprise_casting:resources", "//chrome/browser/resources/chromeos/launcher_internals:resources", "//chrome/browser/resources/chromeos/login:modulized_resources", "//chrome/browser/resources/chromeos/login:resources",
diff --git a/chrome/common/extensions/api/autotest_private.idl b/chrome/common/extensions/api/autotest_private.idl index 5f266ac..58d30d1 100644 --- a/chrome/common/extensions/api/autotest_private.idl +++ b/chrome/common/extensions/api/autotest_private.idl
@@ -501,6 +501,8 @@ HotseatSwipeDescriptor swipeUp; HotseatState state; boolean isAnimating; + // Whether the shelf is hidden with auto-hide enabled. + boolean isAutoHidden; }; // The ui information of shelf components, including hotseat and
diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc index 8c48088..1ec4a1d 100644 --- a/chrome/common/webui_url_constants.cc +++ b/chrome/common/webui_url_constants.cc
@@ -73,6 +73,8 @@ const char kChromeUIEDUCoexistenceLoginURLV1[] = "chrome://chrome-signin/edu"; const char kChromeUIEDUCoexistenceLoginURLV2[] = "chrome://chrome-signin/edu-coexistence"; +const char kChromeUIEnterpriseCastingHost[] = "enterprise-casting"; +const char kChromeUIEnterpriseCastingURL[] = "chrome://enterprise-casting/"; const char kChromeUIExtensionIconHost[] = "extension-icon"; const char kChromeUIExtensionIconURL[] = "chrome://extension-icon/"; const char kChromeUIExtensionsHost[] = "extensions";
diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_constants.h index f41a17d25..0855b9ed 100644 --- a/chrome/common/webui_url_constants.h +++ b/chrome/common/webui_url_constants.h
@@ -75,6 +75,8 @@ extern const char kChromeUIDriveInternalsHost[]; extern const char kChromeUIEDUCoexistenceLoginURLV1[]; extern const char kChromeUIEDUCoexistenceLoginURLV2[]; +extern const char kChromeUIEnterpriseCastingHost[]; +extern const char kChromeUIEnterpriseCastingURL[]; extern const char kChromeUIExtensionIconHost[]; extern const char kChromeUIExtensionIconURL[]; extern const char kChromeUIExtensionsHost[];
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index 7fb6bcd..b5f65de 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc
@@ -35,6 +35,7 @@ #include "base/process/process.h" #include "base/process/process_metrics.h" #include "base/strings/string_number_conversions.h" +#include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" @@ -924,6 +925,38 @@ chrome_exe, suffix, protocol_associations.value(), false)) { status = installer::IN_USE_UPDATED; } + } else if (cmd_line.HasSwitch( + installer::switches::kRegisterWebAppURLProtocols)) { + const std::wstring switch_value = cmd_line.GetSwitchValueNative( + installer::switches::kRegisterWebAppURLProtocols); + std::vector<std::wstring> switch_parts = base::SplitString( + switch_value, L":", base::WhitespaceHandling::TRIM_WHITESPACE, + base::SplitResult::SPLIT_WANT_NONEMPTY); + + if (switch_parts.size() == 2) { + std::wstring prog_id = switch_parts[0]; + std::vector<std::wstring> protocols = base::SplitString( + switch_parts[1], L",", base::WhitespaceHandling::TRIM_WHITESPACE, + base::SplitResult::SPLIT_WANT_NONEMPTY); + + // ShellUtil::RegisterChromeForProtocol performs all registration + // done by ShellUtil::RegisterChromeBrowser, as well as registering + // with Windows as capable of handling the supplied protocols. + if (!protocols.empty() && !prog_id.empty() && + ShellUtil::RegisterApplicationForProtocols(protocols, prog_id, + chrome_exe, false)) { + status = installer::IN_USE_UPDATED; + } + } + } else if (cmd_line.HasSwitch( + installer::switches::kUnregisterWebAppProgId)) { + const std::wstring prog_id = cmd_line.GetSwitchValueNative( + installer::switches::kUnregisterWebAppProgId); + + if (!prog_id.empty() && + ShellUtil::RemoveAppProtocolAssociations(prog_id, false)) { + status = installer::IN_USE_UPDATED; + } } else { if (ShellUtil::RegisterChromeBrowser(chrome_exe, suffix, /*elevate_if_not_admin=*/false))
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc index e22ef8b..5b1d1c9 100644 --- a/chrome/installer/util/shell_util.cc +++ b/chrome/installer/util/shell_util.cc
@@ -1484,6 +1484,13 @@ return std::make_unique<RegistryEntry>(user_choice_path.c_str(), kRegProgId); } +// Checks if the current user has selected a default handler for |protocol|. +bool DoesProtocolHaveUserChoiceHandler(const std::wstring& protocol) { + std::vector<std::unique_ptr<RegistryEntry>> entries; + entries.push_back(GetProtocolUserChoiceEntry(protocol)); + return AreEntriesAsDesired(entries, RegistryEntry::LOOK_IN_HKCU); +} + // Gets a ProtocolAssociations instance containing a single association where // |protocol| is handled by the default HTML browser handler. ShellUtil::ProtocolAssociations GetBrowserProtocolAssociation( @@ -1596,61 +1603,6 @@ best_effort_no_rollback); } -// Registers a set of protocols for a particular application in the Windows -// registry. -// -// This method is not supported and should not be called in Windows versions -// prior to Win8, where write access to HKLM is required. -// -// |protocols| is the set of protocols to register. Must not be empty. -// |prog_id| is the ProgId used by Windows for protocol associations with this -// application. Must not be empty or start with a '.'. -// |chrome_exe|: the full path to chrome.exe. -bool RegisterApplicationForProtocols(const std::vector<std::wstring>& protocols, - const std::wstring& prog_id, - const base::FilePath& chrome_exe) { - DCHECK_GT(base::win::GetVersion(), base::win::Version::WIN7); - - std::vector<std::unique_ptr<RegistryEntry>> entries; - ShellUtil::ApplicationInfo app_info = - ShellUtil::GetApplicationInfoForProgId(prog_id); - - // Build the Windows Default Programs capabilities key for the app. - // "HKEY_CURRENT_USER\Software\[CompanyPathName\]ProductPathName[install_suffix]\AppProtocolHandlers\|prog_id|\Capabilities". - std::wstring capabilities_path = base::StrCat( - {install_static::GetRegistryPath(), ShellUtil::kRegAppProtocolHandlers, - kFilePathSeparator, prog_id, L"\\Capabilities"}); - - entries.push_back(std::make_unique<RegistryEntry>( - capabilities_path, ShellUtil::kRegApplicationName, - app_info.application_name)); - - // Use name as app description if description from |prog_id| registration is - // empty. - std::wstring app_description = app_info.application_description.empty() - ? app_info.application_name - : app_info.application_description; - entries.push_back(std::make_unique<RegistryEntry>( - capabilities_path, ShellUtil::kRegApplicationDescription, - app_description)); - - // Create URLAssociations - const std::wstring url_associations = - base::StrCat({std::wstring(capabilities_path), L"\\URLAssociations"}); - - for (const auto& protocol : protocols) { - entries.push_back( - std::make_unique<RegistryEntry>(url_associations, protocol, prog_id)); - } - - // Add the |prog_id| value to HKEY_CURRENT_USER\RegisteredApplications. - entries.push_back(std::make_unique<RegistryEntry>( - ShellUtil::kRegRegisteredApplications, prog_id, capabilities_path)); - - return AreEntriesAsDesired(entries, RegistryEntry::LOOK_IN_HKCU) || - ShellUtil::AddRegistryEntries(HKEY_CURRENT_USER, entries); -} - } // namespace const wchar_t* ShellUtil::kRegAppProtocolHandlers = L"\\AppProtocolHandlers"; @@ -2694,14 +2646,12 @@ const std::vector<std::wstring>& protocols, const std::wstring& prog_id) { base::FilePath chrome_exe; - DCHECK_GT(base::win::GetVersion(), base::win::Version::WIN7); - if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); return false; } - if (!RegisterApplicationForProtocols(protocols, prog_id, chrome_exe)) { + if (!RegisterApplicationForProtocols(protocols, prog_id, chrome_exe, true)) { return false; } @@ -2719,6 +2669,27 @@ if (!AddRegistryEntries(HKEY_CURRENT_USER, entries)) success = false; + // On Windows 7, set this protocol as default for uncontested protocols. + // This is necessary to cause Windows to recognize this protocol + // in "Default Apps" Windows UI. This is not required for contested + // protocols as Windows has already recognized those protocols in + // Windows UI, and we don't wish to override existing defaults. + if (base::win::GetVersion() == base::win::Version::WIN7 && + !DoesProtocolHaveUserChoiceHandler(protocol)) { + Microsoft::WRL::ComPtr<IApplicationAssociationRegistration> registration; + HRESULT hr = + ::CoCreateInstance(CLSID_ApplicationAssociationRegistration, nullptr, + CLSCTX_INPROC, IID_PPV_ARGS(®istration)); + + if (FAILED(hr) || !registration) + success = false; + + hr = registration->SetAppAsDefault(prog_id.c_str(), protocol.c_str(), + AT_URLPROTOCOL); + if (FAILED(hr)) + success = false; + } + // On Windows 10, removing the existing user choice for a given protocol // forces Windows to present a disambiguation dialog the next time this // protocol is invoked from the OS. @@ -2737,23 +2708,115 @@ } // static -bool ShellUtil::RemoveAppProtocolAssociations(const std::wstring& prog_id) { - DCHECK_GT(base::win::GetVersion(), base::win::Version::WIN7); +bool ShellUtil::RegisterApplicationForProtocols( + const std::vector<std::wstring>& protocols, + const std::wstring& prog_id, + const base::FilePath& chrome_exe, + bool elevate_if_not_admin) { + HKEY root = base::win::GetVersion() == base::win::Version::WIN7 + ? HKEY_LOCAL_MACHINE + : HKEY_CURRENT_USER; - // Delete the |prog_id| value from HKEY_CURRENT_USER\RegisteredApplications. - InstallUtil::DeleteRegistryValue(HKEY_CURRENT_USER, - ShellUtil::kRegRegisteredApplications, - WorkItem::kWow64Default, prog_id); + // Register directly if we can, otherwise elevate and use the installer. + if (root == HKEY_CURRENT_USER || IsUserAnAdmin()) { + std::vector<std::unique_ptr<RegistryEntry>> entries; - // Delete the key - // HKEY_CURRENT_USER\Software\[CompanyPathName\]ProductPathName[install_suffix]\AppProtocolHandlers\|prog_id|. - std::wstring app_key_path(install_static::GetRegistryPath()); - app_key_path.append(ShellUtil::kRegAppProtocolHandlers); - app_key_path.push_back(base::FilePath::kSeparators[0]); - app_key_path.append(prog_id); + ShellUtil::ApplicationInfo app_info = GetApplicationInfoForProgId(prog_id); - return InstallUtil::DeleteRegistryKey(HKEY_CURRENT_USER, app_key_path, - WorkItem::kWow64Default); + // Build the Windows Default Programs capabilities key for the app. + // "<root_hkey>\Software\[CompanyPathName\]ProductPathName[install_suffix]\AppProtocolHandlers\|prog_id|\Capabilities". + std::wstring capabilities_path = base::StrCat( + {install_static::GetRegistryPath(), ShellUtil::kRegAppProtocolHandlers, + kFilePathSeparator, prog_id, L"\\Capabilities"}); + + entries.push_back(std::make_unique<RegistryEntry>( + capabilities_path, ShellUtil::kRegApplicationName, + app_info.application_name)); + + // Use name as app description if description from |prog_id| registration is + // empty. The description is required for the app to show in various places + // of Windows 7. + std::wstring app_description = app_info.application_description.empty() + ? app_info.application_name + : app_info.application_description; + entries.push_back(std::make_unique<RegistryEntry>( + capabilities_path, ShellUtil::kRegApplicationDescription, + app_description)); + + // Create URLAssociations + const std::wstring url_associations = + base::StrCat({std::wstring(capabilities_path), L"\\URLAssociations"}); + + for (const auto& protocol : protocols) { + entries.push_back( + std::make_unique<RegistryEntry>(url_associations, protocol, prog_id)); + } + + // Add the |prog_id| value to <root hkey>\RegisteredApplications. + entries.push_back(std::make_unique<RegistryEntry>( + ShellUtil::kRegRegisteredApplications, prog_id, capabilities_path)); + + uint32_t look_for_in = root == HKEY_CURRENT_USER + ? RegistryEntry::LOOK_IN_HKCU + : RegistryEntry::LOOK_IN_HKLM; + + return AreEntriesAsDesired(entries, look_for_in) || + ShellUtil::AddRegistryEntries(root, entries); + } + + // Admin rights are required to modify system-level protocol associations. + if (!elevate_if_not_admin) + return false; + + // Elevate to do the whole job + std::wstring protocols_switch_value = base::JoinString(protocols, L","); + base::CommandLine::SwitchMap switches{ + {installer::switches::kRegisterWebAppURLProtocols, + prog_id + L":" + protocols_switch_value}}; + std::wstring suffix; + + return GetInstallationSpecificSuffix(chrome_exe, &suffix) && + ElevateAndRegisterChrome(chrome_exe, suffix, &switches); +} + +bool ShellUtil::RemoveAppProtocolAssociations(const std::wstring& prog_id, + bool elevate_if_not_admin) { + HKEY root = base::win::GetVersion() == base::win::Version::WIN7 + ? HKEY_LOCAL_MACHINE + : HKEY_CURRENT_USER; + + if (root == HKEY_CURRENT_USER || IsUserAnAdmin()) { + // Delete the |prog_id| value from <root hkey>\RegisteredApplications. + InstallUtil::DeleteRegistryValue(root, + ShellUtil::kRegRegisteredApplications, + WorkItem::kWow64Default, prog_id); + + // Delete the key + // <root_hkey>\Software\[CompanyPathName\]ProductPathName[install_suffix]\AppProtocolHandlers\|prog_id|. + std::wstring app_key_path = base::StrCat( + {install_static::GetRegistryPath(), ShellUtil::kRegAppProtocolHandlers, + kFilePathSeparator, prog_id}); + + return InstallUtil::DeleteRegistryKey(root, app_key_path, + WorkItem::kWow64Default); + } + + // Admin rights are required to modify system-level protocol associations. + if (!elevate_if_not_admin) + return false; + + base::FilePath chrome_exe; + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) + return false; + + std::wstring suffix; + if (!GetInstallationSpecificSuffix(chrome_exe, &suffix)) + return false; + + // Elevate to do the whole job. + base::CommandLine::SwitchMap switches{ + {installer::switches::kUnregisterWebAppProgId, prog_id}}; + return ElevateAndRegisterChrome(chrome_exe, suffix, &switches); } // static
diff --git a/chrome/installer/util/shell_util.h b/chrome/installer/util/shell_util.h index df911a9..5a7bb0a3 100644 --- a/chrome/installer/util/shell_util.h +++ b/chrome/installer/util/shell_util.h
@@ -795,19 +795,39 @@ // designated as the non-default handler for the corresponding protocol. For // protocols uncontested by other handlers on the OS, the app will be // promoted to default handler. - // - // This method is not supported and should not be called in Windows versions - // prior to Win8, where write access to HKLM is required. static bool AddAppProtocolAssociations( const std::vector<std::wstring>& protocols, const std::wstring& prog_id); - // Removes all protocol associations for a particular web app from the Windows + // Registers a set of protocols for a particular application in the Windows // registry. // - // This method is not supported and should not be called in Windows versions - // prior to Win8, where write access to HKLM is required. - static bool RemoveAppProtocolAssociations(const std::wstring& prog_id); + // This method requires write access to HKLM (prior to Win8). + // If write to HKLM is required, but fails, and: + // - |elevate_if_not_admin| is true: + // tries to launch setup.exe with admin privileges (by prompting the user + // with a UAC) to do these tasks. + // - |elevate_if_not_admin| is false: + // adds the ProgId entries to HKCU. These entries will not make the app show + // in Default Programs but they are still useful because the app can be + // registered to run when the user clicks on a protocol link. + // + // |protocols| is the set of protocols to register. Must not be empty. + // |prog_id| is the ProgId used by Windows for protocol associations with this + // application. Must not be empty or start with a '.'. + // |chrome_exe|: the full path to chrome.exe. + // |elevate_if_not_admin| if true will make this method try alternate methods + // as described above. + static bool RegisterApplicationForProtocols( + const std::vector<std::wstring>& protocols, + const std::wstring& prog_id, + const base::FilePath& chrome_exe, + bool elevate_if_not_admin); + + // Removes all protocol associations for a particular web app from the Windows + // registry. + static bool RemoveAppProtocolAssociations(const std::wstring& prog_id, + bool elevate_if_not_admin); // Returns the browser's ProgId for the current install. static std::wstring GetProgIdForBrowser(const base::FilePath& chrome_exe);
diff --git a/chrome/installer/util/shell_util_unittest.cc b/chrome/installer/util/shell_util_unittest.cc index 7ad5516..abb9a39 100644 --- a/chrome/installer/util/shell_util_unittest.cc +++ b/chrome/installer/util/shell_util_unittest.cc
@@ -1398,7 +1398,7 @@ ASSERT_TRUE(ShellUtil::AddAppProtocolAssociations(app_protocols, app_progid)); // Delete associations and ensure that the protocol entry does not exist. - EXPECT_TRUE(ShellUtil::RemoveAppProtocolAssociations(app_progid)); + EXPECT_TRUE(ShellUtil::RemoveAppProtocolAssociations(app_progid, false)); // Ensure that the software registration key was removed. // "<root_hkey>\Software\[CompanyPathName\]ProductPathName[install_suffix]\AppProtocolHandlers\|prog_id|".
diff --git a/chrome/installer/util/util_constants.cc b/chrome/installer/util/util_constants.cc index 69e0e20..8bc66950 100644 --- a/chrome/installer/util/util_constants.cc +++ b/chrome/installer/util/util_constants.cc
@@ -133,6 +133,11 @@ // in addition to the standard set of protocols. const char kRegisterURLProtocol[] = "register-url-protocol"; +// Specifies a comma-separated list of protocols to add as protocol associations +// for a web application, preceded by the prog_id of that web application. +// --register-web-app-url-protocols=<progid>:<protocol>,<protocol>,<protocol>..] +const char kRegisterWebAppURLProtocols[] = "register-web-app-url-protocols"; + // Removes Chrome registration from current machine. Requires admin rights. const char kRemoveChromeRegistration[] = "remove-chrome-registration"; @@ -172,6 +177,10 @@ // path given by --new-setup-exe. const char kUpdateSetupExe[] = "update-setup-exe"; +// Switch to pass the ProdId of a web application to be unregistered for +// protocol handling. +const char kUnregisterWebAppProgId[] = "unregister-web-app-prog-id"; + // Enable verbose logging (info level). const char kVerboseLogging[] = "verbose-logging";
diff --git a/chrome/installer/util/util_constants.h b/chrome/installer/util/util_constants.h index dec1a69..1445a9e 100644 --- a/chrome/installer/util/util_constants.h +++ b/chrome/installer/util/util_constants.h
@@ -183,6 +183,7 @@ extern const char kRegisterChromeBrowserSuffix[]; extern const char kRegisterDevChrome[]; extern const char kRegisterURLProtocol[]; +extern const char kRegisterWebAppURLProtocols[]; extern const char kRemoveChromeRegistration[]; extern const char kRenameChromeExe[]; extern const char kRunAsAdmin[]; @@ -194,6 +195,7 @@ extern const char kUncompressedArchive[]; extern const char kUninstall[]; extern const char kUpdateSetupExe[]; +extern const char kUnregisterWebAppProgId[]; extern const char kVerboseLogging[]; } // namespace switches
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json index 221ce04..96b454a 100644 --- a/chrome/test/data/policy/policy_test_cases.json +++ b/chrome/test/data/policy/policy_test_cases.json
@@ -6405,9 +6405,43 @@ "SAMLOfflineSigninTimeLimit": 0 }, "prefs": { - "saml.offline_signin_time_limit": {} + "saml.offline_signin_time_limit": { + "value": 0 + } + } + }, + { + "note": "Minimum value", + "policies": { + "SAMLOfflineSigninTimeLimit": -1 + }, + "prefs": { + "saml.offline_signin_time_limit": { + "value": -1 + } + } + }, + { + "note": "Value below minimum should be clamped to minimum", + "policies": { + "SAMLOfflineSigninTimeLimit": -2 + }, + "prefs": { + "saml.offline_signin_time_limit": { + "value": -1 + } + } + }, + { + "note": "Default value (14 days)", + "policies": {}, + "prefs": { + "saml.offline_signin_time_limit": { + "default_value": 1209600 + } } } + ] }, "GaiaLockScreenOfflineSigninTimeLimitDays": {
diff --git a/chrome/test/data/webui/chromeos/shimless_rma/BUILD.gn b/chrome/test/data/webui/chromeos/shimless_rma/BUILD.gn index a46c487..50c687f 100644 --- a/chrome/test/data/webui/chromeos/shimless_rma/BUILD.gn +++ b/chrome/test/data/webui/chromeos/shimless_rma/BUILD.gn
@@ -20,6 +20,7 @@ ":onboarding_select_components_page_test", ":onboarding_update_page_test", ":onboarding_wait_for_manual_wp_disable_page_test", + ":reimaging_accelerometer_calibration_page_test", ":reimaging_device_information_page_test", ":reimaging_firmware_update_page_test", ":reimaging_provisioning_page_test", @@ -158,6 +159,14 @@ externs_list = [ "$externs_path/mocha-2.5.js" ] } +js_library("reimaging_accelerometer_calibration_page_test") { + deps = [ + "../..:chai_assert", + "//ash/webui/shimless_rma/resources:reimaging_accelerometer_calibration_page", + ] + externs_list = [ "$externs_path/mocha-2.5.js" ] +} + js_library("reimaging_provisioning_page_test") { deps = [ "../..:chai_assert",
diff --git a/chrome/test/data/webui/chromeos/shimless_rma/reimaging_accelerometer_calibration_page_test.js b/chrome/test/data/webui/chromeos/shimless_rma/reimaging_accelerometer_calibration_page_test.js new file mode 100644 index 0000000..9c059b7 --- /dev/null +++ b/chrome/test/data/webui/chromeos/shimless_rma/reimaging_accelerometer_calibration_page_test.js
@@ -0,0 +1,105 @@ +// 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 {PromiseResolver} from 'chrome://resources/js/promise_resolver.m.js'; +import {FakeShimlessRmaService} from 'chrome://shimless-rma/fake_shimless_rma_service.js'; +import {setShimlessRmaServiceForTesting} from 'chrome://shimless-rma/mojo_interface_provider.js'; +import {ReimagingAccelerometerCalibrationPageElement} from 'chrome://shimless-rma/reimaging_accelerometer_calibration_page.js'; +import {CalibrationComponent} from 'chrome://shimless-rma/shimless_rma_types.js'; + +import {assertDeepEquals, assertEquals, assertFalse, assertTrue} from '../../chai_assert.js'; +import {flushTasks} from '../../test_util.m.js'; + +export function reimagingAccelerometerCalibrationPageTest() { + /** @type {?ReimagingAccelerometerCalibrationPageElement} */ + let component = null; + + /** @type {?FakeShimlessRmaService} */ + let service = null; + + suiteSetup(() => { + service = new FakeShimlessRmaService(); + setShimlessRmaServiceForTesting(service); + }); + + setup(() => { + document.body.innerHTML = ''; + }); + + teardown(() => { + component.remove(); + component = null; + service.reset(); + }); + + /** + * @return {!Promise} + */ + function initializeCalibrationPage() { + assertFalse(!!component); + + component = /** @type {!ReimagingAccelerometerCalibrationPageElement} */ ( + document.createElement('reimaging-accelerometer-calibration-page')); + assertTrue(!!component); + document.body.appendChild(component); + + return flushTasks(); + } + + test('Initializes', async () => { + await initializeCalibrationPage(); + const preCalibration = + component.shadowRoot.querySelector('#preCalibration'); + const Calibration = component.shadowRoot.querySelector('#calibration'); + assertTrue(Calibration.hidden); + assertFalse(preCalibration.hidden); + }); + + test('NextButtonTriggersCalibration', async () => { + await initializeCalibrationPage(); + component.onNextButtonClick().catch((err) => void 0); + + const preCalibration = + component.shadowRoot.querySelector('#preCalibration'); + const Calibration = component.shadowRoot.querySelector('#calibration'); + assertFalse(Calibration.hidden); + assertTrue(preCalibration.hidden); + }); + + test('CalibrationComplete', async () => { + await initializeCalibrationPage(); + component.onNextButtonClick().catch((err) => void 0); + await flushTasks(); + + service.triggerCalibrationObserver( + CalibrationComponent.kAccelerometer, 100, 0); + await flushTasks(); + + let savedResult; + let savedError; + component.onNextButtonClick() + .then((result) => savedResult = result) + .catch((error) => savedError = error); + await flushTasks(); + + assertTrue(!!savedResult); + }); + + test('CalibrationInProgress', async () => { + await initializeCalibrationPage(); + component.onNextButtonClick().catch((err) => void 0); + await flushTasks(); + + let savedResult; + let savedError; + component.onNextButtonClick() + .then((result) => savedResult = result) + .catch((error) => savedError = error); + await flushTasks(); + + assertTrue(savedError instanceof Error); + assertEquals(savedError.message, 'Calibration is not complete.'); + assertEquals(savedResult, undefined); + }); +}
diff --git a/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_browsertest.js b/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_browsertest.js index 6217660..59e764a 100644 --- a/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_browsertest.js +++ b/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_browsertest.js
@@ -48,6 +48,7 @@ 'OnboardingSelectComponentsPageTest', 'OnboardingUpdatePageTest', 'OnboardingWaitForManualWpDisablePageTest', + 'ReimagingAccelerometerCalibrationPageTest', 'ReimagingFirmwareUpdatePageTest', 'ReimagingDeviceInformationPageTest', 'ReimagingProvisioningPageTest',
diff --git a/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_unified_test.js b/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_unified_test.js index e33110d8..65939291 100644 --- a/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_unified_test.js +++ b/chrome/test/data/webui/chromeos/shimless_rma/shimless_rma_unified_test.js
@@ -13,6 +13,7 @@ import {onboardingSelectComponentsPageTest} from './onboarding_select_components_page_test.js'; import {onboardingUpdatePageTest} from './onboarding_update_page_test.js'; import {onboardingWaitForManualWpDisablePageTest} from './onboarding_wait_for_manual_wp_disable_page_test.js'; +import {reimagingAccelerometerCalibrationPageTest} from './reimaging_accelerometer_calibration_page_test.js'; import {reimagingDeviceInformationPageTest} from './reimaging_device_information_page_test.js'; import {reimagingFirmwareUpdatePageTest} from './reimaging_firmware_update_page_test.js'; import {reimagingProvisioningPageTest} from './reimaging_provisioning_page_test.js'; @@ -43,6 +44,9 @@ runSuite( 'OnboardingWaitForManualWpDisablePageTest', onboardingWaitForManualWpDisablePageTest); +runSuite( + 'ReimagingAccelerometerCalibrationPageTest', + reimagingAccelerometerCalibrationPageTest); runSuite('ReimagingFirmwareUpdatePageTest', reimagingFirmwareUpdatePageTest); runSuite( 'ReimagingDeviceInformationPageTest', reimagingDeviceInformationPageTest);
diff --git a/chrome/test/data/webui/chromeos/shortcut_customization/BUILD.gn b/chrome/test/data/webui/chromeos/shortcut_customization/BUILD.gn index 89e11398..14eaa77 100644 --- a/chrome/test/data/webui/chromeos/shortcut_customization/BUILD.gn +++ b/chrome/test/data/webui/chromeos/shortcut_customization/BUILD.gn
@@ -13,6 +13,7 @@ ] deps = [ ":accelerator_edit_dialog_test", + ":accelerator_edit_view_test", ":accelerator_row_test", ":accelerator_view_test", ":shortcut_customization_test", @@ -54,3 +55,11 @@ ] externs_list = [ "$externs_path/mocha-2.5.js" ] } + +js_library("accelerator_edit_view_test") { + deps = [ + "../..:chai_assert", + "//ash/webui/shortcut_customization_ui/resources:accelerator_edit_view", + ] + externs_list = [ "$externs_path/mocha-2.5.js" ] +}
diff --git a/chrome/test/data/webui/chromeos/shortcut_customization/accelerator_edit_dialog_test.js b/chrome/test/data/webui/chromeos/shortcut_customization/accelerator_edit_dialog_test.js index ee61c723..d136a75 100644 --- a/chrome/test/data/webui/chromeos/shortcut_customization/accelerator_edit_dialog_test.js +++ b/chrome/test/data/webui/chromeos/shortcut_customization/accelerator_edit_dialog_test.js
@@ -41,13 +41,15 @@ await flush(); const dialog = viewElement.shadowRoot.querySelector('cr-dialog'); assertTrue(dialog.open); - const acceleratorElements = dialog.querySelectorAll('accelerator-view'); + const acceleratorElements = + dialog.querySelectorAll('accelerator-edit-view'); assertEquals(2, acceleratorElements.length); assertEquals( description, dialog.querySelector('#dialogTitle').textContent.trim()); - const keys1 = - acceleratorElements[0].shadowRoot.querySelectorAll('input-key'); + const accelView1 = + acceleratorElements[0].shadowRoot.querySelector('accelerator-view'); + const keys1 = accelView1.shadowRoot.querySelectorAll('input-key'); // SHIFT + CONTROL + g assertEquals(3, keys1.length); assertEquals( @@ -57,8 +59,9 @@ assertEquals( 'g', keys1[2].shadowRoot.querySelector('#key').textContent.trim()); - const keys2 = - acceleratorElements[1].shadowRoot.querySelectorAll('input-key'); + const accelView2 = + acceleratorElements[1].shadowRoot.querySelector('accelerator-view'); + const keys2 = accelView2.shadowRoot.querySelectorAll('input-key'); // CONTROL + c assertEquals(2, keys2.length); assertEquals(
diff --git a/chrome/test/data/webui/chromeos/shortcut_customization/accelerator_edit_view_test.js b/chrome/test/data/webui/chromeos/shortcut_customization/accelerator_edit_view_test.js new file mode 100644 index 0000000..cb73185 --- /dev/null +++ b/chrome/test/data/webui/chromeos/shortcut_customization/accelerator_edit_view_test.js
@@ -0,0 +1,65 @@ +// 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 {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {AcceleratorEditViewElement} from 'chrome://shortcut-customization/accelerator_edit_view.js'; +import {ModifierKeys} from 'chrome://shortcut-customization/accelerator_view.js'; + +import {assertEquals, assertFalse, assertTrue} from '../../chai_assert.js'; + +export function acceleratorEditViewTest() { + /** @type {?AcceleratorEditViewElement} */ + let editViewElement = null; + + setup(() => { + editViewElement = /** @type {!AcceleratorEditViewElement} */ ( + document.createElement('accelerator-edit-view')); + document.body.appendChild(editViewElement); + }); + + teardown(() => { + editViewElement.remove(); + editViewElement = null; + }); + + test('LoadsBasicEditView', async () => { + // TODO(jimmyxgong): Update the type of the test accelerator with the mojom + // version. + const accelerator = { + modifiers: ModifierKeys.SHIFT | ModifierKeys.CONTROL, + key: 'g', + rawKey: 0x0 + }; + + editViewElement.accelerator = accelerator; + await flush(); + + // Check that the edit buttons are visible. + assertFalse( + editViewElement.shadowRoot.querySelector('#editButtonsContainer') + .hidden); + assertTrue( + editViewElement.shadowRoot.querySelector('#cancelButtonContainer') + .hidden); + + // Click on the edit button. + editViewElement.shadowRoot.querySelector('#editButton').click(); + + // Only the Cancel button should now be visible. + assertTrue(editViewElement.shadowRoot.querySelector('#editButtonsContainer') + .hidden); + assertFalse( + editViewElement.shadowRoot.querySelector('#cancelButtonContainer') + .hidden); + + // Click on the Cancel button and expect the edit buttons to be available. + editViewElement.shadowRoot.querySelector('#cancelButton').click(); + assertFalse( + editViewElement.shadowRoot.querySelector('#editButtonsContainer') + .hidden); + assertTrue( + editViewElement.shadowRoot.querySelector('#cancelButtonContainer') + .hidden); + }); +} \ No newline at end of file
diff --git a/chrome/test/data/webui/chromeos/shortcut_customization/shortcut_customization_browsertest.js b/chrome/test/data/webui/chromeos/shortcut_customization/shortcut_customization_browsertest.js index 978fbac5..c206c09 100644 --- a/chrome/test/data/webui/chromeos/shortcut_customization/shortcut_customization_browsertest.js +++ b/chrome/test/data/webui/chromeos/shortcut_customization/shortcut_customization_browsertest.js
@@ -42,6 +42,7 @@ // although technically is not necessary. const debug_suites_list = [ 'ShortcutCustomizationApp', + 'AcceleratorEditViewTest', 'AcceleratorViewTest', 'AcceleratorRowTest', 'AcceleratorEditDialogTest',
diff --git a/chrome/test/data/webui/chromeos/shortcut_customization/shortcut_customization_unified_test.js b/chrome/test/data/webui/chromeos/shortcut_customization/shortcut_customization_unified_test.js index 3fb8dc7..c6218cd 100644 --- a/chrome/test/data/webui/chromeos/shortcut_customization/shortcut_customization_unified_test.js +++ b/chrome/test/data/webui/chromeos/shortcut_customization/shortcut_customization_unified_test.js
@@ -5,6 +5,7 @@ import 'chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.js'; import {acceleratorEditDialogTest} from './accelerator_edit_dialog_test.js'; +import {acceleratorEditViewTest} from './accelerator_edit_view_test.js'; import {acceleratorRowTest} from './accelerator_row_test.js'; import {acceleratorViewTest} from './accelerator_view_test.js'; import {shortcutCustomizationAppTest} from './shortcut_customization_test.js'; @@ -17,6 +18,7 @@ } runSuite('ShortcutCustomizationApp', shortcutCustomizationAppTest); +runSuite('AcceleratorEditViewTest', acceleratorEditViewTest); runSuite('AcceleratorViewTest', acceleratorViewTest); runSuite('AcceleratorRowTest', acceleratorRowTest); runSuite('AcceleratorEditDialogTest', acceleratorEditDialogTest); \ No newline at end of file
diff --git a/chrome/test/data/webui/new_tab_page/modules/drive_v2/module_test.js b/chrome/test/data/webui/new_tab_page/modules/drive_v2/module_test.js index a2652a2..8602ab4 100644 --- a/chrome/test/data/webui/new_tab_page/modules/drive_v2/module_test.js +++ b/chrome/test/data/webui/new_tab_page/modules/drive_v2/module_test.js
@@ -81,7 +81,7 @@ assertTrue(!module); }); - test('module has height of 56 with only one file', async () => { + test('module has height of 86 with only one file', async () => { const data = { files: [ { @@ -96,10 +96,10 @@ await testProxy.handler.whenCalled('getFiles'); module.$.fileRepeat.render(); - assertEquals(56, module.offsetHeight); + assertEquals(86, module.offsetHeight); }); - test('module has height of 112 with two files', async () => { + test('module has height of 142 with two files', async () => { const data = { files: [ { @@ -117,10 +117,10 @@ await testProxy.handler.whenCalled('getFiles'); module.$.fileRepeat.render(); - assertEquals(112, module.offsetHeight); + assertEquals(142, module.offsetHeight); }); - test('module has height of 168 with 3 files', async () => { + test('module has height of 198 with 3 files', async () => { const data = { files: [ { @@ -141,6 +141,6 @@ await testProxy.handler.whenCalled('getFiles'); module.$.fileRepeat.render(); - assertEquals(168, module.offsetHeight); + assertEquals(198, module.offsetHeight); }); });
diff --git a/chrome/test/data/webui/new_tab_page/modules/module_header_test.js b/chrome/test/data/webui/new_tab_page/modules/module_header_test.js index e2abc7d7..bf3d5c0 100644 --- a/chrome/test/data/webui/new_tab_page/modules/module_header_test.js +++ b/chrome/test/data/webui/new_tab_page/modules/module_header_test.js
@@ -38,6 +38,7 @@ moduleHeader.showDismissButton = true; moduleHeader.dismissText = 'baz'; moduleHeader.disableText = 'abc'; + moduleHeader.showInfoButtonDropdown = true; render(moduleHeader); // Assert. @@ -45,6 +46,9 @@ assertEquals('bar', $$(moduleHeader, '#description').textContent.trim()); assertEquals('baz', $$(moduleHeader, '#dismissButton').textContent.trim()); assertEquals('abc', $$(moduleHeader, '#disableButton').textContent.trim()); + assertEquals( + 'Why am I seeing this?', + $$(moduleHeader, '#infoButton').textContent.trim()); }); test('clicking buttons sends events', () => { @@ -78,4 +82,15 @@ $$(moduleHeader, '#disableButton').click(); assertFalse($$(moduleHeader, '#actionMenu').open); }); + + test('module icon appears', () => { + // Act. + moduleHeader.iconSrc = 'icons/module_logo.svg'; + render(moduleHeader); + + // Assert. + assertEquals( + 'chrome://new-tab-page/icons/module_logo.svg', + $$(moduleHeader, '.module-icon').src); + }); });
diff --git a/chrome/updater/mac/mac_util.mm b/chrome/updater/mac/mac_util.mm index 29bc4db1..c4b5bcd 100644 --- a/chrome/updater/mac/mac_util.mm +++ b/chrome/updater/mac/mac_util.mm
@@ -4,6 +4,7 @@ #import "chrome/updater/mac/mac_util.h" +#include <sys/stat.h> #include <pwd.h> #include <unistd.h>
diff --git a/chromeos/components/BUILD.gn b/chromeos/components/BUILD.gn index 2c619749..4255fb4 100644 --- a/chromeos/components/BUILD.gn +++ b/chromeos/components/BUILD.gn
@@ -82,7 +82,6 @@ if (!is_official_build) { deps += [ - "//chromeos/components/demo_mode_app_ui:closure_compile", "//chromeos/components/sample_system_web_app_ui:closure_compile", "//chromeos/components/telemetry_extension_ui:closure_compile", ]
diff --git a/chromeos/components/camera_app_ui/resources/css/main.css b/chromeos/components/camera_app_ui/resources/css/main.css index e8c1bf7f..66574c4 100644 --- a/chromeos/components/camera_app_ui/resources/css/main.css +++ b/chromeos/components/camera_app_ui/resources/css/main.css
@@ -192,8 +192,6 @@ } #shutters-group { - --shutter-size: 60px; - bottom: var(--shutter-vertical-center); display: flex; flex-direction: column; @@ -287,8 +285,9 @@ } #confirm-result-groups>button { - flex: 0 0 76px; height: 72px; + margin-bottom: 2px; + margin-top: 2px; width: 72px; }
diff --git a/chromeos/components/camera_app_ui/resources/views/main.html b/chromeos/components/camera_app_ui/resources/views/main.html index 69f6e8b..3025014 100644 --- a/chromeos/components/camera_app_ui/resources/views/main.html +++ b/chromeos/components/camera_app_ui/resources/views/main.html
@@ -259,7 +259,7 @@ <div id="paused-msg" i18n-text="record_video_paused_msg"></div> <div id="record-time-msg"></div> </div> - <div class="top-stripe right-stripe buttons"> + <div class="top-stripe right-stripe circle buttons"> <input id="toggle-mic" type="checkbox" tabindex="0" i18n-label="toggle_mic_button" data-state="mic" data-key="toggleMic" checked>
diff --git a/chromeos/components/demo_mode_app_ui/BUILD.gn b/chromeos/components/demo_mode_app_ui/BUILD.gn index fd9c1eb..ae0d1c2 100644 --- a/chromeos/components/demo_mode_app_ui/BUILD.gn +++ b/chromeos/components/demo_mode_app_ui/BUILD.gn
@@ -3,8 +3,6 @@ # found in the LICENSE file. import("//chrome/test/base/js2gtest.gni") -import("//third_party/closure_compiler/compile_js.gni") -import("//tools/grit/preprocess_if_expr.gni") import("//ui/webui/resources/tools/generate_grd.gni") assert(is_chromeos, "Demo Mode App is Chrome OS only") @@ -14,31 +12,17 @@ sources = [ "demo_mode_app_ui.cc", "demo_mode_app_ui.h", - "demo_mode_page_handler.cc", - "demo_mode_page_handler.h", "url_constants.cc", "url_constants.h", ] deps = [ - "//chromeos/components/demo_mode_app_ui/mojom", "//chromeos/resources:demo_mode_app_resources", "//content/public/browser", - "//ui/views", "//ui/webui", ] } -js_type_check("closure_compile") { - deps = [ ":app" ] - closure_flags = default_closure_args + mojom_js_args -} - -js_library("app") { - sources = [ "resources/page_handler.js" ] - deps = [ "//chromeos/components/demo_mode_app_ui/mojom:mojom_webui_js" ] -} - js2gtest("browser_tests_js") { test_type = "mojo_lite_webui" @@ -47,27 +31,14 @@ defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] } -grd_prefix = "chromeos_demo_mode_app" -mojo_grdp_file = "$target_gen_dir/demo_mode_app_mojo_resources.grdp" - -generate_grd("build_mojo_grdp") { - out_grd = mojo_grdp_file - grd_prefix = grd_prefix - deps = [ "//chromeos/components/demo_mode_app_ui/mojom:mojom_webui_js" ] - input_files = [ "chromeos/components/demo_mode_app_ui/mojom/demo_mode_app_ui.mojom-webui.js" ] - input_files_base_dir = rebase_path("$root_gen_dir/mojom-webui", "//") -} - generate_grd("build_grd") { input_files_base_dir = rebase_path("resources", "//") - deps = [ ":build_mojo_grdp" ] input_files = [ "app_icon_192.png", "demo_mode_app.js", "demo_mode_app.html", - "page_handler.js", ] - grd_prefix = grd_prefix + manifest_files = [] + grd_prefix = "chromeos_demo_mode_app" out_grd = "$target_gen_dir/${grd_prefix}_resources.grd" - grdp_files = [ mojo_grdp_file ] }
diff --git a/chromeos/components/demo_mode_app_ui/DEPS b/chromeos/components/demo_mode_app_ui/DEPS index 20ecbdcb..e3c2f2c 100644 --- a/chromeos/components/demo_mode_app_ui/DEPS +++ b/chromeos/components/demo_mode_app_ui/DEPS
@@ -1,6 +1,5 @@ include_rules = [ "+chromeos/grit/chromeos_demo_mode_app_resources.h", "+content/public/browser", - "+ui/views", "+ui/webui", ] \ No newline at end of file
diff --git a/chromeos/components/demo_mode_app_ui/demo_mode_app_ui.cc b/chromeos/components/demo_mode_app_ui/demo_mode_app_ui.cc index b6d415d2..864d59a 100644 --- a/chromeos/components/demo_mode_app_ui/demo_mode_app_ui.cc +++ b/chromeos/components/demo_mode_app_ui/demo_mode_app_ui.cc
@@ -3,14 +3,11 @@ // found in the LICENSE file. #include "chromeos/components/demo_mode_app_ui/demo_mode_app_ui.h" -#include "chromeos/components/demo_mode_app_ui/demo_mode_page_handler.h" #include "chromeos/components/demo_mode_app_ui/url_constants.h" #include "chromeos/grit/chromeos_demo_mode_app_resources.h" #include "chromeos/grit/chromeos_demo_mode_app_resources_map.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui_data_source.h" -#include "services/network/public/mojom/content_security_policy.mojom.h" -#include "ui/views/widget/widget.h" namespace chromeos { @@ -34,22 +31,6 @@ DemoModeAppUI::~DemoModeAppUI() = default; -void DemoModeAppUI::BindInterface( - mojo::PendingReceiver<mojom::demo_mode::PageHandlerFactory> factory) { - if (demo_mode_page_factory_.is_bound()) { - demo_mode_page_factory_.reset(); - } - demo_mode_page_factory_.Bind(std::move(factory)); -} - -void DemoModeAppUI::CreatePageHandler( - mojo::PendingReceiver<mojom::demo_mode::PageHandler> handler) { - views::Widget* widget = views::Widget::GetWidgetForNativeWindow( - web_ui()->GetWebContents()->GetTopLevelNativeWindow()); - demo_mode_page_handler_ = - std::make_unique<DemoModePageHandler>(std::move(handler), widget); -} - WEB_UI_CONTROLLER_TYPE_IMPL(DemoModeAppUI) } // namespace chromeos
diff --git a/chromeos/components/demo_mode_app_ui/demo_mode_app_ui.h b/chromeos/components/demo_mode_app_ui/demo_mode_app_ui.h index 86801a6..9b7a24d 100644 --- a/chromeos/components/demo_mode_app_ui/demo_mode_app_ui.h +++ b/chromeos/components/demo_mode_app_ui/demo_mode_app_ui.h
@@ -5,16 +5,11 @@ #ifndef CHROMEOS_COMPONENTS_DEMO_MODE_APP_UI_DEMO_MODE_APP_UI_H_ #define CHROMEOS_COMPONENTS_DEMO_MODE_APP_UI_DEMO_MODE_APP_UI_H_ -#include "chromeos/components/demo_mode_app_ui/mojom/demo_mode_app_ui.mojom.h" -#include "mojo/public/cpp/bindings/pending_receiver.h" -#include "mojo/public/cpp/bindings/pending_remote.h" -#include "mojo/public/cpp/bindings/receiver.h" #include "ui/webui/mojo_web_ui_controller.h" namespace chromeos { // The WebUI for chrome://demo-mode-app -class DemoModeAppUI : public ui::MojoWebUIController, - public mojom::demo_mode::PageHandlerFactory { +class DemoModeAppUI : public ui::MojoWebUIController { public: explicit DemoModeAppUI(content::WebUI* web_ui); ~DemoModeAppUI() override; @@ -22,19 +17,7 @@ DemoModeAppUI(const DemoModeAppUI&) = delete; DemoModeAppUI& operator=(const DemoModeAppUI&) = delete; - void BindInterface( - mojo::PendingReceiver<mojom::demo_mode::PageHandlerFactory> factory); - private: - // mojom::DemoModePageHandlerFactory - void CreatePageHandler( - mojo::PendingReceiver<mojom::demo_mode::PageHandler> handler) override; - - mojo::Receiver<mojom::demo_mode::PageHandlerFactory> demo_mode_page_factory_{ - this}; - - std::unique_ptr<mojom::demo_mode::PageHandler> demo_mode_page_handler_; - WEB_UI_CONTROLLER_TYPE_DECL(); };
diff --git a/chromeos/components/demo_mode_app_ui/demo_mode_page_handler.cc b/chromeos/components/demo_mode_app_ui/demo_mode_page_handler.cc deleted file mode 100644 index afe95dc6..0000000 --- a/chromeos/components/demo_mode_app_ui/demo_mode_page_handler.cc +++ /dev/null
@@ -1,18 +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. - -#include "chromeos/components/demo_mode_app_ui/demo_mode_page_handler.h" - -namespace chromeos { -DemoModePageHandler::DemoModePageHandler( - mojo::PendingReceiver<mojom::demo_mode::PageHandler> pending_receiver, - views::Widget* widget) - : receiver_(this, std::move(pending_receiver)), widget_(widget) {} - -DemoModePageHandler::~DemoModePageHandler() = default; - -void DemoModePageHandler::ToggleFullscreen() { - widget_->SetFullscreen(!widget_->IsFullscreen()); -} -} // namespace chromeos
diff --git a/chromeos/components/demo_mode_app_ui/demo_mode_page_handler.h b/chromeos/components/demo_mode_app_ui/demo_mode_page_handler.h deleted file mode 100644 index aa33befb..0000000 --- a/chromeos/components/demo_mode_app_ui/demo_mode_page_handler.h +++ /dev/null
@@ -1,35 +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. - -#ifndef CHROMEOS_COMPONENTS_DEMO_MODE_APP_UI_DEMO_MODE_PAGE_HANDLER_H_ -#define CHROMEOS_COMPONENTS_DEMO_MODE_APP_UI_DEMO_MODE_PAGE_HANDLER_H_ - -#include "chromeos/components/demo_mode_app_ui/mojom/demo_mode_app_ui.mojom.h" - -#include "mojo/public/cpp/bindings/receiver.h" -#include "mojo/public/cpp/bindings/remote.h" -#include "ui/views/widget/widget.h" - -namespace chromeos { - -class DemoModePageHandler : public mojom::demo_mode::PageHandler { - public: - DemoModePageHandler( - mojo::PendingReceiver<mojom::demo_mode::PageHandler> pending_receiver, - views::Widget* widget); - ~DemoModePageHandler() override; - - DemoModePageHandler(const PageHandler&) = delete; - DemoModePageHandler& operator=(const PageHandler&) = delete; - - private: - // Switch between fullscreen and not-fullscreen - void ToggleFullscreen() override; - - mojo::Receiver<mojom::demo_mode::PageHandler> receiver_; - - views::Widget* widget_; -}; -} // namespace chromeos -#endif // CHROMEOS_COMPONENTS_DEMO_MODE_APP_UI_DEMO_MODE_PAGE_HANDLER_H_
diff --git a/chromeos/components/demo_mode_app_ui/mojom/BUILD.gn b/chromeos/components/demo_mode_app_ui/mojom/BUILD.gn deleted file mode 100644 index 39044af..0000000 --- a/chromeos/components/demo_mode_app_ui/mojom/BUILD.gn +++ /dev/null
@@ -1,14 +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. - -import("//mojo/public/tools/bindings/mojom.gni") - -assert(is_chromeos, "Demo Mode App is Chrome OS only") -assert(!is_official_build, "Demo Mode App is only built for unofficial builds") - -mojom("mojom") { - sources = [ "demo_mode_app_ui.mojom" ] - public_deps = [ "//mojo/public/mojom/base" ] - webui_module_path = "/chromeos/components/demo_mode_app_ui/mojom/" -}
diff --git a/chromeos/components/demo_mode_app_ui/mojom/OWNERS b/chromeos/components/demo_mode_app_ui/mojom/OWNERS deleted file mode 100644 index 61b5e28..0000000 --- a/chromeos/components/demo_mode_app_ui/mojom/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -per-file *.mojom=set noparent -per-file *.mojom=file://ipc/SECURITY_OWNERS \ No newline at end of file
diff --git a/chromeos/components/demo_mode_app_ui/mojom/demo_mode_app_ui.mojom b/chromeos/components/demo_mode_app_ui/mojom/demo_mode_app_ui.mojom deleted file mode 100644 index 8a5be1f..0000000 --- a/chromeos/components/demo_mode_app_ui/mojom/demo_mode_app_ui.mojom +++ /dev/null
@@ -1,22 +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. - -module chromeos.mojom.demo_mode; - -// Implemented in the browser process. Interface for the Demo Mode WebUI to -// retrieve an endpoint to the PageHandler interface, and to provide its own -// Page endpoint to receive notifications. -interface PageHandlerFactory { - // Create a page handler to provide one-way message passing between the WebUI - // and browser process - CreatePageHandler(pending_receiver<PageHandler> handler); -}; - -// Implemented in the Browser process. Interface for sending ToggleFullscreen() -// commands from the Web UI to the browser process. -interface PageHandler { - // Fire-and-forget command to trigger enter or exit fullscreen on a native - // window. Used for when we need to enter fullscreen without user interaction. - ToggleFullscreen(); -}; \ No newline at end of file
diff --git a/chromeos/components/demo_mode_app_ui/resources/demo_mode_app.html b/chromeos/components/demo_mode_app_ui/resources/demo_mode_app.html index aadf7431..28ea452 100644 --- a/chromeos/components/demo_mode_app_ui/resources/demo_mode_app.html +++ b/chromeos/components/demo_mode_app_ui/resources/demo_mode_app.html
@@ -8,14 +8,9 @@ <title>Demo Mode App Title</title> </head> <body> - <h1 id="header">Demo Mode App</h1> - <button id="toggle-fullscreen">Toggle Fullscreen</button> - <button id="enter-fullscreen">Enter Fullscreen</button> - <button id="exit-fullscreen">Exit Fullscreen</button> - <!-- Test button that changes color of header if the Web Platform fullscreen state is active. - Its purpose is to show that the native window fullscreen (triggered via Mojo API) and the standard - element.requestFullscreen() are different --> - <button id="change-color">Change Color if WP Fullscreen Enabled</button> + <h1 id="header">Hello World</h1> </body> -<script src="demo_mode_app.js" type="module"></script> + <script src="demo_mode_app.js" type="module"></script> +<!-- Below mojo script required to run browser tests --> +<script src="chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.js"></script> </html> \ No newline at end of file
diff --git a/chromeos/components/demo_mode_app_ui/resources/demo_mode_app.js b/chromeos/components/demo_mode_app_ui/resources/demo_mode_app.js index e24a066b..20caad15 100644 --- a/chromeos/components/demo_mode_app_ui/resources/demo_mode_app.js +++ b/chromeos/components/demo_mode_app_ui/resources/demo_mode_app.js
@@ -2,41 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {pageHandler} from './page_handler.js'; - - -// Function to make arbitrary visible UI change only when -// document.fullscreenElement is present - to help demonstrate the difference -// between the two fullscreen methods (probably better to do this through data -// binding). -function changeColor() { - let header = document.getElementById("header"); - if (document.fullscreenElement) { - if (header.style.color === "blue") { - header.style.color = "red"; - } else { - header.style.color = "blue"; - } - } -} - -document.addEventListener('DOMContentLoaded', function () { - window.pageHandler = pageHandler; - // Mojo API triggering native widget RequestFullscreen() - const toggleFullscreenButton = document.getElementById('toggle-fullscreen'); - toggleFullscreenButton.addEventListener('click', - () => pageHandler.toggleFullscreen()); - - // Web platform standard way of entering and exiting fullscreen - const enterFullscreenButton = document.getElementById('enter-fullscreen'); - enterFullscreenButton.addEventListener('click', - () => document.documentElement.requestFullscreen()); - const exitFullscreenButton = document.getElementById('exit-fullscreen'); - exitFullscreenButton.addEventListener('click', - () => document.exitFullscreen()); - - const changeColorButton = document.getElementById('change-color'); - changeColorButton.addEventListener('click', () => changeColor()); - - pageHandler.toggleFullscreen(); -}); +var header = document.getElementById('header'); +header.textContent = 'Demo Mode App';
diff --git a/chromeos/components/demo_mode_app_ui/resources/page_handler.js b/chromeos/components/demo_mode_app_ui/resources/page_handler.js deleted file mode 100644 index 263e2ad..0000000 --- a/chromeos/components/demo_mode_app_ui/resources/page_handler.js +++ /dev/null
@@ -1,25 +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. - -import {PageHandlerFactory, PageHandlerRemote} from '/chromeos/components/demo_mode_app_ui/mojom/demo_mode_app_ui.mojom-webui.js'; - -/** - * Provides interfaces for sending and receiving messages to/from the browser - * process via Mojo APIs. - */ -class PageHandler { - constructor() { - this.handler = new PageHandlerRemote(); - - const factoryRemote = PageHandlerFactory.getRemote(); - factoryRemote.createPageHandler( - this.handler.$.bindNewPipeAndPassReceiver()); - } - - toggleFullscreen() { - this.handler.toggleFullscreen(); - } -} - -export const pageHandler = new PageHandler();
diff --git a/chromeos/components/personalization_app/resources/common/styles.js b/chromeos/components/personalization_app/resources/common/styles.js index 11dcd6e..7f6abd7 100644 --- a/chromeos/components/personalization_app/resources/common/styles.js +++ b/chromeos/components/personalization_app/resources/common/styles.js
@@ -19,35 +19,6 @@ /* copied from |AshColorProvider| |kSecondToneOpacity| constant. */ --personalization-app-second-tone-opacity: 0.3; - - --personalization-app-font-google-sans: 'Google Sans', 'Noto Sans', - sans-serif; - --personalization-app-font-roboto: Roboto, 'Noto Sans', sans-serif; - - --personalization-app-typeface-headline-1: { - font-family: var(--personalization-app-font-google-sans); - font-weight: 500; - font-size: 15px; - line-height: 22px; - }; - --personalization-app-typeface-body-2: { - font-family: var(--personalization-app-font-roboto); - font-weight: 400; - font-size: 13px; - line-height: 20px; - }; - --personalization-app-typeface-display-6: { - font-family: var(--personalization-app-font-google-sans); - font-weight: 500; - font-size: 22px; - line-height: 28px; - }; - --personalization-app-typeface-annotation-2: { - font-family: var(--personalization-app-font-roboto); - font-weight: 400; - font-size: 11px; - line-height: 16px; - }; } iron-list { height: 100%; @@ -133,8 +104,8 @@ z-index: 2; } .photo-text-container > p { - @apply --personalization-app-typeface-annotation-2; color: white; + font: var(--cros-annotation-2-font); margin: 0; max-width: 100%; overflow: hidden; @@ -144,7 +115,7 @@ white-space: nowrap; } .photo-text-container > p:first-child { - @apply --personalization-app-typeface-headline-1; + font: var(--cros-headline-1-font); } .photo-gradient-mask { border-radius: 12px;
diff --git a/chromeos/components/personalization_app/resources/trusted/wallpaper_breadcrumb_element.html b/chromeos/components/personalization_app/resources/trusted/wallpaper_breadcrumb_element.html index f606230..e7e6925 100644 --- a/chromeos/components/personalization_app/resources/trusted/wallpaper_breadcrumb_element.html +++ b/chromeos/components/personalization_app/resources/trusted/wallpaper_breadcrumb_element.html
@@ -14,12 +14,12 @@ } #textContainer { - @apply --personalization-app-typeface-headline-1; color: var(--cros-text-color-secondary); align-items: center; box-sizing: border-box; display: flex; flex-flow: row nowrap; + font: var(--cros-headline-1-font); height: 100%; }
diff --git a/chromeos/components/personalization_app/resources/trusted/wallpaper_selected_element.html b/chromeos/components/personalization_app/resources/trusted/wallpaper_selected_element.html index f2bfa3e2b..380d85a7 100644 --- a/chromeos/components/personalization_app/resources/trusted/wallpaper_selected_element.html +++ b/chromeos/components/personalization_app/resources/trusted/wallpaper_selected_element.html
@@ -41,13 +41,13 @@ } #textContainer > p:first-child { - @apply --personalization-app-typeface-body-2; color: var(--cros-text-color-secondary); + font: var(--cros-body-2-font); } #textContainer > p:nth-child(2) { - @apply --personalization-app-typeface-display-6; color: var(--cros-text-color-primary); + font: var(--cros-display-6-font); } #textContainer > p:nth-child(n+3) {
diff --git a/chromeos/network/device_state.cc b/chromeos/network/device_state.cc index e0937552..698fa88c 100644 --- a/chromeos/network/device_state.cc +++ b/chromeos/network/device_state.cc
@@ -6,8 +6,6 @@ #include <memory> -#include "ash/constants/ash_features.h" -#include "base/feature_list.h" #include "base/logging.h" #include "base/metrics/histogram_macros.h" #include "base/values.h" @@ -37,13 +35,6 @@ return GetBooleanValue(key, value, &scanning_); } else if (key == shill::kSupportNetworkScanProperty) { return GetBooleanValue(key, value, &support_network_scan_); - } else if ((base::FeatureList::IsEnabled( - ash::features::kCellularAllowPerNetworkRoaming) && - key == shill::kCellularPolicyAllowRoamingProperty) || - (!base::FeatureList::IsEnabled( - ash::features::kCellularAllowPerNetworkRoaming) && - key == shill::kCellularAllowRoamingProperty)) { - return GetBooleanValue(key, value, &allow_roaming_); } else if (key == shill::kProviderRequiresRoamingProperty) { return GetBooleanValue(key, value, &provider_requires_roaming_); } else if (key == shill::kHomeProviderProperty) {
diff --git a/chromeos/network/device_state.h b/chromeos/network/device_state.h index d025331..d0f0d0c 100644 --- a/chromeos/network/device_state.h +++ b/chromeos/network/device_state.h
@@ -41,7 +41,6 @@ // Cellular specific accessors const std::string& operator_name() const { return operator_name_; } const std::string& country_code() const { return country_code_; } - bool allow_roaming() const { return allow_roaming_; } bool provider_requires_roaming() const { return provider_requires_roaming_; } bool support_network_scan() const { return support_network_scan_; } const std::string& technology_family() const { return technology_family_; } @@ -104,7 +103,6 @@ // Cellular specific properties std::string operator_name_; std::string country_code_; - bool allow_roaming_ = false; bool provider_requires_roaming_ = false; bool support_network_scan_ = false; bool scanning_ = false;
diff --git a/chromeos/network/network_device_handler_impl.cc b/chromeos/network/network_device_handler_impl.cc index 509366e2..ae34021b 100644 --- a/chromeos/network/network_device_handler_impl.cc +++ b/chromeos/network/network_device_handler_impl.cc
@@ -291,17 +291,11 @@ for (NetworkStateHandler::DeviceStateList::const_iterator it = list.begin(); it != list.end(); ++it) { const DeviceState* device_state = *it; - bool current_allow_roaming = device_state->allow_roaming(); // If roaming is required by the provider, always try to set to true. bool new_device_value = device_state->provider_requires_roaming() || cellular_allow_roaming_; - // Only set the value if the current value is different from - // |new_device_value|. - if (new_device_value == current_allow_roaming) - continue; - SetDevicePropertyInternal( device_state->path(), base::FeatureList::IsEnabled(
diff --git a/chromeos/services/ime/public/proto/messages.proto b/chromeos/services/ime/public/proto/messages.proto index 062a14ba..f26c9be 100644 --- a/chromeos/services/ime/public/proto/messages.proto +++ b/chromeos/services/ime/public/proto/messages.proto
@@ -21,264 +21,8 @@ } } -// Public messages between IME service and the shared library. -// Each 'oneof' submessage represents a Mojo call / response. +// Deprecated. Only private messages are supported now. +// TODO(b/151884011): Remove this as part of the physical keyboard code rewrite. message PublicMessage { - optional int32 seq_id = 1; - - oneof param { - OnFocus on_focus = 2; - OnKeyEvent on_key_event = 3; - OnKeyEventReply on_key_event_reply = 4; - OnSurroundingTextChanged on_surrounding_text_changed = 5; - OnBlur on_blur = 6; - OnCompositionCanceled on_composition_canceled = 7; - OnInputMethodChanged on_input_method_changed = 8; - CommitText commit_text = 9; - SetComposition set_composition = 10; - SetCompositionRange set_composition_range = 11; - FinishComposition finish_composition = 12; - DeleteSurroundingText delete_surrounding_text = 13; - HandleAutocorrect handle_autocorrect = 14; - SuggestionsRequest suggestions_request = 15; - SuggestionsResponse suggestions_response = 16; - DisplaySuggestions display_suggestions = 17; - RecordUkm record_ukm = 18; - } -} - -// Protobuf version of the reply from InputEngine::InputFieldInfo in -// chromeos/services/ime/public/mojom/input_engine.mojom -message InputFieldInfo { - enum InputFieldType { - INPUT_FIELD_TYPE_UNSPECIFIED = 0; // Reserved - INPUT_FIELD_TYPE_NO_IME = 1; - INPUT_FIELD_TYPE_TEXT = 2; - INPUT_FIELD_TYPE_SEARCH = 3; - INPUT_FIELD_TYPE_TELEPHONE = 4; - INPUT_FIELD_TYPE_URL = 5; - INPUT_FIELD_TYPE_EMAIL = 6; - INPUT_FIELD_TYPE_NUMBER = 7; - INPUT_FIELD_TYPE_PASSWORD = 8; - } - - enum AutocorrectMode { - AUTOCORRECT_MODE_UNSPECIFIED = 0; // Reserved - AUTOCORRECT_MODE_DISABLED = 1; - AUTOCORRECT_MODE_ENABLED = 2; - } - - enum PersonalizationMode { - PERSONALIZATION_MODE_UNSPECIFIED = 0; // Reserved - PERSONALIZATION_MODE_DISABLED = 1; - PERSONALIZATION_MODE_ENABLED = 2; - } - - optional InputFieldType type = 1; - optional AutocorrectMode autocorrect = 2; - optional PersonalizationMode personalization = 3; -} - -// Protobuf version of InputEngine::OnInputMethodChanged in -// chromeos/services/ime/public/mojom/input_engine.mojom -message OnInputMethodChanged { - optional string engine_id = 1; -} - -// Protobuf version of InputEngine::OnFocus in -// chromeos/services/ime/public/mojom/input_engine.mojom -message OnFocus { - optional InputFieldInfo info = 1; -} - -// Protobuf version of InputEngine::OnBlur in -// chromeos/services/ime/public/mojom/input_engine.mojom -message OnBlur {} - -// Protobuf version of InputEngine::OnKeyEvent in -// chromeos/services/ime/public/mojom/input_engine.mojom -message OnKeyEvent { - optional PhysicalKeyEvent key_event = 1; -} - -// Protobuf version of the reply from InputEngine::OnKeyEvent in -// chromeos/services/ime/public/mojom/input_engine.mojom -message OnKeyEventReply { - optional bool consumed = 1; -} - -// Protobuf version of InputEngine::PhysicalKeyEvent in -// chromeos/services/ime/public/mojom/input_engine.mojom -message PhysicalKeyEvent { - enum EventType { - EVENT_TYPE_UNSPECIFIED = 0; - EVENT_TYPE_KEY_DOWN = 1; - EVENT_TYPE_KEY_UP = 2; - } - - optional EventType type = 1; - optional string code = 2; - optional string key = 3; - optional ModifierState modifier_state = 4; -} - -// Protobuf version of InputEngine::PhysicalKeyEvent in -// chromeos/services/ime/public/mojom/input_engine.mojom -message ModifierState { - optional bool alt = 1; - optional bool alt_graph = 2; - optional bool caps_lock = 3; - optional bool control = 4; - optional bool meta = 5; - optional bool shift = 6; -} - -// Protobuf version of InputEngine::SelectionRange in -// chromeos/services/ime/public/mojom/input_engine.mojom -message SelectionRange { - optional uint32 anchor = 1; - optional uint32 focus = 2; -} - -// Protobuf version of gfx.mojom.Range in -// ui/gfx/range/mojom/range.mojom -message Range { - optional uint32 start = 1; - optional uint32 end = 2; -} - -// Protobuf version of InputEngine::AutocorrectSpan in -// chromeos/services/ime/public/mojom/input_engine.mojom -message AutocorrectSpan { - optional Range autocorrect_range = 1; - optional string original_text = 2; - optional string current_text = 3; -}; - -// Protobuf version of InputEngine::OnSurroundingTextChanged in -// chromeos/services/ime/public/mojom/input_engine.mojom -message OnSurroundingTextChanged { - optional string text = 1; - optional uint32 offset = 2; - optional SelectionRange selection_range = 3; -} - -// Protobuf version of InputEngine::OnCompositionCanceled in -// chromeos/services/ime/public/mojom/input_engine.mojom -message OnCompositionCanceled {} - -// Protobuf version of InputEngine::CommitTextCursorBehavior in -// chromeos/services/ime/public/mojom/input_engine.mojom -enum CommitTextCursorBehavior { - COMMIT_TEXT_CURSOR_BEHAVIOR_UNSPECIFIED = 0; // Reserved - COMMIT_TEXT_CURSOR_BEHAVIOR_MOVE_CURSOR_AFTER_TEXT = 1; - COMMIT_TEXT_CURSOR_BEHAVIOR_MOVE_CURSOR_BEFORE_TEXT = 2; -} - -// Protobuf version of InputEngine::CommitText in -// chromeos/services/ime/public/mojom/input_engine.mojom -message CommitText { - optional string text = 1; - optional CommitTextCursorBehavior cursor_behavior = 2; -} - -// Protobuf version of InputEngine::SetComposition in -// chromeos/services/ime/public/mojom/input_engine.mojom -message SetComposition { - optional string text = 1; -} - -// Protobuf version of InputEngine::SetCompositionRange in -// chromeos/services/ime/public/mojom/input_engine.mojom -message SetCompositionRange { - optional uint32 start_byte_index = 1; - optional uint32 end_byte_index = 2; -} - -// Protobuf version of InputEngine::FinishComposition in -// chromeos/services/ime/public/mojom/input_engine.mojom -message FinishComposition {} - -// Protobuf version of InputEngine::DeleteSurroundingText in -// chromeos/services/ime/public/mojom/input_engine.mojom -message DeleteSurroundingText { - optional uint32 num_bytes_before_cursor = 1; - optional uint32 num_bytes_after_cursor = 2; -} - -// Protobuf version of InputEngine::HandleAutocorrect in -// chromeos/services/ime/public/mojom/input_engine.mojom -message HandleAutocorrect { - optional AutocorrectSpan autocorrect_span = 1; -} - -// Protobuf version of CompletionCandidate in -// chromeos/services/ime/public/mojom/input_engine.mojom -message CompletionCandidate { - optional string text = 1; - optional float normalized_score = 2; -} - -// Protobuf version of SuggestionMode in -// chromeos/services/ime/public/mojom/input_engine.mojom -enum SuggestionMode { - SUGGESTION_MODE_UNSPECIFIED = 0; - SUGGESTION_MODE_COMPLETION = 1; - SUGGESTION_MODE_PREDICTION = 2; -} - -// Protobuf version of SuggestionType in -// chromeos/services/ime/public/mojom/input_engine.mojom -enum SuggestionType { - SUGGESTION_TYPE_UNSPECIFIED = 0; - SUGGESTION_TYPE_ASSISTIVE_PERSONAL_INFO = 1; - SUGGESTION_TYPE_ASSISTIVE_EMOJI = 2; - SUGGESTION_TYPE_MULTI_WORD = 3; -} - -// Protobuf version of SuggestionsRequest in -// chromeos/services/ime/public/mojom/input_engine.mojom -message SuggestionsRequest { - optional string text = 1; - repeated CompletionCandidate completion_candidates = 2; - optional SuggestionMode suggestion_mode = 3; -} - -// Protobuf version of SuggestionCandidate in -// chromeos/services/ime/public/mojom/input_engine.mojom -message SuggestionCandidate { - optional SuggestionMode mode = 1; - optional SuggestionType type = 2; - optional string text = 3; -} - -// Protobuf version of SuggestionsResponse in -// chromeos/services/ime/public/mojom/input_engine.mojom -message SuggestionsResponse { - repeated SuggestionCandidate candidates = 1; -} - -// Protobuf version of DisplaySuggestions in -// chromeos/services/ime/public/mojom/input_engine.mojom -message DisplaySuggestions { - repeated SuggestionCandidate candidates = 1; -} - -// Protobuf version of InputEngine::RecordUkm in -// chromeos/services/ime/public/mojom/input_engine.mojom -message RecordUkm { - oneof entry { NonCompliantApiMetric non_compliant_api = 1; } -} - -// Protobuf version of NonCompliantApiMetric in -// chromeos/services/ime/public/mojom/input_engine.mojom -message NonCompliantApiMetric { - enum InputMethodApiOperation { - OPERATION_UNSPECIFIED = 0; // Reserved - OPERATION_COMMIT_TEXT = 1; - OPERATION_SET_COMPOSITION_TEXT = 2; - OPERATION_DELETE_SURROUNDING_TEXT = 3; - } - - optional InputMethodApiOperation non_compliant_operation = 1; + reserved 1 to 18; }
diff --git a/components/autofill_assistant/browser/action_value.proto b/components/autofill_assistant/browser/action_value.proto index eee09765..807947d 100644 --- a/components/autofill_assistant/browser/action_value.proto +++ b/components/autofill_assistant/browser/action_value.proto
@@ -31,6 +31,11 @@ // A plain text. string text = 2; } + + // If the chunk fully matches the key, it will be replaced. When used + // in a regular expression context, the key needs to be quoted. Similarly, + // the replacement will be substituted as is, without being quoted. + map<string, string> replacements = 3; } repeated Chunk chunk = 1; }
diff --git a/components/autofill_assistant/browser/field_formatter.cc b/components/autofill_assistant/browser/field_formatter.cc index 11ffed0..b0590df 100644 --- a/components/autofill_assistant/browser/field_formatter.cc +++ b/components/autofill_assistant/browser/field_formatter.cc
@@ -18,6 +18,8 @@ #include "third_party/re2/src/re2/re2.h" #include "third_party/re2/src/re2/stringpiece.h" +namespace autofill_assistant { +namespace field_formatter { namespace { // Regex to find placeholders of the form ${key}, where key is an arbitrary // string that does not contain curly braces. The first capture group is for @@ -81,10 +83,17 @@ } } -} // namespace +std::string ApplyChunkReplacement( + const google::protobuf::Map<std::string, std::string>& replacements, + const std::string& value) { + const auto& it = replacements.find(value); + if (it != replacements.end()) { + return it->second; + } + return value; +} -namespace autofill_assistant { -namespace field_formatter { +} // namespace absl::optional<std::string> FormatString( const std::string& pattern, @@ -125,9 +134,10 @@ std::string* out_value) { out_value->clear(); for (const auto& chunk : value_expression.chunk()) { + std::string chunk_value; switch (chunk.chunk_case()) { case ValueExpression::Chunk::kText: - out_value->append(chunk.text()); + chunk_value = chunk.text(); break; case ValueExpression::Chunk::kKey: { auto rewrite_value = @@ -136,15 +146,16 @@ return ClientStatus(AUTOFILL_INFO_NOT_AVAILABLE); } if (quote_meta) { - out_value->append(re2::RE2::QuoteMeta(*rewrite_value)); + chunk_value = re2::RE2::QuoteMeta(*rewrite_value); } else { - out_value->append(*rewrite_value); + chunk_value = *rewrite_value; } break; } case ValueExpression::Chunk::CHUNK_NOT_SET: return ClientStatus(INVALID_ACTION); } + out_value->append(ApplyChunkReplacement(chunk.replacements(), chunk_value)); } return OkClientStatus();
diff --git a/components/autofill_assistant/browser/field_formatter_unittest.cc b/components/autofill_assistant/browser/field_formatter_unittest.cc index 951a625..fc358946 100644 --- a/components/autofill_assistant/browser/field_formatter_unittest.cc +++ b/components/autofill_assistant/browser/field_formatter_unittest.cc
@@ -35,6 +35,12 @@ using ::testing::Eq; using ::testing::IsSupersetOf; +void AddReplacement(ValueExpression::Chunk* chunk, + const std::string& match, + const std::string& replacement) { + (*chunk->mutable_replacements())[match] = replacement; +} + class FieldFormatterStateMapTest : public ::testing::Test { public: FieldFormatterStateMapTest() = default; @@ -263,6 +269,46 @@ EXPECT_EQ(std::string(), result); } +TEST(FieldFormatterTest, FormatExpressionWithReplacements) { + std::map<std::string, std::string> mappings = { + {"1", "A"}, {"2", "B"}, {"3", "+41"}}; + std::string result; + + ValueExpression value_expression; + auto* static_chunk = value_expression.add_chunk(); + static_chunk->set_text("static"); + AddReplacement(static_chunk, "static", "replacement1"); + auto* match_chunk = value_expression.add_chunk(); + match_chunk->set_key(1); + AddReplacement(match_chunk, "a", "replacement2"); + AddReplacement(match_chunk, "A", "replacement3"); + auto* no_match_chunk = value_expression.add_chunk(); + no_match_chunk->set_key(2); + AddReplacement(no_match_chunk, "b", "replacement4"); + EXPECT_EQ(ACTION_APPLIED, FormatExpression(value_expression, mappings, + /* quote_meta= */ false, &result) + .proto_status()); + EXPECT_EQ("replacement1replacement3B", result); + + ValueExpression value_expression_regexp; + auto* regexp_chunk = value_expression_regexp.add_chunk(); + regexp_chunk->set_key(3); + AddReplacement(regexp_chunk, "+41", "+0041"); + EXPECT_EQ(ACTION_APPLIED, FormatExpression(value_expression_regexp, mappings, + /* quote_meta= */ false, &result) + .proto_status()); + EXPECT_EQ("+0041", result); + EXPECT_EQ(ACTION_APPLIED, FormatExpression(value_expression_regexp, mappings, + /* quote_meta= */ true, &result) + .proto_status()); + EXPECT_EQ("\\+41", result); + AddReplacement(regexp_chunk, "\\+41", "\\+0041"); + EXPECT_EQ(ACTION_APPLIED, FormatExpression(value_expression_regexp, mappings, + /* quote_meta= */ true, &result) + .proto_status()); + EXPECT_EQ("\\+0041", result); +} + TEST(FieldFormatterTest, GetHumanReadableValueExpression) { ValueExpression value_expression; value_expression.add_chunk()->set_text("+");
diff --git a/components/browser_ui/widget/android/BUILD.gn b/components/browser_ui/widget/android/BUILD.gn index e36d4878..4365efa6 100644 --- a/components/browser_ui/widget/android/BUILD.gn +++ b/components/browser_ui/widget/android/BUILD.gn
@@ -183,10 +183,10 @@ "java/res/drawable/async_image_view_waiting.xml", "java/res/drawable/bottom_sheet_background.xml", "java/res/drawable/hairline_border_card_background.xml", - "java/res/drawable/hairline_border_card_dark_transparent_bg.xml", "java/res/drawable/ic_check_googblue_24dp_animated.xml", "java/res/drawable/ic_offline_pin_blue_white.xml", "java/res/drawable/ic_settings_gear_24dp.xml", + "java/res/drawable/incognito_card_bg.xml", "java/res/drawable/list_item_icon_modern_bg.xml", "java/res/drawable/modern_toolbar_text_box_background.xml", "java/res/drawable/query_tile_overlay.xml",
diff --git a/components/browser_ui/widget/android/java/res/drawable/hairline_border_card_dark_transparent_bg.xml b/components/browser_ui/widget/android/java/res/drawable/incognito_card_bg.xml similarity index 60% rename from components/browser_ui/widget/android/java/res/drawable/hairline_border_card_dark_transparent_bg.xml rename to components/browser_ui/widget/android/java/res/drawable/incognito_card_bg.xml index ce7444e4..713761d 100644 --- a/components/browser_ui/widget/android/java/res/drawable/hairline_border_card_dark_transparent_bg.xml +++ b/components/browser_ui/widget/android/java/res/drawable/incognito_card_bg.xml
@@ -6,7 +6,6 @@ <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > - <solid android:color="@android:color/transparent" /> - <stroke android:width="1dp" android:color="@color/hairline_stroke_color_dark"/> - <corners android:radius="@dimen/default_rounded_corner_radius" /> + <solid android:color="@color/incognito_card_bg_color" /> + <corners android:radius="@dimen/card_rounded_corner_radius" /> </shape>
diff --git a/components/browser_ui/widget/android/java/res/layout/promo_card_view_compact.xml b/components/browser_ui/widget/android/java/res/layout/promo_card_view_compact.xml index 5c4b05d..bf4b52f 100644 --- a/components/browser_ui/widget/android/java/res/layout/promo_card_view_compact.xml +++ b/components/browser_ui/widget/android/java/res/layout/promo_card_view_compact.xml
@@ -8,7 +8,6 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" - app:cardElevation="@dimen/default_elevation_1" style="@style/MaterialCardStyle"> <LinearLayout
diff --git a/components/browser_ui/widget/android/java/res/layout/promo_card_view_large.xml b/components/browser_ui/widget/android/java/res/layout/promo_card_view_large.xml index 44d824f..cfae058 100644 --- a/components/browser_ui/widget/android/java/res/layout/promo_card_view_large.xml +++ b/components/browser_ui/widget/android/java/res/layout/promo_card_view_large.xml
@@ -8,7 +8,6 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" - app:cardElevation="@dimen/default_elevation_1" style="@style/MaterialCardStyle"> <LinearLayout
diff --git a/components/browser_ui/widget/android/java/res/layout/promo_card_view_slim.xml b/components/browser_ui/widget/android/java/res/layout/promo_card_view_slim.xml index a1ca1b4..79aba69 100644 --- a/components/browser_ui/widget/android/java/res/layout/promo_card_view_slim.xml +++ b/components/browser_ui/widget/android/java/res/layout/promo_card_view_slim.xml
@@ -8,7 +8,6 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" - app:cardElevation="@dimen/default_elevation_1" style="@style/MaterialCardStyle"> <LinearLayout
diff --git a/components/browser_ui/widget/android/java/res/values/dimens.xml b/components/browser_ui/widget/android/java/res/values/dimens.xml index 02702a48..19b1cdc 100644 --- a/components/browser_ui/widget/android/java/res/values/dimens.xml +++ b/components/browser_ui/widget/android/java/res/values/dimens.xml
@@ -9,6 +9,7 @@ <dimen name="card_padding">16dp</dimen> <dimen name="clear_text_button_end_padding">10dp</dimen> <dimen name="default_rounded_corner_radius">8dp</dimen> + <dimen name="card_rounded_corner_radius">16dp</dimen> <!-- DualControlLayout --> <dimen name="dual_control_margin_between_items">8dp</dimen>
diff --git a/components/browser_ui/widget/android/java/res/values/styles.xml b/components/browser_ui/widget/android/java/res/values/styles.xml index dbe9a60f..7c50f4a 100644 --- a/components/browser_ui/widget/android/java/res/values/styles.xml +++ b/components/browser_ui/widget/android/java/res/values/styles.xml
@@ -6,7 +6,7 @@ <resources> <!-- Card styles --> <style name="CardTransparentForDark"> - <item name="android:background">@drawable/hairline_border_card_dark_transparent_bg</item> + <item name="android:background">@drawable/incognito_card_bg</item> </style> <style name="MaterialCardStyle" parent="Widget.MaterialComponents.CardView"> @@ -15,7 +15,7 @@ </style> <style name="MaterialCardShape" parent="ShapeAppearance.MaterialComponents.MediumComponent"> - <item name="cornerSize">16dp</item> + <item name="cornerSize">@dimen/card_rounded_corner_radius</item> </style> <style name="ListActionButton" parent="@style/TextButton">
diff --git a/components/policy/proto/chrome_device_policy.proto b/components/policy/proto/chrome_device_policy.proto index 5b711a0..3cb0a2ac 100644 --- a/components/policy/proto/chrome_device_policy.proto +++ b/components/policy/proto/chrome_device_policy.proto
@@ -1763,7 +1763,7 @@ // Setting that controls whether system-wide trace collection using the Perfetto // system tracing service is allowed. message DeviceSystemWideTracingEnabledProto { - optional bool enabled = 1 [default = true]; + optional bool enabled = 1 [default = false]; } // Setting that controls whether data access is enabled for Thunderbolt/USB4
diff --git a/components/services/app_service/public/mojom/types.mojom b/components/services/app_service/public/mojom/types.mojom index aac5e06..f740a40 100644 --- a/components/services/app_service/public/mojom/types.mojom +++ b/components/services/app_service/public/mojom/types.mojom
@@ -126,6 +126,10 @@ }; // How the app was installed. +// This should be kept in sync with histogram.xml, and InstallSource in +// enums.xml. +// Note the enumeration is used in UMA histogram so entries should not be +// re-ordered or removed. New entries should be added at the bottom. enum InstallSource { kUnknown = 0, kSystem, // Installed with the system and is considered a part of the OS.
diff --git a/components/translate/core/browser/translate_metrics_logger_impl.cc b/components/translate/core/browser/translate_metrics_logger_impl.cc index 55cfb58b..b36b189 100644 --- a/components/translate/core/browser/translate_metrics_logger_impl.cc +++ b/components/translate/core/browser/translate_metrics_logger_impl.cc
@@ -7,6 +7,8 @@ #include "base/metrics/histogram_functions.h" #include "base/metrics/metrics_hashes.h" #include "base/time/default_tick_clock.h" +#include "base/time/time.h" +#include "components/prefs/pref_service.h" #include "components/translate/core/browser/translate_manager.h" #include "services/metrics/public/cpp/metrics_utils.h" #include "services/metrics/public/cpp/ukm_builders.h" @@ -61,10 +63,55 @@ const char kTranslatePageLoadTriggerDecision[] = "Translate.PageLoad.TriggerDecision"; +// Application frequency UMA histograms. +const char kTranslateApplicationStartAlwaysTranslateLanguage[] = + "Translate.ApplicationStart.AlwaysTranslateLanguage"; +const char kTranslateApplicationStartAlwaysTranslateLanguageCount[] = + "Translate.ApplicationStart.AlwaysTranslateLanguage.Count"; +const char kTranslateApplicationStartNeverTranslateLanguage[] = + "Translate.ApplicationStart.NeverTranslateLanguage"; +const char kTranslateApplicationStartNeverTranslateLanguageCount[] = + "Translate.ApplicationStart.NeverTranslateLanguage.Count"; +const char kTranslateApplicationStartNeverTranslateSiteCount[] = + "Translate.ApplicationStart.NeverTranslateSite.Count"; + TranslationType NullTranslateMetricsLogger::GetNextManualTranslationType() { return TranslationType::kUninitialized; } +void TranslateMetricsLoggerImpl::LogApplicationStartMetrics( + std::unique_ptr<TranslatePrefs> translate_prefs) { + // TODO(1229371): These histograms are only recorded when Chrome starts up + // using the preferences of whatever profile is logged in at the time. This + // information should be recroded each time a profile logs in. + + std::vector<std::string> always_translate_languages = + translate_prefs->GetAlwaysTranslateLanguages(); + for (const auto& always_translate_language : always_translate_languages) { + base::UmaHistogramSparse(kTranslateApplicationStartAlwaysTranslateLanguage, + base::HashMetricName(always_translate_language)); + } + base::UmaHistogramCounts100( + kTranslateApplicationStartAlwaysTranslateLanguageCount, + always_translate_languages.size()); + + std::vector<std::string> never_translate_languages = + translate_prefs->GetNeverTranslateLanguages(); + for (const auto& never_translate_language : never_translate_languages) { + base::UmaHistogramSparse(kTranslateApplicationStartNeverTranslateLanguage, + base::HashMetricName(never_translate_language)); + } + base::UmaHistogramCounts100( + kTranslateApplicationStartNeverTranslateLanguageCount, + never_translate_languages.size()); + + std::vector<std::string> never_translate_sites = + translate_prefs->GetNeverPromptSitesBetween(base::Time::UnixEpoch(), + base::Time::Now()); + base::UmaHistogramCounts100(kTranslateApplicationStartNeverTranslateSiteCount, + never_translate_sites.size()); +} + TranslateMetricsLoggerImpl::TranslateMetricsLoggerImpl( base::WeakPtr<TranslateManager> translate_manager) : translate_manager_(translate_manager),
diff --git a/components/translate/core/browser/translate_metrics_logger_impl.h b/components/translate/core/browser/translate_metrics_logger_impl.h index 29827cf..ceb1080 100644 --- a/components/translate/core/browser/translate_metrics_logger_impl.h +++ b/components/translate/core/browser/translate_metrics_logger_impl.h
@@ -11,6 +11,7 @@ #include "base/memory/weak_ptr.h" #include "base/time/time.h" #include "components/translate/core/browser/translate_metrics_logger.h" +#include "components/translate/core/browser/translate_prefs.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace base { @@ -49,6 +50,13 @@ extern const char kTranslatePageLoadRankerVersion[]; extern const char kTranslatePageLoadTriggerDecision[]; +// Session frequency UMA histograms. +extern const char kTranslateApplicationStartAlwaysTranslateLanguage[]; +extern const char kTranslateApplicationStartAlwaysTranslateLanguageCount[]; +extern const char kTranslateApplicationStartNeverTranslateLanguage[]; +extern const char kTranslateApplicationStartNeverTranslateLanguageCount[]; +extern const char kTranslateApplicationStartNeverTranslateSiteCount[]; + class NullTranslateMetricsLogger : public TranslateMetricsLogger { public: NullTranslateMetricsLogger() = default; @@ -107,6 +115,9 @@ TranslateMetricsLoggerImpl& operator=(const TranslateMetricsLoggerImpl&) = delete; + static void LogApplicationStartMetrics( + std::unique_ptr<TranslatePrefs> translate_prefs); + // Overrides the clock used to track the time of certain actions. Should only // be used for testing purposes. void SetInternalClockForTesting(base::TickClock* clock);
diff --git a/components/translate/core/browser/translate_metrics_logger_impl_unittest.cc b/components/translate/core/browser/translate_metrics_logger_impl_unittest.cc index e39e740..d27f861 100644 --- a/components/translate/core/browser/translate_metrics_logger_impl_unittest.cc +++ b/components/translate/core/browser/translate_metrics_logger_impl_unittest.cc
@@ -12,6 +12,8 @@ #include "base/test/metrics/histogram_tester.h" #include "base/test/simple_test_tick_clock.h" #include "base/test/task_environment.h" +#include "components/language/core/browser/language_prefs.h" +#include "components/sync_preferences/testing_pref_service_syncable.h" #include "components/ukm/test_ukm_recorder.h" #include "services/metrics/public/cpp/metrics_utils.h" #include "services/metrics/public/cpp/ukm_builders.h" @@ -1460,6 +1462,60 @@ UIInteraction::kCloseUILostFocus, 1); } +TEST_F(TranslateMetricsLoggerImplTest, LogApplicationStartMetrics) { + // Make the TranslatePrefs for this test. + sync_preferences::TestingPrefServiceSyncable pref_service; + language::LanguagePrefs::RegisterProfilePrefs(pref_service.registry()); + TranslatePrefs::RegisterProfilePrefs(pref_service.registry()); + std::unique_ptr<TranslatePrefs> translate_prefs = + std::make_unique<TranslatePrefs>(&pref_service); + + // Add values to always translate language, never translate language, and + // never translate site. + translate_prefs->AddLanguagePairToAlwaysTranslateList("es", "x"); + translate_prefs->AddLanguagePairToAlwaysTranslateList("de", "x"); + + translate_prefs->BlockLanguage("en"); + translate_prefs->BlockLanguage("fr"); + + translate_prefs->AddSiteToNeverPromptList("a"); + translate_prefs->AddSiteToNeverPromptList("b"); + translate_prefs->AddSiteToNeverPromptList("c"); + translate_prefs->AddSiteToNeverPromptList("d"); + + // Record the session start metrics + TranslateMetricsLoggerImpl::LogApplicationStartMetrics( + std::move(translate_prefs)); + + // Check that the expected values were recorded to each histogram + histogram_tester()->ExpectTotalCount( + kTranslateApplicationStartAlwaysTranslateLanguage, 2); + histogram_tester()->ExpectBucketCount( + kTranslateApplicationStartAlwaysTranslateLanguage, + base::HashMetricName("es"), 1); + histogram_tester()->ExpectBucketCount( + kTranslateApplicationStartAlwaysTranslateLanguage, + base::HashMetricName("de"), 1); + + histogram_tester()->ExpectUniqueSample( + kTranslateApplicationStartAlwaysTranslateLanguageCount, 2, 1); + + histogram_tester()->ExpectTotalCount( + kTranslateApplicationStartNeverTranslateLanguage, 2); + histogram_tester()->ExpectBucketCount( + kTranslateApplicationStartNeverTranslateLanguage, + base::HashMetricName("en"), 1); + histogram_tester()->ExpectBucketCount( + kTranslateApplicationStartNeverTranslateLanguage, + base::HashMetricName("fr"), 1); + + histogram_tester()->ExpectUniqueSample( + kTranslateApplicationStartNeverTranslateLanguageCount, 2, 1); + + histogram_tester()->ExpectUniqueSample( + kTranslateApplicationStartNeverTranslateSiteCount, 4, 1); +} + } // namespace testing } // namespace translate
diff --git a/content/browser/back_forward_cache_browsertest.cc b/content/browser/back_forward_cache_browsertest.cc index cada6b8..3a0c4ef 100644 --- a/content/browser/back_forward_cache_browsertest.cc +++ b/content/browser/back_forward_cache_browsertest.cc
@@ -11843,10 +11843,20 @@ } }; +// TODO(https://crbug.com/1231849): flaky on Cast Linux. +#if defined(OS_LINUX) +#define MAYBE_PagesWithCacheControlNoStoreEnterBfcacheAndEvicted \ + DISABLED_PagesWithCacheControlNoStoreEnterBfcacheAndEvicted +#else +#define MAYBE_PagesWithCacheControlNoStoreEnterBfcacheAndEvicted \ + PagesWithCacheControlNoStoreEnterBfcacheAndEvicted +#endif + // Test that a page with cache-control:no-store enters bfcache with the flag on, // but does not get restored and gets evicted. -IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTestAllowCacheControlNoStore, - PagesWithCacheControlNoStoreEnterBfcacheAndEvicted) { +IN_PROC_BROWSER_TEST_F( + BackForwardCacheBrowserTestAllowCacheControlNoStore, + MAYBE_PagesWithCacheControlNoStoreEnterBfcacheAndEvicted) { net::test_server::ControllableHttpResponse response(embedded_test_server(), "/main_document"); net::test_server::ControllableHttpResponse response2(embedded_test_server(), @@ -12356,11 +12366,21 @@ } }; +// TODO(https://crbug.com/1231849): flaky on Cast Linux. +#if defined(OS_LINUX) +#define MAYBE_PagesWithCacheControlNoStoreRestoreFromBackForwardCache \ + DISABLED_PagesWithCacheControlNoStoreRestoreFromBackForwardCache +#else +#define MAYBE_PagesWithCacheControlNoStoreRestoreFromBackForwardCache \ + PagesWithCacheControlNoStoreRestoreFromBackForwardCache +#endif + + // Test that a page with cache-control:no-store enters bfcache with the flag on, // and gets restored if cookies do not change. IN_PROC_BROWSER_TEST_F( BackForwardCacheBrowserTestRestoreCacheControlNoStoreUnlessCookieChange, - PagesWithCacheControlNoStoreRestoreFromBackForwardCache) { + MAYBE_PagesWithCacheControlNoStoreRestoreFromBackForwardCache) { net::test_server::ControllableHttpResponse response(embedded_test_server(), "/main_document"); net::test_server::ControllableHttpResponse response2(embedded_test_server(),
diff --git a/content/browser/devtools/service_worker_devtools_agent_host.cc b/content/browser/devtools/service_worker_devtools_agent_host.cc index 7d56b58..580a896 100644 --- a/content/browser/devtools/service_worker_devtools_agent_host.cc +++ b/content/browser/devtools/service_worker_devtools_agent_host.cc
@@ -272,6 +272,8 @@ ServiceWorkerDevToolsAgentHost::CreateNetworkFactoryParamsForDevTools() { RenderProcessHost* rph = RenderProcessHost::FromID(worker_process_id_); const url::Origin origin = url::Origin::Create(url_); + // TODO(crbug.com/1231019): make sure client_security_state is no longer + // nullptr anywhere. auto factory = URLLoaderFactoryParamsHelper::CreateForWorker( rph, origin, net::IsolationInfo::Create(net::IsolationInfo::RequestType::kOther, @@ -281,6 +283,7 @@ static_cast<StoragePartitionImpl*>(rph->GetStoragePartition()) ->CreateAuthCertObserverForServiceWorker(), NetworkServiceDevToolsObserver::MakeSelfOwned(GetId()), + /*client_security_state=*/nullptr, /*debug_tag=*/"SWDTAH::CreateNetworkFactoryParamsForDevTools"); return {url::Origin::Create(GetURL()), net::SiteForCookies::FromUrl(GetURL()), std::move(factory)};
diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc index 19e8a933..243cd34 100644 --- a/content/browser/service_worker/embedded_worker_instance.cc +++ b/content/browser/service_worker/embedded_worker_instance.cc
@@ -784,6 +784,8 @@ mojo::PendingReceiver<network::mojom::URLLoaderFactory> default_factory_receiver = factory_bundle->pending_default_factory() .InitWithNewPipeAndPassReceiver(); + // TODO(crbug.com/1231019): make sure client_security_state is no longer + // nullptr anywhere. network::mojom::URLLoaderFactoryParamsPtr factory_params = URLLoaderFactoryParamsHelper::CreateForWorker( rph, origin, @@ -794,6 +796,7 @@ static_cast<StoragePartitionImpl*>(rph->GetStoragePartition()) ->CreateAuthCertObserverForServiceWorker(), NetworkServiceDevToolsObserver::MakeSelfOwned(devtools_worker_token), + /*client_security_state=*/nullptr, "EmbeddedWorkerInstance::CreateFactoryBundle"); bool bypass_redirect_checks = false;
diff --git a/content/browser/url_loader_factory_params_helper.cc b/content/browser/url_loader_factory_params_helper.cc index 7e1cd98d..e7517afb 100644 --- a/content/browser/url_loader_factory_params_helper.cc +++ b/content/browser/url_loader_factory_params_helper.cc
@@ -194,6 +194,8 @@ } // static +// TODO(crbug.com/1231019): make sure client_security_state is no longer nullptr +// anywhere. network::mojom::URLLoaderFactoryParamsPtr URLLoaderFactoryParamsHelper::CreateForWorker( RenderProcessHost* process, @@ -204,6 +206,7 @@ mojo::PendingRemote<network::mojom::URLLoaderNetworkServiceObserver> url_loader_network_observer, mojo::PendingRemote<network::mojom::DevToolsObserver> devtools_observer, + network::mojom::ClientSecurityStatePtr client_security_state, base::StringPiece debug_tag) { return CreateParams( process, @@ -211,8 +214,7 @@ request_initiator, // request_initiator_origin_lock false, // is_trusted absl::nullopt, // top_frame_token - isolation_info, - nullptr, // client_security_state + isolation_info, std::move(client_security_state), std::move(coep_reporter), false, // allow_universal_access_from_file_urls false, // is_for_isolated_world
diff --git a/content/browser/url_loader_factory_params_helper.h b/content/browser/url_loader_factory_params_helper.h index c6a8e96..80496c84 100644 --- a/content/browser/url_loader_factory_params_helper.h +++ b/content/browser/url_loader_factory_params_helper.h
@@ -85,6 +85,7 @@ mojo::PendingRemote<network::mojom::URLLoaderNetworkServiceObserver> url_loader_network_observer, mojo::PendingRemote<network::mojom::DevToolsObserver> devtools_observer, + network::mojom::ClientSecurityStatePtr client_security_state, base::StringPiece debug_tag); // Creates URLLoaderFactoryParams for Early Hints preload.
diff --git a/content/browser/worker_host/shared_worker_host.cc b/content/browser/worker_host/shared_worker_host.cc index 9d2cf34..a7f73cd 100644 --- a/content/browser/worker_host/shared_worker_host.cc +++ b/content/browser/worker_host/shared_worker_host.cc
@@ -326,8 +326,6 @@ default_factory_receiver = pending_default_factory.InitWithNewPipeAndPassReceiver(); - // TODO(https://crbug.com/1060832): Implement COEP reporter for shared - // workers. network::mojom::URLLoaderFactoryParamsPtr factory_params = CreateNetworkFactoryParamsForSubresources(); url::Origin origin = url::Origin::Create(instance_.url()); @@ -343,7 +341,6 @@ devtools_instrumentation::WillCreateURLLoaderFactoryForSharedWorker( this, &factory_params->factory_override); - // TODO(yhirano): Support COEP. GetProcessHost()->CreateURLLoaderFactory(std::move(default_factory_receiver), std::move(factory_params)); @@ -353,14 +350,19 @@ network::mojom::URLLoaderFactoryParamsPtr SharedWorkerHost::CreateNetworkFactoryParamsForSubresources() { url::Origin origin = GetStorageKey().origin(); - mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter> coep_reporter; - if (coep_reporter_) { - DCHECK(base::FeatureList::IsEnabled(blink::features::kCOEPForSharedWorker)); - coep_reporter_->Clone(coep_reporter.InitWithNewPipeAndPassReceiver()); + network::mojom::ClientSecurityStatePtr client_security_state; + if (base::FeatureList::IsEnabled(blink::features::kCOEPForSharedWorker)) { + // TODO(crbug.com/1231019): make sure client_security_state is no longer + // nullptr anywhere. + client_security_state = network::mojom::ClientSecurityState::New(); + client_security_state->cross_origin_embedder_policy = + cross_origin_embedder_policy(); + if (coep_reporter_) { + coep_reporter_->Clone(coep_reporter.InitWithNewPipeAndPassReceiver()); + } } - network::mojom::URLLoaderFactoryParamsPtr factory_params = URLLoaderFactoryParamsHelper::CreateForWorker( GetProcessHost(), origin, @@ -370,8 +372,9 @@ std::move(coep_reporter), /*url_loader_network_observer=*/mojo::NullRemote(), /*devtools_observer=*/mojo::NullRemote(), - /*debug_tag=*/"SharedWorkerHost::CreateNetworkFactoryForSubresource"); - // TODO(lyf): support COEP. + std::move(client_security_state), + /*debug_tag=*/ + "SharedWorkerHost::CreateNetworkFactoryForSubresource"); return factory_params; }
diff --git a/content/browser/worker_host/worker_script_fetch_initiator.cc b/content/browser/worker_host/worker_script_fetch_initiator.cc index 770c0c28..645ea83 100644 --- a/content/browser/worker_host/worker_script_fetch_initiator.cc +++ b/content/browser/worker_host/worker_script_fetch_initiator.cc
@@ -359,12 +359,14 @@ const url::Origin& request_initiator = *resource_request->request_initiator; // TODO(https://crbug.com/1060837): Pass the Mojo remote which is connected // to the COEP reporter in DedicatedWorkerHost. + // TODO(crbug.com/1231019): make sure client_security_state is no longer + // nullptr anywhere. network::mojom::URLLoaderFactoryParamsPtr factory_params = URLLoaderFactoryParamsHelper::CreateForWorker( factory_process, request_initiator, trusted_isolation_info, /*coep_reporter=*/mojo::NullRemote(), std::move(url_loader_network_observer), - std::move(devtools_observer), + std::move(devtools_observer), /*client_security_state=*/nullptr, /*debug_tag=*/"WorkerScriptFetchInitiator::CreateScriptLoader"); mojo::PendingReceiver<network::mojom::URLLoaderFactory>
diff --git a/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt index d739480b..940b5e37 100644 --- a/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt
@@ -419,6 +419,9 @@ # Flaky on Android, haven't investigated why yet. crbug.com/1221258 [ android ] Pixel_OffscreenCanvas2DResizeOnWorker [ Failure ] +# Pixel tests are flakily asserting in GPU process on SkiaRenderer/Vulkan +crbug.com/1230743 [ linux skia-renderer-vulkan ] Pixel_* [ RetryOnFailure ] + ####################################################################### # Automated Entries After This Point - Do Not Manually Add Below Here # #######################################################################
diff --git a/extensions/browser/BUILD.gn b/extensions/browser/BUILD.gn index f28037b..0b631bc 100644 --- a/extensions/browser/BUILD.gn +++ b/extensions/browser/BUILD.gn
@@ -868,7 +868,6 @@ "updater/safe_manifest_parser_unittest.cc", "updater/update_data_provider_unittest.cc", "updater/update_service_unittest.cc", - "value_store/leveldb_scoped_database_unittest.cc", "value_store/leveldb_value_store_unittest.cc", "value_store/testing_value_store_unittest.cc", "value_store/value_store_change_unittest.cc",
diff --git a/extensions/browser/value_store/BUILD.gn b/extensions/browser/value_store/BUILD.gn index 8e444da..33ce66b8 100644 --- a/extensions/browser/value_store/BUILD.gn +++ b/extensions/browser/value_store/BUILD.gn
@@ -13,8 +13,6 @@ "lazy_leveldb.h", "legacy_value_store_factory.cc", "legacy_value_store_factory.h", - "leveldb_scoped_database.cc", - "leveldb_scoped_database.h", "leveldb_value_store.cc", "leveldb_value_store.h", "settings_namespace.cc", @@ -23,11 +21,14 @@ "value_store.h", "value_store_change.cc", "value_store_change.h", + "value_store_client_id.h", "value_store_factory.h", "value_store_factory_impl.cc", "value_store_factory_impl.h", "value_store_frontend.cc", "value_store_frontend.h", + "value_store_task_runner.cc", + "value_store_task_runner.h", ] deps = [
diff --git a/extensions/browser/value_store/lazy_leveldb.cc b/extensions/browser/value_store/lazy_leveldb.cc index c51f681..0288dfc 100644 --- a/extensions/browser/value_store/lazy_leveldb.cc +++ b/extensions/browser/value_store/lazy_leveldb.cc
@@ -61,12 +61,13 @@ LazyLevelDb::LazyLevelDb(const std::string& uma_client_name, const base::FilePath& path) - : db_path_(path), open_options_(leveldb_env::Options()) { + : db_path_(path) { open_options_.create_if_missing = true; open_options_.paranoid_checks = true; read_options_.verify_checksums = true; + // TODO(crbug.com/1226956): Remove reference to extensions. // Used in lieu of UMA_HISTOGRAM_ENUMERATION because the histogram name is // not a constant. open_histogram_ = base::LinearHistogram::FactoryGet(
diff --git a/extensions/browser/value_store/lazy_leveldb.h b/extensions/browser/value_store/lazy_leveldb.h index 1beadaf..5b3f285 100644 --- a/extensions/browser/value_store/lazy_leveldb.h +++ b/extensions/browser/value_store/lazy_leveldb.h
@@ -27,6 +27,9 @@ // calling any other *protected* method. class LazyLevelDb { public: + LazyLevelDb(const LazyLevelDb&) = delete; + LazyLevelDb& operator=(const LazyLevelDb&) = delete; + // Creates a new database iterator. This iterator *must* be deleted before // this database is closed. ValueStore::Status CreateIterator( @@ -95,8 +98,6 @@ base::HistogramBase* open_histogram_ = nullptr; base::HistogramBase* db_restore_histogram_ = nullptr; base::HistogramBase* value_restore_histogram_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(LazyLevelDb); }; #endif // EXTENSIONS_BROWSER_VALUE_STORE_LAZY_LEVELDB_H_
diff --git a/extensions/browser/value_store/legacy_value_store_factory.cc b/extensions/browser/value_store/legacy_value_store_factory.cc index c5f52c61..f6032bde 100644 --- a/extensions/browser/value_store/legacy_value_store_factory.cc +++ b/extensions/browser/value_store/legacy_value_store_factory.cc
@@ -10,12 +10,14 @@ #include "base/files/file_enumerator.h" #include "base/files/file_util.h" #include "extensions/browser/value_store/leveldb_value_store.h" +#include "extensions/browser/value_store/value_store_client_id.h" #include "extensions/common/constants.h" using base::AutoLock; namespace { +// TODO(crbug.com/1226956): Update extensions specific UMA logging. // Statistics are logged to UMA with these strings as part of histogram name. // They can all be found under Extensions.Database.Open.<client>. Changing this // needs to synchronize with histograms.xml, AND will also become incompatible @@ -41,23 +43,23 @@ : data_path_(data_path) {} base::FilePath LegacyValueStoreFactory::ModelSettings::GetDBPath( - const ExtensionId& extension_id) const { - return data_path_.AppendASCII(extension_id); + const ValueStoreClientId& id) const { + return data_path_.AppendASCII(id); } bool LegacyValueStoreFactory::ModelSettings::DeleteData( - const ExtensionId& extension_id) { - return base::DeletePathRecursively(GetDBPath(extension_id)); + const ValueStoreClientId& id) { + return base::DeletePathRecursively(GetDBPath(id)); } bool LegacyValueStoreFactory::ModelSettings::DataExists( - const ExtensionId& extension_id) const { - return ValidDBExists(GetDBPath(extension_id)); + const ValueStoreClientId& id) const { + return ValidDBExists(GetDBPath(id)); } -std::set<ExtensionId> +std::set<ValueStoreClientId> LegacyValueStoreFactory::ModelSettings::GetKnownExtensionIDs() const { - std::set<ExtensionId> result; + std::set<ValueStoreClientId> result; // Leveldb databases are directories inside |base_path_|. base::FileEnumerator extension_dirs(data_path_, false, @@ -123,7 +125,7 @@ return nullptr; } -std::set<ExtensionId> +std::set<ValueStoreClientId> LegacyValueStoreFactory::SettingsRoot::GetKnownExtensionIDs( ModelType model_type) const { switch (model_type) { @@ -135,7 +137,7 @@ return extensions_->GetKnownExtensionIDs(); } NOTREACHED(); - return std::set<ExtensionId>(); + return std::set<ValueStoreClientId>(); } // @@ -177,39 +179,39 @@ std::unique_ptr<ValueStore> LegacyValueStoreFactory::CreateSettingsStore( settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) { + const ValueStoreClientId& id) { const ModelSettings* settings_root = GetSettingsRoot(settings_namespace).GetModel(model_type); DCHECK(settings_root != nullptr); - return std::make_unique<LeveldbValueStore>( - kSettingsDatabaseUMAClientName, settings_root->GetDBPath(extension_id)); + return std::make_unique<LeveldbValueStore>(kSettingsDatabaseUMAClientName, + settings_root->GetDBPath(id)); } void LegacyValueStoreFactory::DeleteSettings( settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) { + const ValueStoreClientId& id) { ModelSettings* model_settings = GetSettingsRoot(settings_namespace).GetModel(model_type); if (model_settings == nullptr) { NOTREACHED(); return; } - model_settings->DeleteData(extension_id); + model_settings->DeleteData(id); } bool LegacyValueStoreFactory::HasSettings( settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) { + const ValueStoreClientId& id) { const ModelSettings* model_settings = GetSettingsRoot(settings_namespace).GetModel(model_type); if (model_settings == nullptr) return false; - return model_settings->DataExists(extension_id); + return model_settings->DataExists(id); } -std::set<ExtensionId> LegacyValueStoreFactory::GetKnownExtensionIDs( +std::set<ValueStoreClientId> LegacyValueStoreFactory::GetKnownExtensionIDs( settings_namespace::Namespace settings_type, ModelType model_type) const { return GetSettingsRoot(settings_type).GetKnownExtensionIDs(model_type);
diff --git a/extensions/browser/value_store/legacy_value_store_factory.h b/extensions/browser/value_store/legacy_value_store_factory.h index 2e57657f..a594594 100644 --- a/extensions/browser/value_store/legacy_value_store_factory.h +++ b/extensions/browser/value_store/legacy_value_store_factory.h
@@ -12,17 +12,23 @@ #include "base/files/file_path.h" #include "base/memory/ref_counted.h" #include "extensions/browser/value_store/value_store.h" +#include "extensions/browser/value_store/value_store_client_id.h" #include "extensions/browser/value_store/value_store_factory.h" -#include "extensions/common/extension_id.h" namespace extensions { // A factory to create legacy ValueStore instances for storing extension // state/rules/settings. "legacy" refers to the initial storage implementation -// which created a settings database per extension. +// which created a settings database per extension. This factory was created as +// part of a refactoring for crbug.com/453946 which was never finished. Because +// it was never finished, this is the only implementation of ValueStoreFactory. +// TODO(crbug.com/453946): Finish this refactoring or merge +// legacy_value_store_factory with value_store_factory_impl. class LegacyValueStoreFactory : public ValueStoreFactory { public: explicit LegacyValueStoreFactory(const base::FilePath& profile_path); + LegacyValueStoreFactory(const LegacyValueStoreFactory&) = delete; + LegacyValueStoreFactory& operator=(const LegacyValueStoreFactory&) = delete; bool RulesDBExists() const; bool StateDBExists() const; @@ -33,15 +39,15 @@ std::unique_ptr<ValueStore> CreateSettingsStore( settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) override; + const ValueStoreClientId& id) override; void DeleteSettings(settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) override; + const ValueStoreClientId& id) override; bool HasSettings(settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) override; - std::set<ExtensionId> GetKnownExtensionIDs( + const ValueStoreClientId& id) override; + std::set<ValueStoreClientId> GetKnownExtensionIDs( settings_namespace::Namespace settings_namespace, ModelType model_type) const override; @@ -53,17 +59,17 @@ class ModelSettings { public: explicit ModelSettings(const base::FilePath& data_path); + ModelSettings(const ModelSettings&) = delete; + ModelSettings& operator=(const ModelSettings&) = delete; - base::FilePath GetDBPath(const ExtensionId& extension_id) const; - bool DeleteData(const ExtensionId& extension_id); - bool DataExists(const ExtensionId& extension_id) const; - std::set<ExtensionId> GetKnownExtensionIDs() const; + base::FilePath GetDBPath(const ValueStoreClientId& id) const; + bool DeleteData(const ValueStoreClientId& id); + bool DataExists(const ValueStoreClientId& id) const; + std::set<ValueStoreClientId> GetKnownExtensionIDs() const; private: // The path containing all settings databases under this root. const base::FilePath data_path_; - - DISALLOW_COPY_AND_ASSIGN(ModelSettings); }; // Manages two collections of legacy settings databases (apps & extensions) @@ -76,16 +82,18 @@ const std::string& extension_dirname, const std::string& app_dirname); ~SettingsRoot(); + SettingsRoot(const SettingsRoot&) = delete; + SettingsRoot& operator=(const SettingsRoot&) = delete; - std::set<ExtensionId> GetKnownExtensionIDs(ModelType model_type) const; + std::set<ValueStoreClientId> GetKnownExtensionIDs( + ModelType model_type) const; const ModelSettings* GetModel(ModelType model_type) const; ModelSettings* GetModel(ModelType model_type); private: + // TODO(crbug.com/1226956): Remove references to extensions and Chrome Apps. std::unique_ptr<ModelSettings> extensions_; std::unique_ptr<ModelSettings> apps_; - - DISALLOW_COPY_AND_ASSIGN(SettingsRoot); }; ~LegacyValueStoreFactory() override; @@ -102,8 +110,6 @@ SettingsRoot local_settings_; SettingsRoot sync_settings_; SettingsRoot managed_settings_; - - DISALLOW_COPY_AND_ASSIGN(LegacyValueStoreFactory); }; } // namespace extensions
diff --git a/extensions/browser/value_store/leveldb_scoped_database.cc b/extensions/browser/value_store/leveldb_scoped_database.cc deleted file mode 100644 index cffb507b..0000000 --- a/extensions/browser/value_store/leveldb_scoped_database.cc +++ /dev/null
@@ -1,163 +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. - -#include "extensions/browser/value_store/leveldb_scoped_database.h" - -#include <utility> - -#include "base/json/json_reader.h" -#include "base/json/json_writer.h" -#include "third_party/leveldatabase/src/include/leveldb/write_batch.h" - -namespace { - -// Note: Changing the delimiter will change the database schema. -const char kKeyDelimiter = ':'; // delimits scope and key -const char kCannotSerialize[] = "Cannot serialize value to JSON"; -const char kInvalidJson[] = "Invalid JSON"; -const char kInvalidScope[] = "Invalid scope"; - -} // namespace - -bool LeveldbScopedDatabase::SplitKey(const std::string& full_key, - std::string* scope, - std::string* key) { - size_t pos = full_key.find(kKeyDelimiter); - if (pos == std::string::npos) - return false; - if (pos == 0) - return false; - *scope = full_key.substr(0, pos); - *key = full_key.substr(pos + 1); - return true; -} - -bool LeveldbScopedDatabase::CreateKey(const std::string& scope, - const std::string& key, - std::string* scoped_key) { - if (scope.empty() || scope.find(kKeyDelimiter) != std::string::npos) - return false; - *scoped_key = scope + kKeyDelimiter + key; - return true; -} - -LeveldbScopedDatabase::LeveldbScopedDatabase(const std::string& uma_client_name, - const base::FilePath& path) - : LazyLevelDb(uma_client_name, path) {} - -LeveldbScopedDatabase::~LeveldbScopedDatabase() {} - -ValueStore::Status LeveldbScopedDatabase::Read( - const std::string& scope, - const std::string& key, - absl::optional<base::Value>* value) { - ValueStore::Status status = EnsureDbIsOpen(); - if (!status.ok()) - return status; - std::string scoped_key; - if (!CreateKey(scope, key, &scoped_key)) - return ValueStore::Status(ValueStore::OTHER_ERROR, kInvalidScope); - - return LazyLevelDb::Read(scoped_key, value); -} - -ValueStore::Status LeveldbScopedDatabase::Read(const std::string& scope, - base::DictionaryValue* values) { - ValueStore::Status status = EnsureDbIsOpen(); - if (!status.ok()) - return status; - - std::string prefix; - if (!CreateKey(scope, "", &prefix)) - return ValueStore::Status(ValueStore::OTHER_ERROR, kInvalidScope); - - std::unique_ptr<leveldb::Iterator> it(db()->NewIterator(read_options())); - - std::unique_ptr<base::DictionaryValue> settings(new base::DictionaryValue()); - - for (it->Seek(prefix); it->Valid() && it->key().starts_with(prefix); - it->Next()) { - leveldb::Slice descoped_key(it->key()); - descoped_key.remove_prefix(prefix.size()); - absl::optional<base::Value> value = base::JSONReader::Read( - base::StringPiece(it->value().data(), it->value().size())); - if (!value) { - return ValueStore::Status(ValueStore::CORRUPTION, - LazyLevelDb::Delete(it->key().ToString()).ok() - ? ValueStore::VALUE_RESTORE_DELETE_SUCCESS - : ValueStore::VALUE_RESTORE_DELETE_FAILURE, - kInvalidJson); - } - values->SetKey(descoped_key.ToString(), std::move(*value)); - } - - return status; -} - -ValueStore::Status LeveldbScopedDatabase::Write(const std::string& scope, - const std::string& key, - const base::Value& value) { - ValueStore::Status status = EnsureDbIsOpen(); - if (!status.ok()) - return status; - - leveldb::WriteBatch batch; - status = AddToWriteBatch(&batch, scope, key, value); - if (!status.ok()) - return status; - return ToValueStoreError(db()->Write(write_options(), &batch)); -} - -ValueStore::Status LeveldbScopedDatabase::Write( - const std::string& scope, - const base::DictionaryValue& values) { - ValueStore::Status status = EnsureDbIsOpen(); - if (!status.ok()) - return status; - - leveldb::WriteBatch batch; - for (base::DictionaryValue::Iterator it(values); !it.IsAtEnd(); - it.Advance()) { - status = AddToWriteBatch(&batch, scope, it.key(), it.value()); - if (!status.ok()) - return status; - } - - return ToValueStoreError(db()->Write(write_options(), &batch)); -} - -ValueStore::Status LeveldbScopedDatabase::DeleteValues( - const std::string& scope, - const std::vector<std::string>& keys) { - ValueStore::Status status = EnsureDbIsOpen(); - if (!status.ok()) - return status; - - leveldb::WriteBatch batch; - std::string scoped_key; - for (const auto& key : keys) { - if (!CreateKey(scope, key, &scoped_key)) - return ValueStore::Status(ValueStore::OTHER_ERROR, kInvalidScope); - batch.Delete(scoped_key); - } - - return ToValueStoreError(db()->Write(write_options(), &batch)); -} - -ValueStore::Status LeveldbScopedDatabase::AddToWriteBatch( - leveldb::WriteBatch* batch, - const std::string& scope, - const std::string& key, - const base::Value& value) { - std::string scoped_key; - if (!CreateKey(scope, key, &scoped_key)) - return ValueStore::Status(ValueStore::OTHER_ERROR, kInvalidScope); - - std::string value_as_json; - if (!base::JSONWriter::Write(value, &value_as_json)) - return ValueStore::Status(ValueStore::OTHER_ERROR, kCannotSerialize); - - batch->Put(scoped_key, value_as_json); - return ValueStore::Status(); -}
diff --git a/extensions/browser/value_store/leveldb_scoped_database.h b/extensions/browser/value_store/leveldb_scoped_database.h deleted file mode 100644 index 8ee8da13..0000000 --- a/extensions/browser/value_store/leveldb_scoped_database.h +++ /dev/null
@@ -1,84 +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. - -#ifndef EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_SCOPED_DATABASE_H_ -#define EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_SCOPED_DATABASE_H_ - -#include <memory> -#include <string> -#include <vector> - -#include "base/macros.h" -#include "base/memory/ref_counted.h" -#include "extensions/browser/value_store/lazy_leveldb.h" -#include "extensions/browser/value_store/value_store.h" -#include "third_party/abseil-cpp/absl/types/optional.h" - -// This database is used to persist values with their keys scoped within a -// specified namespace - AKA |scope|. Values will be written as follows: -// -// <scope><delimiter><scoped-key> -> <value> -// -// Note: |scope| must not contain the delimiter, but the |key| may. -// -class LeveldbScopedDatabase - : public LazyLevelDb, - public base::RefCountedThreadSafe<LeveldbScopedDatabase> { - public: - // Splits the full key into the scope and inner (scoped) key. - // Returns true if successfully split, and false if not and leaves |scope| and - // |key| unchanged. - static bool SplitKey(const std::string& full_key, - std::string* scope, - std::string* key); - - // Creates a fully scoped key. |scope| cannot be an empty key and cannot - // contain the delimiter. |scoped_key| will be set to: - // - // <scope><delimiter><key> - // - // Will return true when successful, false if not. - static bool CreateKey(const std::string& scope, - const std::string& key, - std::string* scoped_key); - - LeveldbScopedDatabase(const std::string& uma_client_name, - const base::FilePath& path); - - // Reads a single |value| from the database for the specified |key|. - ValueStore::Status Read(const std::string& scope, - const std::string& key, - absl::optional<base::Value>* value); - - // Reads all |values| from the database stored within the specified |scope|. - ValueStore::Status Read(const std::string& scope, - base::DictionaryValue* values); - - // Writes a single |key| => |value| to the database. - ValueStore::Status Write(const std::string& scope, - const std::string& key, - const base::Value& value); - - // Writes all |values| to the database with the keys scoped with |scope|. - ValueStore::Status Write(const std::string& scope, - const base::DictionaryValue& values); - - // Deletes all |keys| from the databases withing the specified |scope|. - ValueStore::Status DeleteValues(const std::string& scope, - const std::vector<std::string>& keys); - - protected: - friend class base::RefCountedThreadSafe<LeveldbScopedDatabase>; - virtual ~LeveldbScopedDatabase(); - - static ValueStore::Status AddToWriteBatch(leveldb::WriteBatch* batch, - const std::string& scope, - const std::string& key, - const base::Value& value); - - private: - DISALLOW_COPY_AND_ASSIGN(LeveldbScopedDatabase); -}; - -#endif // EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_SCOPED_DATABASE_H_
diff --git a/extensions/browser/value_store/leveldb_scoped_database_unittest.cc b/extensions/browser/value_store/leveldb_scoped_database_unittest.cc deleted file mode 100644 index b788aa7b..0000000 --- a/extensions/browser/value_store/leveldb_scoped_database_unittest.cc +++ /dev/null
@@ -1,206 +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. - -#include "extensions/browser/value_store/leveldb_scoped_database.h" - -#include <stddef.h> - -#include <map> -#include <string> - -#include "base/files/file_util.h" -#include "base/files/scoped_temp_dir.h" -#include "base/memory/ref_counted.h" -#include "base/values.h" -#include "content/public/test/browser_task_environment.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace { -const char kTestUMAClientName[] = "Test"; -} // namespace - -class LeveldbScopedDatabaseUnitTest : public testing::Test { - public: - LeveldbScopedDatabaseUnitTest() {} - ~LeveldbScopedDatabaseUnitTest() override {} - - protected: - void SetUp() override { - ASSERT_TRUE(database_dir_.CreateUniqueTempDir()); - db_ = - new LeveldbScopedDatabase(kTestUMAClientName, database_dir_.GetPath()); - } - - void TearDown() override { - db_ = nullptr; - base::DeletePathRecursively(database_dir_.GetPath()); - } - - ValueStore::Status ReadAllValues( - std::map<std::string, std::string>* values) const { - values->clear(); - leveldb::ReadOptions read_options; - read_options.verify_checksums = true; - std::unique_ptr<leveldb::Iterator> iterator; - ValueStore::Status status = db_->CreateIterator(read_options, &iterator); - if (!status.ok()) - return status; - iterator->SeekToFirst(); - while (iterator->Valid()) { - // The LeveldbProfileDatabase writes all values as JSON strings. - // This method returns the encoded strings. - (*values)[iterator->key().ToString()] = iterator->value().ToString(); - iterator->Next(); - } - return db_->ToValueStoreError(iterator->status()); - } - - content::BrowserTaskEnvironment task_environment_; - base::ScopedTempDir database_dir_; - scoped_refptr<LeveldbScopedDatabase> db_; -}; - -TEST_F(LeveldbScopedDatabaseUnitTest, TestSplitKey) { - std::string scope; - std::string key; - EXPECT_TRUE(LeveldbScopedDatabase::SplitKey("s:k", &scope, &key)); - EXPECT_EQ(scope, "s"); - EXPECT_EQ(key, "k"); - EXPECT_TRUE(LeveldbScopedDatabase::SplitKey("s:", &scope, &key)); - EXPECT_EQ(scope, "s"); - EXPECT_EQ(key, ""); - EXPECT_TRUE(LeveldbScopedDatabase::SplitKey("s:k:o", &scope, &key)); - EXPECT_EQ(scope, "s"); - EXPECT_EQ(key, "k:o"); - EXPECT_FALSE(LeveldbScopedDatabase::SplitKey("s-k", &scope, &key)); - EXPECT_FALSE(LeveldbScopedDatabase::SplitKey("", &scope, &key)); - EXPECT_FALSE(LeveldbScopedDatabase::SplitKey(":k", &scope, &key)); -} - -TEST_F(LeveldbScopedDatabaseUnitTest, TestCreateKey) { - std::string scoped_key; - - EXPECT_TRUE(LeveldbScopedDatabase::CreateKey("scope", "key", &scoped_key)); - EXPECT_EQ("scope:key", scoped_key); - EXPECT_TRUE(LeveldbScopedDatabase::CreateKey("scope", "", &scoped_key)); - EXPECT_EQ("scope:", scoped_key); - EXPECT_TRUE(LeveldbScopedDatabase::CreateKey("scope", "key:o", &scoped_key)); - EXPECT_EQ("scope:key:o", scoped_key); - - EXPECT_FALSE(LeveldbScopedDatabase::CreateKey("", "key", &scoped_key)); - EXPECT_FALSE( - LeveldbScopedDatabase::CreateKey("scope:withdelim", "key", &scoped_key)); -} - -TEST_F(LeveldbScopedDatabaseUnitTest, TestWrite) { - std::map<std::string, std::string> db_values; - EXPECT_TRUE(ReadAllValues(&db_values).ok()); - EXPECT_EQ(0u, db_values.size()); - - base::DictionaryValue scope1_values; - scope1_values.SetString("s1_key1", "s1_value1"); - scope1_values.SetString("s1_key2", "s1_value2"); - EXPECT_FALSE(db_->Write("", scope1_values).ok()); - EXPECT_TRUE(db_->Write("scope1", scope1_values).ok()); - - base::DictionaryValue scope2_values; - scope2_values.SetString("s2_key1", "s2_value1"); - scope2_values.SetString("s2_key2", "s2_value2"); - EXPECT_TRUE(db_->Write("scope2", scope2_values).ok()); - - // Read all values using raw leveldb. Values are JSON strings. - EXPECT_TRUE(ReadAllValues(&db_values).ok()); - EXPECT_EQ(4u, db_values.size()); - EXPECT_EQ("\"s1_value1\"", db_values["scope1:s1_key1"]); - EXPECT_EQ("\"s1_value2\"", db_values["scope1:s1_key2"]); - EXPECT_EQ("\"s2_value1\"", db_values["scope2:s2_key1"]); - EXPECT_EQ("\"s2_value2\"", db_values["scope2:s2_key2"]); - - // Intentionally overwrite value (with a new value). - base::DictionaryValue changed_scope2_values; - changed_scope2_values.SetString("s2_key1", "s2_value1"); - changed_scope2_values.SetString("s2_key2", "s2_value3"); - EXPECT_TRUE(db_->Write("scope2", changed_scope2_values).ok()); - - EXPECT_TRUE(ReadAllValues(&db_values).ok()); - EXPECT_EQ(4u, db_values.size()); - EXPECT_EQ("\"s1_value1\"", db_values["scope1:s1_key1"]); - EXPECT_EQ("\"s1_value2\"", db_values["scope1:s1_key2"]); - EXPECT_EQ("\"s2_value1\"", db_values["scope2:s2_key1"]); - EXPECT_EQ("\"s2_value3\"", db_values["scope2:s2_key2"]); -} - -TEST_F(LeveldbScopedDatabaseUnitTest, TestRead) { - base::DictionaryValue scope1_values; - scope1_values.SetString("s1_key1", "s1_value1"); - scope1_values.SetString("s1_key2", "s1_value2"); - EXPECT_TRUE(db_->Write("scope1", scope1_values).ok()); - - base::DictionaryValue scope2_values; - scope2_values.SetString("s2_key1", "s2_value1"); - scope2_values.SetString("s2_key2", "s2_value2"); - EXPECT_TRUE(db_->Write("scope2", scope2_values).ok()); - - // And test an empty scope. - EXPECT_FALSE(db_->Write("", scope2_values).ok()); - - base::DictionaryValue read_s1_vals; - EXPECT_FALSE(db_->Read("", &read_s1_vals).ok()); - EXPECT_TRUE(db_->Read("scope1", &read_s1_vals).ok()); - EXPECT_TRUE(scope1_values.Equals(&read_s1_vals)); - - base::DictionaryValue read_s2_vals; - EXPECT_TRUE(db_->Read("scope2", &read_s2_vals).ok()); - EXPECT_TRUE(scope2_values.Equals(&read_s2_vals)); -} - -TEST_F(LeveldbScopedDatabaseUnitTest, TestEmptyValue) { - base::DictionaryValue values; - values.SetString("s1_key1", ""); - EXPECT_TRUE(db_->Write("scope1", values).ok()); - - absl::optional<base::Value> value; - ASSERT_TRUE(db_->Read("scope1", "s1_key1", &value).ok()); - ASSERT_TRUE(value.has_value()); - ASSERT_TRUE(value->is_string()); - EXPECT_EQ(value->GetString(), ""); -} - -TEST_F(LeveldbScopedDatabaseUnitTest, TestValueContainingDelimiter) { - base::DictionaryValue values; - values.SetString("s1_key1", "with:delimiter"); - EXPECT_TRUE(db_->Write("scope1", values).ok()); - - absl::optional<base::Value> value; - ASSERT_TRUE(db_->Read("scope1", "s1_key1", &value).ok()); - ASSERT_TRUE(value.has_value()); - ASSERT_TRUE(value->is_string()); - EXPECT_EQ(value->GetString(), "with:delimiter"); -} - -TEST_F(LeveldbScopedDatabaseUnitTest, TestDeleteValues) { - base::DictionaryValue scope1_values; - scope1_values.SetString("s1_key1", "s1_value1"); - scope1_values.SetString("s1_key2", "s1_value2"); - EXPECT_TRUE(db_->Write("scope1", scope1_values).ok()); - - base::DictionaryValue scope2_values; - scope2_values.SetString("s2_key1", "s2_value1"); - scope2_values.SetString("s2_key2", "s2_value2"); - EXPECT_TRUE(db_->Write("scope2", scope2_values).ok()); - - std::vector<std::string> keys; - keys.push_back("s2_key1"); - keys.push_back("s2_key2"); - keys.push_back("s1_key1"); - EXPECT_TRUE(db_->DeleteValues("scope2", keys).ok()); - - base::DictionaryValue read_s1_vals; - EXPECT_TRUE(db_->Read("scope1", &read_s1_vals).ok()); - EXPECT_TRUE(scope1_values.Equals(&read_s1_vals)); - - base::DictionaryValue read_s2_vals; - EXPECT_TRUE(db_->Read("scope2", &read_s2_vals).ok()); - EXPECT_TRUE(read_s2_vals.DictEmpty()); -}
diff --git a/extensions/browser/value_store/leveldb_value_store.h b/extensions/browser/value_store/leveldb_value_store.h index 4a55b89..7f4a8a4 100644 --- a/extensions/browser/value_store/leveldb_value_store.h +++ b/extensions/browser/value_store/leveldb_value_store.h
@@ -37,6 +37,9 @@ // Must be deleted on the FILE thread. ~LeveldbValueStore() override; + LeveldbValueStore(const LeveldbValueStore&) = delete; + LeveldbValueStore& operator=(const LeveldbValueStore&) = delete; + // ValueStore implementation. size_t GetBytesInUse(const std::string& key) override; size_t GetBytesInUse(const std::vector<std::string>& keys) override; @@ -72,8 +75,6 @@ // Commits the changes in |batch| to the database. ValueStore::Status WriteToDb(leveldb::WriteBatch* batch); - - DISALLOW_COPY_AND_ASSIGN(LeveldbValueStore); }; #endif // EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_VALUE_STORE_H_
diff --git a/extensions/browser/value_store/leveldb_value_store_unittest.cc b/extensions/browser/value_store/leveldb_value_store_unittest.cc index e36fc12..c3538833 100644 --- a/extensions/browser/value_store/leveldb_value_store_unittest.cc +++ b/extensions/browser/value_store/leveldb_value_store_unittest.cc
@@ -35,8 +35,8 @@ class LeveldbValueStoreUnitTest : public testing::Test { public: - LeveldbValueStoreUnitTest() {} - ~LeveldbValueStoreUnitTest() override {} + LeveldbValueStoreUnitTest() = default; + ~LeveldbValueStoreUnitTest() override = default; protected: void SetUp() override { @@ -109,7 +109,6 @@ // (unless absolutely necessary), and instead only removes corrupted keys. TEST_F(LeveldbValueStoreUnitTest, RestoreDoesMinimumNecessary) { const char* kNotCorruptKeys[] = {"a", "n", "z"}; - const size_t kNotCorruptKeysSize = 3u; const char kCorruptKey1[] = "f"; const char kCorruptKey2[] = "s"; const char kValue[] = "value"; @@ -117,9 +116,9 @@ // Insert a collection of non-corrupted pairs. std::unique_ptr<base::Value> value(new base::Value(kValue)); - for (size_t i = 0; i < kNotCorruptKeysSize; ++i) { + for (auto* kNotCorruptKey : kNotCorruptKeys) { ASSERT_TRUE(store() - ->Set(ValueStore::DEFAULTS, kNotCorruptKeys[i], *value) + ->Set(ValueStore::DEFAULTS, kNotCorruptKey, *value) .status() .ok()); } @@ -139,12 +138,12 @@ // We should still have all valid pairs present in the database. std::string value_string; - for (size_t i = 0; i < kNotCorruptKeysSize; ++i) { - result = store()->Get(kNotCorruptKeys[i]); + for (auto* kNotCorruptKey : kNotCorruptKeys) { + result = store()->Get(kNotCorruptKey); EXPECT_TRUE(result.status().ok()); ASSERT_EQ(ValueStore::RESTORE_NONE, result.status().restore_status); - EXPECT_TRUE(result.settings().HasKey(kNotCorruptKeys[i])); - EXPECT_TRUE(result.settings().GetString(kNotCorruptKeys[i], &value_string)); + EXPECT_TRUE(result.settings().HasKey(kNotCorruptKey)); + EXPECT_TRUE(result.settings().GetString(kNotCorruptKey, &value_string)); EXPECT_EQ(kValue, value_string); } } @@ -158,14 +157,13 @@ TEST_F(LeveldbValueStoreUnitTest, RestoreFullDatabase) { const std::string kLolCats("I can haz leveldb filez?"); const char* kNotCorruptKeys[] = {"a", "n", "z"}; - const size_t kNotCorruptKeysSize = 3u; const char kValue[] = "value"; // Generate a database. std::unique_ptr<base::Value> value(new base::Value(kValue)); - for (size_t i = 0; i < kNotCorruptKeysSize; ++i) { + for (auto* kNotCorruptKey : kNotCorruptKeys) { ASSERT_TRUE(store() - ->Set(ValueStore::DEFAULTS, kNotCorruptKeys[i], *value) + ->Set(ValueStore::DEFAULTS, kNotCorruptKey, *value) .status() .ok()); }
diff --git a/extensions/browser/value_store/settings_namespace.h b/extensions/browser/value_store/settings_namespace.h index ad537b4..171b4ae 100644 --- a/extensions/browser/value_store/settings_namespace.h +++ b/extensions/browser/value_store/settings_namespace.h
@@ -11,6 +11,8 @@ namespace settings_namespace { +// TODO(crbug.com/1226956): Move extensions specific namespaces out of +// ValueStore. // The namespaces of the storage areas that have ValueStore. enum Namespace { LOCAL, // "local" i.e. chrome.storage.local
diff --git a/extensions/browser/value_store/test_value_store_factory.cc b/extensions/browser/value_store/test_value_store_factory.cc index de75f953..557d470 100644 --- a/extensions/browser/value_store/test_value_store_factory.cc +++ b/extensions/browser/value_store/test_value_store_factory.cc
@@ -7,6 +7,7 @@ #include "base/memory/ptr_util.h" #include "extensions/browser/value_store/leveldb_value_store.h" #include "extensions/browser/value_store/testing_value_store.h" +#include "extensions/browser/value_store/value_store_client_id.h" namespace { @@ -22,10 +23,10 @@ TestValueStoreFactory::StorageHelper::~StorageHelper() = default; -std::set<ExtensionId> +std::set<ValueStoreClientId> TestValueStoreFactory::StorageHelper::GetKnownExtensionIDs( ModelType model_type) const { - std::set<ExtensionId> ids; + std::set<ValueStoreClientId> ids; switch (model_type) { case ValueStoreFactory::ModelType::APP: for (const auto& key : app_stores_) @@ -45,51 +46,51 @@ } ValueStore* TestValueStoreFactory::StorageHelper::AddValueStore( - const ExtensionId& extension_id, + const ValueStoreClientId& id, ValueStore* value_store, ModelType model_type) { if (model_type == ValueStoreFactory::ModelType::APP) { - DCHECK(app_stores_.find(extension_id) == app_stores_.end()); - app_stores_[extension_id] = value_store; + DCHECK(app_stores_.find(id) == app_stores_.end()); + app_stores_[id] = value_store; } else { - DCHECK(extension_stores_.find(extension_id) == extension_stores_.end()); - extension_stores_[extension_id] = value_store; + DCHECK(extension_stores_.find(id) == extension_stores_.end()); + extension_stores_[id] = value_store; } return value_store; } void TestValueStoreFactory::StorageHelper::DeleteSettings( - const ExtensionId& extension_id, + const ValueStoreClientId& id, ModelType model_type) { switch (model_type) { case ValueStoreFactory::ModelType::APP: - app_stores_.erase(extension_id); + app_stores_.erase(id); break; case ValueStoreFactory::ModelType::EXTENSION: - extension_stores_.erase(extension_id); + extension_stores_.erase(id); break; } } bool TestValueStoreFactory::StorageHelper::HasSettings( - const ExtensionId& extension_id, + const ValueStoreClientId& id, ModelType model_type) const { switch (model_type) { case ValueStoreFactory::ModelType::APP: - return app_stores_.find(extension_id) != app_stores_.end(); + return app_stores_.find(id) != app_stores_.end(); case ValueStoreFactory::ModelType::EXTENSION: - return extension_stores_.find(extension_id) != extension_stores_.end(); + return extension_stores_.find(id) != extension_stores_.end(); } NOTREACHED(); return false; } ValueStore* TestValueStoreFactory::StorageHelper::GetExisting( - const ExtensionId& extension_id) const { - auto it = app_stores_.find(extension_id); + const ValueStoreClientId& id) const { + auto it = app_stores_.find(id); if (it != app_stores_.end()) return it->second; - it = extension_stores_.find(extension_id); + it = extension_stores_.find(id); if (it != extension_stores_.end()) return it->second; return nullptr; @@ -100,7 +101,7 @@ TestValueStoreFactory::TestValueStoreFactory(const base::FilePath& db_path) : db_path_(db_path) {} -TestValueStoreFactory::~TestValueStoreFactory() {} +TestValueStoreFactory::~TestValueStoreFactory() = default; std::unique_ptr<ValueStore> TestValueStoreFactory::CreateRulesStore() { if (db_path_.empty()) @@ -133,13 +134,13 @@ std::unique_ptr<ValueStore> TestValueStoreFactory::CreateSettingsStore( SettingsNamespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) { + const ValueStoreClientId& id) { std::unique_ptr<ValueStore> settings_store(CreateRulesStore()); // Note: This factory is purposely keeping the raw pointers to each ValueStore // created. Tests using TestValueStoreFactory must be careful to keep // those ValueStore's alive for the duration of their test. GetStorageHelper(settings_namespace) - .AddValueStore(extension_id, settings_store.get(), model_type); + .AddValueStore(id, settings_store.get(), model_type); return settings_store; } @@ -149,18 +150,17 @@ void TestValueStoreFactory::DeleteSettings(SettingsNamespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) { - GetStorageHelper(settings_namespace).DeleteSettings(extension_id, model_type); + const ValueStoreClientId& id) { + GetStorageHelper(settings_namespace).DeleteSettings(id, model_type); } bool TestValueStoreFactory::HasSettings(SettingsNamespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) { - return GetStorageHelper(settings_namespace) - .HasSettings(extension_id, model_type); + const ValueStoreClientId& id) { + return GetStorageHelper(settings_namespace).HasSettings(id, model_type); } -std::set<ExtensionId> TestValueStoreFactory::GetKnownExtensionIDs( +std::set<ValueStoreClientId> TestValueStoreFactory::GetKnownExtensionIDs( SettingsNamespace settings_namespace, ModelType model_type) const { return const_cast<TestValueStoreFactory*>(this) @@ -169,14 +169,14 @@ } ValueStore* TestValueStoreFactory::GetExisting( - const ExtensionId& extension_id) const { - ValueStore* existing_store = local_helper_.GetExisting(extension_id); + const ValueStoreClientId& id) const { + ValueStore* existing_store = local_helper_.GetExisting(id); if (existing_store) return existing_store; - existing_store = sync_helper_.GetExisting(extension_id); + existing_store = sync_helper_.GetExisting(id); if (existing_store) return existing_store; - existing_store = managed_helper_.GetExisting(extension_id); + existing_store = managed_helper_.GetExisting(id); DCHECK(existing_store != nullptr); return existing_store; }
diff --git a/extensions/browser/value_store/test_value_store_factory.h b/extensions/browser/value_store/test_value_store_factory.h index 534bae8..08f80a1 100644 --- a/extensions/browser/value_store/test_value_store_factory.h +++ b/extensions/browser/value_store/test_value_store_factory.h
@@ -10,8 +10,8 @@ #include <set> #include "base/files/file_path.h" +#include "extensions/browser/value_store/value_store_client_id.h" #include "extensions/browser/value_store/value_store_factory.h" -#include "extensions/common/extension_id.h" class ValueStore; @@ -24,6 +24,8 @@ public: TestValueStoreFactory(); explicit TestValueStoreFactory(const base::FilePath& db_path); + TestValueStoreFactory(const TestValueStoreFactory&) = delete; + TestValueStoreFactory& operator=(const TestValueStoreFactory&) = delete; // ValueStoreFactory std::unique_ptr<ValueStore> CreateRulesStore() override; @@ -31,14 +33,14 @@ std::unique_ptr<ValueStore> CreateSettingsStore( settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) override; + const ValueStoreClientId& id) override; void DeleteSettings(settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) override; + const ValueStoreClientId& id) override; bool HasSettings(settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) override; - std::set<ExtensionId> GetKnownExtensionIDs( + const ValueStoreClientId& id) override; + std::set<ValueStoreClientId> GetKnownExtensionIDs( settings_namespace::Namespace settings_namespace, ModelType model_type) const override; @@ -47,7 +49,7 @@ // deleted at any time. ValueStore* LastCreatedStore() const; // Return a previously created |ValueStore| for an extension. - ValueStore* GetExisting(const ExtensionId& extension_id) const; + ValueStore* GetExisting(const ValueStoreClientId& id) const; // Reset this class (as if just created). void Reset(); @@ -58,21 +60,22 @@ public: StorageHelper(); ~StorageHelper(); - std::set<ExtensionId> GetKnownExtensionIDs(ModelType model_type) const; - ValueStore* AddValueStore(const ExtensionId& extension_id, + StorageHelper(const StorageHelper&) = delete; + StorageHelper& operator=(const StorageHelper&) = delete; + + std::set<ValueStoreClientId> GetKnownExtensionIDs( + ModelType model_type) const; + ValueStore* AddValueStore(const ValueStoreClientId& id, ValueStore* value_store, ModelType model_type); - void DeleteSettings(const ExtensionId& extension_id, ModelType model_type); - bool HasSettings(const ExtensionId& extension_id, - ModelType model_type) const; + void DeleteSettings(const ValueStoreClientId& id, ModelType model_type); + bool HasSettings(const ValueStoreClientId& id, ModelType model_type) const; void Reset(); - ValueStore* GetExisting(const ExtensionId& extension_id) const; + ValueStore* GetExisting(const ValueStoreClientId& id) const; private: - std::map<ExtensionId, ValueStore*> app_stores_; - std::map<ExtensionId, ValueStore*> extension_stores_; - - DISALLOW_COPY_AND_ASSIGN(StorageHelper); + std::map<ValueStoreClientId, ValueStore*> app_stores_; + std::map<ValueStoreClientId, ValueStore*> extension_stores_; }; StorageHelper& GetStorageHelper( @@ -87,8 +90,6 @@ StorageHelper local_helper_; StorageHelper sync_helper_; StorageHelper managed_helper_; - - DISALLOW_COPY_AND_ASSIGN(TestValueStoreFactory); }; } // namespace extensions
diff --git a/extensions/browser/value_store/testing_value_store.cc b/extensions/browser/value_store/testing_value_store.cc index 3bf99b4..afbf982 100644 --- a/extensions/browser/value_store/testing_value_store.cc +++ b/extensions/browser/value_store/testing_value_store.cc
@@ -22,9 +22,8 @@ } // namespace -TestingValueStore::TestingValueStore() : read_count_(0), write_count_(0) {} - -TestingValueStore::~TestingValueStore() {} +TestingValueStore::TestingValueStore() = default; +TestingValueStore::~TestingValueStore() = default; void TestingValueStore::set_status_code(StatusCode status_code) { status_ = ValueStore::Status(status_code, kGenericErrorMessage); @@ -60,10 +59,10 @@ return ReadResult(CreateStatusCopy(status_)); auto settings = std::make_unique<base::DictionaryValue>(); - for (auto it = keys.cbegin(); it != keys.cend(); ++it) { - base::Value* value = storage_.FindKey(*it); + for (const auto& key : keys) { + base::Value* value = storage_.FindKey(key); if (value) { - settings->SetKey(*it, value->Clone()); + settings->SetKey(key, value->Clone()); } } return ReadResult(std::move(settings), CreateStatusCopy(status_));
diff --git a/extensions/browser/value_store/testing_value_store.h b/extensions/browser/value_store/testing_value_store.h index 55ed6b6..a0266bc 100644 --- a/extensions/browser/value_store/testing_value_store.h +++ b/extensions/browser/value_store/testing_value_store.h
@@ -20,6 +20,8 @@ public: TestingValueStore(); ~TestingValueStore() override; + TestingValueStore(const TestingValueStore&) = delete; + TestingValueStore& operator=(const TestingValueStore&) = delete; // Sets the error code for requests. If OK, errors won't be thrown. // Defaults to OK. @@ -51,11 +53,9 @@ private: base::DictionaryValue storage_; - int read_count_; - int write_count_; + int read_count_ = 0; + int write_count_ = 0; ValueStore::Status status_; - - DISALLOW_COPY_AND_ASSIGN(TestingValueStore); }; #endif // EXTENSIONS_BROWSER_VALUE_STORE_TESTING_VALUE_STORE_H_
diff --git a/extensions/browser/value_store/value_store.cc b/extensions/browser/value_store/value_store.cc index 2989b12..e04a1e7 100644 --- a/extensions/browser/value_store/value_store.cc +++ b/extensions/browser/value_store/value_store.cc
@@ -10,7 +10,7 @@ // Implementation of Status. -ValueStore::Status::Status() : code(OK), restore_status(RESTORE_NONE) {} +ValueStore::Status::Status() = default; ValueStore::Status::Status(StatusCode code, const std::string& message) : Status(code, RESTORE_NONE, message) {}
diff --git a/extensions/browser/value_store/value_store.h b/extensions/browser/value_store/value_store.h index ac152665..3364806 100644 --- a/extensions/browser/value_store/value_store.h +++ b/extensions/browser/value_store/value_store.h
@@ -79,9 +79,9 @@ void Merge(const Status& status); // The status code. - StatusCode code; + StatusCode code = OK; - BackingStoreRestoreStatus restore_status; + BackingStoreRestoreStatus restore_status = RESTORE_NONE; // Message associated with the status (error) if there is one. std::string message; @@ -95,6 +95,8 @@ ReadResult(ReadResult&& other); ~ReadResult(); ReadResult& operator=(ReadResult&& rhs); + ReadResult(const ReadResult&) = delete; + ReadResult& operator=(const ReadResult&) = delete; // Gets the settings read from the storage. Note that this represents // the root object. If you request the value for key "foo", that value will @@ -112,8 +114,6 @@ private: std::unique_ptr<base::DictionaryValue> settings_; Status status_; - - DISALLOW_COPY_AND_ASSIGN(ReadResult); }; // The result of a write operation (Set/Remove/Clear). @@ -124,6 +124,8 @@ WriteResult(WriteResult&& other); ~WriteResult(); WriteResult& operator=(WriteResult&& rhs); + WriteResult(const WriteResult&) = delete; + WriteResult& operator=(const WriteResult&) = delete; // Gets the list of changes to the settings which resulted from the write. // Won't be present if the NO_GENERATE_CHANGES WriteOptions was given. @@ -136,8 +138,6 @@ private: ValueStoreChangeList changes_; Status status_; - - DISALLOW_COPY_AND_ASSIGN(WriteResult); }; // Options for write operations. @@ -153,7 +153,7 @@ }; typedef int WriteOptions; - virtual ~ValueStore() {} + virtual ~ValueStore() = default; // Gets the amount of space being used by a single value, in bytes. // Note: The GetBytesInUse methods are only used by extension settings at the
diff --git a/extensions/browser/value_store/value_store_change_unittest.cc b/extensions/browser/value_store/value_store_change_unittest.cc index 8cebea3..8925101 100644 --- a/extensions/browser/value_store/value_store_change_unittest.cc +++ b/extensions/browser/value_store/value_store_change_unittest.cc
@@ -6,13 +6,10 @@ #include "base/json/json_writer.h" #include "base/values.h" #include "extensions/browser/value_store/value_store_change.h" -#include "extensions/common/value_builder.h" #include "testing/gtest/include/gtest/gtest.h" using base::DictionaryValue; using base::Value; -using extensions::DictionaryBuilder; -using extensions::ListBuilder; namespace { @@ -55,39 +52,39 @@ TEST(ValueStoreChangeTest, ToValue) { // Create a mildly complicated structure that has dots in it. - std::unique_ptr<base::DictionaryValue> value = - DictionaryBuilder() - .Set("key", "value") - .Set("key.with.dots", "value.with.dots") - .Set("tricked", DictionaryBuilder().Set("you", "nodots").Build()) - .Set("tricked.you", "with.dots") - .Build(); + base::Value inner_dict(base::Value::Type::DICTIONARY); + inner_dict.SetKey("you", base::Value("nodots")); + + base::Value value(base::Value::Type::DICTIONARY); + value.SetKey("key", base::Value("value")); + value.SetKey("key.with.dots", base::Value("value.with.dots")); + value.SetKey("tricked", std::move(inner_dict)); + value.SetKey("tricked.you", base::Value("with.dots")); ValueStoreChangeList change_list; + change_list.push_back(ValueStoreChange("key", value.Clone(), value.Clone())); change_list.push_back( - ValueStoreChange("key", value->Clone(), value->Clone())); - change_list.push_back( - ValueStoreChange("key.with.dots", value->Clone(), value->Clone())); + ValueStoreChange("key.with.dots", value.Clone(), value.Clone())); base::Value changes_value = ValueStoreChange::ToValue(std::move(change_list)); - DictionaryBuilder v1(*value); - DictionaryBuilder v2(*value); - DictionaryBuilder v3(*value); - DictionaryBuilder v4(*value); - std::unique_ptr<base::DictionaryValue> expected_from_json = - DictionaryBuilder() - .Set("key", DictionaryBuilder() - .Set("oldValue", v1.Build()) - .Set("newValue", v2.Build()) - .Build()) - .Set("key.with.dots", DictionaryBuilder() - .Set("oldValue", v3.Build()) - .Set("newValue", v4.Build()) - .Build()) - .Build(); + base::Value v1(value.Clone()); + base::Value v2(value.Clone()); + base::Value v3(value.Clone()); + base::Value v4(value.Clone()); - EXPECT_TRUE(changes_value.Equals(expected_from_json.get())); + base::Value inner_dict2(base::Value::Type::DICTIONARY); + base::Value inner_dict3(base::Value::Type::DICTIONARY); + + inner_dict2.SetKey("oldValue", std::move(v1)); + inner_dict2.SetKey("newValue", std::move(v2)); + inner_dict3.SetKey("oldValue", std::move(v3)); + inner_dict3.SetKey("newValue", std::move(v4)); + + base::Value expected_from_json(base::Value::Type::DICTIONARY); + expected_from_json.SetKey("key", std::move(inner_dict2)); + expected_from_json.SetKey("key.with.dots", std::move(inner_dict3)); + EXPECT_EQ(changes_value, expected_from_json); } } // namespace
diff --git a/extensions/browser/value_store/value_store_client_id.h b/extensions/browser/value_store/value_store_client_id.h new file mode 100644 index 0000000..f320b208 --- /dev/null +++ b/extensions/browser/value_store/value_store_client_id.h
@@ -0,0 +1,17 @@ +// 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. + +#ifndef EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_CLIENT_ID_H_ +#define EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_CLIENT_ID_H_ + +#include <string> + +// TODO(crbug.com/1226956): Move out of extensions namespace. +namespace extensions { + +using ValueStoreClientId = std::string; + +} // namespace extensions + +#endif // EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_CLIENT_ID_H_ \ No newline at end of file
diff --git a/extensions/browser/value_store/value_store_factory.h b/extensions/browser/value_store/value_store_factory.h index 25580d17..81c0776 100644 --- a/extensions/browser/value_store/value_store_factory.h +++ b/extensions/browser/value_store/value_store_factory.h
@@ -10,7 +10,7 @@ #include "base/memory/ref_counted.h" #include "extensions/browser/value_store/settings_namespace.h" -#include "extensions/common/extension_id.h" +#include "extensions/browser/value_store/value_store_client_id.h" class ValueStore; @@ -37,29 +37,30 @@ virtual std::unique_ptr<ValueStore> CreateSettingsStore( settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) = 0; + const ValueStoreClientId& id) = 0; // Delete all settings for specified given extension in the specified // namespace/model_type. virtual void DeleteSettings(settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) = 0; + const ValueStoreClientId& id) = 0; // Are there any settings stored in the specified namespace/model_type for // the given extension? virtual bool HasSettings(settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) = 0; + const ValueStoreClientId& id) = 0; + // TODO(crbug.com/1226956): Remove reference to extensions. // Return all extension ID's with settings stored in the given // namespace/model_type. - virtual std::set<ExtensionId> GetKnownExtensionIDs( + virtual std::set<ValueStoreClientId> GetKnownExtensionIDs( settings_namespace::Namespace settings_namespace, ModelType model_type) const = 0; protected: friend class base::RefCountedThreadSafe<ValueStoreFactory>; - virtual ~ValueStoreFactory() {} + virtual ~ValueStoreFactory() = default; }; } // namespace extensions
diff --git a/extensions/browser/value_store/value_store_factory_impl.cc b/extensions/browser/value_store/value_store_factory_impl.cc index 09f3a94..7cc31d9 100644 --- a/extensions/browser/value_store/value_store_factory_impl.cc +++ b/extensions/browser/value_store/value_store_factory_impl.cc
@@ -6,6 +6,7 @@ #include "base/memory/scoped_refptr.h" #include "extensions/browser/value_store/legacy_value_store_factory.h" +#include "extensions/browser/value_store/value_store_client_id.h" namespace extensions { @@ -28,25 +29,24 @@ std::unique_ptr<ValueStore> ValueStoreFactoryImpl::CreateSettingsStore( SettingsNamespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) { + const ValueStoreClientId& id) { return legacy_factory_->CreateSettingsStore(settings_namespace, model_type, - extension_id); + id); } void ValueStoreFactoryImpl::DeleteSettings(SettingsNamespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) { - legacy_factory_->DeleteSettings(settings_namespace, model_type, extension_id); + const ValueStoreClientId& id) { + legacy_factory_->DeleteSettings(settings_namespace, model_type, id); } bool ValueStoreFactoryImpl::HasSettings(SettingsNamespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) { - return legacy_factory_->HasSettings(settings_namespace, model_type, - extension_id); + const ValueStoreClientId& id) { + return legacy_factory_->HasSettings(settings_namespace, model_type, id); } -std::set<ExtensionId> ValueStoreFactoryImpl::GetKnownExtensionIDs( +std::set<ValueStoreClientId> ValueStoreFactoryImpl::GetKnownExtensionIDs( SettingsNamespace settings_namespace, ModelType model_type) const { return legacy_factory_->GetKnownExtensionIDs(settings_namespace, model_type);
diff --git a/extensions/browser/value_store/value_store_factory_impl.h b/extensions/browser/value_store/value_store_factory_impl.h index 178e2d2..a6258509 100644 --- a/extensions/browser/value_store/value_store_factory_impl.h +++ b/extensions/browser/value_store/value_store_factory_impl.h
@@ -12,8 +12,8 @@ #include "base/files/file_path.h" #include "base/memory/ref_counted.h" #include "extensions/browser/value_store/value_store.h" +#include "extensions/browser/value_store/value_store_client_id.h" #include "extensions/browser/value_store/value_store_factory.h" -#include "extensions/common/extension_id.h" namespace extensions { @@ -24,6 +24,8 @@ class ValueStoreFactoryImpl : public ValueStoreFactory { public: explicit ValueStoreFactoryImpl(const base::FilePath& profile_path); + ValueStoreFactoryImpl(const ValueStoreFactoryImpl&) = delete; + ValueStoreFactoryImpl& operator=(const ValueStoreFactoryImpl&) = delete; // ValueStoreFactory std::unique_ptr<ValueStore> CreateRulesStore() override; @@ -31,14 +33,14 @@ std::unique_ptr<ValueStore> CreateSettingsStore( settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) override; + const ValueStoreClientId& id) override; void DeleteSettings(settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) override; + const ValueStoreClientId& id) override; bool HasSettings(settings_namespace::Namespace settings_namespace, ModelType model_type, - const ExtensionId& extension_id) override; - std::set<ExtensionId> GetKnownExtensionIDs( + const ValueStoreClientId& id) override; + std::set<ValueStoreClientId> GetKnownExtensionIDs( settings_namespace::Namespace settings_namespace, ModelType model_type) const override; @@ -47,8 +49,6 @@ ~ValueStoreFactoryImpl() override; scoped_refptr<LegacyValueStoreFactory> legacy_factory_; - - DISALLOW_COPY_AND_ASSIGN(ValueStoreFactoryImpl); }; } // namespace extensions
diff --git a/extensions/browser/value_store/value_store_frontend.cc b/extensions/browser/value_store/value_store_frontend.cc index ce63844..22771bf 100644 --- a/extensions/browser/value_store/value_store_frontend.cc +++ b/extensions/browser/value_store/value_store_frontend.cc
@@ -30,6 +30,8 @@ : store_factory_(store_factory), backend_type_(backend_type), task_runner_(task_runner) {} + Backend(const Backend&) = delete; + Backend& operator=(const Backend&) = delete; void Get(const std::string& key, ValueStoreFrontend::ReadCallback callback) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); @@ -113,8 +115,6 @@ std::unique_ptr<ValueStore> storage_; base::FilePath db_path_; - - DISALLOW_COPY_AND_ASSIGN(Backend); }; ValueStoreFrontend::ValueStoreFrontend(
diff --git a/extensions/browser/value_store/value_store_frontend.h b/extensions/browser/value_store/value_store_frontend.h index 118f3c4..ca9323c 100644 --- a/extensions/browser/value_store/value_store_frontend.h +++ b/extensions/browser/value_store/value_store_frontend.h
@@ -24,16 +24,19 @@ // A frontend for a LeveldbValueStore, for use on the UI thread. class ValueStoreFrontend { public: + // TODO(crbug.com/1226956): Move extensions specific enum out of ValueStore. // The kind of extensions data stored in a backend. enum class BackendType { RULES, STATE }; using ReadCallback = base::OnceCallback<void(std::unique_ptr<base::Value>)>; ValueStoreFrontend( - const scoped_refptr<extensions::ValueStoreFactory>& store_factory, + const scoped_refptr<ValueStoreFactory>& store_factory, BackendType backend_type, const scoped_refptr<base::SequencedTaskRunner>& task_runner); ~ValueStoreFrontend(); + ValueStoreFrontend(const ValueStoreFrontend&) = delete; + ValueStoreFrontend& operator=(const ValueStoreFrontend&) = delete; // Retrieves a value from the database asynchronously, passing a copy to // |callback| when ready. NULL is passed if no matching entry is found. @@ -53,8 +56,6 @@ scoped_refptr<Backend> backend_; scoped_refptr<base::SequencedTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(ValueStoreFrontend); }; } // namespace extensions
diff --git a/extensions/browser/value_store/value_store_frontend_unittest.cc b/extensions/browser/value_store/value_store_frontend_unittest.cc index 3ea816b2..89f51ba 100644 --- a/extensions/browser/value_store/value_store_frontend_unittest.cc +++ b/extensions/browser/value_store/value_store_frontend_unittest.cc
@@ -13,9 +13,8 @@ #include "base/path_service.h" #include "content/public/test/browser_task_environment.h" #include "content/public/test/test_utils.h" -#include "extensions/browser/extension_file_task_runner.h" #include "extensions/browser/value_store/test_value_store_factory.h" -#include "extensions/common/extension_paths.h" +#include "extensions/browser/value_store/value_store_task_runner.h" #include "testing/gtest/include/gtest/gtest.h" namespace extensions { @@ -28,13 +27,13 @@ ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); base::FilePath test_data_dir; - ASSERT_TRUE( - base::PathService::Get(extensions::DIR_TEST_DATA, &test_data_dir)); - base::FilePath src_db(test_data_dir.AppendASCII("value_store_db")); + ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); + base::FilePath src_db( + test_data_dir.AppendASCII("extensions/test/data/value_store_db")); db_path_ = temp_dir_.GetPath().AppendASCII("temp_db"); base::CopyDirectory(src_db, db_path_, true); - factory_ = new extensions::TestValueStoreFactory(db_path_); + factory_ = new TestValueStoreFactory(db_path_); ResetStorage(); } @@ -48,7 +47,7 @@ void ResetStorage() { storage_ = std::make_unique<ValueStoreFrontend>( factory_, ValueStoreFrontend::BackendType::RULES, - GetExtensionFileTaskRunner()); + value_store::GetValueStoreTaskRunner()); } bool Get(const std::string& key, std::unique_ptr<base::Value>* output) { @@ -64,7 +63,7 @@ *output = std::move(result); } - scoped_refptr<extensions::TestValueStoreFactory> factory_; + scoped_refptr<TestValueStoreFactory> factory_; std::unique_ptr<ValueStoreFrontend> storage_; base::ScopedTempDir temp_dir_; base::FilePath db_path_;
diff --git a/extensions/browser/value_store/value_store_task_runner.cc b/extensions/browser/value_store/value_store_task_runner.cc new file mode 100644 index 0000000..af591cf4 --- /dev/null +++ b/extensions/browser/value_store/value_store_task_runner.cc
@@ -0,0 +1,32 @@ +// 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. + +#include "extensions/browser/value_store/value_store_task_runner.h" + +#include "base/sequenced_task_runner.h" +#include "base/task/lazy_thread_pool_task_runner.h" +#include "base/task/task_traits.h" + +namespace value_store { + +namespace { + +// Note: All tasks posted to a single task runner have the same priority. This +// is unfortunate, since some file-related tasks are high priority, and others +// are low priority (like garbage collection). Split the difference and use +// USER_VISIBLE, which is the default priority and what a task posted to a +// named thread (like the FILE thread) would receive. +base::LazyThreadPoolSequencedTaskRunner g_task_runner = + LAZY_THREAD_POOL_SEQUENCED_TASK_RUNNER_INITIALIZER( + base::TaskTraits(base::MayBlock(), + base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN, + base::TaskPriority::USER_VISIBLE)); + +} // namespace + +scoped_refptr<base::SequencedTaskRunner> GetValueStoreTaskRunner() { + return g_task_runner.Get(); +} + +} // namespace value_store
diff --git a/extensions/browser/value_store/value_store_task_runner.h b/extensions/browser/value_store/value_store_task_runner.h new file mode 100644 index 0000000..5aa4674 --- /dev/null +++ b/extensions/browser/value_store/value_store_task_runner.h
@@ -0,0 +1,22 @@ +// 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. + +#ifndef EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_TASK_RUNNER_H_ +#define EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_TASK_RUNNER_H_ + +#include "base/memory/ref_counted.h" + +namespace base { +class SequencedTaskRunner; +} + +namespace value_store { + +// Returns the singleton instance of the task runner to be used for value store +// tasks that read, modify, or delete files. +scoped_refptr<base::SequencedTaskRunner> GetValueStoreTaskRunner(); + +} // namespace value_store + +#endif // EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_TASK_RUNNER_H_
diff --git a/extensions/browser/value_store/value_store_unittest.cc b/extensions/browser/value_store/value_store_unittest.cc index 97b65d5..ee45ef6 100644 --- a/extensions/browser/value_store/value_store_unittest.cc +++ b/extensions/browser/value_store/value_store_unittest.cc
@@ -92,27 +92,27 @@ std::set<std::string> keys_seen; - for (auto it = actual.cbegin(); it != actual.cend(); ++it) { - if (keys_seen.count(it->key())) { - return testing::AssertionFailure() << - "Multiple changes seen for key: " << it->key(); + for (const auto& it : actual) { + if (keys_seen.count(it.key())) { + return testing::AssertionFailure() + << "Multiple changes seen for key: " << it.key(); } - keys_seen.insert(it->key()); + keys_seen.insert(it.key()); - if (!expected_as_map.count(it->key())) { - return testing::AssertionFailure() << - "Actual has unexpected change for key: " << it->key(); + if (!expected_as_map.count(it.key())) { + return testing::AssertionFailure() + << "Actual has unexpected change for key: " << it.key(); } - const ValueStoreChange* expected_change = expected_as_map[it->key()]; + const ValueStoreChange* expected_change = expected_as_map[it.key()]; std::string error; - if (!ValuesEqual(expected_change->new_value(), it->new_value(), &error)) { - return testing::AssertionFailure() << - "New value for " << it->key() << " was unexpected: " << error; + if (!ValuesEqual(expected_change->new_value(), it.new_value(), &error)) { + return testing::AssertionFailure() + << "New value for " << it.key() << " was unexpected: " << error; } - if (!ValuesEqual(expected_change->old_value(), it->old_value(), &error)) { - return testing::AssertionFailure() << - "Old value for " << it->key() << " was unexpected: " << error; + if (!ValuesEqual(expected_change->old_value(), it.old_value(), &error)) { + return testing::AssertionFailure() + << "Old value for " << it.key() << " was unexpected: " << error; } } @@ -159,7 +159,7 @@ dict123_->Set(key3_, val3_->CreateDeepCopy()); } -ValueStoreTest::~ValueStoreTest() {} +ValueStoreTest::~ValueStoreTest() = default; void ValueStoreTest::SetUp() { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
diff --git a/extensions/browser/value_store/value_store_unittest.h b/extensions/browser/value_store/value_store_unittest.h index 1f0dbd02..a07e8aa9 100644 --- a/extensions/browser/value_store/value_store_unittest.h +++ b/extensions/browser/value_store/value_store_unittest.h
@@ -22,7 +22,7 @@ class ValueStoreTest : public testing::TestWithParam<ValueStoreTestParam> { public: ValueStoreTest(); - virtual ~ValueStoreTest(); + ~ValueStoreTest() override; void SetUp() override; void TearDown() override;
diff --git a/headless/test/data/protocol/emulation/intersection-observer-with-viewport-expected.txt b/headless/test/data/protocol/emulation/intersection-observer-with-viewport-expected.txt new file mode 100644 index 0000000..2c4b3b7 --- /dev/null +++ b/headless/test/data/protocol/emulation/intersection-observer-with-viewport-expected.txt
@@ -0,0 +1,5 @@ +Tests that intersection observer works with device emulation. +requested url: http://example.com/ +target intersecting true +target intersecting false +target intersecting true \ No newline at end of file
diff --git a/headless/test/data/protocol/emulation/intersection-observer-with-viewport.js b/headless/test/data/protocol/emulation/intersection-observer-with-viewport.js new file mode 100644 index 0000000..7aa43c5d --- /dev/null +++ b/headless/test/data/protocol/emulation/intersection-observer-with-viewport.js
@@ -0,0 +1,60 @@ +// 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. + +(async function(testRunner) { + const {page, session, dp} = await testRunner.startWithFrameControl( + `Tests that intersection observer works with device emulation.`); + const RendererTestHelper = + await testRunner.loadScript('../helpers/renderer-test-helper.js'); + const {httpInterceptor, frameNavigationHelper, virtualTimeController} = + await (new RendererTestHelper(testRunner, dp, page)).init(); + + const params = { + deviceScaleFactor: 1, + width: 384, + height: 800, + mobile: true, + screenWidth: 384, + screenHeight: 800, + viewport: {x: 0, y: 0, width: 1, height: 1, scale: 1} + }; + await dp.Emulation.setDeviceMetricsOverride(params); + dp.Runtime.enable(); + httpInterceptor.addResponse(`http://example.com/`, ` + <html><head> + <style> + .tall { background-color: green; height: 3000px; } + .short { background-color: red; height: 100px; } + </style></head> + <body> + <div id='target' class='short'></div> + <div class='tall'></div> + </body> + <script> + window.addEventListener('DOMContentLoaded', () => { + const observer = new IntersectionObserver((entries, observer) => { + for (const entry of entries) { + console.log(entry.target.id + ' intersecting ' + + entry.isIntersecting); + } + }); + observer.observe(document.querySelector('#target')); + }); + </script> + `); + const initialTimeExpired = new Promise(async resolve => { + await virtualTimeController.grantInitialTime(1000, 1000, null, resolve); + frameNavigationHelper.navigate('http://example.com/'); + }); + await initialTimeExpired; + session.evaluateAsync(` + window.scrollBy(0, 200); + `); + await new Promise(resolve => virtualTimeController.grantTime(500, resolve)); + session.evaluateAsync(` + window.scrollTo(0, 0); + `); + await new Promise(resolve => virtualTimeController.grantTime(500, resolve)); + testRunner.completeTest(); +})
diff --git a/headless/test/headless_compositor_browsertest.cc b/headless/test/headless_compositor_browsertest.cc index 84f9179..fa6bc908 100644 --- a/headless/test/headless_compositor_browsertest.cc +++ b/headless/test/headless_compositor_browsertest.cc
@@ -160,5 +160,7 @@ "sanity/screenshot-after-metrics-override.js") HEADLESS_COMPOSITOR_TEST(ScreenshotDeviceScaleFactor, "emulation/screenshot-device-scale-factor.js") +HEADLESS_COMPOSITOR_TEST(VirtualTimeIntersectionObserverWithViewport, + "emulation/intersection-observer-with-viewport.js") } // namespace headless
diff --git a/infra/config/generated/commit-queue.cfg b/infra/config/generated/commit-queue.cfg index 9d5c7dd..78b6622f 100644 --- a/infra/config/generated/commit-queue.cfg +++ b/infra/config/generated/commit-queue.cfg
@@ -1361,10 +1361,6 @@ location_regexp_exclude: ".+/[+]/infra/config/.+" } builders { - name: "chromium/try/linux_chromium_tsan_rel_ng_bionic" - includable_only: true - } - builders { name: "chromium/try/linux_chromium_ubsan_rel_ng" includable_only: true }
diff --git a/infra/config/generated/cr-buildbucket.cfg b/infra/config/generated/cr-buildbucket.cfg index 83bfe98..1879abf4 100644 --- a/infra/config/generated/cr-buildbucket.cfg +++ b/infra/config/generated/cr-buildbucket.cfg
@@ -13810,99 +13810,6 @@ } } builders { - name: "Linux TSan (bionic)" - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "builderless:1" - dimensions: "cores:8" - dimensions: "cpu:x86-64" - dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.chromium.ci" - dimensions: "ssd:0" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" - cipd_version: "refs/heads/master" - cmd: "luciexe" - } - properties: - '{' - ' "$build/goma": {' - ' "enable_ats": true,' - ' "jobs": 500,' - ' "rpc_extra_params": "?prod",' - ' "server_host": "goma.chromium.org",' - ' "use_luci_auth": true' - ' },' - ' "$kitchen": {' - ' "devshell": true,' - ' "git_auth": true' - ' },' - ' "$recipe_engine/isolated": {' - ' "server": "https://isolateserver.appspot.com"' - ' },' - ' "$recipe_engine/resultdb/test_presentation": {' - ' "column_keys": [],' - ' "grouping_keys": [' - ' "status",' - ' "v.test_suite"' - ' ]' - ' },' - ' "builder_group": "chromium.memory",' - ' "recipe": "chromium"' - '}' - execution_timeout_secs: 10800 - build_numbers: YES - service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" - experiments { - key: "chromium.resultdb.result_sink" - value: 100 - } - experiments { - key: "chromium.resultdb.result_sink.gtests_local" - value: 100 - } - experiments { - key: "chromium.resultdb.result_sink.junit_tests" - value: 100 - } - experiments { - key: "luci.use_realms" - value: 100 - } - resultdb { - enable: true - bq_exports { - project: "luci-resultdb" - dataset: "chromium" - table: "ci_test_results" - test_results {} - } - bq_exports { - project: "luci-resultdb" - dataset: "chromium" - table: "gpu_ci_test_results" - test_results { - predicate { - test_id_regexp: "ninja://(chrome/test:|content/test:fuchsia_)telemetry_gpu_integration_test/.+" - } - } - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "blink_web_tests_ci_test_results" - test_results { - predicate { - test_id_regexp: "ninja://[^/]*blink_web_tests/.+" - } - } - } - history_options { - use_invocation_timestamp: true - } - } - } - builders { name: "Linux TSan Builder" swarming_host: "chromium-swarm.appspot.com" swarming_tags: "vpython:native-python-wrapper" @@ -78023,109 +77930,6 @@ } } builders { - name: "linux_chromium_tsan_rel_ng_bionic" - swarming_host: "chromium-swarm.appspot.com" - swarming_tags: "vpython:native-python-wrapper" - dimensions: "builder:linux_chromium_tsan_rel_ng_bionic" - dimensions: "cores:8" - dimensions: "cpu:x86-64" - dimensions: "os:Ubuntu-18.04" - dimensions: "pool:luci.chromium.try" - exe { - cipd_package: "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build" - cipd_version: "refs/heads/master" - cmd: "luciexe" - } - properties: - '{' - ' "$build/goma": {' - ' "enable_ats": true,' - ' "jobs": 150,' - ' "rpc_extra_params": "?prod",' - ' "server_host": "goma.chromium.org",' - ' "use_luci_auth": true' - ' },' - ' "$kitchen": {' - ' "devshell": true,' - ' "git_auth": true' - ' },' - ' "$recipe_engine/isolated": {' - ' "server": "https://isolateserver.appspot.com"' - ' },' - ' "$recipe_engine/resultdb/test_presentation": {' - ' "column_keys": [],' - ' "grouping_keys": [' - ' "status",' - ' "v.test_suite"' - ' ]' - ' },' - ' "builder_group": "tryserver.chromium.linux",' - ' "recipe": "chromium_trybot"' - '}' - execution_timeout_secs: 14400 - expiration_secs: 7200 - grace_period { - seconds: 120 - } - caches { - name: "win_toolchain" - path: "win_toolchain" - } - build_numbers: YES - service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" - task_template_canary_percentage { - value: 5 - } - experiments { - key: "chromium.chromium_tests.use_rbe_cas" - value: 5 - } - experiments { - key: "chromium.resultdb.result_sink" - value: 100 - } - experiments { - key: "chromium.resultdb.result_sink.junit_tests" - value: 100 - } - experiments { - key: "luci.use_realms" - value: 100 - } - resultdb { - enable: true - bq_exports { - project: "luci-resultdb" - dataset: "chromium" - table: "try_test_results" - test_results {} - } - bq_exports { - project: "luci-resultdb" - dataset: "chromium" - table: "gpu_try_test_results" - test_results { - predicate { - test_id_regexp: "ninja://(chrome/test:|content/test:fuchsia_)telemetry_gpu_integration_test/.+" - } - } - } - bq_exports { - project: "chrome-luci-data" - dataset: "chromium" - table: "blink_web_tests_try_test_results" - test_results { - predicate { - test_id_regexp: "ninja://[^/]*blink_web_tests/.+" - } - } - } - history_options { - use_invocation_timestamp: true - } - } - } - builders { name: "linux_chromium_ubsan_rel_ng" swarming_host: "chromium-swarm.appspot.com" swarming_tags: "vpython:native-python-wrapper"
diff --git a/infra/config/generated/luci-milo.cfg b/infra/config/generated/luci-milo.cfg index 2f60198..6dc574f 100644 --- a/infra/config/generated/luci-milo.cfg +++ b/infra/config/generated/luci-milo.cfg
@@ -504,11 +504,6 @@ short_name: "bld" } builders { - name: "buildbucket/luci.chromium.ci/Linux TSan (bionic)" - category: "chromium.memory|linux|TSan v2" - short_name: "tst" - } - builders { name: "buildbucket/luci.chromium.ci/Linux TSan Tests" category: "chromium.memory|linux|TSan v2" short_name: "tst" @@ -1193,11 +1188,6 @@ short_name: "bld" } builders { - name: "buildbucket/luci.chromium.ci/Linux TSan (bionic)" - category: "chromium.memory|linux|TSan v2" - short_name: "tst" - } - builders { name: "buildbucket/luci.chromium.ci/Linux TSan Tests" category: "chromium.memory|linux|TSan v2" short_name: "tst" @@ -2491,9 +2481,6 @@ name: "buildbucket/luci.chromium.try/linux_chromium_tsan_rel_ng" } builders { - name: "buildbucket/luci.chromium.try/linux_chromium_tsan_rel_ng_bionic" - } - builders { name: "buildbucket/luci.chromium.try/linux_layout_tests_composite_after_paint" } builders { @@ -9416,11 +9403,6 @@ short_name: "bld" } builders { - name: "buildbucket/luci.chromium.ci/Linux TSan (bionic)" - category: "linux|TSan v2" - short_name: "tst" - } - builders { name: "buildbucket/luci.chromium.ci/Linux TSan Tests" category: "linux|TSan v2" short_name: "tst" @@ -14344,9 +14326,6 @@ name: "buildbucket/luci.chromium.try/linux_chromium_tsan_rel_ng" } builders { - name: "buildbucket/luci.chromium.try/linux_chromium_tsan_rel_ng_bionic" - } - builders { name: "buildbucket/luci.chromium.try/linux_chromium_ubsan_rel_ng" } builders { @@ -15306,9 +15285,6 @@ name: "buildbucket/luci.chromium.try/linux_chromium_tsan_rel_ng" } builders { - name: "buildbucket/luci.chromium.try/linux_chromium_tsan_rel_ng_bionic" - } - builders { name: "buildbucket/luci.chromium.try/linux_chromium_ubsan_rel_ng" } builders {
diff --git a/infra/config/generated/luci-notify.cfg b/infra/config/generated/luci-notify.cfg index 843c889..f20521e 100644 --- a/infra/config/generated/luci-notify.cfg +++ b/infra/config/generated/luci-notify.cfg
@@ -1220,20 +1220,6 @@ on_occurrence: FAILURE failed_step_regexp: "\\b(bot_update|compile|gclient runhooks|runhooks|update|\\w*nocompile_test)\\b" email { - recipients: "thomasanderson@chromium.org" - } - } - builders { - bucket: "ci" - name: "Linux TSan (bionic)" - repository: "https://chromium.googlesource.com/chromium/src" - } -} -notifiers { - notifications { - on_occurrence: FAILURE - failed_step_regexp: "\\b(bot_update|compile|gclient runhooks|runhooks|update|\\w*nocompile_test)\\b" - email { rotation_urls: "https://chrome-ops-rotation-proxy.appspot.com/current/oncallator:chrome-build-sheriff" } template: "tree_closure_email_template"
diff --git a/infra/config/generated/luci-scheduler.cfg b/infra/config/generated/luci-scheduler.cfg index 0ead81a..b20a31a 100644 --- a/infra/config/generated/luci-scheduler.cfg +++ b/infra/config/generated/luci-scheduler.cfg
@@ -2018,16 +2018,6 @@ } } job { - id: "Linux TSan (bionic)" - realm: "ci" - acl_sets: "ci" - buildbucket { - server: "cr-buildbucket.appspot.com" - bucket: "luci.chromium.ci" - builder: "Linux TSan (bionic)" - } -} -job { id: "Linux TSan Builder" realm: "ci" acl_sets: "ci" @@ -7243,7 +7233,6 @@ triggers: "Linux FYI GPU TSAN Release" triggers: "Linux FYI SkiaRenderer Dawn Release (Intel HD 630)" triggers: "Linux MSan Builder" - triggers: "Linux TSan (bionic)" triggers: "Linux TSan Builder" triggers: "Linux TSan Builder (goma cache silo)" triggers: "Linux TSan Builder (reclient)"
diff --git a/infra/config/subprojects/chromium/ci.star b/infra/config/subprojects/chromium/ci.star index 24e1a05..e5309947 100644 --- a/infra/config/subprojects/chromium/ci.star +++ b/infra/config/subprojects/chromium/ci.star
@@ -6168,20 +6168,6 @@ ), ) -# TODO(https://crbug.com/1200904): Remove this after migration -ci.memory_builder( - name = "Linux TSan (bionic)", - branch_selector = branches.STANDARD_MILESTONE, - console_view_entry = consoles.console_view_entry( - category = "linux|TSan v2", - short_name = "tst", - ), - cq_mirrors_console_view = "mirrors", - main_console_view = "main", - tree_closing = False, - os = os.LINUX_BIONIC, -) - ci.memory_builder( name = "Linux TSan Tests", branch_selector = branches.STANDARD_MILESTONE,
diff --git a/infra/config/subprojects/chromium/try.star b/infra/config/subprojects/chromium/try.star index a05e142..d044398 100644 --- a/infra/config/subprojects/chromium/try.star +++ b/infra/config/subprojects/chromium/try.star
@@ -1442,16 +1442,6 @@ goma_jobs = goma.jobs.J150, ) -# TODO(crbug.com/1200904): Remove after migration -try_.chromium_linux_builder( - name = "linux_chromium_tsan_rel_ng_bionic", - branch_selector = branches.STANDARD_MILESTONE, - builderless = not settings.is_main, - goma_jobs = goma.jobs.J150, - os = os.LINUX_BIONIC, - main_list_view = "try", -) - try_.chromium_linux_builder( name = "linux_chromium_tsan_rel_ng", branch_selector = branches.STANDARD_MILESTONE,
diff --git a/infra/inclusive_language_presubmit_exempt_dirs.txt b/infra/inclusive_language_presubmit_exempt_dirs.txt index 449988e..feab0120 100644 --- a/infra/inclusive_language_presubmit_exempt_dirs.txt +++ b/infra/inclusive_language_presubmit_exempt_dirs.txt
@@ -16,7 +16,6 @@ chrome/browser/autofill 2 1 chrome/browser/chromeos/extensions 8 2 chrome/browser/chromeos/fileapi 1 1 -chrome/browser/chromeos/policy 15 2 chrome/browser/devtools 3 1 chrome/browser/download 1 1 chrome/browser/extensions 2 2
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc index 8b14b0c..5340d31 100644 --- a/media/base/media_switches.cc +++ b/media/base/media_switches.cc
@@ -442,7 +442,7 @@ const base::Feature kGlobalMediaControlsPictureInPicture { "GlobalMediaControlsPictureInPicture", #if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \ - BUILDFLAG(IS_CHROMEOS_LACROS) + defined(OS_CHROMEOS) || BUILDFLAG(IS_CHROMEOS_LACROS) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT
diff --git a/printing/printing_context_win_unittest.cc b/printing/printing_context_win_unittest.cc index a6c30af..59058cfd 100644 --- a/printing/printing_context_win_unittest.cc +++ b/printing/printing_context_win_unittest.cc
@@ -14,6 +14,7 @@ #include "base/test/task_environment.h" #include "base/win/scoped_handle.h" #include "base/win/scoped_hdc.h" +#include "base/win/windows_version.h" #include "printing/backend/printing_info_win.h" #include "printing/backend/win_helper.h" #include "printing/mojom/print.mojom.h" @@ -146,6 +147,10 @@ }; TEST_F(PrintingContextTest, PrintAll) { + // TODO(crbug.com/1231528): Investigate why this test fails on Win 7 bots. + if (base::win::GetVersion() <= base::win::Version::WIN7) + return; + if (IsTestCaseDisabled()) return; @@ -161,6 +166,10 @@ } TEST_F(PrintingContextTest, Color) { + // TODO(crbug.com/1231528): Investigate why this test fails on Win 7 bots. + if (base::win::GetVersion() <= base::win::Version::WIN7) + return; + if (IsTestCaseDisabled()) return; @@ -176,6 +185,10 @@ } TEST_F(PrintingContextTest, Base) { + // TODO(crbug.com/1231528): Investigate why this test fails on Win 7 bots. + if (base::win::GetVersion() <= base::win::Version::WIN7) + return; + if (IsTestCaseDisabled()) return;
diff --git a/sql/database.cc b/sql/database.cc index 4de5a5e..e6d5798ed 100644 --- a/sql/database.cc +++ b/sql/database.cc
@@ -1215,6 +1215,45 @@ return Execute(sql); } +bool Database::ExecuteScriptForTesting(const char* sql_script) { + DCHECK(sql_script); + if (!db_) { + DCHECK(poisoned_) << "Illegal use of Database without a db"; + return false; + } + + absl::optional<base::ScopedBlockingCall> scoped_blocking_call; + InitScopedBlockingCall(FROM_HERE, &scoped_blocking_call); + + while (*sql_script) { + sqlite3_stmt* sqlite_statement; + int sqlite_error = sqlite3_prepare_v3(db_, sql_script, /* nByte= */ -1, + SqlitePrepareFlags(), + &sqlite_statement, &sql_script); + if (sqlite_error != SQLITE_OK) + return false; + + if (!sqlite_statement) { + // Trailing comment or whitespace after the last semicolon. + return true; + } + + // TODO(pwnall): Investigate restricting ExecuteScriptForTesting() to + // statements that don't produce any result rows. + do { + sqlite_error = sqlite3_step(sqlite_statement); + } while (sqlite_error == SQLITE_ROW); + + // sqlite3_finalize() returns SQLITE_OK if the most recent sqlite3_step() + // returned SQLITE_DONE or SQLITE_ROW, otherwise the error code. + sqlite_error = sqlite3_finalize(sqlite_statement); + if (sqlite_error != SQLITE_OK) + return false; + } + + return true; +} + scoped_refptr<Database::StatementRef> Database::GetCachedStatement( StatementID id, const char* sql) { @@ -1294,6 +1333,9 @@ << "Unused text: " << std::string(unused_sql) << "\n" << "in prepared SQL statement: " << std::string(sql); #endif // DCHECK_IS_ON() + + DCHECK(sqlite_statement) << "No SQL statement in string: " << sql; + return base::MakeRefCounted<StatementRef>(this, sqlite_statement, true); } @@ -1347,6 +1389,8 @@ << "in SQL statement: " << std::string(sql); #endif // DCHECK_IS_ON() + DCHECK(sqlite_statement) << "No SQL statement in string: " << sql; + sqlite3_finalize(sqlite_statement); return true; }
diff --git a/sql/database.h b/sql/database.h index 92ec6cf..f17a7ba 100644 --- a/sql/database.h +++ b/sql/database.h
@@ -398,15 +398,23 @@ // Executes a SQL statement. Returns true for success, and false for failure. // // `sql` should be a single SQL statement. Production code should not execute - // multiple SQL statements at once, to facilitate crash debugging. - // - // TODO(crbug.com/1230443): Migrate testing code that executes multiple SQL - // statements to a separate method. + // multiple SQL statements at once, to facilitate crash debugging. Test code + // should use ExecuteScriptForTesting(). // // `sql` cannot have parameters. Statements with parameters can be handled by // sql::Statement. See GetCachedStatement() and GetUniqueStatement(). bool Execute(const char* sql) WARN_UNUSED_RESULT; + // Executes a sequence of SQL statements. + // + // Returns true if all statements execute successfully. If a statement fails, + // stops and returns false. Calls should be wrapped in ASSERT_TRUE(). + // + // The database's error handler is not invoked when errors occur. This method + // is a convenience for setting up a complex on-disk database state, such as + // an old schema version with test contents. + bool ExecuteScriptForTesting(const char* sql_script) WARN_UNUSED_RESULT; + // Returns a statement for the given SQL using the statement cache. It can // take a nontrivial amount of work to parse and compile a statement, so // keeping commonly-used ones around for future use is important for
diff --git a/sql/database_unittest.cc b/sql/database_unittest.cc index de888e7..c5805eb 100644 --- a/sql/database_unittest.cc +++ b/sql/database_unittest.cc
@@ -175,21 +175,94 @@ std::unique_ptr<Database> db_; }; -TEST_P(SQLDatabaseTest, Execute) { - // Valid statement should return true. - ASSERT_TRUE(db_->Execute("CREATE TABLE foo (a, b)")); +TEST_P(SQLDatabaseTest, Execute_ValidStatement) { + ASSERT_TRUE(db_->Execute("CREATE TABLE data(contents TEXT)")); EXPECT_EQ(SQLITE_OK, db_->GetErrorCode()); +} - // Invalid statement should fail. +TEST_P(SQLDatabaseTest, Execute_InvalidStatement) { { sql::test::ScopedErrorExpecter error_expecter; error_expecter.ExpectError(SQLITE_ERROR); - EXPECT_FALSE(db_->Execute("CREATE TAB foo (a, b")); + EXPECT_FALSE(db_->Execute("CREATE TABLE data(")); EXPECT_TRUE(error_expecter.SawExpectedErrors()); } EXPECT_EQ(SQLITE_ERROR, db_->GetErrorCode()); } +TEST_P(SQLDatabaseTest, ExecuteScriptForTesting_OneLineValid) { + ASSERT_TRUE(db_->ExecuteScriptForTesting("CREATE TABLE data(contents TEXT)")); + EXPECT_EQ(SQLITE_OK, db_->GetErrorCode()); +} + +TEST_P(SQLDatabaseTest, ExecuteScriptForTesting_OneLineInvalid) { + ASSERT_FALSE(db_->ExecuteScriptForTesting("CREATE TABLE data(")); + EXPECT_EQ(SQLITE_ERROR, db_->GetErrorCode()); +} + +TEST_P(SQLDatabaseTest, ExecuteScriptForTesting_ExtraContents) { + EXPECT_TRUE(db_->ExecuteScriptForTesting("CREATE TABLE data1(id)")) + << "Minimal statement"; + EXPECT_TRUE(db_->ExecuteScriptForTesting("CREATE TABLE data2(id);")) + << "Extra semicolon"; + EXPECT_TRUE(db_->ExecuteScriptForTesting("CREATE TABLE data3(id) -- Comment")) + << "Trailing comment"; + + EXPECT_TRUE(db_->ExecuteScriptForTesting( + "CREATE TABLE data4(id);CREATE TABLE data5(id)")) + << "Extra statement without whitespace"; + EXPECT_TRUE(db_->ExecuteScriptForTesting( + "CREATE TABLE data6(id); CREATE TABLE data7(id)")) + << "Extra statement separated by whitespace"; + + EXPECT_TRUE(db_->ExecuteScriptForTesting("CREATE TABLE data8(id);-- Comment")) + << "Comment without whitespace"; + EXPECT_TRUE( + db_->ExecuteScriptForTesting("CREATE TABLE data9(id); -- Comment")) + << "Comment sepatated by whitespace"; +} + +TEST_P(SQLDatabaseTest, ExecuteScriptForTesting_MultipleValidLines) { + EXPECT_TRUE(db_->ExecuteScriptForTesting(R"( + CREATE TABLE data1(contents TEXT); + CREATE TABLE data2(contents TEXT); + CREATE TABLE data3(contents TEXT); + )")); + EXPECT_EQ(SQLITE_OK, db_->GetErrorCode()); + + // DoesColumnExist() is implemented directly on top of a SQLite call. The + // other schema functions use sql::Statement infrastructure to query the + // schema table. + EXPECT_TRUE(db_->DoesColumnExist("data1", "contents")); + EXPECT_TRUE(db_->DoesColumnExist("data2", "contents")); + EXPECT_TRUE(db_->DoesColumnExist("data3", "contents")); +} + +TEST_P(SQLDatabaseTest, ExecuteScriptForTesting_StopsOnCompileError) { + EXPECT_FALSE(db_->ExecuteScriptForTesting(R"( + CREATE TABLE data1(contents TEXT); + CREATE TABLE data1(); + CREATE TABLE data3(contents TEXT); + )")); + EXPECT_EQ(SQLITE_ERROR, db_->GetErrorCode()); + + EXPECT_TRUE(db_->DoesColumnExist("data1", "contents")); + EXPECT_FALSE(db_->DoesColumnExist("data3", "contents")); +} + +TEST_P(SQLDatabaseTest, ExecuteScriptForTesting_StopsOnStepError) { + EXPECT_FALSE(db_->ExecuteScriptForTesting(R"( + CREATE TABLE data1(contents TEXT UNIQUE); + INSERT INTO data1(contents) VALUES('value1'); + INSERT INTO data1(contents) VALUES('value1'); + CREATE TABLE data3(contents TEXT); + )")); + EXPECT_EQ(SQLITE_CONSTRAINT_UNIQUE, db_->GetErrorCode()); + + EXPECT_TRUE(db_->DoesColumnExist("data1", "contents")); + EXPECT_FALSE(db_->DoesColumnExist("data3", "contents")); +} + TEST_P(SQLDatabaseTest, CachedStatement) { StatementID id1 = SQL_FROM_HERE; StatementID id2 = SQL_FROM_HERE; @@ -565,6 +638,30 @@ << "Comment separated by whitespace"; } +TEST_P(SQLDatabaseTest, GetUniqueStatement_NoContents) { + EXPECT_DCHECK_DEATH(db_->GetUniqueStatement("")) << "Empty string"; + EXPECT_DCHECK_DEATH(db_->GetUniqueStatement(" ")) << "Space"; + EXPECT_DCHECK_DEATH(db_->GetUniqueStatement("\n")) << "Newline"; + EXPECT_DCHECK_DEATH(db_->GetUniqueStatement("-- Comment")) << "Comment"; +} + +TEST_P(SQLDatabaseTest, GetCachedStatement_NoContents) { + EXPECT_DCHECK_DEATH(db_->GetCachedStatement(SQL_FROM_HERE, "")) + << "Empty string"; + EXPECT_DCHECK_DEATH(db_->GetCachedStatement(SQL_FROM_HERE, " ")) << "Space"; + EXPECT_DCHECK_DEATH(db_->GetCachedStatement(SQL_FROM_HERE, "\n")) + << "Newline"; + EXPECT_DCHECK_DEATH(db_->GetCachedStatement(SQL_FROM_HERE, "-- Comment")) + << "Comment"; +} + +TEST_P(SQLDatabaseTest, IsSQLValid_NoContents) { + EXPECT_DCHECK_DEATH(db_->IsSQLValid("")) << "Empty string"; + EXPECT_DCHECK_DEATH(db_->IsSQLValid(" ")) << "Space"; + EXPECT_DCHECK_DEATH(db_->IsSQLValid("\n")) << "Newline"; + EXPECT_DCHECK_DEATH(db_->IsSQLValid("-- Comment")) << "Comment"; +} + // Test that Database::Raze() results in a database without the // tables from the original database. TEST_P(SQLDatabaseTest, Raze) {
diff --git a/testing/buildbot/chromium.android.fyi.json b/testing/buildbot/chromium.android.fyi.json index 92a3159..9f2a934 100644 --- a/testing/buildbot/chromium.android.fyi.json +++ b/testing/buildbot/chromium.android.fyi.json
@@ -10666,7 +10666,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.109" + "revision": "version:92.0.4515.112" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -10752,7 +10752,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.8" + "revision": "version:93.0.4577.9" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -10924,7 +10924,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.109" + "revision": "version:92.0.4515.112" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -11010,7 +11010,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.8" + "revision": "version:93.0.4577.9" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index 7017c80..5b26422 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -49445,7 +49445,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.109" + "revision": "version:92.0.4515.112" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49532,7 +49532,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.8" + "revision": "version:93.0.4577.9" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49706,7 +49706,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.109" + "revision": "version:92.0.4515.112" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49793,7 +49793,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.8" + "revision": "version:93.0.4577.9" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50039,7 +50039,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.109" + "revision": "version:92.0.4515.112" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50125,7 +50125,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.8" + "revision": "version:93.0.4577.9" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50297,7 +50297,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.109" + "revision": "version:92.0.4515.112" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50383,7 +50383,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.8" + "revision": "version:93.0.4577.9" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50629,7 +50629,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.109" + "revision": "version:92.0.4515.112" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50715,7 +50715,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.8" + "revision": "version:93.0.4577.9" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50887,7 +50887,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M92", - "revision": "version:92.0.4515.109" + "revision": "version:92.0.4515.112" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50973,7 +50973,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M93", - "revision": "version:93.0.4577.8" + "revision": "version:93.0.4577.9" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json index 5903eba..e19bb14 100644 --- a/testing/buildbot/chromium.mac.json +++ b/testing/buildbot/chromium.mac.json
@@ -1605,25 +1605,6 @@ "test_id_prefix": "ninja://tools/grit:grit_python_unittests/" }, { - "isolate_name": "mac_signing_tests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "mac_signing_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Mac-10.11" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://chrome/installer/mac:mac_signing_tests/" - }, - { "isolate_name": "mojo_python_unittests", "merge": { "args": [], @@ -3407,26 +3388,6 @@ "test_id_prefix": "ninja://tools/grit:grit_python_unittests/" }, { - "isolate_name": "mac_signing_tests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "mac_signing_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "gpu": "8086:0a2e", - "os": "Mac-10.12.6" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://chrome/installer/mac:mac_signing_tests/" - }, - { "isolate_name": "mojo_python_unittests", "merge": { "args": [],
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index 62f124a5..1351d24 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -9393,1862 +9393,6 @@ } ] }, - "Linux TSan (bionic)": { - "gtest_tests": [ - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "absl_hardening_tests", - "test_id_prefix": "ninja://third_party/abseil-cpp:absl_hardening_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "accessibility_unittests", - "test_id_prefix": "ninja://ui/accessibility:accessibility_unittests/" - }, - { - "args": [ - "angle_unittests", - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/", - "use_isolated_scripts_api": true - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "app_shell_unittests", - "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "aura_unittests", - "test_id_prefix": "ninja://ui/aura:aura_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "base_unittests", - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "base_util_unittests", - "test_id_prefix": "ninja://base/util:base_util_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_common_unittests", - "test_id_prefix": "ninja://third_party/blink/common:blink_common_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_fuzzer_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_fuzzer_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_heap_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform/heap:blink_heap_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "blink_platform_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform:blink_platform_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "name": "webkit_unit_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 2 - }, - "test": "blink_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/controller:blink_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "boringssl_crypto_tests", - "test_id_prefix": "ninja://third_party/boringssl:boringssl_crypto_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "boringssl_ssl_tests", - "test_id_prefix": "ninja://third_party/boringssl:boringssl_ssl_tests/" - }, - { - "args": [ - "--gtest_filter=-*UsingRealWebcam*", - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "capture_unittests", - "test_id_prefix": "ninja://media/capture:capture_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cast_unittests", - "test_id_prefix": "ninja://media/cast:cast_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 3 - }, - "test": "cc_unittests", - "test_id_prefix": "ninja://cc:cc_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "chrome_app_unittests", - "test_id_prefix": "ninja://chrome/test:chrome_app_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "chromedriver_unittests", - "test_id_prefix": "ninja://chrome/test/chromedriver:chromedriver_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "color_unittests", - "test_id_prefix": "ninja://ui/color:color_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "components_browsertests", - "test_id_prefix": "ninja://components:components_browsertests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 2 - }, - "test": "components_unittests", - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "compositor_unittests", - "test_id_prefix": "ninja://ui/compositor:compositor_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 15 - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" - }, - { - "args": [ - "--enable-gpu", - "--test-launcher-bot-mode", - "--test-launcher-jobs=1", - "--test-launcher-filter-file=../../testing/buildbot/filters/vulkan.content_browsertests.filter", - "--enable-features=UseSkiaRenderer,UiGpuRasterization,Vulkan", - "--use-vulkan=swiftshader", - "--enable-oop-rasterization", - "--enable-gpu-rasterization", - "--disable-software-compositing-fallback", - "--disable-vulkan-fallback-to-gl-for-testing", - "--disable-headless-mode", - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "name": "vulkan_swiftshader_content_browsertests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "content_browsertests", - "test_id_prefix": "ninja://content/test:content_browsertests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "content_unittests", - "test_id_prefix": "ninja://content/test:content_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cronet_tests", - "test_id_prefix": "ninja://components/cronet:cronet_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "cronet_unittests", - "test_id_prefix": "ninja://components/cronet:cronet_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "crypto_unittests", - "test_id_prefix": "ninja://crypto:crypto_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "dbus_unittests", - "test_id_prefix": "ninja://dbus:dbus_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "device_unittests", - "test_id_prefix": "ninja://device:device_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "display_unittests", - "test_id_prefix": "ninja://ui/display:display_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "events_unittests", - "test_id_prefix": "ninja://ui/events:events_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "extensions_browsertests", - "test_id_prefix": "ninja://extensions:extensions_browsertests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "extensions_unittests", - "test_id_prefix": "ninja://extensions:extensions_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "filesystem_service_unittests", - "test_id_prefix": "ninja://components/services/filesystem:filesystem_service_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "gcm_unit_tests", - "test_id_prefix": "ninja://google_apis/gcm:gcm_unit_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "gfx_unittests", - "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "gin_unittests", - "test_id_prefix": "ninja://gin:gin_unittests/" - }, - { - "args": [ - "--use-cmd-decoder=passthrough", - "--test-launcher-print-test-stdio=always", - "--use-gpu-in-tests", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "name": "gl_tests_passthrough", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "10de:1cb3", - "os": "Ubuntu", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 2 - }, - "test": "gl_tests", - "test_id_prefix": "ninja://gpu:gl_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "gl_unittests", - "test_id_prefix": "ninja://ui/gl:gl_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "google_apis_unittests", - "test_id_prefix": "ninja://google_apis:google_apis_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "gpu_unittests", - "test_id_prefix": "ninja://gpu:gpu_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "gtk_unittests", - "test_id_prefix": "ninja://ui/gtk:gtk_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "gwp_asan_unittests", - "test_id_prefix": "ninja://components/gwp_asan:gwp_asan_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "headless_browsertests", - "test_id_prefix": "ninja://headless:headless_browsertests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "headless_unittests", - "test_id_prefix": "ninja://headless:headless_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 32 - }, - "test": "interactive_ui_tests", - "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ipc_tests", - "test_id_prefix": "ninja://ipc:ipc_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "jingle_unittests", - "test_id_prefix": "ninja://jingle:jingle_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "latency_unittests", - "test_id_prefix": "ninja://ui/latency:latency_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "libjingle_xmpp_unittests", - "test_id_prefix": "ninja://third_party/libjingle_xmpp:libjingle_xmpp_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "liburlpattern_unittests", - "test_id_prefix": "ninja://third_party/liburlpattern:liburlpattern_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "media_unittests", - "test_id_prefix": "ninja://media:media_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "message_center_unittests", - "test_id_prefix": "ninja://ui/message_center:message_center_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "midi_unittests", - "test_id_prefix": "ninja://media/midi:midi_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "mojo_core_unittests", - "test_id_prefix": "ninja://mojo/core:mojo_core_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "mojo_unittests", - "test_id_prefix": "ninja://mojo:mojo_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "native_theme_unittests", - "test_id_prefix": "ninja://ui/native_theme:native_theme_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 4 - }, - "test": "net_unittests", - "test_id_prefix": "ninja://net:net_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "openscreen_unittests", - "test_id_prefix": "ninja://chrome/browser/media/router:openscreen_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "pdf_unittests", - "test_id_prefix": "ninja://pdf:pdf_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "perfetto_unittests", - "test_id_prefix": "ninja://third_party/perfetto:perfetto_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "printing_unittests", - "test_id_prefix": "ninja://printing:printing_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "remoting_unittests", - "test_id_prefix": "ninja://remoting:remoting_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "sandbox_linux_unittests", - "test_id_prefix": "ninja://sandbox/linux:sandbox_linux_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "service_manager_unittests", - "test_id_prefix": "ninja://services/service_manager/tests:service_manager_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "services_unittests", - "test_id_prefix": "ninja://services:services_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "shell_dialogs_unittests", - "test_id_prefix": "ninja://ui/shell_dialogs:shell_dialogs_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "skia_unittests", - "test_id_prefix": "ninja://skia:skia_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "snapshot_unittests", - "test_id_prefix": "ninja://ui/snapshot:snapshot_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "sql_unittests", - "test_id_prefix": "ninja://sql:sql_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "storage_unittests", - "test_id_prefix": "ninja://storage:storage_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 6 - }, - "test": "sync_integration_tests", - "test_id_prefix": "ninja://chrome/test:sync_integration_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "traffic_annotation_auditor_unittests", - "test_id_prefix": "ninja://tools/traffic_annotation/auditor:traffic_annotation_auditor_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ui_base_unittests", - "test_id_prefix": "ninja://ui/base:ui_base_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ui_touch_selection_unittests", - "test_id_prefix": "ninja://ui/touch_selection:ui_touch_selection_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 2 - }, - "test": "unit_tests", - "test_id_prefix": "ninja://chrome/test:unit_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "url_unittests", - "test_id_prefix": "ninja://url:url_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "views_unittests", - "test_id_prefix": "ninja://ui/views:views_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "viz_unittests", - "test_id_prefix": "ninja://components/viz:viz_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "vr_common_unittests", - "test_id_prefix": "ninja://chrome/browser/vr:vr_common_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "vr_pixeltests", - "test_id_prefix": "ninja://chrome/browser/vr:vr_pixeltests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "weblayer_browsertests", - "test_id_prefix": "ninja://weblayer/test:weblayer_browsertests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "weblayer_unittests", - "test_id_prefix": "ninja://weblayer/test:weblayer_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "wm_unittests", - "test_id_prefix": "ninja://ui/wm:wm_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "wtf_unittests", - "test_id_prefix": "ninja://third_party/blink/renderer/platform/wtf:wtf_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "x11_unittests", - "test_id_prefix": "ninja://ui/platform_window/x11:x11_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "name": "xr_browser_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "xr_browser_tests", - "test_id_prefix": "ninja://chrome/test:xr_browser_tests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-18.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "zlib_unittests", - "test_id_prefix": "ninja://third_party/zlib:zlib_unittests/" - } - ] - }, "Linux TSan Tests": { "gtest_tests": [ {
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index d9585df..fe7f317 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -557,9 +557,7 @@ 'Mac10.15 Tests', # https://crbug.com/1042757 'Mac10.15 Tests (dbg)', # https://crbug.com/1201386 'mac-code-coverage', # https://crbug.com/1201386 - 'Linux TSan (bionic)', # https://crbug.com/368525 'Linux TSan Tests', # https://crbug.com/368525 - # TODO(crbug.com/1200904): Remove after migration 'Win10 Tests x64 (dbg)', ], 'modifications': { @@ -777,12 +775,6 @@ }, 'cc_unittests': { 'modifications': { - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - 'swarming': { - 'shards': 3, - }, - }, 'Linux TSan Tests': { 'swarming': { 'shards': 3, @@ -1141,12 +1133,6 @@ 'shards': 5, }, }, - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - 'swarming': { - 'shards': 2, - }, - }, 'Linux TSan Tests': { 'swarming': { 'shards': 2, @@ -1211,12 +1197,6 @@ 'shards': 10, # https://crbug.com/1103330 }, }, - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - 'swarming': { - 'shards': 15, - }, - }, 'Linux TSan Tests': { 'swarming': { 'shards': 15, @@ -1465,8 +1445,6 @@ 'crashpad_tests': { 'remove_from': [ 'linux-win_cross-rel', # https://crbug.com/762167 - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)', # https://crbug.com/crashpad/304 'Linux TSan Tests', 'ToTLinuxTSan', @@ -1611,22 +1589,6 @@ ], }, }, - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - 'args': [ - '--use-gpu-in-tests', - '--no-xvfb', - ], - 'swarming': { - 'dimension_sets': [ - { - 'gpu': '10de:1cb3', - 'os': 'Ubuntu', - 'pool': 'chromium.tests.gpu', - }, - ], - }, - }, 'Linux TSan Tests': { 'args': [ '--use-gpu-in-tests', @@ -1797,13 +1759,6 @@ 'shards': 5, }, }, - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - # These are slow on the TSan bots for some reason, crbug.com/794372 - 'swarming': { - 'shards': 32, # Adjusted for testing, see https://crbug.com/1179567 - }, - }, 'Linux TSan Tests': { # These are slow on the TSan bots for some reason, crbug.com/794372 'swarming': { @@ -1908,6 +1863,13 @@ }, }, }, + 'mac_signing_tests': { + 'remove_from': [ + # TODO(crbug.com/1220743): Re-enable. + 'Mac10.11 Tests', + 'Mac10.12 Tests', + ] + }, 'maps_pixel_passthrough_test': { 'modifications': { 'Android FYI Release (Pixel 4)': { @@ -2158,8 +2120,6 @@ }, 'nacl_helper_nonsfi_unittests': { 'remove_from': [ - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)', # Sets enable_nacl=false. 'Linux TSan Tests', # Sets enable_nacl=false. ], }, @@ -2167,8 +2127,6 @@ 'remove_from': [ 'ToTMacASan', # The mac asan tot bot sets enable_nacl=false 'linux-win_cross-rel', # Sets enable_nacl=false, https://crbug.com/774186 - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)', # The TSan bot sets enable_nacl=false 'Linux TSan Tests', # The TSan bot sets enable_nacl=false 'Mac ASan 64 Tests (1)', # The mac asan bot sets enable_nacl=false ], @@ -2208,12 +2166,6 @@ 'shards': 2, }, }, - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - 'swarming': { - 'shards': 4, - } - }, 'Linux TSan Tests': { 'swarming': { 'shards': 4, @@ -2659,12 +2611,6 @@ 'shards': 4, }, }, - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - 'swarming': { - 'shards': 6, - }, - }, 'Linux TSan Tests': { 'swarming': { 'shards': 6, @@ -2918,12 +2864,6 @@ 'shards': 2, }, }, - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - 'swarming': { - 'shards': 2, - }, - }, 'Linux TSan Tests': { 'swarming': { 'shards': 2, @@ -3185,12 +3125,6 @@ 'shards': 5, }, }, - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - 'swarming': { - 'shards': 2, - }, - }, 'Linux TSan Tests': { 'swarming': { 'shards': 2,
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index a4c701d..baba694 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -431,7 +431,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M93', - 'revision': 'version:93.0.4577.8', + 'revision': 'version:93.0.4577.9', } ], }, @@ -455,7 +455,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M92', - 'revision': 'version:92.0.4515.109', + 'revision': 'version:92.0.4515.112', } ], }, @@ -503,7 +503,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M93', - 'revision': 'version:93.0.4577.8', + 'revision': 'version:93.0.4577.9', } ], }, @@ -527,7 +527,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M92', - 'revision': 'version:92.0.4515.109', + 'revision': 'version:92.0.4515.112', } ], }, @@ -575,7 +575,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M93', - 'revision': 'version:93.0.4577.8', + 'revision': 'version:93.0.4577.9', } ], }, @@ -599,7 +599,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M92', - 'revision': 'version:92.0.4515.109', + 'revision': 'version:92.0.4515.112', } ], },
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index c30aa8d..747b3c7 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -5304,18 +5304,6 @@ '--test-launcher-print-test-stdio=always', ], }, - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': { - 'mixins': [ - 'linux-bionic', - ], - 'test_suites': { - 'gtest_tests': 'chromium_linux_and_gl_and_vulkan_gtests', - }, - 'args': [ - '--test-launcher-print-test-stdio=always', - ], - }, 'Linux TSan Tests': { 'mixins': [ 'linux-bionic',
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 5b4fba3..68b5a77 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -2251,6 +2251,21 @@ ] } ], + "CommerceMerchantViewer": [ + { + "platforms": [ + "android" + ], + "experiments": [ + { + "name": "Enabled_20210721", + "params": { + "delete_all_merchants_on_clear_history": "true" + } + } + ] + } + ], "CompositeAfterPaint": [ { "platforms": [
diff --git a/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc b/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc index 06b0c84..d573470 100644 --- a/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc +++ b/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc
@@ -5,7 +5,7 @@ #include "third_party/blink/renderer/bindings/core/v8/js_event_handler.h" #include "third_party/blink/renderer/bindings/core/v8/script_value.h" -#include "third_party/blink/renderer/bindings/core/v8/to_v8_for_core.h" +#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h" #include "third_party/blink/renderer/bindings/core/v8/v8_string_resource.h" #include "third_party/blink/renderer/core/dom/events/event_target.h" #include "third_party/blink/renderer/core/events/before_unload_event.h" @@ -91,6 +91,7 @@ HeapVector<ScriptValue> arguments; ScriptState* script_state_of_listener = event_handler_->CallbackRelevantScriptState(); + v8::Isolate* isolate = script_state_of_listener->GetIsolate(); if (special_error_event_handling) { auto* error_event = To<ErrorEvent>(&event); @@ -100,17 +101,27 @@ ScriptValue error_attribute = error_event->error(script_state_of_listener); if (error_attribute.IsEmpty() || error_event->target()->InterfaceName() == event_target_names::kWorker) { - error_attribute = - ScriptValue::CreateNull(script_state_of_listener->GetIsolate()); + error_attribute = ScriptValue::CreateNull(isolate); } arguments = { - ScriptValue::From(script_state_of_listener, error_event->message()), - ScriptValue::From(script_state_of_listener, error_event->filename()), - ScriptValue::From(script_state_of_listener, error_event->lineno()), - ScriptValue::From(script_state_of_listener, error_event->colno()), + ScriptValue(isolate, + ToV8Traits<IDLStringV2>::ToV8(script_state_of_listener, + error_event->message()) + .ToLocalChecked()), + ScriptValue(isolate, + ToV8Traits<IDLStringV2>::ToV8(script_state_of_listener, + error_event->filename()) + .ToLocalChecked()), + ScriptValue(isolate, + ToV8Traits<IDLUnsignedLong>::ToV8(script_state_of_listener, + error_event->lineno()) + .ToLocalChecked()), + ScriptValue(isolate, ToV8Traits<IDLUnsignedLong>::ToV8( + script_state_of_listener, error_event->colno()) + .ToLocalChecked()), error_attribute}; } else { - arguments = {ScriptValue::From(script_state_of_listener, js_event)}; + arguments.push_back(ScriptValue(isolate, js_event)); } if (!event_handler_->IsRunnableOrThrowException( @@ -123,7 +134,7 @@ if (!event_handler_ ->InvokeWithoutRunnabilityCheck(event.currentTarget(), arguments) .To(&result) || - GetIsolate()->IsExecutionTerminating()) + isolate->IsExecutionTerminating()) return; v8::Local<v8::Value> v8_return_value = result.V8Value();
diff --git a/third_party/blink/renderer/core/style/computed_style.cc b/third_party/blink/renderer/core/style/computed_style.cc index 0bce899..5e0cbdf 100644 --- a/third_party/blink/renderer/core/style/computed_style.cc +++ b/third_party/blink/renderer/core/style/computed_style.cc
@@ -2077,12 +2077,20 @@ if (lh.IsNegative() && font.PrimaryFont()) return font.PrimaryFont()->GetFontMetrics().FixedLineSpacing(); - if (lh.IsPercentOrCalc()) { - return LayoutUnit( - MinimumValueForLength(lh, ComputedFontSizeAsFixed(font)).ToInt()); - } + if (RuntimeEnabledFeatures::FractionalLineHeightEnabled()) { + if (lh.IsPercentOrCalc()) { + return MinimumValueForLength(lh, ComputedFontSizeAsFixed(font)); + } - return LayoutUnit(floorf(lh.Value())); + return LayoutUnit::FromFloatFloor(lh.Value()); + } else { + if (lh.IsPercentOrCalc()) { + return LayoutUnit( + MinimumValueForLength(lh, ComputedFontSizeAsFixed(font)).ToInt()); + } + + return LayoutUnit(floorf(lh.Value())); + } } LayoutUnit ComputedStyle::ComputedLineHeightAsFixed() const {
diff --git a/third_party/blink/renderer/modules/breakout_box/BUILD.gn b/third_party/blink/renderer/modules/breakout_box/BUILD.gn index 497fde0..f622158 100644 --- a/third_party/blink/renderer/modules/breakout_box/BUILD.gn +++ b/third_party/blink/renderer/modules/breakout_box/BUILD.gn
@@ -31,10 +31,6 @@ "pushable_media_stream_video_source.h", "transferred_frame_queue_underlying_source.cc", "transferred_frame_queue_underlying_source.h", - "video_track_signal_underlying_sink.cc", - "video_track_signal_underlying_sink.h", - "video_track_signal_underlying_source.cc", - "video_track_signal_underlying_source.h", ] deps = [ "//third_party/blink/renderer/modules/mediastream:mediastream", @@ -56,8 +52,6 @@ "pushable_media_stream_video_source_test.cc", "stream_test_utils.cc", "stream_test_utils.h", - "video_track_signal_underlying_sink_test.cc", - "video_track_signal_underlying_source_test.cc", ] deps = [
diff --git a/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.cc b/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.cc index e0b321c..4403046 100644 --- a/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.cc +++ b/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.cc
@@ -8,14 +8,12 @@ #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_generator_init.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h" -#include "third_party/blink/renderer/core/streams/readable_stream.h" #include "third_party/blink/renderer/core/streams/writable_stream.h" #include "third_party/blink/renderer/core/streams/writable_stream_transferring_optimizer.h" #include "third_party/blink/renderer/modules/breakout_box/media_stream_audio_track_underlying_sink.h" #include "third_party/blink/renderer/modules/breakout_box/media_stream_video_track_underlying_sink.h" #include "third_party/blink/renderer/modules/breakout_box/pushable_media_stream_audio_source.h" #include "third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h" -#include "third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source.h" #include "third_party/blink/renderer/modules/mediastream/media_stream_utils.h" #include "third_party/blink/renderer/modules/mediastream/media_stream_video_track.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h" @@ -28,18 +26,6 @@ namespace blink { -namespace { - -const wtf_size_t kDefaultMaxSignalBufferSize = 20u; - -class NullUnderlyingSource : public UnderlyingSourceBase { - public: - explicit NullUnderlyingSource(ScriptState* script_state) - : UnderlyingSourceBase(script_state) {} -}; - -} // namespace - MediaStreamTrackGenerator* MediaStreamTrackGenerator::Create( ScriptState* script_state, const String& kind, @@ -62,8 +48,7 @@ return MakeGarbageCollected<MediaStreamTrackGenerator>( script_state, type, - /*track_id=*/WTF::CreateCanonicalUUIDString(), nullptr, - kDefaultMaxSignalBufferSize); + /*track_id=*/WTF::CreateCanonicalUUIDString()); } MediaStreamTrackGenerator* MediaStreamTrackGenerator::Create( @@ -81,11 +66,6 @@ return nullptr; } - if (init->hasSignalTarget() && init->signalTarget()->kind() != init->kind()) { - exception_state.ThrowTypeError("kind and signalTarget.kind() do not match"); - return nullptr; - } - MediaStreamSource::StreamType type; if (init->kind() == "video") { type = MediaStreamSource::kTypeVideo; @@ -96,33 +76,24 @@ return nullptr; } - wtf_size_t max_signal_buffer_size = kDefaultMaxSignalBufferSize; - if (init->hasMaxSignalBufferSize()) - max_signal_buffer_size = init->maxSignalBufferSize(); - return MakeGarbageCollected<MediaStreamTrackGenerator>( script_state, type, - /*track_id=*/WTF::CreateCanonicalUUIDString(), - init->getSignalTargetOr(nullptr), - max_signal_buffer_size); + /*track_id=*/WTF::CreateCanonicalUUIDString()); } MediaStreamTrackGenerator::MediaStreamTrackGenerator( ScriptState* script_state, MediaStreamSource::StreamType type, - const String& track_id, - MediaStreamTrack* signal_target, - wtf_size_t max_signal_buffer_size) + const String& track_id) : MediaStreamTrack( ExecutionContext::From(script_state), MakeGarbageCollected<MediaStreamComponent>( MakeGarbageCollected<MediaStreamSource>(track_id, type, track_id, - /*remote=*/false))), - max_signal_buffer_size_(max_signal_buffer_size) { + /*remote=*/false))) { if (type == MediaStreamSource::kTypeVideo) { - CreateVideoOutputPlatformTrack(signal_target); + CreateVideoOutputPlatformTrack(); } else { DCHECK_EQ(type, MediaStreamSource::kTypeAudio); CreateAudioOutputPlatformTrack(); @@ -143,19 +114,6 @@ return writable_; } -ReadableStream* MediaStreamTrackGenerator::readableControl( - ScriptState* script_state) { - if (readable_control_) - return readable_control_; - - if (kind() == "video") - CreateVideoControlStream(script_state); - else if (kind() == "audio") - CreateAudioControlStream(script_state); - - return readable_control_; -} - PushableMediaStreamVideoSource* MediaStreamTrackGenerator::PushableVideoSource() const { DCHECK_EQ(Component()->Source()->GetType(), MediaStreamSource::kTypeVideo); @@ -164,21 +122,11 @@ MediaStreamVideoSource::GetVideoSource(Component()->Source())); } -void MediaStreamTrackGenerator::CreateVideoOutputPlatformTrack( - MediaStreamTrack* signal_target) { - base::WeakPtr<MediaStreamVideoSource> signal_target_upstream_source; - if (signal_target) { - MediaStreamVideoSource* upstream_source = - MediaStreamVideoSource::GetVideoSource( - signal_target->Component()->Source()); - signal_target_upstream_source = upstream_source->GetWeakPtr(); - } - +void MediaStreamTrackGenerator::CreateVideoOutputPlatformTrack() { std::unique_ptr<PushableMediaStreamVideoSource> platform_source = std::make_unique<PushableMediaStreamVideoSource>( GetExecutionContext()->GetTaskRunner( - TaskType::kInternalMediaRealTime), - signal_target_upstream_source); + TaskType::kInternalMediaRealTime)); PushableMediaStreamVideoSource* platform_source_ptr = platform_source.get(); Component()->Source()->SetPlatformSource(std::move(platform_source)); std::unique_ptr<MediaStreamVideoTrack> platform_track = @@ -229,36 +177,10 @@ audio_underlying_sink_->GetTransferringOptimizer()); } -void MediaStreamTrackGenerator::CreateVideoControlStream( - ScriptState* script_state) { - DCHECK(!readable_control_); - // TODO(crbug.com/1142955): Make the queue size configurable from the - // constructor. - control_underlying_source_ = - MakeGarbageCollected<VideoTrackSignalUnderlyingSource>( - script_state, this, max_signal_buffer_size_); - readable_control_ = ReadableStream::CreateWithCountQueueingStrategy( - script_state, control_underlying_source_, /*high_water_mark=*/0); -} - -void MediaStreamTrackGenerator::CreateAudioControlStream( - ScriptState* script_state) { - DCHECK(!readable_control_); - // Since no signals have been defined for audio, use a null source that - // does nothing, so that a valid stream can be returned for audio - // MediaStreamTrackGenerators. - control_underlying_source_ = - MakeGarbageCollected<NullUnderlyingSource>(script_state); - readable_control_ = ReadableStream::CreateWithCountQueueingStrategy( - script_state, control_underlying_source_, /*high_water_mark=*/0); -} - void MediaStreamTrackGenerator::Trace(Visitor* visitor) const { visitor->Trace(video_underlying_sink_); visitor->Trace(audio_underlying_sink_); visitor->Trace(writable_); - visitor->Trace(control_underlying_source_); - visitor->Trace(readable_control_); MediaStreamTrack::Trace(visitor); }
diff --git a/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.h b/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.h index cf18289..6cf6009a2 100644 --- a/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.h +++ b/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.h
@@ -15,9 +15,7 @@ class MediaStreamTrackGeneratorInit; class MediaStreamVideoTrackUnderlyingSink; class PushableMediaStreamVideoSource; -class ReadableStream; class ScriptState; -class UnderlyingSourceBase; class WritableStream; class MODULES_EXPORT MediaStreamTrackGenerator : public MediaStreamTrack { @@ -32,15 +30,12 @@ ExceptionState&); MediaStreamTrackGenerator(ScriptState*, MediaStreamSource::StreamType, - const String& track_id, - MediaStreamTrack* signal_target, - wtf_size_t max_signal_buffer_size); + const String& track_id); MediaStreamTrackGenerator(const MediaStreamTrackGenerator&) = delete; MediaStreamTrackGenerator& operator=(const MediaStreamTrackGenerator&) = delete; WritableStream* writable(ScriptState* script_state); - ReadableStream* readableControl(ScriptState* script_state); PushableMediaStreamVideoSource* PushableVideoSource() const; @@ -50,18 +45,12 @@ void CreateAudioOutputPlatformTrack(); void CreateAudioStream(ScriptState* script_state); - void CreateVideoOutputPlatformTrack(MediaStreamTrack* signal_target); + void CreateVideoOutputPlatformTrack(); void CreateVideoStream(ScriptState* script_state); - void CreateAudioControlStream(ScriptState* script_state); - void CreateVideoControlStream(ScriptState* script_state); - Member<MediaStreamAudioTrackUnderlyingSink> audio_underlying_sink_; Member<MediaStreamVideoTrackUnderlyingSink> video_underlying_sink_; Member<WritableStream> writable_; - Member<UnderlyingSourceBase> control_underlying_source_; - Member<ReadableStream> readable_control_; - const wtf_size_t max_signal_buffer_size_; }; } // namespace blink
diff --git a/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.idl b/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.idl index 7cdd15d9..25946bb 100644 --- a/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.idl +++ b/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.idl
@@ -16,7 +16,4 @@ // This streams takes VideoFrame or AudioData objects. [CallWith=ScriptState] readonly attribute WritableStream writable; - - // This stream returns MediaStreamTrackSignal objects. - [CallWith=ScriptState] readonly attribute ReadableStream readableControl; };
diff --git a/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator_test.cc b/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator_test.cc index 2eefac01..bc0ded42 100644 --- a/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator_test.cc +++ b/third_party/blink/renderer/modules/breakout_box/media_stream_track_generator_test.cc
@@ -13,7 +13,6 @@ #include "third_party/blink/renderer/bindings/core/v8/script_promise_tester.h" #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_generator_init.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_signal.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_video_frame.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/streams/readable_stream.h" @@ -165,33 +164,6 @@ histogram_tester.ExpectTotalCount("Media.BreakoutBox.Usage", 1); } -TEST_F(MediaStreamTrackGeneratorTest, SignalsAreRead) { - base::HistogramTester histogram_tester; - V8TestingScope v8_scope; - ScriptState* script_state = v8_scope.GetScriptState(); - MediaStreamTrackGenerator* generator = MediaStreamTrackGenerator::Create( - script_state, "video", ASSERT_NO_EXCEPTION); - - auto* video_source = generator->PushableVideoSource(); - auto* video_track = MediaStreamVideoTrack::From(generator->Component()); - - auto* reader = - generator->readableControl(script_state) - ->GetDefaultReaderForTesting(script_state, ASSERT_NO_EXCEPTION); - video_source->RequestRefreshFrame(); - auto* signal = ReadObjectFromStream<MediaStreamTrackSignal>(v8_scope, reader); - EXPECT_EQ(signal->signalType(), "request-frame"); - - const double min_frame_rate = 3.5; - video_track->SetMinimumFrameRate(min_frame_rate); - signal = ReadObjectFromStream<MediaStreamTrackSignal>(v8_scope, reader); - EXPECT_EQ(signal->signalType(), "set-min-frame-rate"); - EXPECT_TRUE(signal->hasFrameRate()); - EXPECT_EQ(signal->frameRate(), min_frame_rate); - histogram_tester.ExpectUniqueSample( - "Media.BreakoutBox.Usage", BreakoutBoxUsage::kReadableControlVideo, 1); - histogram_tester.ExpectTotalCount("Media.BreakoutBox.Usage", 1); -} TEST_F(MediaStreamTrackGeneratorTest, FramesDoNotFlowOnStoppedGenerator) { V8TestingScope v8_scope; @@ -317,53 +289,4 @@ EXPECT_TRUE(clone->Ended()); } -TEST_F(MediaStreamTrackGeneratorTest, SignalsFlowFromGeneratorToProcessor) { - V8TestingScope v8_scope; - ScriptState* script_state = v8_scope.GetScriptState(); - auto* generator = MediaStreamTrackGenerator::Create(script_state, "video", - ASSERT_NO_EXCEPTION); - - // Create a processor connected to a mock source. - auto* mock_video_source = CreateMockVideoSource(); - auto* processor = MediaStreamTrackProcessor::Create( - script_state, - CreateVideoMediaStreamTrack(v8_scope.GetExecutionContext(), - mock_video_source), - ASSERT_NO_EXCEPTION); - mock_video_source->StartMockedSource(); - - // Connect the generator to the processor. - generator->readableControl(script_state) - ->pipeTo(script_state, processor->writableControl(script_state), - ASSERT_NO_EXCEPTION); - - // Push a signal to the generator and verify that it makes it to the mock - // source backing the processor at the end of the chain. - base::RunLoop loop; - EXPECT_CALL(*mock_video_source, OnRequestRefreshFrame()) - .WillOnce(base::test::RunOnceClosure(loop.QuitClosure())); - generator->PushableVideoSource()->RequestRefreshFrame(); - loop.Run(); -} - -TEST_F(MediaStreamTrackGeneratorTest, ImplicitSignalsAreForwarded) { - V8TestingScope v8_scope; - ScriptState* script_state = v8_scope.GetScriptState(); - - MockMediaStreamVideoSource* mock_source = CreateMockVideoSource(); - MediaStreamTrack* signal_target = - CreateVideoMediaStreamTrack(v8_scope.GetExecutionContext(), mock_source); - mock_source->StartMockedSource(); - - auto* init = MediaStreamTrackGeneratorInit::Create(); - init->setKind("video"); - init->setSignalTarget(signal_target); - auto* generator = MediaStreamTrackGenerator::Create(script_state, init, - ASSERT_NO_EXCEPTION); - // Send a signal to the generator. It should be forwarded to the source of the - // |signal_target| track. - EXPECT_CALL(*mock_source, OnRequestRefreshFrame()); - generator->PushableVideoSource()->RequestRefreshFrame(); -} - } // namespace blink
diff --git a/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.cc b/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.cc index cc6e85c..267be57 100644 --- a/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.cc +++ b/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.cc
@@ -8,10 +8,8 @@ #include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_processor_init.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/streams/readable_stream.h" -#include "third_party/blink/renderer/core/streams/writable_stream.h" #include "third_party/blink/renderer/modules/breakout_box/media_stream_audio_track_underlying_source.h" #include "third_party/blink/renderer/modules/breakout_box/media_stream_video_track_underlying_source.h" -#include "third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink.h" #include "third_party/blink/renderer/modules/mediastream/media_stream_track.h" #include "third_party/blink/renderer/modules/mediastream/media_stream_utils.h" #include "third_party/blink/renderer/modules/mediastream/media_stream_video_track.h" @@ -22,38 +20,6 @@ namespace blink { -namespace { - -// Trivial sink for audio control signals. -class NullUnderlyingSink : public UnderlyingSinkBase { - public: - // UnderlyingSinkBase overrides. - ScriptPromise start(ScriptState* script_state, - WritableStreamDefaultController* controller, - ExceptionState& exception_state) override { - return ScriptPromise::CastUndefined(script_state); - } - - ScriptPromise write(ScriptState* script_state, - ScriptValue chunk, - WritableStreamDefaultController* controller, - ExceptionState& exception_state) override { - exception_state.ThrowTypeError("Invalid audio signal"); - return ScriptPromise(); - } - ScriptPromise abort(ScriptState* script_state, - ScriptValue reason, - ExceptionState& exception_state) override { - return ScriptPromise::CastUndefined(script_state); - } - ScriptPromise close(ScriptState* script_state, - ExceptionState& exception_state) override { - return ScriptPromise::CastUndefined(script_state); - } -}; - -} // namespace - // A MediaStreamTrack Observer which closes the provided // UnderlyingSource whenever the provided track is ended. class MediaStreamTrackProcessor::UnderlyingSourceCloser @@ -108,20 +74,6 @@ return source_stream_; } -WritableStream* MediaStreamTrackProcessor::writableControl( - ScriptState* script_state) { - if (control_stream_) - return control_stream_; - - if (input_track_->Component()->Source()->GetType() == - MediaStreamSource::kTypeVideo) { - CreateVideoControlStream(script_state); - } else { - CreateAudioControlStream(script_state); - } - return control_stream_; -} - void MediaStreamTrackProcessor::CreateVideoSourceStream( ScriptState* script_state) { DCHECK(!source_stream_); @@ -146,23 +98,6 @@ audio_underlying_source_->GetTransferringOptimizer()); } -void MediaStreamTrackProcessor::CreateVideoControlStream( - ScriptState* script_state) { - DCHECK(!control_stream_); - signal_underlying_sink_ = - MakeGarbageCollected<VideoTrackSignalUnderlyingSink>(input_track_); - control_stream_ = WritableStream::CreateWithCountQueueingStrategy( - script_state, signal_underlying_sink_, /*high_water_mark=*/1u); -} - -void MediaStreamTrackProcessor::CreateAudioControlStream( - ScriptState* script_state) { - DCHECK(!control_stream_); - signal_underlying_sink_ = MakeGarbageCollected<NullUnderlyingSink>(); - control_stream_ = WritableStream::CreateWithCountQueueingStrategy( - script_state, signal_underlying_sink_, /*high_water_mark=*/1u); -} - MediaStreamTrackProcessor* MediaStreamTrackProcessor::Create( ScriptState* script_state, MediaStreamTrack* track, @@ -230,9 +165,7 @@ visitor->Trace(input_track_); visitor->Trace(audio_underlying_source_); visitor->Trace(video_underlying_source_); - visitor->Trace(signal_underlying_sink_); visitor->Trace(source_stream_); - visitor->Trace(control_stream_); visitor->Trace(source_closer_); ScriptWrappable::Trace(visitor); }
diff --git a/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.h b/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.h index 6564031..76e3f59 100644 --- a/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.h +++ b/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.h
@@ -20,8 +20,6 @@ class MediaStreamTrackProcessorInit; class ReadableStream; class ScriptState; -class UnderlyingSinkBase; -class WritableStream; class MODULES_EXPORT MediaStreamTrackProcessor : public ScriptWrappable { DEFINE_WRAPPERTYPEINFO(); @@ -46,7 +44,6 @@ // MediaStreamTrackProcessor interface ReadableStream* readable(ScriptState* script_state); - WritableStream* writableControl(ScriptState* script_state); // Closes |audio_underlying_source_| and |video_underlying_source_| if they // exist. @@ -59,17 +56,13 @@ private: void CreateVideoSourceStream(ScriptState* script_state); void CreateAudioSourceStream(ScriptState* script_state); - void CreateVideoControlStream(ScriptState* script_state); - void CreateAudioControlStream(ScriptState* script_state); class UnderlyingSourceCloser; Member<MediaStreamTrack> input_track_; Member<MediaStreamVideoTrackUnderlyingSource> video_underlying_source_; Member<MediaStreamAudioTrackUnderlyingSource> audio_underlying_source_; - Member<UnderlyingSinkBase> signal_underlying_sink_; Member<ReadableStream> source_stream_; - Member<WritableStream> control_stream_; Member<UnderlyingSourceCloser> source_closer_; uint16_t buffer_size_; };
diff --git a/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.idl b/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.idl index a9e7997..34a6850 100644 --- a/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.idl +++ b/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.idl
@@ -16,7 +16,4 @@ // This stream returns VideoFrame or AudioFrame objects. [CallWith=ScriptState] readonly attribute ReadableStream readable; - - // This stream accepts MediaStreamTrackSignal objects - [CallWith=ScriptState] readonly attribute WritableStream writableControl; };
diff --git a/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor_test.cc b/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor_test.cc index 3a5b6c5b..6fc005e 100644 --- a/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor_test.cc +++ b/third_party/blink/renderer/modules/breakout_box/media_stream_track_processor_test.cc
@@ -16,7 +16,6 @@ #include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h" #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_generator_init.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_signal.h" #include "third_party/blink/renderer/core/streams/readable_stream.h" #include "third_party/blink/renderer/core/streams/readable_stream_default_reader.h" #include "third_party/blink/renderer/core/streams/writable_stream.h" @@ -82,32 +81,6 @@ return MakeGarbageCollected<MediaStreamTrack>(context, component); } -ScriptValue CreateRequestFrameChunk(ScriptState* script_state) { - MediaStreamTrackSignal* signal = MediaStreamTrackSignal::Create(); - signal->setSignalType("request-frame"); - return ScriptValue( - script_state->GetIsolate(), - ToV8Traits<MediaStreamTrackSignal>::ToV8(script_state, signal)); -} - -ScriptValue CreateSetMinFrameRateChunk(ScriptState* script_state, - double frame_rate) { - MediaStreamTrackSignal* signal = MediaStreamTrackSignal::Create(); - signal->setSignalType("set-min-frame-rate"); - signal->setFrameRate(frame_rate); - return ScriptValue( - script_state->GetIsolate(), - ToV8Traits<MediaStreamTrackSignal>::ToV8(script_state, signal)); -} - -ScriptValue CreateInvalidSignalChunk(ScriptState* script_state) { - MediaStreamTrackSignal* signal = MediaStreamTrackSignal::Create(); - signal->setSignalType("set-min-frame-rate"); - return ScriptValue( - script_state->GetIsolate(), - ToV8Traits<MediaStreamTrackSignal>::ToV8(script_state, signal)); -} - } // namespace class MediaStreamTrackProcessorTest : public testing::Test { @@ -225,84 +198,6 @@ histogram_tester.ExpectTotalCount("Media.BreakoutBox.Usage", 1); } -TEST_F(MediaStreamTrackProcessorTest, VideoControlSignalsAreForwarded) { - base::HistogramTester histogram_tester; - V8TestingScope v8_scope; - ScriptState* script_state = v8_scope.GetScriptState(); - ExceptionState& exception_state = v8_scope.GetExceptionState(); - MockMediaStreamVideoSource* mock_video_source = CreateMockVideoSource(); - MediaStreamTrackProcessor* track_processor = - MediaStreamTrackProcessor::Create( - script_state, - CreateVideoMediaStreamTrack(v8_scope.GetExecutionContext(), - mock_video_source), - exception_state); - EXPECT_FALSE(exception_state.HadException()); - EXPECT_EQ( - track_processor->InputTrack()->Component()->Source()->GetPlatformSource(), - mock_video_source); - mock_video_source->StartMockedSource(); - - EXPECT_CALL(*mock_video_source, OnRequestRefreshFrame()); - auto* writer = track_processor->writableControl(script_state) - ->getWriter(script_state, exception_state); - ScriptPromiseTester request_frame_tester( - script_state, - writer->write(script_state, CreateRequestFrameChunk(script_state), - exception_state)); - request_frame_tester.WaitUntilSettled(); - EXPECT_TRUE(request_frame_tester.IsFulfilled()); - EXPECT_FALSE(exception_state.HadException()); - - MediaStreamVideoTrack* platform_track = - MediaStreamVideoTrack::From(track_processor->InputTrack()->Component()); - EXPECT_FALSE(platform_track->min_frame_rate().has_value()); - const double min_frame_rate = 15.0; - ScriptPromiseTester set_min_frame_rate_tester( - script_state, - writer->write(script_state, - CreateSetMinFrameRateChunk(script_state, min_frame_rate), - exception_state)); - set_min_frame_rate_tester.WaitUntilSettled(); - EXPECT_TRUE(set_min_frame_rate_tester.IsFulfilled()); - EXPECT_FALSE(exception_state.HadException()); - EXPECT_TRUE(platform_track->min_frame_rate().has_value()); - EXPECT_EQ(platform_track->min_frame_rate().value(), min_frame_rate); - - ScriptPromiseTester invalid_signal_tester( - script_state, - writer->write(script_state, CreateInvalidSignalChunk(script_state), - exception_state)); - invalid_signal_tester.WaitUntilSettled(); - EXPECT_TRUE(invalid_signal_tester.IsRejected()); - histogram_tester.ExpectUniqueSample( - "Media.BreakoutBox.Usage", BreakoutBoxUsage::kWritableControlVideo, 1); - histogram_tester.ExpectTotalCount("Media.BreakoutBox.Usage", 1); -} - -TEST_F(MediaStreamTrackProcessorTest, AudioControlSignalsAreRejected) { - V8TestingScope v8_scope; - ScriptState* script_state = v8_scope.GetScriptState(); - ExceptionState& exception_state = v8_scope.GetExceptionState(); - MediaStreamTrackProcessor* track_processor = - MediaStreamTrackProcessor::Create( - script_state, - CreateAudioMediaStreamTrack(v8_scope.GetExecutionContext(), - std::make_unique<MediaStreamAudioSource>( - Thread::MainThread()->GetTaskRunner(), - /*is_local=*/true)), - exception_state); - - auto* writer = track_processor->writableControl(script_state) - ->getWriter(script_state, exception_state); - ScriptPromiseTester tester( - script_state, - writer->write(script_state, CreateRequestFrameChunk(script_state), - exception_state)); - tester.WaitUntilSettled(); - EXPECT_TRUE(tester.IsRejected()); -} - TEST_F(MediaStreamTrackProcessorTest, CanceledReadableDisconnects) { V8TestingScope v8_scope; ScriptState* script_state = v8_scope.GetScriptState();
diff --git a/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.cc b/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.cc index 6568fad..5fd07df2 100644 --- a/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.cc +++ b/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.cc
@@ -5,7 +5,6 @@ #include "third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h" #include "third_party/blink/public/mojom/mediastream/media_stream.mojom-blink.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track_signal_observer.h" #include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h" #include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h" @@ -109,13 +108,6 @@ : MediaStreamVideoSource(std::move(main_task_runner)), broker_(AdoptRef(new Broker(this))) {} -PushableMediaStreamVideoSource::PushableMediaStreamVideoSource( - scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, - const base::WeakPtr<MediaStreamVideoSource>& upstream_source) - : MediaStreamVideoSource(std::move(main_task_runner)), - upstream_source_(upstream_source), - broker_(AdoptRef(new Broker(this))) {} - PushableMediaStreamVideoSource::~PushableMediaStreamVideoSource() { broker_->OnSourceDestroyedOrStopped(); } @@ -126,40 +118,6 @@ broker_->PushFrame(std::move(video_frame), estimated_capture_time); } -void PushableMediaStreamVideoSource::RequestRefreshFrame() { - DCHECK(GetTaskRunner()->BelongsToCurrentThread()); - if (upstream_source_) - upstream_source_->RequestRefreshFrame(); - if (signal_observer_) - signal_observer_->RequestFrame(); -} - -void PushableMediaStreamVideoSource::OnFrameDropped( - media::VideoCaptureFrameDropReason reason) { - DCHECK(GetTaskRunner()->BelongsToCurrentThread()); - if (upstream_source_) - upstream_source_->OnFrameDropped(reason); -} - -VideoCaptureFeedbackCB PushableMediaStreamVideoSource::GetFeedbackCallback() - const { - DCHECK(GetTaskRunner()->BelongsToCurrentThread()); - if (upstream_source_) { - return WTF::BindRepeating( - [](const base::WeakPtr<MediaStreamVideoSource>& source, - const media::VideoCaptureFeedback& feedback) { - if (!source) - return; - - PushableMediaStreamVideoSource* pushable_source = - static_cast<PushableMediaStreamVideoSource*>(source.get()); - pushable_source->GetInternalFeedbackCallback().Run(feedback); - }, - GetWeakPtr()); - } - return VideoCaptureFeedbackCB(); -} - void PushableMediaStreamVideoSource::StartSourceImpl( VideoCaptureDeliverFrameCB frame_callback, EncodedVideoFrameCB encoded_frame_callback) { @@ -179,19 +137,4 @@ return weak_factory_.GetWeakPtr(); } -VideoCaptureFeedbackCB -PushableMediaStreamVideoSource::GetInternalFeedbackCallback() const { - DCHECK(GetTaskRunner()->BelongsToCurrentThread()); - if (!upstream_source_) - return VideoCaptureFeedbackCB(); - - return upstream_source_->GetFeedbackCallback(); -} - -void PushableMediaStreamVideoSource::SetSignalObserver( - MediaStreamVideoTrackSignalObserver* observer) { - DCHECK(GetTaskRunner()->BelongsToCurrentThread()); - signal_observer_ = observer; -} - } // namespace blink
diff --git a/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h b/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h index 464233a55..c2e9835 100644 --- a/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h +++ b/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h
@@ -12,8 +12,6 @@ namespace blink { -class MediaStreamVideoTrackSignalObserver; - // Simplifies the creation of video tracks. Just do this: // auto source = std::make_unique<PushableMediaStreamVideoSource>(); // auto* track = CreateVideoTrackFromSource(script_state, source); @@ -70,9 +68,6 @@ explicit PushableMediaStreamVideoSource( scoped_refptr<base::SingleThreadTaskRunner>); - PushableMediaStreamVideoSource( - scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, - const base::WeakPtr<MediaStreamVideoSource>& upstream_source); ~PushableMediaStreamVideoSource() override; // See the definition of VideoCaptureDeliverFrameCB in @@ -88,20 +83,12 @@ scoped_refptr<Broker> GetBroker() const { return broker_; } // MediaStreamVideoSource - void RequestRefreshFrame() override; - void OnFrameDropped(media::VideoCaptureFrameDropReason reason) override; - VideoCaptureFeedbackCB GetFeedbackCallback() const override; void StartSourceImpl(VideoCaptureDeliverFrameCB frame_callback, EncodedVideoFrameCB encoded_frame_callback) override; void StopSourceImpl() override; base::WeakPtr<MediaStreamVideoSource> GetWeakPtr() const override; - VideoCaptureFeedbackCB GetInternalFeedbackCallback() const; - void SetSignalObserver(MediaStreamVideoTrackSignalObserver*); - private: - base::WeakPtr<MediaStreamVideoSource> upstream_source_; - WeakPersistent<MediaStreamVideoTrackSignalObserver> signal_observer_; scoped_refptr<Broker> broker_; base::WeakPtrFactory<MediaStreamVideoSource> weak_factory_{this}; };
diff --git a/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source_test.cc b/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source_test.cc index 5b336b2..e008e9735 100644 --- a/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source_test.cc +++ b/third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source_test.cc
@@ -77,13 +77,6 @@ /*enabled=*/true); } -MediaStreamSource* CreateAndStartMediaStreamSource( - MediaStreamVideoSource* video_source) { - MediaStreamSource* source = CreateConnectedMediaStreamSource(video_source); - StartVideoSource(video_source); - return source; -} - } // namespace class PushableMediaStreamVideoSourceTest : public testing::Test { @@ -152,27 +145,4 @@ EXPECT_EQ(natural_size.height(), 50); } -TEST_F(PushableMediaStreamVideoSourceTest, ForwardToUpstream) { - MockMediaStreamVideoSource* mock_source = new MockMediaStreamVideoSource(); - PushableMediaStreamVideoSource* pushable_video_source = - new PushableMediaStreamVideoSource( - scheduler::GetSingleThreadTaskRunnerForTesting(), - mock_source->GetWeakPtr()); - CreateAndStartMediaStreamSource(mock_source); - CreateAndStartMediaStreamSource(pushable_video_source); - - EXPECT_CALL(*mock_source, OnRequestRefreshFrame()); - pushable_video_source->RequestRefreshFrame(); - - EXPECT_CALL(*mock_source, - OnFrameDropped(media::VideoCaptureFrameDropReason:: - kResolutionAdapterFrameIsNotValid)); - pushable_video_source->OnFrameDropped( - media::VideoCaptureFrameDropReason::kResolutionAdapterFrameIsNotValid); - - EXPECT_CALL(*mock_source, OnFrameFeedback(media::VideoCaptureFeedback())); - pushable_video_source->GetFeedbackCallback().Run( - media::VideoCaptureFeedback()); -} - } // namespace blink
diff --git a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink.cc b/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink.cc deleted file mode 100644 index c645f04..0000000 --- a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink.cc +++ /dev/null
@@ -1,109 +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. - -#include "third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink.h" - -#include "third_party/blink/public/web/modules/mediastream/media_stream_video_source.h" -#include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_signal.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_signal_type.h" -#include "third_party/blink/renderer/modules/breakout_box/metrics.h" -#include "third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_track.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track.h" -#include "third_party/blink/renderer/platform/bindings/exception_state.h" -#include "third_party/blink/renderer/platform/mediastream/media_stream_component.h" - -namespace blink { - -VideoTrackSignalUnderlyingSink::VideoTrackSignalUnderlyingSink( - MediaStreamTrack* track) { - if (!MediaStreamVideoTrack::From(track->Component())) - return; - track_ = track; - MediaStreamVideoSource* video_source = - MediaStreamVideoSource::GetVideoSource(track->Component()->Source()); - if (video_source) - source_ = video_source->GetWeakPtr(); - - RecordBreakoutBoxUsage(BreakoutBoxUsage::kWritableControlVideo); -} - -ScriptPromise VideoTrackSignalUnderlyingSink::start( - ScriptState* script_state, - WritableStreamDefaultController* controller, - ExceptionState& exception_state) { - return ScriptPromise::CastUndefined(script_state); -} - -ScriptPromise VideoTrackSignalUnderlyingSink::write( - ScriptState* script_state, - ScriptValue chunk, - WritableStreamDefaultController* controller, - ExceptionState& exception_state) { - MediaStreamTrackSignal* signal = - NativeValueTraits<MediaStreamTrackSignal>::NativeValue( - script_state->GetIsolate(), chunk.V8Value(), exception_state); - if (!signal) { - exception_state.ThrowTypeError("Null signal."); - return ScriptPromise(); - } - - if (!track_ || track_->Ended()) { - exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, - "No live track"); - return ScriptPromise(); - } - - if (signal->signalType() == "request-frame") { - if (!source_ || !source_->IsRunning()) { - exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, - "No active source"); - return ScriptPromise(); - } - source_->RequestRefreshFrame(); - return ScriptPromise::CastUndefined(script_state); - } else if (signal->signalType() == "set-min-frame-rate") { - if (!signal->hasFrameRate()) { - exception_state.ThrowTypeError( - "A non-negative frameRate is required for set-min-frame-rate."); - return ScriptPromise(); - } - if (auto* video_track = MediaStreamVideoTrack::From(track_->Component())) { - video_track->SetMinimumFrameRate(signal->frameRate()); - return ScriptPromise::CastUndefined(script_state); - } else { - exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, - "No active track"); - return ScriptPromise(); - } - } - - exception_state.ThrowTypeError("Invalid signal."); - return ScriptPromise(); -} - -ScriptPromise VideoTrackSignalUnderlyingSink::abort( - ScriptState* script_state, - ScriptValue reason, - ExceptionState& exception_state) { - track_.Clear(); - source_.reset(); - return ScriptPromise::CastUndefined(script_state); -} - -ScriptPromise VideoTrackSignalUnderlyingSink::close( - ScriptState* script_state, - ExceptionState& exception_state) { - track_.Clear(); - source_.reset(); - return ScriptPromise::CastUndefined(script_state); -} - -void VideoTrackSignalUnderlyingSink::Trace(Visitor* visitor) const { - visitor->Trace(track_); - UnderlyingSinkBase::Trace(visitor); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink.h b/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink.h deleted file mode 100644 index 0dcc6ba..0000000 --- a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink.h +++ /dev/null
@@ -1,44 +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. - -#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_BREAKOUT_BOX_VIDEO_TRACK_SIGNAL_UNDERLYING_SINK_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_BREAKOUT_BOX_VIDEO_TRACK_SIGNAL_UNDERLYING_SINK_H_ - -#include "third_party/blink/renderer/core/streams/underlying_sink_base.h" -#include "third_party/blink/renderer/modules/modules_export.h" - -namespace blink { - -class MediaStreamTrack; -class MediaStreamVideoSource; - -class MODULES_EXPORT VideoTrackSignalUnderlyingSink - : public UnderlyingSinkBase { - public: - // |source| must outlive this MediaStreamVideoTrackUnderlyingSink. - explicit VideoTrackSignalUnderlyingSink(MediaStreamTrack* track); - - // UnderlyingSinkBase overrides. - ScriptPromise start(ScriptState* script_state, - WritableStreamDefaultController* controller, - ExceptionState& exception_state) override; - ScriptPromise write(ScriptState* script_state, - ScriptValue chunk, - WritableStreamDefaultController* controller, - ExceptionState& exception_state) override; - ScriptPromise abort(ScriptState* script_state, - ScriptValue reason, - ExceptionState& exception_state) override; - ScriptPromise close(ScriptState* script_state, - ExceptionState& exception_state) override; - void Trace(Visitor* visitor) const override; - - private: - WeakMember<MediaStreamTrack> track_; - base::WeakPtr<MediaStreamVideoSource> source_; -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_BREAKOUT_BOX_VIDEO_TRACK_SIGNAL_UNDERLYING_SINK_H_
diff --git a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink_test.cc b/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink_test.cc deleted file mode 100644 index ddecfa6..0000000 --- a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink_test.cc +++ /dev/null
@@ -1,244 +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. - -#include "third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_sink.h" - -#include "testing/gtest/include/gtest/gtest.h" -#include "third_party/blink/public/web/web_heap.h" -#include "third_party/blink/renderer/bindings/core/v8/script_promise_tester.h" -#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h" -#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_signal.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_signal_type.h" -#include "third_party/blink/renderer/core/streams/writable_stream.h" -#include "third_party/blink/renderer/core/streams/writable_stream_default_writer.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_track.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track.h" -#include "third_party/blink/renderer/modules/mediastream/mock_media_stream_video_source.h" -#include "third_party/blink/renderer/platform/mediastream/media_stream_component.h" -#include "third_party/blink/renderer/platform/mediastream/media_stream_source.h" -#include "third_party/blink/renderer/platform/testing/io_task_runner_testing_platform_support.h" - -using testing::_; - -namespace blink { - -class VideoTrackSignalUnderlyingSinkTest : public testing::Test { - public: - VideoTrackSignalUnderlyingSinkTest() { - mock_video_source_ = new MockMediaStreamVideoSource(); - media_stream_source_ = MakeGarbageCollected<MediaStreamSource>( - "dummy_source_id", MediaStreamSource::kTypeVideo, "dummy_source_name", - /*remote=*/false); - media_stream_source_->SetPlatformSource( - base::WrapUnique(mock_video_source_)); - web_track_ = MediaStreamVideoTrack::CreateVideoTrack( - mock_video_source_, MediaStreamVideoSource::ConstraintsOnceCallback(), - true); - mock_video_source_->StartMockedSource(); - } - - ~VideoTrackSignalUnderlyingSinkTest() override { - platform_->RunUntilIdle(); - mock_video_source_->StopSource(); - base::RunLoop run_loop; - platform_->GetIOTaskRunner()->PostTask(FROM_HERE, run_loop.QuitClosure()); - run_loop.Run(); - WebHeap::CollectAllGarbageForTesting(); - } - - MediaStreamTrack* CreateTrack(ExecutionContext* context) const { - return MakeGarbageCollected<MediaStreamTrack>(context, web_track_); - } - VideoTrackSignalUnderlyingSink* CreateUnderlyingSink( - MediaStreamTrack* track) { - return MakeGarbageCollected<VideoTrackSignalUnderlyingSink>(track); - } - - ScriptValue CreateSignalChunk( - ScriptState* script_state, - const V8MediaStreamTrackSignalType& signal_type) { - MediaStreamTrackSignal* signal = MediaStreamTrackSignal::Create(); - signal->setSignalType(signal_type); - return ScriptValue( - script_state->GetIsolate(), - ToV8Traits<MediaStreamTrackSignal>::ToV8(script_state, signal)); - } - - ScriptValue CreateRequestFrameChunk(ScriptState* script_state) { - return CreateSignalChunk( - script_state, V8MediaStreamTrackSignalType( - V8MediaStreamTrackSignalType::Enum::kRequestFrame)); - } - - ScriptValue CreateSetMinFrameRateChunk( - ScriptState* script_state, - const absl::optional<double>& frame_rate = 10.0) { - MediaStreamTrackSignal* signal = MediaStreamTrackSignal::Create(); - signal->setSignalType("set-min-frame-rate"); - if (frame_rate) - signal->setFrameRate(*frame_rate); - return ScriptValue( - script_state->GetIsolate(), - ToV8Traits<MediaStreamTrackSignal>::ToV8(script_state, signal)); - } - - protected: - Persistent<MediaStreamSource> media_stream_source_; - WebMediaStreamTrack web_track_; - MockMediaStreamVideoSource* mock_video_source_; - ScopedTestingPlatformSupport<IOTaskRunnerTestingPlatformSupport> platform_; -}; - -TEST_F(VideoTrackSignalUnderlyingSinkTest, - WriteRequestFrameToStreamForwardsToVideoSource) { - V8TestingScope v8_scope; - ScriptState* script_state = v8_scope.GetScriptState(); - auto* track = CreateTrack(v8_scope.GetExecutionContext()); - auto* underlying_sink = CreateUnderlyingSink(track); - auto* writable_stream = WritableStream::CreateWithCountQueueingStrategy( - script_state, underlying_sink, 1u); - - NonThrowableExceptionState exception_state; - auto* writer = writable_stream->getWriter(script_state, exception_state); - - auto request_frame_chunk = CreateRequestFrameChunk(script_state); - EXPECT_CALL(*mock_video_source_, OnRequestRefreshFrame()); - ScriptPromiseTester write_tester( - script_state, - writer->write(script_state, request_frame_chunk, exception_state)); - write_tester.WaitUntilSettled(); - - const double frame_rate = 14.8; - auto set_min_frame_rate_chunk = - CreateSetMinFrameRateChunk(script_state, frame_rate); - MediaStreamVideoTrack* video_track = - MediaStreamVideoTrack::From(track->Component()); - EXPECT_FALSE(video_track->min_frame_rate().has_value()); - ScriptPromiseTester write_tester2( - script_state, - writer->write(script_state, set_min_frame_rate_chunk, exception_state)); - write_tester2.WaitUntilSettled(); - EXPECT_TRUE(video_track->min_frame_rate().has_value()); - EXPECT_EQ(video_track->min_frame_rate().value(), frame_rate); - - writer->releaseLock(script_state); - ScriptPromiseTester close_tester( - script_state, writable_stream->close(script_state, exception_state)); - close_tester.WaitUntilSettled(); - - MediaStreamTrack* clone = track->clone(script_state); - track->stopTrack(v8_scope.GetExecutionContext()); - - // Writing to the sink after the track closes should fail, even if the source - // is active. - EXPECT_TRUE(mock_video_source_->IsRunning()); - DummyExceptionStateForTesting dummy_exception_state; - underlying_sink->write(script_state, CreateRequestFrameChunk(script_state), - nullptr, dummy_exception_state); - EXPECT_TRUE(dummy_exception_state.HadException()); - EXPECT_EQ(dummy_exception_state.Code(), - static_cast<ExceptionCode>(DOMExceptionCode::kInvalidStateError)); - - clone->stopTrack(v8_scope.GetExecutionContext()); - EXPECT_FALSE(mock_video_source_->IsRunning()); - // Writing to the sink after the source closes should fail. - dummy_exception_state.ClearException(); - underlying_sink->write(script_state, CreateRequestFrameChunk(script_state), - nullptr, dummy_exception_state); - EXPECT_TRUE(dummy_exception_state.HadException()); - EXPECT_EQ(dummy_exception_state.Code(), - static_cast<ExceptionCode>(DOMExceptionCode::kInvalidStateError)); -} - -TEST_F(VideoTrackSignalUnderlyingSinkTest, WriteInvalidDataFails) { - V8TestingScope v8_scope; - ScriptState* script_state = v8_scope.GetScriptState(); - auto* track = CreateTrack(v8_scope.GetExecutionContext()); - auto* underlying_sink = CreateUnderlyingSink(track); - - MediaStreamVideoTrack* video_track = - MediaStreamVideoTrack::From(track->Component()); - EXPECT_FALSE(video_track->min_frame_rate().has_value()); - - DummyExceptionStateForTesting exception_state; - auto set_min_frame_rate_chunk = - CreateSetMinFrameRateChunk(script_state, absl::nullopt); - underlying_sink->write(script_state, set_min_frame_rate_chunk, nullptr, - exception_state); - EXPECT_TRUE(exception_state.HadException()); - EXPECT_FALSE(video_track->min_frame_rate().has_value()); - - exception_state.ClearException(); - EXPECT_FALSE(exception_state.HadException()); - - // Writing null fails - exception_state.ClearException(); - EXPECT_FALSE(exception_state.HadException()); - underlying_sink->write(script_state, - ScriptValue::CreateNull(v8_scope.GetIsolate()), - nullptr, exception_state); - EXPECT_TRUE(exception_state.HadException()); - - // Writing an intenger fails - exception_state.ClearException(); - EXPECT_FALSE(exception_state.HadException()); - underlying_sink->write(script_state, ScriptValue::From(script_state, 5), - nullptr, exception_state); - EXPECT_TRUE(exception_state.HadException()); - - track->stopTrack(v8_scope.GetExecutionContext()); -} - -TEST_F(VideoTrackSignalUnderlyingSinkTest, WriteToClosedSinkFails) { - V8TestingScope v8_scope; - ScriptState* script_state = v8_scope.GetScriptState(); - auto* track = CreateTrack(v8_scope.GetExecutionContext()); - auto* underlying_sink = CreateUnderlyingSink(track); - - auto* writable_stream = WritableStream::CreateWithCountQueueingStrategy( - script_state, underlying_sink, 1u); - - NonThrowableExceptionState exception_state; - ScriptPromiseTester abort_tester( - script_state, writable_stream->close(script_state, exception_state)); - abort_tester.WaitUntilSettled(); - - // Writing to the sink after the stream closes should fail. - DummyExceptionStateForTesting dummy_exception_state; - underlying_sink->write(script_state, CreateRequestFrameChunk(script_state), - nullptr, dummy_exception_state); - EXPECT_TRUE(dummy_exception_state.HadException()); - EXPECT_EQ(dummy_exception_state.Code(), - static_cast<ExceptionCode>(DOMExceptionCode::kInvalidStateError)); - - track->stopTrack(v8_scope.GetExecutionContext()); -} - -TEST_F(VideoTrackSignalUnderlyingSinkTest, WriteToAbortedSinkFails) { - V8TestingScope v8_scope; - ScriptState* script_state = v8_scope.GetScriptState(); - auto* track = CreateTrack(v8_scope.GetExecutionContext()); - auto* underlying_sink = CreateUnderlyingSink(track); - - auto* writable_stream = WritableStream::CreateWithCountQueueingStrategy( - script_state, underlying_sink, 1u); - - NonThrowableExceptionState exception_state; - ScriptPromiseTester abort_tester( - script_state, writable_stream->abort(script_state, exception_state)); - abort_tester.WaitUntilSettled(); - - // Writing to the sink after the stream aborts should fail. - DummyExceptionStateForTesting dummy_exception_state; - underlying_sink->write(script_state, CreateRequestFrameChunk(script_state), - nullptr, dummy_exception_state); - EXPECT_TRUE(dummy_exception_state.HadException()); - EXPECT_EQ(dummy_exception_state.Code(), - static_cast<ExceptionCode>(DOMExceptionCode::kInvalidStateError)); - - track->stopTrack(v8_scope.GetExecutionContext()); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source.cc b/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source.cc deleted file mode 100644 index eb7ed26..0000000 --- a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source.cc +++ /dev/null
@@ -1,164 +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. - -#include "third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source.h" - -#include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_signal.h" -#include "third_party/blink/renderer/core/dom/dom_exception.h" -#include "third_party/blink/renderer/core/execution_context/execution_context.h" -#include "third_party/blink/renderer/core/streams/readable_stream_default_controller_with_script_scope.h" -#include "third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.h" -#include "third_party/blink/renderer/modules/breakout_box/metrics.h" -#include "third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_track.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track.h" -#include "third_party/blink/renderer/modules/webcodecs/video_frame.h" -#include "third_party/blink/renderer/platform/bindings/exception_code.h" -#include "third_party/blink/renderer/platform/bindings/exception_state.h" -#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h" -#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h" -#include "third_party/webrtc/api/frame_transformer_interface.h" - -namespace blink { - -VideoTrackSignalUnderlyingSource::VideoTrackSignalUnderlyingSource( - ScriptState* script_state, - MediaStreamTrackGenerator* generator, - wtf_size_t max_queue_size) - : UnderlyingSourceBase(script_state), - main_task_runner_(ExecutionContext::From(script_state) - ->GetTaskRunner(TaskType::kInternalMediaRealTime)), - generator_(generator), - max_queue_size_(std::max(1u, max_queue_size)) { - DCHECK(generator_); - RecordBreakoutBoxUsage(BreakoutBoxUsage::kReadableControlVideo); -} - -ScriptPromise VideoTrackSignalUnderlyingSource::pull( - ScriptState* script_state) { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - if (!queue_.empty()) { - PullFromQueue(); - } else { - is_pending_pull_ = true; - } - - DCHECK_LT(queue_.size(), max_queue_size_); - return ScriptPromise::CastUndefined(script_state); -} - -ScriptPromise VideoTrackSignalUnderlyingSource::Start( - ScriptState* script_state) { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - auto* video_track = MediaStreamVideoTrack::From(generator_->Component()); - if (!video_track) { - return ScriptPromise::RejectWithDOMException( - script_state, - DOMException::Create( - "No input track", - DOMException::GetErrorName(DOMExceptionCode::kInvalidStateError))); - } - video_track->SetSignalObserver(this); - - auto* video_source = generator_->PushableVideoSource(); - video_source->SetSignalObserver(this); - return ScriptPromise::CastUndefined(script_state); -} - -ScriptPromise VideoTrackSignalUnderlyingSource::Cancel( - ScriptState* script_state, - ScriptValue reason) { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - Stop(); - return ScriptPromise::CastUndefined(script_state); -} - -void VideoTrackSignalUnderlyingSource::Trace(Visitor* visitor) const { - visitor->Trace(generator_); - visitor->Trace(queue_); - UnderlyingSourceBase::Trace(visitor); -} - -double VideoTrackSignalUnderlyingSource::DesiredSizeForTesting() const { - return Controller()->DesiredSize(); -} - -void VideoTrackSignalUnderlyingSource::ContextDestroyed() { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - UnderlyingSourceBase::ContextDestroyed(); - Stop(); -} - -void VideoTrackSignalUnderlyingSource::Close() { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - Stop(); - if (Controller()) - Controller()->Close(); -} - -void VideoTrackSignalUnderlyingSource::SetMinimumFrameRate(double frame_rate) { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - MediaStreamTrackSignal* signal = MediaStreamTrackSignal::Create(); - signal->setSignalType("set-min-frame-rate"); - signal->setFrameRate(frame_rate); - ProcessNewSignal(signal); -} - -void VideoTrackSignalUnderlyingSource::RequestFrame() { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - MediaStreamTrackSignal* signal = MediaStreamTrackSignal::Create(); - signal->setSignalType("request-frame"); - ProcessNewSignal(signal); -} - -void VideoTrackSignalUnderlyingSource::ProcessNewSignal( - MediaStreamTrackSignal* signal) { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - DCHECK_LE(queue_.size(), max_queue_size_); - if (!is_active_) - return; - - // If the |queue_| is empty and the consumer has signaled a pull, bypass - // |queue_| and send the frame directly to the stream controller. - if (queue_.empty() && is_pending_pull_) { - SendSignalToStream(signal); - return; - } - - if (queue_.size() == max_queue_size_) - queue_.pop_front(); - - queue_.push_back(signal); - if (is_pending_pull_) { - PullFromQueue(); - } -} - -void VideoTrackSignalUnderlyingSource::PullFromQueue() { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - DCHECK(!queue_.empty()); - DCHECK(is_active_); - SendSignalToStream(std::move(queue_.front())); - queue_.pop_front(); -} - -void VideoTrackSignalUnderlyingSource::SendSignalToStream( - MediaStreamTrackSignal* signal) { - DCHECK(main_task_runner_->BelongsToCurrentThread()); - DCHECK(signal); - DCHECK(is_active_); - if (!Controller()) - return; - - Controller()->Enqueue(signal); - is_pending_pull_ = false; -} - -void VideoTrackSignalUnderlyingSource::Stop() { - is_active_ = false; - queue_.clear(); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source.h b/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source.h deleted file mode 100644 index 56423bd0..0000000 --- a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source.h +++ /dev/null
@@ -1,80 +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. - -#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_BREAKOUT_BOX_VIDEO_TRACK_SIGNAL_UNDERLYING_SOURCE_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_BREAKOUT_BOX_VIDEO_TRACK_SIGNAL_UNDERLYING_SOURCE_H_ - -#include "base/threading/thread_checker.h" -#include "third_party/blink/renderer/core/streams/underlying_source_base.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track_signal_observer.h" -#include "third_party/blink/renderer/modules/modules_export.h" -#include "third_party/blink/renderer/platform/wtf/deque.h" - -namespace blink { - -class MediaStreamTrackSignal; -class MediaStreamTrackGenerator; - -// This class serves as the source for the control signals sent to -// a MediaStreamTrackGenerator and exposed on its readableControl field. -// This class maintains an internal circular queue to store unconsumed -// signals. If the queue becomes full and new signals are produced, -// older signals are dropped to accommodate the new signals. -class MODULES_EXPORT VideoTrackSignalUnderlyingSource - : public UnderlyingSourceBase, - public MediaStreamVideoTrackSignalObserver { - public: - explicit VideoTrackSignalUnderlyingSource(ScriptState*, - MediaStreamTrackGenerator*, - wtf_size_t queue_size); - VideoTrackSignalUnderlyingSource(const VideoTrackSignalUnderlyingSource&) = - delete; - VideoTrackSignalUnderlyingSource& operator=( - const VideoTrackSignalUnderlyingSource&) = delete; - - // UnderlyingSourceBase - ScriptPromise pull(ScriptState*) override; - ScriptPromise Start(ScriptState*) override; - ScriptPromise Cancel(ScriptState*, ScriptValue reason) override; - - // ExecutionLifecycleObserver - void ContextDestroyed() override; - - MediaStreamTrackGenerator* Generator() const { return generator_.Get(); } - wtf_size_t MaxQueueSize() const { return max_queue_size_; } - - bool IsPendingPullForTesting() const { return is_pending_pull_; } - const HeapDeque<Member<MediaStreamTrackSignal>>& QueueForTesting() const { - return queue_; - } - double DesiredSizeForTesting() const; - - void Close(); - void Trace(Visitor*) const override; - - private: - // MediaStreamVideoTrackSignalObserver - void SetMinimumFrameRate(double) override; - void RequestFrame() override; - - void ProcessNewSignal(MediaStreamTrackSignal*); - void SendSignalToStream(MediaStreamTrackSignal*); - void PullFromQueue(); - void Stop(); - - const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; - Member<MediaStreamTrackGenerator> generator_; - - // An internal deque prior to the stream controller's queue. It acts as a ring - // buffer and allows dropping old signals instead of new ones in case signals - // accumulate due to slow consumption. - HeapDeque<Member<MediaStreamTrackSignal>> queue_; - const wtf_size_t max_queue_size_; - bool is_pending_pull_ = false; - bool is_active_ = true; -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_BREAKOUT_BOX_VIDEO_TRACK_SIGNAL_UNDERLYING_SOURCE_H_
diff --git a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source_test.cc b/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source_test.cc deleted file mode 100644 index 40158fb..0000000 --- a/third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source_test.cc +++ /dev/null
@@ -1,191 +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. - -#include "third_party/blink/renderer/modules/breakout_box/video_track_signal_underlying_source.h" - -#include "base/run_loop.h" -#include "base/test/gmock_callback_support.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "third_party/blink/public/platform/modules/mediastream/web_media_stream_track.h" -#include "third_party/blink/public/web/web_heap.h" -#include "third_party/blink/renderer/bindings/core/v8/script_promise_tester.h" -#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h" -#include "third_party/blink/renderer/bindings/core/v8/v8_iterator_result_value.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_signal.h" -#include "third_party/blink/renderer/core/execution_context/execution_context.h" -#include "third_party/blink/renderer/core/streams/readable_stream.h" -#include "third_party/blink/renderer/core/streams/readable_stream_default_controller_with_script_scope.h" -#include "third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.h" -#include "third_party/blink/renderer/modules/breakout_box/pushable_media_stream_video_source.h" -#include "third_party/blink/renderer/modules/breakout_box/stream_test_utils.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_track.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track.h" -#include "third_party/blink/renderer/modules/mediastream/mock_media_stream_video_sink.h" -#include "third_party/blink/renderer/platform/bindings/exception_state.h" -#include "third_party/blink/renderer/platform/testing/io_task_runner_testing_platform_support.h" -#include "third_party/blink/renderer/platform/testing/testing_platform_support.h" - -using testing::_; - -namespace blink { - -class VideoTrackSignalUnderlyingSourceTest : public testing::Test { - public: - ~VideoTrackSignalUnderlyingSourceTest() override { - platform_->RunUntilIdle(); - WebHeap::CollectAllGarbageForTesting(); - } - - MediaStreamTrackGenerator* CreateGenerator(ScriptState* script_state) { - return MakeGarbageCollected<MediaStreamTrackGenerator>( - script_state, MediaStreamSource::kTypeVideo, "test-generator", - /*signal_target=*/nullptr, /*max_signal_buffer_size=*/10u); - } - - VideoTrackSignalUnderlyingSource* CreateSource( - ScriptState* script_state, - MediaStreamTrackGenerator* generator, - wtf_size_t max_buffer_size) { - return MakeGarbageCollected<VideoTrackSignalUnderlyingSource>( - script_state, generator, max_buffer_size); - } - - VideoTrackSignalUnderlyingSource* CreateSource( - ScriptState* script_state, - MediaStreamTrackGenerator* generator) { - return CreateSource(script_state, generator, 1u); - } - - protected: - ScopedTestingPlatformSupport<IOTaskRunnerTestingPlatformSupport> platform_; -}; - -TEST_F(VideoTrackSignalUnderlyingSourceTest, SignalsAreExposed) { - V8TestingScope v8_scope; - auto* script_state = v8_scope.GetScriptState(); - auto* generator = CreateGenerator(script_state); - auto* video_track = MediaStreamVideoTrack::From(generator->Component()); - auto* video_source = generator->PushableVideoSource(); - auto* source = CreateSource(script_state, generator); - auto* stream = - ReadableStream::CreateWithCountQueueingStrategy(script_state, source, 0); - auto* reader = - stream->GetDefaultReaderForTesting(script_state, ASSERT_NO_EXCEPTION); - - video_source->RequestRefreshFrame(); - auto* signal = ReadObjectFromStream<MediaStreamTrackSignal>(v8_scope, reader); - EXPECT_EQ(signal->signalType(), "request-frame"); - - const double min_frame_rate = 3.5; - video_track->SetMinimumFrameRate(min_frame_rate); - signal = ReadObjectFromStream<MediaStreamTrackSignal>(v8_scope, reader); - EXPECT_EQ(signal->signalType(), "set-min-frame-rate"); - EXPECT_TRUE(signal->hasFrameRate()); - EXPECT_EQ(signal->frameRate(), min_frame_rate); - - source->Close(); -} - -TEST_F(VideoTrackSignalUnderlyingSourceTest, CancelStreamDisconnectsFromTrack) { - V8TestingScope v8_scope; - auto* script_state = v8_scope.GetScriptState(); - auto* generator = CreateGenerator(script_state); - auto* source = CreateSource(script_state, generator); - ReadableStream::CreateWithCountQueueingStrategy(script_state, source, 0); - auto& queue = source->QueueForTesting(); - - generator->PushableVideoSource()->RequestRefreshFrame(); - EXPECT_EQ(queue.size(), 1u); - - source->Cancel(script_state, ScriptValue()); - EXPECT_EQ(queue.size(), 0u); - - generator->PushableVideoSource()->RequestRefreshFrame(); - EXPECT_EQ(queue.size(), 0u); - - source->Close(); -} - -TEST_F(VideoTrackSignalUnderlyingSourceTest, DropOldSignalsWhenQueueIsFull) { - V8TestingScope v8_scope; - auto* script_state = v8_scope.GetScriptState(); - auto* generator = CreateGenerator(script_state); - auto* video_track = MediaStreamVideoTrack::From(generator->Component()); - const wtf_size_t buffer_size = 3; - auto* source = CreateSource(script_state, generator, buffer_size); - EXPECT_EQ(source->MaxQueueSize(), buffer_size); - ReadableStream::CreateWithCountQueueingStrategy(script_state, source, 0); - - const auto& queue = source->QueueForTesting(); - for (wtf_size_t i = 0; i < buffer_size; ++i) { - EXPECT_EQ(queue.size(), i); - video_track->SetMinimumFrameRate(i); - EXPECT_EQ(queue.back()->frameRate(), i); - EXPECT_EQ(queue.front()->frameRate(), 0.0); - } - - // Push another signal while the queue is full. - EXPECT_EQ(queue.size(), buffer_size); - video_track->SetMinimumFrameRate(buffer_size); - - // Since the queue was full, the oldest signal from the queue should have been - // dropped. - EXPECT_EQ(queue.size(), buffer_size); - EXPECT_EQ(queue.back()->frameRate(), buffer_size); - EXPECT_EQ(queue.front()->frameRate(), 1.0); - - // Pulling with signals in the queue should move the oldest signal in the - // queue to the stream's controller. - EXPECT_EQ(source->DesiredSizeForTesting(), 0); - EXPECT_FALSE(source->IsPendingPullForTesting()); - source->pull(script_state); - EXPECT_EQ(source->DesiredSizeForTesting(), -1); - EXPECT_FALSE(source->IsPendingPullForTesting()); - EXPECT_EQ(queue.size(), buffer_size - 1); - EXPECT_EQ(queue.front()->frameRate(), 2); - - source->Close(); - EXPECT_EQ(queue.size(), 0u); -} - -TEST_F(VideoTrackSignalUnderlyingSourceTest, - BypassQueueAfterPullWithEmptyBuffer) { - V8TestingScope v8_scope; - auto* script_state = v8_scope.GetScriptState(); - auto* generator = CreateGenerator(script_state); - auto* source = CreateSource(script_state, generator); - ReadableStream::CreateWithCountQueueingStrategy(script_state, source, 0); - - // At first, the queue is empty and the desired size is empty as well. - EXPECT_TRUE(source->QueueForTesting().empty()); - EXPECT_EQ(source->DesiredSizeForTesting(), 0); - EXPECT_FALSE(source->IsPendingPullForTesting()); - - source->pull(script_state); - EXPECT_TRUE(source->QueueForTesting().empty()); - EXPECT_EQ(source->DesiredSizeForTesting(), 0); - EXPECT_TRUE(source->IsPendingPullForTesting()); - - generator->PushableVideoSource()->RequestRefreshFrame(); - // Since a pull was pending, the signal is put directly in the stream - // controller, bypassing the source queue. - EXPECT_TRUE(source->QueueForTesting().empty()); - EXPECT_EQ(source->DesiredSizeForTesting(), -1); - EXPECT_FALSE(source->IsPendingPullForTesting()); - - source->Close(); -} - -TEST_F(VideoTrackSignalUnderlyingSourceTest, QueueSizeCannotBeZero) { - V8TestingScope v8_scope; - auto* script_state = v8_scope.GetScriptState(); - auto* generator = CreateGenerator(script_state); - auto* source = CreateSource(script_state, generator, /*max_buffer_size=*/0u); - - // Queue size is always at least 1, even if 0 is requested. - EXPECT_EQ(source->MaxQueueSize(), 1u); - source->Close(); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/file_system_access/file_system_access_regular_file_delegate.cc b/third_party/blink/renderer/modules/file_system_access/file_system_access_regular_file_delegate.cc index 5e6d57d..378b82e 100644 --- a/third_party/blink/renderer/modules/file_system_access/file_system_access_regular_file_delegate.cc +++ b/third_party/blink/renderer/modules/file_system_access/file_system_access_regular_file_delegate.cc
@@ -64,8 +64,7 @@ } void FileSystemAccessRegularFileDelegate::Close() { - // TODO(crbug.com/1218431): Implement this method. - NOTIMPLEMENTED(); + backing_file_.Close(); } } // namespace blink
diff --git a/third_party/blink/renderer/modules/file_system_access/file_system_sync_access_handle.cc b/third_party/blink/renderer/modules/file_system_access/file_system_sync_access_handle.cc index 543695e..25762747 100644 --- a/third_party/blink/renderer/modules/file_system_access/file_system_sync_access_handle.cc +++ b/third_party/blink/renderer/modules/file_system_access/file_system_sync_access_handle.cc
@@ -27,34 +27,92 @@ DCHECK(access_handle_remote_.is_bound()); } -ScriptPromise FileSystemSyncAccessHandle::close(ScriptState* script_state) { - auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state); - auto promise = resolver->Promise(); - - // TODO(fivedots): Add logic to close file delegate, and deal with - // closures during IO operations, as done in Storage Foundation API. - - if (!access_handle_remote_.is_bound()) { - // If the backend went away, no need to tell it that the handle was closed. - resolver->Resolve(); - return promise; - } - - access_handle_remote_->Close( - WTF::Bind([](ScriptPromiseResolver* resolver) { resolver->Resolve(); }, - WrapPersistent(resolver))); - return promise; -} - void FileSystemSyncAccessHandle::Trace(Visitor* visitor) const { ScriptWrappable::Trace(visitor); visitor->Trace(file_delegate_); visitor->Trace(access_handle_remote_); + visitor->Trace(queued_close_resolver_); +} + +ScriptPromise FileSystemSyncAccessHandle::close(ScriptState* script_state) { + auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state); + auto promise = resolver->Promise(); + + if (is_closed_ || !access_handle_remote_.is_bound()) { + // close() is idempotent. + resolver->Resolve(); + return promise; + } + + is_closed_ = true; + + DCHECK(!queued_close_resolver_) << "Close logic kicked off twice"; + queued_close_resolver_ = resolver; + + if (!io_pending_) { + // Pretend that a close() promise was queued behind an I/O operation, and + // the operation just finished. This is less logic than handling the + // non-queued case separately. + DispatchQueuedClose(); + } + + return promise; +} + +void FileSystemSyncAccessHandle::DispatchQueuedClose() { + DCHECK(!io_pending_) + << "Dispatching close() concurrently with other I/O operations is racy"; + + if (!queued_close_resolver_) + return; + + DCHECK(is_closed_) << "close() resolver queued without setting closed_"; + ScriptPromiseResolver* resolver = queued_close_resolver_; + queued_close_resolver_ = nullptr; + + worker_pool::PostTask( + FROM_HERE, {base::MayBlock()}, + CrossThreadBindOnce(&DoClose, WrapCrossThreadPersistent(this), + WrapCrossThreadPersistent(resolver), + resolver_task_runner_)); +} + +// static +void FileSystemSyncAccessHandle::DoClose( + CrossThreadPersistent<FileSystemSyncAccessHandle> access_handle, + CrossThreadPersistent<ScriptPromiseResolver> resolver, + scoped_refptr<base::SequencedTaskRunner> resolver_task_runner) { + DCHECK(access_handle->file_delegate_->IsValid()) + << "file I/O operation queued after file closed"; + access_handle->file_delegate_->Close(); + + PostCrossThreadTask( + *resolver_task_runner, FROM_HERE, + CrossThreadBindOnce(&FileSystemSyncAccessHandle::DidClose, + std::move(access_handle), std::move(resolver))); +} + +void FileSystemSyncAccessHandle::DidClose( + CrossThreadPersistent<ScriptPromiseResolver> resolver) { + ScriptState* script_state = resolver->GetScriptState(); + if (!script_state->ContextIsValid()) + return; + ScriptState::Scope scope(script_state); + + access_handle_remote_->Close( + WTF::Bind([](ScriptPromiseResolver* resolver) { resolver->Resolve(); }, + std::move(resolver))); } ScriptPromise FileSystemSyncAccessHandle::flush( ScriptState* script_state, ExceptionState& exception_state) { + if (is_closed_) { + exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, + "The file was already closed"); + return ScriptPromise(); + } + if (!EnterOperation()) { exception_state.ThrowDOMException( DOMExceptionCode::kInvalidStateError, @@ -118,7 +176,7 @@ return 0; } - if (!file_delegate()->IsValid()) { + if (!file_delegate()->IsValid() || is_closed_) { exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, "The access handle was already closed"); return 0; @@ -152,7 +210,7 @@ } uint64_t file_offset = options->at(); - if (!file_delegate()->IsValid()) { + if (!file_delegate()->IsValid() || is_closed_) { exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, "The access handle was already closed"); return 0;
diff --git a/third_party/blink/renderer/modules/file_system_access/file_system_sync_access_handle.h b/third_party/blink/renderer/modules/file_system_access/file_system_sync_access_handle.h index 9066a02c..a8a7000 100644 --- a/third_party/blink/renderer/modules/file_system_access/file_system_sync_access_handle.h +++ b/third_party/blink/renderer/modules/file_system_access/file_system_sync_access_handle.h
@@ -35,11 +35,11 @@ FileSystemSyncAccessHandle& operator=(const FileSystemSyncAccessHandle&) = delete; - ScriptPromise close(ScriptState*); - // GarbageCollected void Trace(Visitor* visitor) const override; + ScriptPromise close(ScriptState*); + ScriptPromise flush(ScriptState*, ExceptionState&); uint64_t read(MaybeShared<DOMArrayBufferView> buffer, @@ -51,6 +51,17 @@ ExceptionState&); private: + void DispatchQueuedClose(); + + // Performs the file I/O part of close(). + static void DoClose( + CrossThreadPersistent<FileSystemSyncAccessHandle> access_handle, + CrossThreadPersistent<ScriptPromiseResolver> resolver, + scoped_refptr<base::SequencedTaskRunner> file_task_runner); + + // Performs the post file-I/O part of close(), on the foreground thread. + void DidClose(CrossThreadPersistent<ScriptPromiseResolver> resolver); + // Performs the file I/O part of flush(). static void DoFlush( CrossThreadPersistent<FileSystemSyncAccessHandle> access_handle, @@ -71,6 +82,7 @@ void ExitOperation() { DCHECK(io_pending_); io_pending_ = false; + DispatchQueuedClose(); } FileSystemAccessFileDelegate* file_delegate() { DCHECK(io_pending_); @@ -124,6 +136,14 @@ // {ExitOperation()} functions. bool io_pending_ = false; + bool is_closed_ = false; + + // Non-null when a close() I/O is queued behind another I/O operation. + // + // Set when close() is called while another I/O operation is underway. Cleared + // when the queued close() operation is queued. + Member<ScriptPromiseResolver> queued_close_resolver_; + // Schedules resolving Promises with file I/O results. const scoped_refptr<base::SequencedTaskRunner> resolver_task_runner_; };
diff --git a/third_party/blink/renderer/modules/manifest/manifest_parser.cc b/third_party/blink/renderer/modules/manifest/manifest_parser.cc index 0d7115d..0885423c 100644 --- a/third_party/blink/renderer/modules/manifest/manifest_parser.cc +++ b/third_party/blink/renderer/modules/manifest/manifest_parser.cc
@@ -340,23 +340,27 @@ return String(); } - absl::optional<String> id = ParseString(object, "id", NoTrim); - if (id.has_value()) { + if (!start_url.IsValid()) { + ManifestUmaUtil::ParseIdResult( + ManifestUmaUtil::ParseIdResultType::kInvalidStartUrl); + return String(); + } + KURL start_url_origin = KURL(SecurityOrigin::Create(start_url)->ToString()); + + KURL id = ParseURL(object, "id", start_url_origin, + ParseURLRestrictions::kSameOriginOnly); + if (id.IsValid()) { ManifestUmaUtil::ParseIdResult( ManifestUmaUtil::ParseIdResultType::kSucceed); - return *id; } else { - // If id is not specified, sets to start_url with origin stripped. - if (start_url.IsValid()) { - ManifestUmaUtil::ParseIdResult( - ManifestUmaUtil::ParseIdResultType::kDefaultToStartUrl); - return start_url.GetString().Substring(start_url.PathStart() + 1); - } else { - ManifestUmaUtil::ParseIdResult( - ManifestUmaUtil::ParseIdResultType::kInvalidStartUrl); - return String(); - } + // If id is not specified, sets to start_url + ManifestUmaUtil::ParseIdResult( + ManifestUmaUtil::ParseIdResultType::kDefaultToStartUrl); + id = start_url; } + // TODO(https://crbug.com/1231765): rename the field to relative_id to reflect + // the actual value. + return id.GetString().Substring(id.PathStart() + 1); } KURL ManifestParser::ParseStartURL(const JSONObject* object) {
diff --git a/third_party/blink/renderer/modules/manifest/manifest_parser_unittest.cc b/third_party/blink/renderer/modules/manifest/manifest_parser_unittest.cc index 3eb707b..005e081 100644 --- a/third_party/blink/renderer/modules/manifest/manifest_parser_unittest.cc +++ b/third_party/blink/renderer/modules/manifest/manifest_parser_unittest.cc
@@ -114,6 +114,22 @@ ASSERT_TRUE(manifest->shortcuts.IsEmpty()); } +TEST_F(ManifestParserTest, UnrecognizedFieldsIgnored) { + auto& manifest = ParseManifest( + R"({ + "unrecognizable_manifest_field": ["foo"], + "name": "bar" + })"); + + // Unrecognized Manifest fields are not a parsing error. + EXPECT_EQ(0u, GetErrorCount()); + + // Check that subsequent fields parsed. + ASSERT_FALSE(IsManifestEmpty(manifest)); + ASSERT_EQ(manifest->name, "bar"); + ASSERT_EQ(DefaultDocumentUrl().BaseAsString(), manifest->scope.GetString()); +} + TEST_F(ManifestParserTest, MultipleErrorsReporting) { auto& manifest = ParseManifest( "{ \"name\": 42, \"short_name\": 4, \"id\": 12," @@ -274,6 +290,13 @@ ASSERT_EQ(0u, GetErrorCount()); EXPECT_EQ("start?query=a", manifest->id); } + // Invalid type. + { + auto& manifest = + ParseManifest("{\"start_url\": \"/start?query=a\", \"id\": 1}"); + ASSERT_EQ(1u, GetErrorCount()); + EXPECT_EQ("start?query=a", manifest->id); + } // Empty string. { auto& manifest = @@ -281,6 +304,36 @@ ASSERT_EQ(0u, GetErrorCount()); EXPECT_EQ("", manifest->id); } + // Full url. + { + auto& manifest = ParseManifest( + "{ \"start_url\": \"/start?query=a\", \"id\": \"http://foo.com/foo\" " + "}"); + ASSERT_EQ(0u, GetErrorCount()); + EXPECT_EQ("foo", manifest->id); + } + // Full url with different origin. + { + auto& manifest = ParseManifest( + "{ \"start_url\": \"/start?query=a\", \"id\": " + "\"http://another.com/foo\" }"); + ASSERT_EQ(1u, GetErrorCount()); + EXPECT_EQ("start?query=a", manifest->id); + } + // Relative path + { + auto& manifest = + ParseManifest("{ \"start_url\": \"/start?query=a\", \"id\": \".\" }"); + ASSERT_EQ(0u, GetErrorCount()); + EXPECT_EQ("", manifest->id); + } + // Absolute path + { + auto& manifest = + ParseManifest("{ \"start_url\": \"/start?query=a\", \"id\": \"/\" }"); + ASSERT_EQ(0u, GetErrorCount()); + EXPECT_EQ("", manifest->id); + } // Smoke test. { auto& manifest =
diff --git a/third_party/blink/renderer/modules/mediastream/BUILD.gn b/third_party/blink/renderer/modules/mediastream/BUILD.gn index c2884478..108eb4cb 100644 --- a/third_party/blink/renderer/modules/mediastream/BUILD.gn +++ b/third_party/blink/renderer/modules/mediastream/BUILD.gn
@@ -68,7 +68,6 @@ "media_stream_video_source.cc", "media_stream_video_track.cc", "media_stream_video_track.h", - "media_stream_video_track_signal_observer.h", "navigator_media_stream.cc", "navigator_media_stream.h", "overconstrained_error.cc",
diff --git a/third_party/blink/renderer/modules/mediastream/media_stream_video_track.cc b/third_party/blink/renderer/modules/mediastream/media_stream_video_track.cc index 22dcf6d..3c01ebd 100644 --- a/third_party/blink/renderer/modules/mediastream/media_stream_video_track.cc +++ b/third_party/blink/renderer/modules/mediastream/media_stream_video_track.cc
@@ -19,7 +19,6 @@ #include "third_party/blink/public/web/modules/mediastream/media_stream_video_sink.h" #include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_video_device.h" -#include "third_party/blink/renderer/modules/mediastream/media_stream_video_track_signal_observer.h" #include "third_party/blink/renderer/platform/mediastream/media_stream_component.h" #include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h" #include "third_party/blink/renderer/platform/scheduler/public/thread.h" @@ -777,19 +776,6 @@ void MediaStreamVideoTrack::SetMinimumFrameRate(double min_frame_rate) { DCHECK_CALLED_ON_VALID_THREAD(main_render_thread_checker_); min_frame_rate_ = min_frame_rate; - if (signal_observer_) - signal_observer_->SetMinimumFrameRate(min_frame_rate); -} - -MediaStreamVideoTrackSignalObserver* MediaStreamVideoTrack::SignalObserver() { - DCHECK_CALLED_ON_VALID_THREAD(main_render_thread_checker_); - return signal_observer_.Get(); -} - -void MediaStreamVideoTrack::SetSignalObserver( - MediaStreamVideoTrackSignalObserver* observer) { - DCHECK_CALLED_ON_VALID_THREAD(main_render_thread_checker_); - signal_observer_ = observer; } void MediaStreamVideoTrack::StartTimerForRequestingFrames() {
diff --git a/third_party/blink/renderer/modules/mediastream/media_stream_video_track_signal_observer.h b/third_party/blink/renderer/modules/mediastream/media_stream_video_track_signal_observer.h deleted file mode 100644 index 701bb957d..0000000 --- a/third_party/blink/renderer/modules/mediastream/media_stream_video_track_signal_observer.h +++ /dev/null
@@ -1,21 +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. - -#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIASTREAM_MEDIA_STREAM_VIDEO_TRACK_SIGNAL_OBSERVER_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIASTREAM_MEDIA_STREAM_VIDEO_TRACK_SIGNAL_OBSERVER_H_ - -#include "third_party/blink/renderer/platform/heap/garbage_collected.h" - -namespace blink { - -class MediaStreamVideoTrackSignalObserver : public GarbageCollectedMixin { - public: - virtual ~MediaStreamVideoTrackSignalObserver() = default; - virtual void SetMinimumFrameRate(double) = 0; - virtual void RequestFrame() = 0; -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIASTREAM_MEDIA_STREAM_VIDEO_TRACK_SIGNAL_OBSERVER_H_
diff --git a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc index d706480b..3bff600f 100644 --- a/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc
@@ -837,7 +837,7 @@ // Due to WebGL's same-origin restrictions, it is not possible to // taint the origin using the WebGL API. - DCHECK(canvas()->OriginClean()); + DCHECK(Host()->OriginClean()); if (!ValidateValueFitNonNegInt32("readPixels", "offset", offset)) return;
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn index a8986b6e..bc4d91d 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1484,6 +1484,7 @@ "weborigin/kurl_hash.h", "weborigin/origin_access_entry.cc", "weborigin/origin_access_entry.h", + "weborigin/referrer.cc", "weborigin/referrer.h", "weborigin/reporting_disposition.h", "weborigin/scheme_registry.cc",
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index f9bcc846..695c89f 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1076,6 +1076,10 @@ status: {"ChromeOS": "stable"}, }, { + name: "FractionalLineHeight", + status: "stable", + }, + { name: "FractionalScrollOffsets", status: "experimental", },
diff --git a/third_party/blink/renderer/platform/weborigin/referrer.cc b/third_party/blink/renderer/platform/weborigin/referrer.cc new file mode 100644 index 0000000..bdb12ff --- /dev/null +++ b/third_party/blink/renderer/platform/weborigin/referrer.cc
@@ -0,0 +1,40 @@ +/* + * Copyright (C) 2014 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "third_party/blink/renderer/platform/weborigin/referrer.h" + +#include "services/network/public/mojom/referrer_policy.mojom-blink.h" + +namespace blink { + +Referrer::Referrer() + : referrer_policy(network::mojom::ReferrerPolicy::kDefault) {} + +} // namespace blink
diff --git a/third_party/blink/renderer/platform/weborigin/referrer.h b/third_party/blink/renderer/platform/weborigin/referrer.h index 2a647708..47bddfd4 100644 --- a/third_party/blink/renderer/platform/weborigin/referrer.h +++ b/third_party/blink/renderer/platform/weborigin/referrer.h
@@ -31,21 +31,22 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WEBORIGIN_REFERRER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WEBORIGIN_REFERRER_H_ -#include "services/network/public/mojom/referrer_policy.mojom-blink.h" +#include "services/network/public/mojom/referrer_policy.mojom-blink-forward.h" +#include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/weborigin/kurl.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" namespace blink { -struct Referrer { +struct PLATFORM_EXPORT Referrer { DISALLOW_NEW(); Referrer(const String& referrer, network::mojom::ReferrerPolicy referrer_policy) : referrer(referrer), referrer_policy(referrer_policy) { DCHECK(referrer == NoReferrer() || KURL(NullURL(), referrer).IsValid()); } - Referrer() : referrer_policy(network::mojom::ReferrerPolicy::kDefault) {} + Referrer(); // We use these strings instead of "no-referrer" and "client" in the spec. static String NoReferrer() { return String(); } static String ClientReferrerString() { return "about:client"; }
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 60b3eb4..b0967a5 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -6739,10 +6739,6 @@ # Sheriff 2021-05-12 crbug.com/1095540 [ Debug Linux ] virtual/compositor-threaded-percent-based-scrolling/fast/scrolling/resize-corner-tracking-touch.html [ Failure Pass ] -# Sheriff 2021-05-13 -crbug.com/1208774 [ Mac ] external/wpt/webcodecs/videoDecoder-codec-specific.any.html?h264_annexb [ Failure Pass ] -crbug.com/1208774 [ Mac ] external/wpt/webcodecs/videoDecoder-codec-specific.any.worker.html?h264_annexb [ Failure Pass ] - # For SkiaRenderer on MacOS crbug.com/1208173 [ Mac ] animations/animation-paused-hardware.html [ Failure ] crbug.com/1208173 [ Mac ] animations/missing-values-first-keyframe.html [ Failure ] @@ -7155,6 +7151,8 @@ crbug.com/1218431 virtual/file-system-access-access-handle/external/wpt/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker.html [ Pass ] crbug.com/1218431 external/wpt/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker.html [ Skip ] crbug.com/1218431 virtual/file-system-access-access-handle/external/wpt/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker.html [ Pass ] +crbug.com/1218431 external/wpt/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker.html [ Skip ] +crbug.com/1218431 virtual/file-system-access-access-handle/external/wpt/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker.html [ Pass ] # DevTools roll crbug.com/1187573 http/tests/devtools/throttling/mobile-throttling.js [ Skip ] @@ -7263,3 +7261,7 @@ crbug.com/1231431 virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https.html [ Failure ] crbug.com/1231431 virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https.html [ Failure ] crbug.com/1231431 virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https.html [ Failure ] + +# Sheriff 2021-07-22 +crbug.com/1222097 [ Mac ] external/wpt/html/semantics/embedded-content/media-elements/track/track-element/track-cues-sorted-before-dispatch.html [ Pass Failure ] +crbug.com/1222097 [ Mac ] virtual/synchronous_html_parser/external/wpt/html/semantics/embedded-content/media-elements/track/track-element/track-cues-sorted-before-dispatch.html [ Pass Failure ]
diff --git a/third_party/blink/web_tests/WebGPUExpectations b/third_party/blink/web_tests/WebGPUExpectations index f021fb9..dc90a4b 100644 --- a/third_party/blink/web_tests/WebGPUExpectations +++ b/third_party/blink/web_tests/WebGPUExpectations
@@ -152,6 +152,10 @@ crbug.com/dawn/1009 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:shader,execution,robust_access_vertex:vertexAccess:* [ Slow Failure ] crbug.com/dawn/1009 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:shader,execution,robust_access_vertex:vertexAccess:* [ Slow Failure ] +# Possible test bug, unsure +crbug.com/dawn/1019 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:* [ Failure ] +crbug.com/dawn/1019 [ Mac ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:* [ Failure ] + ### ### Test bugs (fixed upstream) ### @@ -163,17 +167,8 @@ # This test runs first, and is often slow due to some browser startup not being complete. crbug.com/953991 wpt_internal/webgpu/000_run_me_first.html [ Slow ] -crbug.com/dawn/773 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,buffers,map_oom:mappedAtCreation,smaller_getMappedRange:* [ Failure ] -crbug.com/dawn/773 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,buffers,map_oom:mappedAtCreation,full_getMappedRange:* [ Failure ] - -crbug.com/dawn/773 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,buffers,map_oom:mapAsync:* [ Failure Crash ] - -# Also crashes on Linux crbug.com/dawn/969 -crbug.com/dawn/773 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,buffers,map:remapped_for_write:* [ Failure Crash ] -crbug.com/dawn/773 wpt_internal/webgpu/cts.html?worker=1&q=webgpu:api,operation,buffers,map:remapped_for_write:* [ Failure Crash ] - -crbug.com/1231108 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,buffers,map:mapAsync,read:* [ Failure ] -crbug.com/1231108 wpt_internal/webgpu/cts.html?worker=1&q=webgpu:api,operation,buffers,map:mapAsync,read:* [ Failure ] +crbug.com/dawn/999 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,buffers,map_oom:mappedAtCreation,smaller_getMappedRange:* [ Failure ] +crbug.com/dawn/999 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,buffers,map_oom:mappedAtCreation,full_getMappedRange:* [ Failure ] crbug.com/dawn/746 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,shader_module,compilation_info:offset_and_length:valid=false;unicode=true [ Failure ] @@ -315,12 +310,19 @@ # Nvidia only, worker only, very flaky [ Linux ] wpt_internal/webgpu/cts.html?worker=1&q=webgpu:api,operation,render_pass,storeop2:* [ Failure ] -crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:buffersWithVaryingStepMode:* [ Crash Failure ] -crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:* [ Crash Failure ] -crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:* [ Crash Failure ] -crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:buffers_with_varying_step_mode:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:discontiguous_location_and_attribs:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:max_buffers_and_attribs:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:overlapping_attributes:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:* [ Crash Failure ] +crbug.com/dawn/956 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:* [ Crash Failure ] -crbug.com/1213657 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_gl_context_canvas:* [ Slow Crash Failure ] +# and possibly crbug.com/1231840 +crbug.com/1213657 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_gl_context_canvas:* [ Slow Crash Failure Timeout ] # UNASSIGNED-CoreValidation-Shader-InterfaceTypeMismatch | Attribute type of `VK_FORMAT_R8G8_UINT` at location 0 does not match vertex shader input type of `ptr to input sint32` crbug.com/tint/996 [ Linux ] wpt_internal/webgpu/cts.html?q=webgpu:api,validation,vertex_state:vertex_shader_type_matches_attribute_format:* [ Crash Failure ] @@ -351,11 +353,12 @@ crbug.com/tint/993 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:shader,execution,robust_access:linear_memory:storageClass="private";* [ Failure ] # Tint validation errors in HLSL transformation -crbug.com/tint/994 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:* [ Failure ] +crbug.com/tint/994 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:* [ Failure ] # Pipeline compilation failure crbug.com/tint/995 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,validation,vertex_state:vertex_attribute_contained_in_stride:* [ Skip ] -crbug.com/tint/995 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:* [ Skip ] -crbug.com/tint/995 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:* [ Skip ] +crbug.com/tint/995 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:* [ Skip ] +crbug.com/tint/995 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:* [ Skip ] +crbug.com/tint/995 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:* [ Skip ] # Missing State: 0x1000: D3D12_RESOURCE_STATE_RESOLVE_DEST crbug.com/dawn/988 [ Win ] wpt_internal/webgpu/cts.html?q=webgpu:api,operation,render_pass,resolve:render_pass_resolve:* [ Failure ]
diff --git a/third_party/blink/web_tests/editing/caret/caret-height-multi-line.html b/third_party/blink/web_tests/editing/caret/caret-height-multi-line.html index 7edfd86..031f6568 100644 --- a/third_party/blink/web_tests/editing/caret/caret-height-multi-line.html +++ b/third_party/blink/web_tests/editing/caret/caret-height-multi-line.html
@@ -33,7 +33,7 @@ sel.collapse(line2, 0); let caretHeight2 = internals.absoluteCaretBounds().height; - assert_equals(caretHeight1, caretHeight2); + assert_approx_equals(caretHeight1, caretHeight2, 1); }, 'The caret height should be the same in every line'); test(function () {
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/resources/sync-access-handle-test.js b/third_party/blink/web_tests/external/wpt/file-system-access/resources/sync-access-handle-test.js index 7484727..ec13ff9a 100644 --- a/third_party/blink/web_tests/external/wpt/file-system-access/resources/sync-access-handle-test.js +++ b/third_party/blink/web_tests/external/wpt/file-system-access/resources/sync-access-handle-test.js
@@ -12,5 +12,6 @@ const fileHandle = await dir.getFileHandle('OPFS.test', {create: true}); const syncHandle = await fileHandle.createSyncAccessHandle(); await test(t, syncHandle); + await syncHandle.close(); }, description); }
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker.js b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker.js new file mode 100644 index 0000000..e7f976f2 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker.js
@@ -0,0 +1,64 @@ +importScripts("/resources/testharness.js"); +importScripts('resources/sync-access-handle-test.js'); + +'use strict'; + +sync_access_handle_test(async (testCase, handle) => { + assert_equals(await handle.close(), undefined); + + assert_equals(await handle.close(), undefined); +}, 'SyncAccessHandle.close is idempotent'); + +sync_access_handle_test(async (testCase, handle) => { + const closePromise = handle.close(); + + assert_equals(await handle.close(), undefined); + assert_equals(await closePromise, undefined); +}, 'SyncAccessHandle.close is idempotent when called immediately'); + +sync_access_handle_test(async (testCase, handle) => { + assert_equals(await handle.close(), undefined); + + const readBuffer = new Uint8Array(4); + assert_throws_dom('InvalidStateError', () => handle.read(readBuffer, {at: 0})); +}, 'SyncAccessHandle.read fails after SyncAccessHandle.close settles'); + +sync_access_handle_test(async (testCase, handle) => { + const closePromise = handle.close(); + + const readBuffer = new Uint8Array(4); + assert_throws_dom('InvalidStateError', () => handle.read(readBuffer, {at: 0})); + assert_equals(await closePromise, undefined); +}, 'SyncAccessHandle.read fails immediately after calling SyncAccessHandle.close'); + +sync_access_handle_test(async (testCase, handle) => { + assert_equals(await handle.close(), undefined); + + const writeBuffer = new Uint8Array(4); + writeBuffer.set([96, 97, 98, 99]); + assert_throws_dom('InvalidStateError', () => handle.write(writeBuffer, {at: 0})); +}, 'SyncAccessHandle.write fails after SyncAccessHandle.close settles'); + +sync_access_handle_test(async (testCase, handle) => { + const closePromise = handle.close(); + + const writeBuffer = new Uint8Array(4); + writeBuffer.set([96, 97, 98, 99]); + assert_throws_dom('InvalidStateError', () => handle.write(writeBuffer, {at: 0})); + assert_equals(await closePromise, undefined); +}, 'SyncAccessHandle.write fails immediately after calling SyncAccessHandle.close'); + +sync_access_handle_test(async (testCase, handle) => { + assert_equals(await handle.close(), undefined); + + await promise_rejects_dom(testCase, 'InvalidStateError', handle.flush()); +}, 'SyncAccessHandle.flush fails after SyncAccessHandle.close settles'); + +sync_access_handle_test(async (testCase, handle) => { + const closePromise = handle.close(); + + await promise_rejects_dom(testCase, 'InvalidStateError', handle.flush()); + assert_equals(await closePromise, undefined); +}, 'SyncAccessHandle.flush fails immediately after calling SyncAccessHandle.close'); + +done();
diff --git a/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemSyncAccessHandle-flush.js b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemSyncAccessHandle-flush.js new file mode 100644 index 0000000..74517f6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/file-system-access/script-tests/FileSystemSyncAccessHandle-flush.js
@@ -0,0 +1,8 @@ +'use strict'; + +// This script depends on the following scripts: +// /file-system-access/resources/messaging-helpers.js + +sync_access_handle_test(async handle => { + await handle.flush(); +}, 'Test flush on an empty file.');
diff --git a/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/MediaStreamTrackGenerator-audio.https.html b/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/MediaStreamTrackGenerator-audio.https.html index df83e7e..43d8cb211 100644 --- a/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/MediaStreamTrackGenerator-audio.https.html +++ b/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/MediaStreamTrackGenerator-audio.https.html
@@ -52,23 +52,6 @@ }, "Tests that creating a Audio MediaStreamTrackGenerator works as expected"); promise_test(async t => { - const capturedStream = await navigator.mediaDevices.getUserMedia({ audio: true }); - assert_equals(capturedStream.getAudioTracks().length, 1); - const upstreamTrack = capturedStream.getAudioTracks()[0]; - t.add_cleanup(() => upstreamTrack.stop()); - - const generator = new MediaStreamTrackGenerator({ signalTarget: upstreamTrack, kind: "audio" }); - t.add_cleanup(() => generator.stop()); - - const writer = generator.writable.getWriter(); - const data = makeAudioData(1); - await writer.write(data); - - assert_equals(generator.kind, "audio"); - assert_equals(generator.readyState, "live"); - }, "Tests that creating an Audio MediaStreamTrackGenerator with a signal target works as expected"); - - promise_test(async t => { assert_throws_js(TypeError, () => { new MediaStreamTrackGenerator({ kind: "invalid kind" }) }); }, "Creating Generator with an invalid kind throws"); @@ -78,23 +61,10 @@ const upstreamTrack = capturedStream.getAudioTracks()[0]; t.add_cleanup(() => upstreamTrack.stop()); - assert_throws_js(TypeError, () => { new MediaStreamTrackGenerator({ signalTarget: upstreamTrack }) }); + assert_throws_js(TypeError, () => { new MediaStreamTrackGenerator() }); }, "Creating Generator with a missing kind throws"); promise_test(async t => { - const capturedStream = await navigator.mediaDevices.getUserMedia({ audio: true }); - assert_equals(capturedStream.getAudioTracks().length, 1); - const upstreamTrack = capturedStream.getAudioTracks()[0]; - t.add_cleanup(() => upstreamTrack.stop()); - - assert_throws_js(TypeError, () => { new MediaStreamTrackGenerator({ signalTarget: upstreamTrack, kind: "video" }) }); - }, "Creating Generator with mismatched kinds throws"); - - promise_test(async t => { - assert_throws_js(TypeError, () => { new MediaStreamTrackGenerator({ signalTarget: "IamNotATrack" }) }); - }, "Creating Generator with invalid signalTarget throws"); - - promise_test(async t => { const generator = new MediaStreamTrackGenerator({ kind: "video" }); t.add_cleanup(() => generator.stop());
diff --git a/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/MediaStreamTrackGenerator-video.https.html b/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/MediaStreamTrackGenerator-video.https.html index 1185630b..becf008 100644 --- a/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/MediaStreamTrackGenerator-video.https.html +++ b/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/MediaStreamTrackGenerator-video.https.html
@@ -198,24 +198,6 @@ }, "Tests that VideoFrames are destroyed on write."); promise_test(async t => { - const capturedStream = await navigator.mediaDevices.getUserMedia({ video: true }); - assert_equals(capturedStream.getVideoTracks().length, 1); - const upstreamTrack = capturedStream.getVideoTracks()[0]; - t.add_cleanup(() => upstreamTrack.stop()); - - const generator = new MediaStreamTrackGenerator({ signalTarget: upstreamTrack, kind: "video" }); - t.add_cleanup(() => generator.stop()); - - const writer = generator.writable.getWriter(); - const frame = makeVideoFrame(1); - await writer.write(frame); - - assert_equals(generator.kind, "video"); - assert_equals(generator.readyState, "live"); - }, "Tests that creating a Video MediaStreamTrackGenerator with a signal target works as expected"); - - - promise_test(async t => { const generator = new MediaStreamTrackGenerator("audio"); t.add_cleanup(() => generator.stop());
diff --git a/third_party/blink/web_tests/flag-specific/composite-after-paint/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/blink/web_tests/flag-specific/composite-after-paint/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt index 2ee24c8b..82f8499 100644 --- a/third_party/blink/web_tests/flag-specific/composite-after-paint/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt +++ b/third_party/blink/web_tests/flag-specific/composite-after-paint/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
@@ -2,15 +2,15 @@ "layers": [ { "name": "Scrolling background of LayoutView #document", - "bounds": [1026, 996], + "bounds": [1026, 1012], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "invalidations": [ - [208, 973, 173, 18], - [427, 973, 150, 18], - [382, 970, 45, 24], - [423, 973, 5, 18], - [380, 973, 5, 18] + [208, 988, 173, 18], + [427, 988, 150, 18], + [382, 985, 45, 24], + [423, 988, 5, 18], + [380, 988, 5, 18] ], "transform": 1 }, @@ -38,7 +38,7 @@ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], - [0, -411, 0, 1] + [0, -427, 0, 1] ] } ]
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/overflow/nested-scrolling-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/overflow/nested-scrolling-expected.png new file mode 100644 index 0000000..ab5a37f --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/compositing/overflow/nested-scrolling-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/css1/text_properties/line_height-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css1/text_properties/line_height-expected.png new file mode 100644 index 0000000..50c32ae --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css1/text_properties/line_height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-00-d-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-00-d-expected.png new file mode 100644 index 0000000..6ffe291 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-00-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-01-d-g-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-01-d-g-expected.png new file mode 100644 index 0000000..ce8610a --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-01-d-g-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-02-d-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-02-d-expected.png new file mode 100644 index 0000000..c6db0860 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-02-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-03-d-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-03-d-expected.png new file mode 100644 index 0000000..350af9f --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t090501-c414-flt-ln-03-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t1508-c527-font-09-b-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t1508-c527-font-09-b-expected.png new file mode 100644 index 0000000..6066a33 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/css2.1/t1508-c527-font-09-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index d85ca471..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?333c7d0f-260c-4fab-af80-dcdc670a5e7f and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/block/positioning/047-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/block/positioning/047-expected.png new file mode 100644 index 0000000..8bea268 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/block/positioning/047-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/writing-mode/border-vertical-lr-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/writing-mode/border-vertical-lr-expected.png new file mode 100644 index 0000000..659d87c --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/fast/writing-mode/border-vertical-lr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index a001414..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?ecda9a6e-bb25-47cf-a4c5-ac7d3ecb4e62 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index d673ecb1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?998cb125-c3d9-41ae-9a46-2a8fe0f79460 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index c00d5a1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?236f7123-9d2d-4cd9-aab7-765004069fe6 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/prefer_compositing_to_lcd_text/compositing/overflow/disng-cap-nested-scrolling-actual.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/prefer_compositing_to_lcd_text/compositing/overflow/disng-cap-nested-scrolling-actual.png new file mode 100644 index 0000000..ab5a37f --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/prefer_compositing_to_lcd_text/compositing/overflow/disng-cap-nested-scrolling-actual.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-scrolling-expected.png b/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-scrolling-expected.png new file mode 100644 index 0000000..ab5a37f --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-layout-ng/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-scrolling-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/compositing/overflow/nested-scrolling-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/compositing/overflow/nested-scrolling-expected.png index a7a7c18..f7e28d9 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/compositing/overflow/nested-scrolling-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/compositing/overflow/nested-scrolling-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css1/box_properties/acid_test-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css1/box_properties/acid_test-expected.png index 7e6d92b4..77fd78a9 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css1/box_properties/acid_test-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css1/box_properties/acid_test-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css1/font_properties/font-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css1/font_properties/font-expected.png index 6cb7632..6702fa0 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css1/font_properties/font-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css1/font_properties/font-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t040302-c61-rel-len-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t040302-c61-rel-len-00-b-ag-expected.png index 5019af67..f54c638 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t040302-c61-rel-len-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t040302-c61-rel-len-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t040303-c62-percent-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t040303-c62-percent-00-b-ag-expected.png index 131254e3..d79223c 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t040303-c62-percent-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t040303-c62-percent-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-00-b-ag-expected.png index 5419082..2163967 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-01-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-01-b-ag-expected.png index a518a69..8340962 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-01-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-01-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-02-b-a-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-02-b-a-expected.png index a819d1c..f6d528a 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-02-b-a-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-02-b-a-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-03-b-a-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-03-b-a-expected.png index 81f16bb82..867e443 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-03-b-a-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-03-b-a-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-04-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-04-b-ag-expected.png index 44d3fc32..3294ae0 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-04-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-04-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-05-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-05-b-ag-expected.png index 07d2dcfa..b390987 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-05-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-05-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-06-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-06-b-ag-expected.png index a988bdbf..4912be08 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-06-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5502-imrgn-r-06-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-00-b-ag-expected.png index 5419082..2163967 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-01-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-01-b-ag-expected.png index 65537b5..2539d4c2 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-01-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-01-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.png index dca09fa9..ca3f5c7 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-03-b-a-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-03-b-a-expected.png index a37d1d2d..05adbf2 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-03-b-a-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-03-b-a-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-04-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-04-b-ag-expected.png index 4227c66..8ee50f9 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-04-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-04-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-05-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-05-b-ag-expected.png index 22fd678e..faaf7a8 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-05-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-05-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-06-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-06-b-ag-expected.png index 5e25d8c4..e851a7a 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-06-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5504-imrgn-l-06-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5505-imrgn-00-a-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5505-imrgn-00-a-ag-expected.png index eebbff0..2953e8d 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5505-imrgn-00-a-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0803-c5505-imrgn-00-a-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-00-b-ag-expected.png index 5419082..2163967 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-01-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-01-b-ag-expected.png index 789cbd6..66e3aba3 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-01-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-01-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-02-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-02-b-ag-expected.png index 8bbac94..1ca72014 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-02-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-02-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-03-b-a-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-03-b-a-expected.png index 81f16bb82..867e443 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-03-b-a-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-03-b-a-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-04-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-04-b-ag-expected.png index 6dd7f09..930d906 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-04-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5507-ipadn-r-04-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-00-b-ag-expected.png index 5419082..2163967 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-01-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-01-b-ag-expected.png index 169f6a3..1cda94bd 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-01-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-01-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.png index c159386..e222c9d 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-03-b-a-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-03-b-a-expected.png index a37d1d2d..05adbf2 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-03-b-a-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-03-b-a-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-04-f-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-04-f-ag-expected.png index ea6246e73..8b86460 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-04-f-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5509-ipadn-l-04-f-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5510-ipadn-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5510-ipadn-00-b-ag-expected.png index 2f0c309f..f81a2f0 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5510-ipadn-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0804-c5510-ipadn-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t09-c5526c-display-00-e-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t09-c5526c-display-00-e-expected.png index c31794b..8e4c381 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t09-c5526c-display-00-e-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t09-c5526c-display-00-e-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltblck-00-d-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltblck-00-d-ag-expected.png index 62118bd..19d0158 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltblck-00-d-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltblck-00-d-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltclr-00-c-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltclr-00-c-ag-expected.png index 5517bc20..45427aff 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltclr-00-c-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltclr-00-c-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltinln-00-c-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltinln-00-c-ag-expected.png index bb118c5..65632ec 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltinln-00-c-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltinln-00-c-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltmrgn-00-c-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltmrgn-00-c-ag-expected.png index 4cf3370..73b30b09 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltmrgn-00-c-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5525-fltmrgn-00-c-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5526-fltclr-00-c-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5526-fltclr-00-c-ag-expected.png index 5517bc20..45427aff 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5526-fltclr-00-c-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t0905-c5526-fltclr-00-c-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-00-d-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-00-d-expected.png index ea0487c..c01851d 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-00-d-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-00-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-01-d-g-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-01-d-g-expected.png index 3d5794c..19a69c1d 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-01-d-g-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-01-d-g-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-02-d-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-02-d-expected.png index 5990004..d741bb6 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-02-d-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-02-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-03-d-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-03-d-expected.png index 2b161bb51..a147d296 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-03-d-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t090501-c414-flt-ln-03-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t100801-c544-valgn-01-d-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t100801-c544-valgn-01-d-ag-expected.png index 110ca9f8..86d9a41 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t100801-c544-valgn-01-d-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t100801-c544-valgn-01-d-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1205-c566-list-stl-00-e-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1205-c566-list-stl-00-e-ag-expected.png index d49165db..4506b0a 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1205-c566-list-stl-00-e-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1205-c566-list-stl-00-e-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c534-bgre-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c534-bgre-00-b-ag-expected.png index 39fd55bc..305f0998 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c534-bgre-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c534-bgre-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c534-bgre-01-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c534-bgre-01-b-ag-expected.png index c41a721..dc85413a6 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c534-bgre-01-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c534-bgre-01-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c536-bgpos-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c536-bgpos-00-b-ag-expected.png index 626b5c4..4cf4ed3 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c536-bgpos-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c536-bgpos-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c536-bgpos-01-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c536-bgpos-01-b-ag-expected.png index fd67e0aa..41f9666 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c536-bgpos-01-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c536-bgpos-01-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c537-bgfxps-00-c-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c537-bgfxps-00-c-ag-expected.png index 277528d..053bd56 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c537-bgfxps-00-c-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t140201-c537-bgfxps-00-c-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-01-b-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-01-b-expected.png index a61b28e8..e88dca19 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-01-b-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-01-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-02-b-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-02-b-expected.png index 2f910f0a..ed5be8d 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-02-b-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-02-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-04-b-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-04-b-expected.png index 2e7466b2..ebfc6985 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-04-b-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1508-c527-font-04-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1606-c562-white-sp-00-b-ag-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1606-c562-white-sp-00-b-ag-expected.png index c74b89a..fe23efb0 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1606-c562-white-sp-00-b-ag-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/css2.1/t1606-c562-white-sp-00-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/block/basic/011-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/block/basic/011-expected.png index 7e6d92b4..77fd78a9 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/block/basic/011-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/block/basic/011-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/borders/border-radius-split-inline-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/borders/border-radius-split-inline-expected.png index aae7405..9589a2d 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/borders/border-radius-split-inline-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/borders/border-radius-split-inline-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/box-sizing/percentage-height-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/box-sizing/percentage-height-expected.png index b7295f1..ac75804 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/box-sizing/percentage-height-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/box-sizing/percentage-height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/css-generated-content/wbr-with-before-content-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/css-generated-content/wbr-with-before-content-expected.png index 1979b48..29b0aca 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/css-generated-content/wbr-with-before-content-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/css-generated-content/wbr-with-before-content-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/min-width-height-auto-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/min-width-height-auto-expected.txt index 7747dc1..ffe3d30 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/min-width-height-auto-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/min-width-height-auto-expected.txt
@@ -46,7 +46,6 @@ XXX X FAIL: Expected 75 for width, but got 74. -Expected 50 for height, but got 49. <div class="container"> <div class="grid itemsStart">
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/min-width-margin-box-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/min-width-margin-box-expected.txt index 56bac49..7820e2f3 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/min-width-margin-box-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/min-width-margin-box-expected.txt
@@ -1,62 +1,13 @@ This is a testharness.js-based test. -FAIL .grid 1 assert_equals: -<div class="container"> - <div class="grid" data-expected-width="150" data-expected-height="50"> - <div class="item" data-expected-width="0" data-expected-height="25">XXXX</div> - <div class="stretchedItem" data-expected-width="0" data-expected-height="15"></div> - </div> -</div> -height expected 50 but got 49 -FAIL .grid 2 assert_equals: -<div class="container"> - <div class="grid" data-expected-width="150" data-expected-height="92"> - <div class="item borderPaddingMargin" data-expected-width="41" data-expected-height="48">XXXX</div> - <div class="stretchedItem" data-expected-width="65" data-expected-height="15"></div> - </div> -</div> -height expected 92 but got 91 -FAIL .grid 3 assert_equals: -<div class="container"> - <div class="grid" data-expected-width="150" data-expected-height="50"> - <div class="item" style="min-width: 0px;" data-expected-width="0" data-expected-height="25">XXXX</div> - <div class="stretchedItem" data-expected-width="0" data-expected-height="15"></div> - </div> -</div> -height expected 50 but got 49 -FAIL .grid 4 assert_equals: -<div class="container"> - <div class="grid" data-expected-width="150" data-expected-height="92"> - <div class="item borderPaddingMargin" style="min-width: 0px;" data-expected-width="41" data-expected-height="48">XXXX</div> - <div class="stretchedItem" data-expected-width="65" data-expected-height="15"></div> - </div> -</div> -height expected 92 but got 91 +PASS .grid 1 +PASS .grid 2 +PASS .grid 3 +PASS .grid 4 PASS .grid 5 PASS .grid 6 -FAIL .grid 7 assert_equals: -<div class="container"> - <div class="grid" data-expected-width="150" data-expected-height="50"> - <div class="item" style="min-width: 125px;" data-expected-width="125" data-expected-height="25">XXXX</div> - <div class="stretchedItem" data-expected-width="125" data-expected-height="15"></div> - </div> -</div> -height expected 50 but got 49 -FAIL .grid 8 assert_equals: -<div class="container"> - <div class="grid" data-expected-width="150" data-expected-height="92"> - <div class="item borderPaddingMargin" style="min-width: 125px;" data-expected-width="166" data-expected-height="48">XXXX</div> - <div class="stretchedItem" data-expected-width="190" data-expected-height="15"></div> - </div> -</div> -height expected 92 but got 91 -FAIL .grid 9 assert_equals: -<div class="container"> - <div class="grid" data-expected-width="150" data-expected-height="75"> - <div class="item" style="min-width: 50%;" data-expected-width="0" data-expected-height="50">XXX XX</div> - <div class="stretchedItem" data-expected-width="0" data-expected-height="15"></div> - </div> -</div> -height expected 75 but got 74 +PASS .grid 7 +PASS .grid 8 +PASS .grid 9 FAIL .grid 10 assert_equals: <div class="container"> <div class="grid" data-expected-width="150" data-expected-height="117"> @@ -64,7 +15,7 @@ <div class="stretchedItem" data-expected-width="65" data-expected-height="15"></div> </div> </div> -height expected 117 but got 116 +width expected 74 but got 73 FAIL .grid 11 assert_equals: <div class="container"> <div class="grid" data-expected-width="150" data-expected-height="75"> @@ -72,7 +23,7 @@ <div class="stretchedItem" data-expected-width="75" data-expected-height="15"></div> </div> </div> -height expected 75 but got 74 +width expected 75 but got 74 FAIL .grid 12 assert_equals: <div class="container"> <div class="grid" data-expected-width="150" data-expected-height="117"> @@ -80,7 +31,7 @@ <div class="stretchedItem" data-expected-width="140" data-expected-height="15"></div> </div> </div> -height expected 117 but got 116 +width expected 116 but got 115 FAIL .grid 13 assert_equals: <div class="container"> <div class="grid" data-expected-width="150" data-expected-height="50"> @@ -88,7 +39,7 @@ <div class="stretchedItem" data-expected-width="150" data-expected-height="15"></div> </div> </div> -height expected 50 but got 49 +width expected 150 but got 148 FAIL .grid 14 assert_equals: <div class="container"> <div class="grid" data-expected-width="150" data-expected-height="92"> @@ -96,6 +47,6 @@ <div class="stretchedItem" data-expected-width="215" data-expected-height="15"></div> </div> </div> -height expected 92 but got 91 +width expected 191 but got 189 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/repeating-layout-must-produce-the-same-results-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/repeating-layout-must-produce-the-same-results-expected.txt index 33ddba26..1f3e524c 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/repeating-layout-must-produce-the-same-results-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/css-grid-layout/repeating-layout-must-produce-the-same-results-expected.txt
@@ -4,7 +4,7 @@ <div class="i1" data-expected-width="50" data-expected-height="50">XX X</div> <div class="i2" data-expected-width="100" data-expected-height="50">XX X</div> </div> -width expected 160 but got 158 +width expected 160 but got 159 FAIL .grid 2 assert_equals: <div class="grid min-content" data-expected-width="110" data-expected-height="60"> <div class="i1" data-expected-width="50" data-expected-height="50">XX X</div> @@ -16,6 +16,6 @@ <div class="i1" data-expected-width="50" data-expected-height="50">XX X</div> <div class="i2" data-expected-width="100" data-expected-height="50">XX X</div> </div> -width expected 160 but got 158 +width expected 160 but got 159 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/css/line-height-font-order-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/css/line-height-font-order-expected.png index 348e8ae..b8605de 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/css/line-height-font-order-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/css/line-height-font-order-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/css/negative-leading-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/css/negative-leading-expected.png index bb1ee29..2a95585 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/css/negative-leading-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/css/negative-leading-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/calendar-picker/week-picker-appearance-expected.png index b883eb2..c8928a5 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index f773c35..8c41cbf 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/color-scheme/week-picker/week-picker-appearance-highlight-es-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/color-scheme/week-picker/week-picker-appearance-highlight-es-expected.png index 596fb9c1..ad14548 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/color-scheme/week-picker/week-picker-appearance-highlight-es-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/color-scheme/week-picker/week-picker-appearance-highlight-es-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/color-scheme/week-picker/week-picker-appearance-highlight-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/color-scheme/week-picker/week-picker-appearance-highlight-expected.png index e9f4119f..6a6a676 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/color-scheme/week-picker/week-picker-appearance-highlight-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/color-scheme/week-picker/week-picker-appearance-highlight-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/month/month-appearance-l10n-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/month/month-appearance-l10n-expected.png index f58367e..ece0445 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/month/month-appearance-l10n-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/forms/month/month-appearance-l10n-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-001-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-001-expected.txt index 667bcf9b..bc19891e 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-001-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-001-expected.txt
@@ -12,11 +12,10 @@ TEST COMPLETE FAIL imageShapeRect('a').top should be 0. Was -0.6666641235351562. -FAIL imageShapeRect('b').top should be 50. Was 48.66667175292969. +FAIL imageShapeRect('b').top should be 50. Was 49.333335876464844. PASS imageShapeRect('b').left is 300 -FAIL imageShapeRect('c').top should be 75. Was 73.33333587646484. +FAIL imageShapeRect('c').top should be 75. Was 74.33333587646484. PASS imageShapeRect('c').left is 300 -FAIL imageShapeRect('d').top should be 125. Was 122.66667175292969. -FAIL imageShapeRect('d').left should be within 1 of 292. Was 293.3333435058594. -FAIL imageShapeRect('e').top should be 150. Was 147.33334350585938. -FAIL imageShapeRect('e').left should be 0. Was 261.3333435058594. +FAIL imageShapeRect('d').top should be 125. Was 124.33334350585938. +FAIL imageShapeRect('e').top should be 150. Was 149.33334350585938. +PASS imageShapeRect('e').left is 0
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-002-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-002-expected.txt index c0f68169..bb5c78d5 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-002-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-002-expected.txt
@@ -12,11 +12,10 @@ TEST COMPLETE FAIL imageShapeRect('a').top should be 0. Was -0.6666641235351562. -FAIL imageShapeRect('b').top should be 50. Was 48.66667175292969. +FAIL imageShapeRect('b').top should be 50. Was 49.333335876464844. FAIL imageShapeRect('b').right should be 300. Was 299.9999885559082. -FAIL imageShapeRect('c').top should be 75. Was 73.33333587646484. +FAIL imageShapeRect('c').top should be 75. Was 74.33333587646484. FAIL imageShapeRect('c').right should be 300. Was 299.9999885559082. -FAIL imageShapeRect('d').top should be 125. Was 122.66667175292969. -FAIL imageShapeRect('d').right should be within 1 of 292. Was 293.3333320617676. -FAIL imageShapeRect('e').top should be 150. Was 147.33334350585938. -FAIL imageShapeRect('e').right should be 0. Was 261.3333282470703. +FAIL imageShapeRect('d').top should be 125. Was 124.33334350585938. +FAIL imageShapeRect('e').top should be 150. Was 149.33334350585938. +FAIL imageShapeRect('e').right should be 0. Was -0.0000457763671875.
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/table/table-rowspan-row-height-less-than-content-height-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/fast/table/table-rowspan-row-height-less-than-content-height-expected.txt index 249ad1ba..126b3dc 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/table/table-rowspan-row-height-less-than-content-height-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/table/table-rowspan-row-height-less-than-content-height-expected.txt
@@ -8,7 +8,7 @@ This is third row first column. But it should display as second column. FAIL: -Expected 70 for offsetTop, but got 245. +Expected 70 for offsetTop, but got 250. <tr data-offset-y="70"> <td id="percent-height"> This is third row first column. But it should display as second column. </td> @@ -16,7 +16,7 @@ This is fourth row first column. But it should display as second column. FAIL: -Expected 119 for offsetTop, but got 131. +Expected 119 for offsetTop, but got 134. <tr data-offset-y="119"> <td id="percent-height"> This is fourth row first column. But it should display as second column. </td>
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/fast/writing-mode/text-combine-various-fonts-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/fast/writing-mode/text-combine-various-fonts-expected.png index 910e1527..bad8f26 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/fast/writing-mode/text-combine-various-fonts-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/fast/writing-mode/text-combine-various-fonts-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/console/viewport-testing/console-stick-to-bottom-expand-object-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/console/viewport-testing/console-stick-to-bottom-expand-object-expected.txt index 459005b4..c978ab2 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/console/viewport-testing/console-stick-to-bottom-expand-object-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/console/viewport-testing/console-stick-to-bottom-expand-object-expected.txt
@@ -7,7 +7,7 @@ Force selecting index 149 Is at bottom: true, should stick: true, selected element is fully visible? true Expanding object -Is at bottom: false, should stick: false, selected element is fully visible? false +Is at bottom: false, should stick: false, selected element is fully visible? true Collapsing object Is at bottom: true, should stick: false, selected element is fully visible? true
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/editor/text-editor-reveal-line-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/editor/text-editor-reveal-line-expected.txt index d60d2a7..f3b2476 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/editor/text-editor-reveal-line-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/editor/text-editor-reveal-line-expected.txt
@@ -21,7 +21,7 @@ ======= Revealing line: 100 - is line centered: false + is line centered: true ======= Revealing line: 9998
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/persistence/persistence-merge-editor-tabs-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/persistence/persistence-merge-editor-tabs-expected.txt new file mode 100644 index 0000000..0418700 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/http/tests/devtools/persistence/persistence-merge-editor-tabs-expected.txt
@@ -0,0 +1,36 @@ +Verify that tabs get merged when binding is added and removed. + + +Running: addFileSystem + +Running: openNetworkTab +SourceFrame: http://127.0.0.1:8000/devtools/persistence/resources/foo.js + selection: {"startLine":2,"startColumn":0,"endLine":2,"endColumn":5} + firstVisibleLine: 1 + isDirty: false + +Running: openFileSystemTab +SourceFrame: file:///var/www/devtools/persistence/resources/foo.js + selection: {"startLine":1,"startColumn":0,"endLine":2,"endColumn":5} + firstVisibleLine: 1 + isDirty: false +Opened tabs: + file:///var/www/devtools/persistence/resources/foo.js + http://127.0.0.1:8000/devtools/persistence/resources/foo.js + +Running: addFileMapping +Opened tabs: + file:///var/www/devtools/persistence/resources/foo.js +SourceFrame: file:///var/www/devtools/persistence/resources/foo.js + selection: {"startLine":1,"startColumn":0,"endLine":2,"endColumn":5} + firstVisibleLine: 1 + isDirty: false + +Running: removeFileMapping +Opened tabs: + file:///var/www/devtools/persistence/resources/foo.js +SourceFrame: file:///var/www/devtools/persistence/resources/foo.js + selection: {"startLine":1,"startColumn":0,"endLine":2,"endColumn":5} + firstVisibleLine: 1 + isDirty: false +
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/http/tests/misc/acid3-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/http/tests/misc/acid3-expected.png index d8d18c8..63b2426 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/http/tests/misc/acid3-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/http/tests/misc/acid3-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 69c669b0..5b2abac 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt index 70d1074..c717929 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
@@ -2,15 +2,15 @@ "layers": [ { "name": "Scrolling Contents Layer", - "bounds": [1539, 1514], + "bounds": [1539, 1517], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "invalidations": [ - [314, 1479, 259, 27], - [643, 1479, 221, 27], - [577, 1476, 62, 33], - [636, 1479, 7, 27], - [573, 1479, 7, 27] + [314, 1482, 259, 27], + [643, 1482, 221, 27], + [577, 1479, 62, 33], + [636, 1482, 7, 27], + [573, 1482, 7, 27] ], "transform": 1 }, @@ -39,7 +39,7 @@ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], - [0, -636, 0, 1] + [0, -639, 0, 1] ] } ]
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/paint/selection/text-selection-drag-in-frame-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/paint/selection/text-selection-drag-in-frame-expected.png index 1718edb0..27ba64e 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/paint/selection/text-selection-drag-in-frame-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/paint/selection/text-selection-drag-in-frame-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/paint/selection/text-selection-drag-in-frame-scrolled-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/paint/selection/text-selection-drag-in-frame-scrolled-expected.png index b9f115f..23d4692 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/paint/selection/text-selection-drag-in-frame-scrolled-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/paint/selection/text-selection-drag-in-frame-scrolled-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/paint/text/selection-no-clip-text-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/paint/text/selection-no-clip-text-expected.png index bc28ca3..a2cb0175 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/paint/text/selection-no-clip-text-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/paint/text/selection-no-clip-text-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/svg/as-list-image/svg-list-image-intrinsic-size-zoom-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/svg/as-list-image/svg-list-image-intrinsic-size-zoom-expected.txt index 12480c1..34b63044 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/svg/as-list-image/svg-list-image-intrinsic-size-zoom-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/svg/as-list-image/svg-list-image-intrinsic-size-zoom-expected.txt
@@ -3,7 +3,7 @@ PASS Zoom to 3 and list height should be equal to line-height PASS Zoom to 4 and list height should be equal to line-height PASS Zoom to 5 and list height should be equal to line-height -FAIL Zoom to 0.5 and list height should be equal to line-height assert_approx_equals: expected 500 +/- 0.5 but got 498.66668701171875 +PASS Zoom to 0.5 and list height should be equal to line-height PASS Zoom to 0.2 and list height should be equal to line-height PASS Zoom to 1 and list height should be equal to line-height Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/svg-fonts-in-html-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/svg-fonts-in-html-expected.png index ef9a91f..48a1733 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/svg-fonts-in-html-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/svg/custom/svg-fonts-in-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png index df20e43..42254c90 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/transforms/transformed-document-element-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/transforms/transformed-document-element-expected.png index e69de29..d70286f 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/transforms/transformed-document-element-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/transforms/transformed-document-element-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/compositing/overflow/nested-scrolling-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/compositing/overflow/nested-scrolling-expected.png index a7a7c18..f7e28d9 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/compositing/overflow/nested-scrolling-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/compositing/overflow/nested-scrolling-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/scroll/scrollbar-damage-and-full-viewport-repaint-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/scroll/scrollbar-damage-and-full-viewport-repaint-expected.png index 09f375d5..c2db2ea4 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/scroll/scrollbar-damage-and-full-viewport-repaint-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/scroll/scrollbar-damage-and-full-viewport-repaint-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/scroll/scrollbar-damage-and-full-viewport-repaint-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/scroll/scrollbar-damage-and-full-viewport-repaint-expected.txt index 6699a66..388c9e99 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/scroll/scrollbar-damage-and-full-viewport-repaint-expected.txt +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/scroll/scrollbar-damage-and-full-viewport-repaint-expected.txt
@@ -2,13 +2,13 @@ "layers": [ { "name": "LayoutView #document", - "bounds": [1200, 900], + "bounds": [1000, 600], "contentsOpaque": true, "backgroundColor": "#FFFFFF" }, { "name": "Scrolling Contents Layer", - "bounds": [1200, 900] + "bounds": [1000, 600] }, { "name": "LayoutNGBlockFlow DIV id='container'",
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 69c669b0..5b2abac 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt new file mode 100644 index 0000000..c717929 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
@@ -0,0 +1,47 @@ +{ + "layers": [ + { + "name": "Scrolling Contents Layer", + "bounds": [1539, 1517], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF", + "invalidations": [ + [314, 1482, 259, 27], + [643, 1482, 221, 27], + [577, 1479, 62, 33], + [636, 1482, 7, 27], + [573, 1482, 7, 27] + ], + "transform": 1 + }, + { + "name": "ContentsLayer for Horizontal Scrollbar Layer", + "position": [0, 878], + "bounds": [1178, 22], + "contentsOpaque": true + }, + { + "name": "ContentsLayer for Vertical Scrollbar Layer", + "position": [1178, 0], + "bounds": [22, 878], + "contentsOpaque": true + }, + { + "name": "Scroll Corner Layer", + "position": [1178, 878], + "bounds": [22, 22] + } + ], + "transforms": [ + { + "id": 1, + "transform": [ + [1, 0, 0, 0], + [0, 1, 0, 0], + [0, 0, 1, 0], + [0, -639, 0, 1] + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/text-rescale-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/text-rescale-expected.png new file mode 100644 index 0000000..bc304c4 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/backface-visibility-interop/paint/invalidation/svg/text-rescale-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/http/tests/misc/acid3-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/http/tests/misc/acid3-expected.png index d8d18c8..63b2426 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/http/tests/misc/acid3-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/scroll-unification/http/tests/misc/acid3-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/shared_array_buffer_on_desktop/fast/css/negative-leading-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/virtual/shared_array_buffer_on_desktop/fast/css/negative-leading-expected.png index bb1ee29..2a95585 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/shared_array_buffer_on_desktop/fast/css/negative-leading-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/shared_array_buffer_on_desktop/fast/css/negative-leading-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/highdpi/virtual/text-antialias/font-ascent-mac-expected.png b/third_party/blink/web_tests/flag-specific/highdpi/virtual/text-antialias/font-ascent-mac-expected.png index c518d35..62f1667 100644 --- a/third_party/blink/web_tests/flag-specific/highdpi/virtual/text-antialias/font-ascent-mac-expected.png +++ b/third_party/blink/web_tests/flag-specific/highdpi/virtual/text-antialias/font-ascent-mac-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/http/tests/devtools/console/viewport-testing/console-stick-to-bottom-expand-object.js b/third_party/blink/web_tests/http/tests/devtools/console/viewport-testing/console-stick-to-bottom-expand-object.js index 005511b..c0bbe8e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/console/viewport-testing/console-stick-to-bottom-expand-object.js +++ b/third_party/blink/web_tests/http/tests/devtools/console/viewport-testing/console-stick-to-bottom-expand-object.js
@@ -65,7 +65,7 @@ if (selectedElement) { const selectedRect = selectedElement.getBoundingClientRect(); const viewportRect = viewport.element.getBoundingClientRect(); - const fullyVisible = (selectedRect.top + 2 >= viewportRect.top && selectedRect.bottom - 2 <= viewportRect.bottom); + const fullyVisible = (selectedRect.top + 2.5 >= viewportRect.top && selectedRect.bottom - 2.5 <= viewportRect.bottom); infoText += ', selected element is fully visible? ' + fullyVisible; } TestRunner.addResult(infoText);
diff --git a/third_party/blink/web_tests/platform/linux/compositing/overflow/nested-scrolling-expected.png b/third_party/blink/web_tests/platform/linux/compositing/overflow/nested-scrolling-expected.png index ab5a37f..424a63cd 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/overflow/nested-scrolling-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/overflow/nested-scrolling-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css1/text_properties/line_height-expected.png b/third_party/blink/web_tests/platform/linux/css1/text_properties/line_height-expected.png index 50c32ae..bad43df 100644 --- a/third_party/blink/web_tests/platform/linux/css1/text_properties/line_height-expected.png +++ b/third_party/blink/web_tests/platform/linux/css1/text_properties/line_height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-00-d-expected.png b/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-00-d-expected.png index 6ffe291..11ddd16f 100644 --- a/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-00-d-expected.png +++ b/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-00-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-01-d-g-expected.png b/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-01-d-g-expected.png index ce8610a..18c43cd 100644 --- a/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-01-d-g-expected.png +++ b/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-01-d-g-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-02-d-expected.png b/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-02-d-expected.png index c6db0860..319ecf9 100644 --- a/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-02-d-expected.png +++ b/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-02-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-03-d-expected.png b/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-03-d-expected.png index 350af9f..b2f8c65 100644 --- a/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-03-d-expected.png +++ b/third_party/blink/web_tests/platform/linux/css2.1/t090501-c414-flt-ln-03-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/css2.1/t1508-c527-font-09-b-expected.png b/third_party/blink/web_tests/platform/linux/css2.1/t1508-c527-font-09-b-expected.png index 6066a33..9e3b0f81 100644 --- a/third_party/blink/web_tests/platform/linux/css2.1/t1508-c527-font-09-b-expected.png +++ b/third_party/blink/web_tests/platform/linux/css2.1/t1508-c527-font-09-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/linux/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 33ad769..0000000 --- a/third_party/blink/web_tests/platform/linux/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?0d917bbe-2ef6-442b-9f1d-bcc962482f24 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/fast/block/positioning/047-expected.png b/third_party/blink/web_tests/platform/linux/fast/block/positioning/047-expected.png index 8bea268..2e4e5cb 100644 --- a/third_party/blink/web_tests/platform/linux/fast/block/positioning/047-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/block/positioning/047-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/borders/border-radius-split-inline-expected.png b/third_party/blink/web_tests/platform/linux/fast/borders/border-radius-split-inline-expected.png index c4a23fc..5b5b786 100644 --- a/third_party/blink/web_tests/platform/linux/fast/borders/border-radius-split-inline-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/borders/border-radius-split-inline-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/writing-mode/border-vertical-lr-expected.png b/third_party/blink/web_tests/platform/linux/fast/writing-mode/border-vertical-lr-expected.png index 659d87c..c30055a 100644 --- a/third_party/blink/web_tests/platform/linux/fast/writing-mode/border-vertical-lr-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/writing-mode/border-vertical-lr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/writing-mode/text-combine-various-fonts-expected.png b/third_party/blink/web_tests/platform/linux/fast/writing-mode/text-combine-various-fonts-expected.png index 8c70d4c..e5d3707c2 100644 --- a/third_party/blink/web_tests/platform/linux/fast/writing-mode/text-combine-various-fonts-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/writing-mode/text-combine-various-fonts-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 416d59ed..841db752 100644 --- a/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt index 32b14e8..57b93f3 100644 --- a/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt +++ b/third_party/blink/web_tests/platform/linux/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
@@ -2,15 +2,15 @@ "layers": [ { "name": "Scrolling Contents Layer", - "bounds": [1026, 996], + "bounds": [1026, 1012], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "invalidations": [ - [208, 973, 173, 18], - [427, 973, 150, 18], - [382, 970, 45, 24], - [423, 973, 5, 18], - [380, 973, 5, 18] + [208, 988, 173, 18], + [427, 988, 150, 18], + [382, 985, 45, 24], + [423, 988, 5, 18], + [380, 988, 5, 18] ], "transform": 1 }, @@ -39,7 +39,7 @@ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], - [0, -411, 0, 1] + [0, -427, 0, 1] ] } ]
diff --git a/third_party/blink/web_tests/platform/linux/svg/custom/svg-fonts-in-html-expected.png b/third_party/blink/web_tests/platform/linux/svg/custom/svg-fonts-in-html-expected.png index 3202434..855f022 100644 --- a/third_party/blink/web_tests/platform/linux/svg/custom/svg-fonts-in-html-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/custom/svg-fonts-in-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png b/third_party/blink/web_tests/platform/linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png index 63dbe34..e9fa038 100644 --- a/third_party/blink/web_tests/platform/linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png +++ b/third_party/blink/web_tests/platform/linux/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug2479-2-expected.png b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug2479-2-expected.png index faacc9e0..776ce704 100644 --- a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug2479-2-expected.png +++ b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug2479-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug2886-2-expected.png b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug2886-2-expected.png index 94cab8e..d166d00 100644 --- a/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug2886-2-expected.png +++ b/third_party/blink/web_tests/platform/linux/tables/mozilla/bugs/bug2886-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/platform/linux/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 416d59ed..841db752 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/backface-visibility-interop/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index ebb1161..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?87f9acc3-f8ed-4924-9df7-10ea30f4ddd2 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 416d59ed..841db752 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/custom/svg-fonts-in-html-expected.png b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/custom/svg-fonts-in-html-expected.png index 3202434..855f022 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/custom/svg-fonts-in-html-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/layout_ng_svg_text/svg/custom/svg-fonts-in-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index d46473a2..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?3238e36e-520c-4a18-8806-51df032ca2be and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 7bf5ac8..0000000 --- a/third_party/blink/web_tests/platform/linux/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?9f1f4baf-14ec-400e-a25e-fea79a85eb8e and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-scrolling-expected.png b/third_party/blink/web_tests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-scrolling-expected.png index ab5a37f..424a63cd 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-scrolling-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-scrolling-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png b/third_party/blink/web_tests/platform/linux/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png index 3202434..855f022 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/transform-interop-disabled/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/platform/linux/virtual/transform-interop-disabled/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 416d59ed..841db752 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/transform-interop-disabled/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/transform-interop-disabled/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 4413654f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?93b135fd-e8a3-439b-ac0d-6c52d25ab6ca and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. - -
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/fast/css/font-face-opentype-expected.png b/third_party/blink/web_tests/platform/mac-mac-arm11.0/fast/css/font-face-opentype-expected.png deleted file mode 100644 index eb3ac07..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/fast/css/font-face-opentype-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/fast/ruby/ruby-position-modern-japanese-fonts-expected.png b/third_party/blink/web_tests/platform/mac-mac-arm11.0/fast/ruby/ruby-position-modern-japanese-fonts-expected.png deleted file mode 100644 index e009e79..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/fast/ruby/ruby-position-modern-japanese-fonts-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 4413654f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?93b135fd-e8a3-439b-ac0d-6c52d25ab6ca and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. - -
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 4413654f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?93b135fd-e8a3-439b-ac0d-6c52d25ab6ca and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. - -
diff --git a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 4413654f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac-arm11.0/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?93b135fd-e8a3-439b-ac0d-6c52d25ab6ca and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. - -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/css1/text_properties/line_height-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/css1/text_properties/line_height-expected.png index 3d11fd5..0deab8b1 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.12/css1/text_properties/line_height-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.12/css1/text_properties/line_height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/css2.1/t1508-c527-font-09-b-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/css2.1/t1508-c527-font-09-b-expected.png index 55f3264f..1c6daffc 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.12/css2.1/t1508-c527-font-09-b-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.12/css2.1/t1508-c527-font-09-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.12/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 4a7a0d986..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.12/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?1bd6e195-f0b5-4867-84ef-6c369cc62506 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.12/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.12/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.12/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.12/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png index 8382622..fcfcf37 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png index eb500f1..e5479d9 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.12/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.12/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/tables/mozilla/bugs/bug2479-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/tables/mozilla/bugs/bug2479-2-expected.png deleted file mode 100644 index 468c535..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.12/tables/mozilla/bugs/bug2479-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/tables/mozilla/bugs/bug2886-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/tables/mozilla/bugs/bug2886-2-expected.png deleted file mode 100644 index 35afe6c..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.12/tables/mozilla/bugs/bug2886-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.12/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 4413654f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?93b135fd-e8a3-439b-ac0d-6c52d25ab6ca and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. - -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.12/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 4413654f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?93b135fd-e8a3-439b-ac0d-6c52d25ab6ca and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. - -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.12/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 4413654f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?93b135fd-e8a3-439b-ac0d-6c52d25ab6ca and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. - -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png new file mode 100644 index 0000000..3cab319d --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.12/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.13/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index d2a3c5d..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?0d39d951-aa36-4f39-82a6-a620381216a6 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.13/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.13/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 2012885f..26f668ac 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.13/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.13/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/tables/mozilla/bugs/bug2479-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/tables/mozilla/bugs/bug2479-2-expected.png deleted file mode 100644 index 468c535..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/tables/mozilla/bugs/bug2479-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/tables/mozilla/bugs/bug2886-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/tables/mozilla/bugs/bug2886-2-expected.png deleted file mode 100644 index 35afe6c..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/tables/mozilla/bugs/bug2886-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 68de052..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?7fabe2b8-7f7a-4e0e-b450-818ff35b67ce and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 855839f..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?9c53208e-44f2-4596-9732-b033aeed53ab and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index e73f3619..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?ea6ecbc8-9b26-4692-aefd-28ff6b8bfc1e and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.13/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png new file mode 100644 index 0000000..3cab319d --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.13/virtual/synchronous_html_parser/svg/custom/svg-fonts-in-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index afa87f14..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?e217b9e7-bf43-42af-9df3-7a97de735aba and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png index 31fe143..17664b6 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.14/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.14/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug2479-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug2479-2-expected.png deleted file mode 100644 index 468c535..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug2479-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug2886-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug2886-2-expected.png deleted file mode 100644 index 35afe6c..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/tables/mozilla/bugs/bug2886-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 22e35a1..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?cc25d1b6-a8ef-4123-b4b0-a392f84c65c8 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 46cbc73..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?7d1478ee-4ff0-4dce-b72f-9115b8ef8957 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.14/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 5d8f1083..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.14/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?e2e3c28c-3669-4447-b8f7-92d4ddea6503 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 12d5af7..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?0ac77ba1-2917-4652-9a2d-1bac809c6838 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/tables/mozilla/bugs/bug2479-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/tables/mozilla/bugs/bug2479-2-expected.png deleted file mode 100644 index 468c535..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/tables/mozilla/bugs/bug2479-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/tables/mozilla/bugs/bug2886-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.15/tables/mozilla/bugs/bug2886-2-expected.png deleted file mode 100644 index 35afe6c..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/tables/mozilla/bugs/bug2886-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index ebc431b..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?76259d28-9786-45ed-9208-fd8a3f14b6a4 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index c157b41..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?de65b0b0-3754-41e8-8515-a5ff0bbe3f4f and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index c792a9c..0000000 --- a/third_party/blink/web_tests/platform/mac-mac10.15/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?26519ca4-82e9-4796-8227-2773161b01bb and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/compositing/overflow/nested-scrolling-expected.png b/third_party/blink/web_tests/platform/mac/compositing/overflow/nested-scrolling-expected.png index b78a226..a60e570 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/overflow/nested-scrolling-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/overflow/nested-scrolling-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css1/text_properties/line_height-expected.png b/third_party/blink/web_tests/platform/mac/css1/text_properties/line_height-expected.png index 1e59a050..503cabe 100644 --- a/third_party/blink/web_tests/platform/mac/css1/text_properties/line_height-expected.png +++ b/third_party/blink/web_tests/platform/mac/css1/text_properties/line_height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-00-d-expected.png b/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-00-d-expected.png index f141c8b..abe03672 100644 --- a/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-00-d-expected.png +++ b/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-00-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-01-d-g-expected.png b/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-01-d-g-expected.png index 25d42b47..f3b347a 100644 --- a/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-01-d-g-expected.png +++ b/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-01-d-g-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-02-d-expected.png b/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-02-d-expected.png index 6cc9338..f73e7c3 100644 --- a/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-02-d-expected.png +++ b/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-02-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-03-d-expected.png b/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-03-d-expected.png index 274810b..afb7c4b 100644 --- a/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-03-d-expected.png +++ b/third_party/blink/web_tests/platform/mac/css2.1/t090501-c414-flt-ln-03-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/css2.1/t1508-c527-font-09-b-expected.png b/third_party/blink/web_tests/platform/mac/css2.1/t1508-c527-font-09-b-expected.png index c4ff92f..1a297b2 100644 --- a/third_party/blink/web_tests/platform/mac/css2.1/t1508-c527-font-09-b-expected.png +++ b/third_party/blink/web_tests/platform/mac/css2.1/t1508-c527-font-09-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 75d1b931..0000000 --- a/third_party/blink/web_tests/platform/mac/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?b6f7d7ab-0c01-4136-ae46-9086e63c3858 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac/external/wpt/webcodecs/videoDecoder-codec-specific.any.worker_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt b/third_party/blink/web_tests/platform/mac/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt deleted file mode 100644 index 601d677..0000000 --- a/third_party/blink/web_tests/platform/mac/external/wpt/webcodecs/videoDecoder-codec-specific.any_h264_annexb-expected.txt +++ /dev/null
@@ -1,19 +0,0 @@ -This is a testharness.js-based test. -PASS Test isConfigSupported() -PASS Test isConfigSupported() with 1080p crop -PASS Test that isConfigSupported() returns a parsed configuration -PASS Test invalid configs -PASS Test configure() -PASS Decode a key frame -PASS Verify reset() suppresses outputs -PASS Test unconfigured VideoDecoder operations -PASS Test closed VideoDecoder operations -PASS Decode empty frame -FAIL Decode corrupt frame assert_unreached: Should have rejected: undefined Reached unreachable code -PASS Close while decoding corrupt frame -PASS Test decoding after flush -PASS Test decoding a with negative timestamp -PASS Test reset during flush -PASS Test low-latency decoding -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/fast/block/positioning/047-expected.png b/third_party/blink/web_tests/platform/mac/fast/block/positioning/047-expected.png index 133dbeb..95e93c5 100644 --- a/third_party/blink/web_tests/platform/mac/fast/block/positioning/047-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/block/positioning/047-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/borders/border-radius-split-inline-expected.png b/third_party/blink/web_tests/platform/mac/fast/borders/border-radius-split-inline-expected.png index 503a8709..850b0b1f 100644 --- a/third_party/blink/web_tests/platform/mac/fast/borders/border-radius-split-inline-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/borders/border-radius-split-inline-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png b/third_party/blink/web_tests/platform/mac/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png index dd5c8629..2927c60 100644 --- a/third_party/blink/web_tests/platform/mac/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/writing-mode/border-vertical-lr-expected.png b/third_party/blink/web_tests/platform/mac/fast/writing-mode/border-vertical-lr-expected.png index 9ffd600..4b7cd69 100644 --- a/third_party/blink/web_tests/platform/mac/fast/writing-mode/border-vertical-lr-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/writing-mode/border-vertical-lr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/writing-mode/text-combine-various-fonts-expected.png b/third_party/blink/web_tests/platform/mac/fast/writing-mode/text-combine-various-fonts-expected.png index f8767f6a..617ed43 100644 --- a/third_party/blink/web_tests/platform/mac/fast/writing-mode/text-combine-various-fonts-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/writing-mode/text-combine-various-fonts-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 8877024..824bc653 100644 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt index 1a0ad73..2cb3a89 100644 --- a/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt +++ b/third_party/blink/web_tests/platform/mac/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
@@ -2,15 +2,15 @@ "layers": [ { "name": "Scrolling Contents Layer", - "bounds": [1026, 1016], + "bounds": [1026, 1032], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "invalidations": [ - [177, 993, 202, 19], - [432, 993, 177, 19], - [381, 990, 49, 24], - [427, 993, 6, 18], - [378, 993, 6, 18] + [177, 1009, 202, 19], + [432, 1009, 177, 19], + [381, 1006, 49, 24], + [427, 1009, 6, 18], + [378, 1009, 6, 18] ], "transform": 1 }, @@ -39,7 +39,7 @@ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], - [0, -431, 0, 1] + [0, -447, 0, 1] ] } ]
diff --git a/third_party/blink/web_tests/platform/mac/svg/custom/svg-fonts-in-html-expected.png b/third_party/blink/web_tests/platform/mac/svg/custom/svg-fonts-in-html-expected.png index 0ef32ad..3cab319d 100644 --- a/third_party/blink/web_tests/platform/mac/svg/custom/svg-fonts-in-html-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/custom/svg-fonts-in-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png b/third_party/blink/web_tests/platform/mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png index 88f3359..14931b7 100644 --- a/third_party/blink/web_tests/platform/mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png +++ b/third_party/blink/web_tests/platform/mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug2479-2-expected.png b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug2479-2-expected.png index 468c535..a008459 100644 --- a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug2479-2-expected.png +++ b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug2479-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug2886-2-expected.png b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug2886-2-expected.png index 35afe6c..4eb67fab 100644 --- a/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug2886-2-expected.png +++ b/third_party/blink/web_tests/platform/mac/tables/mozilla/bugs/bug2886-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 2ee5f25f..0000000 --- a/third_party/blink/web_tests/platform/mac/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?4843f85f-c6da-435d-9934-a0ab8450396a and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 15c63b2..0000000 --- a/third_party/blink/web_tests/platform/mac/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?6ecb90f3-4f66-42c1-932c-5a0550862baa and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/mac/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 43bf9d6..0000000 --- a/third_party/blink/web_tests/platform/mac/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?67d9aebf-d52c-428c-b7f3-8db3ea61a27d and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win/compositing/overflow/nested-scrolling-expected.png b/third_party/blink/web_tests/platform/win/compositing/overflow/nested-scrolling-expected.png index f62daf1..829de010 100644 --- a/third_party/blink/web_tests/platform/win/compositing/overflow/nested-scrolling-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/overflow/nested-scrolling-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/css1/text_properties/line_height-expected.png b/third_party/blink/web_tests/platform/win/css1/text_properties/line_height-expected.png index daed9b2..238cbd9 100644 --- a/third_party/blink/web_tests/platform/win/css1/text_properties/line_height-expected.png +++ b/third_party/blink/web_tests/platform/win/css1/text_properties/line_height-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-00-d-expected.png b/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-00-d-expected.png index 2f350aa..48e0ead 100644 --- a/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-00-d-expected.png +++ b/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-00-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-01-d-g-expected.png b/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-01-d-g-expected.png index c7cbfba..60856bb 100644 --- a/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-01-d-g-expected.png +++ b/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-01-d-g-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-02-d-expected.png b/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-02-d-expected.png index 440f8e9..0c3456a 100644 --- a/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-02-d-expected.png +++ b/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-02-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-03-d-expected.png b/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-03-d-expected.png index a59dd9c..0b9411c 100644 --- a/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-03-d-expected.png +++ b/third_party/blink/web_tests/platform/win/css2.1/t090501-c414-flt-ln-03-d-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/css2.1/t100801-c548-ln-ht-02-b-ag-expected.png b/third_party/blink/web_tests/platform/win/css2.1/t100801-c548-ln-ht-02-b-ag-expected.png index fe4abaf..db6bbb80 100644 --- a/third_party/blink/web_tests/platform/win/css2.1/t100801-c548-ln-ht-02-b-ag-expected.png +++ b/third_party/blink/web_tests/platform/win/css2.1/t100801-c548-ln-ht-02-b-ag-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/css2.1/t1507-c526-font-sz-02-b-a-expected.png b/third_party/blink/web_tests/platform/win/css2.1/t1507-c526-font-sz-02-b-a-expected.png index 39ff6ce8..6cba2a6e 100644 --- a/third_party/blink/web_tests/platform/win/css2.1/t1507-c526-font-sz-02-b-a-expected.png +++ b/third_party/blink/web_tests/platform/win/css2.1/t1507-c526-font-sz-02-b-a-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/css2.1/t1508-c527-font-09-b-expected.png b/third_party/blink/web_tests/platform/win/css2.1/t1508-c527-font-09-b-expected.png index 250df0f7..cf27907f 100644 --- a/third_party/blink/web_tests/platform/win/css2.1/t1508-c527-font-09-b-expected.png +++ b/third_party/blink/web_tests/platform/win/css2.1/t1508-c527-font-09-b-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/win/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 27d8911..0000000 --- a/third_party/blink/web_tests/platform/win/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?b7daa85a-91dd-47d1-8528-2e1c1106a13f and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win/fast/block/positioning/047-expected.png b/third_party/blink/web_tests/platform/win/fast/block/positioning/047-expected.png index 56326d6..b27d5fe2 100644 --- a/third_party/blink/web_tests/platform/win/fast/block/positioning/047-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/block/positioning/047-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/borders/border-radius-split-inline-expected.png b/third_party/blink/web_tests/platform/win/fast/borders/border-radius-split-inline-expected.png index 4297ad0..83a43bb 100644 --- a/third_party/blink/web_tests/platform/win/fast/borders/border-radius-split-inline-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/borders/border-radius-split-inline-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png b/third_party/blink/web_tests/platform/win/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png index 256b823..6df787df 100644 --- a/third_party/blink/web_tests/platform/win/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/writing-mode/border-vertical-lr-expected.png b/third_party/blink/web_tests/platform/win/fast/writing-mode/border-vertical-lr-expected.png index 7e80bccc..737e667e 100644 --- a/third_party/blink/web_tests/platform/win/fast/writing-mode/border-vertical-lr-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/writing-mode/border-vertical-lr-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/writing-mode/text-combine-various-fonts-expected.png b/third_party/blink/web_tests/platform/win/fast/writing-mode/text-combine-various-fonts-expected.png index 635cf72..41c9b458 100644 --- a/third_party/blink/web_tests/platform/win/fast/writing-mode/text-combine-various-fonts-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/writing-mode/text-combine-various-fonts-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/platform/win/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 0037609..1b5bd12 100644 --- a/third_party/blink/web_tests/platform/win/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/platform/win/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/blink/web_tests/platform/win/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt index 33bdfbb..f55ca78 100644 --- a/third_party/blink/web_tests/platform/win/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt +++ b/third_party/blink/web_tests/platform/win/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
@@ -2,15 +2,15 @@ "layers": [ { "name": "Scrolling Contents Layer", - "bounds": [1026, 1036], + "bounds": [1026, 1053], "contentsOpaque": true, "backgroundColor": "#FFFFFF", "invalidations": [ - [177, 1013, 202, 18], - [435, 1013, 173, 18], - [382, 1010, 50, 24], - [429, 1013, 6, 18], - [379, 1013, 6, 18] + [177, 1029, 202, 18], + [435, 1029, 173, 18], + [382, 1026, 50, 24], + [429, 1029, 6, 18], + [379, 1029, 6, 18] ], "transform": 1 }, @@ -39,7 +39,7 @@ [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], - [0, -451, 0, 1] + [0, -468, 0, 1] ] } ]
diff --git a/third_party/blink/web_tests/platform/win/svg/custom/svg-fonts-in-html-expected.png b/third_party/blink/web_tests/platform/win/svg/custom/svg-fonts-in-html-expected.png index 3a0b0ae..3abb3b7 100644 --- a/third_party/blink/web_tests/platform/win/svg/custom/svg-fonts-in-html-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/custom/svg-fonts-in-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png b/third_party/blink/web_tests/platform/win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png index bf942cd9..ac7ec21b 100644 --- a/third_party/blink/web_tests/platform/win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png +++ b/third_party/blink/web_tests/platform/win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug2479-2-expected.png b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug2479-2-expected.png index 2680cea..110213c 100644 --- a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug2479-2-expected.png +++ b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug2479-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug2886-2-expected.png b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug2886-2-expected.png index 75e05d5..7b7b41f 100644 --- a/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug2886-2-expected.png +++ b/third_party/blink/web_tests/platform/win/tables/mozilla/bugs/bug2886-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/win/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index d15f90e..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?7602044d-8a13-497a-8c95-cd809b57dac9 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/win/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index cdb4c23..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?52b66d9c-8b7b-4418-a189-df75633f506a and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/win/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 3d760b6..0000000 --- a/third_party/blink/web_tests/platform/win/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?30422323-19ca-48c0-9d19-ab4a2846a3bf and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win7/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/win7/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index ce92ff49..0000000 --- a/third_party/blink/web_tests/platform/win7/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?6d113c14-52d4-4b5d-a225-07d8faa1ef32 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win7/fast/block/positioning/047-expected.png b/third_party/blink/web_tests/platform/win7/fast/block/positioning/047-expected.png index 70e731b..19feb35 100644 --- a/third_party/blink/web_tests/platform/win7/fast/block/positioning/047-expected.png +++ b/third_party/blink/web_tests/platform/win7/fast/block/positioning/047-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png b/third_party/blink/web_tests/platform/win7/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png index 4d27758..7f7337b 100644 --- a/third_party/blink/web_tests/platform/win7/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png +++ b/third_party/blink/web_tests/platform/win7/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-cjk-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/fast/writing-mode/text-combine-various-fonts-expected.png b/third_party/blink/web_tests/platform/win7/fast/writing-mode/text-combine-various-fonts-expected.png index 64fc5084..402d47ff 100644 --- a/third_party/blink/web_tests/platform/win7/fast/writing-mode/text-combine-various-fonts-expected.png +++ b/third_party/blink/web_tests/platform/win7/fast/writing-mode/text-combine-various-fonts-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png b/third_party/blink/web_tests/platform/win7/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png index 0a450a0..7dfb764 100644 --- a/third_party/blink/web_tests/platform/win7/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png +++ b/third_party/blink/web_tests/platform/win7/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/svg/custom/svg-fonts-in-html-expected.png b/third_party/blink/web_tests/platform/win7/svg/custom/svg-fonts-in-html-expected.png index 963590a..7dc3f53bc 100644 --- a/third_party/blink/web_tests/platform/win7/svg/custom/svg-fonts-in-html-expected.png +++ b/third_party/blink/web_tests/platform/win7/svg/custom/svg-fonts-in-html-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/tables/mozilla/bugs/bug2479-2-expected.png b/third_party/blink/web_tests/platform/win7/tables/mozilla/bugs/bug2479-2-expected.png index c2ba3015..ea29333 100644 --- a/third_party/blink/web_tests/platform/win7/tables/mozilla/bugs/bug2479-2-expected.png +++ b/third_party/blink/web_tests/platform/win7/tables/mozilla/bugs/bug2479-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/win7/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index ec05a4ac..0000000 --- a/third_party/blink/web_tests/platform/win7/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?6e7956c2-9763-44f2-b5e4-328968c549a3 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win7/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/win7/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index 497ef6f4..0000000 --- a/third_party/blink/web_tests/platform/win7/virtual/plz-dedicated-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?fbdad932-d3b5-4608-8684-9a890dee255b and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win7/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt b/third_party/blink/web_tests/platform/win7/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt deleted file mode 100644 index e554361..0000000 --- a/third_party/blink/web_tests/platform/win7/virtual/plz-service-worker/external/wpt/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -This is a testharness.js-based test. -PASS subresource CORP -PASS navigation CORP -PASS COEP violation on nested frame navigation -PASS Two COEP headers, split inside report-to value -FAIL Shared worker fetch assert_unreached: A report whose blockedURL is https://www1.web-platform.test:8444/common/blank.html?6aedaa5c-82d2-47bd-9916-57545d022a23 and url is https://web-platform.test:8444/html/cross-origin-embedder-policy/resources/shared-worker.js?pipe=header(cross-origin-embedder-policy,require-corp;report-to=%22endpoint%22)|header(cross-origin-embedder-policy-report-only,require-corp;report-to=%22report-only-endpoint%22) is not found. Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/storage/websql/test-authorizer-expected.txt b/third_party/blink/web_tests/storage/websql/test-authorizer-expected.txt index 98d9c95d..1f3a673 100644 --- a/third_party/blink/web_tests/storage/websql/test-authorizer-expected.txt +++ b/third_party/blink/web_tests/storage/websql/test-authorizer-expected.txt
@@ -19,6 +19,8 @@ SQLITE_ALTER_TABLE statement succeeded. SQLITE_ALTER_TABLE statement succeeded. SQLITE_ALTER_TABLE statement succeeded. +SQLITE_ADD_COLUMN statement succeeded. +SQLITE_DROP_COLUMN statement failed: could not prepare statement (1 SQL logic error) SQLITE_TRANSACTION statement failed: could not prepare statement (23 not authorized) SQLITE_ATTACH statement failed: could not prepare statement (23 not authorized) SQLITE_DETACH statement failed: could not prepare statement (23 not authorized) @@ -59,6 +61,8 @@ SQLITE_ALTER_TABLE statement failed: could not prepare statement (1 no such table: TestTable) SQLITE_ALTER_TABLE statement failed: could not prepare statement (23 not authorized) SQLITE_ALTER_TABLE statement failed: could not prepare statement (23 not authorized) +SQLITE_ADD_COLUMN statement failed: could not prepare statement (23 not authorized) +SQLITE_DROP_COLUMN statement failed: could not prepare statement (1 no such column: "Bla") SQLITE_TRANSACTION statement failed: could not prepare statement (23 not authorized) SQLITE_ATTACH statement failed: could not prepare statement (23 not authorized) SQLITE_DETACH statement failed: could not prepare statement (23 not authorized)
diff --git a/third_party/blink/web_tests/storage/websql/test-authorizer.js b/third_party/blink/web_tests/storage/websql/test-authorizer.js index 0cef6b0..dad6331 100644 --- a/third_party/blink/web_tests/storage/websql/test-authorizer.js +++ b/third_party/blink/web_tests/storage/websql/test-authorizer.js
@@ -78,6 +78,10 @@ // Rename the column back to its original name. executeStatement(tx, "ALTER TABLE Test RENAME COLUMN Bar TO Foo;", "SQLITE_ALTER_TABLE"); + executeStatement(tx, "ALTER TABLE Test ADD COLUMN Bla int;", "SQLITE_ADD_COLUMN"); + // Dropping the just added column, this is supposed to fail. + executeStatement(tx, "ALTER TABLE Test DROP COLUMN Bla;", "SQLITE_DROP_COLUMN"); + executeStatement(tx, "BEGIN TRANSACTION;", "SQLITE_TRANSACTION"); executeStatement(tx, "ATTACH main AS TestMain;", "SQLITE_ATTACH"); executeStatement(tx, "DETACH TestMain;", "SQLITE_DETACH");
diff --git a/third_party/blink/web_tests/virtual/anonymous-iframe/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/virtual/anonymous-iframe/webexposed/global-interface-listing-expected.txt index 3bb341b..e0ea37e5 100644 --- a/third_party/blink/web_tests/virtual/anonymous-iframe/webexposed/global-interface-listing-expected.txt +++ b/third_party/blink/web_tests/virtual/anonymous-iframe/webexposed/global-interface-listing-expected.txt
@@ -5460,13 +5460,11 @@ method constructor interface MediaStreamTrackGenerator : MediaStreamTrack attribute @@toStringTag - getter readableControl getter writable method constructor interface MediaStreamTrackProcessor attribute @@toStringTag getter readable - getter writableControl method constructor interface MerchantValidationEvent : Event attribute @@toStringTag
diff --git a/third_party/blink/web_tests/virtual/coep-credentialless-origin-trial-with-worker/wpt_internal/origin_trials/coep_credentialless/driver-with-coep.https-expected.txt b/third_party/blink/web_tests/virtual/coep-credentialless-origin-trial-with-worker/wpt_internal/origin_trials/coep_credentialless/driver-with-coep.https-expected.txt index 029b632..5979c83 100644 --- a/third_party/blink/web_tests/virtual/coep-credentialless-origin-trial-with-worker/wpt_internal/origin_trials/coep_credentialless/driver-with-coep.https-expected.txt +++ b/third_party/blink/web_tests/virtual/coep-credentialless-origin-trial-with-worker/wpt_internal/origin_trials/coep_credentialless/driver-with-coep.https-expected.txt
@@ -6,7 +6,7 @@ PASS environment="service_worker" origin_trial="disabled" PASS environment="dedicated_worker" origin_trial="enabled" PASS environment="dedicated_worker" origin_trial="disabled" -FAIL environment="shared_worker" origin_trial="enabled" assert_equals: expected (undefined) undefined but got (string) "cookie" +PASS environment="shared_worker" origin_trial="enabled" PASS environment="shared_worker" origin_trial="disabled" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/virtual/coep-credentialless-origin-trial-with-worker/wpt_internal/origin_trials/coep_credentialless/driver-without-coep.https-expected.txt b/third_party/blink/web_tests/virtual/coep-credentialless-origin-trial-with-worker/wpt_internal/origin_trials/coep_credentialless/driver-without-coep.https-expected.txt index 029b632..5979c83 100644 --- a/third_party/blink/web_tests/virtual/coep-credentialless-origin-trial-with-worker/wpt_internal/origin_trials/coep_credentialless/driver-without-coep.https-expected.txt +++ b/third_party/blink/web_tests/virtual/coep-credentialless-origin-trial-with-worker/wpt_internal/origin_trials/coep_credentialless/driver-without-coep.https-expected.txt
@@ -6,7 +6,7 @@ PASS environment="service_worker" origin_trial="disabled" PASS environment="dedicated_worker" origin_trial="enabled" PASS environment="dedicated_worker" origin_trial="disabled" -FAIL environment="shared_worker" origin_trial="enabled" assert_equals: expected (undefined) undefined but got (string) "cookie" +PASS environment="shared_worker" origin_trial="enabled" PASS environment="shared_worker" origin_trial="disabled" Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/credentialless/cache-storage.tentative.https_shared_worker-expected.txt b/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/credentialless/cache-storage.tentative.https_shared_worker-expected.txt index 24adfee..1c87890 100644 --- a/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/credentialless/cache-storage.tentative.https_shared_worker-expected.txt +++ b/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/credentialless/cache-storage.tentative.https_shared_worker-expected.txt
@@ -7,7 +7,7 @@ PASS [shared_worker] unsafe-none => require-corp (omit) PASS [shared_worker] unsafe-none => require-corp + CORP PASS [shared_worker] credentialless => unsafe-none -FAIL [shared_worker] credentialless => credentialless assert_equals: expected "retrieved" but got "error" +PASS [shared_worker] credentialless => credentialless PASS [shared_worker] credentialless => require-corp PASS [shared_worker] credentialless => require-corp + CORP PASS [shared_worker] require_corp => unsafe-none
diff --git a/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/credentialless/shared-worker.tentative.https-expected.txt b/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/credentialless/shared-worker.tentative.https-expected.txt new file mode 100644 index 0000000..5f2d048 --- /dev/null +++ b/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/credentialless/shared-worker.tentative.https-expected.txt
@@ -0,0 +1,8 @@ +This is a testharness.js-based test. +PASS shared-worker +PASS fetch same-origin +PASS fetch same-origin + credentialless worker +PASS fetch cross-origin +PASS fetch cross-origin + credentialless worker +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/shared-workers.https-expected.txt b/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/shared-workers.https-expected.txt new file mode 100644 index 0000000..f3e13f6 --- /dev/null +++ b/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/shared-workers.https-expected.txt
@@ -0,0 +1,9 @@ +This is a testharness.js-based test. +PASS default policy (derived from response) +PASS "require-corp" (derived from response) +PASS default policy (derived from owner set due to use of local scheme - blob URL) +FAIL "require-corp" (derived from owner set due to use of local scheme - blob URL) assert_equals: expected "failure" but got "success" +PASS default policy (derived from owner set due to use of local scheme - data URL) +FAIL "require-corp" (derived from owner set due to use of local scheme - data URL) assert_equals: expected "failure" but got "success" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/worker-inheritance.sub.https-expected.txt b/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/worker-inheritance.sub.https-expected.txt new file mode 100644 index 0000000..3c313a3 --- /dev/null +++ b/third_party/blink/web_tests/virtual/coep-for-shared-worker/external/wpt/html/cross-origin-embedder-policy/worker-inheritance.sub.https-expected.txt
@@ -0,0 +1,12 @@ +This is a testharness.js-based test. +PASS Test that local scheme workers inherit COEP: require-corp from the creating document +PASS blob URL dedicated worker: Same origin should be allowed. +PASS blob URL dedicated worker: Cross origin should be blocked. +PASS blob URL shared worker: Same origin should be allowed. +PASS blob URL shared worker: Cross origin should be blocked. +PASS data URL dedicated worker: Same origin should be blocked. +PASS data URL dedicated worker: Cross origin should be blocked. +PASS data URL shared worker: Same origin should be blocked. +PASS data URL shared worker: Cross origin should be blocked. +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt index ac6ed6a3..24550f6d 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
@@ -5458,13 +5458,11 @@ method constructor interface MediaStreamTrackGenerator : MediaStreamTrack attribute @@toStringTag - getter readableControl getter writable method constructor interface MediaStreamTrackProcessor attribute @@toStringTag getter readable - getter writableControl method constructor interface MerchantValidationEvent : Event attribute @@toStringTag
diff --git a/third_party/blink/web_tests/webgpu/internal_cts_test_splits.pyl b/third_party/blink/web_tests/webgpu/internal_cts_test_splits.pyl index 0d987d4..3f487eb 100644 --- a/third_party/blink/web_tests/webgpu/internal_cts_test_splits.pyl +++ b/third_party/blink/web_tests/webgpu/internal_cts_test_splits.pyl
@@ -62,9 +62,9 @@ 'wpt_internal/webgpu/cts.html?q=webgpu:api,validation,resource_usages,texture,in_pass_encoder:subresources_and_binding_types_combination_for_aspect:compute=false;binding0InBundle=false;*', 'wpt_internal/webgpu/cts.html?q=webgpu:api,validation,resource_usages,texture,in_pass_encoder:subresources_and_binding_types_combination_for_aspect:compute=true;binding0InBundle=false;*', - 'wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="uint8x2";*', + 'wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="uint8x2";*', - 'wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="uint8x2";*', + 'wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="uint8x2";*', 'wpt_internal/webgpu/cts.html?q=webgpu:shader,execution,robust_access:linear_memory:storageClass="storage";storageMode="read";access="read";atomic=false;baseType="i32";*', 'wpt_internal/webgpu/cts.html?q=webgpu:shader,execution,robust_access:linear_memory:storageClass="storage";storageMode="write";access="write";atomic=false;baseType="i32";*', @@ -82,7 +82,7 @@ 'wpt_internal/webgpu/cts.html?q=webgpu:shader,execution,robust_access:linear_memory:storageClass="workgroup";access="write";atomic=false;baseType="i32";*', 'wpt_internal/webgpu/cts.html?q=webgpu:shader,execution,robust_access:linear_memory:storageClass="workgroup";access="write";atomic=true;baseType="i32";*', - 'wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="uint8x2";*', + 'wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="uint8x2";*', 'wpt_internal/webgpu/cts.html?q=webgpu:web_platform,copyToTexture,ImageBitmap:from_ImageData:alpha="none";orientation="none";dstColorFormat="rgba8unorm";*', 'wpt_internal/webgpu/cts.html?q=webgpu:web_platform,copyToTexture,ImageBitmap:from_ImageData:alpha="none";orientation="flipY";dstColorFormat="rgba8unorm";*', @@ -123,4 +123,8 @@ 'wpt_internal/webgpu/cts.html?q=webgpu:api,validation,image_copy,layout_related:required_bytes_in_copy:method="CopyB2T";format="r8unorm";*', 'wpt_internal/webgpu/cts.html?q=webgpu:api,validation,image_copy,layout_related:required_bytes_in_copy:method="CopyT2B";format="r8unorm";*', + 'wpt_internal/webgpu/cts.html?q=webgpu:api,validation,image_copy,layout_related:texel_block_alignment_on_offset:method="WriteTexture";*', + 'wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="uint8x2";*', + 'wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="uint8x2";*', + 'wpt_internal/webgpu/cts.html?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="uint8x2";*', ]
diff --git a/third_party/blink/web_tests/wpt_internal/webgpu/cts.html b/third_party/blink/web_tests/wpt_internal/webgpu/cts.html index e347bc58..918418a 100644 --- a/third_party/blink/web_tests/wpt_internal/webgpu/cts.html +++ b/third_party/blink/web_tests/wpt_internal/webgpu/cts.html
@@ -1010,97 +1010,190 @@ <meta name=variant content='?q=webgpu:api,operation,uncapturederror:iff_uncaptured:*'> <meta name=variant content='?q=webgpu:api,operation,uncapturederror:only_original_device_is_event_target:*'> <meta name=variant content='?q=webgpu:api,operation,uncapturederror:uncapturederror_from_non_originating_thread:*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="uint8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="uint8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="sint8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="sint8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="unorm8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="unorm8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="snorm8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="snorm8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="uint16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="uint16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="sint16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="sint16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="unorm16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="unorm16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="snorm16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="snorm16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="float16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="float16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="float32";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="float32x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="float32x3";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="float32x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="uint32";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="uint32x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="uint32x3";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="uint32x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="sint32";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="sint32x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="sint32x3";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertexFormat_to_shaderFormat_conversion:format="sint32x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="uint8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="uint8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="sint8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="sint8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="unorm8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="unorm8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="snorm8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="snorm8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="uint16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="uint16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="sint16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="sint16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="unorm16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="unorm16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="snorm16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="snorm16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="float16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="float16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="float32";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="float32x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="float32x3";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="float32x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="uint32";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="uint32x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="uint32x3";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="uint32x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="sint32";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="sint32x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="sint32x3";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBufferOffset_and_attributeOffset:format="sint32x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="uint8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="uint8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="sint8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="sint8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="unorm8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="unorm8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="snorm8x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="snorm8x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="uint16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="uint16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="sint16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="sint16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="unorm16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="unorm16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="snorm16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="snorm16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="float16x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="float16x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="float32";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="float32x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="float32x3";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="float32x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="uint32";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="uint32x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="uint32x3";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="uint32x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="sint32";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="sint32x2";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="sint32x3";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:nonZeroArrayStride_and_attributeOffset:format="sint32x4";*'> -<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:buffersWithVaryingStepMode:*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="uint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="uint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="sint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="sint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="unorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="unorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="snorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="snorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="uint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="uint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="sint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="sint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="unorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="unorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="snorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="snorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="float16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="float16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="float32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="float32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="float32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="float32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="uint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="uint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="uint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="uint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="sint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="sint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="sint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_format_to_shader_format_conversion:format="sint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="uint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="uint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="sint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="sint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="unorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="unorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="snorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="snorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="uint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="uint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="sint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="sint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="unorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="unorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="snorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="snorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="float16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="float16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="float32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="float32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="float32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="float32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="uint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="uint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="uint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="uint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="sint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="sint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="sint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:format="sint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="uint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="uint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="sint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="sint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="unorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="unorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="snorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="snorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="uint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="uint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="sint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="sint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="unorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="unorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="snorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="snorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="float16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="float16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="float32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="float32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="float32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="float32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="uint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="uint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="uint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="uint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="sint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="sint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="sint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:non_zero_array_stride_and_attribute_offset:format="sint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:buffers_with_varying_step_mode:*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="uint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="uint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="sint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="sint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="unorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="unorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="snorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="snorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="uint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="uint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="sint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="sint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="unorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="unorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="snorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="snorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="float16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="float16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="float32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="float32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="float32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="float32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="uint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="uint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="uint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="uint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="sint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="sint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="sint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_overlapped:format="sint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="uint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="uint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="sint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="sint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="unorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="unorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="snorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="snorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="uint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="uint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="sint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="sint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="unorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="unorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="snorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="snorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="float16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="float16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="float32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="float32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="float32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="float32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="uint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="uint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="uint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="uint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="sint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="sint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="sint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:vertex_buffer_used_multiple_times_interleaved:format="sint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:max_buffers_and_attribs:*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="uint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="uint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="sint8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="sint8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="unorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="unorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="snorm8x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="snorm8x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="uint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="uint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="sint16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="sint16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="unorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="unorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="snorm16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="snorm16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="float16x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="float16x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="float32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="float32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="float32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="float32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="uint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="uint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="uint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="uint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="sint32";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="sint32x2";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="sint32x3";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:array_stride_zero:format="sint32x4";*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:discontiguous_location_and_attribs:*'> +<meta name=variant content='?q=webgpu:api,operation,vertex_state,correctness:overlapping_attributes:*'> <meta name=variant content='?q=webgpu:api,operation,vertex_state,index_format:index_format,uint16:*'> <meta name=variant content='?q=webgpu:api,operation,vertex_state,index_format:index_format,uint32:*'> <meta name=variant content='?q=webgpu:api,operation,vertex_state,index_format:primitive_restart:*'> @@ -1447,7 +1540,9 @@ <meta name=variant content='?q=webgpu:api,validation,image_copy,layout_related:required_bytes_in_copy:method="CopyT2B";format="bc7-rgba-unorm";*'> <meta name=variant content='?q=webgpu:api,validation,image_copy,layout_related:required_bytes_in_copy:method="CopyT2B";format="bc7-rgba-unorm-srgb";*'> <meta name=variant content='?q=webgpu:api,validation,image_copy,layout_related:rows_per_image_alignment:*'> -<meta name=variant content='?q=webgpu:api,validation,image_copy,layout_related:texel_block_alignment_on_offset:*'> +<meta name=variant content='?q=webgpu:api,validation,image_copy,layout_related:texel_block_alignment_on_offset:method="WriteTexture";*'> +<meta name=variant content='?q=webgpu:api,validation,image_copy,layout_related:texel_block_alignment_on_offset:method="CopyB2T";*'> +<meta name=variant content='?q=webgpu:api,validation,image_copy,layout_related:texel_block_alignment_on_offset:method="CopyT2B";*'> <meta name=variant content='?q=webgpu:api,validation,image_copy,layout_related:bound_on_bytes_per_row:*'> <meta name=variant content='?q=webgpu:api,validation,image_copy,layout_related:bound_on_offset:*'> <meta name=variant content='?q=webgpu:api,validation,image_copy,texture_related:valid:*'>
diff --git a/third_party/sqlite/README.md b/third_party/sqlite/README.md index fd30d35..d7cda54 100644 --- a/third_party/sqlite/README.md +++ b/third_party/sqlite/README.md
@@ -70,6 +70,9 @@ Create the branch at [Gerrit/branches](https://chromium-review.googlesource.com/admin/repos/chromium/deps/sqlite,branches). + Note: To create a release branch, you must be listed as a member in the + [sqlite-owners Gerrit group](https://chromium-review.googlesource.com/admin/groups/3cb0e9e73693fd6377da67b63a28b815ef5c94cc,members) + 2. Checkout the new Chromium release branch. Get the version from the [README.chromium](https://source.chromium.org/chromium/chromium/src/+/main:third_party/sqlite/README.chromium).
diff --git a/third_party/webgpu-cts/ts_sources.txt b/third_party/webgpu-cts/ts_sources.txt index 3a55e83..b8a98eaa 100644 --- a/third_party/webgpu-cts/ts_sources.txt +++ b/third_party/webgpu-cts/ts_sources.txt
@@ -130,6 +130,7 @@ src/webgpu/api/operation/vertex_state/basic.spec.ts src/webgpu/api/operation/vertex_state/correctness.spec.ts src/webgpu/api/operation/vertex_state/index_format.spec.ts +src/webgpu/api/validation/util/command_buffer_maker.ts src/webgpu/api/validation/validation_test.ts src/webgpu/api/validation/attachment_compatibility.spec.ts src/webgpu/api/validation/createBindGroup.spec.ts
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec index 1aa8d3c..385b7436 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec
@@ -121,6 +121,10 @@ "META": {"sizes": {"includes": [10],}}, "includes": [1355], }, + "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/chromeos/enterprise_casting/resources.grd": { + "META": {"sizes": {"includes": [50]}}, + "includes": [1364], + }, "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/chromeos/emoji_picker/resources.grd": { "META": {"sizes": {"includes": [20]}}, "includes": [1365],
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 6a484d6..6d64545 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -543,8 +543,6 @@ 'Linux Chromium OS ASan LSan Builder': 'asan_lsan_chromeos_release_trybot', 'Linux ChromiumOS MSan Builder': 'chromeos_msan_release_bot', 'Linux MSan Builder': 'msan_release_bot', - # TODO(crbug.com/1200904): Remove after migration - 'Linux TSan (bionic)': 'tsan_disable_nacl_release_bot', 'Linux TSan Builder': 'tsan_disable_nacl_release_bot', 'Mac ASan 64 Builder': 'asan_minimal_symbols_disable_nacl_release_bot_dcheck_always_on', 'WebKit Linux ASAN': 'asan_lsan_release_bot_blink', @@ -1059,8 +1057,6 @@ 'linux_chromium_msan_rel_ng': 'msan_release_bot', 'linux_chromium_tsan_rel_ng': 'tsan_disable_nacl_release_trybot', - # TODO(crbug.com/1200904): Remove after migration - 'linux_chromium_tsan_rel_ng_bionic': 'tsan_disable_nacl_release_trybot', # This is intentionally a release_bot and not a release_trybot to match # the CI configuration, where no debug builder exists. @@ -2658,7 +2654,7 @@ ], 'release_bot_fuchsia': [ - 'release_bot', 'fuchsia', + 'release_bot', 'fuchsia', 'blink_disable_generated_code_formatting', ], 'release_bot_fuchsia_cast': [
diff --git a/tools/mb/mb_config_expectations/chromium.fyi.json b/tools/mb/mb_config_expectations/chromium.fyi.json index 86531ba0..46301ef 100644 --- a/tools/mb/mb_config_expectations/chromium.fyi.json +++ b/tools/mb/mb_config_expectations/chromium.fyi.json
@@ -616,6 +616,7 @@ }, "fuchsia-fyi-x64-rel": { "gn_args": { + "blink_enable_generated_code_formatting": false, "dcheck_always_on": false, "is_component_build": false, "is_debug": false,
diff --git a/tools/mb/mb_config_expectations/chromium.linux.json b/tools/mb/mb_config_expectations/chromium.linux.json index f8d2e9e..d36ece93 100644 --- a/tools/mb/mb_config_expectations/chromium.linux.json +++ b/tools/mb/mb_config_expectations/chromium.linux.json
@@ -72,6 +72,7 @@ }, "Fuchsia x64": { "gn_args": { + "blink_enable_generated_code_formatting": false, "dcheck_always_on": false, "is_component_build": false, "is_debug": false,
diff --git a/tools/mb/mb_config_expectations/chromium.memory.json b/tools/mb/mb_config_expectations/chromium.memory.json index 167c81ec..71bfed2 100644 --- a/tools/mb/mb_config_expectations/chromium.memory.json +++ b/tools/mb/mb_config_expectations/chromium.memory.json
@@ -58,16 +58,6 @@ "use_goma": true } }, - "Linux TSan (bionic)": { - "gn_args": { - "dcheck_always_on": false, - "enable_nacl": false, - "is_component_build": false, - "is_debug": false, - "is_tsan": true, - "use_goma": true - } - }, "Linux TSan Builder": { "gn_args": { "dcheck_always_on": false,
diff --git a/tools/mb/mb_config_expectations/tryserver.chromium.linux.json b/tools/mb/mb_config_expectations/tryserver.chromium.linux.json index af4dbaa5..5e16033 100644 --- a/tools/mb/mb_config_expectations/tryserver.chromium.linux.json +++ b/tools/mb/mb_config_expectations/tryserver.chromium.linux.json
@@ -978,18 +978,6 @@ "use_goma": true } }, - "linux_chromium_tsan_rel_ng_bionic": { - "gn_args": { - "blink_enable_generated_code_formatting": false, - "dcheck_always_on": true, - "enable_nacl": false, - "is_component_build": false, - "is_debug": false, - "is_tsan": true, - "symbol_level": 1, - "use_goma": true - } - }, "linux_chromium_ubsan_rel_ng": { "gn_args": { "dcheck_always_on": false,
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index e973317e..e6d49f1 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -26004,7 +26004,7 @@ <enum name="EnterpriseUploadJobSuccess"> <summary> Number of UploadJob retries as defined in - chrome/browser/chromeos/policy/upload_job_impl.cc. + chrome/browser/ash/policy/uploading/upload_job_impl.cc. </summary> <int value="0" label="No retries"/> <int value="1" label="1 retry"/> @@ -42360,6 +42360,18 @@ <int value="2" label="Periodic poll"/> </enum> +<enum name="InstallSource"> + <int value="0" label="Installed with unknown source"/> + <int value="1" + label="Installed with the system and is considered a part of the OS"/> + <int value="2" label="Installed by policy"/> + <int value="3" label="Installed by an OEM"/> + <int value="4" + label="Preinstalled by default, but is not considered a system app"/> + <int value="5" label="Installed by sync"/> + <int value="6" label="Installed by user action"/> +</enum> + <enum name="InstallStatus"> <obsolete> Removed in M88. @@ -42424,6 +42436,11 @@ <int value="70" label="DOWNGRADE_CLEANUP_UNKNOWN_OPERATION"/> </enum> +<enum name="InstallTime"> + <int value="0" label="During the init phase"/> + <int value="1" label="During the running time"/> +</enum> + <enum name="InstanceIDResult"> <int value="0" label="Success"/> <int value="1" label="Invalid parameter"/> @@ -45045,6 +45062,7 @@ <int value="19" label="Release Notes Notification"/> <int value="20" label="Full restore"/> <int value="21" label="Smart text selection context menu"/> + <int value="22" label="Discover Tab Notification"/> </enum> <enum name="LaunchType">
diff --git a/tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml b/tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml index 3a83832b..2909df0 100644 --- a/tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml +++ b/tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml
@@ -5813,21 +5813,6 @@ <affected-histogram name="Favicons.DownloadAttempts"/> </histogram_suffixes> -<histogram_suffixes name="FCMInvalidationNonSyncPerUserTopics" separator="."> -<!-- Note that the histogram "FCMInvalidations.SubscriptionResponseCodeForTopic" - also uses the SyncModelType suffixes. --> - - <suffix name="OTHER" label="OTHER"/> - <affected-histogram name="FCMInvalidations.SubscriptionResponseCodeForTopic"/> -</histogram_suffixes> - -<histogram_suffixes name="FCMInvalidationSenders" separator="."> - <suffix name="Drive" label="The message was sent with the Drive sender ID"/> - <suffix name="Policy" label="The message was sent with the Policy sender ID"/> - <suffix name="Sync" label="The message was sent with the Sync sender ID"/> - <affected-histogram name="FCMInvalidations.FCMMessageStatus"/> -</histogram_suffixes> - <histogram_suffixes name="FeedElementType" separator="."> <suffix name="CardLargeImage" label="Card with a large image"/> <suffix name="CardSmallImage" label="Card with a small image"/> @@ -6860,24 +6845,6 @@ <affected-histogram name="GCM.IgnoredWriteResult"/> </histogram_suffixes> -<histogram_suffixes name="ImageAnnotationServiceAnnotationType" separator="." - ordering="prefix"> - <suffix name="DescCaption" - label="Caption annotations from the description engine"/> - <suffix name="DescLabel" - label="Label annotations from the description engine"/> - <suffix name="DescOcr" - label="OCR (text extraction) annotations from the description engine"/> - <suffix name="DescUnknown" - label="Annotations of an unknown type from the description engine"/> - <suffix name="Ocr" - label="OCR (text extraction) annotations from the specialized OCR - engine"/> - <affected-histogram name="ImageAnnotationService.AccessibilityV1.Confidence"/> - <affected-histogram name="ImageAnnotationService.AccessibilityV1.Empty"/> - <affected-histogram name="ImageAnnotationService.AccessibilityV1.Status"/> -</histogram_suffixes> - <histogram_suffixes name="ImageDecoderFileTypes" separator="."> <obsolete> Removed as of 11/29/2016. @@ -6893,49 +6860,6 @@ <affected-histogram name="Blink.DecodedImage.YCanvasExpansion"/> </histogram_suffixes> -<histogram_suffixes name="ImageFetcherCacheStrategy" separator="."> - <suffix name="BestEffort" label="LRU cache strategy."/> - <suffix name="HoldUntilExpired" label="Hold the cache file until expired."/> - <affected-histogram name="ImageFetcher.CacheMetadataCount"/> - <affected-histogram name="ImageFetcher.CacheSize"/> -</histogram_suffixes> - -<histogram_suffixes name="ImageFetcherClients" separator="."> - <suffix name="AnswerSuggestions" - label="Showing cache patterns only for AnswerSuggestions."/> - <suffix name="AssistantDetails" - label="Showing cache patterns only for AssistantDetails."/> - <suffix name="AutofillImageFetcher" - label="Show customized card art image for credit card."/> - <suffix name="ContextualSuggestions" - label="Showing cache patterns only for ContextualSuggestions."/> - <suffix name="Cryptids" label="Asset fetcher for cryptid rendering."/> - <suffix name="EduAccountLoginProfileImageFetcher" - label="Profile image fetcher for EDU account login flow"/> - <suffix name="EntitySuggestions" - label="Showing cache patterns only for EntitySuggestions."/> - <suffix name="Feed" label="Showing cache patterns only for Feed."/> - <suffix name="Internal" label="Showing cache patterns only for Internal."/> - <suffix name="NewTabPageAnimatedLogo" - label="Showing cache patterns only for NewTabPageAnimatedLogo."/> - <suffix name="OfflinePages" - label="Showing cache patterns only for OfflinePages."/> - <suffix name="QueryTiles" label="Showing Query tiles images."/> - <suffix name="VideoTutorialsIPH" - label="Showing thumbnails for video tutorials IPH."/> - <suffix name="VideoTutorialsList" - label="Showing thumbnails for video tutorials list view."/> - <suffix name="WebNotes" - label="Images fetched and used to render Web Notes templates."/> - <affected-histogram name="ImageFetcher.Events"/> - <affected-histogram name="ImageFetcher.ImageLoadFromCacheTime"/> - <affected-histogram name="ImageFetcher.ImageLoadFromCacheTimeJava"/> - <affected-histogram name="ImageFetcher.ImageLoadFromNativeTimeJava"/> - <affected-histogram name="ImageFetcher.ImageLoadFromNetworkAfterCacheHit"/> - <affected-histogram name="ImageFetcher.ImageLoadFromNetworkTime"/> - <affected-histogram name="ImageFetcher.RequestStatusCode"/> -</histogram_suffixes> - <histogram_suffixes name="IMEAutoCorrect" separator="."> <suffix name="AC0" label="The auto-correct level is 0"/> <suffix name="AC1" label="The auto-correct level is 1"/> @@ -7027,23 +6951,6 @@ <affected-histogram name="WebCore.IndexedDB.LevelDBWriteErrors.PFE"/> </histogram_suffixes> -<histogram_suffixes name="IndexId" separator="." ordering="prefix,1"> - <suffix name="CrosSettings" label="Cros Settings"/> - <suffix name="HelpApp" label="Help App"/> - <suffix name="HelpAppLauncher" label="Help App Launcher"/> - <affected-histogram name="LocalSearchService.AddOrUpdateLatency"/> - <affected-histogram name="LocalSearchService.Backend"/> - <affected-histogram name="LocalSearchService.ClearIndexLatency"/> - <affected-histogram name="LocalSearchService.DailySearch"/> - <affected-histogram name="LocalSearchService.DeleteLatency"/> - <affected-histogram name="LocalSearchService.NumberDocuments"/> - <affected-histogram name="LocalSearchService.NumberResults"/> - <affected-histogram name="LocalSearchService.NumberSearchPerformedDone"/> - <affected-histogram name="LocalSearchService.ResponseStatus"/> - <affected-histogram name="LocalSearchService.SearchLatency"/> - <affected-histogram name="LocalSearchService.UpdateDocumentsLatency"/> -</histogram_suffixes> - <histogram_suffixes name="InputEventPredictionAccuracy" separator="."> <suffix name="Long" label="predicted time between 20 to 35ms."/> <suffix name="Middle" label="predicted time between 10 to 20ms."/> @@ -7057,14 +6964,6 @@ <affected-histogram name="Event.InputEventPrediction.Accuracy.Touch"/> </histogram_suffixes> -<histogram_suffixes name="InstallerDownloadSources" separator=""> - <suffix name="HttpPeer" label="Download Source: HTTP Peer"/> - <suffix name="HttpServer" label="Download Source: HTTP Server"/> - <suffix name="HttpsServer" label="Download Source: HTTPS Server"/> - <affected-histogram name="Installer.SuccessfulMBsDownloadedFrom"/> - <affected-histogram name="Installer.TotalMBsDownloadedFrom"/> -</histogram_suffixes> - <histogram_suffixes name="Instant" separator="_"> <suffix name="Extended" label="Suggestions + Results"/> <suffix name="Instant" label="Results"/> @@ -16021,14 +15920,6 @@ <affected-histogram name="Search.SearchEngineListedInPromoDialog.NewDevice"/> </histogram_suffixes> -<histogram_suffixes name="SecurityInterstitialLookalikeType" separator="." - ordering="prefix"> - <suffix name="lookalike" label=""/> - <affected-histogram name="interstitial.decision"/> - <affected-histogram name="interstitial.decision.repeat_visit"/> - <affected-histogram name="interstitial.interaction"/> -</histogram_suffixes> - <histogram_suffixes name="SecurityInterstitialSBType" separator="." ordering="prefix"> <suffix name="billing" label=""/>
diff --git a/tools/metrics/histograms/histograms_xml/image/histograms.xml b/tools/metrics/histograms/histograms_xml/image/histograms.xml index 3f7b3bf5..f155aa84 100644 --- a/tools/metrics/histograms/histograms_xml/image/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/image/histograms.xml
@@ -21,6 +21,56 @@ <histograms> +<variants name="ImageAnnotationServiceAnnotationType"> + <variant name="DescCaption." + summary="Caption annotations from the description engine"/> + <variant name="DescLabel." + summary="Label annotations from the description engine"/> + <variant name="DescOcr." + summary="OCR (text extraction) annotations from the description engine"/> + <variant name="DescUnknown." + summary="Annotations of an unknown type from the description engine"/> + <variant name="Ocr." + summary="OCR (text extraction) annotations from the specialized OCR + engine"/> +</variants> + +<variants name="ImageFetcherCacheStrategy"> + <variant name=".BestEffort" summary="LRU cache strategy."/> + <variant name=".HoldUntilExpired" + summary="Hold the cache file until expired."/> +</variants> + +<variants name="ImageFetcherClients"> + <variant name=".AnswerSuggestions" + summary="Showing cache patterns only for AnswerSuggestions."/> + <variant name=".AssistantDetails" + summary="Showing cache patterns only for AssistantDetails."/> + <variant name=".AutofillImageFetcher" + summary="Show customized card art image for credit card."/> + <variant name=".ContextualSuggestions" + summary="Showing cache patterns only for ContextualSuggestions."/> + <variant name=".Cryptids" summary="Asset fetcher for cryptid rendering."/> + <variant name=".EduAccountLoginProfileImageFetcher" + summary="Profile image fetcher for EDU account login flow"/> + <variant name=".EntitySuggestions" + summary="Showing cache patterns only for EntitySuggestions."/> + <variant name=".Feed" summary="Showing cache patterns only for Feed."/> + <variant name=".Internal" + summary="Showing cache patterns only for Internal."/> + <variant name=".NewTabPageAnimatedLogo" + summary="Showing cache patterns only for NewTabPageAnimatedLogo."/> + <variant name=".OfflinePages" + summary="Showing cache patterns only for OfflinePages."/> + <variant name=".QueryTiles" summary="Showing Query tiles images."/> + <variant name=".VideoTutorialsIPH" + summary="Showing thumbnails for video tutorials IPH."/> + <variant name=".VideoTutorialsList" + summary="Showing thumbnails for video tutorials list view."/> + <variant name=".WebNotes" + summary="Images fetched and used to render Web Notes templates."/> +</variants> + <histogram name="Image.ResampleMS" units="?" expires_after="M79"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <summary> @@ -52,19 +102,6 @@ </summary> </histogram> -<histogram base="true" name="ImageAnnotationService.AccessibilityV1.Confidence" - units="%" expires_after="2020-03-31"> -<!-- Name completed by histogram_suffixes name="ImageAnnotationServiceAnnotationType" --> - - <owner>amoylan@chromium.org</owner> - <owner>martis@chromium.org</owner> - <summary> - For each annotation of the given type returned by the image annotation - server, records the confidence (as a percentage) produced by the ML model - for the annotation. - </summary> -</histogram> - <histogram name="ImageAnnotationService.AccessibilityV1.DescType" enum="ImageAnnotationServiceDescType" expires_after="2020-03-31"> <owner>amoylan@chromium.org</owner> @@ -75,20 +112,6 @@ </summary> </histogram> -<histogram base="true" name="ImageAnnotationService.AccessibilityV1.Empty" - enum="BooleanEmpty" expires_after="2020-03-31"> -<!-- Name completed by histogram_suffixes name="ImageAnnotationServiceAnnotationType" --> - - <owner>amoylan@chromium.org</owner> - <owner>martis@chromium.org</owner> - <summary> - For each annotation of the given type returned by the image annotation - server, records whether or not the text of the annotation was empty. This is - sometimes valid, e.g. for text extraction (OCR) on an image that does not - contain any text. - </summary> -</histogram> - <histogram name="ImageAnnotationService.AccessibilityV1.EncodedJpegSizeKB" units="KB" expires_after="2020-03-31"> <owner>amoylan@chromium.org</owner> @@ -209,103 +232,181 @@ </summary> </histogram> -<histogram base="true" name="ImageAnnotationService.AccessibilityV1.Status" - enum="GoogleRpcCode" expires_after="2020-03-31"> -<!-- Name completed by histogram_suffixes name="ImageAnnotationServiceAnnotationType" --> +<histogram + name="ImageAnnotationService.{ImageAnnotationServiceAnnotationType}AccessibilityV1.Confidence" + units="%" expires_after="2020-03-31"> + <owner>amoylan@chromium.org</owner> + <owner>martis@chromium.org</owner> + <summary> + For each annotation of the given type returned by the image annotation + server, records the confidence (as a percentage) produced by the ML model + for the annotation. {ImageAnnotationServiceAnnotationType} + </summary> + <token key="ImageAnnotationServiceAnnotationType" + variants="ImageAnnotationServiceAnnotationType"> + <variant name=""> + <obsolete> + Base histogram. Use suffixes of this histogram instead. + </obsolete> + </variant> + </token> +</histogram> +<histogram + name="ImageAnnotationService.{ImageAnnotationServiceAnnotationType}AccessibilityV1.Empty" + enum="BooleanEmpty" expires_after="2020-03-31"> + <owner>amoylan@chromium.org</owner> + <owner>martis@chromium.org</owner> + <summary> + For each annotation of the given type returned by the image annotation + server, records whether or not the text of the annotation was empty. This is + sometimes valid, e.g. for text extraction (OCR) on an image that does not + contain any text. {ImageAnnotationServiceAnnotationType} + </summary> + <token key="ImageAnnotationServiceAnnotationType" + variants="ImageAnnotationServiceAnnotationType"> + <variant name=""> + <obsolete> + Base histogram. Use suffixes of this histogram instead. + </obsolete> + </variant> + </token> +</histogram> + +<histogram + name="ImageAnnotationService.{ImageAnnotationServiceAnnotationType}AccessibilityV1.Status" + enum="GoogleRpcCode" expires_after="2020-03-31"> <owner>amoylan@chromium.org</owner> <owner>martis@chromium.org</owner> <summary> For each annotation backend run by the image annotation server, records the - gRPC status reported. + gRPC status reported. {ImageAnnotationServiceAnnotationType} </summary> + <token key="ImageAnnotationServiceAnnotationType" + variants="ImageAnnotationServiceAnnotationType"> + <variant name=""> + <obsolete> + Base histogram. Use suffixes of this histogram instead. + </obsolete> + </variant> + </token> </histogram> -<histogram base="true" name="ImageFetcher.CacheMetadataCount" units="records" - expires_after="2022-06-01"> -<!-- Name completed by histogram_suffixes name="ImageFetcherCacheStrategy" --> - +<histogram name="ImageFetcher.CacheMetadataCount{ImageFetcherCacheStrategy}" + units="records" expires_after="2022-06-01"> <owner>fgorski@chromium.org</owner> <owner>wylieb@chromium.org</owner> <owner>xingliu@chromium.org</owner> <summary> The total number of metadata entries in the image fetcher cache metadata database for a given cache strategy. Recorded during cache eviction process. + {ImageFetcherCacheStrategy} </summary> + <token key="ImageFetcherCacheStrategy" variants="ImageFetcherCacheStrategy"> + <variant name=""> + <obsolete> + Base histogram. Use suffixes of this histogram instead. + </obsolete> + </variant> + </token> </histogram> -<histogram base="true" name="ImageFetcher.CacheSize" units="KB" +<histogram name="ImageFetcher.CacheSize{ImageFetcherCacheStrategy}" units="KB" expires_after="2022-06-01"> -<!-- Name completed by histogram_suffixes name="ImageFetcherCacheStrategy" --> - <owner>fgorski@chromium.org</owner> <owner>wylieb@chromium.org</owner> <owner>xingliu@chromium.org</owner> <summary> The total size of the cache for a given cache strategy. Recorded during - cache eviction process. + cache eviction process. {ImageFetcherCacheStrategy} </summary> + <token key="ImageFetcherCacheStrategy" variants="ImageFetcherCacheStrategy"> + <variant name=""> + <obsolete> + Base histogram. Use suffixes of this histogram instead. + </obsolete> + </variant> + </token> </histogram> -<histogram name="ImageFetcher.Events" enum="ImageFetcherEvent" - expires_after="2022-06-01"> +<histogram name="ImageFetcher.Events{ImageFetcherClients}" + enum="ImageFetcherEvent" expires_after="2022-06-01"> <owner>fgorski@chromium.org</owner> <owner>wylieb@chromium.org</owner> <summary> Events that track the lifecycle and performance of the cached_image_fetcher. The events reported include: success/failure conditions, various recoverable - errors and a couple of dead-end errors. + errors and a couple of dead-end errors. {ImageFetcherClients} </summary> + <token key="ImageFetcherClients" variants="ImageFetcherClients"> + <variant name=""/> + </token> </histogram> -<histogram name="ImageFetcher.ImageLoadFromCacheTime" units="ms" - expires_after="2022-06-01"> +<histogram name="ImageFetcher.ImageLoadFromCacheTimeJava{ImageFetcherClients}" + units="ms" expires_after="2022-06-01"> <owner>fgorski@chromium.org</owner> <owner>wylieb@chromium.org</owner> <summary> The time it takes for cached_image_fetcher to load an image from the cache - in native. + in Java. {ImageFetcherClients} </summary> + <token key="ImageFetcherClients" variants="ImageFetcherClients"> + <variant name=""/> + </token> </histogram> -<histogram name="ImageFetcher.ImageLoadFromCacheTimeJava" units="ms" - expires_after="2022-06-01"> +<histogram name="ImageFetcher.ImageLoadFromCacheTime{ImageFetcherClients}" + units="ms" expires_after="2022-06-01"> <owner>fgorski@chromium.org</owner> <owner>wylieb@chromium.org</owner> <summary> The time it takes for cached_image_fetcher to load an image from the cache - in Java. + in native. {ImageFetcherClients} </summary> + <token key="ImageFetcherClients" variants="ImageFetcherClients"> + <variant name=""/> + </token> </histogram> -<histogram name="ImageFetcher.ImageLoadFromNativeTimeJava" units="ms" - expires_after="2022-06-01"> +<histogram name="ImageFetcher.ImageLoadFromNativeTimeJava{ImageFetcherClients}" + units="ms" expires_after="2022-06-01"> <owner>fgorski@chromium.org</owner> <owner>wylieb@chromium.org</owner> <summary> The time it takes for cached_image_fetcher to load an image from native - code. Only recorded on successful loads. + code. Only recorded on successful loads. {ImageFetcherClients} </summary> + <token key="ImageFetcherClients" variants="ImageFetcherClients"> + <variant name=""/> + </token> </histogram> -<histogram name="ImageFetcher.ImageLoadFromNetworkAfterCacheHit" units="ms" - expires_after="2022-06-01"> +<histogram + name="ImageFetcher.ImageLoadFromNetworkAfterCacheHit{ImageFetcherClients}" + units="ms" expires_after="2022-06-01"> <owner>fgorski@chromium.org</owner> <owner>wylieb@chromium.org</owner> <summary> The time it takes for cached_image_fetcher to load an image from the network - after a cache hit. + after a cache hit. {ImageFetcherClients} </summary> + <token key="ImageFetcherClients" variants="ImageFetcherClients"> + <variant name=""/> + </token> </histogram> -<histogram name="ImageFetcher.ImageLoadFromNetworkTime" units="ms" - expires_after="2022-06-01"> +<histogram name="ImageFetcher.ImageLoadFromNetworkTime{ImageFetcherClients}" + units="ms" expires_after="2022-06-01"> <owner>fgorski@chromium.org</owner> <owner>wylieb@chromium.org</owner> <summary> The time it takes for cached_image_fetcher to load an image from the - network. + network. {ImageFetcherClients} </summary> + <token key="ImageFetcherClients" variants="ImageFetcherClients"> + <variant name=""/> + </token> </histogram> <histogram name="ImageFetcher.LoadImageMetadata" units="ms" @@ -317,15 +418,18 @@ </summary> </histogram> -<histogram name="ImageFetcher.RequestStatusCode" +<histogram name="ImageFetcher.RequestStatusCode{ImageFetcherClients}" enum="CombinedHttpResponseAndNetErrorCode" expires_after="2022-06-01"> <owner>fgorski@chromium.org</owner> <owner>wylieb@chromium.org</owner> <summary> Android: The integer status code of network requests made by the image data fetcher. This code includes both protocol(1xx-5xx) and non-protocol(-xxx) - errors. Recorded when a request completes. + errors. Recorded when a request completes. {ImageFetcherClients} </summary> + <token key="ImageFetcherClients" variants="ImageFetcherClients"> + <variant name=""/> + </token> </histogram> <histogram name="ImageFetcher.TimeSinceLastCacheLRUEviction" units="ms"
diff --git a/tools/metrics/histograms/histograms_xml/installer/histograms.xml b/tools/metrics/histograms/histograms_xml/installer/histograms.xml index bd3b355..7211518 100644 --- a/tools/metrics/histograms/histograms_xml/installer/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/installer/histograms.xml
@@ -21,6 +21,12 @@ <histograms> +<variants name="InstallerDownloadSources"> + <variant name="HttpPeer" summary="Download Source: HTTP Peer"/> + <variant name="HttpServer" summary="Download Source: HTTP Server"/> + <variant name="HttpsServer" summary="Download Source: HTTPS Server"/> +</variants> + <histogram name="Installer.AttemptsCount.Total" units="count" expires_after="2019-01-30"> <obsolete> @@ -194,15 +200,20 @@ </summary> </histogram> -<histogram name="Installer.SuccessfulMBsDownloadedFrom" units="MB" - expires_after="2019-01-30"> +<histogram + name="Installer.SuccessfulMBsDownloadedFrom{InstallerDownloadSources}" + units="MB" expires_after="2019-01-30"> <obsolete> Removed long time ago. Replaced by UpdateEngine metrics. </obsolete> <owner>zeuthen@chromium.org</owner> <summary> Number of MBs downloaded from during an update that completed successfully. + {InstallerDownloadSources} </summary> + <token key="InstallerDownloadSources" variants="InstallerDownloadSources"> + <variant name=""/> + </token> </histogram> <histogram name="Installer.TimeToRebootMinutes" units="Minutes" @@ -219,8 +230,8 @@ </summary> </histogram> -<histogram name="Installer.TotalMBsDownloadedFrom" units="MB" - expires_after="2019-01-30"> +<histogram name="Installer.TotalMBsDownloadedFrom{InstallerDownloadSources}" + units="MB" expires_after="2019-01-30"> <obsolete> Removed long time ago. Replaced by UpdateEngine metrics. </obsolete> @@ -228,7 +239,11 @@ <summary> Total number of MBs downloaded since the last successful update. This also includes all the bytes downloaded during any prior failed attempts. + {InstallerDownloadSources} </summary> + <token key="InstallerDownloadSources" variants="InstallerDownloadSources"> + <variant name=""/> + </token> </histogram> <histogram name="Installer.UpdateDurationMinutes" units="Minutes"
diff --git a/tools/metrics/histograms/histograms_xml/interstitial/histograms.xml b/tools/metrics/histograms/histograms_xml/interstitial/histograms.xml index 494a961..a34ddded 100644 --- a/tools/metrics/histograms/histograms_xml/interstitial/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/interstitial/histograms.xml
@@ -21,6 +21,10 @@ <histograms> +<variants name="SecurityInterstitialLookalikeType"> + <variant name="lookalike." summary=""/> +</variants> + <histogram name="interstitial.captive_portal" enum="CaptivePortalBlockingPageEvent" expires_after="M85"> <owner>meacer@chromium.org</owner> @@ -29,51 +33,6 @@ </summary> </histogram> -<histogram name="interstitial.decision" enum="SecurityInterstitialDecision" - expires_after="M94"> - <owner>estark@chromium.org</owner> - <owner>carlosil@chromium.org</owner> - <summary> - User decision when presented with a security interstitial. As of M44, - subresource interstitials were split into their own entries. As of M52, - social_engineering_ads* and social_engineering_landing* interstitial reasons - are split into their own entries from phishing*. As of M90, - social_engineering_ads* and social_engineering_landing* interstitial reasons - have been removed because they don't trigger interstitials. - - This metric is used to populate a dashboard on go/crsb-site. - </summary> -</histogram> - -<histogram name="interstitial.decision.repeat_visit" - enum="SecurityInterstitialDecision" expires_after="M94"> - <owner>carlosil@chromium.org</owner> - <owner>security-enamel@chromium.org</owner> - <summary> - User decision when presented with a security interstitial, on a site that - the user had previously visited. As of M44, subresource interstitials were - split into their own entries. As of M52, social_engineering_ads* and - social_engineering_landing* interstitial reasons are split into their own - entries from phishing*. As of M90, social_engineering_ads* and - social_engineering_landing* interstitial reasons have been removed because - they don't trigger interstitials. - </summary> -</histogram> - -<histogram name="interstitial.interaction" - enum="SecurityInterstitialInteraction" expires_after="M94"> - <owner>estark@chromium.org</owner> - <owner>carlosil@chromium.org</owner> - <summary> - User interactions with a security interstitial. As of M44, subresource - interstitials were split into their own entries. As of M52, - social_engineering_ads* and social_engineering_landing* interstitial reasons - are split into their own entries from phishing*. As of M90, - social_engineering_ads* and social_engineering_landing* interstitial reasons - have been removed because they don't trigger interstitials. - </summary> -</histogram> - <histogram name="interstitial.ssl.captive_portal" enum="SSLCaptivePortal" expires_after="M85"> <owner>meacer@chromium.org</owner> @@ -264,6 +223,66 @@ </summary> </histogram> +<histogram name="interstitial.{SecurityInterstitialLookalikeType}decision" + enum="SecurityInterstitialDecision" expires_after="M94"> + <owner>estark@chromium.org</owner> + <owner>carlosil@chromium.org</owner> + <summary> + User decision when presented with a security interstitial. As of M44, + subresource interstitials were split into their own entries. As of M52, + social_engineering_ads* and social_engineering_landing* interstitial reasons + are split into their own entries from phishing*. As of M90, + social_engineering_ads* and social_engineering_landing* interstitial reasons + have been removed because they don't trigger interstitials. + + This metric is used to populate a dashboard on go/crsb-site. + {SecurityInterstitialLookalikeType} + </summary> + <token key="SecurityInterstitialLookalikeType" + variants="SecurityInterstitialLookalikeType"> + <variant name=""/> + </token> +</histogram> + +<histogram + name="interstitial.{SecurityInterstitialLookalikeType}decision.repeat_visit" + enum="SecurityInterstitialDecision" expires_after="M94"> + <owner>carlosil@chromium.org</owner> + <owner>security-enamel@chromium.org</owner> + <summary> + User decision when presented with a security interstitial, on a site that + the user had previously visited. As of M44, subresource interstitials were + split into their own entries. As of M52, social_engineering_ads* and + social_engineering_landing* interstitial reasons are split into their own + entries from phishing*. As of M90, social_engineering_ads* and + social_engineering_landing* interstitial reasons have been removed because + they don't trigger interstitials. {SecurityInterstitialLookalikeType} + </summary> + <token key="SecurityInterstitialLookalikeType" + variants="SecurityInterstitialLookalikeType"> + <variant name=""/> + </token> +</histogram> + +<histogram name="interstitial.{SecurityInterstitialLookalikeType}interaction" + enum="SecurityInterstitialInteraction" expires_after="M94"> + <owner>estark@chromium.org</owner> + <owner>carlosil@chromium.org</owner> + <summary> + User interactions with a security interstitial. As of M44, subresource + interstitials were split into their own entries. As of M52, + social_engineering_ads* and social_engineering_landing* interstitial reasons + are split into their own entries from phishing*. As of M90, + social_engineering_ads* and social_engineering_landing* interstitial reasons + have been removed because they don't trigger interstitials. + {SecurityInterstitialLookalikeType} + </summary> + <token key="SecurityInterstitialLookalikeType" + variants="SecurityInterstitialLookalikeType"> + <variant name=""/> + </token> +</histogram> + <histogram name="TypedNavigationUpgradeThrottle.Event" enum="TypedNavigationUpgradeThrottleEvent" expires_after="2021-12-12"> <owner>meacer@chromium.org</owner>
diff --git a/tools/metrics/histograms/histograms_xml/invalidation/histograms.xml b/tools/metrics/histograms/histograms_xml/invalidation/histograms.xml index d3ecd3a..37e40ee 100644 --- a/tools/metrics/histograms/histograms_xml/invalidation/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/invalidation/histograms.xml
@@ -46,18 +46,25 @@ <summary>Net error codes for failed subscription requests.</summary> </histogram> -<histogram name="FCMInvalidations.FCMMessageStatus" +<histogram name="FCMInvalidations.FCMMessageStatus{FCMInvalidationSenders}" enum="FCMInvalidationMessageStatus" expires_after="never"> <!-- expires-never: For monitoring FCM based invalidations. --> -<!-- Name completed by histogram_suffixes name="FCMInvalidationSenders" --> - <owner>melandory@chromium.org</owner> <owner>treib@chromium.org</owner> <summary> Status of the message from the FCM channel. Recorded upon receiving response - from the FCM channel. + from the FCM channel. {FCMInvalidationSenders} </summary> + <token key="FCMInvalidationSenders"> + <variant name=""/> + <variant name=".Drive" + summary="The message was sent with the Drive sender ID"/> + <variant name=".Policy" + summary="The message was sent with the Policy sender ID"/> + <variant name=".Sync" + summary="The message was sent with the Sync sender ID"/> + </token> </histogram> <histogram name="FCMInvalidations.InitialTokenRetrievalStatus" @@ -108,7 +115,8 @@ </summary> </histogram> -<histogram name="FCMInvalidations.SubscriptionResponseCodeForTopic" +<histogram + name="FCMInvalidations.SubscriptionResponseCodeForTopic{FCMInvalidationNonSyncPerUserTopics}" enum="HttpResponseCode" expires_after="never"> <!-- expires-never: For monitoring FCM based invalidations. --> @@ -118,7 +126,12 @@ For each subcription request to the FCM Per-User-Topic server, log the response received from the server per topic. Note: This is only recorded with a data type suffix. The base version is never recorded. + {FCMInvalidationNonSyncPerUserTopics} </summary> + <token key="FCMInvalidationNonSyncPerUserTopics"> + <variant name=""/> + <variant name=".OTHER" summary="OTHER"/> + </token> </histogram> <histogram name="FCMInvalidations.TokenStateOnRegistrationRequest2"
diff --git a/tools/metrics/histograms/histograms_xml/local/histograms.xml b/tools/metrics/histograms/histograms_xml/local/histograms.xml index 46bf875..fafac2c 100644 --- a/tools/metrics/histograms/histograms_xml/local/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/local/histograms.xml
@@ -21,6 +21,12 @@ <histograms> +<variants name="IndexId"> + <variant name="CrosSettings." summary="Cros Settings"/> + <variant name="HelpApp." summary="Help App"/> + <variant name="HelpAppLauncher." summary="Help App Launcher"/> +</variants> + <variants name="LocalStorageSizes"> <variant name="" summary=""/> <variant name="1MBTo5MB" summary="DB size between 1MB and 5MB."/> @@ -47,32 +53,6 @@ </summary> </histogram> -<histogram name="LocalSearchService.AddOrUpdateLatency" units="ms" - expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - - <owner>tby@chromium.org</owner> - <owner>thanhdng@chromium.org</owner> - <owner>wrong@chromium.org</owner> - <summary> - Time taken to add/update content to the index. It is reported once for every - AddOrUpdate call. Chrome OS only. - </summary> -</histogram> - -<histogram name="LocalSearchService.Backend" enum="LocalSearchServiceBackend" - expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - - <owner>tby@chromium.org</owner> - <owner>thanhdng@chromium.org</owner> - <owner>wrong@chromium.org</owner> - <summary> - Type of backend requested from the Local Search Service. It is reported once - at the initialization of an Index. Chrome OS only. - </summary> -</histogram> - <histogram name="LocalSearchService.BindIndexHasError" enum="Boolean" expires_after="2021-12-30"> <owner>tby@chromium.org</owner> @@ -84,49 +64,6 @@ </summary> </histogram> -<histogram name="LocalSearchService.ClearIndexLatency" units="ms" - expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - - <owner>tby@chromium.org</owner> - <owner>thanhdng@chromium.org</owner> - <owner>wrong@chromium.org</owner> - <summary> - Time taken to clear all content from the index. It is reported once for - every ClearIndex call. Chrome OS only. - </summary> -</histogram> - -<histogram name="LocalSearchService.DailySearch" units="count" - expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - - <owner>tby@chromium.org</owner> - <owner>thanhdng@chromium.org</owner> - <owner>wrong@chromium.org</owner> - <summary> - Number of times the local search service has been requested to perform a - search on a device. Reported daily. The count is accumulated through the - day, spanning reboots, and sent once the system clock indicates that a full - day or more has passed since the last report. If the system is suspended or - off for more than a day, the current count will be reported the next time - the system boots, but the skipped days will not be reported. Chrome OS only. - </summary> -</histogram> - -<histogram name="LocalSearchService.DeleteLatency" units="ms" - expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - - <owner>tby@chromium.org</owner> - <owner>thanhdng@chromium.org</owner> - <owner>wrong@chromium.org</owner> - <summary> - Time taken to delete content from the index. It is reported once for every - Delete call. Chrome OS only. - </summary> -</histogram> - <histogram name="LocalSearchService.MetricsDailyEventInterval" enum="DailyEventIntervalType" expires_after="2021-12-30"> <owner>tby@chromium.org</owner> @@ -137,81 +74,162 @@ </summary> </histogram> -<histogram name="LocalSearchService.NumberDocuments" units="count" +<histogram name="LocalSearchService.{IndexId}AddOrUpdateLatency" units="ms" expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> + <owner>tby@chromium.org</owner> + <owner>thanhdng@chromium.org</owner> + <owner>wrong@chromium.org</owner> + <summary> + Time taken to add/update content to the index. It is reported once for every + AddOrUpdate call. Chrome OS only. {IndexId} + </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> +</histogram> +<histogram name="LocalSearchService.{IndexId}Backend" + enum="LocalSearchServiceBackend" expires_after="2021-12-30"> + <owner>tby@chromium.org</owner> + <owner>thanhdng@chromium.org</owner> + <owner>wrong@chromium.org</owner> + <summary> + Type of backend requested from the Local Search Service. It is reported once + at the initialization of an Index. Chrome OS only. {IndexId} + </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> +</histogram> + +<histogram name="LocalSearchService.{IndexId}ClearIndexLatency" units="ms" + expires_after="2021-12-30"> + <owner>tby@chromium.org</owner> + <owner>thanhdng@chromium.org</owner> + <owner>wrong@chromium.org</owner> + <summary> + Time taken to clear all content from the index. It is reported once for + every ClearIndex call. Chrome OS only. {IndexId} + </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> +</histogram> + +<histogram name="LocalSearchService.{IndexId}DailySearch" units="count" + expires_after="2021-12-30"> + <owner>tby@chromium.org</owner> + <owner>thanhdng@chromium.org</owner> + <owner>wrong@chromium.org</owner> + <summary> + Number of times the local search service has been requested to perform a + search on a device. Reported daily. The count is accumulated through the + day, spanning reboots, and sent once the system clock indicates that a full + day or more has passed since the last report. If the system is suspended or + off for more than a day, the current count will be reported the next time + the system boots, but the skipped days will not be reported. Chrome OS only. + {IndexId} + </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> +</histogram> + +<histogram name="LocalSearchService.{IndexId}DeleteLatency" units="ms" + expires_after="2021-12-30"> + <owner>tby@chromium.org</owner> + <owner>thanhdng@chromium.org</owner> + <owner>wrong@chromium.org</owner> + <summary> + Time taken to delete content from the index. It is reported once for every + Delete call. Chrome OS only. {IndexId} + </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> +</histogram> + +<histogram name="LocalSearchService.{IndexId}NumberDocuments" units="count" + expires_after="2021-12-30"> <owner>tby@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <owner>wrong@chromium.org</owner> <summary> Number of documents in the corpus. Recorded each time the index is updated (documents added, updated or removed) and if the index is not empty. Chrome - OS only. + OS only. {IndexId} </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> </histogram> -<histogram name="LocalSearchService.NumberResults" units="count" +<histogram name="LocalSearchService.{IndexId}NumberResults" units="count" expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - <owner>tby@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <owner>wrong@chromium.org</owner> <summary> - Number of results for each successful search. Chrome OS only. + Number of results for each successful search. Chrome OS only. {IndexId} </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> </histogram> -<histogram name="LocalSearchService.NumberSearchPerformedDone" enum="Boolean" - expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - +<histogram name="LocalSearchService.{IndexId}NumberSearchPerformedDone" + enum="Boolean" expires_after="2021-12-30"> <owner>tby@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <owner>wrong@chromium.org</owner> <summary> This is recorded each time a search is successfully performed using - LocalSearchService. Always records true. Chrome OS only. + LocalSearchService. Always records true. Chrome OS only. {IndexId} </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> </histogram> -<histogram name="LocalSearchService.ResponseStatus" +<histogram name="LocalSearchService.{IndexId}ResponseStatus" enum="LocalSearchServiceResponseStatus" expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - <owner>tby@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <owner>wrong@chromium.org</owner> <summary> - Search request response status for Cros Settings. Chrome OS only. + Search request response status for Cros Settings. Chrome OS only. {IndexId} </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> </histogram> -<histogram name="LocalSearchService.SearchLatency" units="ms" +<histogram name="LocalSearchService.{IndexId}SearchLatency" units="ms" expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - <owner>tby@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <owner>wrong@chromium.org</owner> <summary> Time taken to find search results. Only recorded if search response status - is success, i.e. neither index nor query is empty. Chrome OS only. + is success, i.e. neither index nor query is empty. Chrome OS only. {IndexId} </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> </histogram> -<histogram name="LocalSearchService.UpdateDocumentsLatency" units="ms" +<histogram name="LocalSearchService.{IndexId}UpdateDocumentsLatency" units="ms" expires_after="2021-12-30"> -<!-- Name completed by histogram_suffixes name="IndexId" --> - <owner>tby@chromium.org</owner> <owner>thanhdng@chromium.org</owner> <owner>wrong@chromium.org</owner> <summary> Time taken to update contents from the index. It is reported once for every - UpdateDocuments call. Chrome OS only. + UpdateDocuments call. Chrome OS only. {IndexId} </summary> + <token key="IndexId" variants="IndexId"> + <variant name=""/> + </token> </histogram> <histogram name="LocalStorage.BrowserLocalStorageCachePurgedInKB" units="KB"
diff --git a/tools/metrics/histograms/histograms_xml/translate/histograms.xml b/tools/metrics/histograms/histograms_xml/translate/histograms.xml index 76abaec..494627e 100644 --- a/tools/metrics/histograms/histograms_xml/translate/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/translate/histograms.xml
@@ -41,6 +41,75 @@ </summary> </histogram> +<histogram name="Translate.ApplicationStart.AlwaysTranslateLanguage" + enum="LocaleCodeISO639" expires_after="M98"> + <owner>curranmax@google.com</owner> + <owner>megjablon@google.com</owner> + <owner>chrome-language@google.com</owner> + <summary> + The language codes of the languages in the user's always translate language + list. If the user has multiple languages in this list, then a separate entry + is recorded for each language. + + This histogram is recorded when Chrome starts up using the preferences of + whatever profile is logged in at the time. + </summary> +</histogram> + +<histogram name="Translate.ApplicationStart.AlwaysTranslateLanguage.Count" + units="languages" expires_after="M98"> + <owner>curranmax@google.com</owner> + <owner>megjablon@google.com</owner> + <owner>chrome-language@google.com</owner> + <summary> + The number of languages in the user's always translate language list. + + This histogram is recorded when Chrome starts up using the preferences of + whatever profile is logged in at the time. + </summary> +</histogram> + +<histogram name="Translate.ApplicationStart.NeverTranslateLanguage" + enum="LocaleCodeISO639" expires_after="M98"> + <owner>curranmax@google.com</owner> + <owner>megjablon@google.com</owner> + <owner>chrome-language@google.com</owner> + <summary> + The language code of the languages in the user's never translate language + list. If the user has multiple languages in this list, then a separate entry + is recorded for each language. + + This histogram is recorded when Chrome starts up using the preferences of + whatever profile is logged in at the time. + </summary> +</histogram> + +<histogram name="Translate.ApplicationStart.NeverTranslateLanguage.Count" + units="languages" expires_after="M98"> + <owner>curranmax@google.com</owner> + <owner>megjablon@google.com</owner> + <owner>chrome-language@google.com</owner> + <summary> + The number of languages in the user's never translate language list. + + This histogram is recorded when Chrome starts up using the preferences of + whatever profile is logged in at the time. + </summary> +</histogram> + +<histogram name="Translate.ApplicationStart.NeverTranslateSite.Count" + units="sites" expires_after="M98"> + <owner>curranmax@google.com</owner> + <owner>megjablon@google.com</owner> + <owner>chrome-language@google.com</owner> + <summary> + The number of sites in the user's never translate site list. + + This histogram is recorded when Chrome starts up using the preferences of + whatever profile is logged in at the time. + </summary> +</histogram> + <histogram name="Translate.BubbleUiEvent" enum="TranslateBubbleUiEvent" expires_after="2021-12-12"> <owner>groby@google.com</owner>
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index e0815b3..2a1b530 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml
@@ -3864,6 +3864,91 @@ </metric> </event> +<event name="ChromeOSApp.InstalledApp"> + <owner>nancylingwang@chromium.org</owner> + <owner>dominickn@chromium.org</owner> + <summary> + Records the installed app in Chrome OS, only when the user allows app + syncing or allows sync of everything, and the user does not set up a sync + passphrase. Only ARC apps, Chrome apps and web apps(PWA), system web apps, + buildin apps are recorded. This is logged when the user installs a new app. + </summary> + <metric name="AppType" enum="AppType"> + <summary> + An enum that records the app type. + </summary> + <aggregation> + <history> + <statistics> + <enumeration/> + </statistics> + </history> + </aggregation> + </metric> + <metric name="InstallSource" enum="InstallSource"> + <summary> + An enum that records how the app was installed. + </summary> + </metric> + <metric name="InstallTime" enum="InstallTime"> + <summary> + An enum that records when the app was installed. + </summary> + </metric> + <metric name="UserDeviceMatrix" enum="UserDeviceMatrix"> + <summary> + An enum that records the user type and the device type. + </summary> + <aggregation> + <history> + <statistics> + <enumeration/> + </statistics> + </history> + </aggregation> + </metric> +</event> + +<event name="ChromeOSApp.Launch"> + <owner>nancylingwang@chromium.org</owner> + <owner>dominickn@chromium.org</owner> + <summary> + Records a launched app in Chrome OS, only when the user allows app syncing + or allows sync of everything, and the user does not set up a sync + passphrase. Only ARC apps, Chrome apps and web apps(PWA), system web apps, + buildin apps are recorded. This is logged when an app is launched. + </summary> + <metric name="AppType" enum="AppType"> + <summary> + An enum that records the app type. + </summary> + <aggregation> + <history> + <statistics> + <enumeration/> + </statistics> + </history> + </aggregation> + </metric> + <metric name="LaunchSource" enum="LaunchSource"> + <summary> + An enum that records where the app was launched. + </summary> + </metric> + <metric name="UserDeviceMatrix" enum="UserDeviceMatrix"> + <summary> + An enum that records the user type and the device type. + </summary> + <aggregation> + <history> + <statistics> + <enumeration/> + </statistics> + </history> + </aggregation> + </metric> +</event> + <event name="ChromeOSApp.UsageTime"> <owner>nancylingwang@chromium.org</owner> <owner>dominickn@chromium.org</owner>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 6200919..ad29159 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": "0b17dcefc3d3da9d145909566c7b3033c25976f9", - "remote_path": "perfetto_binaries/trace_processor_shell/win/aab2d4af0bbce0d8d5cc45202d6eec8d130dbea5/trace_processor_shell.exe" + "remote_path": "perfetto_binaries/trace_processor_shell/win/cb07e44638b99718b8c54bc19f8dbd84a3743dc6/trace_processor_shell.exe" }, "mac": { "hash": "0e2a16ceb0b94ae6cfa2ae04b066389e8f5a5dcc", - "remote_path": "perfetto_binaries/trace_processor_shell/mac/eaf4d48102375db00bf40a60ba7299bc8842b487/trace_processor_shell" + "remote_path": "perfetto_binaries/trace_processor_shell/mac/cb07e44638b99718b8c54bc19f8dbd84a3743dc6/trace_processor_shell" }, "linux": { "hash": "769df07b64589db07489e8991fdde2bb1b3a2e78", - "remote_path": "perfetto_binaries/trace_processor_shell/linux/eaf4d48102375db00bf40a60ba7299bc8842b487/trace_processor_shell" + "remote_path": "perfetto_binaries/trace_processor_shell/linux/cb07e44638b99718b8c54bc19f8dbd84a3743dc6/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/ui/android/java/res/values/semantic_colors_non_adaptive.xml b/ui/android/java/res/values/semantic_colors_non_adaptive.xml index 838c43f..7cdd68ff 100644 --- a/ui/android/java/res/values/semantic_colors_non_adaptive.xml +++ b/ui/android/java/res/values/semantic_colors_non_adaptive.xml
@@ -58,6 +58,7 @@ <color name="default_bg_color_blue_dark">@color/modern_blue_600</color> <color name="default_bg_color_blue_light">@color/modern_blue_300</color> <color name="default_scrim_color">@color/black_alpha_65</color> + <color name="incognito_card_bg_color">@color/baseline_neutral_900_with_neutral_200_alpha_5_with_primary_200_alpha_2</color> <!-- Chip Colors --> <color name="default_chip_outline_color_light">@color/modern_grey_300</color>
diff --git a/ui/base/clipboard/clipboard_format_type_aura.cc b/ui/base/clipboard/clipboard_format_type_aura.cc index 2785f6a..ec943ee6 100644 --- a/ui/base/clipboard/clipboard_format_type_aura.cc +++ b/ui/base/clipboard/clipboard_format_type_aura.cc
@@ -8,10 +8,10 @@ namespace ui { -// TODO(huangdarwin): Investigate creating a new clipboard_format_type_x11 as a -// wrapper around an X11 ::Atom. This wasn't possible in the past, because unit -// tests spawned a new X11 server for each test, meaning Atom numeric values -// didn't persist across tests. +// TODO(crbug.com/1123230): Investigate creating a new clipboard_format_type_x11 +// as a wrapper around an X11 ::Atom. This wasn't possible in the past, because +// unit tests spawned a new X11 server for each test, meaning Atom numeric +// values didn't persist across tests. ClipboardFormatType::ClipboardFormatType() = default; ClipboardFormatType::~ClipboardFormatType() = default;
diff --git a/ui/chromeos/colors/BUILD.gn b/ui/chromeos/colors/BUILD.gn index 9d52376..0d833d5f 100644 --- a/ui/chromeos/colors/BUILD.gn +++ b/ui/chromeos/colors/BUILD.gn
@@ -8,5 +8,6 @@ sources = [ "cros_colors.json5", "cros_palette.json5", + "cros_typography.json5", ] }
diff --git a/ui/chromeos/colors/cros_typography.json5 b/ui/chromeos/colors/cros_typography.json5 new file mode 100644 index 0000000..04a077a --- /dev/null +++ b/ui/chromeos/colors/cros_typography.json5
@@ -0,0 +1,46 @@ +/* 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. */ + +/* + * Chrome OS typography styles. + */ +{ + options: { + CSS: { + prefix: 'cros', + }, + }, + typography: { + font_families: { + font_family_google_sans: "'Google Sans', 'Noto Sans', sans-serif", + font_family_roboto: "Roboto, 'Noto Sans', sans-serif", + }, + typefaces: { + headline_1: { + font_family: '$font_family_google_sans', + font_size: 15, + font_weight: 500, + line_height: 22, + }, + body_2: { + font_family: '$font_family_roboto', + font_size: 13, + font_weight: 400, + line_height: 20, + }, + display_6: { + font_family: '$font_family_google_sans', + font_size: 22, + font_weight: 500, + line_height: 28, + }, + annotation_2: { + font_family: '$font_family_google_sans', + font_size: 11, + font_weight: 400, + line_height: 16, + } + } + }, +}
diff --git a/ui/file_manager/BUILD.gn b/ui/file_manager/BUILD.gn index 2495633..59ec273 100644 --- a/ui/file_manager/BUILD.gn +++ b/ui/file_manager/BUILD.gn
@@ -164,6 +164,7 @@ "file_manager/externs/background/progress_center.js", "file_manager/externs/background/task_queue.js", "file_manager/externs/background_window.js", + "file_manager/externs/banner.js", "file_manager/externs/command_handler_deps.js", "file_manager/externs/directory_change_event.js", "file_manager/externs/drive_dialog_controller.js",
diff --git a/ui/file_manager/file_manager/externs/BUILD.gn b/ui/file_manager/file_manager/externs/BUILD.gn index 1d34fd0..96da2f7 100644 --- a/ui/file_manager/file_manager/externs/BUILD.gn +++ b/ui/file_manager/file_manager/externs/BUILD.gn
@@ -21,6 +21,10 @@ deps = [ "//ui/file_manager/file_manager/externs/background:background_base" ] } +js_library("banner") { + deps = [ "//ui/file_manager/file_manager/common/js:volume_manager_types" ] +} + js_library("command_handler_deps") { deps = [ ":files_app_entry_interfaces",
diff --git a/ui/file_manager/file_manager/externs/banner.js b/ui/file_manager/file_manager/externs/banner.js new file mode 100644 index 0000000..2f22db8 --- /dev/null +++ b/ui/file_manager/file_manager/externs/banner.js
@@ -0,0 +1,79 @@ +// 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 {VolumeManagerCommon} from '../common/js/volume_manager_types.js'; + +/** + * All Banners are extended from this interface. + * @interface + */ +export class Banner { + /** + * Returns the volume types the banner where the banner is enabled. + * @return {!Array<!Banner.AllowedVolumeType>} + */ + allowedVolumeTypes() {} + + /** + * The number of Files app sessions a banner can be shown for. + * @return {number|undefined} + */ + showLimit() {} + + /** + * The seconds that a banner is to remain visible. + * @return {number|undefined} + */ + timeLimit() {} + + /** + * The size threshold to trigger a banner if it goes below. + * @return {!Banner.DiskThresholdMinSize|!Banner.DiskThresholdMinRatio|!undefined} + */ + diskThreshold() {} + + /** + * Volume types to watch if they unmount at all. + * @return {!Array<!VolumeManagerCommon.VolumeType|!undefined>} + */ + unmountedVolumeTypes() {} + + /** + * Drive connection state to trigger the banner on. + * @return {!chrome.fileManagerPrivate.DriveConnectionState|!undefined} + */ + driveConnectionState() {} + + /** + * Lifecycle method used to notify Banner implementations when they've been + * shown. + */ + onShow() {} +} + +/** + * DocumentProvider's all show as ANDROID_FILES, use the id field to match on + * the exact DocumentProvider. + * @typedef {{ + * type: VolumeManagerCommon.VolumeType, + * id: (string|null), + * }} + */ +Banner.AllowedVolumeType; + +/** + * @typedef {{ + * type: VolumeManagerCommon.VolumeType, + * minSize: number, + * }} + */ +Banner.DiskThresholdMinSize; + +/** + * @typedef {{ + * type: VolumeManagerCommon.VolumeType, + * minRatio: number, + * }} + */ +Banner.DiskThresholdMinRatio;
diff --git a/ui/file_manager/file_manager/foreground/js/BUILD.gn b/ui/file_manager/file_manager/foreground/js/BUILD.gn index 79b5809..8c2e525 100644 --- a/ui/file_manager/file_manager/foreground/js/BUILD.gn +++ b/ui/file_manager/file_manager/foreground/js/BUILD.gn
@@ -195,6 +195,10 @@ } js_library("banner_controller") { + deps = [ + "//ui/file_manager/file_manager/externs:banner", + "//ui/webui/resources/js/cr:event_target.m", + ] } js_library("mock_actions_model") {
diff --git a/ui/file_manager/file_manager/foreground/js/banner_controller.js b/ui/file_manager/file_manager/foreground/js/banner_controller.js index 3737d8c..12d7dec 100644 --- a/ui/file_manager/file_manager/foreground/js/banner_controller.js +++ b/ui/file_manager/file_manager/foreground/js/banner_controller.js
@@ -4,6 +4,8 @@ import {NativeEventTarget as EventTarget} from 'chrome://resources/js/cr/event_target.m.js'; +import {Banner} from '../../externs/banner.js'; + /** * The central component to the Banners Framework. The controller maintains the * core logic that dictates which banner should be shown as well as what events @@ -14,7 +16,9 @@ constructor() { super(); + /** @type {!Array<!Banner>} */ this.warningBanners_ = []; + /** @type {!Array<!Banner>} */ this.educationalBanners_ = []; } }
diff --git a/ui/ozone/platform/scenic/client_native_pixmap_factory_scenic.cc b/ui/ozone/platform/scenic/client_native_pixmap_factory_scenic.cc index 25bebaa9..3c393cc 100644 --- a/ui/ozone/platform/scenic/client_native_pixmap_factory_scenic.cc +++ b/ui/ozone/platform/scenic/client_native_pixmap_factory_scenic.cc
@@ -88,7 +88,7 @@ int GetStride(size_t plane) const override { DCHECK_LT(plane, handle_.planes.size()); - return handle_.planes[plane].stride; + return base::checked_cast<int>(handle_.planes[plane].stride); } private: @@ -140,6 +140,11 @@ return nullptr; } + // The stride must be a valid integer in order to be consistent with the + // gfx::ClientNativePixmap::GetStride() API. + if (!base::IsValueInRangeForNumericType<int>(handle.planes[i].stride)) + return nullptr; + base::CheckedNumeric<size_t> min_size = base::CheckedNumeric<size_t>(handle.planes[i].stride) * plane_height; if (!min_size.IsValid() || handle.planes[i].size < min_size.ValueOrDie())
diff --git a/ui/views/animation/bubble_slide_animator.cc b/ui/views/animation/bubble_slide_animator.cc index df498b8..115b71e 100644 --- a/ui/views/animation/bubble_slide_animator.cc +++ b/ui/views/animation/bubble_slide_animator.cc
@@ -47,6 +47,19 @@ slide_complete_callbacks_.Notify(this); } +void BubbleSlideAnimator::UpdateTargetBounds() { + if (is_animating()) { + // This will cause a mid-animation pop due to the fact that we're not + // resetting the starting bounds but it's not clear that it's a better + // solution than rewinding and/or changing the duration of the animation. + target_bubble_bounds_ = CalculateTargetBounds(desired_anchor_view_); + } else { + View* const anchor_view = bubble_delegate_->GetAnchorView(); + DCHECK(anchor_view); + SnapToAnchorView(anchor_view); + } +} + void BubbleSlideAnimator::StopAnimation() { slide_animation_.Stop(); desired_anchor_view_ = nullptr;
diff --git a/ui/views/animation/bubble_slide_animator.h b/ui/views/animation/bubble_slide_animator.h index 7bb92fd..8b1a2d0 100644 --- a/ui/views/animation/bubble_slide_animator.h +++ b/ui/views/animation/bubble_slide_animator.h
@@ -67,6 +67,16 @@ // bounds. void SnapToAnchorView(View* desired_anchor_view); + // Retargets the current animation or snaps the bubble to its correct size + // and position if there is no current animation. + // + // Call if the bubble contents change size in a way that would require the + // bubble to be resized/repositioned. If you would like a new animation to + // always play to the new bounds, call AnimateToAnchorView() instead. + // + // Note: This method expects the bubble to have a valid anchor view. + void UpdateTargetBounds(); + // Stops the animation without snapping the widget to a particular anchor // view. void StopAnimation();
diff --git a/ui/views/bubble/bubble_dialog_delegate_view.cc b/ui/views/bubble/bubble_dialog_delegate_view.cc index df8b82a..1bafbc0 100644 --- a/ui/views/bubble/bubble_dialog_delegate_view.cc +++ b/ui/views/bubble/bubble_dialog_delegate_view.cc
@@ -351,6 +351,21 @@ this}; }; +class BubbleDialogDelegate::ThemeObserver : public ViewObserver { + public: + explicit ThemeObserver(BubbleDialogDelegate* delegate) : delegate_(delegate) { + observation_.Observe(delegate->GetContentsView()); + } + + void OnViewThemeChanged(views::View* view) override { + delegate_->UpdateColorsFromTheme(); + } + + private: + BubbleDialogDelegate* const delegate_; + base::ScopedObservation<View, ViewObserver> observation_{this}; +}; + BubbleDialogDelegate::BubbleDialogDelegate(View* anchor_view, BubbleBorder::Arrow arrow, BubbleBorder::Shadow shadow) @@ -364,6 +379,16 @@ set_margins(layout_provider->GetDialogInsetsForContentType( DialogContentType::kText, DialogContentType::kText)); set_title_margins(layout_provider->GetInsetsMetric(INSETS_DIALOG_TITLE)); + + RegisterWidgetInitializedCallback(base::BindOnce( + [](BubbleDialogDelegate* bubble_delegate) { + bubble_delegate->theme_observer_ = + std::make_unique<ThemeObserver>(bubble_delegate); + // Call the theme callback to make sure the initial theme is picked up + // by the BubbleDialogDelegate. + bubble_delegate->UpdateColorsFromTheme(); + }, + this)); } BubbleDialogDelegate::~BubbleDialogDelegate() { @@ -714,13 +739,6 @@ return gfx::Size(); } -void BubbleDialogDelegateView::OnThemeChanged() { - View::OnThemeChanged(); - UpdateColorsFromTheme(); -} - -void BubbleDialogDelegateView::Init() {} - void BubbleDialogDelegate::SetAnchorView(View* anchor_view) { if (anchor_view && anchor_view->GetWidget()) { anchor_widget_observer_ = @@ -784,9 +802,11 @@ GetWidget()->SetBounds(bubble_bounds); } -void BubbleDialogDelegateView::UpdateColorsFromTheme() { +void BubbleDialogDelegate::UpdateColorsFromTheme() { + View* const contents_view = GetContentsView(); + DCHECK(contents_view); if (!color_explicitly_set()) { - set_color_internal(GetNativeTheme()->GetSystemColor( + set_color_internal(contents_view->GetNativeTheme()->GetSystemColor( ui::NativeTheme::kColorId_BubbleBackground)); } BubbleFrameView* frame_view = GetBubbleFrameView(); @@ -795,9 +815,10 @@ // When there's an opaque layer, the bubble border background won't show // through, so explicitly paint a background color. - SetBackground(layer() && layer()->fills_bounds_opaquely() - ? CreateSolidBackground(color()) - : nullptr); + contents_view->SetBackground( + contents_view->layer() && contents_view->layer()->fills_bounds_opaquely() + ? CreateSolidBackground(color()) + : nullptr); } void BubbleDialogDelegate::OnBubbleWidgetVisibilityChanged(bool visible) {
diff --git a/ui/views/bubble/bubble_dialog_delegate_view.h b/ui/views/bubble/bubble_dialog_delegate_view.h index da1059a4..a428233 100644 --- a/ui/views/bubble/bubble_dialog_delegate_view.h +++ b/ui/views/bubble/bubble_dialog_delegate_view.h
@@ -285,6 +285,7 @@ class AnchorViewObserver; class AnchorWidgetObserver; class BubbleWidgetObserver; + class ThemeObserver; FRIEND_TEST_ALL_PREFIXES(BubbleDialogDelegateViewTest, VisibleWidgetShowsInkDropOnAttaching); @@ -298,6 +299,7 @@ friend class AnchorViewObserver; friend class AnchorWidgetObserver; friend class BubbleWidgetObserver; + friend class ThemeObserver; friend class BubbleBorderDelegate; friend class BubbleWindowTargeter; @@ -316,6 +318,9 @@ void OnDeactivate(); + // Update the bubble color from the NativeTheme unless it was explicitly set. + void UpdateColorsFromTheme(); + // Notify this bubble that it is now the primary anchored bubble. When a new // bubble becomes the primary anchor, the previous primary silently loses its // primary status. This method is only called when this bubble becomes primary @@ -333,6 +338,7 @@ std::unique_ptr<AnchorViewObserver> anchor_view_observer_; std::unique_ptr<AnchorWidgetObserver> anchor_widget_observer_; std::unique_ptr<BubbleWidgetObserver> bubble_widget_observer_; + std::unique_ptr<ThemeObserver> theme_observer_; bool adjust_if_offscreen_ = true; bool focus_traversable_from_anchor_view_ = true; ViewTracker highlighted_button_tracker_; @@ -405,17 +411,9 @@ gfx::Size GetMinimumSize() const final; gfx::Size GetMaximumSize() const final; - void OnThemeChanged() override; - - // Perform view initialization on the contents for bubble sizing. - void Init() override; - private: FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CreateDelegate); FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, NonClientHitTest); - - // Update the bubble color from the NativeTheme unless it was explicitly set. - void UpdateColorsFromTheme(); }; BEGIN_VIEW_BUILDER(VIEWS_EXPORT, BubbleDialogDelegateView, View)
diff --git a/ui/views/controls/menu/menu_delegate.cc b/ui/views/controls/menu/menu_delegate.cc index 470a889..639ad927 100644 --- a/ui/views/controls/menu/menu_delegate.cc +++ b/ui/views/controls/menu/menu_delegate.cc
@@ -22,7 +22,13 @@ return std::u16string(); } -void MenuDelegate::GetLabelStyle(int id, LabelStyle* style) const {} +const gfx::FontList* MenuDelegate::GetLabelFontList(int id) const { + return nullptr; +} + +absl::optional<SkColor> MenuDelegate::GetLabelColor(int id) const { + return absl::nullopt; +} std::u16string MenuDelegate::GetTooltipText( int id,
diff --git a/ui/views/controls/menu/menu_delegate.h b/ui/views/controls/menu/menu_delegate.h index b47a6199..9c1542e 100644 --- a/ui/views/controls/menu/menu_delegate.h +++ b/ui/views/controls/menu/menu_delegate.h
@@ -8,11 +8,10 @@ #include <set> #include <string> -#include "third_party/skia/include/core/SkColor.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/base/dragdrop/mojom/drag_drop_types.mojom-forward.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/ui_base_types.h" -#include "ui/gfx/font_list.h" #include "ui/views/controls/menu/menu_runner.h" #include "ui/views/controls/menu/menu_types.h" #include "ui/views/view.h" @@ -60,12 +59,6 @@ kOn }; - // Used when indicating the style for a given label. - struct LabelStyle { - gfx::FontList font_list; - SkColor foreground; - }; - virtual ~MenuDelegate(); // Whether or not an item should be shown as checked. This is invoked for @@ -76,9 +69,9 @@ // added with an empty label. virtual std::u16string GetLabel(int id) const; - // The style for the label with the given |id|. Implementations may update any - // parts of |style| or leave it unmodified. - virtual void GetLabelStyle(int id, LabelStyle* style) const; + // The font and color for the menu item label. + virtual const gfx::FontList* GetLabelFontList(int id) const; + virtual absl::optional<SkColor> GetLabelColor(int id) const; // The tooltip shown for the menu item. This is invoked when the user // hovers over the item, and no tooltip text has been set for that item.
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc index 039cbc90..845be15 100644 --- a/ui/views/controls/menu/menu_item_view.cc +++ b/ui/views/controls/menu/menu_item_view.cc
@@ -915,20 +915,24 @@ return flags; } -void MenuItemView::GetLabelStyle(MenuDelegate::LabelStyle* style) const { - // Start with the default font: - style->font_list = MenuConfig::instance().font_list; - - // Replace it with the touchable font in touchable menus: - if (GetMenuController() && GetMenuController()->use_touchable_layout()) { - style->font_list = - style::GetFont(style::CONTEXT_TOUCH_MENU, style::STYLE_PRIMARY); +const gfx::FontList MenuItemView::GetFontList() const { + if (const MenuDelegate* delegate = GetDelegate()) { + if (const gfx::FontList* font_list = + delegate->GetLabelFontList(GetCommand())) { + return *font_list; + } } + if (GetMenuController() && GetMenuController()->use_touchable_layout()) + return style::GetFont(style::CONTEXT_TOUCH_MENU, style::STYLE_PRIMARY); + return MenuConfig::instance().font_list; +} - // Then let the delegate replace any part of |style|. - const MenuDelegate* delegate = GetDelegate(); - if (delegate) - delegate->GetLabelStyle(GetCommand(), style); +const absl::optional<SkColor> MenuItemView::GetMenuLabelColor() const { + if (const MenuDelegate* delegate = GetDelegate()) { + if (const auto& label_color = delegate->GetLabelColor(GetCommand())) + return label_color; + } + return absl::nullopt; } void MenuItemView::AddEmptyMenus() { @@ -977,17 +981,18 @@ PaintBackground(canvas, mode, render_selection); // Calculate some colors. - MenuDelegate::LabelStyle style; - style.foreground = GetTextColor(/*minor=*/false, render_selection); - GetLabelStyle(&style); + SkColor fg_color = GetTextColor(/*minor=*/false, render_selection); + if (const auto& label_color = GetMenuLabelColor()) + fg_color = label_color.value(); + SkColor icon_color = color_utils::DeriveDefaultIconColor(fg_color); - SkColor icon_color = color_utils::DeriveDefaultIconColor(style.foreground); + const gfx::FontList& font_list = GetFontList(); // Calculate the margins. int top_margin = GetTopMargin(); const int bottom_margin = GetBottomMargin(); const int available_height = height() - top_margin - bottom_margin; - const int text_height = style.font_list.GetHeight(); + const int text_height = font_list.GetHeight(); const int total_text_height = secondary_title().empty() ? text_height : text_height * 2; top_margin += (available_height - total_text_height) / 2; @@ -1018,25 +1023,25 @@ int flags = GetDrawStringFlags(); if (mode == PaintButtonMode::kForDrag) flags |= gfx::Canvas::NO_SUBPIXEL_RENDERING; - canvas->DrawStringRectWithFlags(title(), style.font_list, style.foreground, - text_bounds, flags); + canvas->DrawStringRectWithFlags(title(), font_list, fg_color, text_bounds, + flags); // The rest should be drawn with the minor foreground color. - style.foreground = GetTextColor(/*minor=*/true, render_selection); + fg_color = GetTextColor(/*minor=*/true, render_selection); if (!secondary_title().empty()) { text_bounds.set_y(text_bounds.y() + text_height); - canvas->DrawStringRectWithFlags(secondary_title(), style.font_list, - style.foreground, text_bounds, flags); + canvas->DrawStringRectWithFlags(secondary_title(), font_list, fg_color, + text_bounds, flags); } - PaintMinorIconAndText(canvas, style); + PaintMinorIconAndText(canvas, fg_color); if (ShouldShowNewBadge()) { NewBadge::DrawNewBadge(canvas, this, label_start + - gfx::GetStringWidth(title(), style.font_list) + + gfx::GetStringWidth(title(), font_list) + NewBadge::kNewBadgeHorizontalMargin, - top_margin, style.font_list); + top_margin, font_list); } // Set the submenu indicator (arrow) image and color. @@ -1099,9 +1104,7 @@ } } -void MenuItemView::PaintMinorIconAndText( - gfx::Canvas* canvas, - const MenuDelegate::LabelStyle& style) { +void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { std::u16string minor_text = GetMinorText(); const ui::ImageModel minor_icon = GetMinorIcon(); if (minor_text.empty() && minor_icon.IsEmpty()) @@ -1123,8 +1126,8 @@ gfx::RenderText::CreateRenderText(); if (!minor_text.empty()) { render_text->SetText(minor_text); - render_text->SetFontList(style.font_list); - render_text->SetColor(style.foreground); + render_text->SetFontList(GetFontList()); + render_text->SetColor(color); render_text->SetDisplayRect(minor_text_bounds); render_text->SetHorizontalAlignment(base::i18n::IsRTL() ? gfx::ALIGN_LEFT : gfx::ALIGN_RIGHT); @@ -1233,8 +1236,7 @@ dimensions.children_width = child_size.width(); const MenuConfig& menu_config = MenuConfig::instance(); - MenuDelegate::LabelStyle style; - GetLabelStyle(&style); + const gfx::FontList& font_list = GetFontList(); if (GetMenuController() && GetMenuController()->use_touchable_layout()) { dimensions.height = menu_config.touchable_menu_height; @@ -1249,7 +1251,7 @@ // Calculate total item width to make sure the current |title_| // has enough room within the context menu. int label_start = GetLabelStartForThisItem(); - int string_width = gfx::GetStringWidth(title_, style.font_list); + int string_width = gfx::GetStringWidth(title_, font_list); int item_width = string_width + label_start + item_right_margin_; item_width = std::max(item_width, menu_config.touchable_menu_min_width); @@ -1285,24 +1287,22 @@ dimensions.height += GetBottomMargin() + GetTopMargin(); - int string_width = gfx::GetStringWidth(title_, style.font_list); + int string_width = gfx::GetStringWidth(title_, font_list); int label_start = GetLabelStartForThisItem(); dimensions.standard_width = string_width + label_start + item_right_margin_; // Determine the length of the right-side text. dimensions.minor_text_width = - (minor_text.empty() ? 0 - : gfx::GetStringWidth(minor_text, style.font_list)); + (minor_text.empty() ? 0 : gfx::GetStringWidth(minor_text, font_list)); if (ShouldShowNewBadge()) dimensions.minor_text_width += - NewBadge::GetNewBadgeSize(style.font_list).width() + + NewBadge::GetNewBadgeSize(font_list).width() + 2 * NewBadge::kNewBadgeHorizontalMargin; // Determine the height to use. - int label_text_height = secondary_title().empty() - ? style.font_list.GetHeight() - : style.font_list.GetHeight() * 2; + int label_text_height = secondary_title().empty() ? font_list.GetHeight() + : font_list.GetHeight() * 2; dimensions.height = std::max(dimensions.height, label_text_height + GetBottomMargin() + GetTopMargin());
diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h index 224401e..dbedad8 100644 --- a/ui/views/controls/menu/menu_item_view.h +++ b/ui/views/controls/menu/menu_item_view.h
@@ -26,6 +26,10 @@ #include <windows.h> #endif +namespace gfx { +class FontList; +} // namespace gfx + namespace views { namespace internal { @@ -402,8 +406,9 @@ // Returns the flags passed to DrawStringRect. int GetDrawStringFlags(); - // Returns the style for the menu text. - void GetLabelStyle(MenuDelegate::LabelStyle* style) const; + // Returns the font list and font color to use for menu text. + const gfx::FontList GetFontList() const; + const absl::optional<SkColor> GetMenuLabelColor() const; // If this menu item has no children a child is added showing it has no // children. Otherwise AddEmtpyMenus is recursively invoked on child menu @@ -428,8 +433,7 @@ bool render_selection); // Paints the right-side icon and text. - void PaintMinorIconAndText(gfx::Canvas* canvas, - const MenuDelegate::LabelStyle& style); + void PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color); // Destroys the window used to display this menu and recursively destroys // the windows used to display all descendants. @@ -494,9 +498,6 @@ void invalidate_dimensions() { dimensions_.height = 0; } bool is_dimensions_valid() const { return dimensions_.height > 0; } - SkColor GetMinorIconColor( - const MenuDelegate::LabelStyle& default_style) const; - // The delegate. This is only valid for the root menu item. You shouldn't // use this directly, instead use GetDelegate() which walks the tree as // as necessary.
diff --git a/ui/views/controls/menu/menu_model_adapter.cc b/ui/views/controls/menu/menu_model_adapter.cc index 895745c..aa0c17c4 100644 --- a/ui/views/controls/menu/menu_model_adapter.cc +++ b/ui/views/controls/menu/menu_model_adapter.cc
@@ -201,19 +201,17 @@ return std::u16string(); } -void MenuModelAdapter::GetLabelStyle(int id, LabelStyle* style) const { +const gfx::FontList* MenuModelAdapter::GetLabelFontList(int id) const { ui::MenuModel* model = menu_model_; int index = 0; if (ui::MenuModel::GetModelAndIndexForCommandId(id, &model, &index)) { const gfx::FontList* font_list = model->GetLabelFontListAt(index); - if (font_list) { - style->font_list = *font_list; - return; - } + if (font_list) + return font_list; } // This line may be reached for the empty menu item. - return MenuDelegate::GetLabelStyle(id, style); + return MenuDelegate::GetLabelFontList(id); } bool MenuModelAdapter::IsCommandEnabled(int id) const {
diff --git a/ui/views/controls/menu/menu_model_adapter.h b/ui/views/controls/menu/menu_model_adapter.h index 76a9001..380794d 100644 --- a/ui/views/controls/menu/menu_model_adapter.h +++ b/ui/views/controls/menu/menu_model_adapter.h
@@ -80,7 +80,7 @@ bool IsTriggerableEvent(MenuItemView* source, const ui::Event& e) override; bool GetAccelerator(int id, ui::Accelerator* accelerator) const override; std::u16string GetLabel(int id) const override; - void GetLabelStyle(int id, LabelStyle* style) const override; + const gfx::FontList* GetLabelFontList(int id) const override; bool IsCommandEnabled(int id) const override; bool IsCommandVisible(int id) const override; bool IsItemChecked(int id) const override;