зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-inbound to mozilla-central. a=merge
This commit is contained in:
Коммит
707a0b3f74
|
@ -251,7 +251,7 @@ class AndroidPresentor {
|
|||
const currentAcc = currentContext.accessibleForBounds;
|
||||
if (Utils.isAliveAndVisible(currentAcc)) {
|
||||
return [{
|
||||
eventType: AndroidEvents.WINDOW_STATE_CHANGED,
|
||||
eventType: AndroidEvents.WINDOW_CONTENT_CHANGED,
|
||||
bounds: Utils.getBounds(currentAcc)
|
||||
}];
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@
|
|||
<button id="returnButton" class="primary" autocomplete="off">&returnToPreviousPage1.label;</button>
|
||||
<button id="openPortalLoginPageButton" class="primary" autocomplete="off">&openPortalLoginPage.label2;</button>
|
||||
<button id="errorTryAgain" class="primary" autocomplete="off">&retry.label;</button>
|
||||
<button id="advancedButton" autocomplete="off">&continue1.label;</button>
|
||||
<button id="advancedButton" autocomplete="off">&continue2.label;</button>
|
||||
<button id="moreInformationButton" autocomplete="off">&moreInformation.label;</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -195,7 +195,7 @@
|
|||
<button id="advancedPanelReturnButton" class="primary" autocomplete="off">&returnToPreviousPage1.label;</button>
|
||||
<button id="advancedPanelErrorTryAgain" class="primary" autocomplete="off">&retry.label;</button>
|
||||
<div class="exceptionDialogButtonContainer">
|
||||
<button id="exceptionDialogButton">&securityOverride.exceptionButtonLabel;</button>
|
||||
<button id="exceptionDialogButton">&securityOverride.exceptionButton1Label;</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2977,6 +2977,29 @@ var BrowserOnClick = {
|
|||
sslStatus = securityInfo.SSLStatus;
|
||||
let params = { exceptionAdded: false,
|
||||
sslStatus };
|
||||
if (Services.prefs.getBoolPref("browser.security.newcerterrorpage.enabled", false)) {
|
||||
let overrideService = Cc["@mozilla.org/security/certoverride;1"]
|
||||
.getService(Ci.nsICertOverrideService);
|
||||
let flags = 0;
|
||||
if (sslStatus.isUntrusted) {
|
||||
flags |= overrideService.ERROR_UNTRUSTED;
|
||||
}
|
||||
if (sslStatus.isDomainMismatch) {
|
||||
flags |= overrideService.ERROR_MISMATCH;
|
||||
}
|
||||
if (sslStatus.isNotValidAtThisTime) {
|
||||
flags |= overrideService.ERROR_TIME;
|
||||
}
|
||||
let uri = Services.uriFixup.createFixupURI(location, 0);
|
||||
let cert = sslStatus.serverCert;
|
||||
overrideService.rememberValidityOverride(
|
||||
uri.asciiHost, uri.port,
|
||||
cert,
|
||||
flags,
|
||||
true);
|
||||
browser.reload();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
switch (Services.prefs.getIntPref("browser.ssl_override_behavior")) {
|
||||
|
|
|
@ -84,6 +84,32 @@ add_task(async function checkReturnToAboutHome() {
|
|||
}
|
||||
});
|
||||
|
||||
add_task(async function checkExceptionDialogButton() {
|
||||
info("Loading a bad cert page and making sure the exceptionDialogButton directly adds an exception");
|
||||
let tab = await openErrorPage(BAD_CERT);
|
||||
let browser = tab.linkedBrowser;
|
||||
let loaded = BrowserTestUtils.browserLoaded(browser, false, BAD_CERT);
|
||||
info("Clicking the exceptionDialogButton in advanced panel");
|
||||
await ContentTask.spawn(browser, null, async function() {
|
||||
let doc = content.document;
|
||||
let exceptionButton = doc.getElementById("exceptionDialogButton");
|
||||
exceptionButton.click();
|
||||
});
|
||||
|
||||
info("Loading the url after adding exception");
|
||||
await loaded;
|
||||
|
||||
await ContentTask.spawn(browser, null, async function() {
|
||||
let doc = content.document;
|
||||
ok(!doc.documentURI.startsWith("about:certerror"), "Exception has been added");
|
||||
});
|
||||
|
||||
let certOverrideService = Cc["@mozilla.org/security/certoverride;1"]
|
||||
.getService(Ci.nsICertOverrideService);
|
||||
certOverrideService.clearValidityOverride("expired.example.com", -1);
|
||||
BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
add_task(async function checkReturnToPreviousPage() {
|
||||
info("Loading a bad cert page and making sure 'return to previous page' goes back");
|
||||
for (let useFrame of [false, true]) {
|
||||
|
|
|
@ -524,7 +524,9 @@ async function loadBadCertPage(url) {
|
|||
await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
|
||||
content.document.getElementById("exceptionDialogButton").click();
|
||||
});
|
||||
await exceptionDialogResolved;
|
||||
if (!Services.prefs.getBoolPref("browser.security.newcerterrorpage.enabled", false)) {
|
||||
await exceptionDialogResolved;
|
||||
}
|
||||
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
}
|
||||
|
||||
|
|
|
@ -285,7 +285,9 @@ async function loadBadCertPage(url) {
|
|||
await ContentTask.spawn(gBrowser.selectedBrowser, null, async function() {
|
||||
content.document.getElementById("exceptionDialogButton").click();
|
||||
});
|
||||
await exceptionDialogResolved;
|
||||
if (!Services.prefs.getBoolPref("browser.security.newcerterrorpage.enabled", false)) {
|
||||
await exceptionDialogResolved;
|
||||
}
|
||||
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
}
|
||||
|
||||
|
|
|
@ -152,11 +152,13 @@ var Policies = {
|
|||
|
||||
if (param.Default !== undefined ||
|
||||
param.AcceptThirdParty !== undefined ||
|
||||
param.RejectTracker !== undefined ||
|
||||
param.Locked) {
|
||||
const ACCEPT_COOKIES = 0;
|
||||
const REJECT_THIRD_PARTY_COOKIES = 1;
|
||||
const REJECT_ALL_COOKIES = 2;
|
||||
const REJECT_UNVISITED_THIRD_PARTY = 3;
|
||||
const REJECT_TRACKER = 4;
|
||||
|
||||
let newCookieBehavior = ACCEPT_COOKIES;
|
||||
if (param.Default !== undefined && !param.Default) {
|
||||
|
@ -167,6 +169,8 @@ var Policies = {
|
|||
} else if (param.AcceptThirdParty == "from-visited") {
|
||||
newCookieBehavior = REJECT_UNVISITED_THIRD_PARTY;
|
||||
}
|
||||
} else if (param.RejectTracker !== undefined && param.RejectTracker) {
|
||||
newCookieBehavior = REJECT_TRACKER;
|
||||
}
|
||||
|
||||
if (param.Locked) {
|
||||
|
|
|
@ -143,6 +143,10 @@
|
|||
"enum": ["always", "never", "from-visited"]
|
||||
},
|
||||
|
||||
"RejectTracker": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
"ExpireAtSessionEnd": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
|
@ -8,6 +8,8 @@ support-files =
|
|||
policytest.xpi
|
||||
policy_websitefilter_block.html
|
||||
policy_websitefilter_exception.html
|
||||
../../../../../toolkit/components/antitracking/test/browser/page.html
|
||||
../../../../../toolkit/components/antitracking/test/browser/subResources.sjs
|
||||
|
||||
[browser_policies_basic_tests.js]
|
||||
[browser_policies_broken_json.js]
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"use strict";
|
||||
|
||||
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm", {});
|
||||
const {UrlClassifierTestUtils} = ChromeUtils.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
|
||||
XPCOMUtils.defineLazyServiceGetter(Services, "cookies",
|
||||
"@mozilla.org/cookieService;1",
|
||||
"nsICookieService");
|
||||
|
@ -37,6 +38,7 @@ async function test_cookie_settings({
|
|||
cookiesEnabled,
|
||||
thirdPartyCookiesEnabled,
|
||||
cookiesExpireAfterSession,
|
||||
rejectTrackers,
|
||||
cookieSettingsLocked
|
||||
}) {
|
||||
let firstPartyURI = NetUtil.newURI("http://example.com/");
|
||||
|
@ -102,8 +104,41 @@ async function test_cookie_settings({
|
|||
"\"Keep Cookies Until\" Menu disabled status should match expected");
|
||||
});
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
|
||||
if (rejectTrackers) {
|
||||
tab = await BrowserTestUtils.addTab(gBrowser, "http://example.net/browser/browser/components/enterprisepolicies/tests/browser/page.html");
|
||||
let browser = gBrowser.getBrowserForTab(tab);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
await ContentTask.spawn(tab.linkedBrowser, {}, async function() {
|
||||
// Load the script twice
|
||||
{
|
||||
let src = content.document.createElement("script");
|
||||
let p = new content.Promise((resolve, reject) => { src.onload = resolve; src.onerror = reject; });
|
||||
content.document.body.appendChild(src);
|
||||
src.src = "https://tracking.example.org/browser/browser/components/enterprisepolicies/tests/browser/subResources.sjs?what=script";
|
||||
await p;
|
||||
}
|
||||
{
|
||||
let src = content.document.createElement("script");
|
||||
let p = new content.Promise(resolve => { src.onload = resolve; });
|
||||
content.document.body.appendChild(src);
|
||||
src.src = "https://tracking.example.org/browser/browser/components/enterprisepolicies/tests/browser/subResources.sjs?what=script";
|
||||
await p;
|
||||
}
|
||||
});
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
await fetch("https://tracking.example.org/browser/browser/components/enterprisepolicies/tests/browser/subResources.sjs?result&what=script")
|
||||
.then(r => r.text())
|
||||
.then(text => {
|
||||
is(text, 0, "\"Reject Tracker\" pref should match what is expected");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
add_task(async function prepare_tracker_tables() {
|
||||
await UrlClassifierTestUtils.addTestTrackers();
|
||||
});
|
||||
|
||||
add_task(async function test_initial_state() {
|
||||
await test_cookie_settings({
|
||||
cookiesEnabled: true,
|
||||
|
@ -241,6 +276,25 @@ add_task(async function test_cookie_expire() {
|
|||
restore_prefs();
|
||||
});
|
||||
|
||||
add_task(async function test_cookie_reject_trackers() {
|
||||
await setupPolicyEngineWithJson({
|
||||
"policies": {
|
||||
"Cookies": {
|
||||
"RejectTracker": true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
await test_cookie_settings({
|
||||
cookiesEnabled: true,
|
||||
thirdPartyCookiesEnabled: true,
|
||||
cookiesExpireAfterSession: false,
|
||||
rejectTrackers: true,
|
||||
cookieSettingsLocked: false
|
||||
});
|
||||
restore_prefs();
|
||||
});
|
||||
|
||||
add_task(async function test_cookie_expire_locked() {
|
||||
await setupPolicyEngineWithJson({
|
||||
"policies": {
|
||||
|
@ -280,3 +334,7 @@ add_task(async function test_disabled_cookie_expire_locked() {
|
|||
});
|
||||
restore_prefs();
|
||||
});
|
||||
|
||||
add_task(async function prepare_tracker_tables() {
|
||||
await UrlClassifierTestUtils.cleanupTestTrackers();
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<!ENTITY returnToPreviousPage.label "Go Back">
|
||||
<!ENTITY returnToPreviousPage1.label "Go Back (Recommended)">
|
||||
<!ENTITY advanced.label "Advanced">
|
||||
<!ENTITY continue1.label "Continue…">
|
||||
<!ENTITY continue2.label "More…">
|
||||
<!ENTITY moreInformation.label "More Information">
|
||||
|
||||
<!-- Specific error messages -->
|
||||
|
@ -193,6 +193,7 @@ was trying to connect. -->
|
|||
|
||||
|
||||
<!ENTITY securityOverride.exceptionButtonLabel "Add Exception…">
|
||||
<!ENTITY securityOverride.exceptionButton1Label "Accept the Risk and Continue">
|
||||
|
||||
<!ENTITY errorReporting.automatic2 "Report errors like this to help Mozilla identify and block malicious sites">
|
||||
<!ENTITY errorReporting.learnMore "Learn more…">
|
||||
|
|
|
@ -37,13 +37,16 @@ class DevicePixelRatioMenu extends PureComponent {
|
|||
const {
|
||||
displayPixelRatio,
|
||||
onChangePixelRatio,
|
||||
selectedPixelRatio,
|
||||
} = this.props;
|
||||
|
||||
const menuItems = PIXEL_RATIO_PRESET.map(value => {
|
||||
return {
|
||||
label: getFormatStr("responsive.devicePixelRatioOption", value),
|
||||
type: "checkbox",
|
||||
checked: displayPixelRatio === value,
|
||||
checked: selectedPixelRatio.value > 0 ?
|
||||
selectedPixelRatio.value === value :
|
||||
displayPixelRatio === value,
|
||||
click: () => onChangePixelRatio(+value),
|
||||
};
|
||||
});
|
||||
|
|
|
@ -97,7 +97,7 @@ support-files =
|
|||
redirect_to_example.sjs
|
||||
[browser_loadDisallowInherit.js]
|
||||
[browser_loadURI.js]
|
||||
skip-if = verify && !debug && os == 'mac'
|
||||
skip-if = (verify && !debug && os == 'mac') || (os == 'linux') || (os == 'mac') # Bug 1423959
|
||||
[browser_multiple_pushState.js]
|
||||
[browser_onbeforeunload_navigation.js]
|
||||
skip-if = os == 'win' && !debug # bug 1300351
|
||||
|
|
|
@ -127,6 +127,12 @@ public:
|
|||
// unmapped attributes of |aOther|.
|
||||
nsresult EnsureCapacityToClone(const AttrArray& aOther);
|
||||
|
||||
struct InternalAttr
|
||||
{
|
||||
nsAttrName mName;
|
||||
nsAttrValue mValue;
|
||||
};
|
||||
|
||||
private:
|
||||
AttrArray(const AttrArray& aOther) = delete;
|
||||
AttrArray& operator=(const AttrArray& aOther) = delete;
|
||||
|
@ -153,8 +159,6 @@ private:
|
|||
|
||||
bool GrowBy(uint32_t aGrowSize);
|
||||
|
||||
struct InternalAttr;
|
||||
|
||||
// Tries to create an attribute, growing the buffer if needed, with the given
|
||||
// name and value.
|
||||
//
|
||||
|
@ -175,12 +179,6 @@ private:
|
|||
*/
|
||||
nsresult DoUpdateMappedAttrRuleMapper(nsMappedAttributeElement& aElement);
|
||||
|
||||
struct InternalAttr
|
||||
{
|
||||
nsAttrName mName;
|
||||
nsAttrValue mValue;
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Disable MSVC warning 'nonstandard extension used: zero-sized array in struct/union'
|
||||
#pragma warning(push)
|
||||
|
|
|
@ -949,23 +949,12 @@ public:
|
|||
* class attribute). This may be null if there are no classes, but that's not
|
||||
* guaranteed (e.g. we could have class="").
|
||||
*/
|
||||
const nsAttrValue* GetClasses() const {
|
||||
if (MayHaveClass()) {
|
||||
return DoGetClasses();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook for implementing GetClasses. This should only be called if the
|
||||
* ElementMayHaveClass flag is set.
|
||||
*
|
||||
* Public only because Servo needs to call it too, and it ensures the
|
||||
* precondition before calling this.
|
||||
*/
|
||||
const nsAttrValue* DoGetClasses() const
|
||||
const nsAttrValue* GetClasses() const
|
||||
{
|
||||
MOZ_ASSERT(MayHaveClass(), "Unexpected call");
|
||||
if (!MayHaveClass()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (IsSVGElement()) {
|
||||
if (const nsAttrValue* value = GetSVGAnimatedClass()) {
|
||||
return value;
|
||||
|
@ -1967,7 +1956,7 @@ protected:
|
|||
|
||||
private:
|
||||
/**
|
||||
* Slow path for DoGetClasses, this should only be called for SVG elements.
|
||||
* Slow path for GetClasses, this should only be called for SVG elements.
|
||||
*/
|
||||
const nsAttrValue* GetSVGAnimatedClass() const;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class DeclarationBlock;
|
|||
|
||||
#define NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM 12
|
||||
|
||||
#define NS_ATTRVALUE_BASETYPE_MASK (uintptr_t(3))
|
||||
const uintptr_t NS_ATTRVALUE_BASETYPE_MASK = 3;
|
||||
#define NS_ATTRVALUE_POINTERVALUE_MASK (~NS_ATTRVALUE_BASETYPE_MASK)
|
||||
|
||||
#define NS_ATTRVALUE_INTEGERTYPE_BITS 4
|
||||
|
|
|
@ -5670,7 +5670,9 @@ NewObjectIRGenerator::NewObjectIRGenerator(JSContext* cx, HandleScript script,
|
|||
jsbytecode* pc, ICState::Mode mode, JSOp op,
|
||||
HandleObject templateObj)
|
||||
: IRGenerator(cx, script, pc, CacheKind::NewObject, mode),
|
||||
#ifdef JS_CACHEIR_SPEW
|
||||
op_(op),
|
||||
#endif
|
||||
templateObject_(templateObj)
|
||||
{
|
||||
MOZ_ASSERT(templateObject_);
|
||||
|
|
|
@ -1962,7 +1962,9 @@ class MOZ_RAII BinaryArithIRGenerator : public IRGenerator
|
|||
|
||||
class MOZ_RAII NewObjectIRGenerator : public IRGenerator
|
||||
{
|
||||
#ifdef JS_CACHEIR_SPEW
|
||||
JSOp op_;
|
||||
#endif
|
||||
HandleObject templateObject_;
|
||||
|
||||
void trackAttached(const char* name);
|
||||
|
|
|
@ -653,8 +653,8 @@
|
|||
\
|
||||
/*
|
||||
* Pops the top of stack value as 'i', if 'low <= i <= high',
|
||||
* jumps to a 32-bit offset: 'offset[i - low]' from the current bytecode,
|
||||
* jumps to a 32-bit offset: 'len' from the current bytecode if not.
|
||||
* jumps to a 32-bit offset: 'offset[i - low]' from the current bytecode, unless the offset is zero (missing case)
|
||||
* jumps to a 32-bit offset: 'len' from the current bytecode otherwise
|
||||
*
|
||||
* This opcode has variable length.
|
||||
* Category: Statements
|
||||
|
|
|
@ -916,14 +916,6 @@ Gecko_IsBrowserFrame(RawGeckoElementBorrowed aElement)
|
|||
return browserFrame && browserFrame->GetReallyIsBrowser();
|
||||
}
|
||||
|
||||
template <typename Implementor>
|
||||
static nsAtom*
|
||||
AtomAttrValue(Implementor* aElement, nsAtom* aName)
|
||||
{
|
||||
const nsAttrValue* attr = aElement->GetParsedAttr(aName);
|
||||
return attr ? attr->GetAtomValue() : nullptr;
|
||||
}
|
||||
|
||||
template <typename Implementor>
|
||||
static nsAtom*
|
||||
LangValue(Implementor* aElement)
|
||||
|
@ -1074,94 +1066,7 @@ AttrHasSuffix(Implementor* aElement, nsAtom* aNS, nsAtom* aName,
|
|||
return DoMatch(aElement, aNS, aName, match);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether an element contains a class in its class list or not.
|
||||
*/
|
||||
template <typename Implementor>
|
||||
static bool
|
||||
HasClass(Implementor* aElement, nsAtom* aClass, bool aIgnoreCase)
|
||||
{
|
||||
const nsAttrValue* attr = aElement->DoGetClasses();
|
||||
if (!attr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return attr->Contains(aClass, aIgnoreCase ? eIgnoreCase : eCaseMatters);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the class or class list (if any) of the implementor. The calling
|
||||
* convention here is rather hairy, and is optimized for getting Servo the
|
||||
* information it needs for hot calls.
|
||||
*
|
||||
* The return value indicates the number of classes. If zero, neither outparam
|
||||
* is valid. If one, the class_ outparam is filled with the atom of the class.
|
||||
* If two or more, the classList outparam is set to point to an array of atoms
|
||||
* representing the class list.
|
||||
*
|
||||
* The array is borrowed and the atoms are not addrefed. These values can be
|
||||
* invalidated by any DOM mutation. Use them in a tight scope.
|
||||
*/
|
||||
template <typename Implementor>
|
||||
static uint32_t
|
||||
ClassOrClassList(Implementor* aElement, nsAtom** aClass, nsAtom*** aClassList)
|
||||
{
|
||||
const nsAttrValue* attr = aElement->DoGetClasses();
|
||||
if (!attr) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// For class values with only whitespace, Gecko just stores a string. For the
|
||||
// purposes of the style system, there is no class in this case.
|
||||
nsAttrValue::ValueType type = attr->Type();
|
||||
if (MOZ_UNLIKELY(type == nsAttrValue::eString)) {
|
||||
MOZ_ASSERT(nsContentUtils::TrimWhitespace<nsContentUtils::IsHTMLWhitespace>(
|
||||
attr->GetStringValue()).IsEmpty());
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Single tokens are generally stored as an atom. Check that case.
|
||||
if (type == nsAttrValue::eAtom) {
|
||||
*aClass = attr->GetAtomValue();
|
||||
return 1;
|
||||
}
|
||||
|
||||
// At this point we should have an atom array. It is likely, but not
|
||||
// guaranteed, that we have two or more elements in the array.
|
||||
MOZ_ASSERT(type == nsAttrValue::eAtomArray);
|
||||
nsTArray<RefPtr<nsAtom>>* atomArray = attr->GetAtomArrayValue();
|
||||
uint32_t length = atomArray->Length();
|
||||
|
||||
// Special case: zero elements.
|
||||
if (length == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Special case: one element.
|
||||
if (length == 1) {
|
||||
*aClass = atomArray->ElementAt(0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// General case: Two or more elements.
|
||||
//
|
||||
// Note: We could also expose this array as an array of nsCOMPtrs, since
|
||||
// bindgen knows what those look like, and eliminate the reinterpret_cast.
|
||||
// But it's not obvious that that would be preferable.
|
||||
static_assert(sizeof(RefPtr<nsAtom>) == sizeof(nsAtom*), "Bad simplification");
|
||||
static_assert(alignof(RefPtr<nsAtom>) == alignof(nsAtom*), "Bad simplification");
|
||||
|
||||
RefPtr<nsAtom>* elements = atomArray->Elements();
|
||||
nsAtom** rawElements = reinterpret_cast<nsAtom**>(elements);
|
||||
*aClassList = rawElements;
|
||||
return atomArray->Length();
|
||||
}
|
||||
|
||||
#define SERVO_IMPL_ELEMENT_ATTR_MATCHING_FUNCTIONS(prefix_, implementor_) \
|
||||
nsAtom* prefix_##AtomAttrValue(implementor_ aElement, nsAtom* aName) \
|
||||
{ \
|
||||
return AtomAttrValue(aElement, aName); \
|
||||
} \
|
||||
nsAtom* prefix_##LangValue(implementor_ aElement) \
|
||||
{ \
|
||||
return LangValue(aElement); \
|
||||
|
@ -1199,16 +1104,7 @@ ClassOrClassList(Implementor* aElement, nsAtom** aClass, nsAtom*** aClassList)
|
|||
nsAtom* aName, nsAtom* aStr, bool aIgnoreCase) \
|
||||
{ \
|
||||
return AttrHasSuffix(aElement, aNS, aName, aStr, aIgnoreCase); \
|
||||
} \
|
||||
uint32_t prefix_##ClassOrClassList(implementor_ aElement, nsAtom** aClass, \
|
||||
nsAtom*** aClassList) \
|
||||
{ \
|
||||
return ClassOrClassList(aElement, aClass, aClassList); \
|
||||
} \
|
||||
bool prefix_##HasClass(implementor_ aElement, nsAtom* aClass, bool aIgnoreCase)\
|
||||
{ \
|
||||
return HasClass(aElement, aClass, aIgnoreCase); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
SERVO_IMPL_ELEMENT_ATTR_MATCHING_FUNCTIONS(Gecko_, RawGeckoElementBorrowed)
|
||||
|
@ -2969,3 +2865,22 @@ Gecko_IsMainThread()
|
|||
{
|
||||
return NS_IsMainThread();
|
||||
}
|
||||
|
||||
const nsAttrValue*
|
||||
Gecko_GetSVGAnimatedClass(RawGeckoElementBorrowed aElement)
|
||||
{
|
||||
MOZ_ASSERT(aElement->IsSVGElement());
|
||||
return static_cast<const nsSVGElement*>(aElement)->GetAnimatedClassName();
|
||||
}
|
||||
|
||||
bool
|
||||
Gecko_AssertClassAttrValueIsSane(const nsAttrValue* aValue)
|
||||
{
|
||||
MOZ_ASSERT(aValue->Type() == nsAttrValue::eAtom ||
|
||||
aValue->Type() == nsAttrValue::eString ||
|
||||
aValue->Type() == nsAttrValue::eAtomArray);
|
||||
MOZ_ASSERT_IF(aValue->Type() == nsAttrValue::eString,
|
||||
nsContentUtils::TrimWhitespace<nsContentUtils::IsHTMLWhitespace>(
|
||||
aValue->GetStringValue()).IsEmpty());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -200,7 +200,6 @@ bool Gecko_IsBrowserFrame(RawGeckoElementBorrowed element);
|
|||
|
||||
// Attributes.
|
||||
#define SERVO_DECLARE_ELEMENT_ATTR_MATCHING_FUNCTIONS(prefix_, implementor_) \
|
||||
nsAtom* prefix_##AtomAttrValue(implementor_ element, nsAtom* attribute); \
|
||||
nsAtom* prefix_##LangValue(implementor_ element); \
|
||||
bool prefix_##HasAttr(implementor_ element, nsAtom* ns, nsAtom* name); \
|
||||
bool prefix_##AttrEquals(implementor_ element, nsAtom* ns, nsAtom* name, \
|
||||
|
@ -215,11 +214,11 @@ bool Gecko_IsBrowserFrame(RawGeckoElementBorrowed element);
|
|||
bool prefix_##AttrHasPrefix(implementor_ element, nsAtom* ns, \
|
||||
nsAtom* name, nsAtom* str, bool ignore_case); \
|
||||
bool prefix_##AttrHasSuffix(implementor_ element, nsAtom* ns, \
|
||||
nsAtom* name, nsAtom* str, bool ignore_case); \
|
||||
uint32_t prefix_##ClassOrClassList(implementor_ element, nsAtom** class_, \
|
||||
nsAtom*** classList); \
|
||||
bool prefix_##HasClass(implementor_ element, nsAtom* class_, \
|
||||
bool ignore_case);
|
||||
nsAtom* name, nsAtom* str, bool ignore_case);
|
||||
|
||||
bool Gecko_AssertClassAttrValueIsSane(const nsAttrValue*);
|
||||
const nsAttrValue* Gecko_GetSVGAnimatedClass(RawGeckoElementBorrowed);
|
||||
|
||||
|
||||
SERVO_DECLARE_ELEMENT_ATTR_MATCHING_FUNCTIONS(Gecko_, RawGeckoElementBorrowed)
|
||||
SERVO_DECLARE_ELEMENT_ATTR_MATCHING_FUNCTIONS(Gecko_Snapshot,
|
||||
|
@ -653,7 +652,6 @@ nsCSSKeyword Gecko_LookupCSSKeyword(const uint8_t* string, uint32_t len);
|
|||
const char* Gecko_CSSKeywordString(nsCSSKeyword keyword, uint32_t* len);
|
||||
|
||||
bool Gecko_IsDocumentBody(RawGeckoElementBorrowed element);
|
||||
|
||||
// We use an int32_t here instead of a LookAndFeel::ColorID
|
||||
// because forward-declaring a nested enum/struct is impossible
|
||||
nscolor Gecko_GetLookAndFeelSystemColor(int32_t color_id,
|
||||
|
|
|
@ -197,6 +197,7 @@ rusty-enums = [
|
|||
whitelist-vars = [
|
||||
"NS_AUTHOR_SPECIFIED_.*",
|
||||
"NS_THEME_.*",
|
||||
"NS_ATTRVALUE_.*",
|
||||
"NODE_.*",
|
||||
"ELEMENT_.*",
|
||||
"NS_FONT_.*",
|
||||
|
@ -476,6 +477,7 @@ structs-types = [
|
|||
"mozilla::StyleDisplayMode",
|
||||
"ServoRawOffsetArc",
|
||||
"DeclarationBlockMutationClosure",
|
||||
"nsAttrValue",
|
||||
"nsIContent",
|
||||
"nsINode",
|
||||
"nsIDocument",
|
||||
|
|
|
@ -19,23 +19,6 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
/**
|
||||
* A structure representing a single attribute name and value.
|
||||
*
|
||||
* This is pretty similar to the private nsAttrAndChildArray::InternalAttr.
|
||||
*/
|
||||
struct ServoAttrSnapshot
|
||||
{
|
||||
nsAttrName mName;
|
||||
nsAttrValue mValue;
|
||||
|
||||
ServoAttrSnapshot(const nsAttrName& aName, const nsAttrValue& aValue)
|
||||
: mName(aName)
|
||||
, mValue(aValue)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* A bitflags enum class used to determine what data does a ServoElementSnapshot
|
||||
* contains.
|
||||
|
@ -151,12 +134,6 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
const nsAttrValue* DoGetClasses() const
|
||||
{
|
||||
MOZ_ASSERT(HasAttrs());
|
||||
return &mClass;
|
||||
}
|
||||
|
||||
bool IsInChromeDocument() const { return mIsInChromeDocument; }
|
||||
bool SupportsLangAttr() const { return mSupportsLangAttr; }
|
||||
|
||||
|
@ -179,7 +156,7 @@ private:
|
|||
// we're dealing with attribute changes when we take snapshots of attributes,
|
||||
// though it can be wasted space if we deal with a lot of state-only
|
||||
// snapshots.
|
||||
nsTArray<ServoAttrSnapshot> mAttrs;
|
||||
nsTArray<AttrArray::InternalAttr> mAttrs;
|
||||
nsAttrValue mClass;
|
||||
ServoStateType mState;
|
||||
Flags mContains;
|
||||
|
@ -220,7 +197,7 @@ ServoElementSnapshot::AddAttrs(const Element& aElement,
|
|||
for (uint32_t i = 0; i < attrCount; ++i) {
|
||||
const BorrowedAttrInfo info = aElement.GetAttrInfoAt(i);
|
||||
MOZ_ASSERT(info);
|
||||
mAttrs.AppendElement(ServoAttrSnapshot { *info.mName, *info.mValue });
|
||||
mAttrs.AppendElement(AttrArray::InternalAttr { *info.mName, *info.mValue });
|
||||
}
|
||||
|
||||
mContains |= Flags::Attributes;
|
||||
|
|
|
@ -396,7 +396,7 @@ class RefTest(object):
|
|||
|
||||
# Enable tracing output for detailed failures in case of
|
||||
# failing connection attempts, and hangs (bug 1397201)
|
||||
prefs["marionette.log.level"] = "TRACE"
|
||||
prefs["marionette.log.level"] = "Trace"
|
||||
|
||||
# Third, set preferences passed in via the command line.
|
||||
for v in options.extraPrefs:
|
||||
|
|
|
@ -75,7 +75,7 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
fun onTextSelectionChanged(event: AccessibilityEvent) { }
|
||||
fun onTextChanged(event: AccessibilityEvent) { }
|
||||
fun onTextTraversal(event: AccessibilityEvent) { }
|
||||
fun onWinStateChanged(event: AccessibilityEvent) { }
|
||||
fun onWinContentChanged(event: AccessibilityEvent) { }
|
||||
}
|
||||
|
||||
@Before fun setup() {
|
||||
|
@ -104,7 +104,7 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED -> newDelegate.onTextSelectionChanged(event)
|
||||
AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED -> newDelegate.onTextChanged(event)
|
||||
AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY -> newDelegate.onTextTraversal(event)
|
||||
AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED -> newDelegate.onWinStateChanged(event)
|
||||
AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED -> newDelegate.onWinContentChanged(event)
|
||||
else -> {}
|
||||
}
|
||||
return false
|
||||
|
@ -508,7 +508,7 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
}
|
||||
|
||||
@AssertCalled(count = 1, order = [3])
|
||||
override fun onWinStateChanged(event: AccessibilityEvent) {
|
||||
override fun onWinContentChanged(event: AccessibilityEvent) {
|
||||
nodeId = getSourceId(event)
|
||||
assertThat("Focused node is onscreen", screenContainsNode(nodeId), equalTo(true))
|
||||
}
|
||||
|
@ -522,7 +522,7 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
}
|
||||
|
||||
@AssertCalled(count = 1, order = [2])
|
||||
override fun onWinStateChanged(event: AccessibilityEvent) {
|
||||
override fun onWinContentChanged(event: AccessibilityEvent) {
|
||||
nodeId = getSourceId(event)
|
||||
assertThat("Focused node is still onscreen", screenContainsNode(nodeId), equalTo(true))
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
}
|
||||
|
||||
@AssertCalled(count = 1, order = [2])
|
||||
override fun onWinStateChanged(event: AccessibilityEvent) {
|
||||
override fun onWinContentChanged(event: AccessibilityEvent) {
|
||||
nodeId = getSourceId(event)
|
||||
assertThat("Focused node is offscreen", screenContainsNode(nodeId), equalTo(false))
|
||||
}
|
||||
|
@ -556,7 +556,7 @@ class AccessibilityTest : BaseSessionTest() {
|
|||
}
|
||||
|
||||
@AssertCalled(count = 1, order = [3])
|
||||
override fun onWinStateChanged(event: AccessibilityEvent) {
|
||||
override fun onWinContentChanged(event: AccessibilityEvent) {
|
||||
nodeId = getSourceId(event)
|
||||
assertThat("Focused node is onscreen", screenContainsNode(nodeId), equalTo(true))
|
||||
}
|
||||
|
|
|
@ -2309,7 +2309,7 @@ private:
|
|||
nsCOMPtr<nsISupportsString> mUnicodeString;
|
||||
};
|
||||
|
||||
class nsRelativeFilePref : public nsIRelativeFilePref
|
||||
class nsRelativeFilePref final : public nsIRelativeFilePref
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -2668,11 +2668,9 @@ nsPrefBranch::GetComplexValue(const char* aPrefName,
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRelativeFilePref> relativePref;
|
||||
rv = NS_NewRelativeFilePref(theFile, key, getter_AddRefs(relativePref));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
nsCOMPtr<nsIRelativeFilePref> relativePref = new nsRelativeFilePref();
|
||||
Unused << relativePref->SetFile(theFile);
|
||||
Unused << relativePref->SetRelativeToKey(key);
|
||||
|
||||
relativePref.forget(reinterpret_cast<nsIRelativeFilePref**>(aRetVal));
|
||||
return NS_OK;
|
||||
|
@ -6085,11 +6083,9 @@ StaticPrefs::InitAll(bool aIsStartup)
|
|||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(Preferences,
|
||||
Preferences::GetInstanceForService)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrefLocalizedString, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRelativeFilePref)
|
||||
|
||||
static NS_DEFINE_CID(kPrefServiceCID, NS_PREFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kPrefLocalizedStringCID, NS_PREFLOCALIZEDSTRING_CID);
|
||||
static NS_DEFINE_CID(kRelativeFilePrefCID, NS_RELATIVEFILEPREF_CID);
|
||||
|
||||
static mozilla::Module::CIDEntry kPrefCIDs[] = {
|
||||
{ &kPrefServiceCID, true, nullptr, PreferencesConstructor },
|
||||
|
@ -6097,14 +6093,12 @@ static mozilla::Module::CIDEntry kPrefCIDs[] = {
|
|||
false,
|
||||
nullptr,
|
||||
nsPrefLocalizedStringConstructor },
|
||||
{ &kRelativeFilePrefCID, false, nullptr, nsRelativeFilePrefConstructor },
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
static mozilla::Module::ContractIDEntry kPrefContracts[] = {
|
||||
{ NS_PREFSERVICE_CONTRACTID, &kPrefServiceCID },
|
||||
{ NS_PREFLOCALIZEDSTRING_CONTRACTID, &kPrefLocalizedStringCID },
|
||||
{ NS_RELATIVEFILEPREF_CONTRACTID, &kRelativeFilePrefCID },
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ interface nsIFile;
|
|||
*
|
||||
*/
|
||||
|
||||
[scriptable, uuid(2f977d4e-5485-11d4-87e2-0010a4e75ef2)]
|
||||
[uuid(2f977d4e-5485-11d4-87e2-0010a4e75ef2)]
|
||||
interface nsIRelativeFilePref : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -36,34 +36,3 @@ interface nsIRelativeFilePref : nsISupports
|
|||
attribute ACString relativeToKey;
|
||||
|
||||
};
|
||||
|
||||
%{C++
|
||||
|
||||
#define NS_RELATIVEFILEPREF_CID \
|
||||
{ /* {2f977d4f-5485-11d4-87e2-0010a4e75ef2} */ \
|
||||
0x2f977d4f, \
|
||||
0x5485, \
|
||||
0x11d4, \
|
||||
{ 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 } \
|
||||
}
|
||||
|
||||
#define NS_RELATIVEFILEPREF_CONTRACTID "@mozilla.org/pref-relativefile;1"
|
||||
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
inline nsresult
|
||||
NS_NewRelativeFilePref(nsIFile* aFile, const nsACString& relativeToKey, nsIRelativeFilePref** result)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIRelativeFilePref> local(do_CreateInstance(NS_RELATIVEFILEPREF_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
(void)local->SetFile(aFile);
|
||||
(void)local->SetRelativeToKey(relativeToKey);
|
||||
|
||||
*result = local;
|
||||
NS_ADDREF(*result);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
%}
|
||||
|
|
|
@ -51,10 +51,6 @@ impl GeckoElementSnapshot {
|
|||
(self.mContains as u8 & flags as u8) != 0
|
||||
}
|
||||
|
||||
fn as_ptr(&self) -> *const Self {
|
||||
self
|
||||
}
|
||||
|
||||
/// Returns true if the snapshot has stored state for pseudo-classes
|
||||
/// that depend on things other than `ElementState`.
|
||||
#[inline]
|
||||
|
@ -184,14 +180,7 @@ impl ElementSnapshot for GeckoElementSnapshot {
|
|||
return None;
|
||||
}
|
||||
|
||||
let ptr = unsafe { bindings::Gecko_SnapshotAtomAttrValue(self, atom!("id").as_ptr()) };
|
||||
|
||||
// FIXME(emilio): This should assert, since this flag is exact.
|
||||
if ptr.is_null() {
|
||||
None
|
||||
} else {
|
||||
Some(unsafe { WeakAtom::new(ptr) })
|
||||
}
|
||||
snapshot_helpers::get_id(&*self.mAttrs)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -200,12 +189,7 @@ impl ElementSnapshot for GeckoElementSnapshot {
|
|||
return false;
|
||||
}
|
||||
|
||||
snapshot_helpers::has_class(
|
||||
self.as_ptr(),
|
||||
name,
|
||||
case_sensitivity,
|
||||
bindings::Gecko_SnapshotHasClass,
|
||||
)
|
||||
snapshot_helpers::has_class(name, case_sensitivity, &self.mClass)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -217,11 +201,7 @@ impl ElementSnapshot for GeckoElementSnapshot {
|
|||
return;
|
||||
}
|
||||
|
||||
snapshot_helpers::each_class(
|
||||
self.as_ptr(),
|
||||
callback,
|
||||
bindings::Gecko_SnapshotClassOrClassList,
|
||||
)
|
||||
snapshot_helpers::each_class(&self.mClass, callback)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -4,58 +4,114 @@
|
|||
|
||||
//! Element an snapshot common logic.
|
||||
|
||||
use gecko_bindings::structs::nsAtom;
|
||||
use CaseSensitivityExt;
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::structs::{self, nsAtom};
|
||||
use selectors::attr::CaseSensitivity;
|
||||
use std::{ptr, slice};
|
||||
use string_cache::Atom;
|
||||
use string_cache::{Atom, WeakAtom};
|
||||
|
||||
/// A function that, given an element of type `T`, allows you to get a single
|
||||
/// class or a class list.
|
||||
pub type ClassOrClassList<T> =
|
||||
unsafe extern "C" fn(T, *mut *mut nsAtom, *mut *mut *mut nsAtom) -> u32;
|
||||
enum Class<'a> {
|
||||
None,
|
||||
One(*const nsAtom),
|
||||
More(&'a [structs::RefPtr<nsAtom>]),
|
||||
}
|
||||
|
||||
/// A function to return whether an element of type `T` has a given class.
|
||||
///
|
||||
/// The `bool` argument represents whether it should compare case-insensitively
|
||||
/// or not.
|
||||
pub type HasClass<T> = unsafe extern "C" fn(T, *mut nsAtom, bool) -> bool;
|
||||
|
||||
/// Given an item `T`, a class name, and a getter function, return whether that
|
||||
/// element has the class that `name` represents.
|
||||
#[inline(always)]
|
||||
pub fn has_class<T>(
|
||||
item: T,
|
||||
fn base_type(attr: &structs::nsAttrValue) -> structs::nsAttrValue_ValueBaseType {
|
||||
(attr.mBits & structs::NS_ATTRVALUE_BASETYPE_MASK) as structs::nsAttrValue_ValueBaseType
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
unsafe fn ptr<T>(attr: &structs::nsAttrValue) -> *const T {
|
||||
(attr.mBits & !structs::NS_ATTRVALUE_BASETYPE_MASK) as *const T
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
unsafe fn get_class_from_attr(attr: &structs::nsAttrValue) -> Class {
|
||||
debug_assert!(bindings::Gecko_AssertClassAttrValueIsSane(attr));
|
||||
let base_type = base_type(attr);
|
||||
if base_type == structs::nsAttrValue_ValueBaseType_eStringBase {
|
||||
return Class::None;
|
||||
}
|
||||
if base_type == structs::nsAttrValue_ValueBaseType_eAtomBase {
|
||||
return Class::One(ptr::<nsAtom>(attr));
|
||||
}
|
||||
debug_assert_eq!(base_type, structs::nsAttrValue_ValueBaseType_eOtherBase);
|
||||
|
||||
let container = ptr::<structs::MiscContainer>(attr);
|
||||
debug_assert_eq!((*container).mType, structs::nsAttrValue_ValueType_eAtomArray);
|
||||
let array =
|
||||
(*container).__bindgen_anon_1.mValue.as_ref().__bindgen_anon_1.mAtomArray.as_ref();
|
||||
Class::More(&***array)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
unsafe fn get_id_from_attr(attr: &structs::nsAttrValue) -> &WeakAtom {
|
||||
debug_assert_eq!(base_type(attr), structs::nsAttrValue_ValueBaseType_eAtomBase);
|
||||
WeakAtom::new(ptr::<nsAtom>(attr))
|
||||
}
|
||||
|
||||
/// Find an attribute value with a given name and no namespace.
|
||||
#[inline(always)]
|
||||
pub fn find_attr<'a>(
|
||||
attrs: &'a [structs::AttrArray_InternalAttr],
|
||||
name: &Atom,
|
||||
) -> Option<&'a structs::nsAttrValue> {
|
||||
attrs.iter()
|
||||
.find(|attr| attr.mName.mBits == name.as_ptr() as usize)
|
||||
.map(|attr| &attr.mValue)
|
||||
}
|
||||
|
||||
/// Finds the id attribute from a list of attributes.
|
||||
#[inline(always)]
|
||||
pub fn get_id(attrs: &[structs::AttrArray_InternalAttr]) -> Option<&WeakAtom> {
|
||||
Some(unsafe { get_id_from_attr(find_attr(attrs, &atom!("id"))?) })
|
||||
}
|
||||
|
||||
/// Given a class name, a case sensitivity, and an array of attributes, returns
|
||||
/// whether the class has the attribute that name represents.
|
||||
#[inline(always)]
|
||||
pub fn has_class(
|
||||
name: &Atom,
|
||||
case_sensitivity: CaseSensitivity,
|
||||
getter: HasClass<T>,
|
||||
attr: &structs::nsAttrValue,
|
||||
) -> bool {
|
||||
let ignore_case = match case_sensitivity {
|
||||
CaseSensitivity::CaseSensitive => false,
|
||||
CaseSensitivity::AsciiCaseInsensitive => true,
|
||||
};
|
||||
|
||||
unsafe { getter(item, name.as_ptr(), ignore_case) }
|
||||
match unsafe { get_class_from_attr(attr) } {
|
||||
Class::None => false,
|
||||
Class::One(atom) => unsafe {
|
||||
case_sensitivity.eq_atom(name, WeakAtom::new(atom))
|
||||
},
|
||||
Class::More(atoms) => {
|
||||
match case_sensitivity {
|
||||
CaseSensitivity::CaseSensitive => {
|
||||
atoms.iter().any(|atom| atom.mRawPtr == name.as_ptr())
|
||||
}
|
||||
CaseSensitivity::AsciiCaseInsensitive => unsafe {
|
||||
atoms.iter().any(|atom| WeakAtom::new(atom.mRawPtr).eq_ignore_ascii_case(name))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Given an item, a callback, and a getter, execute `callback` for each class
|
||||
/// this `item` has.
|
||||
pub fn each_class<F, T>(item: T, mut callback: F, getter: ClassOrClassList<T>)
|
||||
#[inline(always)]
|
||||
pub fn each_class<F>(attr: &structs::nsAttrValue, mut callback: F)
|
||||
where
|
||||
F: FnMut(&Atom),
|
||||
{
|
||||
unsafe {
|
||||
let mut class: *mut nsAtom = ptr::null_mut();
|
||||
let mut list: *mut *mut nsAtom = ptr::null_mut();
|
||||
let length = getter(item, &mut class, &mut list);
|
||||
match length {
|
||||
0 => {},
|
||||
1 => Atom::with(class, callback),
|
||||
n => {
|
||||
let classes = slice::from_raw_parts(list, n as usize);
|
||||
for c in classes {
|
||||
Atom::with(*c, &mut callback)
|
||||
match get_class_from_attr(attr) {
|
||||
Class::None => {},
|
||||
Class::One(atom) => Atom::with(atom, callback),
|
||||
Class::More(atoms) => {
|
||||
for atom in atoms {
|
||||
Atom::with(atom.mRawPtr, &mut callback)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ use gecko_bindings::bindings;
|
|||
use gecko_bindings::bindings::{Gecko_ElementState, Gecko_GetDocumentLWTheme};
|
||||
use gecko_bindings::bindings::{Gecko_GetLastChild, Gecko_GetPreviousSibling, Gecko_GetNextStyleChild};
|
||||
use gecko_bindings::bindings::{Gecko_SetNodeFlags, Gecko_UnsetNodeFlags};
|
||||
use gecko_bindings::bindings::Gecko_ClassOrClassList;
|
||||
use gecko_bindings::bindings::Gecko_ElementHasAnimations;
|
||||
use gecko_bindings::bindings::Gecko_ElementHasCSSAnimations;
|
||||
use gecko_bindings::bindings::Gecko_ElementHasCSSTransitions;
|
||||
|
@ -581,6 +580,34 @@ impl<'le> fmt::Debug for GeckoElement<'le> {
|
|||
}
|
||||
|
||||
impl<'le> GeckoElement<'le> {
|
||||
#[inline(always)]
|
||||
fn attrs(&self) -> &[structs::AttrArray_InternalAttr] {
|
||||
unsafe {
|
||||
let attrs = match self.0._base.mAttrs.mImpl.mPtr.as_ref() {
|
||||
Some(attrs) => attrs,
|
||||
None => return &[],
|
||||
};
|
||||
|
||||
attrs.mBuffer.as_slice(attrs.mAttrCount as usize)
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn get_class_attr(&self) -> Option<&structs::nsAttrValue> {
|
||||
if !self.may_have_class() {
|
||||
return None;
|
||||
}
|
||||
|
||||
if self.is_svg_element() {
|
||||
let svg_class = unsafe { bindings::Gecko_GetSVGAnimatedClass(self.0).as_ref() };
|
||||
if let Some(c) = svg_class {
|
||||
return Some(c)
|
||||
}
|
||||
}
|
||||
|
||||
snapshot_helpers::find_attr(self.attrs(), &atom!("class"))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn closest_anon_subtree_root_parent(&self) -> Option<Self> {
|
||||
debug_assert!(self.is_in_native_anonymous_subtree());
|
||||
|
@ -1281,26 +1308,19 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
return None;
|
||||
}
|
||||
|
||||
let ptr = unsafe { bindings::Gecko_AtomAttrValue(self.0, atom!("id").as_ptr()) };
|
||||
|
||||
// FIXME(emilio): Pretty sure the has_id flag is exact and we could
|
||||
// assert here.
|
||||
if ptr.is_null() {
|
||||
None
|
||||
} else {
|
||||
Some(unsafe { WeakAtom::new(ptr) })
|
||||
}
|
||||
snapshot_helpers::get_id(self.attrs())
|
||||
}
|
||||
|
||||
fn each_class<F>(&self, callback: F)
|
||||
where
|
||||
F: FnMut(&Atom),
|
||||
{
|
||||
if !self.may_have_class() {
|
||||
return;
|
||||
}
|
||||
let attr = match self.get_class_attr() {
|
||||
Some(c) => c,
|
||||
None => return,
|
||||
};
|
||||
|
||||
snapshot_helpers::each_class(self.0, callback, Gecko_ClassOrClassList)
|
||||
snapshot_helpers::each_class(attr, callback)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -2265,24 +2285,22 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
|
|||
return false;
|
||||
}
|
||||
|
||||
unsafe {
|
||||
let ptr = bindings::Gecko_AtomAttrValue(self.0, atom!("id").as_ptr());
|
||||
let element_id = match snapshot_helpers::get_id(self.attrs()) {
|
||||
Some(id) => id,
|
||||
None => return false,
|
||||
};
|
||||
|
||||
if ptr.is_null() {
|
||||
false
|
||||
} else {
|
||||
case_sensitivity.eq_atom(WeakAtom::new(ptr), id)
|
||||
}
|
||||
}
|
||||
case_sensitivity.eq_atom(element_id, id)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool {
|
||||
if !self.may_have_class() {
|
||||
return false;
|
||||
}
|
||||
let attr = match self.get_class_attr() {
|
||||
Some(c) => c,
|
||||
None => return false,
|
||||
};
|
||||
|
||||
snapshot_helpers::has_class(self.0, name, case_sensitivity, bindings::Gecko_HasClass)
|
||||
snapshot_helpers::has_class(name, case_sensitivity, attr)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -263,7 +263,7 @@ impl fmt::Display for WeakAtom {
|
|||
|
||||
impl Atom {
|
||||
/// Execute a callback with the atom represented by `ptr`.
|
||||
pub unsafe fn with<F, R>(ptr: *mut nsAtom, callback: F) -> R
|
||||
pub unsafe fn with<F, R>(ptr: *const nsAtom, callback: F) -> R
|
||||
where
|
||||
F: FnOnce(&Atom) -> R,
|
||||
{
|
||||
|
|
|
@ -347,7 +347,7 @@ it will be removed once the interactability checks have been stabilized.
|
|||
<code>info</code>, <code>warn</code>,
|
||||
<code>error</code>, and <code>fatal</code>.
|
||||
If left undefined the default is <code>info</code>.
|
||||
The value is treated case-insensitively.
|
||||
The value is case-insensitive.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -27,14 +27,16 @@
|
|||
//! [`init`]: fn.init.html
|
||||
//! [`init_with_level`]: fn.init_with_level.html
|
||||
|
||||
use chrono;
|
||||
use log;
|
||||
use std::fmt;
|
||||
use std::io;
|
||||
use std::io::Write;
|
||||
use std::str;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||
|
||||
use chrono;
|
||||
use log;
|
||||
use mozprofile::preferences::Pref;
|
||||
|
||||
static MAX_LOG_LEVEL: AtomicUsize = ATOMIC_USIZE_INIT;
|
||||
const LOGGED_TARGETS: &'static [&'static str] = &[
|
||||
"geckodriver",
|
||||
|
@ -122,6 +124,21 @@ impl Into<log::Level> for Level {
|
|||
}
|
||||
}
|
||||
|
||||
impl Into<Pref> for Level {
|
||||
fn into(self) -> Pref {
|
||||
use self::Level::*;
|
||||
Pref::new(match self {
|
||||
Fatal => "Fatal",
|
||||
Error => "Error",
|
||||
Warn => "Warn",
|
||||
Info => "Info",
|
||||
Config => "Config",
|
||||
Debug => "Debug",
|
||||
Trace => "Trace",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl From<log::Level> for Level {
|
||||
fn from(log_level: log::Level) -> Level {
|
||||
use log::Level::*;
|
||||
|
@ -195,11 +212,14 @@ fn format_ts(ts: chrono::DateTime<chrono::Local>) -> String {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{format_ts, init_with_level, max_level, set_max_level, Level};
|
||||
use chrono;
|
||||
use log;
|
||||
|
||||
use std::str::FromStr;
|
||||
use std::sync::Mutex;
|
||||
|
||||
use chrono;
|
||||
use log;
|
||||
use mozprofile::preferences::{Pref, PrefValue};
|
||||
|
||||
lazy_static! {
|
||||
static ref LEVEL_MUTEX: Mutex<()> = Mutex::new(());
|
||||
}
|
||||
|
@ -246,6 +266,24 @@ mod tests {
|
|||
assert_eq!(Into::<log::Level>::into(Level::Trace), log::Level::Trace);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_level_into_pref() {
|
||||
let tests = [
|
||||
(Level::Fatal, "Fatal"),
|
||||
(Level::Error, "Error"),
|
||||
(Level::Warn, "Warn"),
|
||||
(Level::Info, "Info"),
|
||||
(Level::Config, "Config"),
|
||||
(Level::Debug, "Debug"),
|
||||
(Level::Trace, "Trace"),
|
||||
];
|
||||
|
||||
for &(lvl, s) in tests.iter() {
|
||||
let expected = Pref { value: PrefValue::String(s.to_string()), sticky: false };
|
||||
assert_eq!(Into::<Pref>::into(lvl), expected);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_level_from_str() {
|
||||
assert_eq!(Level::from_str("fatal"), Ok(Level::Fatal));
|
||||
|
|
|
@ -486,12 +486,19 @@ impl MarionetteHandler {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_prefs(&self, port: u16, profile: &mut Profile, custom_profile: bool,
|
||||
extra_prefs: Vec<(String, Pref)>)
|
||||
-> WebDriverResult<()> {
|
||||
let prefs = try!(profile.user_prefs()
|
||||
.map_err(|_| WebDriverError::new(ErrorStatus::UnknownError,
|
||||
"Unable to read profile preferences file")));
|
||||
pub fn set_prefs(
|
||||
&self,
|
||||
port: u16,
|
||||
profile: &mut Profile,
|
||||
custom_profile: bool,
|
||||
extra_prefs: Vec<(String, Pref)>,
|
||||
) -> WebDriverResult<()> {
|
||||
let prefs = profile.user_prefs().map_err(|_| {
|
||||
WebDriverError::new(
|
||||
ErrorStatus::UnknownError,
|
||||
"Unable to read profile preferences file",
|
||||
)
|
||||
})?;
|
||||
|
||||
for &(ref name, ref value) in prefs::DEFAULT.iter() {
|
||||
if !custom_profile || !prefs.contains_key(name) {
|
||||
|
@ -509,11 +516,12 @@ impl MarionetteHandler {
|
|||
prefs.insert("marionette.debugging.clicktostart", Pref::new(true));
|
||||
}
|
||||
|
||||
prefs.insert("marionette.log.level", Pref::new(logging::max_level().to_string()));
|
||||
prefs.insert("marionette.log.level", logging::max_level().into());
|
||||
prefs.insert("marionette.port", Pref::new(port));
|
||||
|
||||
prefs.write().map_err(|_| WebDriverError::new(ErrorStatus::UnknownError,
|
||||
"Unable to write Firefox profile"))
|
||||
prefs.write().map_err(|_| {
|
||||
WebDriverError::new(ErrorStatus::UnknownError, "Unable to write Firefox profile")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ const {
|
|||
} = ChromeUtils.import("chrome://marionette/content/error.js", {});
|
||||
ChromeUtils.import("chrome://marionette/content/event.js");
|
||||
const {pprint} = ChromeUtils.import("chrome://marionette/content/format.js", {});
|
||||
const {Sleep} = ChromeUtils.import("chrome://marionette/content/sync.js", {});
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["action"];
|
||||
|
||||
|
@ -1410,8 +1411,8 @@ function performOnePointerMove(inputState, targetX, targetY, win) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Dispatch a pause action equivalent waiting for |a.duration|
|
||||
* milliseconds, or a default time interval of |tickDuration|.
|
||||
* Dispatch a pause action equivalent waiting for `a.duration`
|
||||
* milliseconds, or a default time interval of `tickDuration`.
|
||||
*
|
||||
* @param {action.Action} a
|
||||
* Action to dispatch.
|
||||
|
@ -1422,11 +1423,8 @@ function performOnePointerMove(inputState, targetX, targetY, win) {
|
|||
* Promise that is resolved after the specified time interval.
|
||||
*/
|
||||
function dispatchPause(a, tickDuration) {
|
||||
const timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
let duration = typeof a.duration == "undefined" ? tickDuration : a.duration;
|
||||
return new Promise(resolve =>
|
||||
timer.initWithCallback(resolve, duration, Ci.nsITimer.TYPE_ONE_SHOT)
|
||||
);
|
||||
let ms = typeof a.duration == "undefined" ? tickDuration : a.duration;
|
||||
return Sleep(ms);
|
||||
}
|
||||
|
||||
// helpers
|
||||
|
|
|
@ -269,7 +269,7 @@ class GeckoInstance(object):
|
|||
args["preferences"].update(self.prefs)
|
||||
|
||||
if self.verbose:
|
||||
level = "TRACE" if self.verbose >= 2 else "DEBUG"
|
||||
level = "Trace" if self.verbose >= 2 else "Debug"
|
||||
args["preferences"]["marionette.log.level"] = level
|
||||
args["preferences"]["marionette.logging"] = level
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ Sets the verbosity level of the Marionette logger repository. Note
|
|||
that this preference does not control the verbosity of other loggers
|
||||
used in Firefox or Fennec.
|
||||
|
||||
The available levels are, in descending order of severity, `trace`,
|
||||
The available levels are, in descending order of severity, `Trace`,
|
||||
`debug`, `config`, `info`, `warn`, `error`, and `fatal`. The value
|
||||
is treated case-insensitively.
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@ const loadListener = {
|
|||
const winID = subject.QueryInterface(Ci.nsISupportsPRUint64).data;
|
||||
const curWinID = win.windowUtils.outerWindowID;
|
||||
|
||||
logger.debug(`Received observer notification ${topic} for ${winID}`);
|
||||
logger.debug(`Received observer notification ${topic}`);
|
||||
|
||||
switch (topic) {
|
||||
// In the case when the currently selected frame is closed,
|
||||
|
|
|
@ -4,15 +4,11 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
const StdLog = ChromeUtils.import("resource://gre/modules/Log.jsm", {}).Log;
|
||||
|
||||
const {MarionettePrefs} = ChromeUtils.import("chrome://marionette/content/prefs.js", {});
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["Log"];
|
||||
|
||||
const isChildProcess = Services.appinfo.processType ==
|
||||
Services.appinfo.PROCESS_TYPE_CONTENT;
|
||||
const PREF_LOG_LEVEL = "marionette.log.level";
|
||||
|
||||
/**
|
||||
* Shorthand for accessing the Marionette logging repository.
|
||||
|
@ -22,12 +18,9 @@ const isChildProcess = Services.appinfo.processType ==
|
|||
* appropriate stdout dumper and with the correct log level.
|
||||
*
|
||||
* Unlike `Log.jsm` this logger is E10s safe, meaning repository
|
||||
* configuration for appenders and logging levels are communicated
|
||||
* across processes.
|
||||
*
|
||||
* @name Log
|
||||
* configuration is communicated across processes.
|
||||
*/
|
||||
class MarionetteLog {
|
||||
class Log {
|
||||
/**
|
||||
* Obtain the `Marionette` logger.
|
||||
*
|
||||
|
@ -40,8 +33,8 @@ class MarionetteLog {
|
|||
let logger = StdLog.repository.getLogger("Marionette");
|
||||
if (logger.ownAppenders.length == 0) {
|
||||
logger.addAppender(new StdLog.DumpAppender());
|
||||
logger.manageLevelFromPref(PREF_LOG_LEVEL);
|
||||
}
|
||||
logger.level = MarionettePrefs.logLevel;
|
||||
return logger;
|
||||
}
|
||||
|
||||
|
@ -50,7 +43,7 @@ class MarionetteLog {
|
|||
*
|
||||
* Unlike {@link LoggerRepository.getLoggerWithMessagePrefix()}
|
||||
* this function will ensure invoke {@link #get()} first to ensure
|
||||
* the logger has been properly set up first.
|
||||
* the logger has been properly set up.
|
||||
*
|
||||
* This returns a new object with a prototype chain that chains
|
||||
* up the original {@link Logger} instance. The new prototype has
|
||||
|
@ -67,28 +60,4 @@ class MarionetteLog {
|
|||
}
|
||||
}
|
||||
|
||||
class ParentProcessLog extends MarionetteLog {
|
||||
static get() {
|
||||
let logger = super.get();
|
||||
Services.ppmm.initialProcessData["Marionette:Log"] = {level: logger.level};
|
||||
return logger;
|
||||
}
|
||||
}
|
||||
|
||||
class ChildProcessLog extends MarionetteLog {
|
||||
static get() {
|
||||
let logger = super.get();
|
||||
|
||||
// Log.jsm is not e10s compatible (see https://bugzil.la/1411513)
|
||||
// so loading it in a new child process will reset the repository config
|
||||
logger.level = Services.cpmm.initialProcessData["Marionette:Log"] || StdLog.Level.Info;
|
||||
|
||||
return logger;
|
||||
}
|
||||
}
|
||||
|
||||
if (isChildProcess) {
|
||||
this.Log = ChildProcessLog;
|
||||
} else {
|
||||
this.Log = ParentProcessLog;
|
||||
}
|
||||
this.Log = Log;
|
||||
|
|
|
@ -188,6 +188,8 @@ class MarionetteBranch extends Branch {
|
|||
* @return {Log.Level}
|
||||
*/
|
||||
get logLevel() {
|
||||
// TODO: when geckodriver's minimum supported Firefox version reaches 62,
|
||||
// the lower-casing here can be dropped (https://bugzil.la/1482829)
|
||||
switch (this.get("log.level", "info").toLowerCase()) {
|
||||
case "fatal":
|
||||
return Log.Level.Fatal;
|
||||
|
|
|
@ -19,7 +19,7 @@ pref("marionette.debugging.clicktostart", false);
|
|||
// Available levels are, in descending order of severity,
|
||||
// "trace", "debug", "config", "info", "warn", "error", and "fatal".
|
||||
// The value is treated case-insensitively.
|
||||
pref("marionette.log.level", "info");
|
||||
pref("marionette.log.level", "Info");
|
||||
|
||||
// Certain log messages that are known to be long are truncated
|
||||
// before they are dumped to stdout. The `marionette.log.truncate`
|
||||
|
|
|
@ -1909,7 +1909,7 @@ toolbar#nav-bar {
|
|||
"idle.lastDailyNotification": int(time.time()),
|
||||
# Enable tracing output for detailed failures in case of
|
||||
# failing connection attempts, and hangs (bug 1397201)
|
||||
"marionette.log.level": "TRACE",
|
||||
"marionette.log.level": "Trace",
|
||||
}
|
||||
|
||||
if options.flavor == 'browser' and options.timeout:
|
||||
|
|
|
@ -23,6 +23,7 @@ config = {
|
|||
# from android_common.py
|
||||
"download_tooltool": True,
|
||||
"download_minidump_stackwalk": True,
|
||||
"minidump_stackwalk_path": "linux64-minidump_stackwalk",
|
||||
"tooltool_servers": ['https://tooltool.mozilla-releng.net/'],
|
||||
# minidump_tooltool_manifest_path is relative to workspace/build/tests/
|
||||
"minidump_tooltool_manifest_path": "config/tooltool-manifests/linux64/releng.manifest",
|
||||
|
|
|
@ -120,7 +120,7 @@ class SingleTestMixin(object):
|
|||
self.info("Per-test run (non-gpu) discarded gpu test %s (%s)" % (file, entry[1]))
|
||||
continue
|
||||
|
||||
self.info("Per-test run found test %s (%s)" % (file, entry[0]))
|
||||
self.info("Per-test run found test %s (%s/%s)" % (file, entry[0], entry[1]))
|
||||
subsuite_mapping = {
|
||||
# Map (<suite>, <subsuite>): <full-suite>
|
||||
# <suite> is associated with a manifest, explicitly in code above
|
||||
|
@ -165,6 +165,7 @@ class SingleTestMixin(object):
|
|||
tests_root = os.path.join(dirs['abs_wpttest_dir'], "tests")
|
||||
man_path = os.path.join(dirs['abs_wpttest_dir'], "meta", "MANIFEST.json")
|
||||
man = wptmanifest.manifest.load(tests_root, man_path)
|
||||
self.info("Per-test run updated with manifest %s" % man_path)
|
||||
|
||||
repo_tests_path = os.path.join("testing", "web-platform", "tests")
|
||||
tests_path = os.path.join("tests", "web-platform", "tests")
|
||||
|
@ -334,9 +335,11 @@ class SingleTestMixin(object):
|
|||
if self.verify_enabled or self.per_test_coverage:
|
||||
if self.config.get('per_test_category') == "web-platform":
|
||||
suites = self.suites.keys()
|
||||
self.info("Per-test suites: %s" % suites)
|
||||
elif all_suites and self.tests_downloaded:
|
||||
suites = dict((key, all_suites.get(key)) for key in
|
||||
self.suites if key in all_suites.keys())
|
||||
self.info("Per-test suites: %s" % suites)
|
||||
else:
|
||||
# Until test zips are downloaded, manifests are not available,
|
||||
# so it is not possible to determine which suites are active/
|
||||
|
|
|
@ -106,7 +106,6 @@ class AndroidHardwareTest(TestingMixin, BaseScript, MozbaseMixin,
|
|||
self.test_packages_url = c.get('test_packages_url')
|
||||
self.test_manifest = c.get('test_manifest')
|
||||
self.robocop_path = os.path.join(abs_dirs['abs_work_dir'], "robocop.apk")
|
||||
self.minidump_stackwalk_path = c.get("minidump_stackwalk_path")
|
||||
self.device_name = os.environ['DEVICE_NAME']
|
||||
self.device_serial = os.environ['DEVICE_SERIAL']
|
||||
self.device_ip = os.environ['DEVICE_IP']
|
||||
|
|
|
@ -289562,6 +289562,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/mst-content-hint.idl": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/navigation-timing.idl": [
|
||||
[
|
||||
{}
|
||||
|
@ -289667,6 +289672,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/reporting.idl": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"interfaces/requestidlecallback.idl": [
|
||||
[
|
||||
{}
|
||||
|
@ -291377,6 +291387,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"mst-content-hint/META.yml": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"navigation-timing/META.yml": [
|
||||
[
|
||||
{}
|
||||
|
@ -294772,6 +294787,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"reporting/META.yml": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"requestidlecallback/META.yml": [
|
||||
[
|
||||
{}
|
||||
|
@ -350312,13 +350332,9 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"feature-policy/interfaces.any.js": [
|
||||
"feature-policy/idlharness.window.js": [
|
||||
[
|
||||
"/feature-policy/interfaces.any.html",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"/feature-policy/interfaces.any.worker.html",
|
||||
"/feature-policy/idlharness.window.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -358504,6 +358520,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/src-repeated-in-ancestor.html": [
|
||||
[
|
||||
"/html/semantics/embedded-content/the-iframe-element/src-repeated-in-ancestor.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"html/semantics/embedded-content/the-img-element/Image-constructor.html": [
|
||||
[
|
||||
"/html/semantics/embedded-content/the-img-element/Image-constructor.html",
|
||||
|
@ -368014,6 +368036,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"mst-content-hint/idlharness.window.js": [
|
||||
[
|
||||
"/mst-content-hint/idlharness.window.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"navigation-timing/idlharness.window.js": [
|
||||
[
|
||||
"/navigation-timing/idlharness.window.html",
|
||||
|
@ -387718,6 +387746,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"reporting/idlharness.window.js": [
|
||||
[
|
||||
"/reporting/idlharness.window.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"requestidlecallback/basic.html": [
|
||||
[
|
||||
"/requestidlecallback/basic.html",
|
||||
|
@ -395396,15 +395430,23 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"webgl/webgl1-idlharness.window.js": [
|
||||
"webgl/webgl1-idlharness.any.js": [
|
||||
[
|
||||
"/webgl/webgl1-idlharness.window.html",
|
||||
"/webgl/webgl1-idlharness.any.html",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"/webgl/webgl1-idlharness.any.worker.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"webgl/webgl2-idlharness.window.js": [
|
||||
"webgl/webgl2-idlharness.any.js": [
|
||||
[
|
||||
"/webgl/webgl2-idlharness.window.html",
|
||||
"/webgl/webgl2-idlharness.any.html",
|
||||
{}
|
||||
],
|
||||
[
|
||||
"/webgl/webgl2-idlharness.any.worker.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -584591,8 +584633,8 @@
|
|||
"961d40336aeb3ed04c58b9a8b6196b3393cb92d5",
|
||||
"support"
|
||||
],
|
||||
"feature-policy/interfaces.any.js": [
|
||||
"baebc2ff0c86e2eafe92811df9e41f2d67eb7662",
|
||||
"feature-policy/idlharness.window.js": [
|
||||
"fb17cab982acecdb7d8aadcc02544bc7cae1a2bb",
|
||||
"testharness"
|
||||
],
|
||||
"feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
|
||||
|
@ -599167,6 +599209,10 @@
|
|||
"4e6293949a0d9a799e6b3bb627fa181e29fe0b2c",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/src-repeated-in-ancestor.html": [
|
||||
"2f77dfe164df3737cbbabf4efce6e28028e62537",
|
||||
"testharness"
|
||||
],
|
||||
"html/semantics/embedded-content/the-iframe-element/stash.py": [
|
||||
"0b8693a901152cc7a7f21de1fbdd191dce6078c3",
|
||||
"support"
|
||||
|
@ -605960,7 +606006,7 @@
|
|||
"support"
|
||||
],
|
||||
"interfaces/feature-policy.idl": [
|
||||
"34d92778624f4ea314a2ab2dfc146bc8da51df3d",
|
||||
"de2f0464683394194f347c7155c38ad48bfc190c",
|
||||
"support"
|
||||
],
|
||||
"interfaces/fetch.idl": [
|
||||
|
@ -606067,6 +606113,10 @@
|
|||
"5bf661e6cc5e2141181fef1f01eafa6e4da82248",
|
||||
"support"
|
||||
],
|
||||
"interfaces/mst-content-hint.idl": [
|
||||
"15e17cf5364c83fc70bf373cd7f500c13b153b5f",
|
||||
"support"
|
||||
],
|
||||
"interfaces/navigation-timing.idl": [
|
||||
"7e76a35661734881d4c11432e15668223c788dee",
|
||||
"support"
|
||||
|
@ -606151,6 +606201,10 @@
|
|||
"8321e59fb632bb078c7df7d2831cbddba9e1a50c",
|
||||
"support"
|
||||
],
|
||||
"interfaces/reporting.idl": [
|
||||
"e9800365c4c03e9d98990de54bdf0fede7690448",
|
||||
"support"
|
||||
],
|
||||
"interfaces/requestidlecallback.idl": [
|
||||
"812cc0ef81533136f537b2591cf6c1774bf525ba",
|
||||
"support"
|
||||
|
@ -606256,11 +606310,11 @@
|
|||
"support"
|
||||
],
|
||||
"interfaces/webgl1.idl": [
|
||||
"fce2cdf032875d9182ce2d927ba52a8153e1c2da",
|
||||
"bab7d421da02399e8006466a395eee113904e04d",
|
||||
"support"
|
||||
],
|
||||
"interfaces/webgl2.idl": [
|
||||
"b8f5b23bf65b68c4e93ae3a64a2c0661345cc3e0",
|
||||
"11d0d8c2a3be65e2286387cb3ff727a0cf5e376a",
|
||||
"support"
|
||||
],
|
||||
"interfaces/webmidi.idl": [
|
||||
|
@ -609503,6 +609557,14 @@
|
|||
"b0fff36eb94609ac24a76121bf9e201234885db1",
|
||||
"testharness"
|
||||
],
|
||||
"mst-content-hint/META.yml": [
|
||||
"7f79eccbaa6b9950233ee8968c6b358dd89b5d03",
|
||||
"support"
|
||||
],
|
||||
"mst-content-hint/idlharness.window.js": [
|
||||
"0d9137dc6fb91b1499d922e01d6ad96049f5757b",
|
||||
"testharness"
|
||||
],
|
||||
"navigation-timing/META.yml": [
|
||||
"c09a6e03fd19f5a405b391c2c4671df6ff04edf1",
|
||||
"support"
|
||||
|
@ -609780,7 +609842,7 @@
|
|||
"manual"
|
||||
],
|
||||
"notifications/idlharness.https.any.js": [
|
||||
"e2907f318373cb7a975bd8be3167701b74550416",
|
||||
"0b9a71ba85ad09d6ab2068c70ff61c337eb0b1a0",
|
||||
"testharness"
|
||||
],
|
||||
"notifications/instance.html": [
|
||||
|
@ -625987,6 +626049,14 @@
|
|||
"851558b06f211ac2cda5d38b1d447a2e0475586d",
|
||||
"testharness"
|
||||
],
|
||||
"reporting/META.yml": [
|
||||
"980823f59f7e3ac4f35a31ab6df37ce16e538f54",
|
||||
"support"
|
||||
],
|
||||
"reporting/idlharness.window.js": [
|
||||
"17cef8183596ae1d0b307fb8ddccc7455b955966",
|
||||
"testharness"
|
||||
],
|
||||
"requestidlecallback/META.yml": [
|
||||
"9c829d3c8885bb9b594e7096a878166e07f3e278",
|
||||
"support"
|
||||
|
@ -626520,7 +626590,7 @@
|
|||
"support"
|
||||
],
|
||||
"resources/chromium/webxr-test.js": [
|
||||
"d760e7c76d3050973e365021766cb00488b16156",
|
||||
"10ed703e01b7efe434333a9c69ac27be1aa0cc08",
|
||||
"support"
|
||||
],
|
||||
"resources/chromium/webxr-test.js.headers": [
|
||||
|
@ -630192,7 +630262,7 @@
|
|||
"support"
|
||||
],
|
||||
"service-workers/service-worker/navigation-preload/resources/resource-timing-worker.js": [
|
||||
"46af6456aec3d368db3527a8331f4c70f5c84550",
|
||||
"fac0d8de2a7361aa2f55fdcde87b969a952b92d8",
|
||||
"support"
|
||||
],
|
||||
"service-workers/service-worker/navigation-preload/resources/wait-for-activate-worker.js": [
|
||||
|
@ -636412,7 +636482,7 @@
|
|||
"support"
|
||||
],
|
||||
"svg/render/reftests/blending-001.svg": [
|
||||
"2278019cc736eeb517e5f4f619211e5ce0847cf1",
|
||||
"f8fcf9fae49363d94157b1a5c9c50e8d6c997d15",
|
||||
"reftest"
|
||||
],
|
||||
"svg/render/reftests/blending-002-ref.svg": [
|
||||
|
@ -636420,7 +636490,7 @@
|
|||
"support"
|
||||
],
|
||||
"svg/render/reftests/blending-002.svg": [
|
||||
"01e180f23a5b35b27e80ceee39087e1fa3118c6b",
|
||||
"d74333c96fd7e4974bebf51544e961c63f3f2cea",
|
||||
"reftest"
|
||||
],
|
||||
"svg/rendering/order/z-index-ref.svg": [
|
||||
|
@ -642660,7 +642730,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/tests/test_wpttest.py": [
|
||||
"ff7c260f9d4182a75de33e1e248d01781ee9197e",
|
||||
"827244cda3c5cc94d2bdb8becad1fe5c5253828b",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/update/__init__.py": [
|
||||
|
@ -642728,7 +642798,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/wptmanifest/parser.py": [
|
||||
"9763670663f9198433f611cf76b5b2db1221d0e2",
|
||||
"82aad5f61350795eb9e807ca33015762e1a9f581",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/wptmanifest/serializer.py": [
|
||||
|
@ -642744,11 +642814,11 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/wptmanifest/tests/test_parser.py": [
|
||||
"765c984f42f56d4b888a5a5eb8171474852ffbe3",
|
||||
"87ddfeed891742519c59b33aa0806f635c16a5cc",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py": [
|
||||
"6908ea4c1e020dd1aafdd8da14f387c7c48c000e",
|
||||
"f7c3ca24c709f1b462700de45decf0a51de8949a",
|
||||
"support"
|
||||
],
|
||||
"tools/wptrunner/wptrunner/wptmanifest/tests/test_static.py": [
|
||||
|
@ -643044,7 +643114,7 @@
|
|||
"support"
|
||||
],
|
||||
"tools/wptserve/wptserve/server.py": [
|
||||
"353835ee84f2bbe0c36837cddad6794de11b7fa8",
|
||||
"8370cca0d3872f5e9f0fe65a40049b5c4065cb91",
|
||||
"support"
|
||||
],
|
||||
"tools/wptserve/wptserve/sslutils/__init__.py": [
|
||||
|
@ -647647,11 +647717,11 @@
|
|||
"f75cbcb99724219224c63d0dc595b1c001298500",
|
||||
"testharness"
|
||||
],
|
||||
"webgl/webgl1-idlharness.window.js": [
|
||||
"webgl/webgl1-idlharness.any.js": [
|
||||
"884def896cb4d1c987f678c1d9e71aa157773e70",
|
||||
"testharness"
|
||||
],
|
||||
"webgl/webgl2-idlharness.window.js": [
|
||||
"webgl/webgl2-idlharness.any.js": [
|
||||
"97edfa18285daeeb35a2bf563981283b6399fde4",
|
||||
"testharness"
|
||||
],
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
[idlharness.window.html]
|
||||
[FeaturePolicyViolationReportBody interface: attribute columnNumber]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLIFrameElement interface: attribute policy]
|
||||
expected: FAIL
|
||||
|
||||
[Stringification of document.policy]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface: attribute sourceFile]
|
||||
expected: FAIL
|
||||
|
||||
[Policy interface: document.policy must inherit property "getAllowlistForFeature(DOMString)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface: existence and properties of interface prototype object's @@unscopables property]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface: attribute featureId]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[Policy interface: document.policy must inherit property "allowedFeatures()" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface: attribute lineNumber]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[Policy interface: calling allowsFeature(DOMString, DOMString) on document.policy with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[Policy interface: document.policy must inherit property "allowsFeature(DOMString, DOMString)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface: attribute disposition]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: document must inherit property "policy" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Policy interface: calling getAllowlistForFeature(DOMString) on document.policy with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[Document interface: attribute policy]
|
||||
expected: FAIL
|
||||
|
||||
[FeaturePolicyViolationReportBody interface: attribute message]
|
||||
expected: FAIL
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
local: f24cf42797825e1592e2c9ba62a0b2ecd504fcce
|
||||
upstream: 412533bbf031caa727d9b2ab67d04fab8d32b9d7
|
||||
local: efc8a30d564a50e754dbe5a02ad4a9dc2b7f6f72
|
||||
upstream: 09dfd6ac13134a85e77db24d87574458e9e3c67e
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
[idlharness.window.html]
|
||||
[MediaStreamTrack interface: videoTrack must inherit property "contentHint" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[MediaStreamTrack interface: attribute contentHint]
|
||||
expected: FAIL
|
||||
|
||||
[MediaStreamTrack interface: audioTrack must inherit property "contentHint" with the proper type]
|
||||
expected: FAIL
|
||||
|
|
@ -73,9 +73,6 @@ prefs: [dom.webnotifications.requireinteraction.enabled:true]
|
|||
[Notification interface: notification must inherit property "silent" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[idl_test setup]
|
||||
expected: FAIL
|
||||
|
||||
[Notification interface: notification must inherit property "onerror" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,166 @@
|
|||
[idlharness.window.html]
|
||||
[ReportingObserver interface: operation disconnect()]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[ReportBody interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: attribute lineNumber]
|
||||
expected: FAIL
|
||||
|
||||
[Report interface: attribute body]
|
||||
expected: FAIL
|
||||
|
||||
[Report interface: existence and properties of interface prototype object's @@unscopables property]
|
||||
expected: FAIL
|
||||
|
||||
[ReportBody interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[ReportingObserver interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: attribute anticipatedRemoval]
|
||||
expected: FAIL
|
||||
|
||||
[ReportingObserver interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[CrashReportBody interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[CrashReportBody interface: existence and properties of interface prototype object's @@unscopables property]
|
||||
expected: FAIL
|
||||
|
||||
[Report interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: attribute message]
|
||||
expected: FAIL
|
||||
|
||||
[CrashReportBody interface: attribute reason]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: attribute columnNumber]
|
||||
expected: FAIL
|
||||
|
||||
[Report interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[ReportingObserver interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface: attribute lineNumber]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: existence and properties of interface prototype object's @@unscopables property]
|
||||
expected: FAIL
|
||||
|
||||
[ReportBody interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[ReportingObserver interface: operation takeRecords()]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface: attribute id]
|
||||
expected: FAIL
|
||||
|
||||
[CrashReportBody interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[Report interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[ReportingObserver interface: operation observe()]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface: attribute columnNumber]
|
||||
expected: FAIL
|
||||
|
||||
[Report interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[CrashReportBody interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface: existence and properties of interface prototype object's @@unscopables property]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: attribute sourceFile]
|
||||
expected: FAIL
|
||||
|
||||
[Report interface: attribute type]
|
||||
expected: FAIL
|
||||
|
||||
[CrashReportBody interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: attribute id]
|
||||
expected: FAIL
|
||||
|
||||
[CrashReportBody interface: attribute crashId]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[Report interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[CrashReportBody interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[ReportBody interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[ReportBody interface: existence and properties of interface prototype object's @@unscopables property]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface: attribute message]
|
||||
expected: FAIL
|
||||
|
||||
[ReportBody interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[DeprecationReportBody interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[InterventionReportBody interface: attribute sourceFile]
|
||||
expected: FAIL
|
||||
|
||||
[ReportingObserver interface: existence and properties of interface prototype object's @@unscopables property]
|
||||
expected: FAIL
|
||||
|
||||
[ReportingObserver interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[ReportingObserver interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[Report interface: attribute url]
|
||||
expected: FAIL
|
||||
|
|
@ -4,4 +4,3 @@
|
|||
if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): PASS
|
||||
if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): PASS
|
||||
if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): PASS
|
||||
FAIL
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): PASS
|
||||
if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): PASS
|
||||
if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): PASS
|
||||
FAIL
|
||||
if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
|
|
|
@ -62,3 +62,12 @@
|
|||
[X 5.1: Channel 1 expected to be equal to the array [0,0,2.400212526321411,1.8464009761810303,1.2422339916229248,0.5788586139678955,0.3615038990974426,0.16441935300827026,-0.742911696434021,-1.530196189880371,-1.8989348411560059,-0.7277186512947083,0.010559797286987305,0.7105643153190613,1.748615026473999,0.26711004972457886...\] but differs in 1050 places:\n\tIndex\tActual\t\t\tExpected\n\t[0\]\t-5.9604644775390625e-8\t0.0000000000000000e+0\n\t[1\]\t7.0780515670776367e-8\t0.0000000000000000e+0\n\t[2\]\t2.4002122879028320e+0\t2.4002125263214111e+0\n\t[3\]\t1.8464007377624512e+0\t1.8464009761810303e+0\n\t...and 1046 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
[# AUDIT TASK RUNNER FINISHED: 5 out of 6 tasks were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[< [1-channel input\] 1 out of 2 assertions were failed.]
|
||||
expected: FAIL
|
||||
|
||||
[X 1: Channel 1: Expected 0 for all values but found 1279 unexpected values: \n\tIndex\tActual\n\t[1\]\t-2.9802322387695312e-8\n\t[2\]\t0.33110618591308594\n\t[3\]\t0.6248594522476196\n\t[4\]\t0.8481202721595764\n\t...and 1275 more errors.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
"use strict";
|
||||
|
||||
// https://wicg.github.io/feature-policy/
|
||||
|
||||
idl_test(
|
||||
['feature-policy'],
|
||||
['reporting', 'html', 'dom'],
|
||||
idl_array => {
|
||||
idl_array.add_objects({
|
||||
Document: ['document'],
|
||||
HTMLIframeElement: ['document.createElement("iframe")'],
|
||||
Policy: ['document.policy'],
|
||||
})
|
||||
}
|
||||
);
|
|
@ -1,23 +0,0 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
"use strict";
|
||||
|
||||
// https://wicg.github.io/feature-policy/
|
||||
|
||||
var idlArray = new IdlArray();
|
||||
|
||||
function doTest(idl) {
|
||||
idlArray.add_untested_idls("interface HTMLIFrameElement {};");
|
||||
idlArray.add_idls(idl);
|
||||
idlArray.add_objects({
|
||||
HTMLIframeElement: ['document.createElement("iframe")'],
|
||||
})
|
||||
idlArray.test();
|
||||
done();
|
||||
}
|
||||
|
||||
promise_test(function () {
|
||||
return fetch("/interfaces/feature-policy.idl").then(response => response.text())
|
||||
.then(doTest);
|
||||
}, "Test interfaces");
|
|
@ -0,0 +1,138 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Navigation should not occur when `src` matches the location of a anscestor browsing context</title>
|
||||
<script>
|
||||
// Avoid recursion in non-conforming browsers
|
||||
if (parent !== window && parent.title == window.title) {
|
||||
window.stop();
|
||||
}
|
||||
</script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<script>
|
||||
/**
|
||||
* This test uses the `beforeunload` event to detect navigation. Because that
|
||||
* event is fired synchronously in response to "process the iframe attributes",
|
||||
* a second "control" iframe may be used to verify cases where navigation
|
||||
* should *not* occur. `Promise.race` ensures that tests complete as soon as
|
||||
* possible.
|
||||
*
|
||||
* Although the specification dictates that the `beforeunload` event must be
|
||||
* emitted synchronously during navigation, a number of user agents do not
|
||||
* adhere to this requirement. WPT includes a dedicated test for synchronous
|
||||
* emission of the event [1]. This test is authored to support non-standard
|
||||
* behavior in order to avoid spuriously passing in those UAs.
|
||||
*
|
||||
* [1] https://github.com/web-platform-tests/wpt/pull/12343
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
function when(target, eventName) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
target.addEventListener(eventName, function() {
|
||||
resolve();
|
||||
}, { once: true });
|
||||
target.addEventListener('error', function() {
|
||||
reject(new Error('Error while waiting for ' + eventName));
|
||||
}, { once: true });
|
||||
});
|
||||
}
|
||||
|
||||
function init(doc, t) {
|
||||
var iframes = [doc.createElement('iframe'), doc.createElement('iframe')];
|
||||
|
||||
iframes.forEach(function(iframe) {
|
||||
iframe.src = '/common/blank.html';
|
||||
doc.body.appendChild(iframe);
|
||||
|
||||
t.add_cleanup(function() {
|
||||
iframe.parentNode.removeChild(iframe);
|
||||
});
|
||||
});
|
||||
|
||||
return Promise.all([when(iframes[0], 'load'), when(iframes[1], 'load')])
|
||||
.then(function() { return iframes; });
|
||||
}
|
||||
|
||||
// This test verifies that navigation does occur; it is intended to validate
|
||||
// the utility functions.
|
||||
promise_test(function(t) {
|
||||
return init(document, t)
|
||||
.then(function(iframes) {
|
||||
var subjectNavigation = when(iframes[0].contentWindow, 'beforeunload');
|
||||
var controlNavigation = when(iframes[1].contentWindow, 'beforeunload');
|
||||
|
||||
iframes[0].src = '/common/blank.html?2';
|
||||
iframes[1].src = '/common/blank.html?3';
|
||||
|
||||
return Promise.all([subjectNavigation, controlNavigation]);
|
||||
});
|
||||
}, 'different path name');
|
||||
|
||||
promise_test(function(t) {
|
||||
return init(document, t)
|
||||
.then(function(iframes) {
|
||||
var subjectNavigation = when(iframes[0].contentWindow, 'beforeunload');
|
||||
var controlNavigation = when(iframes[1].contentWindow, 'beforeunload');
|
||||
|
||||
iframes[0].src = location.href;
|
||||
iframes[1].src = '/common/blank.html?4';
|
||||
|
||||
return Promise.race([
|
||||
subjectNavigation.then(function() {
|
||||
assert_unreached('Should not navigate');
|
||||
}),
|
||||
controlNavigation
|
||||
]);
|
||||
});
|
||||
}, 'same path name, no document fragment');
|
||||
|
||||
promise_test(function(t) {
|
||||
return init(document, t)
|
||||
.then(function(iframes) {
|
||||
var subjectNavigation = when(iframes[0].contentWindow, 'beforeunload');
|
||||
var controlNavigation = when(iframes[1].contentWindow, 'beforeunload');
|
||||
|
||||
iframes[0].src = location.href + '#something-else';
|
||||
iframes[1].src = '/common/blank.html?5';
|
||||
|
||||
return Promise.race([
|
||||
subjectNavigation.then(function() {
|
||||
assert_unreached('Should not navigate');
|
||||
}),
|
||||
controlNavigation
|
||||
]);
|
||||
});
|
||||
}, 'same path name, different document fragment');
|
||||
|
||||
promise_test(function(t) {
|
||||
var intermediate = document.createElement('iframe');
|
||||
|
||||
document.body.appendChild(intermediate);
|
||||
|
||||
t.add_cleanup(function() {
|
||||
intermediate.parentNode.removeChild(intermediate);
|
||||
});
|
||||
intermediate.contentDocument.open();
|
||||
intermediate.contentDocument.write('<body></body>');
|
||||
intermediate.contentDocument.close();
|
||||
|
||||
return init(intermediate.contentDocument, t)
|
||||
.then(function(iframes) {
|
||||
var subjectNavigation = when(iframes[0].contentWindow, 'beforeunload');
|
||||
var controlNavigation = when(iframes[1].contentWindow, 'beforeunload');
|
||||
|
||||
iframes[0].src = location.href;
|
||||
iframes[1].src = '/common/blank.html?6';
|
||||
|
||||
return Promise.race([
|
||||
subjectNavigation.then(function() {
|
||||
assert_unreached('Should not navigate');
|
||||
}),
|
||||
controlNavigation
|
||||
]);
|
||||
});
|
||||
}, 'same path name, no document fragement (intermediary browsing context)');
|
||||
</script>
|
||||
</body>
|
|
@ -1,8 +1,27 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content of this file was automatically extracted from the
|
||||
// "Feature Policy" spec.
|
||||
// See: https://wicg.github.io/feature-policy/
|
||||
// Content was automatically extracted by Reffy into reffy-reports
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: Feature Policy (https://wicg.github.io/feature-policy/)
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface Policy {
|
||||
boolean allowsFeature(DOMString feature, optional DOMString origin);
|
||||
sequence<DOMString> allowedFeatures();
|
||||
sequence<DOMString> getAllowlistForFeature(DOMString feature);
|
||||
};
|
||||
|
||||
partial interface Document {
|
||||
[SameObject] readonly attribute Policy policy;
|
||||
};
|
||||
|
||||
partial interface HTMLIFrameElement {
|
||||
[CEReactions] attribute DOMString allow;
|
||||
[SameObject] readonly attribute Policy policy;
|
||||
};
|
||||
interface FeaturePolicyViolationReportBody : ReportBody {
|
||||
readonly attribute DOMString featureId;
|
||||
readonly attribute DOMString message;
|
||||
readonly attribute DOMString? sourceFile;
|
||||
readonly attribute long? lineNumber;
|
||||
readonly attribute long? columnNumber;
|
||||
readonly attribute DOMString disposition;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into reffy-reports
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: MediaStreamTrack Content Hints (https://w3c.github.io/mst-content-hint/)
|
||||
|
||||
partial interface MediaStreamTrack {
|
||||
attribute DOMString contentHint;
|
||||
};
|
|
@ -0,0 +1,56 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content was automatically extracted by Reffy into reffy-reports
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: Reporting API 1 (https://w3c.github.io/reporting/)
|
||||
|
||||
interface ReportBody {
|
||||
};
|
||||
|
||||
interface Report {
|
||||
readonly attribute DOMString type;
|
||||
readonly attribute DOMString url;
|
||||
readonly attribute ReportBody? body;
|
||||
};
|
||||
|
||||
[Constructor(ReportingObserverCallback callback, optional ReportingObserverOptions options)]
|
||||
interface ReportingObserver {
|
||||
void observe();
|
||||
void disconnect();
|
||||
ReportList takeRecords();
|
||||
};
|
||||
|
||||
callback ReportingObserverCallback = void (sequence<Report> reports, ReportingObserver observer);
|
||||
|
||||
dictionary ReportingObserverOptions {
|
||||
sequence<DOMString> types;
|
||||
boolean buffered = false;
|
||||
};
|
||||
|
||||
typedef sequence<Report> ReportList;
|
||||
|
||||
interface DeprecationReportBody : ReportBody {
|
||||
readonly attribute DOMString id;
|
||||
readonly attribute Date? anticipatedRemoval;
|
||||
readonly attribute DOMString message;
|
||||
readonly attribute DOMString? sourceFile;
|
||||
readonly attribute unsigned long? lineNumber;
|
||||
readonly attribute unsigned long? columnNumber;
|
||||
};
|
||||
|
||||
interface InterventionReportBody : ReportBody {
|
||||
readonly attribute DOMString id;
|
||||
readonly attribute DOMString message;
|
||||
readonly attribute DOMString? sourceFile;
|
||||
readonly attribute unsigned long? lineNumber;
|
||||
readonly attribute unsigned long? columnNumber;
|
||||
};
|
||||
|
||||
interface CrashReportBody : ReportBody {
|
||||
readonly attribute DOMString crashId;
|
||||
readonly attribute DOMString? reason;
|
||||
};
|
||||
|
||||
dictionary GenerateTestReportParameters {
|
||||
required DOMString message;
|
||||
DOMString group;
|
||||
};
|
|
@ -1,7 +1,7 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content of this file was automatically extracted from the
|
||||
// "WebGL Specification" spec.
|
||||
// See: https://www.khronos.org/registry/webgl/specs/latest/1.0/
|
||||
// Content was automatically extracted by Reffy into reffy-reports
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: WebGL Specification (https://www.khronos.org/registry/webgl/specs/latest/1.0/)
|
||||
|
||||
typedef unsigned long GLenum;
|
||||
typedef boolean GLboolean;
|
||||
|
@ -34,36 +34,46 @@ dictionary WebGLContextAttributes {
|
|||
GLboolean failIfMajorPerformanceCaveat = false;
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLBuffer : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLFramebuffer : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLProgram : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLRenderbuffer : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLShader : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLTexture : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLUniformLocation {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLActiveInfo {
|
||||
readonly attribute GLint size;
|
||||
readonly attribute GLenum type;
|
||||
readonly attribute DOMString name;
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLShaderPrecisionFormat {
|
||||
readonly attribute GLint rangeMin;
|
||||
readonly attribute GLint rangeMax;
|
||||
|
@ -500,7 +510,7 @@ interface mixin WebGLRenderingContextBase
|
|||
const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
|
||||
const GLenum BROWSER_DEFAULT_WEBGL = 0x9244;
|
||||
|
||||
readonly attribute HTMLCanvasElement canvas;
|
||||
[Exposed=Window] readonly attribute HTMLCanvasElement canvas;
|
||||
readonly attribute GLsizei drawingBufferWidth;
|
||||
readonly attribute GLsizei drawingBufferHeight;
|
||||
|
||||
|
@ -708,12 +718,15 @@ interface mixin WebGLRenderingContextBase
|
|||
void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLRenderingContext
|
||||
{
|
||||
};
|
||||
WebGLRenderingContext includes WebGLRenderingContextBase;
|
||||
|
||||
[Constructor(DOMString type, optional WebGLContextEventInit eventInit)]
|
||||
[Exposed=(Window,Worker),
|
||||
Constructor(DOMString type,
|
||||
optional WebGLContextEventInit eventInit)]
|
||||
interface WebGLContextEvent : Event {
|
||||
readonly attribute DOMString statusMessage;
|
||||
};
|
||||
|
|
|
@ -1,23 +1,28 @@
|
|||
// GENERATED CONTENT - DO NOT EDIT
|
||||
// Content of this file was automatically extracted from the
|
||||
// "WebGL 2.0 Specification" spec.
|
||||
// See: https://www.khronos.org/registry/webgl/specs/latest/2.0/
|
||||
// Content was automatically extracted by Reffy into reffy-reports
|
||||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: WebGL 2.0 Specification (https://www.khronos.org/registry/webgl/specs/latest/2.0/)
|
||||
|
||||
typedef long long GLint64;
|
||||
typedef unsigned long long GLuint64;
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLQuery : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLSampler : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLSync : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLTransformFeedback : WebGLObject {
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLVertexArrayObject : WebGLObject {
|
||||
};
|
||||
|
||||
|
@ -567,6 +572,7 @@ interface mixin WebGL2RenderingContextBase
|
|||
void bindVertexArray(WebGLVertexArrayObject? array);
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGL2RenderingContext
|
||||
{
|
||||
};
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
spec: https://w3c.github.io/mst-content-hint/
|
||||
suggested_reviewers:
|
||||
- alvestrand
|
|
@ -0,0 +1,19 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
// META: script=/webrtc/RTCPeerConnection-helper.js
|
||||
|
||||
'use strict';
|
||||
|
||||
idl_test(
|
||||
['mst-content-hint'],
|
||||
['mediacapture-streams', 'dom'],
|
||||
async idl_array => {
|
||||
idl_array.add_objects({
|
||||
MediaStreamTrack: ['audioTrack', 'videoTrack'],
|
||||
});
|
||||
|
||||
const stream = await getNoiseStream({ audio: true, video: true });
|
||||
self.audioTrack = stream.getAudioTracks()[0];
|
||||
self.videoTrack = stream.getVideoTracks()[0];
|
||||
}
|
||||
);
|
|
@ -10,18 +10,22 @@ idl_test(
|
|||
['notifications'],
|
||||
['service-workers', 'html', 'dom'],
|
||||
idl_array => {
|
||||
idl_array.add_objects({
|
||||
Notification: ['notification'],
|
||||
});
|
||||
if (self.ServiceWorkerGlobalScope) {
|
||||
idl_array.add_objects({
|
||||
NotificationEvent: ['notificationEvent'],
|
||||
ServiceWorkerGlobalScope: ['self'],
|
||||
});
|
||||
}
|
||||
self.notification = new Notification("Running idlharness.");
|
||||
if (self.ServiceWorkerGlobalScope) {
|
||||
self.notificationEvent = new NotificationEvent("type", { notification: notification });
|
||||
// NotificationEvent could be tested here, but the constructor requires
|
||||
// a Notification instance which cannot be created in a service worker,
|
||||
// see below.
|
||||
} else {
|
||||
// While the Notification interface is exposed in service workers, the
|
||||
// constructor (https://notifications.spec.whatwg.org/#dom-notification-notification)
|
||||
// is defined to throw a TypeError. Therefore, we only add the object in
|
||||
// the other scopes.
|
||||
idl_array.add_objects({
|
||||
Notification: ['notification'],
|
||||
});
|
||||
self.notification = new Notification('title');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
spec: https://w3c.github.io/reporting/
|
||||
suggested_reviewers:
|
||||
- dcreager
|
||||
- igrigorik
|
||||
- paulmeyer90
|
|
@ -0,0 +1,14 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
'use strict';
|
||||
|
||||
idl_test(
|
||||
['reporting'],
|
||||
[],
|
||||
idl_array => {
|
||||
idl_array.add_objects({
|
||||
// TODO: objects
|
||||
});
|
||||
}
|
||||
);
|
|
@ -47,25 +47,29 @@ class MockVRService {
|
|||
let device = new MockDevice(fakeDeviceInit, this);
|
||||
this.devices_.push(device);
|
||||
|
||||
if (this.client_) {
|
||||
this.client_.onDeviceChanged();
|
||||
}
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
// VRService implementation.
|
||||
requestDevice() {
|
||||
return Promise.resolve(
|
||||
{device: this.devices_[0] ? this.devices_[0].getDevicePtr() : null});
|
||||
}
|
||||
|
||||
setClient(client) {
|
||||
this.client_ = client;
|
||||
for (let i = 0; i < this.devices_.length; i++) {
|
||||
this.devices_[i].notifyClientOfDisplay();
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
// Implements both XRDeviceImpl and VRMagicWindowProvider. Maintains a mock for
|
||||
// Implements both XRDevice and VRMagicWindowProvider. Maintains a mock for
|
||||
// XRPresentationProvider.
|
||||
class MockDevice {
|
||||
constructor(fakeDeviceInit, service) {
|
||||
this.displayClient_ = new device.mojom.VRDisplayClientPtr();
|
||||
this.sessionClient_ = new device.mojom.XRSessionClientPtr();
|
||||
this.presentation_provider_ = new MockXRPresentationProvider();
|
||||
|
||||
this.pose_ = null;
|
||||
|
@ -80,23 +84,13 @@ class MockDevice {
|
|||
} else {
|
||||
this.displayInfo_ = this.getNonImmersiveDisplayInfo();
|
||||
}
|
||||
|
||||
if (service.client_) {
|
||||
this.notifyClientOfDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
// Functions for setup.
|
||||
// This function calls to the backend to add this device to the list.
|
||||
notifyClientOfDisplay() {
|
||||
getDevicePtr() {
|
||||
let devicePtr = new device.mojom.XRDevicePtr();
|
||||
let deviceRequest = mojo.makeRequest(devicePtr);
|
||||
let deviceBinding =
|
||||
new mojo.Binding(device.mojom.XRDevice, this, deviceRequest);
|
||||
|
||||
let clientRequest = mojo.makeRequest(this.displayClient_);
|
||||
this.service_.client_.onDisplayConnected(
|
||||
devicePtr, clientRequest, this.displayInfo_);
|
||||
new mojo.Binding(device.mojom.XRDevice, this, mojo.makeRequest(devicePtr));
|
||||
return devicePtr;
|
||||
}
|
||||
|
||||
// Test methods.
|
||||
|
@ -120,7 +114,7 @@ class MockDevice {
|
|||
}
|
||||
|
||||
if (changed) {
|
||||
this.displayClient_.onChanged(this.displayInfo_);
|
||||
this.sessionClient_.onChanged(this.displayInfo_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -279,8 +273,7 @@ class MockDevice {
|
|||
// do not have any use for this data at present.
|
||||
}
|
||||
|
||||
// XRDeviceImpl implementation.
|
||||
|
||||
// XRDevice implementation.
|
||||
requestSession(sessionOptions, was_activation) {
|
||||
return this.supportsSession(sessionOptions).then((result) => {
|
||||
// The JavaScript bindings convert c_style_names to camelCase names.
|
||||
|
@ -310,11 +303,15 @@ class MockDevice {
|
|||
device.mojom.XREnviromentIntegrationProvider, this,
|
||||
enviromentProviderRequest);
|
||||
|
||||
let clientRequest = mojo.makeRequest(this.sessionClient_);
|
||||
|
||||
return Promise.resolve({
|
||||
session: {
|
||||
submitFrameSink: submit_frame_sink,
|
||||
dataProvider: dataProviderPtr,
|
||||
enviromentProvider: enviromentProviderPtr
|
||||
enviromentProvider: enviromentProviderPtr,
|
||||
clientRequest: clientRequest,
|
||||
displayInfo: this.displayInfo_
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -326,7 +323,7 @@ class MockDevice {
|
|||
supportsSession(options) {
|
||||
return Promise.resolve({
|
||||
supportsSession:
|
||||
!options.exclusive || this.displayInfo_.capabilities.canPresent
|
||||
!options.immersive || this.displayInfo_.capabilities.canPresent
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,19 +1,37 @@
|
|||
async function wait_for_performance_entries(url) {
|
||||
let entries = performance.getEntriesByName(url);
|
||||
if (entries.length > 0) {
|
||||
return entries;
|
||||
}
|
||||
return new Promise((resolve) => {
|
||||
new PerformanceObserver((list) => {
|
||||
const entries = list.getEntriesByName(url);
|
||||
if (entries.length > 0) {
|
||||
resolve(entries);
|
||||
}
|
||||
}).observe({ entryTypes: ['resource'] });
|
||||
});
|
||||
}
|
||||
|
||||
self.addEventListener('activate', event => {
|
||||
event.waitUntil(self.registration.navigationPreload.enable());
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', event => {
|
||||
let headers;
|
||||
event.respondWith(
|
||||
event.preloadResponse
|
||||
.then(response => {
|
||||
var headers = response.headers;
|
||||
return response.text().then(text =>
|
||||
new Response(
|
||||
JSON.stringify({
|
||||
decodedBodySize: headers.get('X-Decoded-Body-Size'),
|
||||
encodedBodySize: headers.get('X-Encoded-Body-Size'),
|
||||
timingEntries: performance.getEntriesByName(event.request.url)
|
||||
}),
|
||||
{headers: {'Content-Type': 'text/html'}}));
|
||||
}));
|
||||
headers = response.headers;
|
||||
return response.text()
|
||||
})
|
||||
.then(_ => wait_for_performance_entries(event.request.url))
|
||||
.then(entries =>
|
||||
new Response(
|
||||
JSON.stringify({
|
||||
decodedBodySize: headers.get('X-Decoded-Body-Size'),
|
||||
encodedBodySize: headers.get('X-Encoded-Body-Size'),
|
||||
timingEntries: entries
|
||||
}),
|
||||
{headers: {'Content-Type': 'text/html'}})));
|
||||
});
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
mix-blend-mode: screen;
|
||||
}
|
||||
|
||||
#edgecover > rect {
|
||||
mix-blend-mode: normal;
|
||||
}
|
||||
|
||||
g {
|
||||
isolation: isolate;
|
||||
}
|
||||
|
@ -32,7 +36,7 @@
|
|||
</g>
|
||||
|
||||
<!-- Stroke to prevent aliasing from effecting results. -->
|
||||
<g style="mix-blend-mode:normal;fill:none;stroke:black;stroke-width:2px">
|
||||
<g style="fill:none;stroke:black;stroke-width:2px" id="edgecover">
|
||||
<rect x="120" y="80" width="160" height="160"/>
|
||||
<rect x="200" y="80" width="160" height="160"/>
|
||||
<rect x="160" y="160" width="160" height="160"/>
|
||||
|
|
До Ширина: | Высота: | Размер: 1.2 KiB После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -18,21 +18,23 @@
|
|||
mix-blend-mode: screen;
|
||||
}
|
||||
|
||||
g {
|
||||
isolation: isolate;
|
||||
#edgecover > rect {
|
||||
mix-blend-mode: normal;
|
||||
}
|
||||
</style>
|
||||
|
||||
<g id="test-body-content">
|
||||
|
||||
<rect x="120" y="80" width="160" height="160" fill="red"/>
|
||||
<g>
|
||||
<rect x="200" y="80" width="160" height="160" fill="lime"/>
|
||||
<rect x="160" y="160" width="160" height="160" fill="blue"/>
|
||||
<g style="isolation: isolate">
|
||||
<rect x="120" y="80" width="160" height="160" fill="red"/>
|
||||
<g style="isolation: isolate">
|
||||
<rect x="200" y="80" width="160" height="160" fill="lime"/>
|
||||
<rect x="160" y="160" width="160" height="160" fill="blue"/>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
<!-- Stroke to prevent aliasing from effecting results. -->
|
||||
<g style="mix-blend-mode:normal;fill:none;stroke:black;stroke-width:2px">
|
||||
<g style="fill:none;stroke:black;stroke-width:2px" id="edgecover">
|
||||
<rect x="120" y="80" width="160" height="160"/>
|
||||
<rect x="200" y="80" width="160" height="160"/>
|
||||
<rect x="160" y="160" width="160" height="160"/>
|
||||
|
|
До Ширина: | Высота: | Размер: 1.2 KiB После Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -369,17 +369,19 @@ class Http2WebTestRequestHandler(BaseWebTestRequestHandler):
|
|||
stream_queues[frame.stream_id] = (self.start_stream_thread(frame, queue), queue)
|
||||
stream_queues[frame.stream_id][1].put(frame)
|
||||
|
||||
if isinstance(frame, StreamEnded) or frame.stream_ended:
|
||||
if isinstance(frame, StreamEnded) or (hasattr(frame, "stream_ended") and frame.stream_ended):
|
||||
del stream_queues[frame.stream_id]
|
||||
|
||||
except (socket.timeout, socket.error) as e:
|
||||
self.logger.debug('(%s) ERROR - Closing Connection - \n%s' % (self.uid, str(e)))
|
||||
self.logger.error('(%s) Closing Connection - \n%s' % (self.uid, str(e)))
|
||||
if not self.close_connection:
|
||||
self.close_connection = True
|
||||
for stream_id, (thread, queue) in stream_queues.items():
|
||||
queue.put(None)
|
||||
except Exception as e:
|
||||
self.logger.error('(%s) Unexpected Error - \n%s' % (self.uid, str(e)))
|
||||
finally:
|
||||
for stream_id, (thread, queue) in stream_queues:
|
||||
for stream_id, (thread, queue) in stream_queues.items():
|
||||
thread.join()
|
||||
|
||||
def start_stream_thread(self, frame, queue):
|
||||
|
@ -440,7 +442,8 @@ class Http2WebTestRequestHandler(BaseWebTestRequestHandler):
|
|||
self.logger.debug('(%s - %s) Stream Reset, Thread Closing' % (self.uid, stream_id))
|
||||
break
|
||||
|
||||
request.frames.append(frame)
|
||||
if request is not None:
|
||||
request.frames.append(frame)
|
||||
|
||||
if hasattr(frame, "stream_ended") and frame.stream_ended:
|
||||
self.finish_handling(request, response, req_handler)
|
||||
|
|
|
@ -227,6 +227,7 @@ skip-if = appname == "thunderbird"
|
|||
[test_system_update_overlapping.js]
|
||||
[test_system_update_upgrades.js]
|
||||
[test_temporary.js]
|
||||
skip-if = os == "win" && os_version == "10.0" && ccov # Bug 1469904
|
||||
tags = webextensions
|
||||
[test_theme_update.js]
|
||||
[test_trash_directory.js]
|
||||
|
|
|
@ -27,3 +27,23 @@ treecol:not([hideheader="true"]) > .treecol-sortdirection[sortDirection="descend
|
|||
list-style-image: url("chrome://global/skin/tree/sort-dsc-classic.png");
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-windows-classic) {
|
||||
treecol,
|
||||
treecolpicker {
|
||||
border: 1px solid;
|
||||
border-top-color: ThreeDHighlight;
|
||||
border-inline-end-color: ThreeDShadow;
|
||||
border-bottom-color: ThreeDShadow;
|
||||
border-inline-start-color: ThreeDHighlight;
|
||||
background-color: -moz-Dialog;
|
||||
}
|
||||
|
||||
treecol:hover:active,
|
||||
treecolpicker:hover:active {
|
||||
border-top-color: ThreeDShadow;
|
||||
border-inline-end-color: ThreeDHighlight;
|
||||
border-bottom-color: ThreeDHighlight;
|
||||
border-inline-start-color: ThreeDShadow;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче