Merge inbound to mozilla-central. a=merge

This commit is contained in:
Cosmin Sabou 2018-02-09 02:29:56 +02:00
Родитель 63313b65f6 56484d9fda
Коммит 2400be0754
80 изменённых файлов: 953 добавлений и 613 удалений

Просмотреть файл

@ -1246,6 +1246,12 @@ var gBrowserInit = {
gBrowser.updateBrowserRemoteness(initBrowser, isRemote, {
remoteType, sameProcessAsFrameLoader
});
gUIDensity.init();
if (AppConstants.CAN_DRAW_IN_TITLEBAR) {
gDragSpaceObserver.init();
}
},
onLoad() {
@ -1300,12 +1306,6 @@ var gBrowserInit = {
// have been initialized.
Services.obs.notifyObservers(window, "browser-window-before-show");
gUIDensity.init();
if (AppConstants.CAN_DRAW_IN_TITLEBAR) {
gDragSpaceObserver.init();
}
if (!window.toolbar.visible) {
// adjust browser UI for popups
gURLBar.setAttribute("readonly", "true");
@ -1767,6 +1767,14 @@ var gBrowserInit = {
},
onUnload() {
gUIDensity.uninit();
if (AppConstants.CAN_DRAW_IN_TITLEBAR) {
gDragSpaceObserver.uninit();
}
TabsInTitlebar.uninit();
// In certain scenarios it's possible for unload to be fired before onload,
// (e.g. if the window is being closed after browser.js loads but before the
// load completes). In that case, there's nothing to do here.
@ -1790,12 +1798,6 @@ var gBrowserInit = {
Services.obs.removeObserver(gPluginHandler.NPAPIPluginCrashed, "plugin-crashed");
gUIDensity.uninit();
if (AppConstants.CAN_DRAW_IN_TITLEBAR) {
gDragSpaceObserver.uninit();
}
try {
gBrowser.removeProgressListener(window.XULBrowserWindow);
gBrowser.removeTabsProgressListener(window.TabsProgressListener);
@ -1806,8 +1808,6 @@ var gBrowserInit = {
BookmarkingUI.uninit();
TabsInTitlebar.uninit();
ToolbarIconColor.uninit();
TabletModeUpdater.uninit();

Просмотреть файл

@ -6427,7 +6427,7 @@
tab.setAttribute("onerror", "this.removeAttribute('image');");
window.addEventListener("resize", this);
window.addEventListener("load", this);
window.addEventListener("DOMContentLoaded", this);
Services.prefs.addObserver("privacy.userContext", this);
this.observe(null, "nsPref:changed", "privacy.userContext.enabled");
@ -7016,7 +7016,7 @@
<parameter name="aEvent"/>
<body><![CDATA[
switch (aEvent.type) {
case "load":
case "DOMContentLoaded":
this.updateVisibility();
TabsInTitlebar.init();
break;

Просмотреть файл

@ -13,15 +13,9 @@
* for tips on how to do that.
*/
const EXPECTED_REFLOWS = [
{
stack: [
"onOverflow@resource:///modules/CustomizableUI.jsm",
"init@resource:///modules/CustomizableUI.jsm",
"observe@resource:///modules/CustomizableUI.jsm",
"_delayedStartup@chrome://browser/content/browser.js",
],
times: 2, // This number should only ever go down - never up.
},
/**
* Nothing here! Please don't add anything new!
*/
];
if (Services.appinfo.OS == "WINNT") {
@ -53,7 +47,8 @@ if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
"init@chrome://browser/content/browser-tabsintitlebar.js",
"handleEvent@chrome://browser/content/tabbrowser.xml",
],
times: 4, // This number should only ever go down - never up.
// These numbers should only ever go down - never up.
times: Services.appinfo.OS == "WINNT" ? 5 : 4,
},
);
}

Просмотреть файл

@ -50,6 +50,11 @@
<method name="handleEvent">
<parameter name="aEvent"/>
<body><![CDATA[
// Ignore overflow/underflow events from from nodes inside the toolbar.
if (aEvent.target != this.customizationTarget) {
return;
}
if (aEvent.type == "overflow" && aEvent.detail > 0) {
if (this.overflowable && this.overflowable.initialized) {
this.overflowable.onOverflow(aEvent);

Просмотреть файл

@ -124,6 +124,7 @@ toolbar .toolbarbutton-1 > .toolbarbutton-badge-stack {
toolbar .toolbarbutton-1 > .toolbarbutton-icon {
/* horizontal padding + actual icon width */
width: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
height: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
}
.bookmark-item > .toolbarbutton-menu-dropmarker,
@ -233,6 +234,7 @@ toolbar .toolbarbutton-1[checked]:not(:active):hover > .toolbarbutton-icon {
border: 1px solid var(--backbutton-border-color);
border-radius: 10000px;
width: 34px;
height: 34px;
padding: 8px;
transition-property: box-shadow;
transition-duration: var(--toolbarbutton-hover-transition-duration);
@ -246,6 +248,7 @@ toolbar .toolbarbutton-1[checked]:not(:active):hover > .toolbarbutton-icon {
:root[uidensity=touch] #back-button > .toolbarbutton-icon {
width: 38px;
height: 38px;
padding: 10px;
}

Просмотреть файл

@ -405,6 +405,7 @@
pointer-events: none;
margin-inline-start: 8px;
margin-inline-end: 6px;
width: 16px;
fill-opacity: .4;
}

Просмотреть файл

@ -171,6 +171,7 @@ skip-if = true # Bug 1258809
[browser_net_sort-01.js]
[browser_net_sort-02.js]
[browser_net_statistics-01.js]
skip-if = true # Bug 1373558
[browser_net_statistics-02.js]
[browser_net_status-bar.js]
[browser_net_status-codes.js]

Просмотреть файл

@ -107,6 +107,7 @@ const char* mozilla::dom::ContentPrefs::gEarlyPrefs[] = {
"intl.charset.fallback.utf8_for_file",
"intl.ime.hack.on_ime_unaware_apps.fire_key_events_for_composition",
"javascript.enabled",
"javascript.options.array_prototype_values",
"javascript.options.asmjs",
"javascript.options.asyncstack",
"javascript.options.baselinejit",

Просмотреть файл

@ -191,3 +191,10 @@ PerformanceObserver::Disconnect()
mConnected = false;
}
}
void
PerformanceObserver::TakeRecords(nsTArray<RefPtr<PerformanceEntry>>& aRetval)
{
MOZ_ASSERT(aRetval.IsEmpty());
aRetval.SwapElements(mQueuedEntries);
}

Просмотреть файл

@ -57,6 +57,8 @@ public:
void Disconnect();
void TakeRecords(nsTArray<RefPtr<PerformanceEntry>>& aRetval);
void Notify();
void QueueEntry(PerformanceEntry* aEntry);

Просмотреть файл

@ -12,13 +12,15 @@ dictionary PerformanceObserverInit {
boolean buffered = false;
};
callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries, PerformanceObserver observer);
callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries,
PerformanceObserver observer);
[Func="Performance::IsObserverEnabled",
Constructor(PerformanceObserverCallback callback),
Exposed=(Window,Worker)]
interface PerformanceObserver {
[Throws]
void observe(PerformanceObserverInit options);
void disconnect();
[Throws]
void observe(PerformanceObserverInit options);
void disconnect();
PerformanceEntryList takeRecords();
};

Просмотреть файл

@ -305,7 +305,9 @@ LoadContextOptions(const char* aPrefName, void* /* aClosure */)
.setFuzzing(GetWorkerPref<bool>(NS_LITERAL_CSTRING("fuzzing.enabled")))
#endif
.setStreams(GetWorkerPref<bool>(NS_LITERAL_CSTRING("streams")))
.setExtraWarnings(GetWorkerPref<bool>(NS_LITERAL_CSTRING("strict")));
.setExtraWarnings(GetWorkerPref<bool>(NS_LITERAL_CSTRING("strict")))
.setArrayProtoValues(GetWorkerPref<bool>(
NS_LITERAL_CSTRING("array_prototype_values")));
nsCOMPtr<nsIXULRuntime> xr = do_GetService("@mozilla.org/xre/runtime;1");
if (xr) {

Просмотреть файл

@ -1118,6 +1118,7 @@ class JS_PUBLIC_API(ContextOptions) {
, fuzzing_(false)
#endif
, expressionClosures_(false)
, arrayProtoValues_(true)
{
}
@ -1279,6 +1280,12 @@ class JS_PUBLIC_API(ContextOptions) {
return *this;
}
bool arrayProtoValues() const { return arrayProtoValues_; }
ContextOptions& setArrayProtoValues(bool flag) {
arrayProtoValues_ = flag;
return *this;
}
void disableOptionsForSafeMode() {
setBaseline(false);
setIon(false);
@ -1310,6 +1317,7 @@ class JS_PUBLIC_API(ContextOptions) {
bool fuzzing_ : 1;
#endif
bool expressionClosures_ : 1;
bool arrayProtoValues_ : 1;
};

Просмотреть файл

@ -3543,9 +3543,7 @@ static const JSFunctionSpec array_methods[] = {
JS_SELF_HOSTED_SYM_FN(iterator, "ArrayValues", 0,0),
JS_SELF_HOSTED_FN("entries", "ArrayEntries", 0,0),
JS_SELF_HOSTED_FN("keys", "ArrayKeys", 0,0),
#ifdef NIGHTLY_BUILD
JS_SELF_HOSTED_FN("values", "ArrayValues", 0,0),
#endif
/* ES7 additions */
JS_SELF_HOSTED_FN("includes", "ArrayIncludes", 2,0),

Просмотреть файл

@ -2967,6 +2967,11 @@ DefineFunctionFromSpec(JSContext* cx, HandleObject obj, const JSFunctionSpec* fs
if (!PropertySpecNameToId(cx, fs->name, &id))
return false;
if (StandardProtoKeyOrNull(obj) == JSProto_Array && id == NameToId(cx->names().values)) {
if (!cx->options().arrayProtoValues())
return true;
}
JSFunction* fun = NewFunctionFromSpec(cx, fs, id);
if (!fun)
return false;

Просмотреть файл

@ -478,6 +478,7 @@ static bool enableWasmIon = false;
static bool enableTestWasmAwaitTier2 = false;
static bool enableAsyncStacks = false;
static bool enableStreams = false;
static bool enableArrayProtoValues = true;
#ifdef JS_GC_ZEAL
static uint32_t gZealBits = 0;
static uint32_t gZealFrequency = 0;
@ -8495,6 +8496,7 @@ SetContextOptions(JSContext* cx, const OptionParser& op)
enableTestWasmAwaitTier2 = op.getBoolOption("test-wasm-await-tier2");
enableAsyncStacks = !op.getBoolOption("no-async-stacks");
enableStreams = op.getBoolOption("enable-streams");
enableArrayProtoValues = !op.getBoolOption("no-array-proto-values");
JS::ContextOptionsRef(cx).setBaseline(enableBaseline)
.setIon(enableIon)
@ -8505,7 +8507,8 @@ SetContextOptions(JSContext* cx, const OptionParser& op)
.setTestWasmAwaitTier2(enableTestWasmAwaitTier2)
.setNativeRegExp(enableNativeRegExp)
.setAsyncStack(enableAsyncStacks)
.setStreams(enableStreams);
.setStreams(enableStreams)
.setArrayProtoValues(enableArrayProtoValues);
if (op.getBoolOption("no-unboxed-objects"))
jit::JitOptions.disableUnboxedObjects = true;
@ -8794,7 +8797,8 @@ SetWorkerContextOptions(JSContext* cx)
.setWasmIon(enableWasmIon)
.setTestWasmAwaitTier2(enableTestWasmAwaitTier2)
.setNativeRegExp(enableNativeRegExp)
.setStreams(enableStreams);
.setStreams(enableStreams)
.setArrayProtoValues(enableArrayProtoValues);
cx->runtime()->setOffthreadIonCompilationEnabled(offthreadCompilation);
cx->runtime()->profilingScripts = enableCodeCoverage || enableDisassemblyDumps;
@ -9034,6 +9038,7 @@ main(int argc, char** argv, char** envp)
|| !op.addBoolOption('\0', "no-native-regexp", "Disable native regexp compilation")
|| !op.addBoolOption('\0', "no-unboxed-objects", "Disable creating unboxed plain objects")
|| !op.addBoolOption('\0', "enable-streams", "Enable WHATWG Streams")
|| !op.addBoolOption('\0', "no-array-proto-values", "Remove Array.prototype.values")
#ifdef ENABLE_SHARED_ARRAY_BUFFER
|| !op.addStringOption('\0', "shared-memory", "on/off",
"SharedArrayBuffer and Atomics "

Просмотреть файл

@ -830,6 +830,8 @@ ReloadPrefsCallback(const char* pref, void* data)
bool fuzzingEnabled = Preferences::GetBool("fuzzing.enabled");
#endif
bool arrayProtoValues = Preferences::GetBool(JS_OPTIONS_DOT_STR "array_prototype_values");
JS::ContextOptionsRef(cx).setBaseline(useBaseline)
.setIon(useIon)
.setAsmJS(useAsmJS)
@ -846,7 +848,8 @@ ReloadPrefsCallback(const char* pref, void* data)
.setFuzzing(fuzzingEnabled)
#endif
.setStreams(streams)
.setExtraWarnings(extraWarnings);
.setExtraWarnings(extraWarnings)
.setArrayProtoValues(arrayProtoValues);
nsCOMPtr<nsIXULRuntime> xr = do_GetService("@mozilla.org/xre/runtime;1");
if (xr) {

Просмотреть файл

@ -201,9 +201,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=933681
"pop", "shift", "unshift", "splice", "concat", "slice", "lastIndexOf", "indexOf",
"includes", "forEach", "map", "reduce", "reduceRight", "filter", "some", "every", "find",
"findIndex", "copyWithin", "fill", Symbol.iterator, Symbol.unscopables, "entries", "keys",
"constructor"];
"values", "constructor"];
if (isNightlyBuild) {
gPrototypeProperties['Array'].push("values");
gPrototypeProperties['Array'].push("flatten", "flatMap");
}
gConstructorProperties['Array'] =

Просмотреть файл

@ -77,7 +77,7 @@ fails-if(styloVsGecko) == open-details-first-line-2.html open-details-first-line
== mouse-click-open-second-summary.html open-multiple-summary.html
== mouse-click-overflow-hidden-details.html overflow-hidden-open-details.html
== mouse-click-twice-overflow-hidden-details.html overflow-hidden-details.html
fuzzy-if(gtkWidget,1,20) == mouse-click-overflow-auto-details.html overflow-auto-open-details.html #Bug 1294278
fuzzy-if(gtkWidget||OSX,1,20) == mouse-click-overflow-auto-details.html overflow-auto-open-details.html #Bug 1294278
== mouse-click-twice-overflow-auto-details.html overflow-auto-details.html
== mouse-click-display-none-details.html open-single-summary.html
== mouse-click-change-details-to-display-none.html open-single-summary.html

Просмотреть файл

@ -179,6 +179,7 @@ public class CustomTabsActivity extends AppCompatActivity
@Override
public void onDestroy() {
mGeckoSession.closeWindow();
mTextSelection.destroy();
mFormAssistPopup.destroy();
mDoorHangerPopup.destroy();

Просмотреть файл

@ -217,6 +217,7 @@ public class WebAppActivity extends AppCompatActivity
@Override
public void onDestroy() {
mGeckoSession.closeWindow();
mTextSelection.destroy();
mDoorHangerPopup.destroy();
mPromptService.destroy();

Просмотреть файл

@ -291,8 +291,6 @@ gujar.sources += [geckoview_source_dir + 'java/org/mozilla/gecko/' + x for x in
'util/NonEvictingLruCache.java',
'util/PrefUtils.java',
'util/ProxySelector.java',
'util/publicsuffix/PublicSuffix.java',
'util/publicsuffix/PublicSuffixPatterns.java',
'util/RawResource.java',
'util/StringUtils.java',
'util/ThreadUtils.java',
@ -927,6 +925,8 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [
'util/DrawableUtil.java',
'util/JavaUtil.java',
'util/PackageUtil.java',
'util/publicsuffix/PublicSuffix.java',
'util/publicsuffix/PublicSuffixPatterns.java',
'util/ResourceDrawableUtils.java',
'util/ShortcutUtils.java',
'util/TouchTargetUtil.java',

Просмотреть файл

@ -148,6 +148,10 @@ android {
dependencies {
implementation "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
implementation "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.5.1'
testImplementation 'org.mockito:mockito-core:1.10.19'
}
apply from: "${topsrcdir}/mobile/android/gradle/with_gecko_binaries.gradle"

Просмотреть файл

@ -123,7 +123,7 @@ public final class EventDispatcher extends JNIObject {
listeners.add(listener);
}
}
} catch (final IllegalAccessException | InstantiationException e) {
} catch (final Exception e) {
throw new IllegalArgumentException("Invalid new list type", e);
}
}

Просмотреть файл

@ -565,7 +565,8 @@ public class GeckoSession extends LayerSession
ThreadUtils.assertOnUiThread();
if (!isOpen()) {
throw new IllegalStateException("Session is not open");
Log.w(LOGTAG, "Attempted to close a GeckoSession that was already closed.");
return;
}
if (GeckoThread.isStateAtLeast(GeckoThread.State.PROFILE_READY)) {

Просмотреть файл

@ -98,13 +98,14 @@ public final class GeckoBundle implements Parcelable {
}
/**
* Returns whether a mapping exists.
* Returns whether a mapping exists. Null String, Bundle, or arrays are treated as
* nonexistent.
*
* @param key Key to look for.
* @return True if the specified key exists.
* @return True if the specified key exists and the value is not null.
*/
public boolean containsKey(final String key) {
return mMap.containsKey(key) && mMap.get(key) != null;
return mMap.get(key) != null;
}
/**
@ -251,10 +252,13 @@ public final class GeckoBundle implements Parcelable {
* does not exist.
*
* @param key Key to look for.
* @param defaultValue Value to return if mapping does not exist.
* @param defaultValue Value to return if mapping value is null or mapping does not exist.
* @return String value
*/
public String getString(final String key, final String defaultValue) {
// If the key maps to null, technically we should return null because the mapping
// exists and null is a valid string value. However, people expect the default
// value to be returned instead, so we make an exception to return the default value.
final Object value = mMap.get(key);
return value == null ? defaultValue : (String) value;
}
@ -741,8 +745,8 @@ public final class GeckoBundle implements Parcelable {
} else if (value instanceof GeckoBundle[]) {
final GeckoBundle[] array = (GeckoBundle[]) value;
final JSONArray jsonArray = new JSONArray();
for (int j = 0; j < array.length; j++) {
jsonArray.put(array[j] == null ? JSONObject.NULL : array[j].toJSONObject());
for (final GeckoBundle element : array) {
jsonArray.put(element == null ? JSONObject.NULL : element.toJSONObject());
}
jsonValue = jsonArray;
} else if (Build.VERSION.SDK_INT >= 19) {
@ -849,7 +853,9 @@ public final class GeckoBundle implements Parcelable {
}
private static Object fromJSONValue(Object value) throws JSONException {
if (value instanceof JSONObject || value == JSONObject.NULL) {
if (value == null || value == JSONObject.NULL) {
return null;
} else if (value instanceof JSONObject) {
return fromJSONObject((JSONObject) value);
}
if (value instanceof JSONArray) {
@ -893,7 +899,7 @@ public final class GeckoBundle implements Parcelable {
if (value instanceof Float || value instanceof Long) {
return ((Number) value).doubleValue();
}
return value != null ? value.toString() : null;
return value.toString();
}
public static GeckoBundle fromJSONObject(final JSONObject obj) throws JSONException {

Просмотреть файл

@ -13,12 +13,11 @@ import android.content.pm.PackageManager;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Matchers;
import org.mozilla.gecko.background.testhelpers.TestRunner;
import org.mockito.runners.MockitoJUnitRunner;
import static org.mockito.Mockito.*;
@RunWith(TestRunner.class)
@RunWith(MockitoJUnitRunner.class)
public class TestPermissions {
@Test
public void testSuccessRunnableIsExecutedIfPermissionsAreGranted() {

Просмотреть файл

@ -0,0 +1,585 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
package org.mozilla.gecko.util;
import static org.junit.Assert.*;
import android.os.Parcel;
import org.json.JSONException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import java.util.Arrays;
import java.util.List;
@RunWith(RobolectricTestRunner.class)
public class GeckoBundleTest {
private static final int INNER_BUNDLE_SIZE = 25;
private static final int OUTER_BUNDLE_SIZE = INNER_BUNDLE_SIZE + 6;
private static GeckoBundle createInnerBundle() {
final GeckoBundle bundle = new GeckoBundle();
bundle.putBoolean("boolean", true);
bundle.putBooleanArray("booleanArray", new boolean[] {false, true});
bundle.putInt("int", 1);
bundle.putIntArray("intArray", new int[] {2, 3});
bundle.putDouble("double", 0.5);
bundle.putDoubleArray("doubleArray", new double[] {1.5, 2.5});
bundle.putString("string", "foo");
bundle.putString("nullString", null);
bundle.putString("emptyString", "");
bundle.putStringArray("stringArray", new String[] {"bar", "baz"});
bundle.putStringArray("stringArrayOfNull", new String[2]);
bundle.putBooleanArray("emptyBooleanArray", new boolean[0]);
bundle.putIntArray("emptyIntArray", new int[0]);
bundle.putDoubleArray("emptyDoubleArray", new double[0]);
bundle.putStringArray("emptyStringArray", new String[0]);
bundle.putBooleanArray("nullBooleanArray", (boolean[]) null);
bundle.putIntArray("nullIntArray", (int[]) null);
bundle.putDoubleArray("nullDoubleArray", (double[]) null);
bundle.putStringArray("nullStringArray", (String[]) null);
bundle.putDoubleArray("mixedArray", new double[] {1.0, 1.5});
bundle.putInt("byte", 1);
bundle.putInt("short", 1);
bundle.putDouble("float", 0.5);
bundle.putDouble("long", 1.0);
bundle.putString("char", "f");
return bundle;
}
private static GeckoBundle createBundle() {
final GeckoBundle outer = createInnerBundle();
final GeckoBundle inner = createInnerBundle();
outer.putBundle("object", inner);
outer.putBundle("nullObject", null);
outer.putBundleArray("objectArray", new GeckoBundle[] {null, inner});
outer.putBundleArray("objectArrayOfNull", new GeckoBundle[2]);
outer.putBundleArray("emptyObjectArray", new GeckoBundle[0]);
outer.putBundleArray("nullObjectArray", (GeckoBundle[]) null);
return outer;
}
private static void checkInnerBundle(final GeckoBundle bundle, final int expectedSize) {
assertEquals(expectedSize, bundle.size());
assertEquals(true, bundle.getBoolean("boolean"));
assertArrayEquals(new boolean[] {false, true}, bundle.getBooleanArray("booleanArray"));
assertEquals(1, bundle.getInt("int"));
assertArrayEquals(new int[] {2, 3}, bundle.getIntArray("intArray"));
assertEquals(0.5, bundle.getDouble("double"), 0.0);
assertArrayEquals(new double[] {1.5, 2.5}, bundle.getDoubleArray("doubleArray"), 0.0);
assertEquals("foo", bundle.getString("string"));
assertEquals(null, bundle.getString("nullString"));
assertEquals("", bundle.getString("emptyString"));
assertArrayEquals(new String[] {"bar", "baz"}, bundle.getStringArray("stringArray"));
assertArrayEquals(new String[2], bundle.getStringArray("stringArrayOfNull"));
assertArrayEquals(new boolean[0], bundle.getBooleanArray("emptyBooleanArray"));
assertArrayEquals(new int[0], bundle.getIntArray("emptyIntArray"));
assertArrayEquals(new double[0], bundle.getDoubleArray("emptyDoubleArray"), 0.0);
assertArrayEquals(new String[0], bundle.getStringArray("emptyStringArray"));
assertArrayEquals(null, bundle.getBooleanArray("nullBooleanArray"));
assertArrayEquals(null, bundle.getIntArray("nullIntArray"));
assertArrayEquals(null, bundle.getDoubleArray("nullDoubleArray"), 0.0);
assertArrayEquals(null, bundle.getStringArray("nullStringArray"));
assertArrayEquals(new double[] {1.0, 1.5}, bundle.getDoubleArray("mixedArray"), 0.0);
assertEquals(1, bundle.getInt("byte"));
assertEquals(1, bundle.getInt("short"));
assertEquals(0.5, bundle.getDouble("float"), 0.0);
assertEquals(1.0, bundle.getDouble("long"), 0.0);
assertEquals("f", bundle.getString("char"));
}
private static void checkBundle(final GeckoBundle bundle) {
checkInnerBundle(bundle, OUTER_BUNDLE_SIZE);
checkInnerBundle(bundle.getBundle("object"), INNER_BUNDLE_SIZE);
assertEquals(null, bundle.getBundle("nullObject"));
final GeckoBundle[] array = bundle.getBundleArray("objectArray");
assertNotNull(array);
assertEquals(2, array.length);
assertEquals(null, array[0]);
checkInnerBundle(array[1], INNER_BUNDLE_SIZE);
assertArrayEquals(new GeckoBundle[2], bundle.getBundleArray("objectArrayOfNull"));
assertArrayEquals(new GeckoBundle[0], bundle.getBundleArray("emptyObjectArray"));
assertArrayEquals(null, bundle.getBundleArray("nullObjectArray"));
}
private GeckoBundle reference;
@Before
public void prepareReference() {
reference = createBundle();
}
@Test
public void canConstructWithCapacity() {
new GeckoBundle(0);
new GeckoBundle(1);
new GeckoBundle(42);
try {
new GeckoBundle(-1);
fail("Should throw with -1 capacity");
} catch (final Exception e) {
assertTrue(true);
}
}
@Test
public void canConstructWithBundle() {
assertEquals(reference, new GeckoBundle(reference));
try {
new GeckoBundle(null);
fail("Should throw with null bundle");
} catch (final Exception e) {
assertTrue(true);
}
}
@Test
public void referenceShouldBeCorrect() {
checkBundle(reference);
}
@Test
public void equalsShouldReturnCorrectResult() {
assertTrue(reference.equals(reference));
assertFalse(reference.equals(null));
assertTrue(reference.equals(new GeckoBundle(reference)));
assertFalse(reference.equals(new GeckoBundle()));
}
@Test
public void toStringShouldNotReturnEmptyString() {
assertNotNull(reference.toString());
assertNotEquals("", reference.toString());
}
@Test
public void hashCodeShouldNotReturnZero() {
assertNotEquals(0, reference.hashCode());
}
private static void testRemove(final GeckoBundle bundle, final String key) {
if (bundle.get(key) != null) {
assertTrue(String.format("%s should exist", key), bundle.containsKey(key));
} else {
assertFalse(String.format("%s should not exist", key), bundle.containsKey(key));
}
bundle.remove(key);
assertFalse(String.format("%s should not exist", key), bundle.containsKey(key));
}
@Test
public void containsKeyAndRemoveShouldWork() {
final GeckoBundle test = new GeckoBundle(reference);
testRemove(test, "nonexistent");
testRemove(test, "boolean");
testRemove(test, "booleanArray");
testRemove(test, "int");
testRemove(test, "intArray");
testRemove(test, "double");
testRemove(test, "doubleArray");
testRemove(test, "string");
testRemove(test, "nullString");
testRemove(test, "emptyString");
testRemove(test, "stringArray");
testRemove(test, "stringArrayOfNull");
testRemove(test, "emptyBooleanArray");
testRemove(test, "emptyIntArray");
testRemove(test, "emptyDoubleArray");
testRemove(test, "emptyStringArray");
testRemove(test, "nullBooleanArray");
testRemove(test, "nullIntArray");
testRemove(test, "nullDoubleArray");
testRemove(test, "nullStringArray");
testRemove(test, "mixedArray");
testRemove(test, "byte");
testRemove(test, "short");
testRemove(test, "float");
testRemove(test, "long");
testRemove(test, "char");
testRemove(test, "object");
testRemove(test, "nullObject");
testRemove(test, "objectArray");
testRemove(test, "objectArrayOfNull");
testRemove(test, "emptyObjectArray");
testRemove(test, "nullObjectArray");
assertEquals(0, test.size());
}
@Test
public void clearShouldWork() {
final GeckoBundle test = new GeckoBundle(reference);
assertNotEquals(0, test.size());
test.clear();
assertEquals(0, test.size());
}
@Test
public void keysShouldReturnCorrectResult() {
final String[] actual = reference.keys();
final String[] expected = new String[] {
"boolean", "booleanArray", "int", "intArray", "double", "doubleArray", "string",
"nullString", "emptyString", "stringArray", "stringArrayOfNull",
"emptyBooleanArray", "emptyIntArray", "emptyDoubleArray", "emptyStringArray",
"nullBooleanArray", "nullIntArray", "nullDoubleArray", "nullStringArray",
"mixedArray", "byte", "short", "float", "long", "char", "object", "nullObject",
"objectArray", "objectArrayOfNull", "emptyObjectArray", "nullObjectArray"
};
Arrays.sort(expected);
Arrays.sort(actual);
assertArrayEquals(expected, actual);
}
@Test
public void isEmptyShouldReturnCorrectResult() {
assertFalse(reference.isEmpty());
assertTrue(new GeckoBundle().isEmpty());
}
@Test
public void getExistentKeysShouldNotReturnDefaultValues() {
assertNotEquals(false, reference.getBoolean("boolean", false));
assertNotEquals(0, reference.getInt("int", 0));
assertNotEquals(0.0, reference.getDouble("double", 0.0), 0.0);
assertNotEquals("", reference.getString("string", ""));
}
private static void testDefaultValueForNull(final GeckoBundle bundle, final String key) {
// We return default values for null values.
assertEquals(true, bundle.getBoolean(key, true));
assertEquals(1, bundle.getInt(key, 1));
assertEquals(0.5, bundle.getDouble(key, 0.5), 0.0);
assertEquals("foo", bundle.getString(key, "foo"));
}
@Test
public void getNonexistentKeysShouldReturnDefaultValues() {
assertEquals(null, reference.get("nonexistent"));
assertEquals(false, reference.getBoolean("nonexistent"));
assertEquals(true, reference.getBoolean("nonexistent", true));
assertEquals(0, reference.getInt("nonexistent"));
assertEquals(1, reference.getInt("nonexistent", 1));
assertEquals(0.0, reference.getDouble("nonexistent"), 0.0);
assertEquals(0.5, reference.getDouble("nonexistent", 0.5), 0.0);
assertEquals(null, reference.getString("nonexistent"));
assertEquals("foo", reference.getString("nonexistent", "foo"));
assertEquals(null, reference.getBundle("nonexistent"));
assertArrayEquals(null, reference.getBooleanArray("nonexistent"));
assertArrayEquals(null, reference.getIntArray("nonexistent"));
assertArrayEquals(null, reference.getDoubleArray("nonexistent"), 0.0);
assertArrayEquals(null, reference.getStringArray("nonexistent"));
assertArrayEquals(null, reference.getBundleArray("nonexistent"));
// We return default values for null values.
testDefaultValueForNull(reference, "nullObject");
testDefaultValueForNull(reference, "nullString");
testDefaultValueForNull(reference, "nullBooleanArray");
testDefaultValueForNull(reference, "nullIntArray");
testDefaultValueForNull(reference, "nullDoubleArray");
testDefaultValueForNull(reference, "nullStringArray");
testDefaultValueForNull(reference, "nullObjectArray");
}
@Test
public void bundleConversionShouldWork() {
assertEquals(reference, GeckoBundle.fromBundle(reference.toBundle()));
}
@Test
public void jsonConversionShouldWork() throws JSONException {
assertEquals(reference, GeckoBundle.fromJSONObject(reference.toJSONObject()));
}
@Test
public void parcelConversionShouldWork() {
final Parcel parcel = Parcel.obtain();
reference.writeToParcel(parcel, 0);
reference.writeToParcel(parcel, 0);
parcel.setDataPosition(0);
assertEquals(reference, GeckoBundle.CREATOR.createFromParcel(parcel));
final GeckoBundle test = new GeckoBundle();
test.readFromParcel(parcel);
assertEquals(reference, test);
parcel.recycle();
}
private static void testInvalidCoercions(final GeckoBundle bundle, final String key,
final String... exceptions) {
final List<String> allowed;
if (exceptions == null) {
allowed = Arrays.asList(key);
} else {
allowed = Arrays.asList(Arrays.copyOf(exceptions, exceptions.length + 1));
allowed.set(exceptions.length, key);
}
if (!allowed.contains("boolean")) {
try {
bundle.getBoolean(key);
fail(String.format("%s should not coerce to boolean", key));
} catch (final Exception e) {
assertTrue(true);
}
}
if (!allowed.contains("booleanArray") && !allowed.contains("emptyBooleanArray") &&
!allowed.contains("nullBooleanArray")) {
try {
bundle.getBooleanArray(key);
fail(String.format("%s should not coerce to boolean array", key));
} catch (final Exception e) {
assertTrue(true);
}
}
if (!allowed.contains("int")) {
try {
bundle.getInt(key);
fail(String.format("%s should not coerce to int", key));
} catch (final Exception e) {
assertTrue(true);
}
}
if (!allowed.contains("intArray") && !allowed.contains("emptyIntArray") &&
!allowed.contains("nullIntArray")) {
try {
bundle.getIntArray(key);
fail(String.format("%s should not coerce to int array", key));
} catch (final Exception e) {
assertTrue(true);
}
}
if (!allowed.contains("double")) {
try {
bundle.getDouble(key);
fail(String.format("%s should not coerce to double", key));
} catch (final Exception e) {
assertTrue(true);
}
}
if (!allowed.contains("doubleArray") && !allowed.contains("emptyDoubleArray") &&
!allowed.contains("nullDoubleArray")) {
try {
bundle.getDoubleArray(key);
fail(String.format("%s should not coerce to double array", key));
} catch (final Exception e) {
assertTrue(true);
}
}
if (!allowed.contains("string") && !allowed.contains("nullString")) {
try {
bundle.getString(key);
fail(String.format("%s should not coerce to string", key));
} catch (final Exception e) {
assertTrue(true);
}
}
if (!allowed.contains("stringArray") && !allowed.contains("emptyStringArray") &&
!allowed.contains("nullStringArray") && !allowed.contains("stringArrayOfNull")) {
try {
bundle.getStringArray(key);
fail(String.format("%s should not coerce to string array", key));
} catch (final Exception e) {
assertTrue(true);
}
}
if (!allowed.contains("object") && !allowed.contains("nullObject")) {
try {
bundle.getBundle(key);
fail(String.format("%s should not coerce to bundle", key));
} catch (final Exception e) {
assertTrue(true);
}
}
if (!allowed.contains("objectArray") && !allowed.contains("emptyObjectArray") &&
!allowed.contains("nullObjectArray") && !allowed.contains("objectArrayOfNull")) {
try {
bundle.getBundleArray(key);
fail(String.format("%s should not coerce to bundle array", key));
} catch (final Exception e) {
assertTrue(true);
}
}
}
@Test
public void booleanShouldNotCoerceToOtherTypes() {
testInvalidCoercions(reference, "boolean");
}
@Test
public void booleanArrayShouldNotCoerceToOtherTypes() {
testInvalidCoercions(reference, "booleanArray");
}
@Test
public void intShouldCoerceToDouble() {
assertEquals(1.0, reference.getDouble("int"), 0.0);
assertArrayEquals(new double[] {2.0, 3.0}, reference.getDoubleArray("intArray"), 0.0);
}
@Test
public void intShouldNotCoerceToOtherTypes() {
testInvalidCoercions(reference, "int", /* except */ "double");
testInvalidCoercions(reference, "intArray", /* except */ "doubleArray");
}
@Test
public void doubleShouldCoerceToInt() {
assertEquals(0, reference.getInt("double"));
assertArrayEquals(new int[] {1, 2}, reference.getIntArray("doubleArray"));
}
@Test
public void doubleShouldNotCoerceToOtherTypes() {
testInvalidCoercions(reference, "double", /* except */ "int");
testInvalidCoercions(reference, "doubleArray", /* except */ "intArray");
}
@Test
public void nullStringShouldCoerceToBundle() {
assertEquals(null, reference.getBundle("nullString"));
assertArrayEquals(new GeckoBundle[2], reference.getBundleArray("stringArrayOfNull"));
}
@Test
public void nullStringShouldNotCoerceToOtherTypes() {
testInvalidCoercions(reference, "stringArrayOfNull", /* except */ "objectArrayOfNull");
}
@Test
public void nonNullStringShouldNotCoerceToOtherTypes() {
testInvalidCoercions(reference, "string");
}
@Test
public void nullBundleShouldCoerceToString() {
assertEquals(null, reference.getString("nullObject"));
assertArrayEquals(new String[2], reference.getStringArray("objectArrayOfNull"));
}
@Test
public void nullBundleShouldNotCoerceToOtherTypes() {
testInvalidCoercions(reference, "objectArrayOfNull", /* except */ "stringArrayOfNull");
}
@Test
public void nonNullBundleShouldNotCoerceToOtherTypes() {
testInvalidCoercions(reference, "object");
}
@Test
public void emptyArrayShouldCoerceToAnyArray() {
assertArrayEquals(new int[0], reference.getIntArray("emptyBooleanArray"));
assertArrayEquals(new double[0], reference.getDoubleArray("emptyBooleanArray"), 0.0);
assertArrayEquals(new String[0], reference.getStringArray("emptyBooleanArray"));
assertArrayEquals(new GeckoBundle[0], reference.getBundleArray("emptyBooleanArray"));
assertArrayEquals(new boolean[0], reference.getBooleanArray("emptyIntArray"));
assertArrayEquals(new double[0], reference.getDoubleArray("emptyIntArray"), 0.0);
assertArrayEquals(new String[0], reference.getStringArray("emptyIntArray"));
assertArrayEquals(new GeckoBundle[0], reference.getBundleArray("emptyIntArray"));
assertArrayEquals(new boolean[0], reference.getBooleanArray("emptyDoubleArray"));
assertArrayEquals(new int[0], reference.getIntArray("emptyDoubleArray"));
assertArrayEquals(new String[0], reference.getStringArray("emptyDoubleArray"));
assertArrayEquals(new GeckoBundle[0], reference.getBundleArray("emptyDoubleArray"));
assertArrayEquals(new boolean[0], reference.getBooleanArray("emptyStringArray"));
assertArrayEquals(new int[0], reference.getIntArray("emptyStringArray"));
assertArrayEquals(new double[0], reference.getDoubleArray("emptyStringArray"), 0.0);
assertArrayEquals(new GeckoBundle[0], reference.getBundleArray("emptyStringArray"));
assertArrayEquals(new boolean[0], reference.getBooleanArray("emptyObjectArray"));
assertArrayEquals(new int[0], reference.getIntArray("emptyObjectArray"));
assertArrayEquals(new double[0], reference.getDoubleArray("emptyObjectArray"), 0.0);
assertArrayEquals(new String[0], reference.getStringArray("emptyObjectArray"));
}
@Test
public void emptyArrayShouldNotCoerceToOtherTypes() {
testInvalidCoercions(reference, "emptyBooleanArray", /* except */ "intArray",
"doubleArray", "stringArray", "objectArray");
testInvalidCoercions(reference, "emptyIntArray", /* except */ "booleanArray",
"doubleArray", "stringArray", "objectArray");
testInvalidCoercions(reference, "emptyDoubleArray", /* except */ "booleanArray",
"intArray", "stringArray", "objectArray");
testInvalidCoercions(reference, "emptyStringArray", /* except */ "booleanArray",
"intArray", "doubleArray", "objectArray");
testInvalidCoercions(reference, "emptyObjectArray", /* except */ "booleanArray",
"intArray", "doubleArray", "stringArray");
}
@Test
public void nullArrayShouldCoerceToAnyArray() {
assertArrayEquals(null, reference.getIntArray("nullBooleanArray"));
assertArrayEquals(null, reference.getDoubleArray("nullBooleanArray"), 0.0);
assertArrayEquals(null, reference.getStringArray("nullBooleanArray"));
assertArrayEquals(null, reference.getBundleArray("nullBooleanArray"));
assertArrayEquals(null, reference.getBooleanArray("nullIntArray"));
assertArrayEquals(null, reference.getDoubleArray("nullIntArray"), 0.0);
assertArrayEquals(null, reference.getStringArray("nullIntArray"));
assertArrayEquals(null, reference.getBundleArray("nullIntArray"));
assertArrayEquals(null, reference.getBooleanArray("nullDoubleArray"));
assertArrayEquals(null, reference.getIntArray("nullDoubleArray"));
assertArrayEquals(null, reference.getStringArray("nullDoubleArray"));
assertArrayEquals(null, reference.getBundleArray("nullDoubleArray"));
assertArrayEquals(null, reference.getBooleanArray("nullStringArray"));
assertArrayEquals(null, reference.getIntArray("nullStringArray"));
assertArrayEquals(null, reference.getDoubleArray("nullStringArray"), 0.0);
assertArrayEquals(null, reference.getBundleArray("nullStringArray"));
assertArrayEquals(null, reference.getBooleanArray("nullObjectArray"));
assertArrayEquals(null, reference.getIntArray("nullObjectArray"));
assertArrayEquals(null, reference.getDoubleArray("nullObjectArray"), 0.0);
assertArrayEquals(null, reference.getStringArray("nullObjectArray"));
}
}

Просмотреть файл

@ -11,10 +11,10 @@ import android.telephony.TelephonyManager;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mozilla.gecko.background.testhelpers.TestRunner;
import org.mozilla.gecko.util.NetworkUtils.ConnectionSubType;
import org.mozilla.gecko.util.NetworkUtils.ConnectionType;
import org.mozilla.gecko.util.NetworkUtils.NetworkStatus;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowConnectivityManager;
@ -24,7 +24,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@RunWith(TestRunner.class)
@RunWith(RobolectricTestRunner.class)
public class NetworkUtilsTest {
private ConnectivityManager connectivityManager;
private ShadowConnectivityManager shadowConnectivityManager;

Просмотреть файл

@ -10,7 +10,7 @@ import android.content.Context;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mozilla.gecko.background.testhelpers.TestRunner;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import static org.junit.Assert.*;
@ -18,7 +18,7 @@ import static org.junit.Assert.*;
/**
* Unit test methods of the ContextUtils class.
*/
@RunWith(TestRunner.class)
@RunWith(RobolectricTestRunner.class)
public class TestContextUtils {
private Context context;

Просмотреть файл

@ -7,8 +7,6 @@
package org.mozilla.gecko.util;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mozilla.gecko.background.testhelpers.TestRunner;
import java.util.Calendar;
import java.util.GregorianCalendar;
@ -20,7 +18,6 @@ import static org.junit.Assert.assertEquals;
/**
* Unit tests for date utilities.
*/
@RunWith(TestRunner.class)
public class TestDateUtil {
@Test
public void testGetDateInHTTPFormatGMT() {

Просмотреть файл

@ -15,10 +15,10 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.mockito.Matchers;
import org.mozilla.gecko.background.testhelpers.TestRunner;
import org.mozilla.gecko.util.FileUtils.FileLastModifiedComparator;
import org.mozilla.gecko.util.FileUtils.FilenameRegexFilter;
import org.mozilla.gecko.util.FileUtils.FilenameWhitelistFilter;
import org.robolectric.RobolectricTestRunner;
import java.io.File;
import java.io.FileInputStream;
@ -44,7 +44,7 @@ import static org.mockito.Mockito.*;
/**
* Tests the utilities in {@link FileUtils}.
*/
@RunWith(TestRunner.class)
@RunWith(RobolectricTestRunner.class)
public class TestFileUtils {
private static final Charset CHARSET = Charset.forName("UTF-8");

Просмотреть файл

@ -7,8 +7,6 @@
package org.mozilla.gecko.util;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mozilla.gecko.background.testhelpers.TestRunner;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@ -19,7 +17,6 @@ import static org.junit.Assert.assertTrue;
/**
* Unit tests for float utilities.
*/
@RunWith(TestRunner.class)
public class TestFloatUtils {
@Test

Просмотреть файл

@ -7,11 +7,12 @@
package org.mozilla.gecko.util;
import android.content.Intent;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mozilla.gecko.background.testhelpers.TestRunner;
import org.mozilla.gecko.mozglue.SafeIntent;
import org.robolectric.RobolectricTestRunner;
import java.util.Collections;
import java.util.HashMap;
@ -22,7 +23,7 @@ import static org.junit.Assert.*;
/**
* Tests for the Intent utilities.
*/
@RunWith(TestRunner.class)
@RunWith(RobolectricTestRunner.class)
public class TestIntentUtils {
private static final Map<String, String> TEST_ENV_VAR_MAP;
@ -70,4 +71,4 @@ public class TestIntentUtils {
assertEquals("Actual env var value matches test data", expectedValue, actualValue);
}
}
}
}

Просмотреть файл

@ -7,7 +7,7 @@ package org.mozilla.gecko.util;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mozilla.gecko.background.testhelpers.TestRunner;
import org.robolectric.RobolectricTestRunner;
import java.util.Arrays;
import java.util.Collections;
@ -16,7 +16,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@RunWith(TestRunner.class)
@RunWith(RobolectricTestRunner.class)
public class TestStringUtils {
@Test
public void testIsHttpOrHttps() {

Просмотреть файл

@ -7,15 +7,12 @@
package org.mozilla.gecko.util;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mozilla.gecko.background.testhelpers.TestRunner;
import static org.junit.Assert.*;
/**
* Tests for uuid utils.
*/
@RunWith(TestRunner.class)
public class TestUUIDUtil {
private static final String[] validUUIDs = {
"904cd9f8-af63-4525-8ce0-b9127e5364fa",

Просмотреть файл

@ -68,7 +68,7 @@ def gradle_android_build_config():
@depends(gradle_android_build_config)
def gradle_android_app_variant_name(build_config):
def gradle_android_variant_name(build_config):
'''Like "officialPhotonDebug".'''
def uncapitalize(s):
if s:
@ -76,9 +76,14 @@ def gradle_android_app_variant_name(build_config):
else:
return s
return uncapitalize(build_config.app.variant.name)
return namespace(
app=uncapitalize(build_config.app.variant.name),
geckoview=uncapitalize(build_config.geckoview.variant.name),
)
set_config('GRADLE_ANDROID_APP_VARIANT_NAME', gradle_android_app_variant_name)
set_config('GRADLE_ANDROID_APP_VARIANT_NAME', gradle_android_variant_name.app)
set_config('GRADLE_ANDROID_GECKOVIEW_VARIANT_NAME', gradle_android_variant_name.geckoview)
@depends(gradle_android_build_config)
@ -138,6 +143,8 @@ def gradle_android_test_tasks(build_config):
'''Gradle tasks run by |mach android test|.'''
return [
'app:test{app.variant.name}UnitTest'.format(app=build_config.app),
'geckoview:test{geckoview.variant.name}UnitTest'.format(
geckoview=build_config.geckoview),
]
set_config('GRADLE_ANDROID_TEST_TASKS', gradle_android_test_tasks)

Просмотреть файл

@ -71,7 +71,16 @@ class MachCommands(MachCommandBase):
def android_test(self, args):
ret = self.gradle(self.substs['GRADLE_ANDROID_TEST_TASKS'] + ["--continue"] + args, verbose=True)
# Findbug produces both HTML and XML reports. Visit the
ret |= self._parse_android_test_results('public/app/unittest', 'gradle/build/mobile/android/app',
(self.substs['GRADLE_ANDROID_APP_VARIANT_NAME'],))
ret |= self._parse_android_test_results('public/geckoview/unittest', 'gradle/build/mobile/android/geckoview',
(self.substs['GRADLE_ANDROID_GECKOVIEW_VARIANT_NAME'],))
return ret
def _parse_android_test_results(self, artifactdir, gradledir, variants):
# Unit tests produce both HTML and XML reports. Visit the
# XML report(s) to report errors and link to the HTML
# report(s) for human consumption.
import itertools
@ -81,14 +90,22 @@ class MachCommands(MachCommandBase):
FileFinder,
)
root_url = self._root_url(
artifactdir='public/android/unittest',
objdir='gradle/build/mobile/android/app/reports/tests')
ret = 0
found_reports = False
reports = (self.substs['GRADLE_ANDROID_APP_VARIANT_NAME'],)
for report in reports:
finder = FileFinder(os.path.join(self.topobjdir, 'gradle/build/mobile/android/app/test-results/', report))
root_url = self._root_url(
artifactdir=artifactdir,
objdir=gradledir + '/reports/tests')
def capitalize(s):
# Can't use str.capitalize because it lower cases trailing letters.
return (s[0].upper() + s[1:]) if s else ''
for variant in variants:
report = 'test{}UnitTest'.format(capitalize(variant))
finder = FileFinder(os.path.join(self.topobjdir, gradledir + '/test-results/', report))
for p, _ in finder.find('TEST-*.xml'):
found_reports = True
f = open(os.path.join(finder.base, p), 'rt')
tree = ET.parse(f)
root = tree.getroot()
@ -132,6 +149,10 @@ class MachCommands(MachCommandBase):
print('SUITE-END | android-test | {} {}'.format(report, root.get('name')))
if not found_reports:
print('TEST-UNEXPECTED-FAIL | android-test | No reports found under {}'.format(gradledir))
return 1
return ret

Просмотреть файл

@ -13,8 +13,6 @@ import org.mozilla.gecko.util.EventCallback;
import org.mozilla.gecko.util.GeckoBundle;
import org.mozilla.gecko.util.ThreadUtils;
import android.os.Parcel;
/**
* Tests the proper operation of EventDispatcher,
*/
@ -372,19 +370,6 @@ public class testEventDispatcher extends JavascriptBridgeTest implements BundleE
fAssertEquals("Bundle mixed double array has correct length", 2, mixedDoubleArray.length);
fAssertEquals("Bundle mixed double array index 0 has correct value", 1.0, mixedDoubleArray[0]);
fAssertEquals("Bundle mixed double array index 1 has correct value", 1.5, mixedDoubleArray[1]);
final Parcel parcel = Parcel.obtain();
bundle.writeToParcel(parcel, 0);
bundle.writeToParcel(parcel, 0);
parcel.setDataPosition(0);
final GeckoBundle unparceled = GeckoBundle.CREATOR.createFromParcel(parcel);
fAssertEquals("Bundle created from Parcel equals original", bundle, unparceled);
unparceled.clear();
fAssertEquals("Cleared Bundle is empty", 0, unparceled.size());
unparceled.readFromParcel(parcel);
fAssertEquals("Bundle read from Parcel equals original", bundle, unparceled);
parcel.recycle();
}
private static GeckoBundle createInnerBundle() {

Просмотреть файл

@ -1431,6 +1431,8 @@ pref("dom.webcomponents.customelements.enabled", false);
#endif
pref("javascript.enabled", true);
// Enable Array.prototype.values
pref("javascript.options.array_prototype_values", true);
pref("javascript.options.strict", false);
#ifdef DEBUG
pref("javascript.options.strict.debug", false);

Просмотреть файл

@ -177,7 +177,7 @@ TEST(TestStandardURL, From_test_standardurldotjs)
#define COUNT 10000
MOZ_GTEST_BENCH(TestStandardURL, Perf, [] {
MOZ_GTEST_BENCH(TestStandardURL, DISABLED_Perf, [] {
nsCOMPtr<nsIURL> url( do_CreateInstance(NS_STANDARDURL_CONTRACTID) );
ASSERT_TRUE(url);
nsAutoCString out;
@ -200,7 +200,7 @@ MOZ_GTEST_BENCH(TestStandardURL, Perf, [] {
});
// Note the five calls in the loop, so divide by 100k
MOZ_GTEST_BENCH(TestStandardURL, NormalizePerf, [] {
MOZ_GTEST_BENCH(TestStandardURL, DISABLED_NormalizePerf, [] {
nsAutoCString result;
for (int i = 0; i < 20000; i++) {
nsAutoCString encHost("123.232.12.32");
@ -219,7 +219,7 @@ MOZ_GTEST_BENCH(TestStandardURL, NormalizePerf, [] {
// Bug 1394785 - ignore unstable test on OSX
#ifndef XP_MACOSX
// Note the five calls in the loop, so divide by 100k
MOZ_GTEST_BENCH(TestStandardURL, NormalizePerfFails, [] {
MOZ_GTEST_BENCH(TestStandardURL, DISABLED_NormalizePerfFails, [] {
nsAutoCString result;
for (int i = 0; i < 20000; i++) {
nsAutoCString encHost("123.292.12.32");

Просмотреть файл

@ -15,9 +15,12 @@ android-test/opt:
GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
PERFHERDER_EXTRA_OPTIONS: android-test
artifacts:
- name: public/android/unittest
- name: public/app/unittest
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/reports/tests
type: directory
- name: public/geckoview/unittest
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/reports/tests
type: directory
- name: public/build
path: /builds/worker/artifacts/
type: directory

Просмотреть файл

@ -21,7 +21,7 @@ job-defaults:
os: linux
docker-image: mozillareleases/python-test-runner@sha256:0729c2e6e7bc0d6a4cbccb2e66a78e1d8e8cbb5e44105d56e3c9c610230ebd69
max-run-time: 7200
retry-exit-status: 1
retry-exit-status: [1]
env:
BUILD_TOOLS_REPO:
by-project:

Просмотреть файл

@ -32,8 +32,6 @@ job-defaults:
- echo "Dummy task"
notifications:
completed:
subject: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} has shipped!"
message: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} has shipped!"
plugins: ["ses"]
emails:
by-project:
@ -59,11 +57,23 @@ jobs:
shipping-product: fennec
index:
product: fennec
notifications:
completed:
subject: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} has shipped!"
message: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} has shipped!"
firefox:
shipping-product: firefox
index:
product: firefox
notifications:
completed:
subject: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} updates are ready for signoff in Balrog!"
message: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} updates are ready for signoff in Balrog!"
devedition:
shipping-product: devedition
index:
product: devedition
notifications:
completed:
subject: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} updates are ready for signoff in Balrog!"
message: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} updates are ready for signoff in Balrog!"

Просмотреть файл

@ -23,7 +23,7 @@ job-defaults:
os: linux
docker-image: mozillareleases/python-test-runner@sha256:0729c2e6e7bc0d6a4cbccb2e66a78e1d8e8cbb5e44105d56e3c9c610230ebd69
max-run-time: 7200
retry-exit-status: 1
retry-exit-status: [1]
env:
BUILD_TOOLS_REPO:
by-project:

Просмотреть файл

@ -29,8 +29,6 @@ job-defaults:
- echo "Dummy task"
notifications:
completed:
subject: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} has shipped!"
message: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} has shipped!"
plugins: ["ses"]
emails:
by-project:
@ -55,7 +53,15 @@ jobs:
shipping-product: firefox
index:
product: firefox
notifications:
completed:
subject: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} updates are ready for signoff in Balrog!"
message: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} updates are ready for signoff in Balrog!"
fennec-rc:
shipping-product: fennec
index:
product: fennec
notifications:
completed:
subject: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} has shipped!"
message: "{task[shipping-product]} {release_config[version]} build{release_config[build_number]}/{config[params][project]} has shipped!"

Просмотреть файл

@ -22,17 +22,6 @@ awsy:
.*-devedition/.*: [] # don't run on devedition
default: built-projects
awsy-stylo-disabled:
description: "Are we slim yet for Stylo disabled"
treeherder-symbol: SYsd(sy)
run-on-projects:
by-test-platform:
.*-devedition/.*: [] # don't run on devedition
default: built-projects
mozharness:
extra-options:
- --disable-stylo
awsy-stylo-sequential:
description: "Are we slim yet for Stylo sequential"
treeherder-symbol: SYss(sy)

Просмотреть файл

@ -54,18 +54,6 @@ talos-chrome-profiling:
- --add-option
- --webServer,localhost
talos-chrome-stylo-disabled:
description: "Talos Stylo disabled chrome"
try-name: chromez-stylo-disabled
treeherder-symbol: Tsd(c)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
max-run-time: 900
mozharness:
extra-options:
- --suite=chromez-stylo-disabled
- --add-option
- --webServer,localhost
talos-dromaeojs:
description: "Talos dromaeojs"
try-name: dromaeojs
@ -94,18 +82,6 @@ talos-dromaeojs-profiling:
- --add-option
- --webServer,localhost
talos-dromaeojs-stylo-disabled:
description: "Talos Stylo disabled dromaeojs"
try-name: dromaeojs-stylo-disabled
treeherder-symbol: Tsd(d)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
max-run-time: 1800
mozharness:
extra-options:
- --suite=dromaeojs-stylo-disabled
- --add-option
- --webServer,localhost
talos-flex:
description: "Talos XUL flexbox emulation enabled"
try-name: flex
@ -153,21 +129,6 @@ talos-g1-profiling:
- --add-option
- --webServer,localhost
talos-g1-stylo-disabled:
description: "Talos Stylo disabled g1"
try-name: g1-stylo-disabled
treeherder-symbol: Tsd(g1)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
max-run-time:
by-test-platform:
linux64.*: 2700
default: 7200
mozharness:
extra-options:
- --suite=g1-stylo-disabled
- --add-option
- --webServer,localhost
talos-g2:
description: "Talos g2"
try-name: g2
@ -203,21 +164,6 @@ talos-g2-profiling:
- --add-option
- --webServer,localhost
talos-g2-stylo-disabled:
description: "Talos Stylo disabled g2"
try-name: g2-stylo-disabled
treeherder-symbol: Tsd(g2)
max-run-time:
by-test-platform:
linux64.*: 2700
default: 7200
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
mozharness:
extra-options:
- --suite=g2-stylo-disabled
- --add-option
- --webServer,localhost
talos-g3:
description: "Talos g3"
try-name: g3
@ -246,18 +192,6 @@ talos-g3-profiling:
- --add-option
- --webServer,localhost
talos-g3-stylo-disabled:
description: "Talos Stylo disabled g3"
try-name: g3-stylo-disabled
treeherder-symbol: Tsd(g3)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
max-run-time: 900
mozharness:
extra-options:
- --suite=g3-stylo-disabled
- --add-option
- --webServer,localhost
talos-g4:
description: "Talos g4"
try-name: g4
@ -292,21 +226,6 @@ talos-g4-profiling:
linux64.*: 900
default: 1800
talos-g4-stylo-disabled:
description: "Talos Stylo disabled g4"
try-name: g4-stylo-disabled
treeherder-symbol: Tsd(g4)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
mozharness:
extra-options:
- --suite=g4-stylo-disabled
- --add-option
- --webServer,localhost
max-run-time:
by-test-platform:
linux64.*: 900
default: 1800
talos-g5:
description: "Talos g5"
try-name: g5
@ -341,22 +260,6 @@ talos-g5-profiling:
linux64.*: 1200
default: 1800
talos-g5-stylo-disabled:
description: "Talos Stylo disabled g5"
try-name: g5-stylo-disabled
treeherder-symbol: Tsd(g5)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
mozharness:
extra-options:
- --suite=g5-stylo-disabled
- --add-option
- --webServer,localhost
max-run-time:
by-test-platform:
linux64.*: 900
default: 1800
talos-h1:
description: "Talos h1"
try-name: h1
@ -387,6 +290,23 @@ talos-h2:
- --add-option
- --webServer,localhost
talos-motionmark:
description: "Talos motionmark"
try-name: motionmark
treeherder-symbol: T(mm)
run-on-projects: ['mozilla-central', 'try']
max-run-time: 3600
tier:
by-test-platform:
windows10-64-ccov/.*: 3
linux64-ccov/.*: 3
default: 2
mozharness:
extra-options:
- --suite=motionmark
- --add-option
- --webServer,localhost
talos-other:
description: "Talos other"
try-name: other
@ -415,18 +335,6 @@ talos-other-profiling:
- --add-option
- --webServer,localhost
talos-other-stylo-disabled:
description: "Talos Stylo disabled other"
try-name: other-stylo-disabled
treeherder-symbol: Tsd(o)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
max-run-time: 1200
mozharness:
extra-options:
- --suite=other-stylo-disabled
- --add-option
- --webServer,localhost
talos-perf-reftest:
description: "Talos perf-reftest"
try-name: perf-reftest
@ -475,26 +383,6 @@ talos-perf-reftest-singletons-profiling:
- --suite=perf-reftest-singletons
- --geckoProfile
talos-perf-reftest-singletons-stylo-disabled:
description: "Talos Stylo disabled perf-reftest singletons"
try-name: perf-reftest-singletons-stylo-disabled
treeherder-symbol: Tsd(ps)
run-on-projects: ['mozilla-central', 'try']
max-run-time: 1200
mozharness:
extra-options:
- --suite=perf-reftest-singletons-stylo-disabled
talos-perf-reftest-stylo-disabled:
description: "Talos Stylo disabled perf-reftest"
try-name: perf-reftest-stylo-disabled
treeherder-symbol: Tsd(p)
run-on-projects: ['mozilla-central', 'try']
max-run-time: 1200
mozharness:
extra-options:
- --suite=perf-reftest-stylo-disabled
talos-speedometer:
description: "Talos speedometer"
try-name: speedometer
@ -523,18 +411,6 @@ talos-speedometer-profiling:
- --add-option
- --webServer,localhost
talos-speedometer-stylo-disabled:
description: "Talos Stylo disabled speedometer"
try-name: speedometer-stylo-disabled
treeherder-symbol: Tsd(sp)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
max-run-time: 1200
mozharness:
extra-options:
- --suite=speedometer-stylo-disabled
- --add-option
- --webServer,localhost
talos-svgr:
description: "Talos svgr"
try-name: svgr
@ -563,18 +439,6 @@ talos-svgr-profiling:
- --add-option
- --webServer,localhost
talos-svgr-stylo-disabled:
description: "Talos Stylo disabled svgr"
try-name: svgr-stylo-disabled
treeherder-symbol: Tsd(s)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
max-run-time: 1800
mozharness:
extra-options:
- --suite=svgr-stylo-disabled
- --add-option
- --webServer,localhost
talos-tp5o:
description: "Talos tp5o"
try-name: tp5o
@ -603,18 +467,6 @@ talos-tp5o-profiling:
- --add-option
- --webServer,localhost
talos-tp5o-stylo-disabled:
description: "Talos Stylo disabled tp5o"
try-name: tp5o-stylo-disabled
treeherder-symbol: Tsd(tp)
run-on-projects: ['mozilla-beta', 'mozilla-central', 'try']
max-run-time: 1800
mozharness:
extra-options:
- --suite=tp5o-stylo-disabled
- --add-option
- --webServer,localhost
talos-tp6:
description: "Talos tp6"
try-name: tp6
@ -643,20 +495,6 @@ talos-tp6-profiling:
- --add-option
- --webServer,localhost
talos-tp6-stylo-disabled:
description: "Talos Stylo disabled tp6"
try-name: tp6-stylo-disabled
treeherder-symbol: Tsd(tp6)
max-run-time: 1200
run-on-projects:
by-test-platform:
windows.*: ['mozilla-beta', 'mozilla-central', 'try']
macosx.*: ['mozilla-beta', 'mozilla-central', 'try']
default: ['mozilla-beta', 'mozilla-central', 'try']
mozharness:
extra-options:
- --suite=tp6-stylo-disabled
talos-tp6-stylo-threads:
description: "Talos Stylo sequential tp6"
try-name: tp6-stylo-threads

Просмотреть файл

@ -51,7 +51,6 @@ linux64/opt:
- reftest-stylo
- desktop-screenshot-capture
- talos
- linux-talos-stylo-disabled
- awsy
- mochitest-headless
- linux-talos-flex
@ -79,7 +78,6 @@ linux64-pgo/opt:
- common-tests
- web-platform-tests
- talos
- linux-talos-stylo-disabled
linux64-asan/opt:
build-platform: linux64-asan/opt
@ -94,7 +92,6 @@ linux32-stylo-disabled/debug:
linux32-stylo-disabled/opt:
build-platform: linux/opt
test-sets:
- awsy-stylo-disabled
- stylo-disabled-tests
linux64-stylo-disabled/debug:
build-platform: linux64/debug
@ -104,7 +101,6 @@ linux64-stylo-disabled/debug:
linux64-stylo-disabled/opt:
build-platform: linux64/opt
test-sets:
- awsy-stylo-disabled
- stylo-disabled-tests
- devtools-tests

Просмотреть файл

@ -70,15 +70,13 @@ talos:
- talos-tp6
- talos-tp6-stylo-threads
- talos-speedometer
- talos-motionmark
- talos-h1
- talos-h2
awsy:
- awsy
awsy-stylo-disabled:
- awsy-stylo-disabled
awsy-stylo-sequential:
- awsy-stylo-sequential
@ -120,6 +118,7 @@ linux-qr-talos:
- talos-tp6
- talos-tp6-stylo-threads
- talos-speedometer
- talos-motionmark
linux-qr-tests:
- cppunit
@ -165,22 +164,6 @@ jsdcov-code-coverage-tests:
- mochitest-devtools-chrome
- xpcshell
linux-talos-stylo-disabled:
- talos-chrome-stylo-disabled
- talos-dromaeojs-stylo-disabled
- talos-g1-stylo-disabled
- talos-g2-stylo-disabled
- talos-g3-stylo-disabled
- talos-g4-stylo-disabled
- talos-g5-stylo-disabled
- talos-other-stylo-disabled
- talos-svgr-stylo-disabled
- talos-tp5o-stylo-disabled
- talos-perf-reftest-stylo-disabled
- talos-perf-reftest-singletons-stylo-disabled
- talos-tp6-stylo-disabled
- talos-speedometer-stylo-disabled
windows-reftest-gpu:
- reftest-gpu
@ -228,22 +211,6 @@ windows-talos:
- talos-tp6-stylo-threads
- talos-speedometer
windows-talos-stylo-disabled:
- talos-chrome-stylo-disabled
- talos-dromaeojs-stylo-disabled
- talos-g1-stylo-disabled
- talos-g2-stylo-disabled
- talos-g4-stylo-disabled
- talos-g5-stylo-disabled
- talos-other-stylo-disabled
- talos-perf-reftest-stylo-disabled
- talos-perf-reftest-singletons-stylo-disabled
- talos-svgr-stylo-disabled
- talos-tp5o-stylo-disabled
- talos-xperf-stylo-disabled
- talos-tp6-stylo-disabled
- talos-speedometer-stylo-disabled
macosx64-tests:
- cppunit
- crashtest
@ -285,23 +252,9 @@ macosx64-talos:
- talos-tp6
- talos-tp6-stylo-threads
- talos-speedometer
- talos-motionmark
- talos-h1
macosx64-talos-stylo-disabled:
- talos-chrome-stylo-disabled
- talos-dromaeojs-stylo-disabled
- talos-g1-stylo-disabled
- talos-g2-stylo-disabled
- talos-g4-stylo-disabled
- talos-g5-stylo-disabled
- talos-other-stylo-disabled
- talos-svgr-stylo-disabled
- talos-tp5o-stylo-disabled
- talos-perf-reftest-stylo-disabled
- talos-perf-reftest-singletons-stylo-disabled
- talos-tp6-stylo-disabled
- talos-speedometer-stylo-disabled
macosx64-talos-profiling:
- talos-chrome-profiling
- talos-dromaeojs-profiling

Просмотреть файл

@ -66,6 +66,12 @@ A lesser possibility is that you stumbled upon a TaskCluster platform bug
where it fails to use new volumes for tasks.
'''
# The exit code to use when caches should be purged and the task retried.
# This is EX_OSFILE (from sysexits.h):
# Some system file does not exist, cannot be opened, or has some
# sort of error (e.g., syntax error).
EXIT_PURGE_CACHE = 72
def print_line(prefix, m):
now = datetime.datetime.utcnow().isoformat()
@ -110,6 +116,7 @@ def run_and_prefix_output(prefix, args, extra_env=None):
return p.wait()
WANTED_DIR_MODE = stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR
@ -421,7 +428,7 @@ def main(args):
with open(audit_path, 'rb') as fh:
print(fh.read())
return 1
return EXIT_PURGE_CACHE
else:
write_audit_entry(audit_path, 'used')
@ -439,7 +446,7 @@ def main(args):
'properly' % cache)
write_audit_entry(audit_path, 'missing .cacherequires')
return 1
return EXIT_PURGE_CACHE
if 'TASKCLUSTER_VOLUMES' in os.environ:
volumes = os.environ['TASKCLUSTER_VOLUMES'].split(';')

Просмотреть файл

@ -193,7 +193,7 @@ def mozharness_on_docker_worker_setup(config, job, taskdesc):
docker_worker_add_tooltool(config, job, taskdesc, internal=internal)
# Retry if mozharness returns TBPL_RETRY
worker['retry-exit-status'] = 4
worker['retry-exit-status'] = [4]
docker_worker_setup_secrets(config, job, taskdesc)

Просмотреть файл

@ -79,6 +79,10 @@ def docker_worker_run_task(config, job, taskdesc):
'skip-untrusted': True,
})
# This must match EXIT_PURGE_CACHES in taskcluster/docker/recipes/run-task
worker.setdefault('retry-exit-status', []).append(72)
worker.setdefault('purge-caches-exit-status', []).append(72)
run_command = run['command']
if isinstance(run_command, basestring):
run_command = ['bash', '-cx', run_command]

Просмотреть файл

@ -350,10 +350,11 @@ task_description_schema = Schema({
Required('max-run-time'): int,
# the exit status code(s) that indicates the task should be retried
Optional('retry-exit-status'): Any(
int,
[int],
),
Optional('retry-exit-status'): [int],
# the exit status code(s) that indicates the caches used by the task
# should be purged
Optional('purge-caches-exit-status'): [int],
}, {
Required('implementation'): 'generic-worker',
Required('os'): Any('windows', 'macosx'),
@ -819,11 +820,11 @@ def build_docker_worker_payload(config, task, task_def):
if 'max-run-time' in worker:
payload['maxRunTime'] = worker['max-run-time']
payload['onExitStatus'] = {}
if 'retry-exit-status' in worker:
if isinstance(worker['retry-exit-status'], int):
payload['onExitStatus'] = {'retry': [worker['retry-exit-status']]}
elif isinstance(worker['retry-exit-status'], list):
payload['onExitStatus'] = {'retry': worker['retry-exit-status']}
payload['onExitStatus']['retry'] = worker['retry-exit-status']
if 'purge-caches-exit-status' in worker:
payload['onExitStatus']['purgeCaches'] = worker['purge-caches-exit-status']
if 'artifacts' in worker:
artifacts = {}
@ -964,9 +965,6 @@ def build_generic_worker_payload(config, task, task_def):
# needs-sccache is handled in mozharness_on_windows
if 'retry-exit-status' in worker:
raise Exception("retry-exit-status not supported in generic-worker")
# currently only support one feature (chain of trust) but this will likely grow
features = {}

Просмотреть файл

@ -265,7 +265,7 @@ test_description_schema = Schema({
int),
# the exit status code that indicates the task should be retried
Optional('retry-exit-status'): int,
Optional('retry-exit-status'): [int],
# Whether to perform a gecko checkout.
Required('checkout'): bool,
@ -842,7 +842,7 @@ def set_retry_exit_status(config, tests):
"""Set the retry exit status to TBPL_RETRY, the value returned by mozharness
scripts to indicate a transient failure that should be retried."""
for test in tests:
test['retry-exit-status'] = 4
test['retry-exit-status'] = [4]
yield test

Просмотреть файл

@ -149,18 +149,6 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin,
"default": False,
"help": "we should have --disable-e10s, but instead we assume non-e10s and use --e10s to help"
}],
[["--enable-stylo"], {
"action": "store_true",
"dest": "enable_stylo",
"default": False,
"help": "Run tests with Stylo enabled"
}],
[["--disable-stylo"], {
"action": "store_true",
"dest": "disable_stylo",
"default": False,
"help": "Run tests with Stylo disabled"
}],
[["--enable-webrender"], {
"action": "store_true",
"dest": "enable_webrender",
@ -674,13 +662,8 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin,
env['MOZ_WEBRENDER'] = '1'
env['MOZ_ACCELERATED'] = '1'
if self.config['disable_stylo'] and self.config['enable_stylo']:
self.fatal("--disable-stylo conflicts with --enable-stylo")
if self.config['enable_stylo']:
env['STYLO_FORCE_ENABLED'] = '1'
if self.config['disable_stylo']:
env['STYLO_FORCE_DISABLED'] = '1'
# TODO: consider getting rid of this as we should be default to stylo now
env['STYLO_FORCE_ENABLED'] = '1'
# Remove once Talos is migrated away from buildbot
if self.buildbot_config:

Просмотреть файл

@ -38,18 +38,6 @@ class AWSY(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin, CodeCo
"default": False,
"help": "Run tests with multiple processes. (Desktop builds only)",
}],
[["--enable-stylo"],
{"action": "store_true",
"dest": "enable_stylo",
"default": False,
"help": "Run tests with Stylo enabled.",
}],
[["--disable-stylo"],
{"action": "store_true",
"dest": "disable_stylo",
"default": False,
"help": "Run tests with Stylo disabled.",
}],
[["--single-stylo-traversal"],
{"action": "store_true",
"dest": "single_stylo_traversal",
@ -175,21 +163,13 @@ class AWSY(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin, CodeCo
test_file = os.path.join(self.awsy_libdir, 'test_memory_usage.py')
cmd.append(test_file)
if self.config['disable_stylo']:
if self.config['single_stylo_traversal']:
self.fatal("--disable-stylo conflicts with --single-stylo-traversal")
if self.config['enable_stylo']:
self.fatal("--disable-stylo conflicts with --enable-stylo")
if self.config['single_stylo_traversal']:
env['STYLO_THREADS'] = '1'
else:
env['STYLO_THREADS'] = '4'
if self.config['enable_stylo']:
env['STYLO_FORCE_ENABLED'] = '1'
if self.config['disable_stylo']:
env['STYLO_FORCE_DISABLED'] = '1'
# TODO: consider getting rid of this as stylo is enabled by default
env['STYLO_FORCE_ENABLED'] = '1'
env['MOZ_UPLOAD_DIR'] = dirs['abs_blob_upload_dir']
if not os.path.isdir(env['MOZ_UPLOAD_DIR']):

Просмотреть файл

@ -1,3 +1,4 @@
jsonschema>=2.5.1
mozlog>=3.1
mozcrash>=0.15
mozfile>=1.2

Просмотреть файл

@ -7,10 +7,6 @@
"talos_options": ["--geckoProfile"],
"tests": ["tresize"]
},
"chromez-stylo-disabled-e10s": {
"talos_options": ["--disable-stylo"],
"tests": ["tresize"]
},
"dromaeojs-e10s": {
"tests": ["dromaeo_css", "kraken"]
},
@ -18,10 +14,6 @@
"talos_options": ["--geckoProfile"],
"tests": ["dromaeo_css", "kraken"]
},
"dromaeojs-stylo-disabled-e10s": {
"talos_options": ["--disable-stylo"],
"tests": ["dromaeo_css", "kraken"]
},
"flex-e10s": {
"tests": ["tart_flex", "ts_paint_flex"]
},
@ -32,10 +24,6 @@
"talos_options": ["--geckoProfile"],
"tests": ["a11yr", "ts_paint", "tpaint", "sessionrestore", "sessionrestore_many_windows", "sessionrestore_no_auto_restore", "tabpaint", "cpstartup"]
},
"other-stylo-disabled-e10s": {
"talos_options": ["--disable-stylo"],
"tests": ["a11yr", "ts_paint", "tpaint", "sessionrestore", "sessionrestore_many_windows", "sessionrestore_no_auto_restore", "tabpaint", "cpstartup"]
},
"g1-e10s": {
"tests": ["tp5o_scroll", "glterrain"],
"pagesets_name": "tp5n.zip"
@ -45,11 +33,6 @@
"talos_options": ["--geckoProfile"],
"pagesets_name": "tp5n.zip"
},
"g1-stylo-disabled-e10s": {
"tests": ["tp5o_scroll", "glterrain"],
"talos_options": ["--disable-stylo"],
"pagesets_name": "tp5n.zip"
},
"g2-e10s": {
"tests": ["damp", "tps"],
"pagesets_name": "tp5n.zip"
@ -59,11 +42,6 @@
"talos_options": ["--geckoProfile"],
"pagesets_name": "tp5n.zip"
},
"g2-stylo-disabled-e10s": {
"tests": ["damp", "tps"],
"talos_options": ["--disable-stylo"],
"pagesets_name": "tp5n.zip"
},
"g3-e10s": {
"tests": ["dromaeo_dom"]
},
@ -71,10 +49,6 @@
"tests": ["dromaeo_dom"],
"talos_options": ["--geckoProfile"]
},
"g3-stylo-disabled-e10s": {
"tests": ["dromaeo_dom"],
"talos_options": ["--disable-stylo"]
},
"g4-e10s": {
"tests": ["basic_compositor_video", "glvideo", "displaylist_mutate", "rasterflood_svg", "rasterflood_gradient"]
},
@ -82,10 +56,6 @@
"tests": ["basic_compositor_video", "glvideo"],
"talos_options": ["--geckoProfile"]
},
"g4-stylo-disabled-e10s": {
"tests": ["basic_compositor_video", "glvideo"],
"talos_options": ["--disable-stylo"]
},
"g5-e10s": {
"tests": ["ts_paint_webext", "tp5o_webext"],
"pagesets_name": "tp5n.zip"
@ -95,10 +65,8 @@
"talos_options": ["--geckoProfile"],
"pagesets_name": "tp5n.zip"
},
"g5-stylo-disabled-e10s": {
"tests": ["ts_paint_webext", "tp5o_webext"],
"talos_options": ["--disable-stylo"],
"pagesets_name": "tp5n.zip"
"motionmark-e10s": {
"tests": ["motionmark_animometer", "motionmark_htmlsuite"]
},
"svgr-e10s": {
"tests": ["tsvgx", "tsvgr_opacity", "tart", "tscrollx", "tsvg_static"]
@ -107,10 +75,6 @@
"tests": ["tsvgx", "tsvgr_opacity", "tart", "tscrollx", "tsvg_static"],
"talos_options": ["--geckoProfile"]
},
"svgr-stylo-disabled-e10s": {
"tests": ["tsvgx", "tsvgr_opacity", "tart", "tscrollx", "tsvg_static"],
"talos_options": ["--disable-stylo"]
},
"perf-reftest-e10s": {
"tests": ["perf_reftest"]
},
@ -118,10 +82,6 @@
"tests": ["perf_reftest"],
"talos_options": ["--geckoProfile"]
},
"perf-reftest-stylo-disabled-e10s": {
"tests": ["perf_reftest"],
"talos_options": ["--disable-stylo"]
},
"perf-reftest-singletons-e10s": {
"tests": ["perf_reftest_singletons"]
},
@ -129,10 +89,6 @@
"tests": ["perf_reftest_singletons"],
"talos_options": ["--geckoProfile"]
},
"perf-reftest-singletons-stylo-disabled-e10s": {
"tests": ["perf_reftest_singletons"],
"talos_options": ["--disable-stylo"]
},
"speedometer-e10s": {
"tests": ["speedometer", "stylebench"]
},
@ -140,10 +96,6 @@
"talos_options": ["--geckoProfile"],
"tests": ["speedometer"]
},
"speedometer-stylo-disabled-e10s": {
"talos_options": ["--disable-stylo"],
"tests": ["speedometer"]
},
"tp5o-e10s": {
"tests": ["tp5o"],
"pagesets_name": "tp5n.zip"
@ -153,11 +105,6 @@
"pagesets_name": "tp5n.zip",
"talos_options": ["--geckoProfile"]
},
"tp5o-stylo-disabled-e10s": {
"tests": ["tp5o"],
"pagesets_name": "tp5n.zip",
"talos_options": ["--disable-stylo"]
},
"xperf-e10s": {
"tests": ["tp5n"],
"pagesets_name": "tp5n.zip",
@ -166,15 +113,6 @@
"\"c:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe\""
]
},
"xperf-stylo-disabled-e10s": {
"tests": ["tp5n"],
"pagesets_name": "tp5n.zip",
"talos_options": [
"--disable-stylo",
"--xperf_path",
"\"c:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe\""
]
},
"tp6-e10s": {
"tests": ["tp6_google", "tp6_youtube", "tp6_amazon", "tp6_facebook"],
"mitmproxy_release_bin_osx": "mitmproxy-2.0.2-osx.tar.gz",
@ -198,18 +136,6 @@
"--firstNonBlankPaint"
]
},
"tp6-stylo-disabled-e10s": {
"tests": ["tp6_google", "tp6_youtube", "tp6_amazon", "tp6_facebook"],
"mitmproxy_release_bin_osx": "mitmproxy-2.0.2-osx.tar.gz",
"mitmproxy_release_bin_linux64": "mitmproxy-2.0.2-linux.tar.gz",
"mitmproxy_recording_set": "mitmproxy-recording-set-win10.zip",
"talos_options": [
"--disable-stylo",
"--mitmproxy",
"mitmproxy-recording-google.mp mitmproxy-recording-youtube.mp mitmproxy-recording-amazon.mp mitmproxy-recording-facebook.mp",
"--firstNonBlankPaint"
]
},
"tp6-stylo-threads-e10s": {
"tests": ["tp6_google", "tp6_youtube", "tp6_amazon", "tp6_facebook"],
"mitmproxy_release_bin_osx": "mitmproxy-2.0.2-osx.tar.gz",

Просмотреть файл

@ -65,7 +65,7 @@ def create_parser(mach_interface=False):
add_arg('--browserWait', dest='browser_wait', default=5, type=int,
help="Amount of time allowed for the browser to cleanly close")
add_arg('-a', '--activeTests',
help="List of tests to run, separated by ':' (ex. damp:cart)")
help="List of tests to run, separated by ':' (ex. damp:tart)")
add_arg('--suite',
help="Suite to use (instead of --activeTests)")
add_arg('--subtests',
@ -161,13 +161,6 @@ def create_parser(mach_interface=False):
add_arg('--no-upload-results', action="store_true",
dest='no_upload_results',
help="If given, it disables uploading of talos results.")
add_arg('--enable-stylo', action="store_true",
dest='enable_stylo',
help='If given, enable Stylo via Environment variables and '
'upload results with Stylo options.')
add_arg('--disable-stylo', action="store_true",
dest='disable_stylo',
help='If given, disable Stylo via Environment variables.')
add_arg('--stylo-threads', type=int,
dest='stylothreads',
help='If given, run Stylo with a certain number of threads')

Просмотреть файл

@ -4,10 +4,12 @@
from __future__ import absolute_import, print_function
import copy
import json
import os
import sys
import time
import mozinfo
from mozlog.commandline import setup_logging
from talos import utils, test
from talos.cmdline import parse_args
@ -340,11 +342,39 @@ def build_manifest(config, manifestName):
with open(manifestName, 'r') as fHandle:
manifestLines = fHandle.readlines()
# look for configuration data - right now just MotionMark
tuning_data = {}
if os.path.isfile(manifestName + '.json'):
with open(manifestName + '.json', 'r') as f:
tuning_data = json.load(f)
# write modified manifest lines
with open(manifestName + '.develop', 'w') as newHandle:
for line in manifestLines:
newline = line.replace('localhost', config['webserver'])
newline = newline.replace('page_load_test', 'tests')
if tuning_data:
suite = ''
test = ''
# parse suite/test from: suite-name=HTMLsuite&test-name=CompositedTransforms
parts = newline.split('&')
for part in parts:
key_val = part.split('=')
if len(key_val) != 2:
continue
if key_val[0] == 'suite-name':
suite = key_val[1]
if key_val[0] == 'test-name':
test = key_val[1]
if suite and test and tuning_data:
osver = mozinfo.os
if osver not in ['linux', 'win']:
osver = 'osx'
complexity = tuning_data[suite]['complexity'][test][osver]
newline = newline.replace('complexity=300', 'complexity=%s' % complexity)
newHandle.write(newline)
newManifestName = manifestName + '.develop'
@ -436,8 +466,7 @@ def get_browser_config(config):
'xperf_path': None,
'error_filename': None,
'no_upload_results': False,
'enable_stylo': False,
'disable_stylo': False,
'enable_stylo': True,
'stylothreads': 0,
'subtests': None,
}

Просмотреть файл

@ -1,4 +1,4 @@
<html>
<html>
<!--
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@ -6,7 +6,7 @@
-->
<head>
<meta charset="UTF-8"/>
<title>TART/CART addon xpi generator</title>
<title>TART addon xpi generator</title>
<script src="scripts/jszip.min.js"></script>
<script src="scripts/xpigen.js"></script>
@ -68,7 +68,7 @@
</h4>
<p>
Once installed, to run TART or CART tests, visit
Once installed, to run TART tests, visit
<span style="color: green; font-family: monospace;">chrome://tart/content/tart.html</span>
and follow the instructions.
</p>

Просмотреть файл

@ -195,12 +195,7 @@ def run_tests(config, browser_config):
# legacy still required for perfherder data
talos_results.add_extra_option('e10s')
# stylo is another option for testing
if config['enable_stylo']:
talos_results.add_extra_option('stylo')
if config['disable_stylo']:
talos_results.add_extra_option('stylo_disabled')
talos_results.add_extra_option('stylo')
# measuring the difference of a a certain thread level
if config.get('stylothreads', 0) > 0:

Просмотреть файл

@ -408,39 +408,6 @@ class tart_flex(tart):
preferences = {'layout.css.emulate-moz-box-with-flex': True}
@register_test()
class cart(PageloaderTest):
"""
Customize Animation Regression Test
Tests Australis customize animations (default DPI scaling). Uses the
TART addon but with a different URL.
Reports the same animation values as TART (.half/.all/.error).
All comments for TART also apply here (e.g. for ASAP+OMTC, etc)
Subtests are:
1-customize-enter - from triggering customize mode until it's ready for
the user
2-customize-exit - exiting customize
3-customize-enter-css - only the CSS animation part of entering customize
"""
tpmanifest = '${talos}/tests/tart/cart.manifest'
extensions = '${talos}/tests/tart/addon'
tpcycles = 1
tppagecycles = 25
tploadnocache = True
tpmozafterpaint = False
gecko_profile_interval = 1
gecko_profile_entries = 10000000
win_counters = w7_counters = linux_counters = mac_counters = None
"""
ASAP mode
"""
preferences = {'layout.frame_rate': 0,
'docshell.event_starvation_delay_hint': 1,
'dom.send_after_paint_to_content': False}
filters = filter.ignore_first.prepare(1) + filter.median.prepare()
unit = 'ms'
@register_test()
class damp(PageloaderTest):
"""
@ -820,34 +787,38 @@ class a11yr(PageloaderTest):
alert_threshold = 5.0
class WebkitBenchmark(PageloaderTest):
tpcycles = 1
tppagecycles = 5
tpmozafterpaint = False
tpchrome = False
format_pagename = False
lower_is_better = False
unit = 'score'
@register_test()
class speedometer(PageloaderTest):
"""
Speedometer benchmark used by many browser vendors (from webkit)
"""
class speedometer(WebkitBenchmark):
# Speedometer benchmark used by many browser vendors (from webkit)
tpmanifest = '${talos}/tests/speedometer/speedometer.manifest'
tpcycles = 1
tppagecycles = 5
tpmozafterpaint = False
tpchrome = False
format_pagename = False
lower_is_better = False
unit = 'score'
@register_test()
class stylebench(PageloaderTest):
"""
StyleBench benchmark used by many browser vendors (from webkit)
"""
class stylebench(WebkitBenchmark):
# StyleBench benchmark used by many browser vendors (from webkit)
tpmanifest = '${talos}/tests/stylebench/stylebench.manifest'
tpcycles = 1
tppagecycles = 5
tpmozafterpaint = False
tpchrome = False
format_pagename = False
lower_is_better = False
unit = 'score'
@register_test()
class motionmark_animometer(WebkitBenchmark):
# MotionMark benchmark used by many browser vendors (from webkit)
tpmanifest = '${talos}/tests/motionmark/animometer.manifest'
@register_test()
class motionmark_htmlsuite(WebkitBenchmark):
# MotionMark benchmark used by many browser vendors (from webkit)
tpmanifest = '${talos}/tests/motionmark/htmlsuite.manifest'
@register_test()

Просмотреть файл

@ -0,0 +1,10 @@
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Multiply&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=CanvasArcs&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Leaves&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Paths&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=CanvasLines&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Focus&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Images&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Design&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=Animometer&test-name=Suits&complexity=300

Просмотреть файл

@ -0,0 +1,14 @@
{"Animometer": {
"complexity": {
"Multiply": {"win": 391, "linux": 391, "osx": 193},
"CanvasArcs": {"win": 1287, "linux": 1287, "osx": 575},
"Leaves": {"win": 550, "linux": 550, "osx": 271},
"Paths": {"win": 4070, "linux": 4070, "osx": 2024},
"CanvasLines": {"win": 4692, "linux": 4692, "osx": 10932},
"Focus": {"win": 44, "linux": 44, "osx": 32},
"Images": {"win": 293, "linux": 293, "osx": 188},
"Design": {"win": 60, "linux": 60, "osx": 17},
"Suits": {"win": 210, "linux": 210, "osx": 145}
}
}
}

Просмотреть файл

@ -0,0 +1,11 @@
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=CSSbouncingcircles&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=CSSbouncingclippedrects&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=CSSbouncinggradientcircles&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=CSSbouncingblendcircles&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=CSSbouncingfiltercircles&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=CSSbouncingSVGimages&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=CSSbouncingtaggedimages&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=Leaves20&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=Focus20&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=DOMparticlesSVGmasks&complexity=300
% http://localhost/tests/webkit/PerformanceTests/MotionMark/developer.html?test-interval=15&display=minimal&tiles=big&controller=fixed&frame-rate=30&kalman-process-error=1&kalman-measurement-error=4&time-measurement=performance&suite-name=HTMLsuite&test-name=CompositedTransforms&complexity=300

Просмотреть файл

@ -0,0 +1,16 @@
{"HTMLsuite": {
"complexity": {
"CSSbouncingcircles": {"win": 322, "linux": 322, "osx": 218},
"CSSbouncingclippedrects": {"win": 520, "linux": 520, "osx": 75},
"CSSbouncinggradientcircles": {"win": 402, "linux": 402, "osx": 97},
"CSSbouncingblendcircles": {"win": 171, "linux": 171, "osx": 254},
"CSSbouncingfiltercircles": {"win": 189, "linux": 189, "osx": 189},
"CSSbouncingSVGimages": {"win": 329, "linux": 329, "osx": 392},
"CSSbouncingtaggedimages": {"win": 255, "linux": 255, "osx": 351},
"Leaves20": {"win": 262, "linux": 262, "osx": 191},
"Focus20": {"win": 15, "linux": 15, "osx": 18},
"DOMparticlesSVGmasks": {"win": 390, "linux": 390, "osx": 54},
"CompositedTransforms": {"win": 400, "linux": 400, "osx": 75}
}
}
}

Просмотреть файл

@ -1,4 +1,4 @@
<html>
<html>
<head>
<meta charset="UTF-8"/>
@ -252,7 +252,7 @@ addEventListener("load", init);
<body style="font-family:sans-serif;">
<h4>TART - Tab Animation Regression Tests</h4>
<div id="hide-during-run">
Visit <a href="https://wiki.mozilla.org/Buildbot/Talos/Tests#TART.2FCART">talos/TART</a> for detailed info.<br/>
Visit <a href="https://wiki.mozilla.org/Performance_sheriffing/Talos/Tests#TART">talos/TART</a> for detailed info.<br/>
<ul>
<li><b>If you just opened the browser</b> - give Firefox few seconds to settle down before testing.</li>
<li><button onclick="setASAP()">Set ASAP mode</button> <button onclick="unsetASAP()">Restore default</button> (requires restart to take effect). TART runs best (and in talos) with vsync disabled - to measure maximum throughput (ASAP mode). This means the preferences layout.frame_rate = 0 and docshell.event_starvation_delay_hint = 1</li>

Просмотреть файл

@ -1 +0,0 @@
% chrome://tart/content/tart.html#auto&tests=["customize"]

Просмотреть файл

@ -93,17 +93,8 @@ class TTest(object):
mainthread_io = os.path.join(here, 'mainthread_io.log')
setup.env['MOZ_MAIN_THREAD_IO_LOG'] = mainthread_io
if browser_config['disable_stylo']:
if browser_config['stylothreads']:
raise TalosError('--disable-stylo conflicts with --stylo-threads')
if browser_config['enable_stylo']:
raise TalosError('--disable-stylo conflicts with --enable-stylo')
# As we transition to Stylo, we need to set env vars and output data properly
if browser_config['enable_stylo']:
setup.env['STYLO_FORCE_ENABLED'] = '1'
if browser_config['disable_stylo']:
setup.env['STYLO_FORCE_DISABLED'] = '1'
# Stylo is on by default
setup.env['STYLO_FORCE_ENABLED'] = '1'
# During the Stylo transition, measure different number of threads
if browser_config.get('stylothreads', 0) > 0:

Просмотреть файл

@ -218,7 +218,6 @@ class Test_get_config(object):
cls.argv_tabpaint = '--activeTests tabpaint -e /some/random/path'.split()
cls.argv_tps = '--activeTests tps -e /some/random/path'.split()
cls.argv_tart = '--activeTests tart -e /some/random/path'.split()
cls.argv_cart = '--activeTests cart -e /some/random/path'.split()
cls.argv_damp = '--activeTests damp -e /some/random/path'.split()
cls.argv_glterrain = '--activeTests glterrain -e /some/random/path'.split()
cls.argv_glvideo = '--activeTests glvideo -e /some/random/path'.split()
@ -499,30 +498,6 @@ class Test_get_config(object):
assert test_config['filters'] is not None
assert test_config['unit'] == 'ms'
def test_cart_has_expected_attributes(self):
config = get_config(self.argv_cart)
test_config = config['tests'][0]
assert test_config['name'] == 'cart'
assert test_config['tpmanifest'] != '${talos}/tests/tart/cart.manifest'
assert test_config['tpcycles'] == 1
assert test_config['tppagecycles'] == 25
assert test_config['tploadnocache'] is True
assert test_config['tpmozafterpaint'] is False
assert test_config['gecko_profile_interval'] == 1
assert test_config['gecko_profile_entries'] == 10000000
assert 'win_counters' not in test_config
assert 'w7_counters' not in test_config
assert 'linux_counters' not in test_config
assert 'mac_counters' not in test_config
assert test_config['preferences'] == {
'layout.frame_rate': 0,
'docshell.event_starvation_delay_hint': 1,
'dom.send_after_paint_to_content': False
}
assert test_config['filters'] is not None
assert test_config['unit'] == 'ms'
def test_damp_has_expected_attributes(self):
config = get_config(self.argv_damp)
test_config = config['tests'][0]

Просмотреть файл

@ -1,4 +0,0 @@
[idlharness.html]
[PerformanceObserver interface: operation takeRecords()]
expected: FAIL

Просмотреть файл

@ -1,4 +0,0 @@
[po-takeRecords.html]
[Test PerformanceObserver's takeRecords()]
expected: FAIL

Просмотреть файл

@ -628,6 +628,19 @@ Utilities.extendObject(window.benchmarkController, {
}
var score = dashboard.score;
var item = dashboard._results['iterationsResults'][0];
var fullNames = new Array;
var values = new Array;
for (var suite in item['testsResults']) {
for (var subtest in item['testsResults'][suite.toString()]) {
fullNames.push(suite.toString() + "-" + subtest.toString().replace(/ /g, '_'));
values.push(item['testsResults'][suite.toString()][subtest.toString()]['controller']['average']);
}
}
if (typeof tpRecordTime !== "undefined") {
tpRecordTime(values.join(','), 0, fullNames.join(','));
}
var confidence = ((dashboard.scoreLowerBound / score - 1) * 100).toFixed(2) +
"% / +" + ((dashboard.scoreUpperBound / score - 1) * 100).toFixed(2) + "%";
sectionsManager.setSectionScore("results", score.toFixed(2), confidence);

Просмотреть файл

@ -371,7 +371,7 @@ UnitBezier = Utilities.createClass(
sampleY: function(t)
{
return ((this._a.y * t + this._b.y) * t + this._c.y) * t;kkkj
return ((this._a.y * t + this._b.y) * t + this._c.y) * t;
},
sampleDerivativeX: function(t)

Просмотреть файл

@ -32,8 +32,7 @@ tags = blocklist
skip-if = os == "android"
tags = blocklist
[test_bootstrap.js]
# Bug 676992: test consistently hangs on Android
skip-if = os == "android" || os == "win" # Bug 1358846
skip-if = true # Bug 1358846 Bug 1365021 Bug 676992
[test_bootstrap_const.js]
[test_bootstrap_resource.js]
[test_bug299716.js]

Просмотреть файл

@ -160,7 +160,6 @@
#ifdef XP_WIN
#include <process.h>
#include <shlobj.h>
#include "mozilla/CertAnnotator.h"
#include "mozilla/WinDllServices.h"
#include "nsThreadUtils.h"
#include <comdef.h>
@ -4315,8 +4314,6 @@ XREMain::XRE_mainRun()
auto dllServicesDisable = MakeScopeExit([&dllServices]() {
dllServices->Disable();
});
mozilla::CertAnnotator::Register();
#endif // defined(XP_WIN)
#ifdef NS_FUNCTION_TIMER