diff --git a/extensions/amp-viewer-integration/0.1/highlight-handler.js b/extensions/amp-viewer-integration/0.1/highlight-handler.js index 996492c5015e..51d7fed338a7 100644 --- a/extensions/amp-viewer-integration/0.1/highlight-handler.js +++ b/extensions/amp-viewer-integration/0.1/highlight-handler.js @@ -203,9 +203,11 @@ export class HighlightHandler { for (let i = 0; i < this.highlightedNodes_.length; i++) { const n = this.highlightedNodes_[i]; + // The background color is same as Android Chrome text finding. + // https://cs.chromium.org/chromium/src/chrome/android/java/res/values/colors.xml?l=158&rcl=8b461e376e824c72fec1d6d91cd6633ba344dd55&q=ff9632 setStyles(n, { - backgroundColor: '#fc9741', - color: '#333', + backgroundColor: '#ff9632', + color: '#000', }); } diff --git a/extensions/amp-viewer-integration/0.1/test/test-highlight-handler.js b/extensions/amp-viewer-integration/0.1/test/test-highlight-handler.js index 29305a0fc8af..1de96413588a 100644 --- a/extensions/amp-viewer-integration/0.1/test/test-highlight-handler.js +++ b/extensions/amp-viewer-integration/0.1/test/test-highlight-handler.js @@ -142,10 +142,10 @@ describes.realWin('HighlightHandler', { {state: 'auto_scroll'}); expect(root.innerHTML).to.equal( - '
text in amp doc
' + - 'highlighted text
'); + '
text in amp doc
' + + 'highlighted text
'); const viewerOrigin = 'http://localhost:9876'; const port = new WindowPortEmulator(