diff --git a/DEPS b/DEPS index 3af41afc..7362a9e 100644 --- a/DEPS +++ b/DEPS
@@ -308,11 +308,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'src_internal_revision': '5fb766e4a38b8e77fc63d347b829a1903c23a919', + 'src_internal_revision': '6365d276cb6ee8b2d6992bcc8699f3e1eff7fe3b', # 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': '50ac1117f1597d57faf9ae5360ad95029c515f97', + 'skia_revision': '429ec245f4e27938291b8ef02ec680d527cede72', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. @@ -320,7 +320,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '6557da03c85eee30448e1fefc2d89bdc348c580d', + 'angle_revision': '2a29410364fbb00c54948db6dd2bf334c0c06e1b', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -387,7 +387,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling chromium_variations # and whatever else without interference from each other. - 'chromium_variations_revision': '47c10caafe8f3d47ecdb1ed24e287da7a7e6925f', + 'chromium_variations_revision': '1b58345810cd9c9a284efbe6312e1fa7305acd71', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling CrossBench # and whatever else without interference from each other. @@ -403,7 +403,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': '4e11c8801f7a4e8e9f7b94f6acd4155cbe0a5e57', + 'devtools_frontend_revision': '992d7c0261d554c330dff6900d859cf0faae604c', # 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. @@ -427,7 +427,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': 'b5d89266d090eb586b756294ea09e4beb0c06bcb', + 'dawn_revision': '52f760b3669485c4b8517559f666efd1e3e3defe', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -506,7 +506,7 @@ 'libcxx_revision': 'e3b94d0e5b86883fd77696bf10dc33ba250ba99b', # GN CIPD package version. - 'gn_version': 'git_revision:d823fd85da3fb83146f734377da454473b93a2b2', + 'gn_version': 'git_revision:155c53952ec2dc324b0438ce5b9bd4a286577d25', # ninja CIPD package version. # https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja @@ -827,7 +827,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - '8b6ec119f001eb5ad89d77c153fa132bd65801c0', + 'c484a2f33da87a075ba1c80976bf051a5a7d5389', 'condition': 'checkout_android and checkout_src_internal', }, @@ -1198,7 +1198,7 @@ Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), 'src/third_party/devtools-frontend-internal': { - 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + '120296784c3ee38e176618378479e2d63ab4deaf', + 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + 'dd85fd08b6f8a3bdcb460e33d09ed333c7031f0c', 'condition': 'checkout_src_internal', }, @@ -1663,7 +1663,7 @@ Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'), 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '3f2b2b6385d24f80239a7c49d464a06292fbd078', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '4a7dde609d9ddb8d5212ab4c83a86aba10f7ac4c', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '8ef97ff3b7332e38e61b347a2fbed425a4617151', @@ -1811,7 +1811,7 @@ 'dep_type': 'cipd', }, - 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@ea0fb515f594700d7fc4cbfff49268f596de4984', + 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@8dc5cb57074c42295aa647ea407e1adb85f6ec93', 'src/third_party/vulkan_memory_allocator': Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git' + '@' + '56300b29fbfcc693ee6609ddad3fdd5b7a449a21', @@ -1851,7 +1851,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '3f94329188723ae92fc1bdefbcacd659fed2aa8b', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'd86c0cdbde7261deefc5771f41a14186bac9fd09', + Var('webrtc_git') + '/src.git' + '@' + '501c4f37bfee47b26999ee291c5355ad64554df7', # Wuffs' canonical repository is at github.com/google/wuffs, but we use # Skia's mirror of Wuffs, the same as in upstream Skia's DEPS file. @@ -3917,7 +3917,7 @@ 'src/chrome/browser/internal': { 'url': Var('chrome_git') + '/chrome/browser_internal.git' + '@' + - 'e7816b8613ca95f58086a77a57eadf4c373abd89', + '60534f5aba8ad7e5ddd9d939a92c3b31bd7bfd6c', 'condition': 'checkout_src_internal', }, @@ -4042,7 +4042,7 @@ 'src/components/autofill/core/browser/form_parsing/internal_resources': { 'url': Var('chrome_git') + '/chrome/components/autofill_regex_patterns.git' + '@' + - '59b2cefdb32a4c90676b95e5d5464dbc8595b13e', + 'f2fd9f234b258490267ff5b5d6fda54fa9dacfe6', 'condition': 'checkout_src_internal', }, @@ -4101,7 +4101,7 @@ 'src/components/test/data/autofill/heuristics-json/internal': { 'url': Var('chrome_git') + '/chrome/test/autofill/structured_forms.git' + '@' + - '6591e633c04b874832949a40770684f2b91125fe', + '473c84dc5736e2cd3fc80f8493cd30684357c847', 'condition': 'checkout_chromium_autofill_test_dependencies', },
diff --git a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java index fa84d0e..89a87921e 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java +++ b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
@@ -313,6 +313,9 @@ AutofillFeatures.AUTOFILL_USE_MX_ADDRESS_MODEL, "When enabled, Autofill uses a custom address model for Mexico."), Flag.baseFeature( + AutofillFeatures.AUTOFILL_USE_PL_ADDRESS_MODEL, + "When enabled, Autofill uses a custom address model for Poland."), + Flag.baseFeature( AutofillFeatures.AUTOFILL_DEFAULT_TO_CITY_AND_NUMBER, "When enabled, Autofill heuristics will prioritize filling phone numbers in " + "local format, not in international format."),
diff --git a/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt b/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt index 55f1fc4..ecdbbe61 100644 --- a/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt +++ b/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
@@ -1,7 +1,4 @@ This test documents all interface attributes and methods on the global window object and element instances. - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - [INTERFACES] interface AbortController attribute @@toStringTag @@ -9,14 +6,27 @@ method abort method constructor interface AbortSignal : EventTarget + static method abort + static method any + static method timeout attribute @@toStringTag getter aborted getter onabort + getter reason method constructor + method throwIfAborted setter onabort interface AbsoluteOrientationSensor : OrientationSensor attribute @@toStringTag method constructor +interface AbstractRange + attribute @@toStringTag + getter collapsed + getter endContainer + getter endOffset + getter startContainer + getter startOffset + method constructor interface Accelerometer : Sensor attribute @@toStringTag getter x @@ -43,17 +53,26 @@ attribute @@toStringTag getter currentTime getter effect + getter finished getter id getter oncancel getter onfinish + getter onremove getter pending getter playState getter playbackRate + getter rangeEnd + getter rangeStart + getter ready + getter replaceState getter startTime + getter timeline method cancel + method commitStyles method constructor method finish method pause + method persist method play method reverse method updatePlaybackRate @@ -62,8 +81,12 @@ setter id setter oncancel setter onfinish + setter onremove setter playbackRate + setter rangeEnd + setter rangeStart setter startTime + setter timeline interface AnimationEffect attribute @@toStringTag method constructor @@ -76,41 +99,15 @@ getter elapsedTime getter pseudoElement method constructor -interface ApplicationCache : EventTarget +interface AnimationPlaybackEvent : Event attribute @@toStringTag - attribute CHECKING - attribute DOWNLOADING - attribute IDLE - attribute OBSOLETE - attribute UNCACHED - attribute UPDATEREADY - getter oncached - getter onchecking - getter ondownloading - getter onerror - getter onnoupdate - getter onobsolete - getter onprogress - getter onupdateready - getter status - method abort + getter currentTime + getter timelineTime method constructor - method swapCache - method update - setter oncached - setter onchecking - setter ondownloading - setter onerror - setter onnoupdate - setter onobsolete - setter onprogress - setter onupdateready -interface ApplicationCacheErrorEvent : Event +interface AnimationTimeline attribute @@toStringTag - getter message - getter reason - getter status - getter url + getter currentTime + getter duration method constructor interface Attr : Node attribute @@toStringTag @@ -153,14 +150,62 @@ interface AudioContext : BaseAudioContext attribute @@toStringTag getter baseLatency + getter onsinkchange + getter outputLatency + getter sinkId method close method constructor + method createMediaElementSource + method createMediaStreamDestination + method createMediaStreamSource method getOutputTimestamp + method resume + method setSinkId method suspend + setter onsinkchange +interface AudioData + attribute @@toStringTag + getter duration + getter format + getter numberOfChannels + getter numberOfFrames + getter sampleRate + getter timestamp + method allocationSize + method clone + method close + method constructor + method copyTo +interface AudioDecoder : EventTarget + static method isConfigSupported + attribute @@toStringTag + getter decodeQueueSize + getter ondequeue + getter state + method close + method configure + method constructor + method decode + method flush + method reset + setter ondequeue interface AudioDestinationNode : AudioNode attribute @@toStringTag getter maxChannelCount method constructor +interface AudioEncoder : EventTarget + static method isConfigSupported + attribute @@toStringTag + getter encodeQueueSize + getter ondequeue + getter state + method close + method configure + method constructor + method encode + method flush + method reset + setter ondequeue interface AudioListener attribute @@toStringTag getter forwardX @@ -230,6 +275,10 @@ method start method stop setter onended +interface AudioSinkInfo + attribute @@toStringTag + getter type + method constructor interface AudioWorklet : Worklet attribute @@toStringTag method constructor @@ -324,6 +373,19 @@ getter data getter timecode method constructor +interface BroadcastChannel : EventTarget + attribute @@toStringTag + getter name + getter onmessage + getter onmessageerror + method close + method constructor + method postMessage + setter onmessage + setter onmessageerror +interface BrowserCaptureMediaStreamTrack : MediaStreamTrack + attribute @@toStringTag + method constructor interface ByteLengthQueuingStrategy attribute @@toStringTag getter highWaterMark @@ -332,50 +394,55 @@ interface CDATASection : Text attribute @@toStringTag method constructor -interface CSS - static getter paintWorklet - static method Hz - static method Q - static method ch - static method cm - static method deg - static method dpcm - static method dpi - static method dppx - static method em - static method escape - static method ex - static method fr - static method grad - static method in - static method kHz - static method mm - static method ms - static method number - static method pc - static method percent - static method pt - static method px - static method rad - static method registerProperty - static method rem - static method s - static method supports - static method turn - static method vh - static method vmax - static method vmin - static method vw +interface CSSAnimation : Animation attribute @@toStringTag + getter animationName method constructor interface CSSConditionRule : CSSGroupingRule attribute @@toStringTag getter conditionText method constructor +interface CSSContainerRule : CSSConditionRule + attribute @@toStringTag + getter containerName + getter containerQuery + method constructor +interface CSSCounterStyleRule : CSSRule + attribute @@toStringTag + getter additiveSymbols + getter fallback + getter name + getter negative + getter pad + getter prefix + getter range + getter speakAs + getter suffix + getter symbols + getter system + method constructor + setter additiveSymbols + setter fallback + setter name + setter negative + setter pad + setter prefix + setter range + setter speakAs + setter suffix + setter symbols + setter system interface CSSFontFaceRule : CSSRule attribute @@toStringTag getter style method constructor +interface CSSFontPaletteValuesRule : CSSRule + attribute @@toStringTag + getter basePalette + getter fontFamily + getter name + getter overrideColors + method constructor interface CSSGroupingRule : CSSRule attribute @@toStringTag getter cssRules @@ -388,8 +455,10 @@ interface CSSImportRule : CSSRule attribute @@toStringTag getter href + getter layerName getter media getter styleSheet + getter supportsText method constructor setter media interface CSSKeyframeRule : CSSRule @@ -402,7 +471,9 @@ interface CSSKeyframesRule : CSSRule attribute @@toStringTag getter cssRules + getter length getter name + method @@iterator method appendRule method constructor method deleteRule @@ -413,6 +484,20 @@ getter value method constructor setter value +interface CSSLayerBlockRule : CSSGroupingRule + attribute @@toStringTag + getter name + method constructor +interface CSSLayerStatementRule : CSSRule + attribute @@toStringTag + getter nameList + method constructor +interface CSSMathClamp : CSSMathValue + attribute @@toStringTag + getter lower + getter upper + getter value + method constructor interface CSSMathInvert : CSSMathValue attribute @@toStringTag getter value @@ -497,6 +582,13 @@ method constructor setter x setter y +interface CSSPropertyRule : CSSRule + attribute @@toStringTag + getter inherits + getter initialValue + getter name + getter syntax + method constructor interface CSSRotate : CSSTransformComponent attribute @@toStringTag getter angle @@ -511,7 +603,9 @@ interface CSSRule attribute @@toStringTag attribute CHARSET_RULE + attribute COUNTER_STYLE_RULE attribute FONT_FACE_RULE + attribute FONT_FEATURE_VALUES_RULE attribute IMPORT_RULE attribute KEYFRAMES_RULE attribute KEYFRAME_RULE @@ -541,6 +635,11 @@ setter x setter y setter z +interface CSSScopeRule : CSSGroupingRule + attribute @@toStringTag + getter end + getter start + method constructor interface CSSSkew : CSSTransformComponent attribute @@toStringTag getter ax @@ -558,6 +657,9 @@ getter ay method constructor setter ay +interface CSSStartingStyleRule : CSSGroupingRule + attribute @@toStringTag + method constructor interface CSSStyleDeclaration attribute @@toStringTag getter cssFloat @@ -575,10 +677,13 @@ setter cssText interface CSSStyleRule : CSSRule attribute @@toStringTag + getter cssRules getter selectorText getter style getter styleMap method constructor + method deleteRule + method insertRule setter selectorText setter style interface CSSStyleSheet : StyleSheet @@ -620,6 +725,10 @@ method keys method toMatrix method values +interface CSSTransition : Animation + attribute @@toStringTag + getter transitionProperty + method constructor interface CSSTranslate : CSSTransformComponent attribute @@toStringTag getter x @@ -668,6 +777,11 @@ method keys method match method open +interface CanvasCaptureMediaStreamTrack : MediaStreamTrack + attribute @@toStringTag + getter canvas + method constructor + method requestFrame interface CanvasGradient attribute @@toStringTag method addColorStop @@ -728,6 +842,7 @@ method getImageData method getLineDash method getTransform + method isContextLost method isPointInPath method isPointInStroke method lineTo @@ -736,9 +851,11 @@ method putImageData method quadraticCurveTo method rect + method reset method resetTransform method restore method rotate + method roundRect method save method scale method setLineDash @@ -780,6 +897,11 @@ interface ChannelSplitterNode : AudioNode attribute @@toStringTag method constructor +interface CharacterBoundsUpdateEvent : Event + attribute @@toStringTag + getter rangeEnd + getter rangeStart + method constructor interface CharacterData : Node attribute @@toStringTag attribute @@unscopables @@ -810,6 +932,7 @@ getter clipboardData method constructor interface ClipboardItem + static method supports attribute @@toStringTag getter types method constructor @@ -828,10 +951,33 @@ getter data method constructor method initCompositionEvent +interface CompressionStream + attribute @@toStringTag + getter readable + getter writable + method constructor interface ConstantSourceNode : AudioScheduledSourceNode attribute @@toStringTag getter offset method constructor +interface ContactAddress : PaymentAddress + attribute @@toStringTag + method constructor +interface ContactsManager + attribute @@toStringTag + method constructor + method getProperties + method select +interface ContentIndex + attribute @@toStringTag + method add + method constructor + method delete + method getAll +interface ContentVisibilityAutoStateChangeEvent : Event + attribute @@toStringTag + getter skipped + method constructor interface ConvolverNode : AudioNode attribute @@toStringTag getter buffer @@ -839,16 +985,49 @@ method constructor setter buffer setter normalize +interface CookieChangeEvent : Event + attribute @@toStringTag + getter changed + getter deleted + method constructor +interface CookieStore : EventTarget + attribute @@toStringTag + getter onchange + method constructor + method delete + method get + method getAll + method set + setter onchange +interface CookieStoreManager + attribute @@toStringTag + method constructor + method getSubscriptions + method subscribe + method unsubscribe interface CountQueuingStrategy attribute @@toStringTag getter highWaterMark getter size method constructor +interface Credential + attribute @@toStringTag + getter id + getter type + method constructor +interface CredentialsContainer + attribute @@toStringTag + method constructor + method create + method get + method preventSilentAccess + method store interface Crypto attribute @@toStringTag getter subtle method constructor method getRandomValues + method randomUUID interface CryptoKey attribute @@toStringTag getter algorithm @@ -861,6 +1040,7 @@ method constructor method define method get + method getName method upgrade method whenDefined interface CustomEvent : Event @@ -868,6 +1048,19 @@ getter detail method constructor method initCustomEvent +interface CustomStateSet + attribute @@toStringTag + getter size + method @@iterator + method add + method clear + method constructor + method delete + method entries + method forEach + method has + method keys + method values interface DOMError attribute @@toStringTag getter message @@ -1143,10 +1336,21 @@ method clear method constructor method remove +interface DecompressionStream + attribute @@toStringTag + getter readable + getter writable + method constructor interface DelayNode : AudioNode attribute @@toStringTag getter delayTime method constructor +interface DelegatedInkTrailPresenter + attribute @@toStringTag + getter expectedImprovement + getter presentationArea + method constructor + method updateInkTrailStartPoint interface DeviceMotionEvent : Event attribute @@toStringTag getter acceleration @@ -1174,6 +1378,7 @@ getter gamma method constructor interface Document : Node + static method parseHTMLUnsafe attribute @@toStringTag attribute @@unscopables getter URL @@ -1206,6 +1411,7 @@ getter firstElementChild getter fonts getter forms + getter fragmentDirective getter fullscreen getter fullscreenElement getter fullscreenEnabled @@ -1225,7 +1431,11 @@ getter onauxclick getter onbeforecopy getter onbeforecut + getter onbeforeinput + getter onbeforematch getter onbeforepaste + getter onbeforetoggle + getter onbeforexrselect getter onblur getter oncancel getter oncanplay @@ -1233,7 +1443,10 @@ getter onchange getter onclick getter onclose + getter oncontentvisibilityautostatechange + getter oncontextlost getter oncontextmenu + getter oncontextrestored getter oncopy getter oncuechange getter oncut @@ -1288,6 +1501,7 @@ getter onpointerover getter onpointerrawupdate getter onpointerup + getter onprerenderingchange getter onprogress getter onratechange getter onreadystatechange @@ -1295,12 +1509,15 @@ getter onresize getter onresume getter onscroll + getter onscrollend getter onsearch + getter onsecuritypolicyviolation getter onseeked getter onseeking getter onselect getter onselectionchange getter onselectstart + getter onslotchange getter onstalled getter onsubmit getter onsuspend @@ -1310,7 +1527,10 @@ getter ontouchend getter ontouchmove getter ontouchstart + getter ontransitioncancel getter ontransitionend + getter ontransitionrun + getter ontransitionstart getter onvisibilitychange getter onvolumechange getter onwaiting @@ -1321,14 +1541,18 @@ getter onwebkitfullscreenerror getter onwebkittransitionend getter onwheel + getter pictureInPictureElement + getter pictureInPictureEnabled getter plugins getter pointerLockElement + getter prerendering getter readyState getter referrer getter rootElement getter scripts getter scrollingElement getter styleSheets + getter timeline getter title getter visibilityState getter vlinkColor @@ -1369,7 +1593,9 @@ method evaluate method execCommand method exitFullscreen + method exitPictureInPicture method exitPointerLock + method getAnimations method getElementById method getElementsByClassName method getElementsByName @@ -1377,6 +1603,10 @@ method getElementsByTagNameNS method getSelection method hasFocus + method hasPrivateToken + method hasRedemptionRecord + method hasStorageAccess + method hasUnpartitionedCookieAccess method importNode method open method prepend @@ -1388,7 +1618,10 @@ method querySelector method querySelectorAll method releaseEvents - method reportError + method replaceChildren + method requestStorageAccess + method requestStorageAccessFor + method startViewTransition method webkitCancelFullScreen method webkitExitFullscreen method write @@ -1413,7 +1646,11 @@ setter onauxclick setter onbeforecopy setter onbeforecut + setter onbeforeinput + setter onbeforematch setter onbeforepaste + setter onbeforetoggle + setter onbeforexrselect setter onblur setter oncancel setter oncanplay @@ -1421,7 +1658,10 @@ setter onchange setter onclick setter onclose + setter oncontentvisibilityautostatechange + setter oncontextlost setter oncontextmenu + setter oncontextrestored setter oncopy setter oncuechange setter oncut @@ -1476,6 +1716,7 @@ setter onpointerover setter onpointerrawupdate setter onpointerup + setter onprerenderingchange setter onprogress setter onratechange setter onreadystatechange @@ -1483,12 +1724,15 @@ setter onresize setter onresume setter onscroll + setter onscrollend setter onsearch + setter onsecuritypolicyviolation setter onseeked setter onseeking setter onselect setter onselectionchange setter onselectstart + setter onslotchange setter onstalled setter onsubmit setter onsuspend @@ -1498,7 +1742,10 @@ setter ontouchend setter ontouchmove setter ontouchstart + setter ontransitioncancel setter ontransitionend + setter ontransitionrun + setter ontransitionstart setter onvisibilitychange setter onvolumechange setter onwaiting @@ -1526,6 +1773,10 @@ method prepend method querySelector method querySelectorAll + method replaceChildren +interface DocumentTimeline : AnimationTimeline + attribute @@toStringTag + method constructor interface DocumentType : Node attribute @@toStringTag attribute @@unscopables @@ -1550,11 +1801,75 @@ getter release getter threshold method constructor +interface EditContext : EventTarget + attribute @@toStringTag + getter characterBoundsRangeStart + getter oncharacterboundsupdate + getter oncompositionend + getter oncompositionstart + getter ontextformatupdate + getter ontextupdate + getter selectionEnd + getter selectionStart + getter text + method attachedElements + method characterBounds + method constructor + method updateCharacterBounds + method updateControlBounds + method updateSelection + method updateSelectionBounds + method updateText + setter oncharacterboundsupdate + setter oncompositionend + setter oncompositionstart + setter ontextformatupdate + setter ontextupdate interface Element : Node attribute @@toStringTag attribute @@unscopables + getter ariaAtomic + getter ariaAutoComplete + getter ariaBrailleLabel + getter ariaBrailleRoleDescription + getter ariaBusy + getter ariaChecked + getter ariaColCount + getter ariaColIndex + getter ariaColSpan + getter ariaCurrent + getter ariaDescription + getter ariaDisabled + getter ariaExpanded + getter ariaHasPopup + getter ariaHidden + getter ariaInvalid + getter ariaKeyShortcuts + getter ariaLabel + getter ariaLevel + getter ariaLive + getter ariaModal + getter ariaMultiLine + getter ariaMultiSelectable + getter ariaOrientation + getter ariaPlaceholder + getter ariaPosInSet + getter ariaPressed + getter ariaReadOnly + getter ariaRelevant + getter ariaRequired + getter ariaRoleDescription + getter ariaRowCount + getter ariaRowIndex + getter ariaRowSpan + getter ariaSelected + getter ariaSetSize + getter ariaSort + getter ariaValueMax + getter ariaValueMin + getter ariaValueNow + getter ariaValueText getter assignedSlot - getter attributeStyleMap getter attributes getter childElementCount getter children @@ -1564,6 +1879,7 @@ getter clientLeft getter clientTop getter clientWidth + getter elementTiming getter firstElementChild getter id getter innerHTML @@ -1583,6 +1899,7 @@ getter part getter prefix getter previousElementSibling + getter role getter scrollHeight getter scrollLeft getter scrollTop @@ -1595,9 +1912,11 @@ method append method attachShadow method before + method checkVisibility method closest method computedStyleMap method constructor + method getAnimations method getAttribute method getAttributeNS method getAttributeNames @@ -1608,6 +1927,7 @@ method getElementsByClassName method getElementsByTagName method getElementsByTagNameNS + method getInnerHTML method hasAttribute method hasAttributeNS method hasAttributes @@ -1624,6 +1944,7 @@ method removeAttribute method removeAttributeNS method removeAttributeNode + method replaceChildren method replaceWith method requestFullscreen method requestPointerLock @@ -1636,13 +1957,56 @@ method setAttributeNS method setAttributeNode method setAttributeNodeNS + method setHTMLUnsafe method setPointerCapture method toggleAttribute method webkitMatchesSelector method webkitRequestFullScreen method webkitRequestFullscreen + setter ariaAtomic + setter ariaAutoComplete + setter ariaBrailleLabel + setter ariaBrailleRoleDescription + setter ariaBusy + setter ariaChecked + setter ariaColCount + setter ariaColIndex + setter ariaColSpan + setter ariaCurrent + setter ariaDescription + setter ariaDisabled + setter ariaExpanded + setter ariaHasPopup + setter ariaHidden + setter ariaInvalid + setter ariaKeyShortcuts + setter ariaLabel + setter ariaLevel + setter ariaLive + setter ariaModal + setter ariaMultiLine + setter ariaMultiSelectable + setter ariaOrientation + setter ariaPlaceholder + setter ariaPosInSet + setter ariaPressed + setter ariaReadOnly + setter ariaRelevant + setter ariaRequired + setter ariaRoleDescription + setter ariaRowCount + setter ariaRowIndex + setter ariaRowSpan + setter ariaSelected + setter ariaSetSize + setter ariaSort + setter ariaValueMax + setter ariaValueMin + setter ariaValueNow + setter ariaValueText setter classList setter className + setter elementTiming setter id setter innerHTML setter onbeforecopy @@ -1655,9 +2019,124 @@ setter onwebkitfullscreenerror setter outerHTML setter part + setter role setter scrollLeft setter scrollTop setter slot +interface ElementInternals + attribute @@toStringTag + getter ariaAtomic + getter ariaAutoComplete + getter ariaBrailleLabel + getter ariaBrailleRoleDescription + getter ariaBusy + getter ariaChecked + getter ariaColCount + getter ariaColIndex + getter ariaColSpan + getter ariaCurrent + getter ariaDescription + getter ariaDisabled + getter ariaExpanded + getter ariaHasPopup + getter ariaHidden + getter ariaInvalid + getter ariaKeyShortcuts + getter ariaLabel + getter ariaLevel + getter ariaLive + getter ariaModal + getter ariaMultiLine + getter ariaMultiSelectable + getter ariaOrientation + getter ariaPlaceholder + getter ariaPosInSet + getter ariaPressed + getter ariaReadOnly + getter ariaRelevant + getter ariaRequired + getter ariaRoleDescription + getter ariaRowCount + getter ariaRowIndex + getter ariaRowSpan + getter ariaSelected + getter ariaSetSize + getter ariaSort + getter ariaValueMax + getter ariaValueMin + getter ariaValueNow + getter ariaValueText + getter form + getter labels + getter role + getter shadowRoot + getter states + getter validationMessage + getter validity + getter willValidate + method checkValidity + method constructor + method reportValidity + method setFormValue + method setValidity + setter ariaAtomic + setter ariaAutoComplete + setter ariaBrailleLabel + setter ariaBrailleRoleDescription + setter ariaBusy + setter ariaChecked + setter ariaColCount + setter ariaColIndex + setter ariaColSpan + setter ariaCurrent + setter ariaDescription + setter ariaDisabled + setter ariaExpanded + setter ariaHasPopup + setter ariaHidden + setter ariaInvalid + setter ariaKeyShortcuts + setter ariaLabel + setter ariaLevel + setter ariaLive + setter ariaModal + setter ariaMultiLine + setter ariaMultiSelectable + setter ariaOrientation + setter ariaPlaceholder + setter ariaPosInSet + setter ariaPressed + setter ariaReadOnly + setter ariaRelevant + setter ariaRequired + setter ariaRoleDescription + setter ariaRowCount + setter ariaRowIndex + setter ariaRowSpan + setter ariaSelected + setter ariaSetSize + setter ariaSort + setter ariaValueMax + setter ariaValueMin + setter ariaValueNow + setter ariaValueText + setter role +interface EncodedAudioChunk + attribute @@toStringTag + getter byteLength + getter duration + getter timestamp + getter type + method constructor + method copyTo +interface EncodedVideoChunk + attribute @@toStringTag + getter byteLength + getter duration + getter timestamp + getter type + method constructor + method copyTo interface ErrorEvent : Event attribute @@toStringTag getter colno @@ -1679,7 +2158,6 @@ getter currentTarget getter defaultPrevented getter eventPhase - getter path getter returnValue getter srcElement getter target @@ -1693,6 +2171,17 @@ method stopPropagation setter cancelBubble setter returnValue +interface EventCounts + attribute @@toStringTag + getter size + method @@iterator + method constructor + method entries + method forEach + method get + method has + method keys + method values interface EventSource : EventTarget attribute @@toStringTag attribute CLOSED @@ -1715,6 +2204,11 @@ method constructor method dispatchEvent method removeEventListener +interface External + attribute @@toStringTag + method AddSearchProvider + method IsSearchProviderInstalled + method constructor interface FeaturePolicy attribute @@toStringTag method allowedFeatures @@ -1722,6 +2216,13 @@ method constructor method features method getAllowlistForFeature +interface FederatedCredential : Credential + attribute @@toStringTag + getter iconURL + getter name + getter protocol + getter provider + method constructor interface File : Blob attribute @@toStringTag getter lastModified @@ -1761,16 +2262,53 @@ setter onloadend setter onloadstart setter onprogress +interface FileSystemDirectoryHandle : FileSystemHandle + attribute @@toStringTag + method @@asyncIterator + method constructor + method entries + method getDirectoryHandle + method getFileHandle + method keys + method removeEntry + method resolve + method values +interface FileSystemFileHandle : FileSystemHandle + attribute @@toStringTag + method constructor + method createWritable + method getFile + method move +interface FileSystemHandle + attribute @@toStringTag + getter kind + getter name + method constructor + method isSameEntry + method queryPermission + method remove + method requestPermission +interface FileSystemWritableFileStream : WritableStream + attribute @@toStringTag + getter mode + method constructor + method seek + method truncate + method write interface FocusEvent : UIEvent attribute @@toStringTag getter relatedTarget method constructor interface FontFace attribute @@toStringTag + getter ascentOverride + getter descentOverride getter display getter family getter featureSettings + getter lineGapOverride getter loaded + getter sizeAdjust getter status getter stretch getter style @@ -1779,9 +2317,13 @@ getter weight method constructor method load + setter ascentOverride + setter descentOverride setter display setter family setter featureSettings + setter lineGapOverride + setter sizeAdjust setter stretch setter style setter unicodeRange @@ -1809,6 +2351,326 @@ attribute @@toStringTag getter formData method constructor +interface FragmentDirective + attribute @@toStringTag + method constructor +interface GPU + attribute @@toStringTag + getter wgslLanguageFeatures + method constructor + method getPreferredCanvasFormat + method requestAdapter +interface GPUAdapter + attribute @@toStringTag + getter features + getter isFallbackAdapter + getter limits + method constructor + method requestAdapterInfo + method requestDevice +interface GPUAdapterInfo + attribute @@toStringTag + getter architecture + getter description + getter device + getter vendor + method constructor +interface GPUBindGroup + attribute @@toStringTag + getter label + method constructor + setter label +interface GPUBindGroupLayout + attribute @@toStringTag + getter label + method constructor + setter label +interface GPUBuffer + attribute @@toStringTag + getter label + getter mapState + getter size + getter usage + method constructor + method destroy + method getMappedRange + method mapAsync + method unmap + setter label +interface GPUCanvasContext + attribute @@toStringTag + getter canvas + method configure + method constructor + method getCurrentTexture + method unconfigure +interface GPUCommandBuffer + attribute @@toStringTag + getter label + method constructor + setter label +interface GPUCommandEncoder + attribute @@toStringTag + getter label + method beginComputePass + method beginRenderPass + method clearBuffer + method constructor + method copyBufferToBuffer + method copyBufferToTexture + method copyTextureToBuffer + method copyTextureToTexture + method finish + method insertDebugMarker + method popDebugGroup + method pushDebugGroup + method resolveQuerySet + setter label +interface GPUCompilationInfo + attribute @@toStringTag + getter messages + method constructor +interface GPUCompilationMessage + attribute @@toStringTag + getter length + getter lineNum + getter linePos + getter message + getter offset + getter type + method constructor +interface GPUComputePassEncoder + attribute @@toStringTag + getter label + method constructor + method dispatchWorkgroups + method dispatchWorkgroupsIndirect + method end + method insertDebugMarker + method popDebugGroup + method pushDebugGroup + method setBindGroup + method setPipeline + method writeTimestamp + setter label +interface GPUComputePipeline + attribute @@toStringTag + getter label + method constructor + method getBindGroupLayout + setter label +interface GPUDevice : EventTarget + attribute @@toStringTag + getter features + getter label + getter limits + getter lost + getter onuncapturederror + getter queue + method constructor + method createBindGroup + method createBindGroupLayout + method createBuffer + method createCommandEncoder + method createComputePipeline + method createComputePipelineAsync + method createPipelineLayout + method createQuerySet + method createRenderBundleEncoder + method createRenderPipeline + method createRenderPipelineAsync + method createSampler + method createShaderModule + method createTexture + method destroy + method importExternalTexture + method popErrorScope + method pushErrorScope + setter label + setter onuncapturederror +interface GPUDeviceLostInfo + attribute @@toStringTag + getter message + getter reason + method constructor +interface GPUError + attribute @@toStringTag + getter message + method constructor +interface GPUExternalTexture + attribute @@toStringTag + getter label + method constructor + setter label +interface GPUInternalError : GPUError + attribute @@toStringTag + method constructor +interface GPUOutOfMemoryError : GPUError + attribute @@toStringTag + method constructor +interface GPUPipelineError : DOMException + attribute @@toStringTag + getter reason + method constructor +interface GPUPipelineLayout + attribute @@toStringTag + getter label + method constructor + setter label +interface GPUQuerySet + attribute @@toStringTag + getter count + getter label + getter type + method constructor + method destroy + setter label +interface GPUQueue + attribute @@toStringTag + getter label + method constructor + method copyExternalImageToTexture + method onSubmittedWorkDone + method submit + method writeBuffer + method writeTexture + setter label +interface GPURenderBundle + attribute @@toStringTag + getter label + method constructor + setter label +interface GPURenderBundleEncoder + attribute @@toStringTag + getter label + method constructor + method draw + method drawIndexed + method drawIndexedIndirect + method drawIndirect + method finish + method insertDebugMarker + method popDebugGroup + method pushDebugGroup + method setBindGroup + method setIndexBuffer + method setPipeline + method setVertexBuffer + setter label +interface GPURenderPassEncoder + attribute @@toStringTag + getter label + method beginOcclusionQuery + method constructor + method draw + method drawIndexed + method drawIndexedIndirect + method drawIndirect + method end + method endOcclusionQuery + method executeBundles + method insertDebugMarker + method popDebugGroup + method pushDebugGroup + method setBindGroup + method setBlendConstant + method setIndexBuffer + method setPipeline + method setScissorRect + method setStencilReference + method setVertexBuffer + method setViewport + method writeTimestamp + setter label +interface GPURenderPipeline + attribute @@toStringTag + getter label + method constructor + method getBindGroupLayout + setter label +interface GPUSampler + attribute @@toStringTag + getter label + method constructor + setter label +interface GPUShaderModule + attribute @@toStringTag + getter label + method constructor + method getCompilationInfo + setter label +interface GPUSupportedFeatures + attribute @@toStringTag + getter size + method @@iterator + method constructor + method entries + method forEach + method has + method keys + method values +interface GPUSupportedLimits + attribute @@toStringTag + getter maxBindGroups + getter maxBindGroupsPlusVertexBuffers + getter maxBindingsPerBindGroup + getter maxBufferSize + getter maxColorAttachmentBytesPerSample + getter maxColorAttachments + getter maxComputeInvocationsPerWorkgroup + getter maxComputeWorkgroupSizeX + getter maxComputeWorkgroupSizeY + getter maxComputeWorkgroupSizeZ + getter maxComputeWorkgroupStorageSize + getter maxComputeWorkgroupsPerDimension + getter maxDynamicStorageBuffersPerPipelineLayout + getter maxDynamicUniformBuffersPerPipelineLayout + getter maxInterStageShaderComponents + getter maxInterStageShaderVariables + getter maxSampledTexturesPerShaderStage + getter maxSamplersPerShaderStage + getter maxStorageBufferBindingSize + getter maxStorageBuffersPerShaderStage + getter maxStorageTexturesPerShaderStage + getter maxTextureArrayLayers + getter maxTextureDimension1D + getter maxTextureDimension2D + getter maxTextureDimension3D + getter maxUniformBufferBindingSize + getter maxUniformBuffersPerShaderStage + getter maxVertexAttributes + getter maxVertexBufferArrayStride + getter maxVertexBuffers + getter minStorageBufferOffsetAlignment + getter minUniformBufferOffsetAlignment + method constructor +interface GPUTexture + attribute @@toStringTag + getter depthOrArrayLayers + getter dimension + getter format + getter height + getter label + getter mipLevelCount + getter sampleCount + getter usage + getter width + method constructor + method createView + method destroy + setter label +interface GPUTextureView + attribute @@toStringTag + getter label + method constructor + setter label +interface GPUUncapturedErrorEvent : Event + attribute @@toStringTag + getter error + method constructor +interface GPUValidationError : GPUError + attribute @@toStringTag + method constructor interface GainNode : AudioNode attribute @@toStringTag getter gain @@ -1869,6 +2731,9 @@ getter code getter message method constructor +interface GravitySensor : Accelerometer + attribute @@toStringTag + method constructor interface Gyroscope : Sensor attribute @@toStringTag getter x @@ -1884,6 +2749,7 @@ method namedItem interface HTMLAnchorElement : HTMLElement attribute @@toStringTag + getter attributionSrc getter charset getter coords getter download @@ -1911,6 +2777,7 @@ getter username method constructor method toString + setter attributionSrc setter charset setter coords setter download @@ -2014,6 +2881,7 @@ getter onmessageerror getter onoffline getter ononline + getter onorientationchange getter onpagehide getter onpageshow getter onpopstate @@ -2043,6 +2911,7 @@ setter onmessageerror setter onoffline setter ononline + setter onorientationchange setter onpagehide setter onpageshow setter onpopstate @@ -2065,6 +2934,8 @@ getter formTarget getter labels getter name + getter popoverTargetAction + getter popoverTargetElement getter type getter validationMessage getter validity @@ -2081,6 +2952,8 @@ setter formNoValidate setter formTarget setter name + setter popoverTargetAction + setter popoverTargetElement setter type setter value interface HTMLCanvasElement : HTMLElement @@ -2102,12 +2975,6 @@ method constructor method item method namedItem -interface HTMLContentElement : HTMLElement - attribute @@toStringTag - getter select - method constructor - method getDistributedNodes - setter select interface HTMLDListElement : HTMLElement attribute @@toStringTag getter compact @@ -2124,8 +2991,10 @@ method constructor interface HTMLDetailsElement : HTMLElement attribute @@toStringTag + getter name getter open method constructor + setter name setter open interface HTMLDialogElement : HTMLElement attribute @@toStringTag @@ -2153,13 +3022,17 @@ interface HTMLElement : Element attribute @@toStringTag getter accessKey + getter attributeStyleMap getter autocapitalize getter autofocus getter contentEditable getter dataset getter dir getter draggable + getter editContext + getter enterKeyHint getter hidden + getter inert getter innerText getter inputMode getter isContentEditable @@ -2175,6 +3048,10 @@ getter onanimationiteration getter onanimationstart getter onauxclick + getter onbeforeinput + getter onbeforematch + getter onbeforetoggle + getter onbeforexrselect getter onblur getter oncancel getter oncanplay @@ -2182,7 +3059,10 @@ getter onchange getter onclick getter onclose + getter oncontentvisibilityautostatechange + getter oncontextlost getter oncontextmenu + getter oncontextrestored getter oncopy getter oncuechange getter oncut @@ -2237,11 +3117,14 @@ getter onreset getter onresize getter onscroll + getter onscrollend + getter onsecuritypolicyviolation getter onseeked getter onseeking getter onselect getter onselectionchange getter onselectstart + getter onslotchange getter onstalled getter onsubmit getter onsuspend @@ -2251,7 +3134,10 @@ getter ontouchend getter ontouchmove getter ontouchstart + getter ontransitioncancel getter ontransitionend + getter ontransitionrun + getter ontransitionstart getter onvolumechange getter onwaiting getter onwebkitanimationend @@ -2260,22 +3146,32 @@ getter onwebkittransitionend getter onwheel getter outerText + getter popover getter spellcheck getter style getter tabIndex getter title getter translate + getter virtualKeyboardPolicy + getter writingSuggestions + method attachInternals method blur method click method constructor method focus + method hidePopover + method showPopover + method togglePopover setter accessKey setter autocapitalize setter autofocus setter contentEditable setter dir setter draggable + setter editContext + setter enterKeyHint setter hidden + setter inert setter innerText setter inputMode setter lang @@ -2285,6 +3181,10 @@ setter onanimationiteration setter onanimationstart setter onauxclick + setter onbeforeinput + setter onbeforematch + setter onbeforetoggle + setter onbeforexrselect setter onblur setter oncancel setter oncanplay @@ -2292,7 +3192,10 @@ setter onchange setter onclick setter onclose + setter oncontentvisibilityautostatechange + setter oncontextlost setter oncontextmenu + setter oncontextrestored setter oncopy setter oncuechange setter oncut @@ -2347,11 +3250,14 @@ setter onreset setter onresize setter onscroll + setter onscrollend + setter onsecuritypolicyviolation setter onseeked setter onseeking setter onselect setter onselectionchange setter onselectstart + setter onslotchange setter onstalled setter onsubmit setter onsuspend @@ -2361,7 +3267,10 @@ setter ontouchend setter ontouchmove setter ontouchstart + setter ontransitioncancel setter ontransitionend + setter ontransitionrun + setter ontransitionstart setter onvolumechange setter onwaiting setter onwebkitanimationend @@ -2370,11 +3279,14 @@ setter onwebkittransitionend setter onwheel setter outerText + setter popover setter spellcheck setter style setter tabIndex setter title setter translate + setter virtualKeyboardPolicy + setter writingSuggestions interface HTMLEmbedElement : HTMLElement attribute @@toStringTag getter align @@ -2418,6 +3330,7 @@ setter size interface HTMLFormControlsCollection : HTMLCollection attribute @@toStringTag + method @@iterator method constructor method namedItem interface HTMLFormElement : HTMLElement @@ -2432,6 +3345,8 @@ getter method getter name getter noValidate + getter rel + getter relList getter target method @@iterator method checkValidity @@ -2448,6 +3363,8 @@ setter method setter name setter noValidate + setter rel + setter relList setter target interface HTMLFrameElement : HTMLElement attribute @@toStringTag @@ -2486,6 +3403,7 @@ getter onmessageerror getter onoffline getter ononline + getter onorientationchange getter onpagehide getter onpageshow getter onpopstate @@ -2511,6 +3429,7 @@ setter onmessageerror setter onoffline setter ononline + setter onorientationchange setter onpagehide setter onpageshow setter onpopstate @@ -2549,19 +3468,23 @@ setter version interface HTMLIFrameElement : HTMLElement attribute @@toStringTag + getter adAuctionHeaders getter align getter allow getter allowFullscreen getter contentDocument getter contentWindow + getter credentialless getter csp getter featurePolicy getter frameBorder getter height + getter loading getter longDesc getter marginHeight getter marginWidth getter name + getter privateToken getter referrerPolicy getter sandbox getter scrolling @@ -2570,16 +3493,20 @@ getter width method constructor method getSVGDocument + setter adAuctionHeaders setter align setter allow setter allowFullscreen + setter credentialless setter csp setter frameBorder setter height + setter loading setter longDesc setter marginHeight setter marginWidth setter name + setter privateToken setter referrerPolicy setter sandbox setter scrolling @@ -2590,14 +3517,17 @@ attribute @@toStringTag getter align getter alt + getter attributionSrc getter border getter complete getter crossOrigin getter currentSrc getter decoding + getter fetchPriority getter height getter hspace getter isMap + getter loading getter longDesc getter lowsrc getter name @@ -2616,12 +3546,15 @@ method decode setter align setter alt + setter attributionSrc setter border setter crossOrigin setter decoding + setter fetchPriority setter height setter hspace setter isMap + setter loading setter longDesc setter lowsrc setter name @@ -2638,6 +3571,7 @@ getter align getter alt getter autocomplete + getter capture getter checked getter defaultChecked getter defaultValue @@ -2663,6 +3597,8 @@ getter name getter pattern getter placeholder + getter popoverTargetAction + getter popoverTargetElement getter readOnly getter required getter selectionDirection @@ -2678,7 +3614,6 @@ getter value getter valueAsDate getter valueAsNumber - getter webkitEntries getter webkitdirectory getter width getter willValidate @@ -2689,12 +3624,14 @@ method setCustomValidity method setRangeText method setSelectionRange + method showPicker method stepDown method stepUp setter accept setter align setter alt setter autocomplete + setter capture setter checked setter defaultChecked setter defaultValue @@ -2717,6 +3654,8 @@ setter name setter pattern setter placeholder + setter popoverTargetAction + setter popoverTargetElement setter readOnly setter required setter selectionDirection @@ -2755,9 +3694,11 @@ interface HTMLLinkElement : HTMLElement attribute @@toStringTag getter as + getter blocking getter charset getter crossOrigin getter disabled + getter fetchPriority getter href getter hreflang getter imageSizes @@ -2774,9 +3715,11 @@ getter type method constructor setter as + setter blocking setter charset setter crossOrigin setter disabled + setter fetchPriority setter href setter hreflang setter imageSizes @@ -2843,7 +3786,6 @@ getter currentTime getter defaultMuted getter defaultPlaybackRate - getter disableRemotePlayback getter duration getter ended getter error @@ -2857,11 +3799,10 @@ getter playbackRate getter played getter preload + getter preservesPitch getter readyState - getter remote getter seekable getter seeking - getter sinkId getter src getter srcObject getter textTracks @@ -2876,7 +3817,6 @@ method pause method play method setMediaKeys - method setSinkId setter autoplay setter controls setter controlsList @@ -2884,13 +3824,13 @@ setter currentTime setter defaultMuted setter defaultPlaybackRate - setter disableRemotePlayback setter loop setter muted setter onencrypted setter onwaitingforkey setter playbackRate setter preload + setter preservesPitch setter src setter srcObject setter volume @@ -2903,11 +3843,13 @@ attribute @@toStringTag getter content getter httpEquiv + getter media getter name getter scheme method constructor setter content setter httpEquiv + setter media setter name setter scheme interface HTMLMeterElement : HTMLElement @@ -3082,12 +4024,16 @@ method constructor setter cite interface HTMLScriptElement : HTMLElement + static method supports attribute @@toStringTag getter async + getter attributionSrc + getter blocking getter charset getter crossOrigin getter defer getter event + getter fetchPriority getter htmlFor getter integrity getter noModule @@ -3097,10 +4043,13 @@ getter type method constructor setter async + setter attributionSrc + setter blocking setter charset setter crossOrigin setter defer setter event + setter fetchPriority setter htmlFor setter integrity setter noModule @@ -3136,6 +4085,7 @@ method remove method reportValidity method setCustomValidity + method showPicker setter autocomplete setter disabled setter length @@ -3145,40 +4095,43 @@ setter selectedIndex setter size setter value -interface HTMLShadowElement : HTMLElement - attribute @@toStringTag - method constructor - method getDistributedNodes interface HTMLSlotElement : HTMLElement attribute @@toStringTag getter name + method assign method assignedElements method assignedNodes method constructor setter name interface HTMLSourceElement : HTMLElement attribute @@toStringTag + getter height getter media getter sizes getter src getter srcset getter type + getter width method constructor + setter height setter media setter sizes setter src setter srcset setter type + setter width interface HTMLSpanElement : HTMLElement attribute @@toStringTag method constructor interface HTMLStyleElement : HTMLElement attribute @@toStringTag + getter blocking getter disabled getter media getter sheet getter type method constructor + setter blocking setter disabled setter media setter type @@ -3307,7 +4260,13 @@ interface HTMLTemplateElement : HTMLElement attribute @@toStringTag getter content + getter shadowRootClonable + getter shadowRootDelegatesFocus + getter shadowRootMode method constructor + setter shadowRootClonable + setter shadowRootDelegatesFocus + setter shadowRootMode interface HTMLTextAreaElement : HTMLElement attribute @@toStringTag getter autocomplete @@ -3399,7 +4358,11 @@ method constructor interface HTMLVideoElement : HTMLMediaElement attribute @@toStringTag + getter disablePictureInPicture getter height + getter onenterpictureinpicture + getter onleavepictureinpicture + getter playsInline getter poster getter videoHeight getter videoWidth @@ -3408,12 +4371,20 @@ getter webkitDroppedFrameCount getter webkitSupportsFullscreen getter width + method cancelVideoFrameCallback method constructor + method getVideoPlaybackQuality + method requestPictureInPicture + method requestVideoFrameCallback method webkitEnterFullScreen method webkitEnterFullscreen method webkitExitFullScreen method webkitExitFullscreen + setter disablePictureInPicture setter height + setter onenterpictureinpicture + setter onleavepictureinpicture + setter playsInline setter poster setter width interface HashChangeEvent : Event @@ -3435,6 +4406,37 @@ method keys method set method values +interface Highlight + attribute @@toStringTag + getter priority + getter size + getter type + method @@iterator + method add + method clear + method constructor + method delete + method entries + method forEach + method has + method keys + method values + setter priority + setter type +interface HighlightRegistry + attribute @@toStringTag + getter size + method @@iterator + method clear + method constructor + method delete + method entries + method forEach + method get + method has + method keys + method set + method values interface History attribute @@toStringTag getter length @@ -3452,6 +4454,7 @@ getter direction getter key getter primaryKey + getter request getter source method advance method constructor @@ -3561,6 +4564,7 @@ interface IDBTransaction : EventTarget attribute @@toStringTag getter db + getter durability getter error getter mode getter objectStoreNames @@ -3568,6 +4572,7 @@ getter oncomplete getter onerror method abort + method commit method constructor method objectStore setter onabort @@ -3589,18 +4594,30 @@ getter didTimeout method constructor method timeRemaining +interface IdleDetector : EventTarget + static method requestPermission + attribute @@toStringTag + getter onchange + getter screenState + getter userState + method constructor + method start + setter onchange interface Image attribute @@toStringTag getter align getter alt + getter attributionSrc getter border getter complete getter crossOrigin getter currentSrc getter decoding + getter fetchPriority getter height getter hspace getter isMap + getter loading getter longDesc getter lowsrc getter name @@ -3619,12 +4636,15 @@ method decode setter align setter alt + setter attributionSrc setter border setter crossOrigin setter decoding + setter fetchPriority setter height setter hspace setter isMap + setter loading setter longDesc setter lowsrc setter name @@ -3641,16 +4661,65 @@ getter width method close method constructor +interface ImageBitmapRenderingContext + attribute @@toStringTag + getter canvas + method constructor + method transferFromImageBitmap +interface ImageCapture + attribute @@toStringTag + getter track + method constructor + method getPhotoCapabilities + method getPhotoSettings + method grabFrame + method takePhoto interface ImageData attribute @@toStringTag + getter colorSpace getter data getter height getter width method constructor +interface ImageDecoder + static method isTypeSupported + attribute @@toStringTag + getter complete + getter completed + getter tracks + getter type + method close + method constructor + method decode + method reset +interface ImageTrack + attribute @@toStringTag + getter animated + getter frameCount + getter repetitionCount + getter selected + method constructor + setter selected +interface ImageTrackList + attribute @@toStringTag + getter length + getter ready + getter selectedIndex + getter selectedTrack + method @@iterator + method constructor +interface Ink + attribute @@toStringTag + method constructor + method requestPresenter interface InputDeviceCapabilities attribute @@toStringTag getter firesTouchEvents method constructor +interface InputDeviceInfo : MediaDeviceInfo + attribute @@toStringTag + method constructor + method getCapabilities interface InputEvent : UIEvent attribute @@toStringTag getter data @@ -3664,6 +4733,7 @@ getter delay getter root getter rootMargin + getter scrollMargin getter thresholds getter trackVisibility method constructor @@ -3682,6 +4752,12 @@ getter target getter time method constructor +interface Keyboard + attribute @@toStringTag + method constructor + method getLayoutMap + method lock + method unlock interface KeyboardEvent : UIEvent attribute @@toStringTag attribute DOM_KEY_LOCATION_LEFT @@ -3715,9 +4791,40 @@ method values interface KeyframeEffect : AnimationEffect attribute @@toStringTag + getter composite + getter pseudoElement getter target method constructor + method getKeyframes + method setKeyframes + setter composite + setter pseudoElement setter target +interface LargestContentfulPaint : PerformanceEntry + attribute @@toStringTag + getter element + getter id + getter loadTime + getter renderTime + getter size + getter url + method constructor + method toJSON +interface LayoutShift : PerformanceEntry + attribute @@toStringTag + getter hadRecentInput + getter lastInputTime + getter sources + getter value + method constructor + method toJSON +interface LayoutShiftAttribution + attribute @@toStringTag + getter currentRect + getter node + getter previousRect + method constructor + method toJSON interface LinearAccelerationSensor : Accelerometer attribute @@toStringTag method constructor @@ -3795,15 +4902,244 @@ method constructor method open setter onstatechange +interface MathMLElement : Element + attribute @@toStringTag + getter attributeStyleMap + getter autofocus + getter dataset + getter nonce + getter onabort + getter onanimationend + getter onanimationiteration + getter onanimationstart + getter onauxclick + getter onbeforeinput + getter onbeforematch + getter onbeforetoggle + getter onbeforexrselect + getter onblur + getter oncancel + getter oncanplay + getter oncanplaythrough + getter onchange + getter onclick + getter onclose + getter oncontentvisibilityautostatechange + getter oncontextlost + getter oncontextmenu + getter oncontextrestored + getter oncopy + getter oncuechange + getter oncut + getter ondblclick + getter ondrag + getter ondragend + getter ondragenter + getter ondragleave + getter ondragover + getter ondragstart + getter ondrop + getter ondurationchange + getter onemptied + getter onended + getter onerror + getter onfocus + getter onformdata + getter ongotpointercapture + getter oninput + getter oninvalid + getter onkeydown + getter onkeypress + getter onkeyup + getter onload + getter onloadeddata + getter onloadedmetadata + getter onloadstart + getter onlostpointercapture + getter onmousedown + getter onmouseenter + getter onmouseleave + getter onmousemove + getter onmouseout + getter onmouseover + getter onmouseup + getter onmousewheel + getter onpaste + getter onpause + getter onplay + getter onplaying + getter onpointercancel + getter onpointerdown + getter onpointerenter + getter onpointerleave + getter onpointermove + getter onpointerout + getter onpointerover + getter onpointerrawupdate + getter onpointerup + getter onprogress + getter onratechange + getter onreset + getter onresize + getter onscroll + getter onscrollend + getter onsecuritypolicyviolation + getter onseeked + getter onseeking + getter onselect + getter onselectionchange + getter onselectstart + getter onslotchange + getter onstalled + getter onsubmit + getter onsuspend + getter ontimeupdate + getter ontoggle + getter ontouchcancel + getter ontouchend + getter ontouchmove + getter ontouchstart + getter ontransitioncancel + getter ontransitionend + getter ontransitionrun + getter ontransitionstart + getter onvolumechange + getter onwaiting + getter onwebkitanimationend + getter onwebkitanimationiteration + getter onwebkitanimationstart + getter onwebkittransitionend + getter onwheel + getter style + getter tabIndex + method blur + method constructor + method focus + setter autofocus + setter nonce + setter onabort + setter onanimationend + setter onanimationiteration + setter onanimationstart + setter onauxclick + setter onbeforeinput + setter onbeforematch + setter onbeforetoggle + setter onbeforexrselect + setter onblur + setter oncancel + setter oncanplay + setter oncanplaythrough + setter onchange + setter onclick + setter onclose + setter oncontentvisibilityautostatechange + setter oncontextlost + setter oncontextmenu + setter oncontextrestored + setter oncopy + setter oncuechange + setter oncut + setter ondblclick + setter ondrag + setter ondragend + setter ondragenter + setter ondragleave + setter ondragover + setter ondragstart + setter ondrop + setter ondurationchange + setter onemptied + setter onended + setter onerror + setter onfocus + setter onformdata + setter ongotpointercapture + setter oninput + setter oninvalid + setter onkeydown + setter onkeypress + setter onkeyup + setter onload + setter onloadeddata + setter onloadedmetadata + setter onloadstart + setter onlostpointercapture + setter onmousedown + setter onmouseenter + setter onmouseleave + setter onmousemove + setter onmouseout + setter onmouseover + setter onmouseup + setter onmousewheel + setter onpaste + setter onpause + setter onplay + setter onplaying + setter onpointercancel + setter onpointerdown + setter onpointerenter + setter onpointerleave + setter onpointermove + setter onpointerout + setter onpointerover + setter onpointerrawupdate + setter onpointerup + setter onprogress + setter onratechange + setter onreset + setter onresize + setter onscroll + setter onscrollend + setter onsecuritypolicyviolation + setter onseeked + setter onseeking + setter onselect + setter onselectionchange + setter onselectstart + setter onslotchange + setter onstalled + setter onsubmit + setter onsuspend + setter ontimeupdate + setter ontoggle + setter ontouchcancel + setter ontouchend + setter ontouchmove + setter ontouchstart + setter ontransitioncancel + setter ontransitionend + setter ontransitionrun + setter ontransitionstart + setter onvolumechange + setter onwaiting + setter onwebkitanimationend + setter onwebkitanimationiteration + setter onwebkitanimationstart + setter onwebkittransitionend + setter onwheel + setter style + setter tabIndex +interface MediaCapabilities + attribute @@toStringTag + method constructor + method decodingInfo + method encodingInfo +interface MediaDeviceInfo + attribute @@toStringTag + getter deviceId + getter groupId + getter kind + getter label + method constructor + method toJSON interface MediaDevices : EventTarget attribute @@toStringTag - getter ondevicechange method constructor method enumerateDevices - method getDisplayMedia method getSupportedConstraints method getUserMedia - setter ondevicechange interface MediaElementAudioSourceNode : AudioNode attribute @@toStringTag getter mediaElement @@ -3894,6 +5230,7 @@ interface MediaRecorder : EventTarget static method isTypeSupported attribute @@toStringTag + getter audioBitrateMode getter audioBitsPerSecond getter mimeType getter ondataavailable @@ -3918,6 +5255,7 @@ setter onstart setter onstop interface MediaSource : EventTarget + static getter canConstructInDedicatedWorker static method isTypeSupported attribute @@toStringTag getter activeSourceBuffers @@ -3937,6 +5275,29 @@ setter onsourceclose setter onsourceended setter onsourceopen +interface MediaSourceHandle + attribute @@toStringTag + method constructor +interface MediaStream : EventTarget + attribute @@toStringTag + getter active + getter id + getter onactive + getter onaddtrack + getter oninactive + getter onremovetrack + method addTrack + method clone + method constructor + method getAudioTracks + method getTrackById + method getTracks + method getVideoTracks + method removeTrack + setter onactive + setter onaddtrack + setter oninactive + setter onremovetrack interface MediaStreamAudioDestinationNode : AudioNode attribute @@toStringTag getter stream @@ -3961,6 +5322,7 @@ getter onmute getter onunmute getter readyState + getter stats method applyConstraints method clone method constructor @@ -3977,6 +5339,21 @@ attribute @@toStringTag getter track method constructor +interface MediaStreamTrackGenerator : MediaStreamTrack + attribute @@toStringTag + getter writable + method constructor +interface MediaStreamTrackProcessor + attribute @@toStringTag + getter readable + method constructor +interface MediaStreamTrackVideoStats + attribute @@toStringTag + getter deliveredFrames + getter discardedFrames + getter totalFrames + method constructor + method toJSON interface MessageChannel attribute @@toStringTag getter port1 @@ -4044,6 +5421,18 @@ method constructor method getModifierState method initMouseEvent +interface MutationEvent : Event + attribute @@toStringTag + attribute ADDITION + attribute MODIFICATION + attribute REMOVAL + getter attrChange + getter attrName + getter newValue + getter prevValue + getter relatedNode + method constructor + method initMutationEvent interface MutationObserver attribute @@toStringTag method constructor @@ -4062,6 +5451,35 @@ getter target getter type method constructor +interface NDEFMessage + attribute @@toStringTag + getter records + method constructor +interface NDEFReader : EventTarget + attribute @@toStringTag + getter onreading + getter onreadingerror + method constructor + method makeReadOnly + method scan + method write + setter onreading + setter onreadingerror +interface NDEFReadingEvent : Event + attribute @@toStringTag + getter message + getter serialNumber + method constructor +interface NDEFRecord + attribute @@toStringTag + getter data + getter encoding + getter id + getter lang + getter mediaType + getter recordType + method constructor + method toRecords interface NamedNodeMap attribute @@toStringTag getter length @@ -4074,6 +5492,76 @@ method removeNamedItemNS method setNamedItem method setNamedItemNS +interface NavigateEvent : Event + attribute @@toStringTag + getter canIntercept + getter canTransition + getter destination + getter downloadRequest + getter formData + getter hasUAVisualTransition + getter hashChange + getter info + getter navigationType + getter signal + getter userInitiated + method constructor + method intercept + method scroll +interface Navigation : EventTarget + attribute @@toStringTag + getter activation + getter canGoBack + getter canGoForward + getter currentEntry + getter oncurrententrychange + getter onnavigate + getter onnavigateerror + getter onnavigatesuccess + getter transition + method back + method constructor + method entries + method forward + method navigate + method reload + method traverseTo + method updateCurrentEntry + setter oncurrententrychange + setter onnavigate + setter onnavigateerror + setter onnavigatesuccess +interface NavigationActivation + attribute @@toStringTag + getter entry + getter from + getter navigationType + method constructor +interface NavigationCurrentEntryChangeEvent : Event + attribute @@toStringTag + getter from + getter navigationType + method constructor +interface NavigationDestination + attribute @@toStringTag + getter id + getter index + getter key + getter sameDocument + getter url + method constructor + method getState +interface NavigationHistoryEntry : EventTarget + attribute @@toStringTag + getter id + getter index + getter key + getter ondispose + getter sameDocument + getter url + method constructor + method getState + setter ondispose interface NavigationPreloadManager attribute @@toStringTag method constructor @@ -4081,6 +5569,12 @@ method enable method getState method setHeaderValue +interface NavigationTransition + attribute @@toStringTag + getter finished + getter from + getter navigationType + method constructor interface Navigator attribute @@toStringTag getter appCodeName @@ -4088,38 +5582,62 @@ getter appVersion getter clipboard getter connection + getter contacts getter cookieEnabled + getter credentials getter deviceMemory getter doNotTrack getter geolocation + getter gpu getter hardwareConcurrency + getter ink + getter keyboard getter language getter languages getter locks + getter managed getter maxTouchPoints + getter mediaCapabilities getter mediaDevices getter mimeTypes getter onLine + getter pdfViewerEnabled getter platform getter plugins getter product getter productSub + getter scheduling getter serviceWorker + getter storage + getter storageBuckets getter userActivation getter userAgent + getter userAgentData getter vendor getter vendorSub + getter virtualKeyboard + getter wakeLock + getter webdriver getter webkitPersistentStorage getter webkitTemporaryStorage + method clearAppBadge method constructor method getBattery method getGamepads + method getUserMedia method javaEnabled method requestMIDIAccess method requestMediaKeySystemAccess method sendBeacon + method setAppBadge method vibrate method webkitGetUserMedia +interface NavigatorManagedData : EventTarget + attribute @@toStringTag + getter onmanagedconfigurationchange + method constructor + method getManagedConfiguration + setter onmanagedconfigurationchange interface NavigatorUAData attribute @@toStringTag getter brands @@ -4131,12 +5649,16 @@ interface NetworkInformation : EventTarget attribute @@toStringTag getter downlink + getter downlinkMax getter effectiveType getter onchange + getter ontypechange getter rtt getter saveData + getter type method constructor setter onchange + setter ontypechange interface Node : EventTarget attribute @@toStringTag attribute ATTRIBUTE_NODE @@ -4210,6 +5732,21 @@ method item method keys method values +interface NotRestoredReasonDetails + attribute @@toStringTag + getter reason + method constructor + method toJSON +interface NotRestoredReasons + attribute @@toStringTag + getter children + getter id + getter name + getter reasons + getter src + getter url + method constructor + method toJSON interface OfflineAudioCompletionEvent : Event attribute @@toStringTag getter renderedBuffer @@ -4226,12 +5763,16 @@ interface OffscreenCanvas : EventTarget attribute @@toStringTag getter height + getter oncontextlost + getter oncontextrestored getter width method constructor method convertToBlob method getContext method transferToImageBitmap setter height + setter oncontextlost + setter oncontextrestored setter width interface OffscreenCanvasRenderingContext2D attribute @@toStringTag @@ -4259,9 +5800,9 @@ getter shadowOffsetY getter strokeStyle getter textAlign + getter textBaseline getter textRendering getter wordSpacing - getter textBaseline method arc method arcTo method beginPath @@ -4283,6 +5824,7 @@ method getImageData method getLineDash method getTransform + method isContextLost method isPointInPath method isPointInStroke method lineTo @@ -4291,9 +5833,11 @@ method putImageData method quadraticCurveTo method rect + method reset method resetTransform method restore method rotate + method roundRect method save method scale method setLineDash @@ -4363,6 +5907,13 @@ attribute @@toStringTag getter constraint method constructor +interface PageRevealEvent : Event + attribute @@toStringTag + method constructor +interface PageSwapEvent : Event + attribute @@toStringTag + getter activation + method constructor interface PageTransitionEvent : Event attribute @@toStringTag getter persisted @@ -4394,6 +5945,12 @@ setter panningModel setter refDistance setter rolloffFactor +interface PasswordCredential : Credential + attribute @@toStringTag + getter iconURL + getter name + getter password + method constructor interface Path2D attribute @@toStringTag method addPath @@ -4407,8 +5964,10 @@ method moveTo method quadraticCurveTo method rect + method roundRect interface Performance : EventTarget attribute @@toStringTag + getter eventCounts getter memory getter navigation getter onresourcetimingbufferfull @@ -4427,6 +5986,19 @@ method setResourceTimingBufferSize method toJSON setter onresourcetimingbufferfull +interface PerformanceElementTiming : PerformanceEntry + attribute @@toStringTag + getter element + getter id + getter identifier + getter intersectionRect + getter loadTime + getter naturalHeight + getter naturalWidth + getter renderTime + getter url + method constructor + method toJSON interface PerformanceEntry attribute @@toStringTag getter duration @@ -4435,6 +6007,24 @@ getter startTime method constructor method toJSON +interface PerformanceEventTiming : PerformanceEntry + attribute @@toStringTag + getter cancelable + getter interactionId + getter processingEnd + getter processingStart + getter target + method constructor + method toJSON +interface PerformanceLongAnimationFrameTiming : PerformanceEntry + attribute @@toStringTag + getter blockingDuration + getter firstUIEventTimestamp + getter renderStart + getter scripts + getter styleAndLayoutStart + method constructor + method toJSON interface PerformanceLongTaskTiming : PerformanceEntry attribute @@toStringTag getter attribution @@ -4442,9 +6032,11 @@ method toJSON interface PerformanceMark : PerformanceEntry attribute @@toStringTag + getter detail method constructor interface PerformanceMeasure : PerformanceEntry attribute @@toStringTag + getter detail method constructor interface PerformanceNavigation attribute @@toStringTag @@ -4458,12 +6050,15 @@ method toJSON interface PerformanceNavigationTiming : PerformanceResourceTiming attribute @@toStringTag + getter activationStart + getter criticalCHRestart getter domComplete getter domContentLoadedEventEnd getter domContentLoadedEventStart getter domInteractive getter loadEventEnd getter loadEventStart + getter notRestoredReasons getter redirectCount getter type getter unloadEventEnd @@ -4491,23 +6086,41 @@ getter connectEnd getter connectStart getter decodedBodySize + getter deliveryType getter domainLookupEnd getter domainLookupStart getter encodedBodySize getter fetchStart + getter firstInterimResponseStart getter initiatorType getter nextHopProtocol getter redirectEnd getter redirectStart + getter renderBlockingStatus getter requestStart getter responseEnd getter responseStart + getter responseStatus getter secureConnectionStart getter serverTiming getter transferSize getter workerStart method constructor method toJSON +interface PerformanceScriptTiming : PerformanceEntry + attribute @@toStringTag + getter executionStart + getter forcedStyleAndLayoutDuration + getter invoker + getter invokerType + getter pauseDuration + getter sourceCharPosition + getter sourceFunctionName + getter sourceURL + getter window + getter windowAttribution + method constructor + method toJSON interface PerformanceServerTiming attribute @@toStringTag getter description @@ -4543,6 +6156,17 @@ interface PeriodicWave attribute @@toStringTag method constructor +interface PictureInPictureEvent : Event + attribute @@toStringTag + getter pictureInPictureWindow + method constructor +interface PictureInPictureWindow : EventTarget + attribute @@toStringTag + getter height + getter onresize + getter width + method constructor + setter onresize interface Plugin attribute @@toStringTag getter description @@ -4563,6 +6187,8 @@ method refresh interface PointerEvent : MouseEvent attribute @@toStringTag + getter altitudeAngle + getter azimuthAngle getter height getter isPrimary getter pointerId @@ -4575,15 +6201,38 @@ getter width method constructor method getCoalescedEvents + method getPredictedEvents interface PopStateEvent : Event attribute @@toStringTag + getter hasUAVisualTransition getter state method constructor +interface PressureObserver + static getter supportedSources + attribute @@toStringTag + method constructor + method disconnect + method observe + method takeRecords + method unobserve +interface PressureRecord + attribute @@toStringTag + getter source + getter state + getter time + method constructor + method toJSON interface ProcessingInstruction : CharacterData attribute @@toStringTag getter sheet getter target method constructor +interface Profiler : EventTarget + attribute @@toStringTag + getter sampleInterval + getter stopped + method constructor + method stop interface ProgressEvent : Event attribute @@toStringTag getter lengthComputable @@ -4657,6 +6306,23 @@ method getRemoteCertificates setter onerror setter onstatechange +interface RTCEncodedAudioFrame + attribute @@toStringTag + getter data + getter timestamp + method constructor + method getMetadata + method toString + setter data +interface RTCEncodedVideoFrame + attribute @@toStringTag + getter data + getter timestamp + getter type + method constructor + method getMetadata + method toString + setter data interface RTCError : DOMException attribute @@toStringTag getter errorDetail @@ -4681,16 +6347,36 @@ getter protocol getter relatedAddress getter relatedPort + getter relayProtocol getter sdpMLineIndex getter sdpMid getter tcpType getter type + getter url getter usernameFragment method constructor method toJSON +interface RTCIceTransport : EventTarget + attribute @@toStringTag + getter gatheringState + getter ongatheringstatechange + getter onselectedcandidatepairchange + getter onstatechange + getter role + getter state + method constructor + method getLocalCandidates + method getLocalParameters + method getRemoteCandidates + method getRemoteParameters + method getSelectedCandidatePair + setter ongatheringstatechange + setter onselectedcandidatepairchange + setter onstatechange interface RTCPeerConnection : EventTarget static method generateCertificate attribute @@toStringTag + getter canTrickleIceCandidates getter connectionState getter currentLocalDescription getter currentRemoteDescription @@ -4701,6 +6387,7 @@ getter onconnectionstatechange getter ondatachannel getter onicecandidate + getter onicecandidateerror getter oniceconnectionstatechange getter onicegatheringstatechange getter onnegotiationneeded @@ -4710,6 +6397,7 @@ getter pendingLocalDescription getter pendingRemoteDescription getter remoteDescription + getter sctp getter signalingState method addIceCandidate method addStream @@ -4730,6 +6418,7 @@ method getTransceivers method removeStream method removeTrack + method restartIce method setConfiguration method setLocalDescription method setRemoteDescription @@ -4737,12 +6426,22 @@ setter onconnectionstatechange setter ondatachannel setter onicecandidate + setter onicecandidateerror setter oniceconnectionstatechange setter onicegatheringstatechange setter onnegotiationneeded setter onremovestream setter onsignalingstatechange setter ontrack +interface RTCPeerConnectionIceErrorEvent : Event + attribute @@toStringTag + getter address + getter errorCode + getter errorText + getter hostCandidate + getter port + getter url + method constructor interface RTCPeerConnectionIceEvent : Event attribute @@toStringTag getter candidate @@ -4750,22 +6449,33 @@ interface RTCRtpReceiver static method getCapabilities attribute @@toStringTag + getter jitterBufferTarget + getter playoutDelayHint + getter rtcpTransport getter track + getter transport method constructor + method createEncodedStreams method getContributingSources method getParameters method getStats method getSynchronizationSources + setter jitterBufferTarget + setter playoutDelayHint interface RTCRtpSender static method getCapabilities attribute @@toStringTag getter dtmf + getter rtcpTransport getter track + getter transport method constructor + method createEncodedStreams method getParameters method getStats method replaceTrack method setParameters + method setStreams interface RTCRtpTransceiver attribute @@toStringTag getter currentDirection @@ -4775,7 +6485,21 @@ getter sender getter stopped method constructor + method getHeaderExtensionsToNegotiate + method getNegotiatedHeaderExtensions + method setCodecPreferences + method setHeaderExtensionsToNegotiate + method stop setter direction +interface RTCSctpTransport : EventTarget + attribute @@toStringTag + getter maxChannels + getter maxMessageSize + getter onstatechange + getter state + getter transport + method constructor + setter onstatechange interface RTCSessionDescription attribute @@toStringTag getter sdp @@ -4805,20 +6529,16 @@ interface RadioNodeList : NodeList attribute @@toStringTag getter value + method @@iterator method constructor setter value -interface Range +interface Range : AbstractRange attribute @@toStringTag attribute END_TO_END attribute END_TO_START attribute START_TO_END attribute START_TO_START - getter collapsed getter commonAncestorContainer - getter endContainer - getter endOffset - getter startContainer - getter startOffset method cloneContents method cloneRange method collapse @@ -4845,15 +6565,52 @@ method setStartBefore method surroundContents method toString +interface ReadableByteStreamController + attribute @@toStringTag + getter byobRequest + getter desiredSize + method close + method constructor + method enqueue + method error interface ReadableStream attribute @@toStringTag getter locked + method @@asyncIterator method cancel method constructor method getReader method pipeThrough method pipeTo method tee + method values +interface ReadableStreamBYOBReader + attribute @@toStringTag + getter closed + method cancel + method constructor + method read + method releaseLock +interface ReadableStreamBYOBRequest + attribute @@toStringTag + getter view + method constructor + method respond + method respondWithNewView +interface ReadableStreamDefaultController + attribute @@toStringTag + getter desiredSize + method close + method constructor + method enqueue + method error +interface ReadableStreamDefaultReader + attribute @@toStringTag + getter closed + method cancel + method constructor + method read + method releaseLock interface RelativeOrientationSensor : OrientationSensor attribute @@toStringTag method constructor @@ -4865,6 +6622,7 @@ method takeRecords interface Request attribute @@toStringTag + getter body getter bodyUsed getter cache getter credentials @@ -4879,6 +6637,7 @@ getter referrer getter referrerPolicy getter signal + getter targetAddressSpace getter url method arrayBuffer method blob @@ -4895,9 +6654,17 @@ method unobserve interface ResizeObserverEntry attribute @@toStringTag + getter borderBoxSize + getter contentBoxSize getter contentRect + getter devicePixelContentBoxSize getter target method constructor +interface ResizeObserverSize + attribute @@toStringTag + getter blockSize + getter inlineSize + method constructor interface Response static method error static method redirect @@ -5039,9 +6806,10 @@ getter cy getter r method constructor -interface SVGClipPathElement : SVGGraphicsElement +interface SVGClipPathElement : SVGElement attribute @@toStringTag getter clipPathUnits + getter transform method constructor interface SVGComponentTransferFunctionElement : SVGElement attribute @@toStringTag @@ -5067,6 +6835,7 @@ method constructor interface SVGElement : Element attribute @@toStringTag + getter attributeStyleMap getter autofocus getter className getter dataset @@ -5076,6 +6845,10 @@ getter onanimationiteration getter onanimationstart getter onauxclick + getter onbeforeinput + getter onbeforematch + getter onbeforetoggle + getter onbeforexrselect getter onblur getter oncancel getter oncanplay @@ -5083,7 +6856,10 @@ getter onchange getter onclick getter onclose + getter oncontentvisibilityautostatechange + getter oncontextlost getter oncontextmenu + getter oncontextrestored getter oncopy getter oncuechange getter oncut @@ -5138,11 +6914,14 @@ getter onreset getter onresize getter onscroll + getter onscrollend + getter onsecuritypolicyviolation getter onseeked getter onseeking getter onselect getter onselectionchange getter onselectstart + getter onslotchange getter onstalled getter onsubmit getter onsuspend @@ -5152,7 +6931,10 @@ getter ontouchend getter ontouchmove getter ontouchstart + getter ontransitioncancel getter ontransitionend + getter ontransitionrun + getter ontransitionstart getter onvolumechange getter onwaiting getter onwebkitanimationend @@ -5174,6 +6956,10 @@ setter onanimationiteration setter onanimationstart setter onauxclick + setter onbeforeinput + setter onbeforematch + setter onbeforetoggle + setter onbeforexrselect setter onblur setter oncancel setter oncanplay @@ -5181,7 +6967,10 @@ setter onchange setter onclick setter onclose + setter oncontentvisibilityautostatechange + setter oncontextlost setter oncontextmenu + setter oncontextrestored setter oncopy setter oncuechange setter oncut @@ -5236,11 +7025,14 @@ setter onreset setter onresize setter onscroll + setter onscrollend + setter onsecuritypolicyviolation setter onseeked setter onseeking setter onselect setter onselectionchange setter onselectstart + setter onslotchange setter onstalled setter onsubmit setter onsuspend @@ -5250,7 +7042,10 @@ setter ontouchend setter ontouchmove setter ontouchstart + setter ontransitioncancel setter ontransitionend + setter ontransitionrun + setter ontransitionstart setter onvolumechange setter onwaiting setter onwebkitanimationend @@ -5608,6 +7403,7 @@ method getScreenCTM interface SVGImageElement : SVGGraphicsElement attribute @@toStringTag + getter crossOrigin getter decoding getter height getter href @@ -5617,6 +7413,7 @@ getter y method constructor method decode + setter crossOrigin setter decoding interface SVGLength attribute @@toStringTag @@ -6040,7 +7837,15 @@ getter zoomAndPan method constructor setter zoomAndPan -interface Screen +interface Scheduler + attribute @@toStringTag + method constructor + method postTask +interface Scheduling + attribute @@toStringTag + method constructor + method isInputPending +interface Screen : EventTarget attribute @@toStringTag getter availHeight getter availLeft @@ -6048,10 +7853,31 @@ getter availWidth getter colorDepth getter height + getter isExtended + getter onchange getter orientation getter pixelDepth getter width method constructor + setter onchange +interface ScreenDetailed : Screen + attribute @@toStringTag + getter devicePixelRatio + getter isInternal + getter isPrimary + getter label + getter left + getter top + method constructor +interface ScreenDetails : EventTarget + attribute @@toStringTag + getter currentScreen + getter oncurrentscreenchange + getter onscreenschange + getter screens + method constructor + setter oncurrentscreenchange + setter onscreenschange interface ScreenOrientation : EventTarget attribute @@toStringTag getter angle @@ -6067,6 +7893,11 @@ getter onaudioprocess method constructor setter onaudioprocess +interface ScrollTimeline : AnimationTimeline + attribute @@toStringTag + getter axis + getter source + method constructor interface SecurityPolicyViolationEvent : Event attribute @@toStringTag getter blockedURI @@ -6158,6 +7989,8 @@ interface ServiceWorkerRegistration : EventTarget attribute @@toStringTag getter active + getter cookies + getter index getter installing getter navigationPreload getter onupdatefound @@ -6173,18 +8006,28 @@ attribute @@toStringTag getter activeElement getter adoptedStyleSheets + getter clonable getter delegatesFocus getter fullscreenElement getter host getter innerHTML + getter mode + getter onslotchange + getter pictureInPictureElement + getter pointerLockElement + getter slotAssignment getter styleSheets method constructor method elementFromPoint method elementsFromPoint + method getAnimations + method getInnerHTML method getSelection + method setHTMLUnsafe setter adoptedStyleSheets setter fullscreenElement setter innerHTML + setter onslotchange interface SourceBuffer : EventTarget attribute @@toStringTag getter appendWindowEnd @@ -6221,13 +8064,8 @@ method constructor setter onaddsourcebuffer setter onremovesourcebuffer -interface StaticRange +interface StaticRange : AbstractRange attribute @@toStringTag - getter collapsed - getter endContainer - getter endOffset - getter startContainer - getter startOffset method constructor interface StereoPannerNode : AudioNode attribute @@toStringTag @@ -6242,6 +8080,24 @@ method key method removeItem method setItem +interface StorageBucket + attribute @@toStringTag + getter caches + getter indexedDB + getter name + method constructor + method estimate + method expires + method getDirectory + method persist + method persisted + method setExpires +interface StorageBucketManager + attribute @@toStringTag + method constructor + method delete + method keys + method open interface StorageEvent : Event attribute @@toStringTag getter key @@ -6251,6 +8107,13 @@ getter url method constructor method initStorageEvent +interface StorageManager : EventTarget + attribute @@toStringTag + method constructor + method estimate + method getDirectory + method persist + method persisted interface StylePropertyMap : StylePropertyMapReadOnly attribute @@toStringTag method append @@ -6281,12 +8144,17 @@ getter type method constructor setter disabled + setter media interface StyleSheetList attribute @@toStringTag getter length method @@iterator method constructor method item +interface SubmitEvent : Event + attribute @@toStringTag + getter submitter + method constructor interface SubtleCrypto attribute @@toStringTag method constructor @@ -6315,6 +8183,20 @@ getter containerType method constructor method toJSON +interface TaskController : AbortController + attribute @@toStringTag + method constructor + method setPriority +interface TaskPriorityChangeEvent : Event + attribute @@toStringTag + getter previousPriority + method constructor +interface TaskSignal : AbortSignal + attribute @@toStringTag + getter onprioritychange + getter priority + method constructor + setter onprioritychange interface Text : CharacterData attribute @@toStringTag getter assignedSlot @@ -6353,8 +8235,28 @@ getter data method constructor method initTextEvent +interface TextFormat + attribute @@toStringTag + getter rangeEnd + getter rangeStart + getter underlineStyle + getter underlineThickness + method constructor +interface TextFormatUpdateEvent : Event + attribute @@toStringTag + method constructor + method getTextFormats interface TextMetrics attribute @@toStringTag + getter actualBoundingBoxAscent + getter actualBoundingBoxDescent + getter actualBoundingBoxLeft + getter actualBoundingBoxRight + getter alphabeticBaseline + getter fontBoundingBoxAscent + getter fontBoundingBoxDescent + getter hangingBaseline + getter ideographicBaseline getter width method constructor interface TextTrack : EventTarget @@ -6406,12 +8308,25 @@ setter onaddtrack setter onchange setter onremovetrack +interface TextUpdateEvent : Event + attribute @@toStringTag + getter selectionEnd + getter selectionStart + getter text + getter updateRangeEnd + getter updateRangeStart + method constructor interface TimeRanges attribute @@toStringTag getter length method constructor method end method start +interface ToggleEvent : Event + attribute @@toStringTag + getter newState + getter oldState + method constructor interface Touch attribute @@toStringTag getter clientX @@ -6447,6 +8362,18 @@ attribute @@toStringTag getter track method constructor +interface TransformStream + attribute @@toStringTag + getter readable + getter writable + method constructor +interface TransformStreamDefaultController + attribute @@toStringTag + getter desiredSize + method constructor + method enqueue + method error + method terminate interface TransitionEvent : Event attribute @@toStringTag getter elapsedTime @@ -6468,6 +8395,41 @@ method previousNode method previousSibling setter currentNode +interface TrustedHTML + attribute @@toStringTag + method constructor + method toJSON + method toString +interface TrustedScript + attribute @@toStringTag + method constructor + method toJSON + method toString +interface TrustedScriptURL + attribute @@toStringTag + method constructor + method toJSON + method toString +interface TrustedTypePolicy + attribute @@toStringTag + getter name + method constructor + method createHTML + method createScript + method createScriptURL +interface TrustedTypePolicyFactory : EventTarget + attribute @@toStringTag + getter defaultPolicy + getter emptyHTML + getter emptyScript + method constructor + method createPolicy + method getAttributeType + method getPropertyType + method getTypeMapping + method isHTML + method isScript + method isScriptURL interface UIEvent : Event attribute @@toStringTag getter detail @@ -6477,6 +8439,7 @@ method constructor method initUIEvent interface URL + static method canParse static method createObjectURL static method revokeObjectURL attribute @@toStringTag @@ -6505,8 +8468,23 @@ setter protocol setter search setter username +interface URLPattern + attribute @@toStringTag + getter hasRegExpGroups + getter hash + getter hostname + getter password + getter pathname + getter port + getter protocol + getter search + getter username + method constructor + method exec + method test interface URLSearchParams attribute @@toStringTag + getter size method @@iterator method append method constructor @@ -6558,6 +8536,107 @@ getter valid getter valueMissing method constructor +interface VideoColorSpace + attribute @@toStringTag + getter fullRange + getter matrix + getter primaries + getter transfer + method constructor + method toJSON +interface VideoDecoder : EventTarget + static method isConfigSupported + attribute @@toStringTag + getter decodeQueueSize + getter ondequeue + getter state + method close + method configure + method constructor + method decode + method flush + method reset + setter ondequeue +interface VideoEncoder : EventTarget + static method isConfigSupported + attribute @@toStringTag + getter encodeQueueSize + getter ondequeue + getter state + method close + method configure + method constructor + method encode + method flush + method reset + setter ondequeue +interface VideoFrame + attribute @@toStringTag + getter codedHeight + getter codedRect + getter codedWidth + getter colorSpace + getter displayHeight + getter displayWidth + getter duration + getter format + getter timestamp + getter visibleRect + method allocationSize + method clone + method close + method constructor + method copyTo +interface VideoPlaybackQuality + attribute @@toStringTag + getter corruptedVideoFrames + getter creationTime + getter droppedVideoFrames + getter totalVideoFrames + method constructor +interface ViewTimeline : ScrollTimeline + attribute @@toStringTag + getter endOffset + getter startOffset + getter subject + method constructor +interface ViewTransition + attribute @@toStringTag + getter finished + getter ready + getter types + getter updateCallbackDone + method constructor + method skipTransition +interface ViewTransitionTypeSet + attribute @@toStringTag + getter size + method @@iterator + method add + method clear + method constructor + method delete + method entries + method forEach + method has + method keys + method values +interface VirtualKeyboard : EventTarget + attribute @@toStringTag + getter boundingRect + getter ongeometrychange + getter overlaysContent + method constructor + method hide + method show + setter ongeometrychange + setter overlaysContent +interface VirtualKeyboardGeometryChangeEvent : Event + attribute @@toStringTag + method constructor +interface VisibilityStateEntry : PerformanceEntry + attribute @@toStringTag + method constructor interface VisualViewport : EventTarget attribute @@toStringTag getter height @@ -6572,6 +8651,28 @@ method constructor setter onresize setter onscroll +interface WGSLLanguageFeatures + attribute @@toStringTag + getter size + method @@iterator + method constructor + method entries + method forEach + method has + method keys + method values +interface WakeLock + attribute @@toStringTag + method constructor + method request +interface WakeLockSentinel : EventTarget + attribute @@toStringTag + getter onrelease + getter released + getter type + method constructor + method release + setter onrelease interface WaveShaperNode : AudioNode attribute @@toStringTag getter curve @@ -7142,6 +9243,7 @@ attribute ZERO getter canvas getter drawingBufferColorSpace + getter drawingBufferFormat getter drawingBufferHeight getter drawingBufferWidth getter unpackColorSpace @@ -7222,6 +9324,7 @@ method drawElements method drawElementsInstanced method drawRangeElements + method drawingBufferStorage method enable method enableVertexAttribArray method endQuery @@ -7581,8 +9684,10 @@ attribute RGB attribute RGB565 attribute RGB5_A1 + attribute RGB8 attribute RGBA attribute RGBA4 + attribute RGBA8 attribute SAMPLER_2D attribute SAMPLER_CUBE attribute SAMPLES @@ -7697,6 +9802,7 @@ attribute ZERO getter canvas getter drawingBufferColorSpace + getter drawingBufferFormat getter drawingBufferHeight getter drawingBufferWidth getter unpackColorSpace @@ -7747,6 +9853,7 @@ method disableVertexAttribArray method drawArrays method drawElements + method drawingBufferStorage method enable method enableVertexAttribArray method finish @@ -7955,6 +10062,53 @@ setter onerror setter onmessage setter onopen +interface WebSocketError : DOMException + attribute @@toStringTag + getter closeCode + getter reason + method constructor +interface WebSocketStream + attribute @@toStringTag + getter closed + getter opened + getter url + method close + method constructor +interface WebTransport + attribute @@toStringTag + getter closed + getter datagrams + getter incomingBidirectionalStreams + getter incomingUnidirectionalStreams + getter ready + method close + method constructor + method createBidirectionalStream + method createUnidirectionalStream +interface WebTransportBidirectionalStream + attribute @@toStringTag + getter readable + getter writable + method constructor +interface WebTransportDatagramDuplexStream + attribute @@toStringTag + getter incomingHighWaterMark + getter incomingMaxAge + getter maxDatagramSize + getter outgoingHighWaterMark + getter outgoingMaxAge + getter readable + getter writable + method constructor + setter incomingHighWaterMark + setter incomingMaxAge + setter outgoingHighWaterMark + setter outgoingMaxAge +interface WebTransportError : DOMException + attribute @@toStringTag + getter source + getter streamErrorCode + method constructor interface WheelEvent : MouseEvent attribute @@toStringTag attribute DOM_DELTA_LINE @@ -7982,6 +10136,32 @@ method terminate setter onerror setter onmessage +interface Worklet + attribute @@toStringTag + method addModule + method constructor +interface WritableStream + attribute @@toStringTag + getter locked + method abort + method close + method constructor + method getWriter +interface WritableStreamDefaultController + attribute @@toStringTag + getter signal + method constructor + method error +interface WritableStreamDefaultWriter + attribute @@toStringTag + getter closed + getter desiredSize + getter ready + method abort + method close + method constructor + method releaseLock + method write interface XMLDocument : Document attribute @@toStringTag method constructor @@ -8011,6 +10191,8 @@ method open method overrideMimeType method send + method setAttributionReporting + method setPrivateToken method setRequestHeader setter onreadystatechange setter responseType @@ -8072,6 +10254,16 @@ method constructor method iterateNext method snapshotItem +interface XRDOMOverlayState + attribute @@toStringTag + getter type + method constructor +interface XRLayer : EventTarget + attribute @@toStringTag + method constructor +interface XRWebGLBinding + attribute @@toStringTag + method constructor interface XSLTProcessor attribute @@toStringTag method clearParameters @@ -8106,6 +10298,7 @@ interface webkitRTCPeerConnection : EventTarget static method generateCertificate attribute @@toStringTag + getter canTrickleIceCandidates getter connectionState getter currentLocalDescription getter currentRemoteDescription @@ -8116,6 +10309,7 @@ getter onconnectionstatechange getter ondatachannel getter onicecandidate + getter onicecandidateerror getter oniceconnectionstatechange getter onicegatheringstatechange getter onnegotiationneeded @@ -8125,6 +10319,7 @@ getter pendingLocalDescription getter pendingRemoteDescription getter remoteDescription + getter sctp getter signalingState method addIceCandidate method addStream @@ -8145,6 +10340,7 @@ method getTransceivers method removeStream method removeTrack + method restartIce method setConfiguration method setLocalDescription method setRemoteDescription @@ -8152,6 +10348,7 @@ setter onconnectionstatechange setter ondatachannel setter onicecandidate + setter onicecandidateerror setter oniceconnectionstatechange setter onicegatheringstatechange setter onnegotiationneeded @@ -8162,7 +10359,6 @@ attribute @@toStringTag getter src getter weight - method constructor setter src setter weight interface webkitSpeechGrammarList @@ -8171,7 +10367,6 @@ method @@iterator method addFromString method addFromUri - method constructor method item interface webkitSpeechRecognition : EventTarget attribute @@toStringTag @@ -8192,7 +10387,6 @@ getter onspeechstart getter onstart method abort - method constructor method start method stop setter continuous @@ -8215,15 +10409,12 @@ attribute @@toStringTag getter error getter message - method constructor interface webkitSpeechRecognitionEvent : Event attribute @@toStringTag - getter emma - getter interpretation getter resultIndex getter results - method constructor interface webkitURL + static method canParse static method createObjectURL static method revokeObjectURL attribute @@toStringTag @@ -8252,44 +10443,189 @@ setter protocol setter search setter username +[NAMESPACES] +namespace CSS + attribute @@toStringTag + getter highlights + getter paintWorklet + method Hz + method Q + method cap + method ch + method cm + method cqb + method cqh + method cqi + method cqmax + method cqmin + method cqw + method deg + method dpcm + method dpi + method dppx + method dvb + method dvh + method dvi + method dvmax + method dvmin + method dvw + method em + method escape + method ex + method fr + method grad + method ic + method in + method kHz + method lh + method lvb + method lvh + method lvi + method lvmax + method lvmin + method lvw + method mm + method ms + method number + method pc + method percent + method pt + method px + method rad + method rcap + method rch + method registerProperty + method rem + method rex + method ric + method rlh + method s + method supports + method svb + method svh + method svi + method svmax + method svmin + method svw + method turn + method vb + method vh + method vi + method vmax + method vmin + method vw + method x +namespace GPUBufferUsage + attribute @@toStringTag + attribute COPY_DST + attribute COPY_SRC + attribute INDEX + attribute INDIRECT + attribute MAP_READ + attribute MAP_WRITE + attribute QUERY_RESOLVE + attribute STORAGE + attribute UNIFORM + attribute VERTEX +namespace GPUColorWrite + attribute @@toStringTag + attribute ALL + attribute ALPHA + attribute BLUE + attribute GREEN + attribute RED +namespace GPUMapMode + attribute @@toStringTag + attribute READ + attribute WRITE +namespace GPUShaderStage + attribute @@toStringTag + attribute COMPUTE + attribute FRAGMENT + attribute VERTEX +namespace GPUTextureUsage + attribute @@toStringTag + attribute COPY_DST + attribute COPY_SRC + attribute RENDER_ATTACHMENT + attribute STORAGE_BINDING + attribute TEXTURE_BINDING +namespace console + attribute @@toStringTag + getter memory + method assert + method clear + method context + method count + method countReset + method createTask + method debug + method dir + method dirxml + method error + method group + method groupCollapsed + method groupEnd + method info + method log + method profile + method profileEnd + method table + method time + method timeEnd + method timeLog + method timeStamp + method trace + method warn + setter memory [GLOBAL OBJECT] - attribute closed - attribute console - attribute frames - attribute length - attribute location - attribute opener - attribute parent + attribute android + attribute android_webview_media_token_provider_listener + attribute awConsole + attribute globalThis attribute propertyNamesInGlobal - attribute self - attribute top - attribute window - getter applicationCache getter caches getter clientInformation + getter closed + getter cookieStore + getter credentialless + getter crossOriginIsolated getter crypto - getter defaultStatus - getter defaultstatus + getter customElements getter devicePixelRatio getter document getter event + getter external getter frameElement + getter frames getter history getter indexedDB getter innerHeight getter innerWidth getter isSecureContext + getter length getter localStorage + getter location getter locationbar getter menubar getter name + getter navigation getter navigator getter offscreenBuffering getter onabort + getter onafterprint getter onanimationend getter onanimationiteration getter onanimationstart + getter onappinstalled + getter onauxclick + getter onbeforeinput + getter onbeforeinstallprompt + getter onbeforematch + getter onbeforeprint + getter onbeforetoggle getter onbeforeunload + getter onbeforexrselect getter onblur getter oncancel getter oncanplay @@ -8297,7 +10633,10 @@ getter onchange getter onclick getter onclose + getter oncontentvisibilityautostatechange + getter oncontextlost getter oncontextmenu + getter oncontextrestored getter oncuechange getter ondblclick getter ondevicemotion @@ -8315,6 +10654,8 @@ getter onended getter onerror getter onfocus + getter onformdata + getter ongotpointercapture getter onhashchange getter oninput getter oninvalid @@ -8326,6 +10667,7 @@ getter onloadeddata getter onloadedmetadata getter onloadstart + getter onlostpointercapture getter onmessage getter onmessageerror getter onmousedown @@ -8338,11 +10680,23 @@ getter onmousewheel getter onoffline getter ononline + getter onorientationchange getter onpagehide + getter onpagereveal getter onpageshow + getter onpageswap getter onpause getter onplay getter onplaying + getter onpointercancel + getter onpointerdown + getter onpointerenter + getter onpointerleave + getter onpointermove + getter onpointerout + getter onpointerover + getter onpointerrawupdate + getter onpointerup getter onpopstate getter onprogress getter onratechange @@ -8350,12 +10704,15 @@ getter onreset getter onresize getter onscroll + getter onscrollend getter onsearch + getter onsecuritypolicyviolation getter onseeked getter onseeking getter onselect getter onselectionchange getter onselectstart + getter onslotchange getter onstalled getter onstorage getter onsubmit @@ -8366,7 +10723,10 @@ getter ontouchend getter ontouchmove getter ontouchstart + getter ontransitioncancel getter ontransitionend + getter ontransitionrun + getter ontransitionstart getter onunhandledrejection getter onunload getter onvolumechange @@ -8376,12 +10736,18 @@ getter onwebkitanimationstart getter onwebkittransitionend getter onwheel + getter opener + getter orientation + getter origin + getter originAgentCluster getter outerHeight getter outerWidth getter pageXOffset getter pageYOffset + getter parent getter performance getter personalbar + getter scheduler getter screen getter screenLeft getter screenTop @@ -8390,13 +10756,16 @@ getter scrollX getter scrollY getter scrollbars + getter self getter sessionStorage getter status getter statusbar getter styleMedia getter toolbar + getter top + getter trustedTypes getter visualViewport - getter webkitStorageInfo + getter window method NodeFilter method alert method atob @@ -8414,6 +10783,7 @@ method find method focus method getComputedStyle + method getScreenDetails method getSelection method matchMedia method moveBy @@ -8422,7 +10792,9 @@ method postMessage method print method prompt + method queueMicrotask method releaseEvents + method reportError method requestAnimationFrame method requestIdleCallback method resizeBy @@ -8433,24 +10805,37 @@ method setInterval method setTimeout method stop + method structuredClone method webkitCancelAnimationFrame method webkitRequestAnimationFrame setter clientInformation - setter defaultStatus - setter defaultstatus setter devicePixelRatio setter event + setter external + setter frames setter innerHeight setter innerWidth + setter length + setter location setter locationbar setter menubar setter name + setter navigation setter offscreenBuffering setter onabort + setter onafterprint setter onanimationend setter onanimationiteration setter onanimationstart + setter onappinstalled + setter onauxclick + setter onbeforeinput + setter onbeforeinstallprompt + setter onbeforematch + setter onbeforeprint + setter onbeforetoggle setter onbeforeunload + setter onbeforexrselect setter onblur setter oncancel setter oncanplay @@ -8458,7 +10843,10 @@ setter onchange setter onclick setter onclose + setter oncontentvisibilityautostatechange + setter oncontextlost setter oncontextmenu + setter oncontextrestored setter oncuechange setter ondblclick setter ondevicemotion @@ -8476,6 +10864,8 @@ setter onended setter onerror setter onfocus + setter onformdata + setter ongotpointercapture setter onhashchange setter oninput setter oninvalid @@ -8487,6 +10877,7 @@ setter onloadeddata setter onloadedmetadata setter onloadstart + setter onlostpointercapture setter onmessage setter onmessageerror setter onmousedown @@ -8499,11 +10890,23 @@ setter onmousewheel setter onoffline setter ononline + setter onorientationchange setter onpagehide + setter onpagereveal setter onpageshow + setter onpageswap setter onpause setter onplay setter onplaying + setter onpointercancel + setter onpointerdown + setter onpointerenter + setter onpointerleave + setter onpointermove + setter onpointerout + setter onpointerover + setter onpointerrawupdate + setter onpointerup setter onpopstate setter onprogress setter onratechange @@ -8511,12 +10914,15 @@ setter onreset setter onresize setter onscroll + setter onscrollend setter onsearch + setter onsecuritypolicyviolation setter onseeked setter onseeking setter onselect setter onselectionchange setter onselectstart + setter onslotchange setter onstalled setter onstorage setter onsubmit @@ -8527,7 +10933,10 @@ setter ontouchend setter ontouchmove setter ontouchstart + setter ontransitioncancel setter ontransitionend + setter ontransitionrun + setter ontransitionstart setter onunhandledrejection setter onunload setter onvolumechange @@ -8537,12 +10946,16 @@ setter onwebkitanimationstart setter onwebkittransitionend setter onwheel + setter opener + setter origin setter outerHeight setter outerWidth setter pageXOffset setter pageYOffset + setter parent setter performance setter personalbar + setter scheduler setter screen setter screenLeft setter screenTop @@ -8551,9 +10964,9 @@ setter scrollX setter scrollY setter scrollbars + setter self setter status setter statusbar setter toolbar setter visualViewport -This test documents all interface attributes and methods on the global window object and element instances. TEST FINISHED
diff --git a/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h b/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h index 9a95f093..b9cdd53 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h +++ b/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h
@@ -10,13 +10,11 @@ #include "build/build_config.h" #include "partition_alloc/freeslot_bitmap.h" -#include "partition_alloc/in_slot_metadata.h" #include "partition_alloc/partition_alloc-inl.h" #include "partition_alloc/partition_alloc_base/compiler_specific.h" #include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" #include "partition_alloc/partition_alloc_base/immediate_crash.h" #include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" #include "partition_alloc/partition_alloc_config.h" #include "partition_alloc/partition_alloc_constants.h" @@ -156,23 +154,23 @@ template <bool crash_on_corruption> PA_ALWAYS_INLINE EncodedNextFreelistEntry* GetNextForThreadCache( size_t slot_size) const { - return GetNextInternal<crash_on_corruption, /* for_thread_cache = */ true>( + return GetNextInternal<crash_on_corruption, /*for_thread_cache=*/true>( slot_size); } PA_ALWAYS_INLINE EncodedNextFreelistEntry* GetNext(size_t slot_size) const { - return GetNextInternal<true, /* for_thread_cache = */ false>(slot_size); + return GetNextInternal<true, /*for_thread_cache=*/false>(slot_size); } PA_NOINLINE void CheckFreeList(size_t slot_size) const { for (auto* entry = this; entry; entry = entry->GetNext(slot_size)) { - // |GetNext()| checks freelist integrity. + // `GetNext()` calls `IsWellFormed()`. } } PA_NOINLINE void CheckFreeListForThreadCache(size_t slot_size) const { for (auto* entry = this; entry; entry = entry->GetNextForThreadCache<true>(slot_size)) { - // |GetNextForThreadCache()| checks freelist integrity. + // `GetNextForThreadCache()` calls `IsWellFormed()`. } } @@ -234,9 +232,8 @@ PA_DEBUG_DATA_ON_STACK("second", static_cast<size_t>(shadow_)); #endif FreelistCorruptionDetected(slot_size); - } else { - return nullptr; } + return nullptr; } // In real-world profiles, the load of |encoded_next_| above is responsible @@ -247,7 +244,6 @@ // In the case of repeated allocations, we can prefetch the access that will // be done at the *next* allocation, which will touch *ret, prefetch it. PA_PREFETCH(ret); - return ret; }
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h b/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h index ae05efd..ac9791d0 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h
@@ -8,52 +8,123 @@ #include <cstddef> #include <cstdint> +#include "build/build_config.h" #include "partition_alloc/partition_address_space.h" #include "partition_alloc/partition_alloc-inl.h" #include "partition_alloc/partition_alloc_base/compiler_specific.h" +#include "partition_alloc/partition_alloc_config.h" +#include "partition_alloc/partition_alloc_constants.h" #include "partition_alloc/tagging.h" +#if !defined(ARCH_CPU_BIG_ENDIAN) +#include "partition_alloc/reverse_bytes.h" +#endif // !defined(ARCH_CPU_BIG_ENDIAN) + namespace partition_alloc::internal { +namespace { +using PoolInfo = PartitionAddressSpace::PoolInfo; +} + +class PoolOffsetFreelistEntry; + +class EncodedPoolOffset { +#if defined(ARCH_CPU_BIG_ENDIAN) + static constexpr uintptr_t kEncodeedNullptr = ~uintptr_t{0}; +#else + static constexpr uintptr_t kEncodeedNullptr = uintptr_t{0}; +#endif + + PA_ALWAYS_INLINE constexpr explicit EncodedPoolOffset(std::nullptr_t) + : encoded_(kEncodeedNullptr) {} + PA_ALWAYS_INLINE explicit EncodedPoolOffset(void* ptr) + // The encoded pointer stays MTE-tagged. + : encoded_(Encode(ptr)) {} + + PA_ALWAYS_INLINE constexpr uintptr_t Inverted() const { return ~encoded_; } + + PA_ALWAYS_INLINE constexpr void Override(uintptr_t encoded) { + encoded_ = encoded; + } + + PA_ALWAYS_INLINE constexpr explicit operator bool() const { return encoded_; } + + // Determines the containing pool of `ptr` and returns `ptr` + // represented as a tagged offset into that pool. + PA_ALWAYS_INLINE static uintptr_t Encode(void* ptr) { + if (!ptr) { + return kEncodeedNullptr; + } + uintptr_t addr = reinterpret_cast<uintptr_t>(ptr); + PoolInfo pool_info = PartitionAddressSpace::GetPoolInfo(addr); + // Save a MTE tag as well as an offset. + uintptr_t tagged_offset = addr & (kPtrTagMask | ~pool_info.base_mask); + PA_DCHECK(tagged_offset == (pool_info.offset | (addr & kPtrTagMask))); + +#if defined(ARCH_CPU_BIG_ENDIAN) + uintptr_t encoded = ~tagged_offset; +#else + uintptr_t encoded = ReverseBytes(tagged_offset); +#endif + return encoded; + } + + // Given `pool_info`, decodes a `tagged_offset` into a tagged pointer. + PA_ALWAYS_INLINE PoolOffsetFreelistEntry* Decode(PoolInfo& pool_info) const { +#if defined(ARCH_CPU_BIG_ENDIAN) + uintptr_t tagged_offset = ~encoded_; +#else + uintptr_t tagged_offset = ReverseBytes(encoded_); +#endif + + // We assume `tagged_offset` contains a proper MTE tag. + return reinterpret_cast<PoolOffsetFreelistEntry*>(pool_info.base | + tagged_offset); + } + + uintptr_t encoded_; + + friend PoolOffsetFreelistEntry; +}; + // This implementation of PartitionAlloc's freelist uses pool offsets // rather than naked pointers. This is intended to prevent usage of // freelist pointers to easily jump around to freed slots. class PoolOffsetFreelistEntry { - using PoolInfo = PartitionAddressSpace::PoolInfo; - - constexpr static uintptr_t kNullptrOffset = 0; - constexpr explicit PoolOffsetFreelistEntry(std::nullptr_t) - : next_(kNullptrOffset) + : encoded_next_(nullptr) #if PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) , - shadow_(~next_) -#endif // PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) + shadow_(encoded_next_.Inverted()) +#endif { } explicit PoolOffsetFreelistEntry(PoolOffsetFreelistEntry* next) - : next_(EncodeToOffset(next)) + : encoded_next_(next) #if PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) , - shadow_(~next_) -#endif // PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) + shadow_(encoded_next_.Inverted()) +#endif { } // For testing only. PoolOffsetFreelistEntry(void* next, bool make_shadow_match) - : next_(EncodeToOffset(next)) + : encoded_next_(next) #if PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) , - shadow_(make_shadow_match ? ~next_ : 12345) -#endif // PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) + shadow_(make_shadow_match ? encoded_next_.Inverted() : 12345) +#endif { } public: ~PoolOffsetFreelistEntry() = delete; + // Emplaces the freelist entry at the beginning of the given slot span, and + // initializes it as null-terminated. PA_ALWAYS_INLINE static PoolOffsetFreelistEntry* EmplaceAndInitNull( void* slot_start_tagged) { + // |slot_start_tagged| is MTE-tagged. auto* entry = new (slot_start_tagged) PoolOffsetFreelistEntry(nullptr); return entry; } @@ -63,6 +134,12 @@ return EmplaceAndInitNull(SlotStartAddr2Ptr(slot_start)); } + // Emplaces the freelist entry at the beginning of the given slot span, and + // initializes it with the given |next| pointer, but encoded. + // + // This freelist is built for the purpose of thread-cache. This means that we + // can't perform a check that this and the next pointer belong to the same + // super page, as thread-cache spans may chain slots across super pages. PA_ALWAYS_INLINE static PoolOffsetFreelistEntry* EmplaceAndInitForThreadCache( uintptr_t slot_start, PoolOffsetFreelistEntry* next) { @@ -71,6 +148,11 @@ return entry; } + // Emplaces the freelist entry at the beginning of the given slot span, and + // initializes it with the given |next| pointer. + // + // This is for testing purposes only! |make_shadow_match| allows you to choose + // if the shadow matches the next pointer properly or is trash. PA_ALWAYS_INLINE static void EmplaceAndInitForTest(uintptr_t slot_start, void* next, bool make_shadow_match) { @@ -79,17 +161,18 @@ } void CorruptNextForTesting(uintptr_t v) { - // TODO(crbug.com/1461983): Make this do something useful. - next_ += 1ull << 31; + // We just need a value that can never be a valid pool offset here. + encoded_next_.Override(v); } + // Puts `slot_size` on the stack before crashing in case of memory + // corruption. Meant to be used to report the failed allocation size. template <bool crash_on_corruption> PA_ALWAYS_INLINE PoolOffsetFreelistEntry* GetNextForThreadCache( size_t slot_size) const { return GetNextInternal<crash_on_corruption, /*for_thread_cache=*/true>( slot_size); } - PA_ALWAYS_INLINE PoolOffsetFreelistEntry* GetNext(size_t slot_size) const { return GetNextInternal<true, /*for_thread_cache=*/false>(slot_size); } @@ -122,9 +205,9 @@ } #endif // BUILDFLAG(PA_DCHECK_IS_ON) - next_ = EncodeToOffset(entry); + encoded_next_ = EncodedPoolOffset(entry); #if PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) - shadow_ = ~next_; + shadow_ = encoded_next_.Inverted(); #endif } @@ -132,42 +215,18 @@ // will be returned to the user (caller of Alloc()), thus can't have internal // data. PA_ALWAYS_INLINE uintptr_t ClearForAllocation() { - next_ = uintptr_t{0}; - shadow_ = uintptr_t{0}; + encoded_next_.Override(0); +#if PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) + shadow_ = 0; +#endif return SlotStartPtr2Addr(this); } PA_ALWAYS_INLINE constexpr bool IsEncodedNextPtrZero() const { - return next_ == kNullptrOffset; + return !encoded_next_; } private: - // Determines the containing pool of `ptr` and returns `ptr` - // represented as a tagged offset into that pool. `ptr` can be `nullptr`. - PA_ALWAYS_INLINE static uintptr_t EncodeToOffset(void* ptr) { - if (!ptr) { - return kNullptrOffset; - } - uintptr_t addr = reinterpret_cast<uintptr_t>(ptr); - PoolInfo pool_info = PartitionAddressSpace::GetPoolInfo(addr); - // Save a MTE tag as well as an offset. - uintptr_t tagged_offset = addr & (kPtrTagMask | ~pool_info.base_mask); - PA_DCHECK(tagged_offset == (pool_info.offset | (addr & kPtrTagMask))); - return tagged_offset; - } - - // Given `pool_info`, decodes a `tagged_offset` into a tagged pointer. - // `tagged_offset` cannot be `kNullptrOffset`, please call - // `IsEncodedNextPtrZero()` before. - PA_ALWAYS_INLINE static PoolOffsetFreelistEntry* DecodeFromOffset( - uintptr_t tagged_offset, - PoolInfo& pool_info) { - PA_DCHECK(tagged_offset != kNullptrOffset); - // We assume `tagged_offset` contains a proper MTE tag. - return reinterpret_cast<PoolOffsetFreelistEntry*>(pool_info.base | - tagged_offset); - } - template <bool crash_on_corruption, bool for_thread_cache> PA_ALWAYS_INLINE PoolOffsetFreelistEntry* GetNextInternal( size_t slot_size) const { @@ -181,10 +240,13 @@ PoolInfo pool_info = GetPoolInfo(reinterpret_cast<uintptr_t>(this)); // We assume `(next_ & pool_info.base_mask) == 0` here. // This assumption is checked in `IsWellFormed()` later. - auto* ret = DecodeFromOffset(next_, pool_info); + auto* ret = encoded_next_.Decode(pool_info); if (PA_UNLIKELY(!IsWellFormed<for_thread_cache>(pool_info, this, ret))) { if constexpr (crash_on_corruption) { - PA_DEBUG_DATA_ON_STACK("first", static_cast<size_t>(next_)); + // Put the corrupted data on the stack, it may give us more information + // about what kind of corruption that was. + PA_DEBUG_DATA_ON_STACK("first", + static_cast<size_t>(encoded_next_.encoded_)); #if PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) PA_DEBUG_DATA_ON_STACK("second", static_cast<size_t>(shadow_)); #endif @@ -192,6 +254,14 @@ } return nullptr; } + + // In real-world profiles, the load of |encoded_next_| above is responsible + // for a large fraction of the allocation cost. However, we cannot + // anticipate it enough since it is accessed right after we know its + // address. + // + // In the case of repeated allocations, we can prefetch the access that will + // be done at the *next* allocation, which will touch *ret, prefetch it. PA_PREFETCH(ret); return ret; } @@ -214,12 +284,15 @@ const uintptr_t next_address = SlotStartPtr2Addr(next); #if PA_CONFIG(HAS_FREELIST_SHADOW_ENTRY) - bool shadow_ptr_ok = (~here->next_) == here->shadow_; + bool shadow_ptr_ok = here->encoded_next_.Inverted() == here->shadow_; #else constexpr bool shadow_ptr_ok = true; #endif - const bool no_bit_in_pool_base_mask = !(here->next_ & pool_info.base_mask); + // `next_address` is MTE-untagged and `pool_info.base` does not contain a + // tag. + const bool pool_base_mask_matches = + (next_address & pool_info.base_mask) == pool_info.base; // This is necessary but not sufficient when quarantine is enabled, see // SuperPagePayloadBegin() in partition_page.h. However we don't want to @@ -228,7 +301,7 @@ (next_address & kSuperPageOffsetMask) >= PartitionPageSize(); if constexpr (for_thread_cache) { - return no_bit_in_pool_base_mask & shadow_ptr_ok & not_in_metadata; + return pool_base_mask_matches & shadow_ptr_ok & not_in_metadata; } const bool same_super_page = (here_address & kSuperPageBaseMask) == @@ -241,14 +314,13 @@ constexpr bool marked_as_free_in_bitmap = true; #endif - return no_bit_in_pool_base_mask & shadow_ptr_ok & same_super_page & + return pool_base_mask_matches & shadow_ptr_ok & same_super_page & marked_as_free_in_bitmap & not_in_metadata; } // Expresses the next entry in the freelist as an offset in the - // same pool as `this`, except when `kNullptrOffset`, which (as an invalid - // pool offset) serves as a sentinel value. - uintptr_t next_ = uintptr_t{0}; + // same pool as `this`. + EncodedPoolOffset encoded_next_; // This is intended to detect unintentional corruptions of the freelist. // These can happen due to a Use-after-Free, or overflow of the previous // allocation in the slot span.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/search_engines/DefaultSearchEngineDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/search_engines/DefaultSearchEngineDialogTest.java index a6af5d01..bb793a8 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/search_engines/DefaultSearchEngineDialogTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/search_engines/DefaultSearchEngineDialogTest.java
@@ -19,7 +19,10 @@ import androidx.test.espresso.Espresso; import androidx.test.filters.LargeTest; +import androidx.test.filters.MediumTest; +import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -34,6 +37,7 @@ import org.chromium.base.test.util.Batch; import org.chromium.base.test.util.CallbackHelper; import org.chromium.base.test.util.CommandLineFlags; +import org.chromium.base.test.util.UserActionTester; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.init.ChromeBrowserInitializer; import org.chromium.chrome.browser.locale.LocaleManager; @@ -65,6 +69,8 @@ private final FakeTemplateUrl mEngine1 = new FakeTemplateUrl("EngineOne", "EngineOneKeyword"); private final FakeTemplateUrl mEngine2 = new FakeTemplateUrl("EngineTwo", "EngineTwoKeyword"); + private UserActionTester mUserActionTester; + @Before public void setUp() throws Exception { final CallbackHelper templateUrlServiceInit = new CallbackHelper(); @@ -94,12 +100,58 @@ }); templateUrlServiceInit.waitForFirst(); mActivityTestRule.launchActivity(null); + mUserActionTester = new UserActionTester(); + } + + @After + public void tearDown() { + mUserActionTester.tearDown(); + } + + @Test + @MediumTest + public void testUserActionShowNew() { + Assert.assertEquals( + 0, mUserActionTester.getActionCount("SearchEnginePromo.NewDevice.Shown.Dialog")); + Assert.assertEquals( + 0, + mUserActionTester.getActionCount("SearchEnginePromo.ExistingDevice.Shown.Dialog")); + showDialog(SearchEnginePromoType.SHOW_NEW); + onView(withText(R.string.search_engine_dialog_title)) + .inRoot(isDialog()) + .check(matches(isDisplayed())); + + Assert.assertEquals( + 1, mUserActionTester.getActionCount("SearchEnginePromo.NewDevice.Shown.Dialog")); + Assert.assertEquals( + 0, + mUserActionTester.getActionCount("SearchEnginePromo.ExistingDevice.Shown.Dialog")); + } + + @Test + @MediumTest + public void testUserActionShowExisting() { + Assert.assertEquals( + 0, mUserActionTester.getActionCount("SearchEnginePromo.NewDevice.Shown.Dialog")); + Assert.assertEquals( + 0, + mUserActionTester.getActionCount("SearchEnginePromo.ExistingDevice.Shown.Dialog")); + showDialog(SearchEnginePromoType.SHOW_EXISTING); + onView(withText(R.string.search_engine_dialog_title)) + .inRoot(isDialog()) + .check(matches(isDisplayed())); + + Assert.assertEquals( + 0, mUserActionTester.getActionCount("SearchEnginePromo.NewDevice.Shown.Dialog")); + Assert.assertEquals( + 1, + mUserActionTester.getActionCount("SearchEnginePromo.ExistingDevice.Shown.Dialog")); } @Test @LargeTest public void testDialogView() { - showDialog(); + showDialog(SearchEnginePromoType.SHOW_EXISTING); onView(withText(R.string.search_engine_dialog_title)) .inRoot(isDialog()) @@ -112,7 +164,7 @@ @Test @LargeTest public void testButtonClickRunsCallback() { - showDialog(); + showDialog(SearchEnginePromoType.SHOW_EXISTING); onView(withText(R.string.search_engine_dialog_title)) .inRoot(isDialog()) .check(matches(isDisplayed())); @@ -126,7 +178,7 @@ @Test @LargeTest public void testButtonClickDismissesDialog() { - showDialog(); + showDialog(SearchEnginePromoType.SHOW_EXISTING); onView(withText(R.string.search_engine_dialog_title)) .inRoot(isDialog()) .check(matches(isDisplayed())); @@ -140,7 +192,7 @@ @Test @LargeTest public void testBackPressDoesNotDismissDialog() { - showDialog(); + showDialog(SearchEnginePromoType.SHOW_EXISTING); onView(withText(R.string.search_engine_dialog_title)) .inRoot(isDialog()) .check(matches(isDisplayed())); @@ -152,7 +204,7 @@ .check(matches(isDisplayed())); } - private void showDialog() { + private void showDialog(@SearchEnginePromoType int promoType) { DefaultSearchEngineDialogHelper.Delegate delegate = new DefaultSearchEngineDialogHelper.Delegate() { @Override @@ -172,7 +224,7 @@ new DefaultSearchEngineDialogCoordinator( mActivityTestRule.getActivity(), delegate, - SearchEnginePromoType.SHOW_EXISTING, + promoType, mOnSuccessCallback) .show(); });
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/settings/MainSettingsFragmentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/settings/MainSettingsFragmentTest.java index da316d8a..be61e11 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/settings/MainSettingsFragmentTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/settings/MainSettingsFragmentTest.java
@@ -126,6 +126,7 @@ import org.chromium.components.signin.base.AccountInfo; import org.chromium.components.signin.base.CoreAccountInfo; import org.chromium.components.signin.metrics.SigninAccessPoint; +import org.chromium.components.signin.test.util.AccountCapabilitiesBuilder; import org.chromium.components.signin.test.util.FakeAccountManagerFacade; import org.chromium.components.sync.SyncService; import org.chromium.content_public.browser.test.util.TestThreadUtils; @@ -638,16 +639,8 @@ // Account set up. final SigninTestRule signinTestRule = mSyncTestRule.getSigninTestRule(); AccountInfo accountInfo = - new AccountInfo.Builder( - AccountManagerTestRule.generateChildEmail("test@gmail.com"), - FakeAccountManagerFacade.toGaiaId("test-gaia-id")) - .fullName("ChildTest Full") - .givenName("ChildTest Given") - .accountCapabilities( - SigninTestRule.NON_DISPLAYABLE_EMAIL_ACCOUNT_CAPABILITIES) - .build(); - signinTestRule.addAccountAndWaitForSeeding(accountInfo); - signinTestRule.waitForSignin(accountInfo); + signinTestRule.addChildTestAccountThenWaitForSignin( + new AccountCapabilitiesBuilder().setCanHaveEmailAddressDisplayed(false)); // Force update the preference so that NON_DISPLAYABLE_EMAIL_ACCOUNT_CAPABILITIES is // actually utilized. This is to replicate downstream implementation behavior, where
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp index 5b16133..0c3309e 100644 --- a/chrome/app/chromeos_strings.grdp +++ b/chrome/app/chromeos_strings.grdp
@@ -1529,7 +1529,10 @@ <message name="IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_TURN_ON_WIFI_AND_BLT" desc="A message telling the user to turn on their phone's Bluetooth and WiFi when setting up their Chromebook using an Android phone."> Turn on your phone’s Bluetooth and Wi-Fi </message> - <message name="IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS" desc="A message telling the user to follow instructions on their phone when setting up when setting up their Chromebook using an Android phone."> + <message name="IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_PIN" desc="A message telling the user to follow instructions on their phone when setting up when setting up their Chromebook using an Android phone."> + Follow instructions on your phone to verify the code + </message> + <message name="IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_QR" desc="A message telling the user to follow instructions on their phone when setting up when setting up their Chromebook using an Android phone."> Follow instructions on your phone or use the camera app </message> <message name="IDS_LOGIN_QUICK_START_WIFI_TRANSFER_TITLE" desc="A title used on OOBE's Quick Start screen when WiFi credentials are being transferred to the Chromebook from the Android device.">
diff --git a/chrome/app/chromeos_strings_grdp/IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS.png.sha1 deleted file mode 100644 index 0e462e49..0000000 --- a/chrome/app/chromeos_strings_grdp/IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS.png.sha1 +++ /dev/null
@@ -1 +0,0 @@ -8f2761ef7c169517c035c5c554bce4a7697704ae \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_PIN.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_PIN.png.sha1 new file mode 100644 index 0000000..3463028 --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_PIN.png.sha1
@@ -0,0 +1 @@ +3eb74cd954ee14d197f31ef9b473cb5b4d43894d \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_QR.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_QR.png.sha1 new file mode 100644 index 0000000..946fdad2 --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_QR.png.sha1
@@ -0,0 +1 @@ +d1ce5ba7c6c8ae606abcfcb4a7dc24858964587c \ No newline at end of file
diff --git a/chrome/browser/android/webapk/webapk_sync_bridge_unittest.cc b/chrome/browser/android/webapk/webapk_sync_bridge_unittest.cc index 57af7463..991ed13 100644 --- a/chrome/browser/android/webapk/webapk_sync_bridge_unittest.cc +++ b/chrome/browser/android/webapk/webapk_sync_bridge_unittest.cc
@@ -205,7 +205,7 @@ database_factory().WriteRegistry(registry); - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); InitSyncBridge(); syncer::EntityData sync_data_1; @@ -407,7 +407,7 @@ database_factory().WriteRegistry(registry); - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); InitSyncBridge(); // not included in final state (older than installed version) @@ -462,8 +462,8 @@ std::unique_ptr<syncer::MetadataChangeList> metadata_change_list = syncer::ModelTypeStore::WriteBatch::CreateMetadataChangeList(); - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); std::optional<syncer::ModelError> result = sync_bridge().MergeFullSyncData( std::move(metadata_change_list), std::move(sync_changes)); @@ -555,9 +555,9 @@ } TEST_F(WebApkSyncBridgeTest, MergeFullSyncData_NoChanges) { - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); InitSyncBridge(); @@ -597,9 +597,9 @@ database_factory().WriteRegistry(registry); - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); InitSyncBridge(); @@ -691,9 +691,9 @@ } TEST_F(WebApkSyncBridgeTest, ApplyIncrementalSyncChanges_NoChanges) { - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); InitSyncBridge(); @@ -723,8 +723,8 @@ database_factory().WriteRegistry(registry); - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); + EXPECT_CALL(processor(), Delete).Times(0); InitSyncBridge(); @@ -754,7 +754,7 @@ base::RunLoop run_loop; - ON_CALL(processor(), Put(_, _, _)) + ON_CALL(processor(), Put) .WillByDefault([&](const std::string& storage_key, std::unique_ptr<syncer::EntityData> entity_data, syncer::MetadataChangeList* metadata) { @@ -806,8 +806,8 @@ } TEST_F(WebApkSyncBridgeTest, OnWebApkUsed_CreateNewSyncEntry) { - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); + EXPECT_CALL(processor(), Delete).Times(0); InitSyncBridge(); @@ -823,7 +823,7 @@ base::RunLoop run_loop; - ON_CALL(processor(), Put(_, _, _)) + ON_CALL(processor(), Put) .WillByDefault([&](const std::string& storage_key, std::unique_ptr<syncer::EntityData> entity_data, syncer::MetadataChangeList* metadata) { @@ -889,13 +889,14 @@ database_factory().WriteRegistry(registry); - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); + EXPECT_CALL(processor(), Put).Times(0); base::RunLoop run_loop; - ON_CALL(processor(), Delete(_, _)) + ON_CALL(processor(), Delete) .WillByDefault([&](const std::string& storage_key, + const syncer::DeletionOrigin& origin, syncer::MetadataChangeList* metadata_change_list) { EXPECT_EQ(ManifestIdStrToAppId(manifest_id), storage_key); run_loop.Quit(); @@ -913,9 +914,9 @@ } TEST_F(WebApkSyncBridgeTest, OnWebApkUninstalled_AppDoesNotExist) { - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); InitSyncBridge(); @@ -943,9 +944,9 @@ database_factory().WriteRegistry(registry); - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); InitSyncBridge(); @@ -1001,7 +1002,7 @@ database_factory().WriteRegistry(registry); - EXPECT_CALL(processor(), ModelReadyToSync(_)).Times(1); + EXPECT_CALL(processor(), ModelReadyToSync).Times(1); InitSyncBridge(); { @@ -1111,6 +1112,7 @@ ON_CALL(processor(), Delete) .WillByDefault([&](const std::string& storage_key, + const syncer::DeletionOrigin& origin, syncer::MetadataChangeList* metadata_change_list) { EXPECT_EQ(ManifestIdStrToAppId(manifest_id_1), storage_key); run_loop.Quit();
diff --git a/chrome/browser/apps/app_service/media_access_browsertest.cc b/chrome/browser/apps/app_service/media_access_browsertest.cc index f6d6a8e..f9e88e66 100644 --- a/chrome/browser/apps/app_service/media_access_browsertest.cc +++ b/chrome/browser/apps/app_service/media_access_browsertest.cc
@@ -13,7 +13,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/test/web_app_test_observers.h" #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" @@ -345,7 +345,7 @@ AccessingMicrophone(browser()->profile(), app_constants::kChromeAppId)); } -class MediaAccessWebAppsTest : public web_app::WebAppControllerBrowserTest { +class MediaAccessWebAppsTest : public web_app::WebAppBrowserTestBase { public: MediaAccessWebAppsTest() = default; ~MediaAccessWebAppsTest() override = default;
diff --git a/chrome/browser/apps/app_service/webapk/webapk_utils_lacros_browsertest.cc b/chrome/browser/apps/app_service/webapk/webapk_utils_lacros_browsertest.cc index d7c73eb..eb3ff96d 100644 --- a/chrome/browser/apps/app_service/webapk/webapk_utils_lacros_browsertest.cc +++ b/chrome/browser/apps/app_service/webapk/webapk_utils_lacros_browsertest.cc
@@ -2,20 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/apps/app_service/webapk/webapk_utils.h" - #include "base/run_loop.h" #include "base/test/bind.h" #include "base/test/test_future.h" +#include "chrome/browser/apps/app_service/webapk/webapk_utils.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "components/webapk/webapk.pb.h" #include "content/public/test/browser_test.h" #include "net/test/embedded_test_server/embedded_test_server.h" namespace apps { -using WebApkUtilsBrowserTest = web_app::WebAppControllerBrowserTest; +using WebApkUtilsBrowserTest = web_app::WebAppBrowserTestBase; IN_PROC_BROWSER_TEST_F(WebApkUtilsBrowserTest, GetWebApk) { const GURL start_url =
diff --git a/chrome/browser/ash/crosapi/browser_util.cc b/chrome/browser/ash/crosapi/browser_util.cc index 096a1c66..042cfa9 100644 --- a/chrome/browser/ash/crosapi/browser_util.cc +++ b/chrome/browser/ash/crosapi/browser_util.cc
@@ -413,13 +413,6 @@ return major_version >= 1000 && minor_version >= 0; } -void RecordDataVer(PrefService* local_state, - const std::string& user_id_hash, - const base::Version& version) { - ash::standalone_browser::migrator_util::RecordDataVer(local_state, - user_id_hash, version); -} - base::Version GetRootfsLacrosVersionMayBlock( const base::FilePath& version_file_path) { if (!base::PathExists(version_file_path)) {
diff --git a/chrome/browser/ash/crosapi/browser_util.h b/chrome/browser/ash/crosapi/browser_util.h index 50c0f93..86536ae 100644 --- a/chrome/browser/ash/crosapi/browser_util.h +++ b/chrome/browser/ash/crosapi/browser_util.h
@@ -246,12 +246,6 @@ // account_manager logic. bool DoesMetadataSupportNewAccountManager(base::Value* metadata); -// DEPRECATED. Going to be removed soon. -// Please use ash::standalone_browser::migrator_util::RecordDataVer(), instead. -void RecordDataVer(PrefService* local_state, - const std::string& user_id_hash, - const base::Version& version); - // Gets the version of the rootfs lacros-chrome. By reading the metadata json // file in the correct format. base::Version GetRootfsLacrosVersionMayBlock(
diff --git a/chrome/browser/ash/crosapi/browser_util_unittest.cc b/chrome/browser/ash/crosapi/browser_util_unittest.cc index c13811a..f037547 100644 --- a/chrome/browser/ash/crosapi/browser_util_unittest.cc +++ b/chrome/browser/ash/crosapi/browser_util_unittest.cc
@@ -73,7 +73,8 @@ IsInitializedForPrimaryUser()) { ash::standalone_browser::BrowserSupport::Shutdown(); } - ash::standalone_browser::BrowserSupport::InitializeForPrimaryUser(policy); + ash::standalone_browser::BrowserSupport::InitializeForPrimaryUser( + policy, false, false); } }; @@ -136,7 +137,7 @@ /*browser_restart=*/false, /*is_child=*/false); ash::standalone_browser::BrowserSupport::InitializeForPrimaryUser( - policy::PolicyMap()); + policy::PolicyMap(), false, false); } return user; } @@ -886,7 +887,7 @@ /*browser_restart=*/false, /*is_child=*/false); ash::standalone_browser::BrowserSupport::InitializeForPrimaryUser( - policy::PolicyMap()); + policy::PolicyMap(), false, false); EXPECT_FALSE(browser_util::IsLacrosOnlyFlagAllowed()); }
diff --git a/chrome/browser/ash/login/existing_user_controller.cc b/chrome/browser/ash/login/existing_user_controller.cc index f86b92e..9632a70 100644 --- a/chrome/browser/ash/login/existing_user_controller.cc +++ b/chrome/browser/ash/login/existing_user_controller.cc
@@ -438,7 +438,8 @@ } if (LoginDisplayHostMojo::Get()) { - auto login_users = chrome_user_manager_util::FindLoginAllowedUsers(users); + auto login_users = + user_manager::UserManager::Get()->FindLoginAllowedUsersFrom(users); LoginDisplayHostMojo::Get()->SetUsers(login_users); } }
diff --git a/chrome/browser/ash/login/saml/security_token_saml_browsertest.cc b/chrome/browser/ash/login/saml/security_token_saml_browsertest.cc index 60bb2df..032334f 100644 --- a/chrome/browser/ash/login/saml/security_token_saml_browsertest.cc +++ b/chrome/browser/ash/login/saml/security_token_saml_browsertest.cc
@@ -31,7 +31,13 @@ } // namespace // Tests the successful login scenario with the correct PIN. -IN_PROC_BROWSER_TEST_F(SecurityTokenSamlTest, Basic) { +#if !defined(NDEBUG) +// Flaky timeout in debug build crbug.com/321826024. +#define MAYBE_Basic DISABLED_Basic +#else +#define MAYBE_Basic Basic +#endif +IN_PROC_BROWSER_TEST_F(SecurityTokenSamlTest, MAYBE_Basic) { StartSignIn(); WaitForPinDialog(); test::OobeJS().ExpectVisiblePath({"gaia-signin", "pinDialog"}); @@ -46,7 +52,13 @@ // Tests that the login doesn't hit the timeout for Chrome waiting on Gaia to // signal the login completion. -IN_PROC_BROWSER_TEST_F(SecurityTokenSamlTest, NoGaiaTimeout) { +#if !defined(NDEBUG) +// Flaky timeout in debug build crbug.com/321826024. +#define MAYBE_NoGaiaTimeout DISABLED_NoGaiaTimeout +#else +#define MAYBE_NoGaiaTimeout NoGaiaTimeout +#endif +IN_PROC_BROWSER_TEST_F(SecurityTokenSamlTest, MAYBE_NoGaiaTimeout) { // Arrange: base::HistogramTester histogram_tester;
diff --git a/chrome/browser/ash/login/test/login_or_lock_screen_visible_waiter.cc b/chrome/browser/ash/login/test/login_or_lock_screen_visible_waiter.cc index f0c2d63..a53963c 100644 --- a/chrome/browser/ash/login/test/login_or_lock_screen_visible_waiter.cc +++ b/chrome/browser/ash/login/test/login_or_lock_screen_visible_waiter.cc
@@ -30,7 +30,6 @@ bool should_wait_if_already_shown) { // Increase the timeout of this RunLoop (TestTimeouts::action_max_timeout()) // to match the overall timeout of browser tests. (::test_launcher_timeout()) - // TODO(crbug.com/1305245) - Remove once OOBE migrates to Polymer3. base::test::ScopedRunLoopTimeout increase_timeout( FROM_HERE, TestTimeouts::test_launcher_timeout()); @@ -47,15 +46,10 @@ if (!session_observation_.IsObserving()) session_observation_.Observe(session_manager); - // TODO(crbug.com/1305245) - Remove once the issue is fixed. - LOG(WARNING) << "LoginOrLockScreenVisibleWaiter::Wait() waiting..."; run_loop_.Run(); } void LoginOrLockScreenVisibleWaiter::OnLoginOrLockScreenVisible() { - // TODO(crbug.com/1305245) - Remove once the issue is fixed. - LOG(WARNING) - << "LoginOrLockScreenVisibleWaiter::OnLoginOrLockScreenVisible()"; run_loop_.Quit(); }
diff --git a/chrome/browser/ash/login/ui/login_display_host_mojo.cc b/chrome/browser/ash/login/ui/login_display_host_mojo.cc index 0f83632a..7e6c886 100644 --- a/chrome/browser/ash/login/ui/login_display_host_mojo.cc +++ b/chrome/browser/ash/login/ui/login_display_host_mojo.cc
@@ -272,9 +272,6 @@ // services. VLOG(1) << "Emitting login-prompt-visible"; SessionManagerClient::Get()->EmitLoginPromptVisible(); - - // TODO(crbug.com/1305245) - Remove once the issue is fixed. - LOG(WARNING) << __func__ << " NotifyLoginOrLockScreenVisible"; session_manager::SessionManager::Get()->NotifyLoginOrLockScreenVisible(); // If there no available users exist, delay showing the dialogs until after
diff --git a/chrome/browser/ash/login/ui/login_display_host_webui.cc b/chrome/browser/ash/login/ui/login_display_host_webui.cc index 6b5bfa0..ebca7f5 100644 --- a/chrome/browser/ash/login/ui/login_display_host_webui.cc +++ b/chrome/browser/ash/login/ui/login_display_host_webui.cc
@@ -816,20 +816,12 @@ void LoginDisplayHostWebUI::OnCurrentScreenChanged(OobeScreenId current_screen, OobeScreenId new_screen) { if (current_screen == ash::OOBE_SCREEN_UNKNOWN) { - // TODO(crbug.com/1305245) - Remove once the issue is fixed. - LOG(WARNING) << "LoginDisplayHostWebUI::OnCurrentScreenChanged() " - "NotifyLoginOrLockScreenVisible"; - // Notify that the OOBE page is ready and the first screen is shown. It // might happen that front-end part isn't fully initialized yet (when // `OobeLazyLoading` is enabled), so wait for it to happen before notifying. GetOobeUI()->IsJSReady(base::BindOnce( &session_manager::SessionManager::NotifyLoginOrLockScreenVisible, base::Unretained(session_manager::SessionManager::Get()))); - } else { - // TODO(crbug.com/1305245) - Remove once the issue is fixed. - LOG(WARNING) << "LoginDisplayHostWebUI::OnCurrentScreenChanged() Not " - "notifying LoginOrLockScreenVisible."; } }
diff --git a/chrome/browser/ash/login/users/chrome_user_manager_impl.cc b/chrome/browser/ash/login/users/chrome_user_manager_impl.cc index 2fa4c99..8ee1040d 100644 --- a/chrome/browser/ash/login/users/chrome_user_manager_impl.cc +++ b/chrome/browser/ash/login/users/chrome_user_manager_impl.cc
@@ -443,7 +443,7 @@ } // Extract out users that are allowed on login screen. - return chrome_user_manager_util::FindLoginAllowedUsers(result); + return FindLoginAllowedUsersFrom(result); } user_manager::UserList ChromeUserManagerImpl::GetUnlockUsers() const {
diff --git a/chrome/browser/ash/login/users/chrome_user_manager_util.cc b/chrome/browser/ash/login/users/chrome_user_manager_util.cc index 2a6ae71..78b2a0c 100644 --- a/chrome/browser/ash/login/users/chrome_user_manager_util.cc +++ b/chrome/browser/ash/login/users/chrome_user_manager_util.cc
@@ -78,31 +78,4 @@ user_manager->IsCurrentUserCryptohomeDataEphemeral(); } -user_manager::UserList FindLoginAllowedUsers( - const user_manager::UserList& users) { - bool show_users_on_signin; - CrosSettings::Get()->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, - &show_users_on_signin); - user_manager::UserList found_users; - for (user_manager::User* user : users) { - // Skip kiosk apps for login screen user list. Kiosk apps as pods (aka new - // kiosk UI) is currently disabled and it gets the apps directly from - // KioskChromeAppManager, ArcKioskAppManager and WebKioskAppManager. - if (user->IsKioskType()) { - continue; - } - const bool meets_allowlist_requirements = - !user->HasGaiaAccount() || - user_manager::UserManager::Get()->IsGaiaUserAllowed(*user); - // Public session accounts are always shown on login screen. - const bool meets_show_users_requirements = - show_users_on_signin || - user->GetType() == user_manager::UserType::kPublicAccount; - if (meets_allowlist_requirements && meets_show_users_requirements) { - found_users.push_back(user); - } - } - return found_users; -} - } // namespace ash::chrome_user_manager_util
diff --git a/chrome/browser/ash/login/users/chrome_user_manager_util.h b/chrome/browser/ash/login/users/chrome_user_manager_util.h index 67d7cc1a..4d2e24f 100644 --- a/chrome/browser/ash/login/users/chrome_user_manager_util.h +++ b/chrome/browser/ash/login/users/chrome_user_manager_util.h
@@ -29,10 +29,6 @@ // user has logged in). bool IsManagedGuestSessionOrEphemeralLogin(); -// Returns users allowed on login screen. -user_manager::UserList FindLoginAllowedUsers( - const user_manager::UserList& users); - } // namespace ash::chrome_user_manager_util #endif // CHROME_BROWSER_ASH_LOGIN_USERS_CHROME_USER_MANAGER_UTIL_H_
diff --git a/chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker.cc b/chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker.cc index 2ce8d01d..e555fbd4 100644 --- a/chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker.cc +++ b/chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker.cc
@@ -138,7 +138,8 @@ // switch for a particular version, we can increment it after fixing the logic. // The devices running new code will not be affected by kill switch and we can // test our fixes. -const int kCodeVersion = 1; +// TODO(b/265923216): Change to 1 to launch unified state determination. +const int kCodeVersion = 0; // When set to true, unified state determination is disabled. std::optional<bool> g_unified_state_determination_kill_switch;
diff --git a/chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker_unittest.cc b/chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker_unittest.cc index 90232a00..939891f 100644 --- a/chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker_unittest.cc +++ b/chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker_unittest.cc
@@ -663,7 +663,8 @@ base::test::TestFuture<void> future; test_url_loader_factory_.AddResponse( "https://www.gstatic.com/chromeos-usd-experiment/v1.json", - R"({"disable_up_to_version": 0})", net::HTTP_OK); + // TODO(b/265923216): Change to 0 when kCodeVersion is 1. + R"({"disable_up_to_version": -1})", net::HTTP_OK); AutoEnrollmentTypeChecker::Initialize(test_shared_loader_factory_, future.GetCallback());
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_model_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_model_delegate.cc index b4b81f5..176f1a61 100644 --- a/chrome/browser/browsing_data/chrome_browsing_data_model_delegate.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_model_delegate.cc
@@ -8,6 +8,8 @@ #include "base/barrier_callback.h" #include "base/functional/callback_helpers.h" +#include "base/functional/concurrent_callbacks.h" +#include "base/functional/concurrent_closures.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_refptr.h" #include "chrome/browser/browsing_topics/browsing_topics_service_factory.h" @@ -32,26 +34,6 @@ namespace { -class DynamicBarrierClosure : public base::RefCounted<DynamicBarrierClosure> { - public: - explicit DynamicBarrierClosure(base::OnceClosure closure) - : scoped_closure_(std::move(closure)) {} - - DynamicBarrierClosure(const DynamicBarrierClosure&) = delete; - DynamicBarrierClosure& operator=(const DynamicBarrierClosure&) = delete; - - base::OnceClosure CreateCallback() { - return base::DoNothingWithBoundArgs(base::WrapRefCounted(this)); - } - - private: - friend class base::RefCounted<DynamicBarrierClosure>; - - ~DynamicBarrierClosure() = default; - - base::ScopedClosureRunner scoped_closure_; -}; - #if !BUILDFLAG(IS_ANDROID) std::vector<ChromeBrowsingDataModelDelegate::DelegateEntry> IsolatedWebAppBrowsingDataToDelegateEntries( @@ -117,36 +99,32 @@ void ChromeBrowsingDataModelDelegate::GetAllDataKeys( base::OnceCallback<void(std::vector<DelegateEntry>)> callback) { - const auto barrier_callback = - base::BarrierCallback<std::vector<DelegateEntry>>( - /*num_callbacks=*/2, - base::BindOnce(&FlattenDelegateEntries).Then(std::move(callback))); + base::ConcurrentCallbacks<std::vector<DelegateEntry>> concurrent; - GetAllFederatedIdentityDataKeys(barrier_callback, {}); + GetAllFederatedIdentityDataKeys(concurrent.CreateCallback(), {}); #if !BUILDFLAG(IS_ANDROID) auto* web_app_provider = web_app::WebAppProvider::GetForWebApps(profile_); if (web_app_provider && storage_partition_->GetConfig().is_default()) { web_app_provider->scheduler().GetIsolatedWebAppBrowsingData( base::BindOnce(&IsolatedWebAppBrowsingDataToDelegateEntries) - .Then(base::BindOnce( - &ChromeBrowsingDataModelDelegate::GetAllMediaDeviceSaltDataKeys, - weak_ptr_factory_.GetWeakPtr(), barrier_callback))); - return; + .Then(concurrent.CreateCallback())); } #endif // !BUILDFLAG(IS_ANDROID) - GetAllMediaDeviceSaltDataKeys(barrier_callback, {}); + GetAllMediaDeviceSaltDataKeys(concurrent.CreateCallback(), {}); // TODO(crbug.com/1271155): Implement data retrieval for remaining data types. + + std::move(concurrent) + .Done(base::BindOnce(&FlattenDelegateEntries).Then(std::move(callback))); } void ChromeBrowsingDataModelDelegate::RemoveDataKey( const BrowsingDataModel::DataKey& data_key, BrowsingDataModel::StorageTypeSet storage_types, base::OnceClosure callback) { - auto dynamic_barrier_closure = - base::MakeRefCounted<DynamicBarrierClosure>(std::move(callback)); + base::ConcurrentClosures concurrent; if (storage_types.Has( static_cast<BrowsingDataModel::StorageType>(StorageType::kTopics))) { @@ -162,8 +140,7 @@ StorageType::kMediaDeviceSalt))) { if (const blink::StorageKey* storage_key = absl::get_if<blink::StorageKey>(&data_key)) { - RemoveMediaDeviceSalt(*storage_key, - dynamic_barrier_closure->CreateCallback()); + RemoveMediaDeviceSalt(*storage_key, concurrent.CreateClosure()); } } @@ -174,7 +151,7 @@ absl::get_if<webid::FederatedIdentityDataModel::DataKey>( &data_key)) { RemoveFederatedIdentityData(*federated_identity_data_key, - dynamic_barrier_closure->CreateCallback()); + concurrent.CreateClosure()); } } @@ -184,10 +161,12 @@ CHECK(absl::holds_alternative<url::Origin>(data_key)); const url::Origin& origin = *absl::get_if<url::Origin>(&data_key); - web_app::RemoveIsolatedWebAppBrowsingData( - profile_, origin, dynamic_barrier_closure->CreateCallback()); + web_app::RemoveIsolatedWebAppBrowsingData(profile_, origin, + concurrent.CreateClosure()); } #endif // !BUILDFLAG(IS_ANDROID) + + std::move(concurrent).Done(std::move(callback)); } std::optional<BrowsingDataModel::DataOwner>
diff --git a/chrome/browser/chromeos/extensions/login_screen/login/cleanup/web_app_cleanup_handler_browsertest.cc b/chrome/browser/chromeos/extensions/login_screen/login/cleanup/web_app_cleanup_handler_browsertest.cc index 72364f2..1ed533f 100644 --- a/chrome/browser/chromeos/extensions/login_screen/login/cleanup/web_app_cleanup_handler_browsertest.cc +++ b/chrome/browser/chromeos/extensions/login_screen/login/cleanup/web_app_cleanup_handler_browsertest.cc
@@ -10,7 +10,7 @@ #include "base/auto_reset.h" #include "base/test/test_future.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/policy/web_app_policy_constants.h" #include "chrome/browser/web_applications/preinstalled_web_app_manager.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -47,7 +47,7 @@ } // namespace -class WebAppCleanupHandlerBrowserTest : public WebAppControllerBrowserTest { +class WebAppCleanupHandlerBrowserTest : public WebAppBrowserTestBase { protected: WebAppCleanupHandlerBrowserTest() : skip_preinstalled_web_app_startup_(
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc index 9ec71f33..a7439cc 100644 --- a/chrome/browser/devtools/devtools_ui_bindings.cc +++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -1994,6 +1994,10 @@ const std::string& request, int stream_id) { if (AidaClient::CanUseAida(profile_).blocked) { + base::Value::Dict response_dict; + response_dict.Set("error", "AIDA request was blocked"); + base::Value response = base::Value(std::move(response_dict)); + std::move(callback).Run(&response); return; } if (!aida_client_) {
diff --git a/chrome/browser/extensions/api/tabs/tabs_test.cc b/chrome/browser/extensions/api/tabs/tabs_test.cc index 94fb00f..2a2ff9b 100644 --- a/chrome/browser/extensions/api/tabs/tabs_test.cc +++ b/chrome/browser/extensions/api/tabs/tabs_test.cc
@@ -1184,7 +1184,7 @@ void InstallAndTrustBundle() { auto bundle = web_app::TestSignedWebBundleBuilder::BuildDefault( web_app::TestSignedWebBundleBuilder::BuildOptions() - .SetKeyPair(web_package::WebBundleSigner::KeyPair( + .SetKeyPair(web_package::WebBundleSigner::Ed25519KeyPair( web_app::kTestPublicKey, web_app::kTestPrivateKey)) .SetIndexHTMLContent("Hello Extensions!"));
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index dffb13a8..81e2665 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -3782,7 +3782,7 @@ { "name": "enable-speculation-rules-prerendering-target-hint", "owners": [ "//content/browser/preloading/prerender/OWNERS" ], - "expiry_milestone": 125 + "expiry_milestone": 135 }, { "name": "enable-standard-device-bound-session-credentials",
diff --git a/chrome/browser/internal b/chrome/browser/internal index e7816b8..60534f5 160000 --- a/chrome/browser/internal +++ b/chrome/browser/internal
@@ -1 +1 @@ -Subproject commit e7816b8613ca95f58086a77a57eadf4c373abd89 +Subproject commit 60534f5aba8ad7e5ddd9d939a92c3b31bd7bfd6c
diff --git a/chrome/browser/lacros/app_mode/web_kiosk_installer_lacros_browsertest.cc b/chrome/browser/lacros/app_mode/web_kiosk_installer_lacros_browsertest.cc index 3ea3270..3faa044d 100644 --- a/chrome/browser/lacros/app_mode/web_kiosk_installer_lacros_browsertest.cc +++ b/chrome/browser/lacros/app_mode/web_kiosk_installer_lacros_browsertest.cc
@@ -10,7 +10,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/external_install_options.h" #include "chrome/browser/web_applications/externally_managed_app_registration_task.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" @@ -35,7 +35,7 @@ namespace { -class WebKioskInstallerLacrosBrowserTest : public WebAppControllerBrowserTest { +class WebKioskInstallerLacrosBrowserTest : public WebAppBrowserTestBase { public: std::unique_ptr<net::test_server::HttpResponse> SimulateRedirectHandler( const net::test_server::HttpRequest& request) { @@ -66,7 +66,7 @@ protected: void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); // Allow different origins to be handled by the embedded_test_server. host_resolver()->AddRule("*", "127.0.0.1"); test::WaitUntilWebAppProviderAndSubsystemsReady(provider());
diff --git a/chrome/browser/password_manager/web_app_profile_switcher_interactive_uitest.cc b/chrome/browser/password_manager/web_app_profile_switcher_interactive_uitest.cc index 03ce9f8..907164e 100644 --- a/chrome/browser/password_manager/web_app_profile_switcher_interactive_uitest.cc +++ b/chrome/browser/password_manager/web_app_profile_switcher_interactive_uitest.cc
@@ -2,13 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/password_manager/web_app_profile_switcher.h" - #include "base/files/file_path.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/test_future.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/notifications/notification_display_service_tester.h" +#include "chrome/browser/password_manager/web_app_profile_switcher.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_test_util.h" #include "chrome/browser/ui/browser.h" @@ -17,7 +16,7 @@ #include "chrome/browser/ui/profiles/profile_picker.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom-shared.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/test/web_app_test_utils.h" @@ -76,8 +75,8 @@ } // namespace -class WebAppProfileSwitcherBrowserTest - : public web_app::WebAppControllerBrowserTest {}; +class WebAppProfileSwitcherBrowserTest : public web_app::WebAppBrowserTestBase { +}; IN_PROC_BROWSER_TEST_F(WebAppProfileSwitcherBrowserTest, SwitchWebAppProfileRequiresInstall) {
diff --git a/chrome/browser/payments/webapps/payment_request_lacros_browsertest.cc b/chrome/browser/payments/webapps/payment_request_lacros_browsertest.cc index d6cf85d..ac00d9a3 100644 --- a/chrome/browser/payments/webapps/payment_request_lacros_browsertest.cc +++ b/chrome/browser/payments/webapps/payment_request_lacros_browsertest.cc
@@ -14,7 +14,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/user_display_mode.h" #include "chrome/browser/web_applications/web_app_install_info.h" @@ -77,15 +77,15 @@ } // namespace class PaymentRequestLacrosBrowserTest - : public web_app::WebAppControllerBrowserTest, + : public web_app::WebAppBrowserTestBase, public testing::WithParamInterface<bool> { public: PaymentRequestLacrosBrowserTest() : has_associated_package_(GetParam()) {} ~PaymentRequestLacrosBrowserTest() override = default; - // web_app::WebAppControllerBrowserTest: + // web_app::WebAppBrowserTestBase: void SetUpOnMainThread() override { - web_app::WebAppControllerBrowserTest::SetUpOnMainThread(); + web_app::WebAppBrowserTestBase::SetUpOnMainThread(); chromeos::LacrosService* service = chromeos::LacrosService::Get(); ASSERT_TRUE(service); @@ -114,7 +114,7 @@ void TearDownOnMainThread() override { UninstallTestApp(); - web_app::WebAppControllerBrowserTest::TearDownOnMainThread(); + web_app::WebAppBrowserTestBase::TearDownOnMainThread(); } GURL GetAppURL() {
diff --git a/chrome/browser/picture_in_picture/document_picture_in_picture_window_controller_browsertest.cc b/chrome/browser/picture_in_picture/document_picture_in_picture_window_controller_browsertest.cc index 64dbaf78..d12472c 100644 --- a/chrome/browser/picture_in_picture/document_picture_in_picture_window_controller_browsertest.cc +++ b/chrome/browser/picture_in_picture/document_picture_in_picture_window_controller_browsertest.cc
@@ -29,7 +29,7 @@ #include "chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h"
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 47ada6b..da6d8bc 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc
@@ -201,7 +201,6 @@ #include "chrome/browser/signin/chrome_device_id_helper.h" #include "chromeos/ash/components/account_manager/account_manager_factory.h" #include "chromeos/ash/components/standalone_browser/browser_support.h" -#include "chromeos/ash/components/standalone_browser/migrator_util.h" #include "components/account_manager_core/chromeos/account_manager.h" #include "components/session_manager/core/session_manager.h" #include "components/user_manager/user.h" @@ -667,7 +666,8 @@ ash::ProfileHelper::IsPrimaryProfile(this)) { auto& map = profile_policy_connector_->policy_service()->GetPolicies( policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string())); - ash::standalone_browser::BrowserSupport::InitializeForPrimaryUser(map); + ash::standalone_browser::BrowserSupport::InitializeForPrimaryUser( + map, IsNewProfile(), IsRegularProfile()); crosapi::browser_util::CacheLacrosAvailability(map); crosapi::browser_util::CacheLacrosDataBackwardMigrationMode(map); crosapi::browser_util::CacheLacrosSelection(map); @@ -1145,29 +1145,6 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) arc::ArcServiceLauncher::Get()->MaybeSetProfile(this); - - // If the user is a new user, mark profile migration to Lacros as completed. - // Because setting migration as marked changes the return value of - // `crosapi::browser_util::IsLacrosEnabled()`, the check should happen before - // `CreateBrowserContextServices()` is called. Otherwise the value of - // `IsLacrosEnabled()` can change after these services are initialized. - const user_manager::User* user = - ash::ProfileHelper::Get()->GetUserByProfile(this); - if (user && IsNewProfile() && Profile::IsRegularProfile() && - ash::ProfileHelper::IsPrimaryProfile(this) && - crosapi::browser_util::IsLacrosEnabledForMigration( - user, crosapi::browser_util::PolicyInitState::kAfterInit)) { - // TODO(crbug.com/1277848): Once `BrowserDataMigrator` stabilises, remove - // this log message. - LOG(WARNING) << "Setting migration as completed since it is a new user."; - const std::string user_id_hash = user->username_hash(); - PrefService* local_state = g_browser_process->local_state(); - crosapi::browser_util::RecordDataVer(local_state, user_id_hash, - version_info::GetVersion()); - ash::standalone_browser::migrator_util::SetProfileMigrationCompletedForUser( - local_state, user_id_hash, - ash::standalone_browser::migrator_util::MigrationMode::kSkipForNewUser); - } #endif FullBrowserTransitionManager::Get()->OnProfileCreated(this); @@ -1205,7 +1182,8 @@ if (ash::ProfileHelper::IsPrimaryProfile(this)) { auto& map = profile_policy_connector_->policy_service()->GetPolicies( policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, std::string())); - ash::standalone_browser::BrowserSupport::InitializeForPrimaryUser(map); + ash::standalone_browser::BrowserSupport::InitializeForPrimaryUser( + map, IsNewProfile(), IsRegularProfile()); crosapi::browser_util::CacheLacrosAvailability(map); crosapi::browser_util::CacheLacrosDataBackwardMigrationMode(map); crosapi::browser_util::CacheLacrosSelection(map);
diff --git a/chrome/browser/renderer_host/chrome_navigation_ui_data.cc b/chrome/browser/renderer_host/chrome_navigation_ui_data.cc index 918c35b..a6a1d3a 100644 --- a/chrome/browser/renderer_host/chrome_navigation_ui_data.cc +++ b/chrome/browser/renderer_host/chrome_navigation_ui_data.cc
@@ -6,7 +6,6 @@ #include "chrome/browser/preloading/prefetch/no_state_prefetch/chrome_no_state_prefetch_contents_delegate.h" #include "components/no_state_prefetch/browser/no_state_prefetch_contents.h" -#include "components/no_state_prefetch/browser/prerender_histograms.h" #include "content/public/browser/navigation_handle.h" #include "extensions/buildflags/buildflags.h" #include "ui/base/window_open_disposition.h" @@ -40,9 +39,6 @@ web_contents); if (no_state_prefetch_contents) { is_no_state_prefetching_ = true; - prerender_histogram_prefix_ = - prerender::PrerenderHistograms::GetHistogramPrefix( - no_state_prefetch_contents->origin()); } } @@ -97,7 +93,6 @@ #endif copy->is_no_state_prefetching_ = is_no_state_prefetching_; - copy->prerender_histogram_prefix_ = prerender_histogram_prefix_; copy->bookmark_id_ = bookmark_id_; return std::move(copy);
diff --git a/chrome/browser/renderer_host/chrome_navigation_ui_data.h b/chrome/browser/renderer_host/chrome_navigation_ui_data.h index 1d894b2..fffa6ab 100644 --- a/chrome/browser/renderer_host/chrome_navigation_ui_data.h +++ b/chrome/browser/renderer_host/chrome_navigation_ui_data.h
@@ -77,9 +77,6 @@ #endif WindowOpenDisposition window_open_disposition() const { return disposition_; } bool is_no_state_prefetching() const { return is_no_state_prefetching_; } - const std::string& prerender_histogram_prefix() { - return prerender_histogram_prefix_; - } bool is_using_https_as_default_scheme() const { return is_using_https_as_default_scheme_; } @@ -104,7 +101,7 @@ WindowOpenDisposition disposition_; bool is_no_state_prefetching_ = false; - std::string prerender_histogram_prefix_; + // True if the navigation was initiated by typing in the omnibox but the typed // text didn't have a scheme such as http or https (e.g. google.com), and // https was used as the default scheme for the navigation. This is used by
diff --git a/chrome/browser/resources/chromeos/login/components/oobe_illo_icons.html b/chrome/browser/resources/chromeos/login/components/oobe_illo_icons.html index 1526a8d..ebff3368 100644 --- a/chrome/browser/resources/chromeos/login/components/oobe_illo_icons.html +++ b/chrome/browser/resources/chromeos/login/components/oobe_illo_icons.html
@@ -1058,6 +1058,28 @@ <image id="image0_771_54330" width="197" height="197" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMUAAADFCAYAAADkODbwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALTSURBVHgB7djhTRRBGIDhWSqwAmMHWgKhAS3F2IBgA1oC2oCxAqQDOoAOxArOGeAU3lgB9zzJd7u3u3/fTGa2Ebvd7nhe3s15O+fVgOfnds7VnPM5l9u23Tx+ue1vZgwv5uXjnPcDDsf1nLMZxtf9g7soHoK4mPNmwOHZjfswztaffRSfhxWCw7bCOJlh/NxmEK/G/RICh+5iRnFyNG9OB7Acr4OmFcXrASxrO3EXhc01/PPyaABPiAJCFBCigBAFhCggRAEhCghRQIgCQhQQooAQBYQoIEQBIQoIUUCIAkIUEKKAEAWEKCBEASEKCFFAiAJCFBCigBAFhCggRAEhCghRQIgCQhQQooAQBYQoIEQBIQoIUUCIAkIUEKKAEAWEKCBEASEKCFFAiAJCFBCigBAFhCggRAEhCghRQIgCQhQQooAQBYQoIEQBIQoIUUCIAkIUEKKAEAWEKCBEASEKCFFAiAJCFBCigBAFhCggRAEhCghRQIgCQhQQooAQBYQoIEQBIQoIUUCIAkIUEKKAEAWEKCBEASEKCFFAiAJCFBCigBAFhCggRAEhCghRQIgCQhQQooAQBYQoIEQBIQoIUUCIAkIUEKKAEAWEKCBEASEKCFFAiAJCFBCigBAFhCggRAEhCghRQIgCQhQQooAQBYQoIEQBIQoIUUCIAkIUEKKAEAWEKCBEASEKCFFAiAJCFBCigBAFhCggRAEhCghRQIgCQhQQooAQBYQoIEQBIQoIUUCIAkIUEKKAEAWEKCBEASEKCFFAiAJCFBCigBAFhCggRAEhCghRQIgCQhQQooAQBcSK4nYAe79XFFcDWHZzblYUlwPY+7Gi+DLn14DDtlaJ823bbo7mz9pTfBhw2G7mfFo3d6dPM4zzeTkb97XAobmec7JWifXn75HsfHC6Xjx8IA6eu93DfB+Pgli2/3692x3Py5qXA56nder67WH78MQf0odCpj6yfaMAAAAASUVORK5CYII=" /> </defs> </g> + <g id="quickstart-qr-placeholder" viewBox="0 0 197 197" fill="none"> + <rect x="31" y="31" width="48" height="48" rx="6" stroke="var(--cros-sys-illo-color1-1)" stroke-width="4" /> + <path d="M78.0584 106.74H58.1635C53.4899 106.74 49.6994 102.951 49.6994 98.2763V98.2648C49.6994 93.59 53.4899 89.8008 58.1635 89.8008H78.0584C82.7332 89.8008 86.5225 93.59 86.5225 98.2648V98.2763C86.5225 102.951 82.7332 106.74 78.0584 106.74Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M89.9511 137.859V117.964C89.9511 113.291 93.7404 109.5 98.4151 109.5H98.4266C103.101 109.5 106.891 113.291 106.891 117.964V137.859C106.891 142.534 103.101 146.323 98.4266 146.323H98.4151C93.7404 146.323 89.9511 142.534 89.9511 137.859Z" fill="var(--cros-sys-illo-color1-2)" /> + <path fill-rule="evenodd" clip-rule="evenodd" d="M99.5636 106.74H117.964H119.459H137.859C137.994 106.74 138.128 106.737 138.262 106.731C138.395 106.737 138.529 106.74 138.664 106.74H158.559C163.234 106.74 167.023 102.951 167.023 98.2763V98.2648C167.023 93.59 163.234 89.8008 158.559 89.8008H138.664C138.529 89.8008 138.395 89.8039 138.262 89.8102C138.128 89.8039 137.994 89.8008 137.859 89.8008H119.459H117.964H99.5636C94.89 89.8008 91.0996 93.59 91.0996 98.2648V98.2763C91.0996 102.951 94.89 106.74 99.5636 106.74Z" fill="var(--cros-sys-illo-color1-2)" /> + <path fill-rule="evenodd" clip-rule="evenodd" d="M89.9511 37.464V55.8634V57.359V75.7584C89.9511 76.0634 89.9673 76.3645 89.9987 76.6611C89.9673 76.9577 89.9511 77.2588 89.9511 77.5636V97.4586C89.9511 102.133 93.7404 105.923 98.4151 105.923H98.4266C103.101 105.923 106.891 102.133 106.891 97.4586V77.5636C106.891 77.2588 106.875 76.9577 106.843 76.6611C106.875 76.3645 106.891 76.0634 106.891 75.7584V57.359V55.8634V37.464C106.891 32.7904 103.101 29 98.4266 29H98.4151C93.7404 29 89.9511 32.7904 89.9511 37.464Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M98.4139 166.679C93.7392 166.679 89.9499 162.89 89.9499 158.215C89.9499 153.54 93.7392 149.751 98.4139 149.751C103.088 149.751 106.878 153.54 106.878 158.215C106.878 162.89 103.088 166.679 98.4139 166.679Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M159 130C155.686 130 153 127.314 153 124C153 120.686 155.686 118 159 118C162.313 118 165 120.686 165 124C165 127.314 162.313 130 159 130Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M37.4637 106.729C32.789 106.729 28.9997 102.94 28.9997 98.2648C28.9997 93.59 32.789 89.8008 37.4637 89.8008C42.1373 89.8008 45.9277 93.59 45.9277 98.2648C45.9277 102.94 42.1373 106.729 37.4637 106.729Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M121.279 116.401H131.364C133.257 116.401 134.791 117.935 134.791 119.828V129.914C134.791 131.807 133.257 133.341 131.364 133.341H121.279C119.386 133.341 117.852 131.807 117.852 129.914V119.828C117.852 117.935 119.386 116.401 121.279 116.401Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M127.029 116.401H137.114C139.007 116.401 140.541 117.935 140.541 119.828V129.914C140.541 131.807 139.007 133.341 137.114 133.341H127.029C125.136 133.341 123.602 131.807 123.602 129.914V119.828C123.602 117.935 125.136 116.401 127.029 116.401Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M136.489 132.351H146.575C148.468 132.351 150.002 133.885 150.002 135.778V145.863C150.002 147.756 148.468 149.29 146.575 149.29H136.489C134.597 149.29 133.062 147.756 133.062 145.863V135.778C133.062 133.885 134.597 132.351 136.489 132.351Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M136.489 125.001H146.575C148.468 125.001 150.002 126.535 150.002 128.428V138.513C150.002 140.406 148.468 141.94 146.575 141.94H136.489C134.597 141.94 133.062 140.406 133.062 138.513V128.428C133.062 126.535 134.597 125.001 136.489 125.001Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M121.278 146.301H131.363C133.256 146.301 134.79 147.835 134.79 149.728V159.813C134.79 161.706 133.256 163.24 131.363 163.24H121.278C119.385 163.24 117.851 161.706 117.851 159.813V149.728C117.851 147.835 119.385 146.301 121.278 146.301Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M151.178 146.301H161.263C163.156 146.301 164.69 147.835 164.69 149.728V159.813C164.69 161.706 163.156 163.24 161.263 163.24H151.178C149.285 163.24 147.751 161.706 147.751 159.813V149.728C147.751 147.835 149.285 146.301 151.178 146.301Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M136.489 116.401H146.575C148.468 116.401 150.002 117.935 150.002 119.828V129.914C150.002 131.807 148.468 133.341 146.575 133.341H136.489C134.597 133.341 133.062 131.807 133.062 129.914V119.828C133.062 117.935 134.597 116.401 136.489 116.401Z" fill="var(--cros-sys-illo-color1-2)" /> + <path d="M49.427 47H59.5125C61.4054 47 62.9395 48.5341 62.9395 50.427V60.5125C62.9395 62.4054 61.4054 63.9395 59.5125 63.9395H49.427C47.5341 63.9395 46 62.4054 46 60.5125V50.427C46 48.5341 47.5341 47 49.427 47Z" fill="var(--cros-sys-illo-color1-1)" /> + <rect x="31.001" y="117.251" width="48" height="48" rx="6" stroke="var(--cros-sys-illo-color1-1)" stroke-width="4" /> + <rect x="117.551" y="31" width="48" height="48" rx="6" stroke="var(--cros-sys-illo-color1-1)" stroke-width="4" /> + <path d="M49.6779 132.501H59.7634C61.6563 132.501 63.1904 134.035 63.1904 135.928V146.013C63.1904 147.906 61.6563 149.44 59.7634 149.44H49.6779C47.785 149.44 46.2509 147.906 46.2509 146.013V135.928C46.2509 134.035 47.785 132.501 49.6779 132.501Z" fill="var(--cros-sys-illo-color1-1)" /> + <path d="M137.427 47H147.512C149.405 47 150.939 48.5341 150.939 50.427V60.5125C150.939 62.4054 149.405 63.9395 147.512 63.9395H137.427C135.534 63.9395 134 62.4054 134 60.5125V50.427C134 48.5341 135.534 47 137.427 47Z" fill="var(--cros-sys-illo-color1-1)" /> + </g> <g id="quickstart-account-fresh-gaia" viewBox="0 0 120 96" fill="none"> <path d="M60.5996 45.8256C60.8172 45.8256 60.9936 45.6596 60.9936 45.4548C60.9936 45.25 60.8172 45.084 60.5996 45.084C60.382 45.084 60.2056 45.25 60.2056 45.4548C60.2056 45.6596 60.382 45.8256 60.5996 45.8256Z" fill="var(--cros-sys-illo-color1-2)" /> <path d="M24.0244 24.2779L21.1361 24.103C20.7718 24.0809 20.4747 24.3512 20.4726 24.7066L20.4559 27.4926C20.4538 27.848 20.7474 28.1541 21.1117 28.1762L24 28.3512C24.3644 28.3732 24.6614 28.103 24.6636 27.7475L24.6802 24.9615C24.6824 24.6061 24.3887 24.3 24.0244 24.2779Z" fill="var(--cros-sys-illo-color5)" />
diff --git a/chrome/browser/resources/chromeos/login/screens/common/quick_start.html b/chrome/browser/resources/chromeos/login/screens/common/quick_start.html index 0ad07cc..16818f8a 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/quick_start.html +++ b/chrome/browser/resources/chromeos/login/screens/common/quick_start.html
@@ -122,6 +122,11 @@ /* border: dashed; */ } + #qrPlaceholder { + width: 100%; + height: auto; + } + #qrCodeCanvas { position: absolute; width: 100%; @@ -153,9 +158,9 @@ </h1> <div slot="subtitle"> <div inner-h-t-m-l="[[getVerificationSubtitle( - locale, - discoverableName, - usePinInsteadOfQrForVerification, + locale, + discoverableName, + usePinInsteadOfQrForVerification, willRequestWiFi)]]"> </div> </div> @@ -165,8 +170,10 @@ <iron-icon id="qrDeco" icon="oobe-illos:quickstart-qr"> </iron-icon> <div id="qrHolder"> - <canvas id="qrCodeCanvas"> + <canvas id="qrCodeCanvas" hidden="[[!qrCodeAvailable]]"> </canvas> + <iron-icon id="qrPlaceholder" hidden="[[qrCodeAvailable]]" icon="oobe-illos:quickstart-qr-placeholder"> + </iron-icon> </div> </div> <quick-start-pin id="pinWrapper" pin="[[pin]]" @@ -187,7 +194,8 @@ class="content-icon"> </iron-icon> <div class="footer-content-text"> - [[i18nDynamic(locale, 'quickStartSetupContentFooterFollowInstructions')]] + <div hidden="[[!usePinInsteadOfQrForVerification]]">[[i18nDynamic(locale, 'quickStartSetupContentFooterFollowInstructionsPin')]]</div> + <div hidden="[[usePinInsteadOfQrForVerification]]">[[i18nDynamic(locale, 'quickStartSetupContentFooterFollowInstructionsQr')]]</div> </div> </div> </div>
diff --git a/chrome/browser/resources/chromeos/login/screens/common/quick_start.ts b/chrome/browser/resources/chromeos/login/screens/common/quick_start.ts index 98d17319..d57bb88d 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/quick_start.ts +++ b/chrome/browser/resources/chromeos/login/screens/common/quick_start.ts
@@ -96,6 +96,11 @@ type: Boolean, value: false, }, + // Set once a QR code is set. Until then, a placeholder is shown. + qrCodeAvailable: { + type: Boolean, + value: false, + }, }; } @@ -107,6 +112,7 @@ private userAvatarUrl: string; private canCancelSignin: boolean; private willRequestWiFi: boolean; + private qrCodeAvailable: boolean; private qrCodeCanvas: QrCodeCanvas|null; private didTransferWiFi: boolean; @@ -228,6 +234,7 @@ flush(); this.qrCodeCanvas?.setData(qrCode); + this.qrCodeAvailable = true; } setPin(pin: string): void {
diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/DefaultSearchEngineDialogCoordinator.java b/chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/DefaultSearchEngineDialogCoordinator.java index 54284ce..7b11f63e 100644 --- a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/DefaultSearchEngineDialogCoordinator.java +++ b/chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/DefaultSearchEngineDialogCoordinator.java
@@ -15,6 +15,7 @@ import org.chromium.base.Callback; import org.chromium.base.ThreadUtils; +import org.chromium.base.metrics.RecordUserAction; import org.chromium.components.browser_ui.widget.RadioButtonLayout; import org.chromium.ui.modaldialog.DialogDismissalCause; import org.chromium.ui.modaldialog.ModalDialogManager; @@ -96,6 +97,12 @@ @MainThread public void show() { ThreadUtils.assertOnUiThread(); + if (mType == SearchEnginePromoType.SHOW_NEW) { + RecordUserAction.record("SearchEnginePromo.NewDevice.Shown.Dialog"); + } else { + assert mType == SearchEnginePromoType.SHOW_EXISTING; + RecordUserAction.record("SearchEnginePromo.ExistingDevice.Shown.Dialog"); + } mDialogManager.showDialog( mModel, ModalDialogManager.ModalDialogType.APP,
diff --git a/chrome/browser/sync/test/integration/product_specifications_helper.cc b/chrome/browser/sync/test/integration/product_specifications_helper.cc index d664b95..3ed308b 100644 --- a/chrome/browser/sync/test/integration/product_specifications_helper.cc +++ b/chrome/browser/sync/test/integration/product_specifications_helper.cc
@@ -41,9 +41,9 @@ bool ProductSpecificationsChecker::IsSpecificsAvailableAndEqual() { for (const ProductSpecificationsSet& product_specifications_set : service_->GetAllProductSpecifications()) { - std::vector<const GURL> specifics_urls; + std::vector<GURL> specifics_urls; for (sync_pb::ComparisonData data : compare_specifics_->data()) { - specifics_urls.push_back(GURL(data.url())); + specifics_urls.emplace_back(data.url()); } if (product_specifications_set.uuid().AsLowercaseString() == compare_specifics_->uuid() &&
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index 97693fb5..62a76752 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -609,7 +609,9 @@ } void SyncTest::InitializeProfile(int index, Profile* profile) { - DCHECK(profile); + CHECK(profile); + CHECK(!profiles_[index]) << " for index " << index; + profiles_[index] = profile; profile->AddObserver(this); @@ -717,6 +719,13 @@ // This method is called for only a live server, so it shouldn't use // FakeGCMDriver. DCHECK(profile_to_fake_gcm_driver_.empty()); + + for (Profile* profile : profiles_) { + if (profile) { + profile->RemoveObserver(this); + } + } + profiles_.clear(); scoped_temp_dirs_.clear(); #if !BUILDFLAG(IS_ANDROID)
diff --git a/chrome/browser/task_manager/providers/web_contents/web_app_tag_browsertest.cc b/chrome/browser/task_manager/providers/web_contents/web_app_tag_browsertest.cc index 08bd7114..8646f930 100644 --- a/chrome/browser/task_manager/providers/web_contents/web_app_tag_browsertest.cc +++ b/chrome/browser/task_manager/providers/web_contents/web_app_tag_browsertest.cc
@@ -12,7 +12,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_navigator_params.h" #include "chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/ui_test_utils.h" @@ -30,7 +30,7 @@ namespace task_manager { -class WebAppTagWebAppTest : public web_app::WebAppControllerBrowserTest { +class WebAppTagWebAppTest : public web_app::WebAppBrowserTestBase { protected: Browser* LaunchBrowserForWebAppInTabAndWait(const webapps::AppId& app_id, const GURL& observe_url) {
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 6b31fe6..c618f6d 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -58,8 +58,6 @@ "autofill/autofill_keyboard_accessory_adapter.cc", "autofill/autofill_keyboard_accessory_adapter.h", "autofill/autofill_popup_controller.h", - "autofill/autofill_popup_controller_impl.cc", - "autofill/autofill_popup_controller_impl.h", "autofill/autofill_popup_hide_helper.cc", "autofill/autofill_popup_hide_helper.h", "autofill/autofill_popup_view.h", @@ -1079,6 +1077,8 @@ "apps/directory_access_confirmation_dialog.h", "autofill/autofill_context_menu_manager.cc", "autofill/autofill_context_menu_manager.h", + "autofill/autofill_popup_controller_impl.cc", + "autofill/autofill_popup_controller_impl.h", "autofill/payments/desktop_payments_window_manager.cc", "autofill/payments/desktop_payments_window_manager.h", "blocked_content/framebust_block_tab_helper.cc",
diff --git a/chrome/browser/ui/android/signin/BUILD.gn b/chrome/browser/ui/android/signin/BUILD.gn index ebef74b8..62d1575 100644 --- a/chrome/browser/ui/android/signin/BUILD.gn +++ b/chrome/browser/ui/android/signin/BUILD.gn
@@ -279,6 +279,7 @@ "//chrome/browser/preferences:java", "//chrome/browser/profiles/android:java", "//chrome/browser/signin/services/android:java", + "//chrome/browser/sync/android:java", "//chrome/browser/ui/android/night_mode:night_mode_java_test_support", "//chrome/browser/ui/android/signin:java_resources", "//chrome/browser/ui/messages/android:java", @@ -290,6 +291,7 @@ "//components/signin/core/browser:signin_enums_java", "//components/signin/public/android:java", "//components/signin/public/android:signin_java_test_support", + "//components/sync/android:sync_java", "//components/user_prefs/android:java", "//content/public/android:content_java", "//content/public/test/android:content_java_test_support",
diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutCoordinator.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutCoordinator.java index 8ebcf915..793dc41 100644 --- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutCoordinator.java +++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutCoordinator.java
@@ -8,7 +8,6 @@ import androidx.annotation.IntDef; import androidx.annotation.MainThread; -import androidx.annotation.Nullable; import androidx.fragment.app.FragmentManager; import org.chromium.base.ThreadUtils; @@ -18,12 +17,17 @@ import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.signin.services.IdentityServicesProvider; import org.chromium.chrome.browser.signin.services.SigninManager; +import org.chromium.chrome.browser.sync.SyncServiceFactory; import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.components.signin.identitymanager.ConsentLevel; import org.chromium.components.signin.identitymanager.IdentityManager; import org.chromium.components.signin.metrics.SignoutReason; +import org.chromium.components.sync.SyncService; +import org.chromium.ui.modaldialog.DialogDismissalCause; import org.chromium.ui.modaldialog.ModalDialogManager; +import org.chromium.ui.modaldialog.ModalDialogProperties; +import org.chromium.ui.modelutil.PropertyModel; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -57,8 +61,9 @@ ModalDialogManager dialogManager, SnackbarManager snackbarManager, @SignoutReason int signOutReason, - @Nullable Runnable onSignOut) { + Runnable onSignOut) { ThreadUtils.assertOnUiThread(); + assert onSignOut != null; validateSignOutReason(profile, signOutReason); IdentityManager identityManager = @@ -67,15 +72,24 @@ throw new IllegalStateException("There is no signed-in account"); } SigninManager signinManager = IdentityServicesProvider.get().getSigninManager(profile); - switch (getUiState(identityManager)) { - case UiState.SNACK_BAR -> signOutAndShowSnackbar( - context, snackbarManager, signinManager, signOutReason, onSignOut); - case UiState.UNSAVED_DATA -> showUnsavedDataDialog( - context, dialogManager, signinManager, signOutReason); - case UiState.CLEAR_CHROME_DATA -> showSignOutDialog(context, dialogManager); - case UiState.LEGACY_DIALOG -> SignOutDialogCoordinator.show( - context, profile, fragmentManager, dialogManager, signOutReason, onSignOut); - } + SyncService syncService = SyncServiceFactory.getForProfile(profile); + syncService.getTypesWithUnsyncedData( + unsyncedTypes -> { + switch (getUiState(identityManager, !unsyncedTypes.isEmpty())) { + case UiState.SNACK_BAR -> signOutAndShowSnackbar( + context, snackbarManager, signinManager, signOutReason, onSignOut); + case UiState.UNSAVED_DATA -> showUnsavedDataDialog( + context, dialogManager, signinManager, signOutReason, onSignOut); + case UiState.CLEAR_CHROME_DATA -> showSignOutDialog(context, dialogManager); + case UiState.LEGACY_DIALOG -> SignOutDialogCoordinator.show( + context, + profile, + fragmentManager, + dialogManager, + signOutReason, + onSignOut); + } + }); } @IntDef({ @@ -108,12 +122,13 @@ } } - private static @UiState int getUiState(IdentityManager identityManager) { + private static @UiState int getUiState( + IdentityManager identityManager, boolean hasUnsavedData) { if (!ChromeFeatureList.isEnabled(ChromeFeatureList.REPLACE_SYNC_PROMOS_WITH_SIGN_IN_PROMOS) || identityManager.hasPrimaryAccount(ConsentLevel.SYNC)) { return UiState.LEGACY_DIALOG; } - if (hasUnsavedData()) { + if (hasUnsavedData) { return UiState.UNSAVED_DATA; } if (shouldShowSignOutDialog()) { @@ -122,11 +137,6 @@ return UiState.SNACK_BAR; } - private static boolean hasUnsavedData() { - // TODO(crbug.com/41493791): Implement logic for checking unsaved data. - return false; - } - private static boolean shouldShowSignOutDialog() { // TODO(crbug.com/328395437): Implement clear data dialog. return false; @@ -136,8 +146,52 @@ Context context, ModalDialogManager dialogManager, SigninManager signinManager, - @SignoutReason int signOutReason) { - // TODO(crbug.com/41493791): Implement unsaved data dialog. + @SignoutReason int signOutReason, + Runnable onSignOut) { + final PropertyModel model = + new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS) + .with( + ModalDialogProperties.TITLE, + context.getString(R.string.sign_out_unsaved_data_title)) + .with( + ModalDialogProperties.MESSAGE_PARAGRAPH_1, + context.getString(R.string.sign_out_unsaved_data_message)) + .with( + ModalDialogProperties.POSITIVE_BUTTON_TEXT, + context.getString(R.string.sign_out_unsaved_data_primary_button)) + .with( + ModalDialogProperties.NEGATIVE_BUTTON_TEXT, + context.getString(R.string.cancel)) + .with(ModalDialogProperties.CANCEL_ON_TOUCH_OUTSIDE, true) + .with( + ModalDialogProperties.CONTROLLER, + createController( + dialogManager, signinManager, signOutReason, onSignOut)) + .build(); + dialogManager.showDialog(model, ModalDialogManager.ModalDialogType.APP); + } + + private static ModalDialogProperties.Controller createController( + ModalDialogManager dialogManager, + SigninManager signinManager, + @SignoutReason int signOutReason, + Runnable onSignOut) { + return new ModalDialogProperties.Controller() { + @Override + public void onClick(PropertyModel model, int buttonType) { + if (buttonType == ModalDialogProperties.ButtonType.POSITIVE) { + signOut(signinManager, signOutReason, onSignOut); + dialogManager.dismissDialog( + model, DialogDismissalCause.POSITIVE_BUTTON_CLICKED); + } else if (buttonType == ModalDialogProperties.ButtonType.NEGATIVE) { + dialogManager.dismissDialog( + model, DialogDismissalCause.NEGATIVE_BUTTON_CLICKED); + } + } + + @Override + public void onDismiss(PropertyModel model, int dismissalCause) {} + }; } private static void showSignOutDialog(Context context, ModalDialogManager dialogManager) { @@ -149,7 +203,7 @@ SnackbarManager snackbarManager, SigninManager signinManager, @SignoutReason int signOutReason, - @Nullable Runnable onSignOut) { + Runnable onSignOut) { signOut( signinManager, signOutReason, @@ -160,9 +214,7 @@ /* controller= */ null, Snackbar.TYPE_ACTION, Snackbar.UMA_SIGN_OUT)); - if (onSignOut != null) { - onSignOut.run(); - } + onSignOut.run(); }); }
diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutCoordinatorTest.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutCoordinatorTest.java index abe48616..2ee9712 100644 --- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutCoordinatorTest.java +++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutCoordinatorTest.java
@@ -5,22 +5,27 @@ package org.chromium.chrome.browser.ui.signin; import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; import static androidx.test.espresso.assertion.ViewAssertions.matches; import static androidx.test.espresso.matcher.RootMatchers.isDialog; import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; import static androidx.test.espresso.matcher.ViewMatchers.withText; +import static org.hamcrest.CoreMatchers.instanceOf; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import androidx.annotation.Nullable; import androidx.fragment.app.FragmentManager; import androidx.test.filters.MediumTest; +import androidx.test.filters.SmallTest; +import org.hamcrest.MatcherAssert; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; @@ -31,6 +36,7 @@ import org.mockito.junit.MockitoRule; import org.mockito.quality.Strictness; +import org.chromium.base.Callback; import org.chromium.base.test.BaseActivityTestRule; import org.chromium.base.test.util.Batch; import org.chromium.base.test.util.Features; @@ -44,6 +50,7 @@ import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.signin.services.IdentityServicesProvider; import org.chromium.chrome.browser.signin.services.SigninManager; +import org.chromium.chrome.browser.sync.SyncServiceFactory; import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; @@ -51,11 +58,17 @@ import org.chromium.components.signin.identitymanager.ConsentLevel; import org.chromium.components.signin.identitymanager.IdentityManager; import org.chromium.components.signin.metrics.SignoutReason; +import org.chromium.components.sync.ModelType; +import org.chromium.components.sync.SyncService; import org.chromium.components.user_prefs.UserPrefs; import org.chromium.components.user_prefs.UserPrefsJni; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.test.util.BlankUiTestActivity; +import java.util.HashSet; +import java.util.Set; +import java.util.concurrent.ExecutionException; + /** Instrumentation tests for {@link SignOutDialogCoordinator}. */ @RunWith(ChromeJUnit4ClassRunner.class) @Batch(Batch.PER_CLASS) @@ -75,47 +88,54 @@ @Mock private Profile mProfile; @Mock private FragmentManager mFragmentManager; @Mock private IdentityServicesProvider mIdentityServicesProviderMock; - @Mock private SigninManager mSigninManagerMock; @Mock private IdentityManager mIdentityManagerMock; + @Mock private SigninManager mSigninManagerMock; + @Mock private SyncService mSyncService; @Mock private PasswordManagerUtilBridge.Natives mPasswordManagerUtilBridgeNativeMock; @Mock private UserPrefs.Natives mUserPrefsNatives; @Mock private PrefService mPrefService; @Mock private Runnable mOnSignOut; + private final Set<Integer> mUnsyncedDataTypes = new HashSet<>(); private SnackbarManager mSnackbarManager; @Before public void setUp() { - IdentityServicesProvider.setInstanceForTests(mIdentityServicesProviderMock); - doReturn(mIdentityManagerMock) - .when(mIdentityServicesProviderMock) - .getIdentityManager(mProfile); - doReturn(true).when(mIdentityManagerMock).hasPrimaryAccount(ConsentLevel.SIGNIN); - doReturn(mSigninManagerMock).when(mIdentityServicesProviderMock).getSigninManager(mProfile); - mActivityTestRule.launchActivity(null); - TestThreadUtils.runOnUiThreadBlocking( - () -> { - mSnackbarManager = - new SnackbarManager( - mActivityTestRule.getActivity(), - mActivityTestRule - .getActivity() - .findViewById(android.R.id.content), - null); - }); + } + + @Test + @SmallTest + public void testNullOnSignOutCallback() { + try { + TestThreadUtils.runOnUiThreadBlocking( + () -> { + SignOutCoordinator.startSignOutFlow( + mActivityTestRule.getActivity(), + mProfile, + mFragmentManager, + mActivityTestRule.getActivity().getModalDialogManager(), + mSnackbarManager, + SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS, + null); + return null; + }); + } catch (ExecutionException ex) { + MatcherAssert.assertThat(ex.getCause(), instanceOf(AssertionError.class)); + } } @Test @MediumTest @DisableFeatures(ChromeFeatureList.REPLACE_SYNC_PROMOS_WITH_SIGN_IN_PROMOS) public void testLegacyDialog_replaceSyncPromosFeatureDisabled() { + setUpMocks(); mocker.mock(PasswordManagerUtilBridgeJni.TEST_HOOKS, mPasswordManagerUtilBridgeNativeMock); mocker.mock(UserPrefsJni.TEST_HOOKS, mUserPrefsNatives); when(mUserPrefsNatives.get(mProfile)).thenReturn(mPrefService); when(mPrefService.getBoolean(Pref.ALLOW_DELETING_BROWSER_HISTORY)).thenReturn(true); - startSignOutFlow(SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS, null); + startSignOutFlow(SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS, mOnSignOut); onView(withText(R.string.signout_title)).inRoot(isDialog()).check(matches(isDisplayed())); } @@ -123,13 +143,14 @@ @Test @MediumTest public void testLegacyDialog_hasSyncingAccount() { + setUpMocks(); mocker.mock(PasswordManagerUtilBridgeJni.TEST_HOOKS, mPasswordManagerUtilBridgeNativeMock); mocker.mock(UserPrefsJni.TEST_HOOKS, mUserPrefsNatives); when(mUserPrefsNatives.get(mProfile)).thenReturn(mPrefService); when(mPrefService.getBoolean(Pref.ALLOW_DELETING_BROWSER_HISTORY)).thenReturn(true); doReturn(true).when(mIdentityManagerMock).hasPrimaryAccount(ConsentLevel.SYNC); - startSignOutFlow(SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS, null); + startSignOutFlow(SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS, mOnSignOut); onView(withText(R.string.turn_off_sync_and_signout_title)) .inRoot(isDialog()) @@ -138,44 +159,8 @@ @Test @MediumTest - public void testSnackbar_nullOnSignoutCallback() { - @SignoutReason int signOutReason = SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS; - doReturn(true).when(mSigninManagerMock).isSignOutAllowed(); - doAnswer( - args -> { - args.getArgument(0, Runnable.class).run(); - return null; - }) - .when(mSigninManagerMock) - .runAfterOperationInProgress(any(Runnable.class)); - doAnswer( - args -> { - args.getArgument(1, SigninManager.SignOutCallback.class) - .signOutComplete(); - return null; - }) - .when(mSigninManagerMock) - .signOut(eq(signOutReason), any(SigninManager.SignOutCallback.class), eq(true)); - - startSignOutFlow(signOutReason, null); - - TestThreadUtils.runOnUiThreadBlocking( - () -> { - Assert.assertTrue(mSnackbarManager.isShowing()); - Snackbar currentSnackbar = mSnackbarManager.getCurrentSnackbarForTesting(); - Assert.assertEquals( - currentSnackbar.getIdentifierForTesting(), Snackbar.UMA_SIGN_OUT); - Assert.assertEquals( - currentSnackbar.getTextForTesting(), - mActivityTestRule - .getActivity() - .getString(R.string.sign_out_snackbar_message)); - }); - } - - @Test - @MediumTest - public void testSnackbar_nonNullOnSignoutCallback() { + public void testSnackbarShownAfterSignOut() { + setUpMocks(); @SignoutReason int signOutReason = SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS; doReturn(true).when(mSigninManagerMock).isSignOutAllowed(); doAnswer( @@ -196,20 +181,129 @@ startSignOutFlow(signOutReason, mOnSignOut); + TestThreadUtils.runOnUiThreadBlocking( + () -> { + Assert.assertTrue(mSnackbarManager.isShowing()); + Snackbar currentSnackbar = mSnackbarManager.getCurrentSnackbarForTesting(); + Assert.assertEquals( + currentSnackbar.getIdentifierForTesting(), Snackbar.UMA_SIGN_OUT); + Assert.assertEquals( + currentSnackbar.getTextForTesting(), + mActivityTestRule + .getActivity() + .getString(R.string.sign_out_snackbar_message)); + }); verify(mOnSignOut).run(); } + @Test + @MediumTest + public void testUnsavedDataDialog() { + setUpMocks(); + mUnsyncedDataTypes.add(ModelType.BOOKMARKS); + + startSignOutFlow(SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS, mOnSignOut); + + onView(withText(R.string.sign_out_unsaved_data_title)) + .inRoot(isDialog()) + .check(matches(isDisplayed())); + onView(withText(R.string.sign_out_unsaved_data_message)) + .inRoot(isDialog()) + .check(matches(isDisplayed())); + onView(withText(R.string.sign_out_unsaved_data_primary_button)) + .inRoot(isDialog()) + .check(matches(isDisplayed())); + onView(withText(R.string.cancel)).inRoot(isDialog()).check(matches(isDisplayed())); + } + + @Test + @MediumTest + public void testUnsavedDataDialogPrimaryButtonClick() { + setUpMocks(); + mUnsyncedDataTypes.add(ModelType.BOOKMARKS); + @SignoutReason int signOutReason = SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS; + doReturn(true).when(mSigninManagerMock).isSignOutAllowed(); + doAnswer( + args -> { + args.getArgument(0, Runnable.class).run(); + return null; + }) + .when(mSigninManagerMock) + .runAfterOperationInProgress(any(Runnable.class)); + doAnswer( + args -> { + args.getArgument(1, SigninManager.SignOutCallback.class) + .signOutComplete(); + return null; + }) + .when(mSigninManagerMock) + .signOut(eq(signOutReason), any(SigninManager.SignOutCallback.class), eq(true)); + startSignOutFlow(signOutReason, mOnSignOut); + onView(withText(R.string.sign_out_unsaved_data_title)) + .inRoot(isDialog()) + .check(matches(isDisplayed())); + + onView(withText(R.string.sign_out_unsaved_data_primary_button)) + .inRoot(isDialog()) + .perform(click()); + + verify(mOnSignOut).run(); + } + + @Test + @MediumTest + public void testUnsavedDataDialogSecondaryButtonClick() { + setUpMocks(); + mUnsyncedDataTypes.add(ModelType.BOOKMARKS); + @SignoutReason int signOutReason = SignoutReason.USER_CLICKED_SIGNOUT_SETTINGS; + startSignOutFlow(signOutReason, mOnSignOut); + onView(withText(R.string.sign_out_unsaved_data_title)) + .inRoot(isDialog()) + .check(matches(isDisplayed())); + + onView(withText(R.string.cancel)).inRoot(isDialog()).perform(click()); + + verify(mSigninManagerMock, never()).runAfterOperationInProgress(any(Runnable.class)); + } + + private void setUpMocks() { + IdentityServicesProvider.setInstanceForTests(mIdentityServicesProviderMock); + doReturn(mIdentityManagerMock) + .when(mIdentityServicesProviderMock) + .getIdentityManager(mProfile); + doReturn(true).when(mIdentityManagerMock).hasPrimaryAccount(ConsentLevel.SIGNIN); + doReturn(mSigninManagerMock).when(mIdentityServicesProviderMock).getSigninManager(mProfile); + SyncServiceFactory.setInstanceForTesting(mSyncService); + doAnswer( + args -> { + args.getArgument(0, Callback.class).onResult(mUnsyncedDataTypes); + return null; + }) + .when(mSyncService) + .getTypesWithUnsyncedData(any(Callback.class)); + + TestThreadUtils.runOnUiThreadBlocking( + () -> { + mSnackbarManager = + new SnackbarManager( + mActivityTestRule.getActivity(), + mActivityTestRule + .getActivity() + .findViewById(android.R.id.content), + null); + }); + } + private void startSignOutFlow(@SignoutReason int signoutReason, @Nullable Runnable onSignOut) { TestThreadUtils.runOnUiThreadBlocking( - () -> { - SignOutCoordinator.startSignOutFlow( - mActivityTestRule.getActivity(), - mProfile, - mFragmentManager, - mActivityTestRule.getActivity().getModalDialogManager(), - mSnackbarManager, - signoutReason, - onSignOut); - }); + () -> + SignOutCoordinator.startSignOutFlow( + mActivityTestRule.getActivity(), + mProfile, + mFragmentManager, + mActivityTestRule.getActivity().getModalDialogManager(), + mSnackbarManager, + signoutReason, + onSignOut)); } }
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd index 57538fee..ee82866 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -2169,6 +2169,18 @@ <message name="IDS_SIGN_OUT_SNACKBAR_MESSAGE" desc="to be added" translateable="false"> Signed out. Sign back in to use the bookmarks, passwords and more in your account. </message> + <!-- TODO(crbug.com/41493791): Add description and remove translateable once strings are finalized. --> + <message name="IDS_SIGN_OUT_UNSAVED_DATA_TITLE" desc="to be added" translateable="false"> + Unsaved data + </message> + <!-- TODO(crbug.com/41493791): Add description and remove translateable once strings are finalized. --> + <message name="IDS_SIGN_OUT_UNSAVED_DATA_MESSAGE" desc="to be added" translateable="false"> + Some of your Chrome data hasn\u2019t been saved in your Google Account yet.\nTry waiting a few minutes before signing out. If you sign out now, this data will be deleted. + </message> + <!-- TODO(crbug.com/41493791): Add description and remove translateable once strings are finalized. --> + <message name="IDS_SIGN_OUT_UNSAVED_DATA_PRIMARY_BUTTON" desc="to be added" translateable="false"> + Delete and sign out + </message> <message name="IDS_SIGN_IN_GETTING_ACCOUNT_MANAGEMENT_POLICY" desc="Title of progress bar dialog for getting management policy"> Contacting Google. This may take a minute… </message>
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc index a5f5e52..0f2096a 100644 --- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc +++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc
@@ -26,6 +26,7 @@ #include "chrome/browser/ui/autofill/autofill_suggestion_controller_utils.h" #include "chrome/browser/ui/autofill/next_idle_time_ticks.h" #include "chrome/browser/ui/autofill/popup_controller_common.h" +#include "chrome/browser/user_education/user_education_service.h" #include "components/autofill/core/browser/autofill_manager.h" #include "components/autofill/core/browser/filling_product.h" #include "components/autofill/core/browser/metrics/autofill_metrics.h" @@ -35,6 +36,7 @@ #include "components/autofill/core/browser/ui/popup_item_ids.h" #include "components/autofill/core/browser/ui/suggestion.h" #include "components/autofill/core/common/autofill_features.h" +#include "components/compose/core/browser/compose_features.h" #include "components/compose/core/browser/config.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/navigation_handle.h" @@ -52,17 +54,6 @@ #include "ui/gfx/text_utils.h" #include "ui/views/accessibility/view_accessibility.h" -#if BUILDFLAG(IS_ANDROID) -#include "chrome/browser/keyboard_accessory/android/manual_filling_controller_impl.h" -#include "chrome/browser/password_manager/android/local_passwords_migration_warning_util.h" -#include "components/password_manager/core/common/password_manager_features.h" - -using FillingSource = ManualFillingController::FillingSource; -#else -#include "chrome/browser/user_education/user_education_service.h" -#include "components/compose/core/browser/compose_features.h" -#endif - namespace autofill { #if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_ANDROID) @@ -92,7 +83,7 @@ } auto* controller = new AutofillPopupControllerImpl( delegate, web_contents, std::move(controller_common), form_control_ax_id, - base::DoNothing(), /*parent=*/std::nullopt); + /*parent=*/std::nullopt); return controller->GetWeakPtr(); } #endif @@ -102,17 +93,10 @@ content::WebContents* web_contents, PopupControllerCommon controller_common, int32_t form_control_ax_id, - base::RepeatingCallback< - void(gfx::NativeWindow, - Profile*, - password_manager::metrics_util::PasswordMigrationWarningTriggers)> - show_pwd_migration_warning_callback, std::optional<base::WeakPtr<ExpandablePopupParentControllerImpl>> parent) : web_contents_(web_contents->GetWeakPtr()), controller_common_(std::move(controller_common)), delegate_(delegate), - show_pwd_migration_warning_callback_( - std::move(show_pwd_migration_warning_callback)), parent_controller_(parent) { ClearState(); } @@ -194,15 +178,7 @@ Hide(PopupHidingReason::kViewDestroyed); return; } - -#if BUILDFLAG(IS_ANDROID) - if (base::WeakPtr<ManualFillingController> manual_filling_controller = - ManualFillingController::GetOrCreate(web_contents_.get())) { - manual_filling_controller->UpdateSourceAvailability( - FillingSource::AUTOFILL, !suggestions_.empty()); - } -#endif - if (!view_ || !view_->Show(autoselect_first_suggestion)) { + if (!view_->Show(autoselect_first_suggestion)) { return; } @@ -315,17 +291,6 @@ } void AutofillPopupControllerImpl::OnSuggestionsChanged() { -#if BUILDFLAG(IS_ANDROID) - // Assume that suggestions are (still) available. If this is wrong, the method - // |HideViewAndDie| will be called soon after and will hide all suggestions. - if (base::WeakPtr<ManualFillingController> manual_filling_controller = - ManualFillingController::GetOrCreate(web_contents_.get())) { - manual_filling_controller->UpdateSourceAvailability( - FillingSource::AUTOFILL, - /*has_suggestions=*/true); - } -#endif - if (view_) { view_->OnSuggestionsChanged(); } @@ -374,28 +339,14 @@ return; } -#if !BUILDFLAG(IS_ANDROID) UserEducationService::MaybeNotifyPromoFeatureUsed( web_contents_->GetBrowserContext(), compose::features::kEnableComposeNudge); -#endif // Use a copy instead of a reference here. Under certain circumstances, // `DidAcceptSuggestion()` can call `SetSuggestions()` and invalidate the // reference. Suggestion suggestion = suggestions_[index]; -#if BUILDFLAG(IS_ANDROID) - if (base::WeakPtr<ManualFillingController> manual_filling_controller = - ManualFillingController::GetOrCreate(web_contents_.get())) { - // Accepting a suggestion should hide all suggestions. To prevent them from - // coming up in Multi-Window mode, mark the source as unavailable. - manual_filling_controller->UpdateSourceAvailability( - FillingSource::AUTOFILL, - /*has_suggestions=*/false); - manual_filling_controller->Hide(); - } -#endif - NotifyIphAboutAcceptedSuggestion(web_contents_->GetBrowserContext(), suggestion); if (suggestion.acceptance_a11y_announcement && view_) { @@ -405,18 +356,6 @@ delegate_->DidAcceptSuggestion( suggestion, AutofillPopupDelegate::SuggestionPosition{ .row = index, .sub_popup_level = GetPopupLevel()}); -#if BUILDFLAG(IS_ANDROID) - if ((suggestion.popup_item_id == PopupItemId::kPasswordEntry) && - base::FeatureList::IsEnabled( - password_manager::features:: - kUnifiedPasswordManagerLocalPasswordsMigrationWarning)) { - show_pwd_migration_warning_callback_.Run( - web_contents_->GetTopLevelNativeWindow(), - Profile::FromBrowserContext(web_contents_->GetBrowserContext()), - password_manager::metrics_util::PasswordMigrationWarningTriggers:: - kKeyboardAcessoryBar); - } -#endif } void AutofillPopupControllerImpl::PerformButtonActionForSuggestion(int index) { @@ -454,7 +393,7 @@ new_controller_common.element_bounds = anchor_bounds; AutofillPopupControllerImpl* controller = new AutofillPopupControllerImpl( delegate_, web_contents_.get(), std::move(new_controller_common), - /*form_control_ax_id=*/form_control_ax_id_, base::DoNothing(), + /*form_control_ax_id=*/form_control_ax_id_, /*parent=*/GetWeakPtr()); // Show() can fail and cause controller deletion. Therefore store the weak @@ -700,20 +639,6 @@ // (crbug.com/1267047). weak_ptr_factory_.InvalidateWeakPtrs(); -#if BUILDFLAG(IS_ANDROID) - // Mark the popup-like filling sources as unavailable. - // Note: We don't invoke ManualFillingController::Hide() here, as we might - // switch between text input fields. - if (web_contents_) { - if (base::WeakPtr<ManualFillingController> manual_filling_controller = - ManualFillingController::GetOrCreate(web_contents_.get())) { - manual_filling_controller->UpdateSourceAvailability( - FillingSource::AUTOFILL, - /*has_suggestions=*/false); - } - } -#endif - // TODO(crbug.com/1341374, crbug.com/1277218): Move this into the asynchronous // call? if (view_) {
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.h b/chrome/browser/ui/autofill/autofill_popup_controller_impl.h index 551fb3c..dde2c9d 100644 --- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.h +++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.h
@@ -19,12 +19,9 @@ #include "chrome/browser/ui/autofill/popup_controller_common.h" #include "components/autofill/core/browser/ui/popup_hiding_reasons.h" #include "components/autofill/core/common/aliases.h" -#include "components/password_manager/core/browser/password_manager_metrics_util.h" #include "content/public/browser/render_widget_host.h" #include "third_party/abseil-cpp/absl/types/variant.h" -class Profile; - namespace content { struct NativeWebKeyboardEvent; class WebContents; @@ -127,11 +124,6 @@ content::WebContents* web_contents, PopupControllerCommon controller_common, int32_t form_control_ax_id, - base::RepeatingCallback<void( - gfx::NativeWindow, - Profile*, - password_manager::metrics_util::PasswordMigrationWarningTriggers)> - show_pwd_migration_warning_callback, std::optional<base::WeakPtr<ExpandablePopupParentControllerImpl>> parent = std::nullopt); ~AutofillPopupControllerImpl() override; @@ -224,15 +216,6 @@ // the machine that would normally cause the popup to be hidden. bool keep_popup_open_for_testing_ = false; - // Callback invoked to try to show the password migration warning on Android. - // Used to facilitate testing. - // TODO(crbug.com/40272324): Remove when the warning isn't needed anymore. - base::RepeatingCallback<void( - gfx::NativeWindow, - Profile*, - password_manager::metrics_util::PasswordMigrationWarningTriggers)> - show_pwd_migration_warning_callback_; - // Timer to close a fading popup. base::OneShotTimer fading_popup_timer_;
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl_mac.mm b/chrome/browser/ui/autofill/autofill_popup_controller_impl_mac.mm index 0e70b2a..8648a32 100644 --- a/chrome/browser/ui/autofill/autofill_popup_controller_impl_mac.mm +++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl_mac.mm
@@ -50,7 +50,6 @@ web_contents, std::move(controller_common), form_control_ax_id, - base::DoNothing(), std::nullopt), touch_bar_controller_(nil), is_credit_card_popup_(delegate->GetMainFillingProduct() ==
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_test_base.cc b/chrome/browser/ui/autofill/autofill_popup_controller_test_base.cc index 4a04c3a4..db945c8 100644 --- a/chrome/browser/ui/autofill/autofill_popup_controller_test_base.cc +++ b/chrome/browser/ui/autofill/autofill_popup_controller_test_base.cc
@@ -20,12 +20,12 @@ AutofillPopupControllerForPopupTest::AutofillPopupControllerForPopupTest( base::WeakPtr<AutofillExternalDelegate> external_delegate, content::WebContents* web_contents, - const gfx::RectF& element_bounds, - base::RepeatingCallback< - void(gfx::NativeWindow, - Profile*, - password_manager::metrics_util::PasswordMigrationWarningTriggers)> - show_pwd_migration_warning_callback) + const gfx::RectF& element_bounds +#if BUILDFLAG(IS_ANDROID) + , + ShowPasswordMigrationWarningCallback show_pwd_migration_warning_callback +#endif + ) : AutofillPopupControllerForPopupTestBase( external_delegate, web_contents, @@ -33,9 +33,11 @@ base::i18n::UNKNOWN_DIRECTION, nullptr), #if !BUILDFLAG(IS_ANDROID) - /*form_control_ax_id=*/0, + /*form_control_ax_id=*/0 +#else + std::move(show_pwd_migration_warning_callback) #endif - std::move(show_pwd_migration_warning_callback)) { + ) { } AutofillPopupControllerForPopupTest::~AutofillPopupControllerForPopupTest() =
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_test_base.h b/chrome/browser/ui/autofill/autofill_popup_controller_test_base.h index 2f6e2a7..ff77d29 100644 --- a/chrome/browser/ui/autofill/autofill_popup_controller_test_base.h +++ b/chrome/browser/ui/autofill/autofill_popup_controller_test_base.h
@@ -277,8 +277,12 @@ if (!popup_controller_) { popup_controller_ = (new Controller(manager.external_delegate().GetWeakPtrForTest(), - &GetWebContents(), gfx::RectF(), - show_pwd_migration_warning_callback_.Get())) + &GetWebContents(), gfx::RectF() +#if BUILDFLAG(IS_ANDROID) + , + show_pwd_migration_warning_callback_.Get() +#endif + )) ->GetWeakPtr(); cast_popup_controller().SetViewForTesting(popup_view_->GetWeakPtr()); manager_of_last_controller_ = manager.GetWeakPtr(); @@ -293,10 +297,7 @@ MockAutofillPopupView& sub_popup_view() { return *sub_popup_view_; } #if BUILDFLAG(IS_ANDROID) - base::MockCallback<base::RepeatingCallback< - void(gfx::NativeWindow, - Profile*, - password_manager::metrics_util::PasswordMigrationWarningTriggers)>>& + base::MockCallback<typename Controller::ShowPasswordMigrationWarningCallback>& show_pwd_migration_warning_callback() { return show_pwd_migration_warning_callback_; } @@ -326,11 +327,10 @@ std::make_unique<::testing::NiceMock<MockAutofillPopupView>>(); std::unique_ptr<MockAutofillPopupView> sub_popup_view_ = std::make_unique<::testing::NiceMock<MockAutofillPopupView>>(); - base::MockCallback<base::RepeatingCallback<void( - gfx::NativeWindow, - Profile*, - password_manager::metrics_util::PasswordMigrationWarningTriggers)>> +#if BUILDFLAG(IS_ANDROID) + base::MockCallback<typename Controller::ShowPasswordMigrationWarningCallback> show_pwd_migration_warning_callback_; +#endif }; using AutofillPopupControllerForPopupTestBase = @@ -346,12 +346,12 @@ AutofillPopupControllerForPopupTest( base::WeakPtr<AutofillExternalDelegate> external_delegate, content::WebContents* web_contents, - const gfx::RectF& element_bounds, - base::RepeatingCallback<void( - gfx::NativeWindow, - Profile*, - password_manager::metrics_util::PasswordMigrationWarningTriggers)> - show_pwd_migration_warning_callback); + const gfx::RectF& element_bounds +#if BUILDFLAG(IS_ANDROID) + , + ShowPasswordMigrationWarningCallback show_pwd_migration_warning_callback +#endif + ); ~AutofillPopupControllerForPopupTest() override; // Making protected functions public for testing
diff --git a/chrome/browser/ui/browser_navigator_iwa_browsertest.cc b/chrome/browser/ui/browser_navigator_iwa_browsertest.cc index 2bf464d..06a75ba6 100644 --- a/chrome/browser/ui/browser_navigator_iwa_browsertest.cc +++ b/chrome/browser/ui/browser_navigator_iwa_browsertest.cc
@@ -114,14 +114,14 @@ web_app::TestSignedWebBundle bundle1 = web_app::TestSignedWebBundleBuilder::BuildDefault( web_app::TestSignedWebBundleBuilder::BuildOptions() - .SetKeyPair( - web_package::WebBundleSigner::KeyPair::CreateRandom()) + .SetKeyPair(web_package::WebBundleSigner::Ed25519KeyPair:: + CreateRandom()) .SetIndexHTMLContent("Hello BrowserNavigator 1!")); web_app::TestSignedWebBundle bundle2 = web_app::TestSignedWebBundleBuilder::BuildDefault( web_app::TestSignedWebBundleBuilder::BuildOptions() - .SetKeyPair( - web_package::WebBundleSigner::KeyPair::CreateRandom()) + .SetKeyPair(web_package::WebBundleSigner::Ed25519KeyPair:: + CreateRandom()) .SetIndexHTMLContent("Hello BrowserNavigator 2!")); base::FilePath bundle1_path =
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac_browsertest.mm b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac_browsertest.mm index ff34226..16473d0 100644 --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac_browsertest.mm +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac_browsertest.mm
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" + #include "base/files/file_util.h" #include "base/run_loop.h" #include "base/strings/strcat.h" @@ -14,14 +16,13 @@ #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/view_ids.h" -#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_view.h" #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/common/pref_names.h" @@ -80,7 +81,7 @@ enum class PrefixTitles { kEnabled, kDisabled }; using BrowserNonClientFrameViewMacBrowserTestTitlePrefixed = - web_app::WebAppControllerBrowserTest; + web_app::WebAppBrowserTestBase; // This will always be flaky on mac due to RemoteCocoa, the way it mocks out // fullscreen doesn't play with remote cocoa. So it gets true fullscreen (which @@ -133,8 +134,7 @@ } } -using BrowserNonClientFrameViewMacBrowserTest = - web_app::WebAppControllerBrowserTest; +using BrowserNonClientFrameViewMacBrowserTest = web_app::WebAppBrowserTestBase; // Test to make sure the WebAppToolbarFrame triggers an InvalidateLayout() when // toggled in fullscreen mode.
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_chromeos_browsertest.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_chromeos_browsertest.cc index 1cb6689..744b95a 100644 --- a/chrome/browser/ui/views/frame/immersive_mode_controller_chromeos_browsertest.cc +++ b/chrome/browser/ui/views/frame/immersive_mode_controller_chromeos_browsertest.cc
@@ -20,7 +20,7 @@ #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_view.h" #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_menu_button.h" #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/test/base/ui_test_utils.h" #include "chrome/test/permissions/permission_request_manager_test_api.h" @@ -37,7 +37,7 @@ #include "ui/views/window/frame_caption_button.h" class ImmersiveModeControllerChromeosWebAppBrowserTest - : public web_app::WebAppControllerBrowserTest { + : public web_app::WebAppBrowserTestBase { public: ImmersiveModeControllerChromeosWebAppBrowserTest() : https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {} @@ -49,9 +49,9 @@ ~ImmersiveModeControllerChromeosWebAppBrowserTest() override = default; - // WebAppControllerBrowserTest override: + // WebAppBrowserTestBase override: void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); https_server_.AddDefaultHandlers(GetChromeTestDataDir()); ASSERT_TRUE(https_server_.Start());
diff --git a/chrome/browser/ui/views/location_bar/custom_tab_bar_view_browsertest.cc b/chrome/browser/ui/views/location_bar/custom_tab_bar_view_browsertest.cc index c783b1c..8426b54 100644 --- a/chrome/browser/ui/views/location_bar/custom_tab_bar_view_browsertest.cc +++ b/chrome/browser/ui/views/location_bar/custom_tab_bar_view_browsertest.cc
@@ -13,7 +13,7 @@ #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/in_process_browser_test.h" @@ -174,8 +174,7 @@ } // namespace -class CustomTabBarViewBrowserTest - : public web_app::WebAppControllerBrowserTest { +class CustomTabBarViewBrowserTest : public web_app::WebAppBrowserTestBase { public: CustomTabBarViewBrowserTest() = default; @@ -188,7 +187,7 @@ protected: void SetUpCommandLine(base::CommandLine* command_line) override { - web_app::WebAppControllerBrowserTest::SetUpCommandLine(command_line); + web_app::WebAppBrowserTestBase::SetUpCommandLine(command_line); // Browser will both run and display insecure content. command_line->AppendSwitch(switches::kAllowRunningInsecureContent); } @@ -196,11 +195,11 @@ void SetUp() override { feature_list_.InitAndDisableFeature( blink::features::kMixedContentAutoupgrade); - web_app::WebAppControllerBrowserTest::SetUp(); + web_app::WebAppBrowserTestBase::SetUp(); } void SetUpOnMainThread() override { - web_app::WebAppControllerBrowserTest::SetUpOnMainThread(); + web_app::WebAppBrowserTestBase::SetUpOnMainThread(); browser_view_ = BrowserView::GetBrowserViewForBrowser(browser());
diff --git a/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc b/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc index 10b3796d..40122ef8 100644 --- a/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc +++ b/chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc
@@ -53,7 +53,7 @@ #include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_test_helper.h" #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_view.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/webui/signin/login_ui_test_utils.h" #include "chrome/browser/web_applications/test/os_integration_test_override_impl.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -1739,14 +1739,14 @@ #endif class ProfileMenuViewWebAppTest : public ProfileMenuViewTestBase, - public web_app::WebAppControllerBrowserTest { + public web_app::WebAppBrowserTestBase { protected: void TearDownOnMainThread() override { for (Profile* profile : g_browser_process->profile_manager()->GetLoadedProfiles()) { web_app::test::UninstallAllWebApps(profile); } - web_app::WebAppControllerBrowserTest::TearDownOnMainThread(); + web_app::WebAppBrowserTestBase::TearDownOnMainThread(); } WebAppFrameToolbarTestHelper& toolbar_helper() {
diff --git a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc index e09fb8f..3c379a0 100644 --- a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc +++ b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc
@@ -311,7 +311,8 @@ browser_view_->unified_side_panel()->AddHeaderView(CreateHeader()); } - if (features::IsSidePanelPinningEnabled()) { + if (features::IsSidePanelPinningEnabled() && + !browser_view_->GetIsWebAppType()) { browser_view_->MaybeShowStartupFeaturePromo( feature_engagement::kIPHSidePanelGenericMenuFeature); }
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc index 60a7ca12..cf33352d 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -1936,6 +1936,14 @@ attached_context_ = nullptr; Attach(new_context, last_point_in_screen_, std::move(me)); + // Tabbed PWAs with a home tab should have a home tab in every window. This + // means when dragging tabs out to create a new window, a home tab needs to be + // added. + if (browser->app_controller() && browser->app_controller()->has_tab_strip()) { + web_app::MaybeAddPinnedHomeTab(browser, + browser->app_controller()->app_id()); + } + browser->window()->Show(); }
diff --git a/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc b/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc index e5f3baa..0fa82c0b 100644 --- a/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc +++ b/chrome/browser/ui/views/user_education/feature_promo_lifecycle_interactive_uitest.cc
@@ -20,7 +20,7 @@ #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/grit/generated_resources.h" #include "chrome/test/user_education/interactive_feature_promo_test.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" @@ -64,8 +64,7 @@ base::FEATURE_ENABLED_BY_DEFAULT); } // namespace -using TestBase = - InteractiveFeaturePromoTestT<web_app::WebAppControllerBrowserTest>; +using TestBase = InteractiveFeaturePromoTestT<web_app::WebAppBrowserTestBase>; using user_education::FeaturePromoResult; class FeaturePromoLifecycleUiTest : public TestBase {
diff --git a/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc b/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc index 5ed3c063..fe9227a 100644 --- a/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc
@@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ui/views/web_apps/file_handler_launch_dialog_view.h" - #include <memory> #include <string> #include <utility> @@ -22,7 +20,8 @@ #include "chrome/browser/ui/startup/startup_browser_creator.h" #include "chrome/browser/ui/startup/web_app_startup_utils.h" #include "chrome/browser/ui/test/test_browser_dialog.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/views/web_apps/file_handler_launch_dialog_view.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/test/os_integration_test_override_impl.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -57,10 +56,10 @@ // Tests for the `FileHandlerLaunchDialogView` as well as // `startup::web_app::MaybeHandleWebAppLaunch()`. As Chrome OS uses the app // service to launch PWAs, this test suite is not run there. -class FileHandlerLaunchDialogTest : public WebAppControllerBrowserTest { +class FileHandlerLaunchDialogTest : public WebAppBrowserTestBase { public: void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); test::WaitUntilReady(provider()); InstallTestWebApp(); }
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc index 1a964d70..208d70ff 100644 --- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc
@@ -53,7 +53,7 @@ #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_menu_model.h" #include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" @@ -156,19 +156,18 @@ } // namespace -class WebAppFrameToolbarBrowserTest - : public web_app::WebAppControllerBrowserTest { +class WebAppFrameToolbarBrowserTest : public web_app::WebAppBrowserTestBase { public: WebAppFrameToolbarBrowserTest() : https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {} net::EmbeddedTestServer* https_server() { return &https_server_; } - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void SetUp() override { https_server_.AddDefaultHandlers(GetChromeTestDataDir()); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } WebAppFrameToolbarTestHelper* helper() { @@ -2476,12 +2475,12 @@ provider->origin_association_manager().SetFetcherForTest( std::move(origin_association_fetcher)); - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); } void TearDownOnMainThread() override { test_origin_association_fetcher_ = nullptr; - web_app::WebAppControllerBrowserTest::TearDownOnMainThread(); + web_app::WebAppBrowserTestBase::TearDownOnMainThread(); } std::string OriginAssociationFileFromAppIdentity(const GURL& app_identity) {
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_minimal_ui_test.cc b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_minimal_ui_test.cc index 1ecd227..ee6f1ad 100644 --- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_minimal_ui_test.cc +++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_minimal_ui_test.cc
@@ -4,7 +4,7 @@ #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/frame/toolbar_button_provider.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "content/public/test/browser_test.h" @@ -13,7 +13,7 @@ namespace web_app { -class WebAppMinimalUITest : public WebAppControllerBrowserTest { +class WebAppMinimalUITest : public WebAppBrowserTestBase { public: WebAppMinimalUITest() = default;
diff --git a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_browsertest.cc b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_browsertest.cc index e5b3b65..678e203 100644 --- a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_browsertest.cc
@@ -17,7 +17,7 @@ #include "chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.h" #include "chrome/browser/ui/views/web_apps/isolated_web_apps/pref_observer.h" #include "chrome/browser/ui/views/web_apps/isolated_web_apps/test_isolated_web_app_installer_model_observer.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_dialogs.h" #include "chrome/browser/web_applications/isolated_web_apps/install_isolated_web_app_command.h" #include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_trust_checker.h" @@ -52,14 +52,14 @@ } // namespace -class IsolatedWebAppInstallerBrowserTest : public WebAppControllerBrowserTest { +class IsolatedWebAppInstallerBrowserTest : public WebAppBrowserTestBase { public: void SetUp() override { scoped_feature_list_.InitWithFeatures( {features::kIsolatedWebApps, features::kIsolatedWebAppDevMode, features::kIsolatedWebAppUnmanagedInstall}, {}); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } private: @@ -127,12 +127,12 @@ } class IsolatedWebAppInstallerDisabledBrowserTest - : public WebAppControllerBrowserTest { + : public WebAppBrowserTestBase { void SetUp() override { scoped_feature_list_.InitWithFeatures( {features::kIsolatedWebApps, features::kIsolatedWebAppDevMode}, {features::kIsolatedWebAppUnmanagedInstall}); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } private:
diff --git a/chrome/browser/ui/views/web_apps/protocol_handler_launch_dialog_browsertest.cc b/chrome/browser/ui/views/web_apps/protocol_handler_launch_dialog_browsertest.cc index 5e948b5..5ac68d9 100644 --- a/chrome/browser/ui/views/web_apps/protocol_handler_launch_dialog_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/protocol_handler_launch_dialog_browsertest.cc
@@ -12,7 +12,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/test/test_browser_dialog.h" #include "chrome/browser/ui/views/web_apps/protocol_handler_launch_dialog_view.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_dialogs.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app_install_info.h" @@ -42,8 +42,7 @@ } // namespace -class ProtocolHandlerLaunchDialogBrowserTest - : public WebAppControllerBrowserTest { +class ProtocolHandlerLaunchDialogBrowserTest : public WebAppBrowserTestBase { public: void ShowDialogAndCloseWithReason(views::Widget::ClosedReason reason, bool expected_allowed,
diff --git a/chrome/browser/ui/views/web_apps/simple_install_dialog_bubble_view_browsertest.cc b/chrome/browser/ui/views/web_apps/simple_install_dialog_bubble_view_browsertest.cc index 0a09ce4e..3eef096 100644 --- a/chrome/browser/ui/views/web_apps/simple_install_dialog_bubble_view_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/simple_install_dialog_bubble_view_browsertest.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/views/web_apps/web_app_install_dialog_coordinator.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_dialogs.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" @@ -40,7 +40,7 @@ namespace { class SimpleInstallDialogBubbleViewBrowserTest - : public WebAppControllerBrowserTest, + : public WebAppBrowserTestBase, public testing::WithParamInterface<bool> { public: SimpleInstallDialogBubbleViewBrowserTest()
diff --git a/chrome/browser/ui/views/web_apps/web_app_ash_interactive_ui_test.cc b/chrome/browser/ui/views/web_apps/web_app_ash_interactive_ui_test.cc index f43d11c..02ddf73 100644 --- a/chrome/browser/ui/views/web_apps/web_app_ash_interactive_ui_test.cc +++ b/chrome/browser/ui/views/web_apps/web_app_ash_interactive_ui_test.cc
@@ -11,14 +11,14 @@ #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_view.h" #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_menu_button.h" #include "chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/test/base/interactive_test_utils.h" #include "chrome/test/base/ui_test_utils.h" #include "chromeos/ui/frame/immersive/immersive_fullscreen_controller_test_api.h" #include "content/public/test/browser_test.h" -class WebAppAshInteractiveUITest : public web_app::WebAppControllerBrowserTest { +class WebAppAshInteractiveUITest : public web_app::WebAppBrowserTestBase { public: WebAppAshInteractiveUITest() = default; @@ -28,7 +28,7 @@ ~WebAppAshInteractiveUITest() override = default; - // web_app::WebAppControllerBrowserTest override: + // web_app::WebAppBrowserTestBase override: void SetUpOnMainThread() override { auto web_app_info = std::make_unique<web_app::WebAppInstallInfo>(); web_app_info->start_url = GURL("https://test.org");
diff --git a/chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc b/chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc index 48f097ef..cc83c1cf 100644 --- a/chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc +++ b/chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc
@@ -492,7 +492,7 @@ return base::NumberToString(base::to_underlying(site)); } -web_package::WebBundleSigner::KeyPair GetKeyPairForSite(Site site) { +web_package::WebBundleSigner::Ed25519KeyPair GetKeyPairForSite(Site site) { std::string site_id = GetSiteId(site); size_t seed_length = 32; site_id.resize(seed_length, 'a'); @@ -501,7 +501,7 @@ uint8_t public_key[ED25519_PUBLIC_KEY_LEN]; uint8_t private_key[ED25519_PRIVATE_KEY_LEN]; ED25519_keypair_from_seed(public_key, private_key, seed.data()); - return web_package::WebBundleSigner::KeyPair(public_key, private_key); + return web_package::WebBundleSigner::Ed25519KeyPair(public_key, private_key); } std::string GetFileExtension(FileExtension file_extension) { @@ -4102,7 +4102,7 @@ webapps::AppId GetAppIdForIsolatedSite(Site site) { auto parent_site = GetSiteConfiguration(site).parent_site; - web_package::WebBundleSigner::KeyPair key_pair = + web_package::WebBundleSigner::Ed25519KeyPair key_pair = GetKeyPairForSite(parent_site ? parent_site.value() : site); auto url_info = IsolatedWebAppUrlInfo::CreateFromSignedWebBundleId(
diff --git a/chrome/browser/ui/views/web_apps/web_app_tab_strip_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_tab_strip_browsertest.cc index 2a05665..03b65f7 100644 --- a/chrome/browser/ui/views/web_apps/web_app_tab_strip_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/web_app_tab_strip_browsertest.cc
@@ -30,7 +30,7 @@ #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" #include "chrome/browser/ui/web_applications/web_app_browser_controller.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_launch_utils.h" #include "chrome/browser/web_applications/manifest_update_manager.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" @@ -70,7 +70,7 @@ } // namespace namespace web_app { -class WebAppTabStripBrowserTest : public WebAppControllerBrowserTest { +class WebAppTabStripBrowserTest : public WebAppBrowserTestBase { public: WebAppTabStripBrowserTest() = default; ~WebAppTabStripBrowserTest() override = default; @@ -83,7 +83,7 @@ {}); ASSERT_TRUE(embedded_test_server()->Start()); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } struct App { @@ -1265,8 +1265,7 @@ u"Favicon only")); } -class WebAppTabStripOriginTrialBrowserTest - : public WebAppControllerBrowserTest { +class WebAppTabStripOriginTrialBrowserTest : public WebAppBrowserTestBase { public: WebAppTabStripOriginTrialBrowserTest() { feature_list_.InitWithFeatures( @@ -1275,7 +1274,7 @@ } ~WebAppTabStripOriginTrialBrowserTest() override = default; - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void SetUpCommandLine(base::CommandLine* command_line) override { // Using the test public key from docs/origin_trials_integration.md#Testing. command_line->AppendSwitchASCII( @@ -1283,7 +1282,7 @@ "dRCs+TocuKkocNKa0AtZ4awrt9XKH2SQCI6o4FY6BNA="); } void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); web_app::test::WaitUntilReady( web_app::WebAppProvider::GetForTest(browser()->profile())); }
diff --git a/chrome/browser/ui/views/web_apps/web_app_uninstall_dialog_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_uninstall_dialog_browsertest.cc index f8525ad..4966bd44 100644 --- a/chrome/browser/ui/views/web_apps/web_app_uninstall_dialog_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/web_app_uninstall_dialog_browsertest.cc
@@ -19,7 +19,7 @@ #include "chrome/browser/ui/test/test_browser_dialog.h" #include "chrome/browser/ui/views/web_apps/web_app_uninstall_dialog_view.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" #include "chrome/browser/web_applications/test/web_app_icon_test_utils.h" @@ -56,7 +56,7 @@ } // namespace class WebAppUninstallDialogViewBrowserTest - : public web_app::WebAppControllerBrowserTest { + : public web_app::WebAppBrowserTestBase { public: web_app::WebAppProvider* provider() { return web_app::WebAppProvider::GetForTest(browser()->profile());
diff --git a/chrome/browser/ui/views/web_apps/web_ui_web_app_browsertest.cc b/chrome/browser/ui/views/web_apps/web_ui_web_app_browsertest.cc index 6a6ed54..da4bcca 100644 --- a/chrome/browser/ui/views/web_apps/web_ui_web_app_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/web_ui_web_app_browsertest.cc
@@ -8,7 +8,7 @@ #include "chrome/browser/ui/views/tabs/tab_strip.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app_install_info.h" @@ -27,14 +27,14 @@ namespace web_app { -class WebUIWebAppBrowserTest : public WebAppControllerBrowserTest { +class WebUIWebAppBrowserTest : public WebAppBrowserTestBase { public: WebUIWebAppBrowserTest() = default; ~WebUIWebAppBrowserTest() override = default; void SetUp() override { ASSERT_TRUE(embedded_test_server()->Start()); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } struct App {
diff --git a/chrome/browser/ui/web_applications/app_browser_controller_browsertest.cc b/chrome/browser/ui/web_applications/app_browser_controller_browsertest.cc index af9536e..653cb581 100644 --- a/chrome/browser/ui/web_applications/app_browser_controller_browsertest.cc +++ b/chrome/browser/ui/web_applications/app_browser_controller_browsertest.cc
@@ -2,17 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/ui/web_applications/app_browser_controller.h" + #include "build/build_config.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "content/public/test/browser_test.h" #include "ui/native_theme/native_theme.h" namespace web_app { -class AppBrowserControllerBrowserTest : public WebAppControllerBrowserTest { +class AppBrowserControllerBrowserTest : public WebAppBrowserTestBase { public: AppBrowserControllerBrowserTest() = default; ~AppBrowserControllerBrowserTest() override = default;
diff --git a/chrome/browser/ui/web_applications/create_shortcut_browsertest.cc b/chrome/browser/ui/web_applications/create_shortcut_browsertest.cc index af26910..9a370b6 100644 --- a/chrome/browser/ui/web_applications/create_shortcut_browsertest.cc +++ b/chrome/browser/ui/web_applications/create_shortcut_browsertest.cc
@@ -26,7 +26,7 @@ #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_dialogs.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom-shared.h" #include "chrome/browser/web_applications/test/web_app_test_observers.h" @@ -68,7 +68,7 @@ namespace web_app { -class CreateShortcutBrowserTest : public WebAppControllerBrowserTest { +class CreateShortcutBrowserTest : public WebAppBrowserTestBase { public: webapps::AppId InstallShortcutAppForCurrentUrl(bool open_as_window = false) { SetAutoAcceptWebAppDialogForTesting(true, open_as_window);
diff --git a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks_browsertest.cc b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks_browsertest.cc index f353626..e2641f5 100644 --- a/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks_browsertest.cc +++ b/chrome/browser/ui/web_applications/diagnostics/web_app_icon_health_checks_browsertest.cc
@@ -12,7 +12,7 @@ #include "chrome/browser/apps/app_service/app_registry_cache_waiter.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_metrics.h" #include "chrome/browser/web_applications/commands/web_app_icon_diagnostic_command.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" @@ -34,7 +34,7 @@ #if !BUILDFLAG(IS_CHROMEOS_LACROS) -class WebAppIconHealthChecksBrowserTest : public WebAppControllerBrowserTest { +class WebAppIconHealthChecksBrowserTest : public WebAppBrowserTestBase { public: WebAppIconHealthChecksBrowserTest() { WebAppMetrics::DisableAutomaticIconHealthChecksForTesting(); @@ -43,7 +43,7 @@ ~WebAppIconHealthChecksBrowserTest() override = default; void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); ASSERT_TRUE(embedded_test_server()->Start()); }
diff --git a/chrome/browser/ui/web_applications/lacros_web_app_browsertest.cc b/chrome/browser/ui/web_applications/lacros_web_app_browsertest.cc index add3fbf2..e0e23504 100644 --- a/chrome/browser/ui/web_applications/lacros_web_app_browsertest.cc +++ b/chrome/browser/ui/web_applications/lacros_web_app_browsertest.cc
@@ -8,7 +8,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_id_constants.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/browser/web_applications/web_app_registrar.h" @@ -39,7 +39,7 @@ return items_future.Take(); } -using LacrosWebAppBrowserTest = WebAppControllerBrowserTest; +using LacrosWebAppBrowserTest = WebAppBrowserTestBase; // Test that for a PWA with a file handler, App info from the Shelf context menu // launches the Settings SWA. Regression test for https://crbug.com/1315958.
diff --git a/chrome/browser/ui/web_applications/lacros_web_app_shelf_browsertest.cc b/chrome/browser/ui/web_applications/lacros_web_app_shelf_browsertest.cc index 1db6d98..d7ec8a5 100644 --- a/chrome/browser/ui/web_applications/lacros_web_app_shelf_browsertest.cc +++ b/chrome/browser/ui/web_applications/lacros_web_app_shelf_browsertest.cc
@@ -53,7 +53,7 @@ namespace web_app { -class LacrosWebAppShelfBrowserTest : public WebAppControllerBrowserTest { +class LacrosWebAppShelfBrowserTest : public WebAppBrowserTestBase { public: LacrosWebAppShelfBrowserTest() = default; ~LacrosWebAppShelfBrowserTest() override = default;
diff --git a/chrome/browser/ui/web_applications/launch_web_app_browsertest.cc b/chrome/browser/ui/web_applications/launch_web_app_browsertest.cc index 3d0e825..600df47 100644 --- a/chrome/browser/ui/web_applications/launch_web_app_browsertest.cc +++ b/chrome/browser/ui/web_applications/launch_web_app_browsertest.cc
@@ -10,7 +10,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/context_menu_params.h" @@ -22,7 +22,7 @@ namespace web_app { -class LaunchWebAppBrowserTest : public WebAppControllerBrowserTest { +class LaunchWebAppBrowserTest : public WebAppBrowserTestBase { public: LaunchWebAppBrowserTest() = default; ~LaunchWebAppBrowserTest() override = default;
diff --git a/chrome/browser/ui/web_applications/pwa_mixed_content_browsertest.cc b/chrome/browser/ui/web_applications/pwa_mixed_content_browsertest.cc index 8c21af0f..bbc8cecc 100644 --- a/chrome/browser/ui/web_applications/pwa_mixed_content_browsertest.cc +++ b/chrome/browser/ui/web_applications/pwa_mixed_content_browsertest.cc
@@ -14,7 +14,7 @@ #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/ssl_test_utils.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_launch_utils.h" #include "chrome/common/chrome_features.h" #include "chrome/test/base/ui_test_utils.h" @@ -70,7 +70,7 @@ namespace web_app { -class PWAMixedContentBrowserTest : public WebAppControllerBrowserTest { +class PWAMixedContentBrowserTest : public WebAppBrowserTestBase { public: GURL GetMixedContentAppURL() { return https_server()->GetURL("app.com",
diff --git a/chrome/browser/ui/web_applications/share_to_target_browsertest.cc b/chrome/browser/ui/web_applications/share_to_target_browsertest.cc index 3077bb0..c01d616 100644 --- a/chrome/browser/ui/web_applications/share_to_target_browsertest.cc +++ b/chrome/browser/ui/web_applications/share_to_target_browsertest.cc
@@ -10,7 +10,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" @@ -67,7 +67,7 @@ namespace web_app { -class ShareToTargetBrowserTest : public WebAppControllerBrowserTest { +class ShareToTargetBrowserTest : public WebAppBrowserTestBase { public: std::string ExecuteShare(const std::string& script) { const GURL url = https_server()->GetURL("/webshare/index.html"); @@ -97,11 +97,11 @@ const webapps::AppId& app_id() const { return app_id_; } private: - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void TearDownOnMainThread() override { if (!app_id_.empty()) CloseAppWindows(app_id_); - WebAppControllerBrowserTest::TearDownOnMainThread(); + WebAppBrowserTestBase::TearDownOnMainThread(); } static void CloseAppWindows(const webapps::AppId& app_id) {
diff --git a/chrome/browser/ui/web_applications/status_bar_browsertest.cc b/chrome/browser/ui/web_applications/status_bar_browsertest.cc index 4b10ae1..eac2a11 100644 --- a/chrome/browser/ui/web_applications/status_bar_browsertest.cc +++ b/chrome/browser/ui/web_applications/status_bar_browsertest.cc
@@ -4,7 +4,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/web_app_test_utils.h" #include "content/public/test/browser_test.h" #include "net/test/embedded_test_server/embedded_test_server.h" @@ -12,7 +12,7 @@ namespace web_app { namespace { -using WebAppStatusBarTest = WebAppControllerBrowserTest; +using WebAppStatusBarTest = WebAppBrowserTestBase; IN_PROC_BROWSER_TEST_F(WebAppStatusBarTest, NoStatusBar) { NavigateViaLinkClickToURLAndWait(
diff --git a/chrome/browser/ui/web_applications/sub_apps_permissions_policy_browsertest.cc b/chrome/browser/ui/web_applications/sub_apps_permissions_policy_browsertest.cc index 8195f24..22c4120 100644 --- a/chrome/browser/ui/web_applications/sub_apps_permissions_policy_browsertest.cc +++ b/chrome/browser/ui/web_applications/sub_apps_permissions_policy_browsertest.cc
@@ -29,8 +29,8 @@ : public IsolatedWebAppBrowserTestHarness { base::ScopedTempDir scoped_temp_dir_; base::FilePath bundle_path_; - web_package::WebBundleSigner::KeyPair key_pair_ = - web_package::WebBundleSigner::KeyPair::CreateRandom(); + web_package::WebBundleSigner::Ed25519KeyPair key_pair_ = + web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom(); TestSignedWebBundle CreateBundle() const { constexpr base::StringPiece manifest =
diff --git a/chrome/browser/ui/web_applications/sub_apps_service_impl_browsertest.cc b/chrome/browser/ui/web_applications/sub_apps_service_impl_browsertest.cc index eafb539..31c8b75 100644 --- a/chrome/browser/ui/web_applications/sub_apps_service_impl_browsertest.cc +++ b/chrome/browser/ui/web_applications/sub_apps_service_impl_browsertest.cc
@@ -19,7 +19,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/sub_apps_install_dialog_controller.h" #include "chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app.h"
diff --git a/chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h b/chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h index 5fa8d7c7..1a0068e 100644 --- a/chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h +++ b/chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h
@@ -13,7 +13,7 @@ #include "base/test/scoped_feature_list.h" #include "base/threading/thread_restrictions.h" #include "base/version.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_source.h" #include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_storage_location.h" #include "chrome/browser/web_applications/web_app.h" @@ -43,7 +43,7 @@ class IsolatedWebAppUrlInfo; -class IsolatedWebAppBrowserTestHarness : public WebAppControllerBrowserTest { +class IsolatedWebAppBrowserTestHarness : public WebAppBrowserTestBase { public: IsolatedWebAppBrowserTestHarness(); IsolatedWebAppBrowserTestHarness(const IsolatedWebAppBrowserTestHarness&) =
diff --git a/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.cc b/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.cc index 5cc7be2..cebda12 100644 --- a/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.cc +++ b/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.cc
@@ -214,16 +214,16 @@ std::move(response)); })); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } void WebAppNavigationBrowserTest::SetUpInProcessBrowserTestFixture() { - WebAppControllerBrowserTest::SetUpInProcessBrowserTestFixture(); + WebAppBrowserTestBase::SetUpInProcessBrowserTestFixture(); cert_verifier_.SetUpInProcessBrowserTestFixture(); } void WebAppNavigationBrowserTest::TearDownInProcessBrowserTestFixture() { - WebAppControllerBrowserTest::TearDownInProcessBrowserTestFixture(); + WebAppBrowserTestBase::TearDownInProcessBrowserTestFixture(); cert_verifier_.TearDownInProcessBrowserTestFixture(); } @@ -237,7 +237,7 @@ } void WebAppNavigationBrowserTest::SetUpOnMainThread() { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); host_resolver()->AddRule("*", "127.0.0.1"); // By default, all SSL cert checks are valid. Can be overridden in tests. cert_verifier_.mock_cert_verifier()->set_default_result(net::OK); @@ -269,7 +269,7 @@ } #endif - WebAppControllerBrowserTest::TearDownOnMainThread(); + WebAppBrowserTestBase::TearDownOnMainThread(); } Profile* WebAppNavigationBrowserTest::profile() {
diff --git a/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.h b/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.h index 9ca3afbd..bcfbd35ab 100644 --- a/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.h +++ b/chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.h
@@ -11,7 +11,7 @@ #include "base/functional/callback_forward.h" #include "base/memory/raw_ptr.h" #include "base/test/metrics/histogram_tester.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/test/base/in_process_browser_test.h" #include "components/webapps/common/web_app_id.h" #include "content/public/test/content_mock_cert_verifier.h" @@ -29,7 +29,7 @@ namespace web_app { -class WebAppNavigationBrowserTest : public WebAppControllerBrowserTest { +class WebAppNavigationBrowserTest : public WebAppBrowserTestBase { public: enum class LinkTarget { SELF,
diff --git a/chrome/browser/ui/web_applications/web_app_badging_browsertest.cc b/chrome/browser/ui/web_applications/web_app_badging_browsertest.cc index ff37d75..c3dacde0 100644 --- a/chrome/browser/ui/web_applications/web_app_badging_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_badging_browsertest.cc
@@ -15,7 +15,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app_install_info.h" @@ -30,13 +30,13 @@ namespace web_app { -class WebAppBadgingBrowserTest : public WebAppControllerBrowserTest { +class WebAppBadgingBrowserTest : public WebAppBrowserTestBase { public: WebAppBadgingBrowserTest() : cross_origin_https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {} void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); ASSERT_TRUE(cross_origin_https_server_.Start()); ASSERT_TRUE(embedded_test_server()->Start()); @@ -122,7 +122,7 @@ badge_manager->SetDelegate(std::move(owned_delegate)); } - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void TearDownOnMainThread() override { WebAppRegistrar& registrar = provider().registrar_unsafe(); for (const auto& app_id : registrar.GetAppIds()) { @@ -132,7 +132,7 @@ .Await(); } - WebAppControllerBrowserTest::TearDownOnMainThread(); + WebAppBrowserTestBase::TearDownOnMainThread(); } void OnBadgeChanged() {
diff --git a/chrome/browser/ui/web_applications/web_app_browsertest.cc b/chrome/browser/ui/web_applications/web_app_browsertest.cc index 3a545ae..6c192e6b 100644 --- a/chrome/browser/ui/web_applications/web_app_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_browsertest.cc
@@ -58,7 +58,7 @@ #include "chrome/browser/ui/toolbar/app_menu_model.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_dialogs.h" #include "chrome/browser/ui/web_applications/web_app_launch_utils.h" #include "chrome/browser/ui/web_applications/web_app_menu_model.h" @@ -243,7 +243,7 @@ using ::base::BucketsAre; -class WebAppBrowserTest : public WebAppControllerBrowserTest { +class WebAppBrowserTest : public WebAppBrowserTestBase { public: GURL GetSecureAppURL() { return https_server()->GetURL("app.com", "/ssl/google.html");
diff --git a/chrome/browser/ui/web_applications/web_app_controller_browsertest.cc b/chrome/browser/ui/web_applications/web_app_browsertest_base.cc similarity index 83% rename from chrome/browser/ui/web_applications/web_app_controller_browsertest.cc rename to chrome/browser/ui/web_applications/web_app_browsertest_base.cc index 2b0e2a7..d697c1b 100644 --- a/chrome/browser/ui/web_applications/web_app_controller_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_browsertest_base.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/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include <string> #include <vector> @@ -59,10 +59,10 @@ namespace web_app { -WebAppControllerBrowserTest::WebAppControllerBrowserTest() - : WebAppControllerBrowserTest({}, {}) {} +WebAppBrowserTestBase::WebAppBrowserTestBase() + : WebAppBrowserTestBase({}, {}) {} -WebAppControllerBrowserTest::WebAppControllerBrowserTest( +WebAppBrowserTestBase::WebAppBrowserTestBase( const std::vector<base::test::FeatureRef>& enabled_features, const std::vector<base::test::FeatureRef>& disabled_features) // TODO(crbug.com/40874949): Fix the manifest update process by ensuring @@ -81,19 +81,19 @@ all_disabled_features); } -WebAppControllerBrowserTest::~WebAppControllerBrowserTest() = default; +WebAppBrowserTestBase::~WebAppBrowserTestBase() = default; -WebAppProvider& WebAppControllerBrowserTest::provider() { +WebAppProvider& WebAppBrowserTestBase::provider() { auto* provider = WebAppProvider::GetForTest(profile()); DCHECK(provider); return *provider; } -Profile* WebAppControllerBrowserTest::profile() { +Profile* WebAppBrowserTestBase::profile() { return browser()->profile(); } -webapps::AppId WebAppControllerBrowserTest::InstallPWA(const GURL& start_url) { +webapps::AppId WebAppBrowserTestBase::InstallPWA(const GURL& start_url) { auto web_app_info = std::make_unique<WebAppInstallInfo>(); web_app_info->start_url = start_url; web_app_info->scope = start_url.GetWithoutFilename(); @@ -102,28 +102,28 @@ return web_app::test::InstallWebApp(profile(), std::move(web_app_info)); } -webapps::AppId WebAppControllerBrowserTest::InstallWebApp( +webapps::AppId WebAppBrowserTestBase::InstallWebApp( std::unique_ptr<WebAppInstallInfo> web_app_info) { return web_app::test::InstallWebApp(profile(), std::move(web_app_info)); } -void WebAppControllerBrowserTest::UninstallWebApp( +void WebAppBrowserTestBase::UninstallWebApp( const webapps::AppId& app_id) { web_app::test::UninstallWebApp(profile(), app_id); } -Browser* WebAppControllerBrowserTest::LaunchWebAppBrowser( +Browser* WebAppBrowserTestBase::LaunchWebAppBrowser( const webapps::AppId& app_id) { return web_app::LaunchWebAppBrowser(profile(), app_id); } -Browser* WebAppControllerBrowserTest::LaunchWebAppBrowserAndWait( +Browser* WebAppBrowserTestBase::LaunchWebAppBrowserAndWait( const webapps::AppId& app_id) { return web_app::LaunchWebAppBrowserAndWait(profile(), app_id); } Browser* -WebAppControllerBrowserTest::LaunchWebAppBrowserAndAwaitInstallabilityCheck( +WebAppBrowserTestBase::LaunchWebAppBrowserAndAwaitInstallabilityCheck( const webapps::AppId& app_id) { Browser* browser = web_app::LaunchWebAppBrowserAndWait(profile(), app_id); webapps::TestAppBannerManagerDesktop::FromWebContents( @@ -132,12 +132,12 @@ return browser; } -Browser* WebAppControllerBrowserTest::LaunchBrowserForWebAppInTab( +Browser* WebAppBrowserTestBase::LaunchBrowserForWebAppInTab( const webapps::AppId& app_id) { return web_app::LaunchBrowserForWebAppInTab(profile(), app_id); } -content::WebContents* WebAppControllerBrowserTest::OpenWindow( +content::WebContents* WebAppBrowserTestBase::OpenWindow( content::WebContents* contents, const GURL& url) { content::WebContentsAddedObserver tab_added_observer; @@ -156,7 +156,7 @@ return new_contents; } -bool WebAppControllerBrowserTest::NavigateInRenderer( +bool WebAppBrowserTestBase::NavigateInRenderer( content::WebContents* contents, const GURL& url) { EXPECT_TRUE( @@ -167,7 +167,7 @@ } // static -bool WebAppControllerBrowserTest::NavigateAndAwaitInstallabilityCheck( +bool WebAppBrowserTestBase::NavigateAndAwaitInstallabilityCheck( Browser* browser, const GURL& url) { auto* manager = webapps::TestAppBannerManagerDesktop::FromWebContents( @@ -177,7 +177,7 @@ } Browser* -WebAppControllerBrowserTest::NavigateInNewWindowAndAwaitInstallabilityCheck( +WebAppBrowserTestBase::NavigateInNewWindowAndAwaitInstallabilityCheck( const GURL& url) { Browser* new_browser = Browser::Create( Browser::CreateParams(Browser::TYPE_NORMAL, profile(), true)); @@ -187,11 +187,11 @@ } std::optional<webapps::AppId> -WebAppControllerBrowserTest::FindAppWithUrlInScope(const GURL& url) { +WebAppBrowserTestBase::FindAppWithUrlInScope(const GURL& url) { return provider().registrar_unsafe().FindAppWithUrlInScope(url); } -Browser* WebAppControllerBrowserTest::OpenPopupAndWait( +Browser* WebAppBrowserTestBase::OpenPopupAndWait( Browser* browser, const GURL& url, const gfx::Size& popup_size) { @@ -219,11 +219,11 @@ } OsIntegrationTestOverrideImpl& -WebAppControllerBrowserTest::os_integration_override() { +WebAppBrowserTestBase::os_integration_override() { return faked_os_integration_.test_override(); } -content::WebContents* WebAppControllerBrowserTest::OpenApplication( +content::WebContents* WebAppBrowserTestBase::OpenApplication( const webapps::AppId& app_id) { ui_test_utils::UrlLoadObserver url_observer( provider().registrar_unsafe().GetAppStartUrl(app_id), @@ -240,41 +240,41 @@ return contents; } -GURL WebAppControllerBrowserTest::GetInstallableAppURL() { +GURL WebAppBrowserTestBase::GetInstallableAppURL() { return https_server()->GetURL("/banners/manifest_test_page.html"); } // static -const char* WebAppControllerBrowserTest::GetInstallableAppName() { +const char* WebAppBrowserTestBase::GetInstallableAppName() { return "Manifest test app"; } -void WebAppControllerBrowserTest::SetUp() { +void WebAppBrowserTestBase::SetUp() { https_server_.AddDefaultHandlers(GetChromeTestDataDir()); webapps::TestAppBannerManagerDesktop::SetUp(); InProcessBrowserTest::SetUp(); } -void WebAppControllerBrowserTest::TearDown() { +void WebAppBrowserTestBase::TearDown() { InProcessBrowserTest::TearDown(); } -void WebAppControllerBrowserTest::SetUpInProcessBrowserTestFixture() { +void WebAppBrowserTestBase::SetUpInProcessBrowserTestFixture() { InProcessBrowserTest::SetUpInProcessBrowserTestFixture(); cert_verifier_.SetUpInProcessBrowserTestFixture(); create_services_subscription_ = BrowserContextDependencyManager::GetInstance() ->RegisterCreateServicesCallbackForTesting(base::BindRepeating( - &WebAppControllerBrowserTest::OnWillCreateBrowserContextServices, + &WebAppBrowserTestBase::OnWillCreateBrowserContextServices, base::Unretained(this))); } -void WebAppControllerBrowserTest::TearDownInProcessBrowserTestFixture() { +void WebAppBrowserTestBase::TearDownInProcessBrowserTestFixture() { InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); cert_verifier_.TearDownInProcessBrowserTestFixture(); } -void WebAppControllerBrowserTest::TearDownOnMainThread() { +void WebAppBrowserTestBase::TearDownOnMainThread() { if (testing::Test::HasFailure()) { ProfileManager* profile_manager = g_browser_process->profile_manager(); base::TimeDelta log_time = base::TimeTicks::Now() - start_time_; @@ -289,14 +289,14 @@ InProcessBrowserTest::TearDownOnMainThread(); } -void WebAppControllerBrowserTest::SetUpCommandLine( +void WebAppBrowserTestBase::SetUpCommandLine( base::CommandLine* command_line) { // Browser will both run and display insecure content. command_line->AppendSwitch(switches::kAllowRunningInsecureContent); cert_verifier_.SetUpCommandLine(command_line); } -void WebAppControllerBrowserTest::SetUpOnMainThread() { +void WebAppBrowserTestBase::SetUpOnMainThread() { #if BUILDFLAG(IS_CHROMEOS_LACROS) if (!chromeos::BrowserParamsProxy::IsCrosapiDisabledForTesting()) { CHECK(IsWebAppsCrosapiEnabled());
diff --git a/chrome/browser/ui/web_applications/web_app_controller_browsertest.h b/chrome/browser/ui/web_applications/web_app_browsertest_base.h similarity index 87% rename from chrome/browser/ui/web_applications/web_app_controller_browsertest.h rename to chrome/browser/ui/web_applications/web_app_browsertest_base.h index 107b2426..dc50b22 100644 --- a/chrome/browser/ui/web_applications/web_app_controller_browsertest.h +++ b/chrome/browser/ui/web_applications/web_app_browsertest_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_UI_WEB_APPLICATIONS_WEB_APP_CONTROLLER_BROWSERTEST_H_ -#define CHROME_BROWSER_UI_WEB_APPLICATIONS_WEB_APP_CONTROLLER_BROWSERTEST_H_ +#ifndef CHROME_BROWSER_UI_WEB_APPLICATIONS_WEB_APP_BROWSERTEST_BASE_H_ +#define CHROME_BROWSER_UI_WEB_APPLICATIONS_WEB_APP_BROWSERTEST_BASE_H_ #include "base/auto_reset.h" #include "base/test/scoped_feature_list.h" @@ -40,16 +40,16 @@ // Base class for tests of user interface support for web applications. #if BUILDFLAG(IS_CHROMEOS) -class WebAppControllerBrowserTest : public ChromeOSBrowserUITest { +class WebAppBrowserTestBase : public ChromeOSBrowserUITest { #else -class WebAppControllerBrowserTest : public InProcessBrowserTest { +class WebAppBrowserTestBase : public InProcessBrowserTest { #endif public: - WebAppControllerBrowserTest(); - WebAppControllerBrowserTest(const WebAppControllerBrowserTest&) = delete; - WebAppControllerBrowserTest& operator=(const WebAppControllerBrowserTest&) = + WebAppBrowserTestBase(); + WebAppBrowserTestBase(const WebAppBrowserTestBase&) = delete; + WebAppBrowserTestBase& operator=(const WebAppBrowserTestBase&) = delete; - ~WebAppControllerBrowserTest() override = 0; + ~WebAppBrowserTestBase() override = 0; WebAppProvider& provider(); @@ -100,7 +100,7 @@ OsIntegrationTestOverrideImpl& os_integration_override(); protected: - WebAppControllerBrowserTest( + WebAppBrowserTestBase( const std::vector<base::test::FeatureRef>& enabled_features, const std::vector<base::test::FeatureRef>& disabled_features); @@ -139,4 +139,4 @@ } // namespace web_app -#endif // CHROME_BROWSER_UI_WEB_APPLICATIONS_WEB_APP_CONTROLLER_BROWSERTEST_H_ +#endif // CHROME_BROWSER_UI_WEB_APPLICATIONS_WEB_APP_BROWSERTEST_BASE_H_
diff --git a/chrome/browser/ui/web_applications/web_app_dark_mode_browsertest.cc b/chrome/browser/ui/web_applications/web_app_dark_mode_browsertest.cc index b93ce39f..83f1d51 100644 --- a/chrome/browser/ui/web_applications/web_app_dark_mode_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_dark_mode_browsertest.cc
@@ -7,7 +7,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" #include "chrome/browser/ui/web_applications/web_app_browser_controller.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/manifest_update_manager.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -25,7 +25,7 @@ namespace web_app { -class WebAppDarkModeBrowserTest : public WebAppControllerBrowserTest { +class WebAppDarkModeBrowserTest : public WebAppBrowserTestBase { public: WebAppDarkModeBrowserTest() { features_.InitAndEnableFeature(blink::features::kWebAppEnableDarkMode); @@ -121,15 +121,14 @@ blink::mojom::WebFeature::kWebAppManifestUserPreferences, 0); } -class WebAppDarkModeOriginTrialBrowserTest - : public WebAppControllerBrowserTest { +class WebAppDarkModeOriginTrialBrowserTest : public WebAppBrowserTestBase { public: WebAppDarkModeOriginTrialBrowserTest() { feature_list_.InitAndDisableFeature(blink::features::kWebAppEnableDarkMode); } ~WebAppDarkModeOriginTrialBrowserTest() override = default; - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void SetUpCommandLine(base::CommandLine* command_line) override { // Using the test public key from docs/origin_trials_integration.md#Testing. command_line->AppendSwitchASCII( @@ -137,7 +136,7 @@ "dRCs+TocuKkocNKa0AtZ4awrt9XKH2SQCI6o4FY6BNA="); } void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); web_app::test::WaitUntilReady( web_app::WebAppProvider::GetForTest(browser()->profile())); }
diff --git a/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc b/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc index 905ad51e..bc6c031 100644 --- a/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc
@@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ui/web_applications/web_app_metrics.h" - #include <bitset> #include <vector> @@ -22,7 +20,8 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" +#include "chrome/browser/ui/web_applications/web_app_metrics.h" #include "chrome/browser/web_applications/external_install_options.h" #include "chrome/browser/web_applications/externally_managed_app_manager.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" @@ -129,7 +128,7 @@ namespace web_app { -class WebAppEngagementBrowserTest : public WebAppControllerBrowserTest { +class WebAppEngagementBrowserTest : public WebAppBrowserTestBase { public: WebAppEngagementBrowserTest() = default; WebAppEngagementBrowserTest(const WebAppEngagementBrowserTest&) = delete;
diff --git a/chrome/browser/ui/web_applications/web_app_file_handling_browsertest.cc b/chrome/browser/ui/web_applications/web_app_file_handling_browsertest.cc index a896c50..9c4b5b72 100644 --- a/chrome/browser/ui/web_applications/web_app_file_handling_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_file_handling_browsertest.cc
@@ -27,7 +27,7 @@ #include "chrome/browser/ui/ui_features.h" #include "chrome/browser/ui/web_applications/test/test_server_redirect_handle.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" #include "chrome/browser/web_applications/os_integration/web_app_file_handler_manager.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -64,7 +64,7 @@ namespace web_app { -class WebAppFileHandlingTestBase : public WebAppControllerBrowserTest { +class WebAppFileHandlingTestBase : public WebAppBrowserTestBase { public: WebAppProvider* provider() { return WebAppProvider::GetForTest(profile()); } @@ -124,8 +124,7 @@ entry3.accept[0].file_extensions.insert(".csv"); web_app_info->file_handlers.push_back(std::move(entry3)); - app_id_ = - WebAppControllerBrowserTest::InstallWebApp(std::move(web_app_info)); + app_id_ = WebAppBrowserTestBase::InstallWebApp(std::move(web_app_info)); } webapps::AppId InstallAnotherFileHandlingPwa(const GURL& start_url) { @@ -142,7 +141,7 @@ entry1.accept[0].file_extensions.insert(".jpeg"); web_app_info->file_handlers.push_back(std::move(entry1)); - return WebAppControllerBrowserTest::InstallWebApp(std::move(web_app_info)); + return WebAppBrowserTestBase::InstallWebApp(std::move(web_app_info)); } protected: @@ -218,7 +217,7 @@ entry.accept[0].mime_type = "text/*"; entry.accept[0].file_extensions.insert(".txt"); web_app_info->file_handlers.push_back(std::move(entry)); - return WebAppControllerBrowserTest::InstallWebApp(std::move(web_app_info)); + return WebAppBrowserTestBase::InstallWebApp(std::move(web_app_info)); } protected: @@ -509,7 +508,7 @@ #endif class WebAppFileHandlingIconBrowserTest - : public WebAppControllerBrowserTest, + : public WebAppBrowserTestBase, public testing::WithParamInterface<bool> { public: WebAppFileHandlingIconBrowserTest() {
diff --git a/chrome/browser/ui/web_applications/web_app_guest_session_browsertest_chromeos.cc b/chrome/browser/ui/web_applications/web_app_guest_session_browsertest_chromeos.cc index dc64880..d2f4223 100644 --- a/chrome/browser/ui/web_applications/web_app_guest_session_browsertest_chromeos.cc +++ b/chrome/browser/ui/web_applications/web_app_guest_session_browsertest_chromeos.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/with_crosapi_param.h" #include "chrome/browser/web_applications/web_app_id_constants.h" #include "chrome/browser/web_applications/web_app_provider.h" @@ -30,7 +30,7 @@ namespace web_app { -class WebAppGuestSessionBrowserTest : public WebAppControllerBrowserTest, +class WebAppGuestSessionBrowserTest : public WebAppBrowserTestBase, public WithCrosapiParam { void SetUpCommandLine(base::CommandLine* command_line) override { command_line->AppendSwitch(ash::switches::kGuestSession); @@ -49,7 +49,7 @@ chrome::NewEmptyWindow(ProfileManager::GetActiveUserProfile()); SelectFirstBrowser(); } - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); VerifyLacrosStatus(); } };
diff --git a/chrome/browser/ui/web_applications/web_app_interactive_uitest.cc b/chrome/browser/ui/web_applications/web_app_interactive_uitest.cc index 29a2756..806773ce 100644 --- a/chrome/browser/ui/web_applications/web_app_interactive_uitest.cc +++ b/chrome/browser/ui/web_applications/web_app_interactive_uitest.cc
@@ -7,7 +7,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" #include "testing/gtest/include/gtest/gtest.h" @@ -26,7 +26,7 @@ constexpr const char kExampleURL[] = "http://example.org/"; } -class WebAppInteractiveUiTest : public WebAppControllerBrowserTest {}; +class WebAppInteractiveUiTest : public WebAppBrowserTestBase {}; // Disabled everywhere except ChromeOS, Mac and Windows because those are the // only platforms with functional display mocking at the moment. While a partial
diff --git a/chrome/browser/ui/web_applications/web_app_launch_handler_browsertest.cc b/chrome/browser/ui/web_applications/web_app_launch_handler_browsertest.cc index 06715b36..f726046 100644 --- a/chrome/browser/ui/web_applications/web_app_launch_handler_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_launch_handler_browsertest.cc
@@ -13,7 +13,7 @@ #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_navigator_params.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_launch_utils.h" #include "chrome/browser/web_applications/manifest_update_manager.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" @@ -47,14 +47,14 @@ using ClientMode = LaunchHandler::ClientMode; -class WebAppLaunchHandlerBrowserTest : public WebAppControllerBrowserTest { +class WebAppLaunchHandlerBrowserTest : public WebAppBrowserTestBase { public: WebAppLaunchHandlerBrowserTest() = default; ~WebAppLaunchHandlerBrowserTest() override = default; - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); ASSERT_TRUE(embedded_test_server()->Start()); web_app::test::WaitUntilReady( web_app::WebAppProvider::GetForTest(profile())); @@ -486,8 +486,7 @@ EXPECT_EQ(browser_3, browser_2); } -class WebAppLaunchHandlerDisabledBrowserTest - : public WebAppControllerBrowserTest { +class WebAppLaunchHandlerDisabledBrowserTest : public WebAppBrowserTestBase { public: WebAppLaunchHandlerDisabledBrowserTest() { feature_list_.InitWithFeatures( @@ -497,9 +496,9 @@ Profile* profile() { return browser()->profile(); } - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); ASSERT_TRUE(embedded_test_server()->Start()); web_app::test::WaitUntilReady( web_app::WebAppProvider::GetForTest(profile())); @@ -526,8 +525,7 @@ histogram_tester.ExpectTotalCount(kLaunchHandlerHistogram, 0); } -class WebAppLaunchHandlerOriginTrialBrowserTest - : public WebAppControllerBrowserTest { +class WebAppLaunchHandlerOriginTrialBrowserTest : public WebAppBrowserTestBase { public: WebAppLaunchHandlerOriginTrialBrowserTest() { feature_list_.InitAndDisableFeature( @@ -535,7 +533,7 @@ } ~WebAppLaunchHandlerOriginTrialBrowserTest() override = default; - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void SetUpCommandLine(base::CommandLine* command_line) override { // Using the test public key from docs/origin_trials_integration.md#Testing. command_line->AppendSwitchASCII( @@ -543,7 +541,7 @@ "dRCs+TocuKkocNKa0AtZ4awrt9XKH2SQCI6o4FY6BNA="); } void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); web_app::test::WaitUntilReady( web_app::WebAppProvider::GetForTest(browser()->profile())); }
diff --git a/chrome/browser/ui/web_applications/web_app_launch_prevent_close_browsertest.cc b/chrome/browser/ui/web_applications/web_app_launch_prevent_close_browsertest.cc index 092d23a..5d9be6f 100644 --- a/chrome/browser/ui/web_applications/web_app_launch_prevent_close_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_launch_prevent_close_browsertest.cc
@@ -6,7 +6,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/policy/web_app_policy_constants.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/test/web_app_test_observers.h" @@ -25,7 +25,7 @@ } // namespace -class PreventCloseControllerBrowserTest : public WebAppControllerBrowserTest { +class PreventCloseControllerBrowserTest : public WebAppBrowserTestBase { public: PreventCloseControllerBrowserTest() { BuildAndInitFeatureList(); }
diff --git a/chrome/browser/ui/web_applications/web_app_menu_model_browsertest.cc b/chrome/browser/ui/web_applications/web_app_menu_model_browsertest.cc index c5f4872..e777405 100644 --- a/chrome/browser/ui/web_applications/web_app_menu_model_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_menu_model_browsertest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/ui/web_applications/web_app_menu_model.h" + #include <algorithm> #include <vector> @@ -9,8 +11,7 @@ #include "build/chromeos_buildflags.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" -#include "chrome/browser/ui/web_applications/web_app_menu_model.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/prevent_close_test_base.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app_id_constants.h" @@ -26,10 +27,10 @@ namespace web_app { -class TestWebAppMenuModelCR2023 : public WebAppControllerBrowserTest { +class TestWebAppMenuModelCR2023 : public WebAppBrowserTestBase { public: TestWebAppMenuModelCR2023() - : WebAppControllerBrowserTest({features::kChromeRefresh2023}, {}) {} + : WebAppBrowserTestBase({features::kChromeRefresh2023}, {}) {} TestWebAppMenuModelCR2023(const TestWebAppMenuModelCR2023&) = delete; TestWebAppMenuModelCR2023& operator=(const TestWebAppMenuModelCR2023&) =
diff --git a/chrome/browser/ui/web_applications/web_app_metrics_browsertest.cc b/chrome/browser/ui/web_applications/web_app_metrics_browsertest.cc index 8fa2674..53f2d12 100644 --- a/chrome/browser/ui/web_applications/web_app_metrics_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_metrics_browsertest.cc
@@ -25,7 +25,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/daily_metrics_helper.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom-shared.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -64,7 +64,7 @@ // Tests for web app metrics recording. // Note that there are further tests of the daily metrics emitting behavior in // |DailyMetricsHelperTest|. -class WebAppMetricsBrowserTest : public WebAppControllerBrowserTest { +class WebAppMetricsBrowserTest : public WebAppBrowserTestBase { public: WebAppMetricsBrowserTest() = default; WebAppMetricsBrowserTest(const WebAppMetricsBrowserTest&) = delete; @@ -72,7 +72,7 @@ ~WebAppMetricsBrowserTest() override = default; void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); // Ignore real window activation which causes flakiness in tests. WebAppMetrics::Get(profile())->RemoveBrowserListObserverForTesting(); }
diff --git a/chrome/browser/ui/web_applications/web_app_navigate_browsertest.cc b/chrome/browser/ui/web_applications/web_app_navigate_browsertest.cc index fe49cb0..6c670d9 100644 --- a/chrome/browser/ui/web_applications/web_app_navigate_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_navigate_browsertest.cc
@@ -2,15 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/web_applications/web_app_helpers.h" - #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_navigator_params.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" +#include "chrome/browser/web_applications/web_app_helpers.h" #include "chrome/test/base/ui_test_utils.h" #include "components/webapps/common/web_app_id.h" #include "content/public/test/browser_test.h" @@ -20,7 +19,7 @@ namespace web_app { -class WebAppNavigateBrowserTest : public WebAppControllerBrowserTest { +class WebAppNavigateBrowserTest : public WebAppBrowserTestBase { public: static GURL GetGoogleURL() { return GURL("http://www.google.com/"); }
diff --git a/chrome/browser/ui/web_applications/web_app_profile_deletion_browsertest.cc b/chrome/browser/ui/web_applications/web_app_profile_deletion_browsertest.cc index 6a8f9ff..7cb8e7b 100644 --- a/chrome/browser/ui/web_applications/web_app_profile_deletion_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_profile_deletion_browsertest.cc
@@ -15,7 +15,7 @@ #include "chrome/browser/profiles/profile_metrics.h" #include "chrome/browser/profiles/profile_test_util.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/app_service/web_app_publisher_helper.h" #include "chrome/browser/web_applications/preinstalled_web_app_manager.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -43,7 +43,7 @@ namespace web_app { -class WebAppProfileDeletionBrowserTest : public WebAppControllerBrowserTest { +class WebAppProfileDeletionBrowserTest : public WebAppBrowserTestBase { public: WebAppProfileDeletionBrowserTest() : skip_preinstalled_(PreinstalledWebAppManager::SkipStartupForTesting()) {
diff --git a/chrome/browser/ui/web_applications/web_app_protocol_handling_browsertest.cc b/chrome/browser/ui/web_applications/web_app_protocol_handling_browsertest.cc index 58f5f78..6d4e9b6 100644 --- a/chrome/browser/ui/web_applications/web_app_protocol_handling_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_protocol_handling_browsertest.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" #include "chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/os_integration/web_app_protocol_handler_manager.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "components/page_load_metrics/browser/page_load_metrics_test_waiter.h"
diff --git a/chrome/browser/ui/web_applications/web_app_title_browsertest.cc b/chrome/browser/ui/web_applications/web_app_title_browsertest.cc index 9438b2b..9ecbaa5 100644 --- a/chrome/browser/ui/web_applications/web_app_title_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_title_browsertest.cc
@@ -4,7 +4,7 @@ #include "base/test/metrics/histogram_tester.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_helpers.h" #include "chrome/test/base/ui_test_utils.h" #include "components/metrics/content/subprocess_metrics_provider.h" @@ -17,7 +17,7 @@ namespace web_app { // Test app title scenarios with valid, empty and dynamic app title. -class WebAppTitleBrowserTest : public WebAppControllerBrowserTest { +class WebAppTitleBrowserTest : public WebAppBrowserTestBase { public: WebAppTitleBrowserTest() = default;
diff --git a/chrome/browser/ui/web_applications/web_app_uninstall_browsertest.cc b/chrome/browser/ui/web_applications/web_app_uninstall_browsertest.cc index eb1c223..33ed4881 100644 --- a/chrome/browser/ui/web_applications/web_app_uninstall_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_uninstall_browsertest.cc
@@ -17,7 +17,7 @@ #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/web_app_test_observers.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app_command_manager.h" @@ -37,7 +37,7 @@ namespace web_app { -class WebAppUninstallBrowserTest : public WebAppControllerBrowserTest { +class WebAppUninstallBrowserTest : public WebAppBrowserTestBase { public: GURL GetSecureAppURL() { return https_server()->GetURL("app.com", "/ssl/google.html");
diff --git a/chrome/browser/ui/web_applications/web_app_url_handling_browsertest.cc b/chrome/browser/ui/web_applications/web_app_url_handling_browsertest.cc index 0046cf5..ff0cc300 100644 --- a/chrome/browser/ui/web_applications/web_app_url_handling_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_url_handling_browsertest.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" #include "chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "components/page_load_metrics/browser/page_load_metrics_test_waiter.h"
diff --git a/chrome/browser/ui/web_applications/web_app_window_controls_overlay_browsertest.cc b/chrome/browser/ui/web_applications/web_app_window_controls_overlay_browsertest.cc index 00b8aab3..14bd679 100644 --- a/chrome/browser/ui/web_applications/web_app_window_controls_overlay_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_window_controls_overlay_browsertest.cc
@@ -7,7 +7,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" #include "chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "components/page_load_metrics/browser/page_load_metrics_test_waiter.h" #include "content/public/test/browser_test.h"
diff --git a/chrome/browser/ui/web_applications/web_share_target_browsertest.cc b/chrome/browser/ui/web_applications/web_share_target_browsertest.cc index d6be7cb25..a9ea229 100644 --- a/chrome/browser/ui/web_applications/web_share_target_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_share_target_browsertest.cc
@@ -22,7 +22,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/browser/web_applications/web_app_registrar.h" #include "chrome/test/base/ui_test_utils.h" @@ -159,7 +159,7 @@ namespace web_app { -class WebShareTargetBrowserTest : public WebAppControllerBrowserTest { +class WebShareTargetBrowserTest : public WebAppBrowserTestBase { public: GURL share_target_url() const { return embedded_test_server()->GetURL("/web_share_target/share.html"); @@ -207,7 +207,7 @@ #if BUILDFLAG(IS_CHROMEOS_LACROS) void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); // Replace the production sharesheet with a fake for testing. mojo::Remote<crosapi::mojom::Sharesheet>& remote =
diff --git a/chrome/browser/ui/webui/app_home/app_home_page_handler_browsertest.cc b/chrome/browser/ui/webui/app_home/app_home_page_handler_browsertest.cc index 2f4248f..5c659d77 100644 --- a/chrome/browser/ui/webui/app_home/app_home_page_handler_browsertest.cc +++ b/chrome/browser/ui/webui/app_home/app_home_page_handler_browsertest.cc
@@ -13,7 +13,7 @@ #include "chrome/browser/extensions/test_extension_system.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/views/create_application_shortcut_view_test_support.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/webui/app_home/app_home.mojom.h" #include "chrome/browser/ui/webui/app_home/mock_app_home_page.h" #include "chrome/browser/web_applications/os_integration/web_app_shortcut.h"
diff --git a/chrome/browser/ui/webui/ash/login/quick_start_screen_handler.cc b/chrome/browser/ui/webui/ash/login/quick_start_screen_handler.cc index 1ab114e4..fbd903b 100644 --- a/chrome/browser/ui/webui/ash/login/quick_start_screen_handler.cc +++ b/chrome/browser/ui/webui/ash/login/quick_start_screen_handler.cc
@@ -96,8 +96,12 @@ IDS_LOGIN_QUICK_START_SETUP_SUBTITLE_ACCOUNT_ONLY); builder->Add("quickStartSetupContentFooterTurnOnWifi", IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_TURN_ON_WIFI_AND_BLT); - builder->Add("quickStartSetupContentFooterFollowInstructions", - IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS); + builder->Add( + "quickStartSetupContentFooterFollowInstructionsQr", + IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_QR); + builder->Add( + "quickStartSetupContentFooterFollowInstructionsPin", + IDS_LOGIN_QUICK_START_SETUP_CONTENT_FOOTER_FOLLOW_INSTRUCTIONS_PIN); builder->Add("quickStartWifiTransferTitle", IDS_LOGIN_QUICK_START_WIFI_TRANSFER_TITLE); builder->Add("quickStartWifiTransferSubtitle",
diff --git a/chrome/browser/ui/webui/management/management_ui_pwa_browsertest.cc b/chrome/browser/ui/webui/management/management_ui_pwa_browsertest.cc index 6a73a37..cd049166 100644 --- a/chrome/browser/ui/webui/management/management_ui_pwa_browsertest.cc +++ b/chrome/browser/ui/webui/management/management_ui_pwa_browsertest.cc
@@ -9,7 +9,7 @@ #include "chrome/browser/profile_resetter/resettable_settings_snapshot.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/webui/management/management_ui.h" #include "chrome/browser/ui/webui/management/management_ui_handler.h" #include "chrome/browser/web_applications/policy/web_app_policy_constants.h" @@ -30,7 +30,7 @@ namespace { constexpr char kTestApp[] = "https://test.test/"; -class ManagementUIPWATest : public web_app::WebAppControllerBrowserTest { +class ManagementUIPWATest : public web_app::WebAppBrowserTestBase { public: ManagementUIPWATest() { BuildAndInitFeatureList(); }
diff --git a/chrome/browser/web_applications/alternative_error_page_override_info_browsertest.cc b/chrome/browser/web_applications/alternative_error_page_override_info_browsertest.cc index a1a0716b..bdb65454 100644 --- a/chrome/browser/web_applications/alternative_error_page_override_info_browsertest.cc +++ b/chrome/browser/web_applications/alternative_error_page_override_info_browsertest.cc
@@ -9,7 +9,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/web_app_icon_waiter.h" #include "chrome/browser/web_applications/test/web_app_test_utils.h" #include "chrome/browser/web_applications/web_app_provider.h" @@ -29,7 +29,7 @@ // Class to test browser error page display info. class AlternativeErrorPageOverrideInfoBrowserTest - : public web_app::WebAppControllerBrowserTest { + : public web_app::WebAppBrowserTestBase { public: AlternativeErrorPageOverrideInfoBrowserTest() { feature_list_.InitWithFeatures({blink::features::kWebAppEnableDarkMode}, @@ -63,11 +63,11 @@ private: void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); } void TearDownOnMainThread() override { - WebAppControllerBrowserTest::TearDownOnMainThread(); + WebAppBrowserTestBase::TearDownOnMainThread(); } base::test::ScopedFeatureList feature_list_;
diff --git a/chrome/browser/web_applications/app_service/lacros_web_apps_controller_browsertest.cc b/chrome/browser/web_applications/app_service/lacros_web_apps_controller_browsertest.cc index 2d0ef2bb..d57dda2 100644 --- a/chrome/browser/web_applications/app_service/lacros_web_apps_controller_browsertest.cc +++ b/chrome/browser/web_applications/app_service/lacros_web_apps_controller_browsertest.cc
@@ -46,7 +46,7 @@ #include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" #include "chrome/browser/web_applications/os_integration/web_app_file_handler_manager.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -226,7 +226,7 @@ } // namespace -class LacrosWebAppsControllerBrowserTest : public WebAppControllerBrowserTest { +class LacrosWebAppsControllerBrowserTest : public WebAppBrowserTestBase { public: LacrosWebAppsControllerBrowserTest() = default; ~LacrosWebAppsControllerBrowserTest() override = default;
diff --git a/chrome/browser/web_applications/app_service/web_app_publisher_helper_browsertest.cc b/chrome/browser/web_applications/app_service/web_app_publisher_helper_browsertest.cc index 983db6b..80797d3 100644 --- a/chrome/browser/web_applications/app_service/web_app_publisher_helper_browsertest.cc +++ b/chrome/browser/web_applications/app_service/web_app_publisher_helper_browsertest.cc
@@ -9,7 +9,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/browser/web_applications/web_app_registrar.h" @@ -123,7 +123,7 @@ } // namespace -using WebAppPublisherHelperBrowserTest = WebAppControllerBrowserTest; +using WebAppPublisherHelperBrowserTest = WebAppBrowserTestBase; IN_PROC_BROWSER_TEST_F(WebAppPublisherHelperBrowserTest, CreateIntentFilters) { ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/web_applications/app_service/web_apps_browsertest.cc b/chrome/browser/web_applications/app_service/web_apps_browsertest.cc index 37a24bd..9459888 100644 --- a/chrome/browser/web_applications/app_service/web_apps_browsertest.cc +++ b/chrome/browser/web_applications/app_service/web_apps_browsertest.cc
@@ -15,7 +15,7 @@ #include "chrome/browser/apps/app_service/launch_utils.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_launch_process.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app_provider.h" @@ -34,7 +34,7 @@ namespace web_app { -using WebAppsBrowserTest = WebAppControllerBrowserTest; +using WebAppsBrowserTest = WebAppBrowserTestBase; IN_PROC_BROWSER_TEST_F(WebAppsBrowserTest, LaunchWithIntent) { ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/web_applications/app_service/web_apps_chromeos_browsertest.cc b/chrome/browser/web_applications/app_service/web_apps_chromeos_browsertest.cc index 5acf8e88..89a964c 100644 --- a/chrome/browser/web_applications/app_service/web_apps_chromeos_browsertest.cc +++ b/chrome/browser/web_applications/app_service/web_apps_chromeos_browsertest.cc
@@ -18,7 +18,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/policy/web_app_policy_constants.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app_id_constants.h" @@ -85,7 +85,7 @@ } // namespace -using WebAppsChromeOsBrowserTest = web_app::WebAppControllerBrowserTest; +using WebAppsChromeOsBrowserTest = web_app::WebAppBrowserTestBase; IN_PROC_BROWSER_TEST_F(WebAppsChromeOsBrowserTest, ShortcutIcons) { const GURL app_url = @@ -161,7 +161,7 @@ } // namespace class WebAppsPreventCloseChromeOsBrowserTest - : public web_app::WebAppControllerBrowserTest, + : public web_app::WebAppBrowserTestBase, public ::testing::WithParamInterface<bool> { public: WebAppsPreventCloseChromeOsBrowserTest() = default;
diff --git a/chrome/browser/web_applications/commands/compute_app_size_command_browsertest.cc b/chrome/browser/web_applications/commands/compute_app_size_command_browsertest.cc index e62f4d4..3d3537f 100644 --- a/chrome/browser/web_applications/commands/compute_app_size_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/compute_app_size_command_browsertest.cc
@@ -2,12 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/web_applications/commands/compute_app_size_command.h" + #include "base/test/run_until.h" #include "base/test/test_future.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" -#include "chrome/browser/web_applications/commands/compute_app_size_command.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_command_scheduler.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/test/base/ui_test_utils.h" @@ -18,7 +19,7 @@ namespace web_app { -class ComputeAppSizeCommandBrowserTest : public WebAppControllerBrowserTest {}; +class ComputeAppSizeCommandBrowserTest : public WebAppBrowserTestBase {}; IN_PROC_BROWSER_TEST_F(ComputeAppSizeCommandBrowserTest, RetrieveWebAppSize) { ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/web_applications/commands/externally_managed_install_command_browsertest.cc b/chrome/browser/web_applications/commands/externally_managed_install_command_browsertest.cc index 3b860e2..5921f14 100644 --- a/chrome/browser/web_applications/commands/externally_managed_install_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/externally_managed_install_command_browsertest.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/commands/fetch_manifest_and_install_command.h" #include "chrome/browser/web_applications/external_install_options.h" #include "chrome/browser/web_applications/externally_managed_app_manager.h" @@ -51,7 +51,7 @@ } // namespace class ExternallyManagedInstallCommandBrowserTest - : public WebAppControllerBrowserTest { + : public WebAppBrowserTestBase { public: ExternallyManagedInstallCommandBrowserTest() = default; ExternallyManagedInstallCommandBrowserTest(
diff --git a/chrome/browser/web_applications/commands/fetch_manifest_and_install_command_browsertest.cc b/chrome/browser/web_applications/commands/fetch_manifest_and_install_command_browsertest.cc index 5913e738..fd6ccb0 100644 --- a/chrome/browser/web_applications/commands/fetch_manifest_and_install_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/fetch_manifest_and_install_command_browsertest.cc
@@ -18,7 +18,7 @@ #include "chrome/browser/ui/views/location_bar/custom_tab_bar_view.h" #include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/test/web_app_icon_test_utils.h" #include "chrome/browser/web_applications/test/web_app_test_utils.h" @@ -36,7 +36,7 @@ namespace web_app { -class FetchManifestAndInstallCommandTest : public WebAppControllerBrowserTest { +class FetchManifestAndInstallCommandTest : public WebAppBrowserTestBase { public: WebAppInstallDialogCallback CreateDialogCallback( bool accept = true,
diff --git a/chrome/browser/web_applications/commands/install_from_info_command_browsertest.cc b/chrome/browser/web_applications/commands/install_from_info_command_browsertest.cc index c853898..0ef5881 100644 --- a/chrome/browser/web_applications/commands/install_from_info_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/install_from_info_command_browsertest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "install_from_info_command.h" + #include <map> #include <memory> #include <utility> @@ -9,7 +11,7 @@ #include "base/run_loop.h" #include "base/test/bind.h" #include "base/test/metrics/histogram_tester.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" #include "chrome/browser/web_applications/test/fake_os_integration_manager.h" #include "chrome/browser/web_applications/test/web_app_icon_test_utils.h" @@ -22,13 +24,12 @@ #include "chrome/browser/web_applications/web_app_registrar.h" #include "components/webapps/browser/install_result_code.h" #include "content/public/test/browser_test.h" -#include "install_from_info_command.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkBitmap.h" namespace web_app { -class InstallFromInfoCommandTest : public WebAppControllerBrowserTest { +class InstallFromInfoCommandTest : public WebAppBrowserTestBase { public: InstallFromInfoCommandTest() { WebAppProvider::SetOsIntegrationManagerFactoryForTesting(
diff --git a/chrome/browser/web_applications/commands/install_from_sync_command_browsertest.cc b/chrome/browser/web_applications/commands/install_from_sync_command_browsertest.cc index df7eb92..d8d9a98 100644 --- a/chrome/browser/web_applications/commands/install_from_sync_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/install_from_sync_command_browsertest.cc
@@ -6,7 +6,7 @@ #include "base/task/sequenced_task_runner.h" #include "base/test/bind.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/test/web_app_icon_test_utils.h" #include "chrome/browser/web_applications/web_app_command_manager.h" @@ -27,7 +27,7 @@ namespace web_app { namespace { -class InstallFromSyncCommandTest : public WebAppControllerBrowserTest { +class InstallFromSyncCommandTest : public WebAppBrowserTestBase { public: InstallFromSyncCommandTest() = default; ~InstallFromSyncCommandTest() override = default;
diff --git a/chrome/browser/web_applications/commands/install_preloaded_verified_app_command_browsertest.cc b/chrome/browser/web_applications/commands/install_preloaded_verified_app_command_browsertest.cc index 13fd8ea..83230da 100644 --- a/chrome/browser/web_applications/commands/install_preloaded_verified_app_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/install_preloaded_verified_app_command_browsertest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/web_applications/commands/install_preloaded_verified_app_command.h" + #include <memory> #include "base/containers/flat_set.h" @@ -10,8 +12,7 @@ #include "base/test/test_future.h" #include "base/threading/thread_restrictions.h" #include "build/build_config.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" -#include "chrome/browser/web_applications/commands/install_preloaded_verified_app_command.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/os_integration_test_override_impl.h" #include "chrome/browser/web_applications/test/web_app_icon_test_utils.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -30,11 +31,10 @@ namespace web_app { -class InstallPreloadedVerifiedAppCommandTest - : public WebAppControllerBrowserTest { +class InstallPreloadedVerifiedAppCommandTest : public WebAppBrowserTestBase { public: void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); host_resolver()->AddRule("lh3.googleusercontent.com", "127.0.0.1"); host_resolver()->AddRule("fonts.gstatic.com", "127.0.0.1"); host_resolver()->AddRule("youtube.com", "127.0.0.1"); @@ -42,7 +42,7 @@ void TearDownOnMainThread() override { EXPECT_TRUE(test::UninstallAllWebApps(profile())); - WebAppControllerBrowserTest::TearDownOnMainThread(); + WebAppBrowserTestBase::TearDownOnMainThread(); } bool IsShortcutCreated(const webapps::AppId& app_id,
diff --git a/chrome/browser/web_applications/commands/launch_web_app_command_browsertest.cc b/chrome/browser/web_applications/commands/launch_web_app_command_browsertest.cc index ee476988..d3669a3 100644 --- a/chrome/browser/web_applications/commands/launch_web_app_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/launch_web_app_command_browsertest.cc
@@ -24,7 +24,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_launch_utils.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/test/web_app_test_utils.h" @@ -121,7 +121,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_LACROS) class LaunchWebAppWithFirstRunServiceBrowserTest - : public WebAppControllerBrowserTest, + : public WebAppBrowserTestBase, public testing::WithParamInterface<bool> { public: LaunchWebAppWithFirstRunServiceBrowserTest() = default; @@ -269,13 +269,13 @@ LaunchWebAppWithFirstRunServiceBrowserTest, ::testing::Values(true, false)); -class LaunchWebAppCommandTest : public WebAppControllerBrowserTest { +class LaunchWebAppCommandTest : public WebAppBrowserTestBase { public: const std::string kAppName = "TestApp"; const GURL kAppStartUrl = GURL("https://example.com"); void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); app_id_ = test::InstallDummyWebApp(profile(), kAppName, kAppStartUrl); }
diff --git a/chrome/browser/web_applications/commands/navigate_and_trigger_install_dialog_command_browsertest.cc b/chrome/browser/web_applications/commands/navigate_and_trigger_install_dialog_command_browsertest.cc index 04e92e6..51c0750d 100644 --- a/chrome/browser/web_applications/commands/navigate_and_trigger_install_dialog_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/navigate_and_trigger_install_dialog_command_browsertest.cc
@@ -6,7 +6,7 @@ #include "base/test/bind.h" #include "base/test/scoped_feature_list.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_command_scheduler.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/common/chrome_features.h" @@ -20,7 +20,7 @@ namespace web_app { class NavigateAndTriggerInstallDialogCommandTest - : public WebAppControllerBrowserTest, + : public WebAppBrowserTestBase, public testing::WithParamInterface<bool> { public: const GURL kOriginUrl = GURL("https://test.com");
diff --git a/chrome/browser/web_applications/commands/update_protocol_handler_approval_command_browsertest.cc b/chrome/browser/web_applications/commands/update_protocol_handler_approval_command_browsertest.cc index e32580b6..b8511ff68 100644 --- a/chrome/browser/web_applications/commands/update_protocol_handler_approval_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/update_protocol_handler_approval_command_browsertest.cc
@@ -7,7 +7,7 @@ #include "base/test/test_future.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/os_integration_test_override_impl.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/test/web_app_test_utils.h" @@ -35,8 +35,7 @@ // OS where protocols are registered on the OS differently compared to // other OSes where protocols are bundled into the shortcut // registration/update/unregistration flow. -class UpdateProtocolHandlerApprovalCommandTest - : public WebAppControllerBrowserTest { +class UpdateProtocolHandlerApprovalCommandTest : public WebAppBrowserTestBase { public: const GURL kTestAppUrl = GURL("https://example.com"); @@ -45,7 +44,7 @@ void TearDownOnMainThread() override { EXPECT_TRUE(test::UninstallAllWebApps(profile())); - WebAppControllerBrowserTest::TearDownOnMainThread(); + WebAppBrowserTestBase::TearDownOnMainThread(); } webapps::AppId InstallWebAppWithProtocolHandlers(
diff --git a/chrome/browser/web_applications/externally_managed_app_manager_browsertest.cc b/chrome/browser/web_applications/externally_managed_app_manager_browsertest.cc index ab5660d..fef60bd5 100644 --- a/chrome/browser/web_applications/externally_managed_app_manager_browsertest.cc +++ b/chrome/browser/web_applications/externally_managed_app_manager_browsertest.cc
@@ -15,7 +15,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/external_install_options.h" #include "chrome/browser/web_applications/externally_managed_app_registration_task.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" @@ -70,8 +70,7 @@ namespace web_app { -class ExternallyManagedAppManagerBrowserTest - : public WebAppControllerBrowserTest { +class ExternallyManagedAppManagerBrowserTest : public WebAppBrowserTestBase { public: std::unique_ptr<net::test_server::HttpResponse> SimulateRedirectHandler( const net::test_server::HttpRequest& request) { @@ -99,7 +98,7 @@ protected: void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); // Allow different origins to be handled by the embedded_test_server. host_resolver()->AddRule("*", "127.0.0.1"); test::WaitUntilWebAppProviderAndSubsystemsReady(provider());
diff --git a/chrome/browser/web_applications/isolated_web_apps/check_isolated_web_app_bundle_installability_command_unittest.cc b/chrome/browser/web_applications/isolated_web_apps/check_isolated_web_app_bundle_installability_command_unittest.cc index 5c62910..c941fc1e 100644 --- a/chrome/browser/web_applications/isolated_web_apps/check_isolated_web_app_bundle_installability_command_unittest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/check_isolated_web_app_bundle_installability_command_unittest.cc
@@ -81,7 +81,7 @@ features::kIsolatedWebApps}; data_decoder::test::InProcessDataDecoder in_process_data_decoder_; web_package::WebBundleSigner::KeyPair key_pair_ = - web_package::WebBundleSigner::KeyPair::CreateRandom(); + web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom(); }; TEST_F(CheckIsolatedWebAppBundleInstallabilityCommandTest,
diff --git a/chrome/browser/web_applications/isolated_web_apps/install_isolated_web_app_command_unittest.cc b/chrome/browser/web_applications/isolated_web_apps/install_isolated_web_app_command_unittest.cc index aead12a..57bd0be5 100644 --- a/chrome/browser/web_applications/isolated_web_apps/install_isolated_web_app_command_unittest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/install_isolated_web_app_command_unittest.cc
@@ -829,7 +829,7 @@ TEST_P(InstallIsolatedWebAppCommandBundleInstallSourceTest, InstallationFinalizedWithCorrectInstallSurface) { IsolatedWebAppBuilder builder{ManifestBuilder()}; - auto app = builder.BuildBundle(web_package::WebBundleSigner::KeyPair( + auto app = builder.BuildBundle(web_package::WebBundleSigner::Ed25519KeyPair( base::make_span(kTestPublicKey), base::make_span(kTestPrivateKey))); app->FakeInstallPageState(profile()); app->TrustSigningKey();
diff --git a/chrome/browser/web_applications/isolated_web_apps/install_isolated_web_app_from_command_line_browsertest.cc b/chrome/browser/web_applications/isolated_web_apps/install_isolated_web_app_from_command_line_browsertest.cc index 9c24c6e..f3885940b 100644 --- a/chrome/browser/web_applications/isolated_web_apps/install_isolated_web_app_from_command_line_browsertest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/install_isolated_web_app_from_command_line_browsertest.cc
@@ -45,12 +45,12 @@ using ::testing::VariantWith; class InstallIsolatedWebAppFromCommandLineBrowserTest - : public WebAppControllerBrowserTest { + : public WebAppBrowserTestBase { protected: void SetUp() override { scoped_feature_list_.InitWithFeatures( {features::kIsolatedWebApps, features::kIsolatedWebAppDevMode}, {}); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } WebAppRegistrar& GetWebAppRegistrar() {
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_apply_update_command_browsertest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_apply_update_command_browsertest.cc index 71f83fb2e..ba981255 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_apply_update_command_browsertest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_apply_update_command_browsertest.cc
@@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_apply_update_command.h" + #include <memory> #include <optional> #include <string> -#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_apply_update_command.h" - #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/test/gmock_expected_support.h" @@ -24,6 +24,7 @@ #include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "components/web_package/signed_web_bundles/signed_web_bundle_id.h" +#include "components/web_package/test_support/signed_web_bundles/web_bundle_signer.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" #include "testing/gmock/include/gmock/gmock.h" @@ -135,8 +136,9 @@ base::ScopedTempDir scoped_temp_dir_; - web_package::WebBundleSigner::KeyPair key_pair_ = - web_package::WebBundleSigner::KeyPair(kTestPublicKey, kTestPrivateKey); + web_package::WebBundleSigner::Ed25519KeyPair key_pair_ = + web_package::WebBundleSigner::Ed25519KeyPair(kTestPublicKey, + kTestPrivateKey); IsolatedWebAppUrlInfo url_info_ = IsolatedWebAppUrlInfo::CreateFromSignedWebBundleId(
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_browsertest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_browsertest.cc index 12a75354..b5257a67 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_browsertest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_browsertest.cc
@@ -31,7 +31,7 @@ #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_menu_model.h" #include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h" #include "chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.h" @@ -262,7 +262,7 @@ IN_PROC_BROWSER_TEST_F(IsolatedWebAppBrowserTest, FallsBackToOldManifestPath) { base::ScopedAllowBlockingForTesting allow_blocking; - auto key_pair = web_package::WebBundleSigner::KeyPair::CreateRandom(); + auto key_pair = web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom(); auto web_bundle_id = web_package::SignedWebBundleId::CreateForEd25519PublicKey( key_pair.public_key);
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_browsing_data_browsertest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_browsing_data_browsertest.cc index 5d99439..9177718 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_browsing_data_browsertest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_browsing_data_browsertest.cc
@@ -22,7 +22,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/commands/web_app_uninstall_command.h" #include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h" #include "chrome/browser/web_applications/isolated_web_apps/remove_isolated_web_app_data.h"
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_prepare_and_store_update_command_browsertest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_prepare_and_store_update_command_browsertest.cc index 88b4a01..6c7d14c 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_prepare_and_store_update_command_browsertest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_prepare_and_store_update_command_browsertest.cc
@@ -133,8 +133,9 @@ base::ScopedTempDir scoped_temp_dir_; - web_package::WebBundleSigner::KeyPair key_pair_ = - web_package::WebBundleSigner::KeyPair(kTestPublicKey, kTestPrivateKey); + web_package::WebBundleSigner::Ed25519KeyPair key_pair_ = + web_package::WebBundleSigner::Ed25519KeyPair(kTestPublicKey, + kTestPrivateKey); IsolatedWebAppUrlInfo url_info_ = IsolatedWebAppUrlInfo::CreateFromSignedWebBundleId(
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_prepare_and_store_update_command_unittest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_prepare_and_store_update_command_unittest.cc index ca216a1..d491944 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_prepare_and_store_update_command_unittest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_prepare_and_store_update_command_unittest.cc
@@ -193,8 +193,9 @@ data_decoder::test::InProcessDataDecoder in_process_data_decoder_; base::ScopedTempDir scoped_temp_dir_; - web_package::WebBundleSigner::KeyPair key_pair_ = - web_package::WebBundleSigner::KeyPair(kTestPublicKey, kTestPrivateKey); + web_package::WebBundleSigner::Ed25519KeyPair key_pair_ = + web_package::WebBundleSigner::Ed25519KeyPair(kTestPublicKey, + kTestPrivateKey); web_package::SignedWebBundleId web_bundle_id_ = *web_package::SignedWebBundleId::Create(kTestEd25519WebBundleId); IsolatedWebAppUrlInfo url_info_ =
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_response_reader_unittest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_response_reader_unittest.cc index bd9a38c4..1716cf4 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_response_reader_unittest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_response_reader_unittest.cc
@@ -52,8 +52,8 @@ "Hello World"); auto unsigned_bundle = builder.CreateBundle(); - web_package::WebBundleSigner::KeyPair key_pair(kTestPublicKey, - kTestPrivateKey); + web_package::WebBundleSigner::Ed25519KeyPair key_pair(kTestPublicKey, + kTestPrivateKey); auto signed_bundle = web_package::WebBundleSigner::SignBundle(unsigned_bundle, {key_pair});
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_uninstall_browsertest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_uninstall_browsertest.cc index fa923ee6..8a675ed 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_uninstall_browsertest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_uninstall_browsertest.cc
@@ -130,8 +130,9 @@ base::ScopedTempDir scoped_temp_dir_; - web_package::WebBundleSigner::KeyPair key_pair_ = - web_package::WebBundleSigner::KeyPair(kTestPublicKey, kTestPrivateKey); + web_package::WebBundleSigner::Ed25519KeyPair key_pair_ = + web_package::WebBundleSigner::Ed25519KeyPair(kTestPublicKey, + kTestPrivateKey); IsolatedWebAppUrlInfo url_info_ = IsolatedWebAppUrlInfo::CreateFromSignedWebBundleId(
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_update_manager_browsertest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_update_manager_browsertest.cc index 26f2561..70b70a0 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_update_manager_browsertest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_update_manager_browsertest.cc
@@ -134,8 +134,8 @@ iwa_server_.ServeFilesFromDirectory(temp_dir_); EXPECT_TRUE(iwa_server_.Start()); - auto key_pair = - web_package::WebBundleSigner::KeyPair(kTestPublicKey, kTestPrivateKey); + auto key_pair = web_package::WebBundleSigner::Ed25519KeyPair( + kTestPublicKey, kTestPrivateKey); auto bundle_id = web_package::SignedWebBundleId::CreateForEd25519PublicKey( key_pair.public_key); url_info_ = IsolatedWebAppUrlInfo::CreateFromSignedWebBundleId(bundle_id); @@ -331,7 +331,7 @@ // TODO(crbug.com/1479463): Session restore does not restore app windows on // Lacros. Forcing the IWA to open via the `--app-id` command line switch is -// also not viable, because `WebAppControllerBrowserTest` expects a `browser()` +// also not viable, because `WebAppBrowserTestBase` expects a `browser()` // to open before the `WebAppProvider` is ready. #if !BUILDFLAG(IS_CHROMEOS_LACROS)
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_update_manager_unittest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_update_manager_unittest.cc index b516978..35f464b 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_update_manager_unittest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_update_manager_unittest.cc
@@ -259,7 +259,7 @@ TEST_F(IsolatedWebAppUpdateManagerDevModeUpdateTest, DiscoversLocalDevModeUpdate) { - auto key_pair = web_package::WebBundleSigner::KeyPair::CreateRandom(); + auto key_pair = web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom(); TestSignedWebBundle update_bundle = TestSignedWebBundleBuilder::BuildDefault( TestSignedWebBundleBuilder::BuildOptions() .SetVersion(base::Version("2.0.0")) @@ -316,7 +316,7 @@ protected: struct IwaInfo { - IwaInfo(web_package::WebBundleSigner::KeyPair key_pair, + IwaInfo(web_package::WebBundleSigner::Ed25519KeyPair key_pair, IsolatedWebAppStorageLocation installed_location, base::Version installed_version, GURL update_manifest_url, @@ -335,7 +335,7 @@ update_app_name(std::move(update_app_name)) {} IsolatedWebAppUrlInfo url_info; - web_package::WebBundleSigner::KeyPair key_pair; + web_package::WebBundleSigner::Ed25519KeyPair key_pair; IsolatedWebAppStorageLocation installed_location; base::Version installed_version; @@ -355,20 +355,22 @@ command_scheduler->DelegateToRealImpl(); fake_provider().SetScheduler(std::move(command_scheduler)); - iwa_info1_ = IwaInfo(web_package::WebBundleSigner::KeyPair::CreateRandom(), - IwaStorageOwnedBundle{"iwa1", /*dev_mode=*/false}, - base::Version("1.0.0"), - GURL("https://example.com/update_manifest1.json"), - GURL("https://example.com/bundle1.swbn"), - base::Version("2.0.0"), "updated app 1"); + iwa_info1_ = + IwaInfo(web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom(), + IwaStorageOwnedBundle{"iwa1", /*dev_mode=*/false}, + base::Version("1.0.0"), + GURL("https://example.com/update_manifest1.json"), + GURL("https://example.com/bundle1.swbn"), + base::Version("2.0.0"), "updated app 1"); SetUpIwaInfo(*iwa_info1_); - iwa_info2_ = IwaInfo(web_package::WebBundleSigner::KeyPair::CreateRandom(), - IwaStorageOwnedBundle{"iwa2", /*dev_mode=*/false}, - base::Version("4.0.0"), - GURL("https://example.com/update_manifest2.json"), - GURL("https://example.com/bundle2.swbn"), - base::Version("7.0.0"), "updated app 2"); + iwa_info2_ = + IwaInfo(web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom(), + IwaStorageOwnedBundle{"iwa2", /*dev_mode=*/false}, + base::Version("4.0.0"), + GURL("https://example.com/update_manifest2.json"), + GURL("https://example.com/bundle2.swbn"), + base::Version("7.0.0"), "updated app 2"); SetUpIwaInfo(*iwa_info2_); SetTrustedWebBundleIdsForTesting({iwa_info1_->url_info.web_bundle_id(), @@ -411,7 +413,7 @@ TestSignedWebBundle CreateBundle( const base::Version& version, - const web_package::WebBundleSigner::KeyPair& key_pair) const { + const web_package::WebBundleSigner::Ed25519KeyPair& key_pair) const { return TestSignedWebBundleBuilder::BuildDefault( TestSignedWebBundleBuilder::BuildOptions() .SetVersion(version)
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_loader_factory_browsertest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_loader_factory_browsertest.cc index ad2a4e2..47d37c61 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_loader_factory_browsertest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_loader_factory_browsertest.cc
@@ -64,8 +64,7 @@ return text; } -class IsolatedWebAppURLLoaderFactoryBrowserTest - : public WebAppControllerBrowserTest { +class IsolatedWebAppURLLoaderFactoryBrowserTest : public WebAppBrowserTestBase { public: IsolatedWebAppURLLoaderFactoryBrowserTest() { scoped_feature_list_.InitAndEnableFeature(features::kIsolatedWebApps); @@ -74,7 +73,7 @@ protected: void TearDown() override { SetTrustedWebBundleIdsForTesting({}); - WebAppControllerBrowserTest::TearDown(); + WebAppBrowserTestBase::TearDown(); } void TrustWebBundleId() { @@ -131,8 +130,8 @@ base::FilePath SignAndWriteBundleToDisk( const std::vector<uint8_t>& unsigned_bundle) { - web_package::WebBundleSigner::KeyPair key_pair(kTestPublicKey, - kTestPrivateKey); + web_package::WebBundleSigner::Ed25519KeyPair key_pair(kTestPublicKey, + kTestPrivateKey); auto signed_bundle = web_package::WebBundleSigner::SignBundle(unsigned_bundle, {key_pair}); return WriteBundleToDisk(signed_bundle);
diff --git a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_loader_factory_unittest.cc b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_loader_factory_unittest.cc index 1e9b25d..b9e053cf 100644 --- a/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_loader_factory_unittest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_loader_factory_unittest.cc
@@ -870,8 +870,8 @@ void CreateSignedBundleAndWriteToDisk(base::FilePath web_bundle_path) { std::string base_url = relative_urls_ ? "/" : kEd25519AppOriginUrl.spec(); - web_package::WebBundleSigner::KeyPair key_pair(kTestPublicKey, - kTestPrivateKey); + web_package::WebBundleSigner::Ed25519KeyPair key_pair(kTestPublicKey, + kTestPrivateKey); bundle_ = IsolatedWebAppBuilder(ManifestBuilder().SetStartUrl(base_url))
diff --git a/chrome/browser/web_applications/isolated_web_apps/policy/isolated_web_app_policy_manager_ash_browsertest.cc b/chrome/browser/web_applications/isolated_web_apps/policy/isolated_web_app_policy_manager_ash_browsertest.cc index 5a935717..e978c4f04 100644 --- a/chrome/browser/web_applications/isolated_web_apps/policy/isolated_web_app_policy_manager_ash_browsertest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/policy/isolated_web_app_policy_manager_ash_browsertest.cc
@@ -249,8 +249,8 @@ web_app::TestSignedWebBundleBuilder::BuildDefault( TestSignedWebBundleBuilder::BuildOptions() .SetVersion(base::Version("7.0.6")) - .SetKeyPair( - web_package::WebBundleSigner::KeyPair::CreateRandom())); + .SetKeyPair(web_package::WebBundleSigner::Ed25519KeyPair:: + CreateRandom())); const web_app::TestSignedWebBundle iwa_bundle_2_ = web_app::TestSignedWebBundleBuilder::BuildDefault( TestSignedWebBundleBuilder::BuildOptions().SetVersion(
diff --git a/chrome/browser/web_applications/isolated_web_apps/policy/isolated_web_app_policy_manager_unittest.cc b/chrome/browser/web_applications/isolated_web_apps/policy/isolated_web_app_policy_manager_unittest.cc index 374fde2..a5b04d1f 100644 --- a/chrome/browser/web_applications/isolated_web_apps/policy/isolated_web_app_policy_manager_unittest.cc +++ b/chrome/browser/web_applications/isolated_web_apps/policy/isolated_web_app_policy_manager_unittest.cc
@@ -338,7 +338,7 @@ web_app::TestSignedWebBundle swbn_app2 = web_app::TestSignedWebBundleBuilder::BuildDefault( TestSignedWebBundleBuilder::BuildOptions().SetKeyPair( - web_package::WebBundleSigner::KeyPair::CreateRandom())); + web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom())); lazy_app1_id_ = swbn_app1.id; lazy_app2_id_ = swbn_app2.id;
diff --git a/chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.cc b/chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.cc index ede03c6..26d51b6 100644 --- a/chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.cc +++ b/chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.cc
@@ -145,6 +145,17 @@ return url_info; } +web_package::SignedWebBundleId CreateSignedWebBundleIdFromKeyPair( + const web_package::WebBundleSigner::KeyPair& key_pair) { + return absl::visit( + base::Overloaded{[](const web_package::WebBundleSigner::Ed25519KeyPair& + ed25519_key_pair) { + return web_package::SignedWebBundleId::CreateForEd25519PublicKey( + ed25519_key_pair.public_key); + }}, + key_pair); +} + } // namespace BundledIsolatedWebApp::BundledIsolatedWebApp( @@ -659,29 +670,29 @@ std::unique_ptr<ScopedBundledIsolatedWebApp> IsolatedWebAppBuilder::BuildBundle() { - return BuildBundle(web_package::WebBundleSigner::KeyPair::CreateRandom()); + return BuildBundle( + web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom()); } std::unique_ptr<ScopedBundledIsolatedWebApp> IsolatedWebAppBuilder::BuildBundle( const web_package::WebBundleSigner::KeyPair& key_pair) { return ScopedBundledIsolatedWebApp::Create( - web_package::SignedWebBundleId::CreateForEd25519PublicKey( - key_pair.public_key), + CreateSignedWebBundleIdFromKeyPair(key_pair), BuildInMemoryBundle(key_pair), manifest_builder_); } std::unique_ptr<BundledIsolatedWebApp> IsolatedWebAppBuilder::BuildBundle( const base::FilePath& bundle_path) { - return BuildBundle(bundle_path, - web_package::WebBundleSigner::KeyPair::CreateRandom()); + return BuildBundle( + bundle_path, + web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom()); } std::unique_ptr<BundledIsolatedWebApp> IsolatedWebAppBuilder::BuildBundle( const base::FilePath& bundle_path, const web_package::WebBundleSigner::KeyPair& key_pair) { return std::make_unique<BundledIsolatedWebApp>( - web_package::SignedWebBundleId::CreateForEd25519PublicKey( - key_pair.public_key), + CreateSignedWebBundleIdFromKeyPair(key_pair), BuildInMemoryBundle(key_pair), bundle_path, manifest_builder_); }
diff --git a/chrome/browser/web_applications/isolated_web_apps/test/test_signed_web_bundle_builder.cc b/chrome/browser/web_applications/isolated_web_apps/test/test_signed_web_bundle_builder.cc index b978ceb..bb6043e7 100644 --- a/chrome/browser/web_applications/isolated_web_apps/test/test_signed_web_bundle_builder.cc +++ b/chrome/browser/web_applications/isolated_web_apps/test/test_signed_web_bundle_builder.cc
@@ -65,13 +65,13 @@ TestSignedWebBundle::~TestSignedWebBundle() = default; TestSignedWebBundleBuilder::TestSignedWebBundleBuilder( - web_package::WebBundleSigner::KeyPair key_pair, + web_package::WebBundleSigner::Ed25519KeyPair key_pair, web_package::WebBundleSigner::ErrorsForTesting errors_for_testing) : key_pair_(key_pair), errors_for_testing_(errors_for_testing) {} TestSignedWebBundleBuilder::BuildOptions::BuildOptions() - : key_pair_(web_package::WebBundleSigner::KeyPair(kTestPublicKey, - kTestPrivateKey)), + : key_pair_(web_package::WebBundleSigner::Ed25519KeyPair(kTestPublicKey, + kTestPrivateKey)), version_(base::Version("1.0.0")), app_name_("Simple Isolated App"), errors_for_testing_({}) {}
diff --git a/chrome/browser/web_applications/isolated_web_apps/test/test_signed_web_bundle_builder.h b/chrome/browser/web_applications/isolated_web_apps/test/test_signed_web_bundle_builder.h index 3044a56..ab9d9a3 100644 --- a/chrome/browser/web_applications/isolated_web_apps/test/test_signed_web_bundle_builder.h +++ b/chrome/browser/web_applications/isolated_web_apps/test/test_signed_web_bundle_builder.h
@@ -56,8 +56,8 @@ class TestSignedWebBundleBuilder { public: explicit TestSignedWebBundleBuilder( - web_package::WebBundleSigner::KeyPair key_pair = - web_package::WebBundleSigner::KeyPair::CreateRandom(), + web_package::WebBundleSigner::Ed25519KeyPair key_pair = + web_package::WebBundleSigner::Ed25519KeyPair::CreateRandom(), web_package::WebBundleSigner::ErrorsForTesting errors_for_testing = {}); static constexpr std::string_view kTestManifestUrl = @@ -74,7 +74,8 @@ BuildOptions(BuildOptions&&); ~BuildOptions(); - BuildOptions& SetKeyPair(web_package::WebBundleSigner::KeyPair key_pair) { + BuildOptions& SetKeyPair( + web_package::WebBundleSigner::Ed25519KeyPair key_pair) { key_pair_ = std::move(key_pair); return *this; } @@ -110,7 +111,7 @@ return *this; } - web_package::WebBundleSigner::KeyPair key_pair_; + web_package::WebBundleSigner::Ed25519KeyPair key_pair_; base::Version version_; std::string app_name_; std::optional<GURL> primary_url_; @@ -146,7 +147,7 @@ BuildOptions build_options = BuildOptions()); private: - web_package::WebBundleSigner::KeyPair key_pair_; + web_package::WebBundleSigner::Ed25519KeyPair key_pair_; web_package::WebBundleSigner::ErrorsForTesting errors_for_testing_; web_package::WebBundleBuilder builder_; };
diff --git a/chrome/browser/web_applications/manifest_update_manager_browsertest.cc b/chrome/browser/web_applications/manifest_update_manager_browsertest.cc index 4752b53..54408f0c 100644 --- a/chrome/browser/web_applications/manifest_update_manager_browsertest.cc +++ b/chrome/browser/web_applications/manifest_update_manager_browsertest.cc
@@ -45,7 +45,7 @@ #include "chrome/browser/ui/web_applications/test/isolated_web_app_test_utils.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" #include "chrome/browser/ui/web_applications/web_app_browser_controller.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_dialogs.h" #include "chrome/browser/web_applications/external_install_options.h" #include "chrome/browser/web_applications/externally_managed_app_manager.h" @@ -339,7 +339,7 @@ } // namespace -class ManifestUpdateManagerBrowserTest : public WebAppControllerBrowserTest { +class ManifestUpdateManagerBrowserTest : public WebAppBrowserTestBase { public: ManifestUpdateManagerBrowserTest() : update_dialog_scope_(SetIdentityUpdateDialogActionForTesting( @@ -364,7 +364,7 @@ ASSERT_TRUE(http_server_.Start()); // Suppress globally to avoid OS hooks deployed for system web app during // WebAppProvider setup. - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } void SetUpOnMainThread() override {
diff --git a/chrome/browser/web_applications/policy/web_app_policy_manager_browsertest.cc b/chrome/browser/web_applications/policy/web_app_policy_manager_browsertest.cc index 9f1893fa..d0beb786 100644 --- a/chrome/browser/web_applications/policy/web_app_policy_manager_browsertest.cc +++ b/chrome/browser/web_applications/policy/web_app_policy_manager_browsertest.cc
@@ -14,7 +14,7 @@ #include "build/build_config.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/policy/web_app_policy_constants.h" #include "chrome/browser/web_applications/test/os_integration_test_override_impl.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" @@ -93,15 +93,15 @@ } // namespace -class WebAppPolicyManagerBrowserTest : public WebAppControllerBrowserTest { +class WebAppPolicyManagerBrowserTest : public WebAppBrowserTestBase { public: WebAppPolicyManagerBrowserTest() = default; void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); } - void TearDown() override { WebAppControllerBrowserTest::TearDown(); } + void TearDown() override { WebAppBrowserTestBase::TearDown(); } Profile* profile() { return browser()->profile(); }
diff --git a/chrome/browser/web_applications/preinstalled_web_apps_browsertest.cc b/chrome/browser/web_applications/preinstalled_web_apps_browsertest.cc index fabfd4ad..9bd0d60 100644 --- a/chrome/browser/web_applications/preinstalled_web_apps_browsertest.cc +++ b/chrome/browser/web_applications/preinstalled_web_apps_browsertest.cc
@@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" #include "chrome/browser/web_applications/preinstalled_web_apps/preinstalled_web_apps.h" #include "base/test/bind.h" @@ -10,6 +9,7 @@ #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/preinstalled_app_install_features.h" #include "chrome/browser/web_applications/preinstalled_web_app_config_utils.h" #include "chrome/browser/web_applications/preinstalled_web_app_manager.h" @@ -31,7 +31,7 @@ namespace web_app { -class PreinstalledWebAppsBrowserTest : public WebAppControllerBrowserTest, +class PreinstalledWebAppsBrowserTest : public WebAppBrowserTestBase, public WithCrosapiParam { public: PreinstalledWebAppsBrowserTest() @@ -51,7 +51,7 @@ } void SetUpDefaultCommandLine(base::CommandLine* command_line) override { - WebAppControllerBrowserTest::SetUpDefaultCommandLine(command_line); + WebAppBrowserTestBase::SetUpDefaultCommandLine(command_line); // This was added by PrepareBrowserCommandLineForTests(), re-enable default // apps as we wish to test that they get installed. @@ -67,7 +67,7 @@ chrome::NewEmptyWindow(ProfileManager::GetActiveUserProfile()); SelectFirstBrowser(); } - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); VerifyLacrosStatus(); } #endif // BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/web_applications/user_uninstalled_preinstalled_web_app_prefs_browsertest.cc b/chrome/browser/web_applications/user_uninstalled_preinstalled_web_app_prefs_browsertest.cc index 31c87b9..6a7b43b 100644 --- a/chrome/browser/web_applications/user_uninstalled_preinstalled_web_app_prefs_browsertest.cc +++ b/chrome/browser/web_applications/user_uninstalled_preinstalled_web_app_prefs_browsertest.cc
@@ -10,7 +10,7 @@ #include "base/test/metrics/user_action_tester.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/preinstalled_web_app_manager.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app.h" @@ -24,16 +24,14 @@ namespace web_app { class UserUninstalledPreinstalledWebAppPrefsBrowserTest - : public WebAppControllerBrowserTest { + : public WebAppBrowserTestBase { public: UserUninstalledPreinstalledWebAppPrefsBrowserTest() : skip_preinstalled_web_app_startup_( PreinstalledWebAppManager::SkipStartupForTesting()) {} ~UserUninstalledPreinstalledWebAppPrefsBrowserTest() override = default; - void SetUp() override { - WebAppControllerBrowserTest::SetUp(); - } + void SetUp() override { WebAppBrowserTestBase::SetUp(); } private: base::AutoReset<bool> skip_preinstalled_web_app_startup_;
diff --git a/chrome/browser/web_applications/web_app_audio_focus_browsertest.cc b/chrome/browser/web_applications/web_app_audio_focus_browsertest.cc index 8c39b51d..dfef4a3 100644 --- a/chrome/browser/web_applications/web_app_audio_focus_browsertest.cc +++ b/chrome/browser/web_applications/web_app_audio_focus_browsertest.cc
@@ -7,7 +7,7 @@ #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/web_app_tab_helper.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/web_contents.h" @@ -31,7 +31,7 @@ // WebAppAudioFocusBrowserTest test that PWAs have separate audio // focus from the rest of the browser. -class WebAppAudioFocusBrowserTest : public WebAppControllerBrowserTest { +class WebAppAudioFocusBrowserTest : public WebAppBrowserTestBase { public: WebAppAudioFocusBrowserTest() = default; ~WebAppAudioFocusBrowserTest() override = default; @@ -43,7 +43,7 @@ media_session::features::kAudioFocusSessionGrouping}, {}); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } bool IsPaused(content::WebContents* web_contents) {
diff --git a/chrome/browser/web_applications/web_app_icon_manager_browsertest.cc b/chrome/browser/web_applications/web_app_icon_manager_browsertest.cc index d03191f..b53dba5 100644 --- a/chrome/browser/web_applications/web_app_icon_manager_browsertest.cc +++ b/chrome/browser/web_applications/web_app_icon_manager_browsertest.cc
@@ -14,7 +14,7 @@ #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" #include "chrome/browser/ui/web_applications/web_app_browser_controller.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app_command_scheduler.h" @@ -36,7 +36,7 @@ namespace web_app { -class WebAppIconManagerBrowserTest : public WebAppControllerBrowserTest { +class WebAppIconManagerBrowserTest : public WebAppBrowserTestBase { public: WebAppIconManagerBrowserTest() = default; WebAppIconManagerBrowserTest(const WebAppIconManagerBrowserTest&) = delete; @@ -54,10 +54,10 @@ web_app::test::WaitUntilReady(WebAppProvider::GetForTest(profile)); } - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void SetUp() override { https_server_.AddDefaultHandlers(GetChromeTestDataDir()); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } apps::AppServiceTest& app_service_test() { return app_service_test_; }
diff --git a/chrome/browser/web_applications/web_app_internals_browsertest.cc b/chrome/browser/web_applications/web_app_internals_browsertest.cc index 7a90897..7b01941 100644 --- a/chrome/browser/web_applications/web_app_internals_browsertest.cc +++ b/chrome/browser/web_applications/web_app_internals_browsertest.cc
@@ -11,7 +11,7 @@ #include "base/test/scoped_feature_list.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/test/web_app_test_utils.h" @@ -68,7 +68,7 @@ } // namespace -class WebAppInternalsBrowserTest : public WebAppControllerBrowserTest { +class WebAppInternalsBrowserTest : public WebAppBrowserTestBase { public: WebAppInternalsBrowserTest() = default; WebAppInternalsBrowserTest(const WebAppInternalsBrowserTest&) = delete; @@ -84,12 +84,12 @@ base::Unretained(this))); ASSERT_TRUE(embedded_test_server()->Start()); - WebAppControllerBrowserTest::SetUp(); + WebAppBrowserTestBase::SetUp(); } void SetUpOnMainThread() override { test::WaitUntilReady(WebAppProvider::GetForTest(browser()->profile())); - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); } webapps::AppId InstallWebApp(const GURL& app_url) {
diff --git a/chrome/browser/web_applications/web_app_notifications_interactive_uitest.cc b/chrome/browser/web_applications/web_app_notifications_interactive_uitest.cc index 3bed68ddd..1783a1f 100644 --- a/chrome/browser/web_applications/web_app_notifications_interactive_uitest.cc +++ b/chrome/browser/web_applications/web_app_notifications_interactive_uitest.cc
@@ -9,7 +9,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/web_applications/test/os_integration_test_override_impl.h" #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/common/chrome_features.h" @@ -28,21 +28,21 @@ namespace web_app { -class WebAppNotificationsBrowserTest : public WebAppControllerBrowserTest { +class WebAppNotificationsBrowserTest : public WebAppBrowserTestBase { public: - using WebAppControllerBrowserTest::WebAppControllerBrowserTest; + using WebAppBrowserTestBase::WebAppBrowserTestBase; ~WebAppNotificationsBrowserTest() override = default; void SetUpOnMainThread() override { display_service_tester_ = std::make_unique<NotificationDisplayServiceTester>(profile()); - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); } void TearDownOnMainThread() override { display_service_tester_.reset(); - WebAppControllerBrowserTest::TearDownOnMainThread(); + WebAppBrowserTestBase::TearDownOnMainThread(); } NotificationDisplayServiceTester& display_service_tester() {
diff --git a/chrome/browser/web_applications/web_app_origin_association_manager_browsertest.cc b/chrome/browser/web_applications/web_app_origin_association_manager_browsertest.cc index 2ab035c7..b29534c 100644 --- a/chrome/browser/web_applications/web_app_origin_association_manager_browsertest.cc +++ b/chrome/browser/web_applications/web_app_origin_association_manager_browsertest.cc
@@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" #include "chrome/browser/web_applications/web_app_origin_association_manager.h" #include "base/containers/contains.h" #include "base/run_loop.h" #include "base/test/bind.h" #include "base/test/test_future.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/test/base/in_process_browser_test.h" #include "components/webapps/services/web_app_origin_association/test/test_web_app_origin_association_fetcher.h" #include "content/public/test/browser_test.h" @@ -44,7 +44,7 @@ namespace web_app { -class WebAppOriginAssociationManagerTest : public WebAppControllerBrowserTest { +class WebAppOriginAssociationManagerTest : public WebAppBrowserTestBase { public: WebAppOriginAssociationManagerTest() { manager_ = std::make_unique<WebAppOriginAssociationManager>();
diff --git a/chrome/browser/web_applications/web_app_run_on_os_login_manager_browsertest.cc b/chrome/browser/web_applications/web_app_run_on_os_login_manager_browsertest.cc index 2b4771d..b94fba3 100644 --- a/chrome/browser/web_applications/web_app_run_on_os_login_manager_browsertest.cc +++ b/chrome/browser/web_applications/web_app_run_on_os_login_manager_browsertest.cc
@@ -21,7 +21,7 @@ #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/startup/first_run_service.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" -#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h" #include "chrome/browser/ui/web_applications/web_app_run_on_os_login_notification.h" #include "chrome/browser/web_applications/policy/web_app_policy_constants.h" #include "chrome/browser/web_applications/policy/web_app_policy_manager.h" @@ -78,7 +78,7 @@ }; class WebAppRunOnOsLoginManagerBrowserTest - : public WebAppControllerBrowserTest, + : public WebAppBrowserTestBase, public NotificationDisplayService::Observer { public: WebAppRunOnOsLoginManagerBrowserTest() @@ -98,7 +98,7 @@ notification_tester_ = std::make_unique<NotificationDisplayServiceTester>( /*profile=*/profile()); mock_tracker_ = std::make_unique<MockNetworkConnectionTracker>(); - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); content::SetNetworkConnectionTrackerForTesting( /*network_connection_tracker=*/nullptr); content::SetNetworkConnectionTrackerForTesting(mock_tracker_.get());
diff --git a/chrome/browser/web_applications/web_app_scope_extensions_browsertest.cc b/chrome/browser/web_applications/web_app_scope_extensions_browsertest.cc index 0a9dbfd..2a377099 100644 --- a/chrome/browser/web_applications/web_app_scope_extensions_browsertest.cc +++ b/chrome/browser/web_applications/web_app_scope_extensions_browsertest.cc
@@ -353,7 +353,7 @@ #endif // BUILDFLAG(IS_CHROMEOS) class WebAppScopeExtensionsOriginTrialBrowserTest - : public WebAppControllerBrowserTest { + : public WebAppBrowserTestBase { public: WebAppScopeExtensionsOriginTrialBrowserTest() { feature_list_.InitAndDisableFeature( @@ -361,7 +361,7 @@ } ~WebAppScopeExtensionsOriginTrialBrowserTest() override = default; - // WebAppControllerBrowserTest: + // WebAppBrowserTestBase: void SetUpCommandLine(base::CommandLine* command_line) override { // Using the test public key from docs/origin_trials_integration.md#Testing. command_line->AppendSwitchASCII( @@ -369,7 +369,7 @@ "dRCs+TocuKkocNKa0AtZ4awrt9XKH2SQCI6o4FY6BNA="); } void SetUpOnMainThread() override { - WebAppControllerBrowserTest::SetUpOnMainThread(); + WebAppBrowserTestBase::SetUpOnMainThread(); web_app::test::WaitUntilReady( web_app::WebAppProvider::GetForTest(browser()->profile())); }
diff --git a/chrome/browser/web_applications/web_app_sync_bridge_unittest.cc b/chrome/browser/web_applications/web_app_sync_bridge_unittest.cc index a122829..2b78800d 100644 --- a/chrome/browser/web_applications/web_app_sync_bridge_unittest.cc +++ b/chrome/browser/web_applications/web_app_sync_bridge_unittest.cc
@@ -402,7 +402,7 @@ syncer::EntityChangeList sync_data_list; - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); sync_bridge().MergeFullSyncData(sync_bridge().CreateMetadataChangeList(), std::move(sync_data_list)); @@ -422,7 +422,7 @@ // The local app state is the same as the server state, so no changes should // be sent. - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); sync_bridge().MergeFullSyncData(sync_bridge().CreateMetadataChangeList(), std::move(sync_data_list)); @@ -453,7 +453,7 @@ // MergeFullSyncData below should send |expected_local_apps_to_upload| to the // processor() to upload to USS. base::RunLoop run_loop; - ON_CALL(processor(), Put(_, _, _)) + ON_CALL(processor(), Put) .WillByDefault([&](const std::string& storage_key, std::unique_ptr<syncer::EntityData> entity_data, syncer::MetadataChangeList* metadata) { @@ -495,7 +495,7 @@ ConvertAppsListToEntityChangeList(expected_apps_to_install, &sync_data_list); ConvertAppsListToEntityChangeList(local_and_server_apps, &sync_data_list); - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); base::RunLoop run_loop; // This is called after apps are installed from sync in MergeFullSyncData() @@ -556,8 +556,8 @@ MergeFullSyncData(merged_apps); syncer::EntityChangeList entity_changes; - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); SetSyncInstallCallbackFailureIfCalled(); sync_bridge().ApplyIncrementalSyncChanges( @@ -610,8 +610,8 @@ // There should be no changes sent to USS in the next // ApplyIncrementalSyncChanges() operation. - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); base::RunLoop run_loop; base::RepeatingClosure barrier_closure = @@ -691,8 +691,8 @@ // There should be no changes sent to USS in the next // ApplyIncrementalSyncChanges() operation. - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); base::RunLoop run_loop; std::vector<webapps::AppId> to_uninstall; @@ -750,8 +750,8 @@ registry[app_to_update->app_id()] = std::move(app_to_update); } - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); // No installs or uninstalls are made here, only app updates. SetSyncInstallCallbackFailureIfCalled(); @@ -789,8 +789,8 @@ &entity_changes); } - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); SetSyncInstallCallbackFailureIfCalled(); sync_bridge().ApplyIncrementalSyncChanges( @@ -845,8 +845,8 @@ apps_to_update.push_back(std::move(app_to_update)); } - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); SetSyncInstallCallbackFailureIfCalled(); sync_bridge().ApplyIncrementalSyncChanges( @@ -892,8 +892,8 @@ app_to_uninstall, syncer::EntityChange::ACTION_DELETE, &entity_changes); } - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); SetSyncInstallCallbackFailureIfCalled(); sync_bridge().ApplyIncrementalSyncChanges( @@ -923,8 +923,8 @@ Registry expected_registry; InsertAppsListIntoRegistry(&expected_registry, sync_apps); - EXPECT_CALL(processor(), Put(_, _, _)).Times(0); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Put).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); EXPECT_CALL(processor(), IsTrackingMetadata()) .WillOnce(testing::Return(false)); @@ -942,7 +942,7 @@ // Do MergeFullSyncData next. base::RunLoop run_loop; - ON_CALL(processor(), Put(_, _, _)) + ON_CALL(processor(), Put) .WillByDefault([&](const std::string& storage_key, std::unique_ptr<syncer::EntityData> entity_data, syncer::MetadataChangeList* metadata) { @@ -952,7 +952,7 @@ run_loop.Quit(); }); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); EXPECT_CALL(processor(), IsTrackingMetadata()) .WillOnce(testing::Return(true)); @@ -973,7 +973,7 @@ Registry expected_registry; InsertAppsListIntoRegistry(&expected_registry, sync_apps); - ON_CALL(processor(), Put(_, _, _)) + ON_CALL(processor(), Put) .WillByDefault([&](const std::string& storage_key, std::unique_ptr<syncer::EntityData> entity_data, syncer::MetadataChangeList* metadata) { @@ -983,7 +983,7 @@ EXPECT_TRUE(IsSyncDataEqual(*expected_app, *entity_data)); RemoveWebAppFromAppsList(&sync_apps, storage_key); }); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); EXPECT_CALL(processor(), IsTrackingMetadata()) .WillOnce(testing::Return(true)); @@ -1012,7 +1012,7 @@ database_factory().WriteRegistry(registry); StartWebAppProvider(); - ON_CALL(processor(), Put(_, _, _)) + ON_CALL(processor(), Put) .WillByDefault([&](const std::string& storage_key, std::unique_ptr<syncer::EntityData> entity_data, syncer::MetadataChangeList* metadata) { @@ -1021,7 +1021,7 @@ EXPECT_TRUE(IsSyncDataEqual(*expected_app, *entity_data)); RemoveWebAppFromAppsList(&sync_apps, storage_key); }); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); base::test::TestFuture<bool> future; { @@ -1061,9 +1061,10 @@ // Put() is called kNumApps times, since UninstallWebApp() calls Put() to // update the `is_uninstalling` field. - EXPECT_CALL(processor(), Put(_, _, _)).Times(kNumApps); - ON_CALL(processor(), Delete(_, _)) + EXPECT_CALL(processor(), Put).Times(kNumApps); + ON_CALL(processor(), Delete) .WillByDefault([&](const std::string& storage_key, + const syncer::DeletionOrigin& origin, syncer::MetadataChangeList* metadata) { EXPECT_TRUE(base::Contains(registry, storage_key)); RemoveWebAppFromAppsList(&sync_apps, storage_key); @@ -1098,7 +1099,7 @@ database_factory().WriteRegistry(registry); StartWebAppProvider(); - ON_CALL(processor(), Put(_, _, _)) + ON_CALL(processor(), Put) .WillByDefault([&](const std::string& storage_key, std::unique_ptr<syncer::EntityData> entity_data, syncer::MetadataChangeList* metadata) { @@ -1118,7 +1119,7 @@ RemoveWebAppFromAppsList(&policy_apps, storage_key); }); - EXPECT_CALL(processor(), Delete(_, _)).Times(0); + EXPECT_CALL(processor(), Delete).Times(0); base::test::TestFuture<bool> future; { @@ -1165,7 +1166,7 @@ database_factory().WriteRegistry(registry); StartWebAppProvider(); - ON_CALL(processor(), Put(_, _, _)) + ON_CALL(processor(), Put) .WillByDefault([&](const std::string& storage_key, std::unique_ptr<syncer::EntityData> entity_data, syncer::MetadataChangeList* metadata) { @@ -1173,8 +1174,9 @@ // See TODO in WebAppSyncBridge::UpdateSync. RemoveWebAppFromAppsList(&policy_and_sync_apps, storage_key); }); - ON_CALL(processor(), Delete(_, _)) + ON_CALL(processor(), Delete) .WillByDefault([&](const std::string& storage_key, + const syncer::DeletionOrigin& origin, syncer::MetadataChangeList* metadata) { ASSERT_TRUE(base::Contains(registry, storage_key)); RemoveWebAppFromAppsList(&policy_and_sync_apps, storage_key);
diff --git a/chrome/browser/webapps/installable/ml_promotion_browsertest_base.h b/chrome/browser/webapps/installable/ml_promotion_browsertest_base.h index f4ad284..be8a17b2 100644 --- a/chrome/browser/webapps/installable/ml_promotion_browsertest_base.h +++ b/chrome/browser/webapps/installable/ml_promotion_browsertest_base.h
@@ -36,7 +36,7 @@ ~MLPromotionBrowserTestBase() override; // PlatformBrowserTest override. For desktop based tests, these 2 functions - // should be in sync with the functions in WebAppControllerBrowsertest so as + // should be in sync with the functions in WebAppBrowserTestBase so as // to ensure that all dependencies are correctly handled. void SetUp() override; void SetUpOnMainThread() override;
diff --git a/chrome/build/android-arm32.pgo.txt b/chrome/build/android-arm32.pgo.txt index 37c8554..dfa617e 100644 --- a/chrome/build/android-arm32.pgo.txt +++ b/chrome/build/android-arm32.pgo.txt
@@ -1 +1 @@ -chrome-android32-main-1713247156-e21c1c6a1aad09116cec86d7ad696d195b1f1fb9-050b5f225e98d132a97d05816bf94319f003398d.profdata +chrome-android32-main-1713268743-048931e73bf31cbf7a0991a455666d372216c037-4ee71e61458c92b294f721441d2bb05b1b040d6f.profdata
diff --git a/chrome/build/lacros64.pgo.txt b/chrome/build/lacros64.pgo.txt index 42364c8c..3abb8dfa 100644 --- a/chrome/build/lacros64.pgo.txt +++ b/chrome/build/lacros64.pgo.txt
@@ -1 +1 @@ -chrome-chromeos-amd64-generic-main-1713182104-7b0b8f8deffb74e8f1a1e847266180bfb383a6f8-0e5d0d96d50610448838adcf3de2805de76cb7e1.profdata +chrome-chromeos-amd64-generic-main-1713268743-408cc56554ff5781f4491a02821a50562e0dbfcc-4ee71e61458c92b294f721441d2bb05b1b040d6f.profdata
diff --git a/chrome/build/win-arm64.pgo.txt b/chrome/build/win-arm64.pgo.txt index 238c643e..faee8d9f 100644 --- a/chrome/build/win-arm64.pgo.txt +++ b/chrome/build/win-arm64.pgo.txt
@@ -1 +1 @@ -chrome-win-arm64-main-1713247156-74fa95ddd60c5b1b34c0b8f1d3d985c18b2fe1ad-050b5f225e98d132a97d05816bf94319f003398d.profdata +chrome-win-arm64-main-1713268743-b6293bea1e4090d44f022a657e48cdc58952c816-4ee71e61458c92b294f721441d2bb05b1b040d6f.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index ec65dc3..2155b26 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1713236188-2d0952c6240f2a255998613bfc59c3da8fdab717-224f55c0f0a227b0da6c08269564115e48562fe8.profdata +chrome-win32-main-1713257844-3ec59e70989b72c996094aa0edd72794527b9ef8-9475093bc894e66e15c4f85da85fb8185757ac39.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 3b1e15e..e1200c13 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1713236188-bd3cb4bc0986851fb18963d696a924b288e7b189-224f55c0f0a227b0da6c08269564115e48562fe8.profdata +chrome-win64-main-1713257844-71aa3adc20781c9de8077cbbe437d4808b7059b4-9475093bc894e66e15c4f85da85fb8185757ac39.profdata
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 86d7a71..7aee4e8 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -1000,8 +1000,8 @@ "../browser/ui/web_applications/test/test_server_redirect_handle.h", "../browser/ui/web_applications/test/web_app_browsertest_util.cc", "../browser/ui/web_applications/test/web_app_browsertest_util.h", - "../browser/ui/web_applications/web_app_controller_browsertest.cc", - "../browser/ui/web_applications/web_app_controller_browsertest.h", + "../browser/ui/web_applications/web_app_browsertest_base.cc", + "../browser/ui/web_applications/web_app_browsertest_base.h", "../common/extensions/manifest_tests/chrome_manifest_test.cc", "../common/extensions/manifest_tests/chrome_manifest_test.h", ]
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/signin/SigninTestRule.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/signin/SigninTestRule.java index 6b1a718f..4f06120 100644 --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/signin/SigninTestRule.java +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/signin/SigninTestRule.java
@@ -21,6 +21,7 @@ import org.chromium.components.signin.base.CoreAccountId; import org.chromium.components.signin.base.CoreAccountInfo; import org.chromium.components.signin.identitymanager.ConsentLevel; +import org.chromium.components.signin.test.util.AccountCapabilitiesBuilder; import org.chromium.components.sync.SyncService; import org.chromium.content_public.browser.test.util.TestThreadUtils; @@ -174,6 +175,19 @@ return TEST_CHILD_ACCOUNT; } + /** Adds a child account, and waits for auto-signin to complete with specified capabilities. */ + public AccountInfo addChildTestAccountThenWaitForSignin(AccountCapabilitiesBuilder builder) { + assert !mIsSignedIn : "An account is already signed in!"; + TEST_CHILD_ACCOUNT.setAccountCapabilities( + builder.setIsSubjectToParentalControls(true).build()); + addAccountAndWaitForSeeding(TEST_CHILD_ACCOUNT); + + // The child will be force signed in (by SigninChecker). + // Wait for this to complete before enabling sync. + waitForSignin(TEST_CHILD_ACCOUNT); + return TEST_CHILD_ACCOUNT; + } + /** * Adds a child account, waits for auto-signin to complete, and enables sync. *
diff --git a/chrome/test/fuzzing/renderer_fuzzing/BUILD.gn b/chrome/test/fuzzing/renderer_fuzzing/BUILD.gn index f6decf8..d7fc7bd 100644 --- a/chrome/test/fuzzing/renderer_fuzzing/BUILD.gn +++ b/chrome/test/fuzzing/renderer_fuzzing/BUILD.gn
@@ -38,7 +38,7 @@ rebase_path("${target_gen_dir}/testcase.h", root_build_dir), "-c", ] - foreach(interface, blink_browser_exposed_interfaces) { + foreach(interface, context_browser_exposed_interfaces) { args += [ interface[1] ] } args += [ "-p" ] @@ -51,38 +51,45 @@ "renderer_in_process_mojolpm_fuzzer") { sources = [ "renderer_in_process_mojolpm_fuzzer.cc" ] - interfaces = blink_browser_exposed_interfaces + interfaces = context_browser_exposed_interfaces interfaces += process_browser_exposed_interfaces + _interfaces_deps = [ + "//components/metrics/public/mojom:single_sample_metrics_mojo_bindings_mojolpm", + "//components/ml/mojom:mojom_mojolpm", + "//content/common:mojo_bindings_mojolpm", + "//device/gamepad/public/mojom:mojom_mojolpm", + "//device/vr/public/mojom:vr_service_mojolpm", + "//media/capture/mojom:image_capture_mojolpm", + "//media/capture/mojom:video_capture_mojolpm", + "//media/midi:mojo_mojolpm", + "//media/mojo/mojom:mojom_mojolpm", + "//media/mojo/mojom:remoting_mojolpm", + "//services/device/public/mojom:mojom_mojolpm", + "//services/metrics/public/mojom:mojom_mojolpm", + "//services/network/public/mojom:mojom_mojolpm", + "//services/resource_coordinator/public/mojom:mojom_mojolpm", + "//services/shape_detection/public/mojom:mojom_mojolpm", + "//services/webnn/public/mojom:mojom_mojolpm", + "//third_party/blink/public/mojom:android_mojo_bindings_mojolpm", + "//third_party/blink/public/mojom:embedded_frame_sink_mojo_bindings_mojolpm", + "//third_party/blink/public/mojom:mojom_core_mojolpm", + "//third_party/blink/public/mojom:mojom_modules_mojolpm", + "//third_party/blink/public/mojom:mojom_platform_mojolpm", + "//third_party/blink/public/mojom:web_bluetooth_mojo_bindings_mojolpm", + ] + deps = [ ":renderer_in_process_mojolpm_fuzzer_generator", "//chrome/test:test_support", "//chrome/test/fuzzing:in_process_proto_fuzzer_runner", - "//components/metrics/public/mojom:single_sample_metrics_mojo_bindings_mojolpm", - "//content/common:mojo_bindings_mojolpm", "//content/test/fuzzer:mojolpm_fuzzer_support", - "//media/mojo/mojom:mojom_mojolpm", - "//services/resource_coordinator/public/mojom:mojom_mojolpm", "//testing/libfuzzer:renderer_fuzzing", "//testing/libfuzzer/proto:url_proto_converter", "//third_party/blink/public/common:storage_key_proto_converter", - "//third_party/blink/public/mojom:embedded_frame_sink_mojo_bindings_mojolpm", - "//third_party/blink/public/mojom:mojom_core_mojolpm", - "//third_party/blink/public/mojom:mojom_modules_mojolpm", - "//third_party/blink/public/mojom:mojom_platform_mojolpm", - "//third_party/blink/public/mojom:web_bluetooth_mojo_bindings_mojolpm", ] + deps += _interfaces_deps - proto_deps = [ - "//components/metrics/public/mojom:single_sample_metrics_mojo_bindings_mojolpm", - "//content/common:mojo_bindings_mojolpm", - "//media/mojo/mojom:mojom_mojolpm", - "//services/resource_coordinator/public/mojom:mojom_mojolpm", - "//third_party/blink/public/mojom:embedded_frame_sink_mojo_bindings_mojolpm", - "//third_party/blink/public/mojom:mojom_core_mojolpm", - "//third_party/blink/public/mojom:mojom_modules_mojolpm", - "//third_party/blink/public/mojom:mojom_platform_mojolpm", - "//third_party/blink/public/mojom:web_bluetooth_mojo_bindings_mojolpm", - ] + proto_deps = _interfaces_deps } }
diff --git a/chrome/test/fuzzing/renderer_fuzzing/ipc_fuzzing/mojom_interfaces.gni b/chrome/test/fuzzing/renderer_fuzzing/ipc_fuzzing/mojom_interfaces.gni index debb352..f8fe3a7 100644 --- a/chrome/test/fuzzing/renderer_fuzzing/ipc_fuzzing/mojom_interfaces.gni +++ b/chrome/test/fuzzing/renderer_fuzzing/ipc_fuzzing/mojom_interfaces.gni
@@ -3,7 +3,7 @@ # defined at https://source.chromium.org/chromium/chromium/src/+/main:content/browser/browser_interface_binders.cc;l=740;bpv=1;bpt=1 # At some point, this will be automatically generated based on what's contained # in this function. This only demonstrates how this could be done. -blink_browser_exposed_interfaces = [ +context_browser_exposed_interfaces = [ [ "//third_party/blink/public/mojom/interest_group/ad_auction_service.mojom", "blink.mojom.AdAuctionService", @@ -40,6 +40,11 @@ "Remote", ], [ + "//third_party/blink/public/mojom/broadcastchannel/broadcast_channel.mojom", + "blink.mojom.BroadcastChannelProvider", + "Remote", + ], + [ "//third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom", "blink.mojom.BrowsingTopicsDocumentService", "Remote", @@ -135,6 +140,11 @@ "Remote", ], [ + "//third_party/blink/public/mojom/blob/file_backed_blob_factory.mojom", + "blink.mojom.FileBackedBlobFactory", + "Remote", + ], + [ "//third_party/blink/public/mojom/choosers/file_chooser.mojom", "blink.mojom.FileChooser", "Remote", @@ -225,13 +235,13 @@ "Remote", ], [ - "//third_party/blink/public/mojom/frame/frame.mojom", - "blink.mojom.NonAssociatedLocalFrameHost", + "//third_party/blink/public/mojom/prerender/prerender.mojom", + "blink.mojom.NoStatePrefetchProcessor", "Remote", ], [ - "//third_party/blink/public/mojom/prerender/prerender.mojom", - "blink.mojom.NoStatePrefetchProcessor", + "//third_party/blink/public/mojom/frame/frame.mojom", + "blink.mojom.NonAssociatedLocalFrameHost", "Remote", ], [ @@ -374,6 +384,178 @@ "blink.mojom.WebUsbService", "Remote", ], + [ + "//services/device/public/mojom/battery_monitor.mojom", + "device.mojom.BatteryMonitor", + "Remote", + ], + [ + "//device/gamepad/public/mojom/gamepad.mojom", + "device.mojom.GamepadHapticsManager", + "Remote", + ], + [ + "//device/gamepad/public/mojom/gamepad.mojom", + "device.mojom.GamepadMonitor", + "Remote", + ], + + # [ + # "//services/device/public/mojom/pressure_manager.mojom", + # "device.mojom.PressureManager", + # "Remote", + # ], + [ + "//device/vr/public/mojom/vr_service.mojom", + "device.mojom.VRService", + "Remote", + ], + [ + "//services/device/public/mojom/vibration_manager.mojom", + "device.mojom.VibrationManager", + "Remote", + ], + [ + "//third_party/blink/public/mojom/handwriting/handwriting.mojom", + "handwriting.mojom.HandwritingRecognitionService", + "Remote", + ], + [ + "//media/capture/mojom/image_capture.mojom", + "media.mojom.ImageCapture", + "Remote", + ], + [ + "//media/mojo/mojom/key_system_support.mojom", + "media.mojom.KeySystemSupport", + "Remote", + ], + [ + "//media/mojo/mojom/renderer_extensions.mojom", + "media.mojom.MediaFoundationRendererNotifier", + "Remote", + ], + [ + "//media/mojo/mojom/media_metrics_provider.mojom", + "media.mojom.MediaMetricsProvider", + "Remote", + ], + [ + "//media/mojo/mojom/media_player.mojom", + "media.mojom.MediaPlayerObserverClient", + "Remote", + ], + [ + "//media/mojo/mojom/remoting.mojom", + "media.mojom.RemoterFactory", + "Remote", + ], + [ + "//media/mojo/mojom/speech_recognition.mojom", + "media.mojom.SpeechRecognitionClientBrowserInterface", + "Remote", + ], + [ + "//media/mojo/mojom/speech_recognition.mojom", + "media.mojom.SpeechRecognitionContext", + "Remote", + ], + [ + "//media/capture/mojom/video_capture.mojom", + "media.mojom.VideoCaptureHost", + "Remote", + ], + [ + "//media/mojo/mojom/video_decode_perf_history.mojom", + "media.mojom.VideoDecodePerfHistory", + "Remote", + ], + [ + "//media/mojo/mojom/webrtc_video_perf.mojom", + "media.mojom.WebrtcVideoPerfHistory", + "Remote", + ], + [ + "//media/mojo/mojom/webrtc_video_perf.mojom", + "media.mojom.WebrtcVideoPerfRecorder", + "Remote", + ], + [ + "//media/midi/midi_service.mojom", + "midi.mojom.MidiSessionProvider", + "Remote", + ], + [ + "//components/ml/mojom/ml_service.mojom", + "ml.model_loader.mojom.MLService", + "Remote", + ], + [ + "//content/common/input/input_injector.mojom", + "content.mojom.InputInjector", + "Remote", + ], + [ + "//services/network/public/mojom/mdns_responder.mojom", + "network.mojom.MdnsResponder", + "Remote", + ], + [ + "//services/network/public/mojom/p2p.mojom", + "network.mojom.P2PSocketManager", + "Remote", + ], + [ + "//services/network/public/mojom/restricted_cookie_manager.mojom", + "network.mojom.RestrictedCookieManager", + "Remote", + ], + [ + "//services/network/public/mojom/trust_tokens.mojom", + "network.mojom.TrustTokenQueryAnswerer", + "Remote", + ], + [ + "//third_party/blink/public/mojom/payments/payment_credential.mojom", + "payments.mojom.PaymentCredential", + "Remote", + ], + [ + "//third_party/blink/public/mojom/payments/payment_app.mojom", + "payments.mojom.PaymentManager", + "Remote", + ], + [ + "//third_party/blink/public/mojom/payments/payment_request.mojom", + "payments.mojom.PaymentRequest", + "Remote", + ], + [ + "//services/shape_detection/public/mojom/barcodedetection_provider.mojom", + "shape_detection.mojom.BarcodeDetectionProvider", + "Remote", + ], + [ + "//services/shape_detection/public/mojom/facedetection_provider.mojom", + "shape_detection.mojom.FaceDetectionProvider", + "Remote", + ], + [ + "//services/shape_detection/public/mojom/textdetection.mojom", + "shape_detection.mojom.TextDetection", + "Remote", + ], + [ + "//services/metrics/public/mojom/ukm_interface.mojom", + "ukm.mojom.UkmRecorderFactory", + "Remote", + ], + + #[ + # "//services/webnn/public/mojom/webnn_context_provider.mojom", + # "webnn.mojom.WebNNContextProvider", + # "Remote", + #], ] process_browser_exposed_interfaces = [
diff --git a/chromeos/ash/components/carrier_lock/carrier_lock_manager.cc b/chromeos/ash/components/carrier_lock/carrier_lock_manager.cc index 613fe94..56f4db12 100644 --- a/chromeos/ash/components/carrier_lock/carrier_lock_manager.cc +++ b/chromeos/ash/components/carrier_lock/carrier_lock_manager.cc
@@ -14,6 +14,7 @@ #include "base/strings/string_util.h" #include "base/task/single_thread_task_runner.h" #include "base/task/task_runner.h" +#include "base/types/fixed_array.h" #include "chromeos/ash/components/carrier_lock/carrier_lock.pb.h" #include "chromeos/ash/components/carrier_lock/fcm_topic_subscriber_impl.h" #include "chromeos/ash/components/carrier_lock/metrics.h" @@ -371,10 +372,10 @@ if (base::PathExists(oem_path)) { base::File file(oem_path, base::File::FLAG_OPEN | base::File::FLAG_READ); int64_t length = file.GetLength(); - std::unique_ptr<char[]> buffer(new char[length + 1]); - file.Read(0, buffer.get(), length); + base::FixedArray<char> buffer(length + 1); + file.Read(0, buffer.data(), length); buffer[length] = '\0'; - manufacturer_ = buffer.get(); + manufacturer_ = buffer.data(); } else { LOG(WARNING) << "Manufacturer name file doesn't exist!"; } @@ -383,10 +384,10 @@ if (base::PathExists(model_path)) { base::File file(model_path, base::File::FLAG_OPEN | base::File::FLAG_READ); int64_t length = file.GetLength(); - std::unique_ptr<char[]> buffer(new char[length + 1]); - file.Read(0, buffer.get(), length); + base::FixedArray<char> buffer(length + 1); + file.Read(0, buffer.data(), length); buffer[length] = '\0'; - model_ = buffer.get(); + model_ = buffer.data(); } else { LOG(WARNING) << "Model name file doesn't exist!"; }
diff --git a/chromeos/ash/components/settings/BUILD.gn b/chromeos/ash/components/settings/BUILD.gn index 3ba893a6..e047041 100644 --- a/chromeos/ash/components/settings/BUILD.gn +++ b/chromeos/ash/components/settings/BUILD.gn
@@ -12,7 +12,6 @@ "//ash/constants", "//base", "//base:i18n", - "//chromeos/ash/components/login/login_state", "//components/user_manager:common", "//google_apis", "//third_party/icu",
diff --git a/chromeos/ash/components/settings/DEPS b/chromeos/ash/components/settings/DEPS index 24b4516..a7cd02c 100644 --- a/chromeos/ash/components/settings/DEPS +++ b/chromeos/ash/components/settings/DEPS
@@ -4,7 +4,6 @@ "+ash/constants", "+base", "+build/chromeos_buildflags.h", - "+chromeos/ash/components/login/login_state", "+components/user_manager/user_type.h", "+google_apis/gaia", "+third_party/icu",
diff --git a/chromeos/ash/components/settings/system_settings_provider.cc b/chromeos/ash/components/settings/system_settings_provider.cc index 4a7995d..0f2341e 100644 --- a/chromeos/ash/components/settings/system_settings_provider.cc +++ b/chromeos/ash/components/settings/system_settings_provider.cc
@@ -11,7 +11,6 @@ #include "base/command_line.h" #include "base/time/time.h" #include "base/values.h" -#include "chromeos/ash/components/login/login_state/login_state.h" #include "chromeos/ash/components/settings/cros_settings_names.h" namespace ash {
diff --git a/chromeos/ash/components/standalone_browser/BUILD.gn b/chromeos/ash/components/standalone_browser/BUILD.gn index db56b0848..fd2944f 100644 --- a/chromeos/ash/components/standalone_browser/BUILD.gn +++ b/chromeos/ash/components/standalone_browser/BUILD.gn
@@ -24,6 +24,7 @@ deps = [ "//ash/constants:constants", "//base", + "//base/version_info", "//components/account_id", "//components/policy:generated", "//components/policy/core/common",
diff --git a/chromeos/ash/components/standalone_browser/browser_support.cc b/chromeos/ash/components/standalone_browser/browser_support.cc index a12f5ee..a14e093 100644 --- a/chromeos/ash/components/standalone_browser/browser_support.cc +++ b/chromeos/ash/components/standalone_browser/browser_support.cc
@@ -12,6 +12,7 @@ #include "base/logging.h" #include "base/metrics/histogram_functions.h" #include "base/system/sys_info.h" +#include "base/version_info/version_info.h" #include "chromeos/ash/components/standalone_browser/lacros_availability.h" #include "chromeos/ash/components/standalone_browser/migrator_util.h" #include "chromeos/ash/components/standalone_browser/standalone_browser_features.h" @@ -142,7 +143,9 @@ // static void BrowserSupport::InitializeForPrimaryUser( - const policy::PolicyMap& policy_map) { + const policy::PolicyMap& policy_map, + bool is_new_profile, + bool is_regular_profile) { // Currently, some tests rely on initializing ProfileManager a second time. // That causes this method to be called twice. Here, we take care of that // case by deallocating the old instance and allocating a new one. @@ -153,10 +156,38 @@ Shutdown(); } - auto* primary_user = user_manager::UserManager::Get()->GetPrimaryUser(); - CHECK(primary_user); + auto* user_manager = user_manager::UserManager::Get(); + auto* primary_user = user_manager->GetPrimaryUser(); + CHECK(primary_user); auto lacros_availability = GetLacrosAvailability(primary_user, policy_map); + + // TODO(hidehiko, ythjkt): Replace these conditions by UserManager's + // IsCurrentUserNew() and primary User's GetType(). + if (is_new_profile && is_regular_profile) { + // If the user is a new user, mark profile migration to Lacros as completed. + // Just before checking whether or not enabled, tweak the status for + // new session. This is the timing we need to and can check. + // - The check requires LacrosAvailability policy. + // - The check needs to be done before checking whether Lacros is enabled + // for the primary user. + // Otherwise the value of `IsLacrosEnabled()` can change after these + // services are initialized. + if (IsEnabledInternal(primary_user, lacros_availability, + /*check_migration_status=*/false)) { + // TODO(crbug.com/1277848): Once `BrowserDataMigrator` stabilises, remove + // this log message. + LOG(WARNING) << "Setting migration as completed since it is a new user."; + const std::string user_id_hash = primary_user->username_hash(); + PrefService* local_state = user_manager->GetLocalState(); + migrator_util::RecordDataVer(local_state, user_id_hash, + version_info::GetVersion()); + migrator_util::SetProfileMigrationCompletedForUser( + local_state, user_id_hash, + migrator_util::MigrationMode::kSkipForNewUser); + } + } + auto is_allowed = IsAllowedInternal(primary_user, lacros_availability); // Calls the constructor, which in turn takes care of tracking the newly
diff --git a/chromeos/ash/components/standalone_browser/browser_support.h b/chromeos/ash/components/standalone_browser/browser_support.h index 1859c716..c240f52 100644 --- a/chromeos/ash/components/standalone_browser/browser_support.h +++ b/chromeos/ash/components/standalone_browser/browser_support.h
@@ -29,7 +29,9 @@ BrowserSupport& operator=(const BrowserSupport&) = delete; // Initializes the global instance of BrowserSupport for the Primary User. - static void InitializeForPrimaryUser(const policy::PolicyMap& policy_map); + static void InitializeForPrimaryUser(const policy::PolicyMap& policy_map, + bool is_new_profile, + bool is_regular_profile); // Destroys the global instance of BrowserSupport. static void Shutdown();
diff --git a/chromeos/ash/components/sync_wifi/wifi_configuration_bridge_unittest.cc b/chromeos/ash/components/sync_wifi/wifi_configuration_bridge_unittest.cc index 50a632408b..3bc937b 100644 --- a/chromeos/ash/components/sync_wifi/wifi_configuration_bridge_unittest.cc +++ b/chromeos/ash/components/sync_wifi/wifi_configuration_bridge_unittest.cc
@@ -602,7 +602,7 @@ GenerateTestWifiSpecifics(meow_network_id(), kSyncPsk, /*timestamp=*/0); local_network_collector()->AddNetwork(meow_local); - EXPECT_CALL(*processor(), Put(_, _, _)).Times(0); + EXPECT_CALL(*processor(), Put).Times(0); std::string guid = meow_network_id().SerializeToString(); bridge()->OnNetworkCreated(guid); base::RunLoop().RunUntilIdle(); @@ -610,7 +610,7 @@ timer_factory()->FireAll(); base::RunLoop().RunUntilIdle(); - EXPECT_CALL(*processor(), Put(_, _, _)).Times(1); + EXPECT_CALL(*processor(), Put).Times(1); InitializeSyncStore(); } @@ -619,7 +619,7 @@ GenerateTestWifiSpecifics(meow_network_id(), kSyncPsk, /*timestamp=*/0); local_network_collector()->AddNetwork(meow_local); - EXPECT_CALL(*processor(), Put(_, _, _)).Times(0); + EXPECT_CALL(*processor(), Put).Times(0); std::string guid = meow_network_id().SerializeToString(); bridge()->OnNetworkCreated(guid); base::RunLoop().RunUntilIdle(); @@ -636,7 +636,7 @@ bridge()->OnNetworkUpdate(guid, &set_properties); // Only the last change for a network is synced. - EXPECT_CALL(*processor(), Put(_, _, _)).Times(1); + EXPECT_CALL(*processor(), Put).Times(1); InitializeSyncStore(); } @@ -647,7 +647,7 @@ GenerateTestWifiSpecifics(meow_network_id(), kSyncPsk, /*timestamp=*/0); std::string storage_key; - EXPECT_CALL(*processor(), Put(_, _, _)).Times(testing::Exactly(0)); + EXPECT_CALL(*processor(), Put).Times(0); std::string guid = meow_network_id().SerializeToString(); bridge()->OnNetworkCreated(guid); @@ -664,7 +664,7 @@ GenerateTestWifiSpecifics(meow_network_id(), kSyncPsk, /*timestamp=*/0); local_network_collector()->AddNetwork(meow_local); - EXPECT_CALL(*processor(), Put(_, _, _)).Times(testing::Exactly(0)); + EXPECT_CALL(*processor(), Put).Times(0); std::string guid = meow_network_id().SerializeToString(); bridge()->OnNetworkCreated(guid); @@ -684,7 +684,7 @@ local_network_collector()->AddNetwork(meow_local); std::string storage_key; - EXPECT_CALL(*processor(), Put(_, _, _)) + EXPECT_CALL(*processor(), Put) .WillOnce(testing::SaveArg<0>(&storage_key)); bridge()->OnFirstConnectionToNetwork(meow_network_id().SerializeToString()); base::RunLoop().RunUntilIdle(); @@ -700,7 +700,7 @@ local_network_collector()->AddNetwork(meow_local); std::string storage_key; - EXPECT_CALL(*processor(), Put(_, _, _)) + EXPECT_CALL(*processor(), Put) .WillOnce(testing::SaveArg<0>(&storage_key)); std::string guid = meow_network_id().SerializeToString(); base::Value::Dict set_properties; @@ -717,7 +717,7 @@ GenerateTestWifiSpecifics(meow_network_id(), kSyncPsk, /*timestamp=*/100); local_network_collector()->AddNetwork(meow_local); - EXPECT_CALL(*processor(), Put(_, _, _)).Times(testing::Exactly(0)); + EXPECT_CALL(*processor(), Put).Times(0); std::string guid = meow_network_id().SerializeToString(); base::Value::Dict set_properties; set_properties.Set(shill::kUIDataProperty, "random_change"); @@ -736,7 +736,7 @@ local_network_collector()->AddNetwork(meow_local); synced_network_updater()->set_update_in_progress(guid, true); - EXPECT_CALL(*processor(), Put(_, _, _)).Times(testing::Exactly(0)); + EXPECT_CALL(*processor(), Put).Times(0); base::Value::Dict set_properties; set_properties.Set(shill::kAutoConnectProperty, true); @@ -761,7 +761,7 @@ bridge()->OnBeforeConfigurationRemoved("service_path", guid); - EXPECT_CALL(*processor(), Delete(_, _)).Times(0); + EXPECT_CALL(*processor(), Delete).Times(0); bridge()->OnConfigurationRemoved("service_path", guid); base::RunLoop().RunUntilIdle(); } @@ -783,7 +783,7 @@ bridge()->OnBeforeConfigurationRemoved("service_path", guid); std::string storage_key; - EXPECT_CALL(*processor(), Delete(_, _)) + EXPECT_CALL(*processor(), Delete(_, _, _)) .WillOnce(testing::SaveArg<0>(&storage_key)); bridge()->OnConfigurationRemoved("service_path", guid); base::RunLoop().RunUntilIdle(); @@ -802,14 +802,14 @@ PresaveSyncedNetwork(meow_local); bridge()->OnBeforeConfigurationRemoved("service_path", guid); - EXPECT_CALL(*processor(), Delete(_, _)).Times(0); + EXPECT_CALL(*processor(), Delete).Times(0); bridge()->OnConfigurationRemoved("service_path", guid); base::RunLoop().RunUntilIdle(); timer_factory()->FireAll(); base::RunLoop().RunUntilIdle(); - EXPECT_CALL(*processor(), Delete(_, _)).Times(0); + EXPECT_CALL(*processor(), Delete).Times(0); InitializeSyncStore(); base::RunLoop().RunUntilIdle(); } @@ -825,14 +825,14 @@ PresaveSyncedNetwork(meow_local); bridge()->OnBeforeConfigurationRemoved("service_path", guid); - EXPECT_CALL(*processor(), Delete(_, _)).Times(0); + EXPECT_CALL(*processor(), Delete).Times(0); bridge()->OnConfigurationRemoved("service_path", guid); base::RunLoop().RunUntilIdle(); timer_factory()->FireAll(); base::RunLoop().RunUntilIdle(); - EXPECT_CALL(*processor(), Delete(_, _)).Times(1); + EXPECT_CALL(*processor(), Delete).Times(1); InitializeSyncStore(); base::RunLoop().RunUntilIdle(); }
diff --git a/clank b/clank index 8b6ec11..c484a2f 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit 8b6ec119f001eb5ad89d77c153fa132bd65801c0 +Subproject commit c484a2f33da87a075ba1c80976bf051a5a7d5389
diff --git a/components/autofill/content/renderer/autofill_agent.h b/components/autofill/content/renderer/autofill_agent.h index 76a25d72..01462ae 100644 --- a/components/autofill/content/renderer/autofill_agent.h +++ b/components/autofill/content/renderer/autofill_agent.h
@@ -25,6 +25,7 @@ #include "components/autofill/content/renderer/form_autofill_util.h" #include "components/autofill/content/renderer/form_tracker.h" #include "components/autofill/core/common/autofill_features.h" +#include "components/autofill/core/common/field_data_manager.h" #include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h" #include "components/autofill/core/common/unique_ids.h" #include "content/public/renderer/render_frame_observer.h" @@ -51,7 +52,6 @@ class FormCache; class PasswordAutofillAgent; class PasswordGenerationAgent; -class FieldDataManager; // AutofillAgent deals with Autofill related communications between Blink and // the browser.
diff --git a/components/autofill/core/browser/data_model/address_unittest.cc b/components/autofill/core/browser/data_model/address_unittest.cc index 30759cd..6faff2f 100644 --- a/components/autofill/core/browser/data_model/address_unittest.cc +++ b/components/autofill/core/browser/data_model/address_unittest.cc
@@ -40,6 +40,7 @@ features::kAutofillUseDEAddressModel, features::kAutofillUseINAddressModel, features::kAutofillUseMXAddressModel, + features::kAutofillUsePLAddressModel, features::kAutofillUseI18nAddressModel, }, {});
diff --git a/components/autofill/core/browser/data_model/autofill_i18n_api.cc b/components/autofill/core/browser/data_model/autofill_i18n_api.cc index 1bbef8c..048a86c 100644 --- a/components/autofill/core/browser/data_model/autofill_i18n_api.cc +++ b/components/autofill/core/browser/data_model/autofill_i18n_api.cc
@@ -400,6 +400,11 @@ return false; } + if (country_code == AddressCountryCode("PL") && + !base::FeatureList::IsEnabled(features::kAutofillUsePLAddressModel)) { + return false; + } + return kAutofillModelRules.find(country_code.value()) != kAutofillModelRules.end(); }
diff --git a/components/autofill/core/browser/data_model/autofill_i18n_api_unittest.cc b/components/autofill/core/browser/data_model/autofill_i18n_api_unittest.cc index 3c306c5..3bfe9008 100644 --- a/components/autofill/core/browser/data_model/autofill_i18n_api_unittest.cc +++ b/components/autofill/core/browser/data_model/autofill_i18n_api_unittest.cc
@@ -56,6 +56,7 @@ features::kAutofillUseDEAddressModel, features::kAutofillUseINAddressModel, features::kAutofillUseMXAddressModel, + features::kAutofillUsePLAddressModel, }, {}); }
diff --git a/components/autofill/core/browser/data_model/autofill_i18n_formatting_expressions.h b/components/autofill/core/browser/data_model/autofill_i18n_formatting_expressions.h index 3339968..c4f2699 100644 --- a/components/autofill/core/browser/data_model/autofill_i18n_formatting_expressions.h +++ b/components/autofill/core/browser/data_model/autofill_i18n_formatting_expressions.h
@@ -49,6 +49,11 @@ {{"MX", ADDRESS_HOME_OVERFLOW}, u"${ADDRESS_HOME_BETWEEN_STREETS_OR_LANDMARK;;}"}, {{"MX", ADDRESS_HOME_BETWEEN_STREETS_OR_LANDMARK}, u"${ADDRESS_HOME_BETWEEN_STREETS;Entre Calles ;}\n${ADDRESS_HOME_LANDMARK;;}"}, {{"MX", ADDRESS_HOME_BETWEEN_STREETS}, u"${ADDRESS_HOME_BETWEEN_STREETS_1;;} y ${ADDRESS_HOME_BETWEEN_STREETS_2;;}"}, + {{"PL", ADDRESS_HOME_ADDRESS}, u"${ADDRESS_HOME_STREET_ADDRESS;;}\n${ADDRESS_HOME_ZIP;;} ${ADDRESS_HOME_CITY;;}"}, + {{"PL", ADDRESS_HOME_STREET_ADDRESS}, u"${ADDRESS_HOME_STREET_LOCATION;;}"}, + {{"PL", ADDRESS_HOME_STREET_LOCATION}, u"${ADDRESS_HOME_STREET_NAME;;} ${ADDRESS_HOME_HOUSE_NUMBER_AND_APT;;}"}, + {{"PL", ADDRESS_HOME_HOUSE_NUMBER_AND_APT}, u"${ADDRESS_HOME_HOUSE_NUMBER;;}/${ADDRESS_HOME_APT;;}"}, + {{"PL", ADDRESS_HOME_APT}, u"${ADDRESS_HOME_APT_TYPE;;} ${ADDRESS_HOME_APT_NUM;;}"}, {{"US", ADDRESS_HOME_ADDRESS}, u"${ADDRESS_HOME_STREET_ADDRESS;;}\n${ADDRESS_HOME_CITY;;}, ${ADDRESS_HOME_STATE;;} ${ADDRESS_HOME_ZIP;;}"}, {{"XX", ADDRESS_HOME_ADDRESS}, u"${ADDRESS_HOME_STREET_ADDRESS;;}\n${ADDRESS_HOME_CITY;;} ${ADDRESS_HOME_DEPENDENT_LOCALITY;;}, ${ADDRESS_HOME_STATE;;} ${ADDRESS_HOME_ADMIN_LEVEL2;;} ${ADDRESS_HOME_ZIP;;}"}, {{"XX", ADDRESS_HOME_STREET_ADDRESS}, u"${ADDRESS_HOME_STREET_LOCATION;;}\n${ADDRESS_HOME_SUBPREMISE;;}"},
diff --git a/components/autofill/core/browser/data_model/autofill_i18n_hierarchies.h b/components/autofill/core/browser/data_model/autofill_i18n_hierarchies.h index 6a5e304..070098d 100644 --- a/components/autofill/core/browser/data_model/autofill_i18n_hierarchies.h +++ b/components/autofill/core/browser/data_model/autofill_i18n_hierarchies.h
@@ -49,6 +49,12 @@ inline constexpr FieldType kFieldTypeChildren_MX_ADDRESS_HOME_OVERFLOW[] = {ADDRESS_HOME_BETWEEN_STREETS_OR_LANDMARK}; inline constexpr FieldType kFieldTypeChildren_MX_ADDRESS_HOME_STREET_ADDRESS[] = {ADDRESS_HOME_STREET_LOCATION, ADDRESS_HOME_SUBPREMISE, ADDRESS_HOME_OVERFLOW}; inline constexpr FieldType kFieldTypeChildren_MX_ADDRESS_HOME_ADDRESS[] = {ADDRESS_HOME_STREET_ADDRESS, ADDRESS_HOME_CITY, ADDRESS_HOME_DEPENDENT_LOCALITY, ADDRESS_HOME_STATE, ADDRESS_HOME_ADMIN_LEVEL2, ADDRESS_HOME_ZIP, ADDRESS_HOME_COUNTRY}; +// Field types for country PL. +inline constexpr FieldType kFieldTypeChildren_PL_ADDRESS_HOME_APT[] = {ADDRESS_HOME_APT_TYPE, ADDRESS_HOME_APT_NUM}; +inline constexpr FieldType kFieldTypeChildren_PL_ADDRESS_HOME_HOUSE_NUMBER_AND_APT[] = {ADDRESS_HOME_HOUSE_NUMBER, ADDRESS_HOME_APT}; +inline constexpr FieldType kFieldTypeChildren_PL_ADDRESS_HOME_STREET_LOCATION[] = {ADDRESS_HOME_STREET_NAME, ADDRESS_HOME_HOUSE_NUMBER_AND_APT}; +inline constexpr FieldType kFieldTypeChildren_PL_ADDRESS_HOME_STREET_ADDRESS[] = {ADDRESS_HOME_STREET_LOCATION}; +inline constexpr FieldType kFieldTypeChildren_PL_ADDRESS_HOME_ADDRESS[] = {ADDRESS_HOME_STREET_ADDRESS, ADDRESS_HOME_CITY, ADDRESS_HOME_STATE, ADDRESS_HOME_ZIP, ADDRESS_HOME_COUNTRY}; // Field types for country US. inline constexpr FieldType kFieldTypeChildren_US_ADDRESS_HOME_ADDRESS[] = {ADDRESS_HOME_STREET_ADDRESS, ADDRESS_HOME_CITY, ADDRESS_HOME_STATE, ADDRESS_HOME_ZIP, ADDRESS_HOME_COUNTRY}; // Field types for country XX. @@ -103,6 +109,13 @@ FieldTypeDescription{.field_type = ADDRESS_HOME_OVERFLOW, .children = kFieldTypeChildren_MX_ADDRESS_HOME_OVERFLOW}, FieldTypeDescription{.field_type = ADDRESS_HOME_STREET_ADDRESS, .children = kFieldTypeChildren_MX_ADDRESS_HOME_STREET_ADDRESS}, FieldTypeDescription{.field_type = ADDRESS_HOME_ADDRESS, .children = kFieldTypeChildren_MX_ADDRESS_HOME_ADDRESS}}; +// Node properties for country PL. +inline constexpr FieldTypeDescription kModel_PL[] = { + FieldTypeDescription{.field_type = ADDRESS_HOME_APT, .children = kFieldTypeChildren_PL_ADDRESS_HOME_APT}, + FieldTypeDescription{.field_type = ADDRESS_HOME_HOUSE_NUMBER_AND_APT, .children = kFieldTypeChildren_PL_ADDRESS_HOME_HOUSE_NUMBER_AND_APT}, + FieldTypeDescription{.field_type = ADDRESS_HOME_STREET_LOCATION, .children = kFieldTypeChildren_PL_ADDRESS_HOME_STREET_LOCATION}, + FieldTypeDescription{.field_type = ADDRESS_HOME_STREET_ADDRESS, .children = kFieldTypeChildren_PL_ADDRESS_HOME_STREET_ADDRESS}, + FieldTypeDescription{.field_type = ADDRESS_HOME_ADDRESS, .children = kFieldTypeChildren_PL_ADDRESS_HOME_ADDRESS}}; // Node properties for country US. inline constexpr FieldTypeDescription kModel_US[] = { FieldTypeDescription{.field_type = ADDRESS_HOME_ADDRESS, .children = kFieldTypeChildren_US_ADDRESS_HOME_ADDRESS}}; @@ -124,6 +137,7 @@ {"DE", kModel_DE}, {"IN", kModel_IN}, {"MX", kModel_MX}, + {"PL", kModel_PL}, {"US", kModel_US}, {"XX", kModel_XX} });
diff --git a/components/autofill/core/browser/data_model/autofill_i18n_parsing_expressions.h b/components/autofill/core/browser/data_model/autofill_i18n_parsing_expressions.h index d2c55ab..6c6aba6 100644 --- a/components/autofill/core/browser/data_model/autofill_i18n_parsing_expressions.h +++ b/components/autofill/core/browser/data_model/autofill_i18n_parsing_expressions.h
@@ -41,7 +41,11 @@ inline constexpr char kRegularExpression_17[] = "(?m)(?i:(?:\\b(?:x|Entre( Calles)?)\\s+(?P<ADDRESS_HOME_BETWEEN_STREETS>(?P<ADDRESS_HOME_BETWEEN_STREETS_1>(?:[^\\s,]+(?:[^\\S\\r\\n]+[^\\s,]+)*?))(?:\\s+y\\s+)(?P<ADDRESS_HOME_BETWEEN_STREETS_2>(?:[^,\\r\\n]+)))))"; // nocheck inline constexpr char kRegularExpression_18[] = "(?m)(?i:(?:(?:Cerca del)(?P<ADDRESS_HOME_LANDMARK>[^,\\n]+)))"; // nocheck inline constexpr char kRegularExpression_19[] = "(?m)(?i:(?P<ADDRESS_HOME_APT>(?P<ADDRESS_HOME_APT_TYPE>(?:despacho|loc\\.?|local|int(?:erior|\\.?)|n[uú]m(?:ero|\\.)? int(?:erno|\\.)?|Apartamento|Apto\\.?|Departamento|apto\\.?))?(?:(?:^|\\s+)(?P<ADDRESS_HOME_APT_NUM>(?:\\d+\\w?\\b|\\w\\b)))))"; // nocheck -inline constexpr char kRegularExpression_20[] = "(?m)(?i:(?P<ADDRESS_HOME_STREET_ADDRESS>(?:(?:(?:((no|°|º|number)(\\.|-|\\s)*)?)(?P<ADDRESS_HOME_HOUSE_NUMBER>(?:\\d+\\w?))(th\\.|\\.)?)(?:(?:^|\\s+)(?P<ADDRESS_HOME_STREET_NAME>(?:[^\\s,]+(?:[^\\S\\r\\n]+[^\\s,]+)*?)))|(?P<ADDRESS_HOME_STREET_NAME__2>(?:[^\\s,]+(?:[^\\S\\r\\n]+[^\\s,]+)*?))(?:(?:^|[,\\s]+)(?:((no|°|º|number)(\\.|-|\\s)*)?)(?P<ADDRESS_HOME_HOUSE_NUMBER__2>(?:\\d+\\w?))(th\\.|\\.)?))(?:(?:^|[,\\s]+)(?P<ADDRESS_HOME_SUBPREMISE>(?:(?:(?:(?:(°|º|\\.|\\s|-)*(floor|flur|fl|og|obergeschoss|ug|untergeschoss|geschoss|andar|piso|º)(\\.|\\s|-)*)(?P<ADDRESS_HOME_FLOOR>(?:(\\d{0,3}\\w?))))|(?:(?P<ADDRESS_HOME_FLOOR__2>(?:(\\d{1,3}\\w?|\\w)))(?:(°|º|\\.|\\s|-)*(floor|flur|fl|og|obergeschoss|ug|untergeschoss|geschoss|andar|piso|º)(\\.|\\s|-)*)))(?:(?:^|[,\\s]+)(?:(?:(?:(apt|apartment|wohnung|apto|-)(\\.|\\s|-)*)(?P<ADDRESS_HOME_APT_NUM>(?:(\\d{0,3}\\w?))))|(?:(-\\s*)?(?P<ADDRESS_HOME_APT_NUM__2>(?:(\\d{1,3}\\w?|\\w)))(?:(\\.|\\s|-)*(ª)))?))?|(?:(?:(?:(apt|apartment|wohnung|apto|-)(\\.|\\s|-)*)(?P<ADDRESS_HOME_APT_NUM__3>(?:(\\d{0,3}\\w?))))|(?:(-\\s*)?(?P<ADDRESS_HOME_APT_NUM__4>(?:(\\d{1,3}\\w?|\\w)))(?:(\\.|\\s|-)*(ª)))?))))?))"; // nocheck +inline constexpr char kRegularExpression_20[] = "(?m)(?i:(?P<ADDRESS_HOME_STREET_LOCATION>(?:(?:(?:ulica|ul\\.?|aleja|al\\.?|plac|pl\\.?|skwer|rondo|osiedle|boczna|bulwar|droga|rynek|szosa|zaulek)\\s*)?(?P<ADDRESS_HOME_STREET_NAME>(?:[^\\s,]+(?:[^\\S\\r\\n]+[^\\s,]+)*?)))(?:(?:^|\\s+)(?P<ADDRESS_HOME_HOUSE_NUMBER_AND_APT>(?P<ADDRESS_HOME_HOUSE_NUMBER>\\d+(?:\\s*[[:alpha:]]\\b)?)(?:(?:^|[/\\s]+)(?P<ADDRESS_HOME_APT>(?P<ADDRESS_HOME_APT_TYPE>(?:mieszkanie|m\\.?|lokal|lok\\.?|apartment|apt\\.?)?)?(?:\\s*(?P<ADDRESS_HOME_APT_NUM>(?:\\d+\\w?\\b|\\w\\b)))))?))))"; // nocheck +inline constexpr char kRegularExpression_21[] = "(?m)(?i:(?P<ADDRESS_HOME_STREET_ADDRESS>(?P<ADDRESS_HOME_STREET_LOCATION>(?:(?:(?:ulica|ul\\.?|aleja|al\\.?|plac|pl\\.?|skwer|rondo|osiedle|boczna|bulwar|droga|rynek|szosa|zaulek)\\s*)?(?P<ADDRESS_HOME_STREET_NAME>(?:[^\\s,]+(?:[^\\S\\r\\n]+[^\\s,]+)*?)))(?:(?:^|\\s+)(?P<ADDRESS_HOME_HOUSE_NUMBER_AND_APT>(?P<ADDRESS_HOME_HOUSE_NUMBER>\\d+(?:\\s*[[:alpha:]]\\b)?)(?:(?:^|[/\\s]+)(?P<ADDRESS_HOME_APT>(?P<ADDRESS_HOME_APT_TYPE>(?:mieszkanie|m\\.?|lokal|lok\\.?|apartment|apt\\.?)?)?(?:\\s*(?P<ADDRESS_HOME_APT_NUM>(?:\\d+\\w?\\b|\\w\\b)))))?)))))"; // nocheck +inline constexpr char kRegularExpression_22[] = "(?m)(?i:(?P<ADDRESS_HOME_HOUSE_NUMBER_AND_APT>(?P<ADDRESS_HOME_HOUSE_NUMBER>\\d+(?:\\s*[[:alpha:]]\\b)?)(?:(?:^|[/\\s]+)(?P<ADDRESS_HOME_APT>(?P<ADDRESS_HOME_APT_TYPE>(?:mieszkanie|m\\.?|lokal|lok\\.?|apartment|apt\\.?)?)?(?:\\s*(?P<ADDRESS_HOME_APT_NUM>(?:\\d+\\w?\\b|\\w\\b)))))?))"; // nocheck +inline constexpr char kRegularExpression_23[] = "(?m)(?i:(?P<ADDRESS_HOME_APT>(?P<ADDRESS_HOME_APT_TYPE>(?:mieszkanie|m\\.?|lokal|lok\\.?|apartment|apt\\.?)?)?(?:\\s*(?P<ADDRESS_HOME_APT_NUM>(?:\\d+\\w?\\b|\\w\\b))))?)"; // nocheck +inline constexpr char kRegularExpression_24[] = "(?m)(?i:(?P<ADDRESS_HOME_STREET_ADDRESS>(?:(?:(?:((no|°|º|number)(\\.|-|\\s)*)?)(?P<ADDRESS_HOME_HOUSE_NUMBER>(?:\\d+\\w?))(th\\.|\\.)?)(?:(?:^|\\s+)(?P<ADDRESS_HOME_STREET_NAME>(?:[^\\s,]+(?:[^\\S\\r\\n]+[^\\s,]+)*?)))|(?P<ADDRESS_HOME_STREET_NAME__2>(?:[^\\s,]+(?:[^\\S\\r\\n]+[^\\s,]+)*?))(?:(?:^|[,\\s]+)(?:((no|°|º|number)(\\.|-|\\s)*)?)(?P<ADDRESS_HOME_HOUSE_NUMBER__2>(?:\\d+\\w?))(th\\.|\\.)?))(?:(?:^|[,\\s]+)(?P<ADDRESS_HOME_SUBPREMISE>(?:(?:(?:(?:(°|º|\\.|\\s|-)*(floor|flur|fl|og|obergeschoss|ug|untergeschoss|geschoss|andar|piso|º)(\\.|\\s|-)*)(?P<ADDRESS_HOME_FLOOR>(?:(\\d{0,3}\\w?))))|(?:(?P<ADDRESS_HOME_FLOOR__2>(?:(\\d{1,3}\\w?|\\w)))(?:(°|º|\\.|\\s|-)*(floor|flur|fl|og|obergeschoss|ug|untergeschoss|geschoss|andar|piso|º)(\\.|\\s|-)*)))(?:(?:^|[,\\s]+)(?:(?:(?:(apt|apartment|wohnung|apto|-)(\\.|\\s|-)*)(?P<ADDRESS_HOME_APT_NUM>(?:(\\d{0,3}\\w?))))|(?:(-\\s*)?(?P<ADDRESS_HOME_APT_NUM__2>(?:(\\d{1,3}\\w?|\\w)))(?:(\\.|\\s|-)*(ª)))?))?|(?:(?:(?:(apt|apartment|wohnung|apto|-)(\\.|\\s|-)*)(?P<ADDRESS_HOME_APT_NUM__3>(?:(\\d{0,3}\\w?))))|(?:(-\\s*)?(?P<ADDRESS_HOME_APT_NUM__4>(?:(\\d{1,3}\\w?|\\w)))(?:(\\.|\\s|-)*(ª)))?))))?))"; // nocheck // Section for singular decomposition(s). @@ -59,6 +63,10 @@ Decomposition(kRegularExpression_17, true, true), Decomposition(kRegularExpression_19, true, true), Decomposition(kRegularExpression_20, true, true), + Decomposition(kRegularExpression_21, true, true), + Decomposition(kRegularExpression_22, true, true), + Decomposition(kRegularExpression_23, true, true), + Decomposition(kRegularExpression_24, true, true), }; // Section for singular extract part(s). @@ -120,7 +128,11 @@ {{"MX", ADDRESS_HOME_OVERFLOW}, &kExtractParts_6}, {{"MX", ADDRESS_HOME_STREET_ADDRESS}, &kExtractParts_7}, {{"MX", ADDRESS_HOME_APT}, &kDecompositionList[11]}, - {{"XX", ADDRESS_HOME_STREET_ADDRESS}, &kDecompositionList[12]} + {{"PL", ADDRESS_HOME_STREET_LOCATION}, &kDecompositionList[12]}, + {{"PL", ADDRESS_HOME_STREET_ADDRESS}, &kDecompositionList[13]}, + {{"PL", ADDRESS_HOME_HOUSE_NUMBER_AND_APT}, &kDecompositionList[14]}, + {{"PL", ADDRESS_HOME_APT}, &kDecompositionList[15]}, + {{"XX", ADDRESS_HOME_STREET_ADDRESS}, &kDecompositionList[16]} }); } // namespace autofill::i18n_model_definition
diff --git a/components/autofill/core/browser/data_model/autofill_structured_address_unittest.cc b/components/autofill/core/browser/data_model/autofill_structured_address_unittest.cc index 80f3d28..d39ef1f 100644 --- a/components/autofill/core/browser/data_model/autofill_structured_address_unittest.cc +++ b/components/autofill/core/browser/data_model/autofill_structured_address_unittest.cc
@@ -36,6 +36,7 @@ std::string street_address; std::string street_location; std::string street_name; + std::string building_and_unit; std::string house_number; std::string subpremise; std::string overflow_and_landmark; @@ -69,6 +70,8 @@ out << "Cross streets: " << test_case.cross_streets << std::endl; out << "Cross streets 1: " << test_case.cross_streets_1 << std::endl; out << "Cross streets 2: " << test_case.cross_streets_2 << std::endl; + out << "House number and apartment number: " << test_case.building_and_unit + << std::endl; return out; } @@ -1975,6 +1978,282 @@ } } +TEST_F(AutofillI18nStructuredAddress, TestFormattingPL) { + base::test::ScopedFeatureList features_{features::kAutofillUsePLAddressModel}; + std::vector<AddressLineParsingTestCase> test_cases = { + {.country_code = "PL", + .street_address = "Jan Warsaw 9/10", + .street_location = "Jan Warsaw 9/10", + .street_name = "Jan Warsaw", + .building_and_unit = "9/10", + .house_number = "9", + .apartment = "10", + .apartment_num = "10"}, + {.country_code = "PL", + .street_address = "Warsaw 9/m. 10", + .street_location = "Warsaw 9/m. 10", + .street_name = "Warsaw", + .building_and_unit = "9/m. 10", + .house_number = "9", + .apartment = "m. 10", + .apartment_type = "m.", + .apartment_num = "10"}, + {.country_code = "PL", + .street_address = "Warsaw 9", + .street_location = "Warsaw 9", + .street_name = "Warsaw", + .building_and_unit = "9", + .house_number = "9"}, + {.country_code = "PL", + .street_address = "Warsaw 9A/10", + .street_location = "Warsaw 9A/10", + .street_name = "Warsaw", + .building_and_unit = "9A/10", + .house_number = "9A", + .apartment = "10", + .apartment_num = "10"}}; + + for (const auto& test_case : test_cases) { + AddressComponentsStore address = + i18n_model_definition::CreateAddressComponentModel( + AddressCountryCode(test_case.country_code)); + + const AddressComponentTestValues test_value = { + {.type = ADDRESS_HOME_COUNTRY, + .value = test_case.country_code, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_STREET_NAME, + .value = test_case.street_name, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_HOUSE_NUMBER, + .value = test_case.house_number, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_APT_TYPE, + .value = test_case.apartment_type, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_APT_NUM, + .value = test_case.apartment_num, + .status = VerificationStatus::kObserved}}; + + SetTestValues(address.Root(), test_value); + + const AddressComponentTestValues expectation = { + {.type = ADDRESS_HOME_COUNTRY, + .value = test_case.country_code, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_STREET_ADDRESS, + .value = test_case.street_address, + .status = VerificationStatus::kFormatted}, + {.type = ADDRESS_HOME_STREET_LOCATION, + .value = test_case.street_location, + .status = VerificationStatus::kFormatted}, + {.type = ADDRESS_HOME_STREET_NAME, + .value = test_case.street_name, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_HOUSE_NUMBER, + .value = test_case.house_number, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_APT_TYPE, + .value = test_case.apartment_type, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_APT_NUM, + .value = test_case.apartment_num, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_HOUSE_NUMBER_AND_APT, + .value = test_case.building_and_unit, + .status = VerificationStatus::kFormatted}}; + VerifyTestValues(address.Root(), expectation); + } +} + +TEST_F(AutofillI18nStructuredAddress, ParseBuildingAndUnitPL) { + base::test::ScopedFeatureList features_{features::kAutofillUsePLAddressModel}; + std::vector<AddressLineParsingTestCase> test_cases = { + // Examples of house number and apartment numbers for Poland. + {.country_code = "PL", + .building_and_unit = "9/10", + .house_number = "9", + .apartment = "10", + .apartment_num = "10"}, + {.country_code = "PL", .building_and_unit = "9", .house_number = "9"}, + {.country_code = "PL", + .building_and_unit = "9A/10", + .house_number = "9A", + .apartment = "10", + .apartment_num = "10"}, + {.country_code = "PL", .building_and_unit = "9A", .house_number = "9A"}, + {.country_code = "PL", + .building_and_unit = "9A m. 10", + .house_number = "9A", + .apartment = "m. 10", + .apartment_type = "m.", + .apartment_num = "10"}, + {.country_code = "PL", + .building_and_unit = "9A/m.10", + .house_number = "9A", + .apartment = "m.10", + .apartment_type = "m.", + .apartment_num = "10"}}; + + for (const auto& test_case : test_cases) { + AddressComponentsStore address = + i18n_model_definition::CreateAddressComponentModel( + AddressCountryCode(test_case.country_code)); + + const AddressComponentTestValues test_value = { + {.type = ADDRESS_HOME_HOUSE_NUMBER_AND_APT, + .value = test_case.building_and_unit, + .status = VerificationStatus::kObserved}}; + + SetTestValues(address.Root(), test_value); + const AddressComponentTestValues expectation = { + {.type = ADDRESS_HOME_COUNTRY, + .value = test_case.country_code, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_HOUSE_NUMBER_AND_APT, + .value = test_case.building_and_unit, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_HOUSE_NUMBER, + .value = test_case.house_number, + .status = VerificationStatus::kParsed}, + {.type = ADDRESS_HOME_APT, + .value = test_case.apartment, + .status = VerificationStatus::kParsed}, + {.type = ADDRESS_HOME_APT_TYPE, + .value = test_case.apartment_type, + .status = VerificationStatus::kParsed}, + {.type = ADDRESS_HOME_APT_NUM, + .value = test_case.apartment_num, + .status = VerificationStatus::kParsed}, + }; + VerifyTestValues(address.Root(), expectation); + } +} + +TEST_F(AutofillI18nStructuredAddress, ParseStreetAddressPL) { + base::test::ScopedFeatureList features_{features::kAutofillUsePLAddressModel}; + std::vector<AddressLineParsingTestCase> test_cases = { + // Examples of street addresses for Poland. + {.country_code = "PL", + .street_address = "ul. Jan Warsaw 9/10", + .street_location = "ul. Jan Warsaw 9/10", + .street_name = "Jan Warsaw", + .building_and_unit = "9/10", + .house_number = "9", + .apartment = "10", + .apartment_num = "10"}, + {.country_code = "PL", + .street_address = "al. Warsaw 9/10", + .street_location = "al. Warsaw 9/10", + .street_name = "Warsaw", + .building_and_unit = "9/10", + .house_number = "9", + .apartment = "10", + .apartment_num = "10"}, + {.country_code = "PL", + .street_address = "Warsaw 9/10", + .street_location = "Warsaw 9/10", + .street_name = "Warsaw", + .building_and_unit = "9/10", + .house_number = "9", + .apartment = "10", + .apartment_num = "10"}, + {.country_code = "PL", + .street_address = "Warsaw 9", + .street_location = "Warsaw 9", + .street_name = "Warsaw", + .building_and_unit = "9", + .house_number = "9"}, + {.country_code = "PL", + .street_address = "Warsaw 9A/10", + .street_location = "Warsaw 9A/10", + .street_name = "Warsaw", + .building_and_unit = "9A/10", + .house_number = "9A", + .apartment = "10", + .apartment_num = "10"}, + {.country_code = "PL", + .street_address = "pl Warsaw 9", + .street_location = "pl Warsaw 9", + .street_name = "Warsaw", + .building_and_unit = "9", + .house_number = "9"}, + {.country_code = "PL", + .street_address = "pl Warsaw 9A", + .street_location = "pl Warsaw 9A", + .street_name = "Warsaw", + .building_and_unit = "9A", + .house_number = "9A"}, + {.country_code = "PL", + .street_address = "aleja Warsaw 9A", + .street_location = "aleja Warsaw 9A", + .street_name = "Warsaw", + .building_and_unit = "9A", + .house_number = "9A"}, + {.country_code = "PL", + .street_address = "ul. Warsaw 9A m. 10", + .street_location = "ul. Warsaw 9A m. 10", + .street_name = "Warsaw", + .building_and_unit = "9A m. 10", + .house_number = "9A", + .apartment = "m. 10", + .apartment_type = "m.", + .apartment_num = "10"}, + {.country_code = "PL", + .street_address = "ul. Warsaw 9A/m.10", + .street_location = "ul. Warsaw 9A/m.10", + .street_name = "Warsaw", + .building_and_unit = "9A/m.10", + .house_number = "9A", + .apartment = "m.10", + .apartment_type = "m.", + .apartment_num = "10"}, + }; + + for (const auto& test_case : test_cases) { + AddressComponentsStore address = + i18n_model_definition::CreateAddressComponentModel( + AddressCountryCode(test_case.country_code)); + + const AddressComponentTestValues test_value = { + {.type = ADDRESS_HOME_STREET_ADDRESS, + .value = test_case.street_address, + .status = VerificationStatus::kObserved}}; + + SetTestValues(address.Root(), test_value); + const AddressComponentTestValues expectation = { + {.type = ADDRESS_HOME_COUNTRY, + .value = test_case.country_code, + .status = VerificationStatus::kObserved}, + {.type = (ADDRESS_HOME_STREET_ADDRESS), + .value = test_case.street_address, + .status = VerificationStatus::kObserved}, + {.type = ADDRESS_HOME_STREET_LOCATION, + .value = test_case.street_location, + .status = VerificationStatus::kParsed}, + {.type = ADDRESS_HOME_STREET_NAME, + .value = test_case.street_name, + .status = VerificationStatus::kParsed}, + {.type = ADDRESS_HOME_HOUSE_NUMBER_AND_APT, + .value = test_case.building_and_unit, + .status = VerificationStatus::kParsed}, + {.type = ADDRESS_HOME_HOUSE_NUMBER, + .value = test_case.house_number, + .status = VerificationStatus::kParsed}, + {.type = ADDRESS_HOME_APT, + .value = test_case.apartment, + .status = VerificationStatus::kParsed}, + {.type = ADDRESS_HOME_APT_TYPE, + .value = test_case.apartment_type, + .status = VerificationStatus::kParsed}, + {.type = ADDRESS_HOME_APT_NUM, + .value = test_case.apartment_num, + .status = VerificationStatus::kParsed}, + }; + VerifyTestValues(address.Root(), expectation); + } +} + } // namespace } // namespace autofill
diff --git a/components/autofill/core/browser/form_parsing/internal_resources b/components/autofill/core/browser/form_parsing/internal_resources index 59b2cef..f2fd9f2 160000 --- a/components/autofill/core/browser/form_parsing/internal_resources +++ b/components/autofill/core/browser/form_parsing/internal_resources
@@ -1 +1 @@ -Subproject commit 59b2cefdb32a4c90676b95e5d5464dbc8595b13e +Subproject commit f2fd9f234b258490267ff5b5d6fda54fa9dacfe6
diff --git a/components/autofill/core/browser/form_parsing/resources/legacy_regex_patterns.json b/components/autofill/core/browser/form_parsing/resources/legacy_regex_patterns.json index a301e02..b2bb817 100644 --- a/components/autofill/core/browser/form_parsing/resources/legacy_regex_patterns.json +++ b/components/autofill/core/browser/form_parsing/resources/legacy_regex_patterns.json
@@ -152,6 +152,15 @@ "form_control_types": ["INPUT_TEXT", "INPUT_TELEPHONE", "INPUT_NUMBER"] } ], + "pl": [ + { + "positive_pattern": "(?:nr|numer)[.\\s]*(?:domu|budynku)", + "positive_score": 1.1, + "negative_pattern": null, + "match_field_attributes": ["LABEL", "NAME"], + "form_control_types": ["INPUT_TEXT", "INPUT_TELEPHONE", "INPUT_NUMBER"] + } + ], "pt": [ { "positive_pattern": "^\\*?.?número(.?\\*?$| da residência)", @@ -1060,6 +1069,15 @@ "form_control_types": ["INPUT_TEXT", "SELECT_ONE", "SELECT_LIST", "INPUT_SEARCH"] } ], + "pl": [ + { + "positive_pattern": "miasto|miejscowość", + "positive_score": 1.1, + "negative_pattern": null, + "match_field_attributes": ["LABEL", "NAME"], + "form_control_types": ["INPUT_TEXT", "SELECT_ONE", "SELECT_LIST", "INPUT_SEARCH"] + } + ], "pt": [ { "positive_pattern": "cidade",
diff --git a/components/autofill/core/browser/ui/suggestion.h b/components/autofill/core/browser/ui/suggestion.h index 8474dda..9c15d1c2 100644 --- a/components/autofill/core/browser/ui/suggestion.h +++ b/components/autofill/core/browser/ui/suggestion.h
@@ -30,6 +30,9 @@ friend bool operator==(const PasswordSuggestionDetails&, const PasswordSuggestionDetails&) = default; std::u16string password; + // Stores either the password signon realm or the Android app name for which + // the password was saved. + std::u16string display_signon_realm; }; using IsLoading = base::StrongAlias<class IsLoadingTag, bool>;
diff --git a/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_bridge_unittest.cc b/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_bridge_unittest.cc index e175d53..c1dfa1258 100644 --- a/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_bridge_unittest.cc +++ b/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_bridge_unittest.cc
@@ -490,7 +490,7 @@ i18n_model_definition::kLegacyHierarchyCountryCode); local.SetRawInfo(NAME_FIRST, u"Jane"); AutofillProfileChange change(AutofillProfileChange::REMOVE, kGuidB, local); - EXPECT_CALL(mock_processor(), Delete(kGuidB, _)); + EXPECT_CALL(mock_processor(), Delete(kGuidB, _, _)); // The bridge does not need to commit when reacting to a notification about a // local change. EXPECT_CALL(*backend(), CommitChanges()).Times(0);
diff --git a/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util.cc b/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util.cc index 5d085dd..1599dfc 100644 --- a/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util.cc +++ b/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util.cc
@@ -209,6 +209,8 @@ UTF16ToUTF8(entry.GetRawInfo(ADDRESS_HOME_STREET_NAME))); specifics->set_address_home_thoroughfare_number( UTF16ToUTF8(entry.GetRawInfo(ADDRESS_HOME_HOUSE_NUMBER))); + specifics->set_address_home_thoroughfare_number_and_apt( + UTF16ToUTF8(entry.GetRawInfo(ADDRESS_HOME_HOUSE_NUMBER_AND_APT))); specifics->set_address_home_street_location( UTF16ToUTF8(entry.GetRawInfo(ADDRESS_HOME_STREET_LOCATION))); specifics->set_address_home_subpremise_name( @@ -299,6 +301,9 @@ specifics->set_address_home_thoroughfare_number_status( ConvertProfileToSpecificsVerificationStatus( entry.GetVerificationStatus(ADDRESS_HOME_HOUSE_NUMBER))); + specifics->set_address_home_thoroughfare_number_and_apt_status( + ConvertProfileToSpecificsVerificationStatus( + entry.GetVerificationStatus(ADDRESS_HOME_HOUSE_NUMBER_AND_APT))); specifics->set_address_home_street_location_status( ConvertProfileToSpecificsVerificationStatus( entry.GetVerificationStatus(ADDRESS_HOME_STREET_LOCATION))); @@ -567,6 +572,12 @@ specifics.address_home_thoroughfare_number_status())); profile->SetRawInfoWithVerificationStatus( + ADDRESS_HOME_HOUSE_NUMBER_AND_APT, + UTF8ToUTF16(specifics.address_home_thoroughfare_number_and_apt()), + ConvertSpecificsToProfileVerificationStatus( + specifics.address_home_thoroughfare_number_and_apt_status())); + + profile->SetRawInfoWithVerificationStatus( ADDRESS_HOME_STREET_LOCATION, UTF8ToUTF16(specifics.address_home_street_location()), ConvertSpecificsToProfileVerificationStatus(
diff --git a/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util_unittest.cc b/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util_unittest.cc index c91d1c1..3ddca456 100644 --- a/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util_unittest.cc +++ b/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util_unittest.cc
@@ -425,6 +425,11 @@ sync_pb:: AutofillProfileSpecifics_VerificationStatus_VERIFICATION_STATUS_UNSPECIFIED); + specifics.set_address_home_thoroughfare_number_and_apt(""); + specifics.set_address_home_thoroughfare_number_and_apt_status( + sync_pb:: + AutofillProfileSpecifics_VerificationStatus_VERIFICATION_STATUS_UNSPECIFIED); + return specifics; }
diff --git a/components/autofill/core/browser/webdata/addresses/contact_info_sync_bridge_unittest.cc b/components/autofill/core/browser/webdata/addresses/contact_info_sync_bridge_unittest.cc index c4971c5..9fd62da 100644 --- a/components/autofill/core/browser/webdata/addresses/contact_info_sync_bridge_unittest.cc +++ b/components/autofill/core/browser/webdata/addresses/contact_info_sync_bridge_unittest.cc
@@ -329,7 +329,7 @@ const AutofillProfileChange change(AutofillProfileChange::REMOVE, kGUID1, TestProfile(kGUID1)); - EXPECT_CALL(mock_processor(), Delete(kGUID1, _)); + EXPECT_CALL(mock_processor(), Delete(kGUID1, _, _)); EXPECT_CALL(backend(), CommitChanges()).Times(0); bridge().AutofillProfileChanged(change);
diff --git a/components/autofill/core/browser/webdata/addresses/contact_info_sync_util.cc b/components/autofill/core/browser/webdata/addresses/contact_info_sync_util.cc index da8e39a..8d6e911b 100644 --- a/components/autofill/core/browser/webdata/addresses/contact_info_sync_util.cc +++ b/components/autofill/core/browser/webdata/addresses/contact_info_sync_util.cc
@@ -220,6 +220,8 @@ ADDRESS_HOME_STREET_NAME); s.Set(specifics.mutable_address_thoroughfare_number(), ADDRESS_HOME_HOUSE_NUMBER); + s.Set(specifics.mutable_address_thoroughfare_number_and_apt(), + ADDRESS_HOME_HOUSE_NUMBER_AND_APT); s.Set(specifics.mutable_address_street_location(), ADDRESS_HOME_STREET_LOCATION); s.Set(specifics.mutable_address_subpremise_name(), ADDRESS_HOME_SUBPREMISE); @@ -355,6 +357,8 @@ ADDRESS_HOME_DEPENDENT_LOCALITY); s.Set(specifics.address_thoroughfare_name(), ADDRESS_HOME_STREET_NAME); s.Set(specifics.address_thoroughfare_number(), ADDRESS_HOME_HOUSE_NUMBER); + s.Set(specifics.address_thoroughfare_number_and_apt(), + ADDRESS_HOME_HOUSE_NUMBER_AND_APT); s.Set(specifics.address_street_location(), ADDRESS_HOME_STREET_LOCATION); s.Set(specifics.address_subpremise_name(), ADDRESS_HOME_SUBPREMISE); if (base::FeatureList::IsEnabled( @@ -525,6 +529,10 @@ trimmed_specifics.mutable_address_street_location_and_locality())) { trimmed_specifics.clear_address_street_location_and_locality(); } + if (d.Delete( + trimmed_specifics.mutable_address_thoroughfare_number_and_apt())) { + trimmed_specifics.clear_address_thoroughfare_number_and_apt(); + } // Delete email, phone and company values and statuses. if (d.Delete(trimmed_specifics.mutable_email_address())) { trimmed_specifics.clear_email_address();
diff --git a/components/autofill/core/browser/webdata/addresses/contact_info_sync_util_unittest.cc b/components/autofill/core/browser/webdata/addresses/contact_info_sync_util_unittest.cc index a47b86b..05388a2b 100644 --- a/components/autofill/core/browser/webdata/addresses/contact_info_sync_util_unittest.cc +++ b/components/autofill/core/browser/webdata/addresses/contact_info_sync_util_unittest.cc
@@ -341,6 +341,8 @@ ContactInfoSpecifics::VERIFICATION_STATUS_UNSPECIFIED); SetToken(specifics.mutable_address_street_location_and_locality(), "", ContactInfoSpecifics::VERIFICATION_STATUS_UNSPECIFIED); + SetToken(specifics.mutable_address_thoroughfare_number_and_apt(), "", + ContactInfoSpecifics::VERIFICATION_STATUS_UNSPECIFIED); // All of the following types don't store verification statuses in // AutofillProfile. This corresponds to `VERIFICATION_STATUS_UNSPECIFIED`.
diff --git a/components/autofill/core/browser/webdata/autocomplete/autocomplete_sync_bridge_unittest.cc b/components/autofill/core/browser/webdata/autocomplete/autocomplete_sync_bridge_unittest.cc index 4946c14..abd890e 100644 --- a/components/autofill/core/browser/webdata/autocomplete/autocomplete_sync_bridge_unittest.cc +++ b/components/autofill/core/browser/webdata/autocomplete/autocomplete_sync_bridge_unittest.cc
@@ -636,7 +636,7 @@ CreateAutocompleteEntry(deleted_specifics); const std::string storage_key = GetStorageKey(deleted_specifics); - EXPECT_CALL(mock_processor(), Delete(storage_key, _)); + EXPECT_CALL(mock_processor(), Delete(storage_key, _, _)); // Bridge should not commit transaction on local changes (it is committed by // the AutofillWebDataService itself). EXPECT_CALL(*backend(), CommitChanges()).Times(0);
diff --git a/components/autofill/core/browser/webdata/payments/autofill_wallet_metadata_sync_bridge_unittest.cc b/components/autofill/core/browser/webdata/payments/autofill_wallet_metadata_sync_bridge_unittest.cc index 76c169c..b6c1970a 100644 --- a/components/autofill/core/browser/webdata/payments/autofill_wallet_metadata_sync_bridge_unittest.cc +++ b/components/autofill/core/browser/webdata/payments/autofill_wallet_metadata_sync_bridge_unittest.cc
@@ -889,7 +889,7 @@ table()->SetServerCreditCards({existing_card}); ResetBridge(); - EXPECT_CALL(mock_processor(), Delete(kCard1StorageKey, _)); + EXPECT_CALL(mock_processor(), Delete(kCard1StorageKey, _, _)); // Local changes should not cause local DB writes. EXPECT_CALL(*backend(), CommitChanges()).Times(0); EXPECT_CALL(*backend(), @@ -915,7 +915,7 @@ // Check that there is some metadata, from start on. ASSERT_FALSE(GetAllLocalDataInclRestart().empty()); - EXPECT_CALL(mock_processor(), Delete(kIban1StorageKey, _)); + EXPECT_CALL(mock_processor(), Delete(kIban1StorageKey, _, _)); // Local changes should not cause local DB writes. EXPECT_CALL(*backend(), CommitChanges).Times(0); EXPECT_CALL(*backend(), @@ -1031,7 +1031,7 @@ // Make the orphans old by advancing time. AdvanceTestClockByTwoYears(); - EXPECT_CALL(mock_processor(), Delete(kCard1StorageKey, _)); + EXPECT_CALL(mock_processor(), Delete(kCard1StorageKey, _, _)); EXPECT_CALL(*backend(), CommitChanges()); ResetBridge(); @@ -1051,7 +1051,7 @@ // Make the orphans old by advancing time. AdvanceTestClockByTwoYears(); - EXPECT_CALL(mock_processor(), Delete(kIban1StorageKey, _)); + EXPECT_CALL(mock_processor(), Delete(kIban1StorageKey, _, _)); EXPECT_CALL(*backend(), CommitChanges); ResetBridge();
diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc index e7d3f835..52ed1061 100644 --- a/components/autofill/core/common/autofill_features.cc +++ b/components/autofill/core/common/autofill_features.cc
@@ -375,6 +375,11 @@ "AutofillUseMXAddressModel", base::FEATURE_DISABLED_BY_DEFAULT); +// Enables using a custom address model for Poland, overriding the legacy one. +BASE_FEATURE(kAutofillUsePLAddressModel, + "AutofillUsePLAddressModel", + base::FEATURE_DISABLED_BY_DEFAULT); + // When enabled, Autofill will issues votes for EMAIL_ADDRESS field types on // fields where the content matches a valid email format. BASE_FEATURE(kAutofillUploadVotesForFieldsWithEmail, @@ -433,7 +438,7 @@ // TODO(crbug/1121990): Remove once launched. BASE_FEATURE(kAutofillParsingPatternProvider, "AutofillParsingPatternProvider", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); // The specific pattern set is controlled by the `kAutofillParsingPatternActive` // parameter. One of "default", "experimental", "nextgen".
diff --git a/components/autofill/core/common/autofill_features.h b/components/autofill/core/common/autofill_features.h index d7a94dcb..e840515 100644 --- a/components/autofill/core/common/autofill_features.h +++ b/components/autofill/core/common/autofill_features.h
@@ -125,6 +125,8 @@ COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillUseMXAddressModel); COMPONENT_EXPORT(AUTOFILL) +BASE_DECLARE_FEATURE(kAutofillUsePLAddressModel); +COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillUploadVotesForFieldsWithEmail); COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillUndo);
diff --git a/components/autofill/core/common/autofill_regex_constants.h b/components/autofill/core/common/autofill_regex_constants.h index 1b58fd6..a0f3a6e 100644 --- a/components/autofill/core/common/autofill_regex_constants.h +++ b/components/autofill/core/common/autofill_regex_constants.h
@@ -42,6 +42,7 @@ u"|(haus.?|^)(nummer|nr)" // de u"|^\\*?.?número(.?\\*?$| da residência)" // pt-BR, pt-PT u"|exterior|(?:no|n[úu]m(?:ero)?)\\.?\\s*ext" // es + u"|(?:nr|numer)[.\\s]*(?:domu|budynku)" // pl u"|дом|номер.?дома"; // ru inline constexpr char16_t kApartmentNumberRe[] = u"apartment" // en @@ -157,6 +158,7 @@ u"|localita" // it-IT u"|市区町村" // ja-JP u"|cidade" // pt-BR + u"|miasto|miejscowość" // pl u"|Город|Насел(е|ё)нный.?пункт" // ru u"|市" // zh-CN u"|分區" // zh-TW
diff --git a/components/browser_ui/widget/android/java/res/layout/radio_button_layout_element.xml b/components/browser_ui/widget/android/java/res/layout/radio_button_layout_element.xml index 8c0d484c..57e182a 100644 --- a/components/browser_ui/widget/android/java/res/layout/radio_button_layout_element.xml +++ b/components/browser_ui/widget/android/java/res/layout/radio_button_layout_element.xml
@@ -9,6 +9,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:minHeight="36dp" + android:minHeight="48dp" android:gravity="center_vertical" android:textAppearance="@style/TextAppearance.TextLarge.Primary" />
diff --git a/components/browsing_data/core/counters/browsing_data_counter_unittest.cc b/components/browsing_data/core/counters/browsing_data_counter_unittest.cc index 4724154..40d42c1 100644 --- a/components/browsing_data/core/counters/browsing_data_counter_unittest.cc +++ b/components/browsing_data/core/counters/browsing_data_counter_unittest.cc
@@ -110,8 +110,9 @@ const std::vector<BrowsingDataCounter::State>& state_transitions = counter()->GetStateTransitionsForTesting(); - DCHECK_EQ(1u, state_transitions.size()); - DCHECK_EQ(BrowsingDataCounter::State::RESTARTED, state_transitions[0]); + std::vector<BrowsingDataCounter::State> expected = { + BrowsingDataCounter::State::RESTARTED}; + EXPECT_EQ(expected, state_transitions); } TEST_F(BrowsingDataCounterTest, ImmediateResponse) { @@ -121,9 +122,9 @@ const std::vector<BrowsingDataCounter::State>& state_transitions = counter()->GetStateTransitionsForTesting(); - DCHECK_EQ(2u, state_transitions.size()); - DCHECK_EQ(BrowsingDataCounter::State::RESTARTED, state_transitions[0]); - DCHECK_EQ(BrowsingDataCounter::State::IDLE, state_transitions[1]); + std::vector<BrowsingDataCounter::State> expected = { + BrowsingDataCounter::State::RESTARTED, BrowsingDataCounter::State::IDLE}; + EXPECT_EQ(expected, state_transitions); } TEST_F(BrowsingDataCounterTest, ResponseWhileCalculatingIsShown) { @@ -133,12 +134,12 @@ const std::vector<BrowsingDataCounter::State>& state_transitions = counter()->GetStateTransitionsForTesting(); - DCHECK_EQ(4u, state_transitions.size()); - DCHECK_EQ(BrowsingDataCounter::State::RESTARTED, state_transitions[0]); - DCHECK_EQ(BrowsingDataCounter::State::SHOW_CALCULATING, state_transitions[1]); - DCHECK_EQ(BrowsingDataCounter::State::REPORT_STAGED_RESULT, - state_transitions[2]); - DCHECK_EQ(BrowsingDataCounter::State::IDLE, state_transitions[3]); + std::vector<BrowsingDataCounter::State> expected = { + BrowsingDataCounter::State::RESTARTED, + BrowsingDataCounter::State::SHOW_CALCULATING, + BrowsingDataCounter::State::REPORT_STAGED_RESULT, + BrowsingDataCounter::State::IDLE}; + EXPECT_EQ(expected, state_transitions); } TEST_F(BrowsingDataCounterTest, LateResponse) { @@ -148,12 +149,12 @@ const std::vector<BrowsingDataCounter::State>& state_transitions = counter()->GetStateTransitionsForTesting(); - DCHECK_EQ(4u, state_transitions.size()); - DCHECK_EQ(BrowsingDataCounter::State::RESTARTED, state_transitions[0]); - DCHECK_EQ(BrowsingDataCounter::State::SHOW_CALCULATING, state_transitions[1]); - DCHECK_EQ(BrowsingDataCounter::State::READY_TO_REPORT_RESULT, - state_transitions[2]); - DCHECK_EQ(BrowsingDataCounter::State::IDLE, state_transitions[3]); + std::vector<BrowsingDataCounter::State> expected = { + BrowsingDataCounter::State::RESTARTED, + BrowsingDataCounter::State::SHOW_CALCULATING, + BrowsingDataCounter::State::READY_TO_REPORT_RESULT, + BrowsingDataCounter::State::IDLE}; + EXPECT_EQ(expected, state_transitions); } TEST_F(BrowsingDataCounterTest, MultipleRuns) { @@ -171,12 +172,12 @@ const std::vector<BrowsingDataCounter::State>& state_transitions = counter()->GetStateTransitionsForTesting(); - DCHECK_EQ(4u, state_transitions.size()); - DCHECK_EQ(BrowsingDataCounter::State::RESTARTED, state_transitions[0]); - DCHECK_EQ(BrowsingDataCounter::State::SHOW_CALCULATING, state_transitions[1]); - DCHECK_EQ(BrowsingDataCounter::State::READY_TO_REPORT_RESULT, - state_transitions[2]); - DCHECK_EQ(BrowsingDataCounter::State::IDLE, state_transitions[3]); + std::vector<BrowsingDataCounter::State> expected = { + BrowsingDataCounter::State::RESTARTED, + BrowsingDataCounter::State::SHOW_CALCULATING, + BrowsingDataCounter::State::READY_TO_REPORT_RESULT, + BrowsingDataCounter::State::IDLE}; + EXPECT_EQ(expected, state_transitions); } TEST_F(BrowsingDataCounterTest, RestartingDoesntBreak) { @@ -188,9 +189,9 @@ const std::vector<BrowsingDataCounter::State>& state_transitions = counter()->GetStateTransitionsForTesting(); - DCHECK_EQ(2u, state_transitions.size()); - DCHECK_EQ(BrowsingDataCounter::State::RESTARTED, state_transitions[0]); - DCHECK_EQ(BrowsingDataCounter::State::IDLE, state_transitions[1]); + std::vector<BrowsingDataCounter::State> expected = { + BrowsingDataCounter::State::RESTARTED, BrowsingDataCounter::State::IDLE}; + EXPECT_EQ(expected, state_transitions); } } // namespace browsing_data
diff --git a/components/commerce/core/product_specifications/product_specifications_service.cc b/components/commerce/core/product_specifications/product_specifications_service.cc index eaa362d..171ea09 100644 --- a/components/commerce/core/product_specifications/product_specifications_service.cc +++ b/components/commerce/core/product_specifications/product_specifications_service.cc
@@ -24,11 +24,11 @@ return bridge_->change_processor()->GetControllerDelegate(); } -const std::vector<const ProductSpecificationsSet> +const std::vector<ProductSpecificationsSet> ProductSpecificationsService::GetAllProductSpecifications() { - std::vector<const ProductSpecificationsSet> product_specifications; + std::vector<ProductSpecificationsSet> product_specifications; for (auto& entry : bridge_->entries()) { - std::vector<const GURL> urls; + std::vector<GURL> urls; for (auto& data : entry.second.data()) { urls.emplace_back(data.url()); } @@ -43,7 +43,7 @@ const std::optional<const ProductSpecificationsSet> ProductSpecificationsService::AddProductSpecificationsSet( const std::string& name, - const std::vector<const GURL>& urls) { + const std::vector<GURL>& urls) { // TODO(crbug.com/332545064) add for a product specification set being added. std::optional<sync_pb::CompareSpecifics> specifics = bridge_->AddProductSpecifications(name, urls);
diff --git a/components/commerce/core/product_specifications/product_specifications_service.h b/components/commerce/core/product_specifications/product_specifications_service.h index 4afe013..0f84ae04 100644 --- a/components/commerce/core/product_specifications/product_specifications_service.h +++ b/components/commerce/core/product_specifications/product_specifications_service.h
@@ -26,14 +26,13 @@ base::WeakPtr<syncer::ModelTypeControllerDelegate> GetSyncControllerDelegate(); - const std::vector<const ProductSpecificationsSet> - GetAllProductSpecifications(); + const std::vector<ProductSpecificationsSet> GetAllProductSpecifications(); // Add new product specifications set called |name| with product pages // corresponding to |urls|. const std::optional<const ProductSpecificationsSet> AddProductSpecificationsSet(const std::string& name, - const std::vector<const GURL>& urls); + const std::vector<GURL>& urls); // Deletes product specification set corresponding to identifier |uuid|. void DeleteProductSpecificationsSet(const std::string& uuid);
diff --git a/components/commerce/core/product_specifications/product_specifications_service_unittest.cc b/components/commerce/core/product_specifications/product_specifications_service_unittest.cc index 6e0072a5..4087d7f 100644 --- a/components/commerce/core/product_specifications/product_specifications_service_unittest.cc +++ b/components/commerce/core/product_specifications/product_specifications_service_unittest.cc
@@ -82,9 +82,9 @@ } MATCHER_P(HasAllProductSpecs, compare_specifics, "") { - std::vector<const GURL> specifics_urls; + std::vector<GURL> specifics_urls; for (const sync_pb::ComparisonData& data : compare_specifics.data()) { - specifics_urls.push_back(GURL(data.url())); + specifics_urls.emplace_back(data.url()); } return arg.uuid().AsLowercaseString() == compare_specifics.uuid() && arg.creation_time() == @@ -217,7 +217,7 @@ specifics.update_time_unix_epoch_micros()), specifications.update_time()); EXPECT_EQ(specifics.name(), specifications.name()); - std::vector<const GURL> urls; + std::vector<GURL> urls; for (const sync_pb::ComparisonData& data : specifics.data()) { urls.emplace_back(data.url()); } @@ -243,7 +243,7 @@ for (const sync_pb::CompareSpecifics& specifics : kCompareSpecifics) { bridge()->AddCompareSpecifics(specifics); } - const std::vector<const ProductSpecificationsSet> specifications = + const std::vector<ProductSpecificationsSet> specifications = service()->GetAllProductSpecifications(); EXPECT_EQ(2u, specifications.size()); for (uint64_t i = 0; i < specifications.size(); i++) { @@ -252,8 +252,8 @@ } TEST_F(ProductSpecificationsServiceTest, TestAddProductSpecificationsSuccess) { - std::vector<const GURL> expected_product_urls{GURL(kProductOneUrl), - GURL(kProductTwoUrl)}; + std::vector<GURL> expected_product_urls{GURL(kProductOneUrl), + GURL(kProductTwoUrl)}; EXPECT_CALL(*observer(), OnProductSpecificationsSetAdded(HasProductSpecsNameUrl( kProductSpecsName, expected_product_urls)))
diff --git a/components/commerce/core/product_specifications/product_specifications_set.cc b/components/commerce/core/product_specifications/product_specifications_set.cc index 7005b6c..408bfde 100644 --- a/components/commerce/core/product_specifications/product_specifications_set.cc +++ b/components/commerce/core/product_specifications/product_specifications_set.cc
@@ -12,7 +12,7 @@ const std::string& uuid, const int64_t creation_time_usec_since_epoch, const int64_t update_time_usec_since_epoch, - const std::vector<const GURL>& urls, + const std::vector<GURL>& urls, const std::string& name) : uuid_(base::Uuid::ParseLowercase(uuid)), creation_time_(base::Time::FromMillisecondsSinceUnixEpoch( @@ -34,9 +34,9 @@ ProductSpecificationsSet ProductSpecificationsSet::FromProto( const sync_pb::CompareSpecifics& specifics) { - std::vector<const GURL> urls; + std::vector<GURL> urls; for (const sync_pb::ComparisonData& data : specifics.data()) { - urls.push_back(GURL(data.url())); + urls.emplace_back(data.url()); } return ProductSpecificationsSet( specifics.uuid(), specifics.creation_time_unix_epoch_micros(),
diff --git a/components/commerce/core/product_specifications/product_specifications_set.h b/components/commerce/core/product_specifications/product_specifications_set.h index d761faba..18e3aa11 100644 --- a/components/commerce/core/product_specifications/product_specifications_set.h +++ b/components/commerce/core/product_specifications/product_specifications_set.h
@@ -43,7 +43,7 @@ ProductSpecificationsSet(const std::string& uuid, const int64_t creation_time_usec_since_epoch, const int64_t update_time_usec_since_epoch, - const std::vector<const GURL>& urls, + const std::vector<GURL>& urls, const std::string& name); ProductSpecificationsSet(const ProductSpecificationsSet&); @@ -61,7 +61,7 @@ const base::Time& update_time() const { return update_time_; } // Product urls for each item in the set - const std::vector<const GURL>& urls() const { return urls_; } + const std::vector<GURL>& urls() const { return urls_; } // Name of the set const std::string& name() const { return name_; } @@ -76,7 +76,7 @@ const base::Uuid uuid_; const base::Time creation_time_; const base::Time update_time_; - const std::vector<const GURL> urls_; + const std::vector<GURL> urls_; const std::string name_; };
diff --git a/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc b/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc index 09c3fc5..40e1c46 100644 --- a/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc +++ b/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc
@@ -131,7 +131,7 @@ const std::optional<sync_pb::CompareSpecifics> ProductSpecificationsSyncBridge::AddProductSpecifications( const std::string& name, - const std::vector<const GURL>& urls) { + const std::vector<GURL>& urls) { if (!change_processor()->IsTrackingMetadata()) { return std::nullopt; }
diff --git a/components/commerce/core/product_specifications/product_specifications_sync_bridge.h b/components/commerce/core/product_specifications/product_specifications_sync_bridge.h index 0988e7b..aa7b7a6 100644 --- a/components/commerce/core/product_specifications/product_specifications_sync_bridge.h +++ b/components/commerce/core/product_specifications/product_specifications_sync_bridge.h
@@ -64,7 +64,7 @@ virtual const std::optional<sync_pb::CompareSpecifics> AddProductSpecifications(const std::string& name, - const std::vector<const GURL>& urls); + const std::vector<GURL>& urls); void DeleteProductSpecificationsSet(const std::string& uuid);
diff --git a/components/commerce/core/product_specifications/product_specifications_sync_bridge_unittest.cc b/components/commerce/core/product_specifications/product_specifications_sync_bridge_unittest.cc index 3525177..7d0409df 100644 --- a/components/commerce/core/product_specifications/product_specifications_sync_bridge_unittest.cc +++ b/components/commerce/core/product_specifications/product_specifications_sync_bridge_unittest.cc
@@ -178,7 +178,7 @@ std::optional<sync_pb::CompareSpecifics> AddProductSpecifications( const std::string& name, - const std::vector<const GURL> urls) { + const std::vector<GURL> urls) { return bridge().AddProductSpecifications(name, urls); }
diff --git a/components/commerce/core/shopping_service.cc b/components/commerce/core/shopping_service.cc index 236a8bef..ae17aea 100644 --- a/components/commerce/core/shopping_service.cc +++ b/components/commerce/core/shopping_service.cc
@@ -1734,7 +1734,7 @@ std::move(callback))); } -const std::vector<const ProductSpecificationsSet> +const std::vector<ProductSpecificationsSet> ShoppingService::GetAllProductSpecificationSets() { return product_specifications_service_->GetAllProductSpecifications(); }
diff --git a/components/commerce/core/shopping_service.h b/components/commerce/core/shopping_service.h index 304e33d7..5b6d9d2 100644 --- a/components/commerce/core/shopping_service.h +++ b/components/commerce/core/shopping_service.h
@@ -624,7 +624,7 @@ UrlProductIdentifierTupleCallback callback); // Return all ProductSpecificationsSets from ProductSpecificationsService. - virtual const std::vector<const ProductSpecificationsSet> + virtual const std::vector<ProductSpecificationsSet> GetAllProductSpecificationSets(); // Updates the bookmark model used for sync (and shopping) if needed. Invoked
diff --git a/components/cronet/stale_host_resolver.cc b/components/cronet/stale_host_resolver.cc index 424f350..087edb16 100644 --- a/components/cronet/stale_host_resolver.cc +++ b/components/cronet/stale_host_resolver.cc
@@ -362,6 +362,18 @@ optional_parameters.value_or(ResolveHostParameters()), tick_clock_); } +std::unique_ptr<net::HostResolver::ServiceEndpointRequest> +StaleHostResolver::CreateServiceEndpointRequest( + Host host, + net::NetworkAnonymizationKey network_anonymization_key, + net::NetLogWithSource net_log, + ResolveHostParameters parameters) { + // TODO(crbug.com/335119455): Figure out a plan to support the + // ServiceEndpointRequest API. + NOTIMPLEMENTED(); + return nullptr; +} + net::HostCache* StaleHostResolver::GetHostCache() { return inner_resolver_->GetHostCache(); }
diff --git a/components/cronet/stale_host_resolver.h b/components/cronet/stale_host_resolver.h index 9c5a0a8..8e7907a 100644 --- a/components/cronet/stale_host_resolver.h +++ b/components/cronet/stale_host_resolver.h
@@ -97,6 +97,11 @@ const net::NetworkAnonymizationKey& network_anonymization_key, const net::NetLogWithSource& net_log, const std::optional<ResolveHostParameters>& optional_parameters) override; + std::unique_ptr<ServiceEndpointRequest> CreateServiceEndpointRequest( + Host host, + net::NetworkAnonymizationKey network_anonymization_key, + net::NetLogWithSource net_log, + ResolveHostParameters parameters) override; // The remaining public methods pass through to the inner resolver:
diff --git a/components/desks_storage/core/desk_sync_bridge_unittest.cc b/components/desks_storage/core/desk_sync_bridge_unittest.cc index efe74ff..9a98f4e 100644 --- a/components/desks_storage/core/desk_sync_bridge_unittest.cc +++ b/components/desks_storage/core/desk_sync_bridge_unittest.cc
@@ -1705,7 +1705,7 @@ std::unique_ptr<MetadataChangeList> metadata_changes = bridge()->CreateMetadataChangeList(); - EXPECT_CALL(*processor(), Delete(_, _)).Times(0); + EXPECT_CALL(*processor(), Delete).Times(0); EntityChangeList entity_change_list; entity_change_list.push_back(EntityChange::CreateDelete("no-such-uuid"));
diff --git a/components/history/core/browser/sync/history_sync_bridge_unittest.cc b/components/history/core/browser/sync/history_sync_bridge_unittest.cc index 2969c5fa..9661a20 100644 --- a/components/history/core/browser/sync/history_sync_bridge_unittest.cc +++ b/components/history/core/browser/sync/history_sync_bridge_unittest.cc
@@ -145,6 +145,7 @@ } void Delete(const std::string& storage_key, + const syncer::DeletionOrigin& origin, syncer::MetadataChangeList* metadata_change_list) override { NOTREACHED(); }
diff --git a/components/password_manager/core/browser/password_suggestion_generator.cc b/components/password_manager/core/browser/password_suggestion_generator.cc index fa0b4a7..9729f3b 100644 --- a/components/password_manager/core/browser/password_suggestion_generator.cc +++ b/components/password_manager/core/browser/password_suggestion_generator.cc
@@ -242,13 +242,14 @@ } void AddFillPasswordChildSuggestion(autofill::Suggestion& suggestion, - const std::u16string& password) { + const CredentialUIEntry& credential) { autofill::Suggestion fill_password( l10n_util::GetStringUTF16( IDS_PASSWORD_MANAGER_MANUAL_FALLBACK_FILL_PASSWORD_ENTRY), autofill::PopupItemId::kFillPassword); - fill_password.payload = - autofill::Suggestion::PasswordSuggestionDetails(password); + fill_password.payload = autofill::Suggestion::PasswordSuggestionDetails( + credential.password, + GetHumanReadableRealm(credential.GetFirstSignonRealm())); suggestion.children.emplace_back(std::move(fill_password)); } @@ -272,14 +273,15 @@ ReplaceEmptyUsername(credential.username, &replaced); suggestion.additional_label = maybe_username; suggestion.icon = autofill::Suggestion::Icon::kGlobe; - suggestion.payload = - autofill::Suggestion::PasswordSuggestionDetails(credential.password); + suggestion.payload = autofill::Suggestion::PasswordSuggestionDetails( + credential.password, + GetHumanReadableRealm(credential.GetFirstSignonRealm())); suggestion.is_acceptable = on_password_form.value(); if (!replaced) { AddPasswordUsernameChildSuggestion(maybe_username, suggestion); } - AddFillPasswordChildSuggestion(suggestion, credential.password); + AddFillPasswordChildSuggestion(suggestion, credential); suggestion.children.emplace_back(autofill::PopupItemId::kSeparator); AddViewPasswordDetailsChildSuggestion(suggestion);
diff --git a/components/password_manager/core/browser/password_suggestion_generator_unittest.cc b/components/password_manager/core/browser/password_suggestion_generator_unittest.cc index 2406188..9b6f64d 100644 --- a/components/password_manager/core/browser/password_suggestion_generator_unittest.cc +++ b/components/password_manager/core/browser/password_suggestion_generator_unittest.cc
@@ -147,15 +147,15 @@ std::vector<Suggestion> suggestions = GenerateSuggestedPasswordsSection( {password_form()}, IsTriggeredOnPasswordForm(true)); - EXPECT_THAT( - suggestions, - ElementsAre(EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"google.com", - u"username@example.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"password")), - EqualsSuggestion(PopupItemId::kSeparator), - EqualsManageManagePasswordsSuggestion())); + EXPECT_THAT(suggestions, + ElementsAre(EqualsManualFallbackSuggestion( + PopupItemId::kPasswordEntry, u"google.com", + u"username@example.com", Suggestion::Icon::kGlobe, + /*is_acceptable=*/true, + Suggestion::PasswordSuggestionDetails( + u"password", u"google.com")), + EqualsSuggestion(PopupItemId::kSeparator), + EqualsManageManagePasswordsSuggestion())); } TEST_F(PasswordSuggestionGeneratorTest, @@ -163,15 +163,15 @@ std::vector<Suggestion> suggestions = GenerateAllPasswordsSection( {credential_ui_entry()}, IsTriggeredOnPasswordForm(true)); - EXPECT_THAT( - suggestions, - ElementsAre(EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"google.com", - u"username@example.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"password")), - EqualsSuggestion(PopupItemId::kSeparator), - EqualsManageManagePasswordsSuggestion())); + EXPECT_THAT(suggestions, + ElementsAre(EqualsManualFallbackSuggestion( + PopupItemId::kPasswordEntry, u"google.com", + u"username@example.com", Suggestion::Icon::kGlobe, + /*is_acceptable=*/true, + Suggestion::PasswordSuggestionDetails( + u"password", u"google.com")), + EqualsSuggestion(PopupItemId::kSeparator), + EqualsManageManagePasswordsSuggestion())); } TEST_F(PasswordSuggestionGeneratorTest, @@ -187,7 +187,8 @@ l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_EMPTY_LOGIN), Suggestion::Icon::kGlobe, /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"password")), + Suggestion::PasswordSuggestionDetails(u"password", + u"google.com")), EqualsSuggestion(PopupItemId::kSeparator), EqualsManageManagePasswordsSuggestion())); } @@ -205,7 +206,8 @@ l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_EMPTY_LOGIN), Suggestion::Icon::kGlobe, /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"password")), + Suggestion::PasswordSuggestionDetails(u"password", + u"google.com")), EqualsSuggestion(PopupItemId::kSeparator), EqualsManageManagePasswordsSuggestion())); } @@ -215,15 +217,15 @@ std::vector<Suggestion> suggestions = GenerateSuggestedPasswordsSection( {password_form()}, IsTriggeredOnPasswordForm(false)); - EXPECT_THAT( - suggestions, - ElementsAre(EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"google.com", - u"username@example.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/false, - Suggestion::PasswordSuggestionDetails(u"password")), - EqualsSuggestion(PopupItemId::kSeparator), - EqualsManageManagePasswordsSuggestion())); + EXPECT_THAT(suggestions, + ElementsAre(EqualsManualFallbackSuggestion( + PopupItemId::kPasswordEntry, u"google.com", + u"username@example.com", Suggestion::Icon::kGlobe, + /*is_acceptable=*/false, + Suggestion::PasswordSuggestionDetails( + u"password", u"google.com")), + EqualsSuggestion(PopupItemId::kSeparator), + EqualsManageManagePasswordsSuggestion())); } TEST_F(PasswordSuggestionGeneratorTest, @@ -231,15 +233,15 @@ std::vector<Suggestion> suggestions = GenerateAllPasswordsSection( {credential_ui_entry()}, IsTriggeredOnPasswordForm(false)); - EXPECT_THAT( - suggestions, - ElementsAre(EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"google.com", - u"username@example.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/false, - Suggestion::PasswordSuggestionDetails(u"password")), - EqualsSuggestion(PopupItemId::kSeparator), - EqualsManageManagePasswordsSuggestion())); + EXPECT_THAT(suggestions, + ElementsAre(EqualsManualFallbackSuggestion( + PopupItemId::kPasswordEntry, u"google.com", + u"username@example.com", Suggestion::Icon::kGlobe, + /*is_acceptable=*/false, + Suggestion::PasswordSuggestionDetails( + u"password", u"google.com")), + EqualsSuggestion(PopupItemId::kSeparator), + EqualsManageManagePasswordsSuggestion())); } TEST_F(PasswordSuggestionGeneratorTest, @@ -255,15 +257,15 @@ GenerateAllPasswordsSection({entry}, IsTriggeredOnPasswordForm(true)); // Only the first domain is used to create the suggestion. - EXPECT_THAT( - suggestions, - ElementsAre(EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"google.com", - u"example@google.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"password")), - EqualsSuggestion(PopupItemId::kSeparator), - EqualsManageManagePasswordsSuggestion())); + EXPECT_THAT(suggestions, + ElementsAre(EqualsManualFallbackSuggestion( + PopupItemId::kPasswordEntry, u"google.com", + u"example@google.com", Suggestion::Icon::kGlobe, + /*is_acceptable=*/true, + Suggestion::PasswordSuggestionDetails( + u"password", u"google.com")), + EqualsSuggestion(PopupItemId::kSeparator), + EqualsManageManagePasswordsSuggestion())); } TEST_F(PasswordSuggestionGeneratorTest, @@ -289,29 +291,32 @@ IsTriggeredOnPasswordForm(true)); // Manual fallback suggestions are sorted by domain name. - EXPECT_THAT(suggestions, - ElementsAre(EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"amazon.com", - u"fourth@google.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"second")), - EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"google.com", - u"first@google.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"first")), - EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"microsoft.com", - u"second@google.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"first")), - EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"netflix.com", - u"third@google.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"second")), - EqualsSuggestion(PopupItemId::kSeparator), - EqualsManageManagePasswordsSuggestion())); + EXPECT_THAT( + suggestions, + ElementsAre( + EqualsManualFallbackSuggestion( + PopupItemId::kPasswordEntry, u"amazon.com", u"fourth@google.com", + Suggestion::Icon::kGlobe, + /*is_acceptable=*/true, + Suggestion::PasswordSuggestionDetails(u"second", u"amazon.com")), + EqualsManualFallbackSuggestion( + PopupItemId::kPasswordEntry, u"google.com", u"first@google.com", + Suggestion::Icon::kGlobe, + /*is_acceptable=*/true, + Suggestion::PasswordSuggestionDetails(u"first", u"google.com")), + EqualsManualFallbackSuggestion(PopupItemId::kPasswordEntry, + u"microsoft.com", u"second@google.com", + Suggestion::Icon::kGlobe, + /*is_acceptable=*/true, + Suggestion::PasswordSuggestionDetails( + u"first", u"microsoft.com")), + EqualsManualFallbackSuggestion( + PopupItemId::kPasswordEntry, u"netflix.com", u"third@google.com", + Suggestion::Icon::kGlobe, + /*is_acceptable=*/true, + Suggestion::PasswordSuggestionDetails(u"second", u"netflix.com")), + EqualsSuggestion(PopupItemId::kSeparator), + EqualsManageManagePasswordsSuggestion())); } TEST_F(PasswordSuggestionGeneratorTest, @@ -331,7 +336,8 @@ l10n_util::GetStringUTF16( IDS_PASSWORD_MANAGER_MANUAL_FALLBACK_FILL_PASSWORD_ENTRY), Suggestion::Icon::kNoIcon, - Suggestion::PasswordSuggestionDetails(u"password")), + Suggestion::PasswordSuggestionDetails(u"password", + u"google.com")), EqualsSuggestion(PopupItemId::kSeparator), EqualsSuggestion( PopupItemId::kViewPasswordDetails, @@ -357,7 +363,8 @@ l10n_util::GetStringUTF16( IDS_PASSWORD_MANAGER_MANUAL_FALLBACK_FILL_PASSWORD_ENTRY), Suggestion::Icon::kNoIcon, - Suggestion::PasswordSuggestionDetails(u"password")), + Suggestion::PasswordSuggestionDetails(u"password", + u"google.com")), EqualsSuggestion(PopupItemId::kSeparator), EqualsSuggestion( PopupItemId::kViewPasswordDetails, @@ -381,7 +388,8 @@ l10n_util::GetStringUTF16( IDS_PASSWORD_MANAGER_MANUAL_FALLBACK_FILL_PASSWORD_ENTRY), Suggestion::Icon::kNoIcon, - Suggestion::PasswordSuggestionDetails(u"password")), + Suggestion::PasswordSuggestionDetails(u"password", + u"google.com")), EqualsSuggestion(PopupItemId::kSeparator), EqualsSuggestion( PopupItemId::kViewPasswordDetails, @@ -405,7 +413,8 @@ l10n_util::GetStringUTF16( IDS_PASSWORD_MANAGER_MANUAL_FALLBACK_FILL_PASSWORD_ENTRY), Suggestion::Icon::kNoIcon, - Suggestion::PasswordSuggestionDetails(u"password")), + Suggestion::PasswordSuggestionDetails(u"password", + u"google.com")), EqualsSuggestion(PopupItemId::kSeparator), EqualsSuggestion( PopupItemId::kViewPasswordDetails, @@ -445,16 +454,17 @@ PopupItemId::kTitle, l10n_util::GetStringUTF16( IDS_PASSWORD_MANAGER_MANUAL_FALLBACK_SUGGESTED_PASSWORDS_SECTION_TITLE)), - EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"microsoft.com", - u"first@google.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"first")), + EqualsManualFallbackSuggestion(PopupItemId::kPasswordEntry, + u"microsoft.com", u"first@google.com", + Suggestion::Icon::kGlobe, + /*is_acceptable=*/true, + Suggestion::PasswordSuggestionDetails( + u"first", u"microsoft.com")), EqualsManualFallbackSuggestion( PopupItemId::kPasswordEntry, u"google.com", u"second@google.com", Suggestion::Icon::kGlobe, /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"second")), + Suggestion::PasswordSuggestionDetails(u"second", u"google.com")), EqualsSuggestion( PopupItemId::kTitle, l10n_util::GetStringUTF16( @@ -463,12 +473,13 @@ PopupItemId::kPasswordEntry, u"google.com", u"second@google.com", Suggestion::Icon::kGlobe, /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"second")), - EqualsManualFallbackSuggestion( - PopupItemId::kPasswordEntry, u"microsoft.com", - u"first@google.com", Suggestion::Icon::kGlobe, - /*is_acceptable=*/true, - Suggestion::PasswordSuggestionDetails(u"first")), + Suggestion::PasswordSuggestionDetails(u"second", u"google.com")), + EqualsManualFallbackSuggestion(PopupItemId::kPasswordEntry, + u"microsoft.com", u"first@google.com", + Suggestion::Icon::kGlobe, + /*is_acceptable=*/true, + Suggestion::PasswordSuggestionDetails( + u"first", u"microsoft.com")), EqualsSuggestion(PopupItemId::kSeparator), EqualsManageManagePasswordsSuggestion())); }
diff --git a/components/password_manager/core/browser/sharing/incoming_password_sharing_invitation_sync_bridge_unittest.cc b/components/password_manager/core/browser/sharing/incoming_password_sharing_invitation_sync_bridge_unittest.cc index d79940eb..6616bdf 100644 --- a/components/password_manager/core/browser/sharing/incoming_password_sharing_invitation_sync_bridge_unittest.cc +++ b/components/password_manager/core/browser/sharing/incoming_password_sharing_invitation_sync_bridge_unittest.cc
@@ -191,7 +191,7 @@ entity_changes.push_back(EntityChangeFromSpecifics(MakeSpecifics())); EXPECT_CALL(*mock_processor(), - Delete(entity_changes.front()->storage_key(), _)); + Delete(entity_changes.front()->storage_key(), _, _)); bridge()->ApplyIncrementalSyncChanges(std::move(metadata_changes), std::move(entity_changes)); @@ -238,7 +238,7 @@ entity_changes.push_back(EntityChangeFromSpecifics(MakeSpecifics())); EXPECT_CALL(*mock_processor(), - Delete(entity_changes.front()->storage_key(), _)); + Delete(entity_changes.front()->storage_key(), _, _)); bridge()->MergeFullSyncData(std::move(metadata_changes), std::move(entity_changes));
diff --git a/components/password_manager/core/browser/sync/password_sync_bridge.cc b/components/password_manager/core/browser/sync/password_sync_bridge.cc index acf5f07e..7f6bcb1 100644 --- a/components/password_manager/core/browser/sync/password_sync_bridge.cc +++ b/components/password_manager/core/browser/sync/password_sync_bridge.cc
@@ -450,7 +450,11 @@ break; } case PasswordStoreChange::REMOVE: { - change_processor()->Delete(storage_key, &metadata_change_list); + // TODO(crbug.com/334001702): Propagate an actual deletion origin all + // the way from PasswordStore::RemoveLogin() and similar functions. + change_processor()->Delete(storage_key, + syncer::DeletionOrigin::Unspecified(), + &metadata_change_list); break; } }
diff --git a/components/password_manager/core/browser/sync/password_sync_bridge_unittest.cc b/components/password_manager/core/browser/sync/password_sync_bridge_unittest.cc index 913998e..1981286e 100644 --- a/components/password_manager/core/browser/sync/password_sync_bridge_unittest.cc +++ b/components/password_manager/core/browser/sync/password_sync_bridge_unittest.cc
@@ -543,7 +543,7 @@ Put("2", EntityDataHasSignonRealm(kSignonRealm2), IsSyncMetadataStoreChangeListWithStore(store))); EXPECT_CALL(mock_processor(), - Delete("3", IsSyncMetadataStoreChangeListWithStore(store))); + Delete("3", _, IsSyncMetadataStoreChangeListWithStore(store))); bridge()->ActOnPasswordStoreChanges(changes); }
diff --git a/components/permissions/DEPS b/components/permissions/DEPS index 91f6cfd..6cbfd69 100644 --- a/components/permissions/DEPS +++ b/components/permissions/DEPS
@@ -24,7 +24,6 @@ "+content/test", "+device/bluetooth", "+media/base/android/media_drm_bridge.h", - "+net/base/schemeful_site.h", "+printing/buildflags/buildflags.h", "+services/metrics/public/cpp", "+sql",
diff --git a/components/permissions/object_permission_context_base.cc b/components/permissions/object_permission_context_base.cc index 671a68f..25bf9c65 100644 --- a/components/permissions/object_permission_context_base.cc +++ b/components/permissions/object_permission_context_base.cc
@@ -16,7 +16,6 @@ #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/common/content_settings_pattern.h" #include "components/permissions/features.h" -#include "net/base/schemeful_site.h" #include "url/origin.h" namespace permissions { @@ -131,25 +130,6 @@ return results; } -std::vector<std::unique_ptr<ObjectPermissionContextBase::Object>> -ObjectPermissionContextBase::GetGrantedObjects(const net::SchemefulSite& site) { - std::vector<std::unique_ptr<Object>> results; - for (const auto& pair : objects()) { - if (!CanRequestObjectPermission(pair.first)) { - continue; - } - if (net::SchemefulSite(pair.first) != site) { - continue; - } - - for (const auto& key_value : pair.second) { - results.push_back(key_value.second->Clone()); - } - } - - return results; -} - std::set<url::Origin> ObjectPermissionContextBase::GetOriginsWithGrants() { std::set<url::Origin> origins_with_grants; for (const auto& objects_entry : objects()) {
diff --git a/components/permissions/object_permission_context_base.h b/components/permissions/object_permission_context_base.h index 1cc97fb1..b27516c 100644 --- a/components/permissions/object_permission_context_base.h +++ b/components/permissions/object_permission_context_base.h
@@ -24,10 +24,6 @@ class HostContentSettingsMap; -namespace net { -class SchemefulSite; -} - namespace url { class Origin; } @@ -108,12 +104,6 @@ virtual std::vector<std::unique_ptr<Object>> GetGrantedObjects( const url::Origin& origin); - // Returns a list of objects that |site| has been granted permission to - // access. This method may be extended by a subclass to return objects not - // stored in |host_content_settings_map_|. - virtual std::vector<std::unique_ptr<Object>> GetGrantedObjects( - const net::SchemefulSite& site); - // Returns a set of all origins that have granted permission(s). // This method may be extended by a subclass to return origins with objects // not stored in |host_content_settings_map_|.
diff --git a/components/permissions/object_permission_context_base_unittest.cc b/components/permissions/object_permission_context_base_unittest.cc index 3eecf228..5660da0 100644 --- a/components/permissions/object_permission_context_base_unittest.cc +++ b/components/permissions/object_permission_context_base_unittest.cc
@@ -14,7 +14,6 @@ #include "components/permissions/test/test_permissions_client.h" #include "content/public/test/browser_task_environment.h" #include "content/public/test/test_browser_context.h" -#include "net/base/schemeful_site.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/origin.h" @@ -66,10 +65,8 @@ ObjectPermissionContextBaseTest() : url1_("https://google.com"), url2_("https://chromium.org"), - url3_("https://www.google.com"), origin1_(url::Origin::Create(url1_)), origin2_(url::Origin::Create(url2_)), - origin3_(url::Origin::Create(url3_)), context_(ContentSettingsType::USB_GUARD, ContentSettingsType::USB_CHOOSER_DATA, browser_context()), @@ -81,8 +78,6 @@ object1_.Set(kRequiredKey2, "value2"); object2_.Set(kRequiredKey1, "value3"); object2_.Set(kRequiredKey2, "value4"); - object3_.Set(kRequiredKey1, "value5"); - object3_.Set(kRequiredKey2, "value6"); } ~ObjectPermissionContextBaseTest() override = default; @@ -97,13 +92,10 @@ protected: const GURL url1_; const GURL url2_; - const GURL url3_; const url::Origin origin1_; const url::Origin origin2_; - const url::Origin origin3_; base::Value::Dict object1_; base::Value::Dict object2_; - base::Value::Dict object3_; TestObjectPermissionContext context_; TestObjectPermissionContext file_system_access_context_; }; @@ -289,48 +281,6 @@ EXPECT_EQ(object2_, objects2[0]->value); } -TEST_F(ObjectPermissionContextBaseTest, GetGrantedObjects_SchemefulSite) { - MockPermissionObserver mock_observer; - context_.AddObserver(&mock_observer); - - EXPECT_CALL(mock_observer, OnObjectPermissionChanged(_, _)).Times(3); - context_.GrantObjectPermission(origin1_, object1_.Clone()); - context_.GrantObjectPermission(origin2_, object2_.Clone()); - context_.GrantObjectPermission(origin3_, object3_.Clone()); - - ASSERT_EQ(net::SchemefulSite(origin1_), net::SchemefulSite(origin3_)); - - EXPECT_THAT( - context_.GetGrantedObjects(net::SchemefulSite(origin1_)), - ElementsAre(Pointee(Field(&ObjectPermissionContextBase::Object::value, - IsJson(std::ref(object1_)))), - Pointee(Field(&ObjectPermissionContextBase::Object::value, - IsJson(std::ref(object3_)))))); -} - -TEST_F(ObjectPermissionContextBaseTest, - GetGrantedObjects_SchemefulSiteWithGuardBlocked) { - PermissionsClient::Get() - ->GetSettingsMap(browser_context()) - ->SetContentSettingDefaultScope( - url1_, url1_, ContentSettingsType::USB_GUARD, CONTENT_SETTING_BLOCK); - - MockPermissionObserver mock_observer; - context_.AddObserver(&mock_observer); - - EXPECT_CALL(mock_observer, OnObjectPermissionChanged(_, _)).Times(3); - context_.GrantObjectPermission(origin1_, object1_.Clone()); - context_.GrantObjectPermission(origin2_, object2_.Clone()); - context_.GrantObjectPermission(origin3_, object3_.Clone()); - - ASSERT_EQ(net::SchemefulSite(origin1_), net::SchemefulSite(origin3_)); - - EXPECT_THAT( - context_.GetGrantedObjects(net::SchemefulSite(origin1_)), - ElementsAre(Pointee(Field(&ObjectPermissionContextBase::Object::value, - IsJson(std::ref(object3_)))))); -} - TEST_F(ObjectPermissionContextBaseTest, GetAllGrantedObjectsWithGuardBlocked) { auto* map = PermissionsClient::Get()->GetSettingsMap(browser_context()); map->SetContentSettingDefaultScope(
diff --git a/components/reading_list/core/reading_list_sync_bridge_unittest.cc b/components/reading_list/core/reading_list_sync_bridge_unittest.cc index 4a3684a..093824c 100644 --- a/components/reading_list/core/reading_list_sync_bridge_unittest.cc +++ b/components/reading_list/core/reading_list_sync_bridge_unittest.cc
@@ -205,7 +205,7 @@ auto entry = MakeRefCounted<ReadingListEntry>( GURL("http://unread.example.com/"), "unread title", AdvanceAndGetTime(&clock_)); - EXPECT_CALL(processor_, Delete("http://unread.example.com/", _)); + EXPECT_CALL(processor_, Delete("http://unread.example.com/", _, _)); auto batch = model_->BeginBatchUpdatesWithSyncMetadata(); bridge()->DidRemoveEntry(*entry, batch->GetSyncMetadataChangeList()); }
diff --git a/components/saved_tab_groups/saved_tab_group_sync_bridge_unittest.cc b/components/saved_tab_groups/saved_tab_group_sync_bridge_unittest.cc index 440bbaf..59ff3bd5 100644 --- a/components/saved_tab_groups/saved_tab_group_sync_bridge_unittest.cc +++ b/components/saved_tab_groups/saved_tab_group_sync_bridge_unittest.cc
@@ -601,9 +601,11 @@ base::Uuid tab_2_guid = tab_2.saved_tab_guid(); saved_tab_group_model_.Add(std::move(group)); - EXPECT_CALL(processor_, Delete(group_guid.AsLowercaseString(), _)); - EXPECT_CALL(processor_, Delete(tab_1_guid.AsLowercaseString(), _)).Times(0); - EXPECT_CALL(processor_, Delete(tab_2_guid.AsLowercaseString(), _)).Times(0); + EXPECT_CALL(processor_, Delete(group_guid.AsLowercaseString(), _, _)); + EXPECT_CALL(processor_, Delete(tab_1_guid.AsLowercaseString(), _, _)) + .Times(0); + EXPECT_CALL(processor_, Delete(tab_2_guid.AsLowercaseString(), _, _)) + .Times(0); saved_tab_group_model_.Remove(group_guid); @@ -729,7 +731,7 @@ base::Uuid tab_2_guid = tab_2.saved_tab_guid(); saved_tab_group_model_.Add(std::move(group)); - EXPECT_CALL(processor_, Delete(tab_1_guid.AsLowercaseString(), _)); + EXPECT_CALL(processor_, Delete(tab_1_guid.AsLowercaseString(), _, _)); EXPECT_CALL(processor_, Put(tab_2_guid.AsLowercaseString(), _, _)).Times(0); EXPECT_CALL(processor_, Put(group_guid.AsLowercaseString(), _, _)).Times(0);
diff --git a/components/send_tab_to_self/send_tab_to_self_bridge_unittest.cc b/components/send_tab_to_self/send_tab_to_self_bridge_unittest.cc index f350317..ecde9400 100644 --- a/components/send_tab_to_self/send_tab_to_self_bridge_unittest.cc +++ b/components/send_tab_to_self/send_tab_to_self_bridge_unittest.cc
@@ -372,8 +372,8 @@ urls_to_remove.push_back(history::URLRow(GURL("http://www.example2.com/"))); EXPECT_CALL(*mock_observer(), EntriesRemovedRemotely(SizeIs(2))); - EXPECT_CALL(*processor(), Delete("guid1", _)); - EXPECT_CALL(*processor(), Delete("guid2", _)); + EXPECT_CALL(*processor(), Delete("guid1", _, _)); + EXPECT_CALL(*processor(), Delete("guid2", _, _)); bridge()->OnHistoryDeletions(nullptr, history::DeletionInfo::ForUrls( urls_to_remove, std::set<GURL>())); @@ -453,7 +453,7 @@ std::unique_ptr<syncer::MetadataChangeList> metadata_changes = bridge()->CreateMetadataChangeList(); - EXPECT_CALL(*processor(), Delete(_, _)).Times(0); + EXPECT_CALL(*processor(), Delete(_, _, _)).Times(0); syncer::EntityChangeList entity_change_list; entity_change_list.push_back(syncer::EntityChange::CreateDelete("guid")); @@ -551,7 +551,7 @@ AdvanceAndGetTime(kExpiryTime / 2.0); EXPECT_CALL(*mock_observer(), EntriesRemovedRemotely(SizeIs(1))); - EXPECT_CALL(*processor(), Delete(_, _)); + EXPECT_CALL(*processor(), Delete(_, _, _)); InitializeBridge(); @@ -577,7 +577,7 @@ const sync_pb::SendTabToSelfSpecifics not_expired_specifics = CreateSpecifics(2, AdvanceAndGetTime()); - EXPECT_CALL(*processor(), Delete(_, _)); + EXPECT_CALL(*processor(), Delete(_, _, _)); auto error = bridge()->ApplyIncrementalSyncChanges( std::move(metadata_changes),
diff --git a/components/signin/public/android/java/src/org/chromium/components/signin/test/util/AccountCapabilitiesBuilder.java b/components/signin/public/android/java/src/org/chromium/components/signin/test/util/AccountCapabilitiesBuilder.java index 5f4a4a5..bdcdffb 100644 --- a/components/signin/public/android/java/src/org/chromium/components/signin/test/util/AccountCapabilitiesBuilder.java +++ b/components/signin/public/android/java/src/org/chromium/components/signin/test/util/AccountCapabilitiesBuilder.java
@@ -27,6 +27,7 @@ return this; } + /** Sets the isSubjectToParentalControls capability value. */ public AccountCapabilitiesBuilder setIsSubjectToParentalControls(boolean value) { mCapabilities.put( AccountCapabilitiesConstants.IS_SUBJECT_TO_PARENTAL_CONTROLS_CAPABILITY_NAME, @@ -34,7 +35,17 @@ return this; } - /** @return {@link AccountCapabilities} object with the capabilities set up with the builder. */ + /** Sets the canHaveEmailAddressDisplayed capability value. */ + public AccountCapabilitiesBuilder setCanHaveEmailAddressDisplayed(boolean value) { + mCapabilities.put( + AccountCapabilitiesConstants.CAN_HAVE_EMAIL_ADDRESS_DISPLAYED_CAPABILITY_NAME, + value); + return this; + } + + /** + * @return {@link AccountCapabilities} object with the capabilities set up with the builder. + */ public AccountCapabilities build() { return new AccountCapabilities((HashMap<String, Boolean>) mCapabilities.clone()); }
diff --git a/components/signin/public/base/signin_client.h b/components/signin/public/base/signin_client.h index 63bc1a31..fd53769 100644 --- a/components/signin/public/base/signin_client.h +++ b/components/signin/public/base/signin_client.h
@@ -20,7 +20,6 @@ #include "components/signin/public/base/signin_metrics.h" #include "google_apis/gaia/core_account_id.h" #include "google_apis/gaia/gaia_auth_fetcher.h" -#include "services/network/public/mojom/network_context.mojom.h" #include "third_party/abseil-cpp/absl/types/variant.h" #include "url/gurl.h" @@ -45,6 +44,7 @@ namespace mojom { class CookieManager; +class NetworkContext; } } // namespace network
diff --git a/components/sync/base/BUILD.gn b/components/sync/base/BUILD.gn index 2ad18d6..5bf2d25 100644 --- a/components/sync/base/BUILD.gn +++ b/components/sync/base/BUILD.gn
@@ -26,6 +26,8 @@ "command_line_switches.h", "data_type_histogram.cc", "data_type_histogram.h", + "deletion_origin.cc", + "deletion_origin.h", "extensions_activity.cc", "extensions_activity.h", "hash_util.cc",
diff --git a/components/sync/base/deletion_origin.cc b/components/sync/base/deletion_origin.cc new file mode 100644 index 0000000..7df4840 --- /dev/null +++ b/components/sync/base/deletion_origin.cc
@@ -0,0 +1,57 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/sync/base/deletion_origin.h" + +#include <optional> +#include <string> +#include <utility> + +#include "base/check.h" +#include "base/hash/hash.h" +#include "base/location.h" +#include "components/sync/protocol/deletion_origin.pb.h" + +namespace syncer { + +// static +DeletionOrigin DeletionOrigin::Unspecified() { + return DeletionOrigin(std::nullopt); +} + +// static +DeletionOrigin DeletionOrigin::FromLocation(base::Location location) { + return DeletionOrigin(std::move(location)); +} + +DeletionOrigin::DeletionOrigin(const DeletionOrigin& other) = default; + +DeletionOrigin::DeletionOrigin(DeletionOrigin&& other) = default; + +DeletionOrigin::~DeletionOrigin() = default; + +DeletionOrigin& DeletionOrigin::operator=(const DeletionOrigin& other) = + default; + +DeletionOrigin& DeletionOrigin::operator=(DeletionOrigin&& other) = default; + +bool DeletionOrigin::is_specified() const { + return location_.has_value(); +} + +sync_pb::DeletionOrigin DeletionOrigin::ToProto( + std::string_view chromium_version) const { + CHECK(is_specified()); + + sync_pb::DeletionOrigin proto; + proto.set_chromium_version(std::string(chromium_version)); + proto.set_file_name_hash(base::PersistentHash((location_->file_name()))); + proto.set_file_line_number(location_->line_number()); + return proto; +} + +DeletionOrigin::DeletionOrigin(std::optional<base::Location> location) + : location_(std::move(location)) {} + +} // namespace syncer
diff --git a/components/sync/base/deletion_origin.h b/components/sync/base/deletion_origin.h new file mode 100644 index 0000000..2efad518 --- /dev/null +++ b/components/sync/base/deletion_origin.h
@@ -0,0 +1,50 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_SYNC_BASE_DELETION_ORIGIN_H_ +#define COMPONENTS_SYNC_BASE_DELETION_ORIGIN_H_ + +#include <optional> +#include <string_view> + +#include "base/location.h" + +namespace sync_pb { +class DeletionOrigin; +} // namespace sync_pb + +namespace syncer { + +// Represents a fingerprint-like token that identifies, or may help identify, +// which piece of functionality is responsible for issuing a deletion that +// propagates via Sync. It is sent to the Sync server as part of deletion +// requests, as a safeguard to investigate and mitigate user reports or even +// large-scale incidents. +class DeletionOrigin { + public: + static DeletionOrigin Unspecified(); + static DeletionOrigin FromLocation(base::Location location); + + DeletionOrigin(const DeletionOrigin& other); + DeletionOrigin(DeletionOrigin&& other); + ~DeletionOrigin(); + + DeletionOrigin& operator=(const DeletionOrigin& other); + DeletionOrigin& operator=(DeletionOrigin&& other); + + // Returns true if this origin is non-empty (aka specified). + bool is_specified() const; + + // Converts to a serializable protocol buffer. Must only be called if + // `is_specified()` is true. + sync_pb::DeletionOrigin ToProto(std::string_view chromium_version) const; + + private: + explicit DeletionOrigin(std::optional<base::Location> location); + std::optional<base::Location> location_; +}; + +} // namespace syncer + +#endif // COMPONENTS_SYNC_BASE_DELETION_ORIGIN_H_
diff --git a/components/sync/engine/commit_contribution_impl.cc b/components/sync/engine/commit_contribution_impl.cc index fd3bfb9..0706c31 100644 --- a/components/sync/engine/commit_contribution_impl.cc +++ b/components/sync/engine/commit_contribution_impl.cc
@@ -253,7 +253,11 @@ commit_proto->set_name(entity_data.name); commit_proto->set_mtime(TimeToProtoTime(entity_data.modification_time)); - if (!entity_data.is_deleted()) { + if (entity_data.is_deleted()) { + if (entity_data.deletion_origin.has_value()) { + *commit_proto->mutable_deletion_origin() = *entity_data.deletion_origin; + } + } else { // Handle bookmarks separately. if (type == BOOKMARKS) { // Populate SyncEntity.folder for backward-compatibility.
diff --git a/components/sync/model/client_tag_based_model_type_processor.cc b/components/sync/model/client_tag_based_model_type_processor.cc index 3eac4a6b..0378a8eb9 100644 --- a/components/sync/model/client_tag_based_model_type_processor.cc +++ b/components/sync/model/client_tag_based_model_type_processor.cc
@@ -492,6 +492,7 @@ void ClientTagBasedModelTypeProcessor::Delete( const std::string& storage_key, + const DeletionOrigin& origin, MetadataChangeList* metadata_change_list) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DUMP_WILL_BE_CHECK(IsAllowingChanges()); @@ -508,10 +509,11 @@ return; } - if (entity->RecordLocalDeletion()) + if (entity->RecordLocalDeletion(origin)) { metadata_change_list->UpdateMetadata(storage_key, entity->metadata()); - else + } else { RemoveEntity(entity->storage_key(), metadata_change_list); + } NudgeForCommitIfNeeded(); }
diff --git a/components/sync/model/client_tag_based_model_type_processor.h b/components/sync/model/client_tag_based_model_type_processor.h index 67824234..6e5576a 100644 --- a/components/sync/model/client_tag_based_model_type_processor.h +++ b/components/sync/model/client_tag_based_model_type_processor.h
@@ -68,6 +68,7 @@ std::unique_ptr<EntityData> entity_data, MetadataChangeList* metadata_change_list) override; void Delete(const std::string& storage_key, + const DeletionOrigin& origin, MetadataChangeList* metadata_change_list) override; void UpdateStorageKey(const EntityData& entity_data, const std::string& storage_key,
diff --git a/components/sync/model/model_type_change_processor.h b/components/sync/model/model_type_change_processor.h index d459d8d..ed94e42 100644 --- a/components/sync/model/model_type_change_processor.h +++ b/components/sync/model/model_type_change_processor.h
@@ -12,6 +12,7 @@ #include "base/memory/weak_ptr.h" #include "base/time/time.h" +#include "components/sync/base/deletion_origin.h" #include "components/sync/base/model_type.h" #include "components/sync/model/model_error.h" #include "components/sync/model/model_type_controller_delegate.h" @@ -30,26 +31,35 @@ ModelTypeChangeProcessor() = default; virtual ~ModelTypeChangeProcessor() = default; - // Inform the processor of a new or updated entity. The |entity_data| param + // Inform the processor of a new or updated entity. The `entity_data` param // does not need to be fully set, but it should at least have specifics and // non-unique name. The processor will fill in the rest if the bridge does - // not have a reason to care. For example, if |client_tag_hash| is not set, + // not have a reason to care. For example, if `client_tag_hash` is not set, // the bridge's GetClientTag() will be exercised (and must be supported). virtual void Put(const std::string& storage_key, std::unique_ptr<EntityData> entity_data, MetadataChangeList* metadata_change_list) = 0; // Inform the processor of a deleted entity. The call is ignored if - // |storage_key| is unknown. + // `storage_key` is unknown. `origin` allows providing fine-grained + // information about which codepath the deletion is coming from. virtual void Delete(const std::string& storage_key, + const DeletionOrigin& origin, MetadataChangeList* metadata_change_list) = 0; + // Convenience overload without DeletionOrigin. + // TODO(crbug.com/334001702): Remove this overload. + void Delete(const std::string& storage_key, + MetadataChangeList* metadata_change_list) { + Delete(storage_key, DeletionOrigin::Unspecified(), metadata_change_list); + } + // Sets storage key for the new entity. This function only applies to // datatypes that can't generate storage key based on EntityData. Bridge // should call this function when handling // MergeFullSyncData/ApplyIncrementalSyncChanges to inform the processor about - // |storage_key| of an entity identified by |entity_data|. Metadata changes - // about new entity will be appended to |metadata_change_list|. + // `storage_key` of an entity identified by `entity_data`. Metadata changes + // about new entity will be appended to `metadata_change_list`. virtual void UpdateStorageKey(const EntityData& entity_data, const std::string& storage_key, MetadataChangeList* metadata_change_list) = 0; @@ -58,12 +68,12 @@ // that support local deletions that should not get synced up (e.g. TYPED_URL // does not sync up deletions of expired URLs). If the deletion should get // synced up, use change_processor()->Delete() instead. The call is ignored if - // |storage_key| is unknown. + // `storage_key` is unknown. virtual void UntrackEntityForStorageKey(const std::string& storage_key) = 0; // Remove entity metadata and do not track the entity, exactly like // UntrackEntityForStorageKey() above. This method may be called even if - // entity does not have storage key. The call is ignored if |client_tag_hash| + // entity does not have storage key. The call is ignored if `client_tag_hash` // is unknown. virtual void UntrackEntityForClientTagHash( const ClientTagHash& client_tag_hash) = 0; @@ -86,11 +96,11 @@ const std::string& storage_key) const = 0; // Pass the pointer to the processor so that the processor can notify the - // bridge of various events; |bridge| must not be nullptr and must outlive + // bridge of various events; `bridge` must not be nullptr and must outlive // this object. virtual void OnModelStarting(ModelTypeSyncBridge* bridge) = 0; - // The |bridge| is expected to call this exactly once unless it encounters an + // The `bridge` is expected to call this exactly once unless it encounters an // error. Ideally ModelReadyToSync() is called as soon as possible during // initialization, and must be called before invoking either Put() or // Delete(). The bridge needs to be able to synchronously handle @@ -128,7 +138,7 @@ virtual base::WeakPtr<ModelTypeControllerDelegate> GetControllerDelegate() = 0; - // Returns the cached version of remote entity specifics for |storage_key| if + // Returns the cached version of remote entity specifics for `storage_key` if // available. These specifics can be fully or partially trimmed (proto fields // cleared) according to the bridge's logic in // TrimAllSupportedFieldsFromRemoteSpecifics().
diff --git a/components/sync/model/processor_entity.cc b/components/sync/model/processor_entity.cc index 0d69056..a1495718 100644 --- a/components/sync/model/processor_entity.cc +++ b/components/sync/model/processor_entity.cc
@@ -11,6 +11,7 @@ #include "base/memory/ptr_util.h" #include "base/trace_event/memory_usage_estimator.h" #include "components/sync/base/client_tag_hash.h" +#include "components/sync/base/deletion_origin.h" #include "components/sync/base/features.h" #include "components/sync/base/time.h" #include "components/sync/engine/commit_and_get_updates_types.h" @@ -224,13 +225,18 @@ SetCommitData(std::move(data)); } -bool ProcessorEntity::RecordLocalDeletion() { +bool ProcessorEntity::RecordLocalDeletion(const DeletionOrigin& origin) { IncrementSequenceNumber(base::Time::Now()); metadata_.set_modification_time(TimeToProtoTime(base::Time::Now())); metadata_.set_is_deleted(true); metadata_.clear_specifics_hash(); metadata_.clear_possibly_trimmed_base_specifics(); + if (origin.is_specified()) { + *metadata_.mutable_deletion_origin() = + origin.ToProto(version_info::GetVersionNumber()); + } + if (base::FeatureList::IsEnabled( syncer::kSyncEntityMetadataRecordDeletedByVersionOnLocalDeletion)) { metadata_.set_deleted_by_version( @@ -270,6 +276,9 @@ data->id = metadata_.server_id(); data->creation_time = ProtoTimeToTime(metadata_.creation_time()); data->modification_time = ProtoTimeToTime(metadata_.modification_time()); + if (metadata_.has_deletion_origin()) { + data->deletion_origin = metadata_.deletion_origin(); + } request->entity = std::move(data); }
diff --git a/components/sync/model/processor_entity.h b/components/sync/model/processor_entity.h index ce6658f..17222dc 100644 --- a/components/sync/model/processor_entity.h +++ b/components/sync/model/processor_entity.h
@@ -13,6 +13,7 @@ #include <utility> #include "base/time/time.h" +#include "components/sync/base/deletion_origin.h" #include "components/sync/protocol/entity_metadata.pb.h" namespace sync_pb { @@ -95,7 +96,7 @@ // Applies a local deletion to this item. Returns true if entity was // previously committed to server and tombstone should be sent. - bool RecordLocalDeletion(); + bool RecordLocalDeletion(const DeletionOrigin& origin); // Initializes a message representing this item's uncommitted state // and assumes that it is forwarded to the sync engine for commiting.
diff --git a/components/sync/model/processor_entity_tracker_unittest.cc b/components/sync/model/processor_entity_tracker_unittest.cc index b6fbad24..ad75bca 100644 --- a/components/sync/model/processor_entity_tracker_unittest.cc +++ b/components/sync/model/processor_entity_tracker_unittest.cc
@@ -253,7 +253,7 @@ ASSERT_EQ(kStorageKey1, entity->storage_key()); // Mark the entity as removed. - entity->RecordLocalDeletion(); + entity->RecordLocalDeletion(DeletionOrigin::Unspecified()); ASSERT_EQ(1u, entity_tracker_.size()); ASSERT_EQ(0u, entity_tracker_.CountNonTombstoneEntries()); @@ -274,7 +274,7 @@ ASSERT_EQ(kStorageKey1, entity->storage_key()); // Mark the entity as removed. - entity->RecordLocalDeletion(); + entity->RecordLocalDeletion(DeletionOrigin::Unspecified()); ASSERT_EQ(1u, entity_tracker_.size()); ASSERT_EQ(0u, entity_tracker_.CountNonTombstoneEntries());
diff --git a/components/sync/model/processor_entity_unittest.cc b/components/sync/model/processor_entity_unittest.cc index 5283a07..37d7900 100644 --- a/components/sync/model/processor_entity_unittest.cc +++ b/components/sync/model/processor_entity_unittest.cc
@@ -450,7 +450,7 @@ const std::string specifics_hash = entity->metadata().specifics_hash(); // Make a local delete. - entity->RecordLocalDeletion(); + entity->RecordLocalDeletion(DeletionOrigin::Unspecified()); EXPECT_TRUE(entity->metadata().is_deleted()); EXPECT_EQ(1, entity->metadata().sequence_number()); @@ -490,6 +490,7 @@ EXPECT_EQ(1, request.sequence_number); EXPECT_EQ(1, request.base_version); EXPECT_EQ(entity->metadata().specifics_hash(), request.specifics_hash); + EXPECT_FALSE(entity->metadata().has_deletion_origin()); // Ack the deletion. entity->ReceiveCommitResponse(GenerateAckData(request, kId, 2), false); @@ -510,12 +511,38 @@ EXPECT_FALSE(entity->HasCommitData()); } +TEST_F(ProcessorEntityTest, LocalDeletionWithSpecifiedOrigin) { + std::unique_ptr<ProcessorEntity> entity = CreateSynced(); + const std::string specifics_hash = entity->metadata().specifics_hash(); + const base::Location location = FROM_HERE; + + // Make a local delete. + entity->RecordLocalDeletion(DeletionOrigin::FromLocation(location)); + + ASSERT_TRUE(entity->metadata().is_deleted()); + ASSERT_TRUE(entity->IsUnsynced()); + ASSERT_TRUE(entity->RequiresCommitRequest()); + + // Generate a commit request. The metadata should not change. + const sync_pb::EntityMetadata metadata_v1 = entity->metadata(); + CommitRequestData request; + entity->InitializeCommitRequestData(&request); + EXPECT_EQ(metadata_v1.SerializeAsString(), + entity->metadata().SerializeAsString()); + + EXPECT_TRUE(entity->metadata().has_deletion_origin()); + EXPECT_EQ(location.line_number(), + entity->metadata().deletion_origin().file_line_number()); + EXPECT_TRUE(entity->metadata().deletion_origin().has_file_name_hash()); + EXPECT_TRUE(entity->metadata().deletion_origin().has_chromium_version()); +} + // Test a local deletion followed by an undeletion (creation). TEST_F(ProcessorEntityTest, LocalUndeletion) { std::unique_ptr<ProcessorEntity> entity = CreateSynced(); const std::string specifics_hash = entity->metadata().specifics_hash(); - entity->RecordLocalDeletion(); + entity->RecordLocalDeletion(DeletionOrigin::FromLocation(FROM_HERE)); ASSERT_TRUE(entity->metadata().is_deleted()); ASSERT_TRUE(entity->IsUnsynced()); ASSERT_EQ(1, entity->metadata().sequence_number()); @@ -744,7 +771,7 @@ {syncer::kSyncEntityMetadataRecordDeletedByVersionOnLocalDeletion}); std::unique_ptr<ProcessorEntity> entity = CreateNew(); - entity->RecordLocalDeletion(); + entity->RecordLocalDeletion(DeletionOrigin::FromLocation(FROM_HERE)); EXPECT_FALSE(entity->metadata().has_deleted_by_version()); } @@ -754,7 +781,7 @@ {syncer::kSyncEntityMetadataRecordDeletedByVersionOnLocalDeletion}, {/* disabled_features */}); std::unique_ptr<ProcessorEntity> entity = CreateNew(); - entity->RecordLocalDeletion(); + entity->RecordLocalDeletion(DeletionOrigin::FromLocation(FROM_HERE)); std::string expected_version = std::string(version_info::GetVersionNumber()); EXPECT_EQ(expected_version, entity->metadata().deleted_by_version()); }
diff --git a/components/sync/model/syncable_service_based_bridge_unittest.cc b/components/sync/model/syncable_service_based_bridge_unittest.cc index db8b0c5d..c1f26311 100644 --- a/components/sync/model/syncable_service_based_bridge_unittest.cc +++ b/components/sync/model/syncable_service_based_bridge_unittest.cc
@@ -448,7 +448,7 @@ ASSERT_THAT(GetAllData(), ElementsAre(Pair(kClientTagHash.value(), HasName("name1")))); - EXPECT_CALL(mock_processor_, Delete(kClientTagHash.value(), NotNull())); + EXPECT_CALL(mock_processor_, Delete(kClientTagHash.value(), _, NotNull())); SyncChangeList change_list; change_list.emplace_back(FROM_HERE, SyncChange::ACTION_DELETE,
diff --git a/components/sync/protocol/autofill_specifics.proto b/components/sync/protocol/autofill_specifics.proto index 74c0dbe..1c1e3ccb 100644 --- a/components/sync/protocol/autofill_specifics.proto +++ b/components/sync/protocol/autofill_specifics.proto
@@ -161,6 +161,10 @@ // address_home_dependent_locality. Note that some address forms require the // combination of both in a single field as opposed to each one separately. optional string address_home_street_location_and_locality = 89; + // Combination of types address_home_thoroughfare_number and + // address_home_apt. Note that some address forms require the combination of + // both in a single field as opposed to each one separately. + optional string address_home_thoroughfare_number_and_apt = 91; // Validation status records for address fields. optional VerificationStatus address_home_city_status = 43; @@ -178,6 +182,8 @@ optional VerificationStatus address_home_overflow_and_landmark_status = 84; optional VerificationStatus address_home_street_location_and_locality_status = 90; + optional VerificationStatus address_home_thoroughfare_number_and_apt_status = + 92; optional VerificationStatus address_home_street_address_status = 47; optional VerificationStatus address_home_sorting_code_status = 48; optional VerificationStatus address_home_dependent_locality_status = 49;
diff --git a/components/sync/protocol/contact_info_specifics.proto b/components/sync/protocol/contact_info_specifics.proto index 7ebe1e8..3c62fcb 100644 --- a/components/sync/protocol/contact_info_specifics.proto +++ b/components/sync/protocol/contact_info_specifics.proto
@@ -197,6 +197,10 @@ // address_dependent_locality. Note that some address forms require the // combination of both in a single field as opposed to each one separately. optional StringToken address_street_location_and_locality = 52; + // Combination of types address_thoroughfare_number and address_apt. Note that + // some address forms require the combination of both in a single field as + // opposed to each one separately. + optional StringToken address_thoroughfare_number_and_apt = 53; // Phone. optional StringToken phone_home_whole_number = 33;
diff --git a/components/sync/protocol/deletion_origin.proto b/components/sync/protocol/deletion_origin.proto new file mode 100644 index 0000000..e61278ab --- /dev/null +++ b/components/sync/protocol/deletion_origin.proto
@@ -0,0 +1,43 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Protobuf representation of the DeletionOrigin class. + +// If you change or add any fields in this file, update proto_visitors.h and +// potentially proto_enum_conversions.{h, cc}. + +syntax = "proto2"; + +option java_multiple_files = true; +option java_package = "org.chromium.components.sync.protocol"; + +option optimize_for = LITE_RUNTIME; + +package sync_pb; + +// Represents a fingerprint-like token that identifies, or may help identity, +// which piece of functionality is responsible for issuing a deletion that +// propagates via Sync. It is sent to the Sync server as part of deletion +// requests, as a safeguard to investigate and mitigate user reports or even +// large-scale incidents. +message DeletionOrigin { + // Populated by chromium-based browsers with the version that originally + // created the deletion. This will often be the same as the version that + // uploaded (committed) the deletion, but in rare cases the latter could be + // greater (i.e. the browser was updated in between). + optional string chromium_version = 1; + + // Reserved for Google Play Services version information. + reserved 2; + + // Hash of the filename in the source code where the deletion originated. The + // precise hashing function is unspecified and may change over time. It may + // only be assumed that the hashing function is the same for a given version + // of the client (see fields above). Hashing is used instead of including the + // actual name to reduce the size of this message. + optional fixed32 file_name_hash = 3; + + // Line of code where the deletion originated. + optional int32 file_line_number = 4; +}
diff --git a/components/sync/protocol/entity_data.cc b/components/sync/protocol/entity_data.cc index 916d759..b238055 100644 --- a/components/sync/protocol/entity_data.cc +++ b/components/sync/protocol/entity_data.cc
@@ -62,6 +62,9 @@ memory_usage += EstimateMemoryUsage(legacy_parent_id); memory_usage += EstimateMemoryUsage(recipient_public_key); memory_usage += EstimateMemoryUsage(collaboration_id); + if (deletion_origin.has_value()) { + memory_usage += EstimateMemoryUsage(*deletion_origin); + } return memory_usage; }
diff --git a/components/sync/protocol/entity_data.h b/components/sync/protocol/entity_data.h index 7b8944a9..ac7a32c6 100644 --- a/components/sync/protocol/entity_data.h +++ b/components/sync/protocol/entity_data.h
@@ -12,6 +12,7 @@ #include "base/time/time.h" #include "base/values.h" #include "components/sync/base/client_tag_hash.h" +#include "components/sync/protocol/deletion_origin.pb.h" #include "components/sync/protocol/entity_specifics.pb.h" namespace syncer { @@ -94,6 +95,10 @@ // specifics hasn't been set. bool is_deleted() const { return specifics.ByteSize() == 0; } + // Optionally populated for outgoing deletions. See corresponding field in + // SyncEntity for details. + std::optional<sync_pb::DeletionOrigin> deletion_origin; + // Dumps all info into a base::Value::Dict and returns it. base::Value::Dict ToDictionaryValue() const;
diff --git a/components/sync/protocol/entity_metadata.proto b/components/sync/protocol/entity_metadata.proto index f3293351..94e709c8 100644 --- a/components/sync/protocol/entity_metadata.proto +++ b/components/sync/protocol/entity_metadata.proto
@@ -14,6 +14,7 @@ package sync_pb; +import "components/sync/protocol/deletion_origin.proto"; import "components/sync/protocol/entity_specifics.proto"; import "components/sync/protocol/unique_position.proto"; @@ -98,4 +99,9 @@ optional string collaboration_id = 1; } optional CollaborationMetadata collaboration = 15; + + // Optionally present for committed deletions (but may remain unset if the + // origin is unspecified), it represents which piece of code triggered a + // deletion. Introduced in M126. + optional DeletionOrigin deletion_origin = 16; }
diff --git a/components/sync/protocol/proto_memory_estimations.cc b/components/sync/protocol/proto_memory_estimations.cc index fb4e437..48365c4 100644 --- a/components/sync/protocol/proto_memory_estimations.cc +++ b/components/sync/protocol/proto_memory_estimations.cc
@@ -149,6 +149,7 @@ INSTANTIATE(CrossUserSharingPublicKey) INSTANTIATE(DataTypeContext) INSTANTIATE(DataTypeProgressMarker) +INSTANTIATE(DeletionOrigin) INSTANTIATE(EntityMetadata) INSTANTIATE(EntitySpecifics) INSTANTIATE(ModelTypeState)
diff --git a/components/sync/protocol/proto_visitors.h b/components/sync/protocol/proto_visitors.h index 7ae00ab3..155758f 100644 --- a/components/sync/protocol/proto_visitors.h +++ b/components/sync/protocol/proto_visitors.h
@@ -19,6 +19,7 @@ #include "components/sync/protocol/compare_specifics.pb.h" #include "components/sync/protocol/contact_info_specifics.pb.h" #include "components/sync/protocol/data_type_progress_marker.pb.h" +#include "components/sync/protocol/deletion_origin.pb.h" #include "components/sync/protocol/dictionary_specifics.pb.h" #include "components/sync/protocol/encryption.pb.h" #include "components/sync/protocol/entity_metadata.pb.h" @@ -251,6 +252,7 @@ VISIT(address_home_apt_num); VISIT(address_home_apt_type); VISIT(address_home_street_location_and_locality); + VISIT(address_home_thoroughfare_number_and_apt); VISIT_ENUM(address_home_city_status); VISIT_ENUM(address_home_state_status); @@ -274,6 +276,7 @@ VISIT_ENUM(address_home_apt_num_status); VISIT_ENUM(address_home_apt_type_status); VISIT_ENUM(address_home_street_location_and_locality_status); + VISIT_ENUM(address_home_thoroughfare_number_and_apt_status); VISIT(address_home_language_code); VISIT_REP(phone_home_whole_number); @@ -395,6 +398,7 @@ VISIT(address_between_streets_or_landmark); VISIT(address_overflow_and_landmark); VISIT(address_street_location_and_locality); + VISIT(address_thoroughfare_number_and_apt); } VISIT_PROTO_FIELDS(const sync_pb::ContactInfoSpecifics::Observation& proto) { @@ -533,6 +537,12 @@ VISIT(events_dropped); } +VISIT_PROTO_FIELDS(const sync_pb::DeletionOrigin& proto) { + VISIT(chromium_version); + VISIT(file_name_hash); + VISIT(file_line_number); +} + VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) { VISIT(cache_guid); VISIT(client_name); @@ -609,6 +619,7 @@ VISIT(possibly_trimmed_base_specifics); VISIT(deleted_by_version); VISIT(collaboration); + VISIT(deletion_origin); } VISIT_PROTO_FIELDS( @@ -1298,6 +1309,7 @@ VISIT(folder); VISIT(client_tag_hash); VISIT(collaboration); + VISIT(deletion_origin); } VISIT_PROTO_FIELDS(const sync_pb::SyncEntity::CollaborationMetadata& proto) {
diff --git a/components/sync/protocol/protocol_sources.gni b/components/sync/protocol/protocol_sources.gni index 37991bc..c433870 100644 --- a/components/sync/protocol/protocol_sources.gni +++ b/components/sync/protocol/protocol_sources.gni
@@ -19,6 +19,7 @@ "compare_specifics.proto", "contact_info_specifics.proto", "data_type_progress_marker.proto", + "deletion_origin.proto", "device_info_specifics.proto", "dictionary_specifics.proto", "encryption.proto",
diff --git a/components/sync/protocol/sync_entity.proto b/components/sync/protocol/sync_entity.proto index 2cfc4de..67b34b2 100644 --- a/components/sync/protocol/sync_entity.proto +++ b/components/sync/protocol/sync_entity.proto
@@ -11,6 +11,7 @@ package sync_pb; +import "components/sync/protocol/deletion_origin.proto"; import "components/sync/protocol/entity_specifics.proto"; import "components/sync/protocol/unique_position.proto"; @@ -230,4 +231,12 @@ optional string collaboration_id = 1; } optional CollaborationMetadata collaboration = 27; + + // Optionally present in CommitMessage for committed deletions (but may remain + // unset if the origin is unspecified), it represents which piece of code + // triggered a deletion. It is a debug-only field with no compatibility + // guarantees, subject to change over time. The main purpose is to help with + // investigating and mitigating user reports or incidents that cause data + // deletion. Introduced in M126. + optional DeletionOrigin deletion_origin = 28; }
diff --git a/components/sync/test/forwarding_model_type_change_processor.cc b/components/sync/test/forwarding_model_type_change_processor.cc index 069e2e4..d35bfeb 100644 --- a/components/sync/test/forwarding_model_type_change_processor.cc +++ b/components/sync/test/forwarding_model_type_change_processor.cc
@@ -27,8 +27,9 @@ void ForwardingModelTypeChangeProcessor::Delete( const std::string& client_tag, + const DeletionOrigin& origin, MetadataChangeList* metadata_change_list) { - other_->Delete(client_tag, metadata_change_list); + other_->Delete(client_tag, origin, metadata_change_list); } void ForwardingModelTypeChangeProcessor::UpdateStorageKey(
diff --git a/components/sync/test/forwarding_model_type_change_processor.h b/components/sync/test/forwarding_model_type_change_processor.h index f226284..bfd06a9 100644 --- a/components/sync/test/forwarding_model_type_change_processor.h +++ b/components/sync/test/forwarding_model_type_change_processor.h
@@ -27,6 +27,7 @@ std::unique_ptr<EntityData> entity_data, MetadataChangeList* metadata_change_list) override; void Delete(const std::string& client_tag, + const DeletionOrigin& origin, MetadataChangeList* metadata_change_list) override; void UpdateStorageKey(const EntityData& entity_data, const std::string& storage_key,
diff --git a/components/sync/test/mock_model_type_change_processor.cc b/components/sync/test/mock_model_type_change_processor.cc index d1b2494..cbda7673 100644 --- a/components/sync/test/mock_model_type_change_processor.cc +++ b/components/sync/test/mock_model_type_change_processor.cc
@@ -41,8 +41,13 @@ delegate->Put(storage_key, std::move(entity_data), metadata_change_list); }); + // Lambda is used instead of testing::Invoke() due to overloads. ON_CALL(*this, Delete) - .WillByDefault(Invoke(delegate, &ModelTypeChangeProcessor::Delete)); + .WillByDefault([delegate](const std::string& storage_key, + const DeletionOrigin& origin, + MetadataChangeList* metadata_change_list) { + delegate->Delete(storage_key, origin, metadata_change_list); + }); ON_CALL(*this, UpdateStorageKey) .WillByDefault( Invoke(delegate, &ModelTypeChangeProcessor::UpdateStorageKey));
diff --git a/components/sync/test/mock_model_type_change_processor.h b/components/sync/test/mock_model_type_change_processor.h index dc91008..046221b1 100644 --- a/components/sync/test/mock_model_type_change_processor.h +++ b/components/sync/test/mock_model_type_change_processor.h
@@ -35,6 +35,7 @@ MOCK_METHOD(void, Delete, (const std::string& storage_key, + const DeletionOrigin& origin, MetadataChangeList* metadata_change_list), (override)); MOCK_METHOD(void,
diff --git a/components/sync_sessions/session_sync_bridge_unittest.cc b/components/sync_sessions/session_sync_bridge_unittest.cc index ed86166..f803598 100644 --- a/components/sync_sessions/session_sync_bridge_unittest.cc +++ b/components/sync_sessions/session_sync_bridge_unittest.cc
@@ -970,7 +970,7 @@ // Completing the commit for the previously closed tab should issue a // deletion. For that to trigger, we need to trigger the next association, // which we do by navigating in one of the open tabs. - EXPECT_CALL(mock_processor(), Delete(tab_storage_key2, _)); + EXPECT_CALL(mock_processor(), Delete(tab_storage_key2, _, _)); real_processor()->OnCommitCompleted( GetModelTypeStateWithInitialSyncDone(), {CreateSuccessResponse(tab_client_tag2)}, @@ -1745,8 +1745,8 @@ ASSERT_TRUE(real_processor()->IsTrackingMetadata()); // Mimic the user requesting a session deletion from the UI. - EXPECT_CALL(mock_processor(), Delete(foreign_header_storage_key, _)); - EXPECT_CALL(mock_processor(), Delete(foreign_tab_storage_key, _)); + EXPECT_CALL(mock_processor(), Delete(foreign_header_storage_key, _, _)); + EXPECT_CALL(mock_processor(), Delete(foreign_tab_storage_key, _, _)); EXPECT_CALL(mock_foreign_session_updated_cb(), Run()); bridge()->GetOpenTabsUIDelegate()->DeleteForeignSession(kForeignSessionTag); @@ -1827,11 +1827,12 @@ recent_mtime)); // During garbage collection, we expect |kStaleSessionTag| to be deleted. - EXPECT_CALL(mock_processor(), - Delete(SessionStore::GetHeaderStorageKey(kStaleSessionTag), _)); EXPECT_CALL( mock_processor(), - Delete(SessionStore::GetTabStorageKey(kStaleSessionTag, kTabNodeId), _)); + Delete(SessionStore::GetHeaderStorageKey(kStaleSessionTag), _, _)); + EXPECT_CALL(mock_processor(), Delete(SessionStore::GetTabStorageKey( + kStaleSessionTag, kTabNodeId), + _, _)); EXPECT_CALL(mock_foreign_session_updated_cb(), Run()).Times(AtLeast(1)); real_processor()->OnUpdateReceived(GetModelTypeStateWithInitialSyncDone(),
diff --git a/components/test/data/autofill/heuristics-json/internal b/components/test/data/autofill/heuristics-json/internal index 6591e63..473c84d 160000 --- a/components/test/data/autofill/heuristics-json/internal +++ b/components/test/data/autofill/heuristics-json/internal
@@ -1 +1 @@ -Subproject commit 6591e633c04b874832949a40770684f2b91125fe +Subproject commit 473c84dc5736e2cd3fc80f8493cd30684357c847
diff --git a/components/user_manager/BUILD.gn b/components/user_manager/BUILD.gn index cda96796..e094a03 100644 --- a/components/user_manager/BUILD.gn +++ b/components/user_manager/BUILD.gn
@@ -70,6 +70,7 @@ deps += [ "//ash/constants", "//chromeos/ash/components/install_attributes", + "//chromeos/ash/components/settings", "//components/prefs", "//skia", "//ui/base",
diff --git a/components/user_manager/DEPS b/components/user_manager/DEPS index 2d9a19c..ff33c42f 100644 --- a/components/user_manager/DEPS +++ b/components/user_manager/DEPS
@@ -1,6 +1,7 @@ include_rules = [ "+ash/constants", "+chromeos/ash/components/install_attributes", + "+chromeos/ash/components/settings", "+components/account_id/account_id.h", "+components/prefs", "+components/crash/core/common",
diff --git a/components/user_manager/user_manager.h b/components/user_manager/user_manager.h index dd7ac80b..335ba3b 100644 --- a/components/user_manager/user_manager.h +++ b/components/user_manager/user_manager.h
@@ -184,6 +184,9 @@ // has a policy that prohibits it to be part of multi-profile session. virtual UserList GetUsersAllowedForMultiProfile() const = 0; + // Returns users allowed on login screen in the given `users` list. + virtual UserList FindLoginAllowedUsersFrom(const UserList& users) const = 0; + // Returns a list of users who are currently logged in. virtual const UserList& GetLoggedInUsers() const = 0;
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc index a3d7617..ac83f6a9 100644 --- a/components/user_manager/user_manager_base.cc +++ b/components/user_manager/user_manager_base.cc
@@ -30,6 +30,8 @@ #include "base/system/sys_info.h" #include "base/task/single_thread_task_runner.h" #include "base/values.h" +#include "chromeos/ash/components/settings/cros_settings.h" +#include "chromeos/ash/components/settings/cros_settings_names.h" #include "components/crash/core/common/crash_key.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" @@ -135,6 +137,31 @@ return users_; } +UserList UserManagerBase::FindLoginAllowedUsersFrom( + const UserList& users) const { + bool show_users_on_signin; + cros_settings_->GetBoolean(ash::kAccountsPrefShowUserNamesOnSignIn, + &show_users_on_signin); + UserList found_users; + for (User* user : users) { + // Skip kiosk apps for login screen user list. Kiosk apps as pods (aka new + // kiosk UI) is currently disabled and it gets the apps directly from + // KioskChromeAppManager, ArcKioskAppManager and WebKioskAppManager. + if (user->IsKioskType()) { + continue; + } + const bool meets_allowlist_requirements = + !user->HasGaiaAccount() || IsGaiaUserAllowed(*user); + // Public session accounts are always shown on login screen. + const bool meets_show_users_requirements = + show_users_on_signin || user->GetType() == UserType::kPublicAccount; + if (meets_allowlist_requirements && meets_show_users_requirements) { + found_users.push_back(user); + } + } + return found_users; +} + const UserList& UserManagerBase::GetLoggedInUsers() const { return logged_in_users_; }
diff --git a/components/user_manager/user_manager_base.h b/components/user_manager/user_manager_base.h index 6878a46..6e3e067 100644 --- a/components/user_manager/user_manager_base.h +++ b/components/user_manager/user_manager_base.h
@@ -105,6 +105,7 @@ // UserManager implementation: void Shutdown() override; const UserList& GetUsers() const override; + UserList FindLoginAllowedUsersFrom(const UserList& users) const final; const UserList& GetLoggedInUsers() const override; const UserList& GetLRULoggedInUsers() const override; const AccountId& GetOwnerAccountId() const override;
diff --git a/components/web_package/signed_web_bundles/signed_web_bundle_signature_verifier_unittest.cc b/components/web_package/signed_web_bundles/signed_web_bundle_signature_verifier_unittest.cc index 397c48a..5a3de86 100644 --- a/components/web_package/signed_web_bundles/signed_web_bundle_signature_verifier_unittest.cc +++ b/components/web_package/signed_web_bundles/signed_web_bundle_signature_verifier_unittest.cc
@@ -314,18 +314,22 @@ SignedWebBundleSignatureVerifierTest, ::testing::Values( // one signature - std::make_pair(std::vector{WebBundleSigner::KeyPair::CreateRandom()}, - std::nullopt), std::make_pair( - std::vector{WebBundleSigner::KeyPair::CreateRandom( - /*produce_invalid_signature=*/true)}, + std::vector<WebBundleSigner::KeyPair>{ + WebBundleSigner::Ed25519KeyPair::CreateRandom()}, + std::nullopt), + std::make_pair( + std::vector<WebBundleSigner::KeyPair>{ + WebBundleSigner::Ed25519KeyPair::CreateRandom( + /*produce_invalid_signature=*/true)}, SignedWebBundleSignatureVerifier::Error::ForInvalidSignature( "The signature is invalid.")), // two signatures std::make_pair( - std::vector{WebBundleSigner::KeyPair::CreateRandom(), - WebBundleSigner::KeyPair::CreateRandom()}, + std::vector<WebBundleSigner::KeyPair>{ + WebBundleSigner::Ed25519KeyPair::CreateRandom(), + WebBundleSigner::Ed25519KeyPair::CreateRandom()}, SignedWebBundleSignatureVerifier::Error::ForInvalidSignature( "Only a single signature is currently supported, got 2 " "signatures."))),
diff --git a/components/web_package/test_support/signed_web_bundles/web_bundle_signer.cc b/components/web_package/test_support/signed_web_bundles/web_bundle_signer.cc index 48fa19d..4eaafea 100644 --- a/components/web_package/test_support/signed_web_bundles/web_bundle_signer.cc +++ b/components/web_package/test_support/signed_web_bundles/web_bundle_signer.cc
@@ -6,6 +6,7 @@ #include "base/containers/extend.h" #include "base/containers/to_vector.h" +#include "base/functional/overloaded.h" #include "components/cbor/values.h" #include "components/cbor/writer.h" #include "components/web_package/signed_web_bundles/ed25519_public_key.h" @@ -15,6 +16,85 @@ namespace web_package { +namespace { + +using ErrorForTesting = WebBundleSigner::ErrorForTesting; +using ErrorsForTesting = WebBundleSigner::ErrorsForTesting; + +cbor::Value CreateSignatureStackEntryAttributes( + const Ed25519PublicKey& public_key, + ErrorsForTesting errors_for_testing = {}) { + std::vector<uint8_t> public_key_bytes = base::ToVector(public_key.bytes()); + if (errors_for_testing.Has(ErrorForTesting::kInvalidPublicKeyLength)) { + public_key_bytes.push_back(42); + } + + cbor::Value::MapValue attributes; + + if (!errors_for_testing.Has( + ErrorForTesting::kNoPublicKeySignatureStackEntryAttribute)) { + if (errors_for_testing.Has( + ErrorForTesting::kWrongSignatureStackEntryAttributeName)) { + // Add a typo: "ee" instead of "ed". + attributes[cbor::Value("ee25519PublicKey")] = + cbor::Value(public_key_bytes); + } else if (errors_for_testing.Has( + ErrorForTesting:: + kWrongSignatureStackEntryAttributeNameLength)) { + attributes[cbor::Value("ed25519")] = cbor::Value(public_key_bytes); + + } else { + attributes[cbor::Value("ed25519PublicKey")] = + cbor::Value(public_key_bytes); + } + } + + if (errors_for_testing.Has( + ErrorForTesting::kAdditionalSignatureStackEntryAttribute)) { + attributes[cbor::Value("foo")] = cbor::Value(42); + } + + return cbor::Value(attributes); +} + +cbor::Value CreateSignatureStackEntry( + const Ed25519PublicKey& public_key, + std::vector<uint8_t> signature, + ErrorsForTesting errors_for_testing = {}) { + if (errors_for_testing.Has(ErrorForTesting::kInvalidSignatureLength)) { + signature.push_back(42); + } + + cbor::Value::ArrayValue entry; + entry.emplace_back( + CreateSignatureStackEntryAttributes(public_key, errors_for_testing)); + entry.emplace_back(signature); + + if (errors_for_testing.Has( + ErrorForTesting::kAdditionalSignatureStackEntryElement)) { + entry.emplace_back("foo"); + } + + return cbor::Value(entry); +} + +std::vector<uint8_t> SignMessage( + base::span<const uint8_t> message, + const WebBundleSigner::Ed25519KeyPair& key_pair) { + std::vector<uint8_t> signature(ED25519_SIGNATURE_LEN); + CHECK_EQ(key_pair.private_key.size(), + static_cast<size_t>(ED25519_PRIVATE_KEY_LEN)); + CHECK_EQ(ED25519_sign(signature.data(), message.data(), message.size(), + key_pair.private_key.data()), + 1); + if (key_pair.produce_invalid_signature) { + signature[0] ^= 0xff; + } + return signature; +} + +} // namespace + cbor::Value WebBundleSigner::CreateIntegrityBlock( const cbor::Value::ArrayValue& signature_stack, ErrorsForTesting errors_for_testing) { @@ -37,60 +117,6 @@ return cbor::Value(integrity_block); } -cbor::Value WebBundleSigner::CreateSignatureStackEntry( - const Ed25519PublicKey& public_key, - std::vector<uint8_t> signature, - ErrorsForTesting errors_for_testing) { - if (errors_for_testing.Has(ErrorForTesting::kInvalidSignatureLength)) { - signature.push_back(42); - } - - cbor::Value::ArrayValue entry; - entry.emplace_back(CreateSignatureStackEntryAttributes( - base::ToVector(public_key.bytes()), errors_for_testing)); - entry.emplace_back(signature); - - if (errors_for_testing.Has( - ErrorForTesting::kAdditionalSignatureStackEntryElement)) { - entry.emplace_back("foo"); - } - - return cbor::Value(entry); -} - -cbor::Value WebBundleSigner::CreateSignatureStackEntryAttributes( - std::vector<uint8_t> public_key, - ErrorsForTesting errors_for_testing) { - if (errors_for_testing.Has(ErrorForTesting::kInvalidPublicKeyLength)) { - public_key.push_back(42); - } - - cbor::Value::MapValue attributes; - - if (!errors_for_testing.Has( - ErrorForTesting::kNoPublicKeySignatureStackEntryAttribute)) { - if (errors_for_testing.Has( - ErrorForTesting::kWrongSignatureStackEntryAttributeName)) { - // Add a typo: "ee" instead of "ed". - attributes[cbor::Value("ee25519PublicKey")] = cbor::Value(public_key); - } else if (errors_for_testing.Has( - ErrorForTesting:: - kWrongSignatureStackEntryAttributeNameLength)) { - attributes[cbor::Value("ed25519")] = cbor::Value(public_key); - - } else { - attributes[cbor::Value("ed25519PublicKey")] = cbor::Value(public_key); - } - } - - if (errors_for_testing.Has( - ErrorForTesting::kAdditionalSignatureStackEntryAttribute)) { - attributes[cbor::Value("foo")] = cbor::Value(42); - } - - return cbor::Value(attributes); -} - cbor::Value WebBundleSigner::CreateIntegrityBlockForBundle( base::span<const uint8_t> unsigned_bundle, const std::vector<KeyPair>& key_pairs, @@ -107,30 +133,23 @@ std::optional<std::vector<uint8_t>> integrity_block = cbor::Writer::Write( CreateIntegrityBlock(signature_stack, errors_for_testing)); - // Create the attributes map for the current signature stack entry. - std::optional<std::vector<uint8_t>> attributes = - cbor::Writer::Write(CreateSignatureStackEntryAttributes( - std::vector(key_pair.public_key.bytes().begin(), - key_pair.public_key.bytes().end()))); + absl::visit( + base::Overloaded{[&](const auto& key_pair) { + // Create the attributes map for the current signature stack entry. + std::optional<std::vector<uint8_t>> attributes = cbor::Writer::Write( + CreateSignatureStackEntryAttributes(key_pair.public_key)); - // Build the payload to sign and then sign it. - std::vector<uint8_t> payload_to_sign = CreateSignaturePayload( - {.unsigned_web_bundle_hash = unsigned_bundle_hash, - .integrity_block_cbor = *integrity_block, - .attributes_cbor = *attributes}); + // Build the payload to sign and then sign it. + std::vector<uint8_t> payload_to_sign = CreateSignaturePayload( + {.unsigned_web_bundle_hash = unsigned_bundle_hash, + .integrity_block_cbor = *integrity_block, + .attributes_cbor = *attributes}); - std::vector<uint8_t> signature(ED25519_SIGNATURE_LEN); - CHECK_EQ(key_pair.private_key.size(), - static_cast<size_t>(ED25519_PRIVATE_KEY_LEN)); - CHECK_EQ(ED25519_sign(signature.data(), payload_to_sign.data(), - payload_to_sign.size(), key_pair.private_key.data()), - 1); - if (key_pair.produce_invalid_signature) { - signature[0] ^= 0xff; - } - - signature_stack.push_back(CreateSignatureStackEntry( - key_pair.public_key, signature, errors_for_testing)); + signature_stack.push_back(CreateSignatureStackEntry( + key_pair.public_key, SignMessage(payload_to_sign, key_pair), + errors_for_testing)); + }}, + key_pair); } return CreateIntegrityBlock(signature_stack, errors_for_testing); @@ -152,16 +171,16 @@ } // static -WebBundleSigner::KeyPair WebBundleSigner::KeyPair::CreateRandom( +WebBundleSigner::Ed25519KeyPair WebBundleSigner::Ed25519KeyPair::CreateRandom( bool produce_invalid_signature) { std::array<uint8_t, ED25519_PUBLIC_KEY_LEN> public_key; std::array<uint8_t, ED25519_PRIVATE_KEY_LEN> private_key; ED25519_keypair(public_key.data(), private_key.data()); - return KeyPair(std::move(public_key), std::move(private_key), - produce_invalid_signature); + return Ed25519KeyPair(std::move(public_key), std::move(private_key), + produce_invalid_signature); } -WebBundleSigner::KeyPair::KeyPair( +WebBundleSigner::Ed25519KeyPair::Ed25519KeyPair( base::span<const uint8_t, ED25519_PUBLIC_KEY_LEN> public_key_bytes, base::span<const uint8_t, ED25519_PRIVATE_KEY_LEN> private_key_bytes, bool produce_invalid_signature) @@ -172,14 +191,16 @@ private_key = std::move(private_key_array); } -WebBundleSigner::KeyPair::KeyPair(const WebBundleSigner::KeyPair&) = default; -WebBundleSigner::KeyPair& WebBundleSigner::KeyPair::operator=(const KeyPair&) = +WebBundleSigner::Ed25519KeyPair::Ed25519KeyPair( + const WebBundleSigner::Ed25519KeyPair&) = default; +WebBundleSigner::Ed25519KeyPair& WebBundleSigner::Ed25519KeyPair::operator=( + const Ed25519KeyPair&) = default; + +WebBundleSigner::Ed25519KeyPair::Ed25519KeyPair(Ed25519KeyPair&&) noexcept = default; +WebBundleSigner::Ed25519KeyPair& WebBundleSigner::Ed25519KeyPair::operator=( + WebBundleSigner::Ed25519KeyPair&&) noexcept = default; -WebBundleSigner::KeyPair::KeyPair(KeyPair&&) noexcept = default; -WebBundleSigner::KeyPair& WebBundleSigner::KeyPair::operator=( - WebBundleSigner::KeyPair&&) noexcept = default; - -WebBundleSigner::KeyPair::~KeyPair() = default; +WebBundleSigner::Ed25519KeyPair::~Ed25519KeyPair() = default; } // namespace web_package
diff --git a/components/web_package/test_support/signed_web_bundles/web_bundle_signer.h b/components/web_package/test_support/signed_web_bundles/web_bundle_signer.h index b3282f29..de04ccb0 100644 --- a/components/web_package/test_support/signed_web_bundles/web_bundle_signer.h +++ b/components/web_package/test_support/signed_web_bundles/web_bundle_signer.h
@@ -39,20 +39,20 @@ ErrorForTesting::kMinValue, ErrorForTesting::kMaxValue>; - struct KeyPair { - static KeyPair CreateRandom(bool produce_invalid_signature = false); + struct Ed25519KeyPair { + static Ed25519KeyPair CreateRandom(bool produce_invalid_signature = false); - KeyPair( + Ed25519KeyPair( base::span<const uint8_t, Ed25519PublicKey::kLength> public_key_bytes, base::span<const uint8_t, 64> private_key_bytes, bool produce_invalid_signature = false); - KeyPair(const KeyPair&); - KeyPair& operator=(const KeyPair&); + Ed25519KeyPair(const Ed25519KeyPair&); + Ed25519KeyPair& operator=(const Ed25519KeyPair&); - KeyPair(KeyPair&&) noexcept; - KeyPair& operator=(KeyPair&&) noexcept; + Ed25519KeyPair(Ed25519KeyPair&&) noexcept; + Ed25519KeyPair& operator=(Ed25519KeyPair&&) noexcept; - ~KeyPair(); + ~Ed25519KeyPair(); Ed25519PublicKey public_key; // We don't have a wrapper for private keys since they are only used in @@ -61,6 +61,8 @@ bool produce_invalid_signature; }; + using KeyPair = absl::variant<Ed25519KeyPair>; + // Creates an integrity block with the given signature stack entries. static cbor::Value CreateIntegrityBlock( const cbor::Value::ArrayValue& signature_stack, @@ -78,17 +80,6 @@ base::span<const uint8_t> unsigned_bundle, const std::vector<KeyPair>& key_pairs, ErrorsForTesting errors_for_testing = {}); - - private: - // Creates a signature stack entry for the given public key and signature. - static cbor::Value CreateSignatureStackEntry( - const Ed25519PublicKey& public_key, - std::vector<uint8_t> signature, - ErrorsForTesting errors_for_testing = {}); - - static cbor::Value CreateSignatureStackEntryAttributes( - std::vector<uint8_t> public_key, - ErrorsForTesting errors_for_testing = {}); }; } // namespace web_package
diff --git a/components/web_package/test_support/signed_web_bundles/web_bundle_signer_unittest.cc b/components/web_package/test_support/signed_web_bundles/web_bundle_signer_unittest.cc index 697019c..633fe62 100644 --- a/components/web_package/test_support/signed_web_bundles/web_bundle_signer_unittest.cc +++ b/components/web_package/test_support/signed_web_bundles/web_bundle_signer_unittest.cc
@@ -59,7 +59,7 @@ std::vector<uint8_t> unsigned_bundle = builder.CreateBundle(); std::vector<uint8_t> signed_bundle = WebBundleSigner::SignBundle( unsigned_bundle, - {WebBundleSigner::KeyPair(kTestPublicKey, kTestPrivateKey)}); + {WebBundleSigner::Ed25519KeyPair(kTestPublicKey, kTestPrivateKey)}); std::vector<uint8_t> expected_bundle = GetStringAsBytes(GetTestFileContents( base::FilePath(FILE_PATH_LITERAL("simple_b2_signed.swbn"))));
diff --git a/components/web_package/web_bundle_parser_unittest.cc b/components/web_package/web_bundle_parser_unittest.cc index 3df22df..6ea94ac 100644 --- a/components/web_package/web_bundle_parser_unittest.cc +++ b/components/web_package/web_bundle_parser_unittest.cc
@@ -210,7 +210,7 @@ size_t num_signatures = 1) { std::vector<WebBundleSigner::KeyPair> key_pairs; for (size_t i = 0; i < num_signatures; ++i) { - key_pairs.push_back(WebBundleSigner::KeyPair::CreateRandom()); + key_pairs.push_back(WebBundleSigner::Ed25519KeyPair::CreateRandom()); } return { @@ -762,7 +762,9 @@ EXPECT_EQ(integrity_block->signature_stack.size(), 1ul); auto& entry = integrity_block->signature_stack[0]; EXPECT_NO_FATAL_FAILURE(CheckIfSignatureStackEntryIsValid( - entry, bundle_and_keys.key_pairs[0].public_key)); + entry, + absl::get<WebBundleSigner::Ed25519KeyPair>(bundle_and_keys.key_pairs[0]) + .public_key)); } TEST_F(WebBundleParserTest, SignedBundleSignatureStackWithMultipleEntries) { @@ -789,7 +791,8 @@ for (unsigned long i = 0; i < num_signatures; ++i) { EXPECT_NO_FATAL_FAILURE(CheckIfSignatureStackEntryIsValid( integrity_block->signature_stack[i], - bundle_and_keys.key_pairs[i].public_key)); + absl::get<WebBundleSigner::Ed25519KeyPair>(bundle_and_keys.key_pairs[i]) + .public_key)); } }
diff --git a/docs/dependencies.md b/docs/dependencies.md index 7b77006..345c7130 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md
@@ -5,18 +5,18 @@ file, gclient may read git submodules (see [depot_tools submodules support](https://docs.google.com/document/d/1N_fseFNOj10ETZG3pZ-I30R__w96rYNtvx5y_jFGJWw/view)). -gclient supports two dependency types: git and [cipd](cipd_and_3pp.md). +gclient supports three dependency types: git, [gcs](gcs_dependencies.md), and +[cipd](cipd_and_3pp.md). [TOC] ## Adding dependencies -Add your entry in DEPS file. Then, run `gclient gitmodules` to generate -git submodules (it will contain .gitmodule change, and gitlink). Edit OWNERS -file and add gitlink path. Then, run `git add DEPS OWNERS` to stage -those files for commit, followed by `git commit`. Your change is now ready to be -sent for a review using `git cl upload`. - +Add your entry in DEPS file. Then, run `gclient gitmodules` to generate git +submodules (it will contain .gitmodule change, and gitlink). Edit OWNERS file +and add gitlink path. Then, run `git add DEPS OWNERS` to stage those files for +commit, followed by `git commit`. Your change is now ready to be sent for a +review using `git cl upload`. For example, if new dependency is "src/foo/bar.git", its gitlink path is "foo/bar", and OWNERS entry at the top level is `per-file foo/bar=*`. You can @@ -25,7 +25,7 @@ ``` # manual edit of DEPS and OWNERS file (see changes below). - % gclient gitmodules + % gclient gitmodules .gitmodules and gitlinks updated. Please check `git diff --staged`and commit those staged changes (`git commit` without -a) % git add OWNERS DEPS # stage files @@ -48,7 +48,7 @@ +++ b/DEPS @@ -555,6 +555,10 @@ allowed_hosts = [ ] - + deps = { + 'src/foo/bar': { + 'url': Var('chromium_git') + '/foo/bar.git' + '@' + @@ -63,7 +63,7 @@ +++ b/OWNERS @@ -37,6 +37,7 @@ per-file README.md=* per-file WATCHLISTS=* - + # git submodules +per-file foo/bar=* per-file third_party/clang-format/script=* @@ -77,7 +77,7 @@ @@ -0,0 +1 @@ +Subproject commit 1111111111111111111111111111111111111111 - % git status + % git status On branch test_newdep Your branch is up to date with 'origin/main'. @@ -102,7 +102,7 @@ 4 files changed, 9 insertions(+) create mode 160000 foo/bar - % git cl upload + % git cl upload Found change with 1 commit... Running Python 3 presubmit upload checks ... -- snip -- @@ -132,17 +132,11 @@ In the example above, it actually updates boringssl_revision variable that is used in boringssl deps declaration. -Example of DEPS file: -``` -vars = { - 'boringssl_git': 'https://boringssl.googlesource.com', - 'boringssl_revision': 'e4acd6cb568214b1c7db4e59ce54ea2e1deae1f5', -} -deps = { - 'src/third_party/boringssl/src': - Var('boringssl_git') + '/boringssl.git' + '@' + Var('boringssl_revision'), -} -``` +Example of DEPS file: `vars = { 'boringssl_git': +'https://boringssl.googlesource.com', 'boringssl_revision': +'e4acd6cb568214b1c7db4e59ce54ea2e1deae1f5', } deps = { +'src/third_party/boringssl/src': Var('boringssl_git') + '/boringssl.git' + '@' + +Var('boringssl_revision'), }` It also updates gitlink if git submodules are used. Git status will show the following: @@ -177,11 +171,9 @@ (used by git submodules), {hash} is a new commit hash you want to roll, and path is relative path to git submodule. - Using the boringssl example above, the following will need to be run inside chromium/src worktree: - ``` git update-index --add --cacheinfo 160000,e4acd6cb568214b1c7db4e59ce54ea2e1deae1f5,third_party/boringssl/src ```
diff --git a/docs/gcs_dependencies.md b/docs/gcs_dependencies.md new file mode 100644 index 0000000..f50c03e --- /dev/null +++ b/docs/gcs_dependencies.md
@@ -0,0 +1,84 @@ +# GCS objects for chromium dependencies + +[TOC] + +## Summary + +You may add GCS objects as dependencies to the chromium checkout via the `deps` +field in the DEPS file. This use-case was previously covered by `hooks` which +makes source and dependency management hard to track. Teams that continue to use +hooks to download from GCS will cause builds to break in certain workflows. + +GCS objects can be tar archives, which will automatically be extracted, or +single non-archive files. Whether an object is a tar archive is determined by +[tarfile.is_tarfile](https://docs.python.org/3/library/tarfile.html#tarfile.is_tarfile). + +Interrupted downloads or extractions and outdated versions will be detected with +`gclient sync` and trigger re-downlading. + +The downloaded content will be validated against the SHA256 content hash and +byte size. + +GCS bucket permissions should allow for either allUsers or all googlers to view +the objects within the bucket. + +## Adding, uploading, and updating GCS dependencies + +### Upload a new object to GCS + +There is a helper script +([upload_to_google_storage_first_class.py](https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:upload_to_google_storage_first_class.py)) +to upload new objects to google storage and return the GCS deps entry that +should be copied into DEPS. + +### Add/update a GCS entry in DEPS + +A GCS entry may be added to the `deps` dict with the following form +([upload_to_google_storage_first_class.py](https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:upload_to_google_storage_first_class.py) +will also spit out an entry that matches this form): + +``` +deps = { + # ... + + # This is the installation directory. + 'src/buildtools/linux64': { + 'bucket': 'chromium-clang-format', + # In this example, we're only putting one GCS object in this location, + # but multiple objects per entry is supported. + 'objects': [ + 'object_name': 'clang-format-b42097ca924d1f1736a5a7806068fed9d7345eb4', + 'sha256sum': 'b42097ca924d1f1736a5a7806068fed9d7345eb4', + 'size_bytes': 1967524, + 'generation': 1542380408102454, + # `output_file` is the name of the file that the downloade object should be + # saved as. It is optional and only relevant for objects that are NOT tar + # archives. Tar archives get extracted and saved under the same + # file/directory names they were archived as. + # 'output_file': <name of the downloaded object.> + ], + } +} +``` + +The source of truth for this format is found +[here](https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:gclient_eval.py;l=135-150?q=gclient_&ss=chromium%2Fchromium%2Ftools%2Fdepot_tools). + +#### `size_bytes` and `generation` + +If you are not using `upload_to_google_storage_first_class.py` to upload your +objects you can get this information from the command line with: + +``` +gcloud storage objects describe gs://<bucket>/<object> +``` + +They can also be found in pantheon when viewing the object's "Object details". +`Size` is found under the `Live Object` tab and `generation` is found under the +`Version History` tab. + +#### `sha256sum` + +`sha256sum` should be the SHA256 content hash of the GCS object (unextracted). +There is no helper script separate from +`upload_to_google_storage_first_class.py` to compute that.
diff --git a/docs/webapps/testing.md b/docs/webapps/testing.md index 77b2e189..99f5752 100644 --- a/docs/webapps/testing.md +++ b/docs/webapps/testing.md
@@ -45,11 +45,11 @@ Browser tests are much more expensive to run, as they run a fully functional browser. These tests are usually only created to test functionality that requires multiple parts of the system to be running or dependencies like the Sync service to be fully running and functional. It is good practice to have browsertests be as true-to-user-action as possible, to make sure that as much of our stack is exercised. -An example set of browser tests are in [`web_app_browsertest.cc`][6]. Please use the [`WebAppControllerBrowserTest`][5] base class. +An example set of browser tests are in [`web_app_browsertest.cc`][6]. Please use the [`WebAppBrowserTestBase`][5] base class. Notes -- Browser tests based on `WebAppControllerBrowserTest` print a snapshot of chrome://web-app-internals to console on test failures. This can be a powerful debugging tool. The command line flag `--disable-web-app-internals-log` can be used to disable this feature. +- Browser tests based on `WebAppBrowserTestBase` print a snapshot of chrome://web-app-internals to console on test failures. This can be a powerful debugging tool. The command line flag `--disable-web-app-internals-log` can be used to disable this feature. ## Integration tests @@ -63,7 +63,7 @@ ## Testing OS integration -It is very common to test OS integration. By default, OS integration is suppressed if the test extends [`WebAppTest`][4] or [`WebAppControllerBrowserTest`][5]. +It is very common to test OS integration. By default, OS integration is suppressed if the test extends [`WebAppTest`][4] or [`WebAppBrowserTestBase`][5]. End-to-end OS integration testing is facilitated using the [`OsIntegrationTestOverride`][9]. If OS integration CAN be tested in an automated way, this class will do so. If not, the existence of this override will stub-out the OS integration at the lowest level to test as much of our code as possible. @@ -124,7 +124,7 @@ [2]: http://b/271124885 [3]: README.md#external-dependencies [4]: https://source.chromium.org/search?q=web_app_test.h -[5]: https://source.chromium.org/search?q=WebAppControllerBrowserTest +[5]: https://source.chromium.org/search?q=WebAppBrowserTestBase [6]: https://source.chromium.org/search?q=web_app_browsertest.cc [7]: integration-testing-framework.md [8]: ../testing/code_coverage.md
diff --git a/internal b/internal index 5fb766e..6365d27 160000 --- a/internal +++ b/internal
@@ -1 +1 @@ -Subproject commit 5fb766e4a38b8e77fc63d347b829a1903c23a919 +Subproject commit 6365d276cb6ee8b2d6992bcc8699f3e1eff7fe3b
diff --git a/ios/chrome/app/application_delegate/app_state_unittest.mm b/ios/chrome/app/application_delegate/app_state_unittest.mm index 771a00a..8368706 100644 --- a/ios/chrome/app/application_delegate/app_state_unittest.mm +++ b/ios/chrome/app/application_delegate/app_state_unittest.mm
@@ -213,7 +213,8 @@ TestingApplicationContext::GetGlobal()->SetChromeBrowserStateManager( browser_state_manager_.get()); - browser_state_ = browser_state_manager_->GetLastUsedBrowserState(); + browser_state_ = + browser_state_manager_->GetLastUsedBrowserStateForTesting(); } void TearDown() override {
diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm index 81c096b..090f43e 100644 --- a/ios/chrome/app/main_controller.mm +++ b/ios/chrome/app/main_controller.mm
@@ -482,14 +482,17 @@ [[PreviousSessionInfo sharedInstance] beginRecordingFieldTrials]; // TODO(crbug.com/324417250): Remove mainBrowserState from appState. - self.appState.mainBrowserState = GetApplicationContext() - ->GetChromeBrowserStateManager() - ->GetLastUsedBrowserState(); + self.appState.mainBrowserState = + GetApplicationContext() + ->GetChromeBrowserStateManager() + ->GetLastUsedBrowserStateDeprecatedDoNotUse(); std::vector<ChromeBrowserState*> loadedBrowserStates = GetApplicationContext() ->GetChromeBrowserStateManager() ->GetLoadedBrowserStates(); + CHECK(!loadedBrowserStates.empty()); + // Initialize and set all loaded browser states. for (ChromeBrowserState* chromeBrowserState : loadedBrowserStates) { [self initializeBrowserState:chromeBrowserState];
diff --git a/ios/chrome/browser/application_context/model/application_context_impl.mm b/ios/chrome/browser/application_context/model/application_context_impl.mm index c0e9797..8f3c129f 100644 --- a/ios/chrome/browser/application_context/model/application_context_impl.mm +++ b/ios/chrome/browser/application_context/model/application_context_impl.mm
@@ -312,8 +312,6 @@ DCHECK(thread_checker_.CalledOnValidThread()); if (!chrome_browser_state_manager_) { chrome_browser_state_manager_.reset(new ChromeBrowserStateManagerImpl()); - // Load last active browserStates. - chrome_browser_state_manager_->LoadBrowserStates(); } return chrome_browser_state_manager_.get(); }
diff --git a/ios/chrome/browser/browser_state/model/BUILD.gn b/ios/chrome/browser/browser_state/model/BUILD.gn index 2a160d012..65d812d 100644 --- a/ios/chrome/browser/browser_state/model/BUILD.gn +++ b/ios/chrome/browser/browser_state/model/BUILD.gn
@@ -134,6 +134,7 @@ "//ios/chrome/browser/shared/model/prefs:pref_names", "//ios/chrome/browser/shared/model/url:constants", "//ios/chrome/browser/shared/public/features", + "//ios/chrome/browser/shared/public/features:system_flags", "//ios/chrome/browser/signin/model", "//ios/chrome/browser/signin/model:system_identity", "//ios/chrome/browser/signin/model:trusted_vault_factory",
diff --git a/ios/chrome/browser/browser_state/model/chrome_browser_state_manager_impl.h b/ios/chrome/browser/browser_state/model/chrome_browser_state_manager_impl.h index dd7c08e..db4aed7 100644 --- a/ios/chrome/browser/browser_state/model/chrome_browser_state_manager_impl.h +++ b/ios/chrome/browser/browser_state/model/chrome_browser_state_manager_impl.h
@@ -9,6 +9,7 @@ #include <memory> #include "base/files/file_path.h" +#include "base/functional/callback_forward.h" #include "ios/chrome/browser/shared/model/browser_state/browser_state_info_cache.h" #include "ios/chrome/browser/shared/model/browser_state/chrome_browser_state_manager.h" @@ -26,7 +27,7 @@ ~ChromeBrowserStateManagerImpl() override; // ChromeBrowserStateManager: - ChromeBrowserState* GetLastUsedBrowserState() override; + ChromeBrowserState* GetLastUsedBrowserStateDeprecatedDoNotUse() override; ChromeBrowserState* GetBrowserState(const base::FilePath& path) override; BrowserStateInfoCache* GetBrowserStateInfoCache() override; std::vector<ChromeBrowserState*> GetLoadedBrowserStates() override; @@ -36,11 +37,22 @@ using ChromeBrowserStateImplPathMap = std::map<base::FilePath, std::unique_ptr<ChromeBrowserStateImpl>>; + // Callback invoked with the BrowserState once its initialisation is done. + // May be invoked with nullptr if loading the BrowserState failed. Will be + // called on the calling sequence, but may be asynchronous. + using BrowserStateLoadedCallback = + base::OnceCallback<void(ChromeBrowserState*)>; + // Get the path of the last used browser state, or if that's undefined, the // default browser state. base::FilePath GetLastUsedBrowserStateDir( const base::FilePath& user_data_dir); + // Load ChromeBrowserState at `path` and invoke `callback` when the load + // is complete. + void LoadBrowserState(const base::FilePath& path, + BrowserStateLoadedCallback callback); + // Final initialization of the browser state. void DoFinalInit(ChromeBrowserState* browser_state); void DoFinalInitForServices(ChromeBrowserState* browser_state);
diff --git a/ios/chrome/browser/browser_state/model/chrome_browser_state_manager_impl.mm b/ios/chrome/browser/browser_state/model/chrome_browser_state_manager_impl.mm index 5687f0f..7a6bacb9 100644 --- a/ios/chrome/browser/browser_state/model/chrome_browser_state_manager_impl.mm +++ b/ios/chrome/browser/browser_state/model/chrome_browser_state_manager_impl.mm
@@ -5,11 +5,14 @@ #import "ios/chrome/browser/browser_state/model/chrome_browser_state_manager_impl.h" #import <stdint.h> + #import <utility> +#import "base/check_deref.h" #import "base/files/file_enumerator.h" #import "base/files/file_path.h" #import "base/functional/bind.h" +#import "base/functional/callback.h" #import "base/metrics/histogram_macros.h" #import "base/path_service.h" #import "base/strings/utf_string_conversions.h" @@ -32,6 +35,7 @@ #import "ios/chrome/browser/shared/model/browser_state/browser_state_info_cache.h" #import "ios/chrome/browser/shared/model/paths/paths.h" #import "ios/chrome/browser/shared/model/prefs/pref_names.h" +#import "ios/chrome/browser/shared/public/features/system_flags.h" #import "ios/chrome/browser/signin/model/account_consistency_service_factory.h" #import "ios/chrome/browser/signin/model/account_reconcilor_factory.h" #import "ios/chrome/browser/signin/model/identity_manager_factory.h" @@ -113,7 +117,8 @@ ChromeBrowserStateManagerImpl::~ChromeBrowserStateManagerImpl() {} -ChromeBrowserState* ChromeBrowserStateManagerImpl::GetLastUsedBrowserState() { +ChromeBrowserState* +ChromeBrowserStateManagerImpl::GetLastUsedBrowserStateDeprecatedDoNotUse() { return GetBrowserState(GetLastUsedBrowserStateDir(GetUserDataDir())); } @@ -126,25 +131,7 @@ return iter->second.get(); } - // Get sequenced task runner for making sure that file operations of - // this profile are executed in expected order (what was previously assured by - // the FILE thread). - scoped_refptr<base::SequencedTaskRunner> io_task_runner = - base::ThreadPool::CreateSequencedTaskRunner( - {base::TaskShutdownBehavior::BLOCK_SHUTDOWN, base::MayBlock()}); - - std::unique_ptr<ChromeBrowserStateImpl> browser_state_impl( - new ChromeBrowserStateImpl(path, io_task_runner)); - DCHECK(!browser_state_impl->IsOffTheRecord()); - - std::pair<ChromeBrowserStateImplPathMap::iterator, bool> insert_result = - browser_states_.insert( - std::make_pair(path, std::move(browser_state_impl))); - DCHECK(insert_result.second); - DCHECK(insert_result.first != browser_states_.end()); - - DoFinalInit(insert_result.first->second.get()); - return insert_result.first->second.get(); + return nullptr; } base::FilePath ChromeBrowserStateManagerImpl::GetLastUsedBrowserStateDir( @@ -181,22 +168,61 @@ void ChromeBrowserStateManagerImpl::LoadBrowserStates() { PrefService* local_state = GetApplicationContext()->GetLocalState(); - DCHECK(local_state); - base::Value::List last_active_browser_states = - local_state->GetList(prefs::kBrowserStatesLastActive).Clone(); + const base::Value::List& last_active_browser_states = + CHECK_DEREF(local_state).GetList(prefs::kBrowserStatesLastActive); + + std::set<std::string> last_active_browser_states_set; + for (const base::Value& browser_state_id : last_active_browser_states) { + if (browser_state_id.is_string()) { + last_active_browser_states_set.insert(browser_state_id.GetString()); + } + } // If there is no last active browser state load the default one. - if (last_active_browser_states.size() == 0) { - last_active_browser_states.Append(kIOSChromeInitialBrowserState); + if (last_active_browser_states_set.size() == 0) { + last_active_browser_states_set.insert(kIOSChromeInitialBrowserState); } - for (const base::Value& browser_state_dir : last_active_browser_states) { - if (!browser_state_dir.is_string()) { - continue; + // Create and load test profiles if experiment enabling Switch Profile + // developer UI is enabled. + std::optional<int> load_test_profiles = + experimental_flags::DisplaySwitchProfile(); + if (load_test_profiles.has_value()) { + for (int i = 0; i < load_test_profiles; i++) { + last_active_browser_states_set.insert("TestProfile" + + base::NumberToString(i + 1)); } - GetBrowserState( - GetUserDataDir().AppendASCII(browser_state_dir.GetString())); } + + for (std::string browser_state_dir : last_active_browser_states_set) { + LoadBrowserState(GetUserDataDir().AppendASCII(browser_state_dir), + base::DoNothing()); + } +} + +void ChromeBrowserStateManagerImpl::LoadBrowserState( + const base::FilePath& path, + BrowserStateLoadedCallback callback) { + DCHECK(!base::Contains(browser_states_, path)); + + // Get sequenced task runner for making sure that file operations of + // this profile are executed in expected order (what was previously assured by + // the FILE thread). + scoped_refptr<base::SequencedTaskRunner> io_task_runner = + base::ThreadPool::CreateSequencedTaskRunner( + {base::TaskShutdownBehavior::BLOCK_SHUTDOWN, base::MayBlock()}); + + auto [iter, inserted] = browser_states_.insert(std::make_pair( + path, + base::WrapUnique(new ChromeBrowserStateImpl(path, io_task_runner)))); + DCHECK(inserted); + DCHECK(iter != browser_states_.end()); + + ChromeBrowserState* browser_state = iter->second.get(); + DCHECK(!browser_state->IsOffTheRecord()); + + DoFinalInit(browser_state); + std::move(callback).Run(browser_state); } void ChromeBrowserStateManagerImpl::DoFinalInit(
diff --git a/ios/chrome/browser/metrics/model/chrome_browser_state_client.mm b/ios/chrome/browser/metrics/model/chrome_browser_state_client.mm index c430a2f8..edd0b57 100644 --- a/ios/chrome/browser/metrics/model/chrome_browser_state_client.mm +++ b/ios/chrome/browser/metrics/model/chrome_browser_state_client.mm
@@ -35,7 +35,7 @@ return SyncServiceFactory::GetForBrowserState( GetApplicationContext() ->GetChromeBrowserStateManager() - ->GetLastUsedBrowserState() + ->GetLastUsedBrowserStateDeprecatedDoNotUse() ->GetOriginalChromeBrowserState()); } @@ -48,7 +48,7 @@ // a new BrowserState if no BrowserState exists. return GetApplicationContext() ->GetChromeBrowserStateManager() - ->GetLastUsedBrowserState() + ->GetLastUsedBrowserStateDeprecatedDoNotUse() ->GetOriginalChromeBrowserState() ->GetPrefs(); }
diff --git a/ios/chrome/browser/metrics/model/ios_family_link_user_metrics_provider_unittest.mm b/ios/chrome/browser/metrics/model/ios_family_link_user_metrics_provider_unittest.mm index 327a244..2dc6136 100644 --- a/ios/chrome/browser/metrics/model/ios_family_link_user_metrics_provider_unittest.mm +++ b/ios/chrome/browser/metrics/model/ios_family_link_user_metrics_provider_unittest.mm
@@ -42,7 +42,7 @@ return &metrics_provider_; } - ios::ChromeBrowserStateManager* browser_state_manager() { + TestChromeBrowserStateManager* browser_state_manager() { return browser_state_manager_.get(); } @@ -72,7 +72,7 @@ void SignIn(const std::string& email, bool is_subject_to_parental_controls, bool is_opted_in_to_parental_supervision) { - SignIn(browser_state_manager()->GetLastUsedBrowserState(), email, + SignIn(browser_state_manager()->GetLastUsedBrowserStateForTesting(), email, is_subject_to_parental_controls, is_opted_in_to_parental_supervision); } @@ -115,7 +115,7 @@ ProfileWithUnknownCapabilitiesDoesNotOutputHistogram) { AccountInfo account = signin::MakePrimaryAccountAvailable( IdentityManagerFactory::GetForBrowserState( - browser_state_manager()->GetLastUsedBrowserState()), + browser_state_manager()->GetLastUsedBrowserStateForTesting()), kTestEmail, signin::ConsentLevel::kSignin); // Does not set account capabilities, default is unknown. @@ -270,7 +270,7 @@ /*is_subject_to_parental_controls=*/true, /*is_opted_in_to_parental_supervision=*/true); RestrictAllSitesForSupervisedUser( - browser_state_manager()->GetLastUsedBrowserState()); + browser_state_manager()->GetLastUsedBrowserStateForTesting()); base::HistogramTester histogram_tester; metrics_provider()->OnDidCreateMetricsLog(); @@ -293,7 +293,7 @@ /*is_subject_to_parental_controls=*/true, /*is_opted_in_to_parental_supervision=*/true); AllowUnsafeSitesForSupervisedUser( - browser_state_manager()->GetLastUsedBrowserState()); + browser_state_manager()->GetLastUsedBrowserStateForTesting()); base::HistogramTester histogram_tester; metrics_provider()->OnDidCreateMetricsLog();
diff --git a/ios/chrome/browser/ntp/model/set_up_list_unittest.mm b/ios/chrome/browser/ntp/model/set_up_list_unittest.mm index 9dbceb31..e630f07 100644 --- a/ios/chrome/browser/ntp/model/set_up_list_unittest.mm +++ b/ios/chrome/browser/ntp/model/set_up_list_unittest.mm
@@ -67,7 +67,7 @@ // Get the test BrowserState. ChromeBrowserState* GetBrowserState() { - return test_manager_->GetLastUsedBrowserState(); + return test_manager_->GetLastUsedBrowserStateForTesting(); } // Get the LocalState prefs. @@ -175,7 +175,7 @@ web::WebTaskEnvironment task_environment_; base::test::ScopedFeatureList feature_list_; raw_ptr<PrefService> prefs_; - std::unique_ptr<ios::ChromeBrowserStateManager> test_manager_; + std::unique_ptr<TestChromeBrowserStateManager> test_manager_; raw_ptr<AuthenticationService> auth_service_; SetUpList* set_up_list_; };
diff --git a/ios/chrome/browser/policy/model/reporting/profile_report_generator_ios_unittest.mm b/ios/chrome/browser/policy/model/reporting/profile_report_generator_ios_unittest.mm index e77a25a3..a6c1d6b0 100644 --- a/ios/chrome/browser/policy/model/reporting/profile_report_generator_ios_unittest.mm +++ b/ios/chrome/browser/policy/model/reporting/profile_report_generator_ios_unittest.mm
@@ -125,12 +125,18 @@ return report; } - // TODO(crbug.com/325256943): Migrate to use TestChromeBrowserStateManager or - // a TestChromeBrowserState. ChromeBrowserState* GetBrowserState() { - return GetApplicationContext() - ->GetChromeBrowserStateManager() - ->GetLastUsedBrowserState(); + return GetTestChromeBrowserStateManager() + ->GetLastUsedBrowserStateForTesting(); + } + + TestChromeBrowserStateManager* GetTestChromeBrowserStateManager() { + // A TestChromeBrowserStateManager is installed in the constructor + // via `scoped_browser_state_manager_`, so it is safe to downcast + // the ChromeBrowserStateManager. + DCHECK(scoped_browser_state_manager_); + return static_cast<TestChromeBrowserStateManager*>( + GetApplicationContext()->GetChromeBrowserStateManager()); } ReportingDelegateFactoryIOS delegate_factory_;
diff --git a/ios/chrome/browser/policy/model/reporting/report_generator_ios_unittest.mm b/ios/chrome/browser/policy/model/reporting/report_generator_ios_unittest.mm index 82edc3ed..87dc39d 100644 --- a/ios/chrome/browser/policy/model/reporting/report_generator_ios_unittest.mm +++ b/ios/chrome/browser/policy/model/reporting/report_generator_ios_unittest.mm
@@ -54,13 +54,8 @@ std::make_unique<IOSChromeScopedTestingChromeBrowserStateManager>( std::make_unique<TestChromeBrowserStateManager>( std::move(browser_state))); - // TODO(crbug.com/325256948): Migrate to use TestChromeBrowserStateManager - // or a TestChromeBrowserState, probably the test browser state already used - // above. AuthenticationServiceFactory::CreateAndInitializeForBrowserState( - GetApplicationContext() - ->GetChromeBrowserStateManager() - ->GetLastUsedBrowserState(), + GetTestChromeBrowserStateManager()->GetLastUsedBrowserStateForTesting(), std::make_unique<FakeAuthenticationServiceDelegate>()); } @@ -112,6 +107,14 @@ /*basic request size floor to KB*/ 0, 1); } + TestChromeBrowserStateManager* GetTestChromeBrowserStateManager() { + // A TestChromeBrowserStateManager is installed in the constructor + // via `scoped_browser_state_manager_`, so it is safe to downcast + // the ChromeBrowserStateManager. + return static_cast<TestChromeBrowserStateManager*>( + GetApplicationContext()->GetChromeBrowserStateManager()); + } + private: web::WebTaskEnvironment task_environment_;
diff --git a/ios/chrome/browser/push_notification/model/push_notification_client.mm b/ios/chrome/browser/push_notification/model/push_notification_client.mm index a5701d0..1db0575 100644 --- a/ios/chrome/browser/push_notification/model/push_notification_client.mm +++ b/ios/chrome/browser/push_notification/model/push_notification_client.mm
@@ -113,5 +113,5 @@ } return GetApplicationContext() ->GetChromeBrowserStateManager() - ->GetLastUsedBrowserState(); + ->GetLastUsedBrowserStateDeprecatedDoNotUse(); }
diff --git a/ios/chrome/browser/shared/model/browser_state/chrome_browser_state_manager.h b/ios/chrome/browser/shared/model/browser_state/chrome_browser_state_manager.h index 6c06c13..e7886b20 100644 --- a/ios/chrome/browser/shared/model/browser_state/chrome_browser_state_manager.h +++ b/ios/chrome/browser/shared/model/browser_state/chrome_browser_state_manager.h
@@ -30,7 +30,7 @@ // states was used last. Do *not* use it as a singleton getter to fetch "the" // browser state. Always assume there could be multiple browser states and // use GetLoadedBrowserStates() instead. - virtual ChromeBrowserState* GetLastUsedBrowserState() = 0; + virtual ChromeBrowserState* GetLastUsedBrowserStateDeprecatedDoNotUse() = 0; // Returns the ChromeBrowserState associated with `path`, creating one if // necessary.
diff --git a/ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state_manager.cc b/ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state_manager.cc index 13dd18b..9215bdb3 100644 --- a/ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state_manager.cc +++ b/ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state_manager.cc
@@ -35,8 +35,9 @@ TestChromeBrowserStateManager::~TestChromeBrowserStateManager() {} -ChromeBrowserState* TestChromeBrowserStateManager::GetLastUsedBrowserState() { - return browser_states_[last_used_browser_state_path_].get(); +ChromeBrowserState* +TestChromeBrowserStateManager::GetLastUsedBrowserStateDeprecatedDoNotUse() { + return GetLastUsedBrowserStateForTesting(); } ChromeBrowserState* TestChromeBrowserStateManager::GetBrowserState( @@ -68,3 +69,8 @@ } void TestChromeBrowserStateManager::LoadBrowserStates() {} + +ChromeBrowserState* +TestChromeBrowserStateManager::GetLastUsedBrowserStateForTesting() { + return browser_states_[last_used_browser_state_path_].get(); +}
diff --git a/ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state_manager.h b/ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state_manager.h index 254868168..b241357 100644 --- a/ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state_manager.h +++ b/ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state_manager.h
@@ -26,12 +26,15 @@ ~TestChromeBrowserStateManager() override; // ChromeBrowserStateManager: - ChromeBrowserState* GetLastUsedBrowserState() override; + ChromeBrowserState* GetLastUsedBrowserStateDeprecatedDoNotUse() override; ChromeBrowserState* GetBrowserState(const base::FilePath& path) override; BrowserStateInfoCache* GetBrowserStateInfoCache() override; std::vector<ChromeBrowserState*> GetLoadedBrowserStates() override; void LoadBrowserStates() override; + // For testing. + ChromeBrowserState* GetLastUsedBrowserStateForTesting(); + // Adds a browser state to the list of browsers to track. void AddBrowserState(std::unique_ptr<ChromeBrowserState>, const base::FilePath& path);
diff --git a/ios/chrome/browser/tips_notifications/model/tips_notification_client_unittest.mm b/ios/chrome/browser/tips_notifications/model/tips_notification_client_unittest.mm index 81d129ae..bc7abdb 100644 --- a/ios/chrome/browser/tips_notifications/model/tips_notification_client_unittest.mm +++ b/ios/chrome/browser/tips_notifications/model/tips_notification_client_unittest.mm
@@ -44,12 +44,13 @@ TestingApplicationContext::GetGlobal()->SetChromeBrowserStateManager( browser_state_manager_.get()); BrowserList* list = BrowserListFactory::GetForBrowserState( - browser_state_manager_->GetLastUsedBrowserState()); + browser_state_manager_->GetLastUsedBrowserStateForTesting()); mock_scene_state_ = OCMClassMock([SceneState class]); OCMStub([mock_scene_state_ activationLevel]) .andReturn(SceneActivationLevelForegroundActive); browser_ = std::make_unique<TestBrowser>( - browser_state_manager_->GetLastUsedBrowserState(), mock_scene_state_); + browser_state_manager_->GetLastUsedBrowserStateForTesting(), + mock_scene_state_); list->AddBrowser(browser_.get()); client_ = std::make_unique<TipsNotificationClient>(); ScopedDictPrefUpdate update(GetApplicationContext()->GetLocalState(),
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_text_field_experimental.mm b/ios/chrome/browser/ui/omnibox/omnibox_text_field_experimental.mm index 0388d8b..399dbd33 100644 --- a/ios/chrome/browser/ui/omnibox/omnibox_text_field_experimental.mm +++ b/ios/chrome/browser/ui/omnibox/omnibox_text_field_experimental.mm
@@ -22,6 +22,7 @@ #import "ios/chrome/browser/shared/ui/util/reversed_animation.h" #import "ios/chrome/browser/shared/ui/util/rtl_geometry.h" #import "ios/chrome/browser/shared/ui/util/uikit_ui_util.h" +#import "ios/chrome/browser/ui/omnibox/omnibox_ui_features.h" #import "ios/chrome/browser/ui/omnibox/omnibox_util.h" #import "ios/chrome/browser/ui/toolbar/public/toolbar_constants.h" #import "ios/chrome/common/material_timing.h" @@ -160,12 +161,14 @@ // `-substringToIndex:`. This shouldn't happen, so use the DCHECK to catch // it to help debug and default to the end of the string if an overflow // would occur. - DCHECK(self.text.length >= _autocompleteTextLength); - NSUInteger userTextEndIndex = - self.text.length >= _autocompleteTextLength - ? self.text.length - _autocompleteTextLength - : self.text.length; - return [self.text substringFromIndex:userTextEndIndex]; + DCHECK_LE(_autocompleteTextLength, self.text.length); + const NSUInteger totalLength = self.text.length; + const NSUInteger userTextEndIndex = totalLength - [self addedTextLength]; + if (userTextEndIndex + _autocompleteTextLength > totalLength) { + return @""; + } + return [self.text substringWithRange:NSMakeRange(userTextEndIndex, + _autocompleteTextLength)]; } return @""; } @@ -176,9 +179,10 @@ // `-substringToIndex:`. This shouldn't happen, so use the DCHECK to catch it // to help debug and default to the end of the string if an overflow would // occur. - DCHECK(self.text.length >= _autocompleteTextLength); - NSUInteger userTextEndIndex = self.text.length >= _autocompleteTextLength - ? self.text.length - _autocompleteTextLength + const NSUInteger addedTextLength = [self addedTextLength]; + DCHECK_LE(addedTextLength, self.text.length); + NSUInteger userTextEndIndex = self.text.length >= addedTextLength + ? self.text.length - addedTextLength : self.text.length; return [self.text substringToIndex:userTextEndIndex]; } @@ -189,7 +193,7 @@ } - (NSString*)displayedText { - return self.text; + return [self textWithoutAdditionalText].string; } - (BOOL)hasAutocompleteText { @@ -200,6 +204,21 @@ if ([self hasAutocompleteText]) { self.text = self.userText; } + if (IsRichAutocompletionEnabled() && [self hasAdditionalText]) { + [self removeAdditionalText]; + } +} + +- (void)setAdditionalText:(NSAttributedString*)additionalText { + CHECK(IsRichAutocompletionEnabled()); + [self removeAdditionalText]; + + if (!additionalText.length) { + return; + } + NSAttributedString* currentText = self.attributedText; + _additionalText = additionalText; + [self setTextInternal:currentText autocompleteLength:_autocompleteTextLength]; } - (NSRange)selectedNSRange { @@ -405,11 +424,17 @@ value:self.currentFont range:entireString]; - // When editing, use the default text color for all text. + // When editing, use the default text color for all text, except the + // additionnal text. if (self.editing) { + NSRange foregroundColorRange = entireString; + if (IsRichAutocompletionEnabled() && [self hasAdditionalText]) { + foregroundColorRange = + NSMakeRange(0, mutableText.length - self.additionalText.length); + } [mutableText addAttribute:NSForegroundColorAttributeName value:self.textColor - range:entireString]; + range:foregroundColorRange]; } else { NSMutableParagraphStyle* style = [[NSMutableParagraphStyle alloc] init]; // URLs have their text direction set to to LTR (avoids RTL characters @@ -463,14 +488,11 @@ return LayoutRectGetRect(textRectLayout); } -- (CGRect)editingRectForBounds:(CGRect)bounds { - CGRect editRect = [super editingRectForBounds:bounds]; - return editRect; -} - - (CGRect)caretRectForPosition:(UITextPosition*)position { - return ([self hasAutocompleteText]) ? CGRectZero - : [super caretRectForPosition:position]; + // Hide the caret when the text field is showing added text (autocomplete + // and/or additional text). + return ([self hasAddedText]) ? CGRectZero + : [super caretRectForPosition:position]; } - (NSArray<UITextSelectionRect*>*)selectionRectsForRange:(UITextRange*)range { @@ -527,7 +549,8 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer*)gestureRecognizer { if (gestureRecognizer == self.tapGestureRecognizer) { - return [self isPreEditing] || [self hasAutocompleteText]; + return [self isPreEditing] || [self hasAutocompleteText] || + (IsRichAutocompletionEnabled() && [self hasAdditionalText]); } return YES; } @@ -541,6 +564,8 @@ } if ([self hasAutocompleteText]) { [self acceptAutocompleteText]; + } else if (IsRichAutocompletionEnabled() && [self hasAdditionalText]) { + [self handleUserInitiatedRemovalOfAdditionalText]; } } @@ -558,6 +583,9 @@ if ([self hasAutocompleteText]) { [self acceptAutocompleteText]; } + if ([self hasAdditionalText]) { + [self handleUserInitiatedRemovalOfAdditionalText]; + } [super selectAll:sender]; } @@ -683,6 +711,10 @@ [self clearAutocompleteText]; return; } + if (IsRichAutocompletionEnabled() && [self hasAdditionalText]) { + [self handleUserInitiatedRemovalOfAdditionalText]; + return; + } // Must test for the onDeleteBackward method, since it's optional. if ([self.delegate respondsToSelector:@selector(onDeleteBackward)]) [self.delegate onDeleteBackward]; @@ -756,7 +788,8 @@ // suggested text. case OmniboxKeyboardActionLeftArrow: case OmniboxKeyboardActionRightArrow: - return ([self isPreEditing] || [self hasAutocompleteText]); + return ([self isPreEditing] || [self hasAutocompleteText] || + (IsRichAutocompletionEnabled() && [self hasAdditionalText])); } } @@ -780,7 +813,8 @@ #pragma mark preedit and inline autocomplete key commands - (void)keyCommandLeft { - DCHECK([self isPreEditing] || [self hasAutocompleteText]); + DCHECK([self isPreEditing] || [self hasAutocompleteText] || + [self hasAdditionalText]); // Cursor offset. NSInteger offset = 0; @@ -788,13 +822,20 @@ [self exitPreEditState]; } - if ([self hasAutocompleteText]) { + const BOOL hasAutocompleteText = [self hasAutocompleteText]; + if (hasAutocompleteText) { // The cursor should stay in the end of the user input. offset = self.userText.length; // Accept autocomplete suggestion. [self acceptAutocompleteText]; } + if (IsRichAutocompletionEnabled() && [self hasAdditionalText]) { + if (!hasAutocompleteText) { + offset = self.userText.length - 1; + } + [self handleUserInitiatedRemovalOfAdditionalText]; + } // Place the cursor at computed offset. UITextPosition* beginning = self.beginningOfDocument; @@ -806,7 +847,8 @@ } - (void)keyCommandRight { - DCHECK([self isPreEditing] || [self hasAutocompleteText]); + DCHECK([self isPreEditing] || [self hasAutocompleteText] || + [self hasAdditionalText]); if ([self isPreEditing]) { [self exitPreEditState]; @@ -815,6 +857,9 @@ if ([self hasAutocompleteText]) { [self acceptAutocompleteText]; } + if (IsRichAutocompletionEnabled() && [self hasAdditionalText]) { + [self handleUserInitiatedRemovalOfAdditionalText]; + } // Put the cursor to the end of the input. UITextPosition* end = self.endOfDocument; @@ -825,11 +870,65 @@ #pragma mark - helpers -- (void)acceptAutocompleteText { - [self setText:self.text]; +/// Length of added text in the omnibox (autocomplete and additional text). +- (NSUInteger)addedTextLength { + if (IsRichAutocompletionEnabled()) { + return _autocompleteTextLength + self.additionalText.length; + } + return _autocompleteTextLength; } -// Helper method used to set the text of this field. +/// Returns whether there is added text in the omnibox (autocomplete or +/// additional text). +- (BOOL)hasAddedText { + return [self addedTextLength] > 0; +} + +/// Returns whether there is additional text. +- (BOOL)hasAdditionalText { + return self.additionalText.length; +} + +/// Text in the omnibox without the additional text. +- (NSAttributedString*)textWithoutAdditionalText { + if (!IsRichAutocompletionEnabled() || !self.additionalText.length) { + return self.attributedText; + } + CHECK_LE(self.additionalText.length, self.attributedText.length); + NSUInteger textLength = + self.attributedText.length - self.additionalText.length; + NSAttributedString* substring = [self.attributedText + attributedSubstringFromRange:NSMakeRange(0, textLength)]; + return substring; +} + +/// Removes the additional text. +- (void)removeAdditionalText { + CHECK(IsRichAutocompletionEnabled()); + if (!_additionalText) { + return; + } + NSAttributedString* substring = [self textWithoutAdditionalText]; + _additionalText = nil; + [self setTextInternal:substring autocompleteLength:_autocompleteTextLength]; +} + +/// Removes the additional text and calls the delegate to update the +/// suggestions. +- (void)handleUserInitiatedRemovalOfAdditionalText { + [self removeAdditionalText]; + // TODO(crbug.com/325035406): Delegate refresh suggestion list to change + // default suggestion. +} + +/// Accepts the autocomplete text. +- (void)acceptAutocompleteText { + [self setText:[self textWithoutAdditionalText].string]; +} + +/// Sets the `text` in the textfield. `text` includes autocomplete text but +/// doesn't include the additional text. The additional text is taken from +/// `self.additionalText`. - (void)setTextInternal:(NSAttributedString*)text autocompleteLength:(NSUInteger)autocompleteLength { _autocompleteTextLength = autocompleteLength; @@ -855,6 +954,10 @@ range:NSMakeRange(0, autocompleteLength)]; [fieldText appendAttributedString:autocompleteText]; } + // Append additional text. + if (IsRichAutocompletionEnabled() && self.additionalText) { + [fieldText appendAttributedString:self.additionalText]; + } // The following BOOL was introduced to workaround a UIKit bug // (crbug.com/737589, rdar/32817402). The bug relates to third party keyboards @@ -888,8 +991,8 @@ << (self.beginningOfDocument || self.endOfDocument); } else { UITextPosition* endOfUserText = - [self positionFromPosition:self.endOfDocument - offset:-autocompleteLength]; + [self positionFromPosition:self.beginningOfDocument + offset:beginningOfAutocomplete]; // Move the cursor to the beginning of the field before setting the // position to the end of the user input so if the text is very wide, the // user sees the beginning of the text instead of the end.
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h b/ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h index 5cadac765..cf9a797 100644 --- a/ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h +++ b/ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h
@@ -36,7 +36,8 @@ - (void)insertTextWhileEditing:(NSString*)text; // Returns the text that is displayed in the field, including any inline -// autocomplete text that may be present. +// autocomplete text that may be present. This does not include the additional +// text. - (NSString*)displayedText; // Returns self.text without the autocomplete part, if it's available.
diff --git a/ios/chrome/browser/ui/page_info/page_info_constants.h b/ios/chrome/browser/ui/page_info/page_info_constants.h index 995ae29..9d2df84 100644 --- a/ios/chrome/browser/ui/page_info/page_info_constants.h +++ b/ios/chrome/browser/ui/page_info/page_info_constants.h
@@ -27,6 +27,9 @@ // The left edge insect for cell separators of page info. extern const CGFloat kPageInfoTableViewSeparatorInset; +// The left edge insect for cell separators of page info with an icon. +extern const CGFloat kPageInfoTableViewSeparatorInsetWithIcon; + // The vertical padding between the navigation bar and the first section header // of page info. extern const CGFloat kPageInfoPaddingFirstSectionHeader;
diff --git a/ios/chrome/browser/ui/page_info/page_info_constants.mm b/ios/chrome/browser/ui/page_info/page_info_constants.mm index 302b456e..d7447cb 100644 --- a/ios/chrome/browser/ui/page_info/page_info_constants.mm +++ b/ios/chrome/browser/ui/page_info/page_info_constants.mm
@@ -21,6 +21,8 @@ const CGFloat kPageInfoTableViewSeparatorInset = 16.0f; +const CGFloat kPageInfoTableViewSeparatorInsetWithIcon = 60.0f; + const CGFloat kPageInfoPaddingFirstSectionHeader = 28.0f; const CGFloat kPageInfoSymbolPointSize = 18.0f;
diff --git a/ios/chrome/browser/ui/page_info/page_info_view_controller.mm b/ios/chrome/browser/ui/page_info/page_info_view_controller.mm index 8830e2f..25c53d1 100644 --- a/ios/chrome/browser/ui/page_info/page_info_view_controller.mm +++ b/ios/chrome/browser/ui/page_info/page_info_view_controller.mm
@@ -112,8 +112,11 @@ target:self.pageInfoCommandsHandler action:@selector(hidePageInfo)]; self.navigationItem.rightBarButtonItem = dismissButton; - self.tableView.separatorInset = - UIEdgeInsetsMake(0, kPageInfoTableViewSeparatorInset, 0, 0); + self.tableView.separatorInset = UIEdgeInsetsMake( + 0, + IsRevampPageInfoIosEnabled() ? kPageInfoTableViewSeparatorInsetWithIcon + : kPageInfoTableViewSeparatorInset, + 0, 0); if (!IsRevampPageInfoIosEnabled()) { self.tableView.allowsSelection = NO; }
diff --git a/ios/chrome/browser/ui/push_notification/notifications_opt_in_mediator_unittest.mm b/ios/chrome/browser/ui/push_notification/notifications_opt_in_mediator_unittest.mm index 682b62b4..7af5ce0 100644 --- a/ios/chrome/browser/ui/push_notification/notifications_opt_in_mediator_unittest.mm +++ b/ios/chrome/browser/ui/push_notification/notifications_opt_in_mediator_unittest.mm
@@ -36,17 +36,18 @@ class NotificationsOptInMediatorTest : public PlatformTest { protected: void SetUp() override { - browser_state_ = BuildChromeBrowserState(); test_manager_ = std::make_unique<TestChromeBrowserStateManager>( - std::move(browser_state_)); + BuildChromeBrowserState()); + ChromeBrowserState* browser_state = + test_manager_->GetLastUsedBrowserStateForTesting(); + TestingApplicationContext::GetGlobal()->SetChromeBrowserStateManager( test_manager_.get()); AuthenticationServiceFactory::CreateAndInitializeForBrowserState( - test_manager_->GetLastUsedBrowserState(), - std::make_unique<FakeAuthenticationServiceDelegate>()); - auth_service_ = AuthenticationServiceFactory::GetForBrowserState( - test_manager_->GetLastUsedBrowserState()); - prefs_ = test_manager_->GetLastUsedBrowserState()->GetPrefs(); + browser_state, std::make_unique<FakeAuthenticationServiceDelegate>()); + auth_service_ = + AuthenticationServiceFactory::GetForBrowserState(browser_state); + prefs_ = browser_state->GetPrefs(); local_state_ = TestingApplicationContext::GetGlobal()->GetLocalState(); scoped_feature_list_.InitWithFeatures( {kIOSTipsNotifications, kContentPushNotifications}, {}); @@ -86,8 +87,7 @@ base::test::ScopedFeatureList scoped_feature_list_; raw_ptr<PrefService> prefs_; raw_ptr<PrefService> local_state_; - std::unique_ptr<ChromeBrowserState> browser_state_; - std::unique_ptr<ios::ChromeBrowserStateManager> test_manager_; + std::unique_ptr<TestChromeBrowserStateManager> test_manager_; raw_ptr<AuthenticationService> auth_service_ = nullptr; NotificationsOptInMediator* mediator_; id consumer_;
diff --git a/ios/chrome/browser/ui/search_engine_choice/search_engine_choice_view_controller.mm b/ios/chrome/browser/ui/search_engine_choice/search_engine_choice_view_controller.mm index badbd766..591020f8 100644 --- a/ios/chrome/browser/ui/search_engine_choice/search_engine_choice_view_controller.mm +++ b/ios/chrome/browser/ui/search_engine_choice/search_engine_choice_view_controller.mm
@@ -40,13 +40,17 @@ constexpr CGFloat kTitleSubtitleMargin = 8.; // Margin between the subtitle and search engine stack view. constexpr CGFloat kSubtitleSearchEngineStackMargin = 20.; -// Margin above and below the inline "Set as Default" button. -constexpr CGFloat kInlineButtonMargin = 16.; -// Margin above the floating "Set as Default" button. -constexpr CGFloat kFloatingButtonTopMargin = 16.; +// Margin above "Set as Default" button. +// This margin needs to be used for inline and floating buttons, to make sure +// both containers have the same size. Having the same size is required to have +// a smooth transition from inline to floating SetAsDefault button. +constexpr CGFloat kSetAsDefaultButtonTopMargin = 16.; // Margin below the floating "Set as Default" button on tablets. On phones there // is no margin. -constexpr CGFloat kFloatingButtonBottomMarginTablets = 16.; +// This margin needs to be used for inline and floating buttons, to make sure +// both containers have the same size. Having the same size is required to have +// a smooth transition from inline to floating SetAsDefault button. +constexpr CGFloat kSetAsDefaultButtonBottomMarginTablets = 16.; // Margin below the pill button on tablets. On phones there is no margin. constexpr CGFloat kMorePillButtonBottomMarginTablets = 34.; // Corner radius for the "More" pill button. @@ -182,6 +186,9 @@ // Container to display the "Set as Default" button in the scroll view. // Related to `_inlineSetAsDefaultButton`. This container is used in // the animation to transition to `_floatingSetAsDefaultButtonContainer`. + // This container needs to have the same size than + // `_floatingSetAsDefaultButtonContainer`, to have a smooth transition to the + // floating SetAsDefault button. UIView* _inlineSetAsDefaultButtonContainer; // Button to confirm the default search engine selection. This button is // visually identical to `_floatingSetAsDefaultButton` but it is part of @@ -189,6 +196,9 @@ UIButton* _inlineSetAsDefaultButton; // Container to display the "Set as Default" button on top of the scroll view. // Related to `_floatingSetAsDefaultButton`. + // This container needs to have the same size than + // `_inlineSetAsDefaultButtonContainer`, to have a smooth transition from the + // inline SetAsDefault button. UIView* _floatingSetAsDefaultButtonContainer; // Horizontal separator at the top of `_floatingSetAsDefaultButtonContainer`. // It should be visible only when `_floatingSetAsDefaultButtonContainer` is @@ -237,6 +247,8 @@ _scrollView.translatesAutoresizingMaskIntoConstraints = NO; _scrollView.accessibilityIdentifier = kSearchEngineChoiceScrollViewIdentifier; _scrollView.delegate = self; + _scrollView.contentInsetAdjustmentBehavior = + UIScrollViewContentInsetAdjustmentAlways; [_scrollView addSubview:scrollContentView]; // Add logo image. @@ -368,6 +380,10 @@ // allowing the scroll view to take the full screen width. UILayoutGuide* widthLayoutGuide = AddPromoStyleWidthLayoutGuide(view); + const BOOL tabletFactor = + ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_TABLET; + const CGFloat setAsDefaultButtonBottomMargin = + tabletFactor ? kSetAsDefaultButtonBottomMarginTablets : 0.; [NSLayoutConstraint activateConstraints:@[ // Scroll view constraints. It needs to be the full size of the view, // so the content is visible in the safe area too. @@ -382,7 +398,8 @@ [scrollContentView.bottomAnchor constraintEqualToAnchor:_scrollView.contentLayoutGuide.bottomAnchor], [scrollContentView.heightAnchor - constraintGreaterThanOrEqualToAnchor:_scrollView.heightAnchor], + constraintGreaterThanOrEqualToAnchor:_scrollView.safeAreaLayoutGuide + .heightAnchor], [scrollContentView.centerXAnchor constraintEqualToAnchor:_scrollView.centerXAnchor], [scrollContentView.widthAnchor @@ -435,10 +452,10 @@ // _inlineSetAsDefaultButton constraints. [_inlineSetAsDefaultButton.topAnchor constraintEqualToAnchor:_inlineSetAsDefaultButtonContainer.topAnchor - constant:kInlineButtonMargin], + constant:kSetAsDefaultButtonTopMargin], [_inlineSetAsDefaultButton.bottomAnchor constraintEqualToAnchor:_inlineSetAsDefaultButtonContainer.bottomAnchor - constant:-kInlineButtonMargin], + constant:-setAsDefaultButtonBottomMargin], [_inlineSetAsDefaultButton.widthAnchor constraintEqualToAnchor:_searchEngineStackView.widthAnchor], [_inlineSetAsDefaultButton.centerXAnchor @@ -447,8 +464,7 @@ // More pill button constraints. [_morePillButton.bottomAnchor constraintEqualToAnchor:view.safeAreaLayoutGuide.bottomAnchor - constant:-(ui::GetDeviceFormFactor() == - ui::DEVICE_FORM_FACTOR_TABLET + constant:-(tabletFactor ? kMorePillButtonBottomMarginTablets : 0.)], [_morePillButton.centerXAnchor constraintEqualToAnchor:view.centerXAnchor], @@ -478,14 +494,11 @@ // _floatingSetAsDefaultButton constraints. [_floatingSetAsDefaultButton.topAnchor constraintEqualToAnchor:_floatingSetAsDefaultButtonContainer.topAnchor - constant:kFloatingButtonTopMargin], + constant:kSetAsDefaultButtonTopMargin], [_floatingSetAsDefaultButton.bottomAnchor constraintEqualToAnchor:_floatingSetAsDefaultButtonContainer .safeAreaLayoutGuide.bottomAnchor - constant:-(ui::GetDeviceFormFactor() == - ui::DEVICE_FORM_FACTOR_TABLET - ? kFloatingButtonBottomMarginTablets - : 0.)], + constant:-setAsDefaultButtonBottomMargin], [_floatingSetAsDefaultButton.widthAnchor constraintEqualToAnchor:_searchEngineStackView.widthAnchor], [_floatingSetAsDefaultButton.centerXAnchor
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/BUILD.gn b/ios/chrome/browser/ui/settings/clear_browsing_data/BUILD.gn index 25bc739..d822ef2b 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/BUILD.gn +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/BUILD.gn
@@ -145,7 +145,6 @@ "//ios/chrome/browser/signin/model:fake_system_identity", "//ios/chrome/browser/ui/authentication:eg_test_support+eg2", "//ios/chrome/browser/ui/popup_menu:constants", - "//ios/chrome/browser/ui/popup_menu/overflow_menu:feature_flags", "//ios/chrome/browser/ui/settings/cells:clear_browsing_data_constants", "//ios/chrome/test/earl_grey:eg_test_support+eg2", "//ios/testing/earl_grey:eg_test_support+eg2",
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_consumer.h b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_consumer.h index 3fd0825..4e92f6b2 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_consumer.h +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_consumer.h
@@ -7,8 +7,7 @@ #import <Foundation/Foundation.h> -#import "base/ios/block_types.h" -#import "components/browsing_data/core/browsing_data_utils.h" +#include "base/ios/block_types.h" class ChromeBrowserState; @class TableViewItem; @@ -36,8 +35,6 @@ // Dismisses the alert coordinator. - (void)dismissAlertCoordinator; -// Called when the time period for the deletion was changed by the user. -- (void)updateTimePeriod:(browsing_data::TimePeriod)timePeriod; @end #endif // IOS_CHROME_BROWSER_UI_SETTINGS_CLEAR_BROWSING_DATA_CLEAR_BROWSING_DATA_CONSUMER_H_
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_egtest.mm b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_egtest.mm index 7c22dee..0912a36f 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_egtest.mm +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_egtest.mm
@@ -11,7 +11,6 @@ #import "ios/chrome/browser/signin/model/fake_system_identity.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey.h" #import "ios/chrome/browser/ui/authentication/signin_earl_grey_ui_test_util.h" -#import "ios/chrome/browser/ui/popup_menu/overflow_menu/feature_flags.h" #import "ios/chrome/browser/ui/popup_menu/popup_menu_constants.h" #import "ios/chrome/browser/ui/settings/cells/clear_browsing_data_constants.h" #import "ios/chrome/grit/ios_strings.h" @@ -71,20 +70,6 @@ @implementation ClearBrowsingDataSettingsTestCase -- (AppLaunchConfiguration)appConfigurationForTestCase { - AppLaunchConfiguration config; - config.relaunch_policy = NoForceRelaunchAndResetState; - - // TODO(crbug.com/1285974): Remove when bug is resolved for multiwindow - // egtests. - if ([self - isRunningTest:@selector(testClearBrowsingDataDialogInMultiWindow)]) { - config.features_disabled.push_back(kNewOverflowMenu); - } - - return config; -} - - (void)openClearBrowsingDataDialog { [ChromeEarlGreyUI openSettingsMenu]; [ChromeEarlGreyUI tapSettingsMenuButton:SettingsMenuPrivacyButton()]; @@ -105,16 +90,6 @@ clearBrowsingDataDialogLabel)]; } -// With CBD dialog already opened, go through with the deletion. -- (void)goThroughWithDeletion { - [ChromeEarlGreyUI tapClearBrowsingDataMenuButton: - chrome_test_util::ClearBrowsingDataButton()]; - [[EarlGrey selectElementWithMatcher:chrome_test_util:: - ConfirmClearBrowsingDataButton()] - performAction:grey_tap()]; - WaitForActivityOverlayToDisappear(); -} - // Test that opening the clear browsing data dialog does not crash. - (void)testOpenClearBrowsingDataDialogUI { [self openClearBrowsingDataDialog]; @@ -151,6 +126,12 @@ if (![ChromeEarlGrey areMultipleWindowsSupported]) EARL_GREY_TEST_DISABLED(@"Multiple windows can't be opened."); + // TODO(crbug.com/1285974). + if ([ChromeEarlGrey isNewOverflowMenuEnabled]) { + EARL_GREY_TEST_DISABLED( + @"Earl Grey doesn't work properly with SwiftUI and multiwindow"); + } + [ChromeEarlGrey openNewWindow]; [ChromeEarlGrey waitUntilReadyWindowWithNumber:1]; [ChromeEarlGrey waitForForegroundWindowCount:2]; @@ -195,8 +176,8 @@ [[EarlGrey selectElementWithMatcher:ClearAutofillButton()] assertWithMatcher:ElementIsSelected(isClearAutofillButtonSelected)]; - // Switch Clear Browsing History Button in window 0 and make sure it doesn't - // change in window 1. + // Switch Clear Browsing History Button in window 0 and make sure it is + // deselected in both. [EarlGrey setRootMatcherForSubsequentInteractions:WindowWithNumber(0)]; [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] performAction:grey_tap()]; @@ -206,30 +187,30 @@ [EarlGrey setRootMatcherForSubsequentInteractions:WindowWithNumber(1)]; [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] assertWithMatcher:ElementIsSelected( - isClearBrowsingHistoryButtonSelected)]; + !isClearBrowsingHistoryButtonSelected)]; - // Switch Clear Browsing Cookies in window 1 and make sure it is still - // selected in window 0. + // Switch Clear Browsing History Button in window 1 and make sure it is + // deselected in both. [[EarlGrey selectElementWithMatcher:ClearCookiesButton()] performAction:grey_tap()]; [[EarlGrey selectElementWithMatcher:ClearCookiesButton()] assertWithMatcher:ElementIsSelected(!isClearCookiesButtonSelected)]; [EarlGrey setRootMatcherForSubsequentInteractions:WindowWithNumber(0)]; [[EarlGrey selectElementWithMatcher:ClearCookiesButton()] - assertWithMatcher:ElementIsSelected(isClearCookiesButtonSelected)]; + assertWithMatcher:ElementIsSelected(!isClearCookiesButtonSelected)]; - // Switch Clear Cache Button in window 0 and make sure it is still selected in - // window 1. + // Switch Clear Cache Button in window 0 and make sure it is + // deselected in both. [[EarlGrey selectElementWithMatcher:ClearCacheButton()] performAction:grey_tap()]; [[EarlGrey selectElementWithMatcher:ClearCacheButton()] assertWithMatcher:ElementIsSelected(!isClearCacheButtonSelected)]; [EarlGrey setRootMatcherForSubsequentInteractions:WindowWithNumber(1)]; [[EarlGrey selectElementWithMatcher:ClearCacheButton()] - assertWithMatcher:ElementIsSelected(isClearCacheButtonSelected)]; + assertWithMatcher:ElementIsSelected(!isClearCacheButtonSelected)]; - // Switch Clear Saved Passwords Button in window 1 and make sure it is still - // selected in window 0. + // Switch Clear Saved Passwords Button in window 1 and make sure it is + // deselected in both. [[EarlGrey selectElementWithMatcher:ClearSavedPasswordsButton()] performAction:grey_tap()]; [[EarlGrey selectElementWithMatcher:ClearSavedPasswordsButton()] @@ -237,20 +218,33 @@ !isClearSavedPasswordsButtonSelected)]; [EarlGrey setRootMatcherForSubsequentInteractions:WindowWithNumber(0)]; [[EarlGrey selectElementWithMatcher:ClearSavedPasswordsButton()] - assertWithMatcher:ElementIsSelected(isClearSavedPasswordsButtonSelected)]; + assertWithMatcher:ElementIsSelected( + !isClearSavedPasswordsButtonSelected)]; - // Switch Clear Autofill Button in window 0 and make sure it is still selected - // in window 1. + // Switch Clear Autofill Button in window 0 and make sure it is + // deselected in both. [[EarlGrey selectElementWithMatcher:ClearAutofillButton()] performAction:grey_tap()]; [[EarlGrey selectElementWithMatcher:ClearAutofillButton()] assertWithMatcher:ElementIsSelected(!isClearAutofillButtonSelected)]; [EarlGrey setRootMatcherForSubsequentInteractions:WindowWithNumber(1)]; [[EarlGrey selectElementWithMatcher:ClearAutofillButton()] - assertWithMatcher:ElementIsSelected(isClearAutofillButtonSelected)]; + assertWithMatcher:ElementIsSelected(!isClearAutofillButtonSelected)]; + + // Restore to intial state. + [EarlGrey setRootMatcherForSubsequentInteractions:WindowWithNumber(0)]; + [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] + performAction:grey_tap()]; + [[EarlGrey selectElementWithMatcher:ClearCookiesButton()] + performAction:grey_tap()]; + [[EarlGrey selectElementWithMatcher:ClearCacheButton()] + performAction:grey_tap()]; + [[EarlGrey selectElementWithMatcher:ClearSavedPasswordsButton()] + performAction:grey_tap()]; + [[EarlGrey selectElementWithMatcher:ClearAutofillButton()] + performAction:grey_tap()]; // Cleanup. - [EarlGrey setRootMatcherForSubsequentInteractions:WindowWithNumber(0)]; [[EarlGrey selectElementWithMatcher:SettingsDoneButton()] performAction:grey_tap()]; [EarlGrey setRootMatcherForSubsequentInteractions:WindowWithNumber(1)]; @@ -301,8 +295,12 @@ [ChromeEarlGreyUI tapPrivacyMenuButton:chrome_test_util::ButtonWithAccessibilityLabelId( IDS_IOS_CLEAR_BROWSING_DATA_TITLE)]; - - [self goThroughWithDeletion]; + [ChromeEarlGreyUI tapClearBrowsingDataMenuButton: + chrome_test_util::ClearBrowsingDataButton()]; + [[EarlGrey selectElementWithMatcher:chrome_test_util:: + ConfirmClearBrowsingDataButton()] + performAction:grey_tap()]; + WaitForActivityOverlayToDisappear(); } // Tests that a user in the `ConsentLevel::kSignin` state will remain signed in @@ -335,90 +333,4 @@ [SigninEarlGrey verifySignedInWithFakeIdentity:fakeIdentity]; } -// Tests that changing the options for clear browsing data is not saved if the -// deletion doesn't go through, i.e. if the user dismisses CBD. -- (void)testChangeOptionsAndDismiss { - [self openClearBrowsingDataDialog]; - - // Check that CBD is presented. - [[EarlGrey - selectElementWithMatcher: - grey_accessibilityID(kClearBrowsingDataViewAccessibilityIdentifier)] - assertWithMatcher:grey_notNil()]; - - // Switch the clear browsing history button to off. - [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] - performAction:grey_tap()]; - [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] - assertWithMatcher:ElementIsSelected(NO)]; - - // Dismiss the view without having going through the deletion. - [[EarlGrey selectElementWithMatcher:SettingsDoneButton()] - performAction:grey_tap()]; - - // Check that Settings has been dismissed. - [ChromeEarlGreyUI waitForAppToIdle]; - [[EarlGrey - selectElementWithMatcher: - grey_accessibilityID(kClearBrowsingDataViewAccessibilityIdentifier)] - assertWithMatcher:grey_nil()]; - - // Open CBD and check that the options did not change, i.e. that clear - // browsing history remains selected. - [self openClearBrowsingDataDialog]; - [[EarlGrey - selectElementWithMatcher: - grey_accessibilityID(kClearBrowsingDataViewAccessibilityIdentifier)] - assertWithMatcher:grey_notNil()]; - [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] - assertWithMatcher:ElementIsSelected(YES)]; -} - -// Tests that changing the options for clear browsing data is saved if the -// deletion goes through, i.e. if the user clears their browsing data. -- (void)testChangeOptionsAndDelete { - [self openClearBrowsingDataDialog]; - - // Check that CBD is presented. - [[EarlGrey - selectElementWithMatcher: - grey_accessibilityID(kClearBrowsingDataViewAccessibilityIdentifier)] - assertWithMatcher:grey_notNil()]; - - // Switch the clear browsing history button to off. - [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] - performAction:grey_tap()]; - [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] - assertWithMatcher:ElementIsSelected(NO)]; - - [self goThroughWithDeletion]; - - // Dismiss the view. - [[EarlGrey - selectElementWithMatcher: - grey_accessibilityID(kClearBrowsingDataViewAccessibilityIdentifier)] - performAction:grey_swipeFastInDirection(kGREYDirectionDown)]; - - // Check that Settings has been dismissed. - [[EarlGrey - selectElementWithMatcher: - grey_accessibilityID(kClearBrowsingDataViewAccessibilityIdentifier)] - assertWithMatcher:grey_nil()]; - - // Open CBD and check that the options changed, i.e. that clear browsing - // history is unselected selected. - [self openClearBrowsingDataDialog]; - [[EarlGrey - selectElementWithMatcher: - grey_accessibilityID(kClearBrowsingDataViewAccessibilityIdentifier)] - assertWithMatcher:grey_notNil()]; - [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] - assertWithMatcher:ElementIsSelected(NO)]; - - // Reset. - [[EarlGrey selectElementWithMatcher:ClearBrowsingHistoryButton()] - performAction:grey_tap()]; - [self goThroughWithDeletion]; -} - @end
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager.h b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager.h index 0bbfdd6..a0f08603 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager.h +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager.h
@@ -5,8 +5,7 @@ #ifndef IOS_CHROME_BROWSER_UI_SETTINGS_CLEAR_BROWSING_DATA_CLEAR_BROWSING_DATA_MANAGER_H_ #define IOS_CHROME_BROWSER_UI_SETTINGS_CLEAR_BROWSING_DATA_CLEAR_BROWSING_DATA_MANAGER_H_ -#import "components/browsing_data/core/browsing_data_utils.h" -#import "components/browsing_data/core/counters/browsing_data_counter.h" +#include "components/browsing_data/core/counters/browsing_data_counter.h" #import "ios/chrome/browser/shared/ui/list_model/list_model.h" class Browser; @@ -69,10 +68,6 @@ // The manager's consumer. @property(nonatomic, weak) id<ClearBrowsingDataConsumer> consumer; -// The selected deletion's time period. Initialized with the pref value of -// browsing_data::prefs::kDeleteTimePeriod. -@property(nonatomic, assign) browsing_data::TimePeriod timePeriod; - // Default init method. `browserState` can't be nil. - (instancetype)initWithBrowserState:(ChromeBrowserState*)browserState; @@ -84,6 +79,9 @@ - (instancetype)init NS_UNAVAILABLE; +// Call this method before actually using the data manager. +- (void)prepare; + // Call this method when data manager is not used anymore. - (void)disconnect;
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager.mm b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager.mm index 84cf385a..118a4dc 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager.mm +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager.mm
@@ -117,7 +117,15 @@ } // namespace -@interface ClearBrowsingDataManager () <BrowsingDataRemoverObserving> { +@interface ClearBrowsingDataManager () <BrowsingDataRemoverObserving, + PrefObserverDelegate> { + // Access to the kDeleteTimePeriod preference. + IntegerPrefMember _timeRangePref; + // Pref observer to track changes to prefs. + std::unique_ptr<PrefObserverBridge> _prefObserverBridge; + // Registrar for pref changes notifications. + PrefChangeRegistrar _prefChangeRegistrar; + // Observer for browsing data removal events and associated // base::ScopedObservation used to track registration with // BrowsingDataRemover. @@ -180,6 +188,9 @@ _browserState = browserState; _counterWrapperProducer = producer; + _timeRangePref.Init(browsing_data::prefs::kDeleteTimePeriod, + _browserState->GetPrefs()); + _browsingDataRemoverObserver = std::make_unique<BrowsingDataRemoverObserverBridge>(self); _scoped_observation = @@ -188,9 +199,8 @@ _browsingDataRemoverObserver.get()); _scoped_observation->Observe(remover); - _timePeriod = static_cast<browsing_data::TimePeriod>( - _browserState->GetPrefs()->GetInteger( - browsing_data::prefs::kDeleteTimePeriod)); + _prefChangeRegistrar.Init(_browserState->GetPrefs()); + _prefObserverBridge.reset(new PrefObserverBridge(self)); } return self; } @@ -224,7 +234,26 @@ [tableView reloadData]; } +- (void)prepare { + _prefObserverBridge->ObserveChangesForPreference( + browsing_data::prefs::kDeleteTimePeriod, &_prefChangeRegistrar); + + _prefObserverBridge->ObserveChangesForPreference( + browsing_data::prefs::kDeleteBrowsingHistory, &_prefChangeRegistrar); + _prefObserverBridge->ObserveChangesForPreference( + browsing_data::prefs::kDeleteCookies, &_prefChangeRegistrar); + _prefObserverBridge->ObserveChangesForPreference( + browsing_data::prefs::kDeleteCache, &_prefChangeRegistrar); + _prefObserverBridge->ObserveChangesForPreference( + browsing_data::prefs::kDeletePasswords, &_prefChangeRegistrar); + _prefObserverBridge->ObserveChangesForPreference( + browsing_data::prefs::kDeleteFormData, &_prefChangeRegistrar); +} + - (void)disconnect { + _timeRangePref.Destroy(); + _prefObserverBridge.reset(); + _prefChangeRegistrar.RemoveAll(); _scoped_observation.reset(); _browsingDataRemoverObserver.reset(); _countersByMasks.clear(); @@ -309,7 +338,8 @@ (~NSByteCountFormatterUseKB); formatter.countStyle = NSByteCountFormatterCountStyleMemory; NSString* formattedSize = [formatter stringFromByteCount:cacheSizeBytes]; - return self.timePeriod == browsing_data::TimePeriod::ALL_TIME + return _timeRangePref.GetValue() == + static_cast<int>(browsing_data::TimePeriod::ALL_TIME) ? formattedSize : l10n_util::GetNSStringF( IDS_DEL_CACHE_COUNTER_UPPER_ESTIMATE, @@ -589,8 +619,8 @@ [[TableViewDetailIconItem alloc] initWithType:ItemTypeTimeRange]; timeRangeItem.text = l10n_util::GetNSString( IDS_IOS_CLEAR_BROWSING_DATA_TIME_RANGE_SELECTOR_TITLE); - NSString* detailText = - [TimeRangeSelectorTableViewController timePeriodLabel:self.timePeriod]; + NSString* detailText = [TimeRangeSelectorTableViewController + timePeriodLabelForPrefs:self.browserState->GetPrefs()]; DCHECK(detailText); timeRangeItem.detailText = detailText; timeRangeItem.accessoryType = UITableViewCellAccessoryDisclosureIndicator; @@ -647,8 +677,10 @@ - (void)clearDataForDataTypes:(BrowsingDataRemoveMask)mask { DCHECK(mask != BrowsingDataRemoveMask::REMOVE_NOTHING); + browsing_data::TimePeriod timePeriod = + static_cast<browsing_data::TimePeriod>(_timeRangePref.GetValue()); [self.consumer removeBrowsingDataForBrowserState:_browserState - timePeriod:self.timePeriod + timePeriod:timePeriod removeMask:mask completionBlock:nil]; @@ -658,9 +690,6 @@ feature_engagement::TrackerFactory::GetForBrowserState(_browserState) ->NotifyEvent(feature_engagement::events::kClearedBrowsingData); - // Update prefs with the values displayed in the UI. - [self updatePrefs]; - if (IsRemoveDataMaskSet(mask, BrowsingDataRemoveMask::REMOVE_HISTORY)) { PrefService* prefs = _browserState->GetPrefs(); int noticeShownTimes = prefs->GetInteger( @@ -688,23 +717,6 @@ } } -// Updates the preferences with the option values of the latest deletion. -- (void)updatePrefs { - PrefService* prefs = self.browserState->GetPrefs(); - - prefs->SetInteger(browsing_data::prefs::kDeleteTimePeriod, - static_cast<int>(self.timePeriod)); - - prefs->SetBoolean(self.browsingHistoryItem.prefName, - self.browsingHistoryItem.checked); - prefs->SetBoolean(self.cookiesSiteDataItem.prefName, - self.cookiesSiteDataItem.checked); - prefs->SetBoolean(self.cacheItem.prefName, self.cacheItem.checked); - prefs->SetBoolean(self.savedPasswordsItem.prefName, - self.savedPasswordsItem.checked); - prefs->SetBoolean(self.autofillItem.prefName, self.autofillItem.checked); -} - #pragma mark Properties - (void)setShouldShowNoticeAboutOtherFormsOfBrowsingHistory:(BOOL)showNotice @@ -729,17 +741,33 @@ (const signin::PrimaryAccountChangeEvent&)event { } -#pragma mark - Property Setters/Getters +#pragma mark - PrefObserverDelegate -- (void)setTimePeriod:(browsing_data::TimePeriod)timePeriod { - if (_timePeriod == timePeriod) { - return; +- (void)onPreferenceChanged:(const std::string&)preferenceName { + PrefService* prefs = self.browserState->GetPrefs(); + if (preferenceName == browsing_data::prefs::kDeleteTimePeriod) { + NSString* detailText = + [TimeRangeSelectorTableViewController timePeriodLabelForPrefs:prefs]; + self.tableViewTimeRangeItem.detailText = detailText; + [self.consumer updateCellsForItem:self.tableViewTimeRangeItem reload:YES]; + } else if (preferenceName == browsing_data::prefs::kDeleteBrowsingHistory) { + self.browsingHistoryItem.checked = prefs->GetBoolean(preferenceName); + [self.consumer updateCellsForItem:self.browsingHistoryItem reload:NO]; + } else if (preferenceName == browsing_data::prefs::kDeleteCookies) { + self.cookiesSiteDataItem.checked = prefs->GetBoolean(preferenceName); + [self.consumer updateCellsForItem:self.cookiesSiteDataItem reload:NO]; + } else if (preferenceName == browsing_data::prefs::kDeleteCache) { + self.cacheItem.checked = prefs->GetBoolean(preferenceName); + [self.consumer updateCellsForItem:self.cacheItem reload:NO]; + } else if (preferenceName == browsing_data::prefs::kDeletePasswords) { + self.savedPasswordsItem.checked = prefs->GetBoolean(preferenceName); + [self.consumer updateCellsForItem:self.savedPasswordsItem reload:NO]; + } else if (preferenceName == browsing_data::prefs::kDeleteFormData) { + self.autofillItem.checked = prefs->GetBoolean(preferenceName); + [self.consumer updateCellsForItem:self.autofillItem reload:NO]; + } else { + DCHECK(false) << "Unxpected clear browsing data item type."; } - - _timePeriod = timePeriod; - self.tableViewTimeRangeItem.detailText = - [TimeRangeSelectorTableViewController timePeriodLabel:self.timePeriod]; - [self.consumer updateCellsForItem:self.tableViewTimeRangeItem reload:YES]; } #pragma mark BrowsingDataRemoverObserving
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager_unittest.mm b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager_unittest.mm index d0c8550..294c54d 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager_unittest.mm +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_manager_unittest.mm
@@ -9,6 +9,7 @@ #import "base/memory/raw_ptr.h" #import "base/strings/sys_string_conversions.h" #import "base/strings/utf_string_conversions.h" +#import "components/browsing_data/core/pref_names.h" #import "components/pref_registry/pref_registry_syncable.h" #import "components/search_engines/template_url_data_util.h" #import "components/search_engines/template_url_prepopulate_data.h" @@ -27,6 +28,7 @@ #import "ios/chrome/browser/shared/model/application_context/application_context.h" #import "ios/chrome/browser/shared/model/browser_state/test_chrome_browser_state.h" #import "ios/chrome/browser/shared/model/prefs/browser_prefs.h" +#import "ios/chrome/browser/shared/model/prefs/pref_names.h" #import "ios/chrome/browser/shared/public/features/features.h" #import "ios/chrome/browser/shared/ui/table_view/cells/table_view_detail_icon_item.h" #import "ios/chrome/browser/shared/ui/table_view/cells/table_view_link_header_footer_item.h" @@ -102,9 +104,13 @@ browsingDataRemover:remover_.get() browsingDataCounterWrapperProducer: [[FakeBrowsingDataCounterWrapperProducer alloc] init]]; + [manager_ prepare]; test_sync_service_ = static_cast<syncer::TestSyncService*>( SyncServiceFactory::GetForBrowserState(browser_state_.get())); + + time_range_pref_.Init(browsing_data::prefs::kDeleteTimePeriod, + browser_state_->GetPrefs()); } ~ClearBrowsingDataManagerTest() override { [manager_ disconnect]; } @@ -163,6 +169,7 @@ std::unique_ptr<BrowsingDataRemover> remover_; ClearBrowsingDataManager* manager_; raw_ptr<syncer::TestSyncService> test_sync_service_; + IntegerPrefMember time_range_pref_; raw_ptr<TemplateURLService> template_url_service_; // weak raw_ptr<ChromeAccountManagerService> account_manager_service_; }; @@ -216,7 +223,9 @@ } TEST_F(ClearBrowsingDataManagerTest, TestCacheCounterFormattingForAllTime) { - manager_.timePeriod = browsing_data::TimePeriod::ALL_TIME; + PrefService* prefs = browser_state_->GetPrefs(); + prefs->SetInteger(browsing_data::prefs::kDeleteTimePeriod, + static_cast<int>(browsing_data::TimePeriod::ALL_TIME)); CacheCounter counter(browser_state_.get()); NSByteCountFormatter* formatter = [[NSByteCountFormatter alloc] init]; @@ -259,7 +268,9 @@ TEST_F(ClearBrowsingDataManagerTest, TestCacheCounterFormattingForLessThanAllTime) { - manager_.timePeriod = browsing_data::TimePeriod::LAST_HOUR; + PrefService* prefs = browser_state_->GetPrefs(); + prefs->SetInteger(browsing_data::prefs::kDeleteTimePeriod, + static_cast<int>(browsing_data::TimePeriod::LAST_HOUR)); CacheCounter counter(browser_state_.get()); NSByteCountFormatter* formatter = [[NSByteCountFormatter alloc] init]; @@ -312,7 +323,7 @@ } } -TEST_F(ClearBrowsingDataManagerTest, TestOnTimeRangeChanged) { +TEST_F(ClearBrowsingDataManagerTest, TestOnPreferenceChanged) { [manager_ loadModel:model_]; NSArray* timeRangeItems = [model_ itemsInSectionWithIdentifier:SectionIdentifierTimeRange]; @@ -322,12 +333,11 @@ // Changes of Time Range should trigger updates on Time Range item's // detailText. - manager_.timePeriod = browsing_data::TimePeriod::LAST_WEEK; + time_range_pref_.SetValue(2); EXPECT_NSEQ(l10n_util::GetNSString( IDS_IOS_CLEAR_BROWSING_DATA_TIME_RANGE_OPTION_PAST_WEEK), timeRangeItem.detailText); - manager_.timePeriod = browsing_data::TimePeriod::FOUR_WEEKS; - + time_range_pref_.SetValue(3); EXPECT_NSEQ( l10n_util::GetNSString( IDS_IOS_CLEAR_BROWSING_DATA_TIME_RANGE_OPTION_LAST_FOUR_WEEKS),
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_table_view_controller.mm b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_table_view_controller.mm index 2d49ef9c..9e9f51330 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_table_view_controller.mm
@@ -188,6 +188,7 @@ self.suppressTableViewUpdates = YES; [self loadModel]; self.suppressTableViewUpdates = NO; + [self.dataManager prepare]; } - (void)viewWillAppear:(BOOL)animated { @@ -304,10 +305,9 @@ DCHECK(item); switch (item.type) { case ItemTypeTimeRange: { - TimeRangeSelectorTableViewController* controller = + UIViewController* controller = [[TimeRangeSelectorTableViewController alloc] - initWithTimePeriod:self.dataManager.timePeriod]; - controller.consumer = self; + initWithPrefs:self.browserState->GetPrefs()]; [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; [self.navigationController pushViewController:controller animated:YES]; break; @@ -321,8 +321,9 @@ TableViewClearBrowsingDataItem* clearBrowsingDataItem = base::apple::ObjCCastStrict<TableViewClearBrowsingDataItem>(item); - clearBrowsingDataItem.checked = !clearBrowsingDataItem.checked; - [self updateCellsForItem:clearBrowsingDataItem reload:NO]; + self.browserState->GetPrefs()->SetBoolean(clearBrowsingDataItem.prefName, + !clearBrowsingDataItem.checked); + // UI update will be trigerred by data manager. break; } default: @@ -378,10 +379,6 @@ #pragma mark - ClearBrowsingDataConsumer -- (void)updateTimePeriod:(browsing_data::TimePeriod)timePeriod { - self.dataManager.timePeriod = timePeriod; -} - - (void)dismissAlertCoordinator { [self.alertCoordinator stop]; self.alertCoordinator = nil;
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller+Testing.h b/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller+Testing.h index b5558d7..f29b9be 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller+Testing.h +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller+Testing.h
@@ -5,12 +5,10 @@ #ifndef IOS_CHROME_BROWSER_UI_SETTINGS_CLEAR_BROWSING_DATA_TIME_RANGE_SELECTOR_TABLE_VIEW_CONTROLLER_TESTING_H_ #define IOS_CHROME_BROWSER_UI_SETTINGS_CLEAR_BROWSING_DATA_TIME_RANGE_SELECTOR_TABLE_VIEW_CONTROLLER_TESTING_H_ -#import "components/browsing_data/core/browsing_data_utils.h" - // Testing category exposing private methods of // TimeRangeSelectorTableViewController for tests. @interface TimeRangeSelectorTableViewController (Testing) -- (void)updateTimePeriod:(browsing_data::TimePeriod)timePeriod; +- (void)updatePrefValue:(int)prefValue; @end #endif // IOS_CHROME_BROWSER_UI_SETTINGS_CLEAR_BROWSING_DATA_TIME_RANGE_SELECTOR_TABLE_VIEW_CONTROLLER_TESTING_H_
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.h b/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.h index dd6dddd..a21b771 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.h +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.h
@@ -5,26 +5,22 @@ #ifndef IOS_CHROME_BROWSER_UI_SETTINGS_CLEAR_BROWSING_DATA_TIME_RANGE_SELECTOR_TABLE_VIEW_CONTROLLER_H_ #define IOS_CHROME_BROWSER_UI_SETTINGS_CLEAR_BROWSING_DATA_TIME_RANGE_SELECTOR_TABLE_VIEW_CONTROLLER_H_ -#import "components/browsing_data/core/browsing_data_utils.h" #import "ios/chrome/browser/ui/settings/settings_root_table_view_controller.h" -@protocol ClearBrowsingDataConsumer; +class PrefService; // Table view for time range selection. @interface TimeRangeSelectorTableViewController : SettingsRootTableViewController -- (instancetype)initWithTimePeriod:(browsing_data::TimePeriod)timePeriod - NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithPrefs:(PrefService*)prefs NS_DESIGNATED_INITIALIZER; - (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE; -// Returns the text for the currently selected time period. Kept in this class, -// so that all of the code to translate from time period to UI is in one place. -+ (NSString*)timePeriodLabel:(browsing_data::TimePeriod)timePeriod; - -// Local Dispatcher for this TimeRangeSelectorTableViewController. -@property(nonatomic, weak) id<ClearBrowsingDataConsumer> consumer; +// Returns the text for the current setting, based on the values of the +// preference. Kept in this class, so that all of the code to translate from +// preference to UI is in one place. ++ (NSString*)timePeriodLabelForPrefs:(PrefService*)prefs; @end
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.mm b/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.mm index 2a387cce..ed1b94f 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.mm
@@ -4,14 +4,14 @@ #import "ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.h" -#import <objc/NSObjCRuntime.h> - #import "base/apple/foundation_util.h" #import "components/browsing_data/core/browsing_data_utils.h" +#import "components/browsing_data/core/pref_names.h" +#import "components/prefs/pref_member.h" +#import "components/prefs/pref_service.h" #import "ios/chrome/browser/shared/ui/table_view/cells/table_view_detail_text_item.h" #import "ios/chrome/browser/shared/ui/table_view/legacy_chrome_table_view_styler.h" #import "ios/chrome/browser/shared/ui/table_view/table_view_utils.h" -#import "ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_consumer.h" #import "ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller+Testing.h" #import "ios/chrome/common/ui/colors/semantic_color_names.h" #import "ios/chrome/grit/ios_strings.h" @@ -52,7 +52,7 @@ } // namespace @interface TimeRangeSelectorTableViewController () { - browsing_data::TimePeriod _timePeriod; + IntegerPrefMember _timeRangePref; } @end @@ -61,13 +61,13 @@ #pragma mark Initialization -- (instancetype)initWithTimePeriod:(browsing_data::TimePeriod)timePeriod { +- (instancetype)initWithPrefs:(PrefService*)prefs { UITableViewStyle style = ChromeTableViewStyle(); self = [super initWithStyle:style]; if (self) { self.title = l10n_util::GetNSString( IDS_IOS_CLEAR_BROWSING_DATA_TIME_RANGE_SELECTOR_TITLE); - _timePeriod = timePeriod; + _timeRangePref.Init(browsing_data::prefs::kDeleteTimePeriod, prefs); self.shouldHideDoneButton = YES; } return self; @@ -108,16 +108,16 @@ } - (void)updateCheckedState { + int timeRangePrefValue = _timeRangePref.GetValue(); TableViewModel* model = self.tableViewModel; NSMutableArray* modifiedItems = [NSMutableArray array]; for (TableViewItem* item in [model itemsInSectionWithIdentifier:SectionIdentifierOptions]) { - NSInteger timePeriodType = - static_cast<NSInteger>(_timePeriod) + kItemTypeEnumZero; + NSInteger itemPrefValue = item.type - kItemTypeEnumZero; UITableViewCellAccessoryType desiredType = - item.type == timePeriodType ? UITableViewCellAccessoryCheckmark - : UITableViewCellAccessoryNone; + itemPrefValue == timeRangePrefValue ? UITableViewCellAccessoryCheckmark + : UITableViewCellAccessoryNone; if (item.accessoryType != desiredType) { item.accessoryType = desiredType; [modifiedItems addObject:item]; @@ -127,12 +127,8 @@ [self reconfigureCellsForItems:modifiedItems]; } -- (void)updateTimePeriod:(browsing_data::TimePeriod)timePeriod { - if (_timePeriod == timePeriod) { - return; - } - _timePeriod = timePeriod; - [self.consumer updateTimePeriod:timePeriod]; +- (void)updatePrefValue:(int)prefValue { + _timeRangePref.SetValue(prefValue); [self updateCheckedState]; } @@ -150,23 +146,25 @@ - (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath { NSInteger itemType = [self.tableViewModel itemTypeForIndexPath:indexPath]; - [self updateTimePeriod:static_cast<browsing_data::TimePeriod>( - itemType - kItemTypeEnumZero)]; + int timePeriod = itemType - kItemTypeEnumZero; + DCHECK_LE(timePeriod, + static_cast<int>(browsing_data::TimePeriod::TIME_PERIOD_LAST)); + [self updatePrefValue:timePeriod]; [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; } #pragma mark - Class methods -+ (NSString*)timePeriodLabel:(browsing_data::TimePeriod)timePeriod { - int indexTimePeriod = static_cast<int>(timePeriod); - - // Check if the cast returned a valid index inside the bounds of `kStringIDS`. - if (indexTimePeriod < 0 || - static_cast<size_t>(timePeriod) >= std::size(kStringIDS)) { ++ (NSString*)timePeriodLabelForPrefs:(PrefService*)prefs { + if (!prefs) { return nil; } - - return l10n_util::GetNSString(kStringIDS[indexTimePeriod]); + int prefValue = prefs->GetInteger(browsing_data::prefs::kDeleteTimePeriod); + if (prefValue < 0 || + static_cast<size_t>(prefValue) >= std::size(kStringIDS)) { + return nil; + } + return l10n_util::GetNSString(kStringIDS[prefValue]); } @end
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller_unittest.mm b/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller_unittest.mm index 2e0b5272..78512cb2 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller_unittest.mm +++ b/ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller_unittest.mm
@@ -3,12 +3,16 @@ // found in the LICENSE file. #import "ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller.h" -#import "ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller+Testing.h" #import "base/files/file_path.h" #import "base/test/task_environment.h" +#import "components/browsing_data/core/pref_names.h" +#import "components/prefs/pref_registry_simple.h" +#import "components/prefs/pref_service.h" +#import "components/sync_preferences/pref_service_mock_factory.h" #import "ios/chrome/browser/shared/ui/table_view/cells/table_view_item.h" #import "ios/chrome/browser/shared/ui/table_view/legacy_chrome_table_view_controller_test.h" +#import "ios/chrome/browser/ui/settings/clear_browsing_data/time_range_selector_table_view_controller+Testing.h" #import "ios/chrome/grit/ios_strings.h" #import "testing/gtest/include/gtest/gtest.h" #import "third_party/ocmock/OCMock/OCMock.h" @@ -26,16 +30,25 @@ void SetUp() override { LegacyChromeTableViewControllerTest::SetUp(); + pref_service_ = CreateLocalState(); CreateController(); } LegacyChromeTableViewController* InstantiateController() override { time_range_selector_controller_ = [[TimeRangeSelectorTableViewController alloc] - initWithTimePeriod:browsing_data::TimePeriod::LAST_HOUR]; + initWithPrefs:pref_service_.get()]; return time_range_selector_controller_; } + std::unique_ptr<PrefService> CreateLocalState() { + scoped_refptr<PrefRegistrySimple> registry(new PrefRegistrySimple()); + registry->RegisterIntegerPref(browsing_data::prefs::kDeleteTimePeriod, 0); + + sync_preferences::PrefServiceMockFactory factory; + return factory.Create(registry.get()); + } + // Verifies that the cell at `item` in `section` has the given `accessory` // type. void CheckTextItemAccessoryType(UITableViewCellAccessoryType accessory_type, @@ -46,6 +59,7 @@ } base::test::TaskEnvironment task_environment_; + std::unique_ptr<PrefService> pref_service_; TimeRangeSelectorTableViewController* time_range_selector_controller_; }; @@ -80,8 +94,7 @@ ASSERT_EQ(kNumberOfItems, NumberOfItemsInSection(0)); for (NSInteger checkedItem = 0; checkedItem < kNumberOfItems; ++checkedItem) { - [time_range_selector_controller_ - updateTimePeriod:static_cast<browsing_data::TimePeriod>(checkedItem)]; + [time_range_selector_controller_ updatePrefValue:checkedItem]; for (NSInteger item = 0; item < kNumberOfItems; ++item) { if (item == checkedItem) { CheckTextItemAccessoryType(UITableViewCellAccessoryCheckmark, 0, item);
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_mediator.h b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_mediator.h index b439fb04..c18cbd9f 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_mediator.h +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_mediator.h
@@ -103,6 +103,9 @@ // Inserts a new WebState at the given WebStateList `index`. - (void)insertNewWebStateAtIndex:(int)index withURL:(const GURL&)newTabURL; +// Inserts `item` before the WebState at `nextWebStateIndex`. +- (void)insertItem:(GridItemIdentifier*)item + beforeWebStateIndex:(int)nextWebStateIndex; // Moves `item` before the WebState at `nextWebStateIndex`. - (void)moveItem:(GridItemIdentifier*)item beforeWebStateIndex:(int)nextWebStateIndex;
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_mediator.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_mediator.mm index c6955f45..8f3b4a5 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_mediator.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_mediator.mm
@@ -377,6 +377,26 @@ WebStateList::InsertionParams::AtIndex(index).Activate()); } +- (void)insertItem:(GridItemIdentifier*)item + beforeWebStateIndex:(int)nextWebStateIndex { + WebStateList* webStateList = self.webStateList; + GridItemIdentifier* nextItemIdentifier; + if (webStateList->ContainsIndex(nextWebStateIndex)) { + const TabGroup* group = + webStateList->GetGroupOfWebStateAt(nextWebStateIndex); + if (group) { + nextItemIdentifier = [GridItemIdentifier groupIdentifier:group + withWebStateList:webStateList]; + } else { + nextItemIdentifier = [GridItemIdentifier + tabIdentifier:self.webStateList->GetWebStateAt(nextWebStateIndex)]; + } + } + [self.consumer insertItem:item + beforeItemID:nextItemIdentifier + selectedItemIdentifier:[self activeIdentifier]]; +} + - (void)moveItem:(GridItemIdentifier*)item beforeWebStateIndex:(int)nextWebStateIndex { GridItemIdentifier* nextItem = nil; @@ -1550,27 +1570,6 @@ } } -// Inserts `item` before the WebState at `nextWebStateIndex`. -- (void)insertItem:(GridItemIdentifier*)item - beforeWebStateIndex:(int)nextWebStateIndex { - GridItemIdentifier* nextItemIdentifier; - if (self.webStateList->ContainsIndex(nextWebStateIndex)) { - const TabGroup* group = - self.webStateList->GetGroupOfWebStateAt(nextWebStateIndex); - if (group) { - nextItemIdentifier = - [GridItemIdentifier groupIdentifier:group - withWebStateList:self.webStateList]; - } else { - nextItemIdentifier = [GridItemIdentifier - tabIdentifier:self.webStateList->GetWebStateAt(nextWebStateIndex)]; - } - } - [self.consumer insertItem:item - beforeItemID:nextItemIdentifier - selectedItemIdentifier:[self activeIdentifier]]; -} - // Updates the cell of the given `group`. - (void)updateCellGroup:(const TabGroup*)group { GridItemIdentifier* groupIdentifier =
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_view_controller.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_view_controller.mm index 638c8f7..93953970 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_view_controller.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_view_controller.mm
@@ -192,7 +192,7 @@ - (void)loadView { if (IsTabGridCompositionalLayoutEnabled()) { - self.gridLayout = [[GridLayout alloc] init]; + self.gridLayout = [[GridLayout alloc] initWithTabGridMode:_mode]; } else { self.gridLayout = [[LegacyGridLayout alloc] init]; } @@ -348,6 +348,9 @@ TabGridMode previousMode = _mode; _mode = mode; + if (IsTabGridCompositionalLayoutEnabled() && self.gridLayout) { + ObjCCastStrict<GridLayout>(self.gridLayout).mode = _mode; + } self.collectionView.dragInteractionEnabled = [self shouldEnableDrapAndDropInteraction];
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/grid_layout.h b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/grid_layout.h index 09c28dcc..d3ab1ae 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/grid_layout.h +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/grid_layout.h
@@ -7,6 +7,8 @@ #import <UIKit/UIKit.h> +#import "ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_paging.h" + enum class TabsSectionHeaderType { kNone, // No header is shown. kSearch, // The Search header is shown, with the number of matches. @@ -37,7 +39,10 @@ // The insets to add to the different sections. Defaults to UIEdgeInsetsZero. @property(nonatomic, assign) NSDirectionalEdgeInsets sectionInsets; -- (instancetype)init NS_DESIGNATED_INITIALIZER; +// The current mode of the grid. +@property(nonatomic, assign) TabGridMode mode; + +- (instancetype)initWithTabGridMode:(TabGridMode)mode NS_DESIGNATED_INITIALIZER; #pragma mark - Unavailable initializers
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/grid_layout.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/grid_layout.mm index b48655832..6c490b0 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/grid_layout.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/grid_layout.mm
@@ -78,7 +78,8 @@ // Returns the aspect ratio (height / width) of an item based on the layout // environment. -CGFloat ItemAspectRatio(id<NSCollectionLayoutEnvironment> layout_environment) { +CGFloat ItemAspectRatio(id<NSCollectionLayoutEnvironment> layout_environment, + TabGridMode mode) { const CGFloat width = layout_environment.container.effectiveContentSize.width; const CGFloat height = layout_environment.container.effectiveContentSize.height; @@ -91,8 +92,11 @@ // smaller than the height, but design-wise, a landscape aspect ratio should // be preferred. Pad a bit the width with a magic constant before comparing to // the height. - return width + kMagicPadding > height ? screen_aspect_ratio - : kPortraitAspectRatio; + // This is not needed in Tab Group mode because the grid is not laid out the + // same way (it is not laid out underneath the top bar but below it), and + // already has the correct aspect ratio. + CGFloat padding = mode == TabGridModeGroup ? 0 : kMagicPadding; + return width + padding > height ? screen_aspect_ratio : kPortraitAspectRatio; } // Returns the spacing based on the layout environment. @@ -152,14 +156,15 @@ NSCollectionLayoutSection* TabsSection( id<NSCollectionLayoutEnvironment> layout_environment, TabsSectionHeaderType tabs_section_header_type, - NSDirectionalEdgeInsets section_insets) { + NSDirectionalEdgeInsets section_insets, + TabGridMode mode) { // Determine the number of columns. NSInteger count = ColumnsCount(layout_environment); // Configure the layout item. NSCollectionLayoutDimension* item_width_dimension = FractionalWidth(1. / count); - const CGFloat item_aspect_ratio = ItemAspectRatio(layout_environment); + const CGFloat item_aspect_ratio = ItemAspectRatio(layout_environment, mode); NSCollectionLayoutDimension* item_height_dimension = FractionalWidth(item_aspect_ratio / count); NSCollectionLayoutSize* item_size = @@ -265,7 +270,7 @@ NSArray<NSIndexPath*>* _indexPathsOfInsertingItems; } -- (instancetype)init { +- (instancetype)initWithTabGridMode:(TabGridMode)mode { // Use a `futureSelf` variable as the super init requires a closure, and as // `self` is not instantiated yet, it can't be used. __block __typeof(self) futureSelf; @@ -278,6 +283,7 @@ futureSelf = self; if (self) { _animatesItemUpdates = YES; + _mode = mode; } return self; } @@ -384,17 +390,18 @@ #pragma mark - Private +// Returns a compositional layout grid section. - (NSCollectionLayoutSection*)sectionAtIndex:(NSInteger)sectionIndex layoutEnvironment:(id<NSCollectionLayoutEnvironment>) layoutEnvironment { if (sectionIndex == 0) { return TabsSection(layoutEnvironment, self.tabsSectionHeaderType, - self.sectionInsets); + self.sectionInsets, self.mode); } if (IsTabGroupInGridEnabled()) { if (sectionIndex == 1) { return TabsSection(layoutEnvironment, self.tabsSectionHeaderType, - self.sectionInsets); + self.sectionInsets, self.mode); } if (sectionIndex == 2) { return SuggestedActionsSection(layoutEnvironment, self.sectionInsets);
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_mediator.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_mediator.mm index a0c4d11..01e99fc 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_mediator.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_mediator.mm
@@ -5,6 +5,8 @@ #import "ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_mediator.h" #import "base/check.h" +#import "base/metrics/user_metrics.h" +#import "base/metrics/user_metrics_action.h" #import "base/strings/sys_string_conversions.h" #import "components/tab_groups/tab_group_color.h" #import "ios/chrome/browser/shared/model/web_state_list/tab_group.h" @@ -120,8 +122,21 @@ tab_groups::TabGroupVisualData visualData = tab_groups::TabGroupVisualData(base::SysNSStringToUTF16(title), colorID); if (_tabGroup) { + base::RecordAction( + base::UserMetricsAction("MobileTabGroupUserUpdatedGroup")); + if (![_tabGroup->GetRawTitle() isEqualToString:title]) { + base::RecordAction( + base::UserMetricsAction("MobileTabGroupUserUpdatedGroupName")); + } + if (![_tabGroup->GetColor() + isEqual:TabGroup::ColorForTabGroupColorId(colorID)]) { + base::RecordAction( + base::UserMetricsAction("MobileTabGroupUserUpdatedGroupColor")); + } _webStateList->UpdateGroupVisualData(_tabGroup, visualData); } else { + base::RecordAction( + base::UserMetricsAction("MobileTabGroupUserCreatedNewGroup")); std::set<int> tabIndexes; for (web::WebStateID identifier : _identifiers) { int index = GetWebStateIndex(_webStateList, WebStateSearchCriteria{
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_view_controller.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_view_controller.mm index 9d17a1ec..3d49eea 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_view_controller.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/create_tab_group_view_controller.mm
@@ -7,6 +7,7 @@ #import "base/check.h" #import "base/metrics/user_metrics.h" #import "base/metrics/user_metrics_action.h" +#import "base/strings/sys_string_conversions.h" #import "components/strings/grit/components_strings.h" #import "components/tab_groups/tab_group_color.h" #import "ios/chrome/browser/shared/model/web_state_list/tab_group.h" @@ -26,28 +27,40 @@ #import "ui/base/l10n/l10n_util.h" namespace { -constexpr CGFloat kBackgroundAlpha = 0.6; -constexpr CGFloat kColoredDotSize = 21; -constexpr CGFloat kTitleHorizontalMargin = 16; -constexpr CGFloat kTitleVerticalMargin = 10; -constexpr CGFloat kHorizontalMargin = 32; -constexpr CGFloat kdotAndFieldContainerMargin = 44; -constexpr CGFloat kDotTitleSeparationMargin = 12; -constexpr CGFloat kTitleBackgroundCornerRadius = 17; -constexpr CGFloat kButtonsHeight = 50; -constexpr CGFloat kButtonsMargin = 8; -constexpr CGFloat kButtonBackgroundCornerRadius = 15; -constexpr CGFloat kColoredButtonSize = 24; -constexpr CGFloat kColorSelectionImageSize = 13; -constexpr CGFloat kColorListViewHeight = 44; -constexpr CGFloat kColorListBottomMargin = 16; -constexpr CGFloat kSnapshotViewRatio = 0.83; -constexpr CGFloat kSnapshotViewMaxHeight = 190; -constexpr CGFloat kSnapshotViewCornerRadius = 18; -constexpr CGFloat kSnapshotViewVerticalMargin = 25; -constexpr CGFloat kSingleSnapshotRatio = 0.75; -constexpr CGFloat kContainersMaxWidth = 400; -constexpr CGFloat kMultipleSnapshotsRatio = 0.90; + +// View constants. +const CGFloat kBackgroundAlpha = 0.6; +const CGFloat kHorizontalMargin = 32; +const CGFloat kdotAndFieldContainerMargin = 44; +const CGFloat kDotTitleSeparationMargin = 12; +const CGFloat kContainersMaxWidth = 400; + +// Group color selection constants. +const CGFloat kColoredButtonSize = 24; +const CGFloat kColoredButtonContentInset = 8; +const CGFloat kColorSelectionImageSize = 13; +const CGFloat kColorListViewHeight = 44; +const CGFloat kColorListBottomMargin = 16; +const CGFloat kColoredDotSize = 21; + +// Snapshot view constants. +const CGFloat kSnapshotViewRatio = 0.83; +const CGFloat kSnapshotViewMaxHeight = 190; +const CGFloat kSnapshotViewCornerRadius = 18; +const CGFloat kSnapshotViewVerticalMargin = 25; +const CGFloat kSingleSnapshotRatio = 0.75; +const CGFloat kMultipleSnapshotsRatio = 0.90; + +// Group title constants +const CGFloat kTitleHorizontalMargin = 16; +const CGFloat kTitleVerticalMargin = 10; +const CGFloat kTitleBackgroundCornerRadius = 17; + +// Button constants +const CGFloat kButtonsHeight = 50; +const CGFloat kButtonsMargin = 8; +const CGFloat kButtonBackgroundCornerRadius = 15; + } // namespace @implementation CreateTabGroupViewController { @@ -313,6 +326,13 @@ // Hides the current view without doing anything else. - (void)cancelButtonTapped { + if (_tabGroup) { + base::RecordAction( + base::UserMetricsAction("MobileTabGroupUserCanceledGroupEdition")); + } else { + base::RecordAction( + base::UserMetricsAction("MobileTabGroupUserCanceledNewGroupCreation")); + } [self dismissViewController]; } @@ -353,6 +373,9 @@ // Creates all the available color buttons. - (void)createColorSelectionButtons { NSMutableArray* buttons = [[NSMutableArray alloc] init]; + const tab_groups::ColorLabelMap colorLabelMap = + tab_groups::GetTabGroupColorLabelMap(); + for (tab_groups::TabGroupColorId colorID : TabGroup::AllPossibleTabGroupColors()) { UIButton* colorButton = [[UIButton alloc] init]; @@ -362,8 +385,12 @@ UIButtonConfiguration* buttonConfiguration = [UIButtonConfiguration plainButtonConfiguration]; buttonConfiguration.baseBackgroundColor = [UIColor clearColor]; - buttonConfiguration.contentInsets = NSDirectionalEdgeInsets(8, 8, 8, 8); + buttonConfiguration.contentInsets = NSDirectionalEdgeInsets( + kColoredButtonContentInset, kColoredButtonContentInset, + kColoredButtonContentInset, kColoredButtonContentInset); colorButton.configuration = buttonConfiguration; + colorButton.accessibilityLabel = + base::SysUTF16ToNSString(colorLabelMap.at(colorID)); UIImageSymbolConfiguration* configuration = [UIImageSymbolConfiguration configurationWithPointSize:kColoredButtonSize
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_group_mediator.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_group_mediator.mm index 05ffdd6..4cb6db1f 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_group_mediator.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/tab_groups/tab_group_mediator.mm
@@ -138,6 +138,19 @@ } // Overrides the parent as there is only tab cells. +- (void)insertItem:(GridItemIdentifier*)item + beforeWebStateIndex:(int)nextWebStateIndex { + GridItemIdentifier* nextItemIdentifier; + if (nextWebStateIndex < _tabGroup->range().range_end()) { + nextItemIdentifier = [GridItemIdentifier + tabIdentifier:self.webStateList->GetWebStateAt(nextWebStateIndex)]; + } + [self.consumer insertItem:item + beforeItemID:nextItemIdentifier + selectedItemIdentifier:[self activeIdentifier]]; +} + +// Overrides the parent as there is only tab cells. - (void)moveItem:(GridItemIdentifier*)item beforeWebStateIndex:(int)nextWebStateIndex { GridItemIdentifier* nextItem; @@ -177,6 +190,8 @@ DragItemOrigin::kOtherBrwoser); destinationWebStateIndex += destinationIndex; MoveTabToBrowser(tabInfo.tabID, self.browser, destinationWebStateIndex); + self.webStateList->MoveToGroup({destinationWebStateIndex}, + _tabGroup.get()); } else { base::UmaHistogramEnumeration(kUmaGroupViewDragOrigin, DragItemOrigin::kSameCollection); @@ -231,6 +246,37 @@ } switch (change.type()) { + case WebStateListChange::Type::kStatusOnly: { + const WebStateListChangeStatusOnly& selectionOnlyChange = + change.As<WebStateListChangeStatusOnly>(); + const TabGroup* oldGroup = selectionOnlyChange.old_group(); + const TabGroup* newGroup = selectionOnlyChange.new_group(); + + if (oldGroup != newGroup) { + // There is a change of group. + if (oldGroup == _tabGroup.get()) { + web::WebState* currentWebState = + self.webStateList->GetWebStateAt(selectionOnlyChange.index()); + + GridItemIdentifier* tabIdentifierToAddToGroup = + [GridItemIdentifier tabIdentifier:currentWebState]; + + [self.consumer removeItemWithIdentifier:tabIdentifierToAddToGroup + selectedItemIdentifier:[self activeIdentifier]]; + } + + if (newGroup == _tabGroup.get()) { + int webStateIndex = selectionOnlyChange.index(); + web::WebState* currentWebState = + self.webStateList->GetWebStateAt(webStateIndex); + + [self insertItem:[GridItemIdentifier tabIdentifier:currentWebState] + beforeWebStateIndex:webStateIndex + 1]; + } + break; + } + break; + } case WebStateListChange::Type::kGroupVisualDataUpdate: { const WebStateListChangeGroupVisualDataUpdate& visualDataChange = change.As<WebStateListChangeGroupVisualDataUpdate>(); @@ -297,8 +343,13 @@ [super didChangeWebStateList:webStateList change:change status:status]; break; } - // Update the title in case the number of tabs changed. - [_groupConsumer setGroupTitle:_tabGroup->GetTitle()]; + if (_tabGroup) { + // Update the title in case the number of tabs changed. + [_groupConsumer setGroupTitle:_tabGroup->GetTitle()]; + } + if (status.active_web_state_change()) { + [self.consumer selectItemWithIdentifier:[self activeIdentifier]]; + } } #pragma mark - Private
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_context_menu/tab_context_menu_helper.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_context_menu/tab_context_menu_helper.mm index cbc1718..726ef33 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_context_menu/tab_context_menu_helper.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_context_menu/tab_context_menu_helper.mm
@@ -221,23 +221,25 @@ [weakSelf handleAddWebState:tabID toGroup:group]; }; - const TabGroup* tabGroup = [self groupForWebState:tabID]; + const TabGroup* currentTabGroup = [self groupForWebState:tabID]; UIMenuElement* groupAction; - if (tabGroup) { + if (currentTabGroup) { ProceduralBlock removeBlock = ^{ [weakSelf handleRemoveWebStateFromGroup:tabID]; }; - groupAction = [actionFactory menuToMoveTabToGroupWithGroups:groups - currentGroup:tabGroup - moveBlock:actionResult - removeBlock:removeBlock]; + groupAction = + [actionFactory menuToMoveTabToGroupWithGroups:groups + currentGroup:currentTabGroup + moveBlock:actionResult + removeBlock:removeBlock]; } else { groupAction = [actionFactory menuToAddTabToGroupWithGroups:groups numberOfTabs:1 block:actionResult]; } - if (shareAction) { + // Hide the `shareAction` for tabs in groups. + if (shareAction && !currentTabGroup) { UIMenu* shareMenu = [UIMenu menuWithTitle:@"" image:nil identifier:nil @@ -261,7 +263,8 @@ if (bookmarkAction) { [collectionsActions addObject:bookmarkAction]; } - if (selectAction) { + // Hide the `selectAction` for tabs in groups. + if (selectAction && !currentTabGroup) { [collectionsActions addObject:selectAction]; } if (closeTabAction) {
diff --git a/ios/chrome/browser/web/model/certificate_policy_app_agent_unittest.mm b/ios/chrome/browser/web/model/certificate_policy_app_agent_unittest.mm index 9f35847..3012ab1 100644 --- a/ios/chrome/browser/web/model/certificate_policy_app_agent_unittest.mm +++ b/ios/chrome/browser/web/model/certificate_policy_app_agent_unittest.mm
@@ -60,7 +60,8 @@ TestingApplicationContext::GetGlobal()->SetChromeBrowserStateManager( browser_state_manager_.get()); - chrome_browser_state_ = browser_state_manager_->GetLastUsedBrowserState(); + chrome_browser_state_ = + browser_state_manager_->GetLastUsedBrowserStateForTesting(); BrowserList* browser_list = BrowserListFactory::GetForBrowserState(chrome_browser_state_.get());
diff --git a/ios/chrome/browser/web/model/chrome_main_parts.mm b/ios/chrome/browser/web/model/chrome_main_parts.mm index bbb485ae..f531fb2 100644 --- a/ios/chrome/browser/web/model/chrome_main_parts.mm +++ b/ios/chrome/browser/web/model/chrome_main_parts.mm
@@ -308,10 +308,14 @@ EnsureBrowserStateKeyedServiceFactoriesBuilt(); ios::ChromeBrowserStateManager* browser_state_manager = application_context_->GetChromeBrowserStateManager(); + + // Load all BrowserStates. + browser_state_manager->LoadBrowserStates(); + // TODO(crbug.com/325257407): Factor all of the code that uses this to instead // initialize for every browser state. ChromeBrowserState* last_used_browser_state = - browser_state_manager->GetLastUsedBrowserState(); + browser_state_manager->GetLastUsedBrowserStateDeprecatedDoNotUse(); // This must occur at PreMainMessageLoopRun because `SetupMetrics()` uses the // blocking pool, which is disabled until the CreateThreads phase of startup.
diff --git a/mojo/public/cpp/base/proto_wrapper.cc b/mojo/public/cpp/base/proto_wrapper.cc index ad5b7663..c5fa9f4 100644 --- a/mojo/public/cpp/base/proto_wrapper.cc +++ b/mojo/public/cpp/base/proto_wrapper.cc
@@ -57,7 +57,7 @@ // Make an in-process copy here as protobuf is not designed to // safely parse data that might be changing underneath it. auto as_span = base::make_span(bytes_->data(), bytes_->size()); - const std::vector<const uint8_t> copy(as_span.begin(), as_span.end()); + const std::vector<uint8_t> copy(as_span.begin(), as_span.end()); return message.ParseFromArray(copy.data(), copy.size()); } }
diff --git a/net/dns/context_host_resolver.cc b/net/dns/context_host_resolver.cc index 82213f9..99c7de3a 100644 --- a/net/dns/context_host_resolver.cc +++ b/net/dns/context_host_resolver.cc
@@ -105,6 +105,23 @@ resolve_context_.get()); } +std::unique_ptr<HostResolver::ServiceEndpointRequest> +ContextHostResolver::CreateServiceEndpointRequest( + Host host, + NetworkAnonymizationKey network_anonymization_key, + NetLogWithSource net_log, + ResolveHostParameters parameters) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // TODO(crbug.com/41493696): The ServiceEndpoint API only supports schemeful + // hosts for now. + CHECK(host.HasScheme()); + + // ServiceEndpointRequestImpl::Start() takes care of context shut down. + return manager_->CreateServiceEndpointRequest( + host.AsSchemeHostPort(), std::move(network_anonymization_key), + std::move(net_log), std::move(parameters), resolve_context_.get()); +} + std::unique_ptr<HostResolver::ProbeRequest> ContextHostResolver::CreateDohProbeRequest() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/net/dns/context_host_resolver.h b/net/dns/context_host_resolver.h index 5c19521..5d81e53 100644 --- a/net/dns/context_host_resolver.h +++ b/net/dns/context_host_resolver.h
@@ -64,6 +64,11 @@ const NetworkAnonymizationKey& network_anonymization_key, const NetLogWithSource& net_log, const std::optional<ResolveHostParameters>& optional_parameters) override; + std::unique_ptr<ServiceEndpointRequest> CreateServiceEndpointRequest( + Host host, + NetworkAnonymizationKey network_anonymization_key, + NetLogWithSource net_log, + ResolveHostParameters parameters) override; std::unique_ptr<ProbeRequest> CreateDohProbeRequest() override; std::unique_ptr<MdnsListener> CreateMdnsListener( const HostPortPair& host,
diff --git a/net/dns/context_host_resolver_unittest.cc b/net/dns/context_host_resolver_unittest.cc index 7371eda..61734c1 100644 --- a/net/dns/context_host_resolver_unittest.cc +++ b/net/dns/context_host_resolver_unittest.cc
@@ -31,6 +31,7 @@ #include "net/dns/host_cache.h" #include "net/dns/host_resolver.h" #include "net/dns/host_resolver_manager.h" +#include "net/dns/host_resolver_results_test_util.h" #include "net/dns/host_resolver_system_task.h" #include "net/dns/mock_host_resolver.h" #include "net/dns/public/dns_over_https_config.h" @@ -775,6 +776,91 @@ manager_->InvalidateCachesForTesting(); } +class FakeServiceEndpontRequestDelegate + : public HostResolver::ServiceEndpointRequest::Delegate { + public: + void OnServiceEndpointsUpdated() override {} + void OnServiceEndpointRequestFinished(int rv) override { result_ = rv; } + + std::optional<int> result() const { return result_; } + + private: + std::optional<int> result_; +}; + +class ContextHostResolverServiceEndpointTest : public ContextHostResolverTest { + public: + ContextHostResolverServiceEndpointTest() = default; + + ~ContextHostResolverServiceEndpointTest() override = default; + + void SetUp() override { + ContextHostResolverTest::SetUp(); + + context_ = CreateTestURLRequestContextBuilder()->Build(); + + MockDnsClientRuleList rules; + rules.emplace_back("example.com", dns_protocol::kTypeA, /*secure=*/false, + MockDnsClientRule::Result(BuildTestDnsAddressResponse( + "example.com", kEndpoint.address())), + /*delay=*/false, context_.get()); + rules.emplace_back( + "example.com", dns_protocol::kTypeAAAA, /*secure=*/false, + MockDnsClientRule::Result(MockDnsClientRule::ResultType::kEmpty), + /*delay=*/false, context_.get()); + SetMockDnsRules(std::move(rules)); + } + + protected: + std::unique_ptr<ContextHostResolver> CreateResolver() { + auto resolve_context = std::make_unique<ResolveContext>( + context_.get(), /*enable_caching=*/false); + return std::make_unique<ContextHostResolver>(manager_.get(), + std::move(resolve_context)); + } + + private: + std::unique_ptr<URLRequestContext> context_; +}; + +TEST_F(ContextHostResolverServiceEndpointTest, Resolve) { + std::unique_ptr<ContextHostResolver> resolver = CreateResolver(); + + std::unique_ptr<HostResolver::ServiceEndpointRequest> request = + resolver->CreateServiceEndpointRequest( + HostResolver::Host( + url::SchemeHostPort(url::kHttpsScheme, "example.com", 100)), + NetworkAnonymizationKey(), NetLogWithSource(), + HostResolver::ResolveHostParameters()); + + FakeServiceEndpontRequestDelegate delegate; + int rv = request->Start(&delegate); + EXPECT_THAT(rv, test::IsError(ERR_IO_PENDING)); + + RunUntilIdle(); + EXPECT_THAT(*delegate.result(), test::IsOk()); + EXPECT_THAT(request->GetEndpointResults(), + testing::ElementsAre( + ExpectServiceEndpoint(testing::ElementsAre(kEndpoint)))); +} + +TEST_F(ContextHostResolverServiceEndpointTest, DestroyResolver) { + std::unique_ptr<ContextHostResolver> resolver = CreateResolver(); + + std::unique_ptr<HostResolver::ServiceEndpointRequest> request = + resolver->CreateServiceEndpointRequest( + HostResolver::Host( + url::SchemeHostPort(url::kHttpsScheme, "example.com", 100)), + NetworkAnonymizationKey(), NetLogWithSource(), + HostResolver::ResolveHostParameters()); + + resolver.reset(); + + FakeServiceEndpontRequestDelegate delegate; + int rv = request->Start(&delegate); + EXPECT_THAT(rv, test::IsError(ERR_CONTEXT_SHUT_DOWN)); +} + class NetworkBoundResolveContext : public ResolveContext { public: NetworkBoundResolveContext(URLRequestContext* url_request_context,
diff --git a/net/dns/host_resolver.h b/net/dns/host_resolver.h index 674e7a0..f9ad2e7 100644 --- a/net/dns/host_resolver.h +++ b/net/dns/host_resolver.h
@@ -489,6 +489,13 @@ const NetLogWithSource& net_log, const std::optional<ResolveHostParameters>& optional_parameters) = 0; + // Creates a service endpoint resolution request. + virtual std::unique_ptr<ServiceEndpointRequest> CreateServiceEndpointRequest( + Host host, + NetworkAnonymizationKey network_anonymization_key, + NetLogWithSource net_log, + ResolveHostParameters parameters) = 0; + // Creates a request to probe configured DoH servers to find which can be used // successfully. virtual std::unique_ptr<ProbeRequest> CreateDohProbeRequest();
diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc index 0635fe7..9b911a7 100644 --- a/net/dns/host_resolver_manager.cc +++ b/net/dns/host_resolver_manager.cc
@@ -546,11 +546,14 @@ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK(!invalidation_in_progress_); DCHECK_EQ(resolve_context->GetTargetNetwork(), target_network_); - DCHECK(registered_contexts_.HasObserver(resolve_context)); + if (resolve_context) { + DCHECK(registered_contexts_.HasObserver(resolve_context)); + } return std::make_unique<ServiceEndpointRequestImpl>( std::move(scheme_host_port), std::move(network_anonymization_key), - std::move(net_log), std::move(parameters), resolve_context->GetWeakPtr(), + std::move(net_log), std::move(parameters), + resolve_context ? resolve_context->GetWeakPtr() : nullptr, weak_ptr_factory_.GetWeakPtr(), tick_clock_); }
diff --git a/net/dns/host_resolver_manager_service_endpoint_request_impl.cc b/net/dns/host_resolver_manager_service_endpoint_request_impl.cc index 556860c..97b6489 100644 --- a/net/dns/host_resolver_manager_service_endpoint_request_impl.cc +++ b/net/dns/host_resolver_manager_service_endpoint_request_impl.cc
@@ -70,9 +70,12 @@ int HostResolverManager::ServiceEndpointRequestImpl::Start(Delegate* delegate) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); CHECK(!delegate_); - CHECK(resolve_context_); CHECK(manager_); + if (!resolve_context_) { + return ERR_CONTEXT_SHUT_DOWN; + } + delegate_ = delegate; JobKey job_key(host_, resolve_context_.get());
diff --git a/net/dns/https_record_rdata.cc b/net/dns/https_record_rdata.cc index e534f9aa..d23a51da 100644 --- a/net/dns/https_record_rdata.cc +++ b/net/dns/https_record_rdata.cc
@@ -116,7 +116,7 @@ std::vector<IPAddress> addresses; do { - if (auto addr_bytes = reader.Read<ADDRESS_SIZE>(); + if (auto addr_bytes = reader.template Read<ADDRESS_SIZE>(); !addr_bytes.has_value()) { return false; } else {
diff --git a/net/dns/mapped_host_resolver.cc b/net/dns/mapped_host_resolver.cc index 0447b5b8..e9a4afcd 100644 --- a/net/dns/mapped_host_resolver.cc +++ b/net/dns/mapped_host_resolver.cc
@@ -8,6 +8,7 @@ #include <string> #include <utility> +#include "base/notimplemented.h" #include "base/strings/string_util.h" #include "base/values.h" #include "net/base/host_port_pair.h" @@ -76,6 +77,16 @@ source_net_log, optional_parameters); } +std::unique_ptr<HostResolver::ServiceEndpointRequest> +MappedHostResolver::CreateServiceEndpointRequest( + Host host, + NetworkAnonymizationKey network_anonymization_key, + NetLogWithSource net_log, + ResolveHostParameters parameters) { + NOTIMPLEMENTED(); + return nullptr; +} + std::unique_ptr<HostResolver::ProbeRequest> MappedHostResolver::CreateDohProbeRequest() { return impl_->CreateDohProbeRequest();
diff --git a/net/dns/mapped_host_resolver.h b/net/dns/mapped_host_resolver.h index 9efbb3b0..0cdbd3e2 100644 --- a/net/dns/mapped_host_resolver.h +++ b/net/dns/mapped_host_resolver.h
@@ -65,6 +65,11 @@ const NetworkAnonymizationKey& network_anonymization_key, const NetLogWithSource& net_log, const std::optional<ResolveHostParameters>& optional_parameters) override; + std::unique_ptr<ServiceEndpointRequest> CreateServiceEndpointRequest( + Host host, + NetworkAnonymizationKey network_anonymization_key, + NetLogWithSource net_log, + ResolveHostParameters parameters) override; std::unique_ptr<ProbeRequest> CreateDohProbeRequest() override; HostCache* GetHostCache() override; base::Value::Dict GetDnsConfigAsValue() const override;
diff --git a/net/dns/mock_host_resolver.cc b/net/dns/mock_host_resolver.cc index 6cfcd14c..41686d7 100644 --- a/net/dns/mock_host_resolver.cc +++ b/net/dns/mock_host_resolver.cc
@@ -726,6 +726,16 @@ optional_parameters, AsWeakPtr()); } +std::unique_ptr<HostResolver::ServiceEndpointRequest> +MockHostResolverBase::CreateServiceEndpointRequest( + Host host, + NetworkAnonymizationKey network_anonymization_key, + NetLogWithSource net_log, + ResolveHostParameters parameters) { + NOTIMPLEMENTED(); + return nullptr; +} + std::unique_ptr<HostResolver::ProbeRequest> MockHostResolverBase::CreateDohProbeRequest() { return std::make_unique<ProbeRequestImpl>(AsWeakPtr()); @@ -1511,6 +1521,16 @@ return std::make_unique<RequestImpl>(weak_ptr_factory_.GetWeakPtr()); } +std::unique_ptr<HostResolver::ServiceEndpointRequest> +HangingHostResolver::CreateServiceEndpointRequest( + Host host, + NetworkAnonymizationKey network_anonymization_key, + NetLogWithSource net_log, + ResolveHostParameters parameters) { + NOTIMPLEMENTED(); + return nullptr; +} + std::unique_ptr<HostResolver::ProbeRequest> HangingHostResolver::CreateDohProbeRequest() { if (shutting_down_)
diff --git a/net/dns/mock_host_resolver.h b/net/dns/mock_host_resolver.h index 67081a9fc..999f80e38 100644 --- a/net/dns/mock_host_resolver.h +++ b/net/dns/mock_host_resolver.h
@@ -287,6 +287,11 @@ const NetworkAnonymizationKey& network_anonymization_key, const NetLogWithSource& net_log, const std::optional<ResolveHostParameters>& optional_parameters) override; + std::unique_ptr<ServiceEndpointRequest> CreateServiceEndpointRequest( + Host host, + NetworkAnonymizationKey network_anonymization_key, + NetLogWithSource net_log, + ResolveHostParameters parameters) override; std::unique_ptr<ProbeRequest> CreateDohProbeRequest() override; std::unique_ptr<MdnsListener> CreateMdnsListener( const HostPortPair& host, @@ -697,6 +702,11 @@ const NetworkAnonymizationKey& network_anonymization_key, const NetLogWithSource& net_log, const std::optional<ResolveHostParameters>& optional_parameters) override; + std::unique_ptr<ServiceEndpointRequest> CreateServiceEndpointRequest( + Host host, + NetworkAnonymizationKey network_anonymization_key, + NetLogWithSource net_log, + ResolveHostParameters parameters) override; std::unique_ptr<ProbeRequest> CreateDohProbeRequest() override;
diff --git a/remoting/protocol/webrtc_video_frame_adapter.cc b/remoting/protocol/webrtc_video_frame_adapter.cc index e3486166..c3caba2 100644 --- a/remoting/protocol/webrtc_video_frame_adapter.cc +++ b/remoting/protocol/webrtc_video_frame_adapter.cc
@@ -45,6 +45,9 @@ return webrtc::VideoFrame::Builder() .set_video_frame_buffer(adapter) .set_update_rect(video_update_rect) + // Added for b/333806004 - webrtc::FrameCadenceAdapterImpl requires + // video-frames to have monotonically increasing timestamps. + .set_timestamp_us(base::TimeTicks::Now().since_origin().InMicroseconds()) .build(); }
diff --git a/services/tracing/BUILD.gn b/services/tracing/BUILD.gn index c1078fc..1f35b117 100644 --- a/services/tracing/BUILD.gn +++ b/services/tracing/BUILD.gn
@@ -92,12 +92,15 @@ "perfetto/perfetto_integration_unittest.cc", "perfetto/privacy_filtering_check_unittest.cc", "public/cpp/perfetto/perfetto_config_unittest.cc", - "public/cpp/perfetto/trace_event_data_source_unittest.cc", "public/cpp/perfetto/trace_packet_tokenizer_unittest.cc", "public/cpp/perfetto/traced_value_proto_writer_unittest.cc", "public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc", ] + if (!use_perfetto_client_library) { + sources += [ "public/cpp/perfetto/trace_event_data_source_unittest.cc" ] + } + deps = [ ":lib", ":privacy_check",
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index d7413509..5f42441a 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1725,31 +1725,6 @@ ] } ], - "AutofillParsingPatternProvider": [ - { - "platforms": [ - "android", - "android_webview", - "chromeos", - "chromeos_lacros", - "ios", - "linux", - "mac", - "windows" - ], - "experiments": [ - { - "name": "Enabled", - "params": { - "prediction_source": "default" - }, - "enable_features": [ - "AutofillParsingPatternProvider" - ] - } - ] - } - ], "AutofillPopupImprovedTimingChecksV2": [ { "platforms": [ @@ -6276,7 +6251,8 @@ "aida_api_key": "someRandomAPIKey", "aida_endpoint": "https://www.example.com/aida", "aida_model_id": "aida_model_id", - "aida_scope": "https://www.example.com/auth/" + "aida_scope": "https://www.example.com/auth/", + "opt_in": "false" }, "enable_features": [ "DevToolsConsoleInsightsDogfood"
diff --git a/third_party/angle b/third_party/angle index 6557da0..2a29410 160000 --- a/third_party/angle +++ b/third_party/angle
@@ -1 +1 @@ -Subproject commit 6557da03c85eee30448e1fefc2d89bdc348c580d +Subproject commit 2a29410364fbb00c54948db6dd2bf334c0c06e1b
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc index 740bc1c..b73f8f3 100644 --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc
@@ -1303,11 +1303,6 @@ const base::FeatureParam<int> kLCPCriticalPathPredictorMaxElementLocatorLength{ &kLCPCriticalPathPredictor, "lcpp_max_element_locator_length", 1024}; -const base::FeatureParam<bool> - kLCPCriticalPathAdjustImageLoadPriorityOverrideFirstNBoost{ - &kLCPCriticalPathPredictor, - "lcpp_adjust_image_load_priority_override_first_n_boost", false}; - const base::FeatureParam<LcppRecordedLcpElementTypes>::Option lcpp_recorded_element_types[] = { {LcppRecordedLcpElementTypes::kAll, "all"}, @@ -1585,6 +1580,18 @@ &kLowPriorityAsyncScriptExecution, "low_pri_async_exec_target", AsyncScriptExperimentalSchedulingTarget::kBoth, &async_script_experimental_scheduling_targets}; +// If true, kLowPriorityAsyncScriptExecution will not change the script +// evaluation timing for the non parser inserted script. +const base::FeatureParam<bool> + kLowPriorityAsyncScriptExecutionExcludeNonParserInsertedParam{ + &kLowPriorityAsyncScriptExecution, + "low_pri_async_exec_exclude_non_parser_inserted", false}; +// If true, kLowPriorityAsyncScriptExecution will not change the script +// evaluation timing for the scripts that were added via document.write(). +const base::FeatureParam<bool> + kLowPriorityAsyncScriptExecutionExcludeDocumentWriteParam{ + &kLowPriorityAsyncScriptExecution, + "low_pri_async_exec_exclude_document_write", false}; // kLowPriorityAsyncScriptExecution will be opted-out when FetchPriorityHint is // low.
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h index abb9762..a7fbf35 100644 --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h
@@ -729,11 +729,6 @@ BLINK_COMMON_EXPORT extern const base::FeatureParam<int> kLCPCriticalPathPredictorMaxElementLocatorLength; -// If true, LCP critical path predictor mechanism overrides the first N image -// prioritization when there is LCP hint. -BLINK_COMMON_EXPORT extern const base::FeatureParam<bool> - kLCPCriticalPathAdjustImageLoadPriorityOverrideFirstNBoost; - // The type of LCP elements recorded by LCPP. enum class LcppRecordedLcpElementTypes { kAll, @@ -968,6 +963,10 @@ AsyncScriptExperimentalSchedulingTarget> kLowPriorityAsyncScriptExecutionTargetParam; BLINK_COMMON_EXPORT extern const base::FeatureParam<bool> + kLowPriorityAsyncScriptExecutionExcludeNonParserInsertedParam; +BLINK_COMMON_EXPORT extern const base::FeatureParam<bool> + kLowPriorityAsyncScriptExecutionExcludeDocumentWriteParam; +BLINK_COMMON_EXPORT extern const base::FeatureParam<bool> kLowPriorityAsyncScriptExecutionOptOutLowFetchPriorityHintParam; BLINK_COMMON_EXPORT extern const base::FeatureParam<bool> kLowPriorityAsyncScriptExecutionOptOutAutoFetchPriorityHintParam;
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 index bf628934..145626c9 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -4340,20 +4340,6 @@ priority: 2, }, { - name: "position-fallback-bounds", - property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal" ], - include_paths: ["third_party/blink/renderer/core/style/scoped_css_name.h"], - type_name: "ScopedCSSName", - wrapper_pointer_name: "Member", - default_value: "nullptr", - field_group: "*", - field_template: "external", - converter: "ConvertNormalOrCustomIdent", - keywords: ["normal"], - typedom_types: ["Keyword"], - runtime_flag: "CSSPositionFallbackBounds", - }, - { name: "position-try-options", property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], style_builder_custom_functions: ["value"],
diff --git a/third_party/blink/renderer/core/css/css_property_equality.cc b/third_party/blink/renderer/core/css/css_property_equality.cc index 514be8b..17ab37b 100644 --- a/third_party/blink/renderer/core/css/css_property_equality.cc +++ b/third_party/blink/renderer/core/css/css_property_equality.cc
@@ -585,9 +585,6 @@ return a.PointerEvents() == b.PointerEvents(); case CSSPropertyID::kPosition: return a.GetPosition() == b.GetPosition(); - case CSSPropertyID::kPositionFallbackBounds: - return base::ValuesEquivalent(a.PositionFallbackBounds(), - b.PositionFallbackBounds()); case CSSPropertyID::kQuotes: return a.Quotes() == b.Quotes(); case CSSPropertyID::kReadingOrderItems:
diff --git a/third_party/blink/renderer/core/css/css_value_keywords.json5 b/third_party/blink/renderer/core/css/css_value_keywords.json5 index 7e7703b..95df46f 100644 --- a/third_party/blink/renderer/core/css/css_value_keywords.json5 +++ b/third_party/blink/renderer/core/css/css_value_keywords.json5
@@ -1742,9 +1742,6 @@ "implicit", // none, - // position-fallback-bounds - // normal, - // animation-[end-]delay // contain // cover
diff --git a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc index 35b9f0a..77c1e97 100644 --- a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc +++ b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
@@ -954,6 +954,12 @@ return result; } +// MathFunctionParser is a helper for parsing something that _might_ be a +// function. In particular, it helps rewinding the parser to the point where it +// started if what was to be parsed was not a function (or an invalid function). +// This rewinding happens in the destructor, unless Consume*() was called _and_ +// returned success. In effect, this gives us a multi-token peek for functions. +// // TODO(rwlbuis): consider pulling in the parsing logic from // css_math_expression_node.cc. class MathFunctionParser { @@ -970,23 +976,31 @@ const Flags parsing_flags = Flags({Flag::AllowPercent}), CSSAnchorQueryTypes allowed_anchor_queries = kCSSAnchorQueryTypesNone, HashMap<CSSValueID, double> color_channel_keyword_values = {}) - : source_range_(range), range_(range) { + : range_(&range), range_copy_(range) { const CSSParserToken& token = range.Peek(); if (token.GetType() == kFunctionToken) { calc_value_ = CSSMathFunctionValue::Create( CSSMathExpressionNode::ParseMathFunction( - token.FunctionId(), ConsumeFunction(range_), context, + token.FunctionId(), ConsumeFunction(*range_), context, parsing_flags, allowed_anchor_queries), value_range); } } + ~MathFunctionParser() { + if (!has_consumed_) { + // Rewind the parser. + *range_ = range_copy_; + } + } + const CSSMathFunctionValue* Value() const { return calc_value_; } CSSMathFunctionValue* ConsumeValue() { if (!calc_value_) { return nullptr; } - source_range_ = range_; + DCHECK(!has_consumed_); // Cannot consume twice. + has_consumed_ = true; CSSMathFunctionValue* result = calc_value_; calc_value_ = nullptr; return result; @@ -996,14 +1010,16 @@ if (!calc_value_ || calc_value_->Category() != kCalcNumber) { return false; } - source_range_ = range_; + DCHECK(!has_consumed_); // Cannot consume twice. + has_consumed_ = true; result = calc_value_->GetDoubleValue(); return true; } private: - CSSParserTokenRange& source_range_; - CSSParserTokenRange range_; + bool has_consumed_ = false; + CSSParserTokenRange* range_; + CSSParserTokenRange range_copy_; // For rewinding. CSSMathFunctionValue* calc_value_ = nullptr; };
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc index 99a2bba..d806ebe1 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -5434,7 +5434,7 @@ const LayoutObject*, bool allow_visited_style, CSSValuePhase value_phase) const { - if (!style.HasStandardLineClamp()) { + if (style.StandardLineClamp() == 0) { return CSSIdentifierValue::Create(CSSValueID::kNone); } return CSSNumericLiteralValue::Create(style.StandardLineClamp(), @@ -6951,31 +6951,6 @@ return CSSIdentifierValue::Create(style.PositionInternal()); } -const CSSValue* PositionFallbackBounds::ParseSingleValue( - CSSParserTokenRange& range, - const CSSParserContext& context, - const CSSParserLocalContext&) const { - if (CSSValue* value = - css_parsing_utils::ConsumeIdent<CSSValueID::kNormal>(range)) { - return value; - } - if (CSSValue* value = css_parsing_utils::ConsumeDashedIdent(range, context)) { - return value; - } - return nullptr; -} -const CSSValue* PositionFallbackBounds::CSSValueFromComputedStyleInternal( - const ComputedStyle& style, - const LayoutObject*, - bool allow_visited_style, - CSSValuePhase value_phase) const { - if (!style.PositionFallbackBounds()) { - return CSSIdentifierValue::Create(CSSValueID::kNormal); - } - return MakeGarbageCollected<CSSCustomIdentValue>( - *style.PositionFallbackBounds()); -} - const CSSValue* PositionTryOptions::ParseSingleValue( CSSParserTokenRange& range, const CSSParserContext& context,
diff --git a/third_party/blink/renderer/core/layout/anchor_evaluator_impl.cc b/third_party/blink/renderer/core/layout/anchor_evaluator_impl.cc index d96f6f4..0ba6fc53 100644 --- a/third_party/blink/renderer/core/layout/anchor_evaluator_impl.cc +++ b/third_party/blink/renderer/core/layout/anchor_evaluator_impl.cc
@@ -522,29 +522,6 @@ self_writing_direction_.GetWritingMode()); } -std::optional<LogicalRect> -AnchorEvaluatorImpl::GetAdditionalFallbackBoundsRect() const { - if (!query_object_) { - return std::nullopt; - } - const ScopedCSSName* position_fallback_bounds = - query_object_->StyleRef().PositionFallbackBounds(); - if (!position_fallback_bounds || !AnchorQuery()) { - return std::nullopt; - } - const LogicalAnchorReference* reference = - AnchorQuery()->AnchorReference(*query_object_, position_fallback_bounds); - if (!reference) { - return std::nullopt; - } - // `reference->rect` is in container's writing direction. Convert it to self - // writing direction, but the offset is still relative to container. - WritingModeConverter self_converter(self_writing_direction_, - container_converter_.OuterSize()); - return self_converter.ToLogical( - container_converter_.ToPhysical(reference->rect)); -} - std::optional<PhysicalOffset> AnchorEvaluatorImpl::ComputeAnchorCenterOffsets( const ComputedStyleBuilder& builder) { // Parameter `percentage` is unused for any non-percentage anchor value.
diff --git a/third_party/blink/renderer/core/layout/anchor_evaluator_impl.h b/third_party/blink/renderer/core/layout/anchor_evaluator_impl.h index dbeafa6..2b4211c 100644 --- a/third_party/blink/renderer/core/layout/anchor_evaluator_impl.h +++ b/third_party/blink/renderer/core/layout/anchor_evaluator_impl.h
@@ -318,10 +318,6 @@ std::optional<PhysicalOffset> ComputeAnchorCenterOffsets( const ComputedStyleBuilder&) override; - // Finds the rect of the element referenced by the `position-fallback-bounds` - // property, or nullopt if there's no such element. - std::optional<LogicalRect> GetAdditionalFallbackBoundsRect() const; - private: const LogicalAnchorQuery* AnchorQuery() const; const LogicalAnchorReference* ResolveAnchorReference(
diff --git a/third_party/blink/renderer/core/layout/anchor_position_scroll_data.cc b/third_party/blink/renderer/core/layout/anchor_position_scroll_data.cc index 84d88b2..2a4c57c 100644 --- a/third_party/blink/renderer/core/layout/anchor_position_scroll_data.cc +++ b/third_party/blink/renderer/core/layout/anchor_position_scroll_data.cc
@@ -23,18 +23,6 @@ : box.AcceptableImplicitAnchor(); } -// Finds the LayoutObject of the element given by position-fallback-bounds. -const LayoutObject* PositionFallbackBoundsObject( - const LayoutObject* layout_object) { - if (!layout_object || !layout_object->IsOutOfFlowPositioned() || - !layout_object->StyleRef().PositionFallbackBounds()) { - return nullptr; - } - - return To<LayoutBox>(layout_object) - ->FindTargetAnchor(*layout_object->StyleRef().PositionFallbackBounds()); -} - const Vector<NonOverflowingScrollRange>* GetNonOverflowingScrollRanges( const LayoutObject* layout_object) { if (!layout_object || !layout_object->IsOutOfFlowPositioned()) { @@ -70,7 +58,7 @@ AnchorPositionScrollData::AdjustmentData AnchorPositionScrollData::ComputeAdjustmentContainersData( - const LayoutObject& anchor_or_bounds) const { + const LayoutObject& anchor) const { CHECK(anchored_element_->GetLayoutObject()); AnchorPositionScrollData::AdjustmentData result; @@ -93,7 +81,7 @@ ->GetScrollOffset(); } - for (const auto* container = &anchor_or_bounds; + for (const auto* container = &anchor; container && container != bounding_container; container = container_ignore_layout_view_for_fixed_pos(*container)) { if (container->IsScrollContainer()) { @@ -176,23 +164,13 @@ return result; } -gfx::Vector2dF AnchorPositionScrollData::ComputeAdditionalBoundsOffset() const { - if (const LayoutObject* position_fallback_bounds_object = - PositionFallbackBoundsObject(anchored_element_->GetLayoutObject())) { - return ComputeAdjustmentContainersData(*position_fallback_bounds_object) - .accumulated_adjustment; - } - return gfx::Vector2dF(); -} - AnchorPositionScrollData::SnapshotDiff AnchorPositionScrollData::TakeAndCompareSnapshot(bool update) { DCHECK(IsActive()); AdjustmentData new_adjustment_data = ComputeDefaultAnchorAdjustmentData(); - gfx::Vector2dF new_additional_bounds_offset = ComputeAdditionalBoundsOffset(); - SnapshotDiff diff; + SnapshotDiff diff = SnapshotDiff::kNone; if (AdjustmentContainerIds() != new_adjustment_data.adjustment_container_ids) { diff = SnapshotDiff::kScrollersOrFallbackPosition; @@ -203,13 +181,10 @@ new_adjustment_data.anchored_element_container_scroll_offset || AccumulatedAdjustmentScrollOrigin() != new_adjustment_data.accumulated_adjustment_scroll_origin; - const bool additional_bounds_scrolled = - additional_bounds_offset_ != new_additional_bounds_offset; - if ((anchor_scrolled || additional_bounds_scrolled) && + if (anchor_scrolled && !IsFallbackPositionValid( new_adjustment_data.accumulated_adjustment, - new_adjustment_data.anchored_element_container_scroll_offset, - new_additional_bounds_offset)) { + new_adjustment_data.anchored_element_container_scroll_offset)) { diff = SnapshotDiff::kScrollersOrFallbackPosition; } else if (anchor_scrolled || NeedsScrollAdjustmentInX() != @@ -220,17 +195,11 @@ // paint properties so that compositor can calculate the translation // offset correctly. diff = SnapshotDiff::kOffsetOnly; - } else { - // When the additional bounds rect is scrolled without invalidating the - // current fallback position, `anchored_element_` doesn't need paint - // update. - diff = SnapshotDiff::kNone; } } if (update && diff != SnapshotDiff::kNone) { default_anchor_adjustment_data_ = std::move(new_adjustment_data); - additional_bounds_offset_ = new_additional_bounds_offset; } return diff; @@ -238,8 +207,7 @@ bool AnchorPositionScrollData::IsFallbackPositionValid( const gfx::Vector2dF& new_accumulated_adjustment, - const gfx::Vector2dF& new_anchored_element_container_scroll_offset, - const gfx::Vector2dF& new_additional_bounds_offset) const { + const gfx::Vector2dF& new_anchored_element_container_scroll_offset) const { const Vector<NonOverflowingScrollRange>* non_overflowing_scroll_ranges = GetNonOverflowingScrollRanges(anchored_element_->GetLayoutObject()); if (!non_overflowing_scroll_ranges || @@ -249,10 +217,9 @@ for (const NonOverflowingScrollRange& range : *non_overflowing_scroll_ranges) { - if (range.Contains(TotalOffset(), additional_bounds_offset_) != + if (range.Contains(TotalOffset()) != range.Contains(new_accumulated_adjustment + - new_anchored_element_container_scroll_offset, - new_additional_bounds_offset)) { + new_anchored_element_container_scroll_offset)) { return false; } }
diff --git a/third_party/blink/renderer/core/layout/anchor_position_scroll_data.h b/third_party/blink/renderer/core/layout/anchor_position_scroll_data.h index d625c84..04c76e4 100644 --- a/third_party/blink/renderer/core/layout/anchor_position_scroll_data.h +++ b/third_party/blink/renderer/core/layout/anchor_position_scroll_data.h
@@ -25,13 +25,12 @@ // https://drafts.csswg.org/css-anchor-position-1/#scroll // // To adjust the location of the anchor-positioned element based on scroll, -// sticky and anchor-positioning offsets between this element and the anchor -// (the default anchor and the target of the `position-fallback-bounds` -// property, respectively), this class stores a snapshot of all the scroll -// adjustment containers [1] of the anchor up to the containing block -// (exclusively) of the anchor-positioned element, along the containing block -// hierarchy. Note that "containing block" is in the spec meaning, which -// corresponds to LayoutObject::Container() instead of ContainingBlock(). +// sticky and anchor-positioning offsets between this element and the anchor, +// this class stores a snapshot of all the scroll adjustment containers [1] of +// the anchor up to the containing block (exclusively) of the anchor-positioned +// element, along the containing block hierarchy. Note that "containing block" +// is in the spec meaning, which corresponds to LayoutObject::Container() +// instead of ContainingBlock(). // // [1] An element is a scroll adjustment container if it is a scroll container, // has sticky position, or is anchor-positioned. @@ -81,9 +80,6 @@ const Vector<CompositorElementId>& AdjustmentContainerIds() const { return default_anchor_adjustment_data_.adjustment_container_ids; } - gfx::Vector2dF AdditionalBoundsOffset() const { - return additional_bounds_offset_; - } // Returns true if the snapshotted scroll offset is affected by viewport's // scroll offset. @@ -132,9 +128,9 @@ DISALLOW_NEW(); // Compositor element ids of the ancestor scroll adjustment containers - // (see the class documentation) of some element (anchor or - // position-fallback-bounds), up to the containing block of - // `anchored_element_` (exclusively), along the containing block hierarchy. + // (see the class documentation) of some element (anchor), up to the + // containing block of `anchored_element_` (exclusively), along the + // containing block hierarchy. Vector<CompositorElementId> adjustment_container_ids; // Sum of the adjustment offsets of the above containers. This includes @@ -166,16 +162,14 @@ }; AdjustmentData ComputeAdjustmentContainersData( - const LayoutObject& anchor_or_bounds) const; + const LayoutObject& anchor) const; AdjustmentData ComputeDefaultAnchorAdjustmentData() const; - gfx::Vector2dF ComputeAdditionalBoundsOffset() const; // Takes an up-to-date snapshot, and compares it with the existing one. // If `update` is true, also rewrites the existing snapshot. SnapshotDiff TakeAndCompareSnapshot(bool update); bool IsFallbackPositionValid( const gfx::Vector2dF& new_accumulated_adjustment, - const gfx::Vector2dF& new_anchored_element_container_scroll_offset, - const gfx::Vector2dF& new_additional_bounds_offset) const; + const gfx::Vector2dF& new_anchored_element_container_scroll_offset) const; void InvalidateLayoutAndPaint(); void InvalidatePaint(); @@ -189,9 +183,6 @@ AdjustmentData default_anchor_adjustment_data_; - // The accumulated adjustment applied to the additional fallback-bounds rect. - gfx::Vector2dF additional_bounds_offset_; - Member<AnchorPositionVisibilityObserver> position_visibility_observer_; };
diff --git a/third_party/blink/renderer/core/layout/block_layout_algorithm.cc b/third_party/blink/renderer/core/layout/block_layout_algorithm.cc index b6a2e040..008e2aba 100644 --- a/third_party/blink/renderer/core/layout/block_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/block_layout_algorithm.cc
@@ -648,11 +648,9 @@ abort_when_bfc_block_offset_updated_ = true; } - if (Style().HasLineClamp() && - (Style().HasStandardLineClamp() || - Style().IsDeprecatedWebkitBoxWithVerticalLineClamp())) { + if (Style().HasLineClamp()) { line_clamp_data_.UpdateLinesFromStyle(Style().LineClamp()); - } else if (Style().HasLineClamp()) { + } else if (Style().WebkitLineClamp() != 0) { UseCounter::Count(Node().GetDocument(), WebFeature::kWebkitLineClampWithoutWebkitBox); }
diff --git a/third_party/blink/renderer/core/layout/inline/ruby_utils.cc b/third_party/blink/renderer/core/layout/inline/ruby_utils.cc index 0b23370..4b8b150 100644 --- a/third_party/blink/renderer/core/layout/inline/ruby_utils.cc +++ b/third_party/blink/renderer/core/layout/inline/ruby_utils.cc
@@ -967,10 +967,10 @@ result_height.Unite( font_data->NormalizedTypoAscentAndDescent(font_baseline)); } - result_height.ascent = - std::min(result_height.ascent, primary_height.ascent); - result_height.descent = - std::min(result_height.descent, primary_height.descent); + result_height.ascent = std::min(LayoutUnit(result_height.ascent.Ceil()), + primary_height.ascent); + result_height.descent = std::min(LayoutUnit(result_height.descent.Ceil()), + primary_height.descent); return result_height; } if (const auto& layout_result = line_item.layout_result) {
diff --git a/third_party/blink/renderer/core/layout/layout_block_flow_hot.cc b/third_party/blink/renderer/core/layout/layout_block_flow_hot.cc index cb42673..eacaaa09 100644 --- a/third_party/blink/renderer/core/layout/layout_block_flow_hot.cc +++ b/third_party/blink/renderer/core/layout/layout_block_flow_hot.cc
@@ -23,8 +23,7 @@ StyleRef().Display() == EDisplay::kFlowRoot || StyleRef().Display() == EDisplay::kFlowRootListItem || ShouldApplyPaintContainment() || ShouldApplyLayoutContainment() || - StyleRef().IsDeprecatedWebkitBoxWithVerticalLineClamp() || - StyleRef().HasStandardLineClamp() || StyleRef().SpecifiesColumns() || + StyleRef().HasLineClamp() || StyleRef().SpecifiesColumns() || StyleRef().GetColumnSpan() == EColumnSpan::kAll) { // The specs require this object to establish a new formatting context. return true;
diff --git a/third_party/blink/renderer/core/layout/layout_box_model_object.cc b/third_party/blink/renderer/core/layout/layout_box_model_object.cc index 06bbce2..eedc2f3 100644 --- a/third_party/blink/renderer/core/layout/layout_box_model_object.cc +++ b/third_party/blink/renderer/core/layout/layout_box_model_object.cc
@@ -78,9 +78,8 @@ if (!style.HasOutOfFlowPosition()) { return false; } - // There's an explicitly set default anchor or additional fallback-bounds rect - // to track. - if (style.PositionAnchor() || style.PositionFallbackBounds()) { + // There's an explicitly set default anchor. + if (style.PositionAnchor()) { return true; } // Now we have `position-anchor: implicit`. We need `AnchorPositionScrollData`
diff --git a/third_party/blink/renderer/core/layout/non_overflowing_scroll_range.h b/third_party/blink/renderer/core/layout/non_overflowing_scroll_range.h index 3a6a93e6..26bf73c 100644 --- a/third_party/blink/renderer/core/layout/non_overflowing_scroll_range.h +++ b/third_party/blink/renderer/core/layout/non_overflowing_scroll_range.h
@@ -20,27 +20,14 @@ // containing block rect. PhysicalScrollRange containing_block_range; - // This range is set only if `position-fallback-bounds` is not `normal`, - // in which case it's the range for *the difference* between - // A. The snapshotted scroll offset, which is the offset applied to the margin - // box, and - // B. The scroll offset applied to the additional fallback-bounds rect, if any - // So that when (A - B) is in this range, this fallback position's margin box - // doesn't overflow the additional fallback-bounds rect. - PhysicalScrollRange additional_bounds_range; - // Checks if the given scroll offsets are within the scroll ranges, i.e., if // the fallback position's margin box overflows the bounds. - bool Contains(const gfx::Vector2dF& anchor_scroll_offset, - const gfx::Vector2dF& additional_bounds_scroll_offset) const { - return containing_block_range.Contains(anchor_scroll_offset) && - additional_bounds_range.Contains(anchor_scroll_offset - - additional_bounds_scroll_offset); + bool Contains(const gfx::Vector2dF& anchor_scroll_offset) const { + return containing_block_range.Contains(anchor_scroll_offset); } bool operator==(const NonOverflowingScrollRange& other) const { - return containing_block_range == other.containing_block_range && - additional_bounds_range == other.additional_bounds_range; + return containing_block_range == other.containing_block_range; } };
diff --git a/third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc b/third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc index abd80b9..534bb855 100644 --- a/third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc +++ b/third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc
@@ -61,14 +61,8 @@ LayoutUnit inset_area_end, bool has_non_auto_inset_start, bool has_non_auto_inset_end, - const std::optional<LayoutUnit>& additional_bounds_start, - const std::optional<LayoutUnit>& additional_bounds_end, std::optional<LayoutUnit>* out_scroll_min, - std::optional<LayoutUnit>* out_scroll_max, - std::optional<LayoutUnit>* out_additional_scroll_min, - std::optional<LayoutUnit>* out_additional_scroll_max) { - CHECK_EQ(additional_bounds_start.has_value(), - additional_bounds_end.has_value()); + std::optional<LayoutUnit>* out_scroll_max) { const LayoutUnit start_available_space = margin_box_start - imcb_inset_start; if (has_non_auto_inset_start) { // If the start inset is non-auto, then the start edges of both the @@ -98,18 +92,6 @@ out_scroll_min->value() > out_scroll_max->value()) { return false; } - - if (additional_bounds_start) { - // Note that the margin box is adjusted by the anchor's scroll offset, while - // the additional fallback-bounds rect is adjusted by the - // `position-fallback-bounds` element's scroll offset. The scroll - // range calculated here is for the difference between the two offsets. - *out_additional_scroll_min = margin_box_end - *additional_bounds_end; - *out_additional_scroll_max = margin_box_start - *additional_bounds_start; - if (*out_additional_scroll_min > *out_additional_scroll_max) { - return false; - } - } return true; } @@ -1828,12 +1810,10 @@ const NodeInfo& node_info, const LogicalAnchorQueryMap* anchor_queries) { gfx::Vector2dF anchor_offset; - gfx::Vector2dF additional_bounds_offset; if (Element* element = DynamicTo<Element>(node_info.node.GetDOMNode())) { if (const AnchorPositionScrollData* data = element->GetAnchorPositionScrollData()) { anchor_offset = data->TotalOffset(); - additional_bounds_offset = data->AdditionalBoundsOffset(); } } @@ -1880,8 +1860,7 @@ if (offset_info) { if (try_fit_available_space) { non_overflowing_scroll_ranges.push_back(non_overflowing_range); - if (!non_overflowing_range.Contains(anchor_offset, - additional_bounds_offset)) { + if (!non_overflowing_range.Contains(anchor_offset)) { continue; } } @@ -2118,11 +2097,6 @@ node_info.node, candidate_style, space, imcb, alignment, border_padding, replaced_size, container_writing_direction, &node_dimensions); - const std::optional<LogicalRect> additional_fallback_bounds = - try_fit_available_space - ? anchor_evaluator->GetAdditionalFallbackBoundsRect() - : std::nullopt; - PhysicalToLogicalGetter has_non_auto_inset( candidate_writing_direction, candidate_style, &ComputedStyle::IsTopInsetNonAuto, &ComputedStyle::IsRightInsetNonAuto, @@ -2132,8 +2106,6 @@ std::optional<InsetModifiedContainingBlock> imcb_for_position_fallback; std::optional<LayoutUnit> inline_scroll_min; std::optional<LayoutUnit> inline_scroll_max; - std::optional<LayoutUnit> additional_inline_scroll_min; - std::optional<LayoutUnit> additional_inline_scroll_max; if (try_fit_available_space) { imcb_for_position_fallback = ComputeIMCBForPositionFallback( space.AvailableSize(), alignment, insets, static_position, @@ -2147,16 +2119,7 @@ imcb_for_position_fallback->InlineEndOffset(), inset_area_offsets.inline_start, inset_area_offsets.inline_end, has_non_auto_inset.InlineStart(), has_non_auto_inset.InlineEnd(), - additional_fallback_bounds.has_value() - ? std::make_optional( - additional_fallback_bounds->offset.inline_offset) - : std::nullopt, - additional_fallback_bounds.has_value() - ? std::make_optional( - additional_fallback_bounds->InlineEndOffset()) - : std::nullopt, - &inline_scroll_min, &inline_scroll_max, - &additional_inline_scroll_min, &additional_inline_scroll_max)) { + &inline_scroll_min, &inline_scroll_max)) { return std::nullopt; } } @@ -2172,8 +2135,6 @@ // Calculate the block scroll offset range where the block dimension fits. std::optional<LayoutUnit> block_scroll_min; std::optional<LayoutUnit> block_scroll_max; - std::optional<LayoutUnit> additional_block_scroll_min; - std::optional<LayoutUnit> additional_block_scroll_max; if (try_fit_available_space) { if (!CalculateNonOverflowingRangeInOneAxis( node_dimensions.MarginBoxBlockStart(), @@ -2182,16 +2143,7 @@ imcb_for_position_fallback->BlockEndOffset(), inset_area_offsets.block_start, inset_area_offsets.block_end, has_non_auto_inset.BlockStart(), has_non_auto_inset.BlockEnd(), - additional_fallback_bounds.has_value() - ? std::make_optional( - additional_fallback_bounds->offset.block_offset) - : std::nullopt, - additional_fallback_bounds.has_value() - ? std::make_optional( - additional_fallback_bounds->BlockEndOffset()) - : std::nullopt, - &block_scroll_min, &block_scroll_max, &additional_block_scroll_min, - &additional_block_scroll_max)) { + &block_scroll_min, &block_scroll_max)) { return std::nullopt; } } @@ -2234,13 +2186,6 @@ LogicalScrollRange{inline_scroll_min, inline_scroll_max, block_scroll_min, block_scroll_max} .ToPhysical(candidate_writing_direction); - if (additional_fallback_bounds) { - out_non_overflowing_range->additional_bounds_range = - LogicalScrollRange{ - additional_inline_scroll_min, additional_inline_scroll_max, - additional_block_scroll_min, additional_block_scroll_max} - .ToPhysical(candidate_writing_direction); - } } bool anchor_center_x = anchor_center_position.inline_offset.has_value();
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.cc index d666b17..0efc603 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.cc +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.cc
@@ -299,12 +299,18 @@ return; completed_invalidations_mask_ |= invalidation_mask; - is_invalidating_ = true; + auto& document = GetDocument(); + if (document.InStyleRecalc() || + document.GetStyleEngine().InDetachLayoutTree()) { + document.ScheduleSVGResourceInvalidation(*resource); + } else { + is_invalidating_ = true; - // Invalidate clients registered via an SVGResource. - resource->NotifyContentChanged(); + // Invalidate clients registered via an SVGResource. + resource->NotifyContentChanged(); - is_invalidating_ = false; + is_invalidating_ = false; + } } void LayoutSVGResourceContainer::InvalidateCache() {
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/third_party/blink/renderer/core/loader/frame_fetch_context.cc index 96bfeb8..6b37b2b 100644 --- a/third_party/blink/renderer/core/loader/frame_fetch_context.cc +++ b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
@@ -550,18 +550,6 @@ return lcpp->HasAnyHintData(); } -bool FrameFetchContext::DoesLCPPHaveLcpElementLocatorHintData() { - if (GetResourceFetcherProperties().IsDetached()) { - return false; - } - - LCPCriticalPathPredictor* lcpp = GetFrame()->GetLCPP(); - if (!lcpp) { - return false; - } - return !lcpp->lcp_element_locators().empty(); -} - void FrameFetchContext::SetFirstPartyCookie(ResourceRequest& request) { // Set the first party for cookies url if it has not been set yet (new // requests). This value will be updated during redirects, consistent with
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.h b/third_party/blink/renderer/core/loader/frame_fetch_context.h index 82839b6..0c185cd3 100644 --- a/third_party/blink/renderer/core/loader/frame_fetch_context.h +++ b/third_party/blink/renderer/core/loader/frame_fetch_context.h
@@ -105,8 +105,6 @@ bool DoesLCPPHaveAnyHintData() override; - bool DoesLCPPHaveLcpElementLocatorHintData() override; - // Exposed for testing. void ModifyRequestForCSP(ResourceRequest&); void AddClientHintsIfNecessary(const std::optional<float> resource_width,
diff --git a/third_party/blink/renderer/core/script/classic_pending_script.cc b/third_party/blink/renderer/core/script/classic_pending_script.cc index b228302..a3900be 100644 --- a/third_party/blink/renderer/core/script/classic_pending_script.cc +++ b/third_party/blink/renderer/core/script/classic_pending_script.cc
@@ -340,6 +340,19 @@ break; } + static const bool exclude_non_parser_inserted = + features::kLowPriorityAsyncScriptExecutionExcludeNonParserInsertedParam + .Get(); + if (exclude_non_parser_inserted && !parser_inserted()) { + return false; + } + + static const bool exclude_scripts_via_document_write = + features::kLowPriorityAsyncScriptExecutionExcludeDocumentWriteParam.Get(); + if (exclude_scripts_via_document_write && is_in_document_write()) { + return false; + } + static const bool opt_out_low = features::kLowPriorityAsyncScriptExecutionOptOutLowFetchPriorityHintParam .Get();
diff --git a/third_party/blink/renderer/core/script/pending_script.h b/third_party/blink/renderer/core/script/pending_script.h index 5493302..95ed06d 100644 --- a/third_party/blink/renderer/core/script/pending_script.h +++ b/third_party/blink/renderer/core/script/pending_script.h
@@ -123,6 +123,14 @@ scheduling_type_ = scheduling_type; } + void SetParserInserted(bool parser_inserted) { + parser_inserted_ = parser_inserted; + } + + void SetIsInDocumentWrite(bool is_in_document_write) { + is_in_document_write_ = is_in_document_write; + } + bool WasCreatedDuringDocumentWrite() { return created_during_document_write_; } @@ -162,6 +170,10 @@ bool IsDisposed() const { return !element_; } + bool parser_inserted() const { return parser_inserted_; } + + bool is_in_document_write() const { return is_in_document_write_; } + private: static void ExecuteScriptBlockInternal( Script*, @@ -183,6 +195,8 @@ base::TimeTicks parser_blocking_load_start_time_; ScriptSchedulingType scheduling_type_ = ScriptSchedulingType::kNotSet; + bool parser_inserted_ = false; + bool is_in_document_write_ = false; WebScopedVirtualTimePauser virtual_time_pauser_; Member<PendingScriptClient> client_;
diff --git a/third_party/blink/renderer/core/script/script_loader.cc b/third_party/blink/renderer/core/script/script_loader.cc index efb964d..98291560 100644 --- a/third_party/blink/renderer/core/script/script_loader.cc +++ b/third_party/blink/renderer/core/script/script_loader.cc
@@ -1162,6 +1162,9 @@ } } + prepared_pending_script_->SetParserInserted(parser_inserted_); + prepared_pending_script_->SetIsInDocumentWrite(is_in_document_write); + ScriptSchedulingType script_scheduling_type = GetScriptSchedulingTypePerSpec( element_document, parser_blocking_inline_option);
diff --git a/third_party/blink/renderer/core/style/computed_style.h b/third_party/blink/renderer/core/style/computed_style.h index 88456bf..a0384d1 100644 --- a/third_party/blink/renderer/core/style/computed_style.h +++ b/third_party/blink/renderer/core/style/computed_style.h
@@ -614,15 +614,21 @@ // content ContentData* GetContentData() const { return ContentInternal().Get(); } - // line-clamp and -webkit-line-clamp - bool HasStandardLineClamp() const { return StandardLineClamp() != 0; } + // Returns the value of `line-clamp` or of `-webkit-line-clamp`, whichever + // applies (i.e. `-webkit-line-clamp` doesn't apply without + // `display: -webkit-box`). To get the raw value of the properties, use + // `StandardLineClamp()` or `WebkitLineClamp()`. int LineClamp() const { - if (HasStandardLineClamp()) { + if (StandardLineClamp() != 0) { DCHECK(RuntimeEnabledFeatures::CSSLineClampEnabled()); return StandardLineClamp(); } - return WebkitLineClamp(); + if (IsDeprecatedWebkitBox() && BoxOrient() == EBoxOrient::kVertical) { + return WebkitLineClamp(); + } + return 0; } + // Returns whether `line-clamp` or `-webkit-line-clamp` are set and apply. bool HasLineClamp() const { return LineClamp() != 0; } bool OpacityChangedStackingContext(const ComputedStyle& other) const {
diff --git a/third_party/blink/renderer/core/style/computed_style_diff_functions.json5 b/third_party/blink/renderer/core/style/computed_style_diff_functions.json5 index 281db3e..e5b1ab81 100644 --- a/third_party/blink/renderer/core/style/computed_style_diff_functions.json5 +++ b/third_party/blink/renderer/core/style/computed_style_diff_functions.json5
@@ -106,8 +106,7 @@ "CssDominantBaseline", "text-anchor", "stroke-width", "stroke-miterlimit", "stroke-linecap", "stroke-linejoin", "marker-end", "marker-mid", "marker-start", "scrollbar-width", "object-view-box", - "position-fallback-bounds", "position-try-options", "position-try-order", - "position-visibility", "inset-area"], + "position-try-options", "position-try-order", "position-visibility", "inset-area"], methods_to_diff: [ { method: "BorderLeftWidth()",
diff --git a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h index 1100c30..ceecd88 100644 --- a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h +++ b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h
@@ -189,10 +189,6 @@ // Returns true iff we have LCPP hint data for the fetch context. virtual bool DoesLCPPHaveAnyHintData() { return false; } - // Returns true iff we have LCP element locator hint data for the fetch - // context. - virtual bool DoesLCPPHaveLcpElementLocatorHintData() { return false; } - // Returns the origin of the top frame in the document or the dedicated // worker. This returns nullptr for Shared Workers and Service Workers. virtual scoped_refptr<const SecurityOrigin> GetTopFrameOrigin() const {
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc index 0cb5c2bd..58fb3aa 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
@@ -666,19 +666,6 @@ } } - // The following code disables AdjustImagePriority when there is LCPP - // LcpElementLocator hint data. The reason why not to early return from this - // function is that we want to record UMA with following - // MaybeRecordBoostImagePriorityReason() function even when we disables - // AdjustImagePriority. - if (base::FeatureList::IsEnabled(features::kLCPCriticalPathPredictor) && - features::kLCPCriticalPathAdjustImageLoadPriority.Get() && - features::kLCPCriticalPathAdjustImageLoadPriorityOverrideFirstNBoost - .Get() && - context_->DoesLCPPHaveLcpElementLocatorHintData()) { - new_priority = priority_so_far; - } - // Only records HTTP family URLs (e.g. Exclude data URLs). if (resource_request.Url().ProtocolIsInHTTPFamily()) { MaybeRecordBoostImagePriorityReason(priority_so_far != new_priority,
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index a1fd2e1..efa5cbb 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -938,19 +938,6 @@ name: "CSSParserIgnoreCharsetForURLs", }, { - // Support for the position-fallback-bounds property. - // - // This property was part of the CSS Anchor Positioning spec, - // but was removed at some point. We do however plan to offer - // something similar in the future [1], and so we're holding - // on to the implementation for how. - // - // [1] https://github.com/w3c/csswg-drafts/issues/9868 - name: "CSSPositionFallbackBounds", - depends_on: ["CSSAnchorPositioning"], - status: "test", - }, - { name: "CSSPositionStickyStaticScrollPosition", status: "test", },
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 4114736..fa9b192b 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -1845,7 +1845,6 @@ crbug.com/1404467 [ Release Win ] external/wpt/css/css-text/letter-spacing/letter-spacing-ligatures-002.html [ Failure ] crbug.com/1404467 external/wpt/css/css-text/letter-spacing/letter-spacing-ligatures-003.html [ Failure ] crbug.com/1404466 external/wpt/css/css-text/line-breaking/line-breaking-022.html [ Failure ] -crbug.com/1404466 external/wpt/css/css-text/line-breaking/line-breaking-023.html [ Failure ] crbug.com/1404468 external/wpt/css/css-text/word-break/word-break-break-all-ethiopic.html [ Failure ] crbug.com/1361453 external/wpt/css/css-text/hyphens/i18n/hyphens-i18n-auto-001.html [ Failure ] crbug.com/1361453 external/wpt/css/css-text/hyphens/i18n/hyphens-i18n-auto-002.html [ Failure ] @@ -2966,7 +2965,7 @@ crbug.com/626703 [ Mac13 Release ] external/wpt/IndexedDB/idbcursor_iterating.htm [ Timeout ] crbug.com/626703 [ Mac12 ] external/wpt/IndexedDB/idbobjectstore_getAllKeys.any.html [ Timeout ] crbug.com/626703 [ Mac13 ] external/wpt/IndexedDB/idbobjectstore_getAllKeys.any.html [ Timeout ] -crbug.com/626703 external/wpt/css/css-highlight-api/painting/custom-highlight-painting-prioritization-003.html [ Failure ] +crbug.com/626703 [ Mac ] external/wpt/css/css-highlight-api/painting/custom-highlight-painting-prioritization-003.html [ Failure ] crbug.com/626703 external/wpt/mathml/presentation-markup/operators/embellished-op-1-4.html [ Failure ] crbug.com/626703 external/wpt/mathml/presentation-markup/operators/embellished-op-1-5.html [ Failure ] crbug.com/626703 external/wpt/mathml/presentation-markup/operators/embellished-op-5-1.html [ Failure ] @@ -3065,7 +3064,6 @@ crbug.com/626703 external/wpt/css/css-transitions/transition-events-with-document-change.html [ Timeout ] crbug.com/626703 external/wpt/css/css-animations/animation-canceled-by-parent-details-element-being-closed.html [ Timeout ] crbug.com/626703 virtual/threaded/external/wpt/css/css-animations/animation-canceled-by-parent-details-element-being-closed.html [ Timeout ] -crbug.com/626703 external/wpt/css/css-counter-styles/hebrew/counter-hebrew-nested.html [ Failure ] crbug.com/626703 external/wpt/css/css-counter-styles/japanese-formal/counter-japanese-formal.html [ Failure ] crbug.com/626703 external/wpt/css/css-counter-styles/japanese-informal/counter-japanese-informal.html [ Failure ] crbug.com/626703 external/wpt/css/css-counter-styles/korean-hanja-informal/counter-korean-hanja-informal.html [ Failure ] @@ -3433,8 +3431,6 @@ crbug.com/329482480 external/wpt/css/zoom/iframe-zoom-nested.html [ Failure ] -crbug.com/899264 external/wpt/css/css-text/letter-spacing/letter-spacing-control-chars-001.html [ Failure ] - crbug.com/1290460 [ Mac ] external/wpt/css/css-text/letter-spacing/letter-spacing-bengali-yaphala-001.html [ Failure ] crbug.com/1281208 external/wpt/css/css-text/hyphens/hyphenate-character-002.html [ Failure ] crbug.com/1281208 [ Mac ] external/wpt/css/css-text/hyphens/hyphenate-character-005.html [ Failure ] @@ -7369,7 +7365,7 @@ crbug.com/40336192 virtual/css-line-clamp/external/wpt/css/css-overflow/webkit-line-clamp-040.html [ Failure ] # Test is failing on Linux builders. -crbug.com/333058973 [ Linux ] external/wpt/css/css-sizing/aspect-ratio/replaced-element-003.html [ Failure ] +crbug.com/333058973 [ Linux ] external/wpt/css/css-sizing/aspect-ratio/replaced-element-003.html [ Failure Pass ] crbug.com/333058973 [ Mac ] external/wpt/css/css-sizing/aspect-ratio/replaced-element-003.html [ Failure Pass ] # Branch Gardener 2024-04-10
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites index 099224a..f25ae6e 100644 --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -315,8 +315,7 @@ "compositing/filters", "external/wpt/performance-timeline/tentative/with-filter-options-originA.html", "external/wpt/soft-navigation-heuristics/disabled.html", - "wpt_internal/performance-timeline/performance-user-timing-mark-feature-usage.html", - "wpt_internal/css/css-anchor-position/position-fallback-bounds.html" + "wpt_internal/performance-timeline/performance-user-timing-mark-feature-usage.html" ], "exclusive_tests": ["media/stable"], "args": ["--stable-release-mode",
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json index ec63930..5e276d01f2 100644 --- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json +++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json
@@ -261662,6 +261662,58 @@ {} ] ], + "2d.layer.global-states.copy.no-shadow.no-transform.html": [ + "1720f20589fcd676f93f9871d32f6701820672df", + [ + null, + [ + [ + "/html/canvas/element/layers/2d.layer.global-states.copy.no-shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.no-shadow.rotation.html": [ + "87cd91bb120b52d5c6d2081444a5be759f9b5d75", + [ + null, + [ + [ + "/html/canvas/element/layers/2d.layer.global-states.copy.no-shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.shadow.no-transform.html": [ + "e8d01065c1d746407f641fecf5648c96df676145", + [ + null, + [ + [ + "/html/canvas/element/layers/2d.layer.global-states.copy.shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.shadow.rotation.html": [ + "5c7fa379f14932e1377fab595f8b1a3302457d6c", + [ + null, + [ + [ + "/html/canvas/element/layers/2d.layer.global-states.copy.shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], "2d.layer.global-states.filter.blending.no-shadow.no-transform.html": [ "188d5ea98be76d827857285197ccae1494d87db9", [ @@ -261766,6 +261818,58 @@ {} ] ], + "2d.layer.global-states.filter.copy.no-shadow.no-transform.html": [ + "ac5c7303a81856c5763f3237d75aeb5e9ddedc04", + [ + null, + [ + [ + "/html/canvas/element/layers/2d.layer.global-states.filter.copy.no-shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.no-shadow.rotation.html": [ + "3158a2fff34ef7327f85ce0c05d2b5bfbba271f4", + [ + null, + [ + [ + "/html/canvas/element/layers/2d.layer.global-states.filter.copy.no-shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.shadow.no-transform.html": [ + "839ab13add854c1c3c033568b2a8a37a4a5acb2b", + [ + null, + [ + [ + "/html/canvas/element/layers/2d.layer.global-states.filter.copy.shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.shadow.rotation.html": [ + "7c090165f5903101ba0c4d945f0b9bd1efa3ee69", + [ + null, + [ + [ + "/html/canvas/element/layers/2d.layer.global-states.filter.copy.shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], "2d.layer.global-states.filter.no-composite-op.no-shadow.no-transform.html": [ "d2b2d806c4b30ef0fa6d141766b7d0f9cbebc589", [ @@ -261870,6 +261974,19 @@ {} ] ], + "2d.layer.globalCompositeOperation.html": [ + "32809d852c7b2466edc20334f0541320010e0d91", + [ + null, + [ + [ + "/html/canvas/element/layers/2d.layer.globalCompositeOperation-expected.html", + "==" + ] + ], + {} + ] + ], "2d.layer.nested-filters.html": [ "333de67ac9bcbacac96f7266eb3b50a44be311d3", [ @@ -264659,6 +264776,110 @@ {} ] ], + "2d.layer.global-states.copy.no-shadow.no-transform.html": [ + "70b659f52ba565806c813e3d8c86cccf9666f548", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.copy.no-shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.no-shadow.no-transform.w.html": [ + "1db7f17a94d65c074b8ecfa41dd191f7f5889980", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.copy.no-shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.no-shadow.rotation.html": [ + "2151535015b670f35cebc61cd9287350ef3e9bd9", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.copy.no-shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.no-shadow.rotation.w.html": [ + "9c0cac99b913236a4946bbdf29ceb7221bdc2de5", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.copy.no-shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.shadow.no-transform.html": [ + "42231fa61eeda807201e913fb9d8edb27f144c6a", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.copy.shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.shadow.no-transform.w.html": [ + "20dc667ef8730ecf3216ea17b713b4a801b764da", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.copy.shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.shadow.rotation.html": [ + "77158a9f962d2f0aa5bad8934a4a5b0676e20070", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.copy.shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.copy.shadow.rotation.w.html": [ + "def6bc51e2054f7189125a23dbcd12e78b5ff239", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.copy.shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], "2d.layer.global-states.filter.blending.no-shadow.no-transform.html": [ "8acbfa668fbc62c168d6d9ec43607b51291947c8", [ @@ -264867,6 +265088,110 @@ {} ] ], + "2d.layer.global-states.filter.copy.no-shadow.no-transform.html": [ + "f08ba940af401dfa88645adcbcf5b329b741e0f4", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.filter.copy.no-shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.no-shadow.no-transform.w.html": [ + "75fc90bae67cc47cb5606b5b0ece91e05eed0cd3", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.filter.copy.no-shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.no-shadow.rotation.html": [ + "3f12cf0c4e4dc0444da574fee29fc56de19263b2", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.filter.copy.no-shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.no-shadow.rotation.w.html": [ + "0a3ecee6698060758615b01ceae626ce0971ecf7", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.filter.copy.no-shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.shadow.no-transform.html": [ + "b4996deb6f3b5e7380ca32282e595dfd1095e326", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.filter.copy.shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.shadow.no-transform.w.html": [ + "9c13a367b32606080ea265a82a54002874e69ee4", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.filter.copy.shadow.no-transform-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.shadow.rotation.html": [ + "eab5f8312bbb31753800958d128562a235bfca77", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.filter.copy.shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.global-states.filter.copy.shadow.rotation.w.html": [ + "aebd6cc00d4802fa7dcea4162d85f081f46fa022", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.global-states.filter.copy.shadow.rotation-expected.html", + "==" + ] + ], + {} + ] + ], "2d.layer.global-states.filter.no-composite-op.no-shadow.no-transform.html": [ "f86b0fd37d73c501c1cdc3b466228b775349b678", [ @@ -265075,6 +265400,32 @@ {} ] ], + "2d.layer.globalCompositeOperation.html": [ + "ab9bc4270b386951eb06b731dc4ae8ae8e0d8661", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.globalCompositeOperation-expected.html", + "==" + ] + ], + {} + ] + ], + "2d.layer.globalCompositeOperation.w.html": [ + "9a403140fc4b20402caf6c00b24b30aa33b72420", + [ + null, + [ + [ + "/html/canvas/offscreen/layers/2d.layer.globalCompositeOperation-expected.html", + "==" + ] + ], + {} + ] + ], "2d.layer.nested-filters.html": [ "adf99bacbe700beaf38f3ea84e3a3f676fe80d91", [ @@ -358853,6 +359204,22 @@ "da144975a57d2563394c7b6cedc1d998f8fb5ef1", [] ], + "2d.layer.global-states.copy.no-shadow.no-transform-expected.html": [ + "489d4322823e96b1f205e3088b7b4939c3757c39", + [] + ], + "2d.layer.global-states.copy.no-shadow.rotation-expected.html": [ + "63913ffb0571c916d0c3927ba3265583486bfe2c", + [] + ], + "2d.layer.global-states.copy.shadow.no-transform-expected.html": [ + "021581f8925dcfbca0e02d83a58c6ac1ff2c7ea3", + [] + ], + "2d.layer.global-states.copy.shadow.rotation-expected.html": [ + "dd9a5c2a00141ad61a1e53e56b012cc99ae0316f", + [] + ], "2d.layer.global-states.filter.blending.no-shadow.no-transform-expected.html": [ "482ab25a8552ea83f004e35de28c5ac2a1532a4a", [] @@ -358885,6 +359252,22 @@ "e70fe3e92d87c705328eff2cc4949599b093ed40", [] ], + "2d.layer.global-states.filter.copy.no-shadow.no-transform-expected.html": [ + "21aa241aca8b82feeba45f72b73c1fded973744c", + [] + ], + "2d.layer.global-states.filter.copy.no-shadow.rotation-expected.html": [ + "b2b46ee039cb85c2eba622b7d7e6c320b436b139", + [] + ], + "2d.layer.global-states.filter.copy.shadow.no-transform-expected.html": [ + "d11326d5d68dbde8aa28ed07f5093bbd9c414d71", + [] + ], + "2d.layer.global-states.filter.copy.shadow.rotation-expected.html": [ + "3ac098c344877d9e50c94810a1141f89bdd67e2d", + [] + ], "2d.layer.global-states.filter.no-composite-op.no-shadow.no-transform-expected.html": [ "a445ae2c4a4b0c21c500ee6ab0ad7e470d479ef6", [] @@ -358917,6 +359300,10 @@ "06f6a2dff3ec1533b419a8d1819a9fdf32fc1aa4", [] ], + "2d.layer.globalCompositeOperation-expected.html": [ + "02a8915c0b530b779842e1b10e4e7663e1de8598", + [] + ], "2d.layer.nested-expected.html": [ "65525d4d6a23db56e5717147a60fa8e22d0519a2", [] @@ -360033,6 +360420,22 @@ "da144975a57d2563394c7b6cedc1d998f8fb5ef1", [] ], + "2d.layer.global-states.copy.no-shadow.no-transform-expected.html": [ + "489d4322823e96b1f205e3088b7b4939c3757c39", + [] + ], + "2d.layer.global-states.copy.no-shadow.rotation-expected.html": [ + "63913ffb0571c916d0c3927ba3265583486bfe2c", + [] + ], + "2d.layer.global-states.copy.shadow.no-transform-expected.html": [ + "021581f8925dcfbca0e02d83a58c6ac1ff2c7ea3", + [] + ], + "2d.layer.global-states.copy.shadow.rotation-expected.html": [ + "dd9a5c2a00141ad61a1e53e56b012cc99ae0316f", + [] + ], "2d.layer.global-states.filter.blending.no-shadow.no-transform-expected.html": [ "482ab25a8552ea83f004e35de28c5ac2a1532a4a", [] @@ -360065,6 +360468,22 @@ "e70fe3e92d87c705328eff2cc4949599b093ed40", [] ], + "2d.layer.global-states.filter.copy.no-shadow.no-transform-expected.html": [ + "21aa241aca8b82feeba45f72b73c1fded973744c", + [] + ], + "2d.layer.global-states.filter.copy.no-shadow.rotation-expected.html": [ + "b2b46ee039cb85c2eba622b7d7e6c320b436b139", + [] + ], + "2d.layer.global-states.filter.copy.shadow.no-transform-expected.html": [ + "d11326d5d68dbde8aa28ed07f5093bbd9c414d71", + [] + ], + "2d.layer.global-states.filter.copy.shadow.rotation-expected.html": [ + "3ac098c344877d9e50c94810a1141f89bdd67e2d", + [] + ], "2d.layer.global-states.filter.no-composite-op.no-shadow.no-transform-expected.html": [ "a445ae2c4a4b0c21c500ee6ab0ad7e470d479ef6", [] @@ -360097,6 +360516,10 @@ "06f6a2dff3ec1533b419a8d1819a9fdf32fc1aa4", [] ], + "2d.layer.globalCompositeOperation-expected.html": [ + "02a8915c0b530b779842e1b10e4e7663e1de8598", + [] + ], "2d.layer.nested-expected.html": [ "65525d4d6a23db56e5717147a60fa8e22d0519a2", [] @@ -360496,7 +360919,7 @@ [] ], "layers.yaml": [ - "0f722a46486ec636b47dca18e170a052742f76a2", + "e71155650b0662d894cc9a665334af794effdf94", [] ], "line-styles.yaml": [ @@ -361855,6 +362278,10 @@ "be8175e61d48282f046f4747abc1be8709301e0f", [] ], + "the-anchor-attribute-xml.tentative-expected.txt": [ + "442e5308b415d95d554fffc1edfaff132c6cf960", + [] + ], "the-lang-attribute-003.html.headers": [ "0c47ecd4fa74391ca96aba69cb030ca488f6b266", [] @@ -396066,11 +396493,11 @@ ], "conformance_tests": { "arg_min_max.https.any-expected.txt": [ - "942c218a9914b2e2a506c79a544524c86aab85e7", + "2421c0e856bbdd02a0aa252ee7950c24d47c24e1", [] ], "arg_min_max.https.any.worker-expected.txt": [ - "942c218a9914b2e2a506c79a544524c86aab85e7", + "2421c0e856bbdd02a0aa252ee7950c24d47c24e1", [] ], "batch_normalization.https.any-expected.txt": [ @@ -437864,7 +438291,7 @@ ] ], "fedcm-endpoint-redirects.https.html": [ - "36a4de7900c1f80f2df249a62ba6c5bd8a1ccf8b", + "71dbce03267e86e00fd90e1b69abf186b0fdd3a3", [ null, { @@ -437873,7 +438300,7 @@ ] ], "fedcm-error-basic.https.html": [ - "49d6ea50df3881eec5032381c400c0f1ffa413dd", + "fd902bcf9042ba4234bcd25b7c62d1a09e7f7c0e", [ null, { @@ -530935,7 +531362,7 @@ ] ], "disabled-by-permissions-policy.https.sub.html": [ - "6bd3e3500bc505375d7b5f7877f3ff272057a332", + "f374a58f785c556b3f275dbf6c2eacb8d7a2d1a0", [ null, { @@ -530944,21 +531371,21 @@ ] ], "enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html": [ - "864fb5e76139ed9e6158c08278dca0790f126c7b", + "c2a2b09fc65a959a02a5fa5e8eccc2c77ae9dd77", [ null, {} ] ], "enabled-by-permission-policy-attribute.https.sub.html": [ - "018409b82902672f66894b03a711bb708cad262c", + "50b8475b81086f374810f8bff69e1acb39b073ac", [ null, {} ] ], "enabled-by-permissions-policy.https.sub.html": [ - "007f79ab9c4256fbebae51f54d34144843020982", + "d5f72eb1ccb03d6230ef91b704479814610333a9", [ null, { @@ -530967,7 +531394,7 @@ ] ], "enabled-on-self-origin-by-permissions-policy.https.sub.html": [ - "d879c1c5432bb884af89f0f9fc24e328f8a3eae5", + "ea4b65966f1b870f4d4385225ed4ceaed831e9b1", [ null, { @@ -565324,6 +565751,13 @@ {} ] ], + "the-anchor-attribute-xml.tentative.html": [ + "c5e6d81826dea22d7eb96d659ac7d55782e4390f", + [ + null, + {} + ] + ], "the-lang-attribute-001.html": [ "c2966f362060cd0025fa79cd4a5dbea540079656", [ @@ -579870,7 +580304,7 @@ ] ], "popover-light-dismiss.html": [ - "45db242e918bf1e89a5c40df93dacbca62e70825", + "e0e006e27c4b8a48c6b69ffed542ff67788ae930", [ null, {
diff --git a/third_party/blink/web_tests/external/wpt/geolocation-API/disabled-by-permissions-policy.https.sub.html b/third_party/blink/web_tests/external/wpt/geolocation-API/disabled-by-permissions-policy.https.sub.html index 6bd3e35..f374a58f 100644 --- a/third_party/blink/web_tests/external/wpt/geolocation-API/disabled-by-permissions-policy.https.sub.html +++ b/third_party/blink/web_tests/external/wpt/geolocation-API/disabled-by-permissions-policy.https.sub.html
@@ -12,13 +12,10 @@ const same_origin_src = "/permissions-policy/resources/permissions-policy-geolocation.html"; const cross_origin_src = - "https://{{hosts[][]}}:{{ports[https][0]}}" + same_origin_src; + "https://{{hosts[alt][]}}:{{ports[https][0]}}" + same_origin_src; promise_test(async (t) => { - await test_driver.set_permission( - { name: "geolocation" }, - "granted" - ); + await test_driver.set_permission({ name: "geolocation" }, "granted"); const posError = await new Promise((resolve, reject) => { navigator.geolocation.getCurrentPosition(reject, resolve);
diff --git a/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html b/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html index 864fb5e..c2a2b09 100644 --- a/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html +++ b/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html
@@ -10,7 +10,7 @@ const base_src = "/permissions-policy/resources/redirect-on-load.html#"; const same_origin_src = base_src + relative_path; const cross_origin_src = - `${base_src}https://{{hosts[][]}}:{{ports[https][0]}}${relative_path}`; + `${base_src}https://{{hosts[alt][]}}:{{ports[https][0]}}${relative_path}`; async_test(t => { test_feature_availability(
diff --git a/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permission-policy-attribute.https.sub.html b/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permission-policy-attribute.https.sub.html index 018409b..50b8475b 100644 --- a/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permission-policy-attribute.https.sub.html +++ b/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permission-policy-attribute.https.sub.html
@@ -9,7 +9,7 @@ const same_origin_src = "/permissions-policy/resources/permissions-policy-geolocation.html"; const cross_origin_src = - "https://{{hosts[][]}}:{{ports[https][0]}}" + same_origin_src; + "https://{{hosts[alt][]}}:{{ports[https][0]}}" + same_origin_src; async_test(t => { test_feature_availability(
diff --git a/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permissions-policy.https.sub.html b/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permissions-policy.https.sub.html index 007f79ab..d5f72eb1 100644 --- a/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permissions-policy.https.sub.html +++ b/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-by-permissions-policy.https.sub.html
@@ -10,7 +10,7 @@ const same_origin_src = "/permissions-policy/resources/permissions-policy-geolocation.html"; const cross_origin_src = - "https://{{hosts[][]}}:{{ports[https][0]}}" + same_origin_src; + "https://{{hosts[alt][]}}:{{ports[https][0]}}" + same_origin_src; promise_test(async (t) => { await test_driver.set_permission({ name: "geolocation" }, "granted");
diff --git a/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html b/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html index d879c1c5..ea4b659 100644 --- a/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html +++ b/third_party/blink/web_tests/external/wpt/geolocation-API/enabled-on-self-origin-by-permissions-policy.https.sub.html
@@ -12,7 +12,7 @@ const same_origin_src = "/permissions-policy/resources/permissions-policy-geolocation.html"; const cross_origin_src = - "https://{{hosts[][]}}:{{ports[https][0]}}" + same_origin_src; + "https://{{hosts[alt][]}}:{{ports[https][0]}}" + same_origin_src; promise_test(async (t) => { await test_driver.set_permission({ name: "geolocation" }, "granted");
diff --git a/third_party/blink/web_tests/external/wpt/svg/crashtests/chrome-bug-333487749.html b/third_party/blink/web_tests/external/wpt/svg/crashtests/chrome-bug-333487749.html new file mode 100644 index 0000000..1613f49 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/crashtests/chrome-bug-333487749.html
@@ -0,0 +1,14 @@ +<!doctype html> +<body style="mask: url(#marker)"> + <svg> + <marker id="marker"> + <rect width="10" height="10" fill="yellow"/> + </marker> + <path d="M50,50h100" marker-start="url(#marker1)"/> + </svg> +</body> +<script> + document.documentElement.offsetTop; + document.documentElement.style.display = 'none'; + document.documentElement.offsetTop; +</script>
diff --git a/third_party/blink/web_tests/fast/css/getComputedStyle/computed-style-listing-expected.txt b/third_party/blink/web_tests/fast/css/getComputedStyle/computed-style-listing-expected.txt index eb4db46c..1e7b4de 100644 --- a/third_party/blink/web_tests/fast/css/getComputedStyle/computed-style-listing-expected.txt +++ b/third_party/blink/web_tests/fast/css/getComputedStyle/computed-style-listing-expected.txt
@@ -293,7 +293,6 @@ popover-show-delay: 0.5s position: static position-anchor: implicit -position-fallback-bounds: normal position-try-options: none position-try-order: normal position-visibility: always
diff --git a/third_party/blink/web_tests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt b/third_party/blink/web_tests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt index a93244db..a58c0e2 100644 --- a/third_party/blink/web_tests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt +++ b/third_party/blink/web_tests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt
@@ -293,7 +293,6 @@ popover-show-delay: 0.5s position: static position-anchor: implicit -position-fallback-bounds: normal position-try-options: none position-try-order: normal position-visibility: always
diff --git a/third_party/blink/web_tests/svg/css/getComputedStyle-listing-expected.txt b/third_party/blink/web_tests/svg/css/getComputedStyle-listing-expected.txt index 6754de26..9790cf3 100644 --- a/third_party/blink/web_tests/svg/css/getComputedStyle-listing-expected.txt +++ b/third_party/blink/web_tests/svg/css/getComputedStyle-listing-expected.txt
@@ -293,7 +293,6 @@ popover-show-delay: 0.5s position: static position-anchor: implicit -position-fallback-bounds: normal position-try-options: none position-try-order: normal position-visibility: always
diff --git a/third_party/blink/web_tests/virtual/stable/wpt_internal/css/css-anchor-position/position-fallback-bounds-expected.txt b/third_party/blink/web_tests/virtual/stable/wpt_internal/css/css-anchor-position/position-fallback-bounds-expected.txt deleted file mode 100644 index d2490db..0000000 --- a/third_party/blink/web_tests/virtual/stable/wpt_internal/css/css-anchor-position/position-fallback-bounds-expected.txt +++ /dev/null
@@ -1,3 +0,0 @@ -This is a testharness.js-based test. -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/webexposed/css-properties-as-js-properties-expected.txt b/third_party/blink/web_tests/webexposed/css-properties-as-js-properties-expected.txt index ed5da43..362ade5 100644 --- a/third_party/blink/web_tests/webexposed/css-properties-as-js-properties-expected.txt +++ b/third_party/blink/web_tests/webexposed/css-properties-as-js-properties-expected.txt
@@ -355,7 +355,6 @@ popoverShowDelay position positionAnchor -positionFallbackBounds positionTry positionTryOptions positionTryOrder
diff --git a/third_party/blink/web_tests/webexposed/css-property-listing-expected.txt b/third_party/blink/web_tests/webexposed/css-property-listing-expected.txt index 2505eb2..5f328ce 100644 --- a/third_party/blink/web_tests/webexposed/css-property-listing-expected.txt +++ b/third_party/blink/web_tests/webexposed/css-property-listing-expected.txt
@@ -310,7 +310,6 @@ popover-show-delay position position-anchor - position-fallback-bounds position-try-options position-try-order position-visibility
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-001.html b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-001.html deleted file mode 100644 index c1da7a28..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-001.html +++ /dev/null
@@ -1,84 +0,0 @@ -<!DOCTYPE html> -<title>Tests basic functionalities of 'position-fallback-bounds'</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9868"> -<link rel="author" href="mailto:xiaochengh@chromium.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/check-layout-th.js"></script> -<script src="/css/css-anchor-position/support/test-common.js"></script> - -<style> -body { - margin: 0; -} - -.container { - position: relative; - width: 400px; - height: 400px; - top: 100px; - anchor-name: --bounds; - outline: 1px dashed black; -} - -.anchor { - position: absolute; - width: 100px; - height: 100px; - left: 150px; - background-color: orange; -} - -.target { - position: fixed; - width: 100px; - height: 100px; - background-color: lime; - left: anchor(left); - position-fallback-bounds: --bounds; -} - -#anchor1 { - top: 0; - anchor-name: --a1; -} -#anchor2 { - bottom: 0; - anchor-name: --a2; -} - -#target1 { - position-anchor: --a1; - bottom: anchor(top); - position-try-options: --bottom; -} -#target2 { - position-anchor: --a2; - top: anchor(bottom); - position-try-options: --top; -} - -@position-try --bottom { - bottom: auto; - top: anchor(bottom); -} -@position-try --top { - top: auto; - bottom: anchor(top); -} -</style> - -<body onload="checkLayoutForAnchorPos('.target')"> - <div class="container" id="bounds"> - <div class="anchor" id="anchor1"></div> - <div class="anchor" id="anchor2"></div> - </div> - - <!-- Enough space above the anchor in the viewport but not in the additional - bounds rect, which triggers fallback --> - <div class="target" id="target1" data-offset-y=200></div> - - <!-- Enough space below the anchor in the viewport but not in the additional - bounds rect, which triggers fallback --> - <div class="target" id="target2" data-offset-y=300></div> -</body>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-002.html b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-002.html deleted file mode 100644 index a2a98b95..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-002.html +++ /dev/null
@@ -1,87 +0,0 @@ -<!DOCTYPE html> -<title>Tests 'position-fallback-bounds' with mixed writing modes</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9868"> -<link rel="author" href="mailto:xiaochengh@chromium.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/check-layout-th.js"></script> -<script src="/css/css-anchor-position/support/test-common.js"></script> - -<style> -body { - margin: 0; -} - -.container { - position: relative; - width: 400px; - height: 400px; - top: 100px; - anchor-name: --bounds; - outline: 1px dashed black; -} - -.anchor { - position: absolute; - width: 100px; - height: 100px; - left: 150px; - background-color: orange; -} - -.target { - position: fixed; - width: 100px; - height: 100px; - background-color: lime; - left: anchor(left); - position-fallback-bounds: --bounds; -} - -#anchor1 { - top: 0; - anchor-name: --a1; -} -#anchor2 { - bottom: 0; - anchor-name: --a2; -} - -#target1 { - position-anchor: --a1; - bottom: anchor(top); - position-try: --bottom; - writing-mode: vertical-rl; -} -#target2 { - position-anchor: --a2; - top: anchor(bottom); - position-try: --top; - writing-mode: vertical-lr; - direction: rtl; -} - -@position-try --bottom { - bottom: auto; - top: anchor(bottom); -} -@position-try --top { - top: auto; - bottom: anchor(top); -} -</style> - -<body onload="checkLayoutForAnchorPos('.target')"> - <div class="container" id="bounds"> - <div class="anchor" id="anchor1"></div> - <div class="anchor" id="anchor2"></div> - </div> - - <!-- Enough space above the anchor in the viewport but not in the additional - bounds rect, which triggers fallback --> - <div class="target" id="target1" data-offset-y=200></div> - - <!-- Enough space below the anchor in the viewport but not in the additional - bounds rect, which triggers fallback --> - <div class="target" id="target2" data-offset-y=300></div> -</body>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-003.html b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-003.html deleted file mode 100644 index 6f025e8..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-003.html +++ /dev/null
@@ -1,95 +0,0 @@ -<!DOCTYPE html> -<title>Tests basic interaction between 'position-fallback-bounds' and scrolling</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9868"> -<link rel="author" href="mailto:xiaochengh@chromium.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/css-anchor-position/support/test-common.js"></script> - -<style> -body { - position: relative; - width: 200vw; - height: 200vh; -} - -#bounds { - position: fixed; - inset: 50px; - background: gray; - opacity: 0.1; - z-index: -1; - anchor-name: --bounds; -} - -#anchor { - position: absolute; - width: 100px; - height: 100px; - left: 200px; - top: 200px; - background-color: orange; - anchor-name: --a; -} - -#target { - position: fixed; - width: 100px; - height: 100px; - background-color: lime; - position-anchor: --a; - position-fallback-bounds: --bounds; - position-try-options: --corner1, --corner2, --corner3; - bottom: anchor(top); - right: anchor(left); -} - -@position-try --corner1 { - inset: auto; - top: anchor(bottom); - right: anchor(left); -} -@position-try --corner2 { - inset: auto; - bottom: anchor(top); - left: anchor(right); -} -@position-try --corner3 { - inset: auto; - top: anchor(bottom); - left: anchor(right); -} -</style> - -<div id="bounds"></div> -<div id="anchor"></div> -<div id="target"></div> - -<script> -promise_test(async () => { - await waitUntilNextAnimationFrame(); - assert_fallback_position(target, anchor, 'top'); - assert_fallback_position(target, anchor, 'left'); -}, "Target is at anchor's top-left corner at initial scroll position"); - -promise_test(async () => { - document.documentElement.scrollTop = 100; - await waitUntilNextAnimationFrame(); - assert_fallback_position(target, anchor, 'bottom'); - assert_fallback_position(target, anchor, 'left'); -}, "Target falls back to anchor's bottom-left corner after anchor is scrolled upwards"); - -promise_test(async () => { - document.documentElement.scrollLeft = 100; - await waitUntilNextAnimationFrame(); - assert_fallback_position(target, anchor, 'bottom'); - assert_fallback_position(target, anchor, 'right'); -}, "Target falls back to anchor's bottom-right corner after anchor is further scrolled leftwards"); - -promise_test(async () => { - document.documentElement.scrollTop = 0; - await waitUntilNextAnimationFrame(); - assert_fallback_position(target, anchor, 'top'); - assert_fallback_position(target, anchor, 'right'); -}, "Target falls back to anchor's top-left corner after anchor is scrolled back downwards"); -</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-004.html b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-004.html deleted file mode 100644 index 326b8eb..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-004.html +++ /dev/null
@@ -1,99 +0,0 @@ -<!DOCTYPE html> -<title>Tests complex interaction between 'position-fallback-bounds' and scrolling</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9868"> -<link rel="author" href="mailto:xiaochengh@chromium.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/css-anchor-position/support/test-common.js"></script> - -<style> -body { - margin: 0; -} - -#anchor-scroller { - position: absolute; - height: 175px; - width: 200px; - left: 200px; - top: 100px; - overflow-y: scroll; - z-index: 100; -} - -#anchor { - position: absolute; - width: 100px; - height: 100px; - left: 0; - top: 150px; - background-color: orange; - anchor-name: --a; -} - -#bounds-scroller { - position: absolute; - width: 400px; - height: 400px; - left: 100px; - top: 0; - overflow-y: scroll; -} - -#bounds { - position: absolute; - width: 400px; - height: 400px; - top: 100px; - background: gray; - anchor-name: --bounds; -} - -#target { - position: fixed; - width: 100px; - height: 100px; - background-color: lime; - left: anchor(left); - position-anchor: --a; - position-fallback-bounds: --bounds; - position-try-options: --bottom; - bottom: anchor(top); -} - -@position-try --bottom { - top: anchor(bottom); - bottom: auto; -} -</style> - -<div id="anchor-scroller"> - <div id="anchor"></div> -</div> - -<div id="bounds-scroller"> - <div id="bounds"></div> -</div> - -<div id="target"></div> - -<script> -promise_test(async () => { - await waitUntilNextAnimationFrame(); - assert_fallback_position(target, anchor, 'top'); -}, 'Target is above anchor at initial scroll position'); - -promise_test(async () => { - const anchorScroller = document.getElementById('anchor-scroller'); - anchorScroller.scrollTop = 100; - await waitUntilNextAnimationFrame(); - assert_fallback_position(target, anchor, 'bottom'); -}, 'Target falls back to below anchor after anchor is scrolled upwards'); - -promise_test(async () => { - const boundsScroller = document.getElementById('bounds-scroller'); - boundsScroller.scrollTop = 100; - await waitUntilNextAnimationFrame(); - assert_fallback_position(target, anchor, 'top'); -}, 'Target returns to above anchor after bounds are scrolled upwards'); -</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-005.html b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-005.html deleted file mode 100644 index 9a054c9e8..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-005.html +++ /dev/null
@@ -1,76 +0,0 @@ -<!DOCTYPE html> -<title>Tests relayout after 'position-fallback-bounds' change</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9868"> -<link rel="author" href="mailto:xiaochengh@chromium.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/css-anchor-position/support/test-common.js"></script> - -<style> -.bounds { - position: absolute; - left: 100px; - width: 200px; - height: 200px; - background: gray; - opacity: 0.1; -} - -#bounds1 { - top: 0; - anchor-name: --bounds1; -} - -#bounds2 { - top: 300px; - anchor-name: --bounds2; -} - -#anchor { - position: absolute; - width: 100px; - height: 100px; - background: orange; - left: 150px; - top: 200px; - anchor-name: --a; -} - -#target { - position: fixed; - width: 100px; - height: 100px; - background: lime; - left: anchor(left); - bottom: anchor(top); - position-anchor: --a; - position-try-options: --bottom; - position-fallback-bounds: --bounds1; -} - -@position-try --bottom { - bottom: auto; - top: anchor(bottom); -} -</style> - -<div class="bounds" id="bounds1"></div> -<div class="bounds" id="bounds2"></div> -<div id="anchor"></div> -<div id="target"></div> - -<script> -test(() => { - assert_fallback_position(target, anchor, 'top'); -}, 'Initial layout'); - -test(() => { - target.style = 'position-fallback-bounds: --bounds2'; - assert_fallback_position(target, anchor, 'bottom'); -}, 'Layout is updated after position-fallback-bounds property changes'); - -test(() => { - bounds2.style = 'top: 0; height: 500px'; - assert_fallback_position(target, anchor, 'top'); -}, 'Layout is updated after additional fallback-bounds rect changes'); -</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-006.html b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-006.html deleted file mode 100644 index 8ef3dc9..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-006.html +++ /dev/null
@@ -1,65 +0,0 @@ -<!DOCTYPE html> -<title>Tests 'position-fallback-bounds' should work without default anchor</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9868"> -<link rel="author" href="mailto:xiaochengh@chromium.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/css-anchor-position/support/test-common.js"></script> - -<style> -body { - margin: 0; -} - -#bounds { - position: absolute; - left: 0; - right: 0; - top: 100px; - height: calc(100vh + 200px); - background: lightgray; - anchor-name: --bounds; -} - -#anchor { - position: fixed; - width: 100px; - height: 100px; - left: 0; - top: 100px; - background: orange; - anchor-name: --a; -} - -#target { - position: fixed; - width: 100px; - height: 100px; - background: lime; - position-try-options: --bottom; - position-fallback-bounds: --bounds; - bottom: anchor(--a top); -} - -@position-try --bottom { - top: anchor(--a bottom); - bottom: auto; -} -</style> - -<div id=bounds></div> -<div id=anchor></div> -<div id=target></div> - -<script> -promise_test(async () => { - await waitUntilNextAnimationFrame(); - assert_fallback_position(target, anchor, 'bottom'); -}, "Target is below anchor at initial scroll position"); - -promise_test(async () => { - document.documentElement.scrollTop = 100; - await waitUntilNextAnimationFrame(); - assert_fallback_position(target, anchor, 'top'); -}, "Target moves to above anchor after the additional fallback-bounds rect is scrolled upwards"); -</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-basics.html b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-basics.html deleted file mode 100644 index 026ee4d..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-basics.html +++ /dev/null
@@ -1,40 +0,0 @@ -<!DOCTYPE html> -<title>Tests basics of the 'position-fallback' property</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9868"> -<link rel="author" href="mailto:xiaochengh@chromium.org"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/support/parsing-testcommon.js"></script> -<script src="/css/support/computed-testcommon.js"></script> -<script src="/css/support/inheritance-testcommon.js"></script> -<script src="/css/support/interpolation-testcommon.js"></script> - -<div id="container"> - <div id="target"></div> -</div> - -<script> -// position-fallback-bounds: normal | <dashed-ident> -test_valid_value('position-fallback-bounds', 'normal'); -test_valid_value('position-fallback-bounds', '--foo'); -test_invalid_value('position-fallback-bounds', 'foo-bar'); -test_invalid_value('position-fallback-bounds', '--foo --bar') -test_invalid_value('position-fallback-bounds', '--foo, --bar') -test_invalid_value('position-fallback-bounds', '100px'); -test_invalid_value('position-fallback-bounds', '100%'); - -// Computed value: as specified -test_computed_value('position-fallback-bounds', 'normal'); -test_computed_value('position-fallback-bounds', '--foo'); - -// Initial: normal -// Inherited: no -assert_not_inherited('position-fallback-bounds', 'normal', '--foo'); - -// Animation type: discrete -test_no_interpolation({ - property: 'position-fallback-bounds', - from: '--foo', - to: 'normal', -}); -</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-expected.txt b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-expected.txt deleted file mode 100644 index 6ccad29..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -This is a testharness.js-based test. -[FAIL] position-fallback-bounds is not supported - assert_false: expected false got true -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds.html b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds.html deleted file mode 100644 index f714cf0..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-bounds.html +++ /dev/null
@@ -1,18 +0,0 @@ -<!DOCTYPE html> -<title>CSS Anchor Positioning: position-fallback-bounds support</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9868"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - // This property was part of the CSS Anchor Positioning spec, - // but was removed at some point. We do however plan to offer - // something similar in the future [1], and so we're holding - // on to the implementation for how. - // - // The property must not be web-exposed, however. - // - // [1] https://github.com/w3c/csswg-drafts/issues/9868 - test(() => { - assert_false(CSS.supports('position-fallback-bounds', 'initial')); - }, 'position-fallback-bounds is not supported'); -</script>
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-interpolation.html b/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-interpolation.html deleted file mode 100644 index 4ac0b32..0000000 --- a/third_party/blink/web_tests/wpt_internal/css/css-anchor-position/position-fallback-interpolation.html +++ /dev/null
@@ -1,20 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>CSS Anchor Positioning Test: Interpolation of position-fallback-bounds</title> -<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/9868"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/support/interpolation-testcommon.js"></script> -<body> -<script> - test_no_interpolation({ - property: 'position-fallback-bounds', - from: 'normal', - to: '--foo', - }); - test_no_interpolation({ - property: 'position-fallback-bounds', - from: '--foo', - to: '--bar', - }); -</script>
diff --git a/third_party/chromium-variations b/third_party/chromium-variations index 47c10caa..1b58345 160000 --- a/third_party/chromium-variations +++ b/third_party/chromium-variations
@@ -1 +1 @@ -Subproject commit 47c10caafe8f3d47ecdb1ed24e287da7a7e6925f +Subproject commit 1b58345810cd9c9a284efbe6312e1fa7305acd71
diff --git a/third_party/dawn b/third_party/dawn index b5d8926..52f760b 160000 --- a/third_party/dawn +++ b/third_party/dawn
@@ -1 +1 @@ -Subproject commit b5d89266d090eb586b756294ea09e4beb0c06bcb +Subproject commit 52f760b3669485c4b8517559f666efd1e3e3defe
diff --git a/third_party/devtools-frontend-internal b/third_party/devtools-frontend-internal index 1202967..dd85fd08 160000 --- a/third_party/devtools-frontend-internal +++ b/third_party/devtools-frontend-internal
@@ -1 +1 @@ -Subproject commit 120296784c3ee38e176618378479e2d63ab4deaf +Subproject commit dd85fd08b6f8a3bdcb460e33d09ed333c7031f0c
diff --git a/third_party/devtools-frontend/src b/third_party/devtools-frontend/src index 4e11c88..992d7c0 160000 --- a/third_party/devtools-frontend/src +++ b/third_party/devtools-frontend/src
@@ -1 +1 @@ -Subproject commit 4e11c8801f7a4e8e9f7b94f6acd4155cbe0a5e57 +Subproject commit 992d7c0261d554c330dff6900d859cf0faae604c
diff --git a/third_party/perfetto b/third_party/perfetto index 3f2b2b6..4a7dde6 160000 --- a/third_party/perfetto +++ b/third_party/perfetto
@@ -1 +1 @@ -Subproject commit 3f2b2b6385d24f80239a7c49d464a06292fbd078 +Subproject commit 4a7dde609d9ddb8d5212ab4c83a86aba10f7ac4c
diff --git a/third_party/skia b/third_party/skia index 50ac111..429ec245 160000 --- a/third_party/skia +++ b/third_party/skia
@@ -1 +1 @@ -Subproject commit 50ac1117f1597d57faf9ae5360ad95029c515f97 +Subproject commit 429ec245f4e27938291b8ef02ec680d527cede72
diff --git a/third_party/vulkan-deps b/third_party/vulkan-deps index ea0fb51..8dc5cb5 160000 --- a/third_party/vulkan-deps +++ b/third_party/vulkan-deps
@@ -1 +1 @@ -Subproject commit ea0fb515f594700d7fc4cbfff49268f596de4984 +Subproject commit 8dc5cb57074c42295aa647ea407e1adb85f6ec93
diff --git a/third_party/webrtc b/third_party/webrtc index d86c0cd..501c4f3 160000 --- a/third_party/webrtc +++ b/third_party/webrtc
@@ -1 +1 @@ -Subproject commit d86c0cdbde7261deefc5771f41a14186bac9fd09 +Subproject commit 501c4f37bfee47b26999ee291c5355ad64554df7
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index b74c715..c169334 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml
@@ -24502,6 +24502,54 @@ </description> </action> +<action name="MobileTabGroupUserCanceledGroupEdition"> + <owner>alionadangla@chromium.org</owner> + <owner>chromeleon@google.com</owner> + <description> + User in the iOS tab group edition view, canceled the group edition. + </description> +</action> + +<action name="MobileTabGroupUserCanceledNewGroupCreation"> + <owner>alionadangla@chromium.org</owner> + <owner>chromeleon@google.com</owner> + <description> + User in the iOS tab group edition view, canceled the group creation. + </description> +</action> + +<action name="MobileTabGroupUserCreatedNewGroup"> + <owner>alionadangla@chromium.org</owner> + <owner>chromeleon@google.com</owner> + <description> + User in the iOS tab group edition view, confirmed the group creation. + </description> +</action> + +<action name="MobileTabGroupUserUpdatedGroup"> + <owner>alionadangla@chromium.org</owner> + <owner>chromeleon@google.com</owner> + <description> + User in the iOS tab group edition view, updated the group. + </description> +</action> + +<action name="MobileTabGroupUserUpdatedGroupColor"> + <owner>alionadangla@chromium.org</owner> + <owner>chromeleon@google.com</owner> + <description> + User in the iOS tab group edition view, updated the color of the group. + </description> +</action> + +<action name="MobileTabGroupUserUpdatedGroupName"> + <owner>alionadangla@chromium.org</owner> + <owner>chromeleon@google.com</owner> + <description> + User in the iOS tab group edition view, updated the name of the group. + </description> +</action> + <action name="MobileTabIncognitoGridTabGroupOpenTab"> <owner>gambard@chromium.org</owner> <owner>chromeleon@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/dev/enums.xml b/tools/metrics/histograms/metadata/dev/enums.xml index 38e7d9c..d0c0350 100644 --- a/tools/metrics/histograms/metadata/dev/enums.xml +++ b/tools/metrics/histograms/metadata/dev/enums.xml
@@ -1478,7 +1478,7 @@ <enum name="DevToolsPanel"> <int value="1" label="Elements"/> - <int value="2" label="Resources"/> + <int value="2" label="Application"/> <int value="3" label="Network"/> <int value="4" label="Sources"/> <int value="5" label="Performance"/> @@ -1549,8 +1549,8 @@ <enum name="DevToolsPanelWithLocation"> <int value="1" label="Elements - Main"/> <int value="2" label="Elements - Drawer"/> - <int value="3" label="Resources - Main"/> - <int value="4" label="Resources - Drawer"/> + <int value="3" label="Application - Main"/> + <int value="4" label="Application - Drawer"/> <int value="5" label="Network - Main"/> <int value="6" label="Network - Drawer"/> <int value="7" label="Sources - Main"/>
diff --git a/tools/metrics/histograms/metadata/security/histograms.xml b/tools/metrics/histograms/metadata/security/histograms.xml index e68a29e..c4911289 100644 --- a/tools/metrics/histograms/metadata/security/histograms.xml +++ b/tools/metrics/histograms/metadata/security/histograms.xml
@@ -140,7 +140,7 @@ </histogram> <histogram name="Security.GwpAsan.Activated.{Allocator}.{Process}" - units="allocations" expires_after="2025-01-31"> + enum="Boolean" expires_after="2025-01-31"> <owner>mpdenton@chromium.org</owner> <owner>kdlee@chromium.org</owner> <owner>memory-safety-dev@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 6e176e29..7b6e005ee 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -5,8 +5,8 @@ "full_remote_path": "perfetto-luci-artifacts/v44.0/linux-arm64/trace_processor_shell" }, "win": { - "hash": "b14b8bb20644ed79958bed962481c7ef43430db6", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/6191dd39ee994efe60df79204ebd311f32470a52/trace_processor_shell.exe" + "hash": "6a2bbb73d020b83fc7b916f5645f171328348087", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/3f2b2b6385d24f80239a7c49d464a06292fbd078/trace_processor_shell.exe" }, "linux_arm": { "hash": "d8e27d961be1db97db098c6826017aec0397ecfd", @@ -21,8 +21,8 @@ "full_remote_path": "perfetto-luci-artifacts/v44.0/mac-arm64/trace_processor_shell" }, "linux": { - "hash": "250c949ae64d5b57131f7536618ae8f39812840e", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/6191dd39ee994efe60df79204ebd311f32470a52/trace_processor_shell" + "hash": "7abcc09a7480be0d3feaa798d27a00ce7aff2770", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/4a7dde609d9ddb8d5212ab4c83a86aba10f7ac4c/trace_processor_shell" } }, "power_profile.sql": {