Skip to content

Conversation

@CrisBarreiro
Copy link
Contributor

@CrisBarreiro CrisBarreiro commented Nov 3, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1211755269770778?focus=true

Description

Steps to test this PR

Feature 1

  • Apply patch
  • Fresh install
  • Filter logs by "Cris"
  • Load http://privacy-test-pages.site/security/badware/malware-download.html and refresh page
  • Check logs for
    • Blob downloads listener received WebViewCompat message: webViewCompat Ping:http://privacy-test-pages.site/security/badware/malware-download.html 10ms. Validates jsSendsInitialPing and jsInitialPingDelay
    • delaying response by 10 ms. Validates initialPingDelay
    • Posting response Pong from Native. Validates replyToInitialPing
    • Sending message PageStarted using reply proxy. Validates sendMessageOnPageStarted and sendMessagesUsingReplyProxy
    • Blob downloads listener received WebViewCompat message: webViewCompat PageStarted from ddgBlobDownloadObj. Validates useBlobDownloadsMessageListener and jsRepliesToNativeMessages
  • Open context menu
  • Check logs for
    • Sending message ContextMenuOpened using reply proxy. Validates sendMessageOnContextMenuOpen
    • Blob downloads listener received WebViewCompat message: webViewCompat ContextMenuOpened from ddgBlobDownloadObj. Validates useBlobDownloadsMessageListener and jsRepliesToNativeMessages
  • Test blob downloads still work

Feature 2

  • Apply patch
  • Fresh install
  • Filter logs by "Cris"
  • Load http://privacy-test-pages.site/security/badware/malware-download.html and refresh page
  • Check logs for
    • webViewCompat message received: webViewCompat Ping:http://privacy-test-pages.site/security/badware/malware-download.html 10ms. Validates initialPingDelay 10ms, jsSendsInitialPing enabled, and useBlobDownloadsMessageListener disabled
    • No log for delaying response by 10 ms nor Posting response Pong from Native. Validates replyToInitialPing disabled
    • No log for Sending message PageStarted.... Validates sendMessageOnPageStarted disabled
  • Open context menu
  • Check no logs for Sending message ContextMenuOpened.... Validates sendMessageOnContextMenuOpen disabled

Feature 3

  • Apply patch
  • Fresh install
  • Filter logs by "Cris"
  • Load http://privacy-test-pages.site/security/badware/malware-download.html and refresh page
  • Check logs for
    • webViewCompat message received: webViewCompat Ping:http://privacy-test-pages.site/security/badware/malware-download.html 10ms. Validates initialPingDelay 10ms, jsSendsInitialPing enabled, and useBlobDownloadsMessageListener disabled
    • No log for delaying response by 10 ms nor Posting response Pong from Native. Validates replyToInitialPing disabled
    • No log for Sending message PageStarted.... Validates sendMessageOnPageStarted disabled
  • Open context menu
  • Check logs for Sending message ContextMenuOpened not using reply proxy. Validates sendMessageOnContextMenuOpen enabled and sendMessagesUsingReplyProxy disabled

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

Copy link
Contributor Author

CrisBarreiro commented Nov 3, 2025

@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/add-native-flags branch from 333213a to 32a2851 Compare November 3, 2025 11:29
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/configure-js-script-based-on-rc-config branch 2 times, most recently from 9acf98b to 430faa1 Compare November 3, 2025 16:11
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/add-native-flags branch from 32a2851 to 0cc84c6 Compare November 3, 2025 16:11
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/configure-js-script-based-on-rc-config branch from 430faa1 to 4ac0fa6 Compare November 3, 2025 16:15
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/add-native-flags branch 2 times, most recently from 076c964 to a06b305 Compare November 3, 2025 16:41
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/configure-js-script-based-on-rc-config branch 2 times, most recently from 2c94455 to 25ece01 Compare November 4, 2025 09:15
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/add-native-flags branch 2 times, most recently from b7f188f to c65ab5b Compare November 4, 2025 09:35
@CDRussell CDRussell self-assigned this Nov 4, 2025
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/add-native-flags branch 2 times, most recently from 570a808 to c3e7a5f Compare November 4, 2025 10:41
@CrisBarreiro CrisBarreiro changed the base branch from feature/cris/derisk-webviewcompat/configure-js-script-based-on-rc-config to graphite-base/7047 November 4, 2025 11:11
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/add-native-flags branch from c3e7a5f to 9ddaa8e Compare November 4, 2025 11:37
@graphite-app graphite-app bot changed the base branch from graphite-base/7047 to develop November 4, 2025 11:38
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/add-native-flags branch 2 times, most recently from bd226fc to 7d2013c Compare November 4, 2025 13:58
@CrisBarreiro CrisBarreiro marked this pull request as ready for review November 4, 2025 16:50
@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/add-native-flags branch from 47b6f76 to 54c44e3 Compare November 5, 2025 12:06
Comment on lines 1264 to 1272
lifecycleScope.launch {
webViewCompatTestHelper.onBrowserMenuButtonPressed(webView)
}
}

private fun onPageStarted() {
lifecycleScope.launch(dispatchers.main()) {
webViewCompatTestHelper.onPageStarted(webView)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: why specify dispatcher in one of these but not the other?we just let the dispatcher be handled internally and the caller doesn't have to care, IMO

}
}

private fun blobDownloadScriptForWebViewCompatTest(): String {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this to the webViewCompatTestHelper ?

@CrisBarreiro CrisBarreiro force-pushed the feature/cris/derisk-webviewcompat/add-native-flags branch from 54c44e3 to 71e27f7 Compare November 5, 2025 16:57
@CrisBarreiro CrisBarreiro merged commit 52448d0 into develop Nov 5, 2025
7 checks passed
@CrisBarreiro CrisBarreiro deleted the feature/cris/derisk-webviewcompat/add-native-flags branch November 5, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants