Skip to content

Commit

Permalink
Backed out changeset 2b54764bcf29 (bug 1860417) for causing mochitest…
Browse files Browse the repository at this point in the history
… failures on test_setSinkId_after_loop.html. CLOSED TREE
  • Loading branch information
pstanciu committed Mar 5, 2024
1 parent 2a0bfb5 commit 372b584
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ 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)",
};

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)",
};

Expand Down Expand Up @@ -103,22 +103,22 @@ 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}`,
};

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ 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)",
};

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)",
};

Expand Down Expand Up @@ -118,22 +118,22 @@ 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}`,
};

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;
Expand Down
4 changes: 2 additions & 2 deletions mobile/android/geckoview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion netwerk/protocol/http/nsHttpHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions toolkit/components/resistfingerprinting/nsRFPService.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 372b584

Please sign in to comment.