Skip to content

Commit

Permalink
Bug 1565951 - Request a longer timeout on a WebGL test for MinGW buil…
Browse files Browse the repository at this point in the history
…ds r=jgilbert a=jcristau

Differential Revision: https://phabricator.services.mozilla.com/D38029

--HG--
extra : rebase_source : 4200d524d8822fac856ef6b5a20181b962e38bae
extra : source : fd659923c3fc996773813deb08b0455d33d1b9b6
  • Loading branch information
tomrittervg committed Jul 16, 2019
1 parent ad68d99 commit 7d6beab
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dom/canvas/test/webgl-conf/mochi-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@
parent.SimpleTest.requestFlakyTimeout('untriaged');

try {
let timeoutLengthMultiplier;
if (navigator.appVersion.includes('Android')) {
// From layout/tools/reftest/reftest.js:
var version = SpecialPowers.Services.sysinfo.getProperty('version');
var kAndroidVersion2_3 = 9;
if (version == kAndroidVersion2_3) {
var timeoutLengthMultiplier = 2.0;
parent.SimpleTest.requestLongerTimeout(timeoutLengthMultiplier);
timeoutLengthMultiplier = 2.0;
}
} else if (SpecialPowers.Services.sysinfo.getProperty('isMinGW')) {
timeoutLengthMultiplier = 2.0;
}
if (timeoutLengthMultiplier) {
parent.SimpleTest.requestLongerTimeout(timeoutLengthMultiplier);
}
} catch (e) {
console.log('Warning: No SpecialPowers.');
Expand Down
11 changes: 11 additions & 0 deletions xpcom/base/nsSystemInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,17 @@ nsresult nsSystemInfo::Init() {
}

#ifdef XP_WIN
bool isMinGW =
# ifdef __MINGW32__
true;
# else
false;
# endif
rv = SetPropertyAsBool(NS_LITERAL_STRING("isMinGW"), !!isMinGW);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}

// IsWow64Process2 is only available on Windows 10+, so we have to dynamically
// check for its existence.
typedef BOOL(WINAPI * LPFN_IWP2)(HANDLE, USHORT*, USHORT*);
Expand Down

0 comments on commit 7d6beab

Please sign in to comment.