From 372b584cc54489aab80c8b8809f3230b30a02cb0 Mon Sep 17 00:00:00 2001 From: pstanciu Date: Tue, 5 Mar 2024 05:13:56 +0200 Subject: [PATCH] Backed out changeset 2b54764bcf29 (bug 1860417) for causing mochitest failures on test_setSinkId_after_loop.html. CLOSED TREE --- .../test/browser/browser_navigator.js | 10 +++++----- .../test/browser/browser_navigator_iframes.js | 10 +++++----- mobile/android/geckoview/build.gradle | 4 ++-- netwerk/protocol/http/nsHttpHandler.cpp | 2 +- toolkit/components/resistfingerprinting/nsRFPService.h | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/browser/components/resistfingerprinting/test/browser/browser_navigator.js b/browser/components/resistfingerprinting/test/browser/browser_navigator.js index 04134d3e803b3..fb2c539194d0b 100644 --- a/browser/components/resistfingerprinting/test/browser/browser_navigator.js +++ b/browser/components/resistfingerprinting/test/browser/browser_navigator.js @@ -20,7 +20,7 @@ const DEFAULT_APPVERSION = { linux: "5.0 (X11)", win: "5.0 (Windows)", macosx: "5.0 (Macintosh)", - android: `5.0 (Linux; Android ${osVersion})`, + android: `5.0 (Android ${osVersion})`, other: "5.0 (X11)", }; @@ -28,7 +28,7 @@ const SPOOFED_APPVERSION = { linux: "5.0 (X11)", win: "5.0 (Windows)", macosx: "5.0 (Macintosh)", - android: "5.0 (Linux; Android 10)", + android: "5.0 (Android 10)", other: "5.0 (X11)", }; @@ -103,7 +103,7 @@ const SPOOFED_OSCPU = { const DEFAULT_UA_OS = { linux: `X11; Linux ${defaultLinuxCpu}`, macosx: "Macintosh; Intel Mac OS X 10.15", - android: `Linux; Android ${osVersion}; Mobile`, + android: `Android ${osVersion}; Mobile`, other: `X11; Linux ${defaultLinuxCpu}`, }; @@ -111,14 +111,14 @@ const SPOOFED_UA_NAVIGATOR_OS = { linux: "X11; Linux x86_64", win: "Windows NT 10.0; Win64; x64", macosx: "Macintosh; Intel Mac OS X 10.15", - android: "Linux; Android 10; Mobile", + android: "Android 10; Mobile", other: "X11; Linux x86_64", }; const SPOOFED_UA_HTTPHEADER_OS = { linux: "Windows NT 10.0", win: "Windows NT 10.0", macosx: "Windows NT 10.0", - android: "Linux; Android 10; Mobile", + android: "Android 10; Mobile", other: "Windows NT 10.0", }; const SPOOFED_HW_CONCURRENCY = 2; diff --git a/browser/components/resistfingerprinting/test/browser/browser_navigator_iframes.js b/browser/components/resistfingerprinting/test/browser/browser_navigator_iframes.js index 26989d1748697..609050c988016 100644 --- a/browser/components/resistfingerprinting/test/browser/browser_navigator_iframes.js +++ b/browser/components/resistfingerprinting/test/browser/browser_navigator_iframes.js @@ -35,7 +35,7 @@ const DEFAULT_APPVERSION = { linux: "5.0 (X11)", win: "5.0 (Windows)", macosx: "5.0 (Macintosh)", - android: `5.0 (Linux; Android ${osVersion})`, + android: `5.0 (Android ${osVersion})`, other: "5.0 (X11)", }; @@ -43,7 +43,7 @@ const SPOOFED_APPVERSION = { linux: "5.0 (X11)", win: "5.0 (Windows)", macosx: "5.0 (Macintosh)", - android: "5.0 (Linux; Android 10)", + android: "5.0 (Android 10)", other: "5.0 (X11)", }; @@ -118,7 +118,7 @@ const SPOOFED_OSCPU = { const DEFAULT_UA_OS = { linux: `X11; Linux ${defaultLinuxCpu}`, macosx: "Macintosh; Intel Mac OS X 10.15", - android: `Linux; Android ${osVersion}; Mobile`, + android: `Android ${osVersion}; Mobile`, other: `X11; Linux ${defaultLinuxCpu}`, }; @@ -126,14 +126,14 @@ const SPOOFED_UA_NAVIGATOR_OS = { linux: "X11; Linux x86_64", win: "Windows NT 10.0; Win64; x64", macosx: "Macintosh; Intel Mac OS X 10.15", - android: "Linux; Android 10; Mobile", + android: "Android 10; Mobile", other: "X11; Linux x86_64", }; const SPOOFED_UA_HTTPHEADER_OS = { linux: "Windows NT 10.0", win: "Windows NT 10.0", macosx: "Windows NT 10.0", - android: "Linux; Android 10; Mobile", + android: "Android 10; Mobile", other: "Windows NT 10.0", }; const SPOOFED_HW_CONCURRENCY = 2; diff --git a/mobile/android/geckoview/build.gradle b/mobile/android/geckoview/build.gradle index 441330d94e5b7..6e5826655d81b 100644 --- a/mobile/android/geckoview/build.gradle +++ b/mobile/android/geckoview/build.gradle @@ -52,8 +52,8 @@ android { buildConfigField 'String', "OMNIJAR_NAME", "\"${mozconfig.substs.OMNIJAR_NAME}\""; // Keep in sync with actual user agent in nsHttpHandler::BuildUserAgent - buildConfigField 'String', "USER_AGENT_GECKOVIEW_MOBILE", "\"Mozilla/5.0 (Linux; Android \" + android.os.Build.VERSION.RELEASE + \"; Mobile; rv:\" + ${mozconfig.defines.MOZILLA_UAVERSION} + \") Gecko/\" + ${mozconfig.defines.MOZILLA_UAVERSION} + \" Firefox/\" + ${mozconfig.defines.MOZILLA_UAVERSION}"; - buildConfigField 'String', "USER_AGENT_GECKOVIEW_TABLET", "\"Mozilla/5.0 (Linux; Android \" + android.os.Build.VERSION.RELEASE + \"; Tablet; rv:\" + ${mozconfig.defines.MOZILLA_UAVERSION} + \") Gecko/\" + ${mozconfig.defines.MOZILLA_UAVERSION} + \" Firefox/\" + ${mozconfig.defines.MOZILLA_UAVERSION}"; + buildConfigField 'String', "USER_AGENT_GECKOVIEW_MOBILE", "\"Mozilla/5.0 (Android \" + android.os.Build.VERSION.RELEASE + \"; Mobile; rv:\" + ${mozconfig.defines.MOZILLA_UAVERSION} + \") Gecko/\" + ${mozconfig.defines.MOZILLA_UAVERSION} + \" Firefox/\" + ${mozconfig.defines.MOZILLA_UAVERSION}"; + buildConfigField 'String', "USER_AGENT_GECKOVIEW_TABLET", "\"Mozilla/5.0 (Android \" + android.os.Build.VERSION.RELEASE + \"; Tablet; rv:\" + ${mozconfig.defines.MOZILLA_UAVERSION} + \") Gecko/\" + ${mozconfig.defines.MOZILLA_UAVERSION} + \" Firefox/\" + ${mozconfig.defines.MOZILLA_UAVERSION}"; buildConfigField 'int', 'MIN_SDK_VERSION', mozconfig.substs.MOZ_ANDROID_MIN_SDK_VERSION; diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index b8c505f749ec7..dcc53079840d2 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -825,7 +825,7 @@ void nsHttpHandler::InitUserAgentComponents() { // Gather platform. mPlatform.AssignLiteral( #if defined(ANDROID) - "Linux; Android" + "Android" #elif defined(XP_WIN) "Windows" #elif defined(XP_MACOSX) diff --git a/toolkit/components/resistfingerprinting/nsRFPService.h b/toolkit/components/resistfingerprinting/nsRFPService.h index d45580da89991..9e0ae9b6af6b8 100644 --- a/toolkit/components/resistfingerprinting/nsRFPService.h +++ b/toolkit/components/resistfingerprinting/nsRFPService.h @@ -40,8 +40,8 @@ # define SPOOFED_OSCPU "Intel Mac OS X 10.15" # define SPOOFED_PLATFORM "MacIntel" #elif defined(MOZ_WIDGET_ANDROID) -# define SPOOFED_UA_OS "Linux; Android 10; Mobile" -# define SPOOFED_APPVERSION "5.0 (Linux; Android 10)" +# define SPOOFED_UA_OS "Android 10; Mobile" +# define SPOOFED_APPVERSION "5.0 (Android 10)" # define SPOOFED_OSCPU "Linux armv81" # define SPOOFED_PLATFORM "Linux armv81" #else @@ -61,7 +61,7 @@ // For the HTTP User-Agent header, we use a simpler set of spoofed values // that do not reveal the specific desktop platform. #if defined(MOZ_WIDGET_ANDROID) -# define SPOOFED_HTTP_UA_OS "Linux; Android 10; Mobile" +# define SPOOFED_HTTP_UA_OS "Android 10; Mobile" #else # define SPOOFED_HTTP_UA_OS "Windows NT 10.0" #endif